Repository: TheOnlyZac/sly1 Branch: main Commit: bdb64a038e1f Files: 418 Total size: 1.5 MB Directory structure: gitextract_7h7wlxdh/ ├── .gitattributes ├── .github/ │ └── workflows/ │ ├── build.yml │ ├── frogress.yml │ └── progress.yml ├── .gitignore ├── README.md ├── config/ │ ├── checksum.sha1 │ ├── readme.md │ ├── sly1.yaml │ ├── sly1_may19.yaml │ ├── symbol_addrs.txt │ ├── symbol_addrs_may19.txt │ └── symbol_addrs_old.txt ├── configure.py ├── docs/ │ ├── BEGINNERSGUIDE.md │ ├── CONTRIBUTING.md │ ├── DISTROBOX.md │ └── STYLEGUIDE.md ├── include/ │ ├── 989snd.h │ ├── ac.h │ ├── act.h │ ├── actseg.h │ ├── alarm.h │ ├── alo.h │ ├── aseg.h │ ├── asega.h │ ├── barrier.h │ ├── bas.h │ ├── basic.h │ ├── bbmark.h │ ├── bez.h │ ├── binoc.h │ ├── bis.h │ ├── blend.h │ ├── blip.h │ ├── bomb.h │ ├── bq.h │ ├── break.h │ ├── brx.h │ ├── bsp.h │ ├── button.h │ ├── cat.h │ ├── cd.h │ ├── chkpnt.h │ ├── cid.h │ ├── clip.h │ ├── clock.h │ ├── cm.h │ ├── cnvo.h │ ├── coin.h │ ├── common.h │ ├── cplcy.h │ ├── credit.h │ ├── crout.h │ ├── crusher.h │ ├── crv.h │ ├── dart.h │ ├── dartgun.h │ ├── dialog.h │ ├── difficulty.h │ ├── dl.h │ ├── dmas.h │ ├── dysh.h │ ├── dzg.h │ ├── emitter.h │ ├── ensure.h │ ├── eyes.h │ ├── fader.h │ ├── find.h │ ├── flash.h │ ├── fly.h │ ├── font.h │ ├── freeze.h │ ├── frm.h │ ├── frzg.h │ ├── game.h │ ├── gcc/ │ │ └── math.h │ ├── geom.h │ ├── gifs.h │ ├── glbs.h │ ├── glob.h │ ├── gomer.h │ ├── gs.h │ ├── hide.h │ ├── hnd.h │ ├── ik.h │ ├── include_asm.h │ ├── intrinsics.h │ ├── jlo.h │ ├── joy.h │ ├── jsg.h │ ├── jt.h │ ├── jump.h │ ├── keyhole.h │ ├── labels.inc │ ├── landing.h │ ├── lgn.h │ ├── lib/ │ │ └── libkernl/ │ │ └── filestub.h │ ├── light.h │ ├── lo.h │ ├── lookat.h │ ├── macro.inc │ ├── mark.h │ ├── mat.h │ ├── mb.h │ ├── memcard.h │ ├── memory.h │ ├── missile.h │ ├── mpeg.h │ ├── mq.h │ ├── mrkv.h │ ├── ms.h │ ├── murray.h │ ├── oid.h │ ├── path.h │ ├── phasemem.h │ ├── pipe.h │ ├── pnt.h │ ├── po.h │ ├── prog.h │ ├── proxy.h │ ├── puffer.h │ ├── pzo.h │ ├── rail.h │ ├── rat.h │ ├── rchm.h │ ├── render.h │ ├── rip.h │ ├── rog.h │ ├── rs.h │ ├── rumble.h │ ├── rwm.h │ ├── sb.h │ ├── sce/ │ │ ├── libdma.h │ │ ├── memset.h │ │ └── rand.h │ ├── screen.h │ ├── sdk/ │ │ ├── ee/ │ │ │ ├── eekernel.h │ │ │ ├── eestruct.h │ │ │ ├── libpad.h │ │ │ ├── sifdev.h │ │ │ └── sifrpc.h │ │ └── libcdvd.h │ ├── sensor.h │ ├── shadow.h │ ├── shape.h │ ├── shd.h │ ├── shdanim.h │ ├── sky.h │ ├── slotheap.h │ ├── sm.h │ ├── smartguard.h │ ├── so.h │ ├── solve.h │ ├── sort.h │ ├── sound.h │ ├── spaprops.h │ ├── speaker.h │ ├── spire.h │ ├── splice/ │ │ ├── bif.h │ │ ├── eval.h │ │ ├── frame.h │ │ ├── gc.h │ │ ├── method.h │ │ ├── pair.h │ │ ├── proc.h │ │ ├── ref.h │ │ ├── serialize.h │ │ ├── sidebag.h │ │ ├── spliceutils.h │ │ ├── splotheap.h │ │ └── vecmat.h │ ├── splicemap.h │ ├── spliceobj.h │ ├── sprbuf.h │ ├── sqtr.h │ ├── step.h │ ├── stepact.h │ ├── stepcane.h │ ├── stepguard.h │ ├── stephang.h │ ├── stephide.h │ ├── steppipe.h │ ├── steppower.h │ ├── steprail.h │ ├── steprun.h │ ├── stepside.h │ ├── stepzap.h │ ├── stream.h │ ├── suv.h │ ├── sw.h │ ├── tail.h │ ├── tank.h │ ├── target.h │ ├── text.h │ ├── thread.h │ ├── tn.h │ ├── transition.h │ ├── turret.h │ ├── tv.h │ ├── types.h │ ├── ub.h │ ├── ui.h │ ├── update.h │ ├── util.h │ ├── vb.h │ ├── vec.h │ ├── vifs.h │ ├── vis.h │ ├── vol.h │ ├── vtables.h │ ├── water.h │ ├── waypoint.h │ ├── wipe.h │ ├── wm.h │ ├── wr.h │ ├── xform.h │ └── zap.h ├── requirements.txt ├── scripts/ │ ├── build.sh │ ├── check_progress.py │ ├── checks.sh │ ├── codematcher/ │ │ ├── match_all.sh │ │ ├── match_file.sh │ │ └── match_function_live.sh │ ├── diff.sh │ ├── extract_elf.sh │ ├── frogress/ │ │ ├── mapfile_progress.sh │ │ └── upload_progress.py │ ├── quickstart.sh │ ├── readme.md │ ├── run.sh │ ├── setup_prodg_linux.sh │ └── windows/ │ ├── backup_registry.bat │ ├── run.bat │ └── setup_prodg_windows.bat ├── src/ │ ├── P2/ │ │ ├── 989snd.c │ │ ├── ac.c │ │ ├── act.c │ │ ├── actseg.c │ │ ├── alarm.c │ │ ├── alo.c │ │ ├── aseg.c │ │ ├── asega.c │ │ ├── barrier.c │ │ ├── bas.c │ │ ├── basic.c │ │ ├── bbmark.c │ │ ├── bez.c │ │ ├── binoc.c │ │ ├── bis.c │ │ ├── blend.c │ │ ├── blip.c │ │ ├── bomb.c │ │ ├── bq.c │ │ ├── break.c │ │ ├── brx.c │ │ ├── bsp.c │ │ ├── button.c │ │ ├── cat.c │ │ ├── cd.c │ │ ├── chkpnt.c │ │ ├── clip.c │ │ ├── clock.c │ │ ├── cm.c │ │ ├── cnvo.c │ │ ├── coin.c │ │ ├── cplcy.c │ │ ├── credit.c │ │ ├── crout.c │ │ ├── crusher.c │ │ ├── crv.c │ │ ├── dart.c │ │ ├── dartgun.c │ │ ├── dialog.c │ │ ├── difficulty.c │ │ ├── dl.c │ │ ├── dmas.c │ │ ├── dysh.c │ │ ├── dzg.c │ │ ├── emitter.c │ │ ├── eyes.c │ │ ├── fader.c │ │ ├── find.c │ │ ├── flash.c │ │ ├── fly.c │ │ ├── font.c │ │ ├── freeze.c │ │ ├── frm.c │ │ ├── frzg.c │ │ ├── game.c │ │ ├── geom.c │ │ ├── gifs.c │ │ ├── glbs.c │ │ ├── glob.c │ │ ├── gomer.c │ │ ├── gs.c │ │ ├── hide.c │ │ ├── hnd.c │ │ ├── ik.c │ │ ├── jlo.c │ │ ├── joy.c │ │ ├── jsg.c │ │ ├── jt.c │ │ ├── jump.c │ │ ├── keyhole.c │ │ ├── landing.c │ │ ├── lgn.c │ │ ├── light.c │ │ ├── lo.c │ │ ├── lookat.c │ │ ├── main.c │ │ ├── mark.c │ │ ├── mat.c │ │ ├── mb.c │ │ ├── memory.c │ │ ├── missile.c │ │ ├── mpeg.c │ │ ├── mrkv.c │ │ ├── ms.c │ │ ├── murray.c │ │ ├── path.c │ │ ├── phasemem.c │ │ ├── pipe.c │ │ ├── pnt.c │ │ ├── po.c │ │ ├── prog.c │ │ ├── proxy.c │ │ ├── puffer.c │ │ ├── pzo.c │ │ ├── rail.c │ │ ├── rat.c │ │ ├── rchm.c │ │ ├── render.c │ │ ├── rip.c │ │ ├── rog.c │ │ ├── rumble.c │ │ ├── rwm.c │ │ ├── sb.c │ │ ├── screen.c │ │ ├── sensor.c │ │ ├── shadow.c │ │ ├── shape.c │ │ ├── shd.c │ │ ├── shdanim.c │ │ ├── sky.c │ │ ├── slotheap.c │ │ ├── sm.c │ │ ├── smartguard.c │ │ ├── so.c │ │ ├── solve.c │ │ ├── sort.c │ │ ├── sound.c │ │ ├── speaker.c │ │ ├── spire.c │ │ ├── splice/ │ │ │ ├── bif.cpp │ │ │ ├── eval.cpp │ │ │ ├── frame.cpp │ │ │ ├── gc.cpp │ │ │ ├── method.cpp │ │ │ ├── pair.cpp │ │ │ ├── proc.cpp │ │ │ ├── ref.cpp │ │ │ ├── serialize.cpp │ │ │ ├── sidebag.cpp │ │ │ ├── spliceutils.cpp │ │ │ ├── splotheap.cpp │ │ │ └── vecmat.cpp │ │ ├── splicemap.c │ │ ├── spliceobj.c │ │ ├── sprbuf.c │ │ ├── sqtr.c │ │ ├── step.c │ │ ├── stepact.c │ │ ├── stepcane.c │ │ ├── stepguard.c │ │ ├── stephang.c │ │ ├── stephide.c │ │ ├── steppipe.c │ │ ├── steppower.c │ │ ├── steprail.c │ │ ├── steprun.c │ │ ├── stepside.c │ │ ├── stream.c │ │ ├── suv.c │ │ ├── sw.c │ │ ├── tail.c │ │ ├── tank.c │ │ ├── target.c │ │ ├── text.c │ │ ├── thread.c │ │ ├── tn.c │ │ ├── transition.c │ │ ├── turret.c │ │ ├── tv.c │ │ ├── ub.c │ │ ├── ui.c │ │ ├── update.c │ │ ├── util.c │ │ ├── vec.c │ │ ├── vifs.c │ │ ├── vis.c │ │ ├── water.c │ │ ├── waypoint.c │ │ ├── wipe.c │ │ ├── wm.c │ │ ├── wr.c │ │ ├── xform.c │ │ └── zap.c │ └── readme.md └── tools/ ├── codematcher/ │ ├── LICENSE.txt │ ├── README.md │ ├── codematcher │ ├── ghidra_tips.txt │ ├── match_all.cmd │ └── match_single.cmd └── objdiff/ ├── LICENSE └── objdiff-cli-linux-x86_64 ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitattributes ================================================ *.h linguist-language=C++ *.c linguist-language=C++ ================================================ FILE: .github/workflows/build.yml ================================================ name: Build project and validate checksum on: push: branches: - "*" jobs: build: if: github.repository_owner == 'theonlyzac' runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: Set up Python uses: actions/setup-python@v2 with: python-version: "3.x" - name: Install dependencies run: | python -m pip install --upgrade pip pip install -U -r requirements.txt - name: Setup wine run: | sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install wine32 - name: Setup build environment run: | sudo apt-get install binutils-mips-linux-gnu scripts/setup_prodg_linux.sh curl -o disc/SCUS_971.98 "${{ secrets.FILE_URL }}" - name: Run build script run: | python configure.py ninja ================================================ FILE: .github/workflows/frogress.yml ================================================ name: Post mapfile_parser progress to Frogress endpoint on: push: branches: - main - progress jobs: frogress-upload: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v2 with: python-version: "3.9.x" - name: Install dependencies run: | python -m pip install --upgrade pip pip install -U -r requirements.txt - name: Setup wine run: | sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install wine32 - name: Setup build environment run: | sudo apt-get install binutils-mips-linux-gnu scripts/setup_prodg_linux.sh curl -o disc/SCUS_971.98 "${{ secrets.FILE_URL }}" - name: Run build script run: | python configure.py ninja - name: Post to frogress endpoint run: | python3 scripts/frogress/upload_progress.py --frogress_api_key ${{ secrets.FROGRESS_API_KEY }} ================================================ FILE: .github/workflows/progress.yml ================================================ name: Upload objdiff report for Decomp.dev bot on: push: branches: - main - progress jobs: report-upload: runs-on: ubuntu-latest steps: - name: Checkout Repository uses: actions/checkout@v4 - name: Set up Python uses: actions/setup-python@v2 with: python-version: "3.9.x" - name: Install dependencies run: | python -m pip install --upgrade pip pip install -U -r requirements.txt - name: Setup wine run: | sudo dpkg --add-architecture i386 sudo apt-get update sudo apt-get install wine32 - name: Setup build environment run: | sudo apt-get install binutils-mips-linux-gnu scripts/setup_prodg_linux.sh curl -o disc/SCUS_971.98 "${{ secrets.FILE_URL }}" - name: Configure and generate report run: | python configure.py --objects ninja ./tools/objdiff/objdiff-cli report generate > report.json - name: Upload Artifact uses: actions/upload-artifact@v4 with: name: SCUS_971.98_report path: ./report.json ================================================ FILE: .gitignore ================================================ # Project-specific files SCUS_971.98 *[Ss][Cc][Uu][Ss]* *971*98* SCUS_*.* *.elf disc/* reference/* # Objdiff objdiff.json report.json # Compiler prodg* tools/cc/ tools/wibo-i686 usr/ # Splat splat/ assets/ asm/ undefined_funcs_auto.txt undefined_syms_auto.txt .splache .ninja_log *.ninja permuter_settings.toml # Documentation html/ ## MacOS .DS_Store ## Linux *.swp ## WSL *:Zone.Identifier ## Binary/object products **/bin/ **/obj/ ## Clang-tooling things **/compile_commands.json # Compiled Object files *.slo *.lo *.o *.obj # Precompiled Headers *.gch *.pch # Compiled Dynamic libraries *.so *.dylib *.dll # Compiled Static libraries *.lai *.la *.a *.lib # Executables *.exe *.out *.app *.elf # Linker scripts *.ld # Python env/ __pycache__/ *.pyc # Miscellaneous .vscode temp/ *.diff *.AppImage ================================================ FILE: README.md ================================================ # 🦝 Sly Cooper and the Thievius Raccoonus [build-url]:https://github.com/TheOnlyZac/sly1/actions/workflows/build.yml [build-badge]: https://img.shields.io/github/actions/workflow/status/theonlyzac/sly1/build.yml?branch=main&label=build [decompdev-url]: https://decomp.dev/TheOnlyZac/sly1 [data-progress-badge]: https://decomp.dev/TheOnlyZac/sly1.svg?mode=shield&label=data&measure=matched_data_percent [engine-url]: https://decomp.dev/TheOnlyZac/sly1/SCUS_971.98?category=P2 [engine-progress-badge]: https://decomp.dev/TheOnlyZac/sly1.svg?mode=shield&category=P2&label=engine&measure=fuzzy_match_percent [splice-url]: https://decomp.dev/TheOnlyZac/sly1/SCUS_971.98?category=splice [splice-progress-badge]: https://decomp.dev/TheOnlyZac/sly1.svg?mode=shield&category=splice&label=splice&measure=fuzzy_match_percent [contributors-url]: https://github.com/theonlyzac/sly1/graphs/contributors [contributors-badge]: https://img.shields.io/github/contributors/theonlyzac/sly1?color=%23db6d28 [discord-url]: https://discord.gg/2GSXcEzPJA [discord-badge]: https://img.shields.io/discord/439454661100175380?color=%235865F2&logo=discord&logoColor=%23FFFFFF [docs-url]: https://theonlyzac.github.io/sly1 [docs-badge]: https://img.shields.io/badge/docs-github.io-2C4AA8 [wiki-url]: https://slymods.info [wiki-badge]: https://img.shields.io/badge/wiki-slymods.info-2C4AA8 [![Build][build-badge]][build-url] [![Engine Progress][engine-progress-badge]][engine-url] [![Splice Progress][splice-progress-badge]][splice-url] [![Data Progress][data-progress-badge]][decompdev-url] [![Contributors][contributors-badge]][contributors-url] [![Discord Channel][discord-badge]][discord-url] [![Docs][docs-badge]][docs-url] [![Wiki][wiki-badge]][wiki-url] [Sly 1 Decompilation Logo by Cooper941][docs-url] This is a work-in-progress decompilation of [*Sly Cooper and the Thievius Raccoonus*](https://en.wikipedia.org/wiki/Sly_Cooper_and_the_Thievius_Raccoonus) for the PlayStation 2. It builds the NTSC-U version of the game, `SCUS_971.98` (SHA1: `57dc305d`). Our goal is to fully decompile the game engine to matching source code. This repo does **not** contain any assets or original code from the game's files; you need your own copy of the game to build and run it. Documentation of the code is hosted at [theonlyzac.github.io/sly1](https://theonlyzac.github.io/sly1). For more info on the game's internal systems and mechanics, check out the [SlyMods Wiki][wiki-url]. New contributors are welcome to make a pull request! If you would like to help but aren't sure where to start, check out [CONTRIBUTING.md](/docs/CONTRIBUTING.md) and [join our Discord server][discord-url] if you have any questions. [![Quickstart](https://img.shields.io/badge/⚡%20Quickstart-093fbe?style=for-the-badge)](#-quickstart) [![Manual Setup](https://img.shields.io/badge/⚙️%20Manual%20Setup-093fbe?style=for-the-badge)](#%EF%B8%8F-manual-setup) [![Running the Game](https://img.shields.io/badge/🎮%20Running%20the%20Game-093fbe?style=for-the-badge)](#-running-the-game) [![Project Structure](https://img.shields.io/badge/📁%20Project%20Structure-093fbe?style=for-the-badge)](#-project-structure) [![FAQ](https://img.shields.io/badge/❓%20FAQ-093fbe?style=for-the-badge)](#-frequently-asked-questions) [![Contributors](https://img.shields.io/badge/🩵%20Contributors-093fbe?style=for-the-badge)](#-contributors) [![Star History](https://img.shields.io/badge/⭐%20Star%20History-093fbe?style=for-the-badge)](#-star-history) [![Discord](https://img.shields.io/badge/Discord-093fbe?style=for-the-badge&logo=discord)](https://discord.gg/2GSXcEzPJA) ## ⚡ Quickstart You can quickly setup the project on Debian-based systems such as Ubuntu (or WSL) using the quickstart script. Follow these three steps to get started: > **NOTE:** You can follow along on other distros by using the [Distrobox Guide](./docs/DISTROBOX.md) to set up a Debian container. ### 1. Clone the repo ```bash git clone https://github.com/theonlyzac/sly1 cd sly1 ``` ### 2. Run quickstart Run the `quickstart.sh` script in the `scripts` directory. It may ask for your password to install dependencies. You have two options to automatically extract your original game executable: - Method 1: Copy the NTSC-U Sly 1 game ISO to the `disc` directory and then run: ```bash ./scripts/quickstart.sh ``` - Method 2: Specify a path to the ISO: ```bash ./scripts/quickstart.sh /path/to/GameBackup.iso ``` Otherwise, just copy the `SCUS_971.98` file from your game disc to the `disc` directory manually. ### 3. Build the project ```bash ./scripts/build.sh ``` If the build succeeds, you will see this: ``` out/SCUS_971.98: OK ``` If you have any issues, or you prefer to set up the project manually, follow the instructions below. Instructions to run the game are also provided below. ## ⚙️ Manual Setup The project can be built on Linux (or Windows using WSL). Follow the instructions below to set up the build environment. > **Note:** These instructions assume a Debian-based system such as Ubuntu. For other distributions, adapt the package manager commands and package names accordingly. ### 1. Clone the repository Clone the repo to your local machine: ```bash git clone https://github.com/TheOnlyZac/sly1 cd sly1 ``` ### 2. Extract your game's ELF file To build the project, you will need to extract the original ELF file from your own legally obtained copy of the game. Mount the disc on your PC and copy the file `SCUS_971.98` from your disc to the `disc` directory of this project. ### 3. Setup Python environment Install Python 3.9 or higher, pip and venv: ```bash sudo apt install python3 python3-pip python3-venv ``` Create a Python environment for the project: ```bash python3 -m venv env ``` Activate the environment: ```bash source env/bin/activate ``` Then install the required Python packages: ```bash pip3 install -U -r requirements.txt ``` ### 4. Setup build environment Install 32 bit MIPS assembler and Wine: ```bash sudo dpkg --add-architecture i386 sudo apt update sudo apt install binutils-mips-linux-gnu wine32 ``` > **Note:** For a lighter and faster alternative to Wine, download [`wibo-i686`](https://github.com/decompals/wibo/releases/) to the `tools` directory. Install Ninja build system: ```bash sudo apt install ninja-build ``` Setup the compiler using the provided script: ```bash ./scripts/setup_prodg_linux.sh ``` ### 5. Configure and build the project Run the configure script and the build with ninja: ```bash python3 configure.py ninja ``` The default behavior is to split the binary using Splat, build the object files (inserting the split assembly in place of non-matching functions), link the matching executable, and confirm that the checksum of the built executable matches the original. You can alter the behavior by passing any of the following arguments to `configure.py`: * `--clean` - Delete any existing build files and configure the project. * `--clean-only` - Delete any existing build files **without** configuring the project. * `--skip-checksum` - Skip the checksum verification step. This is necessary if you are intentionally changing the code, but note that the elf may not boot. * `--objects` - Builds the object files for matching with objdiff and generates an objdiff config file. Outputs two sets of object files: `obj/target` and `obj/current` (the latter of which will be updated automatically by objdiff as you edit the source code). ## 🎮 Running the Game Running the compiled executable requires [PCSX2 2.0](https://pcsx2.net/). You must have your own copy of the original game and the BIOS from your own PS2. They are not included in this repo and we cannot provide them for you. Once you have those, and you have built the executable `SCUS_971.98`, you can run it using one of three methods: ### Method 1: Autorun script The `run.sh` script in the `scripts` directory will run the last successful build in the PCSX2 emulator. It will automatically detect PCSX2 installed via package manager, Flatpak, AppImage, or XDG Desktop entries in that order and use the first ISO found in the `disc` directory to load assets. Optionally, you can specify what ISO file to use: ```bash ./scripts/run.sh /path/to/GameBackup.iso ``` To detect the PCSX2 AppImage, it must be placed in the `tools` directory, or be "Installed" via an AppImage manager utility. ### Method 2: Run from PCSX2 CLI To boot the elf in PCSX2 from the command line, use the following command: ```bash pcsx2 -elf "./out/SCUS_971.98" "/path/to/GameBackup.iso" ``` * Replace `pcsx2` with the path to your PCSX2 executable if not found automatically: * AppImage: Use the path to the `.appimage` file. * Flatpak: Grant PCSX2 access to your home directory with `flatpak override --user net.pcsx2.PCSX2 --filesystem=home` or a specific directory using `--filesystem=/path/to/files`. Then use `flatpak run net.pcsx2.PCSX2` as the executable. Relative paths to the ELF and ISO files will not work, only full system paths. * Windows: Use the path to `pcsx2.exe`. * The `-elf` parameter specifies the path to the `SCUS_971.98` you built from this project. Replace the example path if necessary. The emulator will use this ELF to boot the game. * The last argument is the path to your game ISO. Replace the example path with the path to a backup of your own game disc. This is where the emulator will load assets from. ### Method 3: Run from PCSX2 GUI 1. In your PCSX2 games folder, make an alias (Linux) or symbolic link (Windows) called `SCUS_971.98.elf`, which points to the `out/SCUS_971.98` file built by this project. * Note: The alias/symlink must point to `out/SCUS_971.98`, not `out/SCUS_971.98.elf`. 2. The alias/symlink will be recognized as a game in PCSX2. Right click on it, then click `Properties... > Disc Path > Browse` and select the ISO of your game backup. 3. Click "Close" and boot the game as normal. You only have to make the alias/symlink once, and it will update every time you build the project. ## 📁 Project Structure The project files are sorted into the following directories. Many of them have their own readme with more info about what they contain. * `include` - Header files for the game engine. * `src` - The decompiled source code. * All of the code for the game engine is in `src/P2`. * Code for the game's scripting engine is in `src/P2/splice`. * `config` - Config files for Splat (binary splitting tool). * `scripts` - Utility scripts for setting up the build environment. * `docs` - Documentation and instructions for contributing. * `tools` - Utilities for function matching. * `reference` - Reference files for functions and data structures. When you build the executable, the following directories will be created. * `asm` - Disassembled assembly code from the elf. * `assets`- Binary data extracted from the elf. * `obj` - Compiled object files. * `out` - Compiled executables. ## ❓ Frequently Asked Questions ### What is a decompilation? When the developers created the game, they wrote source code and compiled it to assembly code that can run on the PS2. A decompilation involves reverse-engineering the assembly code to produce new, original code that compiles to the same assembly. This process leaves us with source code that is similar to and behaves the same as the source code (though not necessarily identical), which helps us understand what the programmers were thinking when they made the game. ### How do you decompile the code? We use a tool called [Splat](https://github.com/ethteck/splat/) to split the binary into assembly files representing each individual function. We then reimplement every function and data structure by writing C++ code that compiles to the same assembly code. We do not copy any code from the original game binary into the decompilation. ### Has this ever been done before? There are many other decompilation projects, but this was one of the first ones for the PS2. Our inspirations include as the [Super Mario 64 decomp](https://github.com/n64decomp/sm64) for the N64 and the [Breath of the Wild decomp](https://github.com/zeldaret/botw) for the Wii U (the latter being more similar in scope to this project). There is also a Jak & Daxter decomp/PC port called [OpenGOAL](https://github.com/open-goal/jak-project), though that game is 98% GOAL language rather than C/C++. ### Is this a matching decomp? Yes. This was the first PS2 decompilation project that targeted the PS2 and utilized function matching, before it was even possible to produce a byte-matching executable. We have built a matching elf since July 2024. Our ultimate goal is to match 100% of the game's functions. ### What is Splice? Splice is the game's scripting engine; it handles things like scripted events, animated cutscenes, and guard spawning by executing scripts stored in the level files. The code for Splice is a distinct subset of the game engine code, which is why it has its own folder and progress percentage. ### How can I help? If you want to contribute, check out [CONTRIBUTING.md](/docs/CONTRIBUTING.md) and feel free to [join our discord server](https://discord.gg/2GSXcEzPJA)! ## 🩵 Contributors Thank you to everyone who has volunteered their time to make this project possible! Made with [contrib.rocks](https://contrib.rocks). ## ⭐ Star History Star History Chart ================================================ FILE: config/checksum.sha1 ================================================ 57dc305db57932ad3f1122966cdb695d2e62a47a out/SCUS_971.98 ================================================ FILE: config/readme.md ================================================ # Splat Config Files This directory contains config files for splat, the tool we use to split and disassemble the game binary. The config files are used to tell splat how to split the binary and what to name the output files. ## Files in this directory - `sly1.yaml` - Main config file for splat. Contains the offsets of each file split in the game binary. Creating new `.c` files involves modifying this file to create a `c` split and then running `python3 configure.py` to generate the new files. - `symbol_addrs.txt` - Contains the addresses of symbols in the game binary. Used by splat to properly reference functions and variables in the game code when splitting the binary. - `checksum.sha1` - SHA1 checksum of the original game binary. Used to verify the integrity of the binary after compilation. ## Adding new splits To add a new source code file to the project, you must add the split to `sly1.yaml`. Here is an example of some file splits: ```yaml - [0x1f560, c, P2/brx] - [0x1fe70, asm, P2/ac] #- [0x, asm, P2/act] ``` - The first line tells Splat to split the binary at offset `0x1f560` and create a new file `P2/brx.c` (if it doesn't exist). It defines a translation unit starting at `0x1f560` and ending at the beginning of the next split. The `.c` file will have INCLUDE_ASM macros for each function in the split. - The second line tells Splat that the data starting from offset `0x1fe70` is in the translation unit `P2/ac`, but not to create a new `.c` file yet. It will only create `.s` files in the `asm/nonmatchings/` directory for each function in the split. - The third line is commented out and does nothing, because we know the next translation unit is `P2/act`, but we don't yet know what offset that translation unit starts at. When we find out (by finding the end of the last function in `P2/ac` and the start of the first function in `P2/act`), we can uncomment this line and add the offset. When splat is run, it will create `.s` assembly files for each non-matching functions in each split in the `asm/nonmatchings/` directory. ================================================ FILE: config/sly1.yaml ================================================ # Splat config for Sly 1 NTSC-U (PS2) name: Sly Cooper and the Thievius Raccoonus (USA) sha1: 57dc305db57932ad3f1122966cdb695d2e62a47a options: basename: SCUS_971.98 target_path: disc/SCUS_971.98 elf_path: SCUS_971.98 base_path: ../ platform: ps2 compiler: EEGCC # Output paths asm_path: asm src_path: src build_path: obj # Assembly options generate_asm_macros_files: False named_regs_for_c_funcs: False find_file_boundaries: False disasm_unknown: True # Rodata options rodata_string_guesser_level: 0 # improve string detection suggestion_rodata_section_start: True pair_rodata_to_text: False migrate_rodata_to_functions: True # Auto-generate undefined functions and symbols create_undefined_funcs_auto: True undefined_funcs_auto_path: config/undefined_funcs_auto.txt create_undefined_syms_auto: True undefined_syms_auto_path: config/undefined_syms_auto.txt # Manually defined symvols symbol_addrs_path: config/symbol_addrs.txt # Splat extensions extensions_path: tools/splat_ext # ELF sections section_order: [".text", ".vutext", ".rodata", ".data", ".bss"] auto_link_sections: [".rodata", ".data", ".bss"] # Linker script options subalign: 8 segments: - [0, databin, elf_header] - name: main type: code start: 0x001000 vram: 0x100000 bss_size: 0x3B1304 subsegments: - [0x001000, asm, sce/crt0] # starts with 2 nops - [0x001178, asm, P2/ps2t/spaprops] # ext should be .ic #-------------------------------------------------------- # Splice sources # All .cpp files #-------------------------------------------------------- - [0x13698, cpp, P2/splice/bif] #MARK: P2/splice - [0x19d48, cpp, P2/splice/eval] - [0x1b328, cpp, P2/splice/frame] - [0x1b678, cpp, P2/splice/gc] - [0x1be78, cpp, P2/splice/method] - [0x1beb8, cpp, P2/splice/pair] - [0x1bf98, cpp, P2/splice/proc] - [0x1c008, cpp, P2/splice/ref] - [0x1ca28, cpp, P2/splice/serialize] - [0x1cd28, cpp, P2/splice/sidebag] - [0x1cf70, cpp, P2/splice/spliceutils] - [0x1d128, cpp, P2/splice/splotheap] - [0x1d508, cpp, P2/splice/vecmat] #-------------------------------------------------------- # P2 sources # All .c files (but compiled as c++) #-------------------------------------------------------- - [0x1dbb8, c, P2/989snd] #MARK: P2 - [0x1f560, c, P2/brx] - [0x1fe70, c, P2/ac] - [0x22228, c, P2/act] - [0x23f28, c, P2/actseg] - [0x243c0, c, P2/alarm] - [0x24dc0, c, P2/alo] # Note: Anticrack check for ITM firewall is 0x2c760, maybe it's own TU? - [0x2c868, c, P2/aseg] - [0x2e3f8, c, P2/asega] - [0x30840, c, P2/barrier] - [0x30cf0, c, P2/bas] - [0x310e8, c, P2/basic] - [0x31168, c, P2/bez] - [0x31f48, c, P2/binoc] - [0x38290, c, P2/bis] - [0x395a0, c, P2/bbmark] - [0x39ff0, c, P2/blend] - [0x3ab70, c, P2/blip] - [0x3c4c0, c, P2/bomb] - [0x3d988, c, P2/bq] - [0x3dcf8, c, P2/break] - [0x3efd8, c, P2/bsp] - [0x3f7c0, c, P2/button] - [0x41790, c, P2/cat] - [0x417a8, c, P2/cd] - [0x41d90, c, P2/chkpnt] - [0x429e8, c, P2/clip] - [0x43ed0, c, P2/clock] - [0x44140, c, P2/cm] - [0x47100, c, P2/cnvo] - [0x47340, c, P2/coin] - [0x4a398, c, P2/cplcy] - [0x4bbd0, c, P2/credit] - [0x4c0c0, c, P2/crout] - [0x4c550, c, P2/crusher] - [0x4e0a8, c, P2/crv] - [0x4fe40, c, P2/dart] - [0x50740, c, P2/dartgun] - [0x514e0, c, P2/dialog] - [0x529e0, c, P2/difficulty] - [0x53438, c, P2/dl] - [0x53810, c, P2/dmas] - [0x53e28, c, P2/dysh] - [0x54528, c, P2/dzg] - [0x559c8, c, P2/emitter] - [0x5a680, c, P2/eyes] - [0x5aad0, c, P2/fader] - [0x5aca0, asm, P2/UNKNOWN1] # Not in the prototype. - [0x5af20, c, P2/find] - [0x5b8b0, c, P2/flash] - [0x5bae0, c, P2/fly] - [0x5d178, c, P2/font] - [0x5f6a8, c, P2/frm] - [0x60678, c, P2/freeze] - [0x60f88, c, P2/frzg] - [0x61070, c, P2/game] - [0x61e80, c, P2/geom] - [0x621b8, c, P2/gifs] - [0x629c0, c, P2/glbs] - [0x63810, c, P2/glob] - [0x68d68, c, P2/gomer] - [0x69130, c, P2/gs] - [0x6ac58, c, P2/hide] - [0x6ba18, asm, P2/hideout] - [0x6d470, c, P2/hnd] - [0x6d4e8, c, P2/ik] - [0x6de00, c, P2/jlo] - [0x6f0b8, c, P2/joy] - [0x70608, c, P2/jt] - [0x79008, asm, P2/jp] # Might be something else. - [0x7c998, c, P2/jsg] - [0x7e248, c, P2/jump] - [0x80e90, c, P2/keyhole] - [0x81eb0, c, P2/landing] - [0x81f68, c, P2/lgn] - [0x83c18, c, P2/lo] - [0x84cc8, c, P2/light] - [0x86358, c, P2/lookat] - [0x86758, c, P2/main] - [0x86c18, c, P2/mark] - [0x894c0, c, P2/mat] - [0x8b388, c, P2/mb] - [0x8c580, asm, P2/memcard] - [0x8e430, c, P2/memory] - [0x8e8e0, c, P2/missile] - [0x8f410, c, P2/mpeg] - [0x90988, c, P2/mrkv] - [0x909d8, c, P2/ms] - [0x90ef8, c, P2/murray] - [0x917e0, c, P2/path] - [0x92e70, c, P2/phasemem] - [0x92ec0, c, P2/pipe] - [0x93068, c, P2/pnt] - [0x931a8, c, P2/po] - [0x94210, c, P2/prog] - [0x94598, asm, P2/prompt] - [0x973d8, c, P2/proxy] - [0x97938, c, P2/puffer] - [0x99980, c, P2/pzo] - [0x9bf00, c, P2/rail] - [0x9c038, c, P2/rat] - [0x9d440, c, P2/rchm] - [0x9e410, c, P2/render] - [0x9f040, c, P2/rip] - [0xa4ae0, c, P2/rog] - [0xa8b20, c, P2/rumble] - [0xa8fe8, c, P2/rwm] - [0xaa8f8, c, P2/sb] - [0xaac68, c, P2/screen] - [0xafcb0, c, P2/sensor] - [0xb2ac8, c, P2/shadow] - [0xb3840, c, P2/shape] - [0xb3988, c, P2/shd] - [0xb5920, c, P2/shdanim] - [0xb6cd8, c, P2/sky] - [0xb6d80, c, P2/slotheap] - [0xb6f50, c, P2/sm] - [0xb7ec8, c, P2/smartguard] - [0xb8968, c, P2/so] - [0xbd760, c, P2/solve] - [0xbf068, c, P2/sort] - [0xbf1e8, c, P2/sound] - [0xc1f30, c, P2/speaker] - [0xc20a8, c, P2/spire] - [0xc2190, c, P2/splicemap] - [0xc24c0, c, P2/spliceobj] - [0xc3430, c, P2/sprbuf] - [0xc39e8, c, P2/sqtr] - [0xc4390, asm, P2/squish] # Might be something else. - [0xc5458, c, P2/step] - [0xc6f18, c, P2/stepact] - [0xc71e0, c, P2/stepcane] - [0xc7f48, c, P2/stepguard] - [0xcd410, c, P2/stephang] - [0xcefb8, c, P2/stephide] - [0xd24f0, c, P2/steppipe] - [0xd39c8, c, P2/steppower] - [0xd41d0, c, P2/steprail] - [0xd46f0, c, P2/steprun] - [0xd5148, c, P2/stepside] - [0xd5848, asm, P2/stepzap] - [0xd8100, c, P2/stream] - [0xd83a8, c, P2/suv] - [0xdc480, c, P2/sw] - [0xdece0, c, P2/tail] - [0xdf798, c, P2/tank] - [0xe0d48, c, P2/target] - [0xe0e80, asm, P2/tatk] # Not in the prototype. Related to master thief sprints. - [0xe18f8, c, P2/text] - [0xe3268, c, P2/thread] - [0xe3420, c, P2/tn] - [0xe5e38, c, P2/transition] - [0xe6378, c, P2/turret] - [0xe6e70, c, P2/tv] - [0xe98d0, c, P2/ub] - [0xea088, c, P2/ui] - [0xeac78, c, P2/update] - [0xeb408, c, P2/util] - [0xec460, asm, P2/vb] - [0xee650, c, P2/vec] - [0xef318, c, P2/vifs] - [0xef900, c, P2/vis] - [0xefc60, c, P2/water] - [0xf0838, c, P2/waypoint] - [0xf0ce8, c, P2/wipe] - [0xf1468, c, P2/wm] - [0xf3758, c, P2/wr] - [0xf49f8, c, P2/xform] - [0xf5f70, c, P2/zap] ## Segments in prototype confirmed not present in release: # P2/cycle.c - some kind of wheeled vehicle # P2/dsp.c - unknown. # P2/hg.c - hang glider # P2/stepski.c - skiing # P2/map2d.c - unknown # P2/menu - debug menu # P2/vife.c - vif encoder # P2/wibu_ee.c - wibukey encryption # P2/rope.c - unknown # P2/sc.c - unknown # P2/mouthgame.c - unknown #-------------------------------------------------------- # Libs # TODO: Verify start address. #-------------------------------------------------------- - [0xF69C0, asm, sce/libs] # #MARK: libs #- [0xF76F8, asm, sce/rand] #- [0xF7738, asm] #-------------------------------------------------------- # Vutext #-------------------------------------------------------- - [0x112E10, textbin, vutext] #MARK: vutext #-------------------------------------------------------- # Rodata (read-only data) #-------------------------------------------------------- - [0x118380, rodata] #MARK: rodata # - [0x1225a0, .rodata, P2/cm] # todo causes errors - [0x141000, rodata] # todo - [0x149FE0, .rodata, P2/splice/bif] - [0x14A200, rodata] #todo: remove line and uncomment next for RefEvalAssert # - [0x14A200, .rodata, P2/splice/eval] - [0x14A2F0, .rodata, P2/splice/ref] - [0x14A3A0, .rodata, P2/splice/serialize] - [0x14A428, rodata] #, P2/989snd] - [0x14A870, rodata] #- [0x14AE20, .rodata, P2/cd] - [0x14afe0, .rodata, P2/dart] - [0x14aff8, rodata] # P2/dartgun Alignment issue, this should be 0x14b000. - [0x14B0E0, .rodata, P2/dmas] - [0x14B0F8, rodata] - [0x14c1e8, .rodata, P2/main] - [0x14c258, rodata] - [0x14f600, .rodata, P2/ub] - [0x14f670, .rodata, P2/ui] - [0x14f6d0, rodata] #- [0x14f7d0, .rodata, P2/wm] #- [0x14f840, .rodata, P2/wr] #- [0x14f860, .rodata, P2/xform] #-------------------------------------------------------- # Data (variable data) #-------------------------------------------------------- - [0x151580, data] #MARK: data #- [0x, data, P2/splice/bif] #- [0x, data, P2/splice/eval] #- [0x, data, P2/splice/frame] - [0x15af38, data, P2/splice/gc] #- [0x, data, P2/splice/pair] #- [0x, data, P2/splice/serialize] #- [0x, data, P2/splice/sidebag] #- [0x, data, P2/splice/spliceutils] - [0x15d250, data, P2/splice/splotheap] - [0x15d2f0, data, P2/splice/vecmat] - [0x15d340, .data, P2/989snd] - [0x161e60, data, P2/act] - [0x161e70, data, P2/alo] - [0x162090, data, P2/binoc] #- [0x162314, data, P2/blip] # TODO: Alignment issue. - [0x162320, data, P2/bomb] - [0x162390, data, P2/bsp] #- [0x1623ec, data, P2/cd] # TODO: Alignment issue. - [0x162420, data, P2/chkpnt] - [0x162850, .data, P2/clock] - [0x162880, data, P2/cm] - [0x1629a0, data, P2/coin] - [0x162bf0, data, P2/cplcy] #- [0x, data, P2/credit] #- [0x, data, P2/crout] #- [0x, data, P2/crusher] #- [0x, data, P2/crv] - [0x162cc8, data, P2/dart] - [0x162ce0, data, P2/dartgun] - [0x162d08, data, P2/dialog] - [0x162d40, data, P2/difficulty] #- [0x162f14, data, P2/dmas] # TODO: Alignment issue. - [0x162f30, data, P2/dysh] - [0x162f70, data, P2/emitter] - [0x163180, data, P2/fly] - [0x163250, data, P2/font] #- [0x, data, P2/frm] #- [0x, data, P2/freeze] #- [0x, data, P2/frzg] - [0x1633c0, data, P2/game] #- [0x1633d8, data] #- [0x, data, P2/geom] #- [0x, data, P2/gifs] #- [0x, data, P2/glbs] #- [0x, data, P2/glob] #- [0x, data, P2/gomer] #- [0x, data, P2/gs] #- [0x, data, P2/hide] #- [0x, data, P2/hnd] #- [0x, data, P2/ik] #- [0x, data, P2/jlo] - [0x163a30, data, P2/joy] - [0x163e10, data, P2/jt] #- [0x163e40, data] # TBD #- [0x, data, P2/jp] #- [0x164e34, data, P2/jsg] # TODO: Alignment issue. - [0x164e50, data, P2/jump] - [0x165098, data, P2/keyhole] - [0x1650b0, data, P2/lgn] - [0x165260, data, P2/light] - [0x165770, data, P2/lookat] - [0x1657a8, .data, P2/main] - [0x165840, data, P2/mark] - [0x165910, data, P2/mb] - [0x165a40, data, P2/memcard] #- [0x16a9a4, data, P2/memory] # TODO: Alignment issue. - [0x16a9b0, data, P2/missile] - [0x16a9c0, data, P2/mpeg] - [0x16ab50, data, P2/ms] - [0x16ab60, data, P2/murray] - [0x16ab78, data, P2/path] #- [0x16aba4, data, P2/phasemem] # TODO: Alignment issue. - [0x16aba8, data, P2/pipe] - [0x16abc0, data, P2/po] - [0x16acd8, data, P2/prompt] - [0x16b710, data, P2/puffer] - [0x16b910, data, P2/pzo] - [0x16bb90, data, P2/rat] - [0x16bbd0, data, P2/rchm] - [0x16bbf0, data, P2/render] - [0x16c530, data, P2/rip] - [0x16c778, data, P2/rog] #- [0x16d3dc, data, P2/rumble] # TODO: Alignment issue. #- [0x, data, P2/rwm] #- [0x, data, P2/screen] - [0x1754b8, data, P2/sensor] - [0x1754f0, data, P2/shadow] - [0x1754f8, data, P2/shd] #- [0x, data, P2/shdanim] #- [0x, data, P2/sky] #- [0x, data, P2/sm] #- [0x, data, P2/smartguard] #- [0x, data, P2/so] #- [0x, data, P2/solve] #- [0x, data, P2/sort] - [0x175720, data, P2/sound] - [0x1758f0, data, P2/sprbuf] - [0x175998, data, P2/sqtr] #- [0x, data, P2/squish] #- [0x, data, P2/step] #- [0x, data, P2/stepact] #- [0x, data, P2/stepcane] #- [0x, data, P2/stepguard] #- [0x, data, P2/stephang] #- [0x, data, P2/stephide] #- [0x, data, P2/steppipe] #- [0x, data, P2/steppower] - [0x175f90, data, P2/steprail] - [0x175fa0, data, P2/steprun] - [0x175fc0, data, P2/stepzap] - [0x1761d0, data, P2/suv] - [0x176630, data, P2/sw] - [0x176730, data, P2/tail] - [0x176740, data, P2/tank] - [0x1768d0, data, P2/target] - [0x1768e0, data, P2/tatk] - [0x176940, data, P2/text] - [0x176958, data, P2/thread] - [0x176970, data, P2/tn] - [0x176af0, data, P2/transition] - [0x176b28, data, P2/turret] - [0x176b50, data, P2/tv] - [0x176b60, data, P2/ub] - [0x176bc0, data, P2/ui] - [0x176c18, data, P2/update] - [0x176c40, data, P2/util] - [0x176c70, data, P2/vb] - [0x176dd0, data, P2/vifs] - [0x176e10, data, P2/waypoint] - [0x176f80, data, P2/wipe] - [0x176fc0, data, P2/wm] - [0x177680, databin] ## Files with seemingly no data; # - P2/brx # - P2/ac # - P2/actseg # - P2/alarm # - P2/aseg # - P2/asega # - P2/barrier # - P2/bas # - P2/basic # - P2/bbmark # - P2/bez # - P2/bis # - P2/blend # - P2/bq # - P2/break # - P2/button # - P2/cat # - P2/clip # - P2/cnvo # - P2/dl # - P2/dsp # - P2/dzg # - P2/eyes # - P2/fader # - P2/UNKNOWN1 # - P2/find # - P2/flash # - P2/landing # - P2/lo # - P2/mat # - P2/mrkv # - P2/pnt # - P2/prog # - P2/proxy # - P2/rail # - P2/shape # - P2/slotheap # - P2/speaker # - P2/splicemap # - P2/spliceobj # - P2/stepside # - P2/stream # - P2/vec # - P2/vis # - P2/water # - P2/xform # - P2/zap - [0x1A1C70, databin] - [0x1A20D0] ================================================ FILE: config/sly1_may19.yaml ================================================ name: Sly Cooper May 19 2002 Prototype sha1: 3e5fdf0c479a0f548e90b05d7fc558cd8e94f5c1 options: basename: sly1_may19 target_path: disc/sly1_may19.elf elf_path: SCUS_971.98 base_path: ../ platform: ps2 compiler: GCC asm_path: splat/may19/asm src_path: splat/may19/src build_path: build find_file_boundaries: False disasm_unknown: True named_regs_for_c_funcs: False create_undefined_funcs_auto: True undefined_funcs_auto_path: config/undefined_funcs_auto_may19.txt create_undefined_syms_auto: True undefined_syms_auto_path: config/undefined_syms_auto_may19.txt symbol_addrs_path: config/symbol_addrs_may19.txt extensions_path: tools/splat_ext section_order: [".text", ".rodata", ".data", ".bss"] auto_all_sections: [".rodata", ".data", ".bss"] subalign: 0x4 segments: - [0, databin, elf_header] - name: main type: code start: 0x001000 vram: 0x100000 bss_size: 0x3B1304 subsegments: - [0x001000, asm, sce/crt0] # starts with 2 nops - [0x10c0, c, P2/ps2t/spaprops.ic] #---------------------------------------- # Splice sources #---------------------------------------- - [0x11de8, cpp, P2/splice/bif] - [0x19d50, cpp, P2/splice/eval] - [0x1b8f0, cpp, P2/splice/frame] - [0x1bde0, cpp, P2/splice/gc] - [0x1c6a8, cpp, P2/splice/method] - [0x1c6f8, cpp, P2/splice/pair] - [0x1c810, cpp, P2/splice/proc] - [0x1c890, cpp, P2/splice/ref] - [0x1d468, cpp, P2/splice/serialize] - [0x1d810, cpp, P2/splice/sidebag] - [0x1dbf8, cpp, P2/splice/spliceutils] - [0x1ddc0, cpp, P2/splice/splotheap] - [0x1e0f0, cpp, P2/splice/vecmat] #---------------------------------------- # P2 sources #---------------------------------------- - [0x1e888, c, P2/989snd] - [0x203e0, c, P2/brx] - [0x210a8, c, P2/ac] - [0x237c0, c, P2/act] - [0x25530, c, P2/actseg] - [0x25a08, c, P2/alarm] - [0x26548, c, P2/alo] - [0x2ecb0, c, P2/aseg] - [0x30d90, c, P2/asega] - [0x33520, c, P2/barrier] - [0x33a20, c, P2/bas] - [0x33e88, c, P2/basic] - [0x33f18, c, P2/bez] - [0x34d60, c, P2/binoc] - [0x3b480, c, P2/bis] - [0x3c960, c, P2/bbmark] - [0x3d468, c, P2/blend] - [0x3e098, c, P2/blip] - [0x3fd58, c, P2/bomb] - [0x40fc0, c, P2/bone] - [0x41278, c, P2/bq] - [0x41608, c, P2/break] - [0x42978, c, P2/bsp] - [0x43190, c, P2/button] - [0x45630, c, P2/cat] - [0x460e8, c, P2/can] - [0x46e10, c, P2/cd] - [0x47388, c, P2/chkpnt] - [0x47f48, c, P2/clip] - [0x49410, c, P2/clock] - [0x496c8, c, P2/cm] - [0x4cb58, c, P2/cnvo] - [0x4ce48, c, P2/coin] - [0x4f808, c, P2/cplcy] - [0x51578, c, P2/credit] - [0x51ac8, c, P2/crout] - [0x51f58, c, P2/crusher] - [0x52a50, c, P2/crv] - [0x54be8, c, P2/cycle] - [0x56770, c, P2/dart] - [0x571d8, c, P2/dartgun] - [0x58158, c, P2/dialog] - [0x595b0, c, P2/difficulty] - [0x59cf8, c, P2/dl] - [0x5a150, c, P2/dmas] - [0x5a838, c, P2/dsp] - [0x5ac98, c, P2/dysh] - [0x5b538, c, P2/dzg] - [0x5cb88, c, P2/emitter] - [0x62108, c, P2/eyes] - [0x625d0, c, P2/fader] - [0x627e0, c, P2/find] - [0x631e8, c, P2/flash] - [0x63468, c, P2/fly] - [0x64dd8, c, P2/font] - [0x677b8, c, P2/frm] - [0x68a30, c, P2/freeze] - [0x69480, c, P2/frzg] - [0x69590, c, P2/game] - [0x6a3f8, c, P2/geom] - [0x6a770, c, P2/gifs] - [0x6afd8, c, P2/glbs] - [0x6bff8, c, P2/glob] - [0x720f8, c, P2/gomer] - [0x729d0, c, P2/gs] - [0x748f8, c, P2/hg] - [0x75550, c, P2/hide] - [0x764a8, c, P2/hnd] - [0x76518, c, P2/ik] - [0x76e90, c, P2/jack] - [0x7b0d0, c, P2/jlo] - [0x7c478, c, P2/joy] - [0x7da08, c, P2/jt] - [0x866e8, c, P2/jp] - [0x880f8, c, P2/jsg] - [0x89630, c, P2/jump] - [0x8c068, c, P2/keyhole] - [0x8d170, c, P2/landing] - [0x8d250, c, P2/lgn] - [0x8fcd8, c, P2/lo] - [0x910d8, c, P2/light] - [0x92c48, c, P2/lookat] - [0x93028, c, P2/main] - [0x93b88, c, P2/map2d] - [0x93c78, c, P2/mark] - [0x96598, c, P2/mat] - [0x98840, c, P2/mecha] - [0x99c70, c, P2/mb] - [0x9aec0, c, P2/memcard] - [0x9aec8, c, P2/memory] - [0x9b608, c, P2/menu] - [0x9f7f0, c, P2/missile] - [0xa0770, c, P2/mouthgame] - [0xa1208, c, P2/mpeg] - [0xa2838, c, P2/mrkv] - [0xa2898, c, P2/ms] - [0xa2e00, c, P2/murray] - [0xa3410, c, P2/path] - [0xa4dd0, c, P2/phasemem] - [0xa4e28, c, P2/pipe] - [0xa4fc0, c, P2/pnt] - [0xa50d8, c, P2/po] - [0xa5c08, c, P2/prog] - [0xa6020, c, P2/prompt] - [0xa7750, c, P2/proxy] - [0xa7da0, c, P2/puffer] - [0xaa248, c, P2/pzo] - [0xac6e0, c, P2/rail] - [0xac7c0, c, P2/rat] - [0xade58, c, P2/rchm] - [0xaf900, c, P2/render] - [0xb0890, c, P2/rip] - [0xb69e0, c, P2/rog] - [0xbb3c0, c, P2/rope] - [0xbbc78, c, P2/rumble] - [0xbc000, c, P2/rwm] - [0xbd618, c, P2/sampler] - [0xbd970, c, P2/sc] - [0xbe370, c, P2/screen] - [0xc2d18, c, P2/sensor] - [0xc6018, c, P2/shadow] - [0xc6f08, c, P2/shape] - [0xc7190, c, P2/shd] - [0xc95e0, c, P2/shdanim] - [0xca988, c, P2/sky] - [0xcaa28, c, P2/slotheap] - [0xcac48, c, P2/sm] - [0xcbd98, c, P2/smartguard] - [0xcc968, c, P2/so] - [0xd1af8, c, P2/solve] - [0xd3580, c, P2/sort] - [0xd3710, c, P2/sound] - [0xd6570, c, P2/speaker] - [0xd6770, c, P2/spire] - [0xd6850, c, P2/splicemap] - [0xd6df8, c, P2/spliceobj] - [0xd8050, c, P2/sprbuf] - [0xd8640, c, P2/sqtr] - [0xd9060, c, P2/squish] - [0xd97a0, c, P2/step] - [0xdb4c0, c, P2/stepact] - [0xdb798, c, P2/stepcane] - [0xdc540, c, P2/stepguard] - [0xe1cf8, c, P2/stephang] - [0xe3838, c, P2/stephide] - [0xe5eb0, c, P2/steppipe] - [0xe7110, c, P2/steppower] - [0xe7628, c, P2/steprun] - [0xe8188, c, P2/stepside] - [0xe88b8, c, P2/stepski] - [0xe9e30, c, P2/stepzap] - [0xec048, c, P2/stream] - [0xec360, c, P2/suv] - [0xf0788, c, P2/sw] - [0xf32e8, c, P2/tail] - [0xf3e28, c, P2/tank] - [0xf5940, c, P2/target] - [0xf5b88, c, P2/text] - [0xf78b8, c, P2/thread] - [0xf7b38, c, P2/tn] - [0xfa030, c, P2/transition] - [0xfa758, c, P2/turret] - [0xfb1b0, c, P2/tv] - [0xfdec8, c, P2/ub] - [0xff688, c, P2/ui] - [0x1005b0, c, P2/update] - [0x100ef0, c, P2/util] - [0x102000, c, P2/vec] - [0x102cc8, c, P2/vife] - [0x10a658, c, P2/vifs] - [0x10ac98, c, P2/vis] - [0x10b070, c, P2/water] - [0x10be78, c, P2/waypoint] - [0x10c398, c, P2/wibu_ee] - [0x10c4e8, c, P2/wipe] - [0x10cd18, c, P2/wm] - [0x10ee10, c, P2/wr] - [0x110338, c, P2/xform] - [0x111da0, c, P2/zap] #---------------------------------------- - [0x113e00, data] - [0x12e900, bin, vutext] - [0x192d00, rodata] - [0x1a1f80, databin] - [0xBC8E6D] ================================================ FILE: config/symbol_addrs.txt ================================================ //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // MISC/UNKNOWN //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// _start = 0x100008; // type:func _exit = 0x1000B8; // type:func _gpReg = 0x2832F0; g_chzCiphertext = 0x2483b8; // size:0x9 g_chzThePasswordIs = 0x24a848; // size:0x14 //g_rng = 0x276680; // size:0x5c //g_prng = 0x27696c; // size:0x4 // start of .vutext section D_00211E10 = 0x211E10; // size:0x4 D_00270458 = 0x270458; // size:0x4 SMP_00274f78 = 0x274f78; // size:0xC //////////////////////////////////////////////////////////////// // ps2t/spaprops.ic //////////////////////////////////////////////////////////////// BuildEopids__Fv = 0x109488; // type:func //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // P2 ENGINE //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////// // P2/splice/bif.cpp //////////////////////////////////////////////////////////////// RefOpAdd__FiP4CRefP6CFrame = 0x112698; // type:func RefOpSub__FiP4CRefP6CFrame = 0x112968; // type:func RefOpMult__FiP4CRefP6CFrame = 0x112C38; // type:func RefOpDiv__FiP4CRefP6CFrame = 0x113240; // type:func RefOpPrint__FiP4CRefP6CFrame = 0x113730; // type:func RefOpPrintFrame__FiP4CRefP6CFrame = 0x113780; // type:func RefOpPrintSidebag__FiP4CRefP6CFrame = 0x1137D0; // type:func RefOpIntEqual__FiP4CRefP6CFrame = 0x113820; // type:func RefCmp__FP4CRef4CMPK = 0x113888; // type:func RefOpL__FiP4CRefP6CFrame = 0x1139E8; // type:func RefOpLE__FiP4CRefP6CFrame = 0x113A18; // type:func RefOpG__FiP4CRefP6CFrame = 0x113A48; // type:func RefOpGE__FiP4CRefP6CFrame = 0x113A78; // type:func RefOpEqv__FiP4CRefP6CFrame = 0x113AA8; // type:func RefEqualHelper__FP4CRefT0 = 0x113B60; // type:func RefOpEqual__FiP4CRefP6CFrame = 0x113E48; // type:func RefOpIsBoolean__FiP4CRefP6CFrame = 0x113E78; // type:func RefOpIsNum__FiP4CRefP6CFrame = 0x113EE0; // type:func RefOpIsFloat__FiP4CRefP6CFrame = 0x113F48; // type:func RefOpIsInteger__FiP4CRefP6CFrame = 0x113FB0; // type:func RefOpIsSymbol__FiP4CRefP6CFrame = 0x114018; // type:func RefOpIsVector__FiP4CRefP6CFrame = 0x114080; // type:func RefOpIsMatrix__FiP4CRefP6CFrame = 0x1140E8; // type:func RefOpIsClq__FiP4CRefP6CFrame = 0x114150; // type:func RefOpIsLm__FiP4CRefP6CFrame = 0x1141B8; // type:func RefOpIsSmp__FiP4CRefP6CFrame = 0x114220; // type:func RefOpIsList__FiP4CRefP6CFrame = 0x114288; // type:func RefOpIsNull__FiP4CRefP6CFrame = 0x114300; // type:func RefOpIsObject__FiP4CRefP6CFrame = 0x114360; // type:func RefOpIsNullObj__FiP4CRefP6CFrame = 0x1143C8; // type:func RefOpIsMethod__FiP4CRefP6CFrame = 0x114438; // type:func RefOpIsProcedure__FiP4CRefP6CFrame = 0x1144A0; // type:func RefOpAreNear__FiP4CRefP6CFrame = 0x114518; // type:func RefOpNot__FiP4CRefP6CFrame = 0x1145C8; // type:func RefOpCons__FiP4CRefP6CFrame = 0x114638; // type:func RefOpCar__FiP4CRefP6CFrame = 0x1146E0; // type:func RefOpCdr__FiP4CRefP6CFrame = 0x114740; // type:func RefOpSetCadr__FiP4CRefP6CFrame4BIFK = 0x1147B8; // type:func RefOpSetCar__FiP4CRefP6CFrame = 0x114858; // type:func RefOpSetCdr__FiP4CRefP6CFrame = 0x114888; // type:func RefOpLength__FiP4CRefP6CFrame = 0x1148B8; // type:func RefOpNth__FiP4CRefP6CFrame = 0x114950; // type:func RefOpIsMember__FiP4CRefP6CFrame = 0x1149F0; // type:func RefOpList__FiP4CRefP6CFrame = 0x114B80; // type:func RefOpAppend__FiP4CRefP6CFrame = 0x114BB0; // type:func RefOpMap__FiP4CRefP6CFrame = 0x114D18; // type:func RefOpFilter__FiP4CRefP6CFrame = 0x114F48; // type:func RefOpForEach__FiP4CRefP6CFrame = 0x1151C0; // type:func RefOpEval__FiP4CRefP6CFrame = 0x115398; // type:func RefOpVector__FiP4CRefP6CFrame = 0x115440; // type:func RefOpMatrix__FiP4CRefP6CFrame = 0x115510; // type:func RefOpSetMusicRegister__FiP4CRefP6CFrame = 0x1156B0; // type:func RefOpClq__FiP4CRefP6CFrame = 0x115710; // type:func RefOpLm__FiP4CRefP6CFrame = 0x1157E0; // type:func RefOpSmp__FiP4CRefP6CFrame = 0x1158B8; // type:func RefOpGetElement__FiP4CRefP6CFrame = 0x1159B8; // type:func RefOpRandomSeed__FiP4CRefP6CFrame = 0x115B78; // type:func RefOpRandom__FiP4CRefP6CFrame = 0x115C00; // type:func RefUfo__FP4CRef4UFOK = 0x115CA0; // type:func RefOpSqrt__FiP4CRefP6CFrame = 0x115D48; // type:func RefOpSin__FiP4CRefP6CFrame = 0x115D78; // type:func RefOpCos__FiP4CRefP6CFrame = 0x115DA8; // type:func RefOpTan__FiP4CRefP6CFrame = 0x115DD8; // type:func RefOpAsin__FiP4CRefP6CFrame = 0x115E08; // type:func RefOpAcos__FiP4CRefP6CFrame = 0x115E38; // type:func RefOpAtan__FiP4CRefP6CFrame = 0x115E68; // type:func RefOpRadNormalize__FiP4CRefP6CFrame = 0x115E98; // type:func RefOpAtan2__FiP4CRefP6CFrame = 0x115EC8; // type:func RefOpVectorDotProduct__FiP4CRefP6CFrame = 0x115F70; // type:func RefOpVectorCrossProduct__FiP4CRefP6CFrame = 0x115FF8; // type:func RefOpVectorLth__FiP4CRefP6CFrame = 0x116080; // type:func RefOpVectorDistance__FiP4CRefP6CFrame = 0x116108; // type:func RefOpVectorDistanceSquared__FiP4CRefP6CFrame = 0x1161F8; // type:func RefOpVectorNormalize__FiP4CRefP6CFrame = 0x1162D0; // type:func RefOpVectorProjectNormal__FiP4CRefP6CFrame = 0x116400; // type:func RefOpVectorProjectTangent__FiP4CRefP6CFrame = 0x116490; // type:func RefOpVectorBallisticVelocity__FiP4CRefP6CFrame = 0x116520; // type:func RefOpVectorRadianNormal__FiP4CRefP6CFrame = 0x116600; // type:func RefOpMatrixTranspose__FiP4CRefP6CFrame = 0x1166C0; // type:func RefOpMatrixInvert__FiP4CRefP6CFrame = 0x116740; // type:func RefOpMatrixCalculateDmat__FiP4CRefP6CFrame = 0x1167C0; // type:func RefOpMatrixInterpolateRotate__FiP4CRefP6CFrame = 0x116840; // type:func RefOpMatrixDecomposeToTranslate__FiP4CRefP6CFrame = 0x116978; // type:func RefOpMatrixDecomposeToRotate__FiP4CRefP6CFrame = 0x1169E8; // type:func RefOpMatrixDecomposeToEuler__FiP4CRefP6CFrame = 0x116A88; // type:func RefOpMatrixDecomposeToRadianNormal__FiP4CRefP6CFrame = 0x116B08; // type:func RefOpMatrixLookAt__FiP4CRefP6CFrame = 0x116BC8; // type:func RefOpMatrixTiltUpright__FiP4CRefP6CFrame = 0x116C80; // type:func RefOpClqEvaluate__FiP4CRefP6CFrame = 0x116D20; // type:func RefOpClqEvaluateLm__FiP4CRefP6CFrame = 0x116DC8; // type:func RefOpClqFit__FiP4CRefP6CFrame = 0x116EA8; // type:func RefOpLmLimit__FiP4CRefP6CFrame = 0x116FE8; // type:func RefOpLmCheck__FiP4CRefP6CFrame = 0x117080; // type:func RefOpFloor__FiP4CRefP6CFrame = 0x117118; // type:func RefOpCeiling__FiP4CRefP6CFrame = 0x117180; // type:func RefOpRound__FiP4CRefP6CFrame = 0x1171F0; // type:func RefOpTruncate__FiP4CRefP6CFrame = 0x117260; // type:func RefOpAbs__FiP4CRefP6CFrame = 0x1172C8; // type:func RefOpMaximum__FiP4CRefP6CFrame = 0x117360; // type:func RefOpMinimum__FiP4CRefP6CFrame = 0x117478; // type:func RefOpModulo__FiP4CRefP6CFrame = 0x117598; // type:func RefOpCurrentTime__FiP4CRefP6CFrame = 0x117610; // type:func RefOpScheduleCallback__FiP4CRefP6CFrame = 0x117668; // type:func RefOpDeferObjectUpdate__FiP4CRefP6CFrame = 0x117880; // type:func RefOpObjectOption__FiP4CRefP6CFrame4BIFK = 0x117910; // type:func RefOpAddO__FiP4CRefP6CFrame = 0x117A30; // type:func RefOpEnsureO__FiP4CRefP6CFrame = 0x117A60; // type:func RefOpSetO__FiP4CRefP6CFrame = 0x117A90; // type:func RefOpGetO__FiP4CRefP6CFrame = 0x117AC0; // type:func RefPairFromAplo__FiPP2LO = 0x117AF0; // type:func RefOpFindObject__FiP4CRefP6CFrame = 0x117BC8; // type:func RefOpFindObjects__FiP4CRefP6CFrame = 0x117C48; // type:func RefOpFindNearestObject__FiP4CRefP6CFrame = 0x117D00; // type:func RefOpFindNearestObjects__FiP4CRefP6CFrame = 0x117D78; // type:func RefOpFindPlayerObject__FiP4CRefP6CFrame = 0x117E20; // type:func RefOpFindWorldObject__FiP4CRefP6CFrame = 0x117E78; // type:func RefOpFindCameraObject__FiP4CRefP6CFrame = 0x117ED0; // type:func RefOpFindClassObjects__FiP4CRefP6CFrame = 0x117F28; // type:func RefOpFindObjectsInBoundingBox__FiP4CRefP6CFrame = 0x117FE0; // type:func RefOpFindObjectsInBoundingSphere__FiP4CRefP6CFrame = 0x1180C0; // type:func RefOpHitTestObjectsImpl__F4BIFKiP4CRefP6CFrame = 0x118198; // type:func RefOpHitTestObjects__FiP4CRefP6CFrame = 0x1183B8; // type:func RefOpHitTestObjectsFirst__FiP4CRefP6CFrame = 0x118458; // type:func RefOpConvertObjectPosition__FiP4CRefP6CFrame = 0x1184F8; // type:func RefOpConvertObjectVector__FiP4CRefP6CFrame = 0x118580; // type:func RefOpConvertObjectMatrix__FiP4CRefP6CFrame = 0x118608; // type:func RefOpNearClipCenter__FiP4CRefP6CFrame = 0x118698; // type:func RefOpStartSound__FiP4CRefP6CFrame = 0x118720; // type:func RefOpStopSound__FiP4CRefP6CFrame = 0x1187E8; // type:func RefOpStartRumble__FiP4CRefP6CFrame = 0x118850; // type:func RefOpEmitSmokeCloud__FiP4CRefP6CFrame = 0x1188F0; // type:func RefOpPredictAnimationEffect__FiP4CRefP6CFrame = 0x118988; // type:func __8VU_FLOATf = 0x118CF0; // type:func __9VU_VECTORRC6VECTOR = 0x118D10; // type:func __as__6VECTORG9VU_VECTOR = 0x118D20; // type:func __ml__FG8VU_FLOATG9VU_VECTOR = 0x118D30; // type:func //////////////////////////////////////////////////////////////// // P2/splice/eval.cpp //////////////////////////////////////////////////////////////// RefEvalSymbol__FP5CPairP6CFrame = 0x118D48; // type:func RefEvalSet__FP5CPairP6CFrame = 0x118DB8; // type:func RefEvalDefine__FP5CPairP6CFrame = 0x118E80; // type:func RefEvalAssert__FP5CPairP6CFrame = 0x118F48; // type:func RefEvalIf__FP5CPairP6CFrame = 0x119030; // type:func RefEvalOr__FP5CPairP6CFrame = 0x119128; // type:func RefEvalAnd__FP5CPairP6CFrame = 0x119218; // type:func RefEvalCond__FP5CPairP6CFrame = 0x119310; // type:func RefEvalCase__FP5CPairP6CFrame = 0x1194A8; // type:func RefEvalLet__FP5CPairP6CFrame = 0x1196C8; // type:func RefEvalWhile__FP5CPairP6CFrame = 0x119878; // type:func RefEvalLambda__FP5CPairP6CFrame = 0x119970; // type:func RefEvalLambdaBody__FP5CPairP6CFrame = 0x119A58; // type:func RefEvalBegin__FP5CPairP6CFrame = 0x119AF8; // type:func RefEvalApply__FP5CPairP6CFrame = 0x119BB0; // type:func RefEvalImport__FP5CPairP6CFrame = 0x119FA0; // type:func RefEval__FP5CPairP6CFrame = 0x11A080; // type:func chzSpliceAssert = 0x249200; // size:0x10 //////////////////////////////////////////////////////////////// // P2/splice/frame.cpp //////////////////////////////////////////////////////////////// SetSingleParent__6CFrameP6CFrame = 0x11A328; // type:func AddParent__6CFrameP6CFrame = 0x11A338; // type:func RefAddBinding__6CFrameUiP4CRef = 0x11A358; // type:func RefSetBinding__6CFrameUiP4CRef = 0x11A400; // type:func FFindBinding__6CFrameUiiP4CRef = 0x11A498; // type:func PrefFindBinding__6CFrameUii = 0x11A4D8; // type:func CloneTo__6CFrameP6CFrame = 0x11A5B0; // type:func PframeNew__Fv = 0x11A630; // type:func DeleteFrame__FP6CFrame = 0x11A670; // type:func //////////////////////////////////////////////////////////////// // P2/splice/gc.cpp //////////////////////////////////////////////////////////////// __3CGc = 0x11A678; // type:func _$_3CGc = 0x11A680; // type:func Startup__3CGc = 0x11A6A8; // type:func Shutdown__3CGc = 0x11A6B8; // type:func AddRootFrame__3CGcP6CFrame = 0x11A6C0; // type:func AddRootSidebag__3CGcP8CSidebag = 0x11A708; // type:func PushFrame__3CGcP6CFrame = 0x11A728; // type:func PframePop__3CGc = 0x11A748; // type:func PushPair__3CGcP5CPair = 0x11A770; // type:func PpairPop__3CGc = 0x11A790; // type:func PushProc__3CGcP5CProc = 0x11A7B8; // type:func PprocPop__3CGc = 0x11A7D8; // type:func UpdateRecyclable__3CGc = 0x11A800; // type:func MarkLiveObjects__3CGc = 0x11A850; // type:func Collect__3CGc = 0x11AB58; // type:func gc__static_initialization_and_destruction_0 = 0x11ADF8; // type:func _GLOBAL_$I$g_gc = 0x11AE38; // type:func _GLOBAL_$D$g_gc = 0x11AE58; // type:func g_gc = 0x259F38; // size:0x2314 //////////////////////////////////////////////////////////////// // P2/splice/method.cpp //////////////////////////////////////////////////////////////// PmethodNew__Fv = 0x11AE78; // type:func //////////////////////////////////////////////////////////////// // P2/splice/pair.cpp //////////////////////////////////////////////////////////////// CloneTo__5CPairP5CPairP6CFrame = 0x11AEB8; // type:func PpairNew__Fv = 0x11AF28; // type:func DeletePair__FP5CPair = 0x11AF78; // type:func //////////////////////////////////////////////////////////////// // P2/splice/proc.cpp //////////////////////////////////////////////////////////////// CloneTo__5CProcP5CProcP6CFrame = 0x11af98; // type:func PprocNew__Fv = 0x11afc8; // type:func //////////////////////////////////////////////////////////////// // P2/splice/ref.cpp //////////////////////////////////////////////////////////////// __4CRef = 0x11B008; // type:func __4CRefRC4CRef = 0x11B018; // type:func _$_4CRef = 0x11B060; // type:func __as__4CRefRC4CRef = 0x11B0A8; // type:func __eq__4CRefRC4CRef = 0x11B0F8; // type:func CloneTo__4CRefP4CRefP6CFrame = 0x11B258; // type:func Decref__4CRef = 0x11B418; // type:func Incref__4CRef = 0x11B4A8; // type:func SetTag__4CRef4TAGK = 0x11B538; // type:func SetS32__4CRefi = 0x11B570; // type:func SetF32__4CReff = 0x11B5B0; // type:func SetBool__4CRefi = 0x11B5F0; // type:func SetSymid__4CRefUi = 0x11B640; // type:func SetBifk__4CRef4BIFK = 0x11B680; // type:func SetPair__4CRefP5CPair = 0x11B6C0; // type:func SetProc__4CRefP5CProc = 0x11B700; // type:func SetVector__4CRefP6VECTOR = 0x11B740; // type:func SetMatrix__4CRefP7MATRIX4 = 0x11B788; // type:func SetClq__4CRefP3CLQ = 0x11B7D0; // type:func SetLm__4CRefP2LM = 0x11B818; // type:func SetSmp__4CRefP3SMP = 0x11B860; // type:func SetBasic__4CRefP5BASIC = 0x11B8A8; // type:func SetMethod__4CRefP7CMethod = 0x11B8E8; // type:func RefCoerceS32__4CRef = 0x11B928; // type:func RefCoerceF32__4CRef = 0x11B9A8; // type:func //////////////////////////////////////////////////////////////// // P2/splice/serialize.cpp //////////////////////////////////////////////////////////////// PpairSerializeIn__FP18CBinaryInputStream = 0x11BA28; // type:func //////////////////////////////////////////////////////////////// // P2/splice/sidebag.cpp //////////////////////////////////////////////////////////////// RefAddBinding__8CSidebagiP4CRef = 0x11BD28; // type:func RefSetBinding__8CSidebagiP4CRef = 0x11BDD0; // type:func FFindBinding__8CSidebagiP4CRef = 0x11BE90; // type:func CloneTo__8CSidebagP8CSidebag = 0x11BEE0; // type:func PsidebagNew__Fv = 0x11BF30; // type:func //////////////////////////////////////////////////////////////// // P2/splice/spliceutils.cpp //////////////////////////////////////////////////////////////// StartupSplice__Fv = 0x11BF70; // type:func ShutdownSplice__Fv = 0x11C040; // type:func spliceutils__static_initialization_and_destruction_0 = 0x11C0A8; // type:func _GLOBAL_$I$g_splotheapPair = 0x11C0E8; // type:func _GLOBAL_$D$g_splotheapPair = 0x11C108; // type:func //////////////////////////////////////////////////////////////// // P2/splice/splotheap.cpp //////////////////////////////////////////////////////////////// Startup__10CSplotheapii = 0x11C128; // type:func Shutdown__10CSplotheap = 0x11C1D0; // type:func PvAllocUnsafe__10CSplotheap = 0x11C1D8; // type:func PvAllocClear__10CSplotheap = 0x11C240; // type:func PsplotLookup__10CSplotheapi = 0x11C288; // type:func UpdateRecyclable__10CSplotheap = 0x11C2A0; // type:func UnmarkAll__10CSplotheap = 0x11C2B0; // type:func FreeGarbage__10CSplotheap = 0x11C2E8; // type:func PvFromPsplot__FP5SPLOT = 0x11C3B8; // type:func PsplotFromPv__FPv = 0x11C3C0; // type:func FIsPvGarbage__FPv = 0x11C3C8; // type:func MarkPvAlive__FPv = 0x11C3F0; // type:func FUN_0011C418 = 0x11C418; // type:func FUN_0011C498 = 0x11C498; // type:func FUN_0011C4E8 = 0x11C4E8; // type:func g_splotheapPair = 0x25C250; // size:0x1C g_splotheapFrame = 0x25C270; // size:0x1C g_splotheapUnk1 = 0x25C290; // size:0x1C g_splotheapProc = 0x25C2B0; // size:0x1C g_splotheapMethod = 0x25C2D0; // size:0x1C //////////////////////////////////////////////////////////////// // P2/splice/vecmat.cpp //////////////////////////////////////////////////////////////// PvectorNew__Fv = 0x11c508; // type:func IncrefVector__FP6VECTOR = 0x11c580; // type:func DecrefVector__FP6VECTOR = 0x11c5b0; // type:func junk_0011C610 = 0x11C610; // type:func PmatrixNew__Fv = 0x11c618; // type:func IncrefMatrix__FP7MATRIX4 = 0x11c690; // type:func DecrefMatrix__FP7MATRIX4 = 0x11c6c0; // type:func DeleteMatrix__FP7MATRIX4 = 0x11c720; // type:func PclqNew__Fv = 0x11c748; // type:func IncrefClq__FP3CLQ = 0x11c7c0; // type:func DecrefClq__FP3CLQ = 0x11c7f0; // type:func junk_0011C850 = 0x11C850; // type:func PlmNew__Fv = 0x11c858; // type:func IncrefLm__FP2LM = 0x11c8d0; // type:func DecrefLm__FP2LM = 0x11c900; // type:func junk_0011C960 = 0x11C960; // type:func PsmpNew__Fv = 0x11c968; // type:func IncrefSmp__FP3SMP = 0x11c9e0; // type:func DecrefSmp__FP3SMP = 0x11ca20; // type:func StartupSpliceStructuredTypeFactories__Fv = 0x11ca90; // type:func ShutdownSpliceStructuredTypeFactories__Fv = 0x11cbb0; // type:func _t18CStructTypeFactory1Z6VECTOR$s_cmax = 0x25C2F0; // size:0x4 _t18CStructTypeFactory1Z7MATRIX4$s_cmax = 0x25C2F4; // size:0x4 _t18CStructTypeFactory1Z3CLQ$s_cmax = 0x25C2F8; // size:0x4 _t18CStructTypeFactory1Z2LM$s_cmax = 0x25C2FC; // size:0x4 _t18CStructTypeFactory1Z3SMP$s_cmax = 0x25C300; // size:0x4 _t18CStructTypeFactory1Z6VECTOR$s_acref = 0x27B300; // size:0x4 _t18CStructTypeFactory1Z7MATRIX4$s_acref = 0x27B304; // size:0x4 _t18CStructTypeFactory1Z3CLQ$s_acref = 0x27B308; // size:0x4 _t18CStructTypeFactory1Z2LM$s_acref = 0x27B30C; // size:0x4 _t18CStructTypeFactory1Z3SMP$s_acref = 0x27B310; // size:0x4 _t18CStructTypeFactory1Z6VECTOR$s_slotheap = 0x62C558; // size:0x10 _t18CStructTypeFactory1Z7MATRIX4$s_slotheap = 0x62C568; // size:0x10 _t18CStructTypeFactory1Z3CLQ$s_slotheap = 0x62C578; // size:0x10 _t18CStructTypeFactory1Z2LM$s_slotheap = 0x62C588; // size:0x10 _t18CStructTypeFactory1Z3SMP$s_slotheap = 0x62C598; // size:0x10 //////////////////////////////////////////////////////////////// // P2/989snd.c //////////////////////////////////////////////////////////////// // Unmangled names were in the header with extern "C" snd_StartSoundSystem = 0x0011cbb8; //type:func size:632 snd_FlushSoundCommands = 0x0011ce30; //type:func size:556 junk_0x0011d060 = 0x0011d060; //type:func size:24 snd_GotReturns__Fv = 0x0011d078; //type:func size:152 snd_PrepareReturnBuffer__FPUii = 0x0011d110; //type:func size:36 junk_0x0011d138 = 0x0011d138; //type:func size:8 snd_BankLoadByLoc = 0x0011d140; //type:func size:356 snd_BankLoadByLoc_CB = 0x0011d2a8; //type:func size:316 junk_0x0011d3e8 = 0x0011d3e8; //type:func size:56 snd_ResolveBankXREFS = 0x0011d420; //type:func size:44 snd_UnloadBank = 0x0011d450; //type:func size:48 snd_SetMasterVolume = 0x0011d480; //type:func size:52 snd_GetMasterVolume = 0x0011d4b8; //type:func size:40 snd_SetPlaybackMode = 0x0011d4e0; //type:func size:48 junk_0x0011d510 = 0x0011d510; //type:func size:16 snd_SetMixerMode = 0x0011d520; //type:func size:52 snd_SetGroupVoiceRange = 0x0011d558; //type:func size:60 snd_PlaySoundVolPanPMPB = 0x0011d598; //type:func size:60 junk_0x0011d5d8 = 0x0011d5d8; //type:func size:40 snd_StopSound = 0x0011d600; //type:func size:48 junk_0x0011d630 = 0x0011d630; //type:func size:16 snd_PauseSound = 0x0011d640; //type:func size:48 snd_ContinueSound = 0x0011d670; //type:func size:48 junk_0x0011d6a0 = 0x0011d6a0; //type:func size:8 snd_PauseAllSoundsInGroup = 0x0011d6a8; //type:func size:48 snd_ContinueAllSoundsInGroup = 0x0011d6d8; //type:func size:48 snd_SoundIsStillPlaying = 0x0011d708; //type:func size:40 snd_SoundIsStillPlaying_CB = 0x0011d730; //type:func size:48 snd_IsSoundALooper = 0x0011d760; //type:func size:44 junk_0x0011d790 = 0x0011d790; //type:func size:8 snd_SetSoundVolPan = 0x0011d798; //type:func size:60 snd_GetSoundOriginalPitch = 0x0011d7d8; //type:func size:44 junk_0x0011d808 = 0x0011d808; //type:func size:8 snd_SetSoundPitch = 0x0011d810; //type:func size:52 junk_0x0011d848 = 0x0011d848; //type:func size:24 snd_AutoVol = 0x0011d860; //type:func size:60 junk_0x0011d8a0 = 0x0011d8a0; //type:func size:16 snd_SetMIDIRegister = 0x0011d8b0; //type:func size:60 snd_GetMIDIRegister = 0x0011d8f0; //type:func size:44 junk_0x0011d920 = 0x0011d920; //type:func size:8 snd_SetGlobalExcite = 0x0011d928; //type:func size:48 junk_0x0011d958 = 0x0011d958; //type:func size:16 snd_SendIOPCommandAndWait__FiiPc = 0x0011d968; //type:func size:404 snd_SendIOPCommandNoWait__FiiPcPFiUl_vUl = 0x0011db00; //type:func size:724 snd_PostMessage__Fv = 0x0011ddd8; //type:func size:64 snd_SendCurrentBatch__Fv = 0x0011de18; //type:func size:316 snd_InitVAGStreamingEx = 0x0011df58; //type:func size:180 snd_StopAllStreams = 0x0011e010; //type:func size:44 junk_0x0011e040 = 0x0011e040; //type:func size:8 snd_PlayVAGStreamByLoc = 0x0011e048; //type:func size:96 junk_0x0011e0a8 = 0x0011e0a8; //type:func size:8 snd_ContinueVAGStream = 0x0011e0b0; //type:func size:48 snd_IsVAGStreamBuffered_CB = 0x0011e0e0; //type:func size:48 snd_StreamSafeCheckCDIdle = 0x0011e110; //type:func size:40 snd_StreamSafeCdRead = 0x0011e138; //type:func size:188 snd_StreamSafeCdSync = 0x0011e1f8; //type:func size:168 snd_StreamSafeCdBreak = 0x0011e2a0; //type:func size:72 snd_StreamSafeCdGetError = 0x0011e2e8; //type:func size:60 snd_SetReverbType = 0x0011e328; //type:func size:52 snd_SetReverbDepth = 0x0011e360; //type:func size:60 snd_PreAllocReverbWorkArea = 0x0011e3a0; //type:func size:52 junk_0x0011e3d8 = 0x0011e3d8; //type:func size:80 snd_InitMovieSound = 0x0011e428; //type:func size:56 snd_ResetMovieSound = 0x0011e460; //type:func size:36 junk_0x0011e488 = 0x0011e488; //type:func size:16 snd_CloseMovieSound = 0x0011e498; //type:func size:36 snd_StartMovieSound = 0x0011e4c0; //type:func size:56 snd_GetTransStatus = 0x0011e4f8; //type:func size:36 junk_0x0011e520 = 0x0011e520; //type:func size:24 snd_GetDopplerPitchMod = 0x0011e538; //type:func size:36 gCommBusy = 0x0025c340; // size:0x4 gAwaitingInts = 0x0025c344; // size:0x4 gUnkBankLoadError = 0x0025c348; // size:0x4 gStreamingInited = 0x0025c34c; // size:0x4 gCdCallback = 0x0025c350; // size:0x4 gSSRead = 0x0025c354; // size:0x4 gSSReadDone = 0x0025c358; // size:0x4 gLoadingFromFS = 0x0025c35c; // size:0x4 gSndCommandBuffePtr = 0x0025c360; // size:0x8 gCommandBuffeBytesAvail = 0x0025c368; // size:0x8 gSndCommandReturnDefPtr = 0x0025c370; // size:0x8 gReturnValuesPtr = 0x0025c378; // size:0x8 gCommandFillBuffer = 0x0025c380; // size:0x4 gCaching = 0x0025c384; // size:0x4 gLoadBusy = 0x0025c388; // size:0x4 gLoadReturnDef = 0x0025c390; // size:0x10 gLoadCB = 0x0025c3a0; // size:0x4 gLoadUserData = 0x0025c3a8; // size:0x8 gSyncBuffer = 0x0025c3c0; // size:0x40 gSyncSendBuffer = 0x0025c400; // size:0x40 gSyncStringBuffer = 0x0025c440; // size:0x100 gSndCommandBuffer1 = 0x0025c540; // size:0x1000 gSndCommandBuffer2 = 0x0025d540; // size:0x1000 gSndCommandReturnDef1 = 0x0025e540; // size:0x1000 gSndCommandReturnDef2 = 0x0025f540; // size:0x1000 gActualReturnValues1 = 0x00260540; // size:0x420 gActualReturnValues2 = 0x00260980; // size:0x420 gStats = 0x00260dc0; // size:0x20 gLoadReturnValue = 0x00260e00; // size:0x10 gLoadParams = 0x00260e40; // size:0x20 gSLClientData = 0x0027b4c8; // size:0x28 gSLClientLoaderData = 0x027b4f0; // size:0x28 //////////////////////////////////////////////////////////////// // P2/brx.c //////////////////////////////////////////////////////////////// StartupBrx__Fv = 0x11e560; // type:func PloNew__F3CIDP2SWP3ALO3OIDi = 0x11E580; // type:func LoadOptionFromBrx__FPvP5EOPIDP18CBinaryInputStream = 0x11E680; // type:func LoadOptionsFromBrx__FPvP18CBinaryInputStream = 0x11EC40; // type:func IploFromStockOid__Fi = 0x11ECA0; // type:func LoadSwObjectsFromBrx__FP2SWP3ALOP18CBinaryInputStream = 0x11ECB8; // type:func SetLoDefaults__FP2LO = 0x11EDA8; // type:func g_aeopid = 0x2505D8; //////////////////////////////////////////////////////////////// // P2/ac.c //////////////////////////////////////////////////////////////// FindKey__FfiiiPcPfT5PPv = 0x11EE70; // type:func EvaluateAcp__FP3ACPP3ALOffiP6VECTORT5 = 0x11EF40; // type:func GetAcpTimes__FP3ACPPiPPf = 0x11EF48; // type:func EvaluateAcr__FP3ACRP3ALOffiP7MATRIX3P6VECTOR = 0x11EF60; // type:func EvaluateAcrEul__FP3ACRP3ALOffiP6VECTORT5 = 0x11EF68; // type:func GetAcrTimes__FP3ACRPiPPf = 0x11EF70; // type:func EvaluateAcs__FP3ACSP3ALOfiP7MATRIX3 = 0x11EF88; // type:func GetAcsTimes__FP3ACSPiPPf = 0x11EF90; // type:func EvaluateAcg__FP3ACGP3ALOffiPfT5 = 0x11EFA8; // type:func GetAcgTimes__FP3ACGPiPPf = 0x11EFB0; // type:func LoadAcgbFromBrx__FP4ACGBP18CBinaryInputStream = 0x11EFC8; // type:func EvaluateAcgb__FP4ACGBP3ALOffiPfT5 = 0x11F0C8; // type:func GetAcgbTimes__FP4ACGBPiPPf = 0x11F180; // type:func LoadAcgbwFromBrx__FP5ACGBWP18CBinaryInputStream = 0x11F210; // type:func EvaluateAcgbw__FP5ACGBWP3ALOffiPfT5 = 0x11F320; // type:func GetAcgbwTimes__FP5ACGBWPiPPf = 0x11F3E8; // type:func EvaluateAcgl__FP4ACGLP3ALOffiPfT5 = 0x11F478; // type:func LoadAcglFromBrx__FP4ACGLP18CBinaryInputStream = 0x11F568; // type:func GetAcglTimes__FP4ACGLPiPPf = 0x11F620; // type:func EvaluateApacg__FPP3ACGP3ALOffiP6VECTORN25 = 0x11F6B0; // type:func LoadApacgFromBrx__FPP3ACGP6VECTORP18CBinaryInputStream = 0x11F798; // type:func GetApacgTimes__FPP3ACGPiPPf = 0x11F850; // type:func EvaluateAkvb__FiP3KVBffiP6VECTORT5 = 0x11F9F8; // type:func LoadAkvbFromBrx__FPiPP3KVBP18CBinaryInputStream = 0x11FA88; // type:func GetAkvbTimes__FiP3KVBPiPPf = 0x11FB98; // type:func EvaluateAcpc__FP4ACPCP3ALOffiP6VECTORT5 = 0x11FC20; // type:func LoadAcpcFromBrx__FP4ACPCP18CBinaryInputStream = 0x11FC90; // type:func GetAcpcTimes__FP4ACPCPiPPf = 0x11FDB8; // type:func EvaluateAcpb__FP4ACPBP3ALOffiP6VECTORT5 = 0x11FDD8; // type:func LoadAcpbFromBrx__FP4ACPBP18CBinaryInputStream = 0x11FE40; // type:func GetAcpbTimes__FP4ACPBPiPPf = 0x11FED8; // type:func EvaluateAcrc__FP4ACRCP3ALOffiP7MATRIX3P6VECTOR = 0x11FF08; // type:func EvaluateAcrcEul__FP4ACRCP3ALOffiP6VECTORT5 = 0x11FFA8; // type:func LoadAcrcFromBrx__FP4ACRCP18CBinaryInputStream = 0x11FFD8; // type:func GetAcrcTimes__FP4ACRCPiPPf = 0x120110; // type:func EvaluateAcrb__FP4ACRBP3ALOffiP7MATRIX3P6VECTOR = 0x120130; // type:func EvaluateAcrbEul__FP4ACRBP3ALOffiP6VECTORT5 = 0x1201D0; // type:func LoadAcrbFromBrx__FP4ACRBP18CBinaryInputStream = 0x1201F0; // type:func GetAcrbTimes__FP4ACRBPiPPf = 0x1202C0; // type:func EvaluateAcsc__FP4ACSCP3ALOfiP7MATRIX3 = 0x1202F0; // type:func LoadAcscFromBrx__FP4ACSCP18CBinaryInputStream = 0x120360; // type:func GetAcscTimes__FP4ACSCPiPPf = 0x120388; // type:func EvaluateAcsb__FP4ACSBP3ALOfiP7MATRIX3 = 0x1203A8; // type:func LoadAcsbFromBrx__FP4ACSBP18CBinaryInputStream = 0x120418; // type:func GetAcsbTimes__FP4ACSBPiPPf = 0x120440; // type:func EvaluateAcpbl__FP5ACPBLP3ALOffiP6VECTORT5 = 0x120470; // type:func EvaluateAcrbl__FP5ACRBLP3ALOffiP7MATRIX3P6VECTOR = 0x120700; // type:func EvaluateAcgblt__FP6ACGBLTP3ALOffiPfT5 = 0x120AA8; // type:func EvaluateAcgblp__FP6ACGBLPP3ALOffiPfT5 = 0x120D58; // type:func PacpNew__F4ACVK = 0x120FB0; // type:func PacrNew__F4ACVK = 0x121050; // type:func PacsNew__F4ACVK = 0x1210F0; // type:func PacgNew__F4ACGK = 0x121160; // type:func //////////////////////////////////////////////////////////////// // P2/act.c //////////////////////////////////////////////////////////////// PactNew__FP2SWP3ALOP5VTACT = 0x121228; // type:func PactNewClone__FP3ACTP2SWP3ALO = 0x121280; // type:func CloneAct__FP3ACTT0 = 0x1212D8; // type:func InitAct__FP3ACTP3ALO = 0x121338; // type:func RetractAct__FP3ACTi = 0x121358; // type:func GetActPositionGoal__FP3ACTfP6VECTORT2 = 0x1214B8; // type:func GetActRotationGoal__FP3ACTfP7MATRIX3P6VECTOR = 0x121508; // type:func GetActTwistGoal__FP3ACTPfT1 = 0x121568; // type:func GetActScale__FP3ACTP7MATRIX3 = 0x121580; // type:func GGetActPoseGoal__FP3ACTi = 0x1215A8; // type:func CalculateActDefaultAck__FP3ACT = 0x1215C0; // type:func SnapAct__FP3ACTi = 0x121648; // type:func CalculateAloPositionSpring__FP3ALOfP6VECTORN22 = 0x121760; // type:func ProjectActPosition__FP3ACT = 0x1218C0; // type:func CalculateAloRotationSpring__FP3ALOfP7MATRIX3P6VECTORT3 = 0x121C48; // type:func ProjectActRotation__FP3ACT = 0x121DE0; // type:func ProjectActPose__FP3ACTi = 0x122488; // type:func PredictAloPosition__FP3ALOfP6VECTORT2 = 0x122550; // type:func PredictAloRotation__FP3ALOfP7MATRIX3P6VECTOR = 0x1225D0; // type:func AdaptAct__FP3ACT = 0x1226D8; // type:func InitActval__FP6ACTVALP3ALO = 0x122708; // type:func GetActvalPositionGoal__FP6ACTVALfP6VECTORT2 = 0x1227B0; // type:func GetActvalRotationGoal__FP6ACTVALfP7MATRIX3P6VECTOR = 0x1227F0; // type:func GetActvalTwistGoal__FP6ACTVALPfT1 = 0x122840; // type:func GetActvalScale__FP6ACTVALP7MATRIX3 = 0x122858; // type:func GGetActvalPoseGoal__FP6ACTVALi = 0x122878; // type:func InitActref__FP6ACTREFP3ALO = 0x122890; // type:func GetActrefPositionGoal__FP6ACTREFfP6VECTORT2 = 0x122920; // type:func GetActrefRotationGoal__FP6ACTREFfP7MATRIX3P6VECTOR = 0x122968; // type:func GetActrefTwistGoal__FP6ACTREFPfT1 = 0x1229C0; // type:func GetActrefScale__FP6ACTREFP7MATRIX3 = 0x1229E0; // type:func GGetActrefPoseGoal__FP6ACTREFi = 0x122A00; // type:func InitActadj__FP6ACTADJP3ALO = 0x122A18; // type:func GetActadjPositionGoal__FP6ACTADJfP6VECTORT2 = 0x122A80; // type:func GetActadjRotationGoal__FP6ACTADJfP7MATRIX3P6VECTOR = 0x122B30; // type:func GetActadjTwistGoal__FP6ACTADJPfT1 = 0x122C48; // type:func GetActadjScale__FP6ACTADJP7MATRIX3 = 0x122CB0; // type:func GGetActadjPoseGoal__FP6ACTADJi = 0x122D90; // type:func InitActbank__FP7ACTBANKP3ALO = 0x122DA0; // type:func GetActbankRotationGoal__FP7ACTBANKfP7MATRIX3P6VECTOR = 0x122DE0; // type:func //////////////////////////////////////////////////////////////// // P2/actseg.c //////////////////////////////////////////////////////////////// RetractActseg__FP6ACTSEGi = 0x122F28; // type:func CloneActseg__FP6ACTSEGT0 = 0x122F88; // type:func GetActsegPositionGoal__FP6ACTSEGfP6VECTORT2 = 0x122FE0; // type:func GetActsegRotationGoal__FP6ACTSEGfP7MATRIX3P6VECTOR = 0x123120; // type:func GetActsegTwistGoal__FP6ACTSEGPfT1 = 0x123270; // type:func GetActsegScale__FP6ACTSEGP7MATRIX3 = 0x1232E8; // type:func GGetActsegPoseGoal__FP6ACTSEGi = 0x123358; // type:func //////////////////////////////////////////////////////////////// // P2/alarm.c //////////////////////////////////////////////////////////////// BreakAlbrk__FP5ALBRK = 0x1233C0; // type:func SetAlbrkAlarm__FP5ALBRKP5ALARM = 0x123400; // type:func InitAlarm__FP5ALARM = 0x123408; // type:func PostAlarmLoad__FP5ALARM = 0x123448; // type:func CloneAlarm__FP5ALARMT0 = 0x123540; // type:func UpdateAlarm__FP5ALARMf = 0x123578; // type:func PostAlarmLoadCallbackHookup__FP5ALARM5MSGIDPv = 0x1236C8; // type:func SetAlarmAlarms__FP5ALARM6ALARMS = 0x123888; // type:func TriggerAlarm__FP5ALARM4ALTK = 0x123AB0; // type:func DisableAlarmAlbrk__FP5ALARM = 0x123B18; // type:func EnableAlarmSensors__FP5ALARM = 0x123B28; // type:func DisableAlarmSensors__FP5ALARM = 0x123BB0; // type:func NotifyAlarmSensorsOnTrigger__FP5ALARM = 0x123C20; // type:func AddAlarmAlbrk__FP5ALARM3OID = 0x123C90; // type:func AddAlarmSensor__FP5ALARM3OID = 0x123CB8; // type:func AddAlarmStepguard__FP5ALARM3OID = 0x123CE0; // type:func SetAlarmRsmg__FP5ALARMi3OIDN22 = 0x123D08; // type:func FGetAlarmSensorList__FP5ALARMPv = 0x123D40; // type:func //////////////////////////////////////////////////////////////// // P2/alo.c //////////////////////////////////////////////////////////////// FIsZeroV__FP6VECTOR = 0x123DC0; // type:func FIsZeroW__FP6VECTOR = 0x123E00; // type:func FIsZeroDv__FP6VECTOR = 0x123E48; // type:func FIsZeroDw__FP6VECTOR = 0x123E88; // type:func InitAlo__FP3ALO = 0x123ED0; // type:func AddAloHierarchy__FP3ALO = 0x124050; // type:func OnAloAdd__FP3ALO = 0x1240F8; // type:func RemoveAloHierarchy__FP3ALO = 0x124338; // type:func OnAloRemove__FP3ALO = 0x1243E0; // type:func UpdateAloOrig__FP3ALO = 0x124540; // type:func SetAloParent__FP3ALOT0 = 0x1245A8; // type:func ApplyAloProxy__FP3ALOP5PROXY = 0x124868; // type:func BindAlo__FP3ALO = 0x1249A8; // type:func PostAloLoad__FP3ALO = 0x124A48; // type:func PostAloLoadCallback__FP3ALO5MSGIDPv = 0x124CC0; // type:func SnipAloObjects__FP3ALOiP4SNIP = 0x124DF8; // type:func UpdateAloHierarchy__FP3ALOf = 0x124EE8; // type:func UpdateAlo__FP3ALOf = 0x124FC0; // type:func InvalidateAloLighting__FP3ALO = 0x1250C8; // type:func UpdateAloXfWorld__FP3ALO = 0x125108; // type:func UpdateAloXfWorldHierarchy__FP3ALO = 0x125138; // type:func PresetAloAccel__FP3ALOf = 0x125438; // type:func ProjectAloTransform__FP3ALOfi = 0x125440; // type:func PredictAloTransform__FP3ALOT0fP6VECTORP7MATRIX3T3T3 = 0x125750; // type:func PredictAloTransformAdjust__FP3ALOT0fP6VECTORP7MATRIX3T3T3 = 0x1259D8; // type:func DupAloRo__FP3ALOP2ROT1 = 0x125B70; // type:func RenderFastShadow__FP3ALOP2CMP2RO = 0x125BF0; // type:func RenderAloAll__FP3ALOP2CMP2RO = 0x125C90; // type:func RenderAloSelf__FP3ALOP2CMP2RO = 0x1261C0; // type:func RenderAloGlobset__FP3ALOP2CMP2RO = 0x126270; // type:func RenderAloLine__FP3ALOP2CMP6VECTORT2ff = 0x1268B8; // type:func SetAloOverrideCel__FP3ALOG4RGBA = 0x126A48; // type:func FUN_00126ab0 = 0x126AB0; // type:func UpdateAloThrob__FP3ALOf = 0x126AC8; // type:func SetAloBlotContext__FP3ALOP4BLOT = 0x126BC0; // type:func EnsureAloFader__FP3ALO = 0x126C58; // type:func FadeAloIn__FP3ALOf = 0x126CB8; // type:func FadeAloOut__FP3ALOf = 0x126D60; // type:func AdjustAloRtckMat__FP3ALOP2CM4RTCKP6VECTORP7MATRIX4 = 0x126DE8; // type:func CloneAloHierarchy__FP3ALOT0 = 0x126F78; // type:func CloneAlo__FP3ALOT0 = 0x127048; // type:func HandleAloMessage__FP3ALO5MSGIDPv = 0x127378; // type:func TranslateAloToPos__FP3ALOP6VECTOR = 0x1273F0; // type:func junk_00127468 = 0x127468; // type:func RotateAloToMat__FP3ALOP7MATRIX3 = 0x127478; // type:func SetAloVelocityVec__FP3ALOP6VECTOR = 0x1274F8; // type:func SetAloVelocityXYZ__FP3ALOfff = 0x127558; // type:func SetAloAngularVelocityVec__FP3ALOP6VECTOR = 0x127590; // type:func SetAloAngularVelocityXYZ__FP3ALOfff = 0x1275F0; // type:func SetAloVelocityLocal__FP3ALOP6VECTOR = 0x127628; // type:func GetAloVelocityLocal__FP3ALOP6VECTOR = 0x127678; // type:func MatchAloOtherObject__FP3ALOT0 = 0x1276C0; // type:func CalculateAloMovement__FP3ALOT0P6VECTORN42 = 0x1278A8; // type:func CalculateAloTransform__FP3ALOT0iP6VECTORP7MATRIX3T3T3 = 0x127B20; // type:func CalculateAloTransformAdjust__FP3ALOT0P6VECTORP7MATRIX3T2T2 = 0x127E60; // type:func ConvertAloPos__FP3ALOT0P6VECTORT2 = 0x128018; // type:func ConvertAloVec__FP3ALOT0P6VECTORT2 = 0x1280C0; // type:func ConvertAloMat__FP3ALOT0P7MATRIX3T2 = 0x128150; // type:func FDrivenAlo__FP3ALO = 0x128230; // type:func RetractAloDrive__FP3ALO = 0x128278; // type:func ConvertAloMovement__FP3ALOT0P6VECTORN82 = 0x128330; // type:func CalculateAloDrive__FP3ALOP3CLQP2LMffPfN25 = 0x128598; // type:func FGetAloChildrenList__FP3ALOPv = 0x1288F0; // type:func PactsegNewAlo__FP3ALO = 0x128998; // type:func LoadAloFromBrx__FP3ALOP18CBinaryInputStream = 0x1289C0; // type:func LoadAloAloxFromBrx__FP3ALOP18CBinaryInputStream = 0x128C10; // type:func BindAloAlox__FP3ALO = 0x128DB8; // type:func AdjustAloRotation__FP3ALOP7MATRIX3P6VECTOR = 0x128E88; // type:func UnadjustAloRotation__FP3ALOP7MATRIX3 = 0x128FD0; // type:func SetAloInitialVelocity__FP3ALOP6VECTOR = 0x1290B8; // type:func SetAloInitialAngularVelocity__FP3ALOP6VECTOR = 0x1290E0; // type:func PasegdEnsureAlo__FP3ALO = 0x129108; // type:func SetAloFastShadowRadius__FP3ALOf = 0x129170; // type:func GetAloFastShadowRadius__FP3ALOPf = 0x129188; // type:func SetAloFastShadowDepth__FP3ALOf = 0x1291A0; // type:func GetAloFastShadowDepth__FP3ALOPf = 0x1291B8; // type:func PshadowAloEnsure__FP3ALO = 0x1291D0; // type:func SetAloCastShadow__FP3ALOi = 0x129228; // type:func SetAloShadowShader__FP3ALO3OID = 0x129288; // type:func SetAloShadowNearRadius__FP3ALOf = 0x1292B8; // type:func SetAloShadowFarRadius__FP3ALOf = 0x1292E8; // type:func SetAloShadowNearCast__FP3ALOf = 0x129318; // type:func SetAloShadowFarCast__FP3ALOf = 0x129348; // type:func SetAloShadowConeAngle__FP3ALOf = 0x129378; // type:func SetAloShadowFrustrumUp__FP3ALOP6VECTOR = 0x1293A8; // type:func SetAloDynamicShadowObject__FP3ALO3OID = 0x1293D8; // type:func PshadowInferAlo__FP3ALO = 0x129400; // type:func GetAloCastShadow__FP3ALOPi = 0x129440; // type:func GetAloShadowShader__FP3ALOP3OID = 0x129450; // type:func GetAloShadowNearRadius__FP3ALOPf = 0x129480; // type:func GetAloShadowFarRadius__FP3ALOPf = 0x1294B0; // type:func GetAloShadowNearCast__FP3ALOPf = 0x1294E0; // type:func GetAloShadowFarCast__FP3ALOPf = 0x129510; // type:func GetAloShadowConeAngle__FP3ALOPf = 0x129540; // type:func GetAloShadowFrustrumUp__FP3ALOP6VECTOR = 0x129598; // type:func GetAloEuler__FP3ALOP6VECTOR = 0x1295C8; // type:func SetAloEuler__FP3ALOP6VECTOR = 0x129648; // type:func EnsureAloActRestore__FP3ALO = 0x1296E0; // type:func EnsureAloActla__FP3ALO = 0x129730; // type:func RecacheAloActList__FP3ALO = 0x129780; // type:func InsertAloAct__FP3ALOP3ACT = 0x1299E0; // type:func ResortAloActList__FP3ALO = 0x129A58; // type:func PasegaFindAlo__FP3ALO3OID = 0x129B98; // type:func PsmaFindAlo__FP3ALO3OID = 0x129C20; // type:func PasegaFindAloNearest__FP3ALO = 0x129CA8; // type:func CreateAloActadj__FP3ALOiPP6ACTADJ = 0x129D00; // type:func FIsAloStatic__FP3ALO = 0x129D70; // type:func ResolveAlo__FP3ALO = 0x129DF8; // type:func SetAloPositionSpring__FP3ALOf = 0x129E10; // type:func SetAloPositionSpringDetail__FP3ALOP3CLQ = 0x129E88; // type:func SetAloPositionDamping__FP3ALOf = 0x129EE0; // type:func SetAloPositionDampingDetail__FP3ALOP3CLQ = 0x129F58; // type:func SetAloRotationSpring__FP3ALOf = 0x129FB0; // type:func SetAloRotationSpringDetail__FP3ALOP3CLQ = 0x12A028; // type:func SetAloRotationDamping__FP3ALOf = 0x12A080; // type:func SetAloRotationDampingDetail__FP3ALOP3CLQ = 0x12A0F8; // type:func SetAloPositionSmooth__FP3ALOf = 0x12A150; // type:func SetAloPositionSmoothMaxAccel__FP3ALOf = 0x12A1A0; // type:func SetAloPositionSmoothDetail__FP3ALOP4SMPA = 0x12A200; // type:func SetAloRotationSmooth__FP3ALOf = 0x12A270; // type:func SetAloRotationSmoothMaxAccel__FP3ALOf = 0x12A2C0; // type:func SetAloRotationSmoothDetail__FP3ALOP4SMPA = 0x12A320; // type:func SetAloDefaultAckPos__FP3ALO3ACK = 0x12A390; // type:func SetAloDefaultAckRot__FP3ALO3ACK = 0x12A398; // type:func SetAloRestorePosition__FP3ALOi = 0x12A3A0; // type:func FUN_0012a3c8 = 0x12A3C8; // type:func FUN_0012a3e8 = 0x12A3E8; // type:func FUN_0012a418 = 0x12A418; // type:func SetAloRestorePositionAck__FP3ALO3ACK = 0x12A430; // type:func SetAloRestoreRotation__FP3ALOi = 0x12A478; // type:func SetAloRestoreRotationAck__FP3ALO3ACK = 0x12A4A0; // type:func FUN_0012a4e8 = 0x12A4E8; // type:func SetAloLookAt__FP3ALO3ACK = 0x12A528; // type:func SetAloLookAtIgnore__FP3ALOf = 0x12A580; // type:func GetAloLookAtIgnore__FP3ALOPf = 0x12A5B8; // type:func SetAloLookAtPanFunction__FP3ALOP3CLQ = 0x12A5D0; // type:func GetAloLookAtPanFunction__FP3ALOP3CLQ = 0x12A610; // type:func SetAloLookAtPanLimits__FP3ALOP2LM = 0x12A630; // type:func GetAloLookAtPanLimits__FP3ALOP2LM = 0x12A678; // type:func SetAloLookAtTiltFunction__FP3ALOP3CLQ = 0x12A6A0; // type:func GetAloLookAtTiltFunction__FP3ALOP3CLQ = 0x12A6E0; // type:func SetAloLookAtTiltLimits__FP3ALOP2LM = 0x12A700; // type:func GetAloLookAtTiltLimits__FP3ALOP2LM = 0x12A748; // type:func SetAloLookAtEnabledPriority__FP3ALOi = 0x12A770; // type:func GetAloLookAtEnabledPriority__FP3ALOPi = 0x12A7A8; // type:func SetAloLookAtDisabledPriority__FP3ALOi = 0x12A7C0; // type:func GetAloLookAtDisabledPriority__FP3ALOPi = 0x12A7F8; // type:func FUN_0012a810 = 0x12A810; // type:func FUN_0012a848 = 0x12A848; // type:func FUN_0012a860 = 0x12A860; // type:func FUN_0012a888 = 0x12A888; // type:func FUN_0012a8b8 = 0x12A8B8; // type:func FUN_0012a8c8 = 0x12A8C8; // type:func SetAloRotationMatchesVelocity__FP3ALOff3ACK = 0x12A8D8; // type:func PtargetEnsureAlo__FP3ALO = 0x12A970; // type:func SetAloTargetAttacks__FP3ALOi = 0x12A9C8; // type:func SetAloTargetRadius__FP3ALOf = 0x12AA00; // type:func SetAloTargetHitTest__FP3ALOi = 0x12AA28; // type:func SetAloScrollingMasterSpeeds__FP3ALOff = 0x12AA50; // type:func SetAloEyesClosed__FP3ALOf = 0x12AAE8; // type:func EnsureAloSfx__FP3ALO = 0x12ABA8; // type:func SetAloSfxid__FP3ALO5SFXID = 0x12ABD0; // type:func SetAloSfxidSpl__FP3ALO5SFXID = 0x12AC08; // type:func GetAloSfxid__FP3ALOP5SFXID = 0x12AC88; // type:func SetAloSStart__FP3ALOf = 0x12ACA0; // type:func GetAloSStart__FP3ALOPf = 0x12ACD8; // type:func SetAloSFull__FP3ALOf = 0x12ACF8; // type:func SetAloSndRepeat__FP3ALOP2LM = 0x12AD30; // type:func GetAloSFull__FP3ALOPf = 0x12AD78; // type:func SetAloUVolume__FP3ALOf = 0x12AD98; // type:func SetAloUDoppler__FP3ALOf = 0x12ADD0; // type:func GetAloUDoppler__FP3ALOPf = 0x12AE08; // type:func SetAloUVolumeSpl__FP3ALOf = 0x12AE20; // type:func GetAloUVolume__FP3ALOPf = 0x12AE58; // type:func SetAloUPitch__FP3ALOf = 0x12AE78; // type:func SetAloUPitchSpl__FP3ALOf = 0x12AEB0; // type:func GetAloUPitch__FP3ALOPf = 0x12AEE8; // type:func GetAloSndRepeat__FP3ALOP2LM = 0x12AF00; // type:func StartAloSound__FP3ALO5SFXIDfffP2LM = 0x12AF38; // type:func StopAloSound__FP3ALO = 0x12B010; // type:func EnsureAloThrob__FP3ALO = 0x12B040; // type:func SetAloThrobKind__FP3ALO6THROBK = 0x12B0B0; // type:func GetAloThrobKind__FP3ALOP6THROBK = 0x12B128; // type:func SetAloThrobInColor__FP3ALOP6VECTOR = 0x12B140; // type:func GetAloThrobInColor__FP3ALOP6VECTOR = 0x12B180; // type:func SetAloThrobOutColor__FP3ALOP6VECTOR = 0x12B1A0; // type:func GetAloThrobOutColor__FP3ALOP6VECTOR = 0x12B1E0; // type:func SetAloThrobDtInOut__FP3ALOf = 0x12B200; // type:func GetAloThrobDtInOut__FP3ALOPf = 0x12B238; // type:func SetAloInteractCane__FP3ALOi = 0x12B250; // type:func GetAloInteractCane__FP3ALOPi = 0x12B260; // type:func SetAloInteractCaneSweep__FP3ALOi = 0x12B270; // type:func GetAloInteractCaneSweep__FP3ALOPi = 0x12B278; // type:func SetAloInteractCaneRush__FP3ALOi = 0x12B288; // type:func GetAloInteractCaneRush__FP3ALOPi = 0x12B290; // type:func SetAloInteractCaneSmash__FP3ALOi = 0x12B2A0; // type:func GetAloInteractCaneSmash__FP3ALOPi = 0x12B2A8; // type:func SetAloInteractBomb__FP3ALOi = 0x12B2B8; // type:func GetAloInteractBomb__FP3ALOPi = 0x12B2C0; // type:func SetAloInteractShock__FP3ALOi = 0x12B2D0; // type:func GetAloInteractShock__FP3ALOPi = 0x12B2D8; // type:func FAbsorbAloWkr__FP3ALOP3WKR = 0x12B2E8; // type:func SetAloPoseCombo__FP3ALO3OID = 0x12B2F8; // type:func SetAloForceCameraFade__FP3ALOi = 0x12B420; // type:func SetAloRealClock__FP3ALOi = 0x12B4C8; // type:func FUN_0012b550 = 0x12B550; // type:func FUN_0012b590 = 0x12B590; // type:func FUN_0012b5b8 = 0x12B5B8; // type:func junk_0012B6A0 = 0x12B6A0; // type:func FUN_0012b6b8 = 0x12B6B8; // type:func anticrack_itm_firewall = 0x12B760; // type:func // TODO: Where do these belong to? g_vtactseg = 0x2197c0; s_shadow = 0x27b520; //////////////////////////////////////////////////////////////// // P2/aseg.c //////////////////////////////////////////////////////////////// StartupAseg__Fv = 0x12B868; // type:func InitAseg__FP4ASEG = 0x12B870; // type:func LoadAsegFromBrx__FP4ASEGP18CBinaryInputStream = 0x12B8C8; // type:func LoadAsegEventsFromBrx__FP4ASEGP18CBinaryInputStreamiPiPP2EA = 0x12BC38; // type:func CloneAseg__FP4ASEGP2LO = 0x12C140; // type:func PostAsegLoad__FP4ASEG = 0x12C160; // type:func PostAsegLoadCallback__FP4ASEG5MSGIDPv = 0x12C208; // type:func ApplyAsegOvr__FP4ASEGP3ALOiP3OVRffiPP5ASEGA = 0x12C288; // type:func ApplyAseg__FP4ASEGP3ALOffiPP5ASEGA = 0x12C7B0; // type:func PasegaApplyAseg__FP4ASEGP3ALOffi = 0x12C7D8; // type:func PasegaFindAseg__FP4ASEGP3ALO = 0x12C808; // type:func EnsureAseg__FP4ASEGP3ALO4SEEKffiPP5ASEGA = 0x12C840; // type:func PasegaEnsureAseg__FP4ASEGP3ALO4SEEKffi = 0x12C8F8; // type:func ApplyAsegCur__FP4ASEGP3ALOffiPP5ASEGA = 0x12C918; // type:func FWipingAseg__FP4ASEG = 0x12C9A8; // type:func FindAsegClosestPoint__FP4ASEGP3ALOP6VECTORfPfT2T2 = 0x12C9E8; // type:func PeaFindAsegLabel__FP4ASEG3OID = 0x12CBE8; // type:func TFindAsegLabel__FP4ASEG3OID = 0x12CCC0; // type:func PchnFindAseg__FP4ASEGP3ALO = 0x12CCE8; // type:func PredictAsegEffect__FP4ASEGffP3ALOT3iP6VECTORP7MATRIX3T6T6 = 0x12CD78; // type:func GetAsegWaypoints__FP4ASEGP3ALOPiPPP8WAYPOINT = 0x12D1B0; // type:func StripAsegChn__FP4ASEGP3CHN = 0x12D2A8; // type:func StripAsegAlo__FP4ASEGP3ALO = 0x12D398; // type:func LoadAsegblFromBrx__FP6ASEGBLP18CBinaryInputStream = 0x12D3E0; // type:func PostAsegblLoad__FP6ASEGBL = 0x12D3E8; // type:func CloneAsegbl__FP6ASEGBLP2LO = 0x12D3F0; // type:func //////////////////////////////////////////////////////////////// // P2/asega.c //////////////////////////////////////////////////////////////// PasegaNew__FP2SW = 0x12D3F8; // type:func SetAsegaHandsOff__FP5ASEGAi = 0x12D448; // type:func UpdateAsegaIeaCur__FP5ASEGA = 0x12D4A8; // type:func PactsegFindAsega__FP5ASEGA3OID = 0x12D570; // type:func junk_0012D5C8 = 0x12D5C8; // type:func HandleAsegaEvent__FP5ASEGAP2EAPi = 0x12D5D0; // type:func HandleAsegaEventsFF__FP5ASEGAP4ASEGPi = 0x12E4E0; // type:func HandleAsegaEvents__FP5ASEGAP4ASEGPi = 0x12E5D0; // type:func RemoveAsega__FP5ASEGA = 0x12E710; // type:func RetractAsega__FP5ASEGA = 0x12E760; // type:func FUN_0012e928 = 0x12E928; // type:func UFromEaErrorFunc__FP2EAf = 0x12E968; // type:func FWrapAsegaTime__FP5ASEGAPfT1 = 0x12E9E0; // type:func UpdateAsega__FP5ASEGAf = 0x12EBD8; // type:func SeekAsega__FP5ASEGA4SEEKff = 0x12F0A0; // type:func SnapAsega__FP5ASEGAi = 0x12F190; // type:func AdaptAsega__FP5ASEGA = 0x12F1D8; // type:func FindChnClosestPointLocal__FP3CHNP3ALOP6VECTORfffPfT2T2 = 0x12F210; // type:func SetAsegaSpeed__FP5ASEGAf = 0x12F6B0; // type:func SetAsegaMasterSpeed__FP5ASEGAf = 0x12F6D0; // type:func SetAsegaPriority__FP5ASEGAi = 0x12F718; // type:func SendAsegaMessage__FP5ASEGA5MSGIDPv = 0x12F760; // type:func SubscribeAsegaStruct__FP5ASEGAPFPv5MSGIDPv_vPv = 0x12F7E0; // type:func SubscribeAsegaObject__FP5ASEGAP2LO = 0x12F810; // type:func //////////////////////////////////////////////////////////////// // P2/barrier.c //////////////////////////////////////////////////////////////// InitBarrier__FP7BARRIER = 0x12F840; // type:func CloneBarrier__FP7BARRIERT0 = 0x12F888; // type:func PostBarrierLoad__FP7BARRIER = 0x12F8C8; // type:func UpdateBarrier__FP7BARRIERf = 0x12F9B8; // type:func FIgnoreBarrierIntersection__FP7BARRIERP2SO = 0x12FA88; // type:func NotifyBarrierImpact__FP7BARRIERP2XPi = 0x12FB68; // type:func AddBarrierObject__FP7BARRIER3OID = 0x12FCB0; // type:func AddBarrierClass__FP7BARRIER3CID = 0x12FCD0; // type:func //////////////////////////////////////////////////////////////// // P2/bas.c //////////////////////////////////////////////////////////////// __18CBinaryAsyncStreamPv = 0x12FCF0; // type:func _$_18CBinaryAsyncStream = 0x12FD30; // type:func FOpenFile__18CBinaryAsyncStreamP13CFileLocation = 0x12FD78; // type:func junk_0012FD98 = 0x12FD98; // type:func FOpenSector__18CBinaryAsyncStreamUiUi = 0x12FDA0; // type:func Close__18CBinaryAsyncStream = 0x12FDE8; // type:func StartSpooling__18CBinaryAsyncStream = 0x12FE70; // type:func FSpooling__18CBinaryAsyncStream = 0x12FF10; // type:func FSpoolingComplete__18CBinaryAsyncStream = 0x12FF20; // type:func FinishSpooling__18CBinaryAsyncStream = 0x12FFE8; // type:func Spool__18CBinaryAsyncStream = 0x130070; // type:func Skip__18CBinaryAsyncStreami = 0x1300D8; // type:func //////////////////////////////////////////////////////////////// // P2/basic.c //////////////////////////////////////////////////////////////// FIsBasicDerivedFrom__FP5BASIC3CID = 0x1300e8; // type:func EnsureBasicSidebag__FP5BASIC = 0x130110; // type:func GetBasicCid__FP5BASICP3CID = 0x130158; // type:func //////////////////////////////////////////////////////////////// // P2/bez.c //////////////////////////////////////////////////////////////// EvaluateBezierWeightedFloat__FfffffffffPfN29 = 0x130168; // type:func EvaluateBezierFloat__FfffffffPfN27 = 0x1303F0; // type:func EvaluateBezierPos__FfffP6VECTORN63 = 0x130540; // type:func EvaluateBezierMat__FfffP7MATRIX3P6VECTORT3T4T3T4T4 = 0x130748; // type:func TesselateBezier__FfffP6VECTORN33iT3 = 0x130B48; // type:func SBezierPosLength__FffP6VECTORN32 = 0x130C20; // type:func LimitBezierMulti__Fie = 0x130C58; // type:func //////////////////////////////////////////////////////////////// // P2/binoc.c //////////////////////////////////////////////////////////////// InitBei__FP3BEIP3CLQffi = 0x130F48; // type:func GEvaluateBei__FP3BEIi = 0x131000; // type:func InitBinoc__FP5BINOC5BLOTK = 0x1310F0; // type:func ResetBinoc__FP5BINOC = 0x131140; // type:func PostBinocLoad__FP5BINOC = 0x131198; // type:func DrawBinocCompass = 0x1316E8; // type:func DrawBinocZoom = 0x131F60; // type:func DrawBinocReticle = 0x132500; // type:func DrawBinocOutline = 0x133B58; // type:func FUN_00134aa0 = 0x134AA0; // type:func FUN_00134b48 = 0x134B48; // type:func DrawBinocFilter = 0x135228; // type:func FUN_00135550 = 0x135550; // type:func open_close_binoc = 0x1356C0; // type:func FUN_001357f0 = 0x1357F0; // type:func FUN_00135858 = 0x135858; // type:func FUN_001358d0 = 0x1358D0; // type:func junk_00135E20 = 0x135E20; // type:func FUN_00135E30 = 0x135E30; // type:func junk_00135E40 = 0x135E40; // type:func FUN_00135E48 = 0x135E48; // type:func junk_00135E70 = 0x135E70; // type:func SetBinocBfk = 0x135E78; // type:func FUN_00135f48 = 0x135F48; // type:func FUN_00136040 = 0x136040; // type:func FUN_00136238 = 0x136238; // type:func FUN_001363d0 = 0x1363D0; // type:func SetBinocAchzDraw = 0x136408; // type:func FDoneBinocAchz__FP5BINOC = 0x136530; // type:func SetBinocLookat__FP5BINOCP3ALO = 0x1365A0; // type:func SetBinocZoom__FP5BINOCf = 0x1365A8; // type:func FUN_001365f0 = 0x1365F0; // type:func FUN_00136648 = 0x136648; // type:func DrawBinoc = 0x1366A0; // type:func GetBinocReticleFocus__FP5BINOCPfT1 = 0x136EC8; // type:func FUN_00136ef8 = 0x136EF8; // type:func FUN_00136fa8 = 0x136FA8; // type:func binoc__static_initialization_and_destruction_0 = 0x136FE8; // type:func SetPos__8CTextBoxff = 0x137228; // type:func SetSize__8CTextBoxff = 0x137238; // type:func SetTextColor__8CTextBoxP4RGBA = 0x137248; // type:func SetHorizontalJust__8CTextBox2JH = 0x137260; // type:func SetVerticalJust__8CTextBox2JV = 0x137268; // type:func _GLOBAL_$I$InitBei__FP3BEIP3CLQffi = 0x137270; // type:func //////////////////////////////////////////////////////////////// // P2/bis.c //////////////////////////////////////////////////////////////// __18CBinaryInputStreamPvii = 0x137290; // type:func _$_18CBinaryInputStream = 0x1372E0; // type:func FOpenSector__18CBinaryInputStreamUiUi = 0x137328; // type:func OpenMemory__18CBinaryInputStreamiPv = 0x137398; // type:func FOpenFile__18CBinaryInputStreamP13CFileLocation = 0x1373B0; // type:func Close__18CBinaryInputStream = 0x1373D0; // type:func DecrementCdReadLimit__18CBinaryInputStreami = 0x137480; // type:func PumpCd__18CBinaryInputStream = 0x137490; // type:func PumpHost__18CBinaryInputStream = 0x1377C0; // type:func Pump__18CBinaryInputStream = 0x137820; // type:func Decompress__18CBinaryInputStream = 0x1378A0; // type:func Read__18CBinaryInputStreamiPv = 0x137A60; // type:func Align__18CBinaryInputStreami = 0x137B60; // type:func U8Read__18CBinaryInputStream = 0x137B90; // type:func U16Read__18CBinaryInputStream = 0x137BE0; // type:func U32Read__18CBinaryInputStream = 0x137C40; // type:func junk_00137CB8 = 0x137CB8; // type:func S8Read__18CBinaryInputStream = 0x137CC0; // type:func S16Read__18CBinaryInputStream = 0x137D10; // type:func S32Read__18CBinaryInputStream = 0x137D78; // type:func junk_00137DF0 = 0x137DF0; // type:func F32Read__18CBinaryInputStream = 0x137DF8; // type:func ReadVector__18CBinaryInputStreamP6VECTOR = 0x137E70; // type:func ReadVector4__18CBinaryInputStreamP7VECTOR4 = 0x137E90; // type:func ReadMatrix__18CBinaryInputStreamP7MATRIX3 = 0x137EB0; // type:func ReadMatrix4__18CBinaryInputStreamP7MATRIX4 = 0x137F08; // type:func ReadGeom__18CBinaryInputStreamP4GEOM = 0x137FB0; // type:func ReadBspc__18CBinaryInputStreamP4GEOMP4BSPC = 0x138278; // type:func ReadVbsp__18CBinaryInputStreamPiPP4VBSP = 0x138398; // type:func ReadStringSw__18CBinaryInputStreamPPc = 0x1384A0; // type:func junk_00138510 = 0x138510; // type:func Unknown1__18CBinaryInputStream = 0x138518; // type:func Unknown2__18CBinaryInputStreamPPv = 0x138550; // type:func //////////////////////////////////////////////////////////////// // P2/bbmark.c //////////////////////////////////////////////////////////////// UpdateSwPox__FP2SWP3OXAT1UcUc = 0x1385A0; // type:func PoxAddSw__FP2SWP3OXAT1 = 0x138738; // type:func PoxRemoveSw__FP2SWP3OXAT1 = 0x138788; // type:func PoxFromSoSo__FP2SOT0 = 0x1387C0; // type:func PxpFirstFromSoSo__FP2SOT0 = 0x1387F8; // type:func AddSwAaobrObject__FP2SWP2SO = 0x138828; // type:func RemoveSwAaobrObject__FP2SWP2SO = 0x1388A0; // type:func InvalidateSwAaox__FP2SW = 0x1389C8; // type:func UpdateSwAaox__FP2SW = 0x1389D0; // type:func InvalidateSwXpForObject__FP2SWP2SOi = 0x138BE0; // type:func RecalcSwXpAll__FP2SWi = 0x138C00; // type:func RecalcSwOxfFilterForObject__FP2SWP2SO = 0x138F28; // type:func //////////////////////////////////////////////////////////////// // P2/blend.c //////////////////////////////////////////////////////////////// VerifyAeaEquivalence__FiP2EAiT1 = 0x138FF0; // type:func EnsureAsegBlendDynamic__FP3ALOiiPviPiT5PP6ASEGBL = 0x139038; // type:func FillBlAmrsg__FiiPviiP3OID = 0x139600; // type:func CalculateBlendAmrsg__FiiPviiP4MRSGPf = 0x139740; // type:func ImrsgLookUp__FffiP4MRSGPf = 0x139970; // type:func junk_001399F0 = 0x1399F0; // type:func ReblendAsegbl__FP6ASEGBLiiPv = 0x1399F8; // type:func SetAsegblSlerp__FP6ASEGBLP3ALO = 0x139B38; // type:func //////////////////////////////////////////////////////////////// // P2/blip.c //////////////////////////////////////////////////////////////// BuildBlipAqwGifs__FiPP2QW = 0x139B70; // type:func StartupBlips__Fv = 0x139C38; // type:func PblipNew__FP5BLIPG = 0x139C70; // type:func RemoveBlip__FP4BLIP = 0x139D28; // type:func PblipgNew__FP2SW = 0x139D68; // type:func InitBlipg__FP5BLIPG = 0x139DE8; // type:func OnBlipgAdd__FP5BLIPG = 0x139E80; // type:func OnBlipgRemove__FP5BLIPG = 0x139EC8; // type:func SetBlipgShader__FP5BLIPG3OID = 0x139F80; // type:func PropagateBlipgShader__FP5BLIPG = 0x13A008; // type:func SetBlipgEmitb__FP5BLIPGP5EMITB = 0x13A128; // type:func UpdateBlipg__FP5BLIPGf = 0x13A3A0; // type:func SubscribeBlipgObject__FP5BLIPGP2LO = 0x13A418; // type:func CblipeProjectBlipTransformAccel__FP7MATRIX4G8VU_FLOATP5BLIPPP5BLIPVP5BLIPXi6BLIPOKP6VECTORT7 = 0x13A498; // type:func ProjectBlipgTransformAccel__FP5BLIPGf = 0x13A618; // type:func ProjectBlipgTransform__FP5BLIPGfi = 0x13A940; // type:func RenderBlipgSelf__FP5BLIPGP2CMP2RO = 0x13AD08; // type:func DrawBlipg__FP3RPL = 0x13AD80; // type:func PropagateBlipgShaders__Fi = 0x13B430; // type:func g_aqwBlipeGifsNormal = 0x261314; // size:0x4 g_aqwBlipeGifsClampedAdd = 0x261318; // size:0x4 //////////////////////////////////////////////////////////////// // P2/bomb.c //////////////////////////////////////////////////////////////// InitBomb__FP4BOMB = 0x13B4C0; // type:func LoadBombFromBrx__FP4BOMBP18CBinaryInputStream = 0x13B598; // type:func CloneBomb__FP4BOMBT0 = 0x13B5C8; // type:func PostBombLoad__FP4BOMB = 0x13B610; // type:func HandleBombMessage__FP4BOMB5MSGIDPv = 0x13B708; // type:func UpdateBomb__FP4BOMBf = 0x13B778; // type:func FUN_0013b828 = 0x13B828; // type:func FUN_0013b9d8 = 0x13B9D8; // type:func FUN_0013ba70 = 0x13BA70; // type:func FAbsorbBombWkr__FP4BOMBP3WKR = 0x13BBA0; // type:func FUN_0013bc80 = 0x13BC80; // type:func PrimeBomb__FP4BOMBf = 0x13BE00; // type:func ApplyBombThrow__FP4BOMBP2PO = 0x13BE18; // type:func DetonateBomb__FP4BOMB = 0x13BF68; // type:func PsfxEnsureBomb__FP4BOMB4ENSK = 0x13C950; // type:func //////////////////////////////////////////////////////////////// // P2/bq.c //////////////////////////////////////////////////////////////// Init__10CByteQueueiPv = 0x13C988; // type:func Reset__10CByteQueue = 0x13C9B0; // type:func CbFill__10CByteQueueiP11CQueueInput = 0x13C9D0; // type:func CbDrain__10CByteQueueiP12CQueueOutput = 0x13CAD8; // type:func CbFill__10CByteQueueiPUc = 0x13CC00; // type:func FreeDrain__10CByteQueuei = 0x13CC48; // type:func CbRead__17CQueueInputMemoryiPv = 0x13CC80; // type:func CbRead__15CQueueInputFileiPv = 0x13CCE8; // type:func junk_0013CCF0 = 0x13CCF0; // type:func //////////////////////////////////////////////////////////////// // P2/break.c //////////////////////////////////////////////////////////////// InitBrk__FP3BRK = 0x13CCF8; // type:func LoadBrkFromBrx__FP3BRKP18CBinaryInputStream = 0x13CD80; // type:func CloneBrk__FP3BRKT0 = 0x13CDE8; // type:func PostBrkLoad__FP3BRK = 0x13CE40; // type:func PostBrkLoadCallbackHookup__FP3BRK5MSGIDPv = 0x13CE80; // type:func UpdateBrk__FP3BRKf = 0x13D068; // type:func FAbsorbBrkWkr__FP3BRKP3WKR = 0x13D0B0; // type:func BreakBrk__FP3BRK = 0x13D278; // type:func SetBrkBroken__FP3BRKi = 0x13D820; // type:func SetBrkExclude__FP3BRK3OID = 0x13D868; // type:func SetBrkRemain__FP3BRK3OID = 0x13D8B0; // type:func SetBrkFixed__FP3BRK3OID = 0x13D900; // type:func SetBrkRemainFixed__FP3BRK3OID = 0x13D950; // type:func SetBrkOnPlayer__FP3BRKi = 0x13D9A0; // type:func GetBrkOnPlayer__FP3BRKPi = 0x13D9E0; // type:func SetBrkOnBomb__FP3BRKi = 0x13D9F0; // type:func GetBrkOnBomb__FP3BRKPi = 0x13DA30; // type:func AddBrkTouchObject__FP3BRK3OID = 0x13DA48; // type:func AddBrkTouchClass__FP3BRK3CID = 0x13DA80; // type:func FUN_0013DAB8 = 0x13DAB8; // type:func PsfxEnsureBrk__FP3BRK4ENSK = 0x13DAF0; // type:func FCheckBrkTouchObject__FP3BRKP2SO = 0x13DB28; // type:func UpdateBrkp__FP4BRKPf = 0x13DC38; // type:func HandleBrkpMessage__FP4BRKP5MSGIDPv = 0x13DCA8; // type:func FIgnoreBrkpIntersection__FP4BRKPP2SO = 0x13DD08; // type:func SetBrkpBrkps__FP4BRKP5BRKPS = 0x13DD78; // type:func InitBreak__FP5BREAK = 0x13DDB8; // type:func InitFragile__FP7FRAGILE = 0x13DDF0; // type:func AdjustFragileNewXp__FP7FRAGILEP2XPi = 0x13DE38; // type:func AdjustZapbreakNewXp__FP8ZAPBREAKP2XPi = 0x13DEE8; // type:func UpdateZapbreak__FP8ZAPBREAKf = 0x13df68; // type:func //////////////////////////////////////////////////////////////// // P2/bsp.c //////////////////////////////////////////////////////////////// ClsgClipEdgeToBsp__FP3BSPP6VECTORT1PiiP3LSG = 0x13DFD8; // type:func PruneBsp__FP3BSPP6VECTORfPP3BSP = 0x13E430; // type:func PbspPointInBspQuick__FP6VECTORP3BSP = 0x13E658; // type:func CloneBspc__FP4GEOMP4BSPCT0T1 = 0x13E6C8; // type:func //////////////////////////////////////////////////////////////// // P2/button.c //////////////////////////////////////////////////////////////// PostAshLoad__FP2SWP3ASHP3ALO = 0x13E7C0; // type:func FFoundAshAseg__FP3ASHP4ASEG = 0x13E868; // type:func FAddAshAseg__FP3ASHP4ASEG = 0x13E8D8; // type:func FAddAshOid__FP3ASH3OID = 0x13E8F8; // type:func InitBtn__FP3BTN = 0x13E918; // type:func LoadBtn__FP3BTNP3ALO = 0x13E950; // type:func PostBtnLoad__FP3BTN = 0x13EA38; // type:func RestoreBtnFromCheckpointCallback__FP3BTN5MSGIDPv = 0x13EAE0; // type:func SetBtnRsmg__FP3BTNi3OIDN22 = 0x13EB30; // type:func SetBtnButtons__FP3BTN7BUTTONS = 0x13EB68; // type:func FAddRsmg__FP4RSMGiPii3OIDN24 = 0x13EC00; // type:func TriggerRsmg__FP2SWiP4RSMGP2LOi = 0x13ECB0; // type:func RunBtnAsegs__FP3BTN4IASHii = 0x13ED90; // type:func TriggerBtn__FP3BTNii = 0x13EF50; // type:func UntriggerBtn__FP3BTNi = 0x13F070; // type:func InitButton__FP6BUTTON = 0x13F0E0; // type:func LoadButtonFromBrx__FP6BUTTONP18CBinaryInputStream = 0x13F110; // type:func InsertButtonPos__FP6BUTTONP3PNTP6VECTOR = 0x13F140; // type:func InsertButtonMat__FP6BUTTONP3XFMP7MATRIX3 = 0x13F1D8; // type:func PostButtonLoad__FP6BUTTON = 0x13F290; // type:func CloneButton__FP6BUTTONT0 = 0x13F6C0; // type:func SetButtonButtons__FP6BUTTON7BUTTONS = 0x13F6F8; // type:func FCheckButtonObject__FP6BUTTONP2SO = 0x13F718; // type:func IposFindButtonClosest__FP6BUTTONPf = 0x13F8A0; // type:func ImatFindButtonClosest__FP6BUTTONPf = 0x13F940; // type:func PresetButtonAccel__FP6BUTTONf = 0x13FA10; // type:func UpdateButtonInternalXps__FP6BUTTON = 0x13FAE8; // type:func UpdateButton__FP6BUTTONf = 0x13FD20; // type:func FAbsorbButtonWkr__FP6BUTTONP3WKR = 0x140028; // type:func InitVolbtn__FP6VOLBTN = 0x1400A8; // type:func LoadVolbtnFromBrx__FP6VOLBTNP18CBinaryInputStream = 0x140100; // type:func PostVolbtnLoad__FP6VOLBTN = 0x140140; // type:func CloneVolbtn__FP6VOLBTNT0 = 0x140200; // type:func SetVolbtnButtons__FP6VOLBTN7BUTTONS = 0x140238; // type:func UpdateVolbtn__FP6VOLBTNf = 0x140258; // type:func FGetVolbtnPushObjectsWithinList__FP6VOLBTNPv = 0x140550; // type:func AddBtnAseg__FP3BTNP3ALO3OID = 0x1405D0; // type:func AddButtonAseg__FP6BUTTON3OID = 0x1405F0; // type:func AddVolbtnAseg__FP6VOLBTN3OID = 0x140618; // type:func AddBtnOffAseg__FP3BTNP3ALO3OID = 0x140640; // type:func AddButtonOffAseg__FP6BUTTON3OID = 0x140660; // type:func AddVolbtnOffAseg__FP6VOLBTN3OID = 0x140688; // type:func AddButtonPushObject__FP6BUTTON3OID = 0x1406B0; // type:func AddButtonNoPushObject__FP6BUTTON3OID = 0x1406D0; // type:func AddButtonPushClass__FP6BUTTON3CID = 0x1406F0; // type:func AddButtonNoPushClass__FP6BUTTON3CID = 0x140710; // type:func AddVolbtnPushObject__FP6VOLBTN3OID = 0x140730; // type:func SetButtonRsmg__FP6BUTTONi3OIDN22 = 0x140750; // type:func SetVolbtnRsmg__FP6VOLBTNi3OIDN22 = 0x140770; // type:func //////////////////////////////////////////////////////////////// // P2/cat.c //////////////////////////////////////////////////////////////// StartupCatalog__Fv = 0x140790; // type:func FUN_001407A0__FPUi = 0x1407A0; // type:func //////////////////////////////////////////////////////////////// // P2/cd.c //////////////////////////////////////////////////////////////// CpchzTokenizePath__FPc = 0x1407A8; // type:func FValidCdMmode__Fv = 0x140968; // type:func SetCdMmode__Fv = 0x1409A8; // type:func StartupCd__Fv = 0x1409D8; // type:func UpdateCd__Fv = 0x1409E0; // type:func CdPath__FPcT0i = 0x140B60; // type:func ReadCd__FUiUiPv = 0x140C28; // type:func ReadCdDirect__FUiUiPv = 0x140CC8; // type:func FCdCompleted__Fi = 0x140D68; // type:func junk_00140D88 = 0x140D88; // type:func g_cds = 0x2613EC; // size:0x4 g_scecd = 0x2613F0; // size:0x4 s_retCdRead = 0x2613F4; // size:0x4 s_retCdError = 0x2613F8; // size:0x4 s_cdmode = 0x247AA0; // size:0x4 //////////////////////////////////////////////////////////////// // P2/chkpnt.c //////////////////////////////////////////////////////////////// ResetChkmgrCheckpoints__FP6CHKMGR = 0x140D90; // type:func SaveChkmgrCheckpoint__FP6CHKMGR3OIDT1 = 0x140E10; // type:func ReturnChkmgrToCheckpoint__FP6CHKMGR = 0x140ED0; // type:func RestoreChkmgrFromCheckpoint__FP6CHKMGR = 0x140F48; // type:func IchkAllocChkmgr__FP6CHKMGR = 0x140FF8; // type:func FGetChkmgrIchk__FP6CHKMGRi = 0x141008; // type:func SetChkmgrIchk__FP6CHKMGRi = 0x141040; // type:func ClearChkmgrIchk__FP6CHKMGRi = 0x1410A0; // type:func LoadVolFromBrx__FP3VOLP18CBinaryInputStream = 0x141108; // type:func FCheckVolPoint__FP3VOLP6VECTOR = 0x141170; // type:func InitChkpnt__FP6CHKPNT = 0x1411A8; // type:func LoadChkpntFromBrx__FP6CHKPNTP18CBinaryInputStream = 0x141210; // type:func BindChkpnt__FP6CHKPNT = 0x141338; // type:func PostChkpntLoad__FP6CHKPNT = 0x141438; // type:func CloneChkpnt__FP6CHKPNTT0 = 0x1415D0; // type:func UpdateChkpnt__FP6CHKPNTf = 0x141690; // type:func FUN_001417f0 = 0x1417F0; // type:func TriggerChkpnt__FP6CHKPNT = 0x141870; // type:func FUN_001419A0 = 0x1419A0; // type:func FUN_001419C0 = 0x1419C0; // type:func FUN_001419E0 = 0x1419E0; // type:func g_chkmgr = 0x261420; // size:0x430 //////////////////////////////////////////////////////////////// // P2/clip.c //////////////////////////////////////////////////////////////// PsoHitTestLineObjects__FiP6VECTORT1iPP2SOP3LSG = 0x1419E8; // type:func FUN_00141b48 = 0x141B48; // type:func ClsgClipEdgeToObject__FP2SOP6VECTORT1iP3LSG = 0x141C28; // type:func ClsgClipEdgeToObjectPruned__FP2SOP3BSPP6VECTORT2iP3LSG = 0x141C90; // type:func ClsgClipCylinderToObject__FP2SOP6VECTORT1fiP3LSG = 0x141D00; // type:func ClsgClipLineToSphere__FP6VECTORfT0T0iP3LSG = 0x141D88; // type:func ClsgClipEdgeToSphere__FP6VECTORfT0T0iP3LSG = 0x141F48; // type:func ClsgClipCylinderToSphere__FP6VECTORfT0T0fiP3LSG = 0x142170; // type:func ClsgClipEdgeToCylinder__FP6VECTORT0fT0T0iP3LSG = 0x142278; // type:func junk_00142990 = 0x142990; // type:func SgnCompareMaa__FP3MAAT0 = 0x142998; // type:func ClsgMergeAlsg__FiP3LSG = 0x1429F8; // type:func ClsgClipCylinderToBsp__FP4BSPCP4GEOMP6VECTORT2fiP3LSG = 0x142B78; // type:func junk_00142EC8 = 0x142EC8; // type:func //////////////////////////////////////////////////////////////// // P2/clock.c //////////////////////////////////////////////////////////////// SetClockRate__Ff = 0x142ED0; // type:func MarkClockTick__FP5CLOCK = 0x142F10; // type:func MarkClockTickRealOnly__FP5CLOCK = 0x143030; // type:func ResetClock__FP5CLOCKf = 0x1430B8; // type:func SetClockEnabled__FP5CLOCKi = 0x1430C0; // type:func StartupClock__Fv = 0x1430C8; // type:func TickNow__Fv = 0x1430F8; // type:func D_0024CD4C = 0x24cd4c; // size:0x4 g_rtClock = 0x261850; // size:0x4 g_rtClockPowerUp = 0x261854; // size:0x4 g_clock = 0x261858; // size:0x20 s_tickLastRaw = 0x261878; // size:0x4 cWrapAround = 0x27c000; // size:0x8 //////////////////////////////////////////////////////////////// // P2/cm.c //////////////////////////////////////////////////////////////// StartupCm__Fv = 0x143140; // type:func CalcCmAdjust__FP2CMP2SOP6CPDEFIP6VECTOR = 0x143148; // type:func SpringCm__FfffP2CMP6VECTORP6VECTORP6VECTOR = 0x143180; // type:func AdjustCmCpdefi__FP2CMP2SOfP6CPDEFI = 0x143208; // type:func ResetCmAdjust__FP2CMP2SOP6CPDEFI = 0x1433E0; // type:func GetCmCpdefi__FP2CMP2SOfP6CPDEFI = 0x143418; // type:func BuildCmFgfn__FP2CMfP4FGFN = 0x1434C8; // type:func RecalcCmFrustrum__FP2CM = 0x143560; // type:func InitCm__FP2CM = 0x143648; // type:func SetSwCameraFov__Ff = 0x1437C0; // type:func FUN_001437e8 = 0x1437E8; // type:func SetSwCameraFarClip__Ff = 0x143810; // type:func FUN_00143838 = 0x143838; // type:func FUN_00143860 = 0x143860; // type:func FUN_00143888 = 0x143888; // type:func SetSwCameraRgbaFog__FP2SWP4RGBA = 0x1438B0; // type:func FUN_001438d8 = 0x1438D8; // type:func SetCmPos__FP2CMP6VECTOR = 0x143900; // type:func SetCmMat__FP2CMP7MATRIX3 = 0x143920; // type:func SetCmFov__FP2CMf = 0x143940; // type:func SetCmNearClip__FP2CMf = 0x143968; // type:func SetCmFarClip__FP2CMf = 0x143988; // type:func SetCmSProgress__FP2CMf = 0x1439A8; // type:func FUN_001439c8__FP2CMf = 0x1439C8; // type:func FUN_001439e8__FP2CMf = 0x1439E8; // type:func SetCmRgbaFog__FP2CMP4RGBA = 0x143A08; // type:func SetCmMrdRatio__FP2CMf = 0x143A38; // type:func ResetCm = 0x143A60; // type:func ClearCmFadeObjects__FP2CM = 0x143AF0; // type:func AddCmFadeObject = 0x143AF8; // type:func RemoveCmFadeObject = 0x143B20; // type:func FUN_00143BA8 = 0x143BA8; // type:func UpdateCmFade = 0x143BE0; // type:func UpdateCmLast = 0x143E40; // type:func SetupCmRotateToCam = 0x144008; // type:func ConvertCmScreenToWorld = 0x144128; // type:func ConvertCmWorldToScreen = 0x1441C0; // type:func SetupCm__FP2CM = 0x144270; // type:func CombineEyeLookAtProj = 0x1442C8; // type:func BuildFrustrum = 0x1443C8; // type:func UpdateCmMat4 = 0x144540; // type:func DrawCm__FP2CM = 0x144848; // type:func SetCmPosMat__FP2CMP6VECTORP7MATRIX3 = 0x1448C8; // type:func SetCmLookAt = 0x144938; // type:func ConvertWorldToCylindVelocity = 0x144978; // type:func ConvertCylindToWorldVelocity = 0x144AA0; // type:func ResetCmLookAtSmooth = 0x144B70; // type:func SetCmLookAtSmooth = 0x144BE8; // type:func AdjustCmJoy__FP2CMP3JOY5JOYIDPf = 0x144FF8; // type:func junk_00145080 = 0x145080; // type:func SetCmPolicy__FP2CM3CPPP5CPLCYP2SOPv = 0x145088; // type:func RevokeCmPolicy__FP2CMi3CPPP5CPLCYP2SOPv = 0x1451F0; // type:func FInsideCmMrd = 0x1453B0; // type:func DecomposeCylind = 0x145438; // type:func DecomposeSphere = 0x1454E0; // type:func SetCmCut__FP2CMPf = 0x1455C0; // type:func SetResetFlag__FP2CM = 0x1455E0; // type:func ClearCmCut__FP2CM = 0x1455F0; // type:func AdaptCm = 0x145610; // type:func SetCm = 0x145718; // type:func PsoEnemyStepguard = 0x145810; // type:func FUN_00145950 = 0x145950; // type:func FUN_00145b68 = 0x145B68; // type:func FUN_00145DD8 = 0x145DD8; // type:func FUN_00145de8 = 0x145DE8; // type:func FUN_00145e68 = 0x145E68; // type:func PushLookkCm__FP2CM5LOOKK = 0x145FB8; // type:func LookkPopCm__FP2CM = 0x145FD8; // type:func LookkCurCm__FP2CM = 0x145FF8; // type:func SetCmSniperFocus__FP2CMP3PNTff = 0x146018; // type:func FUN_00146028__FP2CM = 0x146028; // type:func FUN_00146038 = 0x146038; // type:func cm__static_initialization_and_destruction_0__Fii = 0x1460B8; // type:func _GLOBAL_$I$StartupCm__Fv = 0x1460E0; // type:func g_posEyeDefault = 0x261880; // size:0x10 g_posCenterDefault = 0x261890; // size:0x10 g_sNearFog = 0x2618a0; // size:0x4 g_sFarFog = 0x2618a4; // size:0x4 g_uFogMax = 0x2618a8; // size:0x4 g_rgbaFog = 0x2618b0; // size:0x4 // ... DT_CmJoltMax = 0x2618c8; // size:0x4 SW_CmJolt = 0x2618cc; // size:0x4 s_clqUToUJolt = 0x2618d0; // size:0x10 s_dposJolt = 0x2618e0; // size:0x10 s_rotJolt = 0x2618f0; // size:0x10 s_vecRange = 0x261900; // size:0x10 s_vecOffset = 0x261910; // size:0x10 R_SetCmSpring = 0x261920; // size:0x4 R_SetCmDamping = 0x261924; // size:0x4 D_00261928 = 0x261928; // size:0x24 D_0026194C = 0x26194c; // size:0x4 D_00261950 = 0x261950; // size:0x4 s_smpSquishEye = 0x261958; // size:0xc D_00261970 = 0x261970; // size:0x4 D_00261974 = 0x261974; // size:0x4 D_00261978 = 0x261978; // size:0x4 D_0026197C = 0x26197c; // size:0x4 D_00261980 = 0x261980; // size:0x4 D_00261984 = 0x261984; // size:0x4 D_00261988 = 0x261988; // size:0x4 D_0026198C = 0x26198c; // size:0x4 g_pcm = 0x261990; // size:0x4 //////////////////////////////////////////////////////////////// // P2/cnvo.c //////////////////////////////////////////////////////////////// InitCnvo__FP4CNVO = 0x146100; // type:func LoadCnvoFromBrx__FP4CNVOP18CBinaryInputStream = 0x146130; // type:func PostCnvoLoad__FP4CNVO = 0x146178; // type:func AdjustCnvoXpVelocity__FP4CNVOP2XPi = 0x1461A8; // type:func SetCnvoBeltSpeed__FP4CNVOf = 0x146240; // type:func MatchCnvoScrollerToBeltSpeed__FP4CNVO = 0x146298; // type:func //////////////////////////////////////////////////////////////// // P2/coin.c //////////////////////////////////////////////////////////////// InitDprize__FP6DPRIZE = 0x146340; // type:func LoadDprizeFromBrx__FP6DPRIZEP18CBinaryInputStream = 0x1463C0; // type:func CloneDprize__FP6DPRIZET0 = 0x146418; // type:func PostDprizeLoad__FP6DPRIZE = 0x146470; // type:func ProjectDprizeTransform__FP6DPRIZEfi = 0x146518; // type:func FFilterDprizeObjects__FP6DPRIZEP2SO = 0x146D10; // type:func CheckDprizeBounce__FP6DPRIZE = 0x146DB0; // type:func CheckDprizeCollect__FP6DPRIZE = 0x1471B0; // type:func FAbsorbDprizeWkr__FP6DPRIZEP3WKR = 0x1473E0; // type:func UpdateDprize__FP6DPRIZEf = 0x147428; // type:func RenderDprizeAll__FP6DPRIZEP2CMP2RO = 0x1478F0; // type:func SetDprizeDprizes__FP6DPRIZE7DPRIZES = 0x147AB0; // type:func InitCoin__FP4COIN = 0x147E40; // type:func FUN_00147ed0 = 0x147ED0; // type:func FUN_00147ef8 = 0x147EF8; // type:func UpdateCoin__FP4COINf = 0x147FB0; // type:func CreateSwCharm__FP2SW = 0x148038; // type:func AddLife__FPv = 0x148178; // type:func OnCoinSmack__FP4COIN = 0x1481A0; // type:func SetCoinDprizes__FP4COIN7DPRIZES = 0x148298; // type:func InitCharm__FP5CHARM = 0x148400; // type:func SetCharmDprizes__FP5CHARM7DPRIZES = 0x148470; // type:func InitKey__FP3KEY = 0x148510; // type:func SetKeyDprizes__FP3KEY7DPRIZES = 0x148598; // type:func FUN_00148698 = 0x148698; // type:func FUN_00148718 = 0x148718; // type:func FUN_00148748 = 0x148748; // type:func FUN_00148770 = 0x148770; // type:func FUN_00148828 = 0x148828; // type:func FUN_00148888 = 0x148888; // type:func FUN_00148910__FPfT0 = 0x148910; // type:func FUN_00148938 = 0x148938; // type:func CpdprizeAttractSwDprizes__FP2SW3CIDP6VECTORiPP6DPRIZE = 0x148AC0; // type:func RemoveSwExtraneousCharms__FP2SW = 0x148CE0; // type:func FUN_00148d90 = 0x148D90; // type:func FUN_00148e18 = 0x148E18; // type:func FUN_00148e40 = 0x148E40; // type:func FUN_00148ef8 = 0x148EF8; // type:func increment_and_show_life_count = 0x148F80; // type:func CollectLifetkn__FP7LIFETKN = 0x148FF0; // type:func FUN_00149168 = 0x149168; // type:func break_bottle = 0x149190; // type:func s_asnipDprize = 0x2619A0; // size:0x3c //////////////////////////////////////////////////////////////// // P2/cplcy.c //////////////////////////////////////////////////////////////// InitCplcy = 0x149398; // type:func FActiveCplcy = 0x1493A0; // type:func SetCpmanCpmt = 0x1493B8; // type:func FUN_001493c0 = 0x1493C0; // type:func PosCplookAnchor = 0x1493C8; // type:func FUN_00149458 = 0x149458; // type:func plays_binoc_sfx = 0x149508; // type:func PushCplookLookk__FP6CPLOOK5LOOKK = 0x1495E8; // type:func LookkPopCplook__FP6CPLOOK = 0x149610; // type:func LookkCurCplook__FP6CPLOOK = 0x149638; // type:func InitCplook = 0x149660; // type:func FUN_001496c0 = 0x1496C0; // type:func UpdateCplook = 0x149760; // type:func FUN_0014a7b8 = 0x14A7B8; // type:func InitCpalign = 0x14A888; // type:func FUN_0014a8d0 = 0x14A8D0; // type:func UpdateCpalign = 0x14A8F8; // type:func FUN_0014aa90 = 0x14AA90; // type:func FUN_0014aa98 = 0x14AA98; // type:func UpdateCpaseg = 0x14AAA0; // type:func //////////////////////////////////////////////////////////////// // P2/credit.c //////////////////////////////////////////////////////////////// InitCredit__FP6CREDIT5BLOTK = 0x14ABD0; // type:func PostCreditLoad__FP6CREDIT = 0x14AC48; // type:func SetCreditClock__FP6CREDITPf = 0x14AD00; // type:func UpdateCredit__FP6CREDIT = 0x14AD70; // type:func DrawCredit__FP6CREDIT = 0x14ADE0; // type:func PlaceCredit__FP6CREDITffi = 0x14AEA0; // type:func VacateCredit__FP6CREDIT = 0x14AF10; // type:func SetCreditLine__FP6CREDITiPcf = 0x14AF38; // type:func //////////////////////////////////////////////////////////////// // P2/crout.c //////////////////////////////////////////////////////////////// CroutDecomp__FiPfT1 = 0x14B0C0; // type:func CroutSolve__FiPfN21 = 0x14B3E0; // type:func //////////////////////////////////////////////////////////////// // P2/crusher.c // TODO: The rest of the functions aren't in the prototype. // Figure out what they do and mangle the names. //////////////////////////////////////////////////////////////// OnCrfodAdd__FP5CRFOD = 0x14B550; // type:func OnCrfodRemove__FP5CRFOD = 0x14B588; // type:func CloneCrfod__FP5CRFODT0 = 0x14B5C0; // type:func InitCrfodb__FP6CRFODB = 0x14B608; // type:func PostCrfodbLoad__FP6CRFODB = 0x14B640; // type:func CalcHeadingVector__FfP6VECTOR = 0x14B678; // type:func UpdateCrfodbGoal__FP6CRFODBi = 0x14B6A8; // type:func FDetectCrfodb__FP6CRFODB = 0x14BB08; // type:func FAbsorbCrfodbWkr__FP6CRFODBP3WKR = 0x14BCE8; // type:func FUN_0014bd38 = 0x14BD38; // type:func SgsNextCrfodkAI__FP6CRFODK = 0x14BDC8; // type:func FDetectCrfodk__FP6CRFODK = 0x14BEA8; // type:func FAbsorbCrfodkWkr__FP6CRFODKP3WKR = 0x14BEF8; // type:func FUN_0014bf88 = 0x14BF88; // type:func InitCrbrain__FP7CRBRAIN = 0x14C018; // type:func post_load_crbrain = 0x14C138; // type:func FUN_0014c2f0 = 0x14C2F0; // type:func FUN_0014c5e8 = 0x14C5E8; // type:func FUN_0014c668 = 0x14C668; // type:func update_crbrain = 0x14C6E0; // type:func FUN_0014c788 = 0x14C788; // type:func FUN_0014c820 = 0x14C820; // type:func FUN_0014c838 = 0x14C838; // type:func FUN_0014c858 = 0x14C858; // type:func FUN_0014cba8 = 0x14CBA8; // type:func FUN_0014cd70 = 0x14CD70; // type:func FUN_0014cdc8 = 0x14CDC8; // type:func handle_crbrain_message = 0x14CF30; // type:func DAT_0027c008 = 0x27C008; // size:0x4 //////////////////////////////////////////////////////////////// // P2/crv.c //////////////////////////////////////////////////////////////// SMeasureApos__FiP6VECTORPf = 0x14D0A8; // type:func GWrapApos__FfiPfi = 0x14D138; // type:func IposFindAposG__FfiPfiT2T2 = 0x14D1A0; // type:func EvaluateAposG__FfiP6VECTORPfiT2T2 = 0x14D280; // type:func FindAposClosestPointAll__FP6VECTORP6CONSTRiT0N20PiPf = 0x14D3A8; // type:func FindAposClosestPointSegment__FP6VECTORP6CONSTRiT0iiT0T0PiPf = 0x14D680; // type:func ConvertApos__FiP6VECTORP7MATRIX4T2 = 0x14D938; // type:func PcrvNew__F4CRVK = 0x14D9A8; // type:func SFromCrvU__FP3CRVf = 0x14DA18; // type:func UFromCrvS__FP3CRVf = 0x14DA28; // type:func IcvFindCrvU__FP3CRVfPfT2 = 0x14DA38; // type:func IcvFindCrvS__FP3CRVfPfT2 = 0x14DA68; // type:func GMeasureCrvU__FP5CRVMCf = 0x14DA98; // type:func UMaxCrv__FP3CRV = 0x14DB40; // type:func SMaxCrv__FP3CRV = 0x14DB58; // type:func junk_0014DB70 = 0x14DB70; // type:func SMeasureCrvSegmentU__FP5CRVMSf = 0x14DB78; // type:func FindCrvClosestPointOnLineSegmentFromU__FP3CRVP6VECTORT1fT1T1PfT6 = 0x14DBD0; // type:func junk_0014DCF8 = 0x14DCF8; // type:func DuGetCrvSearchIncrement__FP3CRV = 0x14DD00; // type:func LoadCrvlFromBrx__FP4CRVLP18CBinaryInputStream = 0x14DD28; // type:func EvaluateCrvlFromU__FP4CRVLfP6VECTORT2 = 0x14DE08; // type:func EvaluateCrvlFromS__FP4CRVLfP6VECTORT2 = 0x14DE40; // type:func RenderCrvlSegment__FP4CRVLiP7MATRIX4P2CMG4RGBAi = 0x14DE78; // type:func ConvertCrvl__FP4CRVLP7MATRIX4T1 = 0x14DF68; // type:func SFromCrvlU__FP4CRVLf = 0x14DF98; // type:func UFromCrvlS__FP4CRVLf = 0x14E000; // type:func MeasureCrvl__FP4CRVL = 0x14E068; // type:func FindCrvlClosestPointAll__FP4CRVLP6VECTORP6CONSTRT1T1PfT5 = 0x14E090; // type:func FindCrvlClosestPointFromU__FP4CRVLP6VECTORfP6CONSTRT1T1PfT6 = 0x14E170; // type:func FindCrvlClosestPointFromS__FP4CRVLP6VECTORfP6CONSTRT1T1PfT6 = 0x14E2A0; // type:func LoadCrvcFromBrx__FP4CRVCP18CBinaryInputStream = 0x14E3D0; // type:func InvalidateCrvcCache__FP4CRVC = 0x14E500; // type:func FillCrvcCache__FP4CRVCi = 0x14E510; // type:func EvaluateCrvcFromU__FP4CRVCfP6VECTORT2 = 0x14E5B8; // type:func EvaluateCrvcFromS__FP4CRVCfP6VECTORT2 = 0x14E6A8; // type:func RenderCrvcSegment__FP4CRVCiP7MATRIX4P2CMG4RGBAi = 0x14E710; // type:func ConvertCrvc__FP4CRVCP7MATRIX4T1 = 0x14E828; // type:func SFromCrvcU__FP4CRVCf = 0x14E910; // type:func UFromCrvcS__FP4CRVCf = 0x14E990; // type:func MeasureCrvc__FP4CRVC = 0x14EA48; // type:func FindCrvcClosestPointAll__FP4CRVCP6VECTORP6CONSTRT1T1PfT5 = 0x14EB10; // type:func FindCrvcClosestPointFromU__FP4CRVCP6VECTORfP6CONSTRT1T1PfT6 = 0x14EC70; // type:func FindCrvcClosestPointFromS__FP4CRVCP6VECTORfP6CONSTRT1T1PfT6 = 0x14ED98; // type:func //////////////////////////////////////////////////////////////// // P2/dart.c //////////////////////////////////////////////////////////////// InitDart__FP4DART = 0x14EE40; // type:func OnDartAdd__FP4DART = 0x14EE70; // type:func RemoveDart__FP4DART = 0x14EF00; // type:func CloneDart__FP4DARTT0 = 0x14EF40; // type:func LoadDartFromBrx__FP4DARTP18CBinaryInputStream = 0x14EF88; // type:func HandleDartMessage__FP4DART5MSGIDPv = 0x14EFB8; // type:func PostDartLoad__FP4DART = 0x14F020; // type:func UpdateDart__FP4DARTf = 0x14F058; // type:func SetDartDarts__FP4DART5DARTS = 0x14F110; // type:func ApplyDartThrow__FP4DARTP2PO = 0x14F168; // type:func UpdateDartAirborne__FP4DARTf = 0x14F270; // type:func s_asnipDart = 0x261CC8; //////////////////////////////////////////////////////////////// // P2/dartgun.c //////////////////////////////////////////////////////////////// InitDartgun__FP7DARTGUN = 0x14F740; // type:func HandleDartgunMessage__FP7DARTGUN5MSGIDPv = 0x14F770; // type:func BindDartgun__FP7DARTGUN = 0x14F850; // type:func FUN_0014f900 = 0x14F900; // type:func PostDartgunLoad__FP7DARTGUN = 0x14F920; // type:func UpdateDartgun__FP7DARTGUNf = 0x14FA88; // type:func FIgnoreDartgunIntersection__FP7DARTGUNP2SO = 0x14FBE0; // type:func BreakDartgun__FP7DARTGUN = 0x14FC38; // type:func SetDartgunGoalState__FP7DARTGUN3OID = 0x14FCE8; // type:func TrackDartgun__FP7DARTGUNP3OID = 0x14FDA8; // type:func FPrepareDartgunToFire__FP7DARTGUN = 0x14FEC0; // type:func FireDartgun__FP7DARTGUN = 0x150008; // type:func AgeDartgunStuckDart__FP7DARTGUN = 0x150298; // type:func PratGetDartgunRatTarget__FP7DARTGUN = 0x150338; // type:func AddDartgunRatTarget__FP7DARTGUN3OID = 0x1503E0; // type:func StartDartgunTargetAreaChange__FP7DARTGUN = 0x150408; // type:func AddDartgunTargetAreaTarget__FP7DARTGUNP3ALO = 0x150418; // type:func //////////////////////////////////////////////////////////////// // P2/dialog.c //////////////////////////////////////////////////////////////// InitDialog__FP6DIALOG = 0x1504E0; // type:func LoadDialogFromBrx__FP6DIALOGP18CBinaryInputStream = 0x150528; // type:func LoadDialogEventsFromBrx__FP6DIALOGP18CBinaryInputStreamPiPP2DE = 0x150570; // type:func PostDialogLoad__FP6DIALOG = 0x1506F0; // type:func SetDialogInstruct__FP6DIALOG = 0x150750; // type:func SetDialogConfront__FP6DIALOG = 0x150760; // type:func GetDialogPlayed__FP6DIALOGPi = 0x150770; // type:func SetDialogPlayed__FP6DIALOGi = 0x150780; // type:func SetDialogDialogs__FP6DIALOG7DIALOGS = 0x150790; // type:func UpdateDialog__FP6DIALOGf = 0x150AE8; // type:func HandleDialogEvent__FP6DIALOGP2DE = 0x150DC0; // type:func HandleDialogMessage__FP6DIALOG5MSGIDPv = 0x1512A8; // type:func FPauseDialog__FP6DIALOG = 0x151300; // type:func FUN_001516c0 = 0x1516C0; // type:func HandleDialogEvents__FP6DIALOG = 0x1517C0; // type:func FUN_00151860__FP6DIALOGP4BLOT = 0x151860; // type:func TriggerDialog__FP6DIALOG = 0x1518B8; // type:func UntriggerDialog__FP6DIALOG = 0x1519A8; // type:func // TODO: Is this in the right place? g_pdialogPlaying = 0x27051C; //////////////////////////////////////////////////////////////// // P2/difficulty.c //////////////////////////////////////////////////////////////// PdifficultyEnsureSw = 0x1519E0; // type:func FUN_00151A58 = 0x151A58; // type:func OnDifficultyGameLoad__FP10DIFFICULTY = 0x151A68; // type:func OnDifficultyWorldPreLoad = 0x151A88; // type:func OnDifficultyWorldPostLoad = 0x151D28; // type:func OnDifficultyInitialTeleport__FP10DIFFICULTY = 0x151E18; // type:func OnDifficultyPlayerDeath = 0x151E20; // type:func OnDifficultyTriggerCheckpoint__FP10DIFFICULTYP6CHKPNT = 0x151ED8; // type:func OnDifficultyCollectKey__FP10DIFFICULTY = 0x151FC8; // type:func OnDifficultyBreak = 0x152010; // type:func ChangeSuck__FfP10DIFFICULTY = 0x152410; // type:func g_difficultyMedium = 0x261d70; // size:0x5c g_difficultyHard = 0x261e30; // size:0x5c g_difficultyEasy = 0x261e90; // size:0x5c g_difficulty = 0x261ef0; // size:0x20 //////////////////////////////////////////////////////////////// // P2/dl.c //////////////////////////////////////////////////////////////// InitDl__FP2DLi = 0x152438; // type:func ClearDl__FP2DL = 0x152440; // type:func ClearDle__FP3DLE = 0x152450; // type:func PdleFromDlEntry__FP2DLPv = 0x152460; // type:func AppendDlEntry__FP2DLPv = 0x152470; // type:func PrependDlEntry__FP2DLPv = 0x1524D8; // type:func InsertDlEntryBefore__FP2DLPvT1 = 0x152540; // type:func junk_001525F8 = 0x1525F8; // type:func RemoveDlEntry__FP2DLPv = 0x152600; // type:func FFindDlEntry__FP2DLPv = 0x1526D0; // type:func FIsDlEmpty__FP2DL = 0x152720; // type:func MergeDl__FP2DLT0 = 0x152730; // type:func CPvDl__FP2DL = 0x1527D8; // type:func s_pdliFirst = 0x27B314; // size:0x4 //////////////////////////////////////////////////////////////// // P2/dmas.c //////////////////////////////////////////////////////////////// StartupDma__Fv = 0x152810; // type:func __4DMAS = 0x152888; // type:func Clear__4DMAS = 0x1528C8; // type:func Reset__4DMAS = 0x1528E0; // type:func AllocGlobal__4DMASi = 0x1528F0; // type:func AllocSw__4DMASii = 0x152938; // type:func AllocStack__4DMASi = 0x152980; // type:func AllocStatic__4DMASiP2QW = 0x1529C8; // type:func Detach__4DMASPiPP2QW = 0x1529E0; // type:func DetachCopySw__4DMASPiPP2QWT2i = 0x152A50; // type:func Send__4DMASP10sceDmaChan = 0x152AE0; // type:func junk_00152B30 = 0x152B30; // type:func AddDmaCnt__4DMAS = 0x152B38; // type:func AddDmaRefs__4DMASiP2QW = 0x152B80; // type:func AddDmaCall__4DMASP2QW = 0x152C18; // type:func AddDmaRet__4DMAS = 0x152CA0; // type:func AddDmaBulk__4DMASiP2QW = 0x152CE0; // type:func AddDmaEnd__4DMAS = 0x152D30; // type:func EndDmaCnt__4DMAS = 0x152D70; // type:func EndPrim__4DMASi = 0x152E18; // type:func junk_00152E20 = 0x152E20; // type:func _vt$4DMAS = 0x24A0E0; // size:0x10 g_pdcVif0 = 0x261f14; // size:0x4 g_pdcVif1 = 0x261f18; // size:0x4 g_pdcGif = 0x261f1c; // size:0x4 g_pdcFromSpr = 0x261f20; // size:0x4 g_pdcToSpr = 0x261f24; // size:0x4 //////////////////////////////////////////////////////////////// // P2/dysh.c //////////////////////////////////////////////////////////////// InitDysh__FP4DYSH = 0x152E28; // type:func SetDyshShadow__FP4DYSHP6SHADOW = 0x152E48; // type:func RenderDyshSelf__FP4DYSHP2CMP2RO = 0x153328; // type:func DrawDysh__FP3RPL = 0x1533A8; // type:func //////////////////////////////////////////////////////////////// // P2/dzg.c //////////////////////////////////////////////////////////////// InitDzg__FP3DZGi = 0x153528; // type:func ClearDzgSolution__FP3DZG = 0x153608; // type:func AppendDzgDz__FP3DZGP2DZ = 0x1536C8; // type:func FillDzgDz__FP3DZGiP2DZiPP2XPPiPPP2SO = 0x153780; // type:func EnforceDzgDz__FP3DZGP2DZ = 0x153A50; // type:func SolveDzg__FP3DZGiiPP2XPPiPPP2SO = 0x153EC0; // type:func SolveDzgFric__FP3DZGiiPP2XPPiPPP2SOf = 0x154088; // type:func ApplyDzg__FP3DZGiPiPPP2SOff = 0x154370; // type:func SolveInequalities__FiPfN21 = 0x154880; // type:func //////////////////////////////////////////////////////////////// // P2/emitter.c //////////////////////////////////////////////////////////////// InitEmitb__FP5EMITB = 0x1549C8; // type:func InitEmitter__FP7EMITTER = 0x154C10; // type:func LoadEmitmeshFromBrx__FP8EMITMESHP18CBinaryInputStream = 0x154C80; // type:func LoadEmitblipColorsFromBrx__FP8EMITBLIPiP2LOP18CBinaryInputStream = 0x154EE0; // type:func LoadEmitterFromBrx__FP7EMITTERP18CBinaryInputStream = 0x154F98; // type:func CloneEmitter__FP7EMITTERT0 = 0x155080; // type:func BindEmitterCallback__FP7EMITTER5MSGIDPv = 0x1550B8; // type:func BindEmitter__FP7EMITTER = 0x1550E8; // type:func PostEmitterLoad__FP7EMITTER = 0x155270; // type:func HandleEmitterMessage__FP7EMITTER5MSGIDPv = 0x155678; // type:func PemitbCopyOnWrite__FP5EMITB = 0x1556E8; // type:func PemitbEnsureEmitter__FP7EMITTER4ENSK = 0x155778; // type:func PemitterEnsureEmitter__FP7EMITTER4ENSK = 0x1557B8; // type:func AddEmitterSkeleton__FP7EMITTER3OIDT1ffff = 0x1557D0; // type:func ModifyEmitterParticles__FP7EMITTER = 0x155868; // type:func UpdateEmitter__FP7EMITTERf = 0x155AB0; // type:func FUN_00155f28 = 0x155F28; // type:func PauseEmitter__FP7EMITTERf = 0x155F78; // type:func PauseEmitterIndefinite__FP7EMITTER = 0x155F90; // type:func UnpauseEmitter__FP7EMITTER = 0x155FA0; // type:func FPausedEmitter__FP7EMITTER = 0x155FB0; // type:func SetEmitterEnabled__FP7EMITTERi = 0x156000; // type:func GetEmitterEnabled__FP7EMITTERPi = 0x156030; // type:func GetEmitterPaused__FP7EMITTERPi = 0x156060; // type:func OnEmitterValuesChanged__FP7EMITTER = 0x156088; // type:func SetEmitterParticleCount__FP7EMITTERi = 0x156108; // type:func SetEmitterAutoPause__FP7EMITTERi = 0x156178; // type:func SetEmitbRipt__FP5EMITB4RIPT = 0x156188; // type:func SetEmitterRipt__FP7EMITTER4RIPT = 0x156218; // type:func SetExploRipt__FP5EXPLO4RIPT = 0x156250; // type:func WakeSoWater__FP2SOP5WATERfP6VECTORT3ff = 0x156288; // type:func StandardSmokeCloud__FP6VECTORf = 0x1566C8; // type:func ChooseEmitoPos__FP5EMITOiiP6VECTORT3 = 0x156718; // type:func ConvertEmitoPosVec__FP5EMITOP6VECTORT1 = 0x156F08; // type:func CalculateEmitvx__FiP2LMiP6EMITVX = 0x156FC8; // type:func ChooseEmitVelocity__FP6EMITVXffP2LMP6VECTORiT4 = 0x157098; // type:func ChooseEmitvVelocityAge__FP5EMITVP6EMITVXP5EMITOiP6VECTORN24PfT7 = 0x157248; // type:func EmitRips__FP5EMITBP5EMITGiP6VECTORT3PfT5 = 0x157320; // type:func EmitBlips__FP5EMITBP5EMITGiP6VECTORT3PfT5T3T3 = 0x1575D8; // type:func OriginateParticles__FiP5EMITBP7EMITGEN = 0x1579B0; // type:func OriginateSplineSinkParticles__FiP5EMITBR7EMITGENT2 = 0x157B88; // type:func EmitParticles__FiP5EMITBP5EMITG = 0x157E00; // type:func EmitRipsSphere__FP6VECTORT0iP7EMITRIPP5EMITVPP4RIPGP2LO = 0x157EF8; // type:func StockSplashBig__FP6VECTORfP2SO = 0x157FF8; // type:func StockSplashSmall__FP6VECTORfP2SO = 0x158108; // type:func AddEmitoSkeleton__FP5EMITO3OIDT1ffffP2LO = 0x158198; // type:func BindEmitb__FP5EMITBP2LO = 0x158288; // type:func SetEmitdvEmitb__FP6EMITDVP5EMITB = 0x1583E8; // type:func CalculateEmitdvMatrix__FP6EMITDVfP7MATRIX4 = 0x158480; // type:func PostExplLoad__FP4EXPL = 0x1585F8; // type:func CalculateExplTransform__FP4EXPLP6VECTORP7MATRIX3 = 0x158630; // type:func ExplodeExpl__FP4EXPL = 0x158730; // type:func ExplodeExplParams__FP4EXPLUiP3ALOP6VECTORT3ff = 0x158778; // type:func ExplodeExplExplso__FP4EXPLP6EXPLSO = 0x1587C0; // type:func LoadExplgFromBrx__FP5EXPLGP18CBinaryInputStream = 0x1587C8; // type:func CloneExplg__FP5EXPLGT0 = 0x158980; // type:func BindExplg__FP5EXPLG = 0x158A10; // type:func ExplodeExplgExplso__FP5EXPLGP6EXPLSO = 0x158A80; // type:func InitExplo__FP5EXPLO = 0x158B00; // type:func LoadExploFromBrx__FP5EXPLOP18CBinaryInputStream = 0x158B30; // type:func CloneExplo__FP5EXPLOT0 = 0x158C28; // type:func BindExplo__FP5EXPLO = 0x158C60; // type:func ExplodeExploExplso__FP5EXPLOP6EXPLSO = 0x158D38; // type:func AddExploSkeleton__FP5EXPLO3OIDT1ffff = 0x158D40; // type:func PemitbEnsureExplo__FP5EXPLO4ENSK = 0x158DD8; // type:func InitExpls__FP5EXPLS = 0x158E10; // type:func BindExpls__FP5EXPLS = 0x158E48; // type:func HandleExplsMessage__FP5EXPLS5MSGIDPv = 0x158F10; // type:func ExplodeExplsExplso__FP5EXPLSP6EXPLSO = 0x158F80; // type:func PsfxEnsureExpls__FP5EXPLS4ENSK = 0x159068; // type:func FireExplsExplso__FP5EXPLSP6EXPLSO = 0x1590A0; // type:func InferExpl__FPP4EXPLP3ALO = 0x159478; // type:func FireSwTimedExplodeStyles__FP2SW = 0x159588; // type:func DAT_0024a124 = 0x24A124; // size:0x4 //////////////////////////////////////////////////////////////// // P2/eyes.c //////////////////////////////////////////////////////////////// InitEyes__FP4EYESP4SAAF = 0x159680; // type:func PostEyesLoad__FP4EYES = 0x1596E0; // type:func SetEyesEyess__FP4EYES5EYESS = 0x159770; // type:func UpdateEyes__FP4EYESf = 0x159890; // type:func SetEyesClosed__FP4EYESf = 0x159A00; // type:func PsaiFromEyesShd__FP4EYESP3SHD = 0x159A80; // type:func //////////////////////////////////////////////////////////////// // P2/fader.c //////////////////////////////////////////////////////////////// UpdateFader__FP5FADERf = 0x159AD0; // type:func PfaderNew__FP3ALO = 0x159BB0; // type:func RemoveFader__FP5FADER = 0x159C28; // type:func //////////////////////////////////////////////////////////////// // P2/UNKNOWN1 //////////////////////////////////////////////////////////////// FUN_00159ca0 = 0x159CA0; // type:func FUN_00159d00 = 0x159D00; // type:func FUN_00159ed0 = 0x159ED0; // type:func //////////////////////////////////////////////////////////////// // P2/find.c //////////////////////////////////////////////////////////////// PdlFromSwOid__FP2SW3OID = 0x159F20; // type:func MatchSwObject__FP2LOiiiT0iPiPP2LOT6 = 0x159F48; // type:func CploFindSwObjects__FP2SWi3OIDP2LOiPP2LO = 0x15A198; // type:func PloFindSwObject__FP2SWi3OIDP2LO = 0x15A418; // type:func PloFindSwNearest__FP2SW3OIDP2LO = 0x15A448; // type:func PloFindSwChild__FP2SW3OIDP3ALO = 0x15A480; // type:func FIsCidDerivedFrom__F3CIDT0 = 0x15A4B8; // type:func CploFindSwObjectsByClass__FP2SWi3CIDP2LOiPP2LO = 0x15A4F0; // type:func PloFindSwObjectByClass__FP2SWi3CIDP2LO = 0x15A838; // type:func PaloFindLoCommonParent__FP2LOT0 = 0x15A868; // type:func g_mpcidpvt = 0x247448; // size:0x328 //////////////////////////////////////////////////////////////// // P2/flash.c //////////////////////////////////////////////////////////////// junk_0015A8B0 = 0x15A8B0; // type:func InitFlash__FP5FLASH = 0x15A8B8; // type:func LoadFlashFromBrx__FP5FLASHP18CBinaryInputStream = 0x15A918; // type:func UpdateFlash__FP5FLASHf = 0x15A960; // type:func RenderFlashSelf__FP5FLASHP2CMP2RO = 0x15A9A8; // type:func FPosFlashWithin__FP5FLASHP6VECTOR = 0x15AA50; // type:func //////////////////////////////////////////////////////////////// // P2/fly.c //////////////////////////////////////////////////////////////// InitFly__FP3FLY = 0x15AAE0; // type:func LoadFlyFromBrx__FP3FLYP18CBinaryInputStream = 0x15AC08; // type:func CloneFly__FP3FLYT0 = 0x15AD80; // type:func FreezeFly__FP3FLYi = 0x15AE38; // type:func PostFlyLoad__FP3FLY = 0x15AEB0; // type:func PresetFlyAccel__FP3FLYf = 0x15AF50; // type:func UpdateFly__FP3FLYf = 0x15B128; // type:func RenderFlySelf__FP3FLYP2CMP2RO = 0x15B4D0; // type:func FAbsorbFlyWkr__FP3FLYP3WKR = 0x15B720; // type:func SetFlyFlys__FP3FLY4FLYS = 0x15B7B8; // type:func EmitFlyDroppings__FP3FLY = 0x15BC78; // type:func FFindFlyClosestLandingPos__FP3FLYP6VECTOR = 0x15BD48; // type:func FlysAttemptedFlyLanding__FP3FLY = 0x15BEF0; // type:func FShouldFlyFlee__FP3FLY = 0x15BFC0; // type:func FFilterFly__FPvP2SO = 0x15C058; // type:func FCheckFlyOpenSpaceBelow__FP3FLY = 0x15C0A0; // type:func //////////////////////////////////////////////////////////////// // P2/font.c //////////////////////////////////////////////////////////////// StartupFont__Fv = 0x15C178; // type:func FUN_0015c188 = 0x15C188; // type:func FUN_0015c1c0 = 0x15C1C0; // type:func FUN_0015c200 = 0x15C200; // type:func CopyTo__5CFontP5CFont = 0x15C260; // type:func SetupDraw__5CFontP8CTextBoxP4GIFS = 0x15C2E8; // type:func CleanupDraw__5CFontP8CTextBoxP4GIFS = 0x15C3C0; // type:func DxFromPchz__5CFontPc = 0x15C418; // type:func DyWrapPchz__5CFontPcf = 0x15C4A8; // type:func ClineWrapPchz__5CFontPcf = 0x15C4E8; // type:func junk_0015C630 = 0x15C630; // type:func DrawPchz__5CFontPcP8CTextBoxT2P4GIFS = 0x15C638; // type:func PushScaling__5CFontff = 0x15C8b8; // type:func PopScaling__5CFont = 0x15C900; // type:func PfontClone__8CFontBrxff = 0x15C930; // type:func CopyTo__8CFontBrxP8CFontBrx = 0x15C9B0; // type:func FValid__8CFontBrxc = 0x15CA38; // type:func DxFromCh__8CFontBrxc = 0x15CA60; // type:func FEnsureLoaded__8CFontBrxP4GIFS = 0x15CAB8; // type:func SetupDraw__8CFontBrxP8CTextBoxP4GIFS = 0x15CB88; // type:func SwitchTex0__8CFontBrxP4GIFS = 0x15CC80; // type:func DxDrawCh__8CFontBrxcffUiP4GIFS = 0x15CD18; // type:func FUN_0015cf70 = 0x15CF70; // type:func DrawPart__8CFontBrxffffffffUiP4GIFS = 0x15D338; // type:func EdgeRect__8CFontBrxP9CTextEdgeP8CTextBoxP4GIFS = 0x15D4E0; // type:func LoadFromBrx__8CFontBrxP18CBinaryInputStream = 0x15D8A8; // type:func PostLoad__8CFontBrxP3GSB = 0x15D998; // type:func PglyffFromCh__8CFontBrxc = 0x15DAB8; // type:func __9CRichTextPcP5CFont = 0x15DB28; // type:func Reset__9CRichText = 0x15DB80; // type:func SetBaseColor__9CRichTextP4RGBA = 0x15DBB8; // type:func ChNext__9CRichText = 0x15DBE0; // type:func Cch__9CRichText = 0x15DF58; // type:func Trim__9CRichTexti = 0x15DFA0; // type:func Dx__9CRichText = 0x15DFF8; // type:func ClineWrap__9CRichTextf = 0x15E068; // type:func FUN_0015e1b0 = 0x15E1B0; // type:func DxMaxLine__9CRichText = 0x15E1F0; // type:func GetExtents__9CRichTextPfT1f = 0x15E290; // type:func Draw__9CRichTextP8CTextBoxT1P4GIFS = 0x15E318; // type:func PostFontsLoad__Fv = 0x15E5F0; // type:func junk_0015E678 = 0x15E678; // type:func g_pfont = 0x26227C; // size:0x4 //////////////////////////////////////////////////////////////// // P2/frm.c //////////////////////////////////////////////////////////////// VU1_Interrupt__Fi = 0x15E6A8; // type:func StartupFrame__Fv = 0x15E810; // type:func OpenFrame__Fv = 0x15E9F0; // type:func EnsureVu1Code__FP4VIFSPvT1 = 0x15EAE0; // type:func FinalizeFrameVifs__FP4VIFSPiPP2QW = 0x15EB20; // type:func FinalizeFrameGifs__FP4GIFSPiPP2QW = 0x15EBF0; // type:func CloseFrame__Fv = 0x15EC68; // type:func PrepareGsForFrameRender__FP3FRM = 0x15ED50; // type:func check_anticrack_antigrab__Fv = 0x15EDB8; // type:func FrameRenderLoop__FPv = 0x15EE80; // type:func RenderFrame__FP3FRMi = 0x15EF88; // type:func ClearPendingFrame__FP3FRM = 0x15EFE8; // type:func FlushFrames__Fi = 0x15F210; // type:func BlendPrevFrame__Fv = 0x15F320; // type:func g_cframe = 0x2622cc; // size:0x4 g_pvVu1Code = 0x26230c; // size:0x4 // TODO: Should these be elsewhere? g_psliCur = 0x2622D4; // size:0x4 g_aqwGifsBackgroundUpload = 0x274538; // size:0x4 //////////////////////////////////////////////////////////////// // P2/freeze.c //////////////////////////////////////////////////////////////// RemergeSwObject__FP2SWP3ALO = 0x15F678; // type:func MergeSwFreezeGroups__FP2SWP3ALOT1 = 0x15F6C0; // type:func SplinterSwFreezeGroup__FP2SWP3ALO = 0x15F710; // type:func MergeSwGroup__FP2SWP3MRG = 0x15F7D8; // type:func AddSwMergeGroup__FP2SWP3MRG = 0x15F8B0; // type:func RemoveFromArray__FPiPPvPv = 0x15F930; // type:func RemoveSwMergeGroup__FP2SWP3MRG = 0x15F9A0; // type:func RemergeSwObjects__FP2SW = 0x15FA58; // type:func FreezeAloHierarchy__FP3ALOi = 0x15FB28; // type:func GetAloFrozen__FP3ALOPi = 0x15FBA0; // type:func FreezeAlo__FP3ALOi = 0x15FBB8; // type:func FreezeSo__FP2SOi = 0x15FCD8; // type:func RefreezeSwObjects__FP2SW = 0x15FD78; // type:func UpdateSwBusyList__FP2SW = 0x15FF58; // type:func //////////////////////////////////////////////////////////////// // P2/frzg.c //////////////////////////////////////////////////////////////// PostFrzgLoad__FP4FRZG = 0x15FF88; // type:func AddFrzgObject__FP4FRZG3OID = 0x160050; // type:func //////////////////////////////////////////////////////////////// // P2/game.c // TODO mangle function names //////////////////////////////////////////////////////////////// StartupGame__Fv = 0x160070; // type:func junk_00160090 = 0x160090; // type:func search_level_by_load_data = 0x1600A0; // type:func search_level_by_id = 0x160110; // type:func PchzFriendlyFromWid = 0x160148; // type:func junk_00160178 = 0x160178; // type:func call_search_level_by_id = 0x160180; // type:func FFindLevel = 0x1601A0; // type:func junk_001601D0 = 0x1601D0; // type:func get_level_completion_by_id = 0x1601D8; // type:func tally_world_completion = 0x160208; // type:func get_game_completion__Fv = 0x1602A0; // type:func UnlockIntroCutsceneFromWid__Fi = 0x160340; // type:func DefeatBossFromWid = 0x1603E8; // type:func UnlockEndgameCutscenesFromFgs = 0x1604B8; // type:func PlayEndingFromCompletionFlags = 0x160578; // type:func InitGameState__FP2GS = 0x1605E8; // type:func FUN_00160650 = 0x160650; // type:func SetupGame__FPci = 0x160690; // type:func UpdateGameState__Ff = 0x1607D0; // type:func LsFromWid = 0x160810; // type:func GrflsFromWid__F3WID = 0x160850; // type:func UnloadGame__Fv = 0x160880; // type:func RetryGame__Fv = 0x1608E0; // type:func StartGame__Fv = 0x160918; // type:func FUN_00160948 = 0x160948; // type:func CalculatePercentCompletion__FP2GS = 0x160B28; // type:func SetCcharm__Fi = 0x160C48; // type:func FCharmAvailable__Fv = 0x160C58; // type:func FUN_00160C90 = 0x160C90; // type:func PfLookupDialog__FP2LS3OID = 0x160CA0; // type:func clr_8_bytes_1 = 0x160CC8; // type:func FUN_00160ce8__Fi = 0x160CE8; // type:func OnGameAlarmTriggered__FP4GAME = 0x160CF0; // type:func OnGameAlarmDisabled__FP4GAME = 0x160D00; // type:func GetGrfvault_unknown__Fv = 0x160D10; // type:func GetBlueprintInfo__FPiT0 = 0x160D30; // type:func CcharmMost__Fv = 0x160D98; // type:func reload_post_death = 0x160DA0; // type:func // data D_00247AB0 = 0x247ab0; // size:0x2c g_pgsCur = 0x2623c0; // size:0x4 g_pwsCur = 0x2623c4; // size:0x4 g_plsCur = 0x2623c8; // size:0x4 g_worldlevelPrev = 0x2623cc; // size:0x4 chz_none = 0x2623d0; // size:0x7 // static g_gsCur = 0xea0; // size:0x1a00 //////////////////////////////////////////////////////////////// // P2/geom.c //////////////////////////////////////////////////////////////// InitGeom__FP4GEOM = 0x160E80; // type:func CloneGeom__FP4GEOMP7MATRIX4T0 = 0x160EA0; // type:func FUN_00161028 = 0x161028; // type:func //////////////////////////////////////////////////////////////// // P2/gifs.c //////////////////////////////////////////////////////////////// __4GIFS = 0x1611B8; // type:func AddPrimEnd__4GIFS = 0x161200; // type:func EndPrim__4GIFSi = 0x161278; // type:func CheckReg__4GIFSii = 0x1612E8; // type:func AddPrimBulk__4GIFSiiiUlPP2QW = 0x1612F8; // type:func AddPrimPack__4GIFSiiUl = 0x1613C0; // type:func PackRGBA__4GIFSUi = 0x161458; // type:func PackUV__4GIFSii = 0x1614C8; // type:func PackSTQ__4GIFSfff = 0x161520; // type:func PackXYZ__4GIFSiii = 0x161588; // type:func PackXYZF__4GIFSiiii = 0x1615F0; // type:func PackXYZFNoKick__4GIFSiiii = 0x161670; // type:func PackAD__4GIFSll = 0x161708; // type:func junk_00161760 = 0x161760; // type:func AddPrimList__4GIFSiUl = 0x161768; // type:func ListRGBAQ__4GIFSUif = 0x1617E8; // type:func junk_00161858 = 0x161858; // type:func ListUV__4GIFSii = 0x161860; // type:func ListXYZF__4GIFSiiii = 0x1618C0; // type:func junk_00161950 = 0x161950; // type:func AddImage__4GIFSi = 0x161958; // type:func _vt$DMAS = 0x24A6F8; //////////////////////////////////////////////////////////////// // P2/glbs.c //////////////////////////////////////////////////////////////// __4GLBS = 0x1619C0; // type:func _$_4GLBS = 0x161A88; // type:func SetTransform__4GLBSP6VECTORP7MATRIX3 = 0x161AB0; // type:func FindLights__4GLBSP6VECTORf = 0x161B10; // type:func ResetStrip__4GLBS = 0x161B80; // type:func BeginStrip__4GLBSP3SHD = 0x161BB0; // type:func DrawPrelit__4GLBS = 0x161C00; // type:func DrawThreeWay__4GLBS = 0x161F70; // type:func EndStrip__4GLBS = 0x162508; // type:func SetNormal__4GLBSP6VECTOR = 0x162680; // type:func junk_001626A0 = 0x1626A0; // type:func SetRgba__4GLBSG4RGBA = 0x1626A8; // type:func SetUv__4GLBSP3UVF = 0x1626C0; // type:func AddVtx__4GLBSi = 0x1626D8; // type:func //////////////////////////////////////////////////////////////// // P2/glob.c //////////////////////////////////////////////////////////////// BuildGlobsetSaaArray__FP7GLOBSET = 0x162810; // type:func LoadGlobsetFromBrx__FP7GLOBSETP18CBinaryInputStreamP3ALO = 0x162890; // type:func EnsureBuffer__FiP4VIFS = 0x163938; // type:func EnsureBufferCel__FiP4VIFS = 0x163990; // type:func BuildSubcel__FP7GLOBSETiP6SUBCELiP7VECTORFiP4TWEFP8SUBPOSEFT4PfP4VIFS = 0x1639E8; // type:func BuildSubglobSinglePass__FP7GLOBSETP4GLOBiP7SUBGLOBP3SHDP7VECTORFT5P4RGBAP3UVFiP4VTXFP8SUBPOSEFT5T5PfP4VIFSP4SGVR = 0x163ED8; // type:func BuildSubglobThreeWay__FP7GLOBSETP4GLOBiP7SUBGLOBP3SHDP7VECTORFT5P4RGBAP3UVFiP4VTXFP8SUBPOSEFT5T5PfP4VIFSP4SGVR = 0x164868; // type:func BuildSubglobLighting__FP4GLOBP7SUBGLOBP8SUBGLOBI = 0x165588; // type:func PostGlobsetLoad__FP7GLOBSETP3ALO = 0x165728; // type:func BindGlobset__FP7GLOBSETP3ALO = 0x165828; // type:func CloneGlobset__FP7GLOBSETP3ALOT0 = 0x165920; // type:func CloneGlob__FP7GLOBSETP4GLOBP5GLOBI = 0x165AE8; // type:func UpdateGlobset__FP7GLOBSETP3ALOf = 0x165FE0; // type:func UpdateAloConstraints__FP3ALO = 0x1660A0; // type:func UpdateAloInfluences__FP3ALOP2RO = 0x1660E8; // type:func PredrawGlob__FP7GLOBSETP4GLOBP5GLOBIP3ALO = 0x1662A8; // type:func RotateVu1Buffer__Fv = 0x166658; // type:func DrawGlob__FP3RPL = 0x166690; // type:func glob__static_initialization_and_destruction_0 = 0x167D20; // type:func _GLOBAL_$I$g_dro = 0x167D48; // type:func //////////////////////////////////////////////////////////////// // P2/gomer.c //////////////////////////////////////////////////////////////// InitGomer__FP5GOMER = 0x167D68; // type:func PostGomerLoad__FP5GOMER = 0x167E08; // type:func RenderGomerSelf__FP5GOMERP2CMP2RO = 0x167EF0; // type:func FDetectGomer__FP5GOMER = 0x167F10; // type:func //////////////////////////////////////////////////////////////// // P2/gs.c // Graphics synthesizer //////////////////////////////////////////////////////////////// BlendDisplayOnBufferMismatch__Fv = 0x168130; // type:func VBlankS_Interrupt__Fi = 0x1682C0; // type:func SyncVBlank__Fv = 0x1683B8; // type:func SwapGsBuffers__Fv = 0x1683E8; // type:func RestoreGsBuffers__Fv = 0x1684E8; // type:func GS_Interrupt__Fi = 0x1685B8; // type:func ResetGs__Fv = 0x168698; // type:func SendDmaSyncGsFinish__FP10sceDmaChanP2QW = 0x1686E8; // type:func BuildClearGifs__FP2QWG4RGBAi = 0x168770; // type:func StartupGs__Fv = 0x1688B8; // type:func BlastAqwGifsBothFrames__FP2QW = 0x168A48; // type:func ClearFrameBuffers__Fv = 0x168AF8; // type:func FadeFramesToBlack__Ff = 0x168B68; // type:func ResetGsMemory__Fv = 0x168D00; // type:func NLog2__FUi = 0x168D30; // type:func InitGsb__FP3GSBii = 0x168D68; // type:func ResetGsb__FP3GSB = 0x168D78; // type:func IgsAllocGsb__FP3GSBi = 0x168D88; // type:func BuildImageGifs__FiiiiiiP4GIFS = 0x168D98; // type:func BuildClutTex2__FP4CLUTi = 0x168E78; // type:func BuildClutGifs__FP4CLUTiP4GIFS = 0x168F48; // type:func BuildBmpTex0__FP3BMPi = 0x168FB0; // type:func BuildBmpGifs__FP3BMPiP4GIFS = 0x169088; // type:func FBuildUploadBitmapGifs__FiP3GSBP4GIFS = 0x1690C0; // type:func UploadBitmaps__FiP3GSB = 0x1692B0; // type:func PqwGifsBitmapUpload__Fi = 0x1693A8; // type:func PropagateSur__FP3SUR = 0x1694A0; // type:func ReferenceShaderAqwRegs__FP3SHDP4SHDPP2QWiiP3SAI = 0x1694F8; // type:func ReferenceUVAnimation__FP2QWiP3SAI = 0x169608; // type:func RebaseSurs__FiiPvT2 = 0x1696B8; // type:func PropagateSurs__Fv = 0x169718; // type:func PqwVifsBitmapUpload__Fi = 0x169780; // type:func DrawOnBitmap__FP3BMPP4GIFS = 0x169B18; // type:func //////////////////////////////////////////////////////////////// // P2/hide.c //////////////////////////////////////////////////////////////// StartupHide__Fv = 0x169C58; // type:func ResetHideList__Fv = 0x169CA0; // type:func InitHshape__FP6HSHAPE = 0x169CD8; // type:func OnHshapeAdd__FP6HSHAPE = 0x169D20; // type:func OnHshapeRemove__FP6HSHAPE = 0x169D58; // type:func BindHshape__FP6HSHAPE = 0x169D90; // type:func CloneHshape__FP6HSHAPET0 = 0x169DD8; // type:func GetHshapeHidePos__FP6HSHAPEfP6VECTORPf = 0x169E20; // type:func GetHshapeClosestHidePos__FP6HSHAPEPfP6VECTORT1 = 0x169FC0; // type:func InitHpnt__FP4HPNT = 0x16A100; // type:func OnHpntAdd__FP4HPNT = 0x16A140; // type:func OnHpntRemove__FP4HPNT = 0x16A178; // type:func BindHpnt__FP4HPNT = 0x16A1B0; // type:func CloneHpnt__FP4HPNTT0 = 0x16A1F8; // type:func GetHpntClosestHidePos__FP4HPNTP6VECTORPf = 0x16A240; // type:func FUN_0016a320 = 0x16A320; // type:func InitHbsk__FP4HBSK = 0x16A3A8; // type:func LoadHbskFromBrx__FP4HBSKP18CBinaryInputStream = 0x16A420; // type:func OnHbskAdd__FP4HBSK = 0x16A490; // type:func OnHbskRemove__FP4HBSK = 0x16A4C8; // type:func CloneHbsk__FP4HBSKT0 = 0x16A500; // type:func FIgnoreHbskIntersection__FP4HBSKP2SO = 0x16A548; // type:func PresetHbskAccel__FP4HBSKf = 0x16A580; // type:func SetHbskHbsks__FP4HBSK5HBSKS = 0x16A5F0; // type:func CdartStuckHbsk__FP4HBSK = 0x16A758; // type:func PdartOldestHbskStuck__FP4HBSK = 0x16A820; // type:func GetHbskClosestHidePos__FP4HBSKP6VECTORPf = 0x16A910; // type:func g_dlHshape = 0x2626E8; // size:0xc g_dlHpnt = 0x2626F8; // size:0xc g_dlHbsk = 0x262708; // size:0xc //////////////////////////////////////////////////////////////// // P2/hnd.c //////////////////////////////////////////////////////////////// InitHnd__FP3HND = 0x16C470; // type:func LoadHndFromBrx__FP3HNDP18CBinaryInputStream = 0x16C4B8; // type:func junk_0016c4d8 = 0x16C4D8; // type:func D_0024A7DC = 0x24A7DC; // size:0x4 //////////////////////////////////////////////////////////////// // P2/ik.c //////////////////////////////////////////////////////////////// RenderIkhSelf__FP3IKHP2CMP2RO = 0x16C4E8; // type:func RenderLikhSelf__FP4LIKHP2CMP2RO = 0x16C508; // type:func SolveAloIK__FP3ALO = 0x16C528; // type:func //////////////////////////////////////////////////////////////// // P2/jlo.c //////////////////////////////////////////////////////////////// InitJlo__FP3JLO = 0x16CE00; // type:func LoadJloFromBrx__FP3JLOP18CBinaryInputStream = 0x16CE80; // type:func PostJloLoad__FP3JLO = 0x16CF70; // type:func FUN_0016d040 = 0x16D040; // type:func PresetJloAccel__FP3JLOf = 0x16D0C0; // type:func UpdateJlo__FP3JLOf = 0x16D128; // type:func JlosNextJlo__FP3JLO = 0x16D1E0; // type:func SetJloJlovol__FP3JLOP6JLOVOL = 0x16D3F0; // type:func FireJlo__FP3JLO = 0x16D490; // type:func LandJlo__FP3JLO = 0x16D788; // type:func JumpJlo__FP3JLO = 0x16D828; // type:func FUN_0016d928 = 0x16D928; // type:func FUN_0016d9a8 = 0x16D9A8; // type:func HandleJloMessage__FP3JLO5MSGIDPv = 0x16DA00; // type:func SetJloJlos__FP3JLO4JLOS = 0x16DAC0; // type:func ActivateJlo__FP3JLO = 0x16DCF0; // type:func DeactivateJlo__FP3JLO = 0x16DD00; // type:func InitJloc__FP4JLOC = 0x16DD10; // type:func LoadJlocFromBrx__FP4JLOCP18CBinaryInputStream = 0x16DD90; // type:func PostJlocLoad__FP4JLOC = 0x16DDE8; // type:func PxfmChooseJloc__FP4JLOC = 0x16DE20; // type:func InitJlovol__FP6JLOVOL = 0x16DF30; // type:func BindJlovol__FP6JLOVOL = 0x16DF68; // type:func HandleJlovolMessage__FP6JLOVOL5MSGIDPv = 0x16DFE0; // type:func g_pjloCur = 0x2629c8; // size:0x4 s_asnipLoadJlo = 0x2629d0; //////////////////////////////////////////////////////////////// // P2/joy.c //////////////////////////////////////////////////////////////// StartupJoy__Fv = 0x16E0B8; // type:func AddGrfusr__Fi = 0x16E0F0; // type:func RemoveGrfusr__Fi = 0x16E118; // type:func UpdateGrfjoytFromGrfusr__Fv = 0x16E148; // type:func InitJoy__FP3JOYii = 0x16E1A0; // type:func UpdateJoy__FP3JOY = 0x16E238; // type:func SetJoyJoys__FP3JOY4JOYS4JOYK = 0x16E630; // type:func GetJoyXYDeflection__FP3JOYUcUcPfN23PUcT6PiP2LM = 0x16E738; // type:func FReadJoy__FP3JOY = 0x16E940; // type:func SetJoyBtnHandled__FP3JOYUs = 0x16EC20; // type:func TriggerJoyRumbleRumk__FP3JOY4RUMKf = 0x16EC38; // type:func junk_0016EC80 = 0x16EC80; // type:func StartJoySelection__FP3JOY = 0x16EC88; // type:func DxSelectionJoy__FP3JOY = 0x16EC98; // type:func DySelectionJoy__FP3JOY = 0x16EED0; // type:func UBtnpJoy__FP3JOY4BTNP = 0x16F108; // type:func AddCode__FP4CODE = 0x16F188; // type:func junk_0016F1F0 = 0x16F1F0; // type:func _ResetCodes__Fv = 0x16F1F8; // type:func _MatchCodes__FP3JOYUs = 0x16F238; // type:func UpdateCodes__Fv = 0x16F2E0; // type:func ClearFchts__Fv = 0x16F408; // type:func AddFcht__Fi = 0x16F430; // type:func junk_0016F470 = 0x16F470; // type:func Chetkido__Fv = 0x16F478; // type:func StartupCodes__Fv = 0x16F588; // type:func g_aja = 0x262A30; // size:0x20 g_mpbtnpfbtn = 0x262A50; // size:0x18 g_grfcht = 0x262C64; // size:0x4 g_grfjoyt = 0x262C68; // size:0x4 g_grfusr = 0x262C6C; // size:0x4 g_joy = 0x262C70; // size:0xc4 g_joyZero = 0x262D38; // size:0xc4 g_pcode = 0x262DFC; // size:0x4 g_tCodeCheck = 0x262E00; //////////////////////////////////////////////////////////////// // P2/jt.c //////////////////////////////////////////////////////////////// InitJt__FP2JT = 0x16F608; // type:func LoadJtFromBrx__FP2JTP18CBinaryInputStream = 0x16F7B0; // type:func PostJtLoad__FP2JT = 0x16F810; // type:func PresetJtAccelBase = 0x16FD70; // type:func PresetJtAccel__FP2JTf = 0x1701B0; // type:func AdjustJtNewXp__FP2JTP2XPi = 0x170410; // type:func AdjustJtDz__FP2JTiP2DZif = 0x170528; // type:func HandleJtGrfjtsc = 0x1705C8; // type:func UpdateJtInternalXps__FP2JT = 0x170660; // type:func FCheckJtXpBase__FP2JTP2XPi = 0x170790; // type:func AdjustJtXpVelocity__FP2JTP2XPi = 0x170820; // type:func HandleJtMessage__FP2JT5MSGIDPv = 0x170960; // type:func FTurnJtToTarget__FP2JT = 0x171180; // type:func UpdateJtBalance__FP2JT = 0x171238; // type:func RebuildJtXmg__FP2JTP3ALOfT1P6ACTADJP3XMG = 0x1719E8; // type:func FMatchJtXmg__FP2JTP3XMGP6ACTADJ = 0x171C80; // type:func UpdateJtStand__FP2JT = 0x171DD8; // type:func ThrowJt__FP2JTP6VECTORff = 0x171F28; // type:func UnhookJt__FP2JT = 0x171FE0; // type:func CalculateJtToolSpin__FP2JTfP7MATRIX3 = 0x172078; // type:func RenderJtAll__FP2JTP2CMP2RO = 0x1721B0; // type:func FUN_00172530 = 0x172530; // type:func FUN_001725e0 = 0x1725E0; // type:func UpdateJtTool__FP2JT = 0x1727B0; // type:func FUN_00172898 = 0x172898; // type:func UpdateJtPosWorldPrev__FP2JT = 0x172AE0; // type:func FUN_00172b08 = 0x172B08; // type:func UpdateJtBounds__FP2JT = 0x172B88; // type:func PsoGetJtEffect__FP2JTPi = 0x172BF8; // type:func AddJtCustomXps__FP2JTP2SOiP3BSPT3PP2XP = 0x172CF0; // type:func CtTorqueJt__FP2JT = 0x172EB8; // type:func FUN_00172ee0 = 0x172EE0; // type:func GetJtCpdefiFlatten__FP2JTP6CPDEFI = 0x1733B8; // type:func FUN_00173708 = 0x173708; // type:func FUN_00173750 = 0x173750; // type:func UpdateJtActive__FP2JTP3JOYf = 0x173888; // type:func UpdateJt__FP2JTf = 0x174808; // type:func UpdateJtDrive__FP2JT = 0x174E20; // type:func ChooseJtPhys__FP2JT = 0x174F50; // type:func EnableJtActadj__FP2JTi = 0x175078; // type:func SetJtJts__FP2JT3JTS4JTBS = 0x175170; // type:func ProfileJt__FP2JTi = 0x1777F8; // type:func SetJtPuppet__FP2JTP5ASEGA = 0x177800; // type:func FUN_00177828 = 0x177828; // type:func PaloAbsorbWkr__FP3WKRiPP3ALO = 0x177838; // type:func NCmpWkr__FP3WKRT0 = 0x177968; // type:func UpdateJtEffect__FP2JT = 0x177990; // type:func FIsJtSoundBase__FP2JT = 0x177E20; // type:func CollectJtPrize__FP2JT3PCKP3ALO = 0x177E70; // type:func GetJtDiapi__FP2JTP6DIALOGP5DIAPI = 0x177EE0; // type:func PlayJtDialog__FP2JTP6DIALOG = 0x177F98; // type:func g_pjt = 0x262e10; // size:0x4 //////////////////////////////////////////////////////////////// // P2/jsg.c //////////////////////////////////////////////////////////////// InitJsg__FP3JSG = 0x17B998; // type:func GetJsgLocation__FP3JSGP2LOP6VECTORPf = 0x17B9D0; // type:func SetJsgFocus__FP3JSGP2LO = 0x17BB78; // type:func SetJsgTn__FP3JSGP2TN = 0x17BC20; // type:func NextJsgJsge__FP3JSG = 0x17BCD0; // type:func FIsJsgJsgeComplete__FP3JSGP4JSGE = 0x17C428; // type:func UpdateJsgJsge__FP3JSG = 0x17C660; // type:func ReadJsgJoystick__FP3JSGP3JOY = 0x17C718; // type:func FIsJsgActive__FP3JSG = 0x17CDA8; // type:func ClearJsg__FP3JSG = 0x17CDE0; // type:func ApplyJsg__FP3JSGP2JT = 0x17CE20; // type:func RetractJsg__FP3JSG = 0x17CE80; // type:func PjsgeAllocJsg__FP3JSG5JSGEK3OIDi = 0x17CF38; // type:func AddJsgContext__FP3JSG3OID = 0x17CFC8; // type:func AddJsgCut__FP3JSG3OID = 0x17CFF0; // type:func AddJsgFocus__FP3JSG3OID = 0x17D018; // type:func AddJsgLabel__FP3JSG3OID = 0x17D040; // type:func AddJsgTunnel__FP3JSG3OID = 0x17D078; // type:func AddJsgPause__FP3JSG3OIDf = 0x17D0A0; // type:func AddJsgAseg__FP3JSG3OIDi = 0x17D0D8; // type:func AddJsgJump__FP3JSG3OID5JSGJK5JSGLKi = 0x17D100; // type:func AddJsgRun__FP3JSG3OIDfi = 0x17D148; // type:func AddJsgClimb__FP3JSG3OIDfi = 0x17D180; // type:func AddJsgAttack__FP3JSG3OID4FTAKi = 0x17D1B8; // type:func AddJsgClock__FP3JSGf = 0x17D1E8; // type:func AddJsgUnknown__FP3JSG = 0x17D220; // type:func s_jsge = 0x2BE478; //////////////////////////////////////////////////////////////// // P2/jump.c //////////////////////////////////////////////////////////////// PresetJtAccelJump__FP2JT = 0x17D248; // type:func UpdateJtActiveJump__FP2JTP3JOY = 0x17D5D8; // type:func FCheckJtSingleEdge__FP2JTP2SOP4EDGEP6VECTOR = 0x17DCE0; // type:func FCheckJtEdgeNormal__FP2JTP6VECTORT1 = 0x17DE88; // type:func FCheckJtEdgeGrab__FP2JTP2SOP6VECTOR3XPKPvT2 = 0x17E088; // type:func PxpFindJtBestEdge__FP2JTPiP6VECTOR = 0x17E3C8; // type:func JtsResetJt__FP2JT = 0x17E6D0; // type:func HandleJtDiveEffect__FP2JT = 0x17E710; // type:func FUN_0017ece8 = 0x17ECE8; // type:func UpdateJtJump__FP2JT = 0x17F018; // type:func FTimeJtJumpToTarget__FP2JTP6VECTORN31Pf = 0x17FAC0; // type:func GetJtJumpVelocity__FP2JTP6VECTOR = 0x17FB78; // type:func GetJtJumpToTargetVelocity__FP2JTP6VECTOR = 0x17FC48; // type:func GetJtJumpBoostVelocity__FP2JTP6VECTOR = 0x17FCC8; // type:func StartupJmt__Fv = 0x17FD48; // type:func ResetJmtList__Fv = 0x17FD70; // type:func OnJmtAdd__FP3JMT = 0x17FD90; // type:func OnJmtRemove__FP3JMT = 0x17FDC8; // type:func CloneJmt__FP3JMTT0 = 0x17FE00; // type:func PostJmtLoad__FP3JMT = 0x17FE48; // type:func g_dlJmt = 0x264088; // size:0xc //////////////////////////////////////////////////////////////// // P2/keyhole.c //////////////////////////////////////////////////////////////// InitKeyhole__FP7KEYHOLE = 0x17FE90; // type:func LoadKeyholeFromBrx__FP7KEYHOLEP18CBinaryInputStream = 0x17FEC0; // type:func DrawKeyholeMask__FP7KEYHOLEffff = 0x180108; // type:func DrawKeyhole__FP7KEYHOLEf = 0x180398; // type:func keyhole__static_initialization_and_destruction_0 = 0x180E38; // type:func _GLOBAL_$I$InitKeyhole__FP7KEYHOLE = 0x180E90; // type:func g_pkeyhole = 0x2640A4; // size:0x4 //////////////////////////////////////////////////////////////// // P2/landing.c //////////////////////////////////////////////////////////////// OnLandingAdd__FP7LANDING = 0x180EB0; // type:func OnLandingRemove__FP7LANDING = 0x180EE8; // type:func CloneLanding__FP7LANDINGT0 = 0x180F20; // type:func //////////////////////////////////////////////////////////////// // P2/lgn.c //////////////////////////////////////////////////////////////// InitLgn__FP3LGN = 0x180F68; // type:func PostLgnLoad__FP3LGN = 0x180F98; // type:func UpdateLgnActive__FP3LGNP3JOYf = 0x181078; // type:func UpdateLgn__FP3LGNf = 0x181448; // type:func FUN_00181658 = 0x181658; // type:func OnLgnActive__FP3LGNiP2PO = 0x181780; // type:func RenderLgnAll__FP3LGNP2CMP2RO = 0x181818; // type:func GetLgnCpdefi__FP3LGNfP6CPDEFI = 0x181A58; // type:func FInvulnerableLgn__FP3LGN3ZPK = 0x181A98; // type:func JthsCurrentLgn__FP3LGN = 0x181AE0; // type:func UseLgnCharm__FP3LGN = 0x181AF0; // type:func ApplyLgnThrow__FP3LGNP2PO = 0x181B20; // type:func FTakeLgnDamage__FP3LGNP3ZPR = 0x181BC8; // type:func HandleLgnMessage__FP3LGN5MSGIDPv = 0x181D28; // type:func FUN_00181d88 = 0x181D88; // type:func SetLgnLgns__FP3LGN4LGNS = 0x181DA8; // type:func UpdateLgnrAim__FP4LGNRP3JOY = 0x181ED0; // type:func DrawLgnr__FP4LGNR = 0x1821B0; // type:func InitSwp__FP3SWP = 0x182470; // type:func PostSwpLoad__FP3SWP = 0x1824D8; // type:func UpdateSwp__FP3SWPf = 0x182548; // type:func ProjectSwpTransform__FP3SWPfi = 0x182748; // type:func SetSwpShape__FP3SWPP5SHAPEf = 0x182948; // type:func //////////////////////////////////////////////////////////////// // P2/lo.c //////////////////////////////////////////////////////////////// InitLo__FP2LO = 0x182c18; // type:func PostLoLoad__FP2LO = 0x182c58; // type:func AddLo__FP2LO = 0x182c80; // type:func AddLoHierarchy__FP2LO = 0x182d00; // type:func OnLoAdd__FP2LO = 0x182d48; // type:func RemoveLo__FP2LO = 0x182d50; // type:func DeferLoRemove__FP2LO = 0x182dd8; // type:func SetLoSuckHideLimits__FP2LOP2LM = 0x182e40; // type:func RemoveLoHierarchy__FP2LO = 0x182e88; // type:func OnLoRemove__FP2LO = 0x182ed0; // type:func SnipLo__FP2LO = 0x182ed8; // type:func FFindLoParent__FP2LOP3ALO = 0x182f40; // type:func SetLoParent__FP2LOP3ALO = 0x182f78; // type:func FIsLoInWorld__FP2LO = 0x182fc8; // type:func GetLoInWorld__FP2LOPi = 0x183028; // type:func junk_00183050 = 0x183050; // type:func PloCloneLo__FP2LOP2SWP3ALO = 0x183058; // type:func CloneLoHierarchy__FP2LOT0 = 0x1830b0; // type:func CloneLo__FP2LOT0 = 0x1830d8; // type:func SubscribeSwPpmqStruct__FP2SWPP2MQPFPv5MSGIDPv_vPv = 0x1831e8; // type:func UnsubscribeSwPpmqStruct__FP2SWPP2MQPFPv5MSGIDPv_vPv = 0x183238; // type:func SubscribeLoStruct__FP2LOPFPv5MSGIDPv_vPv = 0x183290; // type:func UnsubscribeLoStruct__FP2LOPFPv5MSGIDPv_vPv = 0x1832c0; // type:func SubscribeLoObject__FP2LOT0 = 0x1832f0; // type:func UnsubscribeLoObject__FP2LOT0 = 0x183320; // type:func SendLoMessage__FP2LO5MSGIDPv = 0x183350; // type:func LoadLoFromBrx__FP2LOP18CBinaryInputStream = 0x1833d0; // type:func FMatchesLoName__FP2LO3OID = 0x1833f0; // type:func OidProxyLo__FP2LO = 0x183438; // type:func OidProxyLoPreferred__FP2LO = 0x183458; // type:func GetLoOidProxy__FP2LOP3OID = 0x183478; // type:func PostSpliceEventCallback__FP2LOUiPv = 0x1834a0; // type:func FFilterSpliceEvent__FP2LO7SYMEVIDiPPv = 0x183668; // type:func HandleLoSpliceEvent__FP2LOUiiPPv = 0x1837e0; // type:func EnsureLoSidebagBool__FP2LO5OPTIDi = 0x183910; // type:func EnsureLoSidebagInt__FP2LO5OPTIDi = 0x183990; // type:func EnsureLoSidebagFloat__FP2LO5OPTIDf = 0x183a10; // type:func EnsureLoSidebagClq__FP2LO5OPTIDP3CLQ = 0x183a90; // type:func EnsureLoSidebagLm__FP2LO5OPTIDP2LM = 0x183b20; // type:func EnsureLoSidebagOid__FP2LO5OPTID3OID = 0x183bb8; // type:func EnsureLoSidebagVector__FP2LO5OPTIDP6VECTOR = 0x183c38; // type:func //////////////////////////////////////////////////////////////// // P2/light.c //////////////////////////////////////////////////////////////// InitLight__FP5LIGHT = 0x183CC8; // type:func UpdateLightXfWorldHierarchy__FP5LIGHT = 0x183D88; // type:func RemoveLightFromSw__FP5LIGHT = 0x183DC0; // type:func AddLightToSw__FP5LIGHT = 0x183DF8; // type:func OnLightAdd__FP5LIGHT = 0x183E40; // type:func OnLightRemove__FP5LIGHT = 0x183E70; // type:func CloneLight__FP5LIGHTT0 = 0x183EA0; // type:func FitLinearFunction__FffffPfT4 = 0x183F40; // type:func FitRecipFunction__FffffPfT4 = 0x183FE0; // type:func ConvertFallOff__FP2LMPfT1 = 0x1840B8; // type:func ConvertAngleStrength__FffffPfT4 = 0x1840F0; // type:func InvalidateLight__FP5LIGHT = 0x1841B0; // type:func RebuildLightVifs__FP5LIGHT = 0x1841D0; // type:func SetLightKind__FP5LIGHT6LIGHTK = 0x184768; // type:func SetLightHighlightColor__FP5LIGHTP6VECTOR = 0x1847F0; // type:func SetLightMidtoneStrength__FP5LIGHTf = 0x184818; // type:func SetLightShadowStrength__FP5LIGHTf = 0x184838; // type:func SetLightHighlightAngle__FP5LIGHTf = 0x184858; // type:func SetLightMidtoneAngle__FP5LIGHTf = 0x184878; // type:func SetLightShadowAngle__FP5LIGHTf = 0x184898; // type:func SetLightDirection__FP5LIGHTP6VECTOR = 0x1848B8; // type:func SetLightDynamic__FP5LIGHTi = 0x184968; // type:func SetLightFallOff__FP5LIGHTP2LM = 0x184990; // type:func SetLightConeAngle__FP5LIGHTf = 0x1849D0; // type:func SetLightHotSpotAngle__FP5LIGHTf = 0x184A08; // type:func SetLightFrustrumUp__FP5LIGHTP6VECTOR = 0x184A38; // type:func RebuildLightFrustrum__FP5LIGHT = 0x184A70; // type:func UpdateLightBeamGrfzon__FP5LIGHT = 0x184B58; // type:func SetLightDiffuse_Old__FP5LIGHTf = 0x184CD0; // type:func GetLightDiffuse_Old__FP5LIGHTPf = 0x184D10; // type:func SetLightSaturate_Old__FP5LIGHTP6VECTOR = 0x184D20; // type:func GetLightSaturate_Old__FP5LIGHTP6VECTOR = 0x184D58; // type:func NCmpFindLight__FPP5LIGHTT0 = 0x184D78; // type:func PrepareSwLightsForDraw__FP2SW = 0x184DE8; // type:func TwpsFindSwLights__FP2SWP6VECTORfiiPiT5PP5LIGHT = 0x185150; // type:func g_cframeStaticLightsInvalid = 0x264260; // size:0x4 //////////////////////////////////////////////////////////////// // P2/lookat.c //////////////////////////////////////////////////////////////// InitActla__FP5ACTLAP3ALO = 0x185358; // type:func SetActlaTarget__FP5ACTLAP3ALOP6VECTOR = 0x1853F0; // type:func PaloGetActlaTarget__FP5ACTLA = 0x185468; // type:func UpdateActla__FP5ACTLAf = 0x185498; // type:func GetActlaRotationGoal__FP5ACTLAfP7MATRIX3P6VECTOR = 0x185538; // type:func //////////////////////////////////////////////////////////////// // P2/main.c //////////////////////////////////////////////////////////////// main = 0x185758; // type:func StartupSif__Fv = 0x1858f8; // type:func StartupVU0__Fv = 0x185A58; // type:func StartupVU1__Fv = 0x185AC8; // type:func Startup__Fv = 0x185B38; // type:func s_apchzSifModules = 0x2647A8; // size:0x18 s_asfn = 0x2647C0; // size:0x74 g_cpchzArgs = 0x264834; // size:0x4 g_apchzArgs = 0x264838; // size:0x4 //////////////////////////////////////////////////////////////// // P2/mark.c //////////////////////////////////////////////////////////////// MuFromAmtlk__FP4MTLK = 0x185C18; // type:func ElasFromAmtlk__FP4MTLK = 0x185CA0; // type:func PxpAdd__FP2SOT0P6VECTORT2f3XPKPvT6PP2XP = 0x185D20; // type:func RecalcSwXpPos__FP2SWiPP2XP = 0x185F48; // type:func RecalcSwXpMovement__FP2SWiPP2XP = 0x1860A8; // type:func FreeSwXpList__FP2SWP2XP = 0x1861E8; // type:func FindClosestPointOnLine__FP6VECTORN20PfT3 = 0x186230; // type:func FindClosestPointOnLineSegment__FP6VECTORN20PfT3 = 0x186320; // type:func ClsgClipSoAllEdges__FP2SOT0P3BSPiP3LSG = 0x186450; // type:func ClsgClipSoBspEdges__FP2SOT0iP3BSPiP3LSG = 0x186568; // type:func CategorizeAlsg__FiP3LSGPiT2PP3LSGT4 = 0x1867C8; // type:func CplsgFindEdgePath__FP4SURFiiP3LSGPP3LSG = 0x186A70; // type:func MarkSoContactsBspBsp__FP2SOT0iP3BSPT3PP2XP = 0x186BA8; // type:func CsbiIntersectSphereBsp__FP6VECTORfiP3BSPT3P4GEOMiP3SBI = 0x187260; // type:func MarkSoContactsSphereBsp__FP2SOP6VECTORfT0iP3BSPT5PP2XP = 0x1879C0; // type:func MarkSoContactsSphereSphere__FP2SOT0PP2XP = 0x187A88; // type:func CalculateCenterContact__FP2SOP6VECTORfT1Pf = 0x187B60; // type:func FMarkSoContactsCenterBsp__FP2SOT0iP3BSPT3PP2XP = 0x187C28; // type:func FClipEdgeToSphere__FP6VECTORfT0T0PfT0T0T4 = 0x187D08; // type:func FMarkSoContactsCenterSphere__FP2SOT0PP2XP = 0x187E88; // type:func AddSoXps__FP2SOT0iiP3BSPT4PP2XP = 0x187F40; // type:func PxpMarkSwContactsRoot__FP2SWPP2SOi = 0x188270; // type:func //////////////////////////////////////////////////////////////// // P2/mat.c //////////////////////////////////////////////////////////////// PostCopyMatrix3__7MATRIX4 = 0x1884C0; // type:func __as__7MATRIX4RC7MATRIX3 = 0x1884E0; // type:func MatMulMatTransMat__FRC7MATRIX3T0 = 0x188520; // type:func LoadIdentityMatrix4__FP7MATRIX4 = 0x1885E0; // type:func __ml__FRC7MATRIX4G8VU_FLOAT = 0x188628; // type:func __ml__FRC7MATRIX4T0 = 0x188668; // type:func junk_001886F8 = 0x1886F8; // type:func MultiplyMatrix4Vector__FP7MATRIX4P6VECTORfT1 = 0x188700; // type:func __ml__FRC7MATRIX4G10VU_VECTOR4 = 0x188740; // type:func TransposeMatrix4__FP7MATRIX4T0 = 0x188770; // type:func AddMatrix4Matrix4__FP7MATRIX4N20 = 0x188810; // type:func junk_00188848 = 0x188848; // type:func LoadRotateMatrixRad__FfP6VECTORP7MATRIX3 = 0x188850; // type:func LoadRotateMatrix__FP6VECTORP7MATRIX3 = 0x188978; // type:func LoadRotateMatrixEuler__FP6VECTORP7MATRIX3 = 0x188A20; // type:func LoadMatrixFromPosRot__FP6VECTORP7MATRIX3P7MATRIX4 = 0x188B08; // type:func LoadMatrixFromPosRotInverse__FP6VECTORP7MATRIX3P7MATRIX4 = 0x188B48; // type:func LoadMatrixFromPosRotScale__FP6VECTORP7MATRIX3T0P7MATRIX4 = 0x188C10; // type:func junk_00188CC8 = 0x188CC8; // type:func CosRotateMatrixMagnitude__FP7MATRIX3 = 0x188CE0; // type:func DecomposeRotateMatrixRad__FP7MATRIX3PfP6VECTOR = 0x188D28; // type:func junk_00188FD0 = 0x188FD0; // type:func DecomposeRotateMatrixEuler__FP7MATRIX3P6VECTOR = 0x188FD8; // type:func NormalizeRotateMatrix3__FP7MATRIX3 = 0x1890A0; // type:func CalculateDmat__FP7MATRIX3N20 = 0x189150; // type:func CalculateDmat4__FP7MATRIX4N20 = 0x1891C0; // type:func DecomposeRotateMatrixPanTilt__FP7MATRIX3PfT1 = 0x189230; // type:func LoadRotateMatrixPanTilt__FffP7MATRIX3 = 0x1892A0; // type:func LoadLookAtMatrix__FP6VECTORP7MATRIX3 = 0x189350; // type:func TiltMatUpright__FP7MATRIX3N20 = 0x189378; // type:func junk_00189430 = 0x189430; // type:func FInvertMatrix__FiPfT1 = 0x189438; // type:func FInvertMatrix3__FP7MATRIX3T0 = 0x1897F0; // type:func FInvertMatrix4__FP7MATRIX4T0 = 0x189AF0; // type:func BuildOrthonormalMatrixY__FP6VECTORT0P7MATRIX3 = 0x189B18; // type:func BuildOrthonormalMatrixZ__FP6VECTORT0P7MATRIX3 = 0x189C28; // type:func BuildRotateVectorsMatrix__FP6VECTORT0P7MATRIX3 = 0x189D38; // type:func BuildSimpleProjectionMatrix__FffffffP7MATRIX4 = 0x189F58; // type:func LoadScaleMatrixScalar__FP6VECTORfP7MATRIX4 = 0x18A008; // type:func LoadScaleMatrixVector__FP6VECTORP7MATRIX3T0P7MATRIX4 = 0x18A040; // type:func LoadRotateVectorMatrix__FP6VECTORT0P7MATRIX3 = 0x18A160; // type:func // TODO: Do these belong here? g_normalX = 0x248D00; // size:0xc g_normalY = 0x248D10; // size:0xc g_normalZ = 0x248D20; // size:0xc //////////////////////////////////////////////////////////////// // P2/mb.c //////////////////////////////////////////////////////////////// InitMbg__FP3MBG = 0x18A388; // type:func LoadMbgFromBrx__FP3MBGP18CBinaryInputStream = 0x18A3B8; // type:func PostMbgLoad__FP3MBG = 0x18A3F0; // type:func FUN_0018a510 = 0x18A510; // type:func FUN_0018a628 = 0x18A628; // type:func PsoHitTestCylinderObjects__FiP6VECTORT1fiPP2SOP3LSG = 0x18A6C0; // type:func FFilterMbgAttackObjects__FP3MBGP2SO = 0x18A830; // type:func FObstructedMbg__FP3MBGP6VECTORT1 = 0x18A910; // type:func FCanMbgAttack__FP3MBG = 0x18A9A8; // type:func FDetectMbg__FP3MBG = 0x18AAE0; // type:func FUN_0018ab88__Fi = 0x18AB88; // type:func FUN_0018abf0__Fi = 0x18ABF0; // type:func FUN_0018ac58__Fi = 0x18AC58; // type:func UpdateMbg__FP3MBGf = 0x18ACD0; // type:func FUN_0018acf0 = 0x18ACF0; // type:func UpdateMbgGoal__FP3MBGi = 0x18AD88; // type:func UpdateMbgSgs__FP3MBG = 0x18AE38; // type:func OnMgExitingSgs__FP3MBG3SGS = 0x18B2E8; // type:func HandleMbgMessage__FP3MBG5MSGIDPv = 0x18B340; // type:func FUN_0018b460 = 0x18B460; // type:func s_asnipLoadMbg = 0x264910; //////////////////////////////////////////////////////////////// // P2/memcard.c // TODO: Mangle function names. // NOTE: These can be incorrect as they are not found in the may prototype. //////////////////////////////////////////////////////////////// StartupMemcard__Fv = 0x18B580; // type:func InitMemcard__FP7MEMCARD = 0x18B5C0; // type:func FUN_0018b600__Fv = 0x18B600; // type:func CreateMemcardThread__FP7MEMCARDii = 0x18B670; // type:func SetMemcardThreadHighPrio__FP7MEMCARD = 0x18B720; // type:func FCheckMemcardThread__FP7MEMCARD = 0x18B770; // type:func FUN_0018b780 = 0x18B780; // type:func FUN_0018b910__Fi = 0x18B910; // type:func FUN_0018b930__Fi = 0x18B930; // type:func FUN_0018b988 = 0x18B988; // type:func FUN_0018bc90 = 0x18BC90; // type:func FUN_0018bd00 = 0x18BD00; // type:func InitSave__FP4SAVEii = 0x18BD58; // type:func UpdateSave__FP4SAVE = 0x18BDC8; // type:func CompareSaves__FP4SAVET0 = 0x18BFA8; // type:func FUN_0018c028 = 0x18C028; // type:func FUN_0018c178_FP4SAVEi = 0x18C178; // type:func FUN_0018c1a8 = 0x18C1A8; // type:func FUN_0018c1e8 = 0x18C1E8; // type:func FUN_0018c250 = 0x18C250; // type:func FUN_0018c420 = 0x18C420; // type:func FUN_0018c568 = 0x18C568; // type:func FUN_0018c638 = 0x18C638; // type:func FUN_0018c770 = 0x18C770; // type:func FUN_0018c7f8__FP4SAVE = 0x18C7F8; // type:func FUN_0018c888 = 0x18C888; // type:func FUN_0018c9c0 = 0x18C9C0; // type:func FUN_0018ca10 = 0x18CA10; // type:func load_sly_icon_from_disc = 0x18CDF8; // type:func load_file_from_disc = 0x18CC20; // type:func FUN_0018cdd8 = 0x18CDD8; // type:func FUN_0018cfc0 = 0x18CFC0; // type:func FUN_0018d028 = 0x18D028; // type:func FUN_0018d0a0 = 0x18D0A0; // type:func FUN_0018d168 = 0x18D168; // type:func FUN_0018d1f8 = 0x18D1F8; // type:func FUN_0018d228 = 0x18D228; // type:func FUN_0018d268 = 0x18D268; // type:func FUN_0018d2b0 = 0x18D2B0; // type:func FUN_0018d2e8 = 0x18D2E8; // type:func FUN_0018d328 = 0x18D328; // type:func FUN_0018d368 = 0x18D368; // type:func Clear__13CFileLocation = 0x18D410; // type:func s_savePath = 0x24b3b0; g_memcard = 0x269990; // size:0x14 g_save = 0x264A40; //////////////////////////////////////////////////////////////// // P2/memory.c //////////////////////////////////////////////////////////////// StartupMemMgr__Fv = 0x18D430; // type:func PvAllocGlobalImpl__Fi = 0x18D4B0; // type:func junk_0018D4F0 = 0x18D4F0; // type:label CheckForOutOfMemory__Fv = 0x18D4F8; // type:func PvAllocSwImpl__Fi = 0x18D500; // type:func FreeSw__Fv = 0x18D550; // type:func PvAllocSwCopyImpl__FiPv = 0x18D568; // type:func PvAllocSwClearImpl__Fi = 0x18D5C0; // type:func InitStackImpl__Fv = 0x18D608; // type:func PvAllocStackImpl__Fi = 0x18D658; // type:func PvAllocStackClearImpl__Fi = 0x18D6A8; // type:func FreeStackImpl__Fv = 0x18D6F0; // type:func malloc = 0x18D740; // type:func _malloc_r = 0x18D748; // type:func free = 0x18D750; // type:func __builtin_new = 0x18D758; // type:func __builtin_delete = 0x18D778; // type:func CopyAqw__FPvT0i = 0x18D780; // type:func CopyAb__FPvT0Ui = 0x18D800; // type:func s_pvGlobalMin = 0x2C2A10; // size:0x4 s_pvGlobalMac = 0x2C2A14; // size:0x4 s_pvWorldMin = 0x2C2A18; // size:0x4 s_pvWorldMac = 0x2C2A1C; // size:0x4 s_pvStackMin = 0x2C2A20; // size:0x4 s_pvStackMac = 0x2C2A24; // size:0x4 s_critsectStack = 0x2C2A28; // size:0xc s_ipvStackCur = 0x2C2A34; // size:0x4 s_apvStackMin = 0x2C2A38; // size:0x4 // TODO: Move elsewhere? g_pvHeapMin = 0x2699A4; // size:0x4 g_pvHeapMax = 0x2699A8; // size:0x4 D_0064C70F = 0x64C70F; // size:0x04 //////////////////////////////////////////////////////////////// // P2/missile.c //////////////////////////////////////////////////////////////// InitMissile__FP7MISSILE = 0x18D8E0; // type:func LoadMissileFromBrx__FP7MISSILEP18CBinaryInputStream = 0x18D910; // type:func OnMissileRemove__FP7MISSILE = 0x18D978; // type:func ProjectMissileTransform__FP7MISSILEfi = 0x18D9B8; // type:func FireMissile__FP7MISSILEP3ALOP6VECTOR = 0x18DA40; // type:func RenderMissileAll__FP7MISSILEP2CMP2RO = 0x18DB20; // type:func FUN_0018dc88 = 0x18DC88; // type:func FUN_0018dd50 = 0x18DD50; // type:func FUN_0018dd78 = 0x18DD78; // type:func InitAccmiss__FP7ACCMISS = 0x18DDA0; // type:func FireAccmiss__FP7ACCMISSP3ALOP6VECTOR = 0x18DDD8; // type:func PresetAccmissAccel__FP7ACCMISSf = 0x18DE70; // type:func FireSplmiss__FP7SPLMISSP3ALOP6VECTOR = 0x18DEE8; // type:func ProjectSplmissTransform__FP7SPLMISSfi = 0x18E040; // type:func s_asnipMissile = 0x2699b0; //////////////////////////////////////////////////////////////// // P2/mpeg.c //////////////////////////////////////////////////////////////// FUN_0018e410 = 0x18E410; // type:func FUN_0018e480 = 0x18E480; // type:func FUN_0018e4c0 = 0x18E4C0; // type:func FUN_0018e4f0 = 0x18E4F0; // type:func FUN_0018e558 = 0x18E558; // type:func StartupMpeg__Fv = 0x18E5E8; // type:func Init__15CQueueOutputIopii = 0x18E678; // type:func Reset__15CQueueOutputIop = 0x18E6A0; // type:func CbWrite__15CQueueOutputIopiPv = 0x18E6C0; // type:func CbSend__15CQueueOutputIopiPv = 0x18E7C0; // type:func Update__15CQueueOutputIop = 0x18E838; // type:func FAsyncDrain__15CQueueOutputIop = 0x18E8C0; // type:func CbWrite__15CQueueOutputIpuiPv = 0x18E8C8; // type:func FAsyncDrain__15CQueueOutputIpu = 0x18E938; // type:func Init__10CMpegAudio = 0x18E940; // type:func Reset__10CMpegAudio = 0x18EA48; // type:func Close__10CMpegAudio = 0x18EAA0; // type:func FAccept__10CMpegAudioiPUc = 0x18EAF8; // type:func Update__10CMpegAudio = 0x18EB98; // type:func FMpegAcceptVideo__FP7sceMpegP16sceMpegCbDataStrP5CMpeg = 0x18EC40; // type:func FMpegAcceptAudio__FP7sceMpegP16sceMpegCbDataStrP5CMpeg = 0x18EC80; // type:func FMpegDecodeVideo__FP7sceMpegP13sceMpegCbDataP5CMpeg = 0x18ECA8; // type:func FMpegDecoderIdle__FP7sceMpegP13sceMpegCbDataP5CMpeg = 0x18ED78; // type:func FMpegDecoderError__FP7sceMpegP13sceMpegCbDataP5CMpeg = 0x18EDA0; // type:func BuildMpegGifs__FP2QWP11sceIpuRGB32iiiii = 0x18EDA8; // type:func FUN_0018ef78 = 0x18EF78; // type:func FUN_0018f0e8 = 0x18F0E8; // type:func ExecuteOids__5CMpeg = 0x18F148; // type:func Execute__5CMpeg = 0x18F198; // type:func Start__5CMpegP18CBinaryAsyncStream = 0x18F448; // type:func FUN_0018f610__5CMpeg = 0x18F610; // type:func Update__5CMpeg = 0x18F6E8; // type:func Finish__5CMpeg = 0x18F7D0; // type:func CbDemuxed__5CMpegi = 0x18F890; // type:func junk_0018F938 = 0x18F938; // type:func mpeg__static_initialization_and_destruction_0 = 0x18F940; // type:func _GLOBAL_$I$g_mpeg = 0x18F968; // type:func g_mpeg = 0x269A00; //////////////////////////////////////////////////////////////// // P2/mrkv.c //////////////////////////////////////////////////////////////// InitMrkv__FP4MRKV = 0x18F988; // type:func //////////////////////////////////////////////////////////////// // P2/ms.c //////////////////////////////////////////////////////////////// RenderMsGlobset__FP2MSP2CMP2RO = 0x18F9D8; // type:func //////////////////////////////////////////////////////////////// // P2/murray.c //////////////////////////////////////////////////////////////// InitMurray__FP6MURRAY = 0x18FEF8; // type:func PostMurrayLoad__FP6MURRAY = 0x18FF28; // type:func FUN_0018ffb0 = 0x18FFB0; // type:func OnMurrayExitingSgs__FP6MURRAY3SGS = 0x1900A0; // type:func UpdateMurrayGoal__FP6MURRAYi = 0x190128; // type:func UpdateMurraySgs__FP6MURRAY = 0x190258; // type:func FUN_001903f0 = 0x1903F0; // type:func FUN_00190450 = 0x190450; // type:func FAbsorbMurrayWkr__FP6MURRAYP3WKR = 0x1904E0; // type:func FDetectMurray__FP6MURRAY = 0x190570; // type:func FCanMurrayAttack__FP6MURRAY = 0x190658; // type:func FUN_00190660 = 0x190660; // type:func SetMurrayPursueXfm__FP6MURRAYP3XFM = 0x1906E8; // type:func SetMurrayPatrolXfm__FP6MURRAYP3XFM = 0x1906F0; // type:func CollectMurrayPrize__FP6MURRAY3PCKP3ALO = 0x1906F8; // type:func FUN_00190740 = 0x190740; // type:func HandleMurrayMessage = 0x190770; // type:func //////////////////////////////////////////////////////////////// // P2/path.c //////////////////////////////////////////////////////////////// PcbspExtract__FP4CBSP = 0x1907E0; // type:func PcgtExtract__FP3CGT = 0x1907F0; // type:func PcgtPointInCbspQuick__FP4CBSPP6VECTOR = 0x190810; // type:func PcgtPointInCbspSafe__FP4CBSPP6VECTOR = 0x1908C0; // type:func CbskFromG__Ff = 0x1909B0; // type:func ClsgClipEdgeToCbsp__FP4CBSPP6VECTORT1iP3LSG = 0x1909F0; // type:func FClipEdgeToCbsp__FP4CBSPP6VECTORT1 = 0x190E30; // type:func IcgvFromPcgv__FP2CGP3CGV = 0x190EA8; // type:func FindPathAStar__FP2CGP3CGVT1iPiPP3CGV = 0x190EB8; // type:func SimplifyApcgvNeighbor__FP4CBSPPiPP3CGV = 0x191128; // type:func CposFindPath__FP2CGP6VECTORT1iT1 = 0x191290; // type:func FindClosestPointInCg__FP2CGP6VECTORT1 = 0x191570; // type:func LoadPathzoneFromBrx__FP8PATHZONEP18CBinaryInputStream = 0x1916D0; // type:func HookupCg__FP2CG = 0x1919F8; // type:func CposFindPathzonePath__FP8PATHZONEP6VECTORT1iT1 = 0x191A68; // type:func FindPathzoneClosestPoint__FP8PATHZONEP6VECTORT1 = 0x191A88; // type:func FUN_00191aa8 = 0x191AA8; // type:func FUN_00191ac8 = 0x191AC8; // type:func ChoosePathzoneRandomPoint__FP8PATHZONEP6VECTOR = 0x191C78; // type:func //////////////////////////////////////////////////////////////// // P2/phasemem.c //////////////////////////////////////////////////////////////// SetPhase__F5PHASE = 0x191E70; // type:func ClearPhase__F5PHASE = 0x191EB0; // type:func g_phase = 0x269ba4; // size:0x4 //////////////////////////////////////////////////////////////// // P2/pipe.c //////////////////////////////////////////////////////////////// StartupPipe__Fv = 0x191EC0; // type:func ResetPipeList__Fv = 0x191EE8; // type:func InitPipe__FP4PIPE = 0x191F08; // type:func OnPipeAdd__FP4PIPE = 0x191F68; // type:func OnPipeRemove__FP4PIPE = 0x191FA0; // type:func PostPipeLoad__FP4PIPE = 0x191FD8; // type:func ClonePipe__FP4PIPET0 = 0x192020; // type:func g_dlPipe = 0x269BA8; //////////////////////////////////////////////////////////////// // P2/pnt.c //////////////////////////////////////////////////////////////// LoadPntFromBrx__FP3PNTP18CBinaryInputStream = 0x192068; // type:func GetPntPos__FP3PNTP6VECTOR = 0x1920B0; // type:func SetPntParent__FP3PNTP3ALO = 0x1920E0; // type:func ApplyPntProxy__FP3PNTP5PROXY = 0x192128; // type:func FUN_00192150__FP3PNTP18CBinaryInputStream = 0x192150; // type:func FUN_00192190__FP3PNT = 0x192190; // type:func //////////////////////////////////////////////////////////////// // P2/po.c //////////////////////////////////////////////////////////////// InitPo__FP2PO = 0x1921A8; // type:func ClonePo__FP2POT0 = 0x1921E8; // type:func HandlePoMessage__FP2PO5MSGIDPv = 0x192230; // type:func OnPoActive__FP2POiT0 = 0x1922E8; // type:func GetPoCpdefi__FP2POfP6CPDEFI = 0x192380; // type:func FIsPoSoundBase__FP2PO = 0x192410; // type:func MakePoActive__FP2PO = 0x192418; // type:func FInvulnerablePo__FP2PO3ZPK = 0x192450; // type:func FTakePoDamage__FP2POP3ZPR = 0x192488; // type:func JthsCurrentPo__FP2PO = 0x192490; // type:func FUN_00192498 = 0x192498; // type:func CollectPoPrize__FP2PO3PCKP3ALO = 0x1924C8; // type:func FUN_001925C0 = 0x1925C0; // type:func PpoCur__Fv = 0x1925F0; // type:func PpoStart__Fv = 0x192620; // type:func _IppoFindPo__FP2PO = 0x192688; // type:func AddPoToList__FP2PO = 0x1926D0; // type:func RemovePoFromList__FP2PO = 0x192780; // type:func OnPoAdd__FP2PO = 0x192820; // type:func OnPoRemove__FP2PO = 0x192850; // type:func SwitchToIppo__Fi = 0x192880; // type:func junk_00192988 = 0x192988; // type:func SetPoPlayable__FP2POi = 0x192990; // type:func SwitchToPo__FP2PO = 0x1929D0; // type:func PpziCur__Fv = 0x1929F8; // type:func GetPoDiapi__FP2POP6DIALOGP5DIAPI = 0x192A28; // type:func PlayPoDialog__FP2POP6DIALOG = 0x192A38; // type:func FUN_00192a70 = 0x192A70; // type:func UpdatePo__FP2POf = 0x192B58; // type:func UsePoCharm__FP2PO = 0x192C58; // type:func FUN_00192dd0 = 0x192DD0; // type:func FUN_001930B0 = 0x1930B0; // type:func po__static_initialization_and_destruction_04 = 0x1930B8; // type:func _GLOBAL_$I$InitPo__FP2PO = 0x1931F0; // type:func g_ippoCur = 0x269BCC; // size:0x4 g_appo = 0x269C98; // size:0x4 //////////////////////////////////////////////////////////////// // P2/prog.c //////////////////////////////////////////////////////////////// __5CProgP4RGBAN31 = 0x193210; // type:func Begin__5CProg = 0x193270; // type:func SetRemain__5CProgi = 0x193288; // type:func End__5CProg = 0x193300; // type:func Draw__5CProg = 0x193318; // type:func //////////////////////////////////////////////////////////////// // P2/proxy.c //////////////////////////////////////////////////////////////// InitProxy__FP5PROXY = 0x1963D8; // type:func LoadProxyFromBrx__FP5PROXYP18CBinaryInputStream = 0x196410; // type:func CloneProxy__FP5PROXYT0 = 0x196810; // type:func PostProxyLoad__FP5PROXY = 0x196900; // type:func //////////////////////////////////////////////////////////////// // P2/puffer.c //////////////////////////////////////////////////////////////// InitPuffer__FP6PUFFER = 0x196938; // type:func LoadPufferFromBrx__FP6PUFFERP18CBinaryInputStream = 0x1969C0; // type:func PostPufferLoad__FP6PUFFER = 0x1969F8; // type:func PresetPufferAccel__FP6PUFFERf = 0x196B78; // type:func FFilterPuffer__FP6PUFFERP2SO = 0x196E48; // type:func UpdatePuffer__FP6PUFFERf = 0x196EB0; // type:func PpufftChoosePuffer__FP6PUFFER = 0x1971B8; // type:func FUN_001973d8 = 0x1973D8; // type:func FUN_00197458 = 0x197458; // type:func OnPufferActive__FP6PUFFERiP2PO = 0x1974D8; // type:func UpdatePufferActive__FP6PUFFERP3JOYf = 0x1974F8; // type:func FUN_00197788 = 0x197788; // type:func FUN_00197848 = 0x197848; // type:func FUN_00197a08 = 0x197A08; // type:func FUN_00197a68 = 0x197A68; // type:func AddPufferWaterAcceleration__FP6PUFFERP5WATERf = 0x197A88; // type:func HandlePufferMessage__FP6PUFFER5MSGIDPv = 0x197F10; // type:func PostPuffcLoad__FP5PUFFC = 0x198090; // type:func PresetPuffcAccel__FP5PUFFCf = 0x1980B0; // type:func FUN_001982a0 = 0x1982A0; // type:func UpdatePuffcGoal__FP5PUFFCi = 0x198318; // type:func OnPuffcExitingSgs__FP5PUFFC3SGS = 0x1984B8; // type:func OnPuffcEnteringSgs__FP5PUFFC3SGSP4ASEG = 0x198530; // type:func UpdatePuffcSgs__FP5PUFFC = 0x198570; // type:func HandlePuffcMessage__FP5PUFFC5MSGIDPv = 0x1986E8; // type:func UpdatePuffc__FP5PUFFCf = 0x198760; // type:func FCanPuffcAttack__FP5PUFFC = 0x198858; // type:func FUN_00198860 = 0x198860; // type:func PostPuffbLoad__FP5PUFFB = 0x198920; // type:func //////////////////////////////////////////////////////////////// // P2/pzo.c //////////////////////////////////////////////////////////////// InitSprize__FP6SPRIZE = 0x198980; // type:func LoadSprizeFromBrx__FP6SPRIZEP18CBinaryInputStream = 0x1989B0; // type:func BindSprize__FP6SPRIZE = 0x198A88; // type:func PostSprizeLoad__FP6SPRIZE = 0x198B28; // type:func UpdateSprize__FP6SPRIZEf = 0x198BD8; // type:func CollectSprize__FP6SPRIZE = 0x198DA8; // type:func EmitSprizeExplosion__FP6SPRIZE = 0x198E58; // type:func PcsFromSprize__FP6SPRIZE = 0x198E98; // type:func AddSprizeAseg__FP6SPRIZE3OID = 0x198ED8; // type:func HandleSprizeMessage__FP6SPRIZE5MSGIDPv = 0x198EF8; // type:func FIgnoreSprizeIntersection__FP6SPRIZEP2SO = 0x198FB0; // type:func FUN_00199000 = 0x199000; // type:func InitScprize__FP7SCPRIZE = 0x199070; // type:func CloneScprize__FP7SCPRIZET0 = 0x1990A8; // type:func PcsFromScprize__FP7SCPRIZE = 0x1990E0; // type:func CollectScprize__FP7SCPRIZE = 0x199138; // type:func LoadLockFromBrx__FP4LOCKP18CBinaryInputStream = 0x199170; // type:func PostLockLoad__FP4LOCK = 0x1991A8; // type:func LoadLockgFromBrx__FP5LOCKGP18CBinaryInputStream = 0x1991E0; // type:func PostLockgLoad__FP5LOCKG = 0x199218; // type:func SetLockgIndex__FP5LOCKGi = 0x199380; // type:func AddLockgLock__FP5LOCKG3OID = 0x199398; // type:func TriggerLockg__FP5LOCKG = 0x1993C0; // type:func InitClue__FP4CLUE = 0x1993F0; // type:func LoadClueFromBrx__FP4CLUEP18CBinaryInputStream = 0x199428; // type:func CloneClue__FP4CLUET0 = 0x1994C8; // type:func PostClueLoad__FP4CLUE = 0x199500; // type:func UpdateClue = 0x199698; // type:func OnClueSmack__FP4CLUE = 0x199850; // type:func CollectClue__FP4CLUE = 0x1999D0; // type:func BreakClue__FP4CLUE = 0x199AF0; // type:func CollectClueSilent__FP4CLUE = 0x199B18; // type:func FUN_00199c10 = 0x199C10; // type:func ImpactClue__FP4CLUEi = 0x199C58; // type:func FAbsorbClueWkr__FP4CLUEP3WKR = 0x199C78; // type:func RenderClueAll__FP4CLUEP2CMP2RO = 0x199D08; // type:func CollectAllClues__Fi = 0x199F38; // type:func SetGrfvault__Fi = 0x199FF0; // type:func FUN_0019a000 = 0x19A000; // type:func FUN_0019a088 = 0x19A088; // type:func FUN_0019a0f0 = 0x19A0F0; // type:func InitVault__FP5VAULT = 0x19A148; // type:func PostTmblLoad__FP4TMBL3OID = 0x19A178; // type:func PostVaultLoad__FP5VAULT = 0x19A1E0; // type:func OnVaultActive__FP5VAULTiP2PO = 0x19A520; // type:func UpdateVaultActive__FP5VAULTP3JOYf = 0x19A6A8; // type:func HandleVaultMessage__FP5VAULT5MSGIDPv = 0x19AB78; // type:func AddVaultGoadDialog__FP5VAULT5GOADK3OID = 0x19AD30; // type:func OpenVault__FP5VAULT = 0x19AD68; // type:func //////////////////////////////////////////////////////////////// // P2/rail.c //////////////////////////////////////////////////////////////// InitRail__FP4RAIL = 0x19AF00; // type:func OnRailAdd__FP4RAIL = 0x19AF38; // type:func OnRailRemove__FP4RAIL = 0x19AF70; // type:func PostLoadRail__FP4RAIL = 0x19AFA8; // type:func CloneRail__FP4RAILT0 = 0x19AFF0; // type:func D_0024C8C4 = 0x24C8C4; // size:0x4 //////////////////////////////////////////////////////////////// // P2/rat.c //////////////////////////////////////////////////////////////// InitRat__FP3RAT = 0x19B038; // type:func LoadRatFromBrx__FP3RATP18CBinaryInputStream = 0x19B0A0; // type:func PostRatLoad__FP3RAT = 0x19B188; // type:func OnRatAdd__FP3RAT = 0x19B1E0; // type:func OnRatRemove__FP3RAT = 0x19B218; // type:func CloneRat__FP3RATT0 = 0x19B250; // type:func PresetRatAccel__FP3RATf = 0x19B298; // type:func UpdateRat__FP3RATf = 0x19B378; // type:func AdjustRatNewXp__FP3RATP2XPi = 0x19BB10; // type:func AdjustRatXpVelocity__FP3RATP2XPi = 0x19BB90; // type:func RenderRatAll__FP3RATP2CMP2RO = 0x19BC40; // type:func FAbsorbRatWkr__FP3RATP3WKR = 0x19BE08; // type:func ChooseRatFleeTarget__FP3RAT = 0x19BE80; // type:func HideRat__FP3RATi = 0x19C068; // type:func SetRatRats__FP3RAT4RATS = 0x19C1C0; // type:func OnRatholeAdd__FP7RATHOLE = 0x19C3D0; // type:func OnRatholeRemove__FP7RATHOLE = 0x19C408; // type:func //////////////////////////////////////////////////////////////// // P2/rchm.c //////////////////////////////////////////////////////////////// InitRchm__FP4RCHM = 0x19C440; // type:func LoadRchmFromBrx__FP4RCHMP18CBinaryInputStream = 0x19C470; // type:func PostRchmLoad__FP4RCHM = 0x19C728; // type:func ReblendRchm__FP4RCHMP3TWRP6VECTOR = 0x19C9C8; // type:func BuildRchmCoefficients__FP4RCHMfffPf = 0x19CC10; // type:func ConvertRchmIposToRclIoLhub__FP4RCHMiPfN22 = 0x19CD90; // type:func SetRchmNaturalCoefficients__FP4RCHMfff = 0x19CE28; // type:func SetRchmCenterCoefficients__FP4RCHMfff = 0x19CE38; // type:func PredictRchmTargetPos__FP4RCHMP6TARGETfP6VECTOR = 0x19CE50; // type:func PredictRchmTargetLocalPos__FP4RCHMP6TARGETfP6VECTOR = 0x19CEC0; // type:func PtwrMapRchmSafe__FP4RCHMP3BSPP6VECTOR = 0x19CF68; // type:func FindRchmClosestPoint__FP4RCHMP6VECTORT1PP3TWRPf = 0x19D0E0; // type:func TrackJtTarget__FP2JTP4RCHMP6TARGET = 0x19D2A8; // type:func TrackJtPipe__FP2JTP4RCHMP4PIPEPf = 0x19D338; // type:func //////////////////////////////////////////////////////////////// // P2/render.c //////////////////////////////////////////////////////////////// SubmitRpl__FP3RPL = 0x19D410; // type:func NCmpPrplReverseZ__FPP3RPLT0 = 0x19D468; // type:func CprplPartitionArpl__FiP3RPLPP3RPL = 0x19D4B0; // type:func RenderSw__FP2SWP2CM = 0x19D6C0; // type:func EnsureRenderGlobals__Fv = 0x19D860; // type:func EnsureCameraGlobals__Fv = 0x19D930; // type:func EnsureScreenCleared__Fv = 0x19D968; // type:func SetupRpDynamicTexture__FP3RPL = 0x19DA30; // type:func SetupRpBackground__FP3RPL = 0x19DA60; // type:func SetupRpBlotContext__FP3RPL = 0x19DAD8; // type:func SetupRpGlob__FP3RPL = 0x19DB20; // type:func SetupRpBlip__FP3RPL = 0x19DB68; // type:func SetupRpWorldMap__FP3RPL = 0x19DBB0; // type:func DrawSw__FP2SWP2CM = 0x19DC98; // type:func FillScreenRect__FiiiiffffP4GIFS = 0x19DDA0; // type:func StartupRender__Fv = 0x19DF48; // type:func s_fFBCleared = 0x604780; // size:0x4 s_fZBCleared = 0x604784; // size:0x4 s_fCameraGlobals = 0x604788; // size:0x4 s_fRenderGlobals = 0x60478c; // size:0x4 //////////////////////////////////////////////////////////////// // P2/rip.c //////////////////////////////////////////////////////////////// PripgNew__FP2SW5RIPGT = 0x19E040; // type:func InitRipg__FP4RIPG = 0x19E0B8; // type:func SetRipgEmitb__FP4RIPGP5EMITB = 0x19E158; // type:func OnRipgRemove__FP4RIPG = 0x19E168; // type:func ProjectRipgTransform__FP4RIPGfi = 0x19E220; // type:func UpdateRipgBounds__FP4RIPG = 0x19E418; // type:func FUN_0019e420 = 0x19E420; // type:func BounceRipgRips__FP4RIPG = 0x19E558; // type:func RenderRipgSelf__FP4RIPGP2CMP2RO = 0x19E848; // type:func PvtripFromRipt__F4RIPT = 0x19E908; // type:func PripNewRipg__F4RIPTP4RIPG = 0x19EA78; // type:func InitRip__FP3RIPP6VECTORfP2SO = 0x19EB28; // type:func RemoveRip__FP3RIP = 0x19EBE8; // type:func AddRipRef__FP3RIP = 0x19EC20; // type:func ReleaseRip__FP3RIP = 0x19EC30; // type:func TouchRip__FP3RIPi = 0x19ECE0; // type:func ForceRipFade__FP3RIPf = 0x19ED00; // type:func FBounceRip__FP3RIPP2SOP6VECTORT2 = 0x19ED58; // type:func ProjectRipTransform__FP3RIPf = 0x19F390; // type:func UpdateRip__FP3RIPf = 0x19F560; // type:func FRenderRipPosMat__FP3RIPP2CMP6VECTORP7MATRIX3 = 0x19F620; // type:func RenderRip__FP3RIPP2CM = 0x19F858; // type:func SubscribeRipObject__FP3RIPP2LO = 0x19F8E8; // type:func SubscribeRipStruct__FP3RIPPFPv5MSGIDPv_vPv = 0x19F918; // type:func UnsubscribeRipStruct__FP3RIPPFPv5MSGIDPv_vPv = 0x19F950; // type:func InitDroplet__FP7DROPLETP6VECTORfP2SO = 0x19F988; // type:func TouchDroplet__FP7DROPLETi = 0x19F9D0; // type:func InitBublet__FP6BUBLETP6VECTORfP2SO = 0x19FA98; // type:func ProjectBubletTransform__FP6BUBLETf = 0x19FB08; // type:func TouchBublet__FP6BUBLETi = 0x19FCE8; // type:func InitRipple__FP6RIPPLEP6VECTORfP2SO = 0x19FD08; // type:func InitPuff__FP4PUFFP6VECTORfP2SO = 0x19FD70; // type:func InitDablet__FP6DABLETP6VECTORfP2SO = 0x19FDC0; // type:func InitFlake__FP5FLAKEP6VECTORfP2SO = 0x19FE10; // type:func UpdateFlake__FP5FLAKEf = 0x19FE50; // type:func RenderFlake__FP5FLAKEP2CM = 0x19FF20; // type:func TouchFlake__FP5FLAKEi = 0x1A0020; // type:func InitSpark__FP5SPARKP6VECTORfP2SO = 0x1A0040; // type:func RenderSpark__FP5SPARKP2CM = 0x1A00A0; // type:func InitBurst__FP5BURSTP6VECTORfP2SO = 0x1A01B8; // type:func InitTrail__FP5TRAILP6VECTORfP2SO = 0x1A0258; // type:func OnTrailRemove__FP5TRAIL = 0x1A0318; // type:func SetTrailTrls__FP5TRAIL4TRLSPv = 0x1A0338; // type:func DetachTrail__FP5TRAIL = 0x1A04A0; // type:func ProjectTrailTransform__FP5TRAILf = 0x1A05D8; // type:func RenderTrail__FP5TRAILP2CM = 0x1A0758; // type:func HandleTrailMessage__FP5TRAIL5MSGIDPv = 0x1A0950; // type:func InitFireball__FP8FIREBALLP6VECTORfP2SO = 0x1A09C0; // type:func UpdateFireball__FP8FIREBALLf = 0x1A0A78; // type:func InitSmokecloud__FP10SMOKECLOUDP6VECTORfP2SO = 0x1A0B20; // type:func InitSmoketrail__FP10SMOKETRAILP6VECTORfP2SO = 0x1A0BA0; // type:func InitDebris__FP6DEBRISP6VECTORfP2SO = 0x1A0C50; // type:func InitSmack__FP5SMACKP6VECTORfP2SO = 0x1A0C98; // type:func ProjectSmackTransform__FP5SMACKf = 0x1A0D60; // type:func RenderSmack__FP5SMACKP2CM = 0x1A0DF0; // type:func UpdateSmack__FP5SMACKf = 0x1A0F88; // type:func InitOrbit__FP5ORBITP6VECTORfP2SO = 0x1A0FE8; // type:func junk_001A1028 = 0x1A1028; // type:func ProjectOrbitTransform__FP5ORBITf = 0x1A1030; // type:func UpdateOrbit__FP5ORBITf = 0x1A11C0; // type:func RenderOrbit__FP5ORBITP2CM = 0x1A1398; // type:func InitRay__FP3RAYP6VECTORfP2SO = 0x1A1410; // type:func InitRose__FP4ROSEP6VECTORfP2SO = 0x1A1458; // type:func ProjectRoseTransform__FP4ROSEf = 0x1A1498; // type:func UpdateRose__FP4ROSEf = 0x1A14A0; // type:func RenderRose__FP4ROSEP2CM = 0x1A15D8; // type:func SetRoseRoses__FP4ROSE5ROSES = 0x1A1DF0; // type:func SgnCmpHp__FPCvT0 = 0x1A1F18; // type:func ChpBuildConvexHullScreen__FP6VECTORiP2HP = 0x1A1F40; // type:func ChpBuildConvexHullXY__FP7MATRIX4iP2HP = 0x1A2070; // type:func PostFlyingEmit__FP6FLYINGP5EMITB = 0x1A22C8; // type:func RenderFlying__FP6FLYINGP2CM = 0x1A22E0; // type:func CreateStuck__FP3RIPP3ALOP2SOP6VECTORT3PP5STUCK = 0x1A2380; // type:func FBounceFlying__FP6FLYINGP2SOP6VECTORT2 = 0x1A25F0; // type:func UpdateStuck__FP5STUCKf = 0x1A26B0; // type:func RenderStuck__FP5STUCKP2CM = 0x1A26F8; // type:func PostLeafEmit__FP4LEAFP5EMITB = 0x1A2770; // type:func ProjectLeafTransform__FP4LEAFf = 0x1A2830; // type:func FBounceLeaf__FP4LEAFP2SOP6VECTORT2 = 0x1A2A68; // type:func FFilterFlameObjects__FPvP2SO = 0x1A2B18; // type:func PostFlameEmit__FP5FLAMEP5EMITB = 0x1A2B48; // type:func PostBulletEmit__FP6BULLETP5EMITB = 0x1A2D30; // type:func RenderBullet__FP6BULLETP2CM = 0x1A2D88; // type:func FBounceBullet__FP6BULLETP2SOP6VECTORT2 = 0x1A2E68; // type:func PostShrapnelEmit__FP8SHRAPNELP5EMITB = 0x1A3008; // type:func FBounceShrapnel__FP8SHRAPNELP2SOP6VECTORT2 = 0x1A3128; // type:func RenderShrapnel__FP8SHRAPNELP2CM = 0x1A31A0; // type:func InitGlint__FP5GLINTP6VECTORfP2SO = 0x1A31F0; // type:func RenderGlint__FP5GLINTP2CM = 0x1A3250; // type:func InitMatch__FP5MATCHP6VECTORfP2SO = 0x1A3598; // type:func LaunchMatch__FP5MATCH = 0x1A35F0; // type:func ProjectMatchTransform__FP5MATCHf = 0x1A3730; // type:func UpdateMatch__FP5MATCHf = 0x1A38F0; // type:func RenderMatch__FP5MATCHP2CM = 0x1A3990; // type:func PostRemitEmit__FP5REMITP5EMITB = 0x1A39C8; // type:func UpdateRemit__FP5REMITf = 0x1A3A18; // type:func junk_001A3AC8 = 0x1A3AC8; // type:func //////////////////////////////////////////////////////////////// // P2/rog.c //////////////////////////////////////////////////////////////// InitRov__FP3ROV = 0x1A3AE0; // type:func LoadRovFromBrx__FP3ROVP18CBinaryInputStream = 0x1A3B20; // type:func PostRovLoad__FP3ROV = 0x1A3B58; // type:func UpdateRovActive__FP3ROVP3JOYf = 0x1A3C40; // type:func UpdateRov__FP3ROVf = 0x1A3D40; // type:func ReadRovJoystick__FP3ROVP3JOY = 0x1A3F40; // type:func RovsNextRov__FP3ROV = 0x1A3FE0; // type:func SetRovRovs__FP3ROV4ROVS = 0x1A4070; // type:func RovtsNextRov__FP3ROV = 0x1A4258; // type:func SetRovRovts__FP3ROV5ROVTS = 0x1A42C8; // type:func HandleRovMessage__FP3ROV5MSGIDPv = 0x1A43C8; // type:func PresetRovAccel__FP3ROVf = 0x1A44E8; // type:func AdjustRovXpVelocity__FP3ROVP2XPi = 0x1A4538; // type:func AdjustRovNewXp__FP3ROVP2XPi = 0x1A45B8; // type:func PropagateRovForce__FP3ROViP2XPiP2DZP2FX = 0x1A4610; // type:func FIsRovSoundBase__FP3ROV = 0x1A4710; // type:func InitRob__FP3ROB = 0x1A4718; // type:func SetRobCollectible__FP3ROB3OID = 0x1A4858; // type:func SetRobHarvester__FP3ROB3OID = 0x1A4860; // type:func SetRobVehicle__FP3ROB3OID = 0x1A4868; // type:func SetRobPrize__FP3ROB3OID = 0x1A4870; // type:func AddRobSpawnTunnel__FP3ROB3OID = 0x1A4878; // type:func RobkCur__Fv = 0x1A4898; // type:func BindRob__FP3ROB = 0x1A48C0; // type:func PostRobLoad__FP3ROB = 0x1A4B30; // type:func UpdateRob__FP3ROBf = 0x1A4C48; // type:func FUN_001a4d60 = 0x1A4D60; // type:func RobsNextRob__FP3ROB = 0x1A4DC0; // type:func SetRobRobs__FP3ROB4ROBS = 0x1A4EF0; // type:func AddRobRoc__FP3ROB = 0x1A5120; // type:func AddRobRoh__FP3ROB = 0x1A54F8; // type:func AdjustRobDifficulty__FP3ROBf = 0x1A5760; // type:func DestroyedRobRoc__FP3ROBP3ROC = 0x1A5B28; // type:func SpawnedRobRoh__FP3ROBP3ROH = 0x1A5C38; // type:func GrabbedRobRoh__FP3ROBP3ROH = 0x1A5C90; // type:func DroppedRobRoh__FP3ROBP3ROH = 0x1A5D50; // type:func ReturnedRobRoh__FP3ROBP3ROH = 0x1A5DD8; // type:func ExitedRobRoh__FP3ROBP3ROH = 0x1A5DF8; // type:func KilledRobRoh__FP3ROBP3ROH = 0x1A5F78; // type:func FChooseRobRoc__FP3ROBP3ROH = 0x1A6090; // type:func TakeRobRoc__FP3ROBP3ROHP3ROC = 0x1A6168; // type:func FChooseRobRoh__FP3ROBP3ROC = 0x1A6238; // type:func FChooseRobReturnPoint__FP3ROBP3ROH = 0x1A6328; // type:func ChooseRobWanderLocation__FP3ROBP3ROH = 0x1A63F8; // type:func ProddCurRob__FP3ROB4ENSK = 0x1A6480; // type:func InitRoh__FP3ROH = 0x1A6498; // type:func LoadRohFromBrx__FP3ROHP18CBinaryInputStream = 0x1A64F8; // type:func CloneRoh__FP3ROHT0 = 0x1A6540; // type:func PostRohLoad__FP3ROH = 0x1A6588; // type:func UpdateRoh__FP3ROHf = 0x1A65C8; // type:func MoveRohToTarget__FP3ROHP6VECTORi = 0x1A6788; // type:func RohsNextRoh__FP3ROH = 0x1A69F8; // type:func SetRohRohs__FP3ROH4ROHS = 0x1A6BE0; // type:func FAbsorbRohWkr__FP3ROHP3WKR = 0x1A6DE0; // type:func ProcContactRoh__FP3ROH = 0x1A6F28; // type:func InitRoc__FP3ROC = 0x1A6F88; // type:func LoadRocFromBrx__FP3ROCP18CBinaryInputStream = 0x1A7008; // type:func CloneRoc__FP3ROCT0 = 0x1A7050; // type:func PostRocLoad__FP3ROC = 0x1A7098; // type:func UpdateRoc__FP3ROCf = 0x1A7128; // type:func PresetRocAccel__FP3ROCf = 0x1A7230; // type:func AdjustRocNewXp__FP3ROCP2XPi = 0x1A7290; // type:func FAbsorbRocWkr__FP3ROCP3WKR = 0x1A72B0; // type:func RocsNextRoc__FP3ROC = 0x1A7420; // type:func SetRocRocs__FP3ROC4ROCS = 0x1A7480; // type:func InitRost__FP4ROST = 0x1A7520; // type:func LoadRostFromBrx__FP4ROSTP18CBinaryInputStream = 0x1A7550; // type:func CloneRost__FP4ROSTT0 = 0x1A7588; // type:func PostRostLoad__FP4ROST = 0x1A75D0; // type:func UpdateRost__FP4ROSTf = 0x1A7648; // type:func RostsNextRost__FP4ROST = 0x1A7698; // type:func SetRostRosts__FP4ROST5ROSTS = 0x1A76A0; // type:func InitRop__FP3ROP = 0x1A7708; // type:func LoadRopFromBrx__FP3ROPP18CBinaryInputStream = 0x1A7750; // type:func PostRopLoad__FP3ROP = 0x1A7798; // type:func UpdateRop__FP3ROPf = 0x1A7800; // type:func SetRopRops__FP3ROP4ROPS = 0x1A7998; // type:func RopsNextRop__FP3ROP = 0x1A7AA0; // type:func s_asnipLoadRov = 0x26B778; //////////////////////////////////////////////////////////////// // P2/rumble.c //////////////////////////////////////////////////////////////// InitRumble__FP6RUMBLEii = 0x1A7B20; // type:func UpdateRumble__FP6RUMBLE = 0x1A7B88; // type:func TriggerRumbleRumk__FP6RUMBLE4RUMKf = 0x1A7CE8; // type:func TriggerRumbleRumpat__FP6RUMBLEP6RUMPATf = 0x1A7D18; // type:func SetRumbleRums__FP6RUMBLE4RUMS = 0x1A7D98; // type:func StopRumbleActuators__FP6RUMBLE = 0x1A7E40; // type:func FUN_001A7E70__Fv = 0x1A7E70; // type:func FUN_001A7E90 = 0x1A7E90; // type:func FUN_001A7EE8 = 0x1A7EE8; // type:func FUN_001A7F50 = 0x1A7F50; // type:func DAT_0026c3dc = 0x26C3DC; //////////////////////////////////////////////////////////////// // P2/rwm.c //////////////////////////////////////////////////////////////// InitRwm__FP3RWM = 0x1A7FE8; // type:func OnRwmRemove = 0x1A80E0; // type:func FUN_001a8110 = 0x1A8110; // type:func FUN_001a8150 = 0x1A8150; // type:func InitRwmCallback__FP3RWM5MSGIDPv = 0x1A8208; // type:func FUN_001a84c8 = 0x1A84C8; // type:func PostRwmLoad__FP3RWM = 0x1A8590; // type:func FUN_001a86f8 = 0x1A86F8; // type:func PrwcFindRwm__FP3RWM3OID = 0x1A8718; // type:func EnableRwmRwc__FP3RWM3OID = 0x1A8778; // type:func DisableRwmRwc__FP3RWM3OID = 0x1A87A8; // type:func ResizeRwmRwc__FP3RWM3OIDi = 0x1A87E0; // type:func FIsRwmAmmo__FP3RWMP2SO = 0x1A8820; // type:func FAvailableRwmAmmo__FP3RWMP2SO = 0x1A88A0; // type:func CycleRwmCache__FP3RWM = 0x1A89E8; // type:func ReloadRwm__FP3RWM = 0x1A8AF8; // type:func FEnsureRwmLoaded__FP3RWM = 0x1A8C50; // type:func FFireRwm__FP3RWMi = 0x1A8C90; // type:func FUN_001a93c8 = 0x1A93C8; // type:func ClearRwmFireInfo__FP3RWM = 0x1A93E8; // type:func ClearRwmTargetInfo__FP3RWM = 0x1A9438; // type:func ClearRwmAimConstraints__FP3RWM = 0x1A9498; // type:func GetRwfiPosMat__FP4RWFIP6VECTORP7MATRIX3 = 0x1A94C0; // type:func GetRwtiPos__FP4RWTIP6VECTORT1 = 0x1A95D0; // type:func GetRwacPan__FP4RWACPf = 0x1A97C8; // type:func GetRwacTilt__FP4RWACPf = 0x1A9868; // type:func //////////////////////////////////////////////////////////////// // P2/sb.c //////////////////////////////////////////////////////////////// PostSbgLoad__FP3SBG = 0x1A98F8; // type:func FUN_001a9928__FP3SBG = 0x1A9928; // type:func UpdateSbgGoal__FP3SBGi = 0x1A9960; // type:func UpdateSbgSgs__FP3SBG = 0x1A99B8; // type:func OnSbgEnteringSgs__FP3SBG3SGSP4ASEG = 0x1A99F8; // type:func UpdateSbg__FP3SBGf = 0x1A9A40; // type:func FUN_001a9a98 = 0x1A9A98; // type:func FAbsorbSbgWkr__FP3SBGP3WKR = 0x1A9AE8; // type:func FUN_001a9c58 = 0x1A9C58; // type:func //////////////////////////////////////////////////////////////// // P2/screen.c //////////////////////////////////////////////////////////////// StartupScreen__Fv = 0x1A9C68; // type:func PostBlotsLoad__Fv = 0x1A9F78; // type:func UpdateBlots__Fv = 0x1A9FD0; // type:func ForceHideBlots__Fv = 0x1AA060; // type:func ResetBlots__Fv = 0x1AA0C0; // type:func RenderBlots__Fv = 0x1AA110; // type:func DrawBlots__Fv = 0x1AA178; // type:func InitBlot__FP4BLOT5BLOTK = 0x1AA1F0; // type:func PostBlotLoad__FP4BLOT = 0x1AA268; // type:func UpdateBlot__FP4BLOT = 0x1AA298; // type:func SetBlotAchzDraw__FP4BLOTPc = 0x1AA4F0; // type:func SetBlotRgba__FP4BLOTUi = 0x1AA5A0; // type:func SetBlotFontScale__FfP4BLOT = 0x1AA788; // type:func DrawBlot__FP4BLOT = 0x1AA790; // type:func junk_001AA890 = 0x1AA890; // type:func DtAppearBlot__FP4BLOT = 0x1AA898; // type:func DtVisibleBlot__FP4BLOT = 0x1AA8A0; // type:func DtDisappearBlot__FP4BLOT = 0x1AA8A8; // type:func SetBlotDtAppear__FP4BLOTf = 0x1AA8B0; // type:func SetBlotDtVisible__FP4BLOTf = 0x1AA8B8; // type:func SetBlotDtDisappear__FP4BLOTf = 0x1AA8C0; // type:func OnBlotReset__FP4BLOT = 0x1AA8C8; // type:func ShowBlot__FP4BLOT = 0x1AA8F0; // type:func HideBlot__FP4BLOT = 0x1AA958; // type:func SetBlotBlots__FP4BLOT5BLOTS = 0x1AA998; // type:func FIncludeBlotForPeg__FP4BLOTT0 = 0x1AAAC8; // type:func ResizeBlot__FP4BLOTff = 0x1AAB20; // type:func RepositionBlot__FP4BLOT = 0x1AAB60; // type:func RepositionBlotDependents__FP4BLOT = 0x1AAEC0; // type:func SetBlotClock__FP4BLOTPf = 0x1AAF58; // type:func PostCtrLoad__FP3CTR = 0x1AAF88; // type:func UpdateCtr__FP3CTR = 0x1AB058; // type:func DrawCtr__FP3CTR = 0x1AB198; // type:func RebuildCtrAchzDraw__FP3CTR = 0x1AB2B8; // type:func DtVisibleCtr__FP3CTR = 0x1AB5D8; // type:func FUN_001ab600 = 0x1AB600; // type:func UpdateTimer__FP5TIMER = 0x1AB660; // type:func DrawTimer__FP5TIMER = 0x1AB710; // type:func SetTimer__FP5TIMERf = 0x1AB890; // type:func SetTimerSpeed__FP5TIMERf = 0x1AB920; // type:func SetTimerExpire__FP5TIMERfPv = 0x1AB928; // type:func StartTimer__FP5TIMER = 0x1AB938; // type:func StopTimer__FP5TIMER = 0x1AB958; // type:func RebuildTimerAchzDraw__FP5TIMERf = 0x1AB980; // type:func SetTimerTimers__FP5TIMER6TIMERS = 0x1ABE20; // type:func DtVisibleTrunkctr__FP8TRUNKCTR = 0x1ABE40; // type:func DtVisibleCrusherctr__FP10CRUSHERCTR = 0x1ABE50; // type:func FUN_001ABE60__Fv = 0x1ABE60; // type:func FUN_001abe70 = 0x1ABE70; // type:func FUN_001ac060 = 0x1AC060; // type:func FUN_001ac0e8 = 0x1AC0E8; // type:func PostNoteLoad__FP4NOTE = 0x1AC5C0; // type:func SetNoteAchzDraw__FP4NOTEPc = 0x1AC638; // type:func DrawNote__FP4NOTE = 0x1AC700; // type:func FUN_001ac888 = 0x1AC888; // type:func FUN_001ac910 = 0x1AC910; // type:func FUN_001ac990 = 0x1AC990; // type:func FUN_001ac9e0 = 0x1AC9E0; // type:func FUN_001aca30 = 0x1ACA30; // type:func FUN_001aca68 = 0x1ACA68; // type:func DrawTitle__FP5TITLE = 0x1ACAA8; // type:func PostTotalsLoad__FP6TOTALS = 0x1ACDA0; // type:func FUN_001ace38 = 0x1ACE38; // type:func FUN_001acee0 = 0x1ACEE0; // type:func render_level_info_from_id = 0x1AD088; // type:func render_level_info = 0x1AD0D0; // type:func render_hideout_world_info = 0x1AD1E8; // type:func SetTotalsBlots__FP6TOTALS5BLOTS = 0x1AD320; // type:func ShowTotalsQMARK = 0x1AD378; // type:func HideTotalsQMARK = 0x1AD3B0; // type:func DrawTotals__FP6TOTALS = 0x1AD3F0; // type:func FUN_001ad6a8 = 0x1AD6A8; // type:func FUN_001ad718 = 0x1AD718; // type:func FUN_001ad7b0 = 0x1AD7B0; // type:func FUN_001ad940 = 0x1AD940; // type:func FUN_001ad970 = 0x1AD970; // type:func DrawLetterbox__FP9LETTERBOX = 0x1ADB00; // type:func FUN_001adc60 = 0x1ADC60; // type:func DrawLogo__FP4LOGO = 0x1ADD28; // type:func FUN_001adf28 = 0x1ADF28; // type:func FUN_001adff0 = 0x1ADFF0; // type:func FUN_001ae130 = 0x1AE130; // type:func UpdateAttract__FP7ATTRACT = 0x1AE178; // type:func DrawAttract__FP7ATTRACT = 0x1AE220; // type:func DrawLineScreen__FUiUiUiUiUiUiG4RGBAi = 0x1AE3B8; // type:func FUN_001ae510 = 0x1AE510; // type:func FUN_001ae5e0 = 0x1AE5E0; // type:func FUN_001ae758 = 0x1AE758; // type:func FUN_001ae7f8 = 0x1AE7F8; // type:func FUN_001ae820 = 0x1AE820; // type:func FUN_001aea08 = 0x1AEA08; // type:func FUN_001aea70 = 0x1AEA70; // type:func junk_001aec80 = 0x1AEC80; // type:func FUN_001aec90 = 0x1AEC90; // type:func // Global blots g_lifectr = 0x26c6c8; // size:0x280 g_cluectr = 0x26c948; // size:0x280 g_keyctr = 0x26cbc8; // size:0x280 g_coinctr = 0x26ce48; // size:0x280 g_unkblot0 = 0x26d0c8; // size:0x280 g_unkblot1 = 0x26d348; // size:0x280 g_unkblot2 = 0x26d5c8; // size:0x280 g_unkblot3 = 0x26d848; // size:0x280 g_unkblot4 = 0x26dac8; // size:0x280 g_unkblot5 = 0x26dd48; // size:0x280 g_unkblot6 = 0x26dfc8; // size:0x280 g_unkblot7 = 0x26e248; // size:0x280 g_unkblot8 = 0x26e4e0; // size:0x280 g_unkblot9 = 0x26e760; // size:0x280 g_note = 0x26e9f8; // size:0x280 g_unkblot11 = 0x26eed0; // size:0x268 g_totals = 0x26f138; // size:0x18 // Maybe doesn't belong here? g_binoc = 0x2701F8; // size:0x4 //////////////////////////////////////////////////////////////// // P2/sensor.c //////////////////////////////////////////////////////////////// InitSensor__FP6SENSOR = 0x1AECB0; // type:func SetSensorAlarm__FP6SENSORP5ALARM = 0x1AECE0; // type:func SetSensorSensors__FP6SENSOR7SENSORS = 0x1AECE8; // type:func FCheckSensorObject__FP6SENSORP2SO = 0x1AED78; // type:func FIgnoreSensorObject__FP6SENSORP2SO = 0x1AEE50; // type:func FOnlySensorTriggerObject__FP6SENSORP2SO = 0x1AEF00; // type:func PauseSensor__FP6SENSOR = 0x1AEF68; // type:func UpdateSensor__FP6SENSORf = 0x1AEFA0; // type:func AddSensorTriggerObject__FP6SENSOR3OID = 0x1AF000; // type:func AddSensorNoTriggerObject__FP6SENSOR3OID = 0x1AF028; // type:func AddSensorTriggerClass__FP6SENSOR3CID = 0x1AF050; // type:func AddSensorNoTriggerClass__FP6SENSOR3CID = 0x1AF078; // type:func InitLasen__FP5LASEN = 0x1AF0A0; // type:func LoadLasenFromBrx__FP5LASENP18CBinaryInputStream = 0x1AF0D0; // type:func BindLasen__FP5LASEN = 0x1AF108; // type:func PostLasenLoad__FP5LASEN = 0x1AF3B8; // type:func UpdateBusyLasenSenseTimes__Fv = 0x1AF508; // type:func UpdateLasen__FP5LASENf = 0x1AF5C8; // type:func FreezeLasen__FP5LASENi = 0x1AF7A8; // type:func RenderLasenSelf__FP5LASENP2CMP2RO = 0x1AF820; // type:func FUN_001afaf8__FP6SENSORP2SO = 0x1AFAF8; // type:func SenseLasen__FP5LASENP7SENSORS = 0x1AFBB0; // type:func EnableLasen__FP5LASEN5SENSM = 0x1B00E8; // type:func DisableLasen__FP5LASEN = 0x1B0120; // type:func OnLasenAlarmTriggered__FP5LASEN = 0x1B0160; // type:func SetLasenSensors__FP5LASEN7SENSORS = 0x1B01B0; // type:func SCalcLasenShapeExtent__FP5LASENP5LBEAM = 0x1B0360; // type:func RetractLasen__FP5LASENf = 0x1B0470; // type:func ExtendLasen__FP5LASENf = 0x1B0488; // type:func InitCamsen__FP6CAMSEN = 0x1B04A0; // type:func PostCamsenLoad__FP6CAMSEN = 0x1B04D0; // type:func UpdateCamsen__FP6CAMSENf = 0x1B0578; // type:func RenderCamsenSelf__FP6CAMSENP2CMP2RO = 0x1B0838; // type:func FIgnoreCamsenIntersection__FP6CAMSENP2SO = 0x1B0BD8; // type:func FFilterCamsen__FPvP2SO = 0x1B0BE0; // type:func SenseCamsen__FP6CAMSENP7SENSORS = 0x1B0C68; // type:func EnableCamsen__FP6CAMSEN5SENSM = 0x1B0EA8; // type:func DisableCamsen__FP6CAMSEN = 0x1B0EE0; // type:func OnCamsenAlarmTriggered__FP6CAMSEN = 0x1B0F70; // type:func SetCamsenSensors__FP6CAMSEN7SENSORS = 0x1B0FC0; // type:func SetCamsenCsdts__FP6CAMSEN5CSDTS = 0x1B1070; // type:func InitPrsen__FP5PRSEN = 0x1B1158; // type:func PostPrsenLoad__FP5PRSEN = 0x1B11A0; // type:func UpdatePrsen__FP5PRSENf = 0x1B1238; // type:func SensePrsen__FP5PRSENP7SENSORS = 0x1B1438; // type:func EnablePrsen__FP5PRSEN5SENSM = 0x1B15D0; // type:func DisablePrsen__FP5PRSEN = 0x1B1608; // type:func OnPrsenAlarmTriggered__FP5PRSEN = 0x1B1698; // type:func SetPrsenSensors__FP5PRSEN7SENSORS = 0x1B1710; // type:func UpdatePrsenLoopShader__FP5PRSEN = 0x1B1898; // type:func //////////////////////////////////////////////////////////////// // P2/shadow.c //////////////////////////////////////////////////////////////// InitShadow__FP6SHADOW = 0x1B1AC8; // type:func PostShadowLoad__FP6SHADOW = 0x1B1B38; // type:func InvalidateShadowVifs__FP6SHADOW = 0x1B1BF0; // type:func RebuildShadowRegion__FP6SHADOW = 0x1B1BF8; // type:func SetShadowShader__FP6SHADOW3OID = 0x1B1CF8; // type:func FShadowRadiusSet__FP6SHADOW = 0x1B1D38; // type:func SetShadowNearRadius__FP6SHADOWf = 0x1B1D70; // type:func SetShadowFarRadius__FP6SHADOWf = 0x1B1DA8; // type:func SetShadowCastPosition__FP6SHADOWP6VECTOR = 0x1B1DE0; // type:func SetShadowCastNormal__FP6SHADOWP6VECTOR = 0x1B1EC8; // type:func SetShadowNearCast__FP6SHADOWf = 0x1B1FB0; // type:func SetShadowFarCast__FP6SHADOWf = 0x1B1FE0; // type:func SetShadowConeAngle__FP6SHADOWf = 0x1B2010; // type:func SetShadowFrustrumUp__FP6SHADOWP6VECTOR = 0x1B2068; // type:func FShadowValid__FP6SHADOWi = 0x1B2090; // type:func FFilterFastShadows__FPvP2SO = 0x1B2118; // type:func UpdateShadow__FP6SHADOWf = 0x1B2140; // type:func RebuildShadowVifs__FP6SHADOW = 0x1B2358; // type:func DrawShadow__FP6SHADOW = 0x1B2640; // type:func FShadowIntersectsSphere__FP6SHADOWP6VECTORf = 0x1B26F8; // type:func FindSwShadows__FP2SWP6VECTORfiPiPP6SHADOW = 0x1B2790; // type:func //////////////////////////////////////////////////////////////// // P2/shape.c //////////////////////////////////////////////////////////////// LoadShapeFromBrx__FP5SHAPEP18CBinaryInputStream = 0x1B2840; // type:func SetShapeParent__FP5SHAPEP3ALO = 0x1B28A8; // type:func //////////////////////////////////////////////////////////////// // P2/shd.c //////////////////////////////////////////////////////////////// Tex0FromTexIframeCtk__FP3TEXi3CTK = 0x1B2988; // type:func PackTexGifs__FP3TEXi3CTK4SHDKP4GIFS = 0x1B29E0; // type:func LoadClutFromBrx__FP18CBinaryInputStreamP4CLUT = 0x1B2B50; // type:func LoadColorTablesFromBrx__FP18CBinaryInputStream = 0x1B2BA8; // type:func LoadBmpFromBrx__FP18CBinaryInputStreamP3BMP = 0x1B2CA8; // type:func LoadBitmapsFromBrx__FP18CBinaryInputStream = 0x1B2CF8; // type:func LoadFontsFromBrx__FP18CBinaryInputStream = 0x1B2DF8; // type:func LoadTexFromBrx__FP18CBinaryInputStreamP3TEX = 0x1B2F00; // type:func LoadShadersFromBrx__FP18CBinaryInputStream = 0x1B3040; // type:func UploadPermShaders__Fv = 0x1B3450; // type:func PropagateShaders__Fi = 0x1B3488; // type:func FillShaders__Fi = 0x1B3510; // type:func UnloadShaders__Fv = 0x1B40C8; // type:func junk_001B4180 = 0x1B4180; // type:func ConvertRgbToHsv__FP6VECTORT0 = 0x1B4188; // type:func ConvertHsvToRgb__FP6VECTORT0 = 0x1B4330; // type:func ConvertUserHsvToUserRgb__FP6VECTORT0 = 0x1B4580; // type:func ConvertUserRgbToUserHsv__FP6VECTORT0 = 0x1B4600; // type:func junk_001B4670 = 0x1B4670; // type:func PshdFindShader__F3OID = 0x1B4688; // type:func SetSaiIframe__FP3SAIi = 0x1B46E0; // type:func SetSaiDuDv__FP3SAIff = 0x1B4750; // type:func PropagateSais__Fv = 0x1B47C0; // type:func UpdateShaders__Ff = 0x1B4878; // type:func g_grfzonShaders = 0x274518; // size:0x4 //////////////////////////////////////////////////////////////// // P2/shdanim.c //////////////////////////////////////////////////////////////// CbFromSaak__F4SAAK = 0x1B4920; // type:func PvtsaaFromSaak__F4SAAK = 0x1B4980; // type:func PsaaLoadFromBrx__FP18CBinaryInputStream = 0x1B4A10; // type:func InitSaa__FP3SAAP4SAAF = 0x1B4AA0; // type:func PostSaaLoad__FP3SAA = 0x1B4AD0; // type:func FUpdatableSaa__FP3SAA = 0x1B4B08; // type:func UCompleteSaa__FP3SAA = 0x1B4B38; // type:func PsaiFromSaaShd__FP3SAAP3SHD = 0x1B4B48; // type:func InitLoop__FP4LOOPP4SAAF = 0x1B4B68; // type:func PostLoopLoad__FP4LOOP = 0x1B4BC8; // type:func UpdateLoop__FP4LOOPf = 0x1B4C30; // type:func UCompleteLoop__FP4LOOP = 0x1B4D18; // type:func InitPingpong__FP8PINGPONGP4SAAF = 0x1B4D48; // type:func PostPingpongLoad__FP8PINGPONG = 0x1B4DA8; // type:func UpdatePingpong__FP8PINGPONGf = 0x1B4E18; // type:func UCompletePingpong__FP8PINGPONG = 0x1B4F18; // type:func InitShuffle__FP7SHUFFLEP4SAAF = 0x1B4F80; // type:func UpdateShuffle__FP7SHUFFLEf = 0x1B4FC0; // type:func InitHologram__FP8HOLOGRAMP4SAAF = 0x1B5060; // type:func PostHologramLoad__FP8HOLOGRAM = 0x1B5108; // type:func NotifyHologramRender__FP8HOLOGRAMP3ALOP3RPL = 0x1B5160; // type:func InitScroller__FP8SCROLLERP4SAAF = 0x1B5200; // type:func UpdateScroller__FP8SCROLLERf = 0x1B5278; // type:func UCompleteScroller__FP8SCROLLER = 0x1B5308; // type:func SetScrollerMasterSpeeds__FP8SCROLLERff = 0x1B5388; // type:func InitCircler__FP7CIRCLERP4SAAF = 0x1B5398; // type:func UpdateCircler__FP7CIRCLERf = 0x1B5400; // type:func UCompleteCircler__FP7CIRCLER = 0x1B5488; // type:func InitLooker__FP6LOOKERP4SAAF = 0x1B54D0; // type:func SetLookerSgvr__FP6LOOKERP4SGVRP7GLOBSETP4GLOBP7SUBGLOB = 0x1B5568; // type:func SetVecPosad__FP6VECTORP5POSAD = 0x1B5588; // type:func SetUvPuvqd__FP3UVFP3UVQ = 0x1B55A8; // type:func NotifyLookerRender__FP6LOOKERP3ALOP3RPL = 0x1B55C0; // type:func junk_001B5B48 = 0x1B5B48; // type:func FUN_001b5b58 = 0x1B5B58; // type:func FUN_001b5c40 = 0x1B5C40; // type:func //////////////////////////////////////////////////////////////// // P2/sky.c //////////////////////////////////////////////////////////////// PostSkyLoad__FP3SKY = 0x1B5CD8; // type:func UpdateSky__FP3SKYf = 0x1B5D28; // type:func //////////////////////////////////////////////////////////////// // P2/slotheap.c //////////////////////////////////////////////////////////////// _InitSlotheap__FP8SLOTHEAPii = 0x1B5D80; // type:func CreateSlotheapSw__FP8SLOTHEAPii = 0x1B5DD0; // type:func CreateSlotheapSwAlign64__FP8SLOTHEAPii = 0x1B5E30; // type:func junk_001B5E98 = 0x1B5E98; // type:func PvAllocSlotheapUnsafe__FP8SLOTHEAP = 0x1B5EA0; // type:func PvAllocSlotheapImpl__FP8SLOTHEAP = 0x1B5EC0; // type:func PvAllocSlotheapClearImpl__FP8SLOTHEAP = 0x1B5EE0; // type:func FreeSlotheapPv__FP8SLOTHEAPPv = 0x1B5F28; // type:func junk_001B5F48 = 0x1B5F48; // type:func //////////////////////////////////////////////////////////////// // P2/sm.c //////////////////////////////////////////////////////////////// LoadSmFromBrx__FP2SMP18CBinaryInputStream = 0x1B5F50; // type:func PostSmLoad__FP2SM = 0x1B61A8; // type:func PostSmLoadCallback__FP2SM5MSGIDPv = 0x1B61F0; // type:func PsmaApplySm__FP2SMP3ALO3OIDi = 0x1B6290; // type:func PsmaFindSm__FP2SMP3ALO = 0x1B6388; // type:func IsmsFindSmOptional__FP2SM3OID = 0x1B63C0; // type:func IsmsFindSmRequired__FP2SM3OID = 0x1B63F8; // type:func OidFromSmIsms__FP2SMi = 0x1B6420; // type:func RetractSma__FP3SMA = 0x1B6438; // type:func SetSmaGoal__FP3SMA3OID = 0x1B64D8; // type:func GetSmaGoal__FP3SMAP3OID = 0x1B6568; // type:func GetSmaCur__FP3SMAP3OID = 0x1B6598; // type:func GetSmaNext__FP3SMAP3OID = 0x1B65C8; // type:func SetSmaSvt__FP3SMAf = 0x1B65F8; // type:func SeekSma__FP3SMA3OID = 0x1B6628; // type:func ChooseSmaTransition__FP3SMA = 0x1B66A0; // type:func EndSmaTransition__FP3SMA = 0x1B6C68; // type:func HandleSmaMessage__FP3SMA5MSGIDPv = 0x1B6CA8; // type:func SkipSma__FP3SMAf = 0x1B6CF0; // type:func SendSmaMessage__FP3SMA5MSGIDPv = 0x1B6D78; // type:func FUN_001b6df8 = 0x1B6DF8; // type:func NotifySmaSpliceOnEnterState__FP3SMAii = 0x1B6E28; // type:func //////////////////////////////////////////////////////////////// // P2/smartguard.c //////////////////////////////////////////////////////////////// InitSmartguard__FP10SMARTGUARD = 0x1B6EC8; // type:func PostSmartguardLoadFlashlight__FP10SMARTGUARD = 0x1B6F50; // type:func UseSmartguardFlashlightTarget__FP10SMARTGUARD3SGS3OID = 0x1B70B0; // type:func FUN_001B7100__FP10SMARTGUARDi = 0x1B7100; // type:func PostSmartguardLoad__FP10SMARTGUARD = 0x1B7128; // type:func FFilterSmartguardDetect__FP10SMARTGUARDP2SO = 0x1B71C8; // type:func FDetectSmartguard__FP10SMARTGUARD = 0x1B7280; // type:func UpdateSmartguard__FP10SMARTGUARDf = 0x1B7608; // type:func UpdateSmartguardFlashlight__FP10SMARTGUARD = 0x1B7638; // type:func OnSmartguardEnteringSgs__FP10SMARTGUARD3SGSP4ASEG = 0x1B7790; // type:func FCanSmartguardAttack__FP10SMARTGUARD = 0x1B7818; // type:func SgasGetSmartguard__FP10SMARTGUARD = 0x1B7860; // type:func HandleSmartguardMessage__FP10SMARTGUARD5MSGIDPv = 0x1B78C0; // type:func FreezeSmartguard__FP10SMARTGUARDi = 0x1B7920; // type:func //////////////////////////////////////////////////////////////// // P2/so.c //////////////////////////////////////////////////////////////// InitSo__FP2SO = 0x1B7968; // type:func OnSoAdd__FP2SO = 0x1B7A98; // type:func OnSoRemove__FP2SO = 0x1B7B78; // type:func EnableSoPhys__FP2SOi = 0x1B7C40; // type:func DisplaceSo__FP2SOi = 0x1B7D00; // type:func ImpactSo__FP2SOi = 0x1B7F78; // type:func PivotSo__FP2SOi = 0x1B8148; // type:func ExtendSoBounds__FP2SOP6VECTORf = 0x1B8420; // type:func UpdateSoBounds__FP2SO = 0x1B8540; // type:func UpdateGeomWorld__FP4GEOMT0G9VU_VECTORP7MATRIX3 = 0x1B8820; // type:func UpdateSoXfWorldHierarchy__FP2SO = 0x1B8960; // type:func UpdateSoXfWorld__FP2SO = 0x1B89B8; // type:func FIgnoreSoIntersection__FP2SOT0 = 0x1B8A08; // type:func UpdateSoImpacts__FP2SO = 0x1B8A48; // type:func UProjectVector__FP6VECTORN20 = 0x1B8B30; // type:func AdjustSoXpLocal__FP2SOP2XPi = 0x1B8B90; // type:func junk_001B8FE0 = 0x1B8FE0; // type:func CalculateSoAngularEffectWorld__FP2SOP6VECTORT1 = 0x1B8FE8; // type:func AccelSoTowardPosSpring__FP2SOP6VECTORP3CLQT1T2f = 0x1B9058; // type:func AccelSoTowardMatSpring__FP2SOP7MATRIX3P3CLQP6VECTORT2f = 0x1B91A8; // type:func PresetSoAccel__FP2SOf = 0x1B9338; // type:func RenderSoSelf__FP2SOP2CMP2RO = 0x1B93D8; // type:func UpdateSo__FP2SOf = 0x1B93F8; // type:func SetSoMass__FP2SOf = 0x1B9418; // type:func AdjustSoMomint__FP2SOf = 0x1B9448; // type:func DiscardSoXps__FP2SO = 0x1B94F0; // type:func UpdateSoPosWorldPrev__FP2SO = 0x1B9680; // type:func TranslateSoToPos__FP2SOP6VECTOR = 0x1B9690; // type:func RotateSoToMat__FP2SOP7MATRIX3 = 0x1B97E0; // type:func TranslateSoToPosSafe__FP2SOP6VECTORT1 = 0x1B9860; // type:func junk_001B9938 = 0x1B9938; // type:func SetSoVelocityVec__FP2SOP6VECTOR = 0x1B9940; // type:func SetSoAngularVelocityVec__FP2SOP6VECTOR = 0x1B99F0; // type:func junk_001B9AA8 = 0x1B9AA8; // type:func AddSoAcceleration__FP2SOP6VECTOR = 0x1B9AB0; // type:func AddSoAngularAcceleration__FP2SOP6VECTOR = 0x1B9AC8; // type:func SetSoConstraints__FP2SO2CTP6VECTORT1T2 = 0x1B9AE0; // type:func SetSoParent__FP2SOP3ALO = 0x1B9B50; // type:func ApplySoProxy__FP2SOP5PROXY = 0x1B9C80; // type:func junk_001B9D08 = 0x1B9D08; // type:func AccelSoTowardMatSmooth__FP2SOfP7MATRIX3P3SMP = 0x1B9D10; // type:func junk_001B9F28 = 0x1B9F28; // type:func GetSoCpdefi__FP2SOfP6CPDEFI = 0x1B9F30; // type:func FIsSoTouching__FP2SOT0 = 0x1B9FB0; // type:func PsoFirstSoTouching__FP2SO = 0x1BA068; // type:func CloneSo__FP2SOT0 = 0x1BA130; // type:func ApplySoConstraintWorld__FP2SOP6CONSTRP6VECTORN22 = 0x1BA2E8; // type:func ApplyConstr__FP6CONSTRP6VECTORN21 = 0x1BA430; // type:func ApplySoConstraintLocal__FP2SOP6CONSTRP6VECTORN22 = 0x1BA500; // type:func AddSoXa__FP2SOP2XA = 0x1BA528; // type:func RemoveSoXa__FP2SOP2XA = 0x1BA550; // type:func AddSoWaterAcceleration__FP2SOP5WATERf = 0x1BA5B0; // type:func AddSoExternalAccelerations__FP2SOP2XAf = 0x1BAC28; // type:func LoadSoFromBrx__FP2SOP18CBinaryInputStream = 0x1BAC30; // type:func SetSoSphere__FP2SOf = 0x1BAFE0; // type:func SetSoNoInteract__FP2SOi = 0x1BB000; // type:func ConstrFromCnstr__F5CNSTRP2CTP6VECTOR = 0x1BB028; // type:func SetSoCnstrForce__FP2SO5CNSTR = 0x1BB058; // type:func SetSoCnstrTorque__FP2SO5CNSTR = 0x1BB0C8; // type:func SetSoCameraStyle__FP2SO3CMK = 0x1BB138; // type:func SetSoIgnoreLocked__FP2SOi = 0x1BB168; // type:func SetSoIceable__FP2SOi = 0x1BB1A0; // type:func SetSoMtlk__FP2SO4MTLK = 0x1BB1D8; // type:func SetSoEdgeGrab__FP2SO3EGK = 0x1BB1E0; // type:func SendSoMessage__FP2SO5MSGIDPv = 0x1BB210; // type:func PxpFindSoGround__FP2SOT0Pi = 0x1BB290; // type:func SetSoNoGravity__FP2SOi = 0x1BB378; // type:func SetSoNoXpsAll__FP2SOi = 0x1BB3B0; // type:func SetSoNoXpsSelf__FP2SOi = 0x1BB400; // type:func SetSoNoXpsCenter__FP2SOi = 0x1BB450; // type:func RebuildSoPhysHook__FP2SO = 0x1BB4A0; // type:func PsoFindSoPhysHook__FP2SOi = 0x1BB540; // type:func RecalcSoLocked__FP2SO = 0x1BB580; // type:func FGetSoContactList__FP2SOPv = 0x1BB710; // type:func GetSoContacts__FP2SOPiPPP2SO = 0x1BB800; // type:func FSoInStsoList__FP4STSOP2SO = 0x1BB9A0; // type:func GenerateSoSpliceTouchingEvents__FP2SO = 0x1BB9D0; // type:func FInflictSoZap__FP2SOP2XPP3ZPR = 0x1BBC30; // type:func EnsureSoLvo__FP2SO = 0x1BBC38; // type:func ProjectSoLvo__FP2SOf = 0x1BBEB8; // type:func ProjectSoTransform__FP2SOfi = 0x1BC088; // type:func ApplySoImpulse__FP2SOP6VECTORT1f = 0x1BC0E0; // type:func CalculateSoTrajectoryApex__FP2SOP6VECTORfT1 = 0x1BC260; // type:func FAbsorbSoWkr__FP2SOP3WKR = 0x1BC320; // type:func CloneSoPhys__FP2SOT0i = 0x1BC368; // type:func FUN_001bc4d8 = 0x1BC4D8; // type:func FUN_001bc670 = 0x1BC670; // type:func FUN_001bc710 = 0x1BC710; // type:func FUN_001bc748 = 0x1BC748; // type:func //////////////////////////////////////////////////////////////// // P2/solve.c //////////////////////////////////////////////////////////////// RenumberSo__FP2SOPiPP2SO = 0x1BC760; // type:func CalculateSoEffect__FP2SOP6VECTORP2FXT1 = 0x1BC7f8; // type:func PropagateSoForce__FP2SOiP2XPiP2DZP2FX = 0x1BC828; // type:func DistributeSoEffects__FP2SOiiPP2SOP2FX = 0x1BC978; // type:func SolveSwGroup__FP2SWiPP2SOiPP2XPfi = 0x1BCD00; // type:func CpxpBuildXpArray__FiPP2SOiPP2XP = 0x1BD558; // type:func BuildContactGroup__FP2SOPiPP2SOT1T2 = 0x1BD678; // type:func SplitSoFreeze__FP2SOi = 0x1BD790; // type:func SortSwGroup__FiPP2SO = 0x1BD888; // type:func SplitSwGroup__FP2SWiPP2SOfi = 0x1BDA50; // type:func SolveSw__FP2SWfi = 0x1BDD00; // type:func //////////////////////////////////////////////////////////////// // P2/sort.c //////////////////////////////////////////////////////////////// SwapEntries__FPviii = 0x1BE068; // type:func HeapSort__FPviiPFPvPv_i = 0x1BE0A8; // type:func //////////////////////////////////////////////////////////////// // P2/sound.c //////////////////////////////////////////////////////////////// UnloadMusic__Fv = 0x1BE1E8; // type:func SbpEnsureBank__Fi = 0x1BE268; // type:func SbpEnsureBank__F5SFXID = 0x1BE4A8; // type:func NewSfx__FPP3SFX = 0x1BE4D8; // type:func FContinuousSound__F5SFXID = 0x1BE568; // type:func FUN_001BE5D8 = 0x1BE5D8; // type:func SetVagUnpaused__Fv = 0x1BE5E8; // type:func PreloadVag__FPc2FK = 0x1BE5F8; // type:func FUN_001be708 = 0x1BE708; // type:func PreloadVag1 = 0x1BE728; // type:func FPauseForVag__Fv = 0x1BE810; // type:func RefreshPambVolPan__FP3AMB = 0x1BE860; // type:func FUN_001be8f8 = 0x1BE8F8; // type:func FVagPlaying__Fv = 0x1BE980; // type:func junk_001BE990 = 0x1BE990; // type:func StopVag__Fv = 0x1BE998; // type:func PauseVag__Fv = 0x1BEA28; // type:func ContinueVag__Fv = 0x1BEA50; // type:func KillMusic__Fv = 0x1BEA78; // type:func PreloadMusidSongComplete__FUiUl = 0x1BEAC8; // type:func PreloadMusidSong__F5MUSID = 0x1BEB10; // type:func StartMusidSong__F5MUSID = 0x1BEC58; // type:func PauseMusic__Fv = 0x1BECF8; // type:func ContinueMusic__Fv = 0x1BED20; // type:func SfxhMusicUnknown1 = 0x1BED48; // type:func SfxhMusicUnknown2 = 0x1BED70; // type:func PexcAlloc__Fv = 0x1BED98; // type:func RemoveExc__FP3EXC = 0x1BEDF8; // type:func KillExcitement__Fv = 0x1BEE48; // type:func PexcSetExcitement__Fi = 0x1BEEF8; // type:func SetIexcCurHigh__FP3EXC = 0x1BEF88; // type:func UnsetExcitement__FP3EXC = 0x1BF048; // type:func UnsetExcitementHyst__FP3EXC = 0x1BF0D8; // type:func StartupSound__Fv = 0x1BF130; // type:func junk_001BF1E8 = 0x1BF1E8; // type:func FAmbientsPaused__Fv = 0x1BF1F0; // type:func CalculateVolPan__FfP6VECTORPfT2fff = 0x1BF200; // type:func FUN_001BF2E0 = 0x1BF2E0; // type:func FUN_001BF398 = 0x1BF398; // type:func PposEar__Fv = 0x1BF3D0; // type:func SetDoppler__FP3AMB = 0x1BF428; // type:func PfneardistGet__Fv = 0x1BF578; // type:func SDistEar__FP6VECTOR = 0x1BF5E0; // type:func CalculateDistVolPan__FP6VECTORPfT1fff = 0x1BF620; // type:func PambAlloc__Fv = 0x1BF6B8; // type:func DropPamb__FPP3AMB = 0x1BF718; // type:func RemoveAmb__FP3AMB = 0x1BF728; // type:func StopSound__FP3AMBi = 0x1BF788; // type:func SetPambFrq__FP3AMBf = 0x1BF7F8; // type:func SetPambVol__FP3AMBf = 0x1BF8E8; // type:func FillPamb__FP3AMBPP3AMBiP3ALOP6VECTORfffffP2LMT10_ = 0x1BF920; // type:func ActivatePamb__FP3AMB5SFXID = 0x1BFAF8; // type:func ScheduleNextIntermittentSound__FP3AMB = 0x1BFBF8; // type:func StartSound__F5SFXIDPP3AMBP3ALOP6VECTORfffffP2LMT9 = 0x1BFCD8; // type:func FUN_001BFFC8 = 0x1BFFC8; // type:func HandleWipeHandleWipeVolumes__FifVolumes = 0x1C0000; // type:func UpdateSounds__Fv = 0x1C0070; // type:func SetMvgkUvol__Ff = 0x1c05d0; // type:func MvgkUnknown1__F4MVGK = 0x1C0600; // type:func SetMvgkRvol__Fi4MVGKf = 0x1C06A0; // type:func MvgkUnknown2__Fv = 0x1C06D8; // type:func MvgkUnknown3 = 0x1C0760; // type:func MvgkUnknown4 = 0x1C0790; // type:func KillSoundSystem__Fv = 0x1C07B0; // type:func KillSounds__Fi = 0x1C0808; // type:func PushSwReverb__FP2SW7REVERBKi = 0x1C08B0; // type:func PopSwReverb__FP2SW = 0x1C0950; // type:func SetSwDefaultReverb__FP2SW7REVERBKi = 0x1C09D8; // type:func FUN_001C0A50 = 0x1C0A50; // type:func FUN_001C0AB8 = 0x1C0AB8; // type:func FUN_001C0B08 = 0x1C0B08; // type:func StartSwIntermittentSounds__FP2SW = 0x1C0B38; // type:func SetAMRegister__FiUc = 0x1C0C08; // type:func FUN_001c0c50 = 0x1C0C50; // type:func FUN_001c0c68 = 0x1C0C68; // type:func FUN_001c0cb0__Fv = 0x1C0CB0; // type:func HsNextFootFall__Fv = 0x1C0CF0; // type:func NextSneakyFootstep__Fv = 0x1C0EC0; // type:func D_00604790 = 0x00604790; // size:0x1c g_iexcHyst = 0x274738; // size:0x4 //////////////////////////////////////////////////////////////// // P2/speaker.c //////////////////////////////////////////////////////////////// InitSpeaker__FP7SPEAKER = 0x1C0F30; // type:func PostSpeakerLoad__FP7SPEAKER = 0x1C0FF0; // type:func SetSpeakerSmIdle__FP7SPEAKER3OID = 0x1C1030; // type:func //////////////////////////////////////////////////////////////// // P2/spire.c //////////////////////////////////////////////////////////////// InitSpire__FP5SPIRE = 0x1C10A8; // type:func OnSpireAdd__FP5SPIRE = 0x1C10D8; // type:func OnSpireRemove__FP5SPIRE = 0x1C1110; // type:func CloneSpire__FP5SPIRET0 = 0x1C1148; // type:func DAT_0024d3b4 = 0x24D3B4; // size:0x4 //////////////////////////////////////////////////////////////// // P2/splicemap.c //////////////////////////////////////////////////////////////// LoadSwSpliceFromBrx__FP2SWP18CBinaryInputStream = 0x1C1190; // type:func PframeFromIsplice__FiP2SW = 0x1C1390; // type:func RefEvalModule__FiP2SW = 0x1C13E8; // type:func //////////////////////////////////////////////////////////////// // P2/spliceobj.c //////////////////////////////////////////////////////////////// PeopidFind__FP5BASICi = 0x1C14C0; // type:func RefGetObjectList__FP5BASIC4OTYPPFPv_v = 0x1C1530; // type:func RefGetPeopid__FP5BASICP5EOPID = 0x1C15D8; // type:func FAppendSpliceListElement__FPvT0 = 0x1C1A28; // type:func FSpliceListElementExists__FPvT0 = 0x1C1AD8; // type:func RefSetPvsFromSplice__FiP4CRefP4OTYPPPv = 0x1C1BF8; // type:func RefSetArgListFromPvs__FiP4OTYPPPv = 0x1C1E48; // type:func RefSetPeopid__FP5BASICP5EOPIDP4CRef = 0x1C1F20; // type:func RefGetOption__FP5BASICi = 0x1C21A0; // type:func RefSetOption__FP5BASICiP4CRef = 0x1C2238; // type:func RefAddOption__FP5BASICiP4CRef = 0x1C22B8; // type:func RefEnsureOption__FP5BASICiP4CRef = 0x1C2320; // type:func RefSetArgsFromSplice__FiP4CRefP4OTYPe = 0x1C23B0; // type:func //////////////////////////////////////////////////////////////// // P2/sprbuf.c //////////////////////////////////////////////////////////////// LoadSprBuf__Fie = 0x1C2430; // type:func SaveSprBuf__FPve = 0x1C25B0; // type:func junk_001C27A8 = 0x1C27A8; // type:func sprbuf__static_initialization_and_destruction_0 = 0x1C27B0; // type:func _GLOBAL_$I$g_asprbuf = 0x1C29C8; // type:func //////////////////////////////////////////////////////////////// // P2/sqtr.c //////////////////////////////////////////////////////////////// FUN_001c29e8 = 0x1C29E8; // type:func UpdateSqtrm__FP5SQTRMP6VECTORP7MATRIX3ff = 0x1C29F8; // type:func RenderSqtrm__FP5SQTRMP2CM = 0x1C3028; // type:func DrawSqtrm__FP3RPL = 0x1C30E8; // type:func //////////////////////////////////////////////////////////////// // P2/step.c //////////////////////////////////////////////////////////////// InitStep__FP4STEP = 0x1C4458; // type:func PostStepLoad__FP4STEP = 0x1C44F0; // type:func LimitStepHands__FP4STEPi = 0x1C4578; // type:func FUN_001c4618 = 0x1C4618; // type:func FUN_001c4790 = 0x1C4790; // type:func FUN_001c4848 = 0x1C4848; // type:func RenderStepSelf__FP4STEPP2CMP2RO = 0x1C49C8; // type:func ReadStepJoystick__FP4STEPP3JOY = 0x1C49E8; // type:func UpdateStepFootfall__FP4STEPfP3SFF = 0x1C4A80; // type:func UpdateStepPhys__FP4STEP = 0x1C4C20; // type:func SetStepPhys__FP4STEPP2SOi = 0x1C4D60; // type:func UpdateStep__FP4STEPf = 0x1C4ED0; // type:func CtTorqueStep__FP4STEP = 0x1C4F00; // type:func PropagateStepForce__FP4STEPiP2XPiP2DZP2FX = 0x1C4F08; // type:func RotateStepToMat__FP4STEPP7MATRIX3 = 0x1C4FA0; // type:func CloneStepPhys__FP4STEPP2SOi = 0x1C4FF8; // type:func PresetStepAccel__FP4STEPf = 0x1C5118; // type:func PresetStepAccelBase__FP4STEP = 0x1C5148; // type:func FCheckStepXpBase__FP4STEPP2XPi = 0x1C5248; // type:func AdjustStepNewXp__FP4STEPP2XPi = 0x1C5338; // type:func AdjustStepDz__FP4STEPiP2DZif = 0x1C5388; // type:func AdjustStepDzBase__FP4STEPiP2DZi = 0x1C53A8; // type:func UpdateStepMatTarget__FP4STEP = 0x1C53B0; // type:func AdjustStepXpVelocity__FP4STEPP2XPi = 0x1C53E0; // type:func UpdateStepXfWorld__FP4STEP = 0x1C5438; // type:func AdjustStepXpVelocityBase__FP4STEPP2XPi = 0x1C54D0; // type:func AdjustStepXps__FP4STEP = 0x1C57C8; // type:func AddStepCustomXps__FP4STEPP2SOiP3BSPT3PP2XP = 0x1C5BF0; // type:func AddStepCustomXpsBase__FP4STEPP2SOP3BSPPP2XP = 0x1C5C10; // type:func FixStepAngularVelocity__FP4STEP = 0x1C5D58; // type:func PredictStepRotation__FP4STEPfP7MATRIX3P6VECTOR = 0x1C5DB8; // type:func SetStepSpinRatio__FP4STEPf = 0x1C5E50; // type:func SetStepGravityRatio__FP4STEPf = 0x1C5EA8; // type:func //////////////////////////////////////////////////////////////// // P2/stepact.c //////////////////////////////////////////////////////////////// GetActaddPositionGoal__FP6ACTADDfP6VECTORT2 = 0x1C5F18; // type:func GetActaddRotationGoal__FP6ACTADDfP7MATRIX3P6VECTOR = 0x1C6028; // type:func //////////////////////////////////////////////////////////////// // P2/stepcane.c //////////////////////////////////////////////////////////////// SetJtJtcs__FP2JT4JTCS = 0x1C61E0; // type:func UpdateJtCane__FP2JT = 0x1C6890; // type:func UpdateJtActiveCane__FP2JTP3JOY = 0x1C6928; // type:func ChooseJtAttackTarget__FP2JTiP6VECTORffPP6TARGETT2 = 0x1C6AA8; // type:func ChooseJtSweepTarget__FP2JTP2BLP6ASEGBL = 0x1C6D00; // type:func ChooseJtRushTarget__FP2JT = 0x1C6E58; // type:func ChooseJtSmashTarget__FP2JT = 0x1C6ED0; // type:func //////////////////////////////////////////////////////////////// // P2/stepguard.c //////////////////////////////////////////////////////////////// InitStepguard__FP9STEPGUARD = 0x1C6F48; // type:func LoadStepguardFromBrx__FP9STEPGUARDP18CBinaryInputStream = 0x1C7140; // type:func CloneStepguard__FP9STEPGUARDT0 = 0x1C7188; // type:func BindStepguard__FP9STEPGUARD = 0x1C71E0; // type:func PostStepguardLoadCallback__FP9STEPGUARD5MSGIDPv = 0x1C7278; // type:func PostStepguardLoad__FP9STEPGUARD = 0x1C72A0; // type:func FIgnoreStepguardIntersection__FP9STEPGUARDP2SO = 0x1C7468; // type:func OnStepguardAdd__FP9STEPGUARD = 0x1C74E8; // type:func OnStepguardRemove__FP9STEPGUARD = 0x1C7520; // type:func PresetStepguardAccel__FP9STEPGUARDf = 0x1C75B0; // type:func DradEnemyStepguard__FP9STEPGUARD = 0x1C7A60; // type:func SetStepguardTargetHeading__FP9STEPGUARDff = 0x1C7AE0; // type:func FUN_001c7b60 = 0x1C7B60; // type:func UpdateStepguardDrive__FP9STEPGUARD = 0x1C7BE8; // type:func UpdateStepguard__FP9STEPGUARDf = 0x1C7CB8; // type:func SgsNextStepguardAI__FP9STEPGUARD = 0x1C8010; // type:func SetStepguardGoal__FP9STEPGUARDP6VECTOR = 0x1C8418; // type:func FReachedStepguardGoal__FP9STEPGUARD = 0x1C84C0; // type:func FFilterStepguardJump__FP9STEPGUARDP2SO = 0x1C84E8; // type:func MoveStepguardToGoal__FP9STEPGUARD = 0x1C8590; // type:func FUN_001c8920 = 0x1C8920; // type:func LookStepguardAtGoal__FP9STEPGUARD = 0x1C8BC0; // type:func UpdateStepguardGoal__FP9STEPGUARDi = 0x1C8C08; // type:func FUN_001c8d40 = 0x1C8D40; // type:func OnStepguardWaypointActive__FP9STEPGUARD = 0x1C8D78; // type:func UpdateStepguardSgs__FP9STEPGUARD = 0x1C8E28; // type:func SetStepguardSgs__FP9STEPGUARD3SGSP4ASEG = 0x1C8F20; // type:func SetStepguardSgsExternal__FP9STEPGUARD3SGSP4ASEG = 0x1C8FD0; // type:func OnStepguardExitingSgs__FP9STEPGUARD3SGS = 0x1C9008; // type:func OnStepguardEnteringSgs__FP9STEPGUARD3SGSP4ASEG = 0x1C91C8; // type:func SggsGetStepguard__FP9STEPGUARD = 0x1C96B8; // type:func FAbsorbStepguardWkr__FP9STEPGUARDP3WKR = 0x1C96D8; // type:func FTakeStepguardDamage__FP9STEPGUARDP3ZPR = 0x1C9990; // type:func FUN_001c9a48 = 0x1C9A48; // type:func HandleStepguardGrfsgsc__FP9STEPGUARD = 0x1C9A58; // type:func DoStepguardFreefallJump__FP9STEPGUARD = 0x1C9AF8; // type:func DoStepguardFreefallLanding__FP9STEPGUARD = 0x1C9CF8; // type:func FUN_001c9d50 = 0x1C9D50; // type:func HandleStepguardMessage__FP9STEPGUARD5MSGIDPv = 0x1C9DE0; // type:func SgasGetStepguard__FP9STEPGUARD = 0x1CA460; // type:func FCanStepguardAttack__FP9STEPGUARD = 0x1CA468; // type:func RenderStepguardSelf__FP9STEPGUARDP2CMP2RO = 0x1CA5E0; // type:func FValidSgs__F3SGS = 0x1CA600; // type:func UseStepguardAnimation__FP9STEPGUARD3SGS3OID = 0x1CA608; // type:func UseStepguardAnimationImmediate__FP9STEPGUARD3SGS3OID = 0x1CA658; // type:func FUN_001ca6d0 = 0x1CA6D0; // type:func UseStepguardDeathAnimation__FP9STEPGUARDi3OID = 0x1CA720; // type:func PasegFindStepguard__FP9STEPGUARD3OID = 0x1CA758; // type:func LoadStepguardAnimations__FP9STEPGUARD = 0x1CA7C0; // type:func UseStepguardExpl__FP9STEPGUARD3OID = 0x1CA878; // type:func UseStepguardRwm__FP9STEPGUARD3OID = 0x1CA888; // type:func UseStepguardPhys__FP9STEPGUARD3SGS3OID = 0x1CA898; // type:func LoadStepguardPhys__FP9STEPGUARD = 0x1CA8E8; // type:func AddStepguardEffect__FP9STEPGUARD3OID3ZPK = 0x1CA960; // type:func SetStepguardPathzone__FP9STEPGUARD3OID = 0x1CA998; // type:func PsoEnemyStepguard__FP9STEPGUARD = 0x1CAA08; // type:func FUN_001caad0 = 0x1CAAD0; // type:func SetStepguardEnemyObject__FP9STEPGUARDP2SO = 0x1CAB00; // type:func RebindStepguardEnemy__FP9STEPGUARD = 0x1CAB10; // type:func FUN_001cac28__FP9STEPGUARD = 0x1CAC28; // type:func FUN_001cac30 = 0x1CAC30; // type:func AdjustStepguardDz__FP9STEPGUARDiP2DZif = 0x1CACB0; // type:func SetStepguardAttackAngleMax__FP9STEPGUARDf = 0x1CAD28; // type:func AddStepguardAlarm__FP9STEPGUARDP5ALARM = 0x1CAD40; // type:func MatchStepguardAnimationPhase__FP9STEPGUARD3OIDN31 = 0x1CAD60; // type:func AddStepguardCustomXps__FP9STEPGUARDP2SOiP3BSPT3PP2XP = 0x1CAD98; // type:func FUN_001caee0 = 0x1CAEE0; // type:func UpdateStepguardEffect__FP9STEPGUARD = 0x1CAF38; // type:func SetStepguardPatrolAnimation__FP9STEPGUARDP4ASEG = 0x1CB328; // type:func FInflictStepguardZap__FP9STEPGUARDP2XPP3ZPR = 0x1CB3C0; // type:func FDetectStepguard__FP9STEPGUARD = 0x1CB3C8; // type:func FCheckStepguardEnemyHidden__FP9STEPGUARD = 0x1CB3D0; // type:func FUN_001cb578 = 0x1CB578; // type:func PsggNew__FP2SW = 0x1CB5B8; // type:func InitSgg__FP3SGG = 0x1CB618; // type:func AddSggGuard__FP3SGGP9STEPGUARD = 0x1CB648; // type:func AddSggGuardName__FP3SGG3OID = 0x1CB6A8; // type:func AddSggSearchXfmName__FP3SGG3OID = 0x1CB6D0; // type:func RemoveSggGuard__FP3SGGP9STEPGUARD = 0x1CB6F8; // type:func BindSgg__FP3SGG = 0x1CB7A0; // type:func PostSggLoadCallback__FP3SGG5MSGIDPv = 0x1CB8B8; // type:func EnsureSggCallback__FP3SGG = 0x1CBAA0; // type:func PsoEnemySgg__FP3SGG = 0x1CBAF8; // type:func UpdateSggCallback__FP3SGG5MSGIDPv = 0x1CBB20; // type:func SggsNextSgg__FP3SGG = 0x1CBB88; // type:func FDetectSgg__FP3SGG = 0x1CBCB8; // type:func FAbandonSggSearch__FP3SGG = 0x1CBD58; // type:func EnsureSggAlarm__FP3SGGP5ALARM = 0x1CBE20; // type:func TriggerSggAlarms__FP3SGG4ALTK = 0x1CBE70; // type:func SetSggSggs__FP3SGG4SGGS = 0x1CBEE8; // type:func AssignSggSearchPoints__FP3SGG = 0x1CC120; // type:func s_asnipStepguardLoad = 0x274C20; D_0024D654 = 0x24D654; //////////////////////////////////////////////////////////////// // P2/stephang.c //////////////////////////////////////////////////////////////// PostJtLoadSwing__FP2JTP2BLPP6ASEGBL = 0x1CC410; // type:func AnticipateJtForce__FP2JTP2SOP6VECTORT2P2FX = 0x1CC490; // type:func CalculateJtHangAccel__FP2JT = 0x1CC818; // type:func PresetJtAccelHang__FP2JT = 0x1CCF98; // type:func AddJtExternalAccelerations__FP2JTP2XAf = 0x1CD088; // type:func UpdateJtActiveHang__FP2JTP3JOY = 0x1CD0C8; // type:func CheckJtUnhook__FP2JT = 0x1CD6C0; // type:func UpdateJtHookOx__FP2JTP2LOi = 0x1CD7E0; // type:func AddJtHookXps__FP2JTiP2LOP6VECTORN23 = 0x1CD870; // type:func GetJtHangHeading__FP2JTPf = 0x1CDB28; // type:func UpdateJtIkHang__FP2JT = 0x1CDB70; // type:func FUN_001cdd98 = 0x1CDD98; // type:func FUN_001cdf78 = 0x1CDF78; // type:func //////////////////////////////////////////////////////////////// // P2/stephide.c //////////////////////////////////////////////////////////////// JtbsChooseJtHide__FP2JTP2LOP4JTHK = 0x1CDFB8; // type:func MeasureJtJumpToTarget__FP2JTP6VECTORP3ALOT1T1PfT5T1T1 = 0x1CE590; // type:func GetJtRailLanding__FP2JTP4RAILfP6VECTORT3 = 0x1CE800; // type:func GMeasureJumpRail__FP3MJRf = 0x1CE9E8; // type:func FUN_001cea58 = 0x1CEA58; // type:func GMeasureJumpHshape__FP3MJHf = 0x1CEAB8; // type:func FUN_001ceb18 = 0x1CEB18; // type:func FUN_001cedf8 = 0x1CEDF8; // type:func FUN_001cee30 = 0x1CEE30; // type:func FUN_001ceec8 = 0x1CEEC8; // type:func FUN_001cf138 = 0x1CF138; // type:func FUN_001cf158 = 0x1CF158; // type:func UpdateJtActiveHide__FP2JTP3JOY = 0x1CFFD0; // type:func MatchJtXmgRail__FP2JTP3XMGP6ACTADJ = 0x1D0B20; // type:func UpdateJtHide__FP2JT = 0x1D0C78; // type:func UpdateJtInternalXpsHide__FP2JT = 0x1D0F20; // type:func SetJtHfdk__FP2JT4HFDK = 0x1D1200; // type:func ResetJtDynamicTunnel__FP2JT = 0x1D1260; // type:func PresetJtAccelHide__FP2JT = 0x1D12F0; // type:func FUN_001d1478 = 0x1D1478; // type:func //////////////////////////////////////////////////////////////// // P2/steppipe.c //////////////////////////////////////////////////////////////// PostJtLoadPipe__FP2JT = 0x1D14F0; // type:func GetJtPipeGoalMat__FP2JTP4PIPEfP7MATRIX3 = 0x1D1630; // type:func PresetJtAccelPipe__FP2JT = 0x1D1A80; // type:func UpdateJtActivePipe__FP2JTP3JOY = 0x1D1BB0; // type:func UpdateJtInternalXpsPipe__FP2JT = 0x1D2518; // type:func SetJtJtpdk__FP2JT5JTPDK = 0x1D27C0; // type:func PlaceJtOnPipe__FP2JTP4PIPE = 0x1D2830; // type:func //////////////////////////////////////////////////////////////// // P2/steppower.c //////////////////////////////////////////////////////////////// SetFsp__F3FSP = 0x1D29C8; // type:func UpdateJtActivePowerUp__FP2JTP3JOY = 0x1d2bb8; // type:func IRotatePowerUp__FP3JOYiiPi = 0x1d3100; // type:func s_mpfspachz = 0x274f58; //size:0x1c g_fsp = 0x274f74; //size:0x4 // float[3] @ 0x274f78 RT_JtSpeedUpClock = 0x274f84; // size:0x4 RT_JtSlowDownClock = 0x274f88; // size:0x4 s_mpfspgrfvault = 0x274F38; // size:0x1c //////////////////////////////////////////////////////////////// // P2/steprail.c // TODO: Mangle the function names. //////////////////////////////////////////////////////////////// func_001D31D0__FP2LOi = 0x1D31D0; // type:func post_load_steprail = 0x1D3290; // type:func func_001D32D8__FiP2JTl = 0x1D32D8; // type:func update_steprail = 0x1D3398; // type:func preset_steprail_accel = 0x1D3470; // type:func FUN_001d34e0 = 0x1D34E0; // type:func FUN_001d3500 = 0x1D3500; // type:func FUN_001d35a8 = 0x1D35A8; // type:func update_steprail_message = 0x1D3678; // type:func //////////////////////////////////////////////////////////////// // P2/steprun.c //////////////////////////////////////////////////////////////// PostStepLoadRun__FP4STEPP5BLRUNPP6ASEGBL = 0x1D36F0; // type:func CalculateBlrunV__FiP5BLRUNP4MRSGP6VECTOR = 0x1D39E0; // type:func ProjectStepRunPlant__FP4STEPP5BLRUNffiiP6VECTOR = 0x1D3A38; // type:func FIntersectStepRunPlant__FP4STEPP6VECTORT1Pf = 0x1D3B58; // type:func FReblendAbl2D__FiiiP2BLe = 0x1D3C68; // type:func AdjustStepRun__FP4STEPP5BLRUNP6ASEGBLP5ASEGA = 0x1D3E00; // type:func SetStepRunTarget__FP4STEPffP5BLRUNP6ASEGBL = 0x1D40A0; // type:func //////////////////////////////////////////////////////////////// // P2/stepside.c //////////////////////////////////////////////////////////////// PostJtLoadSidestep__FP2JTP4BLSSPP6ASEGBL = 0x1D4148; // type:func AdjustJtSidestep__FP2JTP4BLSSP6ASEGBL = 0x1D4348; // type:func SetJtSidestepTarget__FP2JTP4BLSSP6ASEGBLff = 0x1D4698; // type:func //////////////////////////////////////////////////////////////// // P2/stepzap.c //////////////////////////////////////////////////////////////// PostJtLoadZap__FP2JT = 0x1D4848; // type:func PresetJtAccelZap__FP2JT = 0x1D48E8; // type:func UpdateJtZap__FP2JT = 0x1D4A98; // type:func FUN_001d4c90 = 0x1D4C90; // type:func FUN_001d4c98 = 0x1D4C98; // type:func FTakeJtDamage__FP2JTP3ZPR = 0x1D4D08; // type:func FUN_001d51a0 = 0x1D51A0; // type:func FUN_001d5398 = 0x1D5398; // type:func FUN_001d5418 = 0x1D5418; // type:func FUN_001d5468 = 0x1D5468; // type:func FUN_001d54e0 = 0x1D54E0; // type:func FUN_001d5620 = 0x1D5620; // type:func SgnCmpSpkn__FPCvT0 = 0x1D5650; // type:func DrawHaloSpks__FP6VECTORiP4SPKSP4SPKDP3RPL = 0x1D5678; // type:func DrawJtHaloElectric__FP3RPL = 0x1D5FA8; // type:func DrawJtHaloFire__FP3RPL = 0x1D60B0; // type:func FUN_001d61c8 = 0x1D61C8; // type:func RenderJtSelfZap__FP2JTP2CMP2RO = 0x1D62E0; // type:func JthsCurrentJt__FP2JT = 0x1D65D8; // type:func UseJtCharm__FP2JT = 0x1D6608; // type:func UpdateJtWater__FP2JT = 0x1D66A8; // type:func FFindJtWaterSurface__FP2JTP5WATERP6VECTOR = 0x1D6A18; // type:func AddJtWaterAcceleration__FP2JTP5WATERf = 0x1D6B18; // type:func FUN_001d6cb0 = 0x1D6CB0; // type:func FUN_001d6da0 = 0x1D6DA0; // type:func FUN_001d6dd8 = 0x1D6DD8; // type:func FUN_001d7018 = 0x1D7018; // type:func FUN_001d7040 = 0x1D7040; // type:func InitZpr__FP3ZPR3ZPKP2LO = 0x1D7098; // type:func //////////////////////////////////////////////////////////////// // P2/stream.c //////////////////////////////////////////////////////////////// __5OSTRMi = 0x1D7100; // type:func __5OSTRMPvi = 0x1D7120; // type:func _$_5OSTRM = 0x1D7148; // type:func CbWrite__5OSTRMPvi = 0x1D7190; // type:func Flush__5OSTRM = 0x1D72C8; // type:func //////////////////////////////////////////////////////////////// // P2/suv.c //////////////////////////////////////////////////////////////// InitSuv__FP3SUV = 0x1D73A8; // type:func PostSuvLoad__FP3SUV = 0x1D7440; // type:func PresetSuvAccel__FP3SUVf = 0x1D7778; // type:func GExcludeAlm__FiP2LMf = 0x1D8470; // type:func UpdateSuvBalance__FP3SUV = 0x1D8578; // type:func DsGetTrackRelative__Ffff = 0x1D86F8; // type:func FIsSuvAheadOf__FP3SUVT0 = 0x1D8740; // type:func UpdateSuvLine__FP3SUVPi = 0x1D87C8; // type:func UpdateSuvHeading__FP3SUV = 0x1D8BD0; // type:func UpdateSuvWheels__FP3SUV = 0x1D8D90; // type:func UpdateSuvExpls__FP3SUV = 0x1D8E40; // type:func BoostSuv__FP3SUV = 0x1D92F0; // type:func FUN_001d9338 = 0x1D9338; // type:func UpdateSuvVolumes__FP3SUVi = 0x1D9488; // type:func UpdateSuvSounds__FP3SUVf = 0x1D9678; // type:func UpdateSuvPuncher__FP3SUV = 0x1D9AC8; // type:func UpdateSuv__FP3SUVf = 0x1D9C98; // type:func UpdateSuvActive__FP3SUVP3JOYf = 0x1D9D78; // type:func FUN_001da170 = 0x1DA170; // type:func UpdateSuvInternalXps__FP3SUV = 0x1DA310; // type:func AddSuvCustomXps__FP3SUVP2SOiP3BSPT3PP2XP = 0x1DA320; // type:func AdjustSuvNewXp__FP3SUVP2XPi = 0x1DA6E0; // type:func UpdateSuvInfluences__FP3SUVP2RO = 0x1DA7E0; // type:func RenderSuvSelf__FP3SUVP2CMP2RO = 0x1DAA18; // type:func UpdateSuvBounds__FP3SUV = 0x1DAC20; // type:func CollectSuvPrize__FP3SUV3PCKP3ALO = 0x1DACB0; // type:func UpdateSuvShapes__FP3SUV = 0x1DAD28; // type:func UpdateSuvXfWorld__FP3SUV = 0x1DAE18; // type:func GetSuvCpdefi__FP3SUVfP6CPDEFI = 0x1DAE48; // type:func OnSuvActive__FP3SUViP2PO = 0x1DAE68; // type:func HandleSuvMessage__FP3SUV5MSGIDPv = 0x1DAF08; // type:func SetSuvTrack__FP3SUVP5SHAPE = 0x1DAFB8; // type:func SetSuvLine__FP3SUVP5SHAPE = 0x1DB0C8; // type:func AddSuvCheckPoint__FP3SUVP3VOL = 0x1DB110; // type:func AddSuvFeature__FP3SUVP3VOLffP4EXPLT4 = 0x1DB1E8; // type:func SetSuvSuvs__FP3SUV4SUVS = 0x1DB238; // type:func ResetSuv__FP3SUV = 0x1DB290; // type:func junk_001DB448 = 0x1DB448; // type:func VecCombo__FG8VU_FLOATG9VU_VECTORT0T1 = 0x1DB460; // type:func //////////////////////////////////////////////////////////////// // P2/sw.c //////////////////////////////////////////////////////////////// InitSwDlHash__FP2SW = 0x1DB480; // type:func InitSw__FP2SW = 0x1DB4C8; // type:func DeleteSw__FP2SW = 0x1DB838; // type:func SetupBulkDataFromBrx__FiP18CBinaryInputStream = 0x1DB928; // type:func LoadBulkDataFromBrx__FP18CBinaryInputStream = 0x1DBA38; // type:func SetSwGravity__FP2SWf = 0x1DBA90; // type:func FUN_001dbac0 = 0x1DBAC0; // type:func FUN_001dbae0 = 0x1DBAE0; // type:func FUN_001dbb00 = 0x1DBB00; // type:func FOverflowSwLo__FP2SWP2LOi = 0x1DBB20; // type:func PxaAllocSw__FP2SW = 0x1DBB50; // type:func FreeSwXaList__FP2SWP2XA = 0x1DBB90; // type:func PmqAllocSw__FP2SW = 0x1DBBD8; // type:func FreeSwMqList__FP2SWP2MQ = 0x1DBC18; // type:func EnsureSwCallback__FP2SWPFPv5MSGIDPv_vPv5MSGIDT2 = 0x1DBC60; // type:func PostSwCallback__FP2SWPFPv5MSGIDPv_vPv5MSGIDT2 = 0x1DBCC8; // type:func ClearSwCallbacks__FP2SWiPFPv5MSGIDPv_vPv5MSGIDT3 = 0x1DBD40; // type:func ProcessSwCallbacks__FP2SW = 0x1DBE48; // type:func ProcessSwSpliceScheduledCallbacks__FP2SWf = 0x1DBEC8; // type:func PstsoAllocSw__FP2SW = 0x1DC0C8; // type:func FreeSwStsoList__FP2SWP4STSO = 0x1DC108; // type:func AddSwProxySource__FP2SWP2LOi = 0x1DC150; // type:func PloGetSwProxySource__FP2SWi = 0x1DC208; // type:func IntersectSwBoundingBox__FP2SWP2SOP6VECTORT2PFPvP2SO_iPvPiPPP2SO = 0x1DC238; // type:func IntersectSwBoundingSphere__FP2SWP2SOP6VECTORfPFPvP2SO_iPvPiPPP2SO = 0x1DC4D0; // type:func RemoveOxa__FP3OXAPP3OXA = 0x1DC710; // type:func InitSwAoxa__FP2SW = 0x1DC740; // type:func AddOxa__FP3OXAPP3OXA = 0x1DC7B0; // type:func PoxaAllocSw__FP2SWP2SO = 0x1DC7D0; // type:func FreeSwPoxa__FP2SWP3OXA = 0x1DC828; // type:func CreateSwDefaultLights__FP2SW = 0x1DC9A0; // type:func FUN_001dccc0__FP18CBinaryInputStream = 0x1DCCC0; // type:func CreateSwPrizes__FP2SW = 0x1DCD28; // type:func LoadSwFromBrx__FP2SWP18CBinaryInputStream = 0x1DCEA0; // type:func FClipLineHomogeneous__FP7VECTOR4 = 0x1DD218; // type:func DrawLineWorld__FP6VECTORT0G4RGBAP2CMi = 0x1DD3E0; // type:func DrawAxesWorld__FP6VECTORP7MATRIX3fP2CMi = 0x1DD548; // type:func SetSwIllum__FP2SWf = 0x1DD5F8; // type:func SetSwIllumShadow__FP2SWf = 0x1DD610; // type:func SetSwExcitement__FP2SWf = 0x1DD628; // type:func FLevelSwVisited__FP2SW3WID = 0x1DD690; // type:func FLevelSwPrimary__FP2SW3WID = 0x1DD6B0; // type:func FLevelSwSecondary__FP2SW3WID = 0x1DD6D0; // type:func FLevelSwTertiary__FP2SW3WID = 0x1DD6F0; // type:func FUN_001dd710 = 0x1DD710; // type:func FUN_001dd758 = 0x1DD758; // type:func FUN_001dd7a0 = 0x1DD7A0; // type:func FUN_001dd7e8 = 0x1DD7E8; // type:func FUN_001dd888 = 0x1DD888; // type:func FUN_001dd8e8 = 0x1DD8E8; // type:func FUN_001dd908 = 0x1DD908; // type:func FUN_001dd928 = 0x1DD928; // type:func FUN_001dd950 = 0x1DD950; // type:func FUN_001dd9a0 = 0x1DD9A0; // type:func FUN_001dd9c0 = 0x1DD9C0; // type:func SetSwPlayerSuck__FP2SWf = 0x1DD9D8; // type:func GetSwPlayerSuck__FP2SWPf = 0x1DDA08; // type:func IncrementSwHandsOff__FP2SW = 0x1DDA20; // type:func DecrementSwHandsOff__FP2SW = 0x1DDA50; // type:func IsSwHandsOff__FP2SW = 0x1DDA80; // type:func IsSwVagPlaying__FP2SWPi = 0x1DDA90; // type:func SetSwDarken__FP2SWf = 0x1DDAB8; // type:func SetSwDarkenSmooth__FP2SWf = 0x1DDAC8; // type:func CancelSwDialogPlaying__FP2SW = 0x1DDAD0; // type:func FUN_001ddb20 = 0x1DDB20; // type:func FUN_001ddb58 = 0x1DDB58; // type:func FUN_001ddbb8 = 0x1DDBB8; // type:func FUN_001ddbf8 = 0x1DDBF8; // type:func FUN_001ddc18 = 0x1DDC18; // type:func FUN_001ddc38 = 0x1DDC38; // type:func FUN_001ddc40 = 0x1DDC40; // type:func FUN_001ddc78 = 0x1DDC78; // type:func FUN_001ddc90 = 0x1DDC90; // type:func FUN_001ddcb0 = 0x1DDCB0; // type:func FUN_001ddcc8 = 0x1DDCC8; // type:func g_grfdfl = 0x275630; // size:0x10 g_vecHighlight = 0x275640; // size:0x10 g_degHighlight = 0x275650; // size:0x4 g_gMidtone = 0x275654; // size:0x4 g_degMidtone = 0x275658; // size:0x4 g_gShadow = 0x27565C; // size:0x4 g_degShadow = 0x275660; // size:0x10 g_psw = 0x275710; // size:0x4 g_fLoadDebugInfo = 0x275714; // size:0x4 g_pbBulkData = 0x275718; // size:0x4 g_fLoadBulkData = 0x27571C; // size:0x4 g_cbBulkData = 0x275720; // size:0x4 g_nBulkDataSig = 0x275724; // size:0x4 g_cbBulkDataReadAdjustment = 0x275728; // size:0x8 //////////////////////////////////////////////////////////////// // P2/tail.c //////////////////////////////////////////////////////////////// InitTail__FP4TAIL = 0x1DDCE0; // type:func PostTailLoad__FP4TAIL = 0x1DDD18; // type:func UpdateTailConstraints__FP4TAIL = 0x1DDE90; // type:func MatchTailOtherObject__FP4TAILP3ALO = 0x1DE768; // type:func //////////////////////////////////////////////////////////////// // P2/tank.c //////////////////////////////////////////////////////////////// InitTank__FP4TANK = 0x1DE798; // type:func PostTankLoad__FP4TANK = 0x1DE808; // type:func UpdateTank__FP4TANKf = 0x1DE910; // type:func FUN_001deb30 = 0x1DEB30; // type:func UseTankCharm__FP4TANK = 0x1DEBB8; // type:func UpdateTankActive__FP4TANKP3JOYf = 0x1DEBE8; // type:func OnTankActive__FP4TANKiP2PO = 0x1DF290; // type:func RenderTankAll__FP4TANKP2CMP2RO = 0x1DF2C8; // type:func ImpactTank__FP4TANKi = 0x1DF520; // type:func FInvulnerableTank__FP4TANK3ZPK = 0x1DF5A0; // type:func ApplyTankThrow__FP4TANKP2PO = 0x1DF600; // type:func FTakeTankDamage__FP4TANKP3ZPR = 0x1DF700; // type:func FUN_001dfa10 = 0x1DFA10; // type:func AdjustTankNewXp__FP4TANKP2XPi = 0x1DFA40; // type:func HandleTankMessage__FP4TANK5MSGIDPv = 0x1DFB08; // type:func JthsCurrentTank__FP4TANK = 0x1DFBD0; // type:func SetTankTanks__FP4TANK5TANKS = 0x1DFBE0; // type:func //////////////////////////////////////////////////////////////// // P2/target.c //////////////////////////////////////////////////////////////// StartupTarget__Fv = 0x1DFD48; // type:func ResetTargetList__Fv = 0x1DFD70; // type:func InitTarget__FP6TARGET = 0x1DFD90; // type:func OnTargetAdd__FP6TARGET = 0x1DFDC8; // type:func OnTargetRemove__FP6TARGET = 0x1DFE00; // type:func CloneTarget__FP6TARGETT0 = 0x1DFE38; // type:func g_dlTarget = 0x2758D0; // size:0xc //////////////////////////////////////////////////////////////// // P2/text.c //////////////////////////////////////////////////////////////// CchParsePchzInt__FPcPi = 0x1E08F8; // type:func CchParsePchzTft__FPcP3TFTPPc = 0x1E0978; // type:func WriteTftPchz__FP3TFTP5OSTRMPc = 0x1E0CD0; // type:func FNegTftUl__FP3TFTP2UL = 0x1E0E18; // type:func UnRadixFromChConversion__Fc = 0x1E0EF8; // type:func CchAchFromUl__FPciUlUi = 0x1E0F58; // type:func WriteTftUl__FP3TFTP5OSTRMUl = 0x1E1028; // type:func ExpFirstFromG__Fd = 0x1E1330; // type:func ChDigitFromG__Fdii = 0x1E13D0; // type:func CchAchFromDouble__FPciP3TFTd = 0x1E1498; // type:func WriteTftDouble__FP3TFTP5OSTRMd = 0x1E17A8; // type:func WriteTft__FP3TFTP5OSTRMPPcPci = 0x1E1A08; // type:func CchOstrmPrintf__FP5OSTRMPcT1 = 0x1E1DB8; // type:func vprintf = 0x1E1EB0; // type:func printf = 0x1E1F10; // type:func vsprintf = 0x1E1F58; // type:func sprintf = 0x1E1FD0; // type:func _vsnprintf = 0x1E2018; // type:func junk_001E20B0 = 0x1E20B0; // type:func _snprintf = 0x1E20B8; // type:func junk_001E20F8 = 0x1E20F8; // type:func strlen = 0x1E2100; // type:func strcpy = 0x1E2138; // type:func strcpy1 = 0x1E2180; // type:func strchr = 0x1E21D8; // type:func junk_001E2210 = 0x1E2210; // type:func UpperizePchz__FPc = 0x1E2218; // type:func //////////////////////////////////////////////////////////////// // P2/thread.c //////////////////////////////////////////////////////////////// SemaCreate__Fii = 0x1e2268; // type:func junk_001E22B8 = 0x1E22B8; // type:func InitCritSect__FP8CRITSECT = 0x1e22c0; // type:func EnterCritSect__FP8CRITSECT = 0x1e22f8; // type:func LeaveCritSect__FP8CRITSECT = 0x1e2358; // type:func junk_001E2390 = 0x1E2390; // type:func StartupThread__Fv = 0x1e2398; // type:func g_athread = 0x275958; // size:0xC g_abRenderLoopStack = 0x6056d0; // size:0x20000 //////////////////////////////////////////////////////////////// // P2/tn.c //////////////////////////////////////////////////////////////// PtnfnFromTn__FP2TN = 0x1E2420; // type:func GetTnfnNose__FP4TNFNP6CPDEFIP6VECTORP2TN = 0x1E2438; // type:func InitTn__FP2TN = 0x1E2520; // type:func OnTnRemove__FP2TN = 0x1E25F8; // type:func LoadTnFromBrx__FP2TNP18CBinaryInputStream = 0x1E2648; // type:func PostTnLoad__FP2TN = 0x1E2758; // type:func SetTnTns__FP2TN3TNS = 0x1E2778; // type:func FUN_001e2840__FP2TN3TNS = 0x1E2840; // type:func UpdateTnCallback__FP2TN5MSGIDPv = 0x1E2870; // type:func UpdateTn__FP2TNf = 0x1E2940; // type:func RenderTnSelf__FP2TNP2CMP2RO = 0x1E2988; // type:func FreezeTn__FP2TNi = 0x1E29A8; // type:func FUN_001e29e8 = 0x1E29E8; // type:func CalculateTnCrv__FP2TNP6VECTORN21 = 0x1E2A00; // type:func CalculateTnPos__FP2TNP6VECTORffP3CLQP2LM4FTNDT1 = 0x1E2BF0; // type:func ActivateCptn__FP4CPTNPv = 0x1E2E68; // type:func DeactivateCptn__FP4CPTNPv = 0x1E30A0; // type:func SetCptn__FP4CPTNPv = 0x1E30D8; // type:func RevokeCptn__FP4CPTNPv = 0x1E30E0; // type:func FUN_001e30e8 = 0x1E30E8; // type:func UpdateCptn__FP4CPTNP6CPDEFIP3JOYf = 0x1E31F0; // type:func FUN_001e4578 = 0x1E4578; // type:func FUN_001e4880 = 0x1E4880; // type:func FUN_001e4888 = 0x1E4888; // type:func LoadTbspFromBrx__FP18CBinaryInputStreamPiPP5TSURFT1PP4TBSP = 0x1E4C48; // type:func FCheckTbspPoint__FP4TBSPP6VECTOR = 0x1E4DC0; // type:func //////////////////////////////////////////////////////////////// // P2/transition.c //////////////////////////////////////////////////////////////// __11CTransition = 0x1E4E38; // type:func Set__11CTransitionPc3OIDT2i = 0x1E4E80; // type:func Execute__11CTransition = 0x1e4ea8; // type:func ResetWorld__F6FTRANS = 0x1E5278; // type:func transition__static_initialization_and_destruction_0 = 0x1E5328; // type:func _GLOBAL_$I$g_transition = 0x1E5358; // type:func g_transition = 0x275af0; // size:0x38 //////////////////////////////////////////////////////////////// // P2/turret.c //////////////////////////////////////////////////////////////// InitTurret__FP6TURRET = 0x1E5378; // type:func FUN_001e53f8 = 0x1E53F8; // type:func PostTurretLoad__FP6TURRET = 0x1E5428; // type:func UpdateTurret__FP6TURRETf = 0x1E55D0; // type:func UpdateTurretActive__FP6TURRETP3JOYf = 0x1E56A0; // type:func OnTurretActive__FP6TURRETiP2PO = 0x1E5750; // type:func FFilterTurret__FP6TURRETP2SO = 0x1E5888; // type:func UpdateTurretAim__FP6TURRET = 0x1E5938; // type:func FireTurret__FP6TURRET = 0x1E5C78; // type:func HandleTurretMessage__FP6TURRET5MSGIDPv = 0x1E5CE8; // type:func FIgnoreTurretIntersection__FP6TURRETP2SO = 0x1E5DA8; // type:func CollectTurretPrize__FP6TURRET3PCKP3ALO = 0x1E5E08; // type:func GetTurretDiapi__FP6TURRETP6DIALOGP5DIAPI = 0x1E5E50; // type:func FUN_001e5e60 = 0x1E5E60; // type:func //////////////////////////////////////////////////////////////// // P2/tv.c //////////////////////////////////////////////////////////////// InitTv__FP2TV5BLOTK = 0x1E5E70; // type:func PostTvLoad__FP2TV = 0x1E6188; // type:func GetTvItvbMinMax__FP2TVPiT1 = 0x1E6268; // type:func DrawTvArea__FP2TVR4GIFSi = 0x1E62A8; // type:func DrawTvBands__FP2TVR4GIFS = 0x1E6600; // type:func DrawTvOutline__FP2TVR4GIFS = 0x1E6C20; // type:func DrawTv__FP2TV = 0x1E73B8; // type:func SetTvTvs__FP2TV3TVS = 0x1E7440; // type:func AcceptTvSpeaker__FP2TV = 0x1E7460; // type:func SetTvTvgs__FP2TV4TVGS = 0x1E7518; // type:func SetTvBlots__FP2TV5BLOTS = 0x1E76E0; // type:func UpdateTv__FP2TV = 0x1E77C0; // type:func RenderTv__FP2TV = 0x1E7C60; // type:func PreTvContext__FP3RPL = 0x1E80D8; // type:func PostTvContext__FP3RPL = 0x1E83E0; // type:func SetTvSpeaker__FP2TVP7SPEAKER = 0x1E86E0; // type:func SetTvReplace__FP2TVP3ALO = 0x1E87F0; // type:func OnTvReset__FP2TV = 0x1E8840; // type:func tv__static_initialization_and_destruction_0 = 0x1E8878; // type:func _GLOBAL_$I$RGBA_Distortion = 0x1E88B0; // type:func //////////////////////////////////////////////////////////////// // P2/ub.c //////////////////////////////////////////////////////////////// InitUbg__FP3UBG = 0x1E88D0; // type:func PostUbgLoad__FP3UBG = 0x1E8948; // type:func PsoPadUbgClosest__FP3UBGP6VECTOR = 0x1E89F0; // type:func OnUbgEnteringSgs__FP3UBG3SGSP4ASEG = 0x1E8A50; // type:func SgsNextUbgAI__FP3UBG = 0x1E8D58; // type:func FDetectUbg__FP3UBG = 0x1E8DB0; // type:func FCanUbgAttack__FP3UBG = 0x1E8DD0; // type:func DoUbgFreefallJump__FP3UBG = 0x1E8E08; // type:func DoUbgFreefallLanding__FP3UBG = 0x1E8E48; // type:func UpdateUbgGoal__FP3UBGi = 0x1E8EF8; // type:func UpdateUbgSgs__FP3UBG = 0x1E8FA8; // type:func FUN_001e8fe8 = 0x1E8FE8; // type:func FIgnoreUbgIntersection__FP3UBGP2SO = 0x1E9038; // type:func //////////////////////////////////////////////////////////////// // P2/ui.c //////////////////////////////////////////////////////////////// StartupUi__Fv = 0x1E9088; // type:func InitUi__FP2UI = 0x1E90A8; // type:func PostUiLoad__FP2UI = 0x1E90E8; // type:func UpdateUi__FP2UI = 0x1e9108; // type:func PushUiActiveBlot__FP2UIP4BLOT = 0x1E9498; // type:func PopUiActiveBlot__FP2UI = 0x1E9570; // type:func DrawUi__Fv = 0x1e9648; // type:func RenderUi__Fv = 0x1e9668; // type:func ResetUi__FP2UI = 0x1E9688; // type:func SetUiUis__FP2UI3UIS = 0x1E96F8; // type:func SetUiUPause__FP2UIf = 0x1E98E8; // type:func FUN_001e9970__Fv = 0x1E9970; // type:func FUN_001e9a10__Fv = 0x1E9A10; // type:func FUN_001e9a68__Fv = 0x1E9A68; // type:func FUN_001e9ad8__Fv = 0x1E9AD8; // type:func check_anticrack_collectibles_Fv = 0x1E9B30; // type:func g_ui = 0x275BC0; //////////////////////////////////////////////////////////////// // P2/update.c //////////////////////////////////////////////////////////////// UpdateSwObjects__FP2SWf = 0x1E9C78; // type:func UpdateSwPosWorldPrev__FP2SW = 0x1E9E30; // type:func UpdateSwRealClock__FP2SWf = 0x1E9EE8; // type:func UpdateSwDarkening__FP2SWf = 0x1EA0A8; // type:func UpdateSw__FP2SWf = 0x1EA118; // type:func //////////////////////////////////////////////////////////////// // P2/util.c //////////////////////////////////////////////////////////////// RadNormalize__Ff = 0x1EA408; // type:func GLimitAbs__Fff = 0x1EA480; // type:func GSmooth__FfffP3SMPPf = 0x1EA4B8; // type:func GSmoothA__FffffP4SMPAPf = 0x1EA620; // type:func junk_001EA720 = 0x1EA720; // type:func RadSmooth__FfffP3SMPPf = 0x1EA728; // type:func RadSmoothA__FffffP4SMPAPf = 0x1EA798; // type:func PosSmooth = 0x1EA818; // type:func SmoothMatrix = 0x1EA918; // type:func NRandInRange__Fii = 0x1EAA70; // type:func GRandInRange__Fff = 0x1EAAE0; // type:func GRandGaussian__Ffff = 0x1EAB48; // type:func FFloatsNear__Ffff = 0x1EAC68; // type:func CSolveQuadratic__FfffPf = 0x1EACA0; // type:func PrescaleClq__FP3CLQffT0 = 0x1EAD30; // type:func CalculateSinCos__FfPfT1 = 0x1EAD88; // type:func GTrunc__Fd = 0x1EAE78; // type:func GTrunc__Ff = 0x1EAF28; // type:func GModPositive__Fff = 0x1EAFE0; // type:func FitClq__FffffP3CLQ = 0x1EB018; // type:func FCheckLm__FP2LMf = 0x1EB050; // type:func FCheckAlm__FiP2LMf = 0x1EB080; // type:func GLimitLm__FP2LMf = 0x1EB0F8; // type:func SgnCompareG__FPfT0 = 0x1EB128; // type:func Force__FPv = 0x1EB160; // type:func MinimizeRange = 0x1EB168; // type:func junk_001EB458 = 0x1EB458; // type:func g_lmZeroOne = 0x275C60; //////////////////////////////////////////////////////////////// // P2/vec.c //////////////////////////////////////////////////////////////// SetVectorCylind__FP6VECTORfff = 0x1ED650; // type:func SetVectorSphere__FP6VECTORfff = 0x1ED6B0; // type:func SProjectVector__FP6VECTORT0 = 0x1ED738; // type:func GetNormalVectors__FP6VECTORN30 = 0x1ED780; // type:func GetNormalVector__FP6VECTORT0 = 0x1ED840; // type:func junk_001ED900 = 0x1ED900; // type:func RadBetweenVectors__FP6VECTORN20 = 0x1ED908; // type:func FindClosestPointBetweenLines__FP6VECTORN30PfT4T0 = 0x1EDA80; // type:func FindClosestPointBetweenLineSegments__FP6VECTORN40PfT0 = 0x1EDC08; // type:func CalculateVectorPanTilt__FP6VECTORPfT1 = 0x1EDDB0; // type:func ConvertDeulToW__FP6VECTORN20 = 0x1EDE38; // type:func FCalculateMuzzleVelocity__FP6VECTORT0fT0P2SO = 0x1EDEF0; // type:func FCalculateMuzzleVelocity1 = 0x1EE090; // type:func FCalculateMuzzleVelocityAngle__FP6VECTORT0fT0P2SO = 0x1EE290; // type:func LimitVectorLength = 0x1EE2B0; // type:func //////////////////////////////////////////////////////////////// // P2/vifs.c //////////////////////////////////////////////////////////////// __4VIFS = 0x1EE318; // type:func junk_001EE360 = 0x1EE360; // type:func Align__4VIFSi = 0x1EE368; // type:func AddVifBaseOffset__4VIFSii = 0x1EE3B8; // type:func AddVifMscal__4VIFSPv = 0x1EE3F0; // type:func AddVifMscalf__4VIFSPv = 0x1EE420; // type:func AddVifFlush__4VIFS = 0x1EE450; // type:func AddVifFlusha__4VIFS = 0x1EE468; // type:func AddVifFlushe__4VIFS = 0x1EE480; // type:func AddVifStcycl__4VIFSii = 0x1EE498; // type:func AddVifStrow__4VIFSP2QW = 0x1EE4C0; // type:func AddVifStmask__4VIFSUi = 0x1EE528; // type:func CbUnpackSetup__4VIFS3UPKii = 0x1EE560; // type:func UnpackHelper__4VIFS3UPKiiPiPPUi = 0x1EE5C8; // type:func AddVifUnpack__4VIFS3UPKiPvi = 0x1EE668; // type:func AddVifUnpackRefs__4VIFS3UPKiPviPPPv = 0x1EE718; // type:func AddVifDirect__4VIFSiP2QWi = 0x1EE7D0; // type:func AddVifDirectRefs__4VIFSiP2QWi = 0x1EE850; // type:func AddVifGifs__4VIFSP4GIFS = 0x1EE8D0; // type:func //////////////////////////////////////////////////////////////// // P2/vis.c //////////////////////////////////////////////////////////////// InitVismap__FP6VISMAP = 0x1EE900; // type:func LoadVismapFromBrx__FP6VISMAPP18CBinaryInputStream = 0x1EE930; // type:func GrfzonOneHop__FP6VISMAPP4VBSP = 0x1EE9D0; // type:func ClipVbspSphereOneHop__FP6VISMAPP4VBSPG9VU_VECTORfPi = 0x1EEA40; // type:func ClipVismapPointNoHop__FP6VISMAPP6VECTORPi = 0x1EEBB0; // type:func ClipVismapSphereOneHop__FP6VISMAPP6VECTORfPi = 0x1EEB60; // type:func //////////////////////////////////////////////////////////////// // P2/water.c //////////////////////////////////////////////////////////////// InitWater__FP5WATER = 0x1EEC60; // type:func PostWaterLoad__FP5WATER = 0x1EECE0; // type:func CalculateWaterCurrent__FP5WATERP6VECTORN21 = 0x1EED68; // type:func UpdateSwXaList__FP2SWPP2XA = 0x1EEE50; // type:func UpdateWater__FP5WATERf = 0x1EEF90; // type:func AddWaterExternalAccelerations__FP5WATERP2XAf = 0x1EF3A8; // type:func HandleWaterMessage__FP5WATER5MSGIDPv = 0x1EF3D8; // type:func UpdateWaterMergeGroup__FP5WATER = 0x1EF520; // type:func UGetWaterSubmerged__FP5WATERP2SOP6VECTORT2 = 0x1EF5B8; // type:func UpdateWaterBounds__FP5WATER = 0x1EF768; // type:func FInflictWaterZap__FP5WATERP2XPP3ZPR = 0x1EF808; // type:func PzpdEnsureWater__FP5WATER4ENSK = 0x1EF828; // type:func FUN_001ef830 = 0x1EF830; // type:func //////////////////////////////////////////////////////////////// // P2/waypoint.c //////////////////////////////////////////////////////////////// InitWaypoint__FP8WAYPOINT = 0x1EF838; // type:func PostWaypointLoad__FP8WAYPOINT = 0x1EF868; // type:func SetWaypointRsmg__FP8WAYPOINTi3OIDN22 = 0x1EF8C0; // type:func UpdateWaypoint__FP8WAYPOINTf = 0x1EF8F8; // type:func SetWaypointWps__FP8WAYPOINT3WPS = 0x1EF900; // type:func HandleWaypointMessage__FP8WAYPOINT5MSGIDPv = 0x1EF9C8; // type:func PwpsgNew__Fv = 0x1EFA30; // type:func AddWpsgWaypoint__FP4WPSGP8WAYPOINT = 0x1EFA60; // type:func RemoveWpsgWaypoint__FP4WPSGP8WAYPOINT = 0x1EFA88; // type:func UpdateWpsgCallback__FP4WPSG5MSGIDPv = 0x1EFB20; // type:func EnsureWpsgCallback__FP4WPSG = 0x1EFC98; // type:func junk_001EFCE0 = 0x1EFCE0; // type:func s_asnipPostWaypointLoad = 0x275E10; // TODO: Where does this belong to? g_vtwpsg = 0x2505c0; //////////////////////////////////////////////////////////////// // P2/wipe.c //////////////////////////////////////////////////////////////// InitWipe__FP4WIPE = 0x1EFCE8; // type:func UpdateWipe__FP4WIPEP3JOY = 0x1EFD10; // type:func DrawWipe__FP4WIPE = 0x1EFEE0; // type:func ActivateWipe__FP4WIPEP5TRANS5WIPEK = 0x1EFFA0; // type:func SetWipeButtonTrans__FP4WIPEP5TRANS5WIPEK = 0x1F00C0; // type:func FCatchWipeButtonTrans__FP4WIPEP3JOY5WIPES = 0x1F00F0; // type:func junk_001F0218 = 0x1F0218; // type:func SetWipeWipes__FP4WIPE5WIPES = 0x1F0220; // type:func WipeToWorldWarp = 0x1F0428; // type:func g_wipe = 0x275f80; g_pwipe = 0x275f84; //////////////////////////////////////////////////////////////// // P2/wm.c //////////////////////////////////////////////////////////////// FUN_001f0468 = 0x1F0468; // type:func FUN_001f0490 = 0x1F0490; // type:func FUN_001f0580 = 0x1F0580; // type:func PostWmLoad__FP2WM = 0x1F0660; // type:func BindWm__FP2WM = 0x1F0758; // type:func RefreshWmMoveStats__FP2WM10WORLDLEVEL = 0x1F0878; // type:func ThrowWmDisplayState__FP2WM10WORLDLEVELi = 0x1F08F0; // type:func CatchWmDisplayState__FP2WM = 0x1F0908; // type:func UpdateWm__FP2WMf = 0x1F0AE0; // type:func RenderWmAll__FP2WMP2CMP2RO = 0x1F0EB8; // type:func HandleWmMessage__FP2WM5MSGIDPv = 0x1F0F70; // type:func SetWmWms__FP2WM3WMS = 0x1F1050; // type:func ShowWm__FP2WM10WORLDLEVEL3WMS = 0x1F1590; // type:func HideWm__FP2WM = 0x1F1610; // type:func MoveWm__FP2WM3WMD = 0x1F1648; // type:func GetWmWorldPosScreen__FP2WM10WORLDLEVELP6VECTOR = 0x1F17A0; // type:func SetWmCursor__FP2WM10WORLDLEVEL = 0x1F18B0; // type:func PostWmcLoad__FP3WMC = 0x1F1960; // type:func UpdateWmcActive__FP3WMCP3JOY = 0x1F1A08; // type:func OnWmcActive__FP3WMCi = 0x1F1C90; // type:func DrawWmFan__FffffiG4RGBAT5i = 0x1F1E38; // type:func DrawWmc__FP3WMC = 0x1F20A8; // type:func wm__static_initialization_and_destruction_0 = 0x1F2688; // type:func junk_001F2728 = 0x1F2728; // type:func _GLOBAL_$I$U_WmFadedLevels = 0x1F2738; // type:func //////////////////////////////////////////////////////////////// // P2/wr.c //////////////////////////////////////////////////////////////// InitWr__FP2WR = 0x1F2758; // type:func ApplyWrGlob__FP2WRP3ALOP4GLOB = 0x1F2798; // type:func UpdateWrStateVectors__FP2WR = 0x1F2840; // type:func WarpWrTransform__FP2WRfP6VECTORP7MATRIX3T2T3T2 = 0x1F2EF0; // type:func GetWrBounds__FP2WRP6VECTOR = 0x1F3140; // type:func UNoise__Fi = 0x1F31F8; // type:func UNoise__Ffff = 0x1F3250; // type:func UBias__Fff = 0x1F3328; // type:func GFromOnz__FP3ONZ = 0x1F3358; // type:func UpdateWrMatrixes__FP2WR = 0x1F3408; // type:func AddWrCircleWarp__FP2WR = 0x1F36E8; // type:func AddWrBendWarp__FP2WR = 0x1F3768; // type:func PwreGetWrCur__FP2WR4ENSK4WREK = 0x1F37D8; // type:func PwreGetWrCircle__FP2WR4ENSK = 0x1F3810; // type:func PwreGetWrBend__FP2WR4ENSK = 0x1F3830; // type:func SetWrWavelength__FP2WRf = 0x1F3850; // type:func GetWrWavelength__FP2WRPf = 0x1F38A0; // type:func AddOnzOnze__FP3ONZffff = 0x1F38F0; // type:func AddWrBendNoise__FP2WRffff = 0x1F3928; // type:func AddWrSwivelNoise__FP2WRffff = 0x1F3990; // type:func //////////////////////////////////////////////////////////////// // P2/xform.c //////////////////////////////////////////////////////////////// InitXfm__FP3XFM = 0x1F39F8; // type:func LoadXfmFromBrx__FP3XFMP18CBinaryInputStream = 0x1F3A40; // type:func SetXfmParent__FP3XFMP3ALO = 0x1F3A90; // type:func ApplyXfmProxy__FP3XFMP5PROXY = 0x1F3AF0; // type:func ConvertXfmLocalToWorld__FP3XFMP6VECTORT1 = 0x1F3B48; // type:func GetXfmPos__FP3XFMP6VECTOR = 0x1F3BD8; // type:func GetXfmMat__FP3XFMP7MATRIX3 = 0x1F3C08; // type:func PwarpFromOid__F3OIDT0 = 0x1F3C38; // type:func LoadWarpFromBrx__FP4WARPP18CBinaryInputStream = 0x1F3D80; // type:func CloneWarp__FP4WARPT0 = 0x1F3EE0; // type:func PostWarpLoad__FP4WARP = 0x1F3F80; // type:func TriggerWarp__FP4WARP = 0x1F4008; // type:func SetWarpRsmg__FP4WARPi3OIDN22 = 0x1F42D0; // type:func FUN_001F4308 = 0x1F4308; // type:func TeleportSwPlayer__FP2SW3OIDT1 = 0x1F4318; // type:func PexitDefault__Fv = 0x1F4378; // type:func TriggerDefaultExit__Fi5WIPEK = 0x1F4408; // type:func LoadExitFromBrx__FP4EXITP18CBinaryInputStream = 0x1F4500; // type:func PostExitLoad__FP4EXIT = 0x1F4660; // type:func SetExitExits__FP4EXIT5EXITS = 0x1F4760; // type:func TriggerExit__FP4EXIT = 0x1F4808; // type:func WipeExit__FP4EXIT = 0x1F4A30; // type:func UpdateExit__FfP4EXIT = 0x1F4AE0; // type:func InitCamera__FP6CAMERA = 0x1F4E18; // type:func PostCameraLoad__FP6CAMERA = 0x1F4E48; // type:func EnableCamera__FP6CAMERA = 0x1F4ED0; // type:func DisableCamera__FP6CAMERA = 0x1F4F20; // type:func //////////////////////////////////////////////////////////////// // P2/zap.c //////////////////////////////////////////////////////////////// InitTzp__FP3TZP = 0x1F4F70; // type:func PostTzpLoad__FP3TZP = 0x1F4FD8; // type:func UpdateTzp__FP3TZPf = 0x1F5008; // type:func CloneTzp__FP3TZPT0 = 0x1F51A0; // type:func RenderTzpAll__FP3TZPP2CMP2RO = 0x1F51C8; // type:func FInflictTzpZap__FP3TZPP2XPP3ZPR = 0x1F51E8; // type:func PzpdEnsureTzp__FP3TZP4ENSK = 0x1F5208; // type:func FUN_001F5210__FP3TZP = 0x1F5210; // type:func InitVolzp__FP5VOLZP = 0x1F5218; // type:func UpdateVolzp__FP5VOLZPf = 0x1F5268; // type:func InitZpd__FP3ZPDP2SO = 0x1F5590; // type:func PostZpdLoad__FP3ZPD = 0x1F55A8; // type:func ApplyZpdThrow__FP3ZPDP2PO = 0x1F56D8; // type:func InflictZpdZap__FP3ZPDP2XPP3ZPR = 0x1F57E0; // type:func AddZpdZapObject__FP3ZPD3OID = 0x1F5840; // type:func AddZpdZapLo__FP3ZPDP2LO = 0x1F5868; // type:func RemoveZpdZapLo__FP3ZPDP2LO = 0x1F5930; // type:func //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // LIBRARIES //////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// memcmp = 0x1F59C4; // type:func memcpy = 0x01f5a58; // type:func memmove = 0x1f5b08; // type:func memset = 0x1f5c0c; // type:func qsort = 0x1f5cd0; // type:func //////////////////////////////////////////////////////////////// // /usr/local/sce/ee/gcc/src/newlib/libc/stdlib/rand.c //////////////////////////////////////////////////////////////// srand = 0x1F66F8; // type:func rand = 0x1F6708; // type:func //////////////////////////////////////////////////////////////// // klib.s //////////////////////////////////////////////////////////////// CreateThread = 0x1F6A10; // type:func ChangeThreadPriority = 0x1F6A50; // type:func GetThreadId = 0x1F6A90; // type:func CreateSema = 0x1F6B20; // type:func SignalSema = 0x1F6B40; // type:func WaitSema = 0x1F6B60; // type:func FlushCache = 0x1F6C20; // type:func //////////////////////////////////////////////////////////////// // sifrpc.c //////////////////////////////////////////////////////////////// sceSifInitRpc = 0x1F7BE8; // type:func sceSifBindRpc = 0x1F80C0; // type:func sceSifCallRpc = 0x1F8290; // type:func sceSifCheckStatRpc = 0x1F8480; // type:func //////////////////////////////////////////////////////////////// // filestub.c //////////////////////////////////////////////////////////////// sceFsReset = 0x1F8BF8; // type:func sceClose = 0x1F8C38; // type:func sceRead = 0x1F8DB8; // type:func sceIoctl = 0x1F92E8; // type:func //////////////////////////////////////////////////////////////// // eeloadfile.c //////////////////////////////////////////////////////////////// sceSifLoadFileReset = 0x1F9820; // type:func sceSifLoadModule = 0x1F9A90; // type:func //////////////////////////////////////////////////////////////// // iopreset.c //////////////////////////////////////////////////////////////// sceSifSyncIop = 0x1F9C18; // type:func sceSifRebootIop = 0x1F9C50; // type:func //////////////////////////////////////////////////////////////// // /usr/local/sce/ee/gcc/src/newlib/libc/stdlib/rand.c //////////////////////////////////////////////////////////////// __main__Fv = 0x1fae18; // type:func //////////////////////////////////////////////////////////////// // /usr/local/sce/ee/gcc/build/gcc/dp-bit.c //////////////////////////////////////////////////////////////// dpcmp = 0x1FD308; // type:func fptodp = 0x1FD868; // type:func //////////////////////////////////////////////////////////////// // vu/vu.c //////////////////////////////////////////////////////////////// sceGsResetPath = 0x2018E8; // type:func //////////////////////////////////////////////////////////////// // libdma.c //////////////////////////////////////////////////////////////// memclr = 0x202768; // type:func sceDmaGetChan = 0x2027A0; // type:func sceDmaReset = 0x2027C8; // type:func sceDmaPutEnv = 0x2028a8; // type:func sceDmaSend = 0x202A80; // type:func sceDmaRecv = 0x202b68; // type:func sceDmaSync = 0x202c38; // type:func //////////////////////////////////////////////////////////////// // ../eecdvd.c //////////////////////////////////////////////////////////////// sceCdSync = 0x2032C8; // type:func sceCdInit = 0x203548; // type:func sceCdDiskReady = 0x203828; // type:func sceCdMmode = 0x203A20; // type:func sceCdRead = 0x203B18; // type:func sceCdGetDiskType = 0x203CF8; // type:func sceCdGetError = 0x203D90; // type:func sceCdBreak = 0x203E28; // type:func //////////////////////////////////////////////////////////////// // libpad.c //////////////////////////////////////////////////////////////// scePadInit = 0x2040E8; // type:func scePadPortOpen = 0x2042C8; // type:func scePadGetState = 0x204678; // type:func scePadInfoAct = 0x2046D0; // type:func scePadInfoMode = 0x2047F8; // type:func scePadSetMainMode = 0x204930; // type:func scePadSetActDirect = 0x2049E8; // type:func scePadSetActAlign = 0x204AA8; // type:func scePadInfoPressMode = 0x204CE8; // type:func scePadEnterPressMode = 0x204D48; // type:func //////////////////////////////////////////////////////////////// // /usr/local/sce/ee/gcc/src/newlib/libm/math/sf_cos.c //////////////////////////////////////////////////////////////// cosf = 0x205210; // type:func //////////////////////////////////////////////////////////////// // /usr/local/sce/ee/gcc/src/newlib/libm/math/sf_tan.c //////////////////////////////////////////////////////////////// tanf = 0x2054F0; // type:func //////////////////////////////////////////////////////////////// // sce/ee/gcc/src/newlib/libm/math/wf_atan2.c //////////////////////////////////////////////////////////////// atan2f = 0x205778; // type:func //////////////////////////////////////////////////////////////// // /usr/local/sce/ee/gcc/src/newlib/libm/math/wf_fmod.c //////////////////////////////////////////////////////////////// fmodf = 0x2058a0; // type:func //////////////////////////////////////////////////////////////// // libmc.c //////////////////////////////////////////////////////////////// mcInit__Fv = 0x2093F0; // type:func //////////////////////////////////////////////////////////////// // misc //////////////////////////////////////////////////////////////// __floatdisf = 0x1fb6b0; // type:func ================================================ FILE: config/symbol_addrs_may19.txt ================================================ ENTRYPOINT = 0x100008; // type:func _exit = 0x1000B8; // type:func _root = 0x1000C0; // type:func RefThunkBasicDERIVED_FROMQ = 0x1000C8; // type:func RefThunkLoREMOVEFnUser = 0x1001B8; // type:func RefThunkLoREMOVEFn = 0x100298; // type:func RefThunkLoADD = 0x100378; // type:func RefThunkLoCLONE = 0x100458; // type:func RefThunkLoSETPARENT = 0x100560; // type:func RefThunkLoANCESTORQ = 0x100650; // type:func RefThunkLoMATCHES_NAMEQ = 0x100740; // type:func RefThunkLoCUSTOM_BOOL_PROPERTY = 0x100830; // type:func RefThunkLoCUSTOM_INT_PROPERTY = 0x100938; // type:func RefThunkLoCUSTOM_FLOAT_PROPERTY = 0x100A40; // type:func RefThunkLoCUSTOM_CLQ_PROPERTY = 0x100B48; // type:func RefThunkLoCUSTOM_LM_PROPERTY = 0x100C60; // type:func RefThunkLoCUSTOM_OID_PROPERTY = 0x100D78; // type:func RefThunkLoCUSTOM_VECTOR_PROPERTY = 0x100E80; // type:func RefThunkAloINVALIDATE_LIGHTING = 0x100F98; // type:func RefThunkAloROTATION_MATCHES_VELOCITY = 0x101078; // type:func RefThunkAloSCROLLING_MASTER_SPEEDS = 0x101190; // type:func RefThunkAloEYES_CLOSED = 0x101298; // type:func RefThunkAloSTART_SOUND = 0x101388; // type:func RefThunkAloSTOP_SOUND = 0x1014D0; // type:func RefThunkAloFADE_IN = 0x1015B0; // type:func RefThunkAloFADE_OUT = 0x1016A0; // type:func RefThunkAloCURRENT_SMA = 0x101790; // type:func RefThunkAloCURRENT_ASEGA = 0x101880; // type:func RefThunkAloNEAREST_ASEGA = 0x101970; // type:func RefThunkAloMATCH_OTHER_OBJECT = 0x101A50; // type:func RefThunkSoEDGE_GRAB = 0x101B40; // type:func RefThunkWarpSET_SM_GOAL = 0x101C30; // type:func RefThunkWarpTRIGGER = 0x101D58; // type:func RefThunkExitTRIGGER = 0x101E38; // type:func RefThunkAsegAPPLY = 0x101F18; // type:func RefThunkAsegENSURE = 0x102040; // type:func RefThunkAsegFIND_LABEL = 0x102180; // type:func RefThunkAsegaSEEK = 0x102270; // type:func RefThunkAsegaRETRACT = 0x102388; // type:func RefThunkAsegaSNAP = 0x102468; // type:func RefThunkBrkBREAK = 0x102558; // type:func RefThunkButtonSET_SM_GOAL = 0x102638; // type:func RefThunkVolbtnSET_SM_GOAL = 0x102760; // type:func RefThunkPoMAKE_ACTIVE = 0x102888; // type:func RefThunkPoINVULNERABLEQ = 0x102968; // type:func RefThunkAlarmTRIGGER = 0x102A58; // type:func RefThunkAlarmSET_SM_GOAL = 0x102B48; // type:func RefThunkSensorENABLE = 0x102C70; // type:func RefThunkSensorDISABLE = 0x102D60; // type:func RefThunkLasenEXTEND = 0x102E40; // type:func RefThunkLasenRETRACT = 0x102F30; // type:func RefThunkEmitterPAUSE = 0x103020; // type:func RefThunkEmitterPAUSE_FOREVER = 0x103110; // type:func RefThunkEmitterUNPAUSE = 0x1031F0; // type:func RefThunkEmitterADD_SKELETON = 0x1032D0; // type:func RefThunkExploADD_SKELETON = 0x103420; // type:func RefThunkExplsEXPLODE = 0x103570; // type:func RefThunkExplsEXPLODE_OVR = 0x103650; // type:func RefThunkExplgEXPLODE = 0x1037B8; // type:func RefThunkSmAPPLY = 0x103898; // type:func RefThunkSmaRETRACT = 0x1039B0; // type:func RefThunkSwDEFAULT_REVERB = 0x103A90; // type:func RefThunkSwPUSH_REVERB = 0x103B98; // type:func RefThunkSwPOP_REVERB = 0x103CA0; // type:func RefThunkSwLEVEL_VISITEDQ = 0x103D80; // type:func RefThunkSwLEVEL_PRIMARYQ = 0x103E70; // type:func RefThunkSwLEVEL_SECONDARYQ = 0x103F60; // type:func RefThunkSwLEVEL_TERTIARYQ = 0x104050; // type:func RefThunkSwCANCEL_DIALOG = 0x104140; // type:func RefThunkCmPUSH_LOOK_KIND = 0x104220; // type:func RefThunkCmPOP_LOOK_KIND = 0x104310; // type:func RefThunkCmLOOK_KIND = 0x1043F0; // type:func RefThunkCmSET_SNIPER_FOCUS = 0x1044D0; // type:func RefThunkCmJOLT = 0x1045E8; // type:func RefThunkClueBREAK = 0x1046C8; // type:func RefThunkPipeCAMERA_MANUAL_OFFSET = 0x1047A8; // type:func RefThunkStepguardUSE_ANIMATION = 0x1048B0; // type:func RefThunkStepguardUSE_ANIMATION_IMMEDIATE = 0x1049B8; // type:func RefThunkStepguardMATCH_ANIMATION_PHASE = 0x104AC0; // type:func RefThunkStepguardADD_ATTACK_EFFECT = 0x104BE8; // type:func RefThunkStepguardUSE_DEATH_ANIMATION = 0x104CF0; // type:func RefThunkStepguardSET_STATE_EXTERNAL = 0x104DF8; // type:func RefThunkStepguardUSE_PHYS = 0x104F00; // type:func RefThunkStepguardJUMP = 0x105008; // type:func RefThunkStepguardSET_PATROL_ANIMATION = 0x1050E8; // type:func RefThunkSmartguardUSE_FLASHLIGHT_TARGET = 0x1051D8; // type:func RefThunkBombPRIME = 0x1052E0; // type:func RefThunkBombDETONATE = 0x1053D0; // type:func RefThunkCanFIRE_AT_POSITION = 0x1054B0; // type:func RefThunkJtTHROW = 0x1055B0; // type:func RefThunkJtUNHOOK = 0x1056D8; // type:func RefThunkJtPROFILE = 0x1057B8; // type:func RefThunkJtADD_SPEED_BOOST = 0x1058A8; // type:func RefThunkJtPLACE_ON_PIPE = 0x105998; // type:func RefThunkRchmSET_NATURAL_COEFFICIENTS = 0x105A88; // type:func RefThunkRchmSET_CENTER_COEFFICIENTS = 0x105BA0; // type:func RefThunkDartgunSTART_TARGET_AREA_CHANGE = 0x105CB8; // type:func RefThunkDartgunADD_TARGET_AREA_TARGET = 0x105D98; // type:func RefThunkWaypointSET_SM_GOAL = 0x105E88; // type:func RefThunkJloACTIVATE = 0x105FB0; // type:func RefThunkJloDEACTIVATE = 0x106090; // type:func RefThunkRwmADD_AMMO = 0x106170; // type:func RefThunkRwmENABLE_CACHE = 0x106298; // type:func RefThunkRwmDISABLE_CACHE = 0x106388; // type:func RefThunkRwmRESIZE_CACHE = 0x106478; // type:func RefThunkRwmRELOAD = 0x106580; // type:func RefThunkRwmFIRE = 0x106660; // type:func RefThunkRwmCLEAR_FIRE_INFO = 0x106750; // type:func RefThunkRwmCLEAR_TARGET_INFO = 0x106830; // type:func RefThunkRwmCLEAR_AIM_CONSTRAINTS = 0x106910; // type:func RefThunkDialogINSTRUCT = 0x1069F0; // type:func RefThunkDialogCONFRONT = 0x106AD0; // type:func RefThunkDialogADD_DIALOG_EQUIVALENCE = 0x106BB0; // type:func RefThunkDialogTRIGGER = 0x106CB8; // type:func RefThunkDialogUNTRIGGER = 0x106D98; // type:func RefThunkLockgTRIGGER = 0x106E78; // type:func RefThunkWrADD_CIRCLE_WARP = 0x106F58; // type:func RefThunkWrADD_BEND_WARP = 0x107038; // type:func RefThunkWrADD_BEND_NOISE = 0x107118; // type:func RefThunkWrADD_SWIVEL_NOISE = 0x107240; // type:func RefThunkVaultADD_GOAD_DIALOG = 0x107368; // type:func RefThunkCrbrainACTIVATE = 0x107470; // type:func RefThunkCrbrainSCORE = 0x107550; // type:func RefThunkMgcGENERATE = 0x107640; // type:func RefThunkSuvADD_BOOST_OPPORTUNITY = 0x107758; // type:func RefThunkSuvADD_BOOST_COLLECT = 0x107848; // type:func RefThunkSuvADD_CHECK_POINT = 0x107938; // type:func RefThunkSuvADD_FEATURE = 0x107A28; // type:func RefThunkSuvRESET = 0x107B68; // type:func RefThunkVolCHECK_POINT = 0x107C48; // type:func RefThunkMurrayADD_ENEMY = 0x107D48; // type:func RefThunkSwpSET_SHAPE = 0x107E38; // type:func RefThunkJackADD_PRIZE = 0x107F40; // type:func RefThunkLgnbATTACK = 0x108058; // type:func RefThunkJsgCLEAR = 0x108158; // type:func RefThunkJsgAPPLY = 0x108238; // type:func RefThunkJsgRETRACT = 0x108328; // type:func RefThunkJsgSET_CONTEXT = 0x108408; // type:func RefThunkJsgCUT = 0x1084F8; // type:func RefThunkJsgSET_FOCUS = 0x1085E8; // type:func RefThunkJsgCALL_SPLICE = 0x1086D8; // type:func RefThunkJsgSET_TUNNEL = 0x1087C8; // type:func RefThunkJsgPAUSE = 0x1088B8; // type:func RefThunkJsgJUMP = 0x1089C0; // type:func RefThunkJsgRUN = 0x108AE8; // type:func RefThunkJsgCLIMB = 0x108C00; // type:func RefThunkJsgATTACK = 0x108D18; // type:func RefThunkJsgCALL_ANIMATION = 0x108E30; // type:func RefThunkJsgSET_CLOCK_SPEED = 0x108F38; // type:func BuildEopids = 0x109028; // type:func RefOpAdd = 0x110DF0; // type:func RefOpSub = 0x111118; // type:func RefOpMult = 0x111440; // type:func RefOpDiv = 0x111B20; // type:func RefOpPrint = 0x1120A8; // type:func RefOpPrintFrame = 0x112118; // type:func RefOpPrintSidebag = 0x112188; // type:func RefOpIntEqual = 0x1121F8; // type:func RefCmp = 0x112280; // type:func RefOpL = 0x112408; // type:func RefOpLE = 0x112440; // type:func RefOpG = 0x112478; // type:func RefOpGE = 0x1124B0; // type:func RefOpEqv = 0x1124E8; // type:func RefEqualHelper = 0x1125C0; // type:func RefOpEqual = 0x112930; // type:func RefOpIsBoolean = 0x112968; // type:func RefOpIsNum = 0x1129F0; // type:func RefOpIsFloat = 0x112A78; // type:func RefOpIsInteger = 0x112B00; // type:func RefOpIsSymbol = 0x112B88; // type:func RefOpIsVector = 0x112C10; // type:func RefOpIsMatrix = 0x112C98; // type:func RefOpIsClq = 0x112D20; // type:func RefOpIsLm = 0x112DA8; // type:func RefOpIsSmp = 0x112E30; // type:func RefOpIsList = 0x112EB8; // type:func RefOpIsNull = 0x112F50; // type:func RefOpIsObject = 0x112FD0; // type:func RefOpIsNullObj = 0x113058; // type:func RefOpIsMethod = 0x1130E8; // type:func RefOpIsProcedure = 0x113170; // type:func RefOpAreNear = 0x113208; // type:func RefOpNot = 0x1132E0; // type:func RefOpCons = 0x113370; // type:func RefOpCar = 0x113448; // type:func RefOpCdr = 0x1134C8; // type:func RefOpSetCadr = 0x113568; // type:func RefOpSetCar = 0x113630; // type:func RefOpSetCdr = 0x113668; // type:func RefOpLength = 0x1136A0; // type:func RefOpNth = 0x113760; // type:func RefOpIsMember = 0x113830; // type:func RefOpList = 0x113A10; // type:func RefOpAppend = 0x113A48; // type:func RefOpMap = 0x113C08; // type:func RefOpFilter = 0x113EA8; // type:func RefOpForEach = 0x1141A8; // type:func RefOpEval = 0x1143D8; // type:func RefOpVector = 0x1144B8; // type:func RefOpMatrix = 0x1145E8; // type:func RefOpSetMusicRegister = 0x1147E8; // type:func RefOpClq = 0x114870; // type:func RefOpLm = 0x1149A0; // type:func RefOpSmp = 0x114AC0; // type:func RefOpGetElement = 0x114C10; // type:func RefOpRandomSeed = 0x114E30; // type:func RefOpRandom = 0x114EE0; // type:func RefUfo = 0x114FB0; // type:func RefOpSqrt = 0x115078; // type:func RefOpSin = 0x1150B0; // type:func RefOpCos = 0x1150E8; // type:func RefOpTan = 0x115120; // type:func RefOpAsin = 0x115158; // type:func RefOpAcos = 0x115190; // type:func RefOpAtan = 0x1151C8; // type:func RefOpRadNormalize = 0x115200; // type:func RefOpAtan2 = 0x115238; // type:func RefOpVectorDotProduct = 0x115308; // type:func RefOpVectorCrossProduct = 0x1153B0; // type:func RefOpVectorLth = 0x115460; // type:func RefOpVectorDistance = 0x115508; // type:func RefOpVectorDistanceSquared = 0x115620; // type:func RefOpVectorNormalize = 0x115720; // type:func RefOpVectorProjectNormal = 0x115878; // type:func RefOpVectorProjectTangent = 0x115930; // type:func RefOpVectorBallisticVelocity = 0x1159E8; // type:func RefOpVectorRadianNormal = 0x115B00; // type:func RefOpMatrixTranspose = 0x115C08; // type:func RefOpMatrixInvert = 0x115CB8; // type:func RefOpMatrixCalculateDmat = 0x115D68; // type:func RefOpMatrixInterpolateRotate = 0x115E18; // type:func RefOpMatrixDecomposeToTranslate = 0x115F98; // type:func RefOpMatrixDecomposeToRotate = 0x116030; // type:func RefOpMatrixDecomposeToEuler = 0x116100; // type:func RefOpMatrixDecomposeToRadianNormal = 0x1161B0; // type:func RefOpMatrixLookAt = 0x1162B8; // type:func RefOpMatrixTiltUpright = 0x1163A8; // type:func RefOpClqEvaluate = 0x116480; // type:func RefOpClqEvaluateLm = 0x116550; // type:func RefOpClqFit = 0x116658; // type:func RefOpLmLimit = 0x1167D0; // type:func RefOpLmCheck = 0x116898; // type:func RefOpFloor = 0x116960; // type:func RefOpCeiling = 0x1169E8; // type:func RefOpRound = 0x116A78; // type:func RefOpTruncate = 0x116B08; // type:func RefOpAbs = 0x116B90; // type:func RefOpMaximum = 0x116C68; // type:func RefOpMinimum = 0x116DB0; // type:func RefOpModulo = 0x116EF8; // type:func RefOpCurrentTime = 0x116F90; // type:func RefOpScheduleCallback = 0x117008; // type:func RefOpDeferObjectUpdate = 0x1172A8; // type:func RefOpObjectOption = 0x117358; // type:func RefOpAddO = 0x1174C8; // type:func RefOpEnsureO = 0x117500; // type:func RefOpSetO = 0x117538; // type:func RefOpGetO = 0x117570; // type:func RefPairFromAplo = 0x1175A8; // type:func RefOpFindObject = 0x1176E0; // type:func RefOpFindObjects = 0x117788; // type:func RefOpFindNearestObject = 0x117870; // type:func RefOpFindNearestObjects = 0x117910; // type:func RefOpFindPlayerObject = 0x1179F0; // type:func RefOpFindWorldObject = 0x117A70; // type:func RefOpFindCameraObject = 0x117AE8; // type:func RefOpFindClassObjects = 0x117B60; // type:func RefOpFindObjectsInBoundingBox = 0x117C48; // type:func RefOpFindObjectsInBoundingSphere = 0x117D70; // type:func FUN_00117da0 = 0x117DA0; // type:func RefOpHitTestObjectsImpl = 0x117E98; // type:func RefOpHitTestObjects = 0x118140; // type:func RefOpHitTestObjectsFirst = 0x118208; // type:func RefOpConvertObjectPosition = 0x1182D0; // type:func RefOpConvertObjectVector = 0x118388; // type:func RefOpConvertObjectMatrix = 0x118440; // type:func RefOpNearClipCenter = 0x118508; // type:func RefOpStartSound = 0x1185B8; // type:func RefOpStopSound = 0x1186A0; // type:func RefOpStartRumble = 0x118728; // type:func RefOpEmitSmokeCloud = 0x1187F0; // type:func RefOpPredictAnimationEffect = 0x1188B8; // type:func VU_FLOAT__VU_FLOAT = 0x118CF0; // type:func VU_VECTOR__VU_VECTOR = 0x118D10; // type:func VECTOR__operatorEQ = 0x118D20; // type:func operatorSTAR = 0x118D30; // type:func sqrtf = 0x118D48; // type:func RefEvalSymbol = 0x118D58; // type:func RefEvalSet = 0x118DE8; // type:func RefEvalDefine = 0x118EF0; // type:func RefEvalAssert = 0x118FF8; // type:func RefEvalIf = 0x119128; // type:func RefEvalOr = 0x119278; // type:func RefEvalAnd = 0x1193C8; // type:func RefEvalCond = 0x119520; // type:func RefEvalCase = 0x119708; // type:func RefEvalLet = 0x1199A8; // type:func RefEvalWhile = 0x119BB0; // type:func RefEvalLambda = 0x119D00; // type:func RefEvalLambdaBody = 0x119E10; // type:func RefEvalBegin = 0x119F00; // type:func RefEvalApply = 0x11A010; // type:func RefEvalImport = 0x11A4E0; // type:func RefEval = 0x11A618; // type:func CFrame__SetSingleParent = 0x11A8F8; // type:func CFrame__AddParent = 0x11A908; // type:func CFrame__RefAddBinding = 0x11A928; // type:func CFrame__RefSetBinding = 0x11A9F0; // type:func CFrame__FFindBinding = 0x11AAB8; // type:func CFrame__PrefFindBinding = 0x11AB08; // type:func CFrame__CloneTo = 0x11AC00; // type:func PframeNew = 0x11ACE8; // type:func DeleteFrame = 0x11AD80; // type:func CGc__CGc = 0x11ADE8; // type:func CGc__~CGc = 0x11ADF0; // type:func CGc__Startup = 0x11AE20; // type:func CGc__Shutdown = 0x11AE30; // type:func CGc__AddRootFrame = 0x11AE38; // type:func CGc__AddRootSidebag = 0x11AE80; // type:func CGc__PushFrame = 0x11AEA0; // type:func CGc__PframePop = 0x11AEC0; // type:func CGc__PushPair = 0x11AEE8; // type:func CGc__PpairPop = 0x11AF08; // type:func CGc__PushProc = 0x11AF30; // type:func CGc__PprocPop = 0x11AF50; // type:func CGc__UpdateRecyclable = 0x11AF78; // type:func CGc__MarkLiveObjects = 0x11AFD0; // type:func CGc__Collect = 0x11B390; // type:func __static_initialization_and_destruction_0 = 0x11B610; // type:func _GLOBAL_$I$g_gc = 0x11B660; // type:func _GLOBAL_$D$g_gc = 0x11B688; // type:func PmethodNew = 0x11B6B0; // type:func CPair__CloneTo = 0x11B700; // type:func PpairNew = 0x11B788; // type:func DeletePair = 0x11B7F0; // type:func CProc__CloneTo = 0x11B818; // type:func PprocNew = 0x11B848; // type:func CRef__CRef = 0x11B898; // type:func CRef__CRef1 = 0x11B8A8; // type:func CRef__~CRef = 0x11B8F8; // type:func CRef__operatorEQ = 0x11B948; // type:func CRef__operatorEQEQ = 0x11B9A8; // type:func CRef__CloneTo = 0x11BB10; // type:func CRef__Decref = 0x11BD20; // type:func CRef__Incref = 0x11BDD8; // type:func CRef__SetTag = 0x11BE90; // type:func CRef__SetS32 = 0x11BED0; // type:func CRef__SetF32 = 0x11BF18; // type:func CRef__SetBool = 0x11BF60; // type:func CRef__SetSymid = 0x11BFB8; // type:func CRef__SetBifk = 0x11C000; // type:func CRef__SetPair = 0x11C048; // type:func CRef__SetProc = 0x11C090; // type:func CRef__SetVector = 0x11C0D8; // type:func CRef__SetMatrix = 0x11C130; // type:func CRef__SetClq = 0x11C188; // type:func CRef__SetLm = 0x11C1E0; // type:func CRef__SetSmp = 0x11C238; // type:func CRef__SetBasic = 0x11C290; // type:func CRef__SetMethod = 0x11C2D8; // type:func CRef__RefCoerceS32 = 0x11C320; // type:func CRef__RefCoerceF32 = 0x11C3C8; // type:func PpairSerializeIn = 0x11C470; // type:func CSidebag__RefAddBinding = 0x11C818; // type:func CSidebag__RefSetBinding = 0x11C8E0; // type:func CSidebag__FFindBinding = 0x11CA30; // type:func CSidebag__CloneTo = 0x11CAB0; // type:func PsidebagNew = 0x11CB68; // type:func StartupSplice = 0x11CC00; // type:func ShutdownSplice = 0x11CCC8; // type:func __static_initialization_and_destruction_01 = 0x11CD40; // type:func _GLOBAL_$I$g_splotheapPair = 0x11CD78; // type:func _GLOBAL_$D$g_splotheapPair = 0x11CDA0; // type:func CSplotheap__Startup = 0x11CDC8; // type:func CSplotheap__Shutdown = 0x11CE88; // type:func CSplotheap__PvAllocUnsafe = 0x11CE90; // type:func CSplotheap__PvAllocClear = 0x11CF08; // type:func CSplotheap__PsplotLookup = 0x11CF60; // type:func CSplotheap__UpdateRecyclable = 0x11CF78; // type:func CSplotheap__UnmarkAll = 0x11CF88; // type:func CSplotheap__FreeGarbage = 0x11CFC0; // type:func PvFromPsplot = 0x11D088; // type:func PsplotFromPv = 0x11D090; // type:func FIsPvGarbage = 0x11D098; // type:func MarkPvAlive = 0x11D0C8; // type:func PvectorNew = 0x11D0F8; // type:func IncrefVector = 0x11D190; // type:func DecrefVector = 0x11D1C0; // type:func PmatrixNew = 0x11D230; // type:func IncrefMatrix = 0x11D2C8; // type:func DecrefMatrix = 0x11D2F8; // type:func DeleteMatrix = 0x11D360; // type:func PclqNew = 0x11D390; // type:func IncrefClq = 0x11D428; // type:func DecrefClq = 0x11D458; // type:func PlmNew = 0x11D4C8; // type:func IncrefLm = 0x11D560; // type:func DecrefLm = 0x11D590; // type:func PsmpNew = 0x11D600; // type:func IncrefSmp = 0x11D698; // type:func DecrefSmp = 0x11D6D8; // type:func StartupSpliceStructuredTypeFactories = 0x11D750; // type:func ShutdownSpliceStructuredTypeFactories = 0x11D888; // type:func snd_StartSoundSystem = 0x11D890; // type:func snd_FlushSoundCommands = 0x11DB20; // type:func snd_StopSoundSystem = 0x11DD68; // type:func snd_GotReturns = 0x11DDB0; // type:func snd_PrepareReturnBuffer = 0x11DE20; // type:func snd_BankLoadByLoc = 0x11DE50; // type:func snd_BankLoadByLoc_CB = 0x11DFD8; // type:func snd_ResolveBankXREFS = 0x11E168; // type:func snd_UnloadBank = 0x11E1A0; // type:func snd_SetMasterVolume = 0x11E1D8; // type:func snd_GetMasterVolume = 0x11E218; // type:func snd_SetMixerMode = 0x11E258; // type:func snd_SetGroupVoiceRange = 0x11E298; // type:func snd_PlaySoundVolPanPMPB = 0x11E2D8; // type:func snd_StopSound = 0x11E328; // type:func snd_PauseSound = 0x11E360; // type:func snd_ContinueSound = 0x11E398; // type:func snd_PauseAllSoundsInGroup = 0x11E3D8; // type:func snd_ContinueAllSoundsInGroup = 0x11E410; // type:func snd_SoundIsStillPlaying = 0x11E448; // type:func snd_SoundIsStillPlaying_CB = 0x11E478; // type:func snd_IsSoundALooper = 0x11E4B0; // type:func snd_SetSoundVolPan = 0x11E4F0; // type:func snd_GetSoundOriginalPitch = 0x11E530; // type:func snd_SetSoundPitch = 0x11E570; // type:func snd_AutoVol = 0x11E5C8; // type:func snd_SetMIDIRegister = 0x11E620; // type:func snd_SetGlobalExcite = 0x11E670; // type:func snd_SendIOPCommandAndWait = 0x11E6B8; // type:func snd_SendIOPCommandNoWait = 0x11E8C8; // type:func snd_PostMessage = 0x11EBA8; // type:func snd_SendCurrentBatch = 0x11EBF0; // type:func snd_InitVAGStreamingEx = 0x11ED40; // type:func snd_StopAllStreams = 0x11EE10; // type:func snd_PlayVAGStreamByLoc = 0x11EE48; // type:func snd_ContinueVAGStream = 0x11EEB8; // type:func snd_IsVAGStreamBuffered_CB = 0x11EEF0; // type:func snd_StreamSafeCheckCDIdle = 0x11EF28; // type:func snd_StreamSafeCdRead = 0x11EF58; // type:func snd_StreamSafeCdSync = 0x11F030; // type:func snd_StreamSafeCdBreak = 0x11F100; // type:func snd_StreamSafeCdGetError = 0x11F158; // type:func snd_SetReverbType = 0x11F198; // type:func snd_SetReverbDepth = 0x11F1D8; // type:func snd_PreAllocReverbWorkArea = 0x11F218; // type:func snd_InitMovieSound = 0x11F2A8; // type:func snd_ResetMovieSound = 0x11F2E8; // type:func snd_CloseMovieSound = 0x11F320; // type:func snd_StartMovieSound = 0x11F350; // type:func snd_GetTransStatus = 0x11F388; // type:func snd_GetDopplerPitchMod = 0x11F3C0; // type:func StartupBrx = 0x11F3E8; // type:func PchzFromWid = 0x11F410; // type:func PchzFriendlyFromWid = 0x11F460; // type:func PchzFriendlyFromCid = 0x11F498; // type:func PchzFromOid = 0x11F4D8; // type:func OidFromPchz = 0x11F528; // type:func PloNew = 0x11F5C8; // type:func LoadOptionFromBrx = 0x11F708; // type:func LoadOptionsFromBrx = 0x11FDF0; // type:func IploFromStockOid = 0x11FE68; // type:func LoadSwObjectsFromBrx = 0x11FE80; // type:func SetLoDefaults = 0x11FFA8; // type:func FindKey = 0x1200B0; // type:func EvaluateAcp = 0x120180; // type:func GetAcpTimes = 0x120188; // type:func EvaluateAcr = 0x1201A0; // type:func EvaluateAcrEul = 0x1201A8; // type:func GetAcrTimes = 0x1201B0; // type:func EvaluateAcs = 0x1201C8; // type:func GetAcsTimes = 0x1201D0; // type:func EvaluateAcg = 0x1201E8; // type:func GetAcgTimes = 0x1201F0; // type:func LoadAcgbFromBrx = 0x120208; // type:func EvaluateAcgb = 0x120340; // type:func GetAcgbTimes = 0x120408; // type:func LoadAcgbwFromBrx = 0x1204A0; // type:func EvaluateAcgbw = 0x1205F8; // type:func GetAcgbwTimes = 0x1206D0; // type:func EvaluateAcgl = 0x120768; // type:func LoadAcglFromBrx = 0x120860; // type:func GetAcglTimes = 0x120948; // type:func EvaluateApacg = 0x1209E0; // type:func LoadApacgFromBrx = 0x120AC8; // type:func GetApacgTimes = 0x120BA8; // type:func EvaluateAkvb = 0x120D70; // type:func LoadAkvbFromBrx = 0x120E10; // type:func GetAkvbTimes = 0x120F40; // type:func EvaluateAcpc = 0x120FD0; // type:func LoadAcpcFromBrx = 0x121048; // type:func GetAcpcTimes = 0x121188; // type:func EvaluateAcpb = 0x1211B0; // type:func LoadAcpbFromBrx = 0x121220; // type:func GetAcpbTimes = 0x1212C0; // type:func EvaluateAcrc = 0x1212F8; // type:func EvaluateAcrcEul = 0x1213B0; // type:func LoadAcrcFromBrx = 0x1213E8; // type:func GetAcrcTimes = 0x121550; // type:func EvaluateAcrb = 0x121578; // type:func EvaluateAcrbEul = 0x121630; // type:func LoadAcrbFromBrx = 0x121658; // type:func GetAcrbTimes = 0x121750; // type:func EvaluateAcsc = 0x121788; // type:func LoadAcscFromBrx = 0x121808; // type:func GetAcscTimes = 0x121838; // type:func EvaluateAcsb = 0x121860; // type:func LoadAcsbFromBrx = 0x1218E0; // type:func GetAcsbTimes = 0x121910; // type:func EvaluateAcpbl = 0x121948; // type:func EvaluateAcrbl = 0x121BE0; // type:func EvaluateAcgblt = 0x121FC8; // type:func EvaluateAcgblp = 0x122288; // type:func PacpNew = 0x1224E8; // type:func PacrNew = 0x1225A0; // type:func PacsNew = 0x122658; // type:func PacgNew = 0x1226D8; // type:func PactNew = 0x1227C8; // type:func PactNewClone = 0x122828; // type:func CloneAct = 0x122888; // type:func InitAct = 0x1228F8; // type:func RetractAct = 0x122918; // type:func GetActPositionGoal = 0x122AA8; // type:func GetActRotationGoal = 0x122AF8; // type:func GetActTwistGoal = 0x122B58; // type:func GetActScale = 0x122B70; // type:func GGetActPoseGoal = 0x122B98; // type:func CalculateActDefaultAck = 0x122BB0; // type:func SnapAct = 0x122C38; // type:func CalculateAloPositionSpring = 0x122D50; // type:func ProjectActPosition = 0x122EB0; // type:func CalculateAloRotationSpring = 0x123258; // type:func ProjectActRotation = 0x123400; // type:func ProjectActPose = 0x123B20; // type:func PredictAloPosition = 0x123BF0; // type:func PredictAloRotation = 0x123C70; // type:func AdaptAct = 0x123D80; // type:func InitActval = 0x123DB0; // type:func GetActvalPositionGoal = 0x123E60; // type:func GetActvalRotationGoal = 0x123EA0; // type:func GetActvalTwistGoal = 0x123EF0; // type:func GetActvalScale = 0x123F08; // type:func GGetActvalPoseGoal = 0x123F28; // type:func InitActref = 0x123F40; // type:func GetActrefPositionGoal = 0x123FD8; // type:func GetActrefRotationGoal = 0x124020; // type:func GetActrefTwistGoal = 0x124078; // type:func GetActrefScale = 0x124098; // type:func GGetActrefPoseGoal = 0x1240B8; // type:func InitActadj = 0x1240D0; // type:func GetActadjPositionGoal = 0x124140; // type:func GetActadjRotationGoal = 0x1241F8; // type:func GetActadjTwistGoal = 0x124318; // type:func GetActadjScale = 0x124388; // type:func GGetActadjPoseGoal = 0x124390; // type:func InitActbank = 0x1243A0; // type:func GetActbankRotationGoal = 0x1243E8; // type:func RetractActseg = 0x124538; // type:func CloneActseg = 0x1245A8; // type:func GetActsegPositionGoal = 0x124608; // type:func GetActsegRotationGoal = 0x124758; // type:func GetActsegTwistGoal = 0x1248B0; // type:func GetActsegScale = 0x124930; // type:func GGetActsegPoseGoal = 0x1249A8; // type:func BreakAlbrk = 0x124A10; // type:func SetAlbrkAlarm = 0x124A50; // type:func InitAlarm = 0x124A58; // type:func PostAlarmLoad = 0x124AA8; // type:func CloneAlarm = 0x124BD8; // type:func UpdateAlarm = 0x124C18; // type:func GetAlarmParams = 0x124CD0; // type:func PostAlarmLoadCallbackHookup = 0x124D38; // type:func SetAlarmAlarms = 0x124F68; // type:func TriggerAlarm = 0x125220; // type:func DisableAlarmAlbrk = 0x125290; // type:func EnableAlarmSensors = 0x1252A0; // type:func DisableAlarmSensors = 0x125328; // type:func NotifyAlarmSensorsOnTrigger = 0x125398; // type:func AddAlarmAlbrk = 0x125408; // type:func AddAlarmSensor = 0x125430; // type:func AddAlarmStepguard = 0x125458; // type:func SetAlarmRsmg = 0x125480; // type:func FGetAlarmSensorList = 0x1254C0; // type:func FIsZeroV = 0x125550; // type:func FIsZeroW = 0x125590; // type:func FIsZeroDv = 0x1255D8; // type:func FIsZeroDw = 0x125618; // type:func InitAlo = 0x125660; // type:func AddAloHierarchy = 0x125808; // type:func OnAloAdd = 0x1258B0; // type:func RemoveAloHierarchy = 0x125B48; // type:func OnAloRemove = 0x125BF0; // type:func UpdateAloOrig = 0x125D98; // type:func SetAloParent = 0x125E08; // type:func ApplyAloProxy = 0x126100; // type:func BindAlo = 0x126260; // type:func PostAloLoad = 0x1262E0; // type:func PostAloLoadCallback = 0x1265D0; // type:func SnipAloObjects = 0x126720; // type:func UpdateAloHierarchy = 0x126840; // type:func UpdateAlo = 0x126928; // type:func InvalidateAloLighting = 0x126A50; // type:func UpdateAloXfWorld = 0x126A90; // type:func UpdateAloXfWorldHierarchy = 0x126AC0; // type:func PresetAloAccel = 0x126E48; // type:func ProjectAloTransform = 0x126E50; // type:func PredictAloTransform = 0x1271A0; // type:func PredictAloTransformAdjust = 0x127410; // type:func ToggleShowPhys = 0x1275B0; // type:func DupAloRo = 0x1275F0; // type:func RenderFastShadow = 0x127678; // type:func RenderAloAll = 0x127740; // type:func RenderAloSelf = 0x127CF0; // type:func RenderAloGlobset = 0x127FC8; // type:func RenderAloLine = 0x1286A0; // type:func SetAloOverrideCel = 0x128840; // type:func UpdateAloThrob = 0x1288D8; // type:func SetAloBlotContext = 0x128A00; // type:func EnsureAloFader = 0x128AA8; // type:func FadeAloIn = 0x128B18; // type:func FadeAloOut = 0x128BD0; // type:func AdjustAloRtckMat = 0x128C60; // type:func CloneAloHierarchy = 0x128E20; // type:func CloneAlo = 0x128F10; // type:func HandleAloMessage = 0x1292C8; // type:func TranslateAloToPos = 0x129348; // type:func RotateAloToMat = 0x1293D8; // type:func SetAloVelocityVec = 0x129458; // type:func SetAloVelocityXYZ = 0x1294D0; // type:func SetAloAngularVelocityVec = 0x129508; // type:func SetAloAngularVelocityXYZ = 0x129580; // type:func SetAloVelocityLocal = 0x1295B8; // type:func GetAloVelocityLocal = 0x129608; // type:func MatchAloOtherObject = 0x129650; // type:func CalculateAloMovement = 0x129858; // type:func CalculateAloTransform = 0x129AE8; // type:func CalculateAloTransformAdjust = 0x129E18; // type:func ConvertAloPos = 0x129FD8; // type:func ConvertAloVec = 0x12A080; // type:func ConvertAloMat = 0x12A110; // type:func FDrivenAlo = 0x12A1F8; // type:func RetractAloDrive = 0x12A240; // type:func ConvertAloMovement = 0x12A2F8; // type:func CalculateAloDrive = 0x12A5B8; // type:func FGetAloChildrenList = 0x12A920; // type:func PactsegNewAlo = 0x12A9E0; // type:func LoadAloFromBrx = 0x12AA10; // type:func LoadAloAloxFromBrx = 0x12ACE8; // type:func BindAloAlox = 0x12AF60; // type:func AdjustAloRotation = 0x12B220; // type:func UnadjustAloRotation = 0x12B368; // type:func SetAloInitialVelocity = 0x12B458; // type:func SetAloInitialAngularVelocity = 0x12B480; // type:func PasegdEnsureAlo = 0x12B4A8; // type:func SetAloFastShadowRadius = 0x12B518; // type:func GetAloFastShadowRadius = 0x12B520; // type:func SetAloFastShadowDepth = 0x12B530; // type:func GetAloFastShadowDepth = 0x12B538; // type:func PshadowAloEnsure = 0x12B548; // type:func SetAloCastShadow = 0x12B5B8; // type:func SetAloShadowShader = 0x12B630; // type:func SetAloShadowNearRadius = 0x12B670; // type:func SetAloShadowFarRadius = 0x12B6B0; // type:func SetAloShadowNearCast = 0x12B6F0; // type:func SetAloShadowFarCast = 0x12B730; // type:func SetAloShadowConeAngle = 0x12B770; // type:func SetAloShadowFrustrumUp = 0x12B7B0; // type:func SetAloDynamicShadowObject = 0x12B7F0; // type:func PshadowInferAlo = 0x12B820; // type:func GetAloCastShadow = 0x12B868; // type:func GetAloShadowShader = 0x12B878; // type:func GetAloShadowNearRadius = 0x12B8A8; // type:func GetAloShadowFarRadius = 0x12B8E0; // type:func GetAloShadowNearCast = 0x12B918; // type:func GetAloShadowFarCast = 0x12B950; // type:func GetAloShadowConeAngle = 0x12B988; // type:func GetAloShadowFrustrumUp = 0x12B9F0; // type:func GetAloEuler = 0x12BA28; // type:func SetAloEuler = 0x12BAB0; // type:func EnsureAloActRestore = 0x12BB50; // type:func EnsureAloActla = 0x12BBB0; // type:func RecacheAloActList = 0x12BC10; // type:func InsertAloAct = 0x12BE90; // type:func ResortAloActList = 0x12BF10; // type:func PasegaFindAlo = 0x12C068; // type:func PsmaFindAlo = 0x12C100; // type:func PasegaFindAloNearest = 0x12C198; // type:func CreateAloActadj = 0x12C1F0; // type:func FIsAloStatic = 0x12C270; // type:func ResolveAlo = 0x12C310; // type:func SetAloPositionSpring = 0x12C328; // type:func SetAloPositionSpringDetail = 0x12C3C0; // type:func SetAloPositionDamping = 0x12C420; // type:func SetAloPositionDampingDetail = 0x12C4B8; // type:func SetAloRotationSpring = 0x12C518; // type:func SetAloRotationSpringDetail = 0x12C5B0; // type:func SetAloRotationDamping = 0x12C610; // type:func SetAloRotationDampingDetail = 0x12C6A8; // type:func SetAloPositionSmooth = 0x12C708; // type:func SetAloPositionSmoothMaxAccel = 0x12C760; // type:func SetAloPositionSmoothDetail = 0x12C7C8; // type:func SetAloRotationSmooth = 0x12C840; // type:func SetAloRotationSmoothMaxAccel = 0x12C898; // type:func SetAloRotationSmoothDetail = 0x12C900; // type:func SetAloDefaultAckPos = 0x12C978; // type:func SetAloDefaultAckRot = 0x12C980; // type:func SetAloRestorePosition = 0x12C988; // type:func SetAloNoFreeze = 0x12C9B8; // type:func SetAloRestorePositionAck = 0x12C9E8; // type:func SetAloRestoreRotation = 0x12CA38; // type:func SetAloRestoreRotationAck = 0x12CA68; // type:func SetAloLookAt = 0x12CAB8; // type:func SetAloLookAtIgnore = 0x12CB18; // type:func GetAloLookAtIgnore = 0x12CB58; // type:func SetAloLookAtPanFunction = 0x12CB70; // type:func GetAloLookAtPanFunction = 0x12CBB8; // type:func SetAloLookAtPanLimits = 0x12CBD8; // type:func GetAloLookAtPanLimits = 0x12CC28; // type:func SetAloLookAtTiltFunction = 0x12CC50; // type:func GetAloLookAtTiltFunction = 0x12CC98; // type:func SetAloLookAtTiltLimits = 0x12CCB8; // type:func GetAloLookAtTiltLimits = 0x12CD08; // type:func SetAloLookAtEnabledPriority = 0x12CD30; // type:func GetAloLookAtEnabledPriority = 0x12CD70; // type:func SetAloLookAtDisabledPriority = 0x12CD88; // type:func GetAloLookAtDisabledPriority = 0x12CDC8; // type:func SetAloRotationMatchesVelocity = 0x12CDE0; // type:func PtargetEnsureAlo = 0x12CE88; // type:func SetAloTargetAttacks = 0x12CEF0; // type:func SetAloTargetRadius = 0x12CF30; // type:func SetAloTargetHitTest = 0x12CF60; // type:func SetAloScrollingMasterSpeeds = 0x12CF90; // type:func SetAloEyesClosed = 0x12D038; // type:func EnsureAloSfx = 0x12D108; // type:func SetAloSfxid = 0x12D138; // type:func SetAloSfxidSpl = 0x12D178; // type:func GetAloSfxid = 0x12D210; // type:func SetAloSStart = 0x12D228; // type:func GetAloSStart = 0x12D268; // type:func SetAloSFull = 0x12D288; // type:func SetAloSndRepeat = 0x12D2C8; // type:func GetAloSFull = 0x12D318; // type:func SetAloUVolume = 0x12D338; // type:func SetAloUDoppler = 0x12D378; // type:func GetAloUDoppler = 0x12D3B8; // type:func SetAloUVolumeSpl = 0x12D3D0; // type:func GetAloUVolume = 0x12D408; // type:func SetAloUPitch = 0x12D428; // type:func SetAloUPitchSpl = 0x12D468; // type:func GetAloUPitch = 0x12D4A0; // type:func GetAloSndRepeat = 0x12D4B8; // type:func StartAloSound = 0x12D4F0; // type:func StopAloSound = 0x12D5E0; // type:func EnsureAloThrob = 0x12D618; // type:func SetAloThrobKind = 0x12D690; // type:func GetAloThrobKind = 0x12D710; // type:func SetAloThrobInColor = 0x12D728; // type:func GetAloThrobInColor = 0x12D780; // type:func SetAloThrobOutColor = 0x12D7A0; // type:func GetAloThrobOutColor = 0x12D7F8; // type:func SetAloThrobDtInOut = 0x12D818; // type:func GetAloThrobDtInOut = 0x12D868; // type:func SetAloInteractCane = 0x12D880; // type:func GetAloInteractCane = 0x12D890; // type:func SetAloInteractCaneSweep = 0x12D8A0; // type:func GetAloInteractCaneSweep = 0x12D8A8; // type:func SetAloInteractCaneRush = 0x12D8B8; // type:func GetAloInteractCaneRush = 0x12D8C0; // type:func SetAloInteractCaneSmash = 0x12D8D0; // type:func GetAloInteractCaneSmash = 0x12D8D8; // type:func SetAloInteractBomb = 0x12D8E8; // type:func GetAloInteractBomb = 0x12D8F0; // type:func SetAloInteractShock = 0x12D900; // type:func GetAloInteractShock = 0x12D908; // type:func FAbsorbAloWkr = 0x12D918; // type:func SetAloPoseCombo = 0x12D928; // type:func SetAloForceCameraFade = 0x12DA60; // type:func SetAloRealClock = 0x12DB20; // type:func GetAloParams = 0x12DBB0; // type:func OnAloThrobParamsChanged = 0x12DC58; // type:func InitAseg = 0x12DCB8; // type:func LoadAsegFromBrx = 0x12DD20; // type:func LoadAsegEventsFromBrx = 0x12E140; // type:func CloneAseg = 0x12E790; // type:func PostAsegLoad = 0x12E7B8; // type:func PostAsegLoadCallback = 0x12E870; // type:func ApplyAsegOvr = 0x12E8E0; // type:func ApplyAseg = 0x12EED8; // type:func PasegaApplyAseg = 0x12EF08; // type:func PasegaFindAseg = 0x12EF40; // type:func EnsureAseg = 0x12EF78; // type:func PasegaEnsureAseg = 0x12F048; // type:func ApplyAsegCur = 0x12F070; // type:func FWipingAseg = 0x12F110; // type:func FindAsegClosestPoint = 0x12F150; // type:func PeaFindAsegLabel = 0x12F360; // type:func TFindAsegLabel = 0x12F438; // type:func PchnFindAseg = 0x12F468; // type:func PredictAsegEffect = 0x12F500; // type:func GetAsegWaypoints = 0x12F920; // type:func StripAsegChn = 0x12FA30; // type:func StripAsegAlo = 0x12FB28; // type:func LoadAsegblFromBrx = 0x12FB80; // type:func PostAsegblLoad = 0x12FB88; // type:func CloneAsegbl = 0x12FB90; // type:func RenderAsegPath = 0x12FBA0; // type:func PasegaNew = 0x12FD98; // type:func SetAsegaHandsOff = 0x12FDF8; // type:func UpdateAsegaIeaCur = 0x12FE68; // type:func PactsegFindAsega = 0x12FF30; // type:func HandleAsegaEvent = 0x12FFA0; // type:func HandleAsegaEventsFF = 0x1310B0; // type:func HandleAsegaEvents = 0x1311A8; // type:func RemoveAsega = 0x1312F8; // type:func RetractAsega = 0x131358; // type:func UFromEaErrorFunc = 0x131568; // type:func FWrapAsegaTime = 0x1315E0; // type:func UpdateAsega = 0x1317E8; // type:func SeekAsega = 0x131CF8; // type:func SnapAsega = 0x131E20; // type:func AdaptAsega = 0x131E80; // type:func FindChnClosestPointLocal = 0x131EC8; // type:func SetAsegaSpeed = 0x132368; // type:func SetAsegaMasterSpeed = 0x132388; // type:func SetAsegaPriority = 0x1323D8; // type:func SendAsegaMessage = 0x132438; // type:func SubscribeAsegaStruct = 0x1324B8; // type:func SubscribeAsegaObject = 0x1324F0; // type:func InitBarrier = 0x132528; // type:func CloneBarrier = 0x132580; // type:func PostBarrierLoad = 0x1325D0; // type:func UpdateBarrier = 0x1326E0; // type:func FIgnoreBarrierIntersection = 0x1327C0; // type:func NotifyBarrierImpact = 0x1328C0; // type:func AddBarrierObject = 0x1329E8; // type:func AddBarrierClass = 0x132A08; // type:func CBinaryAsyncStream__CBinaryAsyncStream = 0x132A28; // type:func CBinaryAsyncStream__~CBinaryAsyncStream = 0x132A68; // type:func CBinaryAsyncStream__FOpenFile = 0x132AB8; // type:func CBinaryAsyncStream__FOpenSector = 0x132AF0; // type:func CBinaryAsyncStream__Close = 0x132B58; // type:func CBinaryAsyncStream__StartSpooling = 0x132BC0; // type:func CBinaryAsyncStream__FSpooling = 0x132C78; // type:func CBinaryAsyncStream__FSpoolingComplete = 0x132C88; // type:func CBinaryAsyncStream__FinishSpooling = 0x132D68; // type:func CBinaryAsyncStream__Spool = 0x132DF8; // type:func CBinaryAsyncStream__Skip = 0x132E80; // type:func FIsBasicDerivedFrom = 0x132E90; // type:func EnsureBasicSidebag = 0x132EB8; // type:func GetBasicCid = 0x132F10; // type:func EvaluateBezierWeightedFloat = 0x132F20; // type:func EvaluateBezierFloat = 0x1331A8; // type:func EvaluateBezierPos = 0x1332F8; // type:func EvaluateBezierMat = 0x133500; // type:func TesselateBezier = 0x133938; // type:func SBezierPosLength = 0x133A20; // type:func LimitBezierMulti = 0x133A68; // type:func InitBei = 0x133D68; // type:func GEvaluateBei = 0x133E20; // type:func InitBinoc = 0x133F10; // type:func ResetBinoc = 0x133F60; // type:func PostBinocLoad = 0x133FC0; // type:func DrawBinocCompass = 0x1345A0; // type:func DrawBinocZoom = 0x134EB0; // type:func DrawBinocReticle = 0x135400; // type:func DrawBinocOutline = 0x136A98; // type:func DrawBinocScan = 0x137AB8; // type:func DrawBinocFilter = 0x137FD0; // type:func SetBinocBlots = 0x1385F0; // type:func SetBinocBinocs = 0x1387E0; // type:func NCmpSlo = 0x138840; // type:func UpdateFilterRose = 0x1388B8; // type:func GetSoSphere = 0x138DF0; // type:func GetAloSphere = 0x138E08; // type:func ChpFillAlo = 0x138E18; // type:func ChpFillSo = 0x138E48; // type:func SetBinocBfk = 0x138ED0; // type:func UpdateBinocActiveFilter = 0x138FD8; // type:func UpdateBinocActive = 0x1391C8; // type:func OnBinocActive = 0x1393E0; // type:func OnBinocReset = 0x139500; // type:func SetBinocAchzDraw = 0x139560; // type:func FDoneBinocAchz = 0x1396D0; // type:func SetBinocLookat = 0x139750; // type:func SetBinocZoom = 0x139758; // type:func DtAppearBinoc = 0x1397A0; // type:func DtDisappearBinoc = 0x139800; // type:func DrawBinoc = 0x139860; // type:func GetBinocReticleFocus = 0x13A128; // type:func OnBinocPush = 0x13A158; // type:func OnBinocPop = 0x13A248; // type:func __static_initialization_and_destruction_02 = 0x13A298; // type:func CTextBox__SetPos = 0x13A418; // type:func CTextBox__SetSize = 0x13A428; // type:func CTextBox__SetTextColor = 0x13A438; // type:func CTextBox__SetHorizontalJust = 0x13A450; // type:func CTextBox__SetVerticalJust = 0x13A458; // type:func _GLOBAL_$I$InitBei__FP3BEIP3CLQffi = 0x13A460; // type:func CBinaryInputStream__CBinaryInputStream = 0x13A488; // type:func CBinaryInputStream__~CBinaryInputStream = 0x13A4D8; // type:func CBinaryInputStream__FOpenSector = 0x13A528; // type:func CBinaryInputStream__OpenMemory = 0x13A5B0; // type:func CBinaryInputStream__FOpenFile = 0x13A5C8; // type:func CBinaryInputStream__Close = 0x13A600; // type:func CBinaryInputStream__DecrementCdReadLimit = 0x13A6C0; // type:func CBinaryInputStream__PumpCd = 0x13A6D0; // type:func CBinaryInputStream__PumpHost = 0x13AA58; // type:func CBinaryInputStream__Pump = 0x13AAC0; // type:func CBinaryInputStream__Decompress = 0x13AB58; // type:func CBinaryInputStream__Read = 0x13AD28; // type:func CBinaryInputStream__Align = 0x13AE58; // type:func CBinaryInputStream__U8Read = 0x13AE88; // type:func CBinaryInputStream__U16Read = 0x13AEE0; // type:func CBinaryInputStream__U32Read = 0x13AF48; // type:func CBinaryInputStream__S8Read = 0x13AFD0; // type:func CBinaryInputStream__S16Read = 0x13B028; // type:func CBinaryInputStream__S32Read = 0x13B098; // type:func CBinaryInputStream__F32Read = 0x13B120; // type:func CBinaryInputStream__ReadVector = 0x13B1A0; // type:func CBinaryInputStream__ReadVector4 = 0x13B1C8; // type:func CBinaryInputStream__ReadMatrix = 0x13B1F0; // type:func CBinaryInputStream__ReadMatrix4 = 0x13B258; // type:func CBinaryInputStream__ReadGeom = 0x13B310; // type:func CBinaryInputStream__ReadBspc = 0x13B648; // type:func CBinaryInputStream__ReadVbsp = 0x13B788; // type:func CBinaryInputStream__ReadStringSw = 0x13B8D0; // type:func UpdateSwPox = 0x13B968; // type:func PoxAddSw = 0x13BB38; // type:func PoxRemoveSw = 0x13BB90; // type:func PoxFromSoSo = 0x13BBC8; // type:func PxpFirstFromSoSo = 0x13BC00; // type:func AddSwAaobrObject = 0x13BC38; // type:func RemoveSwAaobrObject = 0x13BCB8; // type:func InvalidateSwAaox = 0x13BDE0; // type:func UpdateSwAaox = 0x13BDE8; // type:func InvalidateSwXpForObject = 0x13C020; // type:func RecalcSwXpAll = 0x13C040; // type:func RecalcSwOxfFilterForObject = 0x13C390; // type:func VerifyAeaEquivalence = 0x13C470; // type:func EnsureAsegBlendDynamic = 0x13C4B8; // type:func FillBlAmrsg = 0x13CB08; // type:func CalculateBlendAmrsg = 0x13CC50; // type:func ImrsgLookUp = 0x13CE88; // type:func ReblendAsegbl = 0x13CF10; // type:func SetAsegblSlerp = 0x13D060; // type:func BuildBlipAqwGifs = 0x13D0A0; // type:func StartupBlips = 0x13D1A8; // type:func PblipNew = 0x13D1F0; // type:func RemoveBlip = 0x13D2D0; // type:func PblipgNew = 0x13D320; // type:func InitBlipg = 0x13D3B0; // type:func OnBlipgAdd = 0x13D448; // type:func OnBlipgRemove = 0x13D4A8; // type:func SetBlipgShader = 0x13D598; // type:func PropagateBlipgShader = 0x13D630; // type:func SetBlipgEmitb = 0x13D760; // type:func UpdateBlipg = 0x13DA10; // type:func SubscribeBlipgObject = 0x13DA98; // type:func CblipeProjectBlipTransformAccel = 0x13DB30; // type:func ProjectBlipgTransformAccel = 0x13DCB8; // type:func ProjectBlipgTransform = 0x13E018; // type:func RenderBlipgSelf = 0x13E400; // type:func DrawBlipg = 0x13E490; // type:func PropagateBlipgShaders = 0x13ECC8; // type:func InitBomb = 0x13ED60; // type:func LoadBombFromBrx = 0x13EE50; // type:func CloneBomb = 0x13EE90; // type:func PostBombLoad = 0x13EEE8; // type:func HandleBombMessage = 0x13F018; // type:func UpdateBomb = 0x13F088; // type:func OnBombAdd = 0x13F228; // type:func GetBombParams = 0x13F268; // type:func DecideBombPrime = 0x13F2D0; // type:func FAbsorbBombWkr = 0x13F3E0; // type:func PrimeBomb = 0x13F450; // type:func ApplyBombThrow = 0x13F468; // type:func DetonateBomb = 0x13F580; // type:func PsfxEnsureBomb = 0x13FF88; // type:func RenderAloAsBone = 0x13FFC8; // type:func RenderBoneSelf = 0x1401C0; // type:func RenderLboneSelf = 0x140220; // type:func CByteQueue__Init = 0x140280; // type:func CByteQueue__Reset = 0x1402B0; // type:func CByteQueue__CbFill = 0x1402D0; // type:func CByteQueue__CbDrain = 0x1403D8; // type:func CByteQueue__CbFill1 = 0x140500; // type:func CByteQueue__FreeDrain = 0x140558; // type:func CQueueInputMemory__CbRead = 0x140590; // type:func CQueueInputFile__CbRead = 0x140600; // type:func InitBrk = 0x140610; // type:func LoadBrkFromBrx = 0x1406A8; // type:func CloneBrk = 0x140730; // type:func PostBrkLoad = 0x140798; // type:func PostBrkLoadCallbackHookup = 0x1407E8; // type:func UpdateBrk = 0x1409C0; // type:func FAbsorbBrkWkr = 0x140A10; // type:func BreakBrk = 0x140BA0; // type:func SetBrkBroken = 0x1411C0; // type:func SetBrkExclude = 0x141218; // type:func SetBrkRemain = 0x141260; // type:func SetBrkFixed = 0x1412B0; // type:func SetBrkRemainFixed = 0x141300; // type:func SetBrkOnPlayer = 0x141350; // type:func GetBrkOnPlayer = 0x141390; // type:func SetBrkOnBomb = 0x1413A0; // type:func GetBrkOnBomb = 0x1413E0; // type:func AddBrkTouchObject = 0x1413F8; // type:func AddBrkTouchClass = 0x141430; // type:func PsfxEnsureBrk = 0x141468; // type:func FCheckBrkTouchObject = 0x1414A8; // type:func UpdateBrkp = 0x1415D0; // type:func HandleBrkpMessage = 0x141658; // type:func FIgnoreBrkpIntersection = 0x1416C8; // type:func SetBrkpBrkps = 0x141740; // type:func InitBreak = 0x141788; // type:func InitFragile = 0x1417C8; // type:func AdjustFragileNewXp = 0x141800; // type:func AdjustZapbreakNewXp = 0x141870; // type:func UpdateZapbreak = 0x141900; // type:func ClsgClipEdgeToBsp = 0x141980; // type:func PruneBsp = 0x141DE8; // type:func PbspPointInBspQuick = 0x142018; // type:func CloneBspc = 0x142098; // type:func PostAshLoad = 0x142198; // type:func FFoundAshAseg = 0x142270; // type:func FAddAshAseg = 0x1422F0; // type:func FAddAshOid = 0x142310; // type:func InitBtn = 0x142330; // type:func LoadBtn = 0x142388; // type:func PostBtnLoad = 0x142498; // type:func RestoreBtnFromCheckpointCallback = 0x142568; // type:func SetBtnRsmg = 0x1425C8; // type:func SetBtnButtons = 0x142608; // type:func FAddRsmg = 0x1426B8; // type:func TriggerRsmg = 0x142768; // type:func RunBtnAsegs = 0x142860; // type:func TriggerBtn = 0x142A50; // type:func UntriggerBtn = 0x142B98; // type:func InitButton = 0x142C10; // type:func LoadButtonFromBrx = 0x142C50; // type:func InsertButtonPos = 0x142C90; // type:func InsertButtonMat = 0x142D38; // type:func PostButtonLoad = 0x142E00; // type:func CloneButton = 0x1432A0; // type:func SetButtonButtons = 0x1432E0; // type:func FCheckButtonObject = 0x143308; // type:func IposFindButtonClosest = 0x1434C0; // type:func ImatFindButtonClosest = 0x143560; // type:func PresetButtonAccel = 0x143658; // type:func UpdateButtonInternalXps = 0x143748; // type:func UpdateButton = 0x1439C8; // type:func FAbsorbButtonWkr = 0x143D38; // type:func GetButtonParams = 0x143DC8; // type:func InitVolbtn = 0x143E30; // type:func LoadVolbtnFromBrx = 0x143EA0; // type:func PostVolbtnLoad = 0x143EF0; // type:func CloneVolbtn = 0x143FD8; // type:func SetVolbtnButtons = 0x144018; // type:func UpdateVolbtn = 0x144040; // type:func FGetVolbtnPushObjectsWithinList = 0x1443A8; // type:func AddBtnAseg = 0x144438; // type:func AddButtonAseg = 0x144460; // type:func AddVolbtnAseg = 0x144490; // type:func AddBtnOffAseg = 0x1444C0; // type:func AddButtonOffAseg = 0x1444E8; // type:func AddVolbtnOffAseg = 0x144518; // type:func AddButtonPushObject = 0x144548; // type:func AddButtonNoPushObject = 0x144568; // type:func AddButtonPushClass = 0x144588; // type:func AddButtonNoPushClass = 0x1445A8; // type:func AddVolbtnPushObject = 0x1445C8; // type:func SetButtonRsmg = 0x1445E8; // type:func SetVolbtnRsmg = 0x144610; // type:func StartupCatalog = 0x144638; // type:func CWalCatalog__Init = 0x144660; // type:func CWalCatalog__Reload = 0x1446A8; // type:func CWalCatalog__FFindFile = 0x144930; // type:func CWalCatalog__BuildFl = 0x144A68; // type:func CWalCatalog__FDefaultWorld = 0x144AA0; // type:func CWalCatalog__CGetWorlds = 0x144B18; // type:func CCatalog__Init = 0x144BF8; // type:func CCatalog__Reload = 0x144CE0; // type:func CCatalog__FFindFile = 0x144CE8; // type:func CCatalog__FDefaultWorld = 0x144EF8; // type:func CCatalog__CGetWorlds = 0x144F20; // type:func __static_initialization_and_destruction_03 = 0x145050; // type:func CFileLocation__Clear = 0x1450A0; // type:func _GLOBAL_$I$StartupCatalog__Fv = 0x1450C8; // type:func InitCan = 0x1450F0; // type:func PostCanLoad = 0x1451B0; // type:func FIgnoreCanIntersection = 0x145248; // type:func UpdateCan = 0x1452B0; // type:func GetCanParams = 0x1454C8; // type:func BreakCan = 0x145530; // type:func SetCanGoalState = 0x145578; // type:func TrackCan = 0x145630; // type:func FPrepareCanToFire = 0x145A08; // type:func FireCan = 0x145A60; // type:func PsoFireCanAtPos = 0x145D78; // type:func AddCanFireAccuracy = 0x145DE8; // type:func CpchzTokenizePath = 0x145E18; // type:func FValidCdMmode = 0x145FF8; // type:func SetCdMmode = 0x146060; // type:func StartupCd = 0x1460C0; // type:func UpdateCd = 0x1460E0; // type:func CdPath = 0x1460E8; // type:func ReadCd = 0x1461D0; // type:func ReadCdDirect = 0x146298; // type:func FCdCompleted = 0x146360; // type:func ResetChkmgrCheckpoints = 0x146390; // type:func SaveChkmgrCheckpoint = 0x146420; // type:func ReturnChkmgrToCheckpoint = 0x1464E0; // type:func RestoreChkmgrFromCheckpoint = 0x146560; // type:func IchkAllocChkmgr = 0x146610; // type:func FGetChkmgrIchk = 0x146620; // type:func SetChkmgrIchk = 0x146658; // type:func ClearChkmgrIchk = 0x1466B8; // type:func LoadVolFromBrx = 0x146720; // type:func FCheckVolPoint = 0x1467A8; // type:func InitChkpnt = 0x1467F0; // type:func LoadChkpntFromBrx = 0x146850; // type:func BindChkpnt = 0x1469D0; // type:func PostChkpntLoad = 0x146AE8; // type:func CloneChkpnt = 0x146BA0; // type:func UpdateChkpnt = 0x146C78; // type:func TriggerChkpnt = 0x146E08; // type:func AddChkpntVol = 0x146F08; // type:func AddChkpntAseg = 0x146F28; // type:func SetChkpntWarp = 0x146F48; // type:func PsoHitTestLineObjects = 0x146F50; // type:func ClsgClipEdgeToObject = 0x1470B8; // type:func ClsgClipEdgeToObjectPruned = 0x147130; // type:func ClsgClipCylinderToObject = 0x1471B0; // type:func ClsgClipLineToSphere = 0x147250; // type:func ClsgClipEdgeToSphere = 0x147410; // type:func ClsgClipCylinderToSphere = 0x147638; // type:func ClsgClipEdgeToCylinder = 0x147758; // type:func SgnCompareMaa = 0x147E80; // type:func ClsgMergeAlsg = 0x147EE0; // type:func ClsgClipCylinderToBsp = 0x148080; // type:func SetClockRate = 0x148418; // type:func MarkClockTick = 0x148468; // type:func MarkClockTickRealOnly = 0x1485A8; // type:func ResetClock = 0x148640; // type:func SetClockEnabled = 0x148648; // type:func StartupClock = 0x148650; // type:func TickNow = 0x148688; // type:func StartupCm = 0x1486D0; // type:func CheckCmProgress = 0x1486D8; // type:func ResetCmProgress = 0x148770; // type:func CalcCmAdjust = 0x148788; // type:func SpringCm = 0x1487C8; // type:func AdjustCmCpdefi = 0x148850; // type:func ResetCmAdjust = 0x148A58; // type:func GetCmCpdefi = 0x148A98; // type:func BuildCmFgfn = 0x148B50; // type:func RecalcCmFrustrum = 0x148BF0; // type:func InitCm = 0x148CF0; // type:func SetSwCameraFov = 0x148E78; // type:func SetSwCameraNearClip = 0x148EA8; // type:func SetSwCameraFarClip = 0x148ED8; // type:func SetSwCameraNearFog = 0x148F08; // type:func SetSwCameraFarFog = 0x148F38; // type:func SetSwCameraUFogMax = 0x148F68; // type:func SetSwCameraRgbaFog = 0x148F98; // type:func SetSwCameraMrdRatio = 0x148FC8; // type:func SetCmPos = 0x148FF8; // type:func SetCmMat = 0x149020; // type:func SetCmFov = 0x149048; // type:func SetCmNearClip = 0x149070; // type:func SetCmFarClip = 0x149098; // type:func SetCmNearFog = 0x1490C0; // type:func SetCmFarFog = 0x1490E8; // type:func SetCmUFogMax = 0x149110; // type:func SetCmRgbaFog = 0x149138; // type:func SetCmMrdRatio = 0x149170; // type:func GetCmParams = 0x1491A0; // type:func ResetCm = 0x1491D0; // type:func FFilterCamera = 0x149298; // type:func CpsoClipCmObjects = 0x1492D8; // type:func ClearCmFadeObjects = 0x1493E0; // type:func AddCmFadeObject = 0x1493E8; // type:func RemoveCmFadeObject = 0x149410; // type:func UpdateCmFade = 0x1494A0; // type:func PxpMarkCmContacts = 0x149728; // type:func FDisplaceCmPos = 0x149730; // type:func UpdateCmLast = 0x149738; // type:func SetupCmRotateToCam = 0x1498E8; // type:func ConvertCmScreenToWorld = 0x149A08; // type:func ConvertCmWorldToScreen = 0x149AA0; // type:func UnlockCm = 0x149B58; // type:func SetupCm = 0x149B68; // type:func CombineEyeLookAtProj = 0x149BF0; // type:func BuildFrustrum = 0x149D08; // type:func UpdateCmMat4 = 0x149E80; // type:func DrawCm = 0x14A1C0; // type:func SetCmPosMat = 0x14A268; // type:func SetCmLookAt = 0x14A330; // type:func ConvertWorldToCylindVelocity = 0x14A378; // type:func ConvertCylindToWorldVelocity = 0x14A4A8; // type:func ResetCmLookAtSmooth = 0x14A580; // type:func SetCmLookAtSmooth = 0x14A608; // type:func AdjustCmJoy = 0x14AE30; // type:func SetCmPolicy = 0x14AEE0; // type:func RevokeCmPolicy = 0x14B050; // type:func FInsideCmMrd = 0x14B210; // type:func DecomposeCylind = 0x14B2F0; // type:func DecomposeSphere = 0x14B3A8; // type:func SetCmCut = 0x14B4A8; // type:func AdaptCm = 0x14B4E8; // type:func SetCm = 0x14B5F8; // type:func SquishCmEye = 0x14B718; // type:func PushCmLookk = 0x14BA78; // type:func LookkPopCm = 0x14BAA0; // type:func LookkCurCm = 0x14BAC8; // type:func SetCmSniperFocus = 0x14BAF0; // type:func JoltCm = 0x14BB00; // type:func __static_initialization_and_destruction_04 = 0x14BB10; // type:func _GLOBAL_$I$StartupCm__Fv = 0x14BB38; // type:func InitCnvo = 0x14BB60; // type:func LoadCnvoFromBrx = 0x14BB98; // type:func PostCnvoLoad = 0x14BBF8; // type:func AdjustCnvoXpVelocity = 0x14BC38; // type:func GetCnvoParams = 0x14BCD0; // type:func SetCnvoBeltSpeed = 0x14BD38; // type:func MatchCnvoScrollerToBeltSpeed = 0x14BDA8; // type:func InitDprize = 0x14BE50; // type:func LoadDprizeFromBrx = 0x14BEE0; // type:func CloneDprize = 0x14BF50; // type:func PostDprizeLoad = 0x14BFB0; // type:func ProjectDprizeTransform = 0x14C050; // type:func FFilterDprizeObjects = 0x14C8C8; // type:func CheckDprizeBounce = 0x14C978; // type:func CheckDprizeCollect = 0x14CD68; // type:func FAbsorbDprizeWkr = 0x14CE78; // type:func UpdateDprize = 0x14CEB0; // type:func RenderDprizeAll = 0x14D388; // type:func SetDprizeDprizes = 0x14D568; // type:func InitCoin = 0x14D948; // type:func UpdateCoin = 0x14D9E0; // type:func CreateSwCharm = 0x14DA50; // type:func AddLife = 0x14DB98; // type:func OnCoinSmack = 0x14DBC0; // type:func SetCoinDprizes = 0x14DCC0; // type:func InitCharm = 0x14DE70; // type:func SetCharmDprizes = 0x14DEE8; // type:func InitKey = 0x14DF78; // type:func SetKeyDprizes = 0x14E008; // type:func InitGold = 0x14E0E8; // type:func SetGoldDprizes = 0x14E178; // type:func SgnCompareSdprize = 0x14E350; // type:func CpdprizeFindSwDprizes = 0x14E378; // type:func CpdprizeAttractSwDprizes = 0x14E528; // type:func RemoveSwExtraneousCharms = 0x14E780; // type:func InitCplcy = 0x14E810; // type:func FActiveCplcy = 0x14E818; // type:func SetCpmanCpmt = 0x14E830; // type:func SetCpmanCpmtGlobal = 0x14E878; // type:func ToggleCpmanOverride = 0x14E930; // type:func UpdateCpman = 0x14E960; // type:func PosCplookAnchor = 0x14EF58; // type:func PosCplookEye = 0x14F000; // type:func StartCplookSound = 0x14F0C0; // type:func PushCplookLookk = 0x14F1B8; // type:func LookkPopCplook = 0x14F1E0; // type:func LookkCurCplook = 0x14F208; // type:func InitCplook = 0x14F230; // type:func ActivateCplook = 0x14F2A0; // type:func UpdateCplook = 0x14F340; // type:func DeactivateCplook = 0x150040; // type:func InitCpalign = 0x1501F0; // type:func ActivateCpalign = 0x150240; // type:func UpdateCpalign = 0x150270; // type:func ActivateCpaseg = 0x150410; // type:func DeactivateCpaseg = 0x150418; // type:func UpdateCpaseg = 0x150420; // type:func InitCredit = 0x150580; // type:func PostCreditLoad = 0x150600; // type:func SetCreditClock = 0x1506F0; // type:func UpdateCredit = 0x150768; // type:func DrawCredit = 0x1507E0; // type:func PlaceCredit = 0x150898; // type:func VacateCredit = 0x150910; // type:func SetCreditLine = 0x150938; // type:func CroutDecomp = 0x150AD0; // type:func CroutSolve = 0x150DF0; // type:func OnCrfodAdd = 0x150F60; // type:func OnCrfodRemove = 0x150FA8; // type:func CloneCrfod = 0x150FF0; // type:func InitCrfodb = 0x151040; // type:func CalcHeadingVector = 0x151078; // type:func UpdateCrfodbGoal = 0x1510B0; // type:func FDetectCrfodb = 0x151568; // type:func FAbsorbCrfodbWkr = 0x151730; // type:func SgsNextCrfodkAI = 0x151788; // type:func FDetectCrfodk = 0x1518D0; // type:func FAbsorbCrfodkWkr = 0x1518F8; // type:func InitCrbrain = 0x1519A8; // type:func ActivateCrbrain = 0x1519E8; // type:func ScoreCrbrain = 0x151A30; // type:func SMeasureApos = 0x151A58; // type:func GWrapApos = 0x151AE8; // type:func IposFindAposG = 0x151B50; // type:func EvaluateAposG = 0x151C38; // type:func FindAposClosestPointAll = 0x151D68; // type:func FindAposClosestPointSegment = 0x152050; // type:func ConvertApos = 0x152318; // type:func PcrvNew = 0x1523A0; // type:func SFromCrvU = 0x152420; // type:func UFromCrvS = 0x152430; // type:func IcvFindCrvU = 0x152440; // type:func IcvFindCrvS = 0x152478; // type:func GMeasureCrvU = 0x1524B8; // type:func UMaxCrv = 0x152570; // type:func SMaxCrv = 0x152588; // type:func SMeasureCrvSegmentU = 0x1525A8; // type:func FindCrvClosestPointOnLineSegmentFromU = 0x152608; // type:func RenderCrv = 0x152738; // type:func RenderCrvAxesU = 0x1527F8; // type:func RenderCrvAxesS = 0x1528D8; // type:func DuGetCrvSearchIncrement = 0x152948; // type:func LoadCrvlFromBrx = 0x152970; // type:func EvaluateCrvlFromU = 0x152A80; // type:func EvaluateCrvlFromS = 0x152AC0; // type:func RenderCrvlSegment = 0x152B00; // type:func ConvertCrvl = 0x152C08; // type:func SFromCrvlU = 0x152C40; // type:func UFromCrvlS = 0x152CB0; // type:func MeasureCrvl = 0x152D20; // type:func FindCrvlClosestPointAll = 0x152D50; // type:func FindCrvlClosestPointFromU = 0x152E30; // type:func FindCrvlClosestPointFromS = 0x152F70; // type:func LoadCrvcFromBrx = 0x1530B0; // type:func InvalidateCrvcCache = 0x153218; // type:func FillCrvcCache = 0x153228; // type:func EvaluateCrvcFromU = 0x1532E0; // type:func EvaluateCrvcFromS = 0x1533E0; // type:func RenderCrvcSegment = 0x153448; // type:func ConvertCrvc = 0x153568; // type:func SFromCrvcU = 0x153668; // type:func UFromCrvcS = 0x1536F8; // type:func MeasureCrvc = 0x1537C8; // type:func FindCrvcClosestPointAll = 0x153898; // type:func FindCrvcClosestPointFromU = 0x153A18; // type:func FindCrvcClosestPointFromS = 0x153B48; // type:func InitCycle = 0x153BF0; // type:func PostCycleLoad = 0x153C50; // type:func PresetCycleAccel = 0x153CB0; // type:func UpdateCycleWheels = 0x1547A8; // type:func UpdateCycleExpls = 0x154A90; // type:func UpdateCycle = 0x154EF8; // type:func UpdateCycleActive = 0x154F58; // type:func UpdateCycleInternalXps = 0x155040; // type:func AddCycleCustomXps = 0x155050; // type:func AdjustCycleNewXp = 0x155260; // type:func RenderCycleSelf = 0x155388; // type:func UpdateCycleBounds = 0x155628; // type:func UpdateCycleXfWorld = 0x1556E0; // type:func GetCycleCpdefi = 0x155708; // type:func OnCycleActive = 0x155730; // type:func SetCycleCycles = 0x155758; // type:func InitDart = 0x155778; // type:func OnDartAdd = 0x1557B8; // type:func RemoveDart = 0x155868; // type:func CloneDart = 0x1558C0; // type:func LoadDartFromBrx = 0x155910; // type:func HandleDartMessage = 0x155950; // type:func PostDartLoad = 0x1559C8; // type:func UpdateDart = 0x155A10; // type:func GetDartParams = 0x155AE0; // type:func SetDartDarts = 0x155B48; // type:func ApplyDartThrow = 0x155BA8; // type:func UpdateDartAirborne = 0x155C80; // type:func InitDartgun = 0x1561E0; // type:func HandleDartgunMessage = 0x156218; // type:func BindDartgun = 0x156310; // type:func PostDartgunLoad = 0x1563E8; // type:func UpdateDartgun = 0x156578; // type:func FIgnoreDartgunIntersection = 0x156710; // type:func GetDartgunParams = 0x156780; // type:func BreakDartgun = 0x1567E8; // type:func SetDartgunGoalState = 0x1568B0; // type:func TrackDartgun = 0x156980; // type:func FPrepareDartgunToFire = 0x156AB0; // type:func FireDartgun = 0x156C18; // type:func AgeDartgunStuckDart = 0x156EE0; // type:func PratGetDartgunRatTarget = 0x156FA0; // type:func AddDartgunRatTarget = 0x157050; // type:func StartDartgunTargetAreaChange = 0x157078; // type:func AddDartgunTargetAreaTarget = 0x157088; // type:func InitDialog = 0x157160; // type:func LoadDialogFromBrx = 0x1571C0; // type:func LoadDialogEventsFromBrx = 0x157218; // type:func SetDialogInstruct = 0x157400; // type:func SetDialogConfront = 0x157410; // type:func GetDialogPlayed = 0x157420; // type:func SetDialogPlayed = 0x157430; // type:func SetDialogDialogs = 0x157440; // type:func UpdateDialog = 0x157738; // type:func HandleDialogEvent = 0x157920; // type:func HandleDialogMessage = 0x157E58; // type:func FPauseDialog = 0x157EB8; // type:func HandleDialogEvents = 0x1582C0; // type:func TriggerDialog = 0x1583D0; // type:func UntriggerDialog = 0x1584B8; // type:func AddDialogEquivalence = 0x1584E8; // type:func PdifficultyEnsureSw = 0x1585B8; // type:func OnDifficultyGameLoad = 0x1585C8; // type:func OnDifficultyWorldPreLoad = 0x1585F0; // type:func OnDifficultyWorldPostLoad = 0x1586B0; // type:func OnDifficultyInitialTeleport = 0x158778; // type:func OnDifficultyPlayerDeath = 0x158780; // type:func OnDifficultyTriggerCheckpoint = 0x1587E0; // type:func OnDifficultyCollectKey = 0x1588E8; // type:func OnDifficultyAward = 0x158928; // type:func OnDifficultyBreak = 0x1589D8; // type:func OnDifficultyNpc = 0x158B28; // type:func OnDifficultyMiniNpc = 0x158B90; // type:func ChangeSuck = 0x158BF8; // type:func ResetSuckChkpnts = 0x158C58; // type:func SetSuckChkpnts = 0x158C90; // type:func InitDl = 0x158D00; // type:func ClearDl = 0x158D08; // type:func ClearDle = 0x158D18; // type:func PdleFromDlEntry = 0x158D28; // type:func AppendDlEntry = 0x158D38; // type:func PrependDlEntry = 0x158DB0; // type:func InsertDlEntryBefore = 0x158E28; // type:func RemoveDlEntry = 0x158F00; // type:func FFindDlEntry = 0x158FF0; // type:func FIsDlEmpty = 0x159048; // type:func MergeDl = 0x159058; // type:func CPvDl = 0x159120; // type:func StartupDma = 0x159158; // type:func DMAS__DMAS = 0x1591E8; // type:func DMAS__Clear = 0x159230; // type:func DMAS__Reset = 0x159248; // type:func DMAS__AllocGlobal = 0x159258; // type:func DMAS__AllocSw = 0x1592A8; // type:func DMAS__AllocStack = 0x1592F8; // type:func DMAS__AllocStatic = 0x159348; // type:func DMAS__Detach = 0x159360; // type:func DMAS__DetachCopySw = 0x1593E0; // type:func DMAS__Send = 0x159488; // type:func DMAS__Sync = 0x1594F0; // type:func DMAS__AddDmaCnt = 0x159520; // type:func DMAS__AddDmaRefs = 0x159570; // type:func DMAS__AddDmaCall = 0x159610; // type:func DMAS__AddDmaRet = 0x1596A0; // type:func DMAS__AddDmaBulk = 0x1596E8; // type:func DMAS__AddDmaEnd = 0x159740; // type:func DMAS__EndDmaCnt = 0x159788; // type:func DMAS__EndPrim = 0x159830; // type:func PostDspLoad = 0x159840; // type:func UpdateDsp = 0x159A18; // type:func InitDysh = 0x159CA0; // type:func SetDyshShadow = 0x159CC8; // type:func RenderDyshSelf = 0x15A2C8; // type:func DrawDysh = 0x15A370; // type:func InitDzg = 0x15A540; // type:func ClearDzgSolution = 0x15A648; // type:func AppendDzgDz = 0x15A730; // type:func FillDzgDz = 0x15A7F0; // type:func EnforceDzgDz = 0x15AAF0; // type:func SolveDzg = 0x15AFD8; // type:func SolveDzgFric = 0x15B1C8; // type:func ApplyDzg = 0x15B4D0; // type:func SolveInequalities = 0x15BA10; // type:func InitEmitb = 0x15BB90; // type:func InitEmitter = 0x15BDF0; // type:func LoadEmitmeshFromBrx = 0x15BE70; // type:func LoadEmitblipColorsFromBrx = 0x15BFF8; // type:func LoadEmitterFromBrx = 0x15C0D8; // type:func CloneEmitter = 0x15C208; // type:func BindEmitterCallback = 0x15C248; // type:func BindEmitter = 0x15C278; // type:func PostEmitterLoad = 0x15C450; // type:func HandleEmitterMessage = 0x15C888; // type:func GetEmitterParams = 0x15C8F8; // type:func RenderEmitterSelf = 0x15C928; // type:func PemitbCopyOnWrite = 0x15CA00; // type:func PemitbEnsureEmitter = 0x15CAA0; // type:func PemitterEnsureEmitter = 0x15CB00; // type:func AddEmitterSkeleton = 0x15CB18; // type:func ModifyEmitterParticles = 0x15CBC0; // type:func UpdateEmitter = 0x15CE20; // type:func PauseEmitter = 0x15D3C0; // type:func PauseEmitterIndefinite = 0x15D3D8; // type:func UnpauseEmitter = 0x15D3E8; // type:func FPausedEmitter = 0x15D3F8; // type:func SetEmitterEnabled = 0x15D448; // type:func GetEmitterEnabled = 0x15D488; // type:func GetEmitterPaused = 0x15D4C0; // type:func OnEmitterValuesChanged = 0x15D4F0; // type:func SetEmitterParticleCount = 0x15D588; // type:func SetEmitterAutoPause = 0x15D608; // type:func SetEmitbRipt = 0x15D618; // type:func SetEmitterRipt = 0x15D6B0; // type:func SetExploRipt = 0x15D6F8; // type:func WakeSoWater = 0x15D740; // type:func StandardSmokeCloud = 0x15DBA0; // type:func ChooseEmitoPos = 0x15DBF0; // type:func ConvertEmitoPosVec = 0x15E400; // type:func CalculateEmitvx = 0x15E4D8; // type:func ChooseEmitVelocity = 0x15E5B8; // type:func ChooseEmitvVelocityAge = 0x15E798; // type:func EmitRips = 0x15E888; // type:func EmitBlips = 0x15EB60; // type:func OriginateParticles = 0x15EF70; // type:func OriginateSplineSinkParticles = 0x15F180; // type:func EmitParticles = 0x15F420; // type:func EmitRipsSphere = 0x15F548; // type:func StockSplashBig = 0x15F660; // type:func StockSplashSmall = 0x15F770; // type:func AddEmitoSkeleton = 0x15F808; // type:func BindEmitb = 0x15F900; // type:func SetEmitdvEmitb = 0x15FA80; // type:func CalculateEmitdvMatrix = 0x15FB18; // type:func PostExplLoad = 0x15FCB8; // type:func CalculateExplTransform = 0x15FCF8; // type:func ExplodeExpl = 0x15FDF8; // type:func ExplodeExplParams = 0x15FE48; // type:func ExplodeExplExplso = 0x15FE90; // type:func LoadExplgFromBrx = 0x15FE98; // type:func CloneExplg = 0x160098; // type:func BindExplg = 0x160140; // type:func ExplodeExplgExplso = 0x1601B0; // type:func InitExplo = 0x160230; // type:func LoadExploFromBrx = 0x160268; // type:func CloneExplo = 0x1603B0; // type:func BindExplo = 0x1603F0; // type:func ExplodeExploExplso = 0x1604E8; // type:func GetExploParams = 0x1604F0; // type:func AddExploSkeleton = 0x160520; // type:func PemitbEnsureExplo = 0x1605C8; // type:func InitExpls = 0x160608; // type:func BindExpls = 0x160648; // type:func HandleExplsMessage = 0x160740; // type:func ExplodeExplsExplso = 0x1607B0; // type:func GetExplsParams = 0x1608B8; // type:func UpdateExplsLiveEdit = 0x1608E8; // type:func PsfxEnsureExpls = 0x160A50; // type:func FireExplsExplso = 0x160A90; // type:func InferExpl = 0x160EC0; // type:func FireSwTimedExplodeStyles = 0x160FE8; // type:func InitEyes = 0x161110; // type:func PostEyesLoad = 0x161178; // type:func SetEyesEyess = 0x161220; // type:func UpdateEyes = 0x161350; // type:func SetEyesClosed = 0x1614E0; // type:func PsaiFromEyesShd = 0x161580; // type:func UpdateFader = 0x1615D8; // type:func PfaderNew = 0x1616C8; // type:func RemoveFader = 0x161758; // type:func PdlFromSwOid = 0x1617E8; // type:func MatchSwObject = 0x161810; // type:func CploFindSwObjects = 0x161A68; // type:func PloFindSwObject = 0x161D08; // type:func PloFindSwNearest = 0x161D40; // type:func PloFindSwChild = 0x161D80; // type:func FIsCidDerivedFrom = 0x161DC0; // type:func CploFindSwObjectsByClass = 0x161DF8; // type:func PloFindSwObjectByClass = 0x162168; // type:func PaloFindLoCommonParent = 0x1621A0; // type:func InitFlash = 0x1621F0; // type:func LoadFlashFromBrx = 0x162258; // type:func UpdateFlash = 0x1622B0; // type:func RenderFlashSelf = 0x162308; // type:func FPosFlashWithin = 0x1623D0; // type:func InitFly = 0x162470; // type:func LoadFlyFromBrx = 0x1625A8; // type:func CloneFly = 0x162778; // type:func FreezeFly = 0x162850; // type:func PostFlyLoad = 0x1628D8; // type:func PresetFlyAccel = 0x1629A0; // type:func UpdateFly = 0x162BC0; // type:func RenderFlySelf = 0x162FD0; // type:func FAbsorbFlyWkr = 0x163228; // type:func GetFlyParams = 0x1632D0; // type:func SetFlyFlys = 0x163338; // type:func EmitFlyDroppings = 0x163868; // type:func FFindFlyClosestLandingPos = 0x163948; // type:func FlysAttemptedFlyLanding = 0x163B20; // type:func FShouldFlyFlee = 0x163C00; // type:func FFilterFly = 0x163CA0; // type:func FCheckFlyOpenSpaceBelow = 0x163CE8; // type:func StartupFont = 0x163DE0; // type:func CFont__CopyTo = 0x163DF8; // type:func CFont__SetupDraw = 0x163E88; // type:func CFont__CleanupDraw = 0x163F68; // type:func CFont__DxFromPchz = 0x163FD0; // type:func CFont__DyWrapPchz = 0x164060; // type:func CFont__ClineWrapPchz = 0x1640A8; // type:func CFont__DxMaxLine = 0x1641F0; // type:func CFont__GetExtents = 0x1642A0; // type:func CFont__DrawPchz = 0x164340; // type:func CFont__PushScaling = 0x1645C0; // type:func CFont__PopScaling = 0x164630; // type:func CFontDebug__CFontDebug = 0x164698; // type:func CFontDebug__PfontClone = 0x1646E0; // type:func CFontDebug__CopyTo = 0x164778; // type:func CFontDebug__FValid = 0x1647A0; // type:func CFontDebug__DxFromCh = 0x1647E0; // type:func CFontDebug__SetupDraw = 0x164850; // type:func CFontDebug__SwitchTex0 = 0x164908; // type:func CFontDebug__DxDrawCh = 0x164910; // type:func CFontDebug__EdgeRect = 0x164C70; // type:func CFontBrx__PfontClone = 0x164C78; // type:func CFontBrx__CopyTo = 0x164D08; // type:func CFontBrx__FValid = 0x164D90; // type:func CFontBrx__DxFromCh = 0x164DC0; // type:func CFontBrx__FEnsureLoaded = 0x164E20; // type:func CFontBrx__SetupDraw = 0x164F10; // type:func CFontBrx__SwitchTex0 = 0x165038; // type:func CFontBrx__DxDrawCh = 0x165100; // type:func CFontBrx__DrawPart = 0x165380; // type:func CFontBrx__EdgeRect = 0x165550; // type:func CFontBrx__LoadFromBrx = 0x165930; // type:func CFontBrx__PostLoad = 0x165A20; // type:func CFontBrx__PglyffFromCh = 0x165B98; // type:func CRichText__CRichText = 0x165C08; // type:func CRichText__Reset = 0x165C68; // type:func CRichText__SetBaseColor = 0x165CA0; // type:func CRichText__ChNext = 0x165CC8; // type:func CRichText__Cch = 0x165FD0; // type:func CRichText__Trim = 0x166030; // type:func CRichText__Dx = 0x1660A0; // type:func CRichText__ClineWrap = 0x166120; // type:func CRichText__DxMaxLine = 0x166258; // type:func CRichText__GetExtents = 0x166300; // type:func CRichText__Draw = 0x166398; // type:func PostFontsLoad = 0x166698; // type:func __static_initialization_and_destruction_05 = 0x166730; // type:func _GLOBAL_$I$g_fontDebug = 0x166798; // type:func VU1_Interrupt = 0x1667C0; // type:func StartupFrame = 0x166928; // type:func OpenFrame = 0x166AE8; // type:func EnsureVu1Code = 0x166CC8; // type:func FinalizeFrameVifs = 0x166D10; // type:func FinalizeFrameGifs = 0x166E30; // type:func CloseFrame = 0x166ED0; // type:func PrepareGsForFrameRender = 0x166FE0; // type:func FrameRenderLoop = 0x167058; // type:func RenderFrame = 0x1671F0; // type:func ClearPendingFrame = 0x167268; // type:func FlushFrames = 0x1674F8; // type:func BlendPrevFrame = 0x167640; // type:func __static_initialization_and_destruction_06 = 0x1679C8; // type:func _GLOBAL_$I$g_gifs = 0x167A10; // type:func RemergeSwObject = 0x167A38; // type:func MergeSwFreezeGroups = 0x167A80; // type:func SplinterSwFreezeGroup = 0x167AD8; // type:func MergeSwGroup = 0x167BC0; // type:func AddSwMergeGroup = 0x167CC0; // type:func RemoveFromArray = 0x167D48; // type:func RemoveSwMergeGroup = 0x167DC0; // type:func RemergeSwObjects = 0x167E90; // type:func FreezeAloHierarchy = 0x167F78; // type:func GetAloFrozen = 0x168000; // type:func FreezeAlo = 0x168018; // type:func FreezeSo = 0x168148; // type:func RefreezeSwObjects = 0x168210; // type:func UpdateSwBusyList = 0x168448; // type:func PostFrzgLoad = 0x168488; // type:func AddFrzgObject = 0x168578; // type:func StartupGame = 0x168598; // type:func PchzFromLevel = 0x1686E0; // type:func PchzFriendlyFromLevel = 0x168730; // type:func PchzFriendlyFromWorld = 0x168790; // type:func FFindLevel = 0x168820; // type:func InitGameState = 0x1688D8; // type:func SetupGame = 0x168968; // type:func UpdateGameState = 0x168AC8; // type:func GrflsFromWid = 0x168B08; // type:func ClearLs = 0x168B80; // type:func UnloadGame = 0x168BA8; // type:func RetryGame = 0x168C10; // type:func StartGame = 0x168C50; // type:func SetCcharm = 0x168C90; // type:func FCharmAvailable = 0x168CA0; // type:func SetClife = 0x168CE8; // type:func SetCcoin = 0x168D40; // type:func PfLookupDialog = 0x168D78; // type:func AchzFromGameworld = 0x168DA0; // type:func CwlpGetWlps = 0x168DB8; // type:func OnGameLoad = 0x168E30; // type:func OnGameWorldTransition = 0x168E58; // type:func OnGameAlarmTriggered = 0x168EB0; // type:func OnGameAlarmDisabled = 0x168EF8; // type:func OnGameEnterUis = 0x168F48; // type:func StartGameTimedChallenge = 0x168F98; // type:func EndGameTimedChallenge = 0x169098; // type:func OnGameTimedChallengeTimerNotify = 0x169168; // type:func StartGameTimedChallengeTimer = 0x169258; // type:func ResetGameTimedChallenge = 0x169320; // type:func PrepareGameGoldForTimedChallenge = 0x169330; // type:func GetBlueprintInfo = 0x169340; // type:func CcharmMost = 0x1693D0; // type:func InitGeom = 0x169400; // type:func CloneGeom = 0x169420; // type:func BuildGeomPointMap = 0x1695C8; // type:func GIFS__GIFS = 0x169778; // type:func GIFS__AddPrimEnd = 0x1697C8; // type:func GIFS__EndPrim = 0x169848; // type:func GIFS__CheckReg = 0x1698B8; // type:func GIFS__AddPrimBulk = 0x1698C8; // type:func GIFS__AddPrimPack = 0x169990; // type:func GIFS__PackRGBA = 0x169A28; // type:func GIFS__PackUV = 0x169AA0; // type:func GIFS__PackSTQ = 0x169B00; // type:func GIFS__PackXYZ = 0x169B70; // type:func GIFS__PackXYZF = 0x169BE0; // type:func GIFS__PackXYZFNoKick = 0x169C68; // type:func GIFS__PackAD = 0x169D08; // type:func GIFS__AddPrimList = 0x169D70; // type:func GIFS__ListRGBAQ = 0x169DF0; // type:func GIFS__ListUV = 0x169E70; // type:func GIFS__ListXYZF = 0x169ED8; // type:func GIFS__AddImage = 0x169F78; // type:func GLBS__GLBS = 0x169FE0; // type:func GLBS__~GLBS = 0x16A0C0; // type:func GLBS__SetTransform = 0x16A0F0; // type:func GLBS__FindLights = 0x16A168; // type:func GLBS__ResetStrip = 0x16A1E8; // type:func GLBS__BeginStrip = 0x16A220; // type:func GLBS__DrawPrelit = 0x16A280; // type:func GLBS__DrawThreeWay = 0x16A658; // type:func GLBS__EndStrip = 0x16AC88; // type:func GLBS__SetPos = 0x16AE40; // type:func GLBS__SetNormal = 0x16AE60; // type:func GLBS__SetRgba = 0x16AE80; // type:func GLBS__SetUv = 0x16AE98; // type:func GLBS__AddVtx = 0x16AEB0; // type:func BuildGlobsetSaaArray = 0x16B000; // type:func LoadGlobsetFromBrx = 0x16B088; // type:func EnsureBuffer = 0x16C450; // type:func EnsureBufferCel = 0x16C4E8; // type:func BuildSubcel = 0x16C580; // type:func BuildSubglobSinglePass = 0x16CAC8; // type:func BuildSubglobThreeWay = 0x16D648; // type:func BuildSubglobLighting = 0x16E5E0; // type:func PostGlobsetLoad = 0x16E808; // type:func BindGlobset = 0x16E910; // type:func CloneGlobset = 0x16EA40; // type:func CloneGlob = 0x16EC38; // type:func UpdateGlobset = 0x16F180; // type:func UpdateAloConstraints = 0x16F258; // type:func UpdateAloInfluences = 0x16F2E8; // type:func PredrawGlob = 0x16F4D0; // type:func RotateVu1Buffer = 0x16F8C8; // type:func DrawGlob = 0x16F908; // type:func __static_initialization_and_destruction_07 = 0x1710B0; // type:func _GLOBAL_$I$g_dro = 0x1710D8; // type:func InitGomer = 0x171100; // type:func PostGomerLoad = 0x1711A8; // type:func RenderGomerSelf = 0x1712D8; // type:func FDetectGomer = 0x171748; // type:func GetGomerParams = 0x171970; // type:func BlendDisplayOnBufferMismatch = 0x1719D8; // type:func VBlankS_Interrupt = 0x171B68; // type:func SyncVBlank = 0x171C80; // type:func SwapGsBuffers = 0x171CB8; // type:func RestoreGsBuffers = 0x171DE8; // type:func GS_Interrupt = 0x171EF8; // type:func ResetGs = 0x171F50; // type:func SendDmaSyncGsFinish = 0x171F90; // type:func BuildClearGifs = 0x172040; // type:func StartupGs = 0x1721B0; // type:func BlastAqwGifsBothFrames = 0x172390; // type:func ClearFrameBuffers = 0x172470; // type:func FadeFramesToBlack = 0x172510; // type:func ResetGsMemory = 0x172728; // type:func NLog2 = 0x172760; // type:func InitGsb = 0x172798; // type:func ResetGsb = 0x1727A8; // type:func IgsAllocGsb = 0x1727B8; // type:func BuildImageGifs = 0x1727C8; // type:func BuildClutTex2 = 0x1728C0; // type:func BuildClutGifs = 0x172990; // type:func BuildBmpTex0 = 0x172A00; // type:func BuildBmpGifs = 0x172AE8; // type:func FBuildUploadBitmapGifs = 0x172B28; // type:func UploadBitmaps = 0x172D60; // type:func PqwGifsBitmapUpload = 0x172EB8; // type:func PropagateSur = 0x173018; // type:func ReferenceShaderAqwRegs = 0x173078; // type:func ReferenceUVAnimation = 0x173198; // type:func RebaseSurs = 0x173258; // type:func PropagateSurs = 0x1732B8; // type:func PqwVifsBitmapUpload = 0x173330; // type:func DrawOnBitmap = 0x1737A8; // type:func InitHg = 0x173900; // type:func PostHgLoad = 0x173960; // type:func PresetHgAccel = 0x1739F0; // type:func UpdateHg = 0x173E40; // type:func UpdateHgActive = 0x173F00; // type:func RenderHgSelf = 0x1743C8; // type:func GetHgCpdefi = 0x174468; // type:func SetHgHgs = 0x174490; // type:func StartupHide = 0x174558; // type:func ResetHideList = 0x1745B0; // type:func InitHshape = 0x1745F8; // type:func OnHshapeAdd = 0x174640; // type:func OnHshapeRemove = 0x174688; // type:func BindHshape = 0x1746D0; // type:func CloneHshape = 0x174718; // type:func GetHshapeHidePos = 0x174768; // type:func GetHshapeClosestHidePos = 0x174928; // type:func InitHpnt = 0x174A70; // type:func OnHpntAdd = 0x174AB0; // type:func OnHpntRemove = 0x174AF8; // type:func BindHpnt = 0x174B40; // type:func CloneHpnt = 0x174B88; // type:func GetHpntClosestHidePos = 0x174BD8; // type:func InitHbsk = 0x174D58; // type:func LoadHbskFromBrx = 0x174DE8; // type:func OnHbskAdd = 0x174E68; // type:func OnHbskRemove = 0x174EB0; // type:func CloneHbsk = 0x174EF8; // type:func FIgnoreHbskIntersection = 0x174F48; // type:func PresetHbskAccel = 0x174F90; // type:func SetHbskHbsks = 0x175018; // type:func CdartStuckHbsk = 0x1751C0; // type:func PdartOldestHbskStuck = 0x175298; // type:func GetHbskClosestHidePos = 0x175398; // type:func InitHnd = 0x1754B0; // type:func LoadHndFromBrx = 0x1754F0; // type:func RenderIkhSelf = 0x175520; // type:func RenderLikhSelf = 0x175548; // type:func SolveAloIK = 0x175570; // type:func InitJack = 0x175E98; // type:func PostJackLoad = 0x175F00; // type:func UpdateJackActive = 0x176168; // type:func SetJackJacks = 0x1768A0; // type:func PjacknAllocJack = 0x176970; // type:func TakeJackDamage = 0x176A48; // type:func AddJackPrize = 0x176A70; // type:func InitJackb = 0x176B20; // type:func PostJackbLoad = 0x176B58; // type:func PlanJackbChase = 0x176C60; // type:func UpdateJackb = 0x177280; // type:func HandleJackbMessage = 0x177530; // type:func SetJackbJbs = 0x177610; // type:func InitJackn = 0x1776B0; // type:func LoadJacknFromBrx = 0x1776D8; // type:func UpdateJackn = 0x177778; // type:func RenderJacknSelf = 0x1779A8; // type:func RebindJackn = 0x177A20; // type:func InitJackf = 0x177CB8; // type:func UpdateJackf = 0x177D48; // type:func BuildJackfRim = 0x177DE8; // type:func JekClassifyJackfVertex = 0x177F20; // type:func JekClassifyJackfEdge = 0x178018; // type:func NCmpJep = 0x1780F0; // type:func UpdateJackfGrid = 0x178140; // type:func CjeSpliceJackfRim = 0x178548; // type:func ApplyJackfGap = 0x178648; // type:func JkFromJackfIJK = 0x1789E0; // type:func GetJackfPos = 0x178A28; // type:func GetJackfRim = 0x178A80; // type:func GetJackfGap = 0x178BD8; // type:func MapJackfCell = 0x178D50; // type:func IjeFindJackfClosestEdge = 0x178E60; // type:func DrawJackf = 0x179080; // type:func RenderJackfSelf = 0x179AB0; // type:func DropJackf = 0x179B68; // type:func CalculateJackfField = 0x179D40; // type:func InitJlo = 0x17A0D8; // type:func LoadJloFromBrx = 0x17A150; // type:func PostJloLoad = 0x17A260; // type:func PresetJloAccel = 0x17A3C8; // type:func UpdateJlo = 0x17A438; // type:func JlosNextJlo = 0x17A510; // type:func SetJloJlovol = 0x17A740; // type:func FireJlo = 0x17A7D8; // type:func LandJlo = 0x17AAE8; // type:func JumpJlo = 0x17AB98; // type:func HandleJloMessage = 0x17ACB0; // type:func SetJloJlos = 0x17AD78; // type:func ActivateJlo = 0x17B010; // type:func DeactivateJlo = 0x17B020; // type:func InitJloc = 0x17B030; // type:func LoadJlocFromBrx = 0x17B0B8; // type:func PostJlocLoad = 0x17B120; // type:func PxfmChooseJloc = 0x17B160; // type:func GetJlocParams = 0x17B298; // type:func InitJlovol = 0x17B300; // type:func BindJlovol = 0x17B340; // type:func HandleJlovolMessage = 0x17B3E0; // type:func StartupJoy = 0x17B480; // type:func AddGrfusr = 0x17B4D0; // type:func RemoveGrfusr = 0x17B500; // type:func UpdateGrfjoytFromGrfusr = 0x17B538; // type:func InitJoy = 0x17B590; // type:func UpdateJoy = 0x17B650; // type:func SetJoyJoys = 0x17BAE8; // type:func GetJoyXYDeflection = 0x17BBF8; // type:func FReadJoy = 0x17BE00; // type:func SetJoyBtnHandled = 0x17C020; // type:func TriggerJoyRumbleRumk = 0x17C038; // type:func EnableJoyRumble = 0x17C080; // type:func StartJoySelection = 0x17C0E8; // type:func DxSelectionJoy = 0x17C0F8; // type:func DySelectionJoy = 0x17C2C0; // type:func UBtnpJoy = 0x17C488; // type:func AddCode = 0x17C508; // type:func _ResetCodes = 0x17C578; // type:func _MatchCodes = 0x17C5B8; // type:func UpdateCodes = 0x17C660; // type:func AddFcht = 0x17C7A0; // type:func LoadLevel = 0x17C7E8; // type:func StartupCodes = 0x17C8D0; // type:func InitJt = 0x17CA10; // type:func LoadJtFromBrx = 0x17CBA0; // type:func PostJtLoad = 0x17CC18; // type:func PresetJtAccelBase = 0x17D1B0; // type:func PresetJtAccel = 0x17D628; // type:func AdjustJtNewXp = 0x17D858; // type:func AdjustJtDz = 0x17D958; // type:func HandleJtGrfjtsc = 0x17DA00; // type:func UpdateJtInternalXps = 0x17DAA8; // type:func FCheckJtXpBase = 0x17DC08; // type:func AdjustJtXpVelocity = 0x17DCA0; // type:func HandleJtMessage = 0x17DDE8; // type:func FTurnJtToTarget = 0x17E688; // type:func UpdateJtBalance = 0x17E760; // type:func RebuildJtXmg = 0x17ECA8; // type:func FMatchJtXmg = 0x17EF60; // type:func UpdateJtStand = 0x17F0E8; // type:func ThrowJt = 0x17F270; // type:func UnhookJt = 0x17F338; // type:func CalculateJtToolSpin = 0x17F3D0; // type:func RenderJtAll = 0x17F510; // type:func RenderJtSelf = 0x17F888; // type:func UpdateJtTool = 0x17FCC8; // type:func AdjustJtXps = 0x17FDC0; // type:func UpdateJtPosWorldPrev = 0x1801B8; // type:func ProjectJtTransform = 0x1801E8; // type:func UpdateJtBounds = 0x1802A0; // type:func PsoGetJtEffect = 0x180320; // type:func AddJtCustomXps = 0x180400; // type:func CtTorqueJt = 0x180598; // type:func GetJtCpdefi = 0x1805C0; // type:func GetJtCpdefiFlatten = 0x180C88; // type:func UpdateJtActive = 0x180FF0; // type:func UpdateJt = 0x181E70; // type:func UpdateJtDrive = 0x182918; // type:func ChooseJtPhys = 0x182A38; // type:func EnableJtActadj = 0x182B70; // type:func SetJtJts = 0x182C68; // type:func ProfileJt = 0x184DA0; // type:func SetJtPuppet = 0x184DB0; // type:func PaloAbsorbWkr = 0x184E48; // type:func NCmpWkr = 0x184F78; // type:func UpdateJtEffect = 0x184FA0; // type:func FIsJtSoundBase = 0x185400; // type:func CollectJtPrize = 0x185458; // type:func GetJtDiapi = 0x185568; // type:func PlayJtDialog = 0x185658; // type:func InitJp = 0x1856F0; // type:func PostJpLoad = 0x185750; // type:func PresetJpAccel = 0x1857E0; // type:func UpdateJp = 0x185B38; // type:func UpdateJpActive = 0x185F18; // type:func RenderJpSelf = 0x186610; // type:func UseJpCharm = 0x1866B0; // type:func OnJpActive = 0x186700; // type:func RenderJpAll = 0x1867B8; // type:func FInvulnerableJp = 0x186A38; // type:func ApplyJpThrow = 0x186A80; // type:func FTakeJpDamage = 0x186B88; // type:func AdjustJpXps = 0x186D00; // type:func HandleJpMessage = 0x186EB8; // type:func JthsCurrentJp = 0x186F28; // type:func SetJpJps = 0x186F38; // type:func InitJsg = 0x187100; // type:func GetJsgLocation = 0x187140; // type:func SetJsgFocus = 0x187330; // type:func SetJsgTn = 0x1873E0; // type:func NextJsgJsge = 0x1874B0; // type:func FIsJsgJsgeComplete = 0x187BD0; // type:func UpdateJsgJsge = 0x187DA0; // type:func ReadJsgJoystick = 0x187E78; // type:func FIsJsgActive = 0x188158; // type:func ClearJsg = 0x188198; // type:func ApplyJsg = 0x1881D8; // type:func RetractJsg = 0x188230; // type:func PjsgeAllocJsg = 0x1882F0; // type:func AddJsgContext = 0x188390; // type:func AddJsgCut = 0x1883C0; // type:func AddJsgFocus = 0x1883F0; // type:func AddJsgLabel = 0x188420; // type:func AddJsgTunnel = 0x188450; // type:func AddJsgPause = 0x188480; // type:func AddJsgAseg = 0x1884C0; // type:func AddJsgJump = 0x1884F0; // type:func AddJsgRun = 0x188540; // type:func AddJsgClimb = 0x188580; // type:func AddJsgAttack = 0x1885C0; // type:func AddJsgClock = 0x1885F8; // type:func PresetJtAccelJump = 0x188638; // type:func UpdateJtActiveJump = 0x188A10; // type:func FCheckJtSingleEdge = 0x189168; // type:func FCheckJtEdgeNormal = 0x189310; // type:func FCheckJtEdgeGrab = 0x189540; // type:func PxpFindJtBestEdge = 0x189910; // type:func JtsResetJt = 0x189C30; // type:func HandleJtDiveEffect = 0x189C70; // type:func UpdateJtJump = 0x18A2C8; // type:func FTimeJtJumpToTarget = 0x18AC40; // type:func GetJtJumpVelocity = 0x18AD10; // type:func GetJtJumpToTargetVelocity = 0x18ADE0; // type:func GetJtJumpBoostVelocity = 0x18AE60; // type:func StartupJmt = 0x18AEE0; // type:func ResetJmtList = 0x18AF10; // type:func OnJmtAdd = 0x18AF38; // type:func OnJmtRemove = 0x18AF80; // type:func CloneJmt = 0x18AFC8; // type:func PostJmtLoad = 0x18B018; // type:func InitKeyhole = 0x18B070; // type:func LoadKeyholeFromBrx = 0x18B0A8; // type:func DrawKeyholeMask = 0x18B340; // type:func DrawKeyhole = 0x18B610; // type:func __static_initialization_and_destruction_08 = 0x18C0F8; // type:func _GLOBAL_$I$InitKeyhole__FP7KEYHOLE = 0x18C150; // type:func OnLandingAdd = 0x18C178; // type:func OnLandingRemove = 0x18C1C0; // type:func CloneLanding = 0x18C208; // type:func InitLgn = 0x18C258; // type:func PostLgnLoad = 0x18C290; // type:func UpdateLgnActive = 0x18C370; // type:func UpdateLgn = 0x18C7B0; // type:func OnLgnActive = 0x18C9E0; // type:func RenderLgnAll = 0x18CA80; // type:func GetLgnCpdefi = 0x18CCE8; // type:func FInvulnerableLgn = 0x18CD30; // type:func JthsCurrentLgn = 0x18CD68; // type:func UseLgnCharm = 0x18CD78; // type:func ApplyLgnThrow = 0x18CDC8; // type:func FTakeLgnDamage = 0x18CE88; // type:func HandleLgnMessage = 0x18D000; // type:func AdjustLgnXps = 0x18D078; // type:func SetLgnLgns = 0x18D220; // type:func UpdateLgnrAim = 0x18D330; // type:func DrawLgnr = 0x18D5D0; // type:func InitSwp = 0x18D858; // type:func PostSwpLoad = 0x18D8C8; // type:func UpdateSwp = 0x18D930; // type:func ProjectSwpTransform = 0x18DB38; // type:func SetSwpShape = 0x18DD50; // type:func InitLgnb = 0x18E098; // type:func PostLgnbLoad = 0x18E0F0; // type:func UpdateLgnb = 0x18E168; // type:func PresetLgnbAccel = 0x18E2E0; // type:func FAbsorbLgnbWkr = 0x18E7E8; // type:func AttackLgnb = 0x18EB10; // type:func GetLgnbAttacking = 0x18EC38; // type:func InitLo = 0x18ECE0; // type:func PostLoLoad = 0x18ED20; // type:func AddLo = 0x18ED50; // type:func AddLoHierarchy = 0x18EDE8; // type:func OnLoAdd = 0x18EE30; // type:func RemoveLo = 0x18EE38; // type:func DeferLoRemove = 0x18EEE0; // type:func SetLoSuckHideLimits = 0x18EF48; // type:func RemoveLoHierarchy = 0x18EF98; // type:func OnLoRemove = 0x18EFE0; // type:func SnipLo = 0x18EFE8; // type:func FFindLoParent = 0x18F058; // type:func SetLoParent = 0x18F090; // type:func FIsLoInWorld = 0x18F0E0; // type:func GetLoInWorld = 0x18F150; // type:func PloCloneLo = 0x18F188; // type:func CloneLoHierarchy = 0x18F1E8; // type:func CloneLo = 0x18F210; // type:func SubscribeSwPpmqStruct = 0x18F380; // type:func UnsubscribeSwPpmqStruct = 0x18F3D8; // type:func SubscribeLoStruct = 0x18F438; // type:func UnsubscribeLoStruct = 0x18F470; // type:func SubscribeLoObject = 0x18F4A8; // type:func UnsubscribeLoObject = 0x18F4E0; // type:func SendLoMessage = 0x18F518; // type:func LoadLoFromBrx = 0x18F598; // type:func FMatchesLoName = 0x18F5C0; // type:func OidProxyLo = 0x18F608; // type:func OidProxyLoPreferred = 0x18F628; // type:func GetLoOidProxy = 0x18F648; // type:func PchzProxyLoPreferred = 0x18F680; // type:func PostSpliceEventCallback = 0x18F6A0; // type:func FFilterSpliceEvent = 0x18F8E8; // type:func HandleLoSpliceEvent = 0x18FA68; // type:func EnsureLoSidebagBool = 0x18FBF0; // type:func EnsureLoSidebagInt = 0x18FC90; // type:func EnsureLoSidebagFloat = 0x18FD30; // type:func EnsureLoSidebagClq = 0x18FDD8; // type:func EnsureLoSidebagLm = 0x18FE90; // type:func EnsureLoSidebagOid = 0x18FF50; // type:func EnsureLoSidebagVector = 0x18FFF0; // type:func PchzFromLo = 0x1900A8; // type:func InitLight = 0x1900E0; // type:func UpdateLightXfWorldHierarchy = 0x190198; // type:func RemoveLightFromSw = 0x1901E8; // type:func AddLightToSw = 0x190230; // type:func OnLightAdd = 0x190280; // type:func OnLightRemove = 0x1902C0; // type:func CloneLight = 0x190300; // type:func FitLinearFunction = 0x1903B8; // type:func FitRecipFunction = 0x190460; // type:func ConvertFallOff = 0x190540; // type:func ConvertAngleStrength = 0x190580; // type:func InvalidateLight = 0x190658; // type:func RebuildLightVifs = 0x190678; // type:func SetLightKind = 0x190CA8; // type:func SetLightHighlightColor = 0x190D18; // type:func SetLightMidtoneStrength = 0x190D48; // type:func SetLightShadowStrength = 0x190D70; // type:func SetLightHighlightAngle = 0x190D98; // type:func SetLightMidtoneAngle = 0x190DC0; // type:func SetLightShadowAngle = 0x190DE8; // type:func SetLightDirection = 0x190E10; // type:func SetLightDynamic = 0x190ED0; // type:func SetLightFallOff = 0x190F00; // type:func SetLightConeAngle = 0x190F50; // type:func SetLightHotSpotAngle = 0x190FA0; // type:func SetLightFrustrumUp = 0x190FE0; // type:func RebuildLightFrustrum = 0x191028; // type:func UpdateLightBeamGrfzon = 0x191120; // type:func SetLightDiffuse_Old = 0x1912B0; // type:func GetLightDiffuse_Old = 0x191300; // type:func SetLightSaturate_Old = 0x191310; // type:func GetLightSaturate_Old = 0x191358; // type:func GetLightParams = 0x191380; // type:func NCmpFindLight = 0x191410; // type:func PrepareSwLightsForDraw = 0x191480; // type:func TwpsFindSwLightsNoVu0 = 0x191838; // type:func TwpsFindSwLights = 0x191A28; // type:func InitActla = 0x191C50; // type:func SetActlaTarget = 0x191CE8; // type:func PaloGetActlaTarget = 0x191D00; // type:func UpdateActla = 0x191D38; // type:func GetActlaRotationGoal = 0x191DE8; // type:func main = 0x192030; // type:func StartupSif = 0x192270; // type:func StartupVU0 = 0x1924B0; // type:func StartupVU1 = 0x192538; // type:func ExecuteReset = 0x1925C0; // type:func StartupReset = 0x192648; // type:func ClearReset = 0x1926F0; // type:func iCheckReset = 0x1926F8; // type:func Startup = 0x192770; // type:func Shutdown = 0x192908; // type:func PtriFindMap = 0x192B90; // type:func PvFromMapIpos = 0x192C08; // type:func PvecFromMapIpos = 0x192C20; // type:func ReportXPs = 0x192C80; // type:func MuFromAmtlk = 0x192C90; // type:func ElasFromAmtlk = 0x192D18; // type:func PxpAdd = 0x192D98; // type:func RecalcSwXpPos = 0x192FF8; // type:func RecalcSwXpMovement = 0x193168; // type:func FreeSwXpList = 0x1932C8; // type:func FindClosestPointOnLine = 0x193328; // type:func FindClosestPointOnLineSegment = 0x193420; // type:func ClsgClipSoAllEdges = 0x193550; // type:func ClsgClipSoBspEdges = 0x193670; // type:func CategorizeAlsg = 0x1938E0; // type:func CplsgFindEdgePath = 0x193B90; // type:func MarkSoContactsBspBsp = 0x193CC8; // type:func CsbiIntersectSphereBsp = 0x194250; // type:func MarkSoContactsSphereBsp = 0x1949E0; // type:func MarkSoContactsSphereSphere = 0x194AC0; // type:func CalculateCenterContact = 0x194BA0; // type:func FMarkSoContactsCenterBsp = 0x194C68; // type:func FClipEdgeToSphere = 0x194D60; // type:func FMarkSoContactsCenterSphere = 0x194EE0; // type:func AddSoXps = 0x194FB0; // type:func PxpMarkSwContactsRoot = 0x195330; // type:func MATRIX4__PostCopyMatrix3 = 0x1955A0; // type:func MATRIX4__operatorEQ = 0x1955C0; // type:func MatMulMatTransMat = 0x195608; // type:func LoadIdentityMatrix4 = 0x1956C8; // type:func operatorSTAR1 = 0x195718; // type:func operatorSTAR2 = 0x195758; // type:func MultiplyMatrix4Vector = 0x1957F0; // type:func operatorSTAR3 = 0x195830; // type:func TransposeMatrix4 = 0x195860; // type:func AddMatrix4Matrix4 = 0x195900; // type:func LoadRotateMatrixRad = 0x195938; // type:func LoadRotateMatrix = 0x195A68; // type:func LoadRotateMatrixEuler = 0x195B18; // type:func LoadMatrixFromPosRot = 0x195C10; // type:func LoadMatrixFromPosRotInverse = 0x195C50; // type:func LoadMatrixFromPosRotScale = 0x195D18; // type:func CosRotateMatrixMagnitude = 0x195DF0; // type:func DecomposeRotateMatrixRad = 0x195E40; // type:func DecomposeRotateMatrixEuler = 0x196200; // type:func NormalizeRotateMatrix3 = 0x1962F0; // type:func CalculateDmat = 0x1963A0; // type:func CalculateDmat4 = 0x196410; // type:func DecomposeRotateMatrixPanTilt = 0x196490; // type:func LoadRotateMatrixPanTilt = 0x196510; // type:func LoadLookAtMatrix = 0x1965D0; // type:func TiltMatUpright = 0x196600; // type:func LoadSquishStretchMatrix = 0x1966C0; // type:func FInvertMatrix = 0x196870; // type:func FInvertMatrix3 = 0x196C50; // type:func FInvertMatrix4 = 0x196F50; // type:func BuildOrthonormalMatrixY = 0x196F80; // type:func BuildOrthonormalMatrixZ = 0x197098; // type:func BuildRotateVectorsMatrix = 0x1971B0; // type:func BuildSimpleProjectionMatrix = 0x1973E0; // type:func LoadScaleMatrixScalar = 0x197498; // type:func LoadScaleMatrixVector = 0x1974D8; // type:func LoadRotateVectorMatrix = 0x197620; // type:func InitMecha = 0x197848; // type:func PostMechaLoad = 0x197898; // type:func PresetMechaAccel = 0x197948; // type:func UpdateMecha = 0x197C08; // type:func UpdateMechaActive = 0x197CC8; // type:func RenderMechaSelf = 0x198228; // type:func HandleMechaMessage = 0x198318; // type:func PsoGetMechaEffect = 0x198380; // type:func UpdateMechaEffect = 0x1983E0; // type:func AddMechaCustomXps = 0x198628; // type:func ChooseStepAttackTarget = 0x198740; // type:func SetMechaMechas = 0x1989E0; // type:func InitMbg = 0x198C78; // type:func LoadMbgFromBrx = 0x198CB0; // type:func PostMbgLoad = 0x198D50; // type:func PsoHitTestCylinderObjects = 0x198DC0; // type:func FFilterMbgAttackObjects = 0x198F38; // type:func FObstructedMbg = 0x198FD0; // type:func FIgnoreMbgIntersection = 0x199088; // type:func FCanMbgAttack = 0x199118; // type:func FDetectMbg = 0x199260; // type:func OnMbgEnteringSgs = 0x1992D0; // type:func UpdateMbgGoal = 0x199370; // type:func UpdateMbgSgs = 0x1993E8; // type:func OnMbgExitingSgs = 0x199670; // type:func HandleMbgMessage = 0x1996B0; // type:func SetMbgMbsk = 0x199820; // type:func InitScentmap = 0x199840; // type:func LookupScentmap = 0x199878; // type:func PostScentmapLoad = 0x199928; // type:func PscpFindScentmap = 0x199B60; // type:func UpdateScentmap = 0x199D40; // type:func InitBhg = 0x199DC0; // type:func PostBhgLoad = 0x199E00; // type:func SgsNextBhgAI = 0x199E50; // type:func OnBhgEnteringSgs = 0x199E78; // type:func UpdateBhgSgs = 0x199EA0; // type:func StartupMemcard = 0x199EC8; // type:func StartupMemMgr = 0x199ED0; // type:func PvAllocGlobalImpl = 0x199F58; // type:func HardLockError = 0x199FA0; // type:func CheckForOutOfMemory = 0x19A148; // type:func PvAllocSwImpl = 0x19A1C0; // type:func FreeSw = 0x19A218; // type:func PvAllocSwCopyImpl = 0x19A230; // type:func PvAllocSwClearImpl = 0x19A298; // type:func InitStackImpl = 0x19A2F0; // type:func PvAllocStackImpl = 0x19A348; // type:func PvAllocStackClearImpl = 0x19A3A0; // type:func FreeStackImpl = 0x19A3F8; // type:func malloc = 0x19A450; // type:func _malloc_r = 0x19A458; // type:func free = 0x19A460; // type:func __builtin_new = 0x19A468; // type:func __builtin_delete = 0x19A490; // type:func CopyAqw = 0x19A498; // type:func CopyAb = 0x19A518; // type:func PushMenu = 0x19A610; // type:func PopMenu = 0x19A6B0; // type:func SetCurMenu = 0x19A830; // type:func ToggleBool = 0x19AB00; // type:func DrawDebugmenu = 0x19AB20; // type:func SetMainMenu = 0x19B338; // type:func DismissDebugmenu = 0x19B418; // type:func UpdateDebugmenuActive = 0x19B460; // type:func OnDebugmenuActive = 0x19BEF0; // type:func OnDebugmenuReset = 0x19C0D0; // type:func ShowBrxWorlds = 0x19C100; // type:func SetMusic = 0x19C260; // type:func SgnCompareMiName = 0x19C288; // type:func ShowMusic = 0x19C2B0; // type:func ShowWarpPositions = 0x19C3A8; // type:func TeleportPlayerGSwnd = 0x19C550; // type:func FAddClassObjectMenuItem = 0x19C600; // type:func PmiClassObjects = 0x19C6A0; // type:func RemoveClassObjects = 0x19C778; // type:func ShowClassObjects = 0x19C818; // type:func NoParams = 0x19C950; // type:func ShowParams = 0x19C958; // type:func RecalcMenu = 0x19CCF0; // type:func ToggleRumbleEnabled = 0x19CD50; // type:func CkeyGetCkeyMaxGameworld = 0x19CD98; // type:func RefreshGwkmlText = 0x19CDE0; // type:func ShowKeys = 0x19CE60; // type:func ShowLevelKeys = 0x19CFF8; // type:func CollectWorldKeys = 0x19D0F0; // type:func ToggleCollectKey = 0x19D218; // type:func EnsureCurrentKey = 0x19D2D8; // type:func VisitAllWorlds = 0x19D688; // type:func CSpliceVarAccessor__CSpliceVarAccessor = 0x19D6C0; // type:func CSpliceVarAccessor__~CSpliceVarAccessor = 0x19D750; // type:func CSpliceVarAccessor__Init = 0x19D7B8; // type:func CSpliceVarAccessor__Retrieve = 0x19D898; // type:func CSpliceVarAccessor__Draw = 0x19D968; // type:func CSpliceVarAccessor__Commit = 0x19DE18; // type:func CSpliceVarAccessor__Rollback = 0x19DF70; // type:func CSpliceVarAccessor__Reset = 0x19DF98; // type:func CSpliceVarAccessor__Adjust = 0x19E048; // type:func CSpliceVarAccessor__FHasChanged = 0x19E160; // type:func CSpliceVarAccessor__FLiveEditable = 0x19E290; // type:func CSpliceVarAccessor__PvVarOwner = 0x19E2A0; // type:func CSpliceVarAccessor__OnPopMenu = 0x19E2A8; // type:func CSpliceVarAccessor__GGetRef = 0x19E2D0; // type:func CSpliceVarAccessor__GGet = 0x19E340; // type:func CSpliceVarAccessor__SetGRef = 0x19E378; // type:func CSpliceVarAccessor__SetG = 0x19E510; // type:func CSpliceVarAccessor__GConstrain = 0x19E550; // type:func __static_initialization_and_destruction_09 = 0x19E6B0; // type:func CSpliceVarAccessor__IComponent = 0x19E7A0; // type:func _GLOBAL_$I$PushMenu__FP4BLOTP2MIiiiPcii = 0x19E7A8; // type:func _GLOBAL_$D$PushMenu__FP4BLOTP2MIiiiPcii = 0x19E7D0; // type:func InitMissile = 0x19E7F8; // type:func LoadMissileFromBrx = 0x19E830; // type:func OnMissileRemove = 0x19E890; // type:func ProjectMissileTransform = 0x19E8D8; // type:func FireMissile = 0x19E970; // type:func RenderMissileAll = 0x19EA60; // type:func InitAccmiss = 0x19EBF0; // type:func FireAccmiss = 0x19EC30; // type:func PresetAccmissAccel = 0x19ECD0; // type:func InitTarmiss = 0x19ED60; // type:func UpdateTarmiss = 0x19EDC0; // type:func FireSplmiss = 0x19F018; // type:func ProjectSplmissTransform = 0x19F190; // type:func InitGroundmiss = 0x19F5A8; // type:func PresetGroundmissAccel = 0x19F5E8; // type:func InitMgv = 0x19F778; // type:func LoadMgvFromBrx = 0x19F7B8; // type:func OidTmblGoal = 0x19F800; // type:func PostMgvLoad = 0x19F850; // type:func UpdateMgvActive = 0x19F978; // type:func HandleMgvMessage = 0x19FA20; // type:func DamageMgv = 0x19FAA8; // type:func ScoreMgv = 0x19FB58; // type:func InitMgc = 0x19FC08; // type:func LoadMgcFromBrx = 0x19FC60; // type:func PostMgcLoad = 0x19FCA8; // type:func UpdateMgc = 0x19FD78; // type:func GenerateMgc = 0x19FFA0; // type:func HandleMgcMessage = 0x1A0088; // type:func ClearMgc = 0x1A0100; // type:func CQueueOutputIop__Init = 0x1A0210; // type:func CQueueOutputIop__Reset = 0x1A0240; // type:func CQueueOutputIop__CbWrite = 0x1A0260; // type:func CQueueOutputIop__CbSend = 0x1A0368; // type:func CQueueOutputIop__Update = 0x1A03F8; // type:func CQueueOutputIop__FAsyncDrain = 0x1A0488; // type:func CQueueOutputIpu__CbWrite = 0x1A0490; // type:func CQueueOutputIpu__FAsyncDrain = 0x1A0500; // type:func CMpegAudio__Init = 0x1A0508; // type:func CMpegAudio__Reset = 0x1A0668; // type:func CMpegAudio__Close = 0x1A06D8; // type:func CMpegAudio__FAccept = 0x1A0748; // type:func CMpegAudio__Update = 0x1A07F8; // type:func FMpegAcceptVideo = 0x1A08B8; // type:func FMpegAcceptAudio = 0x1A0900; // type:func FMpegDecodeVideo = 0x1A0930; // type:func FMpegDecoderIdle = 0x1A0A50; // type:func FMpegDecoderError = 0x1A0AD0; // type:func BuildMpegGifs = 0x1A0AD8; // type:func CMpeg__Set = 0x1A0D88; // type:func CMpeg__Execute = 0x1A0DA0; // type:func CMpeg__Start = 0x1A1020; // type:func CMpeg__Update = 0x1A11A0; // type:func CMpeg__Finish = 0x1A15A8; // type:func CMpeg__CbDemuxed = 0x1A16D8; // type:func PlayMovie = 0x1A17C0; // type:func __static_initialization_and_destruction_010 = 0x1A17F0; // type:func _GLOBAL_$I$g_mpeg = 0x1A1818; // type:func InitMrkv = 0x1A1840; // type:func RenderMsGlobset = 0x1A18A0; // type:func InitMurray = 0x1A1E08; // type:func PostMurrayLoad = 0x1A1E40; // type:func OnMurrayEnteringSgs = 0x1A1EA8; // type:func OnMurrayExitingSgs = 0x1A1EE0; // type:func UpdateMurrayGoal = 0x1A1F38; // type:func UpdateMurraySgs = 0x1A20A8; // type:func FAbsorbMurrayWkr = 0x1A2230; // type:func FDetectMurray = 0x1A22B0; // type:func FCanMurrayAttack = 0x1A2388; // type:func AddMurrayEnemy = 0x1A2390; // type:func SetMurrayPursueXfm = 0x1A23C0; // type:func SetMurrayPatrolXfm = 0x1A23C8; // type:func CollectMurrayPrize = 0x1A23D0; // type:func PcbspExtract = 0x1A2418; // type:func PcgtExtract = 0x1A2428; // type:func PcgtPointInCbspQuick = 0x1A2448; // type:func PcgtPointInCbspSafe = 0x1A2510; // type:func CbskFromG = 0x1A2648; // type:func ClsgClipEdgeToCbsp = 0x1A2690; // type:func FClipEdgeToCbsp = 0x1A2B08; // type:func IcgvFromPcgv = 0x1A2B88; // type:func FindPathAStar = 0x1A2B98; // type:func SimplifyApcgvNeighbor = 0x1A2E30; // type:func CposFindPath = 0x1A2FD8; // type:func FindClosestPointInCg = 0x1A3308; // type:func LoadPathzoneFromBrx = 0x1A3478; // type:func HookupCg = 0x1A3830; // type:func CposFindPathzonePath = 0x1A3958; // type:func FindPathzoneClosestPoint = 0x1A3980; // type:func ChoosePathzoneRandomPoint = 0x1A39B8; // type:func OnPathzoneAdd = 0x1A3BC8; // type:func OnPathzoneRemove = 0x1A3C10; // type:func ClonePathzone = 0x1A3C58; // type:func RenderPathzone = 0x1A3CA8; // type:func SetPhase = 0x1A3DD8; // type:func ClearPhase = 0x1A3E20; // type:func StartupPipe = 0x1A3E30; // type:func ResetPipeList = 0x1A3E60; // type:func InitPipe = 0x1A3E88; // type:func OnPipeAdd = 0x1A3ED0; // type:func OnPipeRemove = 0x1A3F18; // type:func ClonePipe = 0x1A3F60; // type:func SetPipeCameraOffset = 0x1A3FB0; // type:func LoadPntFromBrx = 0x1A3FC8; // type:func GetPntPos = 0x1A4020; // type:func SetPntParent = 0x1A4058; // type:func ApplyPntProxy = 0x1A40B0; // type:func InitPo = 0x1A40E0; // type:func ClonePo = 0x1A4130; // type:func HandlePoMessage = 0x1A4188; // type:func OnPoActive = 0x1A41E0; // type:func GetPoCpdefi = 0x1A4290; // type:func FIsPoSoundBase = 0x1A4330; // type:func MakePoActive = 0x1A4338; // type:func FInvulnerablePo = 0x1A4378; // type:func FTakePoDamage = 0x1A4380; // type:func JthsCurrentPo = 0x1A4388; // type:func CollectPoPrize = 0x1A4390; // type:func PpoCur = 0x1A4398; // type:func PpoStart = 0x1A43C8; // type:func _IppoFindPo = 0x1A4420; // type:func AddPoToList = 0x1A4468; // type:func RemovePoFromList = 0x1A4528; // type:func OnPoAdd = 0x1A45E0; // type:func OnPoRemove = 0x1A4620; // type:func SwitchToIppo = 0x1A4660; // type:func SetPoPlayable = 0x1A4770; // type:func SwitchToPo = 0x1A47C0; // type:func PpziCur = 0x1A47F8; // type:func GetPoDiapi = 0x1A4830; // type:func PlayPoDialog = 0x1A4840; // type:func UpdatePo = 0x1A4880; // type:func UsePoCharm = 0x1A4968; // type:func __static_initialization_and_destruction_011 = 0x1A4AF8; // type:func _GLOBAL_$I$InitPo__FP2PO = 0x1A4BE8; // type:func CProg__CProg = 0x1A4C10; // type:func CProg__Begin = 0x1A4C70; // type:func CProg__SetRemain = 0x1A4C88; // type:func CProg__End = 0x1A4D20; // type:func CProg__Draw = 0x1A4D38; // type:func AchzFromRespk = 0x1A5028; // type:func PostPromptLoad = 0x1A5040; // type:func OnPromptActive = 0x1A50C0; // type:func UpdatePromptActive = 0x1A5330; // type:func SetPrompt = 0x1A5530; // type:func SetPromptBlots = 0x1A5650; // type:func DrawPrompt = 0x1A56A8; // type:func SetPromptPrk = 0x1A5FC0; // type:func ExecutePrompt = 0x1A62A8; // type:func CancelPrompt = 0x1A65A8; // type:func __static_initialization_and_destruction_012 = 0x1A66A0; // type:func _GLOBAL_$I$AchzFromRespk__F5RESPK = 0x1A6730; // type:func InitProxy = 0x1A6758; // type:func LoadProxyFromBrx = 0x1A67A0; // type:func CloneProxy = 0x1A6C48; // type:func PostProxyLoad = 0x1A6D68; // type:func InitPuffer = 0x1A6DA8; // type:func LoadPufferFromBrx = 0x1A6E18; // type:func PostPufferLoad = 0x1A6E60; // type:func PresetPufferAccel = 0x1A6FC0; // type:func FFilterPuffer = 0x1A72E0; // type:func UpdatePuffer = 0x1A7350; // type:func PpufftChoosePuffer = 0x1A76A8; // type:func OnPufferActive = 0x1A7910; // type:func UpdatePufferActive = 0x1A79E8; // type:func AdjustPufferNewXp = 0x1A7DE8; // type:func AddPufferWaterAcceleration = 0x1A7E08; // type:func HandlePufferMessage = 0x1A8258; // type:func PostPuffcLoad = 0x1A82C0; // type:func PresetPuffcAccel = 0x1A8300; // type:func FDetectPuffc = 0x1A8528; // type:func UpdatePuffcGoal = 0x1A8530; // type:func OnPuffcExitingSgs = 0x1A85E8; // type:func OnPuffcEnteringSgs = 0x1A8668; // type:func UpdatePuffcSgs = 0x1A8748; // type:func HandlePuffcMessage = 0x1A8828; // type:func UpdatePuffc = 0x1A88A8; // type:func FCanPuffcAttack = 0x1A8980; // type:func PostPuffbLoad = 0x1A89F8; // type:func UpdatePuffb = 0x1A8B88; // type:func PpuffvChoosePuffb = 0x1A8DD8; // type:func LandPuffb = 0x1A8F70; // type:func JumpPuffb = 0x1A8FB8; // type:func DiePuffb = 0x1A9000; // type:func IppathzoneFindPuffb = 0x1A9050; // type:func PostPufftLoad = 0x1A9090; // type:func InitPuffv = 0x1A9108; // type:func AddPuffvOidLand = 0x1A9140; // type:func PostPuffvLoad = 0x1A9168; // type:func InitSprize = 0x1A9250; // type:func LoadSprizeFromBrx = 0x1A9288; // type:func BindSprize = 0x1A9380; // type:func PostSprizeLoad = 0x1A9430; // type:func UpdateSprize = 0x1A9508; // type:func CollectSprize = 0x1A96D0; // type:func EmitSprizeExplosion = 0x1A9798; // type:func PcsFromSprize = 0x1A97D8; // type:func AddSprizeAseg = 0x1A9820; // type:func HandleSprizeMessage = 0x1A9840; // type:func FIgnoreSprizeIntersection = 0x1A9900; // type:func InitScprize = 0x1A9960; // type:func CloneScprize = 0x1A99A8; // type:func PcsFromScprize = 0x1A99E8; // type:func CollectScprize = 0x1A9A50; // type:func CollectLifetkn = 0x1A9A98; // type:func LoadLockFromBrx = 0x1A9B40; // type:func PostLockLoad = 0x1A9B88; // type:func LoadLockgFromBrx = 0x1A9BD0; // type:func PostLockgLoad = 0x1A9C18; // type:func SetLockgIndex = 0x1A9DC8; // type:func AddLockgLock = 0x1A9DE0; // type:func TriggerLockg = 0x1A9E08; // type:func InitClue = 0x1A9F58; // type:func LoadClueFromBrx = 0x1A9F98; // type:func CloneClue = 0x1AA070; // type:func PostClueLoad = 0x1AA0B0; // type:func OnClueSmack = 0x1AA1D0; // type:func CollectClue = 0x1AA330; // type:func BreakClue = 0x1AA408; // type:func CollectClueSilent = 0x1AA430; // type:func ImpactClue = 0x1AA540; // type:func FAbsorbClueWkr = 0x1AA568; // type:func RenderClueAll = 0x1AA608; // type:func CollectAllClues = 0x1AA830; // type:func SetGrfvault = 0x1AA8F0; // type:func OpenVaultCheat = 0x1AA900; // type:func ToggleGrfvault = 0x1AA938; // type:func InitVault = 0x1AA950; // type:func PostTmblLoad = 0x1AA988; // type:func PostVaultLoad = 0x1AAA08; // type:func OnVaultActive = 0x1AAC28; // type:func UpdateVaultActive = 0x1AAD80; // type:func HandleVaultMessage = 0x1AB2F0; // type:func AddVaultGoadDialog = 0x1AB478; // type:func OpenVault = 0x1AB4B0; // type:func OnRailAdd = 0x1AB6E8; // type:func OnRailRemove = 0x1AB730; // type:func CloneRail = 0x1AB778; // type:func InitRat = 0x1AB7C8; // type:func LoadRatFromBrx = 0x1AB840; // type:func PostRatLoad = 0x1AB960; // type:func OnRatAdd = 0x1AB9D0; // type:func OnRatRemove = 0x1ABA18; // type:func CloneRat = 0x1ABA60; // type:func PresetRatAccel = 0x1ABAB0; // type:func UpdateRat = 0x1ABBB8; // type:func AdjustRatNewXp = 0x1AC3D8; // type:func AdjustRatXpVelocity = 0x1AC458; // type:func RenderRatAll = 0x1AC508; // type:func FAbsorbRatWkr = 0x1AC6D8; // type:func ChooseRatFleeTarget = 0x1AC758; // type:func HideRat = 0x1AC978; // type:func SetRatRats = 0x1ACB08; // type:func GetRatParams = 0x1ACD68; // type:func OnRatholeAdd = 0x1ACDD0; // type:func OnRatholeRemove = 0x1ACE18; // type:func InitRchm = 0x1ACE60; // type:func LoadRchmFromBrx = 0x1ACE98; // type:func PostRchmLoad = 0x1AD1B8; // type:func ReblendRchm = 0x1AD4D8; // type:func BuildRchmCoefficients = 0x1AD728; // type:func ConvertRchmIposToRclIoLhub = 0x1AD8A8; // type:func IposConvertRchmRclIoLhub = 0x1AD940; // type:func SetRchmNaturalCoefficients = 0x1AD970; // type:func SetRchmCenterCoefficients = 0x1AD980; // type:func RenderRchmGrid = 0x1AD998; // type:func PredictRchmTargetPos = 0x1ADE60; // type:func PredictRchmTargetLocalPos = 0x1ADED8; // type:func PtwrMapRchmSafe = 0x1ADF90; // type:func FindRchmClosestPoint = 0x1AE118; // type:func FChooseJtReachTarget = 0x1AE300; // type:func TrackJtTarget = 0x1AE768; // type:func TrackJtPipe = 0x1AE810; // type:func SubmitRpl = 0x1AE908; // type:func NCmpPrplReverseZ = 0x1AE978; // type:func CprplPartitionArpl = 0x1AE9C8; // type:func RenderSw = 0x1AEBE0; // type:func EnsureRenderGlobals = 0x1AEE80; // type:func EnsureCameraGlobals = 0x1AEF78; // type:func EnsureScreenCleared = 0x1AEFB8; // type:func SetupRpDynamicTexture = 0x1AF0B8; // type:func SetupRpBackground = 0x1AF0F0; // type:func SetupRpBlotContext = 0x1AF198; // type:func SetupRpGlob = 0x1AF1F8; // type:func SetupRpBlip = 0x1AF260; // type:func SetupRpWorldMap = 0x1AF2C8; // type:func DrawSw = 0x1AF358; // type:func FillScreenRect = 0x1AF498; // type:func StartupRender = 0x1AF668; // type:func PripgNew = 0x1AF898; // type:func InitRipg = 0x1AF910; // type:func SetRipgEmitb = 0x1AF9B8; // type:func OnRipgRemove = 0x1AF9C8; // type:func ProjectRipgTransform = 0x1AFA98; // type:func UpdateRipgBounds = 0x1AFC90; // type:func UpdateRipg = 0x1AFC98; // type:func BounceRipgRips = 0x1AFE08; // type:func RenderRipgSelf = 0x1B0128; // type:func PvtripFromRipt = 0x1B01E8; // type:func PripNewRipg = 0x1B0358; // type:func InitRip = 0x1B0438; // type:func RemoveRip = 0x1B04F8; // type:func AddRipRef = 0x1B0540; // type:func ReleaseRip = 0x1B0550; // type:func TouchRip = 0x1B0618; // type:func ForceRipFade = 0x1B0640; // type:func FBounceRip = 0x1B0698; // type:func ProjectRipTransform = 0x1B0D08; // type:func UpdateRip = 0x1B0EF8; // type:func FRenderRipPosMat = 0x1B0FD0; // type:func RenderRip = 0x1B1230; // type:func SubscribeRipObject = 0x1B12D8; // type:func SubscribeRipStruct = 0x1B1310; // type:func UnsubscribeRipStruct = 0x1B1350; // type:func InitDroplet = 0x1B1390; // type:func TouchDroplet = 0x1B13E0; // type:func InitBublet = 0x1B14C0; // type:func ProjectBubletTransform = 0x1B1538; // type:func TouchBublet = 0x1B1748; // type:func InitRipple = 0x1B1770; // type:func InitPuff = 0x1B17E0; // type:func InitDablet = 0x1B1838; // type:func InitFlake = 0x1B1890; // type:func UpdateFlake = 0x1B18D8; // type:func RenderFlake = 0x1B19B8; // type:func TouchFlake = 0x1B1AC8; // type:func InitSpark = 0x1B1AF0; // type:func RenderSpark = 0x1B1B58; // type:func InitBurst = 0x1B1C80; // type:func InitTrail = 0x1B1D48; // type:func OnTrailRemove = 0x1B1E30; // type:func SetTrailTrls = 0x1B1E58; // type:func DetachTrail = 0x1B1FD0; // type:func ProjectTrailTransform = 0x1B2128; // type:func RenderTrail = 0x1B22B0; // type:func HandleTrailMessage = 0x1B24C8; // type:func InitFireball = 0x1B2548; // type:func UpdateFireball = 0x1B2620; // type:func InitSmokecloud = 0x1B26D8; // type:func InitSmoketrail = 0x1B2760; // type:func InitDebris = 0x1B2838; // type:func InitSmack = 0x1B2888; // type:func ProjectSmackTransform = 0x1B2970; // type:func RenderSmack = 0x1B2A10; // type:func UpdateSmack = 0x1B2BD0; // type:func InitOrbit = 0x1B2C30; // type:func ProjectOrbitTransform = 0x1B2C80; // type:func UpdateOrbit = 0x1B2E10; // type:func RenderOrbit = 0x1B2FF8; // type:func InitRay = 0x1B3078; // type:func InitRose = 0x1B30C8; // type:func ProjectRoseTransform = 0x1B3110; // type:func UpdateRose = 0x1B3118; // type:func RenderRose = 0x1B3260; // type:func SetRoseRoses = 0x1B3AA0; // type:func SgnCmpHp = 0x1B3BC8; // type:func ChpBuildConvexHullScreen = 0x1B3BF0; // type:func ChpBuildConvexHullXY = 0x1B3D48; // type:func PostFlyingEmit = 0x1B3FC8; // type:func RenderFlying = 0x1B3FD8; // type:func CreateStuck = 0x1B4040; // type:func FBounceFlying = 0x1B42E0; // type:func UpdateStuck = 0x1B43D0; // type:func RenderStuck = 0x1B4430; // type:func PostLeafEmit = 0x1B44C0; // type:func ProjectLeafTransform = 0x1B4598; // type:func FBounceLeaf = 0x1B47F8; // type:func FFilterFlameObjects = 0x1B48D0; // type:func PostFlameEmit = 0x1B4900; // type:func PostBulletEmit = 0x1B4B30; // type:func RenderBullet = 0x1B4B90; // type:func FBounceBullet = 0x1B4C88; // type:func PostShrapnelEmit = 0x1B4E50; // type:func FBounceShrapnel = 0x1B4F88; // type:func RenderShrapnel = 0x1B5010; // type:func InitGlint = 0x1B5068; // type:func RenderGlint = 0x1B50D0; // type:func InitMatch = 0x1B5440; // type:func LaunchMatch = 0x1B54A0; // type:func ProjectMatchTransform = 0x1B55F8; // type:func UpdateMatch = 0x1B57D0; // type:func RenderMatch = 0x1B5880; // type:func PostRemitEmit = 0x1B58C0; // type:func UpdateRemit = 0x1B5918; // type:func InitRov = 0x1B59E8; // type:func LoadRovFromBrx = 0x1B5A30; // type:func PostRovLoad = 0x1B5A78; // type:func UpdateRovActive = 0x1B5BA0; // type:func UpdateRov = 0x1B5CD8; // type:func ReadRovJoystick = 0x1B5F30; // type:func RovsNextRov = 0x1B5FE0; // type:func SetRovRovs = 0x1B6070; // type:func RovtsNextRov = 0x1B62A0; // type:func SetRovRovts = 0x1B6310; // type:func HandleRovMessage = 0x1B6428; // type:func PresetRovAccel = 0x1B6568; // type:func AdjustRovXpVelocity = 0x1B65D0; // type:func AdjustRovNewXp = 0x1B6658; // type:func PropagateRovForce = 0x1B66B8; // type:func FIsRovSoundBase = 0x1B67D0; // type:func GetRovParams = 0x1B67D8; // type:func InitRob = 0x1B6840; // type:func SetRobCollectible = 0x1B69A0; // type:func SetRobHarvester = 0x1B69A8; // type:func SetRobVehicle = 0x1B69B0; // type:func SetRobPrize = 0x1B69B8; // type:func AddRobSpawnTunnel = 0x1B69C0; // type:func RobkCur = 0x1B69E0; // type:func BindRob = 0x1B6A08; // type:func PostRobLoad = 0x1B6CC8; // type:func UpdateRob = 0x1B6E00; // type:func RobsNextRob = 0x1B6F38; // type:func SetRobRobs = 0x1B7080; // type:func AddRobRoc = 0x1B7320; // type:func AddRobRoh = 0x1B7760; // type:func AdjustRobDifficulty = 0x1B7A10; // type:func DestroyedRobRoc = 0x1B7DE8; // type:func SpawnedRobRoh = 0x1B7F30; // type:func GrabbedRobRoh = 0x1B7FA0; // type:func DroppedRobRoh = 0x1B8070; // type:func ReturnedRobRoh = 0x1B8100; // type:func ExitedRobRoh = 0x1B8128; // type:func KilledRobRoh = 0x1B82E8; // type:func FChooseRobRoc = 0x1B8440; // type:func TakeRobRoc = 0x1B8530; // type:func FChooseRobRoh = 0x1B8638; // type:func FChooseRobReturnPoint = 0x1B8740; // type:func ChooseRobWanderLocation = 0x1B8828; // type:func ProddCurRob = 0x1B88C8; // type:func GetRobParams = 0x1B88E0; // type:func InitRoh = 0x1B8948; // type:func LoadRohFromBrx = 0x1B89B8; // type:func CloneRoh = 0x1B8A18; // type:func PostRohLoad = 0x1B8A68; // type:func UpdateRoh = 0x1B8AB8; // type:func MoveRohToTarget = 0x1B8CB8; // type:func RohsNextRoh = 0x1B8F58; // type:func SetRohRohs = 0x1B9178; // type:func FAbsorbRohWkr = 0x1B93A0; // type:func ProcContactRoh = 0x1B94E0; // type:func GetRohParams = 0x1B9550; // type:func InitRoc = 0x1B95B8; // type:func LoadRocFromBrx = 0x1B9648; // type:func CloneRoc = 0x1B96A8; // type:func PostRocLoad = 0x1B96F8; // type:func UpdateRoc = 0x1B97A8; // type:func PresetRocAccel = 0x1B98E0; // type:func AdjustRocNewXp = 0x1B9958; // type:func FAbsorbRocWkr = 0x1B9978; // type:func RocsNextRoc = 0x1B9B00; // type:func SetRocRocs = 0x1B9B60; // type:func GetRocParams = 0x1B9C18; // type:func InitRost = 0x1B9C80; // type:func LoadRostFromBrx = 0x1B9CB8; // type:func CloneRost = 0x1B9D00; // type:func PostRostLoad = 0x1B9D50; // type:func UpdateRost = 0x1B9DF0; // type:func RostsNextRost = 0x1B9E58; // type:func SetRostRosts = 0x1B9E60; // type:func GetRostParams = 0x1B9ED8; // type:func InitRop = 0x1B9F38; // type:func LoadRopFromBrx = 0x1B9F90; // type:func PostRopLoad = 0x1B9FF0; // type:func UpdateRop = 0x1BA070; // type:func SetRopRops = 0x1BA230; // type:func RopsNextRop = 0x1BA348; // type:func InitRope = 0x1BA3C8; // type:func PostRopeLoad = 0x1BA420; // type:func SMinimizeRope = 0x1BA4F0; // type:func DrawRope = 0x1BA570; // type:func RenderRopeAll = 0x1BABB8; // type:func InitRumble = 0x1BAC80; // type:func UpdateRumble = 0x1BACF8; // type:func TriggerRumbleRumk = 0x1BAE78; // type:func TriggerRumbleRumpat = 0x1BAEB0; // type:func SetRumbleRums = 0x1BAF18; // type:func StopRumbleActuators = 0x1BAFD0; // type:func InitRwm = 0x1BB008; // type:func AddRwmRwc = 0x1BB120; // type:func InitRwmCallback = 0x1BB150; // type:func PostRwmLoad = 0x1BB318; // type:func PrwcFindRwm = 0x1BB498; // type:func EnableRwmRwc = 0x1BB500; // type:func DisableRwmRwc = 0x1BB538; // type:func ResizeRwmRwc = 0x1BB568; // type:func FIsRwmAmmo = 0x1BB5B0; // type:func FAvailableRwmAmmo = 0x1BB630; // type:func CycleRwmCache = 0x1BB6C8; // type:func ReloadRwm = 0x1BB7F0; // type:func FEnsureRwmLoaded = 0x1BB910; // type:func FFireRwm = 0x1BB958; // type:func ClearRwmFireInfo = 0x1BC1B8; // type:func ClearRwmTargetInfo = 0x1BC210; // type:func ClearRwmAimConstraints = 0x1BC278; // type:func GetRwfiPosMat = 0x1BC2A8; // type:func GetRwtiPos = 0x1BC390; // type:func GetRwacPan = 0x1BC518; // type:func GetRwacTilt = 0x1BC5A0; // type:func StartupSampler = 0x1BC620; // type:func CSampler__Startup = 0x1BC648; // type:func CSampler__Update = 0x1BC710; // type:func CSampler__OnMovieFinished = 0x1BC848; // type:func CSampler__Shutdown = 0x1BC8A0; // type:func SolveAloSpline = 0x1BC978; // type:func StartupScreen = 0x1BD378; // type:func PostBlotsLoad = 0x1BD610; // type:func UpdateBlots = 0x1BD688; // type:func ForceHideBlots = 0x1BD720; // type:func DrawBrightnessBar = 0x1BD780; // type:func DrawPlayerSuck = 0x1BD898; // type:func ResetBlots = 0x1BDB60; // type:func RenderBlots = 0x1BDBB0; // type:func DrawBlots = 0x1BDC18; // type:func InitBlot = 0x1BDCC0; // type:func PostBlotLoad = 0x1BDD40; // type:func UpdateBlot = 0x1BDD70; // type:func SetBlotAchzDraw = 0x1BDFD0; // type:func SetBlotFontScale = 0x1BE0B8; // type:func DrawBlot = 0x1BE0C0; // type:func DrawBlotRect = 0x1BE200; // type:func DtAppearBlot = 0x1BE2C8; // type:func DtVisibleBlot = 0x1BE2D0; // type:func DtDisappearBlot = 0x1BE2D8; // type:func SetBlotDtAppear = 0x1BE2E0; // type:func SetBlotDtVisible = 0x1BE2E8; // type:func SetBlotDtDisappear = 0x1BE2F0; // type:func OnBlotReset = 0x1BE2F8; // type:func ShowBlot = 0x1BE320; // type:func HideBlot = 0x1BE388; // type:func SetBlotBlots = 0x1BE3C8; // type:func FIncludeBlotForPeg = 0x1BE500; // type:func ResizeBlot = 0x1BE558; // type:func RepositionBlot = 0x1BE5A0; // type:func RepositionBlotDependents = 0x1BE910; // type:func SetBlotClock = 0x1BE9C0; // type:func PostCtrLoad = 0x1BE9F0; // type:func UpdateCtr = 0x1BEAE8; // type:func DrawCtr = 0x1BEC58; // type:func RebuildCtrAchzDraw = 0x1BEFE8; // type:func DtVisibleCtr = 0x1BF240; // type:func PostTimerLoad = 0x1BF268; // type:func UpdateTimer = 0x1BF2D8; // type:func DrawTimer = 0x1BF398; // type:func SetTimer = 0x1BF560; // type:func SetTimerSpeed = 0x1BF600; // type:func SetTimerThreshold = 0x1BF608; // type:func SetTimerExpire = 0x1BF618; // type:func StartTimer = 0x1BF628; // type:func StopTimer = 0x1BF650; // type:func RebuildTimerAchzDraw = 0x1BF680; // type:func SetTimerTimers = 0x1BFB80; // type:func DtVisibleTrunkctr = 0x1BFBA0; // type:func DtVisibleCrusherctr = 0x1BFBB0; // type:func DtVisiblePuffchargectr = 0x1BFBC0; // type:func PostBossctrLoad = 0x1BFBD0; // type:func DrawBossctr = 0x1BFC88; // type:func PostNoteLoad = 0x1C0068; // type:func SetNoteAchzDraw = 0x1C00D8; // type:func DrawNote = 0x1C01D0; // type:func PostTitleLoad = 0x1C03A0; // type:func SetTitleAchzDraw = 0x1C0420; // type:func SetTitleBlots = 0x1C0488; // type:func FIncludeTitleForPeg = 0x1C04E8; // type:func DrawTitle = 0x1C0540; // type:func PostTotalsLoad = 0x1C0870; // type:func FormatTotalsGrfls = 0x1C0928; // type:func SetTotalsGrfls = 0x1C0A28; // type:func SetTotalsBlots = 0x1C0A90; // type:func DrawTotals = 0x1C0AF0; // type:func PostCallLoad = 0x1C0BE8; // type:func DrawCall = 0x1C0C58; // type:func ToggleLetterbox = 0x1C0E40; // type:func DrawLetterbox = 0x1C0E88; // type:func PostScoresLoad = 0x1C1010; // type:func UpdateScores = 0x1C1060; // type:func DrawScores = 0x1C1140; // type:func PostLogoLoad = 0x1C1280; // type:func DrawLogo = 0x1C1358; // type:func PostAttractLoad = 0x1C1598; // type:func SetAttractAchzDraw = 0x1C1648; // type:func SetAttractBlots = 0x1C1708; // type:func UpdateAttract = 0x1C17B0; // type:func DrawAttract = 0x1C1830; // type:func DrawLineScreen = 0x1C1998; // type:func __static_initialization_and_destruction_013 = 0x1C1B08; // type:func _GLOBAL_$I$g_lifectr = 0x1C1CF8; // type:func InitSensor = 0x1C1D20; // type:func GetSensorParams = 0x1C1D58; // type:func SetSensorAlarm = 0x1C1DC0; // type:func SetSensorSensors = 0x1C1DC8; // type:func FCheckSensorObject = 0x1C1E68; // type:func FIgnoreSensorObject = 0x1C1F58; // type:func FOnlySensorTriggerObject = 0x1C2028; // type:func PauseSensor = 0x1C2098; // type:func UpdateSensor = 0x1C20F8; // type:func AddSensorTriggerObject = 0x1C2160; // type:func AddSensorNoTriggerObject = 0x1C2188; // type:func AddSensorTriggerClass = 0x1C21B0; // type:func AddSensorNoTriggerClass = 0x1C21D8; // type:func InitLasen = 0x1C2200; // type:func LoadLasenFromBrx = 0x1C2238; // type:func BindLasen = 0x1C2280; // type:func PostLasenLoad = 0x1C2570; // type:func UpdateBusyLasenSenseTimes = 0x1C26E8; // type:func UpdateLasen = 0x1C27A8; // type:func FreezeLasen = 0x1C2998; // type:func RenderLasenSelf = 0x1C2A28; // type:func GetLasenParams = 0x1C2D40; // type:func FFilterLasen = 0x1C2DA8; // type:func SenseLasen = 0x1C2E20; // type:func EnableLasen = 0x1C33A8; // type:func DisableLasen = 0x1C33E0; // type:func OnLasenAlarmTriggered = 0x1C3420; // type:func SetLasenSensors = 0x1C3470; // type:func SCalcLasenShapeExtent = 0x1C3650; // type:func RetractLasen = 0x1C3760; // type:func ExtendLasen = 0x1C3778; // type:func InitCamsen = 0x1C3790; // type:func PostCamsenLoad = 0x1C37C8; // type:func UpdateCamsen = 0x1C3888; // type:func RenderCamsenSelf = 0x1C3B60; // type:func FIgnoreCamsenIntersection = 0x1C3F28; // type:func GetCamsenParams = 0x1C3F30; // type:func FFilterCamsen = 0x1C3F98; // type:func SenseCamsen = 0x1C4030; // type:func EnableCamsen = 0x1C4310; // type:func DisableCamsen = 0x1C4348; // type:func OnCamsenAlarmTriggered = 0x1C43D8; // type:func SetCamsenSensors = 0x1C4428; // type:func SetCamsenCsdts = 0x1C44F0; // type:func InitPrsen = 0x1C45E0; // type:func PostPrsenLoad = 0x1C4630; // type:func UpdatePrsen = 0x1C46D0; // type:func GetPrsenParams = 0x1C48E0; // type:func SensePrsen = 0x1C4948; // type:func EnablePrsen = 0x1C4B00; // type:func DisablePrsen = 0x1C4B38; // type:func OnPrsenAlarmTriggered = 0x1C4BC8; // type:func SetPrsenSensors = 0x1C4C40; // type:func UpdatePrsenLoopShader = 0x1C4DE8; // type:func InitShadow = 0x1C5020; // type:func PostShadowLoad = 0x1C5090; // type:func InvalidateShadowVifs = 0x1C5170; // type:func RebuildShadowRegion = 0x1C5178; // type:func SetShadowShader = 0x1C5280; // type:func FShadowRadiusSet = 0x1C52D0; // type:func SetShadowNearRadius = 0x1C5308; // type:func SetShadowFarRadius = 0x1C5348; // type:func SetShadowCastPosition = 0x1C5388; // type:func SetShadowCastNormal = 0x1C5490; // type:func SetShadowNearCast = 0x1C5598; // type:func SetShadowFarCast = 0x1C55D8; // type:func SetShadowConeAngle = 0x1C5618; // type:func SetShadowFrustrumUp = 0x1C5680; // type:func FShadowValid = 0x1C56B0; // type:func FFilterFastShadows = 0x1C5738; // type:func UpdateShadow = 0x1C5760; // type:func RebuildShadowVifs = 0x1C59B0; // type:func DrawShadow = 0x1C5D08; // type:func FShadowIntersectsSphere = 0x1C5DC0; // type:func FindSwShadows = 0x1C5E58; // type:func InitShape = 0x1C5F10; // type:func RenderShape = 0x1C5F58; // type:func LoadShapeFromBrx = 0x1C6020; // type:func SetShapeParent = 0x1C60A0; // type:func Tex0FromTexIframeCtk = 0x1C6198; // type:func PackTexGifs = 0x1C61F0; // type:func LoadClutFromBrx = 0x1C6380; // type:func LoadColorTablesFromBrx = 0x1C63E0; // type:func LoadBmpFromBrx = 0x1C6508; // type:func LoadBitmapsFromBrx = 0x1C6560; // type:func LoadFontsFromBrx = 0x1C6680; // type:func LoadTexFromBrx = 0x1C6808; // type:func LoadShadersFromBrx = 0x1C6978; // type:func UploadPermShaders = 0x1C6E10; // type:func PropagateShaders = 0x1C6E58; // type:func FillShaders = 0x1C6F10; // type:func UnloadShaders = 0x1C7D40; // type:func ConvertRgbToHsv = 0x1C7E10; // type:func ConvertHsvToRgb = 0x1C7FB8; // type:func ConvertUserHsvToUserRgb = 0x1C8210; // type:func ConvertUserRgbToUserHsv = 0x1C8298; // type:func PshdFindShader = 0x1C8328; // type:func SetSaiIframe = 0x1C8380; // type:func SetSaiDuDv = 0x1C83F0; // type:func PropagateSais = 0x1C8460; // type:func UpdateShaders = 0x1C8530; // type:func CbFromSaak = 0x1C85E8; // type:func PvtsaaFromSaak = 0x1C8648; // type:func PsaaLoadFromBrx = 0x1C86D8; // type:func InitSaa = 0x1C8790; // type:func PostSaaLoad = 0x1C87C0; // type:func FUpdatableSaa = 0x1C8800; // type:func UCompleteSaa = 0x1C8830; // type:func PsaiFromSaaShd = 0x1C8840; // type:func InitLoop = 0x1C8860; // type:func PostLoopLoad = 0x1C88C8; // type:func UpdateLoop = 0x1C8940; // type:func UCompleteLoop = 0x1C8A40; // type:func InitPingpong = 0x1C8A70; // type:func PostPingpongLoad = 0x1C8AD8; // type:func UpdatePingpong = 0x1C8B58; // type:func UCompletePingpong = 0x1C8C70; // type:func InitShuffle = 0x1C8CD8; // type:func UpdateShuffle = 0x1C8D20; // type:func InitHologram = 0x1C8DD8; // type:func PostHologramLoad = 0x1C8E90; // type:func NotifyHologramRender = 0x1C8EF0; // type:func InitScroller = 0x1C8FA8; // type:func UpdateScroller = 0x1C9028; // type:func UCompleteScroller = 0x1C90D0; // type:func SetScrollerMasterSpeeds = 0x1C9150; // type:func InitCircler = 0x1C9160; // type:func UpdateCircler = 0x1C91D0; // type:func UCompleteCircler = 0x1C9270; // type:func InitLooker = 0x1C92C0; // type:func SetLookerSgvr = 0x1C9360; // type:func SetVecPosad = 0x1C9380; // type:func SetUvPuvqd = 0x1C93A0; // type:func NotifyLookerRender = 0x1C93B8; // type:func PostSkyLoad = 0x1C9990; // type:func UpdateSky = 0x1C99D0; // type:func FUN_001c9a20 = 0x1C9A20; // type:func _InitSlotheap = 0x1C9A30; // type:func CreateSlotheapSw = 0x1C9A88; // type:func CreateSlotheapSwAlign64 = 0x1C9AF8; // type:func PvAllocSlotheapUnsafe = 0x1C9B78; // type:func PvAllocSlotheapImpl = 0x1C9BA0; // type:func PvAllocSlotheapClearImpl = 0x1C9BC8; // type:func FreeSlotheapPv = 0x1C9C20; // type:func LoadSmFromBrx = 0x1C9C50; // type:func PostSmLoad = 0x1C9F38; // type:func PostSmLoadCallback = 0x1C9F90; // type:func PsmaApplySm = 0x1CA038; // type:func PsmaFindSm = 0x1CA168; // type:func IsmsFindSmOptional = 0x1CA1A0; // type:func IsmsFindSmRequired = 0x1CA1D8; // type:func OidFromSmIsms = 0x1CA208; // type:func RetractSma = 0x1CA220; // type:func SetSmaGoal = 0x1CA2F0; // type:func GetSmaGoal = 0x1CA398; // type:func GetSmaCur = 0x1CA3C8; // type:func GetSmaNext = 0x1CA3F8; // type:func SetSmaSvt = 0x1CA428; // type:func SeekSma = 0x1CA458; // type:func ChooseSmaTransition = 0x1CA4E8; // type:func EndSmaTransition = 0x1CAB28; // type:func HandleSmaMessage = 0x1CAB70; // type:func SkipSma = 0x1CABC8; // type:func SendSmaMessage = 0x1CAC78; // type:func NotifySmaSpliceOnEnterState = 0x1CACF8; // type:func InitSmartguard = 0x1CADA0; // type:func PostSmartguardLoadFlashlight = 0x1CAE30; // type:func UseSmartguardFlashlightTarget = 0x1CAF78; // type:func PostSmartguardLoad = 0x1CAFD0; // type:func FFilterSmartguardDetect = 0x1CB030; // type:func FDetectSmartguard = 0x1CB078; // type:func UpdateSmartguard = 0x1CB480; // type:func UpdateSmartguardFlashlight = 0x1CB4C0; // type:func OnSmartguardEnteringSgs = 0x1CB6E0; // type:func FCanSmartguardAttack = 0x1CB778; // type:func SgasGetSmartguard = 0x1CB858; // type:func HandleSmartguardMessage = 0x1CB8B8; // type:func FreezeSmartguard = 0x1CB920; // type:func InitSo = 0x1CB970; // type:func OnSoAdd = 0x1CBAF8; // type:func OnSoRemove = 0x1CBC18; // type:func EnableSoPhys = 0x1CBD10; // type:func GetSoParams = 0x1CBDE8; // type:func DisplaceSo = 0x1CBE50; // type:func ImpactSo = 0x1CC0E0; // type:func PivotSo = 0x1CC2C0; // type:func ExtendSoBounds = 0x1CC5B0; // type:func UpdateSoBounds = 0x1CC6D0; // type:func UpdateGeomWorld = 0x1CC9B0; // type:func UpdateSoXfWorldHierarchy = 0x1CCAF0; // type:func UpdateSoXfWorld = 0x1CCB60; // type:func FIgnoreSoIntersection = 0x1CCBC8; // type:func UpdateSoImpacts = 0x1CCC08; // type:func UProjectVector = 0x1CCD10; // type:func AdjustSoXpLocal = 0x1CCD70; // type:func CalculateSoAngularEffectWorld = 0x1CD1F0; // type:func AccelSoTowardPosSpring = 0x1CD260; // type:func AccelSoTowardMatSpring = 0x1CD3B8; // type:func PresetSoAccel = 0x1CD560; // type:func DrawGeom = 0x1CD618; // type:func RenderSoSelf = 0x1CD700; // type:func UpdateSo = 0x1CD780; // type:func SetSoMass = 0x1CD7A8; // type:func AdjustSoMomint = 0x1CD7E0; // type:func DiscardSoXps = 0x1CD8A0; // type:func UpdateSoPosWorldPrev = 0x1CD920; // type:func TranslateSoToPos = 0x1CD930; // type:func RotateSoToMat = 0x1CDA90; // type:func TranslateSoToPosSafe = 0x1CDB10; // type:func SetSoVelocityVec = 0x1CDC00; // type:func SetSoAngularVelocityVec = 0x1CDCC0; // type:func AddSoAcceleration = 0x1CDD90; // type:func AddSoAngularAcceleration = 0x1CDDA8; // type:func SetSoConstraints = 0x1CDDC0; // type:func SetSoParent = 0x1CDE38; // type:func ApplySoProxy = 0x1CDF88; // type:func AccelSoTowardMatSmooth = 0x1CE028; // type:func GetSoCpdefi = 0x1CE280; // type:func FIsSoTouching = 0x1CE310; // type:func PsoFirstSoTouching = 0x1CE3E0; // type:func CloneSo = 0x1CE4C0; // type:func ApplySoConstraintWorld = 0x1CE6B0; // type:func ApplyConstr = 0x1CE7F8; // type:func ApplySoConstraintLocal = 0x1CE8C8; // type:func AddSoXa = 0x1CE8F8; // type:func RemoveSoXa = 0x1CE928; // type:func AddSoWaterAcceleration = 0x1CE990; // type:func AddSoExternalAccelerations = 0x1CF098; // type:func LoadSoFromBrx = 0x1CF0A0; // type:func SetSoSphere = 0x1CF538; // type:func SetSoNoInteract = 0x1CF558; // type:func ConstrFromCnstr = 0x1CF588; // type:func SetSoCnstrForce = 0x1CF5B8; // type:func SetSoCnstrTorque = 0x1CF638; // type:func SetSoCameraStyle = 0x1CF6B8; // type:func SetSoIgnoreLocked = 0x1CF6E8; // type:func SetSoIceable = 0x1CF720; // type:func SetSoMtlk = 0x1CF758; // type:func SetSoEdgeGrab = 0x1CF760; // type:func SendSoMessage = 0x1CF790; // type:func PxpFindSoGround = 0x1CF818; // type:func SetSoNoGravity = 0x1CF900; // type:func SetSoNoXpsAll = 0x1CF938; // type:func SetSoNoXpsSelf = 0x1CF968; // type:func SetSoNoXpsCenter = 0x1CF998; // type:func RebuildSoPhysHook = 0x1CF9C8; // type:func PsoFindSoPhysHook = 0x1CFA70; // type:func RecalcSoLocked = 0x1CFAB0; // type:func FGetSoContactList = 0x1CFC50; // type:func GetSoContacts = 0x1CFD60; // type:func FSoInStsoList = 0x1CFED0; // type:func GenerateSoSpliceTouchingEvents = 0x1CFF00; // type:func FInflictSoZap = 0x1D0190; // type:func EnsureSoLvo = 0x1D0198; // type:func ProjectSoLvo = 0x1D0448; // type:func ProjectSoTransform = 0x1D0618; // type:func ApplySoImpulse = 0x1D0680; // type:func CalculateSoTrajectoryApex = 0x1D0828; // type:func FAbsorbSoWkr = 0x1D08F0; // type:func CloneSoPhys = 0x1D0940; // type:func RenumberSo = 0x1D0B00; // type:func CalculateSoEffect = 0x1D0B98; // type:func PropagateSoForce = 0x1D0BC8; // type:func DistributeSoEffects = 0x1D0D38; // type:func SolveSwGroup = 0x1D10D0; // type:func CpxpBuildXpArray = 0x1D19C8; // type:func BuildContactGroup = 0x1D1AE8; // type:func SplitSoFreeze = 0x1D1C00; // type:func SortSwGroup = 0x1D1CF8; // type:func SplitSwGroup = 0x1D1EF0; // type:func SolveSw = 0x1D21E0; // type:func SwapEntries = 0x1D2588; // type:func HeapSort = 0x1D25C8; // type:func UnloadMusic = 0x1D2718; // type:func SbpEnsureBank = 0x1D2760; // type:func SbpEnsureBank1 = 0x1D29D8; // type:func NewSfx = 0x1D2A10; // type:func FContinuousSound = 0x1D2AA8; // type:func SetVagUnpaused = 0x1D2B20; // type:func PreloadVag = 0x1D2B30; // type:func FPauseForVag = 0x1D2C28; // type:func FVagPlaying = 0x1D2C78; // type:func StopVag = 0x1D2CA0; // type:func PauseVag = 0x1D2D28; // type:func ContinueVag = 0x1D2D58; // type:func KillMusic = 0x1D2D88; // type:func PreloadMusidSongComplete = 0x1D2DE0; // type:func PreloadMusidSong = 0x1D2E38; // type:func StartMusidSong = 0x1D2FA8; // type:func PauseMusic = 0x1D30B8; // type:func ContinueMusic = 0x1D30E0; // type:func PexcAlloc = 0x1D3110; // type:func RemoveExc = 0x1D3188; // type:func KillExcitement = 0x1D31E8; // type:func PexcSetExcitement = 0x1D32B0; // type:func SetIexcCurHigh = 0x1D3358; // type:func FBlockHyst = 0x1D3420; // type:func UnsetExcitement = 0x1D3440; // type:func UnsetExcitementHyst = 0x1D3508; // type:func StartupSound = 0x1D3570; // type:func FAmbientsPaused = 0x1D36C0; // type:func CalculateVolPan = 0x1D36D0; // type:func SDistEarZoom = 0x1D37B0; // type:func SDistEarNormal = 0x1D3868; // type:func PposEar = 0x1D38A0; // type:func SetDoppler = 0x1D3900; // type:func PfneardistGet = 0x1D3A70; // type:func SDistEar = 0x1D3AE0; // type:func CalculateDistVolPan = 0x1D3B30; // type:func PambAlloc = 0x1D3BD8; // type:func DropPamb = 0x1D3C50; // type:func RemoveAmb = 0x1D3C60; // type:func StopSound = 0x1D3CD0; // type:func SetPambFrq = 0x1D3D58; // type:func RefreshPambVolPan = 0x1D3E40; // type:func SetPambVol = 0x1D3EA8; // type:func FillPamb = 0x1D3EE8; // type:func ActivatePamb = 0x1D40C8; // type:func ScheduleNextIntermittentSound = 0x1D41E0; // type:func StartSound = 0x1D42E8; // type:func SoundStoppedCB = 0x1D45F0; // type:func HandleWipeVolumes = 0x1D4628; // type:func UpdateSounds = 0x1D4698; // type:func SetMvgkRvol = 0x1D4CD8; // type:func SetMvgkUvol = 0x1D4D10; // type:func UvolGetMvgk = 0x1D4D48; // type:func RvolGetMvgk = 0x1D4D80; // type:func KillSoundSystem = 0x1D4DC8; // type:func KillSounds = 0x1D4E58; // type:func PushSwReverb = 0x1D4F18; // type:func PopSwReverb = 0x1D4FC8; // type:func SetSwDefaultReverb = 0x1D5060; // type:func SetSwIntermittentSound = 0x1D50E8; // type:func SetSwIntermittentVolPct = 0x1D5150; // type:func SetSwIntermittentRepeat = 0x1D51A0; // type:func StartSwIntermittentSounds = 0x1D51D0; // type:func SetAMRegister = 0x1D52B8; // type:func HsNextFootFall = 0x1D5300; // type:func NextSneakyFootstep = 0x1D54D8; // type:func InitSpeaker = 0x1D5578; // type:func PostSpeakerLoad = 0x1D5640; // type:func SetSpeakerSmIdle = 0x1D5690; // type:func GetSpeakerParams = 0x1D5720; // type:func OnSpireAdd = 0x1D5778; // type:func OnSpireRemove = 0x1D57C0; // type:func CloneSpire = 0x1D5808; // type:func LoadSwSpliceFromBrx = 0x1D5858; // type:func PframeFromIsplice = 0x1D5C78; // type:func RefEvalModule = 0x1D5CD8; // type:func PeopidFind = 0x1D5E00; // type:func RefGetObjectList = 0x1D5E70; // type:func RefGetPeopid = 0x1D5F40; // type:func FAppendSpliceListElement = 0x1D6450; // type:func FSpliceListElementExists = 0x1D6528; // type:func RefSetPvsFromSplice = 0x1D6678; // type:func RefSetArgListFromPvs = 0x1D6930; // type:func RefSetPeopid = 0x1D6A38; // type:func RefGetOption = 0x1D6D40; // type:func RefSetOption = 0x1D6E08; // type:func RefAddOption = 0x1D6EA0; // type:func RefEnsureOption = 0x1D6F18; // type:func RefSetArgsFromSplice = 0x1D6FD0; // type:func LoadSprBuf = 0x1D7058; // type:func SaveSprBuf = 0x1D71E8; // type:func __static_initialization_and_destruction_014 = 0x1D73F8; // type:func _GLOBAL_$I$g_asprbuf = 0x1D7620; // type:func UpdateSqtrm = 0x1D7648; // type:func RenderSqtrm = 0x1D7C88; // type:func DrawSqtrm = 0x1D7D50; // type:func LoadSquishFromBrx = 0x1D8068; // type:func UpdateSquish = 0x1D8158; // type:func RenderSquishSelf = 0x1D8250; // type:func AdjustSquishNewXp = 0x1D8608; // type:func NotifySquishImpact = 0x1D8618; // type:func InitStep = 0x1D87A8; // type:func PostStepLoad = 0x1D8850; // type:func LimitStepHands = 0x1D88F0; // type:func RetractStepExtremity = 0x1D8990; // type:func RenderStepSelf = 0x1D8C90; // type:func ReadStepJoystick = 0x1D8DB0; // type:func UpdateStepFootfall = 0x1D8E50; // type:func UpdateStepPhys = 0x1D9028; // type:func SetStepPhys = 0x1D9170; // type:func UpdateStep = 0x1D92E8; // type:func CtTorqueStep = 0x1D9328; // type:func PropagateStepForce = 0x1D9330; // type:func RotateStepToMat = 0x1D93D0; // type:func CloneStepPhys = 0x1D9438; // type:func PresetStepAccel = 0x1D9580; // type:func PresetStepAccelBase = 0x1D95C0; // type:func FCheckStepXpBase = 0x1D96E8; // type:func AdjustStepNewXp = 0x1D97D8; // type:func AdjustStepDz = 0x1D9828; // type:func AdjustStepDzBase = 0x1D9850; // type:func UpdateStepMatTarget = 0x1D9858; // type:func AdjustStepXpVelocity = 0x1D9890; // type:func UpdateStepXfWorld = 0x1D98F0; // type:func AdjustStepXpVelocityBase = 0x1D99A0; // type:func AdjustStepXps = 0x1D9CB0; // type:func AddStepCustomXps = 0x1DA0E8; // type:func AddStepCustomXpsBase = 0x1DA110; // type:func FixStepAngularVelocity = 0x1DA270; // type:func PredictStepPosition = 0x1DA2E0; // type:func PredictStepRotation = 0x1DA308; // type:func SetStepSpinRatio = 0x1DA3B8; // type:func SetStepGravityRatio = 0x1DA410; // type:func GetStepParams = 0x1DA488; // type:func GetActaddPositionGoal = 0x1DA4C8; // type:func GetActaddRotationGoal = 0x1DA5D8; // type:func SetJtJtcs = 0x1DA7A0; // type:func UpdateJtCane = 0x1DADC8; // type:func UpdateJtActiveCane = 0x1DAE78; // type:func ChooseJtAttackTarget = 0x1DB028; // type:func ChooseJtSweepTarget = 0x1DB2C8; // type:func ChooseJtRushTarget = 0x1DB438; // type:func ChooseJtSmashTarget = 0x1DB4C0; // type:func InitStepguard = 0x1DB548; // type:func LoadStepguardFromBrx = 0x1DB720; // type:func CloneStepguard = 0x1DB788; // type:func BindStepguard = 0x1DB7E8; // type:func PostStepguardLoadCallback = 0x1DB8A0; // type:func PostStepguardLoad = 0x1DB8C8; // type:func FIgnoreStepguardIntersection = 0x1DBB08; // type:func OnStepguardAdd = 0x1DBB98; // type:func OnStepguardRemove = 0x1DBBE0; // type:func PresetStepguardAccel = 0x1DBC88; // type:func DradEnemyStepguard = 0x1DC1D0; // type:func SetStepguardTargetHeading = 0x1DC268; // type:func UpdateStepguardAI = 0x1DC2D0; // type:func UpdateStepguardDrive = 0x1DC340; // type:func UpdateStepguard = 0x1DC420; // type:func SgsNextStepguardAI = 0x1DC598; // type:func SetStepguardGoal = 0x1DC9C0; // type:func FReachedStepguardGoal = 0x1DCA70; // type:func FFilterStepguardJump = 0x1DCA98; // type:func MoveStepguardToGoal = 0x1DCB50; // type:func LookStepguardAtGoal = 0x1DD178; // type:func UpdateStepguardGoal = 0x1DD1D0; // type:func OnStepguardWaypointActive = 0x1DD360; // type:func UpdateStepguardSgs = 0x1DD430; // type:func SetStepguardSgs = 0x1DD558; // type:func SetStepguardSgsExternal = 0x1DD610; // type:func OnStepguardExitingSgs = 0x1DD648; // type:func OnStepguardEnteringSgs = 0x1DD830; // type:func SggsGetStepguard = 0x1DDD60; // type:func FAbsorbStepguardWkr = 0x1DDD80; // type:func FTakeStepguardDamage = 0x1DE050; // type:func HandleStepguardGrfsgsc = 0x1DE100; // type:func DoStepguardFreefallJump = 0x1DE1B0; // type:func DoStepguardFreefallLanding = 0x1DE3C8; // type:func HandleStepguardMessage = 0x1DE430; // type:func SgasGetStepguard = 0x1DE9F8; // type:func FCanStepguardAttack = 0x1DEA00; // type:func RenderStepguardSelf = 0x1DEB90; // type:func FValidSgs = 0x1DEDA8; // type:func UseStepguardAnimation = 0x1DEDB0; // type:func UseStepguardAnimationImmediate = 0x1DEE08; // type:func UseStepguardDeathAnimation = 0x1DEE90; // type:func PasegFindStepguard = 0x1DEEC8; // type:func LoadStepguardAnimations = 0x1DEF40; // type:func UseStepguardExpl = 0x1DF010; // type:func UseStepguardRwm = 0x1DF020; // type:func UseStepguardPhys = 0x1DF030; // type:func LoadStepguardPhys = 0x1DF088; // type:func AddStepguardEffect = 0x1DF120; // type:func SetStepguardPathzone = 0x1DF158; // type:func PsoEnemyStepguard = 0x1DF1D0; // type:func SetStepguardEnemyObject = 0x1DF2A0; // type:func RebindStepguardEnemy = 0x1DF2B0; // type:func AdjustStepguardNewXp = 0x1DF3D0; // type:func AdjustStepguardDz = 0x1DF450; // type:func SetStepguardAttackAngleMax = 0x1DF4E0; // type:func AddStepguardAlarm = 0x1DF4F8; // type:func MatchStepguardAnimationPhase = 0x1DF520; // type:func AddStepguardCustomXps = 0x1DF558; // type:func ApplyStepguardThrow = 0x1DF668; // type:func UpdateStepguardEffect = 0x1DF698; // type:func SetStepguardPatrolAnimation = 0x1DFA98; // type:func FInflictStepguardZap = 0x1DFB48; // type:func FDetectStepguard = 0x1DFB50; // type:func FCheckStepguardEnemyHidden = 0x1DFB58; // type:func PsggNew = 0x1DFD00; // type:func InitSgg = 0x1DFD70; // type:func AddSggGuard = 0x1DFDA8; // type:func AddSggGuardName = 0x1DFE10; // type:func AddSggSearchXfmName = 0x1DFE38; // type:func RemoveSggGuard = 0x1DFE60; // type:func BindSgg = 0x1DFF18; // type:func PostSggLoadCallback = 0x1E0050; // type:func EnsureSggCallback = 0x1E0288; // type:func PsoEnemySgg = 0x1E02E8; // type:func UpdateSggCallback = 0x1E0310; // type:func SggsNextSgg = 0x1E0390; // type:func FDetectSgg = 0x1E04D8; // type:func FAbandonSggSearch = 0x1E0580; // type:func EnsureSggAlarm = 0x1E0648; // type:func TriggerSggAlarms = 0x1E0698; // type:func SetSggSggs = 0x1E0718; // type:func AssignSggSearchPoints = 0x1E09A8; // type:func PostJtLoadSwing = 0x1E0D00; // type:func AnticipateJtForce = 0x1E0D90; // type:func CalculateJtHangAccel = 0x1E1150; // type:func PresetJtAccelHang = 0x1E1928; // type:func AddJtExternalAccelerations = 0x1E1A40; // type:func UpdateJtActiveHang = 0x1E1A90; // type:func CheckJtUnhook = 0x1E20D0; // type:func UpdateJtHookOx = 0x1E2200; // type:func AddJtHookXps = 0x1E22A0; // type:func GetJtHangHeading = 0x1E2588; // type:func UpdateJtIkHang = 0x1E25E0; // type:func JtbsChooseJtHide = 0x1E2840; // type:func MeasureJtJumpToTarget = 0x1E2C38; // type:func GetJtRailLanding = 0x1E2EC0; // type:func GMeasureJumpRail = 0x1E30D0; // type:func GMeasureJumpHshape = 0x1E3150; // type:func FFindJtObstruction = 0x1E31C0; // type:func JtbsChooseJtLanding = 0x1E32B0; // type:func UpdateJtActiveHide = 0x1E3A10; // type:func MatchJtXmgRail = 0x1E44D8; // type:func UpdateJtHide = 0x1E4610; // type:func UpdateJtInternalXpsHide = 0x1E4918; // type:func SetJtHfdk = 0x1E4C38; // type:func ResetJtDynamicTunnel = 0x1E4C98; // type:func PresetJtAccelHide = 0x1E4D08; // type:func PostJtLoadPipe = 0x1E4EB8; // type:func GetJtPipeGoalMat = 0x1E5018; // type:func PresetJtAccelPipe = 0x1E5410; // type:func UpdateJtActivePipe = 0x1E5560; // type:func UpdateJtInternalXpsPipe = 0x1E5C00; // type:func SetJtJtpdk = 0x1E5EE0; // type:func PlaceJtOnPipe = 0x1E5F58; // type:func SetFsp = 0x1E6118; // type:func UpdateJtActivePowerUp = 0x1E6238; // type:func IRotatePowerUp = 0x1E6560; // type:func PostStepLoadRun = 0x1E6630; // type:func CalculateBlrunV = 0x1E6950; // type:func ProjectStepRunPlant = 0x1E69A8; // type:func FIntersectStepRunPlant = 0x1E6AC8; // type:func FReblendAbl2D = 0x1E6BF8; // type:func AdjustStepRun = 0x1E6DA0; // type:func SetStepRunTarget = 0x1E70C8; // type:func PostJtLoadSidestep = 0x1E7190; // type:func AdjustJtSidestep = 0x1E73B0; // type:func SetJtSidestepTarget = 0x1E7708; // type:func PostJtLoadSki = 0x1E78C0; // type:func UpdateJtActiveSki = 0x1E7A70; // type:func ProjectJtTransformSki = 0x1E8830; // type:func EmitJtSkiParticles = 0x1E89A0; // type:func AddJtSpeedBoost = 0x1E8E28; // type:func PostJtLoadZap = 0x1E8E38; // type:func PresetJtAccelZap = 0x1E8EF0; // type:func UpdateJtZap = 0x1E90D8; // type:func PzqeAppendJt = 0x1E91A0; // type:func PopJtZqe = 0x1E9208; // type:func FTakeJtDamage = 0x1E9508; // type:func FInvulnerableJt = 0x1E9818; // type:func OnJtDead = 0x1E98F0; // type:func SgnCmpSpkn = 0x1E9990; // type:func DrawHaloSpks = 0x1E99B8; // type:func DrawJtHaloElectric = 0x1EA398; // type:func DrawJtHaloFire = 0x1EA4A8; // type:func RenderJtSelfZap = 0x1EA5D0; // type:func JthsCurrentJt = 0x1EA8B0; // type:func UseJtCharm = 0x1EA8E0; // type:func UpdateJtWater = 0x1EA998; // type:func FFindJtWaterSurface = 0x1EAD20; // type:func AddJtWaterAcceleration = 0x1EAE30; // type:func InitZpr = 0x1EAFF8; // type:func OSTRM__OSTRM = 0x1EB050; // type:func OSTRM__OSTRM1 = 0x1EB070; // type:func OSTRM__~OSTRM = 0x1EB098; // type:func OSTRM__CbWrite = 0x1EB0E8; // type:func OSTRM__Flush = 0x1EB248; // type:func InitSuv = 0x1EB368; // type:func PostSuvLoad = 0x1EB418; // type:func PresetSuvAccel = 0x1EB6B0; // type:func GExcludeAlm = 0x1EC240; // type:func UpdateSuvBalance = 0x1EC358; // type:func DsGetTrackRelative = 0x1EC550; // type:func FIsSuvAheadOf = 0x1EC598; // type:func UpdateSuvLine = 0x1EC628; // type:func UpdateSuvHeading = 0x1ECA78; // type:func UpdateSuvWheels = 0x1ECC48; // type:func UpdateSuvExpls = 0x1ECD10; // type:func BoostSuv = 0x1ED1C0; // type:func UpdateSuvVolumes = 0x1ED208; // type:func RampTo = 0x1ED5F8; // type:func SetSuvTargetFrq = 0x1ED670; // type:func SetSuvTargetVol = 0x1ED6D0; // type:func UpdateSuvSounds = 0x1ED730; // type:func UpdateSuvPuncher = 0x1EDC48; // type:func UpdateSuv = 0x1EDE58; // type:func UpdateSuvActive = 0x1EDF88; // type:func UpdateSuvInternalXps = 0x1EE470; // type:func AddSuvCustomXps = 0x1EE480; // type:func AdjustSuvNewXp = 0x1EE7B8; // type:func UpdateSuvInfluences = 0x1EE8B8; // type:func RenderSuvSelf = 0x1EEB18; // type:func UpdateSuvBounds = 0x1EED58; // type:func CollectSuvPrize = 0x1EEE10; // type:func UpdateSuvShapes = 0x1EEE98; // type:func UpdateSuvXfWorld = 0x1EEF88; // type:func GetSuvCpdefi = 0x1EEFC8; // type:func OnSuvActive = 0x1EEFF0; // type:func HandleSuvMessage = 0x1EF058; // type:func SetSuvTrack = 0x1EF108; // type:func SetSuvLine = 0x1EF238; // type:func AddSuvBoostOpportunity = 0x1EF280; // type:func AddSuvBoostCollect = 0x1EF2C0; // type:func AddSuvCheckPoint = 0x1EF300; // type:func AddSuvFeature = 0x1EF3E0; // type:func SetSuvSuvs = 0x1EF430; // type:func ResetSuv = 0x1EF498; // type:func VecCombo = 0x1EF770; // type:func InitSwDlHash = 0x1EF790; // type:func InitSw = 0x1EF7F0; // type:func DeleteSw = 0x1EFBA0; // type:func SetupBulkDataFromBrx = 0x1EFCC8; // type:func LoadBulkDataFromBrx = 0x1EFDF8; // type:func SetSwGravity = 0x1EFE60; // type:func FOverflowSwLo = 0x1EFE90; // type:func PxaAllocSw = 0x1EFEC0; // type:func FreeSwXaList = 0x1EFF10; // type:func PmqAllocSw = 0x1EFF70; // type:func FreeSwMqList = 0x1EFFC0; // type:func EnsureSwCallback = 0x1F0020; // type:func PostSwCallback = 0x1F0090; // type:func ClearSwCallbacks = 0x1F0110; // type:func ProcessSwCallbacks = 0x1F0220; // type:func ProcessSwSpliceScheduledCallbacks = 0x1F02B0; // type:func PstsoAllocSw = 0x1F0540; // type:func FreeSwStsoList = 0x1F0590; // type:func AddSwProxySource = 0x1F05F8; // type:func PloGetSwProxySource = 0x1F06C0; // type:func IntersectSwBoundingBox = 0x1F06F0; // type:func IntersectSwBoundingSphere = 0x1F0990; // type:func RemoveOxa = 0x1F0BD8; // type:func InitSwAoxa = 0x1F0C08; // type:func AddOxa = 0x1F0C80; // type:func PoxaAllocSw = 0x1F0CA0; // type:func FreeSwPoxa = 0x1F0D08; // type:func CreateSwDefaultLights = 0x1F0EC8; // type:func LoadNameTableFromBrx = 0x1F1310; // type:func LoadWorldTableFromBrx = 0x1F1458; // type:func CreateSwPrizes = 0x1F1510; // type:func LoadSwFromBrx = 0x1F1698; // type:func FClipLineHomogeneous = 0x1F1AC0; // type:func DrawLineWorld = 0x1F1C88; // type:func DrawAxesWorld = 0x1F1E10; // type:func DrawBezWorld = 0x1F1F68; // type:func GetSwParams = 0x1F2030; // type:func SetSwIllum = 0x1F2060; // type:func SetSwIllumShadow = 0x1F2078; // type:func SetSwExcitement = 0x1F2090; // type:func FLevelSwVisited = 0x1F2100; // type:func FLevelSwPrimary = 0x1F2128; // type:func FLevelSwSecondary = 0x1F2150; // type:func FLevelSwTertiary = 0x1F2178; // type:func SetSwPlayerSuck = 0x1F21A0; // type:func GetSwPlayerSuck = 0x1F21D8; // type:func IncrementSwHandsOff = 0x1F21F0; // type:func DecrementSwHandsOff = 0x1F2228; // type:func IsSwVagPlaying = 0x1F2260; // type:func SetSwDarken = 0x1F2290; // type:func SetSwDarkenSmooth = 0x1F22A0; // type:func CancelSwDialogPlaying = 0x1F22A8; // type:func InitTail = 0x1F22F0; // type:func PostTailLoad = 0x1F2330; // type:func UpdateTailConstraints = 0x1F24D8; // type:func MatchTailOtherObject = 0x1F2DF8; // type:func InitTank = 0x1F2E30; // type:func PostTankLoad = 0x1F2EB8; // type:func UpdateTank = 0x1F2FF0; // type:func UseTankCharm = 0x1F3220; // type:func UpdateTankActive = 0x1F3270; // type:func OnTankActive = 0x1F3A58; // type:func RenderTankAll = 0x1F3A98; // type:func ImpactTank = 0x1F3DE8; // type:func FInvulnerableTank = 0x1F3E70; // type:func ApplyTankThrow = 0x1F3EB8; // type:func FTakeTankDamage = 0x1F3FC0; // type:func AdjustTankXps = 0x1F4330; // type:func AdjustTankNewXp = 0x1F44E8; // type:func HandleTankMessage = 0x1F45B0; // type:func JthsCurrentTank = 0x1F4708; // type:func SetTankTanks = 0x1F4718; // type:func StartupTarget = 0x1F4948; // type:func ResetTargetList = 0x1F4978; // type:func InitTarget = 0x1F49A0; // type:func OnTargetAdd = 0x1F49E0; // type:func OnTargetRemove = 0x1F4A28; // type:func CloneTarget = 0x1F4A70; // type:func RenderTarget = 0x1F4AC0; // type:func CchParsePchzInt = 0x1F4B90; // type:func CchParsePchzTft = 0x1F4C18; // type:func WriteTftPchz = 0x1F4F88; // type:func FNegTftUl = 0x1F50F8; // type:func UnRadixFromChConversion = 0x1F51D8; // type:func CchAchFromUl = 0x1F5238; // type:func WriteTftUl = 0x1F5330; // type:func ExpFirstFromG = 0x1F5690; // type:func ChDigitFromG = 0x1F5770; // type:func CchAchFromDouble = 0x1F5870; // type:func WriteTftDouble = 0x1F5BE0; // type:func WriteTft = 0x1F5E80; // type:func CchOstrmPrintf = 0x1F62C8; // type:func vprintf = 0x1F6410; // type:func printf = 0x1F6488; // type:func vsprintf = 0x1F64D8; // type:func sprintf = 0x1F6568; // type:func _vsnprintf = 0x1F65B8; // type:func _snprintf = 0x1F6670; // type:func strlen = 0x1F66C0; // type:func strcpy = 0x1F66F8; // type:func strcat = 0x1F6750; // type:func strchr = 0x1F67C0; // type:func UpperizePchz = 0x1F6800; // type:func PchzDupSwCchImpl = 0x1F6850; // type:func SemaCreate = 0x1F68C0; // type:func ResetSema = 0x1F6920; // type:func InitCritSect = 0x1F69A0; // type:func EnterCritSect = 0x1F69E0; // type:func LeaveCritSect = 0x1F6A50; // type:func StartupThread = 0x1F6A98; // type:func PtnfnFromTn = 0x1F6B40; // type:func GetTnfnNose = 0x1F6B58; // type:func InitTn = 0x1F6C58; // type:func OnTnRemove = 0x1F6CF8; // type:func LoadTnFromBrx = 0x1F6D60; // type:func PostTnLoad = 0x1F6EB0; // type:func SetTnTns = 0x1F6ED8; // type:func UpdateTnCallback = 0x1F7100; // type:func UpdateTn = 0x1F7340; // type:func RenderTnSelf = 0x1F73A8; // type:func FreezeTn = 0x1F7478; // type:func SetTnFocusRatio = 0x1F74C8; // type:func CalculateTnCrv = 0x1F74E0; // type:func CalculateTnPos = 0x1F76F0; // type:func GetTnParams = 0x1F7990; // type:func ActivateCptn = 0x1F79F8; // type:func DeactivateCptn = 0x1F7B98; // type:func SetCptn = 0x1F7BA0; // type:func RevokeCptn = 0x1F7BA8; // type:func UpdateCptn = 0x1F7BB0; // type:func LoadTbspFromBrx = 0x1F8E00; // type:func FCheckTbspPoint = 0x1F8FC0; // type:func CTransition__CTransition = 0x1F9038; // type:func CTransition__Set = 0x1F9060; // type:func CTransition__Execute = 0x1F9088; // type:func ResetWorld = 0x1F9608; // type:func LoadBrxWorld = 0x1F96D8; // type:func __static_initialization_and_destruction_015 = 0x1F9700; // type:func _GLOBAL_$I$g_transition = 0x1F9738; // type:func PostTurretLoad = 0x1F9760; // type:func UpdateTurret = 0x1F9888; // type:func UpdateTurretActive = 0x1F9930; // type:func OnTurretActive = 0x1F9A40; // type:func FFilterTurret = 0x1F9BA0; // type:func UpdateTurretAim = 0x1F9C60; // type:func FireTurret = 0x1F9F98; // type:func HandleTurretMessage = 0x1FA028; // type:func FIgnoreTurretIntersection = 0x1FA0F8; // type:func CollectTurretPrize = 0x1FA160; // type:func GetTurretDiapi = 0x1FA1A8; // type:func InitTv = 0x1FA1B8; // type:func PostTvLoad = 0x1FA4F8; // type:func GetTvItvbMinMax = 0x1FA630; // type:func DrawTvArea = 0x1FA670; // type:func DrawTvBands = 0x1FA9F8; // type:func DrawTvOutline = 0x1FB070; // type:func DrawTv = 0x1FB848; // type:func SetTvTvs = 0x1FB900; // type:func AcceptTvSpeaker = 0x1FB920; // type:func SetTvTvgs = 0x1FB9B0; // type:func SetTvBlots = 0x1FBAF8; // type:func UpdateTv = 0x1FBBF8; // type:func RenderTv = 0x1FC0E0; // type:func PreTvContext = 0x1FC5A8; // type:func PostTvContext = 0x1FC948; // type:func SetTvSpeaker = 0x1FCCC8; // type:func SetTvReplace = 0x1FCDE0; // type:func OnTvReset = 0x1FCE30; // type:func __static_initialization_and_destruction_016 = 0x1FCE70; // type:func _GLOBAL_$I$RGBA_Distortion = 0x1FCEA8; // type:func PostUbvLoad = 0x1FCED0; // type:func UpdateUbv = 0x1FD000; // type:func SetUbvUbvs = 0x1FD160; // type:func PostUbpLoad = 0x1FD6A0; // type:func UpdateUbp = 0x1FD710; // type:func SetUbpUbps = 0x1FD7A8; // type:func CaptureUbpBomb = 0x1FDB28; // type:func DetonateUbpBomb = 0x1FDCC0; // type:func NotifyUbpImpact = 0x1FDD00; // type:func RenderUbpAll = 0x1FDD98; // type:func FIgnoreUbpIntersection = 0x1FDDC0; // type:func InitUbg = 0x1FDE00; // type:func PostUbgLoad = 0x1FDE80; // type:func PsoPadUbgClosest = 0x1FDF48; // type:func OnUbgEnteringSgs = 0x1FDFA8; // type:func SgsNextUbgAI = 0x1FE2D8; // type:func FDetectUbg = 0x1FE338; // type:func FCanUbgAttack = 0x1FE358; // type:func DoUbgFreefallJump = 0x1FE390; // type:func DoUbgFreefallLanding = 0x1FE3D8; // type:func UpdateUbgGoal = 0x1FE4B8; // type:func UpdateUbgSgs = 0x1FE588; // type:func FIgnoreUbgIntersection = 0x1FE638; // type:func StartupUi = 0x1FE690; // type:func InitUi = 0x1FE6B8; // type:func PostUiLoad = 0x1FE700; // type:func UpdateUi = 0x1FE728; // type:func PushUiActiveBlot = 0x1FEC28; // type:func PopUiActiveBlot = 0x1FECD0; // type:func DrawUiSplash = 0x1FED88; // type:func DrawUiSelf = 0x1FF218; // type:func DrawUi = 0x1FF248; // type:func RenderUi = 0x1FF280; // type:func ResetUi = 0x1FF2A8; // type:func SetUiUis = 0x1FF320; // type:func SetUiUPause = 0x1FF4D8; // type:func FDebugmenuActive = 0x1FF580; // type:func UpdateSwObjects = 0x1FF5B8; // type:func UpdateSwPosWorldPrev = 0x1FF800; // type:func UpdateSwRealClock = 0x1FF8B8; // type:func UpdateSwDarkening = 0x1FFAB0; // type:func UpdateSw = 0x1FFB20; // type:func FUN_001ffdf0 = 0x1FFDF0; // type:func RadNormalize = 0x1FFEF8; // type:func GLimitAbs = 0x1FFF78; // type:func GSmooth = 0x1FFFB0; // type:func GSmoothA = 0x200120; // type:func RadSmooth = 0x200230; // type:func RadSmoothA = 0x2002B8; // type:func PosSmooth = 0x200350; // type:func SmoothMatrix = 0x200458; // type:func NRandInRange = 0x2005D0; // type:func GRandInRange = 0x200648; // type:func GRandGaussian = 0x2006B8; // type:func FFloatsNear = 0x2007F0; // type:func CSolveQuadratic = 0x200828; // type:func PrescaleClq = 0x2008B8; // type:func CalculateSinCos = 0x200910; // type:func GTrunc = 0x200A00; // type:func GTrunc1 = 0x200AB8; // type:func GModPositive = 0x200B70; // type:func FitClq = 0x200BB0; // type:func FCheckLm = 0x200BE8; // type:func FCheckAlm = 0x200C18; // type:func GLimitLm = 0x200CA0; // type:func SgnCompareG = 0x200CD0; // type:func Force = 0x200D08; // type:func MinimizeRange = 0x200D10; // type:func SetVectorCylind = 0x201008; // type:func SetVectorSphere = 0x201070; // type:func SProjectVector = 0x201108; // type:func GetNormalVectors = 0x201150; // type:func GetNormalVector = 0x201210; // type:func RadBetweenVectors = 0x2012D8; // type:func FindClosestPointBetweenLines = 0x201460; // type:func FindClosestPointBetweenLineSegments = 0x2015E8; // type:func CalculateVectorPanTilt = 0x201798; // type:func ConvertDeulToW = 0x201840; // type:func FCalculateMuzzleVelocity = 0x201908; // type:func FCalculateMuzzleVelocitySpeed = 0x201AC8; // type:func FCalculateMuzzleVelocityAngle = 0x201C40; // type:func LimitVectorLength = 0x201C68; // type:func DMAI__DMAI = 0x201CD0; // type:func DMAI__EnsureQw = 0x201CF8; // type:func DMAI__FDone = 0x201E68; // type:func DMAI__AdvancePrplsCur = 0x201EB8; // type:func DMAI__GetBulk = 0x201EC0; // type:func DMAI__Skip = 0x201F28; // type:func DMAI__UnNext = 0x201F88; // type:func DMAI__UsNext = 0x202008; // type:func DMAI__BNext = 0x202080; // type:func DMAI__Align = 0x2020E8; // type:func VIFE__VIFE = 0x202150; // type:func VIFE__Emulate = 0x202190; // type:func VIFE__Mask = 0x202768; // type:func VIFE__EmulateUnpack = 0x2027E8; // type:func VIFE__EmulateClip = 0x202E10; // type:func VIFE__EmulateXgkick = 0x202EF0; // type:func VIFE__Nop = 0x203018; // type:func VIFE__NopCel = 0x203020; // type:func VIFE__SetupRgl = 0x203028; // type:func VIFE__SetupRglCel = 0x203080; // type:func VIFE__CopyRgl = 0x2030A8; // type:func VIFE__CopyRglCel = 0x203150; // type:func VIFE__DrawP0 = 0x203178; // type:func VIFE__DrawP12 = 0x203250; // type:func VIFE__DrawP12Force = 0x203278; // type:func VIFE__PostNidRgba = 0x2033D8; // type:func VIFE__ClearLightingToF32 = 0x203468; // type:func VIFE__ConvertLightingU8ToF32 = 0x203540; // type:func VIFE__AddDirectionLightAsF32 = 0x203700; // type:func VIFE__AddPositionLightAsF32 = 0x203908; // type:func VIFE__AddFrustrumLightAsF32 = 0x203BD0; // type:func VIFE__AddQuickLightAsF32 = 0x204038; // type:func VIFE__AddDirectionLightAsQuickF32 = 0x2043E0; // type:func VIFE__AddPositionLightAsQuickF32 = 0x204408; // type:func VIFE__AddFrustrumLightAsQuickF32 = 0x204518; // type:func VIFE__ConvertLightingF32ToU8 = 0x204768; // type:func VIFE__ProcessPrelit = 0x204A80; // type:func VIFE__ProcessPrelitClip = 0x204AA8; // type:func VIFE__ProcessThreeWayClip = 0x204DA8; // type:func VIFE__ProcessThreeWay = 0x205098; // type:func VIFE__ProcessVolume = 0x2050C0; // type:func VIFE__DrawVolume = 0x2050E8; // type:func VIFE__FadeAmbientP0 = 0x205308; // type:func VIFE__FadeDiffuseP12 = 0x2054C8; // type:func VIFE__CopySaturateP12 = 0x205638; // type:func VIFE__CullThreeWay = 0x2057B0; // type:func VIFE__CullPrelit = 0x2058B8; // type:func VIFE__ToggleCullPrelit = 0x2059C0; // type:func VIFE__PvtxpCullFan = 0x205A30; // type:func VIFE__PvtxpClipFanToPlane = 0x205AE0; // type:func VIFE__PvtxpClipFanToFrustrum = 0x205E08; // type:func VIFE__ClipThreeWay = 0x2064F0; // type:func VIFE__ClipPrelit = 0x206678; // type:func VIFE__DrawPrelit = 0x206AD0; // type:func VIFE__DrawShadow = 0x206B90; // type:func VIFE__DrawBlipesFixed = 0x206EF8; // type:func VIFE__DrawBlipesFlying = 0x2075D8; // type:func VIFE__DrawBlipesRolling = 0x207ED0; // type:func VIFE__DrawCelBorders = 0x208720; // type:func VIFE__ApplyBonesHelper = 0x208AE8; // type:func VIFE__ApplyBonesPos = 0x208C30; // type:func VIFE__ApplyBonesNormal = 0x208CA0; // type:func VIFE__ApplyPoseHelperRsgl = 0x208F68; // type:func VIFE__ApplyPoseHelper = 0x208FD8; // type:func VIFE__ApplyPosePos = 0x209088; // type:func VIFE__ApplyPoseNormal = 0x2090B8; // type:func VIFE__ApplyPoseSubcel = 0x2090E0; // type:func VIFE__PostPoseNormals = 0x209148; // type:func VIFE__AnimateUVs = 0x209340; // type:func VIFE__ApplyWarpHelper = 0x2093B8; // type:func VIFE__ApplyWarp_Plus0 = 0x2094D8; // type:func VIFE__ApplyWarp_Plus2 = 0x209500; // type:func VIFE__ApplyWarp_Plus3 = 0x209528; // type:func VIFE__EmulateMscal = 0x209550; // type:func VIFS__VIFS = 0x209660; // type:func VIFS__Align = 0x2096B8; // type:func VIFS__AddVifBaseOffset = 0x209708; // type:func VIFS__AddVifMscal = 0x209740; // type:func VIFS__AddVifMscalf = 0x209770; // type:func VIFS__AddVifFlush = 0x2097A0; // type:func VIFS__AddVifFlusha = 0x2097B8; // type:func VIFS__AddVifFlushe = 0x2097D0; // type:func VIFS__AddVifStcycl = 0x2097E8; // type:func VIFS__AddVifStrow = 0x209810; // type:func VIFS__AddVifStmask = 0x209878; // type:func VIFS__CbUnpackSetup = 0x2098B0; // type:func VIFS__UnpackHelper = 0x209918; // type:func VIFS__AddVifUnpack = 0x2099C0; // type:func VIFS__AddVifUnpackRefs = 0x209A78; // type:func VIFS__AddVifDirect = 0x209B48; // type:func VIFS__AddVifDirectRefs = 0x209BD8; // type:func VIFS__AddVifGifs = 0x209C68; // type:func InitVismap = 0x209CA0; // type:func LoadVismapFromBrx = 0x209CD8; // type:func GrfzonOneHop = 0x209DB0; // type:func ClipVbspSphereOneHop = 0x209E20; // type:func ClipVismapSphereOneHop = 0x209F78; // type:func ClipVismapPointNoHop = 0x209FC8; // type:func InitWater = 0x20A078; // type:func PostWaterLoad = 0x20A108; // type:func CalculateWaterCurrent = 0x20A1C8; // type:func UpdateSwXaList = 0x20A440; // type:func UpdateWater = 0x20A598; // type:func AddWaterExternalAccelerations = 0x20A9D8; // type:func HandleWaterMessage = 0x20AA08; // type:func UpdateWaterMergeGroup = 0x20AB80; // type:func UGetWaterSubmerged = 0x20AC28; // type:func UpdateWaterBounds = 0x20ADA8; // type:func FInflictWaterZap = 0x20AE50; // type:func PzpdEnsureWater = 0x20AE78; // type:func InitWaypoint = 0x20AE80; // type:func PostWaypointLoad = 0x20AEB8; // type:func SetWaypointRsmg = 0x20AF28; // type:func UpdateWaypoint = 0x20AF68; // type:func SetWaypointWps = 0x20AF70; // type:func HandleWaypointMessage = 0x20B048; // type:func PwpsgNew = 0x20B0C0; // type:func AddWpsgWaypoint = 0x20B0F8; // type:func RemoveWpsgWaypoint = 0x20B120; // type:func UpdateWpsgCallback = 0x20B1C0; // type:func EnsureWpsgCallback = 0x20B350; // type:func wibuInit = 0x20B3A0; // type:func wibuGetFirstSerial = 0x20B460; // type:func InitWipe = 0x20B4F0; // type:func UpdateWipe = 0x20B520; // type:func DrawWipe = 0x20B720; // type:func ActivateWipe = 0x20B7F0; // type:func SetWipeButtonTrans = 0x20B8C0; // type:func FCatchWipeButtonTrans = 0x20B8F0; // type:func SetWipeWipes = 0x20B9F8; // type:func WipeToWorldWarp = 0x20BCE0; // type:func PostWmLoad = 0x20BD20; // type:func BindWm = 0x20BD70; // type:func RefreshWmMoveStats = 0x20BEB8; // type:func ThrowWmDisplayState = 0x20BF70; // type:func CatchWmDisplayState = 0x20BF88; // type:func UpdateWm = 0x20C1A0; // type:func RenderWmAll = 0x20C578; // type:func HandleWmMessage = 0x20C5E8; // type:func SetWmWms = 0x20C6F0; // type:func ShowWm = 0x20CBE0; // type:func HideWm = 0x20CC60; // type:func MoveWm = 0x20CC98; // type:func GetWmWorldPosScreen = 0x20CE00; // type:func SetWmCursor = 0x20CF08; // type:func PostWmcLoad = 0x20CFC0; // type:func UpdateWmcActive = 0x20D060; // type:func OnWmcActive = 0x20D340; // type:func DrawWmFan = 0x20D4B0; // type:func DrawWmc = 0x20D750; // type:func __static_initialization_and_destruction_017 = 0x20DD28; // type:func _GLOBAL_$I$U_WmFadedLevels = 0x20DDF0; // type:func InitWr = 0x20DE18; // type:func GetWrParams = 0x20DE60; // type:func HandleWrMessage = 0x20DFD8; // type:func ApplyWrGlob = 0x20DFF8; // type:func UpdateWrStateVectors = 0x20E0A0; // type:func WarpWrTransform = 0x20E788; // type:func GetWrBounds = 0x20E9E8; // type:func UNoise = 0x20EAA0; // type:func UNoise1 = 0x20EAF8; // type:func UBias = 0x20EBE0; // type:func GFromOnz = 0x20EC10; // type:func UpdateWrMatrixes = 0x20ECD8; // type:func AddWrCircleWarp = 0x20EFF0; // type:func AddWrBendWarp = 0x20F070; // type:func PwreGetWrCur = 0x20F0E0; // type:func PwreGetWrCircle = 0x20F118; // type:func PwreGetWrBend = 0x20F140; // type:func SetWrWavelength = 0x20F168; // type:func GetWrWavelength = 0x20F1C0; // type:func AddOnzOnze = 0x20F218; // type:func AddWrBendNoise = 0x20F250; // type:func AddWrSwivelNoise = 0x20F2C8; // type:func InitXfm = 0x20F340; // type:func LoadXfmFromBrx = 0x20F390; // type:func SetXfmParent = 0x20F3F8; // type:func ApplyXfmProxy = 0x20F470; // type:func GetXfmParams = 0x20F4D8; // type:func ConvertXfmLocalToWorld = 0x20F508; // type:func ConvertXfmWorldToLocal = 0x20F568; // type:func GetXfmPos = 0x20F600; // type:func GetXfmMat = 0x20F638; // type:func PwarpFromOid = 0x20F670; // type:func LoadWarpFromBrx = 0x20F790; // type:func CloneWarp = 0x20F950; // type:func PostWarpLoad = 0x20FA08; // type:func GetWarpParams = 0x20FAA0; // type:func TriggerWarp = 0x20FB08; // type:func AddWarpShowWhenDifficult = 0x20FFD0; // type:func SetWarpRsmg = 0x20FFF8; // type:func TeleportSwPlayer = 0x210038; // type:func PexitDefault = 0x2100C0; // type:func TriggerDefaultExit = 0x210158; // type:func LoadExitFromBrx = 0x2101F8; // type:func PostExitLoad = 0x210390; // type:func SetExitExits = 0x210498; // type:func TriggerExit = 0x210678; // type:func WipeExit = 0x210838; // type:func UpdateExit = 0x210900; // type:func GetExitParams = 0x210BE0; // type:func InitCamera = 0x210C48; // type:func PostCameraLoad = 0x210C80; // type:func EnableCamera = 0x210D18; // type:func InitTzp = 0x210DA8; // type:func PostTzpLoad = 0x210E20; // type:func UpdateTzp = 0x210E60; // type:func CloneTzp = 0x211020; // type:func RenderTzpAll = 0x211050; // type:func FInflictTzpZap = 0x2110F0; // type:func PzpdEnsureTzp = 0x211118; // type:func InitVolzp = 0x211120; // type:func UpdateVolzp = 0x211180; // type:func InitZpd = 0x211498; // type:func PostZpdLoad = 0x2114B0; // type:func ApplyZpdThrow = 0x211600; // type:func InflictZpdZap = 0x211B40; // type:func AddZpdZapObject = 0x211BB0; // type:func AddZpdZapLo = 0x211BD8; // type:func RemoveZpdZapLo = 0x211CB0; // type:func memcmp = 0x211D4C; // type:func memcpy = 0x211DE0; // type:func memmove = 0x211E90; // type:func memset = 0x211F94; // type:func qsort = 0x212058; // type:func srand = 0x212A80; // type:func rand = 0x212A90; // type:func strcasecmp = 0x212AC0; // type:func SetGsCrt = 0x212B90; // type:func _Exit = 0x212BA0; // type:func _LoadExecPS2 = 0x212BB0; // type:func AddIntcHandler = 0x212BE0; // type:func RemoveIntcHandler = 0x212BF0; // type:func AddDmacHandler = 0x212C00; // type:func AddDmacHandler2 = 0x212C10; // type:func RemoveDmacHandler = 0x212C20; // type:func _EnableIntc = 0x212C30; // type:func _DisableIntc = 0x212C40; // type:func _EnableDmac = 0x212C50; // type:func _DisableDmac = 0x212C60; // type:func SetAlarm = 0x212C70; // type:func CreateThread = 0x212CA0; // type:func StartThread = 0x212CB0; // type:func ExitDeleteThread = 0x212CC0; // type:func ChangeThreadPriority = 0x212CE0; // type:func iChangeThreadPriority = 0x212CF0; // type:func RotateThreadReadyQueue = 0x212D00; // type:func GetThreadId = 0x212D20; // type:func ReferThreadStatus = 0x212D30; // type:func WakeupThread = 0x212D50; // type:func _iWakeupThread = 0x212D60; // type:func SuspendThread = 0x212D80; // type:func iResumeThread = 0x212D90; // type:func CreateSema = 0x212DB0; // type:func DeleteSema = 0x212DC0; // type:func SignalSema = 0x212DD0; // type:func iSignalSema = 0x212DE0; // type:func WaitSema = 0x212DF0; // type:func PollSema = 0x212E00; // type:func ReferSemaStatus = 0x212E20; // type:func SetOsdConfigParam = 0x212E30; // type:func GetOsdConfigParam = 0x212E40; // type:func FlushCache = 0x212EC0; // type:func sceSifStopDma = 0x212EE0; // type:func GsGetIMR = 0x212F00; // type:func GsPutIMR = 0x212F10; // type:func sceSifDmaStat = 0x212F30; // type:func sceSifSetDma = 0x212F40; // type:func isceSifSetDma = 0x212F50; // type:func sceSifSetDChain = 0x212F60; // type:func isceSifSetDChain = 0x212F70; // type:func sceSifSetReg = 0x212F80; // type:func sceSifGetReg = 0x212F90; // type:func Deci2Call = 0x212FB0; // type:func GetMemorySize = 0x212FC0; // type:func _InitTLB = 0x212FD0; // type:func DisableIntc = 0x212FE0; // type:func EnableIntc = 0x213048; // type:func DisableDmac = 0x2130B0; // type:func EnableDmac = 0x213118; // type:func setup = 0x213180; // type:func Copy = 0x213190; // type:func kCopy = 0x2131A0; // type:func GetEntryAddress = 0x2131D8; // type:func InitAlarm1 = 0x2131E8; // type:func topThread = 0x2132C0; // type:func InitThread = 0x213398; // type:func iWakeupThread = 0x213470; // type:func kputchar = 0x213510; // type:func deci2Putchar = 0x213548; // type:func serialPutchar = 0x2135F8; // type:func ftoi = 0x213630; // type:func printfloat = 0x2136C0; // type:func _printf = 0x213828; // type:func kprintf = 0x213DF0; // type:func scePrintf = 0x213E28; // type:func _set_sreg = 0x213E88; // type:func _change_addr = 0x213EA8; // type:func sceSifGetSreg = 0x213EB8; // type:func sceSifInitCmd = 0x213EE0; // type:func sceSifExitCmd = 0x214160; // type:func sceSifAddCmdHandler = 0x214198; // type:func sceSifRemoveCmdHandler = 0x2141C8; // type:func _sceSifSendCmd = 0x2141F0; // type:func sceSifSendCmd = 0x214328; // type:func isceSifSendCmd = 0x214368; // type:func _sceSifCmdIntrHdlr = 0x2143A8; // type:func sceSifWriteBackDCache = 0x2144D0; // type:func sceSifInitRpc = 0x214580; // type:func sceSifExitRpc = 0x214720; // type:func _sceRpcGetPacket = 0x214748; // type:func _sceRpcFreePacket = 0x2147F0; // type:func _sceRpcGetFPacket = 0x214810; // type:func _request_end = 0x214840; // type:func _request_rdata = 0x2148F8; // type:func _search_svdata = 0x214958; // type:func _request_bind = 0x2149A8; // type:func sceSifBindRpc = 0x214A58; // type:func _request_call = 0x214B98; // type:func sceSifCallRpc = 0x214C28; // type:func sceSifCheckStatRpc = 0x214E18; // type:func _sceFsIobSemaMK = 0x214E70; // type:func get_iob = 0x214ED0; // type:func _sceFs_Rcv_Intr = 0x214F40; // type:func _sceFsSemInit = 0x215300; // type:func _sceFsWaitS = 0x215350; // type:func _sceFsSigSema = 0x215380; // type:func _sceFs_Poff_Intr = 0x215390; // type:func sceFsInit = 0x2153C0; // type:func sceFsReset = 0x215590; // type:func sceClose = 0x2155D0; // type:func sceRead = 0x215750; // type:func sceWrite = 0x2159C0; // type:func sceIoctl = 0x215C80; // type:func _lf_bind = 0x216028; // type:func _lf_version = 0x216128; // type:func sceSifLoadFileReset = 0x2161B8; // type:func _sceSifLoadModule = 0x216200; // type:func sceSifLoadModule = 0x216428; // type:func sceSifResetIop = 0x216470; // type:func sceSifSyncIop = 0x2165B0; // type:func sceSifRebootIop = 0x2165E8; // type:func DIntr = 0x2166F8; // type:func EIntr = 0x216740; // type:func supplement_crt0 = 0x216758; // type:func kFindAddress = 0x2167A0; // type:func FindAddress = 0x2167D8; // type:func GetSystemCallTableEntry = 0x2167E8; // type:func setup1 = 0x216828; // type:func _InitSys = 0x216840; // type:func setup2 = 0x216880; // type:func Copy1 = 0x216890; // type:func kCopy1 = 0x2168A0; // type:func GetEntryAddress1 = 0x2168D8; // type:func PatchIsNeeded = 0x2168E8; // type:func InitExecPS2 = 0x216950; // type:func TerminateLibrary = 0x216A00; // type:func LoadExecPS2 = 0x216A10; // type:func Exit = 0x216A58; // type:func sceResetttyinit = 0x216A80; // type:func getpid = 0x216AB8; // type:func kill = 0x216AC0; // type:func kputs = 0x216B20; // type:func Copy2 = 0x216B78; // type:func kCopy2 = 0x216B88; // type:func GetEntryAddress2 = 0x216BC0; // type:func setup3 = 0x216BD0; // type:func InitTLBFunctions = 0x216BE0; // type:func _SetTLBEntry = 0x216C98; // type:func InitTLB = 0x216CA8; // type:func InitTLB32MB = 0x216CE8; // type:func _kExitTLBHandler = 0x216F40; // type:func __do_global_ctors = 0x217068; // type:func __main = 0x217118; // type:func __divdi3 = 0x217138; // type:func __fixunsdfdi = 0x217828; // type:func __floatdidf = 0x217918; // type:func __floatdisf = 0x2179B0; // type:func __moddi3 = 0x217A90; // type:func __pure_virtual = 0x2180F8; // type:func __udivdi3 = 0x218100; // type:func __umoddi3 = 0x2186D0; // type:func __pack_d = 0x218C10; // type:func __unpack_d = 0x218D40; // type:func _fpadd_parts = 0x218DE0; // type:func dpadd = 0x219020; // type:func dpsub = 0x219078; // type:func dpmul = 0x2190E0; // type:func dpdiv = 0x219388; // type:func __fpcmp_parts_d = 0x2194F0; // type:func dpcmp = 0x219608; // type:func litodp = 0x219658; // type:func dptoli = 0x219710; // type:func dptoul = 0x2197A8; // type:func __make_dp = 0x219848; // type:func dptofp = 0x219878; // type:func __pack_f = 0x2198D0; // type:func __unpack_f = 0x2199E0; // type:func __make_fp = 0x219AA0; // type:func fptodp = 0x219AD0; // type:func __builtin_vec_new = 0x219B10; // type:func __default_terminate = 0x219B88; // type:func __terminate = 0x219B98; // type:func __throw_type_match = 0x219BC0; // type:func __empty = 0x219BF0; // type:func new_eh_context = 0x219BF8; // type:func __get_eh_context = 0x219C50; // type:func __get_eh_info = 0x219C78; // type:func eh_context_initialize = 0x219CA0; // type:func eh_context_static = 0x219CC8; // type:func __get_dynamic_handler_chain = 0x219D30; // type:func __sjthrow = 0x219D58; // type:func __sjpopnthrow = 0x219ED0; // type:func __eh_rtime_match = 0x219FE8; // type:func __get_eh_table_version = 0x21A030; // type:func __get_eh_table_language = 0x21A038; // type:func old_find_exception_handler = 0x21A040; // type:func find_exception_handler = 0x21A118; // type:func get_reg_addr = 0x21A260; // type:func copy_reg = 0x21A2E8; // type:func next_stack_level = 0x21A368; // type:func __unwinding_cleanup = 0x21A3F8; // type:func throw_helper = 0x21A400; // type:func __throw = 0x21A730; // type:func __rethrow = 0x21A910; // type:func __muldi3 = 0x21AAF8; // type:func terminate = 0x21AB58; // type:func __default_unexpected = 0x21AB70; // type:func set_terminate = 0x21AB80; // type:func set_unexpected = 0x21AB90; // type:func unexpected = 0x21ABA0; // type:func __cp_exception_info = 0x21ABB8; // type:func __cp_eh_info = 0x21ABE0; // type:func __start_cp_handler = 0x21AC00; // type:func __eh_alloc = 0x21AC38; // type:func __eh_free = 0x21AC60; // type:func __cplus_type_matcher = 0x21AC80; // type:func __cp_push_exception = 0x21ACF0; // type:func __cp_pop_exception = 0x21AD80; // type:func __uncatch_exception = 0x21AE48; // type:func __check_eh_spec = 0x21AE78; // type:func __throw_bad_cast = 0x21B030; // type:func __throw_bad_typeid = 0x21B0B0; // type:func uncaught_exception = 0x21B130; // type:func exception__what = 0x21B168; // type:func bad_exception__~bad_exception = 0x21B190; // type:func bad_exception__bad_exception = 0x21B1C0; // type:func bad_exception_type_info_function = 0x21B1D8; // type:func exception__~exception = 0x21B228; // type:func exception__exception = 0x21B258; // type:func exception_type_info_function = 0x21B270; // type:func decode_uleb128 = 0x21B2B0; // type:func decode_sleb128 = 0x21B2F8; // type:func fde_merge = 0x21B348; // type:func end_fde_sort = 0x21B448; // type:func count_fdes = 0x21B6B0; // type:func add_fdes = 0x21B6F8; // type:func frame_init = 0x21B780; // type:func find_fde = 0x21B8C0; // type:func extract_cie_info = 0x21B9A8; // type:func execute_cfa_insn = 0x21BAB0; // type:func __register_frame_info_table = 0x21BE48; // type:func __deregister_frame_info = 0x21BE70; // type:func __frame_state_for = 0x21BEE8; // type:func fde_split = 0x21C0C0; // type:func set_new_handler = 0x21C238; // type:func [] = 0x21C248; // type:func operator.new = 0x21C250; // type:func bad_alloc__what = 0x21C258; // type:func bad_alloc_type_info_function = 0x21C268; // type:func bad_alloc__~bad_alloc = 0x21C2B8; // type:func type_info__~type_info = 0x21C2E8; // type:func type_info__operatorEQEQ = 0x21C318; // type:func __rtti_class = 0x21C358; // type:func __rtti_si = 0x21C380; // type:func __rtti_user = 0x21C3A0; // type:func __user_type_info__dcast = 0x21C3C0; // type:func __si_type_info__dcast = 0x21C3F0; // type:func __class_type_info__dcast = 0x21C488; // type:func __class_type_info____class_type_info = 0x21C660; // type:func __class_type_info_type_info_function = 0x21C680; // type:func __class_type_info__~__class_type_info = 0x21C6D0; // type:func __si_type_info____si_type_info = 0x21C6F0; // type:func __si_type_info_type_info_function = 0x21C710; // type:func __si_type_info__~__si_type_info = 0x21C760; // type:func __user_type_info____user_type_info = 0x21C780; // type:func __user_type_info_type_info_function = 0x21C798; // type:func __user_type_info__~__user_type_info = 0x21C7E8; // type:func bad_typeid__~bad_typeid = 0x21C808; // type:func bad_typeid__bad_typeid = 0x21C838; // type:func bad_typeid_type_info_function = 0x21C850; // type:func bad_cast__~bad_cast = 0x21C8A0; // type:func bad_cast__bad_cast = 0x21C8D0; // type:func bad_cast_type_info_function = 0x21C8E8; // type:func type_info__operator!EQ = 0x21C938; // type:func type_info__name = 0x21C958; // type:func type_info__type_info = 0x21C960; // type:func type_info_type_info_function = 0x21C978; // type:func type_info__before = 0x21C9B8; // type:func __throw_type_match_rtti = 0x21C9E0; // type:func __is_pointer = 0x21CEA8; // type:func __rtti_ptr = 0x21CEF8; // type:func __rtti_attr = 0x21CF18; // type:func __rtti_func = 0x21CF40; // type:func __rtti_ptmf = 0x21CF60; // type:func __rtti_ptmd = 0x21CF80; // type:func __rtti_array = 0x21CFA0; // type:func __dynamic_cast = 0x21CFC0; // type:func void_type_info_function = 0x21D070; // type:func long_long_type_info_function = 0x21D0A8; // type:func long_type_info_function = 0x21D0E0; // type:func int_type_info_function = 0x21D118; // type:func short_type_info_function = 0x21D150; // type:func bool_type_info_function = 0x21D188; // type:func char_type_info_function = 0x21D1C0; // type:func wchar_t_type_info_function = 0x21D1F8; // type:func long_double_type_info_function = 0x21D230; // type:func double_type_info_function = 0x21D268; // type:func float_type_info_function = 0x21D2A0; // type:func unsigned_int_type_info_function = 0x21D2D8; // type:func unsigned_long_type_info_function = 0x21D310; // type:func unsigned_long_long_type_info_function = 0x21D348; // type:func unsigned_short_type_info_function = 0x21D380; // type:func unsigned_char_type_info_function = 0x21D3B8; // type:func signed_char_type_info_function = 0x21D3F0; // type:func __array_type_info_type_info_function = 0x21D428; // type:func __array_type_info__~__array_type_info = 0x21D478; // type:func __ptmd_type_info_type_info_function = 0x21D498; // type:func __ptmd_type_info__~__ptmd_type_info = 0x21D4E8; // type:func __ptmf_type_info_type_info_function = 0x21D508; // type:func __ptmf_type_info__~__ptmf_type_info = 0x21D558; // type:func __func_type_info_type_info_function = 0x21D578; // type:func __func_type_info__~__func_type_info = 0x21D5C8; // type:func __builtin_type_info_type_info_function = 0x21D5E8; // type:func __builtin_type_info__~__builtin_type_info = 0x21D638; // type:func __attr_type_info_type_info_function = 0x21D658; // type:func __attr_type_info__~__attr_type_info = 0x21D6A8; // type:func __pointer_type_info_type_info_function = 0x21D6C8; // type:func __pointer_type_info__~__pointer_type_info = 0x21D718; // type:func abort = 0x21D738; // type:func __errno = 0x21D758; // type:func _init_signal_r = 0x21D768; // type:func _raise_r = 0x21D7E0; // type:func raise = 0x21D8D0; // type:func _kill_r = 0x21D908; // type:func _getpid_r = 0x21D968; // type:func strcmp = 0x21D984; // type:func strncpy = 0x21DAC8; // type:func snputs = 0x21DC90; // type:func sceGsResetPath = 0x21DE20; // type:func sceGsSyncPath = 0x21DEC0; // type:func simpleatoi.3 = 0x21DF50; // type:func sceDemoStart = 0x21DFC0; // type:func sceDemoEnd = 0x21E0F0; // type:func sceGsResetGraph = 0x21E140; // type:func sceGsGetGParam = 0x21E2D0; // type:func sceGsSetDefDispEnv = 0x21E2E0; // type:func sceGsPutDispEnv = 0x21E550; // type:func sceGsPutDrawEnv = 0x21E610; // type:func sceGsSetDefDBuff = 0x21E6F8; // type:func sceGsSwapDBuff = 0x21E990; // type:func sceGsPutIMR = 0x21E9F0; // type:func sceGsSetHalfOffset = 0x21EA30; // type:func sceGsGetIMR = 0x21EAB8; // type:func sceGszbufaddr = 0x21EAD8; // type:func sceGsSetDefDrawEnv = 0x21EBA0; // type:func sceGsSetDefClear = 0x21ED88; // type:func memclr = 0x21EE90; // type:func sceDmaGetChan = 0x21EEC8; // type:func sceDmaReset = 0x21EEF0; // type:func sceDmaPutEnv = 0x21EFD0; // type:func sceDmaSend = 0x21F1A8; // type:func sceDmaRecv = 0x21F290; // type:func sceDmaSync = 0x21F360; // type:func CB_DelayTh = 0x21F430; // type:func sceCdDelayThread = 0x21F458; // type:func _sceCd_cd_callback = 0x21F4C8; // type:func _sceCd_cd_read_intr = 0x21F578; // type:func cmd_sem_init = 0x21F618; // type:func cdvd_exit = 0x21F6B0; // type:func _sceCd_Poff_Intr = 0x21F738; // type:func PowerOffCB = 0x21F778; // type:func sceCdSearchFile = 0x21F7E0; // type:func _sceCd_ncmd_prechk = 0x21FAE0; // type:func sceCdNcmdDiskReady = 0x21FC50; // type:func sceCdSync = 0x21FCE8; // type:func sceCdSyncS = 0x21FD88; // type:func _sceCd_scmd_prechk = 0x21FDF8; // type:func sceCdInit = 0x21FF68; // type:func sceCdDiskReady = 0x220248; // type:func sceCdMmode = 0x220440; // type:func sceCdGetReadPos = 0x220508; // type:func sceCdRead = 0x220538; // type:func sceCdGetDiskType = 0x220718; // type:func sceCdGetError = 0x2207B0; // type:func sceCdBreak = 0x220848; // type:func _send_to_iop = 0x220900; // type:func scePadInit = 0x220A18; // type:func scePadInit2 = 0x220B58; // type:func scePadEnd = 0x220BF8; // type:func scePadPortOpen = 0x220C78; // type:func scePadGetDmaStr = 0x220E60; // type:func scePadRead = 0x220EC0; // type:func scePadGetState = 0x220F40; // type:func scePadSetReqState = 0x220FC0; // type:func scePadGetReqState = 0x221028; // type:func scePadInfoAct = 0x221080; // type:func scePadInfoMode = 0x2211A8; // type:func scePadSetMainMode = 0x2212E0; // type:func scePadSetActDirect = 0x221398; // type:func scePadSetActAlign = 0x221458; // type:func scePadGetButtonMask = 0x221530; // type:func scePadSetButtonInfo = 0x2215E8; // type:func scePadInfoPressMode = 0x221698; // type:func scePadEnterPressMode = 0x2216F8; // type:func scePadGetModVersion = 0x221768; // type:func _sceSDC = 0x2217D0; // type:func SyncDCache = 0x221878; // type:func atanf = 0x221918; // type:func cosf = 0x221BC0; // type:func fabsf = 0x221CA8; // type:func floorf = 0x221CC8; // type:func sinf = 0x221DB0; // type:func tanf = 0x221EA0; // type:func acosf = 0x221F28; // type:func asinf = 0x222028; // type:func atan2f = 0x222128; // type:func fmodf = 0x222250; // type:func logf = 0x222390; // type:func log10f = 0x2224D8; // type:func powf = 0x222628; // type:func __ieee754_acosf = 0x222B30; // type:func __ieee754_asinf = 0x222F60; // type:func __ieee754_atan2f = 0x223300; // type:func __ieee754_fmodf = 0x2235E8; // type:func __ieee754_logf = 0x223838; // type:func __ieee754_log10f = 0x223B60; // type:func __ieee754_powf = 0x223C90; // type:func __ieee754_rem_pio2f = 0x224520; // type:func __ieee754_sqrtf = 0x224900; // type:func __kernel_cosf = 0x224A38; // type:func __kernel_rem_pio2f = 0x224B90; // type:func __kernel_sinf = 0x2254E0; // type:func __kernel_tanf = 0x2255E8; // type:func matherr = 0x225880; // type:func rint = 0x2258A8; // type:func finitef = 0x225AA8; // type:func isnanf = 0x225AD0; // type:func scalbnf = 0x225AF8; // type:func copysignf = 0x225C58; // type:func _type2id = 0x225C88; // type:func sceMpegDemuxPssRing = 0x225D18; // type:func sceMpegDemuxPss = 0x226010; // type:func sceMpegAddStrCallback = 0x226030; // type:func _pack_header = 0x226128; // type:func _system_header = 0x226278; // type:func _PES_packet = 0x2262E8; // type:func sceMpegInit = 0x226898; // type:func sceMpegCreate = 0x226938; // type:func sceMpegDelete = 0x226B40; // type:func sceMpegGetPicture = 0x226B50; // type:func sceMpegIsEnd = 0x226BA8; // type:func sceMpegReset = 0x226BB8; // type:func sceMpegClearRefBuff = 0x226C08; // type:func sceMpegAddCallback = 0x226C60; // type:func _dispatchMpegCallback = 0x226C88; // type:func _dispatchMpegCbNodata = 0x226CD8; // type:func _alalcInit = 0x226D38; // type:func _alalcSetDynamic = 0x226D50; // type:func _alalcFree = 0x226D60; // type:func _alalcAlloc = 0x226D70; // type:func _getpic = 0x226DE0; // type:func _decodeOrSkipFrame = 0x226F50; // type:func _decodeOrSkip = 0x227068; // type:func _decodeOrSkipField = 0x2270B0; // type:func _sceMpegFlush = 0x227210; // type:func _initSeqAgain = 0x227278; // type:func _lastFrame = 0x227288; // type:func _clearOnce = 0x227308; // type:func _clearEach = 0x227368; // type:func _ErrMessage = 0x227428; // type:func _Error1 = 0x227438; // type:func _Error = 0x227470; // type:func _RefImageInit = 0x2274C8; // type:func _sequenceHeader = 0x2274E8; // type:func _initSeq = 0x227610; // type:func _initRefImages = 0x2278B8; // type:func _setDefaultQM = 0x227998; // type:func _sequenceExtension = 0x227A70; // type:func _sequenceDisplayExtension = 0x227BA0; // type:func _sequenceScalableExtension = 0x227C30; // type:func _unknown_extension = 0x227C40; // type:func _pictureSpatialScalableExtension = 0x227C50; // type:func _pictureTemporalScalableExtension = 0x227C60; // type:func _defStopDMA = 0x227C70; // type:func _defRestartDMA = 0x227C80; // type:func _motionComp0 = 0x227C90; // type:func _getAllRefs = 0x227EE0; // type:func _getRef0 = 0x2285E8; // type:func _doMC = 0x228A08; // type:func _rix_000 = 0x228C28; // type:func _ri0_000 = 0x228CA0; // type:func _rix_001 = 0x228D38; // type:func _ri0_001 = 0x228DF0; // type:func _rix_010 = 0x228EC0; // type:func _ri0_010 = 0x228F70; // type:func _rix_011 = 0x229028; // type:func _ri0_011 = 0x229120; // type:func _rix_100 = 0x229220; // type:func _ri0_100 = 0x2292C0; // type:func _rix_101 = 0x229370; // type:func _ri0_101 = 0x229450; // type:func _rix_110 = 0x229538; // type:func _ri0_110 = 0x229610; // type:func _rix_111 = 0x2296E0; // type:func _ri0_111 = 0x229800; // type:func _copyAddRefImage = 0x229918; // type:func _copyRefImage = 0x229978; // type:func _ipuSetMPEG1 = 0x2299D8; // type:func _waitBdecOut = 0x229A00; // type:func _dmVector = 0x229BF0; // type:func _dualPrimeVector = 0x229C10; // type:func _mbAddressIncrement = 0x229D98; // type:func _pictureData0 = 0x229EA8; // type:func _sliceA0 = 0x229FB0; // type:func _slice0 = 0x22A0E0; // type:func _skipMB0 = 0x22A2D0; // type:func _decMB0 = 0x22A390; // type:func _decode_motion_vector = 0x22A838; // type:func _motionVectors = 0x22A8C0; // type:func _motionVector = 0x22AA60; // type:func _sendIpuCommand = 0x22ABB0; // type:func _waitIpuIdle = 0x22ABE0; // type:func _waitIpuIdle64 = 0x22AC88; // type:func _ipuVdec = 0x22AD38; // type:func _peepBit = 0x22AEB0; // type:func _flushBuf = 0x22AFB8; // type:func _nextBit = 0x22B0A8; // type:func _nextStartCode = 0x22B1F8; // type:func _sliceB = 0x22B278; // type:func _nextHeader = 0x22B2E0; // type:func _pictureHeader = 0x22B3F0; // type:func _extensionAndUserData = 0x22B4B8; // type:func _pictureCodingExtension = 0x22B5E0; // type:func _extrainfo = 0x22B7D0; // type:func _updateTempTackData = 0x22B818; // type:func _groupOfPicturesHeader = 0x22B890; // type:func _quantMatrixExtension = 0x22B930; // type:func _pictureDisplayExtension = 0x22B9F8; // type:func _copyrightExtension = 0x22BAF0; // type:func _decPicture = 0x22BB80; // type:func _outputFrame = 0x22BC50; // type:func _updateRefImage = 0x22BCE0; // type:func _isOutSizeOK = 0x22BF98; // type:func _cpr8 = 0x22C038; // type:func _markOutput = 0x22C2A8; // type:func _getPtsDtsFlags = 0x22C2D0; // type:func _dispRefImage = 0x22C460; // type:func _dispRefImageField = 0x22C570; // type:func dmaRefImage = 0x22C728; // type:func receiveDataFromIPU = 0x22C880; // type:func _doCSC = 0x22C8F0; // type:func _ch3dmaCSC = 0x22CA08; // type:func _doCSC2 = 0x22CB80; // type:func _ch4dma = 0x22CD30; // type:func _csc_storeRefImage = 0x22CE38; // type:func _sysbitInit = 0x22D0B0; // type:func _sysbitNext = 0x22D0E8; // type:func _sysbitFlush = 0x22D108; // type:func _sysbitGet = 0x22D1A0; // type:func _sysbitMarker = 0x22D1F0; // type:func _sysbitJump = 0x22D238; // type:func _sysbitPtr = 0x22D290; // type:func setD3_CHCR = 0x22D2C0; // type:func setD4_CHCR = 0x22D328; // type:func sceIpuStopDMA = 0x22D390; // type:func sceIpuRestartDMA = 0x22D478; // type:func sceIpuSync = 0x22D5C8; // type:func setD4_CHCR1 = 0x22D630; // type:func sceIpuInit = 0x22D698; // type:func sn_reg_frame = 0x22D8D0; // type:func sn_dereg_frame = 0x22D8E8; // type:func _GLOBAL_$F$terminate = 0x28E164; // type:func type_info___GLOBAL_$F$before = 0x28E9A8; // type:func FUN_002946e8 = 0x2946E8; // type:func FUN_00294748 = 0x294748; // type:func FUN_00294888 = 0x294888; // type:func FUN_002956a0 = 0x2956A0; // type:func FUN_00297a78 = 0x297A78; // type:func ================================================ FILE: config/symbol_addrs_old.txt ================================================ _start = 0x100008; // type:func _exit = 0x1000B8; // type:func RefThunkLoREMOVEFnUser = 0x100178; // type:func RefThunkLoREMOVEFn = 0x100218; // type:func FUN_001002c0 = 0x1002C0; // type:func FUN_00100368 = 0x100368; // type:func FUN_00100438 = 0x100438; // type:func FUN_001004f0 = 0x1004F0; // type:func FUN_001005a0 = 0x1005A0; // type:func FUN_00100650 = 0x100650; // type:func FUN_00100720 = 0x100720; // type:func FUN_001007f0 = 0x1007F0; // type:func FUN_001008b8 = 0x1008B8; // type:func FUN_00100998 = 0x100998; // type:func FUN_00100a78 = 0x100A78; // type:func FUN_00100b48 = 0x100B48; // type:func FUN_00100c28 = 0x100C28; // type:func FUN_00100cc8 = 0x100CC8; // type:func FUN_00100d68 = 0x100D68; // type:func FUN_00100e08 = 0x100E08; // type:func FUN_00100ee0 = 0x100EE0; // type:func FUN_00100fa8 = 0x100FA8; // type:func FUN_00101058 = 0x101058; // type:func FUN_00101168 = 0x101168; // type:func FUN_00101208 = 0x101208; // type:func FUN_001012b8 = 0x1012B8; // type:func FUN_00101368 = 0x101368; // type:func FUN_00101418 = 0x101418; // type:func FUN_001014c8 = 0x1014C8; // type:func FUN_00101568 = 0x101568; // type:func FUN_00101620 = 0x101620; // type:func FUN_001016f0 = 0x1016F0; // type:func FUN_001017a0 = 0x1017A0; // type:func FUN_00101860 = 0x101860; // type:func FUN_00101950 = 0x101950; // type:func FUN_001019f0 = 0x1019F0; // type:func FUN_00101a90 = 0x101A90; // type:func FUN_00101b80 = 0x101B80; // type:func FUN_00101c88 = 0x101C88; // type:func FUN_00101d38 = 0x101D38; // type:func FUN_00101e10 = 0x101E10; // type:func FUN_00101eb0 = 0x101EB0; // type:func FUN_00101f60 = 0x101F60; // type:func FUN_00102030 = 0x102030; // type:func FUN_001020d0 = 0x1020D0; // type:func FUN_00102178 = 0x102178; // type:func FUN_00102268 = 0x102268; // type:func FUN_00102358 = 0x102358; // type:func FUN_001023f8 = 0x1023F8; // type:func RefThunkAlarmTRIGGER = 0x1024B0; // type:func FUN_00102560 = 0x102560; // type:func FUN_00102650 = 0x102650; // type:func FUN_00102710 = 0x102710; // type:func FUN_001027c0 = 0x1027C0; // type:func FUN_00102870 = 0x102870; // type:func FUN_00102920 = 0x102920; // type:func FUN_001029d0 = 0x1029D0; // type:func FUN_00102a70 = 0x102A70; // type:func FUN_00102b10 = 0x102B10; // type:func FUN_00102c28 = 0x102C28; // type:func FUN_00102d40 = 0x102D40; // type:func FUN_00102de0 = 0x102DE0; // type:func FUN_00102f10 = 0x102F10; // type:func FUN_00102fb0 = 0x102FB0; // type:func FUN_001030e0 = 0x1030E0; // type:func FUN_001031c0 = 0x1031C0; // type:func FUN_00103260 = 0x103260; // type:func FUN_00103350 = 0x103350; // type:func FUN_00103420 = 0x103420; // type:func FUN_001034f0 = 0x1034F0; // type:func FUN_00103590 = 0x103590; // type:func FUN_00103640 = 0x103640; // type:func FUN_001036f0 = 0x1036F0; // type:func FUN_001037a0 = 0x1037A0; // type:func FUN_00103850 = 0x103850; // type:func FUN_00103900 = 0x103900; // type:func FUN_001039b0 = 0x1039B0; // type:func FUN_00103a60 = 0x103A60; // type:func FUN_00103b40 = 0x103B40; // type:func FUN_00103c10 = 0x103C10; // type:func FUN_00103cc0 = 0x103CC0; // type:func FUN_00103d70 = 0x103D70; // type:func FUN_00103e10 = 0x103E10; // type:func FUN_00103eb0 = 0x103EB0; // type:func FUN_00103f80 = 0x103F80; // type:func FUN_00104020 = 0x104020; // type:func FUN_001040c0 = 0x1040C0; // type:func FUN_00104170 = 0x104170; // type:func FUN_00104220 = 0x104220; // type:func FUN_001042f0 = 0x1042F0; // type:func FUN_001043a0 = 0x1043A0; // type:func FUN_00104470 = 0x104470; // type:func FUN_00104510 = 0x104510; // type:func FUN_001045b0 = 0x1045B0; // type:func FUN_00104660 = 0x104660; // type:func FUN_00104710 = 0x104710; // type:func FUN_001047c0 = 0x1047C0; // type:func FUN_00104860 = 0x104860; // type:func FUN_00104900 = 0x104900; // type:func FUN_001049d8 = 0x1049D8; // type:func FUN_00104a78 = 0x104A78; // type:func FUN_00104b18 = 0x104B18; // type:func FUN_00104c00 = 0x104C00; // type:func FUN_00104ca0 = 0x104CA0; // type:func FUN_00104d40 = 0x104D40; // type:func FUN_00104de0 = 0x104DE0; // type:func FUN_00104e80 = 0x104E80; // type:func FUN_00104f50 = 0x104F50; // type:func FUN_00105020 = 0x105020; // type:func FUN_001050d0 = 0x1050D0; // type:func FUN_001051c0 = 0x1051C0; // type:func FUN_00105290 = 0x105290; // type:func FUN_00105360 = 0x105360; // type:func FUN_00105430 = 0x105430; // type:func FUN_00105500 = 0x105500; // type:func FUN_001055a8 = 0x1055A8; // type:func FUN_00105658 = 0x105658; // type:func FUN_00105728 = 0x105728; // type:func FUN_001057d8 = 0x1057D8; // type:func FUN_00105878 = 0x105878; // type:func FUN_00105960 = 0x105960; // type:func FUN_00105a00 = 0x105A00; // type:func FUN_00105ab0 = 0x105AB0; // type:func FUN_00105b60 = 0x105B60; // type:func FUN_00105c10 = 0x105C10; // type:func FUN_00105cc0 = 0x105CC0; // type:func FUN_00105d60 = 0x105D60; // type:func FUN_00105e10 = 0x105E10; // type:func FUN_00105ec0 = 0x105EC0; // type:func FUN_00105f70 = 0x105F70; // type:func FUN_00106048 = 0x106048; // type:func FUN_00106120 = 0x106120; // type:func OnEnterTurretTrigger = 0x1061C0; // type:func FUN_00106270 = 0x106270; // type:func FUN_00106320 = 0x106320; // type:func FUN_001063d0 = 0x1063D0; // type:func FUN_001064c0 = 0x1064C0; // type:func FUN_00106560 = 0x106560; // type:func FUN_00106600 = 0x106600; // type:func FUN_001066f0 = 0x1066F0; // type:func FUN_001067a0 = 0x1067A0; // type:func FUN_00106850 = 0x106850; // type:func FUN_00106920 = 0x106920; // type:func FUN_001069c0 = 0x1069C0; // type:func FUN_00106a70 = 0x106A70; // type:func FUN_00106b10 = 0x106B10; // type:func FUN_00106bb0 = 0x106BB0; // type:func FUN_00106c50 = 0x106C50; // type:func FUN_00106cf0 = 0x106CF0; // type:func FUN_00106d90 = 0x106D90; // type:func FUN_00106e60 = 0x106E60; // type:func FUN_00106f00 = 0x106F00; // type:func FUN_00106fa0 = 0x106FA0; // type:func FUN_00107040 = 0x107040; // type:func FUN_001070e0 = 0x1070E0; // type:func FUN_00107180 = 0x107180; // type:func FUN_00107268 = 0x107268; // type:func FUN_00107350 = 0x107350; // type:func FUN_001073f0 = 0x1073F0; // type:func FUN_001074c0 = 0x1074C0; // type:func FUN_00107570 = 0x107570; // type:func FUN_00107678 = 0x107678; // type:func FUN_00107718 = 0x107718; // type:func FUN_001077d8 = 0x1077D8; // type:func FUN_00107898 = 0x107898; // type:func FUN_00107948 = 0x107948; // type:func FUN_00107a10 = 0x107A10; // type:func FUN_00107ab0 = 0x107AB0; // type:func FUN_00107b60 = 0x107B60; // type:func FUN_00107c00 = 0x107C00; // type:func FUN_00107cb0 = 0x107CB0; // type:func FUN_00107d60 = 0x107D60; // type:func FUN_00107e10 = 0x107E10; // type:func FUN_00107ec0 = 0x107EC0; // type:func FUN_00107f70 = 0x107F70; // type:func FUN_00108038 = 0x108038; // type:func FUN_00108128 = 0x108128; // type:func FUN_00108208 = 0x108208; // type:func FUN_001082e8 = 0x1082E8; // type:func FUN_001083c8 = 0x1083C8; // type:func FUN_00108498 = 0x108498; // type:func FUN_00108548 = 0x108548; // type:func FUN_001085e8 = 0x1085E8; // type:func FUN_00108688 = 0x108688; // type:func FUN_00108728 = 0x108728; // type:func FUN_001087d8 = 0x1087D8; // type:func FUN_00108878 = 0x108878; // type:func FUN_00108928 = 0x108928; // type:func FUN_001089c8 = 0x1089C8; // type:func FUN_00108a98 = 0x108A98; // type:func FUN_00108b48 = 0x108B48; // type:func FUN_00108be8 = 0x108BE8; // type:func FUN_00108cc8 = 0x108CC8; // type:func FUN_00108da8 = 0x108DA8; // type:func FUN_00108e70 = 0x108E70; // type:func FUN_00108f38 = 0x108F38; // type:func FUN_00109000 = 0x109000; // type:func FUN_001090c8 = 0x1090C8; // type:func FUN_001091a8 = 0x1091A8; // type:func FUN_00109258 = 0x109258; // type:func FUN_00109308 = 0x109308; // type:func FUN_001093b8 = 0x1093B8; // type:func BuildEopids = 0x109488; // type:func FUN_00112698 = 0x112698; // type:func FUN_00112968 = 0x112968; // type:func FUN_00112c38 = 0x112C38; // type:func FUN_00113240 = 0x113240; // type:func RefOpPrint = 0x113730; // type:func FUN_00113780 = 0x113780; // type:func FUN_001137d0 = 0x1137D0; // type:func FUN_00113820 = 0x113820; // type:func FUN_00113888 = 0x113888; // type:func FUN_001139e8 = 0x1139E8; // type:func FUN_00113a18 = 0x113A18; // type:func FUN_00113a48 = 0x113A48; // type:func FUN_00113a78 = 0x113A78; // type:func RefOpEqv = 0x113AA8; // type:func FUN_00113b60 = 0x113B60; // type:func FUN_00113e48 = 0x113E48; // type:func FUN_00113e78 = 0x113E78; // type:func FUN_00113ee0 = 0x113EE0; // type:func FUN_00113f48 = 0x113F48; // type:func FUN_00113fb0 = 0x113FB0; // type:func FUN_00114018 = 0x114018; // type:func FUN_00114080 = 0x114080; // type:func FUN_001140e8 = 0x1140E8; // type:func FUN_00114150 = 0x114150; // type:func FUN_001141b8 = 0x1141B8; // type:func FUN_00114220 = 0x114220; // type:func FUN_00114288 = 0x114288; // type:func FUN_00114300 = 0x114300; // type:func FUN_00114360 = 0x114360; // type:func FUN_001143c8 = 0x1143C8; // type:func FUN_00114438 = 0x114438; // type:func FUN_001144a0 = 0x1144A0; // type:func FUN_00114518 = 0x114518; // type:func FUN_001145c8 = 0x1145C8; // type:func RefOpCons = 0x114638; // type:func FUN_001146e0 = 0x1146E0; // type:func FUN_00114740 = 0x114740; // type:func RefOpSetCadr = 0x1147B8; // type:func FUN_00114858 = 0x114858; // type:func FUN_00114888 = 0x114888; // type:func RefOpLength = 0x1148B8; // type:func FUN_00114950 = 0x114950; // type:func FUN_001149f0 = 0x1149F0; // type:func FUN_00114b80 = 0x114B80; // type:func RefOpAppend = 0x114BB0; // type:func FUN_00114d18 = 0x114D18; // type:func FUN_00114f48 = 0x114F48; // type:func FUN_001151c0 = 0x1151C0; // type:func FUN_00115398 = 0x115398; // type:func FUN_00115440 = 0x115440; // type:func FUN_00115510 = 0x115510; // type:func FUN_001156b0 = 0x1156B0; // type:func FUN_00115710 = 0x115710; // type:func FUN_001157e0 = 0x1157E0; // type:func FUN_001158b8 = 0x1158B8; // type:func FUN_001159b8 = 0x1159B8; // type:func FUN_00115b78 = 0x115B78; // type:func FUN_00115c00 = 0x115C00; // type:func RefUfo = 0x115CA0; // type:func FUN_00115d48 = 0x115D48; // type:func FUN_00115d78 = 0x115D78; // type:func FUN_00115da8 = 0x115DA8; // type:func FUN_00115dd8 = 0x115DD8; // type:func FUN_00115e08 = 0x115E08; // type:func FUN_00115e38 = 0x115E38; // type:func FUN_00115e68 = 0x115E68; // type:func FUN_00115e98 = 0x115E98; // type:func FUN_00115ec8 = 0x115EC8; // type:func FUN_00115f70 = 0x115F70; // type:func FUN_00115ff8 = 0x115FF8; // type:func FUN_00116080 = 0x116080; // type:func FUN_00116108 = 0x116108; // type:func FUN_001161f8 = 0x1161F8; // type:func RefOpVectorNormalize = 0x1162D0; // type:func FUN_00116400 = 0x116400; // type:func FUN_00116490 = 0x116490; // type:func RefOpVectorBallisticVelocity = 0x116520; // type:func RefOpVectorRadianNormal = 0x116600; // type:func RefOpMatrixTranspose = 0x1166C0; // type:func RefOpMatrixInvert = 0x116740; // type:func FUN_001167c0 = 0x1167C0; // type:func FUN_00116840 = 0x116840; // type:func FUN_00116978 = 0x116978; // type:func FUN_001169e8 = 0x1169E8; // type:func FUN_00116a88 = 0x116A88; // type:func FUN_00116b08 = 0x116B08; // type:func FUN_00116bc8 = 0x116BC8; // type:func FUN_00116c80 = 0x116C80; // type:func FUN_00116d20 = 0x116D20; // type:func RefOpClqEvaluateLm = 0x116DC8; // type:func FUN_00116ea8 = 0x116EA8; // type:func FUN_00116fe8 = 0x116FE8; // type:func FUN_00117080 = 0x117080; // type:func FUN_00117118 = 0x117118; // type:func FUN_00117180 = 0x117180; // type:func FUN_001171f0 = 0x1171F0; // type:func FUN_00117260 = 0x117260; // type:func FUN_001172c8 = 0x1172C8; // type:func FUN_00117360 = 0x117360; // type:func FUN_00117478 = 0x117478; // type:func FUN_00117598 = 0x117598; // type:func FUN_00117610 = 0x117610; // type:func RefOpScheduleCallback = 0x117668; // type:func FUN_00117880 = 0x117880; // type:func FUN_00117910 = 0x117910; // type:func FUN_00117a30 = 0x117A30; // type:func FUN_00117a60 = 0x117A60; // type:func FUN_00117a90 = 0x117A90; // type:func FUN_00117ac0 = 0x117AC0; // type:func RefPairFromAplo = 0x117AF0; // type:func FUN_00117bc8 = 0x117BC8; // type:func FUN_00117c48 = 0x117C48; // type:func FUN_00117d00 = 0x117D00; // type:func FUN_00117d78 = 0x117D78; // type:func FUN_00117e20 = 0x117E20; // type:func FUN_00117e78 = 0x117E78; // type:func FUN_00117ed0 = 0x117ED0; // type:func FUN_00117f28 = 0x117F28; // type:func RefOpFindObjectsInBoundingBox = 0x117FE0; // type:func FUN_001180c0 = 0x1180C0; // type:func RefOpHitTestObjectsImpl = 0x118198; // type:func FUN_001183b8 = 0x1183B8; // type:func FUN_00118458 = 0x118458; // type:func FUN_001184f8 = 0x1184F8; // type:func FUN_00118580 = 0x118580; // type:func FUN_00118608 = 0x118608; // type:func FUN_00118698 = 0x118698; // type:func RefOpStartSound = 0x118720; // type:func FUN_001187e8 = 0x1187E8; // type:func FUN_00118850 = 0x118850; // type:func FUN_001188f0 = 0x1188F0; // type:func RefOpPredictAnimationEffect = 0x118988; // type:func VU_FLOAT__VU_FLOAT = 0x118CF0; // type:func VU_VECTOR__VU_VECTOR = 0x118D10; // type:func VECTOR__operatorEQ = 0x118D20; // type:func VECTOR__operatorSTAR = 0x118D30; // type:func FUN_00118d48 = 0x118D48; // type:func FUN_00118db8 = 0x118DB8; // type:func FUN_00118e80 = 0x118E80; // type:func RefEvalAssert = 0x118F48; // type:func RefEvalIf = 0x119030; // type:func RefEvalOr = 0x119128; // type:func RefEvalAnd = 0x119218; // type:func RefEvalCond = 0x119310; // type:func RefEvalCase = 0x1194A8; // type:func RefEvalLet = 0x1196C8; // type:func FUN_00119878 = 0x119878; // type:func RefEvalLambda = 0x119970; // type:func RefEvalLambdaBody = 0x119A58; // type:func RefEvalBegin = 0x119AF8; // type:func RefEvalApply = 0x119BB0; // type:func RefEvalImport = 0x119FA0; // type:func RefEval = 0x11A080; // type:func CFrame__SetSingleParent = 0x11A328; // type:func CFrame__AddParent = 0x11A338; // type:func FUN_0011a358 = 0x11A358; // type:func FUN_0011a400 = 0x11A400; // type:func CFrame__FFindBinding = 0x11A498; // type:func CFrame__PrefFindBinding = 0x11A4D8; // type:func FUN_0011a5b0 = 0x11A5B0; // type:func FUN_0011a630 = 0x11A630; // type:func CGc__CGc = 0x11A678; // type:func CGC__~CGc = 0x11A680; // type:func CGc__Startup = 0x11A6A8; // type:func CGc__Shutdown = 0x11A6B8; // type:func CGc__AddRootFrame = 0x11A6C0; // type:func FUN_0011a708 = 0x11A708; // type:func FUN_0011a728 = 0x11A728; // type:func FUN_0011a748 = 0x11A748; // type:func FUN_0011a770 = 0x11A770; // type:func FUN_0011a790 = 0x11A790; // type:func FUN_0011a7b8 = 0x11A7B8; // type:func FUN_0011a7d8 = 0x11A7D8; // type:func CGc__UpdateRecyclable = 0x11A800; // type:func CGc__MarkLiveObjects = 0x11A850; // type:func CGc__Collect = 0x11AB58; // type:func FUN_0011adf8 = 0x11ADF8; // type:func FUN_0011ae38 = 0x11AE38; // type:func FUN_0011ae58 = 0x11AE58; // type:func PmethodNew = 0x11AE78; // type:func FUN_0011aeb8 = 0x11AEB8; // type:func FUN_0011af28 = 0x11AF28; // type:func FUN_0011af78 = 0x11AF78; // type:func CProc__CloneTo = 0x11AF98; // type:func FUN_0011afc8 = 0x11AFC8; // type:func CRef__CRef = 0x11B008; // type:func CRef__CRef_copy = 0x11B018; // type:func CRef__~CRef = 0x11B060; // type:func CRref__operatorEQ = 0x11B0A8; // type:func CRef__operatorEQEQ = 0x11B0F8; // type:func FUN_0011b258 = 0x11B258; // type:func CRef__Decref = 0x11B418; // type:func CRef__Incref = 0x11B4A8; // type:func CRef__FUN_0011b538 = 0x11B538; // type:func CRef__SetS32 = 0x11B570; // type:func CRef__SetF32 = 0x11B5B0; // type:func CRef__SetBool = 0x11B5F0; // type:func FUN_0011b640 = 0x11B640; // type:func FUN_0011b680 = 0x11B680; // type:func FUN_0011b6c0 = 0x11B6C0; // type:func FUN_0011b700 = 0x11B700; // type:func CRef__SetVector = 0x11B740; // type:func FUN_0011b788 = 0x11B788; // type:func CRef__SetClq = 0x11B7D0; // type:func CRef__SetLm = 0x11B818; // type:func FUN_0011b860 = 0x11B860; // type:func FUN_0011b8a8 = 0x11B8A8; // type:func FUN_0011b8e8 = 0x11B8E8; // type:func FUN_0011b928 = 0x11B928; // type:func CRef__RefCoerceF32 = 0x11B9A8; // type:func PpairSerializeIn = 0x11BA28; // type:func CSidebag__RefAddBinding = 0x11BD28; // type:func CSidebag__RefSetBinding = 0x11BDD0; // type:func FUN_0011be90 = 0x11BE90; // type:func FUN_0011bee0 = 0x11BEE0; // type:func FUN_0011bf30 = 0x11BF30; // type:func StartupSplice = 0x11BF70; // type:func ShutdownSplice = 0x11C040; // type:func FUN_0011c0a8 = 0x11C0A8; // type:func FUN_0011c0e8 = 0x11C0E8; // type:func FUN_0011c108 = 0x11C108; // type:func CSplotheap__Startup = 0x11C128; // type:func CSplotheap__Shutdown = 0x11C1D0; // type:func CSplotheap__PvAllocUnsafe = 0x11C1D8; // type:func FUN_0011c240 = 0x11C240; // type:func CSplotheap__PsplotLookup = 0x11C288; // type:func CSplotheap__UpdateRecyclable = 0x11C2A0; // type:func CSplotheap__UnmarkAll = 0x11C2B0; // type:func FUN_0011c2e8 = 0x11C2E8; // type:func PvFromPsplot = 0x11C3B8; // type:func PsplotFromPv = 0x11C3C0; // type:func FUN_0011c3c8 = 0x11C3C8; // type:func FUN_0011c3f0 = 0x11C3F0; // type:func FUN_0011c418 = 0x11C418; // type:func FUN_0011c498 = 0x11C498; // type:func FUN_0011c4e8 = 0x11C4E8; // type:func PvectorNew = 0x11C508; // type:func IncrefVector = 0x11C580; // type:func DecrefVector = 0x11C5B0; // type:func FUN_0011c618 = 0x11C618; // type:func FUN_0011c690 = 0x11C690; // type:func DecrefMatrix = 0x11C6C0; // type:func FUN_0011c720 = 0x11C720; // type:func PclqNew = 0x11C748; // type:func FUN_0011c7c0 = 0x11C7C0; // type:func DecrefClq = 0x11C7F0; // type:func PlmNew = 0x11C858; // type:func IncrefClq = 0x11C8D0; // type:func DecrefLm = 0x11C900; // type:func FUN_0011c968 = 0x11C968; // type:func IncrefSmp = 0x11C9E0; // type:func DefrefSmp = 0x11CA20; // type:func StartupSpliceStructuredTypeFactories = 0x11CA90; // type:func ShutdownSpliceStructuredTypeFactories = 0x11CBB0; // type:func snd_StartSoundSystem = 0x11CBB8; // type:func snd_FlushSoundCommands = 0x11CE30; // type:func wait_for_sif_rpc_done_3QMARK = 0x11D078; // type:func snd_PrepareReturnBuffer = 0x11D110; // type:func FUN_0011d140 = 0x11D140; // type:func FUN_0011d2a8 = 0x11D2A8; // type:func snd_ResolveBankXREFS = 0x11D420; // type:func snd_UnloadBank = 0x11D450; // type:func snd_SetMasterVolume = 0x11D480; // type:func FUN_0011d4b8 = 0x11D4B8; // type:func FUN_0011d4e0 = 0x11D4E0; // type:func FUN_0011d520 = 0x11D520; // type:func FUN_0011d558 = 0x11D558; // type:func snd_PlaySoundVolPanPMPB = 0x11D598; // type:func sndStopSound = 0x11D600; // type:func FUN_0011d640 = 0x11D640; // type:func FUN_0011d670 = 0x11D670; // type:func FUN_0011d6a8 = 0x11D6A8; // type:func snd_ContinueAllSoundsInGroup = 0x11D6D8; // type:func snd_SoundIsStillPlaying = 0x11D708; // type:func FUN_0011d730 = 0x11D730; // type:func FUN_0011d760 = 0x11D760; // type:func FUN_0011d798 = 0x11D798; // type:func FUN_0011d7d8 = 0x11D7D8; // type:func FUN_0011d810 = 0x11D810; // type:func FUN_0011d860 = 0x11D860; // type:func FUN_0011d8b0 = 0x11D8B0; // type:func FUN_0011d8f0 = 0x11D8F0; // type:func snd_SetGlobalExcite = 0x11D928; // type:func snd_SendIOPCommandAndWait = 0x11D968; // type:func snd_SendIOPCommandNoWait = 0x11DB00; // type:func FUN_0011ddd8 = 0x11DDD8; // type:func snd_SendCurrentBatch = 0x11DE18; // type:func FUN_0011df58 = 0x11DF58; // type:func snd_StopAllStreams = 0x11E010; // type:func FUN_0011e048 = 0x11E048; // type:func FUN_0011e0b0 = 0x11E0B0; // type:func snd_IsVAGStreamBuffered_CB = 0x11E0E0; // type:func snd_StreamSafeCheckCDIdle = 0x11E110; // type:func snd_StreamSafeCdRead = 0x11E138; // type:func snd_StreamSafeCdSync = 0x11E1F8; // type:func snd_StreamSafeCdBreak = 0x11E2A0; // type:func FUN_0011e2e8 = 0x11E2E8; // type:func FUN_0011e328 = 0x11E328; // type:func FUN_0011e360 = 0x11E360; // type:func FUN_0011e3a0 = 0x11E3A0; // type:func FUN_0011e428 = 0x11E428; // type:func snd_ResetMovieSound = 0x11E460; // type:func snd_CloseMovieSound = 0x11E498; // type:func FUN_0011e4c0 = 0x11E4C0; // type:func FUN_0011e4f8 = 0x11E4F8; // type:func snd_GetDopplerPitchMod = 0x11E538; // type:func StartupBrx = 0x11E560; // type:func PloNew = 0x11E580; // type:func LoadOptionFromBrx = 0x11E680; // type:func LoadOptionsFromBrx = 0x11EC40; // type:func IploFromStockOid = 0x11ECA0; // type:func LoadSwObjectsFromBrx = 0x11ECB8; // type:func SetLoDefaults = 0x11EDA8; // type:func FindKey = 0x11EE70; // type:func LoadAcgbFromBrx = 0x11EFC8; // type:func FUN_0011f0c8 = 0x11F0C8; // type:func FUN_0011f180 = 0x11F180; // type:func LoadAcgbwFromBrx = 0x11F210; // type:func FUN_0011f320 = 0x11F320; // type:func FUN_0011f3e8 = 0x11F3E8; // type:func FUN_0011f478 = 0x11F478; // type:func LoadAcglFromBrx = 0x11F568; // type:func FUN_0011f620 = 0x11F620; // type:func EvaluateApacg = 0x11F6B0; // type:func LoadApacgFromBrx = 0x11F798; // type:func GetApacgTimes = 0x11F850; // type:func FUN_0011f9f8 = 0x11F9F8; // type:func LoadAkvbFromBrx = 0x11FA88; // type:func GetAkvbTimes = 0x11FB98; // type:func FUN_0011fc20 = 0x11FC20; // type:func LoadAcpcFromBrx = 0x11FC90; // type:func FUN_0011fdb8 = 0x11FDB8; // type:func FUN_0011fdd8 = 0x11FDD8; // type:func LoadAcpbFromBrx = 0x11FE40; // type:func FUN_0011fed8 = 0x11FED8; // type:func FUN_0011ff08 = 0x11FF08; // type:func LoadAcrcFromBrx = 0x11FFD8; // type:func FUN_00120110 = 0x120110; // type:func FUN_00120130 = 0x120130; // type:func FUN_001201d0 = 0x1201D0; // type:func LoadAcrbFromBrx = 0x1201F0; // type:func GetAcrbTimes = 0x1202C0; // type:func EvaluateAcsc = 0x1202F0; // type:func LoadAcscFromBrx = 0x120360; // type:func FUN_00120388 = 0x120388; // type:func FUN_001203a8 = 0x1203A8; // type:func LoadAcsbFromBrx = 0x120418; // type:func GetAcsbTimes = 0x120440; // type:func EvaluateAcpbl = 0x120470; // type:func EvaluateAcrbl = 0x120700; // type:func EvaluateAcgblt = 0x120AA8; // type:func EvaluateAcgblp = 0x120D58; // type:func FUN_00120fb0 = 0x120FB0; // type:func FUN_00121050 = 0x121050; // type:func FUN_001210f0 = 0x1210F0; // type:func PacgNew = 0x121160; // type:func FUN_00121228 = 0x121228; // type:func FUN_00121280 = 0x121280; // type:func FUN_001212d8 = 0x1212D8; // type:func InitAct = 0x121338; // type:func FUN_00121358 = 0x121358; // type:func GetActPositionGoal = 0x1214B8; // type:func GetActRotationGoal = 0x121508; // type:func FUN_00121568 = 0x121568; // type:func GetActScale = 0x121580; // type:func CalculateActDefaultAck = 0x1215C0; // type:func SnapAct = 0x121648; // type:func CalculateAloPositionSpring = 0x121760; // type:func ProjectActPosition = 0x1218C0; // type:func CalculateAloRotationSpring = 0x121C48; // type:func ProjectActRotation = 0x121DE0; // type:func ProjectActPose = 0x122488; // type:func PredictAloPosition = 0x122550; // type:func FUN_001225d0 = 0x1225D0; // type:func AdaptAct = 0x1226D8; // type:func InitActval = 0x122708; // type:func GetActvalPositionGoal = 0x1227B0; // type:func GetActvalRotationGoal = 0x1227F0; // type:func InitActref = 0x122890; // type:func GetActrefPositionGoal = 0x122920; // type:func GetActrefRotationGoal = 0x122968; // type:func FUN_00122a18 = 0x122A18; // type:func FUN_00122a80 = 0x122A80; // type:func FUN_00122b30 = 0x122B30; // type:func FUN_00122c48 = 0x122C48; // type:func FUN_00122cb0 = 0x122CB0; // type:func FUN_00122da0 = 0x122DA0; // type:func FUN_00122de0 = 0x122DE0; // type:func FUN_00122f28 = 0x122F28; // type:func FUN_00122f88 = 0x122F88; // type:func FUN_00122fe0 = 0x122FE0; // type:func FUN_00123120 = 0x123120; // type:func FUN_00123270 = 0x123270; // type:func FUN_001232e8 = 0x1232E8; // type:func GGetActsegPoseGoal = 0x123358; // type:func BreakAlbrk = 0x1233C0; // type:func SetAlbrkAlarm = 0x123400; // type:func InitAlarm = 0x123408; // type:func PostAlarmLoad = 0x123448; // type:func CloneAlarm = 0x123540; // type:func UpdateAlarm = 0x123578; // type:func PostAlarmLoadCallbackHookup = 0x1236C8; // type:func SetAlarmAlarms = 0x123888; // type:func TriggerAlarm = 0x123AB0; // type:func DisableAlarmAlbrk = 0x123B18; // type:func EnableAlarmSensors = 0x123B28; // type:func DisableAlarmSensors = 0x123BB0; // type:func NotifyAlarmSensorsOnTrigger = 0x123C20; // type:func SetAlarmRsmg = 0x123D08; // type:func FGetAlarmSensorList = 0x123D40; // type:func FIsZeroV = 0x123DC0; // type:func FIsZeroW = 0x123E00; // type:func FIsZeroDv = 0x123E48; // type:func FIsZeroDw = 0x123E88; // type:func InitAlo = 0x123ED0; // type:func AddAloHierarchy = 0x124050; // type:func OnAloAdd = 0x1240F8; // type:func RemoveAloHierarchy = 0x124338; // type:func OnAloRemove = 0x1243E0; // type:func UpdateAloOrig = 0x124540; // type:func SetAloParent = 0x1245A8; // type:func ApplyAloProxy = 0x124868; // type:func BindAlo = 0x1249A8; // type:func PostAloLoad = 0x124A48; // type:func PostAloLoadCallback = 0x124CC0; // type:func SnipAloObjects = 0x124DF8; // type:func UpdateAloHierarchy = 0x124EE8; // type:func UpdateAlo = 0x124FC0; // type:func InvalidateAloLighting = 0x1250C8; // type:func UpdateAloXfWorld = 0x125108; // type:func UpdateAloXfWorldHierarchy = 0x125138; // type:func update_entity_position = 0x125440; // type:func FUN_00125750 = 0x125750; // type:func FUN_001259d8 = 0x1259D8; // type:func DupAloRo = 0x125B70; // type:func FUN_00125bf0 = 0x125BF0; // type:func FUN_00125c90 = 0x125C90; // type:func RenderAloSelf = 0x1261C0; // type:func FUN_00126270 = 0x126270; // type:func RenderAloLine = 0x1268B8; // type:func FUN_00126a48 = 0x126A48; // type:func UpdateAloThrob = 0x126AC8; // type:func FUN_00126bc0 = 0x126BC0; // type:func FUN_00126c58 = 0x126C58; // type:func FUN_00126cb8 = 0x126CB8; // type:func FUN_00126d60 = 0x126D60; // type:func FUN_00126de8 = 0x126DE8; // type:func CloneAloHeirarchy = 0x126F78; // type:func CloneLockg = 0x127048; // type:func HandleAloMessage = 0x127378; // type:func FUN_001273f0 = 0x1273F0; // type:func FUN_001274f8 = 0x1274F8; // type:func FUN_00127558 = 0x127558; // type:func FUN_00127590 = 0x127590; // type:func FUN_001275f0 = 0x1275F0; // type:func SetAloVelocityLocal = 0x127628; // type:func GetAloVelocityLocal = 0x127678; // type:func FUN_001276c0 = 0x1276C0; // type:func CalculateAloMovement = 0x1278A8; // type:func FUN_00127b20 = 0x127B20; // type:func FUN_00127e60 = 0x127E60; // type:func ConvertAloPos = 0x128018; // type:func ConvertAloVec = 0x1280C0; // type:func ConvertAloMat = 0x128150; // type:func FDrivenAlo = 0x128230; // type:func RetractAloDrive = 0x128278; // type:func ConvertAloMovement = 0x128330; // type:func CalculateAloDrive = 0x128598; // type:func FUN_001288f0 = 0x1288F0; // type:func FUN_00128998 = 0x128998; // type:func LoadAloFromBrx = 0x1289C0; // type:func LoadAloAloxFromBrx = 0x128C10; // type:func BindAloAlox = 0x128DB8; // type:func UnadjustAloRotation = 0x128FD0; // type:func FUN_00129108 = 0x129108; // type:func FUN_001291d0 = 0x1291D0; // type:func FUN_00129228 = 0x129228; // type:func FUN_00129288 = 0x129288; // type:func FUN_001292b8 = 0x1292B8; // type:func FUN_001292e8 = 0x1292E8; // type:func FUN_00129318 = 0x129318; // type:func FUN_00129348 = 0x129348; // type:func FUN_00129378 = 0x129378; // type:func FUN_001293a8 = 0x1293A8; // type:func FUN_001293d8 = 0x1293D8; // type:func FUN_00129400 = 0x129400; // type:func FUN_00129480 = 0x129480; // type:func FUN_001294b0 = 0x1294B0; // type:func FUN_001294e0 = 0x1294E0; // type:func FUN_00129510 = 0x129510; // type:func FUN_00129540 = 0x129540; // type:func FUN_00129598 = 0x129598; // type:func FUN_001295c8 = 0x1295C8; // type:func FUN_00129648 = 0x129648; // type:func FUN_001296e0 = 0x1296E0; // type:func FUN_00129730 = 0x129730; // type:func RecacheAloActList = 0x129780; // type:func FUN_001299e0 = 0x1299E0; // type:func ResortAloActList = 0x129A58; // type:func FUN_00129b98 = 0x129B98; // type:func FUN_00129c20 = 0x129C20; // type:func PasegaFindAloNearest = 0x129CA8; // type:func FUN_00129d00 = 0x129D00; // type:func FIsAloStatic = 0x129D70; // type:func ResolveAlo = 0x129DF8; // type:func FUN_00129e10 = 0x129E10; // type:func FUN_00129e88 = 0x129E88; // type:func FUN_00129ee0 = 0x129EE0; // type:func FUN_00129f58 = 0x129F58; // type:func FUN_00129fb0 = 0x129FB0; // type:func FUN_0012a028 = 0x12A028; // type:func FUN_0012a080 = 0x12A080; // type:func FUN_0012a0f8 = 0x12A0F8; // type:func FUN_0012a150 = 0x12A150; // type:func FUN_0012a1a0 = 0x12A1A0; // type:func FUN_0012a200 = 0x12A200; // type:func FUN_0012a270 = 0x12A270; // type:func FUN_0012a2c0 = 0x12A2C0; // type:func FUN_0012a320 = 0x12A320; // type:func FUN_0012a3c8 = 0x12A3C8; // type:func FUN_0012a3e8 = 0x12A3E8; // type:func FUN_0012a430 = 0x12A430; // type:func FUN_0012a4a0 = 0x12A4A0; // type:func FUN_0012a4e8 = 0x12A4E8; // type:func FUN_0012a528 = 0x12A528; // type:func FUN_0012a580 = 0x12A580; // type:func FUN_0012a5d0 = 0x12A5D0; // type:func FUN_0012a630 = 0x12A630; // type:func FUN_0012a6a0 = 0x12A6A0; // type:func FUN_0012a700 = 0x12A700; // type:func FUN_0012a770 = 0x12A770; // type:func FUN_0012a7c0 = 0x12A7C0; // type:func FUN_0012a810 = 0x12A810; // type:func FUN_0012a860 = 0x12A860; // type:func FUN_0012a888 = 0x12A888; // type:func FUN_0012a8b8 = 0x12A8B8; // type:func FUN_0012a8c8 = 0x12A8C8; // type:func FUN_0012a8d8 = 0x12A8D8; // type:func FUN_0012a970 = 0x12A970; // type:func FUN_0012a9c8 = 0x12A9C8; // type:func FUN_0012aa00 = 0x12AA00; // type:func SetAloTargetHitTest = 0x12AA28; // type:func FUN_0012aa50 = 0x12AA50; // type:func SetAloEyesClosed = 0x12AAE8; // type:func FUN_0012aba8 = 0x12ABA8; // type:func FUN_0012abd0 = 0x12ABD0; // type:func FUN_0012ac08 = 0x12AC08; // type:func FUN_0012aca0 = 0x12ACA0; // type:func FUN_0012acf8 = 0x12ACF8; // type:func FUN_0012ad30 = 0x12AD30; // type:func FUN_0012ad98 = 0x12AD98; // type:func FUN_0012add0 = 0x12ADD0; // type:func FUN_0012ae20 = 0x12AE20; // type:func FUN_0012ae78 = 0x12AE78; // type:func FUN_0012aeb0 = 0x12AEB0; // type:func FUN_0012af38 = 0x12AF38; // type:func FUN_0012b010 = 0x12B010; // type:func EnsureAloThrob = 0x12B040; // type:func FUN_0012b0b0 = 0x12B0B0; // type:func FUN_0012b140 = 0x12B140; // type:func FUN_0012b1a0 = 0x12B1A0; // type:func FUN_0012b200 = 0x12B200; // type:func SetAloPoseCombo = 0x12B2F8; // type:func SetAloForceCameraFade = 0x12B420; // type:func SetAloRealClock = 0x12B4C8; // type:func FUN_0012b5b8 = 0x12B5B8; // type:func check_anticrack_firewall = 0x12B760; // type:func FUN_0012b868 = 0x12B868; // type:func FUN_0012b870 = 0x12B870; // type:func LoadAsegFromBrx = 0x12B8C8; // type:func LoadAsegEventsFromBrx = 0x12BC38; // type:func FUN_0012c140 = 0x12C140; // type:func FUN_0012c160 = 0x12C160; // type:func FUN_0012c208 = 0x12C208; // type:func ApplyAsegOvr = 0x12C288; // type:func ApplyAsegQMARK = 0x12C7B0; // type:func FUN_0012c7d8 = 0x12C7D8; // type:func FUN_0012c808 = 0x12C808; // type:func FUN_0012c840 = 0x12C840; // type:func PasegaEnsureAseg = 0x12C8F8; // type:func FUN_0012c918 = 0x12C918; // type:func FWipingAseg = 0x12C9A8; // type:func FindAsegClosestPoint = 0x12C9E8; // type:func PeaFindAsegLabel = 0x12CBE8; // type:func FUN_0012ccc0 = 0x12CCC0; // type:func FUN_0012cce8 = 0x12CCE8; // type:func FUN_0012cd78 = 0x12CD78; // type:func FUN_0012d1b0 = 0x12D1B0; // type:func FUN_0012d2a8 = 0x12D2A8; // type:func FUN_0012d398 = 0x12D398; // type:func FUN_0012d3f8 = 0x12D3F8; // type:func SetAsegaHandsOff = 0x12D448; // type:func UpdateAsegaIeaCur = 0x12D4A8; // type:func FUN_0012d570 = 0x12D570; // type:func HandleAsegaEvent = 0x12D5D0; // type:func HandleAsegaEventsFF = 0x12E4E0; // type:func HandleAsegaEvents = 0x12E5D0; // type:func RemoveAsega = 0x12E710; // type:func RetractAsega = 0x12E760; // type:func FUN_0012e928 = 0x12E928; // type:func UFromEaErrorFunc = 0x12E968; // type:func FWrapAsegaTime = 0x12E9E0; // type:func UpdateAsega = 0x12EBD8; // type:func FUN_0012f0a0 = 0x12F0A0; // type:func FUN_0012f190 = 0x12F190; // type:func AdaptAsega = 0x12F1D8; // type:func FindChnClosestPointLocal = 0x12F210; // type:func SetAsegaSpeed = 0x12F6B0; // type:func FUN_0012f6d0 = 0x12F6D0; // type:func FUN_0012f718 = 0x12F718; // type:func SendAsegaMessage = 0x12F760; // type:func FUN_0012f7e0 = 0x12F7E0; // type:func FUN_0012f810 = 0x12F810; // type:func FUN_0012f840 = 0x12F840; // type:func FUN_0012f888 = 0x12F888; // type:func PostBarrierLoad = 0x12F8C8; // type:func FUN_0012f9b8 = 0x12F9B8; // type:func FIgnoreBarrierIntersection = 0x12FA88; // type:func FUN_0012fb68 = 0x12FB68; // type:func CBinaryAsyncStream__CBinaryAsyncStream = 0x12FCF0; // type:func CBinaryAsyncStream__~CBinaryAsyncStream = 0x12FD30; // type:func FUN_0012fd78 = 0x12FD78; // type:func FUN_0012fda0 = 0x12FDA0; // type:func CBinaryAsyncStream__Close = 0x12FDE8; // type:func CBinaryAsyncStream__StartSpooling = 0x12FE70; // type:func CBinaryAsyncStream__FSpooling = 0x12FF10; // type:func CBinaryAsyncStream__FSpoolingComplete = 0x12FF20; // type:func FUN_0012ffe8 = 0x12FFE8; // type:func FUN_00130070 = 0x130070; // type:func CBinaryAsyncStream__Skip = 0x1300D8; // type:func FIsBasicDerivedFrom = 0x1300E8; // type:func FUN_00130110 = 0x130110; // type:func EvaluateBezierWeightedFloat = 0x130168; // type:func EvaluateBezierFloat = 0x1303F0; // type:func EvaluateBezierPos = 0x130540; // type:func EvaluateBezierMat = 0x130748; // type:func FUN_00130b48 = 0x130B48; // type:func FUN_00130c20 = 0x130C20; // type:func LimitBezierMulti = 0x130C58; // type:func InitBei = 0x130F48; // type:func GEvaluateBei = 0x131000; // type:func FUN_001310f0 = 0x1310F0; // type:func FUN_00131140 = 0x131140; // type:func FUN_00131198 = 0x131198; // type:func DrawBinocCompass = 0x1316E8; // type:func DrawBinocZoom = 0x131F60; // type:func DrawBinocReticle = 0x132500; // type:func DrawBinocOutline = 0x133B58; // type:func FUN_00134aa0 = 0x134AA0; // type:func FUN_00134b48 = 0x134B48; // type:func DrawBinocFilter = 0x135228; // type:func FUN_00135550 = 0x135550; // type:func open_close_binoc = 0x1356C0; // type:func FUN_001357f0 = 0x1357F0; // type:func FUN_00135858 = 0x135858; // type:func FUN_001358d0 = 0x1358D0; // type:func SetBinocBfk = 0x135E78; // type:func FUN_00135f48 = 0x135F48; // type:func FUN_00136040 = 0x136040; // type:func FUN_00136238 = 0x136238; // type:func FUN_001363d0 = 0x1363D0; // type:func SetBinocAchzDraw = 0x136408; // type:func FDoneBinocAchz = 0x136530; // type:func SetBinocLookat = 0x1365A0; // type:func SetBinocZoom = 0x1365A8; // type:func FUN_001365f0 = 0x1365F0; // type:func FUN_00136648 = 0x136648; // type:func DrawBinoc = 0x1366A0; // type:func GetBinocReticleFocus = 0x136EC8; // type:func FUN_00136ef8 = 0x136EF8; // type:func FUN_00136fa8 = 0x136FA8; // type:func __static_initialization_and_destruction_0 = 0x136FE8; // type:func CTextBox__SetPos = 0x137228; // type:func CTextBox__SetSize = 0x137238; // type:func CTextBox__SetTextColor = 0x137248; // type:func CTextBox__SetHorizontalJust = 0x137260; // type:func CTextBox__SetVerticalJust = 0x137268; // type:func _GLOBAL_$I$InitBei__FP3BEIP3CLQffi = 0x137270; // type:func CBinaryInputStream = 0x137290; // type:func CBinaryInputStream__~CBinaryInputStream = 0x1372E0; // type:func CBinaryInputStream__FOpenSector = 0x137328; // type:func CBinaryInputStream__OpenMemory = 0x137398; // type:func CBinaryInputStream__FOpenFile = 0x1373B0; // type:func CBinaryInputStream__Close = 0x1373D0; // type:func CBinaryInputStream__DecrementCdReadLimit = 0x137480; // type:func CBinaryInputStream__PumpCd = 0x137490; // type:func FUN_001377c0 = 0x1377C0; // type:func CBinaryInputStream__Pump = 0x137820; // type:func decompress_impl = 0x1378A0; // type:func CBinaryInputStream__Read = 0x137A60; // type:func CBinaryInputStream__Align = 0x137B60; // type:func U8Read = 0x137B90; // type:func CBinaryInputStream__U16Read = 0x137BE0; // type:func CBinaryInputStream__U32Read = 0x137C40; // type:func S8Read = 0x137CC0; // type:func CBinaryInputStream__S16Read = 0x137D10; // type:func CBinaryInputStream__S32Read = 0x137D78; // type:func CBinaryInputStream__F32Read = 0x137DF8; // type:func CBinaryInputStream__ReadVector = 0x137E70; // type:func CBinaryInputStream__ReadVector4 = 0x137E90; // type:func CBinaryInputStream__ReadMatrix = 0x137EB0; // type:func CBinaryInputStream__ReadMatrix4 = 0x137F08; // type:func CBinaryInputStream__ReadGeom = 0x137FB0; // type:func CBinaryInputStream__ReadBspc = 0x138278; // type:func CBinaryInputStream__ReadVbsp = 0x138398; // type:func ReadStringSw = 0x1384A0; // type:func LoadUnknown0FromBrx = 0x138518; // type:func LoadUnknown1FromBrx = 0x138550; // type:func UpdateSwPox = 0x1385A0; // type:func PoxAddSw = 0x138738; // type:func FUN_00138788 = 0x138788; // type:func PoxFromSoSo = 0x1387C0; // type:func FUN_001387f8 = 0x1387F8; // type:func FUN_00138828 = 0x138828; // type:func FUN_001388a0 = 0x1388A0; // type:func FUN_001389c8 = 0x1389C8; // type:func FUN_001389d0 = 0x1389D0; // type:func InvalidateSwXpForObject = 0x138BE0; // type:func RecalcSwXpAll = 0x138C00; // type:func RecalcSwOxfFilterForObject = 0x138F28; // type:func VerifyAeaEquivalence = 0x138FF0; // type:func EnsureAsegBlendDynamic = 0x139038; // type:func FillBlAmrsg = 0x139600; // type:func CalculateBlendAmrsg = 0x139740; // type:func FUN_00139970 = 0x139970; // type:func ReblendAsegbl = 0x1399F8; // type:func FUN_00139b38 = 0x139B38; // type:func BuildBlipAqwGifs = 0x139B70; // type:func StartupBlips = 0x139C38; // type:func FUN_00139c70 = 0x139C70; // type:func FUN_00139d28 = 0x139D28; // type:func FUN_00139d68 = 0x139D68; // type:func FUN_00139de8 = 0x139DE8; // type:func FUN_00139e80 = 0x139E80; // type:func FUN_00139ec8 = 0x139EC8; // type:func SetBlipgShader = 0x139F80; // type:func FUN_0013a008 = 0x13A008; // type:func SetBlipgEmitb = 0x13A128; // type:func UpdateBlipg = 0x13A3A0; // type:func FUN_0013a418 = 0x13A418; // type:func CblipeProjectBlipTransformAccel = 0x13A498; // type:func ProjectBlipgTransformAccel = 0x13A618; // type:func ProjectBlipgTransform = 0x13A940; // type:func RenderBlipgSelf = 0x13AD08; // type:func FUN_0013ad80 = 0x13AD80; // type:func FUN_0013b430 = 0x13B430; // type:func InitBomb = 0x13B4C0; // type:func LoadBombFromBrx = 0x13B598; // type:func FUN_0013b5c8 = 0x13B5C8; // type:func FUN_0013b610 = 0x13B610; // type:func FUN_0013b708 = 0x13B708; // type:func FUN_0013b778 = 0x13B778; // type:func FUN_0013b828 = 0x13B828; // type:func FUN_0013b9d8 = 0x13B9D8; // type:func FUN_0013ba70 = 0x13BA70; // type:func FUN_0013bba0 = 0x13BBA0; // type:func FUN_0013bc80 = 0x13BC80; // type:func FUN_0013be00 = 0x13BE00; // type:func FUN_0013be18 = 0x13BE18; // type:func FUN_0013bf68 = 0x13BF68; // type:func FUN_0013c950 = 0x13C950; // type:func FUN_0013c988 = 0x13C988; // type:func CByteQueue__Reset = 0x13C9B0; // type:func FUN_0013c9d0 = 0x13C9D0; // type:func CByteQueue__CbDrain = 0x13CAD8; // type:func FUN_0013cc00 = 0x13CC00; // type:func CByteQueue__FreeDrain = 0x13CC48; // type:func CQueueInputMemory__CbRead = 0x13CC80; // type:func InitBrk = 0x13CCF8; // type:func LoadBrkFromBrx = 0x13CD80; // type:func CloneBrk = 0x13CDE8; // type:func FUN_0013ce40 = 0x13CE40; // type:func FUN_0013ce80 = 0x13CE80; // type:func UpdateBrk = 0x13D068; // type:func FUN_0013d0b0 = 0x13D0B0; // type:func BreakBrk = 0x13D278; // type:func FUN_0013d820 = 0x13D820; // type:func FUN_0013daf0 = 0x13DAF0; // type:func FUN_0013db28 = 0x13DB28; // type:func FUN_0013dc38 = 0x13DC38; // type:func FUN_0013dca8 = 0x13DCA8; // type:func FUN_0013dd08 = 0x13DD08; // type:func FUN_0013dd78 = 0x13DD78; // type:func FUN_0013ddb8 = 0x13DDB8; // type:func FUN_0013ddf0 = 0x13DDF0; // type:func FUN_0013de38 = 0x13DE38; // type:func FUN_0013dee8 = 0x13DEE8; // type:func UpdateZapbreak = 0x13DF68; // type:func FUN_0013dfd8 = 0x13DFD8; // type:func PruneBsp = 0x13E430; // type:func PbspPointInBspQuick = 0x13E658; // type:func FUN_0013e6c8 = 0x13E6C8; // type:func FUN_0013e7c0 = 0x13E7C0; // type:func FUN_0013e868 = 0x13E868; // type:func FAddAshAseg = 0x13E8D8; // type:func FAddAshOid = 0x13E8F8; // type:func InitBtn = 0x13E918; // type:func LoadBtn = 0x13E950; // type:func PostBtnLoad = 0x13EA38; // type:func RestoreBtnFromCheckpointCallback = 0x13EAE0; // type:func SetBtnRsmg = 0x13EB30; // type:func SetBtnButtons = 0x13EB68; // type:func FAddRsmg = 0x13EC00; // type:func TriggerRsmg = 0x13ECB0; // type:func RunBtnAsegs = 0x13ED90; // type:func TriggerBtn = 0x13EF50; // type:func UntriggerBtn = 0x13F070; // type:func InitButton = 0x13F0E0; // type:func LoadButtonFromBrx = 0x13F110; // type:func FUN_0013f140 = 0x13F140; // type:func FUN_0013f1d8 = 0x13F1D8; // type:func FUN_0013f290 = 0x13F290; // type:func FUN_0013f6c0 = 0x13F6C0; // type:func SetButtonButtons = 0x13F6F8; // type:func FUN_0013f718 = 0x13F718; // type:func IposFindButtonClosest = 0x13F8A0; // type:func FUN_0013f940 = 0x13F940; // type:func PresetButtonAccel = 0x13FA10; // type:func UpdateButtonInternalXps = 0x13FAE8; // type:func UpdateButton = 0x13FD20; // type:func FAbsorbButtonWkr = 0x140028; // type:func FUN_001400a8 = 0x1400A8; // type:func LoadVolbtnFromBrx = 0x140100; // type:func FUN_00140140 = 0x140140; // type:func FUN_00140200 = 0x140200; // type:func SetVolbtnButtons = 0x140238; // type:func UpdateVolbtn = 0x140258; // type:func FUN_00140550 = 0x140550; // type:func FUN_001405d0 = 0x1405D0; // type:func FUN_00140640 = 0x140640; // type:func AddAlarmStepguard = 0x140688; // type:func FUN_00140750 = 0x140750; // type:func FUN_00140770 = 0x140770; // type:func CSpliceVarAccessor__PvVarOwner = 0x1407A0; // type:func CpchzTokenizePath = 0x1407A8; // type:func FUN_00140968 = 0x140968; // type:func FUN_001409a8 = 0x1409A8; // type:func UpdateCd = 0x1409E0; // type:func CdPath = 0x140B60; // type:func FUN_00140c28 = 0x140C28; // type:func calls_sceCdRead = 0x140CC8; // type:func FUN_00140d68 = 0x140D68; // type:func ResetChkmgrCheckpoints = 0x140D90; // type:func SaveChkmgrCheckpoint = 0x140E10; // type:func ReturnChkmgrToCheckpoint = 0x140ED0; // type:func RestoreChkmgrFromCheckpoint = 0x140F48; // type:func IchkAllocChkmgr = 0x140FF8; // type:func FGetChkmgrIchk = 0x141008; // type:func SetChkmgrIchk = 0x141040; // type:func ClearChkmgrIchk = 0x1410A0; // type:func LoadVolFromBrx = 0x141108; // type:func FCheckVolPoint = 0x141170; // type:func InitChkpnt = 0x1411A8; // type:func LoadChkpntFromBrx = 0x141210; // type:func BindChkpnt = 0x141338; // type:func FUN_00141438 = 0x141438; // type:func FUN_001415d0 = 0x1415D0; // type:func FUN_00141690 = 0x141690; // type:func FUN_001417f0 = 0x1417F0; // type:func FUN_00141870 = 0x141870; // type:func PsoHitTestLineObjects = 0x1419E8; // type:func FUN_00141b48 = 0x141B48; // type:func ClsgClipEdgeToObject = 0x141C28; // type:func ClsgClipEdgeToObjectPruned = 0x141C90; // type:func ClsgClipCylinderToObject = 0x141D00; // type:func ClsgClipLineToSphere = 0x141D88; // type:func ClsgClipEdgeToSphere = 0x141F48; // type:func FUN_00142170 = 0x142170; // type:func ClsgClipEdgeToCylinder = 0x142278; // type:func ClsgMergeAlsg = 0x1429F8; // type:func FUN_00142b78 = 0x142B78; // type:func SetClockRate = 0x142ED0; // type:func MarkClockTick = 0x142F10; // type:func MarkClockTickRealOnly = 0x143030; // type:func ResetClock = 0x1430B8; // type:func SetClockEnabled = 0x1430C0; // type:func StartupClock = 0x1430C8; // type:func TickNow = 0x1430F8; // type:func CalcCmAdjust = 0x143148; // type:func SpringCm = 0x143180; // type:func AdjustCmCpdefi = 0x143208; // type:func FUN_001433e0 = 0x1433E0; // type:func FUN_00143418 = 0x143418; // type:func FUN_001434c8 = 0x1434C8; // type:func FUN_00143560 = 0x143560; // type:func InitCm = 0x143648; // type:func SetSwCameraFov = 0x1437C0; // type:func FUN_001437e8 = 0x1437E8; // type:func FUN_00143810 = 0x143810; // type:func FUN_00143838 = 0x143838; // type:func FUN_00143860 = 0x143860; // type:func FUN_00143888 = 0x143888; // type:func FUN_001438b0 = 0x1438B0; // type:func FUN_001438d8 = 0x1438D8; // type:func FUN_00143900 = 0x143900; // type:func FUN_00143920 = 0x143920; // type:func FUN_00143940 = 0x143940; // type:func FUN_00143968 = 0x143968; // type:func FUN_00143988 = 0x143988; // type:func FUN_001439a8 = 0x1439A8; // type:func FUN_001439c8 = 0x1439C8; // type:func FUN_001439e8 = 0x1439E8; // type:func FUN_00143a08 = 0x143A08; // type:func FUN_00143a38 = 0x143A38; // type:func ResetCm = 0x143A60; // type:func ClearCmFadeObjects = 0x143AF0; // type:func AddCmFadeObject = 0x143AF8; // type:func RemoveCmFadeObject = 0x143B20; // type:func UpdateCmFade = 0x143BE0; // type:func UpdateCmLast = 0x143E40; // type:func SetupCmRotateToCam = 0x144008; // type:func ConvertCmScreenToWorld = 0x144128; // type:func ConvertCmWorldToScreen = 0x1441C0; // type:func SetupCm = 0x144270; // type:func CombineEyeLookAtProj = 0x1442C8; // type:func BuildFrustrum = 0x1443C8; // type:func UpdateCmMat4 = 0x144540; // type:func FUN_00144848 = 0x144848; // type:func FUN_001448c8 = 0x1448C8; // type:func FUN_00144938 = 0x144938; // type:func FUN_00144978 = 0x144978; // type:func FUN_00144aa0 = 0x144AA0; // type:func FUN_00144b70 = 0x144B70; // type:func FUN_00144be8 = 0x144BE8; // type:func AdjustCmJoy = 0x144FF8; // type:func SetCmPolicy = 0x145088; // type:func RevokeCmPolicy = 0x1451F0; // type:func FUN_001453b0 = 0x1453B0; // type:func DecomposeCylind = 0x145438; // type:func DecomposeSphere = 0x1454E0; // type:func SetCmCut = 0x1455C0; // type:func FUN_001455e0 = 0x1455E0; // type:func FUN_001455f0 = 0x1455F0; // type:func FUN_00145610 = 0x145610; // type:func SetCm = 0x145718; // type:func PsoEnemyStepguard = 0x145810; // type:func FUN_00145950 = 0x145950; // type:func FUN_00145b68 = 0x145B68; // type:func FUN_00145de8 = 0x145DE8; // type:func FUN_00145e68 = 0x145E68; // type:func FUN_00145fb8 = 0x145FB8; // type:func FUN_00145fd8 = 0x145FD8; // type:func FUN_00145ff8 = 0x145FF8; // type:func FUN_00146018 = 0x146018; // type:func FUN_00146028 = 0x146028; // type:func FUN_00146038 = 0x146038; // type:func FUN_001460b8 = 0x1460B8; // type:func FUN_001460e0 = 0x1460E0; // type:func InitCnvo = 0x146100; // type:func LoadCnvoFromBrx = 0x146130; // type:func PostCnvoLoad = 0x146178; // type:func FUN_00146240 = 0x146240; // type:func MatchCnvoScrollerToBeltSpeed = 0x146298; // type:func FUN_00146340 = 0x146340; // type:func LoadDprizeFromBrx = 0x1463C0; // type:func FUN_00146418 = 0x146418; // type:func FUN_00146470 = 0x146470; // type:func FUN_00146518 = 0x146518; // type:func FFilterDprizeObjects = 0x146D10; // type:func FUN_00146db0 = 0x146DB0; // type:func FUN_001471b0 = 0x1471B0; // type:func FUN_001473e0 = 0x1473E0; // type:func get_charmQMARK = 0x147428; // type:func FUN_001478f0 = 0x1478F0; // type:func SetDprizeDprizes = 0x147AB0; // type:func FUN_00147e40 = 0x147E40; // type:func FUN_00147ed0 = 0x147ED0; // type:func FUN_00147ef8 = 0x147EF8; // type:func FUN_00147fb0 = 0x147FB0; // type:func increment_charm_count = 0x148038; // type:func AddLife = 0x148178; // type:func OnCoinSmack = 0x1481A0; // type:func SetCoinDprizes = 0x148298; // type:func FUN_00148400 = 0x148400; // type:func SetCharmDprizes = 0x148470; // type:func FUN_00148510 = 0x148510; // type:func SetKeyDprizes = 0x148598; // type:func FUN_00148698 = 0x148698; // type:func FUN_00148718 = 0x148718; // type:func FUN_00148748 = 0x148748; // type:func FUN_00148770 = 0x148770; // type:func FUN_00148828 = 0x148828; // type:func FUN_00148888 = 0x148888; // type:func FUN_00148938 = 0x148938; // type:func CpdprizeAttractSwDprizes = 0x148AC0; // type:func RemoveSwExtraneousCharms = 0x148CE0; // type:func FUN_00148d90 = 0x148D90; // type:func FUN_00148e18 = 0x148E18; // type:func FUN_00148e40 = 0x148E40; // type:func FUN_00148ef8 = 0x148EF8; // type:func increment_and_show_life_count = 0x148F80; // type:func CollectLifeTkn = 0x148FF0; // type:func FUN_00149168 = 0x149168; // type:func break_bottleQMARK = 0x149190; // type:func InitCplcy = 0x149398; // type:func FUN_001493a0 = 0x1493A0; // type:func SetCpmanCpmt = 0x1493B8; // type:func PosCplookAnchor = 0x1493C8; // type:func FUN_00149458 = 0x149458; // type:func plays_binoc_sfx = 0x149508; // type:func PushCplookLookk = 0x1495E8; // type:func LookkPopCplook = 0x149610; // type:func LookkCurCplook = 0x149638; // type:func InitCplookQMARK = 0x149660; // type:func FUN_001496c0 = 0x1496C0; // type:func UpdateCplook = 0x149760; // type:func FUN_0014a7b8 = 0x14A7B8; // type:func InitCpalign = 0x14A888; // type:func FUN_0014a8d0 = 0x14A8D0; // type:func UpdateCpalign = 0x14A8F8; // type:func UpdateCpaseg = 0x14AAA0; // type:func InitCredit = 0x14ABD0; // type:func PostCreditLoad = 0x14AC48; // type:func FUN_0014ad00 = 0x14AD00; // type:func FUN_0014ad70 = 0x14AD70; // type:func FUN_0014ade0 = 0x14ADE0; // type:func FUN_0014aea0 = 0x14AEA0; // type:func FUN_0014af10 = 0x14AF10; // type:func SetCreditLine = 0x14AF38; // type:func CroutDecomp = 0x14B0C0; // type:func CroutSolve = 0x14B3E0; // type:func FUN_0014b550 = 0x14B550; // type:func FUN_0014b588 = 0x14B588; // type:func FUN_0014b5c0 = 0x14B5C0; // type:func FUN_0014b608 = 0x14B608; // type:func FUN_0014b640 = 0x14B640; // type:func FUN_0014b678 = 0x14B678; // type:func FUN_0014b6a8 = 0x14B6A8; // type:func FUN_0014bb08 = 0x14BB08; // type:func FUN_0014bce8 = 0x14BCE8; // type:func FUN_0014bd38 = 0x14BD38; // type:func SgsNextCrfodkAI = 0x14BDC8; // type:func FUN_0014bea8 = 0x14BEA8; // type:func FUN_0014bef8 = 0x14BEF8; // type:func FUN_0014bf88 = 0x14BF88; // type:func FUN_0014c018 = 0x14C018; // type:func FUN_0014c138 = 0x14C138; // type:func FUN_0014c2f0 = 0x14C2F0; // type:func FUN_0014c5e8 = 0x14C5E8; // type:func FUN_0014c668 = 0x14C668; // type:func FUN_0014c6e0 = 0x14C6E0; // type:func FUN_0014c788 = 0x14C788; // type:func FUN_0014c858 = 0x14C858; // type:func FUN_0014cba8 = 0x14CBA8; // type:func FUN_0014cd70 = 0x14CD70; // type:func FUN_0014cdc8 = 0x14CDC8; // type:func FUN_0014cf30 = 0x14CF30; // type:func SMeasureApos = 0x14D0A8; // type:func GWrapApos = 0x14D138; // type:func FUN_0014d1a0 = 0x14D1A0; // type:func EvaluateAposG = 0x14D280; // type:func FindAposClosestPointAll = 0x14D3A8; // type:func FUN_0014d680 = 0x14D680; // type:func FUN_0014d938 = 0x14D938; // type:func PcrvNew = 0x14D9A8; // type:func FUN_0014da38 = 0x14DA38; // type:func FUN_0014da68 = 0x14DA68; // type:func FUN_0014da98 = 0x14DA98; // type:func FUN_0014dbd0 = 0x14DBD0; // type:func DuGetCrvSearchIncrement = 0x14DD00; // type:func LoadCrvlFromBrx = 0x14DD28; // type:func FUN_0014de08 = 0x14DE08; // type:func FUN_0014de40 = 0x14DE40; // type:func RenderCrvlSegment = 0x14DE78; // type:func FUN_0014df68 = 0x14DF68; // type:func FUN_0014df98 = 0x14DF98; // type:func FUN_0014e000 = 0x14E000; // type:func FUN_0014e068 = 0x14E068; // type:func FUN_0014e090 = 0x14E090; // type:func FUN_0014e170 = 0x14E170; // type:func FUN_0014e2a0 = 0x14E2A0; // type:func LoadCrvcFromBrx = 0x14E3D0; // type:func InvalidateCrvcCache = 0x14E500; // type:func FUN_0014e510 = 0x14E510; // type:func EvaluateCrvcFromU = 0x14E5B8; // type:func EvaluateCrvcFromS = 0x14E6A8; // type:func FUN_0014e710 = 0x14E710; // type:func FUN_0014e828 = 0x14E828; // type:func FUN_0014e910 = 0x14E910; // type:func FUN_0014e990 = 0x14E990; // type:func FUN_0014ea48 = 0x14EA48; // type:func FUN_0014eb10 = 0x14EB10; // type:func FUN_0014ec70 = 0x14EC70; // type:func FindCrvcClosestPointFromS = 0x14ED98; // type:func InitDart = 0x14EE40; // type:func FUN_0014ee70 = 0x14EE70; // type:func FUN_0014ef00 = 0x14EF00; // type:func FUN_0014ef40 = 0x14EF40; // type:func LoadDartFromBrx = 0x14EF88; // type:func FUN_0014efb8 = 0x14EFB8; // type:func FUN_0014f020 = 0x14F020; // type:func UpdateDart = 0x14F058; // type:func SetDartDarts = 0x14F110; // type:func FUN_0014f168 = 0x14F168; // type:func UpdateDartAirborne = 0x14F270; // type:func FUN_0014f740 = 0x14F740; // type:func HandleDartgunMessage = 0x14F770; // type:func BindDartgun = 0x14F850; // type:func FUN_0014f920 = 0x14F920; // type:func FUN_0014fa88 = 0x14FA88; // type:func FUN_0014fbe0 = 0x14FBE0; // type:func FUN_0014fc38 = 0x14FC38; // type:func FUN_0014fce8 = 0x14FCE8; // type:func FUN_0014fda8 = 0x14FDA8; // type:func FPrepareDartgunToFire = 0x14FEC0; // type:func FUN_00150008 = 0x150008; // type:func FUN_00150298 = 0x150298; // type:func PratGetDartgunRatTarget = 0x150338; // type:func FUN_00150408 = 0x150408; // type:func AddDartgunTargetAreaTarget = 0x150418; // type:func FUN_001504e0 = 0x1504E0; // type:func LoadDialogFromBrx = 0x150528; // type:func LoadDialogEventsFromBrx = 0x150570; // type:func FUN_001506f0 = 0x1506F0; // type:func FUN_00150750 = 0x150750; // type:func FUN_00150760 = 0x150760; // type:func SetDialogDialogs = 0x150790; // type:func FUN_00150ae8 = 0x150AE8; // type:func onscreen_text_related = 0x150DC0; // type:func FUN_001512a8 = 0x1512A8; // type:func FPauseDialog = 0x151300; // type:func FUN_001516c0 = 0x1516C0; // type:func FUN_001517c0 = 0x1517C0; // type:func FUN_00151860 = 0x151860; // type:func TriggerDialog = 0x1518B8; // type:func UntriggerDialog = 0x1519A8; // type:func FUN_001519e0 = 0x1519E0; // type:func OnDifficultyGameLoad = 0x151A68; // type:func OnDifficultyWorldPreLoad = 0x151A88; // type:func OnDifficultyWorldPostLoad = 0x151D28; // type:func OnDifficultyInitialTeleport = 0x151E18; // type:func OnDifficultyPlayerDeath = 0x151E20; // type:func OnDifficultyTriggerCheckpoint = 0x151ED8; // type:func OnDifficultyCollectKey = 0x151FC8; // type:func OnDifficultyBreak = 0x152010; // type:func ChangeSuck = 0x152410; // type:func InitDl = 0x152438; // type:func ClearDl = 0x152440; // type:func FUN_00152450 = 0x152450; // type:func PdleFromDlEntry = 0x152460; // type:func AppendDlEntry = 0x152470; // type:func FUN_001524d8 = 0x1524D8; // type:func InsertDlEntryBefore = 0x152540; // type:func RemoveDlEntry = 0x152600; // type:func FUN_001526d0 = 0x1526D0; // type:func FIsDlEmpty = 0x152720; // type:func FUN_00152730 = 0x152730; // type:func CPvDl = 0x1527D8; // type:func StartupDma = 0x152810; // type:func DMAS__DMAS = 0x152888; // type:func DMAS__Clear = 0x1528C8; // type:func DMAS__Reset = 0x1528E0; // type:func FUN_001528f0 = 0x1528F0; // type:func FUN_00152938 = 0x152938; // type:func DMAS__AllocStack = 0x152980; // type:func DMAS__AllocStatic = 0x1529C8; // type:func DMAS__Detach = 0x1529E0; // type:func DMAS__DetachCopySw = 0x152A50; // type:func DMAS__Send = 0x152AE0; // type:func DMAS__AddDmaCnt = 0x152B38; // type:func FUN_00152b80 = 0x152B80; // type:func FUN_00152c18 = 0x152C18; // type:func FUN_00152ca0 = 0x152CA0; // type:func FUN_00152ce0 = 0x152CE0; // type:func DMAS__AddDmaEnd = 0x152D30; // type:func DMAS__EndDmaCnt = 0x152D70; // type:func SetDyshShadow = 0x152E48; // type:func FUN_00153328 = 0x153328; // type:func DrawDysh = 0x1533A8; // type:func FUN_00153528 = 0x153528; // type:func ClearDzgSolution = 0x153608; // type:func FUN_001536c8 = 0x1536C8; // type:func FUN_00153780 = 0x153780; // type:func FUN_00153a50 = 0x153A50; // type:func SolveDzg = 0x153EC0; // type:func SolveDzgFric = 0x154088; // type:func ApplyDzg = 0x154370; // type:func FUN_00154880 = 0x154880; // type:func InitEmitb = 0x1549C8; // type:func FUN_00154c10 = 0x154C10; // type:func LoadEmitmeshFromBrx = 0x154C80; // type:func LoadEmitblipColorsFromBrx = 0x154EE0; // type:func LoadEmitterFromBrx = 0x154F98; // type:func FUN_00155080 = 0x155080; // type:func BindEmitterCallback = 0x1550B8; // type:func FUN_001550e8 = 0x1550E8; // type:func FUN_00155270 = 0x155270; // type:func FUN_00155678 = 0x155678; // type:func FUN_001556e8 = 0x1556E8; // type:func PemitbEnsureEmitter = 0x155778; // type:func FUN_001557d0 = 0x1557D0; // type:func ModifyEmitterParticles = 0x155868; // type:func FUN_00155ab0 = 0x155AB0; // type:func FUN_00155f28 = 0x155F28; // type:func FUN_00155f78 = 0x155F78; // type:func FUN_00155f90 = 0x155F90; // type:func FUN_00155fa0 = 0x155FA0; // type:func FPausedEmitter = 0x155FB0; // type:func FUN_00156000 = 0x156000; // type:func FUN_00156030 = 0x156030; // type:func FUN_00156060 = 0x156060; // type:func OnEmitterValuesChanged = 0x156088; // type:func SetEmitterParticleCount = 0x156108; // type:func SetEmitterAutoPause = 0x156178; // type:func FUN_00156188 = 0x156188; // type:func FUN_00156218 = 0x156218; // type:func FUN_00156250 = 0x156250; // type:func FUN_00156288 = 0x156288; // type:func StandardSmokeCloud = 0x1566C8; // type:func FUN_00156718 = 0x156718; // type:func ConvertEmitoPosVec = 0x156F08; // type:func FUN_00156fc8 = 0x156FC8; // type:func ChooseEmitVelocity = 0x157098; // type:func ChooseEmitvVelocityAge = 0x157248; // type:func FUN_00157320 = 0x157320; // type:func EmitBlips = 0x1575D8; // type:func OriginateParticles = 0x1579B0; // type:func FUN_00157b88 = 0x157B88; // type:func EmitParticles = 0x157E00; // type:func FUN_00157ef8 = 0x157EF8; // type:func StockSplashBig = 0x157FF8; // type:func FUN_00158108 = 0x158108; // type:func AddEmitoSkeleton = 0x158198; // type:func BindEmitb = 0x158288; // type:func SetEmitdvEmitb = 0x1583E8; // type:func CalculateEmitdvMatrix = 0x158480; // type:func PostExplLoad = 0x1585F8; // type:func CalculateExplTransform = 0x158630; // type:func ExplodeExpl = 0x158730; // type:func ExplodeExplParams = 0x158778; // type:func LoadExplgFromBrx = 0x1587C8; // type:func FUN_00158980 = 0x158980; // type:func BindExplg = 0x158A10; // type:func ExplodeExplgExplso = 0x158A80; // type:func FUN_00158b00 = 0x158B00; // type:func LoadExploFromBrx = 0x158B30; // type:func FUN_00158c28 = 0x158C28; // type:func FUN_00158c60 = 0x158C60; // type:func FUN_00158d40 = 0x158D40; // type:func PemitbEnsureExplo = 0x158DD8; // type:func FUN_00158e10 = 0x158E10; // type:func FUN_00158e48 = 0x158E48; // type:func HandleExplsMessage = 0x158F10; // type:func ExplodeExplsExplso = 0x158F80; // type:func FUN_00159068 = 0x159068; // type:func FUN_001590a0 = 0x1590A0; // type:func InferExpl = 0x159478; // type:func FireSwTimedExplodeStyles = 0x159588; // type:func PostEyesLoad = 0x1596E0; // type:func SetEyesEyess = 0x159770; // type:func FUN_00159890 = 0x159890; // type:func SetEyesClosed = 0x159A00; // type:func FUN_00159a80 = 0x159A80; // type:func UpdateFader = 0x159AD0; // type:func PfaderNew = 0x159BB0; // type:func RemoveFader = 0x159C28; // type:func FUN_00159ca0 = 0x159CA0; // type:func FUN_00159d00 = 0x159D00; // type:func FUN_00159ed0 = 0x159ED0; // type:func PdlFromSwOid = 0x159F20; // type:func MatchSwObject = 0x159F48; // type:func CploFindSwObjects = 0x15A198; // type:func PloFindSwObject = 0x15A418; // type:func PloFindSwNearest = 0x15A448; // type:func FUN_0015a480 = 0x15A480; // type:func FIsCidDerivedFrom = 0x15A4B8; // type:func CploFindSwObjectsByClass = 0x15A4F0; // type:func FUN_0015a838 = 0x15A838; // type:func PaloFindLoCommonParent = 0x15A868; // type:func InitFlash = 0x15A8B0; // type:func LoadFlashFromBrx = 0x15A918; // type:func UpdateFlash = 0x15A960; // type:func RenderFlashSelf = 0x15A9A8; // type:func FPosFlashWithin = 0x15AA50; // type:func InitFly = 0x15AAE0; // type:func LoadFlyFromBrx = 0x15AC08; // type:func FUN_0015ad80 = 0x15AD80; // type:func FUN_0015ae38 = 0x15AE38; // type:func PostFlyLoad = 0x15AEB0; // type:func PresetFlyAccel = 0x15AF50; // type:func FUN_0015b128 = 0x15B128; // type:func RenderFlySelf = 0x15B4D0; // type:func FUN_0015b720 = 0x15B720; // type:func SetFlyFlys = 0x15B7B8; // type:func FUN_0015bc78 = 0x15BC78; // type:func FFindFlyClosestLandingPos = 0x15BD48; // type:func FUN_0015bef0 = 0x15BEF0; // type:func FUN_0015bfc0 = 0x15BFC0; // type:func FCheckFlyOpenSpaceBelow = 0x15C0A0; // type:func FUN_0015c188 = 0x15C188; // type:func FUN_0015c1c0 = 0x15C1C0; // type:func FUN_0015c200 = 0x15C200; // type:func FUN_0015c260 = 0x15C260; // type:func FUN_0015c2e8 = 0x15C2E8; // type:func FUN_0015c3c0 = 0x15C3C0; // type:func CFont__DxFromPchz = 0x15C418; // type:func FUN_0015c4a8 = 0x15C4A8; // type:func CFont__ClineWrapPchz = 0x15C4E8; // type:func CFont__DrawPchz = 0x15C638; // type:func FUN_0015c8b8 = 0x15C8B8; // type:func CFont__PopScaling = 0x15C900; // type:func FUN_0015c930 = 0x15C930; // type:func CFont__CopyTo = 0x15C9B0; // type:func FUN_0015ca38 = 0x15CA38; // type:func FUN_0015ca60 = 0x15CA60; // type:func CFontBrx__FEnsureLoaded = 0x15CAB8; // type:func CFontBrx__SetupDraw = 0x15CB88; // type:func FUN_0015cc80 = 0x15CC80; // type:func CFontBrx__DxDrawCh = 0x15CD18; // type:func FUN_0015cf70 = 0x15CF70; // type:func FUN_0015d338 = 0x15D338; // type:func CFontBrx__EdgeRect = 0x15D4E0; // type:func CFontBrx__LoadFromBrx = 0x15D8A8; // type:func CFontBrx__PostLoad = 0x15D998; // type:func CFontBrx__PglyffFromCh = 0x15DAB8; // type:func FUN_0015db28 = 0x15DB28; // type:func FUN_0015db80 = 0x15DB80; // type:func CRichText__SetBaseColor = 0x15DBB8; // type:func FUN_0015dbe0 = 0x15DBE0; // type:func FUN_0015df58 = 0x15DF58; // type:func CRichText__Trim = 0x15DFA0; // type:func FUN_0015dff8 = 0x15DFF8; // type:func FUN_0015e068 = 0x15E068; // type:func FUN_0015e1b0 = 0x15E1B0; // type:func CRichText__DxMaxLine = 0x15E1F0; // type:func FUN_0015e290 = 0x15E290; // type:func CRichText__Draw = 0x15E318; // type:func PostFontsLoad = 0x15E5F0; // type:func StartupFrame = 0x15E810; // type:func OpenFrame = 0x15E9F0; // type:func EnsureVu1Code = 0x15EAE0; // type:func FinalizeFrameVifs = 0x15EB20; // type:func FUN_0015ebf0 = 0x15EBF0; // type:func CloseFrame = 0x15EC68; // type:func FUN_0015ed50 = 0x15ED50; // type:func check_anticrack_antigrab = 0x15EDB8; // type:func FrameRenderLoop = 0x15EE80; // type:func FUN_0015ef88 = 0x15EF88; // type:func ClearPendingFrame = 0x15EFE8; // type:func FlushFrames = 0x15F210; // type:func FUN_0015f320 = 0x15F320; // type:func FUN_0015f618 = 0x15F618; // type:func FUN_0015f658 = 0x15F658; // type:func RemergeSwObject = 0x15F678; // type:func FUN_0015f6c0 = 0x15F6C0; // type:func SplinterSwFreezeGroup = 0x15F710; // type:func MergeSwGroup = 0x15F7D8; // type:func FUN_0015f8b0 = 0x15F8B0; // type:func FUN_0015f930 = 0x15F930; // type:func FUN_0015f9a0 = 0x15F9A0; // type:func FUN_0015fa58 = 0x15FA58; // type:func FUN_0015fb28 = 0x15FB28; // type:func FreezeAlo = 0x15FBB8; // type:func FreezeSo = 0x15FCD8; // type:func FUN_0015fd78 = 0x15FD78; // type:func FUN_0015ff58 = 0x15FF58; // type:func PostFrzgLoad = 0x15FF88; // type:func StartupGame = 0x160070; // type:func search_level_by_load_data = 0x1600A0; // type:func search_level_by_id = 0x160110; // type:func get_level_name_by_id = 0x160148; // type:func call_search_level_by_id = 0x160180; // type:func FFindLevel = 0x1601A0; // type:func get_level_completion_by_id = 0x1601D8; // type:func tally_world_completion = 0x160208; // type:func check_game_completion = 0x1602A0; // type:func unlock_intro_cutscene_for_world = 0x160340; // type:func boss_defeated = 0x1603E8; // type:func unlock_endgame_cutscenes = 0x1604B8; // type:func play_ending = 0x160578; // type:func InitGameState = 0x1605E8; // type:func FUN_00160650 = 0x160650; // type:func SetupGame = 0x160690; // type:func UpdateGameState = 0x1607D0; // type:func get_level_state_ptr_by_id = 0x160810; // type:func get_level_state_flags_by_id = 0x160850; // type:func UnloadGame = 0x160880; // type:func RetryGame = 0x1608E0; // type:func StartGame = 0x160918; // type:func FUN_00160948 = 0x160948; // type:func calculate_percent_completion = 0x160B28; // type:func SetCcharm = 0x160C48; // type:func FCharmAvailable = 0x160C58; // type:func PfLookupDialog = 0x160CA0; // type:func clr_8_bytes_1 = 0x160CC8; // type:func FUN_00160ce8 = 0x160CE8; // type:func OnGameAlarmTriggered = 0x160CF0; // type:func OnGameAlarmDisabled = 0x160D00; // type:func grfvault_something = 0x160D10; // type:func set_offset_based_on_worldQMARK = 0x160D30; // type:func CcharmMost = 0x160D98; // type:func reload_post_death = 0x160DA0; // type:func InitGeom = 0x160E80; // type:func CloneGeom = 0x160EA0; // type:func FUN_00161028 = 0x161028; // type:func __4GIFS = 0x1611B8; // type:func GIFS__AddPrimEnd = 0x161200; // type:func GIFS__EndPrim = 0x161278; // type:func GIFS__CheckReg = 0x1612E8; // type:func GIFS__AddPrimBulk = 0x1612F8; // type:func GIFS__AddPrimPack = 0x1613C0; // type:func PackRGBA = 0x161458; // type:func FUN_001614c8 = 0x1614C8; // type:func FUN_00161520 = 0x161520; // type:func FUN_00161588 = 0x161588; // type:func PackXYZF = 0x1615F0; // type:func FUN_00161670 = 0x161670; // type:func PackAD = 0x161708; // type:func GIFS__AddPrimList = 0x161768; // type:func FUN_001617e8 = 0x1617E8; // type:func FUN_00161860 = 0x161860; // type:func FUN_001618c0 = 0x1618C0; // type:func GIFS__AddImage = 0x161958; // type:func FUN_001619c0 = 0x1619C0; // type:func FUN_00161a88 = 0x161A88; // type:func FUN_00161ab0 = 0x161AB0; // type:func FUN_00161b10 = 0x161B10; // type:func FUN_00161b80 = 0x161B80; // type:func FUN_00161bb0 = 0x161BB0; // type:func FUN_00161c00 = 0x161C00; // type:func FUN_00161f70 = 0x161F70; // type:func FUN_00162508 = 0x162508; // type:func GLBS__SetPos = 0x162680; // type:func GLBS__SetRgba = 0x1626A8; // type:func GLBS__SetUv = 0x1626C0; // type:func GLBS__AddVtx = 0x1626D8; // type:func FUN_00162810 = 0x162810; // type:func LoadGlobsetFromBrx = 0x162890; // type:func FUN_00163938 = 0x163938; // type:func FUN_00163990 = 0x163990; // type:func FUN_001639e8 = 0x1639E8; // type:func FUN_00163ed8 = 0x163ED8; // type:func BuildSubglobSinglePass = 0x164868; // type:func FUN_00165588 = 0x165588; // type:func CBinaryInputStream__PostGlobsetLoad = 0x165728; // type:func BindGlobset = 0x165828; // type:func CloneGlobset = 0x165920; // type:func FUN_00165ae8 = 0x165AE8; // type:func UpdateGlobset = 0x165FE0; // type:func FUN_001660a0 = 0x1660A0; // type:func UpdateAloInfluences = 0x1660E8; // type:func FUN_001662a8 = 0x1662A8; // type:func FUN_00166658 = 0x166658; // type:func DrawGlob = 0x166690; // type:func FUN_00167d20 = 0x167D20; // type:func FUN_00167d48 = 0x167D48; // type:func FUN_00167d68 = 0x167D68; // type:func FUN_00167e08 = 0x167E08; // type:func FUN_00167ef0 = 0x167EF0; // type:func FUN_00167f10 = 0x167F10; // type:func BlendDisplayOnBufferMismatch = 0x168130; // type:func FUN_001682c0 = 0x1682C0; // type:func SyncVBlank = 0x1683B8; // type:func SwapGsBuffers = 0x1683E8; // type:func FUN_001684e8 = 0x1684E8; // type:func RestoreGsBuffers = 0x1685B8; // type:func FUN_00168698 = 0x168698; // type:func SendDmaSyncGsFinish = 0x1686E8; // type:func BuildClearGifs = 0x168770; // type:func StartupGs = 0x1688B8; // type:func BlastAqwGifsBothFrames = 0x168A48; // type:func FUN_00168af8 = 0x168AF8; // type:func FadeFramesToBlack = 0x168B68; // type:func ResetGsMemory = 0x168D00; // type:func NLog2 = 0x168D30; // type:func InitGsb = 0x168D68; // type:func ResetGsb = 0x168D78; // type:func IgsAllocGsb = 0x168D88; // type:func FUN_00168d98 = 0x168D98; // type:func BuildClutTex2 = 0x168E78; // type:func FUN_00168f48 = 0x168F48; // type:func FUN_00168fb0 = 0x168FB0; // type:func FUN_00169088 = 0x169088; // type:func FBuildUploadBitmapGifs = 0x1690C0; // type:func UploadBitmaps = 0x1692B0; // type:func PqwGifsBitmapUpload = 0x1693A8; // type:func FUN_001694a0 = 0x1694A0; // type:func FUN_001694f8 = 0x1694F8; // type:func FUN_00169608 = 0x169608; // type:func RebaseSurs = 0x1696B8; // type:func PropagateSurs = 0x169718; // type:func PqwVifsBitmapUpload = 0x169780; // type:func FUN_00169b18 = 0x169B18; // type:func StartupHide = 0x169C58; // type:func ResetHideList = 0x169CA0; // type:func FUN_00169cd8 = 0x169CD8; // type:func FUN_00169d20 = 0x169D20; // type:func FUN_00169d58 = 0x169D58; // type:func FUN_00169d90 = 0x169D90; // type:func FUN_00169dd8 = 0x169DD8; // type:func GetHshapeHidePos = 0x169E20; // type:func FUN_00169fc0 = 0x169FC0; // type:func FUN_0016a100 = 0x16A100; // type:func FUN_0016a140 = 0x16A140; // type:func FUN_0016a178 = 0x16A178; // type:func FUN_0016a1b0 = 0x16A1B0; // type:func FUN_0016a1f8 = 0x16A1F8; // type:func FUN_0016a240 = 0x16A240; // type:func FUN_0016a320 = 0x16A320; // type:func FUN_0016a3a8 = 0x16A3A8; // type:func LoadHbskFromBrx = 0x16A420; // type:func OnHbskAdd__FP4HBSK = 0x16A490; // type:func OnHbskRemove = 0x16A4C8; // type:func CloneHbsk = 0x16A500; // type:func FIgnoreHbskIntersection = 0x16A548; // type:func PresetHbskAccel = 0x16A580; // type:func SetHbskHbsks = 0x16A5F0; // type:func CdartStuckHbsk = 0x16A758; // type:func PdartOldestHbskStuck = 0x16A820; // type:func GetHbskClosestHidePos = 0x16A910; // type:func iterates_levels_something = 0x16AA18; // type:func calls_something = 0x16AB38; // type:func Post_something_load = 0x16AED8; // type:func hideout_set_focus = 0x16AF80; // type:func FTakeStepguardDamage = 0x16B0F8; // type:func start_world_for_first_timeQMARK = 0x16B190; // type:func something = 0x16B300; // type:func FUN_0016b4a0 = 0x16B4A0; // type:func FUN_0016b520 = 0x16B520; // type:func FUN_0016b560 = 0x16B560; // type:func FUN_0016b580 = 0x16B580; // type:func FUN_0016b7a8 = 0x16B7A8; // type:func FUN_0016b860 = 0x16B860; // type:func FUN_0016ba40 = 0x16BA40; // type:func CFont__PushScaling = 0x16BB78; // type:func FUN_0016bba8 = 0x16BBA8; // type:func FUN_0016bdd0 = 0x16BDD0; // type:func FUN_0016bea0 = 0x16BEA0; // type:func FUN_0016c360 = 0x16C360; // type:func FUN_0016c470 = 0x16C470; // type:func LoadHndFromBrx = 0x16C4B8; // type:func FUN_0016c508 = 0x16C508; // type:func SolveAloIK = 0x16C528; // type:func FUN_0016ce00 = 0x16CE00; // type:func LoadJloFromBrx = 0x16CE80; // type:func FUN_0016cf70 = 0x16CF70; // type:func FUN_0016d040 = 0x16D040; // type:func FUN_0016d0c0 = 0x16D0C0; // type:func FUN_0016d128 = 0x16D128; // type:func FUN_0016d1e0 = 0x16D1E0; // type:func FUN_0016d3f0 = 0x16D3F0; // type:func FUN_0016d490 = 0x16D490; // type:func FUN_0016d788 = 0x16D788; // type:func FUN_0016d828 = 0x16D828; // type:func FUN_0016d928 = 0x16D928; // type:func FUN_0016d9a8 = 0x16D9A8; // type:func FUN_0016da00 = 0x16DA00; // type:func FUN_0016dac0 = 0x16DAC0; // type:func FUN_0016dcf0 = 0x16DCF0; // type:func FUN_0016dd00 = 0x16DD00; // type:func FUN_0016dd10 = 0x16DD10; // type:func LoadJlocFromBrx = 0x16DD90; // type:func FUN_0016dde8 = 0x16DDE8; // type:func FUN_0016de20 = 0x16DE20; // type:func FUN_0016df30 = 0x16DF30; // type:func BindJlovol = 0x16DF68; // type:func FUN_0016dfe0 = 0x16DFE0; // type:func StartupJoy = 0x16E0B8; // type:func AddGrfusr = 0x16E0F0; // type:func RemoveGrfusr = 0x16E118; // type:func UpdateGrfjoytFromGrfusr = 0x16E148; // type:func InitJoy = 0x16E1A0; // type:func UpdateJoy = 0x16E238; // type:func SetJoyJoys = 0x16E630; // type:func GetJoyXYDeflection = 0x16E738; // type:func FReadJoy = 0x16E940; // type:func SetJoyBtnHandled = 0x16EC20; // type:func FUN_0016ec38 = 0x16EC38; // type:func StartJoySelection = 0x16EC88; // type:func FUN_0016ec98 = 0x16EC98; // type:func FUN_0016eed0 = 0x16EED0; // type:func UBtnpJoy = 0x16F108; // type:func AddCode = 0x16F188; // type:func _ResetCodes = 0x16F1F8; // type:func _MatchCodes = 0x16F238; // type:func UpdateCodes = 0x16F2E0; // type:func remove_all_fchts = 0x16F408; // type:func AddFcht = 0x16F430; // type:func cheat_activate_chetkido = 0x16F478; // type:func StartupCodes = 0x16F588; // type:func InitJt = 0x16F608; // type:func LoadJtFromBrx = 0x16F7B0; // type:func PostJtLoad = 0x16F810; // type:func FUN_0016fd70 = 0x16FD70; // type:func FUN_001701b0 = 0x1701B0; // type:func FUN_00170410 = 0x170410; // type:func AdjustJtDz = 0x170528; // type:func FUN_001705c8 = 0x1705C8; // type:func UpdateJtInternalXps = 0x170660; // type:func FCheckJtXpBase = 0x170790; // type:func FUN_00170820 = 0x170820; // type:func HandleJtMessage = 0x170960; // type:func FTurnJtToTarget = 0x171180; // type:func FUN_00171238 = 0x171238; // type:func RebuildJtXmg = 0x1719E8; // type:func FMatchJtXmg = 0x171C80; // type:func FUN_00171dd8 = 0x171DD8; // type:func FUN_00171f28 = 0x171F28; // type:func FUN_00171fe0 = 0x171FE0; // type:func CalculateJtToolSpin = 0x172078; // type:func FUN_001721b0 = 0x1721B0; // type:func FUN_00172530 = 0x172530; // type:func FUN_001725e0 = 0x1725E0; // type:func UpdateJtTool = 0x1727B0; // type:func FUN_00172898 = 0x172898; // type:func FUN_00172ae0 = 0x172AE0; // type:func FUN_00172b08 = 0x172B08; // type:func FUN_00172b88 = 0x172B88; // type:func FUN_00172bf8 = 0x172BF8; // type:func FUN_00172cf0 = 0x172CF0; // type:func FUN_00172ee0 = 0x172EE0; // type:func GetJtCpdefiFlatten = 0x1733B8; // type:func FUN_00173708 = 0x173708; // type:func FUN_00173750 = 0x173750; // type:func UpdateJtActive = 0x173888; // type:func UpdateJt = 0x174808; // type:func FUN_00174e20 = 0x174E20; // type:func FUN_00174f50 = 0x174F50; // type:func EnableJtActadj = 0x175078; // type:func SetJtJts = 0x175170; // type:func FUN_001777f8 = 0x1777F8; // type:func FUN_00177800 = 0x177800; // type:func PaloAbsorbWkr = 0x177838; // type:func FUN_00177990 = 0x177990; // type:func FIsJtSoundBase = 0x177E20; // type:func FUN_00177e70 = 0x177E70; // type:func FUN_00177f98 = 0x177F98; // type:func FUN_00178008 = 0x178008; // type:func OnPoAdd = 0x178038; // type:func FUN_00178068 = 0x178068; // type:func FUN_001781e0 = 0x1781E0; // type:func FUN_00178258 = 0x178258; // type:func FUN_00178280 = 0x178280; // type:func FUN_001782c0 = 0x1782C0; // type:func FUN_00178598 = 0x178598; // type:func FUN_00178678 = 0x178678; // type:func FUN_001788f0 = 0x1788F0; // type:func FUN_00178d98 = 0x178D98; // type:func FUN_001790b8 = 0x1790B8; // type:func FUN_001793c0 = 0x1793C0; // type:func FUN_001793f0 = 0x1793F0; // type:func FUN_001794e0 = 0x1794E0; // type:func FUN_00179590 = 0x179590; // type:func FUN_00179690 = 0x179690; // type:func FUN_001796d0 = 0x1796D0; // type:func FUN_00179a68 = 0x179A68; // type:func FUN_0017a6d0 = 0x17A6D0; // type:func FUN_0017a700 = 0x17A700; // type:func FUN_0017a788 = 0x17A788; // type:func FUN_0017a9e0 = 0x17A9E0; // type:func FUN_0017aa40 = 0x17AA40; // type:func FUN_0017ab58 = 0x17AB58; // type:func FUN_0017abe8 = 0x17ABE8; // type:func FUN_0017ad50 = 0x17AD50; // type:func FUN_0017add0 = 0x17ADD0; // type:func FUN_0017ae00 = 0x17AE00; // type:func FUN_0017af38 = 0x17AF38; // type:func FUN_0017b308 = 0x17B308; // type:func FUN_0017b3a8 = 0x17B3A8; // type:func FUN_0017b410 = 0x17B410; // type:func FUN_0017b510 = 0x17B510; // type:func FUN_0017b550 = 0x17B550; // type:func FUN_0017b598 = 0x17B598; // type:func FUN_0017b5d0 = 0x17B5D0; // type:func FUN_0017b610 = 0x17B610; // type:func FUN_0017b648 = 0x17B648; // type:func FUN_0017b710 = 0x17B710; // type:func FUN_0017b7a8 = 0x17B7A8; // type:func FUN_0017b8c0 = 0x17B8C0; // type:func FUN_0017b998 = 0x17B998; // type:func FUN_0017b9d0 = 0x17B9D0; // type:func SetJsgFocus = 0x17BB78; // type:func FUN_0017bc20 = 0x17BC20; // type:func NextJsgJsge = 0x17BCD0; // type:func FUN_0017c428 = 0x17C428; // type:func FUN_0017c660 = 0x17C660; // type:func FUN_0017c718 = 0x17C718; // type:func FUN_0017cda8 = 0x17CDA8; // type:func FUN_0017cde0 = 0x17CDE0; // type:func FUN_0017ce20 = 0x17CE20; // type:func FUN_0017ce80 = 0x17CE80; // type:func FUN_0017cf38 = 0x17CF38; // type:func FUN_0017cfc8 = 0x17CFC8; // type:func FUN_0017cff0 = 0x17CFF0; // type:func FUN_0017d018 = 0x17D018; // type:func FUN_0017d040 = 0x17D040; // type:func FUN_0017d078 = 0x17D078; // type:func FUN_0017d0a0 = 0x17D0A0; // type:func FUN_0017d0d8 = 0x17D0D8; // type:func FUN_0017d100 = 0x17D100; // type:func FUN_0017d148 = 0x17D148; // type:func FUN_0017d180 = 0x17D180; // type:func FUN_0017d1b8 = 0x17D1B8; // type:func FUN_0017d1e8 = 0x17D1E8; // type:func FUN_0017d220 = 0x17D220; // type:func PresetJtAccelJump = 0x17D248; // type:func FUN_0017d5d8 = 0x17D5D8; // type:func FCheckJtSingleEdge = 0x17DCE0; // type:func FUN_0017de88 = 0x17DE88; // type:func FUN_0017e088 = 0x17E088; // type:func PxpFindJtBestEdge = 0x17E3C8; // type:func JtsResetJt = 0x17E6D0; // type:func FUN_0017e710 = 0x17E710; // type:func FUN_0017ece8 = 0x17ECE8; // type:func FUN_0017f018 = 0x17F018; // type:func FUN_0017fac0 = 0x17FAC0; // type:func GetJtJumpVelocity = 0x17FB78; // type:func FUN_0017fc48 = 0x17FC48; // type:func FUN_0017fcc8 = 0x17FCC8; // type:func FUN_0017fd48 = 0x17FD48; // type:func ResetJmtList = 0x17FD70; // type:func FUN_0017fd90 = 0x17FD90; // type:func FUN_0017fdc8 = 0x17FDC8; // type:func FUN_0017fe00 = 0x17FE00; // type:func FUN_0017fe48 = 0x17FE48; // type:func FUN_0017fe90 = 0x17FE90; // type:func LoadKeyholeFromBrx = 0x17FEC0; // type:func DrawKeyholeMask = 0x180108; // type:func DrawKeyhole = 0x180398; // type:func __static_initialization_and_destruction_01 = 0x180E38; // type:func FUN_00180e90 = 0x180E90; // type:func FUN_00180eb0 = 0x180EB0; // type:func FUN_00180ee8 = 0x180EE8; // type:func FUN_00180f20 = 0x180F20; // type:func FUN_00180f68 = 0x180F68; // type:func FUN_00180f98 = 0x180F98; // type:func FUN_00181078 = 0x181078; // type:func FUN_00181448 = 0x181448; // type:func FUN_00181658 = 0x181658; // type:func OnLgnActive = 0x181780; // type:func RenderLgnAll = 0x181818; // type:func FUN_00181a58 = 0x181A58; // type:func FUN_00181a98 = 0x181A98; // type:func FUN_00181af0 = 0x181AF0; // type:func FUN_00181b20 = 0x181B20; // type:func FUN_00181bc8 = 0x181BC8; // type:func FUN_00181d28 = 0x181D28; // type:func FUN_00181d88 = 0x181D88; // type:func FUN_00181da8 = 0x181DA8; // type:func FUN_00181ed0 = 0x181ED0; // type:func FUN_001821b0 = 0x1821B0; // type:func FUN_00182470 = 0x182470; // type:func FUN_001824d8 = 0x1824D8; // type:func FUN_00182548 = 0x182548; // type:func ProjectSwpTransform = 0x182748; // type:func FUN_00182948 = 0x182948; // type:func InitLo = 0x182C18; // type:func PostLoLoad = 0x182C58; // type:func AddLo = 0x182C80; // type:func AddLoHierarchy = 0x182D00; // type:func OnLoAdd = 0x182D48; // type:func RemoveLo = 0x182D50; // type:func FUN_00182dd8 = 0x182DD8; // type:func SetLoSuckHideLimit = 0x182E40; // type:func RemoveLoHierarchy = 0x182E88; // type:func OnLoRemove = 0x182ED0; // type:func SnipLo = 0x182ED8; // type:func FFindLoParent = 0x182F40; // type:func SetLoParent = 0x182F78; // type:func FIsLoInWorld = 0x182FC8; // type:func FUN_00183028 = 0x183028; // type:func FUN_00183058 = 0x183058; // type:func CloneLoHierarchy = 0x1830B0; // type:func CloneLo = 0x1830D8; // type:func FUN_001831e8 = 0x1831E8; // type:func FUN_00183238 = 0x183238; // type:func FUN_00183290 = 0x183290; // type:func FUN_001832c0 = 0x1832C0; // type:func SubscribeLoObject = 0x1832F0; // type:func FUN_00183320 = 0x183320; // type:func SendLoMessage = 0x183350; // type:func LoadLoFromBrx = 0x1833D0; // type:func FMatchesLoName = 0x1833F0; // type:func OidProxyLo = 0x183438; // type:func FUN_00183458 = 0x183458; // type:func GetLoOidProxy = 0x183478; // type:func PostSpliceEventCallback = 0x1834A0; // type:func FFilterSpliceEvent = 0x183668; // type:func HandleLoSpliceEvent = 0x1837E0; // type:func FUN_00183910 = 0x183910; // type:func FUN_00183990 = 0x183990; // type:func FUN_00183a10 = 0x183A10; // type:func FUN_00183a90 = 0x183A90; // type:func FUN_00183b20 = 0x183B20; // type:func FUN_00183bb8 = 0x183BB8; // type:func FUN_00183c38 = 0x183C38; // type:func InitLight = 0x183CC8; // type:func FUN_00183d88 = 0x183D88; // type:func FUN_00183dc0 = 0x183DC0; // type:func FUN_00183df8 = 0x183DF8; // type:func FUN_00183e40 = 0x183E40; // type:func FUN_00183e70 = 0x183E70; // type:func CloneLight = 0x183EA0; // type:func FUN_00183f40 = 0x183F40; // type:func FUN_00183fe0 = 0x183FE0; // type:func FUN_001840b8 = 0x1840B8; // type:func FUN_001840f0 = 0x1840F0; // type:func InvalidateLight = 0x1841B0; // type:func RebuildLightVifs = 0x1841D0; // type:func FUN_00184768 = 0x184768; // type:func FUN_001847f0 = 0x1847F0; // type:func SetLightHighlightColor = 0x184818; // type:func FUN_00184838 = 0x184838; // type:func FUN_00184858 = 0x184858; // type:func FUN_00184878 = 0x184878; // type:func FUN_00184898 = 0x184898; // type:func SetLightDirection = 0x1848B8; // type:func FUN_00184968 = 0x184968; // type:func FUN_00184990 = 0x184990; // type:func FUN_001849d0 = 0x1849D0; // type:func FUN_00184a08 = 0x184A08; // type:func FUN_00184a38 = 0x184A38; // type:func RebuildLightFrustrum = 0x184A70; // type:func UpdateLightBeamGrfzon = 0x184B58; // type:func FUN_00184cd0 = 0x184CD0; // type:func FUN_00184d20 = 0x184D20; // type:func FUN_00184d58 = 0x184D58; // type:func NCmpFindLight = 0x184D78; // type:func PrepareSwLightsForDraw = 0x184DE8; // type:func TwpsFindSwLights = 0x185150; // type:func InitActla = 0x185358; // type:func FUN_001853f0 = 0x1853F0; // type:func PaloGetActlaTarget = 0x185468; // type:func UpdateActla = 0x185498; // type:func GetActlaRotationGoal = 0x185538; // type:func main = 0x185758; // type:func StartupVU0 = 0x185A58; // type:func StartupVU1 = 0x185AC8; // type:func Startup = 0x185B38; // type:func MuFromAmtlk = 0x185C18; // type:func ElasFromAmtlk = 0x185CA0; // type:func PxpAdd = 0x185D20; // type:func RecalcSwXpPos = 0x185F48; // type:func RecalcSwXpMovement = 0x1860A8; // type:func FreeSwXpList = 0x1861E8; // type:func FindClosestPointOnLine = 0x186230; // type:func FUN_00186320 = 0x186320; // type:func ClsgClipSoAllEdges = 0x186450; // type:func ClsgClipSoBspEdges = 0x186568; // type:func CategorizeAlsg = 0x1867C8; // type:func CplsgFindEdgePath = 0x186A70; // type:func FUN_00186ba8 = 0x186BA8; // type:func FUN_00187260 = 0x187260; // type:func MarkSoContactsSphereBsp = 0x1879C0; // type:func MarkSoContactsSphereSphere = 0x187A88; // type:func CalculateCenterContact = 0x187B60; // type:func FMarkSoContactsCenterBsp = 0x187C28; // type:func FClipEdgeToSphere = 0x187D08; // type:func FMarkSoContactsCenterSphere = 0x187E88; // type:func FUN_00187f40 = 0x187F40; // type:func FUN_00188270 = 0x188270; // type:func MATRIX4__PostCopyMatrix3 = 0x1884C0; // type:func FUN_001884e0 = 0x1884E0; // type:func MatMulMatTransMat = 0x188520; // type:func FUN_001885e0 = 0x1885E0; // type:func operatorSTAR = 0x188628; // type:func operatorSTAR1 = 0x188668; // type:func MultiplyMatrix4Vector = 0x188700; // type:func operatorSTAR2 = 0x188740; // type:func TransposeMatrix4 = 0x188770; // type:func AddMatrix4Matrix4 = 0x188810; // type:func LoadRotateMatrixRad = 0x188850; // type:func LoadRotateMatrix = 0x188978; // type:func LoadRotateMatrixEuler = 0x188A20; // type:func LoadMatrixFromPosRot = 0x188B08; // type:func LoadMatrixFromPosRotInverse = 0x188B48; // type:func LoadMatrixFromPosRotScale = 0x188C10; // type:func FUN_00188ce0 = 0x188CE0; // type:func DecomposeRotateMatrixRad = 0x188D28; // type:func DecomposeRotateMatrixEuler = 0x188FD8; // type:func NormalizeRotateMatrix3 = 0x1890A0; // type:func CalculateDmat = 0x189150; // type:func FUN_001891c0 = 0x1891C0; // type:func FUN_00189230 = 0x189230; // type:func FUN_001892a0 = 0x1892A0; // type:func LoadLookAtMatrix__FP6VECTORP7MATRIX3 = 0x189350; // type:func TiltMatUpright = 0x189378; // type:func FInvertMatrix = 0x189438; // type:func FInvertMatrix3 = 0x1897F0; // type:func FUN_00189af0 = 0x189AF0; // type:func FUN_00189b18 = 0x189B18; // type:func FUN_00189c28 = 0x189C28; // type:func BuildRotateVectorsMatrix = 0x189D38; // type:func FUN_00189f58 = 0x189F58; // type:func LoadScaleMatrixScalar = 0x18A008; // type:func LoadScaleMatrixVector = 0x18A040; // type:func LoadRotateVectorMatrix = 0x18A160; // type:func FUN_0018a388 = 0x18A388; // type:func LoadUnknown2FromBrx = 0x18A3B8; // type:func FUN_0018a3f0 = 0x18A3F0; // type:func FUN_0018a510 = 0x18A510; // type:func FUN_0018a628 = 0x18A628; // type:func PsoHitTestCylinderObjects = 0x18A6C0; // type:func FUN_0018a830 = 0x18A830; // type:func FObstructedMbg = 0x18A910; // type:func FUN_0018a9a8 = 0x18A9A8; // type:func FUN_0018aae0 = 0x18AAE0; // type:func FUN_0018ab88 = 0x18AB88; // type:func FUN_0018abf0 = 0x18ABF0; // type:func FUN_0018ac58 = 0x18AC58; // type:func FUN_0018acd0 = 0x18ACD0; // type:func FUN_0018acf0 = 0x18ACF0; // type:func FUN_0018ad88 = 0x18AD88; // type:func FUN_0018ae38 = 0x18AE38; // type:func FUN_0018b2e8 = 0x18B2E8; // type:func FUN_0018b340 = 0x18B340; // type:func FUN_0018b460 = 0x18B460; // type:func FUN_0018b580 = 0x18B580; // type:func FUN_0018b5c0 = 0x18B5C0; // type:func thread_entrypoint = 0x18B600; // type:func creates_a_thread2 = 0x18B670; // type:func FUN_0018b720 = 0x18B720; // type:func validate_thread_id = 0x18B770; // type:func FUN_0018b780 = 0x18B780; // type:func zero29_pos30_neg31 = 0x18B910; // type:func FUN_0018b930 = 0x18B930; // type:func FUN_0018b988 = 0x18B988; // type:func FUN_0018bc90 = 0x18BC90; // type:func FUN_0018bd00 = 0x18BD00; // type:func FUN_0018bd58 = 0x18BD58; // type:func unk_save_related = 0x18BDC8; // type:func FUN_0018bfa8 = 0x18BFA8; // type:func FUN_0018c028 = 0x18C028; // type:func FUN_0018c178 = 0x18C178; // type:func FUN_0018c1a8 = 0x18C1A8; // type:func FUN_0018c1e8 = 0x18C1E8; // type:func calls_calls_wac_related_notcalled = 0x18C250; // type:func FUN_0018c420 = 0x18C420; // type:func load_save_fileQMARK = 0x18C568; // type:func FUN_0018c638 = 0x18C638; // type:func FUN_0018c770 = 0x18C770; // type:func autosaveQMARK = 0x18C7F8; // type:func FUN_0018c888 = 0x18C888; // type:func FUN_0018c9c0 = 0x18C9C0; // type:func FUN_0018ca10 = 0x18CA10; // type:func calls_wac_related_notcalled = 0x18CBF8; // type:func wac_related_notcalled = 0x18CC20; // type:func FUN_0018cdd8 = 0x18CDD8; // type:func FUN_0018cfc0 = 0x18CFC0; // type:func FUN_0018d028 = 0x18D028; // type:func FUN_0018d0a0 = 0x18D0A0; // type:func FUN_0018d168 = 0x18D168; // type:func FUN_0018d1f8 = 0x18D1F8; // type:func FUN_0018d228 = 0x18D228; // type:func FUN_0018d268 = 0x18D268; // type:func FUN_0018d2b0 = 0x18D2B0; // type:func FUN_0018d2e8 = 0x18D2E8; // type:func FUN_0018d328 = 0x18D328; // type:func FUN_0018d368 = 0x18D368; // type:func CFileLocation__Clear = 0x18D410; // type:func PvAllocGlobalImpl = 0x18D4B0; // type:func CheckForOutOfMemory = 0x18D4F8; // type:func PvAllowSwImpl = 0x18D500; // type:func FreeSw = 0x18D550; // type:func PvAllocSwCopyImpl = 0x18D568; // type:func PvAllocSwClearImpl = 0x18D5C0; // type:func InitStackImpl = 0x18D608; // type:func PvAllocStackImpl = 0x18D658; // type:func FUN_0018d6a8 = 0x18D6A8; // type:func FreeStackImpl = 0x18D6F0; // type:func malloc = 0x18D740; // type:func _malloc_r = 0x18D748; // type:func free = 0x18D750; // type:func FUN_0018d758 = 0x18D758; // type:func __builtin_delete = 0x18D778; // type:func CopyAqw = 0x18D780; // type:func CopyAb = 0x18D800; // type:func FUN_0018d8e0 = 0x18D8E0; // type:func LoadMissileFromBrx = 0x18D910; // type:func OnMissileRemove = 0x18D978; // type:func ProjectMissileTransform = 0x18D9B8; // type:func FireMissile = 0x18DA40; // type:func RenderMissileAll = 0x18DB20; // type:func FUN_0018dc88 = 0x18DC88; // type:func FUN_0018dd50 = 0x18DD50; // type:func FUN_0018dd78 = 0x18DD78; // type:func FUN_0018dda0 = 0x18DDA0; // type:func FireAccmiss = 0x18DDD8; // type:func FUN_0018de70 = 0x18DE70; // type:func FireSplmiss = 0x18DEE8; // type:func FUN_0018e040 = 0x18E040; // type:func get_cutscene_pchz_from_oid = 0x18E410; // type:func PchzFriendlyFromCid = 0x18E480; // type:func FUN_0018e4c0 = 0x18E4C0; // type:func FUN_0018e4f0 = 0x18E4F0; // type:func FUN_0018e558 = 0x18E558; // type:func FUN_0018e5e8 = 0x18E5E8; // type:func FUN_0018e678 = 0x18E678; // type:func CQueueOutputIop__Reset = 0x18E6A0; // type:func FUN_0018e6c0 = 0x18E6C0; // type:func FUN_0018e7c0 = 0x18E7C0; // type:func FUN_0018e838 = 0x18E838; // type:func FUN_0018e940 = 0x18E940; // type:func CMpegAudio__Reset = 0x18EA48; // type:func CMpegAudio__Close = 0x18EAA0; // type:func CMpegAudio__FAccept = 0x18EAF8; // type:func CMpegAudio__Update = 0x18EB98; // type:func FUN_0018ec40 = 0x18EC40; // type:func FUN_0018ec80 = 0x18EC80; // type:func FUN_0018eca8 = 0x18ECA8; // type:func FUN_0018ed78 = 0x18ED78; // type:func BuildMpegGifs = 0x18EDA8; // type:func FUN_0018ef78 = 0x18EF78; // type:func cutscene_mgr_unlock_cutscene = 0x18F0E8; // type:func CMpeg__do_executeQMARK = 0x18F148; // type:func CMpeg__Execute = 0x18F198; // type:func CMpeg__Start = 0x18F448; // type:func check_anticrack_vehicles = 0x18F610; // type:func CMpeg__Update = 0x18F6E8; // type:func CMpeg__Finish = 0x18F7D0; // type:func CMpeg__CbDemuxed = 0x18F890; // type:func __static_initialization_and_destruction_02 = 0x18F940; // type:func FUN_0018f968 = 0x18F968; // type:func FUN_0018f988 = 0x18F988; // type:func FUN_0018f9d8 = 0x18F9D8; // type:func FUN_0018fef8 = 0x18FEF8; // type:func FUN_0018ff28 = 0x18FF28; // type:func FUN_0018ffb0 = 0x18FFB0; // type:func FUN_001900a0 = 0x1900A0; // type:func FUN_00190128 = 0x190128; // type:func FUN_00190258 = 0x190258; // type:func FCanPuffcAttack = 0x1903F0; // type:func FUN_00190450 = 0x190450; // type:func FUN_001904e0 = 0x1904E0; // type:func FUN_00190570 = 0x190570; // type:func FUN_00190660 = 0x190660; // type:func FUN_001906f8 = 0x1906F8; // type:func FUN_00190770 = 0x190770; // type:func PcbspExtract = 0x1907E0; // type:func PcgtExtract = 0x1907F0; // type:func PcgtPointInCbspQuick = 0x190810; // type:func FUN_001908c0 = 0x1908C0; // type:func FUN_001909b0 = 0x1909B0; // type:func FUN_001909f0 = 0x1909F0; // type:func FUN_00190e30 = 0x190E30; // type:func IcgvFromPcgv = 0x190EA8; // type:func FUN_00190eb8 = 0x190EB8; // type:func SimplifyApcgvNeighbor = 0x191128; // type:func CposFindPath = 0x191290; // type:func FindClosestPointInCg = 0x191570; // type:func LoadPathzoneFromBrx = 0x1916D0; // type:func FUN_001919f8 = 0x1919F8; // type:func FUN_00191a68 = 0x191A68; // type:func FUN_00191a88 = 0x191A88; // type:func FUN_00191aa8 = 0x191AA8; // type:func FUN_00191ac8 = 0x191AC8; // type:func ChoosePathzoneRandomPoint = 0x191C78; // type:func SetPhase = 0x191E70; // type:func ClearPhase = 0x191EB0; // type:func StartupPipe = 0x191EC0; // type:func ResetPipeList = 0x191EE8; // type:func FUN_00191f08 = 0x191F08; // type:func FUN_00191f68 = 0x191F68; // type:func FUN_00191fa0 = 0x191FA0; // type:func FUN_00191fd8 = 0x191FD8; // type:func FUN_00192020 = 0x192020; // type:func LoadPntFromBrx = 0x192068; // type:func FUN_001920b0 = 0x1920B0; // type:func FUN_001920e0 = 0x1920E0; // type:func LoadUnknown3FromBrx = 0x192150; // type:func FUN_00192190 = 0x192190; // type:func FUN_001921a8 = 0x1921A8; // type:func ClonePo = 0x1921E8; // type:func HandlePoMessage = 0x192230; // type:func OnPoActive = 0x1922E8; // type:func GetPoCpdefi = 0x192380; // type:func FUN_00192418 = 0x192418; // type:func FUN_00192450 = 0x192450; // type:func FUN_00192498 = 0x192498; // type:func FUN_001924c8 = 0x1924C8; // type:func PpoCur = 0x1925F0; // type:func PpoStart = 0x192620; // type:func _IppoFindPo = 0x192688; // type:func FUN_001926d0 = 0x1926D0; // type:func RemovePoFromList = 0x192780; // type:func FUN_00192820 = 0x192820; // type:func OnPoRemove = 0x192850; // type:func SwitchToIppo = 0x192880; // type:func FUN_00192990 = 0x192990; // type:func SwitchToPo = 0x1929D0; // type:func FUN_001929f8 = 0x1929F8; // type:func FUN_00192a38 = 0x192A38; // type:func FUN_00192a70 = 0x192A70; // type:func UpdatePo = 0x192B58; // type:func FUN_00192c58 = 0x192C58; // type:func FUN_00192dd0 = 0x192DD0; // type:func FUN_001930b8 = 0x1930B8; // type:func FUN_001931f0 = 0x1931F0; // type:func CProg__CProg = 0x193210; // type:func CProg__Begin = 0x193270; // type:func CProg__SetRemain = 0x193288; // type:func CProg__End = 0x193300; // type:func CProg__Draw = 0x193318; // type:func AchzFromRespk = 0x193598; // type:func FUN_001935b0 = 0x1935B0; // type:func FUN_00193660 = 0x193660; // type:func render_pause_menuQMARK = 0x1936A0; // type:func FUN_00193e58 = 0x193E58; // type:func FUN_00193ee8 = 0x193EE8; // type:func FUN_001940e8 = 0x1940E8; // type:func FUN_00194278 = 0x194278; // type:func FUN_00194398 = 0x194398; // type:func update_pausemenu_active = 0x1943E8; // type:func FUN_00194d30 = 0x194D30; // type:func gui_draw_start_menuQMARK = 0x194E60; // type:func FUN_00194f00 = 0x194F00; // type:func FUN_00194f38 = 0x194F38; // type:func render_menu = 0x194F80; // type:func FUN_00195928 = 0x195928; // type:func FUN_00195958 = 0x195958; // type:func FUN_001961c0 = 0x1961C0; // type:func FUN_00196330 = 0x196330; // type:func FUN_001963d8 = 0x1963D8; // type:func LoadProxyFromBrx = 0x196410; // type:func FUN_00196810 = 0x196810; // type:func FUN_00196900 = 0x196900; // type:func FUN_00196938 = 0x196938; // type:func LoadPufferFromBrx = 0x1969C0; // type:func FUN_001969f8 = 0x1969F8; // type:func FUN_00196b78 = 0x196B78; // type:func FUN_00196e48 = 0x196E48; // type:func FUN_00196eb0 = 0x196EB0; // type:func PpufftChoosePuffer = 0x1971B8; // type:func FUN_001973d8 = 0x1973D8; // type:func FUN_00197458 = 0x197458; // type:func FUN_001974d8 = 0x1974D8; // type:func FUN_001974f8 = 0x1974F8; // type:func FUN_00197788 = 0x197788; // type:func FUN_00197848 = 0x197848; // type:func FUN_00197a08 = 0x197A08; // type:func FUN_00197a88 = 0x197A88; // type:func FUN_00197f10 = 0x197F10; // type:func FUN_00198090 = 0x198090; // type:func FUN_001980b0 = 0x1980B0; // type:func FUN_001982a0 = 0x1982A0; // type:func FUN_00198318 = 0x198318; // type:func FUN_001984b8 = 0x1984B8; // type:func FUN_00198530 = 0x198530; // type:func FUN_00198570 = 0x198570; // type:func FUN_001986e8 = 0x1986E8; // type:func FUN_00198760 = 0x198760; // type:func FUN_00198860 = 0x198860; // type:func FUN_00198920 = 0x198920; // type:func FUN_00198980 = 0x198980; // type:func LoadSprizeFromBrx = 0x1989B0; // type:func BindSprize = 0x198A88; // type:func FUN_00198b28 = 0x198B28; // type:func FUN_00198bd8 = 0x198BD8; // type:func FUN_00198da8 = 0x198DA8; // type:func EmitSprizeExplosion = 0x198E58; // type:func FUN_00198e98 = 0x198E98; // type:func HandleSprizeMessage = 0x198EF8; // type:func FUN_00198fb0 = 0x198FB0; // type:func FUN_00199000 = 0x199000; // type:func FUN_00199070 = 0x199070; // type:func FUN_001990a8 = 0x1990A8; // type:func PcsFromScprize = 0x1990E0; // type:func FUN_00199138 = 0x199138; // type:func LoadLockFromBrx = 0x199170; // type:func PostLockLoad = 0x1991A8; // type:func LoadLockgFromBrx = 0x1991E0; // type:func PostLockgLoad = 0x199218; // type:func FUN_001993c0 = 0x1993C0; // type:func FUN_001993f0 = 0x1993F0; // type:func LoadClueFromBrx = 0x199428; // type:func FUN_001994c8 = 0x1994C8; // type:func spawn_clue_bottleQMARK = 0x199500; // type:func FUN_00199698 = 0x199698; // type:func OnClueSmack = 0x199850; // type:func FUN_001999d0 = 0x1999D0; // type:func FUN_00199af0 = 0x199AF0; // type:func FUN_00199b18 = 0x199B18; // type:func FUN_00199c10 = 0x199C10; // type:func FUN_00199c58 = 0x199C58; // type:func FUN_00199c78 = 0x199C78; // type:func FUN_00199d08 = 0x199D08; // type:func collect_all_clues = 0x199F38; // type:func set_grfvault = 0x199FF0; // type:func FUN_0019a000 = 0x19A000; // type:func unlock_all_levels_in_world = 0x19A088; // type:func unlock_all_worlds = 0x19A0F0; // type:func FUN_0019a148 = 0x19A148; // type:func FUN_0019a178 = 0x19A178; // type:func FUN_0019a1e0 = 0x19A1E0; // type:func FUN_0019a520 = 0x19A520; // type:func UpdateVaultActive = 0x19A6A8; // type:func FUN_0019ab78 = 0x19AB78; // type:func AddVaultGoadDialog = 0x19AD30; // type:func OpenVault = 0x19AD68; // type:func FUN_0019af00 = 0x19AF00; // type:func FUN_0019af38 = 0x19AF38; // type:func FUN_0019af70 = 0x19AF70; // type:func FUN_0019afa8 = 0x19AFA8; // type:func FUN_0019aff0 = 0x19AFF0; // type:func FUN_0019b038 = 0x19B038; // type:func LoadRatFromBrx = 0x19B0A0; // type:func FUN_0019b188 = 0x19B188; // type:func FUN_0019b1e0 = 0x19B1E0; // type:func FUN_0019b218 = 0x19B218; // type:func FUN_0019b250 = 0x19B250; // type:func FUN_0019b298 = 0x19B298; // type:func FUN_0019b378 = 0x19B378; // type:func RenderRatAll = 0x19BC40; // type:func FUN_0019be08 = 0x19BE08; // type:func ChooseRatFleeTarget = 0x19BE80; // type:func FUN_0019c068 = 0x19C068; // type:func FUN_0019c1c0 = 0x19C1C0; // type:func FUN_0019c3d0 = 0x19C3D0; // type:func FUN_0019c408 = 0x19C408; // type:func FUN_0019c440 = 0x19C440; // type:func LoadRchmFromBrx = 0x19C470; // type:func PostRchmLoad = 0x19C728; // type:func FUN_0019c9c8 = 0x19C9C8; // type:func BuildRchmCoefficients = 0x19CC10; // type:func ConvertRchmIposToRclIoLhub = 0x19CD90; // type:func FUN_0019ce28 = 0x19CE28; // type:func FUN_0019ce38 = 0x19CE38; // type:func FUN_0019ce50 = 0x19CE50; // type:func FUN_0019cec0 = 0x19CEC0; // type:func PtwrMapRchmSafe = 0x19CF68; // type:func FindRchmClosestPoint = 0x19D0E0; // type:func TrackJtTarget = 0x19D2A8; // type:func FUN_0019d338 = 0x19D338; // type:func SubmitRpl = 0x19D410; // type:func NCmpPrplReverseZ = 0x19D468; // type:func CprplPartitionArpl = 0x19D4B0; // type:func RenderSw = 0x19D6C0; // type:func EnsureRenderGlobals = 0x19D860; // type:func EnsureCameraGlobals = 0x19D930; // type:func EnsureScreenCleared = 0x19D968; // type:func FUN_0019da30 = 0x19DA30; // type:func FUN_0019da60 = 0x19DA60; // type:func SetupRpBlotContext = 0x19DAD8; // type:func FUN_0019db20 = 0x19DB20; // type:func FUN_0019db68 = 0x19DB68; // type:func FUN_0019dbb0 = 0x19DBB0; // type:func DrawSw = 0x19DC98; // type:func FillScreenRect = 0x19DDA0; // type:func FUN_0019df48 = 0x19DF48; // type:func PripgNew = 0x19E040; // type:func FUN_0019e0b8 = 0x19E0B8; // type:func FUN_0019e158 = 0x19E158; // type:func OnRipgRemove = 0x19E168; // type:func ProjectRipgTransform = 0x19E220; // type:func UpdateRipg = 0x19E420; // type:func FUN_0019e558 = 0x19E558; // type:func RenderRipgSelf = 0x19E848; // type:func PvtripFromRipt = 0x19E908; // type:func PripNewRipg = 0x19EA78; // type:func InitRip = 0x19EB28; // type:func FUN_0019ebe8 = 0x19EBE8; // type:func AddRipRef = 0x19EC20; // type:func FUN_0019ec30 = 0x19EC30; // type:func FUN_0019ece0 = 0x19ECE0; // type:func ForceRipFade = 0x19ED00; // type:func FBounceRip = 0x19ED58; // type:func FUN_0019f390 = 0x19F390; // type:func UpdateRip = 0x19F560; // type:func FUN_0019f620 = 0x19F620; // type:func FUN_0019f858 = 0x19F858; // type:func FUN_0019f8e8 = 0x19F8E8; // type:func FUN_0019f918 = 0x19F918; // type:func FUN_0019f950 = 0x19F950; // type:func FUN_0019f988 = 0x19F988; // type:func FUN_0019f9d0 = 0x19F9D0; // type:func FUN_0019fa98 = 0x19FA98; // type:func ProjectBubletTransform = 0x19FB08; // type:func FUN_0019fce8 = 0x19FCE8; // type:func FUN_0019fd08 = 0x19FD08; // type:func FUN_0019fd70 = 0x19FD70; // type:func FUN_0019fdc0 = 0x19FDC0; // type:func FUN_0019fe10 = 0x19FE10; // type:func FUN_0019fe50 = 0x19FE50; // type:func RenderFlake = 0x19FF20; // type:func FUN_001a0020 = 0x1A0020; // type:func FUN_001a0040 = 0x1A0040; // type:func RenderSpark = 0x1A00A0; // type:func FUN_001a01b8 = 0x1A01B8; // type:func FUN_001a0258 = 0x1A0258; // type:func FUN_001a0318 = 0x1A0318; // type:func SetTrailTrls = 0x1A0338; // type:func DetachTrail = 0x1A04A0; // type:func FUN_001a05d8 = 0x1A05D8; // type:func RenderTrail = 0x1A0758; // type:func HandleTrailMessage = 0x1A0950; // type:func FUN_001a09c0 = 0x1A09C0; // type:func FUN_001a0a78 = 0x1A0A78; // type:func InitSmokecloud = 0x1A0B20; // type:func FUN_001a0ba0 = 0x1A0BA0; // type:func FUN_001a0c50 = 0x1A0C50; // type:func InitSmack = 0x1A0C98; // type:func FUN_001a0d60 = 0x1A0D60; // type:func RenderSmack = 0x1A0DF0; // type:func FUN_001a0f88 = 0x1A0F88; // type:func FUN_001a0fe8 = 0x1A0FE8; // type:func FUN_001a11c0 = 0x1A11C0; // type:func FUN_001a1398 = 0x1A1398; // type:func FUN_001a1410 = 0x1A1410; // type:func FUN_001a1458 = 0x1A1458; // type:func FUN_001a14a0 = 0x1A14A0; // type:func FUN_001a15d8 = 0x1A15D8; // type:func SetRoseRoses = 0x1A1DF0; // type:func FUN_001a1f40 = 0x1A1F40; // type:func ChpBuildConvexHullXY = 0x1A2070; // type:func FUN_001a22e0 = 0x1A22E0; // type:func CreateStuck = 0x1A2380; // type:func FBounceFlying = 0x1A25F0; // type:func FUN_001a26b0 = 0x1A26B0; // type:func FUN_001a26f8 = 0x1A26F8; // type:func FUN_001a2770 = 0x1A2770; // type:func ProjectLeafTransform = 0x1A2830; // type:func FUN_001a2a68 = 0x1A2A68; // type:func PostFlameEmit = 0x1A2B48; // type:func FUN_001a2d30 = 0x1A2D30; // type:func RenderBullet = 0x1A2D88; // type:func FUN_001a2e68 = 0x1A2E68; // type:func FUN_001a3008 = 0x1A3008; // type:func FUN_001a3128 = 0x1A3128; // type:func FUN_001a31a0 = 0x1A31A0; // type:func InitGlint = 0x1A31F0; // type:func RenderGlint = 0x1A3250; // type:func FUN_001a3598 = 0x1A3598; // type:func FUN_001a35f0 = 0x1A35F0; // type:func ProjectMatchTransform = 0x1A3730; // type:func FUN_001a38f0 = 0x1A38F0; // type:func FUN_001a3990 = 0x1A3990; // type:func FUN_001a39c8 = 0x1A39C8; // type:func FUN_001a3a18 = 0x1A3A18; // type:func LoadRovFromBrx = 0x1A3B20; // type:func PostRovLoad = 0x1A3B58; // type:func UpdateRovActive = 0x1A3C40; // type:func FUN_001a3d40 = 0x1A3D40; // type:func FUN_001a3f40 = 0x1A3F40; // type:func RovsNextRov = 0x1A3FE0; // type:func FUN_001a4070 = 0x1A4070; // type:func RovtsNextRov = 0x1A4258; // type:func SetRovRovts = 0x1A42C8; // type:func FUN_001a43c8 = 0x1A43C8; // type:func FUN_001a44e8 = 0x1A44E8; // type:func FUN_001a4538 = 0x1A4538; // type:func FUN_001a45b8 = 0x1A45B8; // type:func PropagateRovForce = 0x1A4610; // type:func InitRob = 0x1A4718; // type:func RobkCur = 0x1A4898; // type:func FUN_001a48c0 = 0x1A48C0; // type:func FUN_001a4b30 = 0x1A4B30; // type:func FUN_001a4c48 = 0x1A4C48; // type:func FUN_001a4d60 = 0x1A4D60; // type:func FUN_001a4dc0 = 0x1A4DC0; // type:func SetRobRobs = 0x1A4EF0; // type:func FUN_001a5120 = 0x1A5120; // type:func FUN_001a54f8 = 0x1A54F8; // type:func FUN_001a5760 = 0x1A5760; // type:func FUN_001a5b28 = 0x1A5B28; // type:func FUN_001a5c38 = 0x1A5C38; // type:func FUN_001a5c90 = 0x1A5C90; // type:func FUN_001a5d50 = 0x1A5D50; // type:func ReturnedRobRoh = 0x1A5DD8; // type:func ExitedRobRoh = 0x1A5DF8; // type:func KilledRobRoh = 0x1A5F78; // type:func FUN_001a6090 = 0x1A6090; // type:func TakeRobRoc = 0x1A6168; // type:func FChooseRobRoh = 0x1A6238; // type:func FUN_001a6328 = 0x1A6328; // type:func FUN_001a63f8 = 0x1A63F8; // type:func InitRoh = 0x1A6498; // type:func LoadRohFromBrx = 0x1A64F8; // type:func FUN_001a6540 = 0x1A6540; // type:func FUN_001a6588 = 0x1A6588; // type:func FUN_001a65c8 = 0x1A65C8; // type:func MoveRohToTarget = 0x1A6788; // type:func FUN_001a69f8 = 0x1A69F8; // type:func FUN_001a6be0 = 0x1A6BE0; // type:func FUN_001a6de0 = 0x1A6DE0; // type:func FUN_001a6f28 = 0x1A6F28; // type:func FUN_001a6f88 = 0x1A6F88; // type:func LoadRocFromBrx = 0x1A7008; // type:func FUN_001a7050 = 0x1A7050; // type:func PostRocLoad = 0x1A7098; // type:func FUN_001a7128 = 0x1A7128; // type:func PresetRocAccel = 0x1A7230; // type:func FAbsorbRocWkr = 0x1A72B0; // type:func RocsNextRoc = 0x1A7420; // type:func SetRocRocs = 0x1A7480; // type:func FUN_001a7520 = 0x1A7520; // type:func LoadRostFromBrx = 0x1A7550; // type:func FUN_001a7588 = 0x1A7588; // type:func PostRostLoad = 0x1A75D0; // type:func FUN_001a7648 = 0x1A7648; // type:func FUN_001a7698 = 0x1A7698; // type:func SetRostRosts = 0x1A76A0; // type:func FUN_001a7708 = 0x1A7708; // type:func LoadRopFromBrx = 0x1A7750; // type:func PostRopLoad = 0x1A7798; // type:func UpdateRop = 0x1A7800; // type:func SetRopRops = 0x1A7998; // type:func RopsNextRop = 0x1A7AA0; // type:func InitRumble = 0x1A7B20; // type:func FUN_001a7b88 = 0x1A7B88; // type:func FUN_001a7ce8 = 0x1A7CE8; // type:func FUN_001a7d18 = 0x1A7D18; // type:func SetRumbleRums = 0x1A7D98; // type:func StopRumbleActuators = 0x1A7E40; // type:func vibration_flip_on = 0x1A7E70; // type:func reset_settings = 0x1A7E90; // type:func FUN_001a7ee8 = 0x1A7EE8; // type:func FUN_001a7f50 = 0x1A7F50; // type:func InitRwm = 0x1A7FE8; // type:func FUN_001a80e0 = 0x1A80E0; // type:func FUN_001a8110 = 0x1A8110; // type:func FUN_001a8150 = 0x1A8150; // type:func FUN_001a8208 = 0x1A8208; // type:func FUN_001a84c8 = 0x1A84C8; // type:func FUN_001a8590 = 0x1A8590; // type:func FUN_001a86f8 = 0x1A86F8; // type:func FUN_001a8718 = 0x1A8718; // type:func FUN_001a8778 = 0x1A8778; // type:func FUN_001a87a8 = 0x1A87A8; // type:func FUN_001a87e0 = 0x1A87E0; // type:func FUN_001a8820 = 0x1A8820; // type:func FUN_001a88a0 = 0x1A88A0; // type:func FUN_001a89e8 = 0x1A89E8; // type:func FUN_001a8af8 = 0x1A8AF8; // type:func FUN_001a8c50 = 0x1A8C50; // type:func FUN_001a8c90 = 0x1A8C90; // type:func FUN_001a93c8 = 0x1A93C8; // type:func FUN_001a93e8 = 0x1A93E8; // type:func FUN_001a9438 = 0x1A9438; // type:func FUN_001a9498 = 0x1A9498; // type:func FUN_001a94c0 = 0x1A94C0; // type:func FUN_001a95d0 = 0x1A95D0; // type:func FUN_001a97c8 = 0x1A97C8; // type:func FUN_001a9868 = 0x1A9868; // type:func FUN_001a98f8 = 0x1A98F8; // type:func FUN_001a9928 = 0x1A9928; // type:func FUN_001a9960 = 0x1A9960; // type:func FUN_001a99b8 = 0x1A99B8; // type:func FUN_001a99f8 = 0x1A99F8; // type:func FUN_001a9a40 = 0x1A9A40; // type:func FUN_001a9a98 = 0x1A9A98; // type:func FUN_001a9ae8 = 0x1A9AE8; // type:func FUN_001a9c58 = 0x1A9C58; // type:func StartupScreen = 0x1A9C68; // type:func PostBlotsLoad = 0x1A9F78; // type:func FUN_001a9fd0 = 0x1A9FD0; // type:func ForceHideBlots = 0x1AA060; // type:func ForceHideBlots1 = 0x1AA0C0; // type:func RenderBlots = 0x1AA110; // type:func DrawBlots = 0x1AA178; // type:func InitBlot = 0x1AA1F0; // type:func PostBlotLoad = 0x1AA268; // type:func UpdateBlot = 0x1AA298; // type:func SetBlotAchzDraw = 0x1AA4F0; // type:func FUN_001aa5a0 = 0x1AA5A0; // type:func SetBlotFontScale = 0x1AA788; // type:func FUN_001aa790 = 0x1AA790; // type:func DtAppearBlot = 0x1AA898; // type:func DtVisibleBlot = 0x1AA8A0; // type:func DtDisappearBlot = 0x1AA8A8; // type:func SetBlotDtAppear = 0x1AA8B0; // type:func SetBlotDtVisible = 0x1AA8B8; // type:func SetBlotDtDisappear = 0x1AA8C0; // type:func OnBlotReset = 0x1AA8C8; // type:func ShowBlot = 0x1AA8F0; // type:func HideBlot = 0x1AA958; // type:func SetBlotBlots = 0x1AA998; // type:func pfnFIncludeBlotForPeg = 0x1AAAC8; // type:func FUN_001aab20 = 0x1AAB20; // type:func RepositionBlot = 0x1AAB60; // type:func RepositionBlotDependents = 0x1AAEC0; // type:func SetBlotClock = 0x1AAF58; // type:func PostCtrLoad = 0x1AAF88; // type:func UpdateCtr = 0x1AB058; // type:func DrawCtr = 0x1AB198; // type:func FUN_001ab2b8 = 0x1AB2B8; // type:func DtVisibleCtr = 0x1AB5D8; // type:func FUN_001ab600 = 0x1AB600; // type:func FUN_001ab660 = 0x1AB660; // type:func DrawTimer = 0x1AB710; // type:func FUN_001ab890 = 0x1AB890; // type:func SetTimerSpeed = 0x1AB920; // type:func SetTimerExpire = 0x1AB928; // type:func FUN_001ab938 = 0x1AB938; // type:func FUN_001ab958 = 0x1AB958; // type:func RebuildTimerAchzDraw = 0x1AB980; // type:func FUN_001abe20 = 0x1ABE20; // type:func dtvisible_unk_zero_1 = 0x1ABE40; // type:func dtvisible_unk_always_zero = 0x1ABE50; // type:func FUN_001abe70 = 0x1ABE70; // type:func FUN_001ac060 = 0x1AC060; // type:func FUN_001ac0e8 = 0x1AC0E8; // type:func PostNoteLoad = 0x1AC5C0; // type:func SetNoteAchzDraw = 0x1AC638; // type:func DrawNote = 0x1AC700; // type:func FUN_001ac888 = 0x1AC888; // type:func FUN_001ac910 = 0x1AC910; // type:func FUN_001ac990 = 0x1AC990; // type:func FUN_001ac9e0 = 0x1AC9E0; // type:func FUN_001aca30 = 0x1ACA30; // type:func FUN_001aca68 = 0x1ACA68; // type:func DrawTitle = 0x1ACAA8; // type:func PostTotalsLoad = 0x1ACDA0; // type:func FUN_001ace38 = 0x1ACE38; // type:func FUN_001acee0 = 0x1ACEE0; // type:func render_level_info_from_id = 0x1AD088; // type:func render_level_info = 0x1AD0D0; // type:func render_hideout_world_info = 0x1AD1E8; // type:func SetTotalsBlots = 0x1AD320; // type:func ShowTotalsQMARK = 0x1AD378; // type:func HideTotalsQMARK = 0x1AD3B0; // type:func DrawTotals = 0x1AD3F0; // type:func FUN_001ad6a8 = 0x1AD6A8; // type:func FUN_001ad718 = 0x1AD718; // type:func FUN_001ad7b0 = 0x1AD7B0; // type:func FUN_001ad940 = 0x1AD940; // type:func FUN_001ad970 = 0x1AD970; // type:func DrawLetterbox = 0x1ADB00; // type:func FUN_001adc60 = 0x1ADC60; // type:func DrawLogo = 0x1ADD28; // type:func FUN_001adf28 = 0x1ADF28; // type:func FUN_001adff0 = 0x1ADFF0; // type:func FUN_001ae130 = 0x1AE130; // type:func FUN_001ae178 = 0x1AE178; // type:func DrawLineScreen = 0x1AE3B8; // type:func FUN_001ae510 = 0x1AE510; // type:func FUN_001ae758 = 0x1AE758; // type:func FUN_001ae7f8 = 0x1AE7F8; // type:func FUN_001ae820 = 0x1AE820; // type:func FUN_001aea08 = 0x1AEA08; // type:func FUN_001aea70 = 0x1AEA70; // type:func FUN_001aecb0 = 0x1AECB0; // type:func SetSensorSensors = 0x1AECE8; // type:func FCheckSensorObject = 0x1AED78; // type:func FIgnoreSensorObject = 0x1AEE50; // type:func FUN_001aef00 = 0x1AEF00; // type:func FUN_001aef68 = 0x1AEF68; // type:func FUN_001aefa0 = 0x1AEFA0; // type:func FUN_001af0a0 = 0x1AF0A0; // type:func LoadLasenFromBrx = 0x1AF0D0; // type:func FUN_001af108 = 0x1AF108; // type:func FUN_001af3b8 = 0x1AF3B8; // type:func UpdateBusyLasenSenseTimes = 0x1AF508; // type:func UpdateLasen = 0x1AF5C8; // type:func FreezeLasen = 0x1AF7A8; // type:func FUN_001af820 = 0x1AF820; // type:func FUN_001afaf8 = 0x1AFAF8; // type:func FUN_001afbb0 = 0x1AFBB0; // type:func FUN_001b00e8 = 0x1B00E8; // type:func DisableLasen = 0x1B0120; // type:func OnLasenAlarmTriggered = 0x1B0160; // type:func FUN_001b01b0 = 0x1B01B0; // type:func SCalcLasenShapeExtent = 0x1B0360; // type:func FUN_001b0470 = 0x1B0470; // type:func FUN_001b0488 = 0x1B0488; // type:func FUN_001b04a0 = 0x1B04A0; // type:func PostCamsenLoad = 0x1B04D0; // type:func FUN_001b0578 = 0x1B0578; // type:func FUN_001b0838 = 0x1B0838; // type:func FUN_001b0be0 = 0x1B0BE0; // type:func FUN_001b0c68 = 0x1B0C68; // type:func FUN_001b0ea8 = 0x1B0EA8; // type:func FUN_001b0ee0 = 0x1B0EE0; // type:func OnCamsenAlarmTriggered = 0x1B0F70; // type:func SetCamsenSensors = 0x1B0FC0; // type:func SetCamsenCsdts = 0x1B1070; // type:func FUN_001b1158 = 0x1B1158; // type:func FUN_001b11a0 = 0x1B11A0; // type:func UpdatePrsen = 0x1B1238; // type:func SensePrsen = 0x1B1438; // type:func FUN_001b15d0 = 0x1B15D0; // type:func FUN_001b1608 = 0x1B1608; // type:func OnPrsenAlarmTriggered = 0x1B1698; // type:func SetPrsenSensors = 0x1B1710; // type:func UpdatePrsenLoopShader = 0x1B1898; // type:func InitShadow = 0x1B1AC8; // type:func PostShadowLoad = 0x1B1B38; // type:func InvalidateShadowVifs = 0x1B1BF0; // type:func RebuildShadowRegion = 0x1B1BF8; // type:func FUN_001b1cf8 = 0x1B1CF8; // type:func FShadowRadiusSet = 0x1B1D38; // type:func SetShadowNearRadius = 0x1B1D70; // type:func SetShadowFarRadius = 0x1B1DA8; // type:func SetShadowCastPosition = 0x1B1DE0; // type:func SetShadowCastNormal = 0x1B1EC8; // type:func FUN_001b1fb0 = 0x1B1FB0; // type:func FUN_001b1fe0 = 0x1B1FE0; // type:func FUN_001b2010 = 0x1B2010; // type:func SetShadowFrustrumUp = 0x1B2068; // type:func FShadowValid = 0x1B2090; // type:func UpdateShadow = 0x1B2140; // type:func FUN_001b2358 = 0x1B2358; // type:func FUN_001b2640 = 0x1B2640; // type:func FShadowIntersectsSphere = 0x1B26F8; // type:func FUN_001b2790 = 0x1B2790; // type:func LoadShapeFromBrx = 0x1B2840; // type:func SetShapeParent = 0x1B28A8; // type:func Tex0FromTexIframeCtk = 0x1B2988; // type:func PackTexGifs = 0x1B29E0; // type:func LoadClutFromBrx = 0x1B2B50; // type:func LoadColorTablesFromBrx = 0x1B2BA8; // type:func LoadBmpFromBrx = 0x1B2CA8; // type:func LoadBitmapsFromBrx = 0x1B2CF8; // type:func LoadFontsFromBrx = 0x1B2DF8; // type:func LoadTexFromBrx = 0x1B2F00; // type:func LoadShadersFromBrx = 0x1B3040; // type:func UploadPermShaders = 0x1B3450; // type:func PropagateShaders = 0x1B3488; // type:func FillShaders = 0x1B3510; // type:func UnloadShaders = 0x1B40C8; // type:func ConvertRgbToHsv = 0x1B4188; // type:func ConvertHsvToRgb = 0x1B4330; // type:func FUN_001b4580 = 0x1B4580; // type:func FUN_001b4600 = 0x1B4600; // type:func PshdFindShader = 0x1B4688; // type:func SetSaiIframe = 0x1B46E0; // type:func SetSaiDuDv = 0x1B4750; // type:func PropagateSais = 0x1B47C0; // type:func UpdateShaders = 0x1B4878; // type:func CbFromSaak = 0x1B4920; // type:func PvtsaaFromSaak = 0x1B4980; // type:func PsaaLoadFromBrx = 0x1B4A10; // type:func InitSaa = 0x1B4AA0; // type:func FUN_001b4ad0 = 0x1B4AD0; // type:func FUpdatableSaa = 0x1B4B08; // type:func PsaiFromSaaShd = 0x1B4B48; // type:func FUN_001b4b68 = 0x1B4B68; // type:func FUN_001b4bc8 = 0x1B4BC8; // type:func UpdateLoop = 0x1B4C30; // type:func FUN_001b4d48 = 0x1B4D48; // type:func FUN_001b4da8 = 0x1B4DA8; // type:func UpdatePingpong = 0x1B4E18; // type:func FUN_001b4f80 = 0x1B4F80; // type:func FUN_001b4fc0 = 0x1B4FC0; // type:func InitHologram = 0x1B5060; // type:func FUN_001b5108 = 0x1B5108; // type:func NotifyHologramRender = 0x1B5160; // type:func FUN_001b5200 = 0x1B5200; // type:func FUN_001b5278 = 0x1B5278; // type:func SetScrollerMasterSpeeds = 0x1B5388; // type:func FUN_001b5398 = 0x1B5398; // type:func FUN_001b5400 = 0x1B5400; // type:func FUN_001b5488 = 0x1B5488; // type:func FUN_001b54d0 = 0x1B54D0; // type:func SetVecPosad = 0x1B5588; // type:func SetUvPuvqd = 0x1B55A8; // type:func FUN_001b55c0 = 0x1B55C0; // type:func FUN_001b5b58 = 0x1B5B58; // type:func FUN_001b5c40 = 0x1B5C40; // type:func FUN_001b5cd8 = 0x1B5CD8; // type:func FUN_001b5d28 = 0x1B5D28; // type:func FUN_001b5d80 = 0x1B5D80; // type:func CreateSlotheapSw = 0x1B5DD0; // type:func FUN_001b5e30 = 0x1B5E30; // type:func PvAllocSlotheapUnsafe = 0x1B5EA0; // type:func FUN_001b5ec0 = 0x1B5EC0; // type:func PvAllocSlotheapClearImpl = 0x1B5EE0; // type:func FreeSlotheapPv = 0x1B5F28; // type:func LoadSmFromBrx = 0x1B5F50; // type:func FUN_001b61a8 = 0x1B61A8; // type:func PostSmLoadCallback = 0x1B61F0; // type:func PsmaApplySm = 0x1B6290; // type:func FUN_001b6388 = 0x1B6388; // type:func IsmsFindSmOptional = 0x1B63C0; // type:func IsmsFindSmRequired = 0x1B63F8; // type:func OidFromSmIsms = 0x1B6420; // type:func RetractSma = 0x1B6438; // type:func SetSmaGoal = 0x1B64D8; // type:func FUN_001b6568 = 0x1B6568; // type:func FUN_001b6598 = 0x1B6598; // type:func FUN_001b65f8 = 0x1B65F8; // type:func SeekSma = 0x1B6628; // type:func ChooseSmaTransition = 0x1B66A0; // type:func EndSmaTransition = 0x1B6C68; // type:func HandleSmaMessage = 0x1B6CA8; // type:func FUN_001b6cf0 = 0x1B6CF0; // type:func SendSmaMessage = 0x1B6D78; // type:func FUN_001b6df8 = 0x1B6DF8; // type:func NotifySmaSpliceOnEnterState = 0x1B6E28; // type:func FUN_001b6ec8 = 0x1B6EC8; // type:func FUN_001b6f50 = 0x1B6F50; // type:func FUN_001b70b0 = 0x1B70B0; // type:func FUN_001b7128 = 0x1B7128; // type:func FUN_001b71c8 = 0x1B71C8; // type:func FUN_001b7280 = 0x1B7280; // type:func FUN_001b7608 = 0x1B7608; // type:func FUN_001b7638 = 0x1B7638; // type:func OnSmartguardEnteringSgs = 0x1B7790; // type:func FUN_001b7818 = 0x1B7818; // type:func FUN_001b78c0 = 0x1B78C0; // type:func FUN_001b7920 = 0x1B7920; // type:func InitSo = 0x1B7968; // type:func OnSoAdd = 0x1B7A98; // type:func OnSoRemove = 0x1B7B78; // type:func EnableSoPhys = 0x1B7C40; // type:func DisplaceSo = 0x1B7D00; // type:func ImpactSo = 0x1B7F78; // type:func FUN_001b8148 = 0x1B8148; // type:func ExtendSoBounds = 0x1B8420; // type:func UpdateSoBounds = 0x1B8540; // type:func UpdateGeomWorld = 0x1B8820; // type:func FUN_001b8960 = 0x1B8960; // type:func FUN_001b89b8 = 0x1B89B8; // type:func FCanStepguardAttack = 0x1B8A08; // type:func UpdateSoImpacts = 0x1B8A48; // type:func UProjectVector = 0x1B8B30; // type:func FUN_001b8b90 = 0x1B8B90; // type:func CalculateSoAngularEffectWorld = 0x1B8FE8; // type:func FUN_001b9058 = 0x1B9058; // type:func AccelSoTowardMatSpring = 0x1B91A8; // type:func PresetSoAccel = 0x1B9338; // type:func FUN_001b93d8 = 0x1B93D8; // type:func UpdateSo = 0x1B93F8; // type:func SetSoMass = 0x1B9418; // type:func AdjustSoMomint = 0x1B9448; // type:func DiscardSoXps = 0x1B94F0; // type:func UpdateSoPosWorldPrev = 0x1B9680; // type:func TranslateSoToPos = 0x1B9690; // type:func RotateSoToMat = 0x1B97E0; // type:func TranslateSoToPosSafe = 0x1B9860; // type:func FUN_001b99f0 = 0x1B99F0; // type:func FUN_001b9ab0 = 0x1B9AB0; // type:func AddSoAcceleration = 0x1B9AC8; // type:func FUN_001b9ae0 = 0x1B9AE0; // type:func SetSoParent = 0x1B9B50; // type:func ApplySoProxy = 0x1B9C80; // type:func AccelSoTowardMatSmooth = 0x1B9D10; // type:func FUN_001b9f30 = 0x1B9F30; // type:func FUN_001b9fb0 = 0x1B9FB0; // type:func FUN_001ba068 = 0x1BA068; // type:func CloneSo = 0x1BA130; // type:func ApplySoConstraintWorld = 0x1BA2E8; // type:func ApplyConstr = 0x1BA430; // type:func FUN_001ba500 = 0x1BA500; // type:func FUN_001ba528 = 0x1BA528; // type:func FUN_001ba550 = 0x1BA550; // type:func FUN_001ba5b0 = 0x1BA5B0; // type:func LoadSOFromBrx = 0x1BAC30; // type:func FUN_001bb000 = 0x1BB000; // type:func ConstrFromCnstr = 0x1BB028; // type:func FUN_001bb058 = 0x1BB058; // type:func FUN_001bb0c8 = 0x1BB0C8; // type:func FUN_001bb1e0 = 0x1BB1E0; // type:func SendSoMessage = 0x1BB210; // type:func PxpFindSoGround = 0x1BB290; // type:func FUN_001bb3b0 = 0x1BB3B0; // type:func FUN_001bb400 = 0x1BB400; // type:func FUN_001bb450 = 0x1BB450; // type:func FUN_001bb4a0 = 0x1BB4A0; // type:func PsoFindSoPhysHook = 0x1BB540; // type:func FUN_001bb580 = 0x1BB580; // type:func FUN_001bb710 = 0x1BB710; // type:func FUN_001bb800 = 0x1BB800; // type:func FSoInStsoList = 0x1BB9A0; // type:func GenerateSoSpliceTouchingEvents = 0x1BB9D0; // type:func EnsureSoLvo = 0x1BBC38; // type:func ProjectSoLvo = 0x1BBEB8; // type:func ProjectSoTransform = 0x1BC088; // type:func ApplySoImpulse = 0x1BC0E0; // type:func FUN_001bc260 = 0x1BC260; // type:func FAbsorbSoWkr = 0x1BC320; // type:func CloneSoPhys = 0x1BC368; // type:func FUN_001bc4d8 = 0x1BC4D8; // type:func FUN_001bc670 = 0x1BC670; // type:func RenumberSo = 0x1BC760; // type:func CalculateSoEffect = 0x1BC7F8; // type:func PropagateSoForce = 0x1BC828; // type:func DistributeSoEffects = 0x1BC978; // type:func FUN_001bcd00 = 0x1BCD00; // type:func CpxpBuildXpArray = 0x1BD558; // type:func BuildContactGroup = 0x1BD678; // type:func SplitSoFreeze = 0x1BD790; // type:func SortSwGroup = 0x1BD888; // type:func FUN_001bda50 = 0x1BDA50; // type:func SolveSw = 0x1BDD00; // type:func SwapEntries = 0x1BE068; // type:func HeapSort = 0x1BE0A8; // type:func UnloadMusic = 0x1BE1E8; // type:func SbpEnsureBank = 0x1BE268; // type:func SbpEnsureBank1 = 0x1BE4A8; // type:func FUN_001be4d8 = 0x1BE4D8; // type:func FContinuousSound = 0x1BE568; // type:func FUN_001be5e8 = 0x1BE5E8; // type:func FUN_001be5f8 = 0x1BE5F8; // type:func FUN_001be708 = 0x1BE708; // type:func PreloadVag = 0x1BE728; // type:func FPauseForVag = 0x1BE810; // type:func RefreshPambVolPan = 0x1BE860; // type:func FUN_001be8f8 = 0x1BE8F8; // type:func FVagPlaying = 0x1BE980; // type:func StopVag = 0x1BE998; // type:func FUN_001bea28 = 0x1BEA28; // type:func FUN_001bea50 = 0x1BEA50; // type:func KillMusic = 0x1BEA78; // type:func PreloadMusidSongComplete = 0x1BEAC8; // type:func PreloadMusidSong = 0x1BEB10; // type:func StartMusidSong = 0x1BEC58; // type:func PauseMusic = 0x1BECF8; // type:func ContinueMusic = 0x1BED20; // type:func FUN_001bed48 = 0x1BED48; // type:func FUN_001bed70 = 0x1BED70; // type:func FUN_001bed98 = 0x1BED98; // type:func FUN_001bedf8 = 0x1BEDF8; // type:func KillExcitement = 0x1BEE48; // type:func PexcSetExcitement = 0x1BEEF8; // type:func SetIexcCurHigh = 0x1BEF88; // type:func UnsetExcitement = 0x1BF048; // type:func FUN_001bf0d8 = 0x1BF0D8; // type:func FUN_001bf130 = 0x1BF130; // type:func FUN_001bf1f0 = 0x1BF1F0; // type:func CalculateVolPan = 0x1BF200; // type:func PposEar = 0x1BF3D0; // type:func SetDoppler = 0x1BF428; // type:func FUN_001bf578 = 0x1BF578; // type:func FUN_001bf5e0 = 0x1BF5E0; // type:func FUN_001bf620 = 0x1BF620; // type:func PambAlloc = 0x1BF6B8; // type:func DropPamb = 0x1BF718; // type:func RemoveAmb = 0x1BF728; // type:func StopSound = 0x1BF788; // type:func SetPambFrq = 0x1BF7F8; // type:func FUN_001bf8e8 = 0x1BF8E8; // type:func increments_sly_anim_counter = 0x1BF920; // type:func FUN_001bfaf8 = 0x1BFAF8; // type:func ScheduleNextIntermittentSound = 0x1BFBF8; // type:func StartSound = 0x1BFCD8; // type:func VIFE__DrawPrelit = 0x1C0000; // type:func UpdateSounds = 0x1C0070; // type:func 989snd_related__ = 0x1C05D0; // type:func SetMvgkUvol = 0x1C0600; // type:func SetMvgkRvol = 0x1C06A0; // type:func FUN_001c06d8 = 0x1C06D8; // type:func FUN_001c0760 = 0x1C0760; // type:func FUN_001c0790 = 0x1C0790; // type:func KillSoundSystem = 0x1C07B0; // type:func KillSounds = 0x1C0808; // type:func FUN_001c08b0 = 0x1C08B0; // type:func FUN_001c0950 = 0x1C0950; // type:func FUN_001c09d8 = 0x1C09D8; // type:func StartSwIntermittentSounds = 0x1C0B38; // type:func FUN_001c0c08 = 0x1C0C08; // type:func FUN_001c0c50 = 0x1C0C50; // type:func FUN_001c0c68 = 0x1C0C68; // type:func FUN_001c0cb0 = 0x1C0CB0; // type:func FUN_001c0cf0 = 0x1C0CF0; // type:func NextSneakyFootstep = 0x1C0EC0; // type:func InitSpeakerQMARK = 0x1C0F30; // type:func FUN_001c0ff0 = 0x1C0FF0; // type:func FUN_001c1030 = 0x1C1030; // type:func FUN_001c10a8 = 0x1C10A8; // type:func FUN_001c10d8 = 0x1C10D8; // type:func FUN_001c1110 = 0x1C1110; // type:func FUN_001c1148 = 0x1C1148; // type:func LoadSwSpliceFromBrx = 0x1C1190; // type:func PframeFromIsplice = 0x1C1390; // type:func FUN_001c13e8 = 0x1C13E8; // type:func PeopidFind = 0x1C14C0; // type:func FUN_001c1530 = 0x1C1530; // type:func FUN_001c15d8 = 0x1C15D8; // type:func FAppendSpliceListElement = 0x1C1A28; // type:func FUN_001c1ad8 = 0x1C1AD8; // type:func RefSetPvsFromSplice = 0x1C1BF8; // type:func RefSetArgListFromPvs = 0x1C1E48; // type:func RefSetPeopid = 0x1C1F20; // type:func RefGetOption = 0x1C21A0; // type:func RefSetOption = 0x1C2238; // type:func FUN_001c22b8 = 0x1C22B8; // type:func FUN_001c2320 = 0x1C2320; // type:func RefSetArgsFromSplice = 0x1C23B0; // type:func LoadSprBuf = 0x1C2430; // type:func SaveSprBuf = 0x1C25B0; // type:func FUN_001c27b0 = 0x1C27B0; // type:func FUN_001c29c8 = 0x1C29C8; // type:func FUN_001c29e8 = 0x1C29E8; // type:func FUN_001c29f8 = 0x1C29F8; // type:func FUN_001c3028 = 0x1C3028; // type:func FUN_001c30e8 = 0x1C30E8; // type:func FUN_001c3390 = 0x1C3390; // type:func FUN_001c33c8 = 0x1C33C8; // type:func FUN_001c34c8 = 0x1C34C8; // type:func FUN_001c3928 = 0x1C3928; // type:func FUN_001c39a0 = 0x1C39A0; // type:func FUN_001c3b40 = 0x1C3B40; // type:func FUN_001c3c00 = 0x1C3C00; // type:func FUN_001c3d28 = 0x1C3D28; // type:func FUN_001c3d60 = 0x1C3D60; // type:func FUN_001c3e80 = 0x1C3E80; // type:func FUN_001c3eb0 = 0x1C3EB0; // type:func FUN_001c3f68 = 0x1C3F68; // type:func FUN_001c3fc8 = 0x1C3FC8; // type:func FUN_001c4180 = 0x1C4180; // type:func FUN_001c41a0 = 0x1C41A0; // type:func InitStep = 0x1C4458; // type:func PostStepLoad = 0x1C44F0; // type:func LimitStepHands = 0x1C4578; // type:func FUN_001c4618 = 0x1C4618; // type:func FUN_001c4790 = 0x1C4790; // type:func FUN_001c4848 = 0x1C4848; // type:func FUN_001c49c8 = 0x1C49C8; // type:func ReadStepJoystick = 0x1C49E8; // type:func UpdateStepFootfall = 0x1C4A80; // type:func UpdateStepPhys = 0x1C4C20; // type:func FUN_001c4d60 = 0x1C4D60; // type:func UpdateStep = 0x1C4ED0; // type:func FUN_001c4f08 = 0x1C4F08; // type:func FUN_001c4fa0 = 0x1C4FA0; // type:func FUN_001c4ff8 = 0x1C4FF8; // type:func FUN_001c5118 = 0x1C5118; // type:func PresetStepAccelBase = 0x1C5148; // type:func FCheckStepXpBase = 0x1C5248; // type:func AdjustStepNewXp = 0x1C5338; // type:func FUN_001c5388 = 0x1C5388; // type:func FUN_001c53a8 = 0x1C53A8; // type:func FUN_001c53b0 = 0x1C53B0; // type:func FUN_001c53e0 = 0x1C53E0; // type:func UpdateStepXfWorld = 0x1C5438; // type:func AdjustStepXpVelocityBase = 0x1C54D0; // type:func FUN_001c57c8 = 0x1C57C8; // type:func FUN_001c5bf0 = 0x1C5BF0; // type:func AddStepCustomXpsBase = 0x1C5C10; // type:func FUN_001c5d58 = 0x1C5D58; // type:func FUN_001c5db8 = 0x1C5DB8; // type:func SetStepSpinRatio = 0x1C5E50; // type:func FUN_001c5ea8 = 0x1C5EA8; // type:func GetActaddPositionGoal = 0x1C5F18; // type:func GetActaddRotationGoal = 0x1C6028; // type:func SetJtJtcs = 0x1C61E0; // type:func FUN_001c6890 = 0x1C6890; // type:func FUN_001c6928 = 0x1C6928; // type:func FUN_001c6aa8 = 0x1C6AA8; // type:func ChooseJtSweepTarget = 0x1C6D00; // type:func FUN_001c6e58 = 0x1C6E58; // type:func FUN_001c6ed0 = 0x1C6ED0; // type:func FUN_001c6f48 = 0x1C6F48; // type:func LoadStepguardFromBrx = 0x1C7140; // type:func FUN_001c7188 = 0x1C7188; // type:func BindStepguard = 0x1C71E0; // type:func PostStepguardLoadCallback = 0x1C7278; // type:func FUN_001c72a0 = 0x1C72A0; // type:func FCanSmartguardAttack = 0x1C7468; // type:func FUN_001c74e8 = 0x1C74E8; // type:func FUN_001c7520 = 0x1C7520; // type:func FUN_001c75b0 = 0x1C75B0; // type:func FUN_001c7a60 = 0x1C7A60; // type:func FUN_001c7ae0 = 0x1C7AE0; // type:func FUN_001c7b60 = 0x1C7B60; // type:func UpdateStepguardDrive = 0x1C7BE8; // type:func FUN_001c7cb8 = 0x1C7CB8; // type:func SgsNextStepguardAI = 0x1C8010; // type:func SetStepguardGoal = 0x1C8418; // type:func FReachedStepguardGoal = 0x1C84C0; // type:func FFilterStepguardJump = 0x1C84E8; // type:func FUN_001c8590 = 0x1C8590; // type:func FUN_001c8920 = 0x1C8920; // type:func FUN_001c8bc0 = 0x1C8BC0; // type:func FUN_001c8c08 = 0x1C8C08; // type:func OnStepguardWaypointActive = 0x1C8D78; // type:func UpdateStepguardSgs = 0x1C8E28; // type:func SetStepguardSgs = 0x1C8F20; // type:func FUN_001c8fd0 = 0x1C8FD0; // type:func FUN_001c9008 = 0x1C9008; // type:func FUN_001c91c8 = 0x1C91C8; // type:func FUN_001c96b8 = 0x1C96B8; // type:func FUN_001c96d8 = 0x1C96D8; // type:func FUN_001c9990 = 0x1C9990; // type:func FUN_001c9a48 = 0x1C9A48; // type:func HandleStepguardGrfsgsc = 0x1C9A58; // type:func FUN_001c9af8 = 0x1C9AF8; // type:func FUN_001c9cf8 = 0x1C9CF8; // type:func FUN_001c9d50 = 0x1C9D50; // type:func FUN_001c9de0 = 0x1C9DE0; // type:func FUN_001ca468 = 0x1CA468; // type:func FUN_001ca5e0 = 0x1CA5E0; // type:func FValidSgs = 0x1CA600; // type:func FUN_001ca608 = 0x1CA608; // type:func FUN_001ca658 = 0x1CA658; // type:func FUN_001ca6d0 = 0x1CA6D0; // type:func FUN_001ca720 = 0x1CA720; // type:func PasegFindStepguard = 0x1CA758; // type:func LoadStepguardAnimations = 0x1CA7C0; // type:func FUN_001ca898 = 0x1CA898; // type:func LoadStepguardPhys = 0x1CA8E8; // type:func FUN_001ca960 = 0x1CA960; // type:func FUN_001ca998 = 0x1CA998; // type:func FUN_001caa08 = 0x1CAA08; // type:func FUN_001caad0 = 0x1CAAD0; // type:func RebindStepguardEnemy = 0x1CAB10; // type:func FUN_001cac28 = 0x1CAC28; // type:func FUN_001cac30 = 0x1CAC30; // type:func FUN_001cacb0 = 0x1CACB0; // type:func AddStepguardAlarm = 0x1CAD40; // type:func MatchStepguardAnimationPhase = 0x1CAD60; // type:func FUN_001cad98 = 0x1CAD98; // type:func FUN_001caee0 = 0x1CAEE0; // type:func FUN_001caf38 = 0x1CAF38; // type:func SetStepguardPatrolAnimation = 0x1CB328; // type:func FUN_001cb3d0 = 0x1CB3D0; // type:func FUN_001cb578 = 0x1CB578; // type:func FUN_001cb5b8 = 0x1CB5B8; // type:func FUN_001cb618 = 0x1CB618; // type:func FUN_001cb648 = 0x1CB648; // type:func FUN_001cb6f8 = 0x1CB6F8; // type:func BindSgg = 0x1CB7A0; // type:func PostSggLoadCallback = 0x1CB8B8; // type:func EnsureSggCallback = 0x1CBAA0; // type:func PsoEnemySgg = 0x1CBAF8; // type:func FUN_001cbb20 = 0x1CBB20; // type:func FUN_001cbb88 = 0x1CBB88; // type:func FUN_001cbcb8 = 0x1CBCB8; // type:func FAbandonSggSearch = 0x1CBD58; // type:func EnsureSggAlarm = 0x1CBE20; // type:func TriggerSggAlarms = 0x1CBE70; // type:func SetSggSggs = 0x1CBEE8; // type:func FUN_001cc120 = 0x1CC120; // type:func FUN_001cc410 = 0x1CC410; // type:func FUN_001cc490 = 0x1CC490; // type:func CalculateJtHangAccel = 0x1CC818; // type:func PresetJtAccelHang = 0x1CCF98; // type:func FUN_001cd088 = 0x1CD088; // type:func FUN_001cd0c8 = 0x1CD0C8; // type:func CheckJtUnhook = 0x1CD6C0; // type:func UpdateJtHookOx = 0x1CD7E0; // type:func AddJtHookXps = 0x1CD870; // type:func FUN_001cdb28 = 0x1CDB28; // type:func FUN_001cdb70 = 0x1CDB70; // type:func FUN_001cdd98 = 0x1CDD98; // type:func FUN_001cdf78 = 0x1CDF78; // type:func JtbsChooseJtHide = 0x1CDFB8; // type:func MeasureJtJumpToTarget = 0x1CE590; // type:func GetJtRailLanding = 0x1CE800; // type:func FUN_001ce9e8 = 0x1CE9E8; // type:func FUN_001cea58 = 0x1CEA58; // type:func FUN_001ceab8 = 0x1CEAB8; // type:func FUN_001ceb18 = 0x1CEB18; // type:func FUN_001cedf8 = 0x1CEDF8; // type:func FUN_001cee30 = 0x1CEE30; // type:func FUN_001ceec8 = 0x1CEEC8; // type:func FUN_001cf138 = 0x1CF138; // type:func runs_on_cane_hook_grab = 0x1CF158; // type:func FUN_001cffd0 = 0x1CFFD0; // type:func FUN_001d0b20 = 0x1D0B20; // type:func FUN_001d0c78 = 0x1D0C78; // type:func FUN_001d0f20 = 0x1D0F20; // type:func SetJtHfdk = 0x1D1200; // type:func FUN_001d1260 = 0x1D1260; // type:func PresetJtAccelHide = 0x1D12F0; // type:func FUN_001d1478 = 0x1D1478; // type:func PostJtLoadPipe = 0x1D14F0; // type:func FUN_001d1630 = 0x1D1630; // type:func PresetJtAccelPipe = 0x1D1A80; // type:func FUN_001d1bb0 = 0x1D1BB0; // type:func UpdateJtInternalXpsPipe = 0x1D2518; // type:func FUN_001d27c0 = 0x1D27C0; // type:func PlaceJtOnPipe = 0x1D2830; // type:func SetFsp = 0x1D29C8; // type:func UpdateJtActivePowerUp = 0x1D2BB8; // type:func IRotatePowerUp = 0x1D3100; // type:func FUN_001d31d0 = 0x1D31D0; // type:func FUN_001d3290 = 0x1D3290; // type:func FUN_001d32d8 = 0x1D32D8; // type:func FUN_001d3398 = 0x1D3398; // type:func FUN_001d3470 = 0x1D3470; // type:func FUN_001d34e0 = 0x1D34E0; // type:func FUN_001d3500 = 0x1D3500; // type:func FUN_001d35a8 = 0x1D35A8; // type:func FUN_001d3678 = 0x1D3678; // type:func PostStepLoadRun = 0x1D36F0; // type:func CalculateBlrunV = 0x1D39E0; // type:func ProjectStepRunPlant = 0x1D3A38; // type:func FIntersectStepRunPlant = 0x1D3B58; // type:func FReblendAbl2D = 0x1D3C68; // type:func AdjustStepRun = 0x1D3E00; // type:func SetStepRunTarget = 0x1D40A0; // type:func PostJtLoadSidestep = 0x1D4148; // type:func AdjustJtSidestep = 0x1D4348; // type:func SetJtSidestepTarget = 0x1D4698; // type:func PostJtLoadZap = 0x1D4848; // type:func FUN_001d48e8 = 0x1D48E8; // type:func FUN_001d4a98 = 0x1D4A98; // type:func sly_set_unk_callback = 0x1D4C90; // type:func FUN_001d4c98 = 0x1D4C98; // type:func sly_damage_relatedQMARK = 0x1D4D08; // type:func FUN_001d51a0 = 0x1D51A0; // type:func FUN_001d5398 = 0x1D5398; // type:func FUN_001d5418 = 0x1D5418; // type:func FUN_001d5468 = 0x1D5468; // type:func FUN_001d54e0 = 0x1D54E0; // type:func FUN_001d5620 = 0x1D5620; // type:func FUN_001d5678 = 0x1D5678; // type:func FUN_001d5fa8 = 0x1D5FA8; // type:func FUN_001d60b0 = 0x1D60B0; // type:func FUN_001d61c8 = 0x1D61C8; // type:func FUN_001d62e0 = 0x1D62E0; // type:func FUN_001d6608 = 0x1D6608; // type:func FUN_001d66a8 = 0x1D66A8; // type:func FFindJtWaterSurface = 0x1D6A18; // type:func AddJtWaterAcceleration = 0x1D6B18; // type:func FUN_001d6cb0 = 0x1D6CB0; // type:func FUN_001d6da0 = 0x1D6DA0; // type:func FUN_001d6dd8 = 0x1D6DD8; // type:func FUN_001d7018 = 0x1D7018; // type:func FUN_001d7040 = 0x1D7040; // type:func InitZpr = 0x1D7098; // type:func gcc2_compiled. = 0x1D7100; // type:func OSTRM__OSTRM = 0x1D7120; // type:func scePrintf_deci = 0x1D7148; // type:func OSTRM__CbWrite = 0x1D7190; // type:func scePrintf_deci_ = 0x1D72C8; // type:func FUN_001d73a8 = 0x1D73A8; // type:func init_burning_rubber = 0x1D7440; // type:func FUN_001d7778 = 0x1D7778; // type:func GExcludeAlm = 0x1D8470; // type:func UpdateSuvBalance = 0x1D8578; // type:func DsGetTrackRelative = 0x1D86F8; // type:func FUN_001d8740 = 0x1D8740; // type:func UpdateSuvLine = 0x1D87C8; // type:func UpdateSuvHeading = 0x1D8BD0; // type:func UpdateSuvWheels = 0x1D8D90; // type:func UpdateSuvExpls = 0x1D8E40; // type:func BoostSuv = 0x1D92F0; // type:func FUN_001d9338 = 0x1D9338; // type:func UpdateSuvVolumes = 0x1D9488; // type:func UpdateSuvSounds = 0x1D9678; // type:func UpdateSuvPuncher = 0x1D9AC8; // type:func UpdateSuv = 0x1D9C98; // type:func UpdateSuvActive = 0x1D9D78; // type:func FUN_001da170 = 0x1DA170; // type:func FUN_001da320 = 0x1DA320; // type:func FUN_001da7e0 = 0x1DA7E0; // type:func FUN_001daa18 = 0x1DAA18; // type:func FUN_001dac20 = 0x1DAC20; // type:func FUN_001dacb0 = 0x1DACB0; // type:func UpdateSuvShapes = 0x1DAD28; // type:func FUN_001dae18 = 0x1DAE18; // type:func FUN_001dae48 = 0x1DAE48; // type:func OnSuvActive = 0x1DAE68; // type:func HandleSuvMessage = 0x1DAF08; // type:func SetSuvTrack = 0x1DAFB8; // type:func SetSuvLine = 0x1DB0C8; // type:func FUN_001db110 = 0x1DB110; // type:func AddSuvFeature = 0x1DB1E8; // type:func SetSuvSuvs = 0x1DB238; // type:func FUN_001db290 = 0x1DB290; // type:func VecCombo = 0x1DB460; // type:func InitSwDlHash = 0x1DB480; // type:func FUN_001db4c8 = 0x1DB4C8; // type:func DeleteSw = 0x1DB838; // type:func SetupBulkDataFromBrx = 0x1DB928; // type:func LoadBulkDataFromBrx = 0x1DBA38; // type:func SetSwGravity = 0x1DBA90; // type:func FUN_001dbac0 = 0x1DBAC0; // type:func FUN_001dbae0 = 0x1DBAE0; // type:func FUN_001dbb00 = 0x1DBB00; // type:func FOverflowSwLo = 0x1DBB20; // type:func FUN_001dbb50 = 0x1DBB50; // type:func FUN_001dbb90 = 0x1DBB90; // type:func PmqAllocSw = 0x1DBBD8; // type:func FreeSwMqList = 0x1DBC18; // type:func SetSoConstraints = 0x1DBC60; // type:func PostSwCallback = 0x1DBCC8; // type:func ClearSwCallbacks = 0x1DBD40; // type:func ProcessSwCallbacks = 0x1DBE48; // type:func FUN_001dbec8 = 0x1DBEC8; // type:func FUN_001dc0c8 = 0x1DC0C8; // type:func FreeSwStsoList = 0x1DC108; // type:func FUN_001dc150 = 0x1DC150; // type:func PloGetSwProxySource = 0x1DC208; // type:func IntersectSwBoundingBox = 0x1DC238; // type:func FUN_001dc4d0 = 0x1DC4D0; // type:func RemoveOxa = 0x1DC710; // type:func FUN_001dc740 = 0x1DC740; // type:func AddOxa = 0x1DC7B0; // type:func FUN_001dc7d0 = 0x1DC7D0; // type:func FreeSwPoxa = 0x1DC828; // type:func CreateSwDefaultLights = 0x1DC9A0; // type:func LoadUnknown4FromBrx = 0x1DCCC0; // type:func CreateSwPrizes = 0x1DCD28; // type:func LoadSwFromBrx = 0x1DCEA0; // type:func FClipLineHomogeneous = 0x1DD218; // type:func DrawLineWorld = 0x1DD3E0; // type:func FUN_001dd548 = 0x1DD548; // type:func FUN_001dd628 = 0x1DD628; // type:func check_level_status_unlocked = 0x1DD690; // type:func check_level_status_key = 0x1DD6B0; // type:func check_level_status_vault = 0x1DD6D0; // type:func check_level_status_mts = 0x1DD6F0; // type:func verify_level_completion_key = 0x1DD710; // type:func verify_level_completion_vault = 0x1DD758; // type:func verify_level_completion_mts = 0x1DD7A0; // type:func scene_vars_something = 0x1DD7E8; // type:func get_scene_variable = 0x1DD888; // type:func FUN_001dd8e8 = 0x1DD8E8; // type:func FUN_001dd908 = 0x1DD908; // type:func FUN_001dd928 = 0x1DD928; // type:func FUN_001dd950 = 0x1DD950; // type:func SetPlayerSuck = 0x1DD9A0; // type:func FUN_001dd9d8 = 0x1DD9D8; // type:func IncrementSwHandsOff = 0x1DDA20; // type:func DecrementSwHandsOff = 0x1DDA50; // type:func FUN_001dda80 = 0x1DDA80; // type:func FUN_001dda90 = 0x1DDA90; // type:func FUN_001ddab8 = 0x1DDAB8; // type:func set_lighting_value = 0x1DDAC8; // type:func FUN_001ddad0 = 0x1DDAD0; // type:func FUN_001ddb20 = 0x1DDB20; // type:func FUN_001ddb58 = 0x1DDB58; // type:func FUN_001ddbb8 = 0x1DDBB8; // type:func FUN_001ddbf8 = 0x1DDBF8; // type:func FUN_001ddc18 = 0x1DDC18; // type:func FUN_001ddc38 = 0x1DDC38; // type:func FUN_001ddc40 = 0x1DDC40; // type:func FUN_001ddc78 = 0x1DDC78; // type:func FUN_001ddc90 = 0x1DDC90; // type:func FUN_001ddcb0 = 0x1DDCB0; // type:func FUN_001ddcc8 = 0x1DDCC8; // type:func FUN_001ddce0 = 0x1DDCE0; // type:func FUN_001ddd18 = 0x1DDD18; // type:func FUN_001dde90 = 0x1DDE90; // type:func FUN_001de768 = 0x1DE768; // type:func FUN_001de798 = 0x1DE798; // type:func PostTankLoad = 0x1DE808; // type:func FUN_001de910 = 0x1DE910; // type:func FUN_001deb30 = 0x1DEB30; // type:func FUN_001debb8 = 0x1DEBB8; // type:func FUN_001debe8 = 0x1DEBE8; // type:func FUN_001df290 = 0x1DF290; // type:func FUN_001df2c8 = 0x1DF2C8; // type:func FUN_001df520 = 0x1DF520; // type:func FUN_001df5a0 = 0x1DF5A0; // type:func FUN_001df600 = 0x1DF600; // type:func FUN_001df700 = 0x1DF700; // type:func FUN_001dfa10 = 0x1DFA10; // type:func AdjustTankNewXp = 0x1DFA40; // type:func FUN_001dfb08 = 0x1DFB08; // type:func FUN_001dfbe0 = 0x1DFBE0; // type:func FUN_001dfd48 = 0x1DFD48; // type:func ResetTargetList = 0x1DFD70; // type:func FUN_001dfd90 = 0x1DFD90; // type:func FUN_001dfdc8 = 0x1DFDC8; // type:func FUN_001dfe00 = 0x1DFE00; // type:func FUN_001dfe38 = 0x1DFE38; // type:func get_commentary_data_by_level_id = 0x1DFE80; // type:func post_unknown_load = 0x1DFEB8; // type:func FUN_001e00b0 = 0x1E00B0; // type:func gui_set_widget_modeQMARK = 0x1E02C8; // type:func FUN_001e0678 = 0x1E0678; // type:func gui_set_mode_3 = 0x1E0828; // type:func FUN_001e0848 = 0x1E0848; // type:func CchParsePchzInt = 0x1E08F8; // type:func FUN_001e0978 = 0x1E0978; // type:func WriteTftPchz = 0x1E0CD0; // type:func FNegTftUl = 0x1E0E18; // type:func UnRadixFromChConversion = 0x1E0EF8; // type:func CchAchFromUl = 0x1E0F58; // type:func WriteTftUl = 0x1E1028; // type:func FUN_001e1330 = 0x1E1330; // type:func FUN_001e13d0 = 0x1E13D0; // type:func FUN_001e1498 = 0x1E1498; // type:func WriteTftDouble = 0x1E17A8; // type:func FUN_001e1a08 = 0x1E1A08; // type:func CchOstrmPrintf = 0x1E1DB8; // type:func scePrintf_ = 0x1E1EB0; // type:func scePrintf = 0x1E1F10; // type:func FUN_001e1f58 = 0x1E1F58; // type:func sprintf = 0x1E1FD0; // type:func FUN_001e2018 = 0x1E2018; // type:func FUN_001e20b8 = 0x1E20B8; // type:func strlen = 0x1E2100; // type:func strcpy = 0x1E2138; // type:func strcat = 0x1E2180; // type:func strchr = 0x1E21D8; // type:func UpperizePchz = 0x1E2218; // type:func SemaCreate__Fii = 0x1E2268; // type:func FUN_001e22c0 = 0x1E22C0; // type:func EnterCritSect = 0x1E22F8; // type:func FUN_001e2358 = 0x1E2358; // type:func StartupThread = 0x1E2398; // type:func FUN_001e2420 = 0x1E2420; // type:func GetTnfnNose = 0x1E2438; // type:func FUN_001e2520 = 0x1E2520; // type:func FUN_001e25f8 = 0x1E25F8; // type:func LoadTnFromBrx = 0x1E2648; // type:func FUN_001e2758 = 0x1E2758; // type:func FUN_001e2778 = 0x1E2778; // type:func FUN_001e2840 = 0x1E2840; // type:func FUN_001e2870 = 0x1E2870; // type:func FUN_001e2940 = 0x1E2940; // type:func FUN_001e2988 = 0x1E2988; // type:func FUN_001e29a8 = 0x1E29A8; // type:func CalculateTnCrv = 0x1E2A00; // type:func CalculateTnPos = 0x1E2BF0; // type:func FUN_001e2e68 = 0x1E2E68; // type:func FUN_001e30e8 = 0x1E30E8; // type:func FUN_001e31f0 = 0x1E31F0; // type:func FUN_001e4578 = 0x1E4578; // type:func FUN_001e4888 = 0x1E4888; // type:func LoadTbspFromBrx = 0x1E4C48; // type:func FCheckTbspPoint = 0x1E4DC0; // type:func CTransition__CTransition = 0x1E4E38; // type:func CTransition__Set = 0x1E4E80; // type:func CTransition__Execute = 0x1E4EA8; // type:func CTransition__ResetWorld = 0x1E5278; // type:func __static_initialization_and_destruction_03 = 0x1E5328; // type:func _GLOBAL_$I$g_transition = 0x1E5358; // type:func FUN_001e5378 = 0x1E5378; // type:func PostTurretLoad = 0x1E5428; // type:func FUN_001e55d0 = 0x1E55D0; // type:func FUN_001e56a0 = 0x1E56A0; // type:func FUN_001e5750 = 0x1E5750; // type:func FUN_001e5888 = 0x1E5888; // type:func FUN_001e5938 = 0x1E5938; // type:func FUN_001e5c78 = 0x1E5C78; // type:func HandleTurretMessage = 0x1E5CE8; // type:func FUN_001e5da8 = 0x1E5DA8; // type:func FUN_001e5e08 = 0x1E5E08; // type:func InitTv = 0x1E5E70; // type:func PostTvLoad = 0x1E6188; // type:func GetTvItvbMinMax = 0x1E6268; // type:func DrawTvArea = 0x1E62A8; // type:func FUN_001e6600 = 0x1E6600; // type:func DrawTvOutline = 0x1E6C20; // type:func FUN_001e73b8 = 0x1E73B8; // type:func SetTvTvs = 0x1E7440; // type:func FUN_001e7460 = 0x1E7460; // type:func SetTvTvgs = 0x1E7518; // type:func FUN_001e76e0 = 0x1E76E0; // type:func FUN_001e77c0 = 0x1E77C0; // type:func FUN_001e7c60 = 0x1E7C60; // type:func FUN_001e80d8 = 0x1E80D8; // type:func FUN_001e83e0 = 0x1E83E0; // type:func SetTvSpeaker = 0x1E86E0; // type:func SetTvReplace = 0x1E87F0; // type:func FUN_001e8840 = 0x1E8840; // type:func __static_initialization_and_destruction_04 = 0x1E8878; // type:func FUN_001e88b0 = 0x1E88B0; // type:func FUN_001e88d0 = 0x1E88D0; // type:func FUN_001e8948 = 0x1E8948; // type:func PsoPadUbgClosest = 0x1E89F0; // type:func FUN_001e8a50 = 0x1E8A50; // type:func SgsNextUbgAI = 0x1E8D58; // type:func FUN_001e8e08 = 0x1E8E08; // type:func FUN_001e8e48 = 0x1E8E48; // type:func FUN_001e8ef8 = 0x1E8EF8; // type:func FUN_001e8fa8 = 0x1E8FA8; // type:func FUN_001e8fe8 = 0x1E8FE8; // type:func FUN_001e9038 = 0x1E9038; // type:func FUN_001e9088 = 0x1E9088; // type:func FUN_001e90a8 = 0x1E90A8; // type:func PostUiLoad = 0x1E90E8; // type:func UpdateUi = 0x1E9108; // type:func FUN_001e9498 = 0x1E9498; // type:func PopUiActiveBlot = 0x1E9570; // type:func DrawUi = 0x1E9648; // type:func RenderUi = 0x1E9668; // type:func ResetUi = 0x1E9688; // type:func SetUiUis = 0x1E96F8; // type:func SetUiUPause = 0x1E98E8; // type:func FUN_001e9970 = 0x1E9970; // type:func FUN_001e9a10 = 0x1E9A10; // type:func FUN_001e9a68 = 0x1E9A68; // type:func FUN_001e9ad8 = 0x1E9AD8; // type:func check_anticrack_collectibles = 0x1E9B30; // type:func UpdateSwObjects = 0x1E9C78; // type:func UpdateSwPosWorldPrev = 0x1E9E30; // type:func UpdateSwObjects1 = 0x1E9EE8; // type:func UpdateSwDarkening = 0x1EA0A8; // type:func UpdateSw = 0x1EA118; // type:func RadNormalize = 0x1EA408; // type:func GLimitAbs = 0x1EA480; // type:func GSmooth = 0x1EA4B8; // type:func GSmoothA = 0x1EA620; // type:func RadSmooth = 0x1EA728; // type:func RadSmoothA = 0x1EA798; // type:func PosSmooth = 0x1EA818; // type:func SmoothMatrix = 0x1EA918; // type:func NRandInRange = 0x1EAA70; // type:func GRandInRange = 0x1EAAE0; // type:func GRandGaussian = 0x1EAB48; // type:func FFloatsNear = 0x1EAC68; // type:func CSolveQuadratic = 0x1EACA0; // type:func PrescaleClq = 0x1EAD30; // type:func CalculateSinCos = 0x1EAD88; // type:func GTrunc = 0x1EAE78; // type:func GTrunc1 = 0x1EAF28; // type:func GModPositive = 0x1EAFE0; // type:func FitClq = 0x1EB018; // type:func FCheckLm = 0x1EB050; // type:func FCheckAlm = 0x1EB080; // type:func GLimitLm = 0x1EB0F8; // type:func SgnCompareG = 0x1EB128; // type:func Force = 0x1EB160; // type:func MinimizeRange = 0x1EB168; // type:func LoadUnknown5FromBrx = 0x1EB518; // type:func FUN_001eb598 = 0x1EB598; // type:func FUN_001eb608 = 0x1EB608; // type:func FUN_001eb748 = 0x1EB748; // type:func FUN_001ebc88 = 0x1EBC88; // type:func FUN_001ebcd8 = 0x1EBCD8; // type:func FUN_001ebd10 = 0x1EBD10; // type:func FUN_001ebdd0 = 0x1EBDD0; // type:func FUN_001ebeb0 = 0x1EBEB0; // type:func LoadMbgFromBrx = 0x1EBF40; // type:func FUN_001ebfb0 = 0x1EBFB0; // type:func FUN_001ec098 = 0x1EC098; // type:func FUN_001ec0b8 = 0x1EC0B8; // type:func FUN_001ec0d8 = 0x1EC0D8; // type:func FUN_001ec190 = 0x1EC190; // type:func FUN_001ec380 = 0x1EC380; // type:func FUN_001ec3d8 = 0x1EC3D8; // type:func FUN_001ec478 = 0x1EC478; // type:func FUN_001ec528 = 0x1EC528; // type:func FUN_001ec570 = 0x1EC570; // type:func FUN_001ec7a8 = 0x1EC7A8; // type:func FUN_001ec828 = 0x1EC828; // type:func FUN_001ecbc8 = 0x1ECBC8; // type:func FUN_001ecdf8 = 0x1ECDF8; // type:func FUN_001ece98 = 0x1ECE98; // type:func FUN_001ecf10 = 0x1ECF10; // type:func FUN_001ed018 = 0x1ED018; // type:func FUN_001ed020 = 0x1ED020; // type:func FUN_001ed090 = 0x1ED090; // type:func FUN_001ed0d8 = 0x1ED0D8; // type:func FUN_001ed168 = 0x1ED168; // type:func FUN_001ed198 = 0x1ED198; // type:func FUN_001ed1d8 = 0x1ED1D8; // type:func FUN_001ed210 = 0x1ED210; // type:func FUN_001ed278 = 0x1ED278; // type:func FUN_001ed318 = 0x1ED318; // type:func FUN_001ed4c8 = 0x1ED4C8; // type:func FUN_001ed558 = 0x1ED558; // type:func FUN_001ed588 = 0x1ED588; // type:func FUN_001ed5b8 = 0x1ED5B8; // type:func FUN_001ed5d8 = 0x1ED5D8; // type:func FUN_001ed5f8 = 0x1ED5F8; // type:func FUN_001ed618 = 0x1ED618; // type:func SetVectorCylind = 0x1ED650; // type:func SetVectorSphere = 0x1ED6B0; // type:func SProjectVector = 0x1ED738; // type:func GetNormalVectors = 0x1ED780; // type:func GetNormalVector = 0x1ED840; // type:func RadBetweenVectors = 0x1ED908; // type:func FindClosestPointBetweenLines = 0x1EDA80; // type:func FindClosestPointBetweenLineSegments = 0x1EDC08; // type:func CalculateVectorPanTilt = 0x1EDDB0; // type:func ConvertDeulToW = 0x1EDE38; // type:func FCalculateMuzzleVelocity = 0x1EDEF0; // type:func FCalculateMuzzleVelocity1 = 0x1EE090; // type:func FCalculateMuzzleVelocityAngle = 0x1EE290; // type:func LimitVectorLength = 0x1EE2B0; // type:func VIFS__VIFS = 0x1EE318; // type:func VIFS__Align = 0x1EE368; // type:func VIFS__AddVifBaseOffset = 0x1EE3B8; // type:func VIFS__AddVifMscal = 0x1EE3F0; // type:func VIFS__AddVifMscalf = 0x1EE420; // type:func VIFS__AddVifFlush = 0x1EE450; // type:func VIFS__AddVifFlusha = 0x1EE468; // type:func VIFS__AddVifFlushe = 0x1EE480; // type:func VIFS__AddVifStcycl = 0x1EE498; // type:func VIFS__AddVifStrow = 0x1EE4C0; // type:func VIFS__AddVifStmask = 0x1EE528; // type:func VIFS__CbUnpackSetup = 0x1EE560; // type:func VIFS__UnpackHelper = 0x1EE5C8; // type:func AddVifUnpack = 0x1EE668; // type:func VIFS__AddVifUnpackRefs = 0x1EE718; // type:func VIFS__AddVifDirect = 0x1EE7D0; // type:func FUN_001ee850 = 0x1EE850; // type:func VIFS__AddVifGifs = 0x1EE8D0; // type:func InitVismap = 0x1EE900; // type:func LoadVismapFromBrx = 0x1EE930; // type:func GrfzonOneHop = 0x1EE9D0; // type:func ClipVbspSphereOneHop = 0x1EEA40; // type:func ClipVismapSphereOneHop = 0x1EEB60; // type:func ClipVismapPointNoHop = 0x1EEBB0; // type:func InitWater = 0x1EEC60; // type:func PostWaterLoad = 0x1EECE0; // type:func CalculateWaterCurrent = 0x1EED68; // type:func UpdateSwXaList = 0x1EEE50; // type:func UpdateWater = 0x1EEF90; // type:func AddWaterExternalAccelerations = 0x1EF3A8; // type:func HandleWaterMessage = 0x1EF3D8; // type:func UpdateWaterMergeGroup = 0x1EF520; // type:func FUN_001ef5b8 = 0x1EF5B8; // type:func FUN_001ef768 = 0x1EF768; // type:func FUN_001ef808 = 0x1EF808; // type:func FUN_001ef830 = 0x1EF830; // type:func InitWaypoint = 0x1EF838; // type:func PostWaypointLoad = 0x1EF868; // type:func SetWaypointRsmg = 0x1EF8C0; // type:func SetWaypointWps = 0x1EF900; // type:func FUN_001ef9c8 = 0x1EF9C8; // type:func FUN_001efa30 = 0x1EFA30; // type:func AddWpsgWaypoint = 0x1EFA60; // type:func FUN_001efa88 = 0x1EFA88; // type:func UpdateWpsgCallback = 0x1EFB20; // type:func FUN_001efc98 = 0x1EFC98; // type:func InitWipe = 0x1EFCE8; // type:func UpdateWipe = 0x1EFD10; // type:func DrawWipe = 0x1EFEE0; // type:func ActivateWipe = 0x1EFFA0; // type:func SetWipeButtonTrans = 0x1F00C0; // type:func FCatchWipeButtonTrans = 0x1F00F0; // type:func SetWipeWipes = 0x1F0220; // type:func WipeToWorldWarp = 0x1F0428; // type:func FUN_001f0468 = 0x1F0468; // type:func FUN_001f0490 = 0x1F0490; // type:func FUN_001f0580 = 0x1F0580; // type:func FUN_001f0660 = 0x1F0660; // type:func BindWm = 0x1F0758; // type:func FUN_001f0878 = 0x1F0878; // type:func FUN_001f08f0 = 0x1F08F0; // type:func FUN_001f0908 = 0x1F0908; // type:func FUN_001f0ae0 = 0x1F0AE0; // type:func FUN_001f0eb8 = 0x1F0EB8; // type:func FUN_001f0f70 = 0x1F0F70; // type:func SetWmWms = 0x1F1050; // type:func ShowWm = 0x1F1590; // type:func FUN_001f1610 = 0x1F1610; // type:func FUN_001f1648 = 0x1F1648; // type:func FUN_001f17a0 = 0x1F17A0; // type:func SetWmCursor = 0x1F18B0; // type:func FUN_001f1960 = 0x1F1960; // type:func FUN_001f1a08 = 0x1F1A08; // type:func FUN_001f1c90 = 0x1F1C90; // type:func FUN_001f1e38 = 0x1F1E38; // type:func FUN_001f20a8 = 0x1F20A8; // type:func FUN_001f2688 = 0x1F2688; // type:func FUN_001f2758 = 0x1F2758; // type:func ApplyWrGlob = 0x1F2798; // type:func FUN_001f2840 = 0x1F2840; // type:func WarpWrTransform = 0x1F2EF0; // type:func GetWrBounds = 0x1F3140; // type:func UNoise = 0x1F31F8; // type:func UNoise1 = 0x1F3250; // type:func UBias = 0x1F3328; // type:func FUN_001f3358 = 0x1F3358; // type:func UpdateWrMatrixes = 0x1F3408; // type:func AddWrCircleWarp = 0x1F36E8; // type:func AddWrBendWarp = 0x1F3768; // type:func PwreGetWrCur = 0x1F37D8; // type:func FUN_001f3810 = 0x1F3810; // type:func FUN_001f3830 = 0x1F3830; // type:func FUN_001f3850 = 0x1F3850; // type:func FUN_001f38a0 = 0x1F38A0; // type:func AddOnzOnze = 0x1F38F0; // type:func FUN_001f3928 = 0x1F3928; // type:func FUN_001f3990 = 0x1F3990; // type:func InitXfm = 0x1F39F8; // type:func LoadXfmFromBrx = 0x1F3A40; // type:func FUN_001f3a90 = 0x1F3A90; // type:func FUN_001f3af0 = 0x1F3AF0; // type:func ConvertXfmWorldToLocal = 0x1F3B48; // type:func GetXfmPos = 0x1F3BD8; // type:func FUN_001f3c08 = 0x1F3C08; // type:func PwarpFromOid = 0x1F3C38; // type:func LoadWarpFromBrx = 0x1F3D80; // type:func FUN_001f3ee0 = 0x1F3EE0; // type:func FUN_001f3f80 = 0x1F3F80; // type:func TriggerWarp = 0x1F4008; // type:func SetWarpRsmg = 0x1F42D0; // type:func TeleportSwPlayer = 0x1F4318; // type:func FUN_001f4378 = 0x1F4378; // type:func FUN_001f4408 = 0x1F4408; // type:func LoadExitFromBrx = 0x1F4500; // type:func FUN_001f4660 = 0x1F4660; // type:func SetExitExits = 0x1F4760; // type:func TriggerExitQMARK = 0x1F4808; // type:func enter_exit = 0x1F4A30; // type:func UpdateExit = 0x1F4AE0; // type:func FUN_001f4e18 = 0x1F4E18; // type:func PostCameraLoad = 0x1F4E48; // type:func FUN_001f4ed0 = 0x1F4ED0; // type:func FUN_001f4f20 = 0x1F4F20; // type:func FUN_001f4f70 = 0x1F4F70; // type:func FUN_001f4fd8 = 0x1F4FD8; // type:func FUN_001f5008 = 0x1F5008; // type:func FUN_001f51a0 = 0x1F51A0; // type:func FUN_001f51c8 = 0x1F51C8; // type:func FUN_001f51e8 = 0x1F51E8; // type:func FUN_001f5210 = 0x1F5210; // type:func FUN_001f5218 = 0x1F5218; // type:func UpdateVolzp = 0x1F5268; // type:func InitZpd = 0x1F5590; // type:func PostZpdLoad = 0x1F55A8; // type:func FUN_001f56d8 = 0x1F56D8; // type:func InflictZpdZap = 0x1F57E0; // type:func AddZpdZapLo = 0x1F5868; // type:func FUN_001f5930 = 0x1F5930; // type:func memcmp = 0x1F59C4; // type:func memcpy = 0x1F5A58; // type:func memmove = 0x1F5B08; // type:func memset = 0x1F5C0C; // type:func FUN_001f5cd0 = 0x1F5CD0; // type:func srand = 0x1F66F8; // type:func rand = 0x1F6708; // type:func strcmp = 0x1F6738; // type:func FUN_001f6880 = 0x1F6880; // type:func AddIntcHandler = 0x1F6950; // type:func RemoveIntcHandler = 0x1F6960; // type:func AddDmacHandler = 0x1F6970; // type:func AddDmacHandler1 = 0x1F6980; // type:func RemoveDmacHandler = 0x1F6990; // type:func _EnableIntc = 0x1F69A0; // type:func _DisableIntc = 0x1F69B0; // type:func _EnableDmac = 0x1F69C0; // type:func _DisableDmac = 0x1F69D0; // type:func SetAlarm = 0x1F69E0; // type:func CreateThread = 0x1F6A10; // type:func StartThread = 0x1F6A20; // type:func ExitDeleteThread = 0x1F6A30; // type:func ChangeThreadPriority = 0x1F6A50; // type:func RotateThreadReadyQueue = 0x1F6A70; // type:func GetThreadId = 0x1F6A90; // type:func ReferThreadStatus = 0x1F6AA0; // type:func WakeupThread = 0x1F6AC0; // type:func _iWakeupThread = 0x1F6AD0; // type:func SuspendThread = 0x1F6AF0; // type:func CreateSema = 0x1F6B20; // type:func DeleteSema = 0x1F6B30; // type:func SignalSema = 0x1F6B40; // type:func iSignalSema = 0x1F6B50; // type:func WaitSema = 0x1F6B60; // type:func PollSema = 0x1F6B70; // type:func SetOsdConfigParam = 0x1F6B90; // type:func GetOsdConfigParam = 0x1F6BA0; // type:func FlushCache = 0x1F6C20; // type:func sceSifStopDma = 0x1F6C40; // type:func GsGetIMR = 0x1F6C60; // type:func GsPutIMR = 0x1F6C70; // type:func sceSifDmaStat = 0x1F6C90; // type:func sceSifSetDma = 0x1F6CA0; // type:func isceSifSetDma = 0x1F6CB0; // type:func sceSifSetDChain = 0x1F6CC0; // type:func isceSifSetDChain = 0x1F6CD0; // type:func sceSifSetReg = 0x1F6CE0; // type:func sceSifGetReg = 0x1F6CF0; // type:func Deci2Call = 0x1F6D10; // type:func GetMemorySize = 0x1F6D20; // type:func _InitTLB = 0x1F6D30; // type:func FUN_001f6d40 = 0x1F6D40; // type:func EnableIntc = 0x1F6DA8; // type:func DisableDmac = 0x1F6E10; // type:func FUN_001f6e78 = 0x1F6E78; // type:func SetSyscall = 0x1F6EE0; // type:func FUN_001f6ef0 = 0x1F6EF0; // type:func RFU091 = 0x1F6F38; // type:func InitAlarm1 = 0x1F6F48; // type:func topThread = 0x1F7020; // type:func InitThread = 0x1F70F8; // type:func iWakeupThread = 0x1F71D0; // type:func kputchar = 0x1F7270; // type:func deci2Putchar = 0x1F72A8; // type:func serialPutchar = 0x1F7358; // type:func ftoi = 0x1F7390; // type:func FUN_001f7420 = 0x1F7420; // type:func _printf = 0x1F7588; // type:func kprintf = 0x1F7B50; // type:func printf = 0x1F7B88; // type:func sceSifInitRpc = 0x1F7BE8; // type:func sceSifExitRpc = 0x1F7D88; // type:func _sceRpcGetPacket = 0x1F7DB0; // type:func _sceRpcFreePacket = 0x1F7E58; // type:func _sceRpcGetFPacket = 0x1F7E78; // type:func _request_end = 0x1F7EA8; // type:func FUN_001f7f60 = 0x1F7F60; // type:func _search_svdata = 0x1F7FC0; // type:func _request_bind = 0x1F8010; // type:func sceSifBindRpc = 0x1F80C0; // type:func sceSifCallRpc = 0x1F8290; // type:func sceSifCheckStatRpc = 0x1F8480; // type:func _sceFsIobSemaMK = 0x1F84D8; // type:func get_iob = 0x1F8538; // type:func FUN_001f85a8 = 0x1F85A8; // type:func _sceFsSemInit = 0x1F8968; // type:func _sceFsWaitS = 0x1F89B8; // type:func _sceFsSigSema = 0x1F89E8; // type:func FUN_001f8a28 = 0x1F8A28; // type:func sceFsReset = 0x1F8BF8; // type:func sceClose = 0x1F8C38; // type:func sceRead = 0x1F8DB8; // type:func FUN_001f9028 = 0x1F9028; // type:func sceIoctl = 0x1F92E8; // type:func _lf_bind = 0x1F9690; // type:func _lf_version = 0x1F9790; // type:func sceSifLoadFileReset = 0x1F9820; // type:func _sceSifLoadModule = 0x1F9868; // type:func sceSifLoadModule = 0x1F9A90; // type:func sceSifResetIop = 0x1F9AD8; // type:func sceSifSyncIop = 0x1F9C18; // type:func sceSifRebootIop = 0x1F9C50; // type:func DIntr = 0x1F9D60; // type:func EIntr = 0x1F9DA8; // type:func supplement_crt0 = 0x1F9DC0; // type:func FindAddress = 0x1F9E40; // type:func GetSystemCallTableEntry = 0x1F9E50; // type:func SetSyscall1 = 0x1F9E90; // type:func _InitSys = 0x1F9EA8; // type:func SetSyscall2 = 0x1F9EE8; // type:func FUN_001f9ef8 = 0x1F9EF8; // type:func RFU0911 = 0x1F9F40; // type:func PatchIsNeeded = 0x1F9F50; // type:func InitExecPS2 = 0x1F9FB8; // type:func InitTLB = 0x1FA068; // type:func Exit = 0x1FA078; // type:func sceResetttyinit = 0x1FA0A0; // type:func FUN_001fa0d8 = 0x1FA0D8; // type:func kill = 0x1FA0E0; // type:func kputs = 0x1FA140; // type:func sceSifGetSreg = 0x1FA1C0; // type:func sceSifInitCmd = 0x1FA1E8; // type:func sceSifExitCmd = 0x1FA468; // type:func sceSifAddCmdHandler = 0x1FA4A0; // type:func sceSifRemoveCmdHandler = 0x1FA4D0; // type:func _sceSifSendCmd = 0x1FA4F8; // type:func sceSifSendCmd = 0x1FA630; // type:func _sceSifCmdIntrHdlr = 0x1FA6B0; // type:func sceSifWriteBackDCache = 0x1FA7D8; // type:func iReferEventFlagStatus = 0x1FA890; // type:func kCopy = 0x1FA8A0; // type:func RFU0912 = 0x1FA8D8; // type:func SetSyscall3 = 0x1FA8E8; // type:func _SetTLBEntry = 0x1FA9B0; // type:func InitTLB1 = 0x1FA9C0; // type:func InitTLB32MB = 0x1FAA00; // type:func _kExitTLBHandler = 0x1FAC40; // type:func __main = 0x1FAE18; // type:func __divdi3 = 0x1FAE38; // type:func __fixunsdfdi = 0x1FB528; // type:func __floatdidf = 0x1FB618; // type:func __floatdisf = 0x1FB6B0; // type:func FUN_001fb790 = 0x1FB790; // type:func FUN_001fbe00 = 0x1FBE00; // type:func __umoddi3 = 0x1FC3D0; // type:func __pack_d = 0x1FC910; // type:func __unpack_d = 0x1FCA40; // type:func _fpadd_parts = 0x1FCAE0; // type:func dpadd = 0x1FCD20; // type:func dpsub = 0x1FCD78; // type:func dpmul = 0x1FCDE0; // type:func FUN_001fd088 = 0x1FD088; // type:func __fpcmp_parts_d = 0x1FD1F0; // type:func dpcmp = 0x1FD308; // type:func litodp = 0x1FD358; // type:func dptoli = 0x1FD410; // type:func dptoul = 0x1FD4A8; // type:func __make_dp = 0x1FD548; // type:func dptofp = 0x1FD578; // type:func FUN_001fd5d0 = 0x1FD5D0; // type:func __unpack_f = 0x1FD6E0; // type:func FUN_001fd7a0 = 0x1FD7A0; // type:func __make_fp = 0x1FD838; // type:func fptodp = 0x1FD868; // type:func gcc2_compiled.1 = 0x1FD8A8; // type:func FUN_001fd920 = 0x1FD920; // type:func __terminate = 0x1FD930; // type:func __throw_type_match = 0x1FD958; // type:func new_eh_context = 0x1FD990; // type:func FUN_001fd9e8 = 0x1FD9E8; // type:func __get_eh_info = 0x1FDA10; // type:func eh_context_initialize = 0x1FDA38; // type:func eh_context_static = 0x1FDA60; // type:func FUN_001fdac8 = 0x1FDAC8; // type:func FUN_001fdaf0 = 0x1FDAF0; // type:func old_find_exception_handler = 0x1FDDD8; // type:func find_exception_handler = 0x1FDEB0; // type:func get_reg_addr = 0x1FDFF8; // type:func copy_reg = 0x1FE080; // type:func next_stack_level = 0x1FE100; // type:func __unwinding_cleanup = 0x1FE190; // type:func throw_helper = 0x1FE198; // type:func FUN_001fe4c8 = 0x1FE4C8; // type:func FUN_001fe6a8 = 0x1FE6A8; // type:func gcc2_compiled.2 = 0x1FE890; // type:func terminate = 0x1FE8F0; // type:func FUN_001fe908 = 0x1FE908; // type:func FUN_001fe938 = 0x1FE938; // type:func __cp_eh_info = 0x1FE978; // type:func __start_cp_handler = 0x1FE998; // type:func __eh_alloc = 0x1FE9D0; // type:func __eh_free = 0x1FE9F8; // type:func __cplus_type_matcher = 0x1FEA18; // type:func __cp_push_exception = 0x1FEA88; // type:func __cp_pop_exception = 0x1FEB18; // type:func __uncatch_exception = 0x1FEBE0; // type:func FUN_001fec10 = 0x1FEC10; // type:func exception__what = 0x1FEF00; // type:func FUN_001fef28 = 0x1FEF28; // type:func bad_exception_type_info_function = 0x1FEF70; // type:func FUN_001fefc0 = 0x1FEFC0; // type:func exception_type_info_function = 0x1FF008; // type:func decode_uleb128 = 0x1FF048; // type:func decode_sleb128 = 0x1FF090; // type:func fde_merge = 0x1FF0E0; // type:func end_fde_sort = 0x1FF1E0; // type:func count_fdes = 0x1FF448; // type:func add_fdes = 0x1FF490; // type:func frame_init = 0x1FF518; // type:func find_fde = 0x1FF658; // type:func extract_cie_info = 0x1FF740; // type:func execute_cfa_insn = 0x1FF848; // type:func __deregister_frame_info = 0x1FFC08; // type:func __frame_state_for = 0x1FFC80; // type:func fde_split = 0x1FFE58; // type:func bad_alloc_type_info_function = 0x200000; // type:func FUN_00200050 = 0x200050; // type:func type_info__~type_info = 0x200080; // type:func type_info__operatorEQEQ = 0x2000B0; // type:func FUN_00200118 = 0x200118; // type:func FUN_00200138 = 0x200138; // type:func __user_type_info__dcast = 0x200158; // type:func __si_type_info__dcast = 0x200188; // type:func __class_type_info__dcast = 0x200220; // type:func __class_type_info_type_info_function = 0x200418; // type:func FUN_00200468 = 0x200468; // type:func __si_type_info_type_info_function = 0x2004A8; // type:func FUN_002004f8 = 0x2004F8; // type:func __user_type_info_type_info_function = 0x200530; // type:func FUN_00200580 = 0x200580; // type:func FUN_002005a0 = 0x2005A0; // type:func bad_typeid_type_info_function = 0x2005E8; // type:func FUN_00200638 = 0x200638; // type:func bad_cast_type_info_function = 0x200680; // type:func type_info__operator!EQ = 0x2006D0; // type:func type_info_type_info_function = 0x200710; // type:func type_info__before = 0x200750; // type:func __throw_type_match_rtti = 0x200778; // type:func __is_pointer = 0x200C40; // type:func __dynamic_cast = 0x200D58; // type:func FUN_00200e08 = 0x200E08; // type:func __array_type_info_type_info_function = 0x2011C0; // type:func FUN_00201210 = 0x201210; // type:func __ptmd_type_info_type_info_function = 0x201230; // type:func FUN_00201280 = 0x201280; // type:func __ptmf_type_info_type_info_function = 0x2012A0; // type:func FUN_002012f0 = 0x2012F0; // type:func __func_type_info_type_info_function = 0x201310; // type:func FUN_00201360 = 0x201360; // type:func __builtin_type_info_type_info_function = 0x201380; // type:func FUN_002013d0 = 0x2013D0; // type:func __attr_type_info_type_info_function = 0x2013F0; // type:func FUN_00201440 = 0x201440; // type:func __pointer_type_info_type_info_function = 0x201460; // type:func FUN_002014b0 = 0x2014B0; // type:func abort = 0x2014D0; // type:func get_ptr_rng = 0x2014F0; // type:func _init_signal_r = 0x201500; // type:func _raise_r = 0x201578; // type:func raise = 0x201668; // type:func gcc2_compiled.3 = 0x2016A0; // type:func _getpid_r = 0x201700; // type:func strncpy = 0x201720; // type:func sceGsResetPath = 0x2018E8; // type:func sceGsSyncPath = 0x201988; // type:func sceGsResetGraph = 0x201A18; // type:func sceGsGetGParam = 0x201BA8; // type:func sceGsPutDispEnv = 0x201BB8; // type:func sceGsPutDrawEnv = 0x201C78; // type:func sceGsSetDefDBuff = 0x201D60; // type:func sceGsSwapDBuff = 0x201FF8; // type:func sceGsPutIMR = 0x202058; // type:func sceGsSetHalfOffset = 0x202098; // type:func FUN_00202120 = 0x202120; // type:func sceGsSetDefDispEnv = 0x202140; // type:func sceGszbufaddr = 0x2023B0; // type:func sceGsSetDefDrawEnv = 0x202478; // type:func sceGsSetDefClear = 0x202660; // type:func memclr = 0x202768; // type:func sceDmaGetChan = 0x2027A0; // type:func sceDmaReset = 0x2027C8; // type:func sceDmaPutEnv = 0x2028A8; // type:func sceDmaSend = 0x202A80; // type:func sceDmaRecv = 0x202B68; // type:func sceDmaSync = 0x202C38; // type:func FUN_00202d08 = 0x202D08; // type:func sceCdDelayThread = 0x202D30; // type:func cmd_sem_init = 0x202EF0; // type:func cdvd_exit = 0x202F88; // type:func PowerOffCB = 0x203050; // type:func _sceCd_ncmd_prechk = 0x2030C0; // type:func sceCdNcmdDiskReady = 0x203230; // type:func sceCdSync = 0x2032C8; // type:func sceCdSyncS = 0x203368; // type:func _sceCd_scmd_prechk = 0x2033D8; // type:func sceCdInit = 0x203548; // type:func sceCdDiskReady = 0x203828; // type:func sceCdMmode = 0x203A20; // type:func sceCdGetReadPos = 0x203AE8; // type:func sceCdRead = 0x203B18; // type:func FUN_00203cf8 = 0x203CF8; // type:func calls_cdCheckSCmd_etc = 0x203D90; // type:func sceCdBreak = 0x203E28; // type:func FUN_00203ee0 = 0x203EE0; // type:func __send_to_iop = 0x203FD0; // type:func scePadInit = 0x2040E8; // type:func scePadInit2 = 0x204228; // type:func scePadPortOpen = 0x2042C8; // type:func scePadGetDmaStr = 0x2044B0; // type:func scePadRead = 0x204510; // type:func scePadGetState = 0x204590; // type:func scePadSetReqState = 0x204610; // type:func scePadGetState1 = 0x204678; // type:func scePadInfoAct = 0x2046D0; // type:func scePadInfoMode = 0x2047F8; // type:func scePadSetMainMode = 0x204930; // type:func scePadSetActDirect = 0x2049E8; // type:func scePadSetActAlign = 0x204AA8; // type:func scePadGetButtonMask = 0x204B80; // type:func scePadSetButtonInfo = 0x204C38; // type:func scePadInfoPressMode = 0x204CE8; // type:func scePadEnterPressMode = 0x204D48; // type:func scePadGetModVersion = 0x204DB8; // type:func _sceSDC = 0x204E20; // type:func SyncDCache = 0x204EC8; // type:func atanf = 0x204F68; // type:func cosf = 0x205210; // type:func fabsf = 0x2052F8; // type:func floorf = 0x205318; // type:func sinf = 0x205400; // type:func tanf = 0x2054F0; // type:func acosf = 0x205578; // type:func asinf = 0x205678; // type:func atan2f = 0x205778; // type:func fmodf = 0x2058A0; // type:func logf = 0x2059E0; // type:func log10f = 0x205B28; // type:func powf = 0x205C78; // type:func FUN_00206180 = 0x206180; // type:func FUN_00206298 = 0x206298; // type:func __ieee754_asinf = 0x2066C8; // type:func __ieee754_atan2f = 0x206A68; // type:func __ieee754_fmodf = 0x206D50; // type:func __ieee754_logf = 0x206FA0; // type:func FUN_002072c8 = 0x2072C8; // type:func FUN_002073f8 = 0x2073F8; // type:func FUN_00207c88 = 0x207C88; // type:func __ieee754_sqrtf = 0x208068; // type:func __kernel_cosf = 0x2081A0; // type:func __kernel_rem_pio2f = 0x2082F8; // type:func __kernel_sinf = 0x208C48; // type:func R_free = 0x208D50; // type:func matherr = 0x208FE8; // type:func rint = 0x209010; // type:func finitef = 0x209210; // type:func isnanf = 0x209238; // type:func scalbnf = 0x209260; // type:func copysignf = 0x2093C0; // type:func FUN_002093f0 = 0x2093F0; // type:func FUN_002095b0 = 0x2095B0; // type:func FUN_002096e8 = 0x2096E8; // type:func FUN_00209720 = 0x209720; // type:func FUN_00209870 = 0x209870; // type:func FUN_00209990 = 0x209990; // type:func FUN_00209b10 = 0x209B10; // type:func FUN_00209b38 = 0x209B38; // type:func wait_for_sif_rpc_done_2QMARK = 0x209B80; // type:func FUN_00209cb8 = 0x209CB8; // type:func FUN_00209e48 = 0x209E48; // type:func FUN_00209fa8 = 0x209FA8; // type:func FUN_0020a078 = 0x20A078; // type:func _type2id = 0x20A190; // type:func sceMpegDemuxPssRing = 0x20A220; // type:func sceMpegDemuxPss = 0x20A518; // type:func sceMpegAddStrCallback = 0x20A538; // type:func _pack_header = 0x20A630; // type:func _system_header = 0x20A780; // type:func _PES_packet = 0x20A7F0; // type:func FUN_0020ada0 = 0x20ADA0; // type:func sceMpegCreate = 0x20AE40; // type:func SyncVBlank1 = 0x20B048; // type:func sceMpegGetPicture = 0x20B058; // type:func sceMpegIsEnd = 0x20B0B0; // type:func sceMpegReset = 0x20B0C0; // type:func sceMpegClearRefBuff = 0x20B110; // type:func sceMpegAddCallback = 0x20B168; // type:func _dispatchMpegCallback = 0x20B190; // type:func _dispatchMpegCbNodata = 0x20B1E0; // type:func _alalcInit = 0x20B240; // type:func _alalcSetDynamic = 0x20B258; // type:func _alalcFree = 0x20B268; // type:func _alalcAlloc = 0x20B278; // type:func _getpic = 0x20B2E8; // type:func _decodeOrSkipFrame = 0x20B458; // type:func _decodeOrSkip = 0x20B570; // type:func _decodeOrSkipField = 0x20B5B8; // type:func _sceMpegFlush = 0x20B718; // type:func _lastFrame = 0x20B790; // type:func _clearOnce = 0x20B810; // type:func _clearEach = 0x20B870; // type:func _ErrMessage = 0x20B930; // type:func _Error1 = 0x20B940; // type:func _Error = 0x20B978; // type:func _RefImageInit = 0x20B9D0; // type:func _sequenceHeader = 0x20B9F0; // type:func _initRefImages = 0x20BDC0; // type:func _setDefaultQM = 0x20BEA0; // type:func _sequenceExtension = 0x20BF78; // type:func _sequenceDisplayExtension = 0x20C0A8; // type:func gcc2_compiled.4 = 0x20C1A0; // type:func _getAllRefs = 0x20C3F0; // type:func _getRef0 = 0x20CAF8; // type:func _doMC = 0x20CF18; // type:func _ipuSetMPEG1 = 0x20DEE8; // type:func _waitBdecOut = 0x20DF10; // type:func _dmVector = 0x20E100; // type:func _dualPrimeVector = 0x20E120; // type:func _mbAddressIncrement = 0x20E2A8; // type:func _pictureData0 = 0x20E3B8; // type:func _sliceA0 = 0x20E4C0; // type:func _slice0 = 0x20E5F0; // type:func _skipMB0 = 0x20E7E0; // type:func _decMB0 = 0x20E8A0; // type:func _decode_motion_vector = 0x20ED48; // type:func _motionVectors = 0x20EDD0; // type:func _motionVector = 0x20EF70; // type:func _sendIpuCommand = 0x20F0C0; // type:func _waitIpuIdle = 0x20F0F0; // type:func _waitIpuIdle64 = 0x20F198; // type:func _ipuVdec = 0x20F248; // type:func _peepBit = 0x20F3C0; // type:func _flushBuf = 0x20F4C8; // type:func _sceMpegNextBit = 0x20F5B8; // type:func _nextStartCode = 0x20F708; // type:func _sliceB = 0x20F788; // type:func _nextHeader = 0x20F7F0; // type:func _pictureHeader = 0x20F900; // type:func _extensionAndUserData = 0x20F9C8; // type:func _pictureCodingExtension = 0x20FAF0; // type:func _extrainfo = 0x20FCE0; // type:func _groupOfPicturesHeader = 0x20FDA0; // type:func _quantMatrixExtension = 0x20FE40; // type:func _pictureDisplayExtension = 0x20FF08; // type:func _copyrightExtension = 0x210000; // type:func _decPicture = 0x210090; // type:func _outputFrame = 0x210160; // type:func _updateRefImage = 0x2101F0; // type:func _isOutSizeOK = 0x2104A8; // type:func _cpr8 = 0x210548; // type:func _getPtsDtsFlags = 0x2107E0; // type:func _dispRefImage = 0x210970; // type:func _dispRefImageField = 0x210A80; // type:func dmaRefImage = 0x210C38; // type:func receiveDataFromIPU = 0x210D90; // type:func _doCSC = 0x210E00; // type:func _ch3dmaCSC = 0x210F18; // type:func _doCSC2 = 0x211090; // type:func _ch4dma = 0x211240; // type:func _csc_storeRefImage = 0x211348; // type:func _sysbitInit = 0x2115C0; // type:func _sysbitNext = 0x2115F8; // type:func _sysbitFlush = 0x211618; // type:func _sysbitGet = 0x2116B0; // type:func _sysbitMarker = 0x211700; // type:func _sysbitJump = 0x211748; // type:func _sysbitPtr = 0x2117A0; // type:func setD3_CHCR = 0x2117D0; // type:func setD4_CHCR = 0x211838; // type:func sceIpuRestartDMA = 0x211988; // type:func FUN_00211b40 = 0x211B40; // type:func ================================================ FILE: configure.py ================================================ """ Configures the project for building. Invokes splat to split the binary and creates build files for ninja. """ #! /usr/bin/env python3 import argparse import os import shutil import sys import json import re from pathlib import Path from typing import List, Set import ninja_syntax import splat import splat.scripts.split as split from splat.segtypes.linker_entry import LinkerEntry # MARK: Constants ROOT = Path(__file__).parent.resolve() TOOLS_DIR = ROOT / "tools" OUTDIR = "out" YAML_FILE = Path("config/sly1.yaml") BASENAME = "SCUS_971.98" LD_PATH = f"{BASENAME}.ld" ELF_PATH = f"{OUTDIR}/{BASENAME}" MAP_PATH = f"{OUTDIR}/{BASENAME}.map" PRE_ELF_PATH = f"{OUTDIR}/{BASENAME}.elf" COMMON_INCLUDES = "-Iinclude -isystem include/sdk/ee -isystem include/gcc" CC_DIR = f"{TOOLS_DIR}/cc/bin" COMMON_COMPILE_FLAGS = ( f"-x c++ -B{TOOLS_DIR}/cc/lib/gcc-lib/ee/2.95.2/ -O2 -G0 -ffast-math" ) WIBO = TOOLS_DIR / "wibo-i686" WINECMD = f"{WIBO}" if WIBO.exists() else "WINEDEBUG=-all wine" COMPILE_CMD = f"{CC_DIR}/ee-gcc.exe -c {COMMON_INCLUDES} {COMMON_COMPILE_FLAGS} $in" if sys.platform == "linux": COMPILE_CMD = ( f"{WINECMD} {CC_DIR}/ee-gcc.exe -c {COMMON_INCLUDES} {COMMON_COMPILE_FLAGS} $in" ) CATEGORY_MAP = { "P2": "Engine", "splice": "Splice", "ps2t": "Tooling", "sce": "Libs", "data": "Data", } # Segment types that should be assembled ASSEMBLABLE_TYPES = ( splat.segtypes.common.asm.CommonSegAsm, splat.segtypes.common.data.CommonSegData, splat.segtypes.common.databin.CommonSegDatabin, splat.segtypes.common.rodatabin.CommonSegRodatabin, splat.segtypes.common.textbin.CommonSegTextbin, splat.segtypes.common.bin.CommonSegBin, ) # Segment types that should be compiled COMPILABLE_TYPES = (splat.segtypes.common.c.CommonSegC,) def clean(): """ Clean all products of the build process. """ files_to_clean = [ ".splache", ".ninja_log", "build.ninja", "permuter_settings.toml", "objdiff.json", LD_PATH, ] for filename in files_to_clean: if os.path.exists(filename): os.remove(filename) shutil.rmtree("asm", ignore_errors=True) shutil.rmtree("assets", ignore_errors=True) shutil.rmtree("obj", ignore_errors=True) shutil.rmtree("out", ignore_errors=True) def write_permuter_settings(): """ Write the permuter settings file, comprising the compiler and assembler commands. """ with open("permuter_settings.toml", "w", encoding="utf-8") as f: f.write( f"""compiler_command = "{COMPILE_CMD} -D__GNUC__" assembler_command = "mips-linux-gnu-as -march=r5900 -mabi=eabi -Iinclude" compiler_type = "gcc" [preserve_macros] [decompme.compilers] "tools/build/cc/gcc/gcc" = "ee-gcc2.96" """ ) # MARK: Build def generate_ninja_build( linker_entries: List[LinkerEntry], skip_checksum=False, objects_only=False, dual_objects=False, ): """ Generate ninja build rules for objects and the final ELF file. If objects_only is True, only build objects and skip linking/checksum. If dual_objects is True, build objects twice: once normally, once with -DSKIP_ASM. """ built_objects: Set[Path] = set() objdiff_units = [] # For objdiff.json def compute_object_path(obj_path: Path, out_dir: str = None) -> Path: """Compute the final object path, stripping .s or .c extensions if needed.""" if not out_dir: return obj_path # Strip .s/.c extensions or handle .c.o/.s.o cases if obj_path.suffix == ".o" and obj_path.with_suffix("").suffix in [".s", ".c"]: stem = obj_path.with_suffix("").stem else: stem = obj_path.stem return Path(out_dir) / (stem + ".o") def collect_objdiff_unit(object_path: Path, src_path: Path) -> None: """Collect objdiff metadata for a compilation unit.""" if not src_path or "target" not in str(object_path): return # Compute relative path for name try: if src_path.parts[0] in ["asm", "src"]: rel = Path(*src_path.parts[1:]) else: rel = src_path name = str(rel.with_suffix("")) except (IndexError, ValueError): name = str(src_path.with_suffix("")) target_path = str(object_path) # Check if source file exists in src/ src_base = rel.with_suffix("") has_src = any(Path("src").rglob(src_base.name + ext) for ext in [".c", ".cpp"]) # Determine categories categories = [name.split("/")[0]] if "P2/splice/" in name: categories.append("splice") elif "P2/ps2t" in name: categories.append("ps2t") unit = { "name": name, "target_path": target_path, "metadata": {"progress_categories": categories}, } if has_src: # Replace 'target' segment with 'current' in path op = Path(object_path) parts = list(op.parts) for idx, part in enumerate(parts): if part == "target": parts[idx] = "current" break unit["base_path"] = str(Path(*parts)) objdiff_units.append(unit) def build_object( object_path: Path, src_paths: List[Path], rule: str, out_dir: str = None, extra_flags: str = "", collect_objdiff: bool = False, ): """Build a single object file.""" final_path = compute_object_path(object_path, out_dir) if final_path.suffix == ".o": built_objects.add(final_path) build_vars = {"cflags": extra_flags} if extra_flags else {} ninja.build( outputs=[str(final_path)], rule=rule, inputs=[str(s) for s in src_paths], variables=build_vars, ) if collect_objdiff and src_paths: collect_objdiff_unit(final_path, src_paths[0]) with open(str(ROOT / "build.ninja"), "w", encoding="utf-8") as f: ninja = ninja_syntax.Writer(f, width=9999) # MARK: Rules cross = "mips-linux-gnu-" ld_args = "-EL -T config/undefined_syms_auto.txt -T config/undefined_funcs_auto.txt -Map $mapfile -T $in -o $out --no-warn-rwx-segments" ninja.rule( "as", description="as $in", command=f"cpp {COMMON_INCLUDES} $in -o - | {cross}as -no-pad-sections -EL -march=5900 -mabi=eabi -Iinclude -o $out", ) ninja.rule( "cc", description="cc $in", command=f"{COMPILE_CMD} $cflags -o $out && {cross}strip $out -N dummy-symbol-name", ) ninja.rule( "ld", description="link $out", command=f"{cross}ld {ld_args}", ) ninja.rule( "sha1sum", description="sha1sum $in", command="sha1sum -c $in && touch $out", ) ninja.rule( "elf", description="elf $out", command=f"{cross}objcopy $in $out -O binary", ) # MARK: Object compilation # Build all the objects for entry in linker_entries: seg = entry.segment if seg.type[0] == ".": continue if entry.object_path is None: continue # Determine rule based on segment type rule = None if isinstance(seg, COMPILABLE_TYPES): rule = "cc" elif isinstance(seg, ASSEMBLABLE_TYPES): rule = "as" else: print(f"ERROR: Unsupported build segment type {seg.type}") sys.exit(1) # Build objects (single or dual mode) if dual_objects: build_object( entry.object_path, entry.src_paths, rule, out_dir="obj/target", collect_objdiff=True, ) build_object( entry.object_path, entry.src_paths, rule, out_dir="obj/current", extra_flags="-DSKIP_ASM", ) else: build_object(entry.object_path, entry.src_paths, rule) if objects_only: # Write objdiff.json if dual_objects (i.e. --objects) if dual_objects: objdiff = { "$schema": "https://raw.githubusercontent.com/encounter/objdiff/main/config.schema.json", "custom_make": "ninja", "custom_args": [], "build_target": False, "build_base": True, "watch_patterns": [ "src/**/*.c", "src/**/*.cp", "src/**/*.cpp", "src/**/*.cxx", "src/**/*.h", "src/**/*.hp", "src/**/*.hpp", "src/**/*.hxx", "src/**/*.s", "src/**/*.S", "src/**/*.asm", "src/**/*.inc", "src/**/*.py", "src/**/*.yml", "src/**/*.txt", "src/**/*.json", ], "units": objdiff_units, "progress_categories": [ {"id": id, "name": name} for id, name in CATEGORY_MAP.items() ], } with open("objdiff.json", "w", encoding="utf-8") as objdiff_file: json.dump(objdiff, objdiff_file, indent=2) return ninja.build( PRE_ELF_PATH, "ld", LD_PATH, implicit=[str(obj) for obj in built_objects], variables={"mapfile": MAP_PATH}, ) ninja.build( ELF_PATH, "elf", PRE_ELF_PATH, ) if not skip_checksum: ninja.build( ELF_PATH + ".ok", "sha1sum", "config/checksum.sha1", implicit=[ELF_PATH], ) else: print("Skipping checksum step") # MARK: Short loop fix # Pattern to workaround unintended nops around loops COMMENT_PART = r"\/\* (.+) ([0-9A-Z]{2})([0-9A-Z]{2})([0-9A-Z]{2})([0-9A-Z]{2}) \*\/" INSTRUCTION_PART = r"(\b(bne|bnel|beq|beql|bnez|bnezl|beqzl|bgez|bgezl|bgtz|bgtzl|blez|blezl|bltz|bltzl|b)\b.*)" OPCODE_PATTERN = re.compile(f"{COMMENT_PART} {INSTRUCTION_PART}") PROBLEMATIC_FUNCS = { "RefOpForEach__FiP4CRefP6CFrame", # P2/splice/bif "PredictAsegEffect__FP4ASEGffP3ALOT3iP6VECTORP7MATRIX3T6T6", # P2/aseg "ProjectBlipgTransform__FP5BLIPGfi", # P2/blip "ExplodeExplsExplso__FP5EXPLSP6EXPLSO", # P2/emitter "ApplyDzg__FP3DZGiPiPPP2SOff", # P2/dzg "UpdateJtActive__FP2JTP3JOYf", # P2/jt "AddMatrix4Matrix4__FP7MATRIX4N20", # P2/mat "FInvertMatrix__FiPfT1", # P2/mat "RenderMsGlobset__FP2MSP2CMP2RO", # P2/ms "BounceRipgRips__FP4RIPG", # P2/rip "FUN_001aea70", # P2/screen "UpdateShadow__FP6SHADOWf", # P2/shadow "LoadShadersFromBrx__FP18CBinaryInputStream", # P2/shd "FillShaders__Fi", # P2/shd "UpdateStepPhys__FP4STEP", # P2/step "DrawTvBands__FP2TVR4GIFS", # P2/tv "FIgnoreUbgIntersection__FP3UBGP2SO", # P2/ub "PwarpFromOid__F3OIDT0", # P2/xform "TriggerWarp__FP4WARP" # P2/xform } def replace_instructions_with_opcodes(asm_folder: Path) -> None: """ Replace branch instructions with raw opcodes for functions that trigger the short loop bug. """ nm_folder = ROOT / asm_folder / "nonmatchings" for p in nm_folder.rglob("*.s"): if p.stem not in PROBLEMATIC_FUNCS: continue with p.open("r") as file: content = file.read() if re.search(OPCODE_PATTERN, content): # Reference found # Embed the opcode, we have to swap byte order for correct endianness content = re.sub( OPCODE_PATTERN, r"/* \1 \2\3\4\5 */ .word 0x\5\4\3\2 /* \6 */", content, ) # Write the updated content back to the file with p.open("w") as file: file.write(content) # MARK: Main def main(): """ Main function, parses arguments and runs the configuration. """ parser = argparse.ArgumentParser(description="Configure the project") parser.add_argument( "-c", "--clean", help="Clean artifacts and build", action="store_true", ) parser.add_argument( "-C", "--clean-only", help="Only clean artifacts", action="store_true", ) parser.add_argument( "-s", "--skip-checksum", help="Skip the checksum step", action="store_true", ) parser.add_argument( "--objects", help="Build objects to obj/target and obj/current (with -DSKIP_ASM), skip linking and checksum", action="store_true", ) parser.add_argument( "-noloop", "--no-short-loop-workaround", help="Do not replace branch instructions with raw opcodes for functions that trigger the short loop bug", action="store_true", ) args = parser.parse_args() if args.clean or args.clean_only: clean() if args.clean_only: return split.main([YAML_FILE], modes="all", verbose=False) linker_entries = split.linker_writer.entries if args.objects: generate_ninja_build( linker_entries, skip_checksum=True, objects_only=True, dual_objects=True ) else: generate_ninja_build(linker_entries, args.skip_checksum) write_permuter_settings() if not args.no_short_loop_workaround: replace_instructions_with_opcodes(split.config["options"]["asm_path"]) if __name__ == "__main__": main() ================================================ FILE: docs/BEGINNERSGUIDE.md ================================================ # Beginner's Guide If you are new to using Git, follow these steps to get started. If you're already familiar with Git, go ahead and read the [contributing guide](/docs/CONTRIBUTING.md) instead. **1. Fork the repository on GitHub** Click the "Fork" button in the top-right corner of the [GitHub repository](https://github.com/theonlyzac/sly1). This will create a copy of the repository on your own GitHub account. **2. Clone the forked repository to your machine** Use a terminal or GitHub GUI to clone the forked repo to your machine. **3. Create a new branch for your changes** Navigate to the `sly1` directory in the terminal, and run the following command: ```sh git checkout -b branch-name ``` Replace `branch-name` with whatever you want to call your working branch. This will automatically create a new branch and switch to it. **4. Write & match your code** Follow the [Contributing Guide](/docs/CONTRIBUTING.md) to find functions to match, and write your code. You can use any text editor you like, but we recommend [VS Code](https://code.visualstudio.com/). **5. Commit the changes to your branch** Whenever you would like to save your progress to the fork, use these commands to add the files to a commit with a message describing what you did: ```sh git add file_you_changed.txt git commit -m "Describe what you did here" ``` If you don't care about adding specific files and just want to commit every file you changed, you can use this command instead: ```sh git commit -am "Describe what you did here" ``` The commits are not backed up to GitHub until you `git push` to the repo in the next step. **6. Push the commits to your fork** When you are done making commits, push your branch to your forked repo. ```sh git push origin branch-name ```` **7. Create a pull request on GitHub** When you have pushed all commits to your fork and are ready to submit your code, create a pull request on GitHub. 1. Go to your forked repository on GitHub and click the "Pull requests" tab. 2. Click the "New pull request" button. 3. Select your branch from the "compare" dropdown menu. 4. Click "Create pull request". 6. Add a title and brief description stating what you did for the person reviewing it. **8. Wait for someone to review your code** A code reviewer will review your PR and either merge it into the main branch, or let you know if there are any issues that need to be addressed. If you need to fix something, any commits you push to the same branch will be automatically added to the pull request until it is merged, at which point you will have to make another pull request if you continue working. ================================================ FILE: docs/CONTRIBUTING.md ================================================ # Contributing Guide ## So you want to decompile Sly 1... You've come to the right place! We welcome new contributors of all skill levels. This is a 100% volunteer-driven project, so all contributions are greatly appreciated. The current goal is to decompile and match as many game functions as possible. By following this guide, you will learn how to fork the repo on GitHub, choose a function to reverse-engineer, write code to match it, and integrate that code into the project. Once your pull request is merged, you may get the Decomp Contributor role in the Discord Server. If you're new to this, feel free to join our [Discord server](https://discord.gg/2GSXcEzPJA) and ask for help in #sly-research! ## Contents 1. [Getting Started](#getting-started) 2. [Find a function to match](#find-a-function-to-match) 3. [Match the function](#match-the-function) 4. [Integrate the matched code](#integrate-the-matched-code) 5. [Make a pull request](#make-a-pull-request) 6. [Conclusion](#conclusion) ## Getting started If you haven't used Git before, follow the [Beginner's Guide](/docs/BEGINNERSGUIDE.md) to learn how to fork the repo, make changes, and create a pull request. Then follow the instructions in [README.md](/README.md) to build the project. If you see the following in the terminal, you're ready to start contributing: ```bash [XXX/XXX] sha1sum config/checksum.sha1 out/SCUS_971.98: OK ``` ## Find a function to match First, find a function in the game that you want to match. There are a few ways to do this: * Browse Ghidra for interesting functions. * Look in the the source files in the `src` folder for non-matching functions (they have an `INCLUDE_ASM` macro as a placeholder). * Look in assembly files in the `asm/nonmatchings` folder. * Ask for suggestions on Discord. ## Match the function Once you have a function selected, you can start matching it using either **Objdiff** or **Decomp.me**. Both tools are used to match assembly code to C code, but they have different workflows. ### Objdiff [Objdiff](https://github.com/encounter/objdiff), is a tool for showing the diff between a symbol in two object files. It is faster and more convenient then Decomp.me since it is included in the project, and doesn't require uploading anything to a website. 1. Place your new function under the `INCLUDE_ASM` macro of the function you want to match wrapped in `#ifdef SKIP_ASM` like so: ```cpp INCLUDE_ASM("asm/nonmatchings/P2/difficulty", OnDifficultyGameLoad__FP10DIFFICULTY); #ifdef SKIP_ASM void OnDifficultyGameLoad(DIFFICULTY *pdifficulty) { ... } #endif ``` 2. From the project root, run `./scripts/diff.sh FunctionName [ObjectName]`. * Replace `FunctionName` with the **mangled name** of the function you want to match. * Optionally, provide `ObjectName` using the name of the object file (without extension) if you know which file contains the function. 3. Edit the source code until the function matches. The CURRENT assembly will update every time you save the file. **Example:** To match `OnDifficultyGameLoad` defined in `P2/difficulty.c`, run this command: ```bash ./scripts/diff.sh OnDifficultyGameLoad__FP10DIFFICULTY P2/difficulty ``` ### Decomp.me [decomp.me](https://decomp.me/) is a website for collaborative decompilation. It allows you to upload assembly code and create a "scratch" for matching the function. It is recommended if you are collaborating with others or need to ask for help with a function. 1. Go to [the website](https://decomp.me) and click "Start decomping". 2. Click "PS2" > "Preset" > "Sly Cooper and the Thievius Raccoonus". 3. Under "Diff label", enter the name of the function. 4. Find the `.s` file of the function you want to match in the `asm/nonmatchings` folder. Copy the contents of the file into the "Target assembly" box. 5. If the function references any other functions, global variables, or data types, copy those from the relevant headers into the "Context" box. * E.g. For the function `void ResetClock(struct CLOCK* pclock, float t)`, you will need to include the definition of `CLOCK` struct, as well as the `TICK` datatype since it is used in the `CLOCK` struct. 6. Click "Create scratch". 7. **(Recommended)** Go to the "Options" tab and under "Debug information" select `-g3 (Macro expansions)`. This will show you which line numbers the source code correspond to each line in the assembly. Then start writing your code under the "Source code" tab. It will tell you what percent of the code matches the original. Tweak the code until it matches 100%. An example scratch can be found here: https://decomp.me/scratch/hmmyP ## Integrate the matched code Once the function matches 100%, follow these steps to integrate it into the project. If you used objdiff, you probably already did this. 1. Replace the `INCLUDE_ASM` macro in the `.c` file with the matched function. * If the function is in a new file, **do not create a new file**. Creating new `.c` files is done by editing the `config/sly1.yaml` file to change the file split from `asm` to `c`, then running `python3 configure.py` to generate the new file. If you don't know how to do this, feel free to ask for help in the Discord server. 2. Check `config/symbol_addrs.txt` to see if the mangled name of the function is present. * If it is not, add the **mangled name** of the function with its address. The mangled name of the function can be found in the debug symbols for the May 2002 prototype. If you don't know how to find it, ask for help in the Discord server; someone will be able to find it for you easily. * The symbol_addrs.txt file is grouped alphabetically by filename, then sorted by address within the file. The project should build and match. Here are some common troubleshooting tips: * `undefined reference error` usually means the entry in the symbol_addrs.txt is wrong. Make sure the function name is mangled in symbol_addrs.txt and unmangled in the source code, and the mangled version matches the signature of the function. Also ensure that the address is correct in symbol_addrs.txt. * `checksum failed` means the compiled elf with your added code doesn't match the original. If it matches on decomp.me but not in the project, it might be an issue with the compiler, so open an issue on GitHub or let someone know on Discord. * `ninja: no work to do` in diff.sh likely means the name of the function is wrong in your command and/or in symbol_addrs.txt. Make sure you are using the correct mangled name of the function in both places. ## Make a pull request Once you add your code to the project and it builds + matches, you can open a pull request to merge your fork into the main branch of the project. A code reviewer will need to approve it before it can be merged into the main branch. We are a volunteer-driven project, so please be patient while we review your code. These are the main things we will look for in your code: * It compiles without any errors. * The compiled elf matches the original elf. If everything looks good, we will merge your pull request as soon as possible. We may fix small typos and make style edits for you. If anything needs to be addressed, we will let you know. ## Conclusion Thank you for reading, and we appreciate any contributions you make to the project! The project is 100% volunteer-driven, so perfection is not required. The most important thing is to have fun and learn something new about the game. If you have any questions or concerns, feel free to ask in the [Discord server](https://discord.gg/2GSXcEzPJA) or [open an issue](https://github.com/TheOnlyZac/sly1/issues/new) on GitHub. ================================================ FILE: docs/DISTROBOX.md ================================================ # Using Distrobox for Non-Debian Distributions If you're using a non-Debian Linux distribution (such as Fedora, Arch, openSUSE, etc.), you can use [Distrobox](https://distrobox.it/) to create a Debian container and follow the standard setup instructions. ## What is Distrobox? Distrobox is a tool that lets you create and manage containerized Linux environments that integrate seamlessly with your host system. Unlike traditional containers, Distrobox containers share your home directory to allow collaboration with the host system. You can edit the code in your favorite editor and build the project in the container using those same files. This makes it perfect for development work where you need a specific distribution's tooling. ## Installing Distrobox ### Fedora: ```bash sudo dnf install distrobox ``` ### Arch Linux: ```bash sudo pacman -S distrobox ``` ### openSUSE: ```bash sudo zypper install distrobox ``` ## Setting up the Debian Container ### 1. Create the container Create a Debian container. It can be named anything but for this example we use `sly1-dev`: ```bash distrobox create --name sly1-dev --init --image debian:latest --additional-packages "git" ``` This downloads the latest Debian image and creates a new container. ### 2. Enter the container ```bash distrobox enter sly1-dev ``` The first time you enter, Distrobox will set up the container environment. ### 3. Verify you're in the container Your terminal prompt should change to indicate you're in the container (typically showing `user@sly1-dev`). You can further verify with: ```bash cat /etc/os-release ``` Which should show Debian information. ## Following the Setup Instructions Once inside the container, you can follow the [README instructions](../README.md#-quickstart). Again, your home directory is shared between the host and container, so you can clone the repository using either. ## Exiting the Container When you're done working, simply exit the container: ```bash exit ``` Or press `Ctrl+D`. ## Working with the Container ### Re-entering the container Whenever you want to build the project, just enter the container again: ```bash distrobox enter sly1-dev cd ~/path/to/sly1 ``` ### Running commands from outside You can also run commands inside the container without entering it: ```bash distrobox enter sly1-dev -- ./scripts/build.sh ``` ### Stopping the container Containers are automatically stopped when not in use. To manually stop: ```bash distrobox stop sly1-dev ``` ### Removing the container If you need to start fresh: ```bash distrobox rm sly1-dev ``` This deletes the container and any packages installed within it. You will need to complete the setup instructions again if you create a new container. ## Troubleshooting ### Run.sh is not finding PCSX2 If PCSX2 is installed on the host system via package manager the container will not be able to find it. Either exit the container or install PCSX2 in a way the container can access, such as the container package manager, Flatpak or AppImage. ================================================ FILE: docs/STYLEGUIDE.md ================================================ # Style Guide ## Contents 1. [General Rules](#general-rules) 2. [Symbol Names](#symbol-names) 3. [Documentation](#documentation) 4. [Example Code](#example-code) ## General Rules Please try and follow these general rules when writing your code: * Indent with 4 spaces, not tabs. * Put opening curly braces on a new line. * Don't leave trailing whitespace at the end of lines. * End every file with a single blank line. * Keep lines between 80-100 characters long at most. ## Symbol Names For new symbols (i.e. classes, variables, and functions), use the official name from the [May 19 2002 demo](https://hiddenpalace.org/Sly_Cooper_and_the_Thievius_Raccoonus_(May_19,_2002_prototype)) if it is known. If it is not known, use a clear and descriptive name. When making up symbol names, mimic the style of the official symbol names, Official names use a variation of [Hungarian Notation](https://en.wikipedia.org/wiki/Hungarian_notation). The most important part is the prefixes used to denote the **type** and **scope** of a symbol, as shown below. These prefixes denote the **type** of a symbol: | Prefix | Type | Examples | |--------|--------------------------------|----------------------------------------------------------------| | `p` | Pointer | `CLOCK* pclock` - Pointer to an instance of the CLOCK struct | | `n` | Integer/numeric value | `int nScore` - Numeric score value | | `c` | Integer/count or quantity | `int ccoin`- A quantity of coins | | `f` | Flag (boolean) | `int fSneakyFeet` - Footstep noises flag | | `l` | Long | `long lTime` - A time in seconds | | `d` | Float | `float dTime` - A time in seconds | | `ch` | Char | `char chCur` - Current character in a loop | | `b` | Byte | `byte bData` - A single byte of data | | `u` | Unsigned | `float uSuck` - Unsigned value representing the player's suck score | | `z` | Zero-terminated string | `char chzBuffer[64]` - Zero-terminated string buffer | | `C` | Class | `class CBinaryInputStream` - Class that reads data from binary streams | These prefixes denote the **scope** of a variable: | Prefix | Type | Examples | |--------|--------------------------------|----------------------------------------------------------------| | `g_` | Global variable | `LM g_lmZeroOne` - A global LM struct | | `m_` | Class member | `int m_cbRaw` - Count of raw bytes on a CBinaryInputStream | | `s_` | Static class member | `TICK s_tickLastRaw` - Static value for last raw tick on CLOCK struct | Examples of combining these prefixes: * `g_pgsCur` - Pointer to the current global GS struct * `g_pchzArgs` - Pointer a global zero-terminated char array of arguments * `m_cbBulkData` - Class member variable that stores the count of bytes in a data block ### Capitalization Use `ALLCAPS` for struct/enum names. * e.g. `struct DIFFICULTY`, `enum FLS` Use `UpperCamelCase` for function names, classes and enum values. * e.g. `void OnDifficultyGameLoad()`, `class CBinaryInputStream`, `FCHT_InfiniteCharms` Use `lowerCamelCase` for local variables, function parameters, and class members. * e.g. `char nextXorChar`, `Coin* pcoin`, `float m_rxScale` ## Documentation Comment your code with [Doxygen-style comments](http://micro-os-plus.github.io/develop/doxygen-style-guide/). They will be used to automatically generate a [documentation website](https://theonlyzac.github.io/sly1). You don't need to read the whole Doxygen style guide, just follow these rules. ### File Comments Put file comments at the top of each file, before any includes. ```c /** * @file filename.xyz * @brief A brief description of the file. * * @details A longer description of the file that goes into more detail * if you feel it is necessary. */ ``` ### Function Comments Put function comments before the declaration of each function in the header files. ```c /** * @brief A brief summary of the function. * * @details A longer summary of the function that goes into more detail * if you feel it is necessary. * * @param param1 Description of the first parameter * @param param2 Description of the second parameter * ... * * @return What the function returns, if not void */ int ExampleFunction(param1, param2, ...); ``` Document all parameters and return values using `@param` and `@return`/`@retval`, even if they are obvious. You can omit them if the function has no parameters or returns void. #### Class Comments Put class (and struct) comments before the class declaration in the header file. ```c /** * @brief Full name of the struct/class. * * @details A longer summary of the struct/class that goes into more detail * if you feel it is necessary. */ ``` ### Todo and Notes Use `@todo` to mark something that needs to be done in the future. ```c /** * ... * @todo Implement this function. * ... */ ``` Use `@note` to add a note which will be differentiated from the rest of the comment. ```c /** * ... * @note The name of this struct is not official. * ... */ ``` ## Example Code This code is clear and conforms to the style guide: ```c // joy.h /** * @brief Activates a cheat code. * * @details Sets the given flag on the global fcht variable. Also reloads the * level if it is a reload code. * * @param nparam Cheat code to check */ void AddFcht(int nParam); // joy.cpp void AddFcht(int nParam) { g_grfcht |= nParam & ~(int)FCHT_ResetWorld; // Check if reload flag is set if ((nParam & 0x4000) != 0) { ResetWorld(FTRANS_None); } } ``` This code does **not** conform to the style guide and should be rewritten: ```cpp // vec.h // Sets the vector cylinder void SetVectorCylind(float x, float y, float z, VECTOR* pvec); // vec.cpp void SetVectorCylind(float param_1, float param_2, float param_3, VECTOR* param_4) { float local_40; float local_3c; //CalculateSinCos(param_1, &local_40, (float*)((uint32_t)&local_40 | 4)); param_4->z = param_3; param_4->x = local_3c * param_2; param_4->y = local_40 * param_2; return; } ``` ================================================ FILE: include/989snd.h ================================================ /** * @file 989snd.h * * @brief 989snd sound driver. */ #ifndef SND989_H #define SND989_H #include "sdk/libcdvd.h" typedef unsigned int u_int; typedef unsigned long u_long; extern "C" { typedef void (*SndCompleteProc)(int, u_long); typedef void* SoundBankPtr; void snd_StartSoundSystem(void); int snd_FlushSoundCommands(void); SoundBankPtr snd_BankLoadByLoc(int loc, int offset); void snd_BankLoadByLoc_CB(int loc, int offset, SndCompleteProc cb, u_long user_data); void snd_ResolveBankXREFS(void); void snd_UnloadBank(SoundBankPtr bank); void snd_SetMasterVolume(int which, int vol); int snd_GetMasterVolume(int which); void snd_SetPlaybackMode(int mode); void snd_SetMixerMode(int channel_mode, int reverb_mode); void snd_SetGroupVoiceRange(int group, int min, int max); u_int snd_PlaySoundVolPanPMPB(SoundBankPtr bank, int sound, int vol, int pan, int pitch_mod, int bend); void snd_StopSound(u_int handle); void snd_PauseSound(u_int handle); void snd_ContinueSound(u_int handle); void snd_PauseAllSoundsInGroup(u_int groups); void snd_ContinueAllSoundsInGroup(u_int groups); u_int snd_SoundIsStillPlaying(u_int handle); void snd_SoundIsStillPlaying_CB(u_int handle, SndCompleteProc cb, u_long user_data); int snd_IsSoundALooper(SoundBankPtr bank, u_int sound); void snd_SetSoundVolPan(u_int handle, int vol, int pan); int snd_GetSoundOriginalPitch(SoundBankPtr bank, int index); void snd_SetSoundPitch(u_int handle, int pitch); void snd_AutoVol(u_int handle, int vol, int delta_time, int delta_from); void snd_SetMIDIRegister(u_int handle, int reg, int value); int snd_GetMIDIRegister(u_int handle, int reg); void snd_SetGlobalExcite(int value); int snd_InitVAGStreamingEx(int num_channels, int buffer_size, unsigned int read_mode, int enable_streamsafe_from_ee); void snd_StopAllStreams(void); u_int snd_PlayVAGStreamByLoc(int loc1, int loc2, int offset1, int offset2, int vol, int pan, int vol_group, u_int queue, u_int flags); void snd_ContinueVAGStream(u_int stream); void snd_IsVAGStreamBuffered_CB(u_int stream, SndCompleteProc cb, u_long user_data); int snd_StreamSafeCheckCDIdle(int block_ee_iop); int snd_StreamSafeCdRead(u_int lbn, u_int sectors, void* buf, sceCdRMode* mode); int snd_StreamSafeCdSync(int mode); int snd_StreamSafeCdBreak(void); int snd_StreamSafeCdGetError(void); void snd_SetReverbType(int core, int type); void snd_SetReverbDepth(int core, int left, int right); void snd_PreAllocReverbWorkArea(int core, int type); int snd_InitMovieSound(int sizeOfIOPBuffer, int volumeLevel, int panCenter, int volumeGroup, int unk); void snd_ResetMovieSound(void); void snd_CloseMovieSound(void); void snd_StartMovieSound(int iopBuffer, int iopBufferSize, int iopPausePosition, u_int sr, int ch); int snd_GetTransStatus(void); int snd_GetDopplerPitchMod(int approaching_mph); } #endif // SND989_H ================================================ FILE: include/ac.h ================================================ /** * @file ac.h * * @todo Implement the structs. */ #ifndef AC_H #define AC_H #include "common.h" #include #include #include #include typedef int GRFEVAL; /** * @brief (?) kind. */ enum ACVK { ACVK_Nil = -1, ACVK_Component = 0, ACVK_Bezier = 1, ACVK_Blend = 2, ACVK_Max = 3 }; /** * @brief (?) kind. */ enum ACGK { ACGK_Nil = -1, ACGK_Bezier = 0, ACGK_BezierWeighted = 1, ACGK_Linear = 2, ACGK_BlendTwist = 3, ACGK_BlendPose = 4, ACGK_Max = 5, }; /** * @brief Unknown. */ struct KVB { // ... }; /** * @brief Unknown. */ struct ACP { // ... }; /** * @brief Unknown. */ struct ACR { // ... }; /** * @brief Unknown. */ struct ACS { // ... }; /** * @brief Unknown. */ struct ACG { // ... }; /** * @brief Unknown. */ struct ACPBL : public ACP { // ... }; /** * @brief Unknown. */ struct ACPC : public ACP { // ... }; /** * @brief Unknown. */ struct ACPB : public ACP { // ... }; /** * @brief Unknown. */ struct ACRC : public ACR { // ... }; /** * @brief Unknown. */ struct ACRB : public ACR { // ... }; /** * @brief Unknown. */ struct ACRBL : public ACR { // ... }; /** * @brief Unknown. */ struct ACSC : public ACS { // ... }; /** * @brief Unknown. */ struct ACSB : public ACS { // ... }; /** * @brief Unknown. */ struct ACGB : public ACG { // ... }; /** * @brief Unknown. */ struct ACGBW : public ACG { // ... }; /** * @brief Unknown. */ struct ACGL : public ACG { // ... }; /** * @brief Unknown. */ struct ACGBLT : public ACG { // ... }; /** * @brief Unknown. */ struct ACGBLP : public ACG { // ... }; void FindKey(float t, GRFEVAL grfeval, int cbKey, int ckey, char *abKey, float *pdt, float *pdtSeg, void **ppv); void EvaluateAcp(ACP *pacp, ALO *palo, float t, float svt, GRFEVAL grfeval, VECTOR *ppos, VECTOR *pv); void GetAcpTimes(ACP *pacp, int *pct, float **pat); void EvaluateAcr(ACR *pacr, ALO *palo, float t, float svt, GRFEVAL grfeval, MATRIX3 *pmat, VECTOR *pw); void EvaluateAcrEul(ACR *pacr, ALO *palo, float t, float svt, GRFEVAL grfeval, VECTOR *peul, VECTOR *pdeul); void GetAcrTimes(ACR *pacr, int *pct, float **pat); void EvaluateAcs(ACS *pacs, ALO *palo, float t, GRFEVAL grfeval, MATRIX3 *pmat); void GetAcsTimes(ACS *pacs, int *pct, float **pat); void EvaluateAcg(ACG *pacg, ALO *palo, float t, float svt, GRFEVAL grfeval, float *pg, float *pdg); void GetAcgTimes(ACG *pacg, int *pct, float **pat); void LoadAcgbFromBrx(ACGB *pacgb, CBinaryInputStream *pbis); void EvaluateAcgb(ACGB *pacgb, ALO *palo, float t, float svt, GRFEVAL grfeval, float *pg, float *pdg); void GetAcgbTimes(ACGB *pacgb, int *pct, float **pat); void LoadAcgbwFromBrx(ACGBW *pacgbw, CBinaryInputStream *pbis); void EvaluateAcgbw(ACGBW *pacgbw, ALO *palo, float t, float svt, GRFEVAL grfeval, float *pg, float *pdg); void GetAcgbwTimes(ACGBW *pacgbw, int *pct, float **pat); void EvaluateAcgl(ACGL *pacgl, ALO *palo, float t, float svt, GRFEVAL grfeval, float *pg, float *pdg); void LoadAcglFromBrx(ACGL *pacgl, CBinaryInputStream *pbis); void GetAcglTimes(ACGL *pacgl, int *pct, float **pat); void EvaluateApacg(ACG **apacg, ALO *palo, float t, float svt, GRFEVAL grfeval, VECTOR *pvecDefault, VECTOR *pvec, VECTOR *pdvec); void LoadApacgFromBrx(ACG **apacg, VECTOR *pvecDefault, CBinaryInputStream *pbis); void GetApacgTimes(ACG **apacg, int *pct, float **pat); void EvaluateAkvb(int ckvb, KVB *akvb, float t, float svt, GRFEVAL grfeval, VECTOR *pvec, VECTOR *pdvec); void LoadAkvbFromBrx(int *pckvb, KVB **pakvb, CBinaryInputStream *pbis); void GetAkvbTimes(int ckvb, KVB *akvb, int *pct, float **pat); void EvaluateAcpc(ACPC *pacpc, ALO *palo, float t, float svt, GRFEVAL grfeval, VECTOR *ppos, VECTOR *pv); void LoadAcpcFromBrx(ACPC *pacpc, CBinaryInputStream *pbis); void GetAcpcTimes(ACPC *pacpc, int *pct, float **pat); void EvaluateAcpb(ACPB *pacpb, ALO *palo, float t, float svt, GRFEVAL grfeval, VECTOR *ppos, VECTOR *pv); void LoadAcpbFromBrx(ACPB *pacpb, CBinaryInputStream *pbis); void GetAcpbTimes(ACPB *pacpb, int *pct, float **pat); void EvaluateAcrc(ACRC *pacrc, ALO *palo, float t, float svt, GRFEVAL grfeval, MATRIX3 *pmat, VECTOR *pw); void EvaluateAcrcEul(ACRC *pacrc, ALO *palo, float t, float svt, GRFEVAL grfeval, VECTOR *peul, VECTOR *pdeul); void LoadAcrcFromBrx(ACRC *pacrc, CBinaryInputStream *pbis); void GetAcrcTimes(ACRC *pacrc, int *pct, float **pat); void EvaluateAcrb(ACRB *pacrb, ALO *palo, float t, float svt, GRFEVAL grfeval, MATRIX3 *pmat, VECTOR *pw); void EvaluateAcrbEul(ACRB *pacrb, ALO *palo, float t, float svt, GRFEVAL grfeval, VECTOR *peul, VECTOR *pdeul); void LoadAcrbFromBrx(ACRB *pacrb, CBinaryInputStream *pbis); void GetAcrbTimes(ACRB *pacrb, int *pct, float **pat); void EvaluateAcsc(ACSC *pacsc, ALO *palo, float t, GRFEVAL grfeval, MATRIX3 *pmat); void LoadAcscFromBrx(ACSC *pacsc, CBinaryInputStream *pbis); void GetAcscTimes(ACSC *pacsc, int *pct, float **pat); void EvaluateAcsb(ACSB *pacsb, ALO *palo, float t, GRFEVAL grfeval, MATRIX3 *pmat); void LoadAcsbFromBrx(ACSB *pacsb, CBinaryInputStream *pbis); void GetAcsbTimes(ACSB *pacsb, int *pct, float **pat); void EvaluateAcpbl(ACPBL *pacpbl, ALO *palo, float t, float svt, GRFEVAL grfeval, VECTOR *ppos, VECTOR *pv); void EvaluateAcrbl(ACRBL *pacrbl, ALO *palo, float t, float svt, GRFEVAL grfeval, MATRIX3 *pmat, VECTOR *pw); void EvaluateAcgblt(ACGBLT *pacgblt, ALO *palo, float t, float svt, GRFEVAL grfeval, float *pg, float *pdg); void EvaluateAcgblp(ACGBLP *pacgblp, ALO *palo, float t, float svt, GRFEVAL grfeval, float *pg, float *pdg); ACP *PacpNew(ACVK acvk); ACR *PacrNew(ACVK acvk); ACS *PacsNew(ACVK acvk); ACG *PacgNew(ACGK acgk); #endif // AC_H ================================================ FILE: include/act.h ================================================ /** * @file act.h */ #ifndef ACT_H #define ACT_H #include "common.h" #include #include #include // Forward. struct SW; struct ALO; typedef int GRFRA; /** * @brief Unknown. * @todo Implement the struct. */ struct ACT { /* 0x00 */ STRUCT_PADDING(1); // TODO: Add vtables /* 0x04 */ ALO *palo; /* 0x08 */ DLE dleAlo; /* 0x10 */ STRUCT_PADDING(1); /* 0x14 */ int nPriority; /* 0x18 */ float tMatch; }; /** * @brief Unknown. * @todo Implement the struct. */ struct ACTVAL : public ACT { /* 0x1c */ STRUCT_PADDING(25); /* 0x80 */ float radTwistGoal; /* 0x84 */ float dradTwistGoal; /* 0x88 */ STRUCT_PADDING(15); /* 0xc4 */ float *agPoses; // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct ACTREF : public ACT { /* 0x1c */ STRUCT_PADDING(4); /* 0x2c */ float *pradTwistGoal; /* 0x30 */ float *pdradTwistGoal; // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct ACTADJ : public ACT { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct ACTBANK : public ACT { /* 0x1c */ float uBank; /* 0x20 */ float dtPredict; }; ACT *PactNew(SW *psw, ALO *palo, VTACT *pvtact); ACT *PactNewClone(ACT *pactBase, SW *psw, ALO *palo); void CloneAct(ACT *pact, ACT *pactBase); void InitAct(ACT *pact, ALO *palo); void RetractAct(ACT *pact, GRFRA grfra); void GetActPositionGoal(ACT *pact, float dtOffset, VECTOR *ppos, VECTOR *pv); void GetActRotationGoal(ACT *pact, float dtOffset, MATRIX3 *pmat, VECTOR *pw); void GetActTwistGoal(ACT *pact, float *pradTwist, float *pdradTwist); void GetActScale(ACT *pact, MATRIX3 *pmat); float GGetActPoseGoal(ACT *pact, int ipose); void CalculateActDefaultAck(ACT *pact); void SnapAct(ACT *pact, int fForce); void CalculateAloPositionSpring(ALO *palo, float dt, VECTOR *pposGoal, VECTOR *pvGoal, VECTOR *pdv); void ProjectActPosition(ACT *pact); void CalculateAloRotationSpring(ALO *palo, float dt, MATRIX3 *pmatGoal, VECTOR *pwGoal, VECTOR *pdw); void ProjectActRotation(ACT *pact); void ProjectActPose(ACT *pact, int ipose); void PredictAloPosition(ALO *palo, float dtOffset, VECTOR *ppos, VECTOR *pv); void PredictAloRotation(ALO *palo, float dtOffset, MATRIX3 *pmat, VECTOR *pw); void AdaptAct(ACT *pact); void InitActval(ACTVAL *pactval, ALO *palo); void GetActvalPositionGoal(ACTVAL *pactval, float dtOffset, VECTOR *ppos, VECTOR *pv); void GetActvalRotationGoal(ACTVAL *pactval, float dtOffset, MATRIX3 *pmat, VECTOR *pw); void GetActvalTwistGoal(ACTVAL *pactval, float *pradTwist, float *pdradTwist); void GetActvalScale(ACTVAL *pactval, MATRIX3 *pmat); float GGetActvalPoseGoal(ACTVAL *pactval, int ipose); void InitActref(ACTREF *pactref, ALO *palo); void GetActrefPositionGoal(ACTREF *pactref, float dtOffset, VECTOR *ppos, VECTOR *pv); void GetActrefRotationGoal(ACTREF *pactref, float dtOffset, MATRIX3 *pmat, VECTOR *pw); void GetActrefTwistGoal(ACTREF *pactref, float *pradTwist, float *pdradTwist); void GetActrefScale(ACTREF *pactref, MATRIX3 *pmat); float GGetActrefPoseGoal(ACTREF *pactref, int ipose); void InitActadj(ACTADJ *pactadj, ALO *palo); void GetActadjPositionGoal(ACTADJ *pactadj, float dtOffset, VECTOR *ppos, VECTOR *pv); void GetActadjRotationGoal(ACTADJ *pactadj, float dtOffset, MATRIX3 *pmat, VECTOR *pw); void GetActadjTwistGoal(ACTADJ *pactadj, float *pradTwist, float *pdradTwist); void GetActadjScale(ACTADJ *pactadj, MATRIX3 *pmat); float GGetActadjPoseGoal(ACTADJ *pactadj, int ipose); void InitActbank(ACTBANK *pactbank, ALO *palo); void GetActbankRotationGoal(ACTBANK *pactbank, float dtOffset, MATRIX3 *pmat, VECTOR *pw); #endif // ACT_H ================================================ FILE: include/actseg.h ================================================ /** * @file actseg.h * * @brief Declarations for actor segments. */ #ifndef ACTSEG_H #define ACTSEG_H #include "common.h" #include #include #include // Forward. struct ASEGA; /** * @brief Actor segment. * @todo Implement the struct. */ struct ACTSEG : public ACT { /* 0x1c */ ASEGA *pasega; /* 0x20 */ DLE dleAsega; // ... }; void RetractActseg(ACTSEG *pactseg, GRFRA grfra); void CloneActseg(ACTSEG *pactseg, ACTSEG *pactsegBase); void GetActsegPositionGoal(ACTSEG *pactseg, float dtOffset, VECTOR *ppos, VECTOR *pv); void GetActsegRotationGoal(ACTSEG *pactseg, float dtOffset, MATRIX3 *pmat, VECTOR *pw); void GetActsegTwistGoal(ACTSEG *pactseg, float *pradTwist, float *pdradTwist); void GetActsegScale(ACTSEG *pactseg, MATRIX3 *pmat); float GGetActsegPoseGoal(ACTSEG *pactseg, int ipose); #endif // ACTSEG_H ================================================ FILE: include/alarm.h ================================================ /** * @file alarm.h * * @brief Alarm system. */ #ifndef ALARM_H #define ALARM_H #include "common.h" #include #include #include #include #include // Forward. struct SENSOR; /** * @brief Alarm state. */ enum ALARMS { ALARMS_Nil = -1, ALARMS_Enabled = 0, ALARMS_Disabled = 1, ALARMS_Triggered = 2, ALARMS_Max = 3 }; /** * @brief Alarm trigger kind. */ enum ALTK { ALTK_Nil = -1, ALTK_Trigger = 0, ALTK_Untrigger = 1, ALTK_Disable = 2, ALTK_Max = 3 }; /** * @class ALARM * @brief Alarm object that controls some sensors. */ struct ALARM : public SO { /* 0x550 */ ALARMS alarms; // current alarm state float tAlarms; SM *psm; SMA *psma; float dtReset; /* 0x564 */ int calbrks; // count of breakables /* 0x568 */ OID aoidAlbrks[4]; // array of breakable OIDs int coidSensors; OID aoidSensors[16]; int cpsensors; SENSOR *apsensors[16]; int coidStepguards; OID aoidStepguards[6]; int calbrksDisabled; AMB *pambSiren; EXC *pexc; int fSilent; int crsmg; RSMG arsmg[8]; /* 0x6b0 */ int ichkDisabled; }; /** * @class ALARM_BREAKABLE * @brief Breakable alarm. */ struct ALBRK : public BRK { // ... /* 0x6c0 */ ALARM *palarm; }; void BreakAlbrk(ALBRK *palbrk); void SetAlbrkAlarm(ALBRK *palbrk, ALARM *palarm); void InitAlarm(ALARM *palarm); void PostAlarmLoad(ALARM *palarm); void CloneAlarm(ALARM *palarm, ALARM *palarmBase); void UpdateAlarm(ALARM *palarm, float dt); void PostAlarmLoadCallbackHookup(ALARM *palarm, MSGID msgid, void *pv); void SetAlarmAlarms(ALARM *palarm, ALARMS alarms); void TriggerAlarm(ALARM *palarm, ALTK altk); void DisableAlarmAlbrk(ALARM *palarm); void EnableAlarmSensors(ALARM *palarm); void DisableAlarmSensors(ALARM *palarm); void NotifyAlarmSensorsOnTrigger(ALARM *palarm); /** * @brief Adds a breakable alarm object to the alarm's list. * * @param palarm Pointer to the alarm. * @param oid Object ID of the breakable alarm to add (max 4). */ void AddAlarmAlbrk(ALARM *palarm, OID oid); /** * @brief Adds a sensor object to the alarm's sensor list. * * @param palarm Pointer to the alarm. * @param oid Object ID of the sensor to add (max 16). */ void AddAlarmSensor(ALARM *palarm, OID oid); /** * @brief Adds a stepguard object to the alarm's stepguard list. * * @param palarm Pointer to the alarm. * @param oid Object ID of the stepguard to add (max 6). */ void AddAlarmStepguard(ALARM *palarm, OID oid); void SetAlarmRsmg(ALARM *palarm, int fOnTrigger, OID oidRoot, OID oidSM, OID oidGoal); int FGetAlarmSensorList(ALARM *palarm, void *pvstate); #endif // ALARM_H ================================================ FILE: include/alo.h ================================================ /** * @file alo.h */ #ifndef ALO_H #define ALO_H #include "common.h" #include #include #include #include #include // Forward struct CBinaryInputStream; struct SFX; struct SMPA; struct MRG; struct ASEGA; struct ASEGD; struct ACT; struct ACTLY; struct ACTSEG; struct ACTADJ; struct ACTBANK; struct IKH; struct ALOX; struct SHADOW; struct THROB; struct POSEC; struct ACTREF; struct FADER; struct PROXY; struct RO; struct CM; struct SMA; struct TARGET; typedef int GRFIC; typedef int GRFTAK; typedef int GRFSNIP; /** * @todo Unknown. */ enum ACK { ACK_Nil = -1, ACK_None = 0, ACK_Spring = 1, ACK_Velocity = 2, ACK_Smooth = 3, ACK_Spline = 4, ACK_Drive = 5, ACK_SmoothForce = 6, ACK_SmoothLock = 7, ACK_SpringLock = 8, ACK_SmoothNoLock = 9, ACK_Max = 10 }; /** * @brief Unknown. */ enum RTCK { RTCK_Nil = -1, RTCK_None = 0, RTCK_All = 1, RTCK_WorldZ = 2, RTCK_LocalX = 3, RTCK_LocalY = 4, RTCK_LocalZ = 5, RTCK_Max = 6 }; /** * @brief Unknown. */ enum THROBK { THROBK_Nil = -1, THROBK_Pipe = 0, THROBK_Ninja = 1, THROBK_Rail = 2, THROBK_Hide = 3, THROBK_Foo = 4, THROBK_Bar = 5, THROBK_Max = 6 }; /** * @brief Unknown. */ struct THROB { /* 0x00 */ THROBK throbk; /* 0x04 */ STRUCT_PADDING(11); /* 0x30 */ float dtInOut; }; /** * @brief Unknown. */ struct WKR { LO *ploSource; LO *ploTarget; float sftMax; /* 0x0c */ GRFIC grfic; GRFTAK grftak; float gSort; }; /** * @todo Unknown. */ struct FICG { uchar grficSweep; uchar grficRush; uchar grficSmash; uchar grficBomb; uchar grficShock; }; /** * @todo Unknown. */ struct SNIP { /* 0x00 */ GRFSNIP grfsnip; OID oid; int ib; }; /** * @brief Transform. */ struct XF { MATRIX3 mat; VECTOR pos; MATRIX3 matWorld; VECTOR posWorld; VECTOR v; VECTOR w; VECTOR dv; VECTOR dw; }; /** * @class LIGHTWEIGHT * @brief Unknown, probably used for instancing LOs. * * @todo Finish implementing struct. */ struct ALO : public LO { /* 0x34 */ DL dlChild; DLE dleBusy; /* 0x54 */ DLE dleMRD; ALO *paloRoot; ALO *paloFreezeRoot; DLE dleFreeze; /* 0x60 */ DL dlFreeze; int cpmrg; MRG *apmrg; /* 0x80 */ float sMRD; /* 0x84 */ float sCelBorderMRD; /* 0x88 */ int grfzon; float dsMRDSnap; undefined4 unk_0x9c; STRUCT_PADDING(10); // int frz[10]; XF xf; VECTOR posOrig; MATRIX3 matOrig; VECTOR eulOrig; /* 0x1e0 */ DL dlAct; ACT *pactPos; ACT *pactRot; ACT *pactScale; ACT **apactPost; ACT *pactRestore; ACTLY *pactla; ACTBANK *pactbank; IKH *pikh; CLQ *pclqPosSpring; CLQ *pclwPosDamping; CLQ *pclqRotSpring; CLQ *pclqRotDamping; SMPA *psmpaPos; SMPA *psmapaRot; ALOX *palox; /* 0x228 */ int cframeStatic; /* 0x22c */ STRUCT_PADDING(22); // GLOBSET globset; /* 0x284 */ SHADOW *pshadow; /* 0x288 */ THROB *pthrob; /* 0x28c */ float sFastShadowRadius; /* 0x290 */ float sFastShadowDepth; int fRealClock; FADER *pfader; float dtUpdatePause; ASEGD *pasegd; float sRadiusRenderSelf; float sRadiusRenderAll; /* 0x2ac */ SFX *psfx; STRUCT_PADDING(25); FICG ficg; STRUCT_PADDING(1); // ??? int cposed; POSEC *aposec; ACTREF *pactrefCombo; /* 0x2c4 */ DLR *pdlrFirst; // ??? ACK ackRot; // ??? // ... }; int FIsZeroV(VECTOR *pv); int FIsZeroW(VECTOR *pw); int FIsZeroDv(VECTOR *pdv); int FIsZeroDw(VECTOR *pdw); /** * @brief Initializes an ALO. * * @param palo ALO to initialize. */ void InitAlo(ALO *palo); void AddAloHierarchy(ALO *palo); /** * @brief Adds an ALO. * * @param palo ALO to add. */ void OnAloAdd(ALO *palo); void RemoveAloHierarchy(ALO *palo); /** * @brief Removes an ALO. * * @param palo ALO to remove. */ void OnAloRemove(ALO *palo); void UpdateAloOrig(ALO *palo); void SetAloParent(ALO *palo, ALO *paloParent); void ApplyAloProxy(ALO *palo, PROXY *pproxyApply); void BindAlo(ALO *palo); void PostAloLoad(ALO *palo); void PostAloLoadCallback(ALO *palo, MSGID msgid, void *pvData); void SnipAloObjects(ALO *palo, int csnip, SNIP *asnip); void UpdateAloHierarchy(ALO *palo, float dt); /** * @brief Updates an ALO. * * @param palo ALO to initialize */ void UpdateAlo(ALO *palo, float dt); void InvalidateAloLighting(ALO *palo); void UpdateAloXfWorld__FP3ALO(ALO * palo); void UpdateAloXfWorldHierarchy(ALO *palo); void PresetAloAccel(ALO *palo, float dt); void ProjectAloTransform(ALO *palo, float dt, int fParentDirty); void PredictAloTransform(ALO *paloLeaf, ALO *paloBasis, float dtOffset, VECTOR *ppos, MATRIX3 *pmat, VECTOR *pv, VECTOR *pw); void PredictAloTransformAdjust(ALO *paloLeaf, ALO *paloBasis, float dtOffset, VECTOR *ppos, MATRIX3 *pmat, VECTOR *pv, VECTOR *pw); void DupAloRo(ALO *palo, RO *proOrig, RO *proDup); void RenderFastShadow(ALO *palo, CM *pcm, RO *pro); void RenderAloAll(ALO *palo, CM *pcm, RO *pro); void RenderAloSelf(ALO *palo, CM *pcm, RO *pro); void RenderAloGlobset(ALO *palo, CM *pcm, RO *pro); void RenderAloLine(ALO *palo, CM *pcm, VECTOR *ppos0, VECTOR *ppos1, float rWidth, float uAlpha); void SetAloOverrideCel(ALO *palo, RGBA *rgba); void UpdateAloThrob(ALO *palo, float dt); void SetAloBlotContext(ALO *palo, BLOT *pblot); void EnsureAloFader(ALO *palo); /** * @brief Fades in an ALO. * * @param palo ALO to fade in. * @param dtFade Time to fade in over. */ void FadeAloIn(ALO *palo, float dtFade); /** * @brief Fades out an ALO. * * @param palo ALO to fade out. * @param dtFade Time to fade out over. */ void FadeAloOut(ALO *palo, float dtFade); void AdjustAloRtckMat(ALO *palo, CM *pcm, RTCK rtck, VECTOR *pposCenter, MATRIX4 *pmat); void CloneAloHierarchy(ALO *palo, ALO *paloBase); /** * @brief Clones an ALO. * * @param palo ALO to clone to. * @param paloBase Base ALO to clone from. */ void CloneAlo(ALO *palo, ALO *paloBase); void HandleAloMessage(ALO *palo, MSGID msgid, void *pv); void TranslateAloToPos(ALO *palo, VECTOR *ppos); void RotateAloToMat(ALO *palo, MATRIX3 *pmat); void SetAloVelocityVec(ALO *palo, VECTOR *pv); void SetAloVelocityXYZ(ALO *palo, float x, float y, float z); void SetAloAngularVelocityVec(ALO *palo, VECTOR *pw); void SetAloAngularVelocityXYZ(ALO *palo, float x, float y, float z); void SetAloVelocityLocal(ALO *palo, VECTOR *pvec); void GetAloVelocityLocal(ALO *palo, VECTOR *pvec); void MatchAloOtherObject(ALO *palo, ALO *paloOther); void CalculateAloMovement(ALO *paloLeaf, ALO *paloBasis, VECTOR *ppos, VECTOR *pv, VECTOR *pw, VECTOR *pdv, VECTOR *pdw); void CalculateAloTransform(ALO *paloLeaf, ALO *paloBasis, int cpaloPredict, VECTOR *apos, MATRIX3 *amat, VECTOR *av, VECTOR *aw); void CalculateAloTransformAdjust(ALO *paloLeaf, ALO *paloBasis, VECTOR *ppos, MATRIX3 *pmat, VECTOR *pv, VECTOR *pw); void ConvertAloPos(ALO *paloFrom, ALO *paloTo, VECTOR *pposFrom, VECTOR *pposTo); void ConvertAloVec(ALO *paloFrom, ALO *paloTo, VECTOR *pvecFrom, VECTOR *pvecTo); void ConvertAloMat(ALO *paloFrom, ALO *paloTo, MATRIX3 *pmatFrom, MATRIX3 *pmatTo); int FDrivenAlo(ALO *palo); void RetractAloDrive(ALO *palo); void ConvertAloMovement(ALO *paloFrom, ALO *paloTo, VECTOR *ppos, VECTOR *pvFrom, VECTOR *pwFrom, VECTOR *pdvFrom, VECTOR *pdwFrom, VECTOR *pvTo, VECTOR *pwTo, VECTOR *pdvTo, VECTOR *pdwTo); void CalculateAloDrive(ALO *palo, CLQ *pclqHoming, LM *plmHoming, float dt, float radPanCur, float *pradPanTarget, float *pradTiltTarget, float *psvTarget); int FGetAloChildrenList(ALO *palo, void *pvstate); ACTSEG *PactsegNewAlo(ALO *palo); /** * @brief Loads an ALO from a BRX file. * * @param palo ALO to load into. * @param pbis Binary input stream to read from. */ void LoadAloFromBrx(ALO *palo, CBinaryInputStream *pbis); void LoadAloAloxFromBrx(ALO *palo, CBinaryInputStream *pbis); void BindAloAlox(ALO *palo); void AdjustAloRotation(ALO *palo, MATRIX3 *pmat, VECTOR *pw); void UnadjustAloRotation(ALO *palo, MATRIX3 *pmat); void SetAloInitialVelocity(ALO *palo, VECTOR *pv); void SetAloInitialAngularVelocity(ALO *palo, VECTOR *pw); ASEGD *PasegdEnsureAlo(ALO *palo); void SetAloFastShadowRadius(ALO *palo, float sRadius); void GetAloFastShadowRadius(ALO *palo, float *psRadius); void SetAloFastShadowDepth(ALO *palo, float sDepth); void GetAloFastShadowDepth(ALO *palo, float *psDepth); SHADOW *PshadowAloEnsure(ALO *palo); void SetAloCastShadow(ALO *palo, int fCastShadow); void SetAloShadowShader(ALO *palo, OID oidShdShadow); void SetAloShadowNearRadius(ALO *palo, float sNearRadius); void SetAloShadowFarRadius(ALO *palo, float sFarRadius); void SetAloShadowNearCast(ALO *palo, float sNearCast); void SetAloShadowFarCast(ALO *palo, float sFarCast); void SetAloShadowConeAngle(ALO *palo, float degConeAngle); void SetAloShadowFrustrumUp(ALO *palo, VECTOR *pvecUp); void SetAloDynamicShadowObject(ALO *palo, OID oidDysh); SHADOW *PshadowInferAlo(ALO *palo); void GetAloCastShadow(ALO *palo, int *pfCastShadow); void GetAloShadowShader(ALO *palo, OID *poidShdShadow); void GetAloShadowNearRadius(ALO *palo, float *psNearRadius); void GetAloShadowFarRadius(ALO *palo, float *psFarRadius); void GetAloShadowNearCast(ALO *palo, float *psNearCast); void GetAloShadowFarCast(ALO *palo, float *psFarCast); void GetAloShadowConeAngle(ALO *palo, float *pdegConeAngle); void GetAloShadowFrustrumUp(ALO *palo, VECTOR *pvecUp); void GetAloEuler(ALO *palo, VECTOR *peul); void SetAloEuler(ALO *palo, VECTOR *peul); void EnsureAloActRestore(ALO *palo); void EnsureAloActla(ALO *palo); void RecacheAloActList(ALO *palo); void InsertAloAct(ALO *palo, ACT *pact); void ResortAloActList(ALO *palo); ASEGA *PasegaFindAlo(ALO *palo, OID oidAseg); SMA *PsmaFindAlo(ALO *palo, OID oidSm); ASEGA *PasegaFindAloNearest(ALO *paloLeaf); void CreateAloActadj(ALO *palo, int nPriority, ACTADJ **ppactadj); int FIsAloStatic(ALO *palo); void ResolveAlo(ALO *palo); void SetAloPositionSpring(ALO *palo, float r); void SetAloPositionSpringDetail(ALO *palo, CLQ *pclq); void SetAloPositionDamping(ALO *palo, float r); void SetAloPositionDampingDetail(ALO *palo, CLQ *pclq); void SetAloRotationSpring(ALO *palo, float r); void SetAloRotationSpringDetail(ALO *palo, CLQ *pclq); void SetAloRotationDamping(ALO *palo, float r); void SetAloRotationDampingDetail(ALO *palo, CLQ *pclq); void SetAloPositionSmooth(ALO *palo, float r); void SetAloPositionSmoothMaxAccel(ALO *palo, float r); void SetAloPositionSmoothDetail(ALO *palo, SMPA *psmpa); void SetAloRotationSmooth(ALO *palo, float r); void SetAloRotationSmoothMaxAccel(ALO *palo, float r); void SetAloRotationSmoothDetail(ALO *palo, SMPA *psmpa); void SetAloDefaultAckPos(ALO *palo, ACK ack); void SetAloDefaultAckRot(ALO *palo, ACK ack); void SetAloRestorePosition(ALO *palo, int fRestore); void SetAloNoFreeze(ALO *palo, int fNoFreeze); void SetAloRestorePositionAck(ALO *palo, ACK ack); void SetAloRestoreRotation(ALO *palo, int fRestore); void SetAloRestoreRotationAck(ALO *palo, ACK ack); void SetAloLookAt(ALO *palo, ACK ack); void SetAloLookAtIgnore(ALO *palo, float sIgnore); void GetAloLookAtIgnore(ALO *palo, float *psIgnore); void SetAloLookAtPanFunction(ALO *palo, CLQ *pclq); void GetAloLookAtPanFunction(ALO *palo, CLQ *pclq); void SetAloLookAtPanLimits(ALO *palo, LM *plm); void GetAloLookAtPanLimits(ALO *palo, LM *plm); void SetAloLookAtTiltFunction(ALO *palo, CLQ *pclq); void GetAloLookAtTiltFunction(ALO *palo, CLQ *pclq); void SetAloLookAtTiltLimits(ALO *palo, LM *plm); void GetAloLookAtTiltLimits(ALO *palo, LM *plm); void SetAloLookAtEnabledPriority(ALO *palo, int nPriority); void GetAloLookAtEnabledPriority(ALO *palo, int *pnPriority); void SetAloLookAtDisabledPriority(ALO *palo, int nPriority); void GetAloLookAtDisabledPriority(ALO *palo, int *pnPriority); void SetAloRotationMatchesVelocity(ALO *palo, float uBank, float dtPredict, ACK ackRot); TARGET *PtargetEnsureAlo(ALO *palo); void SetAloTargetAttacks(ALO *palo, GRFTAK grftak); void SetAloTargetRadius(ALO *palo, float sRadiusTarget); void SetAloTargetHitTest(ALO *palo, int fHitTest); void SetAloScrollingMasterSpeeds(ALO *palo, float svu, float svv); void SetAloEyesClosed(ALO *palo, float uClosed); void EnsureAloSfx(ALO *palo); void SetAloSfxid(ALO *palo, SFXID sfxid); void SetAloSfxidSpl(ALO *palo, SFXID sfxid); void GetAloSfxid(ALO *palo, SFXID *psfxid); void SetAloSStart(ALO *palo, float sStart); void GetAloSStart(ALO *palo, float *psStart); void SetAloSFull(ALO *palo, float sFull); void SetAloSndRepeat(ALO *palo, LM *plm); void GetAloSFull(ALO *palo, float *psFull); void SetAloUVolume(ALO *palo, float uVol); void SetAloUDoppler(ALO *palo, float uDoppler); void GetAloUDoppler(ALO *palo, float *puDoppler); void SetAloUVolumeSpl(ALO *palo, float uVol); void GetAloUVolume(ALO *palo, float *puVol); void SetAloUPitch(ALO *palo, float uPitch); void SetAloUPitchSpl(ALO *palo, float uPitch); void GetAloUPitch(ALO *palo, float *puPitch); void GetAloSndRepeat(ALO *palo, LM *plmRepeat); void StartAloSound(ALO *palo, SFXID sfxid, float sStart, float sFull, float uVol, LM *plmRepeat); void StopAloSound(ALO *palo); void EnsureAloThrob(ALO *palo); void SetAloThrobKind(ALO *palo, THROBK throbk); void GetAloThrobKind(ALO *palo, THROBK *pthrobk); void SetAloThrobInColor(ALO *palo, VECTOR *phsvInColor); void GetAloThrobInColor(ALO *palo, VECTOR *phsvInColor); void SetAloThrobOutColor(ALO *palo, VECTOR *phsvOutColor); void GetAloThrobOutColor(ALO *palo, VECTOR *phsvOutColor); void SetAloThrobDtInOut(ALO *palo, float dtInOut); void GetAloThrobDtInOut(ALO *palo, float *pdtInOut); void SetAloInteractCane(ALO *palo, GRFIC grfic); void GetAloInteractCane(ALO *palo, GRFIC *pgrfic); void SetAloInteractCaneSweep(ALO *palo, GRFIC grfic); void GetAloInteractCaneSweep(ALO *palo, GRFIC *pgrfic); void SetAloInteractCaneRush(ALO *palo, GRFIC grfic); void GetAloInteractCaneRush(ALO *palo, GRFIC *pgrfic); void SetAloInteractCaneSmash(ALO *palo, GRFIC grfic); void GetAloInteractCaneSmash(ALO *palo, GRFIC *pgrfic); void SetAloInteractBomb(ALO *palo, GRFIC grfic); void GetAloInteractBomb(ALO *palo, GRFIC *pgrfic); void SetAloInteractShock(ALO *palo, GRFIC grfic); void GetAloInteractShock(ALO *palo, GRFIC *pgrfic); int FAbsorbAloWkr(ALO *palo, WKR *pwkr); void SetAloPoseCombo(ALO *palo, OID oidCombo); void SetAloForceCameraFade(ALO *palo, int fFade); void SetAloRealClock(ALO *palo, int fRealClock); #endif // ALO_H ================================================ FILE: include/aseg.h ================================================ /** * @file aseg.h */ #ifndef ASEG_H #define ASEG_H #include "common.h" #include #include #include // Forward. struct OVR; struct CHN; struct ASEGA; /** * @brief Unknown. */ enum IAK { IAK_Nil = -1, IAK_Time = 0, IAK_Proportion = 1, IAK_Nearest = 2, IAK_Max = 3 }; /** * @brief Unknown. */ enum SEEK { SEEK_Nil = -1, SEEK_Start = 0, SEEK_Current = 1, SEEK_End = 2, SEEK_EndDoEvents = 3, SEEK_Max = 4 }; /** * @brief Unknown. */ struct CHN { // ... }; /** * @class ANIMATION_SEGMENT * @brief Object representing an animation segment. */ struct ASEG : public LO { /* 0x34 */ STRUCT_PADDING(14); /* 0x6c */ DL dlAsega; /* 0x78 */ STRUCT_PADDING(2); /* 0x80 */ CLQ clqMasterSuck; /* 0x90 */ LM lmMasterSuck; /* 0x98 */ float svtMasterSuck; /* 0x9c */ CHN *pchnStrip; }; /** * @brief Animation segment something(?). */ struct ASEGD { /* 0x00 */ ASEG *paseg; /* 0x04 */ OID oidAseg; /* 0x08 */ IAK iak; /* 0x0c */ float tLocal; /* 0x10 */ float svtLocal; }; /** * @class ASEGBL * @brief Animation segment blend(?). */ struct ASEGBL : public ASEG { // ... }; /** * @brief Unknown. */ struct EA { float tLocal; }; /** * @brief Supposed to start the ASEG system, but it doesn't do anything. */ void StartupAseg(); void InitAseg(ASEG *paseg); void LoadAsegFromBrx(ASEG *paseg, CBinaryInputStream *pbis); void LoadAsegEventsFromBrx(ASEG *paseg, CBinaryInputStream *pbis, int fFrame, int *pcea, EA **paea); void CloneAseg(ASEG *paseg, LO *ploBase); void PostAsegLoad(ASEG *paseg); void PostAsegLoadCallback(ASEG *paseg, MSGID msgid, void *pvData); void ApplyAsegOvr(ASEG *paseg, ALO *paloAsegRoot, int covr, OVR *aovr, float tLocal, float svtLocal, GRFAPL grfapl, ASEGA **ppasega); void ApplyAseg(ASEG *paseg, ALO *paloAsegRoot, float tLocal, float svtLocal, GRFAPL grfapl, ASEGA **ppasega); ASEGA *PasegaApplyAseg(ASEG *paseg, ALO *paloAsegRoot, float tLocal, float svtLocal, GRFAPL grfapl); ASEGA *PasegaFindAseg(ASEG *paseg, ALO *paloRoot); void EnsureAseg(ASEG *paseg, ALO *paloRoot, SEEK seek, float t, float svt, GRFAPL grfapl, ASEGA **ppasega); ASEGA *PasegaEnsureAseg(ASEG *paseg, ALO *paloRoot, SEEK seek, float t, float svt, GRFAPL grfapl); void ApplyAsegCur(ASEG *paseg, ALO *paloRoot, float t, float svt, GRFAPL grfapl, ASEGA **ppasega); int FWipingAseg(ASEG *paseg); void FindAsegClosestPoint(ASEG *paseg, ALO *palo, VECTOR *ppos, float t, float *ptClosest, VECTOR *pposClosest, VECTOR *pvClosest); EA *PeaFindAsegLabel(ASEG *paseg, OID oidLabel); float TFindAsegLabel(ASEG *paseg, OID oidLabel); CHN *PchnFindAseg(ASEG *paseg, ALO *palo); void PredictAsegEffect(ASEG *paseg, float t, float svt, ALO *paloLeaf, ALO *paloBasis, int cpaloPredict, VECTOR *apos, MATRIX3 *amat, VECTOR *av, VECTOR *aw); void GetAsegWaypoints(ASEG *paseg, ALO *paloContext, int *pcpwaypoint, WAYPOINT ***papwaypoint); void StripAsegChn(ASEG *paseg, CHN *pchn); void StripAsegAlo(ASEG *paseg, ALO *palo); /** * @brief Does nothing. */ void LoadAsegblFromBrx(ASEGBL *pasegbl, CBinaryInputStream *pbis); /** * @brief Does nothing. */ void PostAsegblLoad(ASEGBL *pasegbl); /** * @brief Does nothing. */ void CloneAsegbl(ASEGBL *pasegbl, LO *ploBase); #endif // ASEG_H ================================================ FILE: include/asega.h ================================================ /** * @file asega.h */ #ifndef ASEGA_H #define ASEGA_H #include "common.h" #include #include // Forward. struct ACTSEG; /** * @class ANIMATION_SEGMENT_APPLICATION * @brief Unknown. */ struct ASEGA : public BASIC { /* 0x08 */ STRUCT_PADDING(7); /* 0x24 */ char fHandsOff; /* 0x25 */ undefined1 unk1; /* 0x26 */ undefined1 unk2; /* 0x27 */ undefined1 unk3; /* 0x28 */ ACTSEG *pactsegError; /* 0x2c */ STRUCT_PADDING(6); /* 0x44 */ DL dlActseg; // ... }; // ... void RetractAsega(ASEGA *pasega); #endif // ASEGA_H ================================================ FILE: include/barrier.h ================================================ /** * @file barrier.h */ #ifndef BARRIER_H #define BARRIER_H #include "common.h" #include // Forward. struct XP; /** * @brief Barrier. * @todo Implement the struct. */ struct BARRIER : public SO { // ... /* 0x554 */ int coid; /* 0x558 */ OID aoid[4]; /* 0x568 */ int ccid; /* 0x56c */ CID acid[4]; // ... }; void InitBarrier(BARRIER *pbarrier); void CloneBarrier(BARRIER *pbarrier, BARRIER *pbarrierBase); void PostBarrierLoad(BARRIER *pbarrier); void UpdateBarrier(BARRIER *pbarrier, float dt); int FIgnoreBarrierIntersection(BARRIER *pbarrier, SO *psoOther); void NotifyBarrierImpact(BARRIER *pbarrier, XP *pxp, int ixpd); void AddBarrierObject(BARRIER *pbarrier, OID oid); void AddBarrierClass(BARRIER *pbarrier, CID cid); #endif // BARRIER_H ================================================ FILE: include/bas.h ================================================ /** * @file bas.h * * @brief Binary Async Stream. */ #ifndef BAS_H #define BAS_H #include "common.h" #include #include /** * @brief Binary Async Stream Kind. */ enum BASK { BASK_Nil = -1, BASK_Host = 0, BASK_Cd = 1, BASK_Max = 2 }; /** * @brief Binary Async Stream. */ class CBinaryAsyncStream { public: BASK m_bask; int m_fd; uint m_isector; int m_cbSpooling; byte *m_pbSpooling; byte *m_abSpool; int m_cb; byte *m_pb; int m_ibCur; int m_cbUnspooled; int m_cbFile; /** * @brief Constructs a new CBinaryAsyncStream. * * @param pvSpool Pointer to the spool. */ CBinaryAsyncStream(void *pvSpool); /** * @brief Destroys the CBinaryAsyncStream. */ ~CBinaryAsyncStream(); /** * @brief Opens the file at the given location. * * First checks if the file is open and the CD is available. * * @param pfl Pointer to the file location. * * @retval false File is not open. * @retval true File is open. */ bool FOpenFile(CFileLocation *pfl); /** * @brief Opens the sector at the given location. * * @param isector Sector to open. * @param cb Number of bytes to read. * * @retval false Sector is not open. * @retval true Sector is open. */ bool FOpenSector(uint isector, uint cb); /** * @brief Closes the stream. */ void Close(); /** * @brief Start spooling. */ void StartSpooling(); /** * @brief TODO. */ bool FSpooling(); /** * @brief Check if spooling is complete. */ bool FSpoolingComplete(); /** * @brief Finish spooling. */ void FinishSpooling(); /** * @brief TODO. */ void Spool(); /** * @brief Skip bytes. * * @param cb Number of bytes to skip. */ void Skip(int cb); }; #endif // BAS_H ================================================ FILE: include/basic.h ================================================ /** * @file basic.h * * @brief Basic object. */ #ifndef BASIC_H #define BASIC_H #include "common.h" #include /** * @class BASIC * @brief Base object for most other kinds of objects. */ struct BASIC { union { /* 0x00 */ VTBASIC *pvtbasic; /* 0x00 */ VTLO *pvtlo; }; /* 0x04 */ CSidebag *psidebag; }; /** * @brief Check if the basic object is derived from the given class ID. * * @param pbasic The object. * @param cid The class ID to check. * * @retval 1 if the object is derived from the class. * @retval 0 if the object is not derived from the class. */ int FIsBasicDerivedFrom(BASIC *pbasic, CID cid); /** * @brief Check if the basic has a sidebag, and if not, create one. * * @param pbasic The object. */ void EnsureBasicSidebag(BASIC *pbasic); /** * @brief Get the basic object's CID. * * @param pbasic The object. * @param pcid Return CID. */ void GetBasicCid(BASIC *pbasic, CID *pcid); #endif // BASIC_H ================================================ FILE: include/bbmark.h ================================================ /** * @file bbmark.h */ #ifndef BBMARK_H #define BBMARK_H #include "common.h" typedef int GRFPVA; // Forward. struct SW; struct SO; // TODO: Implement structs. struct XP; struct OXA; struct OXF; /** * @brief Unknown. */ struct OX { XP *pxp; OX *poxNext; OX *poxOther; SO *psoOther; }; /** * @brief Unknown. */ struct OXA { OX *pox; SO *pso; OXA *poxaNext; OXA *poxaPrev; }; void UpdateSwPox(SW *psw, OXA *poxa0, OXA *poxa1, OXF oxfAdd, OXF oxfRemove); OX *PoxAddSw(SW *psw, OXA *poxa, OXA *poxaOther); OX *PoxRemoveSw(SW *psw, OXA *poxa, OXA *poxaOther); OX *PoxFromSoSo(SO *pso, SO *psoOther); XP *PxpFirstFromSoSo(SO *pso, SO *psoOther); void AddSwAaobrObject(SW *psw, SO *pso); void RemoveSwAaobrObject(SW *psw, SO *pso); void InvalidateSwAaox(SW *psw); void UpdateSwAaox(SW *psw); void InvalidateSwXpForObject(SW *psw, SO *pso, GRFPVA grfpvaInvalid); void RecalcSwXpAll(SW *psw, int fCenterXp); void RecalcSwOxfFilterForObject(SW *psw, SO *pso); #endif // BBMARK_H ================================================ FILE: include/bez.h ================================================ /** * @file bez.h * * @brief Bezier curves. * * @todo Add function parameters and documentation. */ #ifndef BEZ_H #define BEZ_H #include "common.h" #include #include void EvaluateBezierWeightedFloat(float, float, float, float, float, float, float, float, float, float *, float *, float *); void EvaluateBezierFloat(float, float, float, float, float, float, float, float *, float *, float *); void EvaluateBezierPos(float, float, float, VECTOR *, VECTOR *, VECTOR *, VECTOR *, VECTOR *, VECTOR *, VECTOR *); void EvaluateBezierMat(float, float, float, MATRIX3 *, VECTOR *, MATRIX3 *, VECTOR *, MATRIX3 *, VECTOR *, VECTOR *); void TesselateBezier(float, float, float, VECTOR *, VECTOR *, VECTOR *, VECTOR *, int, VECTOR *); float SBezierPosLength(float, float, VECTOR *, VECTOR *, VECTOR *, VECTOR *); void LimitBezierMulti(int c, ...); #endif // BEZ_H ================================================ FILE: include/binoc.h ================================================ /** * @file binoc.h * * @brief Binoc-u-com. */ #ifndef BINOC_H #define BINOC_H #include "common.h" #include #include struct ALO; /** * @brief Binocular Edge Info (?) * * @note Used for binocular outline rendering */ struct BEI { /* 0x00 */ CLQ clq; // Quadratic curve parameters /* 0x10 */ float cseg; // Total number of segments /* 0x14 */ float csegNotchHalf; // Half the number of segments in the notch /* 0x18 */ int isegNotchFirst; // First segment index of the notch /* 0x1c */ int isegNotchMid; // Middle segment index of the notch /* 0x20 */ int isegNotchLast; // Last segment index of the notch /* 0x24 */ float gNotchEdge; // Y value at the notch edges /* 0x28 */ float gNotchCenter; // Y value at the notch center }; struct BINOC : public BLOT { STRUCT_PADDING(36); float unk0; undefined4 unk1; // RGBA color value? undefined4 unk2; ALO *paloLookat; float zoom; float dxReticle; float dyReticle; undefined4 unk3; undefined4 unk4; float uCompassBarOffset; }; /** * @brief Initializes a BEI struct for binocular outline rendering. * * @details Sets up the quadratic curve parameters and calculates segment indices for the * notch region in the binocular outline. The notch is positioned at the midpoint * of the curve for UI elements like the compass. * * @param pbei Pointer to the BEI struct to initialize. * @param pclq Pointer to the quadratic curve (CLQ) defining the outline shape. * @param duWidth Width of the notch. * @param dgHeight Vertical offset for the notch center. * @param cseg Total number of segments to divide the curve into. */ void InitBei(BEI *pbei, CLQ *pclq, float duWidth, float dgHeight, int cseg); /** * @brief Evaluates the binocular edge curve at a given segment. * * @details Returns the Y-coordinate for the outline at segment index iseg. For segments * outside the notch region, evaluates the quadratic curve directly. Within the * notch, performs linear interpolation between edge and center values to create * a V shaped cutout. * * @param pbei Pointer to the BEI struct containing curve and notch parameters. * @param iseg Segment index along the outline. * @return Y-coordinate value for the outline at this segment. */ float GEvaluateBei(BEI *pbei, int iseg); /** * @brief Checks if the binocular text reveal animation is complete. * * @param pbinoc Pointer to BINOC instance. * @return true if the text animation is complete, false otherwise. */ bool FDoneBinocAchz(BINOC *pbinoc); void SetBinocLookat(BINOC *binoc, ALO *paloLookat); /** * @brief Horizontal text justification. */ typedef enum JH { JH_Nil = -1, JH_Left = 0, JH_Center = 1, JH_Right = 2, JH_Max = 3 } JH; /** * @brief Vertical text justification. */ typedef enum JV { JV_Nil = -1, JV_Top = 0, JV_Center = 1, JV_Bottom = 2, JV_Max = 3 } JV; class CTextBox { public: /** * @brief Sets the position of the text box. * * @param x X position. * @param y Y position. */ void SetPos(float x, float y); /** * @brief Sets the size of the text box. * * @param dx Width. * @param dy Height. */ void SetSize(float dx, float dy); /** * @brief Sets the text color. * * @param rgba RGBA color value. */ void SetTextColor(RGBA *rgba); /** * @brief Sets the horizontal text justification. * * @param jh Horizontal text justification. */ void SetHorizontalJust(JH jh); /** * @brief Sets the vertical text justification. * * @param jv Vertical text justification. */ void SetVerticalJust(JV jv); private: float m_x; // X position. float m_y; // Y position. float m_dx; // Width. float m_dy; // Height. RGBA m_rgba; // Text color. enum JH m_jh; // Horizontal text justification. enum JV m_jv; // Vertical text justification; }; #endif /* BINOC_H */ ================================================ FILE: include/bis.h ================================================ /** * @file bis.h * * @brief Binary Input Stream. */ #ifndef BIS_H #define BIS_H #include "common.h" #include #include #include #include #include #include #include /** * @brief Binary Input Stream Kind. * * Types of binary stream that can be opened. */ enum BISK { BISK_Nil = -1, BISK_Host = 0, BISK_Cd = 1, BISK_Mem = 2, BISK_Max = 3 }; /** * @brief Binary Input Stream Flags numeric type. * * Flags for the binary input stream. */ typedef int GRFBIS; /** * @brief Binary Input Stream * * Used to read binary data from files on the disc. */ class CBinaryInputStream { public: int m_grfbis; BISK m_bisk; byte *m_abSpool; int m_cbSpool; int m_cbFile; int m_cbRemaining; /* File Stream Remaining Bytes. */ byte *m_pb; /* File Stream Position */ int m_cb; /* File Stream Size */ byte *m_pbRaw; int m_cbRaw; int m_grfDecomp; int m_cbSpillOver; CProg *m_pprog; TICK m_tickWait; int m_fd; int m_cbAsyncComplete; int m_cbAsyncRequest; int m_cbAsyncRemaining; int m_cbPartialRead; uint m_isector; /* Sector Offset in ISO */ int m_cbuf; int m_cbufFill; int m_ibufMic; int m_ibufMac; /** * @brief Constructs a new CBinaryInputStream. * * @param pvSpool Pointer to data. * @param cbSpool Size of data in bytes. * @param grfbis Flags. * * @todo Implement this constructor. */ CBinaryInputStream(void *pvSpool, int cbSpool, GRFBIS grfbis); /** * @brief Destroys the CBinaryInputStream. */ ~CBinaryInputStream(); /** * @brief Opens the sector at the given location. * * @param isector Sector to open. * @param cb Number of bytes to read. * * @retval 0 Sector is not open. * @retval 1 Sector is open. */ int FOpenSector(uint isector, uint cb); /** * @brief Opens a certain number of bytes in memory. * * @param cb Number of bytes to open. * @param pv Pointer to the memory location. */ void OpenMemory(int cb, void *pv); /** * @brief Opens the file at the given location. * * First checks if the file is open and the CD is available. * * @param pfl Pointer to the file location. * * @retval 0 File is not open. * @retval 1 File is open. */ int FOpenFile(CFileLocation *pfl); /** * @brief Closes the stream. */ void Close(); /** * @brief Decrements the number of async bytes remaining. * * @param cb Number of bytes to decrement. */ void DecrementCdReadLimit(int cb); /** * @brief Pumps data from the CD. */ void PumpCd(); /** * @brief Pumps data from the host pc. */ void PumpHost(); /** * @brief Pumps data from either the host or the CD. */ void Pump(); /** * @brief TBD. */ void Decompress(); /** * @brief Reads a certain number of bytes from the stream. * * Will read a certain number of bytes from the stream and store them at the * given location. * * @param cb Number of bytes to read. * @param pv Pointer to the memory location. */ void Read(int cb, void *pv); /** * @brief Aligns the stream to a certain number of bytes. * * @param n Number of bytes to align to. */ void Align(int n); /** * @brief Reads a 8-bit unsigned integer from the stream. * * @return The byte read. */ uchar U8Read(); /** * @brief Reads a 16-bit unsigned integer from the stream. * * @return The 16-bit unsigned integer read */ ushort U16Read(); /** * @brief Reads a 32-bit unsigned integer from the stream. * * @return The 32-bit unsigned integer read */ uint U32Read(); /** * @brief Reads a 8-bit signed integer from the stream. * * @return The 8-bit signed integer read */ char S8Read(); /** * @brief Reads a 16-bit signed integer from the stream. * * @return The 16-bit signed integer read */ short S16Read(); /** * @brief Reads a 32-bit signed integer from the stream. * * @return The 32-bit signed integer read */ int S32Read(); /** * @brief Reads a 32-bit floating point number from the stream. * * @return The 32-bit floating point number read */ float F32Read(); /** * @brief Reads a vector from the stream. * * @param pv Pointer to the vector to store the data. */ void ReadVector(VECTOR *pvec); /** * @brief Reads a 4D vector from the stream. * * @param pv Pointer to the vector to store the data. */ void ReadVector4(VECTOR4 *pvec); /** * @brief Reads a matrix from the stream. * * @param pmat Pointer to the matrix to store the data. */ void ReadMatrix(MATRIX3 *pmat); /** * @brief Reads a 4x4 matrix from the stream. * * @param pmat Pointer to the matrix to store the data. */ void ReadMatrix4(MATRIX4 *pmat); /** * @brief Reads geometry data from the stream. * * @param pgeom Pointer to the geometry data structure to store the data. * @param pbspb Pointer to a BSP tree (?). */ void ReadGeom(GEOM *pgeom, BSPC *pbspc); /** * @brief Reads the given number of VBSPs from the stream. * * @param pcvbsp Pointer to an integer that will store the number of VBSP entries read. * @param apvbsp Pointer to the array of VBSP data structures to store the data. */ void ReadVbsp(int *pcvbsp, VBSP **apvbsp); /** * @brief Reads a string from the stream. * * @param pachz Pointer where the string will be stored. */ void ReadStringSw(char **pachz); /** * @brief Reads a short from the stream and then skips the number of bytes it represents. */ void Unknown1(); /** * @brief Reads 32 bytes of data from the stream then it checks * two values and either copies the data or gives back a nullptr. * * @param ppv Pointer to the destination. */ void Unknown2(void **ppv); }; #endif // BIS_H ================================================ FILE: include/blend.h ================================================ /** * @file blend.h */ #ifndef BLEND_H #define BLEND_H #include "common.h" #include #include // Forward. struct ASEGBL; struct EA; /** * @brief Unknown. */ struct MRSG { float t; float dt; }; void VerifyAeaEquivalence(int cea0, EA *aea0, int cea1, EA *aea1); void EnsureAsegBlendDynamic(ALO *palo, int cbBl, int cbl, void *abl, int cmrsgc, int *mpimrsgcib, int *mpimrsgccmrsg, ASEGBL **ppasegbl); void FillBlAmrsg(int cbBl, int cbl, void *abl, int ibMrsg, int coid, OID *aoid); void CalculateBlendAmrsg(int cbBl, int cbl, void *abl, int ibMrsg, int cmrsg, MRSG *amrsg, float *ptMax); int ImrsgLookUp(float t, float tMax, int cmrsg, MRSG *amrsg, float *pdtBest); void ReblendAsegbl(ASEGBL *pasegbl, int cbBl, int cbl, void *abl); void SetAsegblSlerp(ASEGBL *pasegbl, ALO *palo); #endif // BLEND_H ================================================ FILE: include/blip.h ================================================ /** * @file blip.h */ #ifndef BLIP_H #define BLIP_H #include "common.h" #include #include #include #include #include #include #include // Forward. struct EMITB; struct RPL; typedef int GRFZON; /** * @todo Move elsewhere? */ struct VU_FLOAT { uint16_t data; }; /** * @brief Unknown. */ enum BLIPOK { BLIPOK_Nil = -1, BLIPOK_Fixed = 0, BLIPOK_Flying = 1, BLIPOK_Rolling = 2, BLIPOK_Max = 3 }; /** * @brief Unknown. */ struct BLIP { // ... }; /** * @class BLIPG * @brief Unknown. */ struct BLIPG { // ... }; /** * @brief Unknown. */ struct BLIPP { // ... }; /** * @brief Unknown. */ struct BLIPV { // ... }; /** * @brief Unknown. */ struct BLIPX { // ... }; void BuildBlipAqwGifs(int alpha_b, QW **paqw); void StartupBlips(); BLIP *PblipNew(BLIPG *pblipg); void RemoveBlip(BLIP *pblip); BLIPG *PblipgNew(SW *psw); void InitBlipg(BLIPG *pblipg); void OnBlipgAdd(BLIPG *pblipg); void OnBlipgRemove(BLIPG *pblipg); void SetBlipgShader(BLIPG *pblipg, OID oid); void PropagateBlipgShader(BLIPG *pblipg); void SetBlipgEmitb(BLIPG *pblipg, EMITB *pemitb); void UpdateBlipg(BLIPG *pblipg, float dt); void SubscribeBlipgObject(BLIPG *pblipg, LO *ploTarget); int CblipeProjectBlipTransformAccel(MATRIX4 *pmat4Dv, VU_FLOAT dt, BLIPP *ablipp, BLIPV *ablipv, BLIPX *ablipx, int cblipe, BLIPOK blipok, VECTOR *pposMin, VECTOR *pposMax); void ProjectBlipgTransformAccel(BLIPG *pblipg, float dt); void ProjectBlipgTransform(BLIPG *pblipg, float dt, int fForce); void RenderBlipgSelf(BLIPG *pblipg, CM *pcm, RO *pro); void DrawBlipg(RPL *prpl); void PropagateBlipgShaders(GRFZON grfzon); #endif // BLIP_H ================================================ FILE: include/bomb.h ================================================ /** * @file bomb.h */ #ifndef BOMB_H #define BOMB_H #include "common.h" #include #include #include #include #include // Forward. struct WKR; /** * @class BOMB * @brief Bomb (?). * @todo Implement the struct. */ struct BOMB : public SO { // ... /* 0x554 */ float tDetonate; // ... /* 0x680 */ SFX *psfxDet; // ... }; void InitBomb(BOMB *pbomb); void LoadBombFromBrx(BOMB *pbomb, CBinaryInputStream *pbis); void CloneBomb(BOMB *pbomb, BOMB *pbombBase); void PostBombLoad(BOMB *pbomb); void HandleBombMessage(BOMB *pbomb, MSGID msgid, void *pv); void UpdateBomb(BOMB *pbomb, float dt); int FAbsorbBombWkr(BOMB *pbomb, WKR *pwkr); void PrimeBomb(BOMB *pbomb, float dt); void ApplyBombThrow(BOMB *pbomb, PO *ppo); void DetonateBomb(BOMB *pbomb); SFX *PsfxEnsureBomb(BOMB *pbomb, ENSK ensk); #endif // BOMB_H ================================================ FILE: include/bq.h ================================================ /** * @file bq.h * * @brief Byte queue. */ #ifndef BQ_H #define BQ_H #include "common.h" /** * @brief TODO. */ class CQueueInput { public: virtual int CbRead(int cb, void *pv); }; /** * @brief TODO. */ class CQueueOutput { // ... }; /** * @brief TODO. */ class CQueueInputMemory : public CQueueInput { public: int CbRead(int cb, void *pv); }; /** * @brief TODO. */ class CQueueInputFile : public CQueueInput { public: int CbRead(int cb, void *pv); }; /** * @brief Byte Queue. */ class CByteQueue { public: byte *m_ab; int m_cb; int m_ibFree; int m_ibAlloc; int m_cbFree; int m_cbAlloc; int m_cbDrain; int m_cbTotal; /** * @brief Initialize the byte queue. * * @param cb Number of bytes. * @param pv Pointer to the data. */ void Init(int cb, void *pv); /** * @brief Reset the byte queue. */ void Reset(); /** * @brief TODO. * * @param cb Number of bytes. * @param pqi Pointer to the input. */ int CbFill(int cb, CQueueInput *pqi); /** * @brief TODO. * * @param cb Number of bytes. * @param pqo Pointer to the output. */ int CbDrain(int cb, CQueueOutput *pqo); /** * @brief TODO. * * @param cb Number of bytes. * @param pb Pointer to the data. */ int CbFill(int cb, byte *pb); /** * @brief Drain bytes from the byte queue. * * @param cb Number of bytes to drain. */ void FreeDrain(int cb); }; #endif // BQ_H ================================================ FILE: include/break.h ================================================ /** * @file break.h */ #ifndef BREAK_H #define BREAK_H #include "common.h" #include #include #include #include #include typedef int GRFBRK; /** * @brief Breakable piece state. */ enum BRKPS { BRKPS_Nil = -1, BRKPS_Idle = 0, BRKPS_Pending = 1, BRKPS_Fading = 2, BRKPS_Max = 3 }; /** * @brief Unknown. */ enum BRPT { BRPT_Nil = -1, BRPT_Disappear = 0, BRPT_Remain = 1, BRPT_Fixed = 2, BRPT_RemainFixed = 3, BRPT_Appear = 4, BRPT_Max = 5 }; /** * @brief Unknown. */ struct BRP { /* 0x00 */ BRPT brpt; /* 0x04 */ OID oid; /* 0x08 */ LO *plo; }; /** * @class (_BRK) * @brief Breakable base. */ struct BRK : public SO { // ... /* 0x550 */ int cbrp; /* 0x554 */ BRP abrp[16]; // ... /* 0x63c */ GRFBRK grfbrk; // ... }; /** * @brief BREAKABLE_PIECE * @brief Shards of breakables that appear when it's broken. */ struct BRKP { // ... }; /** * @class BREAKABLE * @brief Breakable object. */ struct BREAK : BRK { // ... }; /** * @class ZAPBREAK * @brief Unknown. * * @todo Move to zap.h? */ struct ZAPBREAK { // ... }; /** * @class FRAGILE. * @brief Unknown. */ struct FRAGILE { // ... }; /** * @brief Unknown. * * @todo Should this be somewhere else? */ struct XP { // ... }; void InitBrk(BRK *pbrk); void LoadBrkFromBrx(BRK *pbrk, CBinaryInputStream *pbis); void CloneBrk(BRK *pbrk, BRK *pbrkBase); void PostBrkLoad(BRK *pbrk); void PostBrkLoadCallbackHookup(BRK *pbrk, MSGID msgid, void *pv); void UpdateBrk(BRK *pbrk, float dt); int FAbsorbBrkWkr(BRK *pbrk, WKR *pwkr); void BreakBrk(BRK *pbrk); void SetBrkBroken(BRK *pbrk, int fBroken); void SetBrkExclude(BRK *pbrk, OID oid); void SetBrkRemain(BRK *pbrk, OID oid); void SetBrkFixed(BRK *pbrk, OID oid); void SetBrkRemainFixed(BRK *pbrk, OID oid); void SetBrkOnPlayer(BRK *pbrk, int fBreakOnPlayer); void GetBrkOnPlayer(BRK *pbrk, int *pfBreakOnPlayer); void SetBrkOnBomb(BRK *pbrk, int fBreakOnBomb); void GetBrkOnBomb(BRK *pbrk, int *pfBreakOnBomb); void AddBrkTouchObject(BRK *pbrk, OID oid); void AddBrkTouchClass(BRK *pbrk, CID cid); /** * @todo Rename function. */ void FUN_0013DAB8(); SFX *PsfxEnsureBrk(BRK *pbrk, ENSK ensk); int FCheckBrkTouchObject(BRK *pbrk, SO *psoRoot); void UpdateBrkp(BRKP *pbrkp, float dt); void HandleBrkpMessage(BRKP *pbrkp, MSGID msgid, void *pv); int FIgnoreBrkpIntersection(BRKP *pbrkp, SO *psoOther); void SetBrkpBrkps(BRKP *pbrkp, BRKPS brkps); void InitBreak(BREAK *pbreak); void InitFragile(FRAGILE *pfragile); void AdjustFragileNewXp(FRAGILE *pfragile, XP *pxp, int ixpd); void AdjustZapbreakNewXp(ZAPBREAK *pzapbreak, XP *pxp, int ixpd); void UpdateZapbreak(ZAPBREAK *pzapbreak, float dt); #endif // BREAK_H ================================================ FILE: include/brx.h ================================================ /** * @file brx.h * * @brief Binary Resource Archive. */ #ifndef BRX_H #define BRX_H #include "common.h" #include typedef int GRFEOPID; /** * @brief Object Type? * @todo Populate the enum with values from the prototype. */ enum OTYP { OTYP_Nil = -1 }; /** * @brief Optional Data? */ struct OPTDAT { undefined4 unknown1; undefined4 unknown2[2]; undefined4 unknown3; undefined4 unknown4; undefined4 unknown5; }; /** * @brief Unknown. */ struct EOPID { OTYP otyp; GRFEOPID grfeopid; OPTDAT optdat; }; /** * @brief Builds the eopids array. */ void StartupBrx(); /** * @brief Creates a new LO from the given parameters. * * @param cid Class ID. * @param psw Pointer to the SW object. * @param paloParent Pointer to the parent ALO object. * @param oid Object ID. * @param isplice Splice index. * * @return Pointer to the new LO object. */ LO *PloNew(CID cid, SW *psw, ALO *paloParent, OID oid, int isplice); /** * @brief TODO. */ void LoadOptionFromBrx(void *pvStruct, EOPID *peopid, CBinaryInputStream *pbis); /** * @brief Loads the options from a BRX file. * * @param pvStruct Pointer to the structure to load options into. * @param pbis Pointer to the binary input stream. */ void LoadOptionsFromBrx(void *pvStruct, CBinaryInputStream *pbis); /** * @brief Get the PLO index from a stock OID. * * @param oid The OID to get the index of. * * @return The level object index. */ uint IploFromStockOid(int oid); /** * @brief TODO. */ void LoadSwObjectsFromBrx(SW *psw, ALO *paloParent, CBinaryInputStream *pbis); /** * @brief TODO. */ void SetLoDefaults(LO *plo); #endif // BRX_H ================================================ FILE: include/bsp.h ================================================ /** * @file bsp.h * * @brief Binary Space Partitioning. * * @note At the time of writing all structs are based on * the May 19 prototype, so they could be inaccurate. */ #ifndef BSP_H #define BSP_H #include "common.h" #include #include /** * @brief Line Segment Kind (?) */ enum LSGK { LSGK_Nil = -1, LSGK_EdgeToBsp = 0, LSGK_EdgeToSphere = 1, LSGK_EdgeToCylinder = 2, LSGK_EdgeToCbsp = 3, LSGK_Merge = 4, LSGK_Max = 5, }; /** * @brief Unknown. */ enum PRUNE { PRUNE_Neg = 0, PRUNE_Pos = 1, PRUNE_Mixed = 2 }; /** * @brief BSP tree node. */ struct BSP { SURF *psurf; BSP *pbspNeg; BSP *pbspPos; }; /** * @brief BSP Collection (?). */ struct BSPC { int cbsp; int cbspFull; BSP *absp; }; /** * @brief Visibility BSP. */ struct VBSP { /* 0x00 */ VECTOR normal; /* 0x0c */ uint padding; // TODO: Remove once VECTOR is 16 bytes long. /* 0x10 */ float gDot; /* 0x14 */ VBSP *pvbspNeg; /* 0x18 */ VBSP *pvbspPos; /* 0x1c */ uint unk; }; /** * @brief Line Segment Group? */ struct LSG { VECTOR apos[2]; VECTOR anormal[2]; float au[2]; LSGK lsgk; undefined4 unk1; undefined8 unk2; EDGE *pedge; int iiposSwap; LSG *plsgNext; }; /** * @brief Unknown. */ int ClsgClipEdgeToBsp(BSP *pbspRoot, VECTOR *ppos1, VECTOR *ppos2, int *mpibspn, int clsgMax, LSG *alsg); /** * @brief Unknown. */ PRUNE PruneBsp(BSP *pbsp, VECTOR *ppos, float sRadius, BSP **ppbspNext); /** * @brief Unknown. */ BSP *PbspPointInBspQuick(VECTOR *ppos, BSP *pbsp); /** * @brief Unknown. */ void CloneBspc(GEOM *pgeomSrc, BSPC *pbspcSrc, GEOM *pbspcDst, BSPC *pbspcDst); #endif // BSP_H ================================================ FILE: include/button.h ================================================ /** * @file button.h * * @brief Button. */ #ifndef BUTTON_H #define BUTTON_H #include "common.h" #include #include #include // Forward. struct ASEG; /** * @brief Unknown. */ enum IASH { IASH_On = 0, IASH_Off = 1, IASH_Max = 2 }; /** * @brief Unknown. */ struct ASH { int coid; OID aoid[16]; int cpaseg; ASEG *apaseg[16]; }; /** * @brief Button state. */ enum BUTTONS { BUTTONS_Nil = -1, BUTTONS_NoContact = 0, BUTTONS_Contact = 1, BUTTONS_Pushed = 2, BUTTONS_Disabled = 3, BUTTONS_Reset = 4, BUTTONS_Max = 5 }; /** * @brief Button. * * @todo Migrated from May 19 prototype. May be incorrect. */ struct BTN { int unknown; ALO *paloOwner; ASH aash[2]; float svtAnimation; /* 0x11C */ int fCheckpointed; /* 0x120 */ int ichkPushed; float tButtons; float dtRepush; BUTTONS buttons; int fEnabled; int fSilent; int fReapplyAseg; int fManualReset; /* 0x140 */ OID oidDialog; // DIALOG *pdialog; int crsmg; RSMG arsmg[8]; }; /** * @class VOL_BUTTON * @brief Volume button. */ struct VOLBTN : public SO { // ... /* 0x550 */ int coidPush; /* 0x554 */ OID aoidPush[8]; //... /* 0x5c0 */ BTN btn; // ... }; /** * @class BUTTON * @brief Button. */ struct BUTTON : public SO { // ... /* 0x554 */ BTN btn; // ... }; void PostAshLoad(SW *psw, ASH *pash, ALO *paloOwner); int FFoundAshAseg(ASH *pash, ASEG *paseg); int FAddAshAseg(ASH *pash, ASEG *paseg); int FAddAshOid(ASH *pash, OID oid); void InitBtn(BTN *pbtn); void LoadBtn(BTN *pbtn, ALO *paloOwner); void PostBtnLoad(BTN *pbtn); void RestoreBtnFromCheckpointCallback(BTN *pbtn, MSGID msgid, void *pv); void SetBtnRsmg(BTN *pbtn, int fOnTrigger, OID oidRoot, OID oidSM, OID oidGoal); void SetBtnButtons(BTN *pbtn, BUTTONS buttons); int FAddRsmg(RSMG *arsmg, int crsmgMax, int *pcrsmg, int fOnTrigger, OID oidRoot, OID oidSM, OID oidGoal); void TriggerRsmg(SW *psw, int crsmg, RSMG *arsmg, LO *ploContext, int fTrigger); void RunBtnAsegs(BTN *pbtn, IASH asht, int fSeekToEnd, int fUnknown); void TriggerBtn(BTN *pbtn, int fSeekToEnd, int fChkTrigger); void UntriggerBtn(BTN *pbtn, int fSeekToEnd); void InitButton(BUTTON *pbutton); void LoadButtonFromBrx(BUTTON *pbutton, CBinaryInputStream *pbis); void InsertButtonPos(BUTTON *pbutton, PNT *ppnt, VECTOR *ppos); void InsertButtonMat(BUTTON *pbutton, XFM *pxfm, MATRIX3 *pmat); void PostButtonLoad(BUTTON *pbutton); void CloneButton(BUTTON *pbutton, BUTTON *pbuttonBase); void SetButtonButtons(BUTTON *pbutton, BUTTONS buttons); int FCheckButtonObject(BUTTON *pbutton, SO *psoOther); int IposFindButtonClosest(BUTTON *pbutton, float *psDist); int ImatFindButtonClosest(BUTTON *pbutton, float *prad); void PresetButtonAccel(BUTTON *pbutton, float dt); void UpdateButtonInternalXps(BUTTON *pbutton); void UpdateButton(BUTTON *pbutton, float dt); int FAbsorbButtonWkr(BUTTON *pbutton, WKR *pwkr); void InitVolbtn(VOLBTN *pvolbtn); void LoadVolbtnFromBrx(VOLBTN *pvolbtn, CBinaryInputStream *pbis); void PostVolbtnLoad(VOLBTN *pvolbtn); void CloneVolbtn(VOLBTN *pvolbtn, VOLBTN *pvolbtnBase); void SetVolbtnButtons(VOLBTN *pvolbtn, BUTTONS buttons); void UpdateVolbtn(VOLBTN *pvolbtn, float dt); int FGetVolbtnPushObjectsWithinList(VOLBTN *pvolbtn, void *pvstate); void AddBtnAseg(BTN *pbtn, ALO *palo, OID oid); void AddButtonAseg(BUTTON *pbutton, OID oid); void AddVolbtnAseg(VOLBTN *pvolbtn, OID oid); void AddBtnOffAseg(BTN *pbtn, ALO *palo, OID oid); void AddButtonOffAseg(BUTTON *pbutton, OID oid); void AddVolbtnOffAseg(VOLBTN *pvolbtn, OID oid); void AddButtonPushObject(BUTTON *pbutton, OID oid); void AddButtonNoPushObject(BUTTON *pbutton, OID oid); void AddButtonPushClass(BUTTON *pbutton, CID cid); void AddButtonNoPushClass(BUTTON *pbutton, CID cid); void AddVolbtnPushObject(VOLBTN *pvolbtn, OID oid); void SetButtonRsmg(BUTTON *pbutton, int fOnTrigger, OID oidRoot, OID oidSM, OID oidGoal); void SetVolbtnRsmg(VOLBTN *pvolbtn, int fOnTrigger, OID oidRoot, OID oidSM, OID oidGoal); #endif // BUTTON_H ================================================ FILE: include/cat.h ================================================ /** * @file cat.h * * @brief WAL catalog. */ #ifndef CAT_H #define CAT_H #include "common.h" /** * @brief Related to file location. */ struct FCL { uint isector; uint cb; }; /** * @brief File Key. * * Used to identify the file type. */ enum FK { FK_Nil = -1, FK_BrxWorld = 0, // Level File FK_IcoIcon = 1, // Icon File FK_BnkEffects = 2, // Sound Effect File FK_BnkMusic = 3, // Music File FK_VagDialog = 4, // Dialog File FK_VagAnimation = 5, FK_PssMovie = 6, // Video File FK_Max = 7 }; /** * @brief WAL Entry. * * Stores the file key and file location & size. */ struct WALE { char *pchzKey; // File Name used for searching for file to load struct FCL *pfcl; // File location and size. }; /** * @brief File location. */ class CFileLocation { public: FCL m_fcl; // File sector and size. // void Clear(); }; /** * @brief Used to startup the catalog system, * now it only sets the CD state to ready. */ void StartupCatalog(); /** * @brief Unknown purpose. Returns the second integer of the given array. * Called only once in FUN_0018C1E8 near P2/memcard (?). */ int FUN_001407A0(uint *pui); #endif // CAT_H ================================================ FILE: include/cd.h ================================================ /** * @file cd.h * * @brief CD system. */ #ifndef CD_H #define CD_H #include "common.h" /** * @brief CD State. */ enum CDS { CDS_Initing = 0, CDS_Searching = 1, CDS_Waiting = 2, CDS_Ready = 3, CDS_Dead = 4, CDS_Max = 5 }; /** * @todo Unknown. */ void CpchzTokenizePath(char *pchzPath); /** * @brief Checks if the disc is a PS2 DVD. */ bool FValidCdMmode(void); /** * @brief Sets the disc media mode. */ void SetCdMmode(void); /** * @brief Used to startup the CD system in earlier builds, but now it's empty. */ void StartupCd(void); /** * @brief Updates the CD system. * * @todo Implement this function. */ void UpdateCd(void); /** * @todo Unknown. */ void CdPath(char *pchzDest, char *pchzPath, int fIncludeDevice); /** * @brief Reads sectors from the CD using the 989snd functions. * * @param isector Starting sector. * @param csector Number of sectors to read. * @param pv Pointer to destination. */ void ReadCd(uint isector, uint csector, void *pv); /** * @brief Reads sectors from the CD using sce functions. * * @param isector Starting sector. * @param csector Number of sectors to read. * @param pv Pointer to destination. */ void ReadCdDirect(uint isector, uint csector, void *pv); /** * @brief Checks if the CD operation has completed. * * @param fBlock Non-zero if should block other CD operations. * * @return true If completed. * @return False If not completed. */ bool FCdCompleted(int fBlock); // TODO: This might not exist? // void ErrCdLatest(void); // Global variables extern CDS g_cds; #endif // CD_H ================================================ FILE: include/chkpnt.h ================================================ /** * @file chkpnt.h * * @brief Checkpoint system. */ #ifndef CHKPNT_H #define CHKPNT_H #include "common.h" #include #include #include /** * @class CHECK_POINT * @brief Checkpoints used throughout platforming levels. * * @todo Define struct. */ struct CHKPNT : public ALO { // ... }; typedef struct VTCHKMGR; // todo move to vtables header /** * @brief Checkpoint Manager. * * @todo Fill in missing fields. */ struct CHKMGR { VTCHKMGR *pvtchkmgr; int cbitChk; // Count of values in abitChk. int *abitChk; // Unknown, name/type may be wrong. undefined4 unk_0x8; STRUCT_PADDING(127); int fChkDirty; VECTOR posVolChkpnt; int csSaved[129]; // type may be wrong OID unk_oid_0x424; OID unk_oid_0x428; int fCheckpoint; }; extern CHKMGR g_chkmgr; void ResetChkmgrCheckpoints(CHKMGR *pchkmgr); void SaveChkmgrCheckpoint(CHKMGR *pchkmgr, OID oidWarp, OID oidWarpContext); void ReturnChkmgrToCheckpoint(CHKMGR *pchkmgr); void RestoreChkmgrFromCheckpoint(CHKMGR *pchkmgr); int IchkAllocChkmgr(CHKMGR *pchkmgr); int FGetChkmgrIchk(CHKMGR *pchkmgr, int ichk); void SetChkmgrIchk(CHKMGR *pchkmgr, int ichk); void ClearChkmgrIchk(CHKMGR *pchkmgr, int ichk); void LoadVolFromBrx(VOL *pvol, CBinaryInputStream *pbis); int FCheckVolPoint(VOL *pvol, VECTOR *ppos); void InitChkpnt(CHKPNT *pchkpnt); void LoadChkpntFromBrx(CHKPNT *pchkpnt, CBinaryInputStream *pbis); void BindChkpnt(CHKPNT *pchkpnt); void PostChkpntLoad(CHKPNT *pchkpnt); void CloneChkpnt(CHKPNT *pchkpnt, CHKPNT *pchkpntBase); void UpdateChkpnt(CHKPNT *pchkpnt, float dt); // ? tbd void FUN_001417f0(); void TriggerChkpnt(CHKPNT *pchkpnt); #endif /* CHKPNT_H */ ================================================ FILE: include/cid.h ================================================ /** * @file cid.h * * @brief Class IDs. */ #ifndef CID_H #define CID_H #include "common.h" /** * @brief Class ID. * * @note Values are based on May 19 build so are likely incomplete and/or inaccurate. */ enum CID { CID_Nil = -1, // None // Classes present in prototype build CID_BASIC = 0, // BASIC CID_LO = 1, // LO CID_ALO = 2, // LIGHTWEIGHT CID_SO = 3, // OBJECT CID_MS = 4, // MERGED_STATICS CID_PO = 5, // PO CID_STEP = 6, // STEP_FIGURE CID_JT = 7, // JT CID_STEPGUARD= 8, // STEP_GUARD CID_SMARTGUARD=9, // SMART_GUARD CID_GOMER = 10, // GOMER CID_UBG = 11, // UW_BOSS_GOMER CID_MBG = 12, // MS_BOSS_GUARD CID_BHG = 13, // BLOODHOUND CID_MURRAY = 14, // MURRAY CID_PUFFC = 15, // PUFFER_COLLECTION CID_CRFOD = 16, // CRUSHER_FODDER CID_CRFODB = 17, // CRUSHER_FODDER_BAIT CID_CRFODK = 18, // CRUSHER_FODDER_KAM CID_TANK = 19, // HOVER_TANK CID_JP = 20, // JET_PACK CID_HG = 21, // HANG_GLIDER CID_MECHA = 22, // MECHA CID_ROV = 23, // RIP_OFF_VEHICLE CID_TURRET = 24, // TURRET CID_VAULT = 25, // VAULT CID_PUFFER = 26, // PUFFER // CID_MGV = 27, // MOUTH_GAME_VEHICLE CID_SUV = 28, // SMASHUP_VEHICLE // CID_CYCLE = 29, // CYCLE CID_LGN = 30, // LIGHT_GUN // CID_JACK = 31, // JACK_HAMMER CID_RIPG = 32, // RIPG CID_WATER = 33, // WATER CID_BRK = 34, // _BRK CID_BREAK = 35, // BREAKABLE CID_ALBRK = 36, // ALARM_BREAKABLE CID_CAN = 37, // CANNON CID_DARTGUN = 38, // DARTGUN CID_SWP = 39, // SWOOPER CID_FRAGILE = 40, // FRAGILE CID_ZAPBREAK = 41, // ZAPBREAK CID_BRKP = 42, // BREAKABLE_PIECE CID_BUTTON = 43, // BUTTON CID_VOLBTN = 44, // VOL_BUTTON CID_JLOVOL = 45, // JLO_VOLUME CID_SQUISH = 46, // SQUISH CID_BONE = 47, // BONE CID_SPRIZE = 48, // _SPRIZE CID_SCPRIZE = 49, // _SCPRIZE CID_LIFETKN = 50, // EXTRA_LIFE_TOKEN CID_CLUE = 51, // CLUE CID_ALARM = 52, // ALARM CID_SENSOR = 53, // _SENSOR CID_LASEN = 54, // LASER_SENSOR CID_CAMSEN = 55, // CAMERA_SENSOR CID_PRSEN = 56, // PRESSURE_SENSOR CID_BARRIER = 57, // BARRIER CID_IKH = 58, // IK_HANDLE CID_TZP = 59, // TOUCH_ZAPPER CID_VOLZP = 60, // VOL_ZAPPER CID_CNVO = 61, // CONVEYOR CID_HBSK = 62, // HIDE_BASKET CID_BOMB = 63, // BOMB CID_MISSILE = 64, // MISSILE CID_ACCMISS = 65, // ACCEL_MISSILE CID_TARMISS = 66, // TARGET_MISSILE CID_SPLMISS = 67, // SPLINE_MISSILE CID_GROUNDMISS=68, // GROUND_MISSILE CID_FLY = 69, // FLY CID_RAT = 70, // RAT CID_ROH = 71, // RIP_OFF_HARVESTER CID_ROC = 72, // RIP_OFF_COLLECTIBLE CID_ROST = 73, // RIP_OFF_SPAWN_TUNN CID_ROP = 74, // RIP_OFF_PRIZE CID_DART = 75, // DART CID_UBV = 76, // UW_BOSS_VEHICLE CID_UBP = 77, // UW_BOSS_PAD CID_DSP = 78, // OBJECT_DISPENSER CID_JLO = 79, // JLO CID_PUFFT = 80, // PUFFER_TORCH CID_MRKV = 81, // MURK_VOLUME CID_LGNB = 82, // LIGHT_GUN_BOSS CID_BLIPG = 83, // BLIPG CID_CAMERA = 84, // CAMERA CID_LBONE = 85, // LIGHTWEIGHT_BONE CID_EMITTER = 86, // EMITTER CID_LIGHT = 87, // LIGHT CID_SCH = 88, // SPLINE_CONSTRAINT_ CID_LIKH = 89, // LIGHTWEIGHT_IK_HAN CID_CHKPNT = 90, // CHECK_POINT CID_PROXY = 91, // PROXY CID_SKY = 92, // SKY CID_DPRIZE = 93, // _DPRIZE CID_CHARM = 94, // CHARM CID_COIN = 95, // COIN CID_KEY = 96, // KEY CID_GOLD = 97, // GOLD CID_LOCK = 98, // LOCK CID_LOCKG = 99, // LOCK_GROUP CID_TAIL = 100, // TAIL CID_ROB = 101, // RIP_OFF_BRAIN CID_FLASH = 102, // FLASHLIGHT CID_DYSH = 103, // DYNAMIC_SHADOW CID_SCENTMAP = 104, // SCENT_MAP CID_WAYPOINT = 105, // WAY_POINT CID_TN = 106, // NEW_TUNNEL CID_JLOC = 107, // JLO_CLUSTER CID_DIALOG = 108, // DIALOG CID_SPEAKER = 109, // SPEAKER CID_ROPE = 110, // ROPE CID_WM = 111, // WORLD_MAP CID_PUFFB = 112, // PUFFER_BRAIN CID_CRBRAIN = 113, // CRUSHER_BRAIN // CID_MGC = 114, // MOUTH_GAME_COLLECT // CID_JACKB = 115, // JACK_BOSS // CID_JACKN = 116, // JACK_NPC // CID_JACKF = 117, // JACK_FRAGMENT CID_SW = 118, // WORLD CID_CM = 119, // _CAMERA CID_SHAPE = 120, // SHAPE CID_HSHAPE = 121, // HIDE_SHAPE CID_PIPE = 122, // PIPE CID_RAIL = 123, // RAIL CID_LANDING = 124, // LANDING CID_XFM = 125, // TRANSFORM CID_WARP = 126, // WARP CID_TARGET = 127, // TARGET CID_HND = 128, // HANDLE CID_EXPL = 129, // _EXPLODE_BASE CID_EXPLG = 130, // EXPLODE_GROUP CID_EXPLO = 131, // BLACK_HOLE CID_EXPLS = 132, // EXPLODE_STYLE CID_VOL = 133, // VOLUME CID_RATHOLE = 134, // RATHOLE CID_PUFFV = 135, // PUFFER_VOLUME CID_EXIT = 136, // EXIT CID_PNT = 137, // POINT CID_PNTSV = 138, // POINT_WITH_SPEED CID_PNTS = 139, // POINT_WITH_DISTANCE CID_PNTVEC = 140, // POINT_WITH_VECTOR CID_HPNT = 141, // HIDE_POINT CID_JMT = 142, // JUMP_TARGET CID_SPIRE = 143, // SPIRE CID_SCAN = 144, // SCAN_ITEM CID_ASEG = 145, // ANIMATION_SEGMENT CID_ASEGBL = 146, // ASEGBL CID_MAP = 147, // MAP_2D CID__VISZONE = 148, // VISIBILITY_ZONE CID_VISMAP = 149, // VISMAP CID_FRZG = 150, // FREEZE_GROUP CID_SM = 151, // STATE_MACHINE CID_SGG = 152, // STEP_GUARD_GROUP CID_PATHZONE = 153, // PATH_ZONE CID_RCHM = 154, // REACH_MAP CID_RWM = 155, // AMMO_MANAGER CID_WR = 156, // SPACE_WARP CID_KEYHOLE = 157, // KEYHOLE CID_JSG = 158, // SCRIPT CID_ASEGA = 159, // ANIMATION_SEGMENT_APPLICATION CID_SMA = 160, // STATE_MACHINE_APPLICATION CID__FCST = 161, // FOSTER_CONSTRAINT // Classes only present in release build (IDs may be inaccurate) CID_SBG = 162, // S_BOSS_GUARD CID_VBG = 163, // V_BOSS_GUARD CID_Max = 164 // Max value }; #endif // CID_H ================================================ FILE: include/clip.h ================================================ /** * @file clip.h */ #ifndef CLIP_H #define CLIP_H #include "common.h" #include #include #include #include typedef int GRFHTL; /** * @brief Unknown. * @todo Based on the may prototype, * so this can be incorrect. */ struct MAA { float u; int iu; undefined1 unk[8]; VECTOR pos; VECTOR normal; }; SO *PsoHitTestLineObjects(GRFHTL grfhtl, VECTOR *ppos0, VECTOR *ppos1, int cpso, SO **apso, LSG *plsgBest); int ClsgClipEdgeToObject(SO *pso, VECTOR *ppos0, VECTOR *ppos1, int clsgMax, LSG *alsg); int ClsgClipEdgeToObjectPruned(SO *pso, BSP *pbspPruned, VECTOR *ppos0, VECTOR *ppos1, int clsgMax, LSG *alsg); int ClsgClipCylinderToObject(SO *pso, VECTOR *ppos0, VECTOR *ppos1, float sRadius, int clsgMax, LSG *alsg); int ClsgClipLineToSphere(VECTOR *pposSphere, float sRadius, VECTOR *ppos0, VECTOR *ppos1, int clsgMax, LSG *alsg); int ClsgClipEdgeToSphere(VECTOR *pposSphere, float sRadius, VECTOR *ppos0, VECTOR *ppos1, int clsgMax, LSG *alsg); int ClsgClipCylinderToSphere(VECTOR *pposSphere, float sRadiusSphere, VECTOR *ppos0, VECTOR *ppos1, float sRadiusCylinder, int clsgMax, LSG *alsg); int ClsgClipEdgeToCylinder(VECTOR *pposCylinder0, VECTOR *pposCylinder1, float sRadiusCylinder, VECTOR *pposEdge0, VECTOR *pposEdge1, int clsgMax, LSG *alsg); int SgnCompareMaa(MAA *pmaa1, MAA *pmaa2); int ClsgMergeAlsg(int clsg, LSG *alsg); int ClsgClipCylinderToBsp(BSPC *pbspc, GEOM *pgeom, VECTOR *ppos0, VECTOR *ppos1, float sRadiusCylinder, int clsgMax, LSG *alsg); #endif // CLIP_H ================================================ FILE: include/clock.h ================================================ /** * @file clock.h * * @brief Engine clock. */ #ifndef CLOCK_H #define CLOCK_H #include "common.h" typedef unsigned long long TICK; /** * @brief Engine clock. */ struct CLOCK { int fEnabled; // clock enabled flag float t; // current time float dt; // time since last frame float dtPrev; // dt from previous frame float tReal; // t factoring in EE clock cyclerate float dtReal; // dt factoring in EE clock cyclerate TICK tickFrame; }; extern float D_0024CD4C; extern float g_rtClock; extern float g_rtClockPowerUp; extern CLOCK g_clock; // extern TICK s_tickLastRaw; // Should be static. extern ulong cWrapAround; // Should be static, and not initialized. Replace once bss section of the TU is migrated. /** * @brief Sets the global clock rate multiplier and enables/disables the clock. * * @param rt The new clock rate multiplier (1.0 = normal, > 1.0 = faster). */ void SetClockRate(float rt); /** * @brief Updates clock state based on elapsed time, with clamping and scaling. * * @details Clamps delta time to 1-2 frames, applies rate multipliers if enabled. * * @param pclock Pointer to the clock to update. */ void MarkClockTick(CLOCK *pclock); /** * @brief Updates clock with raw elapsed time only (no clamping or scaling). * * @param pclock Pointer to the clock to update. */ void MarkClockTickRealOnly(CLOCK *pclock); /** * @brief Resets the clock's accumulated time to a specific value. * * @param pclock Pointer to the clock to reset. * @param t Time value in seconds to set. */ void ResetClock(CLOCK *pclock, float t); /** * @brief Enables or disables a clock instance. * * @param pclock Pointer to the clock. * @param fEnabled Non-zero to enable, zero to disable. */ void SetClockEnabled(CLOCK *pclock, int fEnabled); /** * @brief Initializes the clock system. */ void StartupClock(); /** * @brief Returns a 64-bit tick count derived from the 32-bit hardware counter. * * @details Extends the 32-bit CP0 Count register to 64 bits by tracking overflows. * * @return 64-bit tick value: upper 32 bits = wraparound count, lower 32 bits = * Count register. */ const TICK TickNow(); #endif // CLOCK_H ================================================ FILE: include/cm.h ================================================ /** * @file cm.h * * @brief Game camera. */ #ifndef CM_H #define CM_H #include "common.h" #include #include #include // only for RGBA #include #include #include struct CM; // Forward declaration struct TN; typedef int GRFRCP; /** * @brief Camera (?) kind? */ enum CMK { CMK_Nil = -1, CMK_Translucent = 0, CMK_Fade = 1, CMK_Opaque = 2, CMK_Max = 3 }; /** * @brief Unknown Kind. */ enum CFK { CFK_Nil = -1, CFK_Behind = 0, CFK_Side = 1, CFK_Max = 2 }; /** * @brief Unknown, may be wrong. */ enum CPP { CPP_Nil = -1, CPP_Base = 0, CPP_Default = 1, CPP_Tunnel_Pri0 = 2, CPP_Tunnel_Pri1 = 3, CPP_Tunnel_Pri2 = 4, CPP_Tunnel_Pri3 = 5, CPP_LookAround = 6, CPP_Animated = 7, CPP_ManualOverride = 8, CPP_UserTestWalkthrough = 9, CPP_Max = 10 }; /** * @brief Unknown. */ enum CPMT { CPMT_Truck = 0, CPMT_Pan = 1, CPMT_Slide = 2, CPMT_Orbit = 3, CPMT_Align = 4, CPMT_Walkthrough = 5, CPMT_Max = 6 }; /** * @brief Look kind. */ enum LOOKK { LOOKK_Nil = -1, LOOKK_User = 0, LOOKK_Sniper = 1, LOOKK_Dialog = 2, LOOKK_Confront = 3, LOOKK_Max = 4 }; /** * @brief Unknown. * @todo Move to tn.h? */ enum FTND { FTND_Nil = -1, FTND_Forward = 1, FTND_Reverse = 2, FTND_Manual = 4, FTND_Max = 5 }; /** * @brief Fog parameters. */ struct FGFN { float duFogBias; float ruFog; float sNearFog; float duFogPlusClipBias; }; /** * @brief Unknown. */ struct CPDEFI { int grfcpd; undefined4 field1_0x4; undefined4 field2_0x8; undefined4 field3_0xc; VECTOR posBase; VECTOR vBase; float radHome; float sAdjust; float tMoveLast; CFK cfk; VECTOR posAdjust; }; /** * @brief Camera policy. */ struct CPLCY { undefined4 vtable; // TODO: implement methods on this struct CM *pcm; }; /** * @brief Camera policy: manual. * * Normal orbit camera. */ struct CPMAN : public CPLCY { CPMT cpmt; ALO *paloOrbit; int cframeStatus; }; /** * @brief Camera policy: look. * * Used for binoc-u-com, and probably sniper mode. */ struct CPLOOK : public CPLCY { float radPan; float swPan; float radTilt; float swTilt; float uZoom; float svuZoom; float rZoomMax; LM lmFOV; LOOKK alookk[4]; int clookk; int fSoundPaused; AMB *pambBinoc; AMB *pambAmbient; ALO *paloFocusSniper; PNT *ppntAnchor; float sRadiusSniper; float rScreenSniper; }; /** * @brief Camera policy: align * * Unknown usage. */ struct CPALIGN : public CPLCY { undefined4 field_1_0x0; undefined4 field_2_0x4; VECTOR posLocal; undefined4 field_4_0xc; undefined4 field_5_0x10; undefined4 field_6_0x14; float field_7_0x18; float field_8_0x1c; }; /** * @brief Camera policy: animation segment(?) * * Unknown usage. */ struct CPASEG : public CPLCY { CAMERA *pcamera; }; /** * @brief Camera policy: tunnel. * * Unknown usage. * * @note Might be unused in release build, based on the name. */ struct CPTN : public CPLCY { TN *ptn; float radManual; float xyManual; float zManual; int fHome; float radHome; FTND ftnd; int fActivate; int fPanOnEntryDone; float swOrbit; float tLastOrbit; float radCur; float radFwdPrev; float radRevPrev; float tMoveLast; float uFollowCur; float vxy; float vz; VECTOR posEyePrev; }; /** * @brief Camera policy: (?). */ struct CPR { CPP cpp; CPLCY *pcplcy; SO *psoFocus; void *pv; }; /** * @class _CAMERA * @brief Base class for cameras. */ struct CM : public LO { /* 0x40 */ VECTOR pos; VECTOR4 anormalFrustrumTranspose[3]; MATRIX3 mat; float rMRDAdjust; undefined4 field5_0x98; undefined4 field6_0x9c; undefined4 field7_0xa0; MATRIX4 matProj; MATRIX4 matWorldToClip; MATRIX4 matClipToWorld; VECTOR anormalFrustrum[4]; float rMRD; float radFOV; float rAspect; float sRadiusNearClip; float xScreenRange; float yScreenRange; float sNearFog; float sFarFog; float uFogMax; RGBA rgbaFog; FGFN fgfn; float tJolt; int grfzon; int fCutNext; int fCut; int fRadCut; float radCut; float sNearClip; float sFarClip; int fDisplaced; float uPanProgress; float uTiltProgress; float uSProgress; float field35_0x1fc; float field36_0x200; VECTOR dposCenter; VECTOR vCenter; //NOTE: this might not be a VECTOR... -Kestin undefined4 field39_0x21c; bool reset_flag; int field41_0x224; int field42_0x228; float field43_0x22c; undefined4 field44_0x230; //VECTOR vAdjust; VECTOR dposFocus; VECTOR vFocus; VECTOR posScreen; VECTOR vScreen; float swPanPos; float swTiltPos; float sv; float swPanMat; float swTiltMat; undefined4 field52_0x278; undefined4 field53_0x27c; undefined4 field54_0x280; VECTOR posCenterPrev; VECTOR posClear; MATRIX3 matClear; SO *psoFocusPrev; undefined4 field59_0x2c4; undefined4 field60_0x2c8; undefined4 field61_0x2cc; CPDEFI cpdefiPrev; int cpaloFade; ALO *apaloFade[8]; float tActivateCplcy; undefined4 field66_0x33c; undefined4 field67_0x340; MATRIX3 matRotateToCam; MATRIX3 matRotateTiltToCam; int ccpr; CPR acpr[8]; CPMAN cpman; undefined8 field73_0x428; undefined8 field74_0x430; undefined8 field75_0x438; undefined8 field76_0x440; undefined8 field77_0x448; undefined8 field78_0x450; undefined8 field79_0x458; CPLOOK cplook; CPALIGN cpalign; CPASEG cpaseg; CPTN cptn; }; // extern CM g_cm; // Main game camera. extern CM *g_pcm; // Pointer to the main game camera. /** * @brief Starts up the camera system. */ void StartupCm(); /** * @brief Calls RecalcCmFrustrum on the given camera. */ void RecalcCmFrustrum(CM *pcm); /** * @brief Sets far clip plane on the global camera. */ void SetSwCameraFarClip(float sFarClip); /** * @brief Sets Fog on the global camera. */ void SetSwCameraRgbaFog(SW *psw, RGBA *prgbaFog); /** * @brief Sets position on the given camera. */ void SetCmPos(CM *pcm, VECTOR *ppos); /** * @brief Sets matrix on the given camera. */ void SetCmMat(CM *pcm, MATRIX3 *pmat); /** * @brief Sets near clip plane on the given camera. */ void SetCmNearClip(CM *pcm, float sNearClip); /** * @brief Sets far clip plane on the given camera. */ void SetCmFarClip(CM *pcm, float sFarClip); /** * @brief Sets SProgress on the given camera. */ void SetCmSProgress(CM *pcm, float uSProgress); /** * @brief Changes the FOV of the camera and then calls RecalcCmFrustrum. */ void SetCmFov(CM *pcm, float fov); /** * @brief Sets field35_0x1fc on the given camera. */ void FUN_001439c8(CM *pcm, float param_2); //TODO: Rename function /** * @brief Sets field36_0x200 on the given camera. */ void FUN_001439e8(CM *pcm, float param_2); //TODO: Rename function /** * @brief Sets the RGBA fog color for the camera. */ void SetCmRgbaFog(CM *pcm, RGBA *prgbaFog); /** * @brief Sets the minimum render distance ratio (?) on the given camera. */ void SetCmMrdRatio(CM *pcm, float ratio); /** * @brief Clears fading objects from the given camera. */ void ClearCmFadeObjects(CM *pcm); /** * @brief Sets up the given camera. */ void SetupCm(CM *pcm); /** * @brief TODO. */ void DrawCm(CM *pcm); /** * @brief Sets the position matrix on the given camera. */ void SetCmPosMat(CM *pcm, VECTOR *ppos, MATRIX3 *pmat); void AdjustCmJoy(CM *pcm, JOY *pjoy, JOYID joyid, float *prad); void SetCmPolicy(CM *pcm, CPP cpp, CPLCY *pcplcy, SO *psoFocus, void *pv); void RevokeCmPolicy(CM *pcm, GRFRCP grfrcp, CPP cpp, CPLCY *pcplcy, SO *psoFocus, void *pv); /** * @brief Sets Cut on the given camera. */ void SetCmCut(CM *pcm, float *pradCut); /** * @brief Sets the reset flag on the given camera. */ void SetResetFlag(CM *pcm); /** * @brief Clears cut from the given camera. */ void ClearCmCut(CM *pcm); /** * @brief Push lookk on the given camera. */ void PushLookkCm(CM *pcm, LOOKK lookk); /** * @brief Calls LookkPopCm on the given camera. */ LOOKK LookkPopCm(CM *pcm); /** * @brief Calls LookkCurCm on the given camera. */ LOOKK LookkCurCm(CM *pcm); /** * @brief Sets sniper focus on the given camera. */ void SetCmSniperFocus(CM *pcm, PNT *ppntAnchor, float sRadiusSniper, float rScreenSniper); /** * @brief Calls FUN_00146028 on the given camera. */ void FUN_00146028(CM *pcm); //TODO: Rename function /** * @brief Initializes Camera. */ void cm__static_initialization_and_destruction_0(int __initialize_p,int __priority); /** * @brief Startsup Camera. */ void _GLOBAL_$I$StartupCm(); // todo fix undefined reference errors // extern VECTOR4 g_posEyeDefault; // extern VECTOR4 g_posCenterDefault; // extern float g_sNearFog; // extern float g_sFarFog; // extern float g_uFogMax; // extern RGBA g_rgbaFog; // extern VECTOR4 D_2618b8; // extern float DT_CmJoltMax; // extern float SW_CmJolt; // extern CLQ s_clqUToUJolt; // extern VECTOR4 s_dposJolt; // extern VECTOR4 s_rotJolt; // extern VECTOR4 s_vecRange; // extern VECTOR4 s_vecOffset; // extern float R_SetCmSpring; // extern float R_SetCmDamping; // extern float D_00261928[9]; // extern float D_0026194c; // extern float D_00261950; // extern SMP s_smpSquishEye; // extern float D_00261970; // extern float D_00261974; // extern float D_00261978; // extern float D_0026197c; // extern float D_00261980; // extern float D_00261984; // extern float D_00261988; // extern float D_0026198c; // extern CM* g_pcm; #endif // CM_H ================================================ FILE: include/cnvo.h ================================================ /** * @file cnvo.h */ #ifndef CNVO_H #define CNVO_H #include "common.h" #include // TODO: What is this? Where should this be defined? struct XP; /** * @class CONVERYOR * @brief Conveyor belt (probably used in Fire Down Below). * @todo Implement the struct. */ struct CNVO : public SO { // ... /* 0x550 */ float svBelt; /* 0x554 */ float svuAvg; /* 0x558 */ float svvAvg; // ... }; void InitCnvo(CNVO *pcnvo); void LoadCnvoFromBrx(CNVO *pcnvo, CBinaryInputStream *pbis); void PostCnvoLoad(CNVO *pcnvo); void AdjustCnvoXpVelocity(CNVO *pcnvo, XP *pxp, int ixpd); void SetCnvoBeltSpeed(CNVO *pcnvo, float svBelt); void MatchCnvoScrollerToBeltSpeed(CNVO *pcnvo); #endif // CNVO_H ================================================ FILE: include/coin.h ================================================ /** * @file coin.h * * @brief Coins, keys, and other collectibles. */ #ifndef COIN_H #define COIN_H #include "common.h" #include #include #include #include #include #include #include // Forward declarations struct DPRIZE; struct COIN; struct KEY; struct CHARM; /** * @brief DPRIZE state. * * @note Values based on May 19 build. */ enum DPRIZES { DPRIZES_Nil = -1, DPRIZES_Normal = 0, DPRIZES_Collect = 1, DPRIZES_Removed = 2, DPRIZES_Fall = 3, DPRIZES_Swirl = 4, DPRIZES_Stick = 5, DPRIZES_Lose = 6, DPRIZES_Attract = 7, DPRIZES_Max = 8 }; /** * @class _DPRIZE * @brief Base class for collectibles. */ struct DPRIZE : public ALO { OID oidInitialState; float tDprizes; DPRIZES dprizesInit; DPRIZES dprizes; // State float dtInitialSkip; SM *psm; // State machine SMA *psma; // State machine action TARGET *ptarget; VECTOR posCenter; VECTOR vCenter; VECTOR dvCenter; PNT *ppntFrontGlint; PNT *ppntBackGlint; int fLeft; float uGlintChance; float tGlint; undefined4 unk_0[4]; int fNeverReuse; int fReuseCandidate; int fLastBounce; float svLastBounceMax; float svLastBounce; float sRadiusBounce; float sRadiusCollect; float rzBounce; float rxyBounce; float radSmooth; VECTOR normalSmooth; int fSwirlDone; undefined4 unk_1; DLE dle; int ichkCollected; EXPL *pexplCollect; EXPL *pexplAttract; float svcAttract; float cAttract; }; /** * @class COIN * @brief Treasure coin. */ struct COIN : public DPRIZE { LM lmDtMaxLifetime; float tLose; }; /** * @class KEY * @brief Treasure key. */ struct KEY : public DPRIZE { STRUCT_PADDING(5); // 0x0 - 0x13 Padding? SW* psw; // 0x14 STRUCT_PADDING(19); // 0x18-0x2b Pading? CFrame* pCFrame; // 0x2c STRUCT_PADDING(670); // 0x31 - 0x2cf Padding? DPRIZES dprizes; // 0x2d0 }; /** * @class CHARM * @brief Lucky charm worn by Sly and Murray. */ struct CHARM : public DPRIZE { //... }; /** * @brief Initializes a dprize. * * @param pdprize Dprize to initialize. */ void InitDprize(DPRIZE *pdprize); /** * @brief Loads a dprize from an Input Stream. * * @param pdprize Dprize to load/initialize. * @param pbis Binary input Stream. */ void LoadDprizeFromBrx(DPRIZE *pdprize, CBinaryInputStream *pbis); /** * @brief Clone a dprize. * * @param pdprize Dprize clone target. * @param pdprizeBase Original dprize to clone. * * @note ichkCollected and dle will not be overwritten. */ void CloneDprize(DPRIZE *pdprize, DPRIZE *pdprizeBase); /** * @brief Sets the state of a given dprize. * * @param pdprize Dprize whose state to set. * @param dprizes New state value. * */ void SetDprizeDprizes(DPRIZE *pdprize, DPRIZES dprizes); /** * @brief Initializes a coin. * * @param pcoin Coin to initialize. */ void InitCoin(COIN *pcoin); /** * @brief Updates a coin. * * @param pcoin Coin to update. * @param dt Time elapsed since the last frame. * * @todo Implement this function. */ void UpdateCoin(COIN *pcoin, float dt); // ... void CreateSwCharm(SW *psw); /** * @brief Adds a life. * */ void AddLife(void *ptr); /** * @brief Handles when the player touches a coin. * * @param pcoin Pointer to the coin. */ void OnCoinSmack(COIN *pcoin); /** * @brief Sets a coin's dprize state. * * @param pcoin Coin whose state to update. * @param dprizes New state value. * * @todo Implement this function. */ void SetCoinDprizes(COIN *pcoin, DPRIZES dprizes); /** * @brief Initializes a lucky charm. * * @param pcharm Charm to initialize. */ void InitCharm(CHARM *pcharm); /** * @brief Sets a lucky charm's dprize state. * * @param pcharm Charm whose state to update. * @param dprizes New state value. * * @todo Fill CHARM struct. */ void SetCharmDprizes(CHARM *pcharm, DPRIZES dprizes); /** * @brief Initializes a treasure key. * * @param pcharm Key to initialize. */ void InitKey(KEY *pkey); /** * @brief Sets a treasure key's dprize state. * * @param pkey Key whose state to set. * @param dprizes New state value. */ void SetKeyDprizes(KEY *pkey, DPRIZES dprizes); /** * @brief Unknown. * * @todo Investigate this function. */ int CpdprizeAttractSwDprizes(SW *psw, CID cid, VECTOR *pposCenter, int cpdprizeMax, DPRIZE **apdprize); /** * @brief Unknown. * * @todo Investigate this function. */ void RemoveSwExtraneousCharms(SW *psw); extern SNIP s_asnipDprize[5]; #endif // COIN_H ================================================ FILE: include/common.h ================================================ /** * @file common.h * * @brief Common header file. */ #ifndef COMMON_H #define COMMON_H #include "include_asm.h" #include "types.h" #include "vtables.h" #include "spaprops.h" // Helper macros for decompilation /** * @brief Accesses a value on a struct by its offset and type. For use when the * struct is unimplemented, incomplete or inaccurate. * * @param pointer Pointer to the struct. * @param offset Offset of the field within the struct. * @param type Type of the field. */ #define STRUCT_OFFSET(pointer, offset, type) (*(type *)((uint8_t *)(pointer) + (offset))) /** * @brief Access an array element at a struct offset with index. * Uses expression ordering that generates matching assembly. * @param pointer Pointer to the struct. * @param offset Offset of the array within the struct. * @param type Type of the array elements. * @param index Array index to access. */ #define STRUCT_OFFSET_INDEX(pointer, offset, type, index) \ (*(type *)((int)(pointer) + (((index) << 2) + (offset)))) // Helper macros for struct padding (workaround for eegcc not supporting macro expansion in struct fields) #define STRUCT_PADDING_CAT(a, b) a##b #define STRUCT_PADDING_INTERNAL(a, b) STRUCT_PADDING_CAT(a, b) /** * @brief Inserts an array of padding words into a struct. It generates a unique * name for the padding field using the line number. * * @param name Name of the padding field. * @param size Number of 4-byte words in the padding field. */ #define STRUCT_PADDING(size) uint32_t STRUCT_PADDING_INTERNAL(_pad_, __LINE__)[size] /** * @brief Inserts a four-byte word followed by four bytes of 0x00. */ #define JUNK_WORD(val) asm(".word " #val "\n\t" ".word 0x00000000\n\t") /** * @brief Shortcut macro for junk `addiu $29, $29, imm` instructions. * Takes the immediate value as a hex byte and emits the corresponding instruction word. */ #define JUNK_ADDIU(imm) JUNK_WORD(0x27BD00##imm) /** * @brief Inserts a four-byte nop on it's own. */ #define JUNK_NOP() asm(".word 0x00000000\n\t") // Global system values extern int _gpReg; // Global pointer register /** * @brief RGBA color value. */ struct RGBA { uchar bRed; uchar bGreen; uchar bBlue; uchar bAlpha; inline void operator=(const int rgba) { bRed = (rgba >> 24) & 0xFF; bGreen = (rgba >> 16) & 0xFF; bBlue = (rgba >> 8) & 0xFF; bAlpha = rgba & 0xFF; } }; #endif // COMMON_H ================================================ FILE: include/cplcy.h ================================================ /** * @file cplcy.h * * @brief Camera policy. * * @todo Either move the camera policy structs from cm.h here, or delete this header. */ #ifndef CPLCY_H #define CPLCY_H #include "common.h" #include void PushCplookLookk(CPLOOK *pcplook, LOOKK lookk); LOOKK LookkPopCplook(CPLOOK *pcplook); LOOKK LookkCurCplook(CPLOOK *pcplook); #endif // CPLCY_H ================================================ FILE: include/credit.h ================================================ /** * @file credit.h * * @brief Credit UI blot. */ #ifndef CREDIT_H #define CREDIT_H #include "common.h" // ... #endif // CREDIT_H ================================================ FILE: include/crout.h ================================================ /** * @file crout.h */ #ifndef CROUT_H #define CROUT_H #include "common.h" // ... #endif // CROUT_H ================================================ FILE: include/crusher.h ================================================ /** * @file crusher.h */ #ifndef CRUSHER_H #define CRUSHER_H #include "common.h" #include #include // Forward. struct WKR; /** * @brief Unknown. * @todo Implement the struct. */ struct CRFOD : public STEPGUARD { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct CRFODB : public STEPGUARD { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct CRFODK : public CRFOD { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct CRBRAIN : public ALO { // ... }; void OnCrfodAdd(CRFOD *pcrfod); void OnCrfodRemove(CRFOD *pcrfod); void CloneCrfod(CRFOD *pcrfod, CRFOD *pcrfodBase); void InitCrfodb(CRFODB *pcrfodb); void CalcHeadingVector(float rad, VECTOR *pvector); void UpdateCrfodbGoal(CRFODB *pcrfodb, int fEnter); int FDetectCrfodb(CRFODB *pcrfodb); int FAbsorbCrfodbWkr(CRFODB *pcrfodb, WKR *pwkr); SGS SgsNextCrfodkAI(CRFODK *pcrfodk); int FDetectCrfodk(CRFODK *pcrfodk); int FAbsorbCrfodkWkr(CRFODK *pcrfodk, WKR *pwkr); void InitCrbrain(CRBRAIN *pcrbrain); // TODO: Add unknown functions here. #endif // CRUSHER_H ================================================ FILE: include/crv.h ================================================ /** * @file crv.h */ #ifndef CRV_H #define CRV_H #include "common.h" #include /** * @brief (?) kind. */ enum CRVK { CRVK_Nil = -1, CRVK_Linear = 0, CRVK_Cubic = 1, CRVK_Max = 2 }; /** * @brief Unknown. */ struct CRV { undefined4 unknown; CRVK crvk; int fClosed; int ccv; float *mpicvu; float *mpicvs; VECTOR *mpicvpos; }; // ... #endif // CRV_H ================================================ FILE: include/dart.h ================================================ /** * @file dart.h * * @brief Dartgun projectiles. */ #ifndef DART_H #define DART_H #include "common.h" #include #include #include #include // Forward. struct EXPL; struct DARTGUN; /** * @brief Dart State. */ enum DARTS { DARTS_Nil = -1, DARTS_AvailToFire = 0, DARTS_ReadyToFire = 1, DARTS_Airborne = 2, DARTS_Sticking = 3, DARTS_Stuck = 4, DARTS_Fading = 5, DARTS_Max = 6 }; /** * @class DART * @brief Projectile for dartguns. */ struct DART : public SO { /* 0x550 */ DARTS darts; /* 0x554 */ float tDarts; /* 0x558 */ float svDart; /* 0x55c */ float sRadiusFireCloud; /* 0x560 */ float sRadiusStrikeCloud; /* 0x564 */ float dtFade; /* 0x568 */ float dtMaxStuck; /* 0x56c */ DLE dleDartFree; /* 0x574 */ ASEG *pasegSticking; /* 0x578 */ ASEGA *pasegaSticking; /* 0x57c */ ALO *paloTarget; /* 0x580 */ float dtLaunchToTarget; /* 0x584 */ float dzTarget; /* 0x588 */ DARTGUN *pdartgunFiredFrom; /* 0x58c */ EXPL *pexpl; }; /** * @brief Unknown. * @todo Implement the struct. Move elsewhere? */ struct HBSK { // ... }; void InitDart(DART *pdart); void OnDartAdd(DART *pdart); void RemoveDart(DART *pdart); void CloneDart(DART *pdart, DART *pdartBase); void LoadDartFromBrx(DART *pdart, CBinaryInputStream *pbis); void HandleDartMessage(DART *pdart, MSGID msgid, void *pv); void PostDartLoad(DART *pdart); void UpdateDart(DART *pdart, float dt); void SetDartDarts(DART *pdart, DARTS darts); void ApplyDartThrow(DART *pdart, PO *ppo); void UpdateDartAirborne(DART *pdart, float dt); #endif // DART_H ================================================ FILE: include/dartgun.h ================================================ /** * @file dartgun.h */ #ifndef DARTGUN_H #define DARTGUN_H #include "common.h" #include #include #include #include #include /** * @class DARTGUN * @brief Dart gun used in High Class Heist? */ struct DARTGUN : public BRK { // ... /* 0x744 */ int coidRatTarget; /* 0x748 */ OID aoidRatTarget[8]; // ... /* 0x78c */ int cpratInTargetArea; /* 0x790 */ RAT *apratInTargetArea[8]; /* 0x7b0 */ int fJtInTargetArea; }; void InitDartgun(DARTGUN *pdartgun); void HandleDartgunMessage(DARTGUN *pdartgun, MSGID msgid, void *pv); void BindDartgun(DARTGUN *pdartgun); void PostDartgunLoad(DARTGUN *pdartgun); void UpdateDartgun(DARTGUN *pdartgun, float dt); int FIgnoreDartgunIntersection(DARTGUN *pdartgun, SO *psoOther); void BreakDartgun(DARTGUN *pdartgun); void SetDartgunGoalState(DARTGUN *pdartgun, OID oidStateGoal); void TrackDartgun(DARTGUN *pdartgun, OID *poidStateGoal); int FPrepareDartgunToFire(DARTGUN *pdartgun); void FireDartgun(DARTGUN *pdartgun); void AgeDartgunStuckDart(DARTGUN *pdartgun); RAT *PratGetDartgunRatTarget(DARTGUN *pdartgun); void AddDartgunRatTarget(DARTGUN *pdartgun, OID oid); void StartDartgunTargetAreaChange(DARTGUN *pdartgun); void AddDartgunTargetAreaTarget(DARTGUN *pdartgun, ALO *paloTarget); #endif // DARTGUN_H ================================================ FILE: include/dialog.h ================================================ /** * @file dialog.h * * @brief Declarations for the dialog system. */ #ifndef DIALOG_H #define DIALOG_H #include "common.h" #include #include #include // Forward. struct SPEAKER; typedef int GRFDP; /** * @brief Dialog Kind. */ enum DIALOGK { DIALOGK_Nil = -1, DIALOGK_Binoc = 0, DIALOGK_Instruct = 1, DIALOGK_Confront = 2, DIALOGK_Max = 3 }; /** * @brief Dialog State. */ enum DIALOGS { DIALOGS_Nil = -1, DIALOGS_Enabled = 0, DIALOGS_Triggered = 1, DIALOGS_Disabled = 2, DIALOGS_Playing = 3, DIALOGS_Calling = 4, DIALOGS_UnableToCall = 5, DIALOGS_Max = 6 }; /** * @brief Unknown. * @todo Does this belong here? */ enum DPK { // ... }; /** * @brief Unknown. * @todo Does this belong here? */ struct DP { /* 0x00 */ GRFDP grfdp; /* 0x04 */ DPK dpk; /* 0x08 */ SPEAKER *pspeakerLeft; /* 0x0c */ SPEAKER *pspeakerRight; /* 0x10 */ ASEGA *pasegaLipsync; // ... }; /** * @class DIALOG. * @brief Dialog line in a cutscene. */ struct DIALOG : public ALO { STRUCT_PADDING(184); /* 0x2d0 */ DIALOGK dialogk; /* 0x2d4 */ DIALOGS dialogs; float tDialogs; /* 0x2dc */ int cde; undefined4 field_0x2f0; int ideCur; /* 0x2e8 */ DP dp; OID oidPntAnchor; /* 0x304 */ int *pfPlayed; int fPlayed; int cpfEquivalence; int *apfEquivalence[4]; int fDefault; int fCrucial; }; /** * @brief Dialog Event Kind. */ enum DEK { DEK_Nil = -1, DEK_PreloadVag = 0, DEK_SpeakerLeft = 1, DEK_SpeakerRight = 2, DEK_Talk = 3, DEK_CallSplice = 4, DEK_ShowLetterbox = 5, DEK_HideLetterbox = 6, DEK_ShowMovie = 7, DEK_Max = 8 }; /** * @brief Dialog Event. */ struct DE { DEK dek; }; /** * @brief Unknown. * @todo Determine whether this should be defined elsewhere. */ struct DIAPI { int fCallable; int fPlayable; }; void InitDialog(DIALOG *pdialog); void LoadDialogFromBrx(DIALOG *pdialog, CBinaryInputStream *pbis); void LoadDialogEventsFromBrx(DIALOG *pdialog, CBinaryInputStream *pbis, int *pcde, DE **pade); void SetDialogInstruct(DIALOG *pdialog); void SetDialogConfront(DIALOG *pdialog); void GetDialogPlayed(DIALOG *pdialog, int *pfPlayed); void SetDialogPlayed(DIALOG *pdialog, int fPlayed); void SetDialogDialogs(DIALOG *pdialog, DIALOGS dialogs); void UpdateDialog(DIALOG *pdialog, float dt); void HandleDialogEvent(DIALOG *pdialog, DE *pde); void HandleDialogMessage(DIALOG *pdialog, MSGID msgid, void *pv); int FPauseDialog(DIALOG *pdialog); void HandleDialogEvents(DIALOG *pdialog); void FUN_00151860(DIALOG *pdialog, BLOT *pblot); void TriggerDialog(DIALOG *pdialog); void UntriggerDialog(DIALOG *pdialog); extern DIALOG *g_pdialogCalling; // Dialog currently being called extern DIALOG *g_pdialogPlaying; #endif // DIALOG_H ================================================ FILE: include/difficulty.h ================================================ /** * @file difficulty.h * * @brief Dynamic difficulty system. */ #ifndef DIFFICULTY_H #define DIFFICULTY_H #include "common.h" #include #include #include #include /** * @brief Difficulty prize state. */ enum DPS { DPS_Normal = 0, DPS_GivenCharms = 1, DPS_Max = 2 }; /** * @brief Values for a particular difficulty level. */ struct DIFFICULTYLEVEL { struct LM suck_lm; // Clamp the suck to this limit LM unk_lm_0x8; float field4_0xc; float duSuckDeath; float duSuckChkpntTrigger; // Suck gain from triggering a checkpoint for the first time float duSuckChkpntRetrigger; // Suck gain from retriggering a checkpoint subsequent times float rand_low; float field10_0x20; float field11_0x24; float field12_0x28; float uSuckCharmLow; // Suck threshold to get a low noob charm int ccharmLow; // Low noob charm count float uSuckCharmHigh; // Suck threshold to get a high noob charm int ccharmHigh; // High noob charm count float field17_0x3c; float field18_0x40; float field19_0x44; float field20_0x48; int field21_0x4c; float field22_0x50; }; /** * @brief Maintains the current difficulty level. */ struct DIFFICULTY { LM *unk_lm; int ccoinRichMin; int ccoinRichMax; int ccoinPoorMin; int ccoinPoorMax; int uRichLow; int uRichHigh; DIFFICULTYLEVEL *pDifficultyLevel; enum DPS dps; }; /** * @brief Unknown, more research needed. * * @param psw Pointer to the SW struct. * @param ensk Ensure kind? * @param param3 Unknown. */ DIFFICULTY *PdifficultyEnsureSw(SW *psw, ENSK ensk, undefined4 param3); /** * @brief Clears the difficulty struct. * * @param pdifficulty Pointer to the difficulty. */ void OnDifficultyGameLoad(DIFFICULTY *pdifficulty); /** * @brief Sets up the difficulty system before a level load. * * Sets the difficulty value based on the current level. * * @param pdifficulty Pointer to the difficulty. */ void OnDifficultyWorldPreLoad(DIFFICULTY *pdifficulty); /** * @brief Sets up the difficulty system after a level load. * * Gives the player suck charms if they are below the threshold. * * @param pdifficulty Pointer to the difficulty. */ void OnDifficultyWorldPostLoad(DIFFICULTY *pdifficulty); /** * @brief Stubbed, does nothing. * * @param pdifficulty Pointer to the difficulty. */ void OnDifficultyInitialTeleport(DIFFICULTY *pdifficulty); /** * @brief Updates suck values for player death. * * Increases the player's suck value, accounting for a game over. * * @param scalar The amount to increase the suck value by. * @param pdifficulty Pointer to the difficulty. */ void OnDifficultyPlayerDeath(float scalar, struct DIFFICULTY *pdifficulty); /** * @brief Updates suck values for a checkpoint. * * Decreases the suck value based on the difficulty level. * * @param pdifficulty Pointer to the difficulty. * @param pchkpnt Pointer to the checkpoint. */ void OnDifficultyTriggerCheckpoint(DIFFICULTY *pdifficulty, struct CHKPNT *pchkpnt); /** * @brief Updates suck values for collecting a key. * * Resets the suck values. * * @param pdifficulty Pointer to the difficulty. */ void OnDifficultyCollectKey(DIFFICULTY *pdifficulty); /** * @brief Updates suck values for breaking an object. * * @param pdifficulty Pointer to the difficulty. * @param ppos Pointer to the position of the breakable. * @param ccoin The number of coins. (?) */ void OnDifficultyBreak(DIFFICULTY *pdifficulty, struct VECTOR *ppos, int ccoin); /** * @brief Changes the suck value by the given amount. * * Clamps the suck between the min and max values for the given difficulty. * * @param nParam The amount to change the suck value by. * @param pdifficulty Pointer to the difficulty. */ void ChangeSuck(float nParam, struct DIFFICULTY *pdifficulty); // void ResetSuckChkpnts(int nParam); // void SetSuckChkpnts(int nParam); /** * @brief Stubbed function. */ void OnDifficultyInitialTeleport(); // Current difficulty struct extern struct DIFFICULTY g_difficulty; // Each of three difficulty levels extern struct DIFFICULTYLEVEL g_difficultyEasy; extern struct DIFFICULTYLEVEL g_difficultyMedium; extern struct DIFFICULTYLEVEL g_difficultyHard; #endif // DIFFICULTY_H ================================================ FILE: include/dl.h ================================================ /** * @file dl.h * * @brief Doubly-linked list. */ #ifndef DL_H #define DL_H #include "common.h" #include /** * @brief Doubly Linked list */ struct DL { void *head; void *tail; int ibDle; }; /** * @brief Doubly Linked list Element * * @param next Points to the next element in the chain. * @param prev Points to the previous element in the chain. */ struct DLE { void *next; void *prev; }; /** * @brief Doubly Linked-list Iterator. Used to iterate through DLs in the global list (Singly Linked-list). * * @param m_pdl The actual doubly linked list the iterator is navigating. * @param m_ppv A pointer to the current element/node inside that list. * @param m_ibDle Offset the the DLE structure. * @param m_pdliNext Next DLI in the chain. */ struct DLI { DL *m_pdl; void **m_ppv; int m_ibDle; DLI *m_pdliNext; }; /** * @brief Unknown. */ struct DLIM { // ... }; /** * @brief Unknown. */ struct DLR { OID oidChild; DLR *pdlrNext; }; /** * @brief Initialize a doubly linked list. * * @param pdl Pointer to the doubly linked list. * @param ibDle Offset to the DLE structure within the list element. */ void InitDl(DL *pdl, int ibDle); /** * @brief Clear a doubly linked list. * * @param pdl Pointer to the doubly linked list. */ void ClearDl(DL *pdl); /** * @brief Clear a doubly linked list element. * * @param pdle Pointer to the doubly linked list element. */ void ClearDle(DLE *pdle); /** * @brief Get the DLE structure from a list element. * * @param pdl Pointer to the doubly linked list. * @param pv Pointer to the list element. * @return Pointer to the DLE structure. */ DLE *PdleFromDlEntry(DL *pdl, void *pv); /** * @brief Append an element to the end of the doubly linked list. * * @param pdl Pointer to the doubly linked list. * @param pv Pointer to the list element. */ void AppendDlEntry(DL *pdl, void *pv); /** * @brief Prepend an element to the beginning of the doubly linked list. * * @param pdl Pointer to the doubly linked list. * @param pv Pointer to the list element. */ void PrependDlEntry(DL *pdl, void *pv); /** * @brief Insert an element before a specified element in the doubly linked list. * * @param pdl Pointer to the doubly linked list. * @param pvNext Pointer to the element before which the new element will be inserted. * @param pv Pointer to the new list element. */ void InsertDlEntryBefore(DL *pdl, void *pvNext, void *pv); /** * @brief Remove an element from the doubly linked list and manage the doubly linked list iterator, incase the element being removed is a current iterator for an DLI instance. * * @param pdl Doubly linked list to remove the element from. * @param pv Element to remove. */ void RemoveDlEntry(DL *pdl, void *pv); /** * @brief Determine if a list element is in the doubly linked list. * * @param pdl Doubly linked list to search. * @param pv List element to search for. * @return true if the element is in the list, false otherwise. */ bool FFindDlEntry(DL *pdl, void *pv); /** * @brief Check if the doubly linked list is empty. * * @param pdl Pointer to the doubly linked list. * @return true if the list is empty, false otherwise. */ bool FIsDlEmpty(DL *pdl); /** * @brief Merge two doubly linked lists. * * @param pdlDst Destination doubly linked list. * @param pdlSrc Source doubly linked list. */ void MergeDl(DL *pdlDst, DL *pdlSrc); /** * @brief Traverse a doubly linked list starting from the head and count the number of elements. * * @param pdl Pointer to the doubly linked list. * @return The number of elements in the doubly linked list. */ int CPvDl(DL *pdl); #endif // DL_H ================================================ FILE: include/dmas.h ================================================ /** * @file dmas.h * * @brief Direct memory access. */ #ifndef DMAS_H #define DMAS_H #include "common.h" #include #include #include extern sceDmaChan *g_pdcVif0; extern sceDmaChan *g_pdcVif1; extern sceDmaChan *g_pdcGif; extern sceDmaChan *g_pdcFromSpr; extern sceDmaChan *g_pdcToSpr; /** * @brief Union for 16-byte aligned data. */ union QW { VECTOR vec; VECTOR4 vec4; ulong ull; ulong aul[2]; uint aun[4]; ushort aus[8]; uchar ab[16]; long ll; long al[2]; int an[4]; short as[8]; float ag[4]; }; class DMAS { public: /* 0x00 */ uchar* m_pbMax; /* 0x04 */ uchar* m_ab; /* 0x08 */ QW* m_pqwCnt; /* 0x0c */ uchar* m_pb; /* 0x10 */ int m_fPad; /* 0x14 */ int m_fEndPrim; DMAS(); void Clear(); void Reset(); void AllocGlobal(int); void AllocSw(int, int); void AllocStack(int); void AllocStatic(int, QW *); void Detach(int *, QW **); void DetachCopySw(int *, QW **, QW *, int); void Send(sceDmaChan *chan); void AddDmaCnt(); void AddDmaRefs(int cqw, QW *aqw); void AddDmaCall(QW *); void AddDmaRet(); void AddDmaBulk(int, QW *); void AddDmaEnd(); void EndDmaCnt(); virtual void EndPrim(); }; void StartupDma(); inline void AddDmaInt(DMAS *pdmas, int val) { uchar *p = pdmas->m_pb; pdmas->m_pb = p + 4; *(int *)p = val; } #endif // DMAS_H ================================================ FILE: include/dysh.h ================================================ /** * @file dysh.h * * @brief Dynamic shadow(?) */ #ifndef DYSH_H #define DYSH_H #include "common.h" #include #include #include #include // Forward. struct RPL; /** * @class DYNAMIC_SHADOW * @brief Unknown. * @todo Implement the struct. */ struct DYSH { // ... }; void InitDysh(DYSH *pdysh); void SetDyshShadow(DYSH *pdysh, SHADOW *pshadow); void RenderDyshSelf(DYSH *pdysh, CM *pcm, RO *pro); void DrawDysh(RPL *prpl); extern MATRIX4 s_matUvToClip; #endif // DYSH_H ================================================ FILE: include/dzg.h ================================================ /** * @file dzg.h */ #ifndef DZG_H #define DZG_H #include "common.h" #include #include // Forward. struct XP; typedef int GRFSG; /** * @brief Unknown. * @todo Implement the struct. */ struct DZ { // ... }; /** * @brief Unknown. */ struct DZG { int cdzMax; int cdz; DZ *adz; DL dlPos; DL dlZero; DL dlMax; DL dlUncat; int cdzPos; float *aagPos; float *aagPosCrout; float *asdv; float *adsfPos; }; void InitDzg(DZG *pdzg, int cpxp); void ClearDzgSolution(DZG *pdzg); void AppendDzgDz(DZG *pdzg, DZ *pdzOther); void FillDzgDz(DZG *pdzg, GRFSG grfsg, DZ *pdzForce, int cpxp, XP **apxp, int *acpso, SO ***aapso); void EnforceDzgDz(DZG *pdzg, DZ *pdzAdd); void SolveDzg(DZG *pdzg, GRFSG grfsg, int cpxp, XP **apxp, int *acpso, SO ***aapso); void SolveDzgFric(DZG *pdzg, GRFSG grfsg, int cpxp, XP **apxp, int *acpso, SO ***aapso, float dt); void ApplyDzg(DZG *pdzg, int cpsoRoot, int *acpso, SO ***aapso, float sdvMax, float sdwMax); void SolveInequalities(int c, float *aag, float *ag, float *agSoln); #endif // DZG_H ================================================ FILE: include/emitter.h ================================================ /** * @file emitter.h * * @brief Particle emitter. */ #ifndef EMITTER_H #define EMITTER_H #include "common.h" #include #include #include #include // Forward. struct EXPL; typedef int GRFEXPLSO; /** * @brief Unknown. * @todo Implement the struct. */ struct EMITMESH { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct EMITBLIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct EMITGEN { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct EMITRIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct EMITDV { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct EMITV { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct EMITVX { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct EMITO { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct EMITB { /* 0x00 */ int cref; /* 0x04 */ STRUCT_PADDING(3); /* 0x10 */ EMITO emito; // ... }; /** * @brief Emitter group? * @todo Implement the struct. */ struct EMITG { // ... }; /** * @brief Particle emitter. * @todo Implement the struct. */ struct EMITTER : public ALO { // ... /* 0x308 */ int fAutoPause; /* 0x30c */ STRUCT_PADDING(13); /* 0x340 */ float tUnpause; /* 0x344 */ STRUCT_PADDING(2); /* 0x34c */ int fValuesChanged; // ... }; void InitEmitb(EMITB *pemitb); void InitEmitter(EMITTER *pemitter); void LoadEmitmeshFromBrx(EMITMESH *pemitmesh, CBinaryInputStream *pbis); void LoadEmitblipColorsFromBrx(EMITBLIP *pemitblip, int crgba, LO *ploEmit, CBinaryInputStream *pbis); void LoadEmitterFromBrx(EMITTER *pemitter, CBinaryInputStream *pbis); void CloneEmitter(EMITTER *pemitter, EMITTER *pemitterBase); void BindEmitterCallback(EMITTER *pemitter, MSGID msgid, void *pvData); void BindEmitter(EMITTER *pemitter); void PostEmitterLoad(EMITTER *pemitter); void HandleEmitterMessage(EMITTER *pemitter, MSGID msgid, void *pv); void RenderEmitterSelf(EMITTER *pemitter, CM *pcm, RO *pro); EMITB *PemitbCopyOnWrite(EMITB *pemitb); EMITB *PemitbEnsureEmitter(EMITTER *pemitter, ENSK ensk); EMITTER *PemitterEnsureEmitter(EMITTER *pemitter, ENSK ensk); void AddEmitterSkeleton(EMITTER *pemitter, OID oid, OID oidOther, float sRadius, float gDensity, float sRadiusOther, float gDensityOther); void ModifyEmitterParticles(EMITTER *pemitter); void UpdateEmitter(EMITTER *pemitter, float dt); void PauseEmitter(EMITTER *pemitter, float dtPause); void PauseEmitterIndefinite(EMITTER *pemitter); void UnpauseEmitter(EMITTER *pemitter); int FPausedEmitter(EMITTER *pemitter); void SetEmitterEnabled(EMITTER *pemitter, int fEnabled); void GetEmitterEnabled(EMITTER *pemitter, int *pfEnabled); void GetEmitterPaused(EMITTER *pemitter, int *pfPaused); void OnEmitterValuesChanged(EMITTER *pemitter); void SetEmitterParticleCount(EMITTER *pemitter, int cParticle); void SetEmitterAutoPause(EMITTER *pemitter, int fAutoPause); void SetEmitbRipt(EMITB *pemitb, RIPT ript); void SetEmitterRipt(EMITTER *pemitter, RIPT ript); void SetExploRipt(EXPLO *pexplo, RIPT ript); void WakeSoWater(SO *pso, WATER *pwater, float dt, VECTOR *pvCurrent, VECTOR *pposSurface, float dtWakeMin, float gScale); void StandardSmokeCloud(VECTOR *ppos, float sRadius); void ChooseEmitoPos(EMITO *pemito, int iParticle, int cParticle, VECTOR *pposRet, VECTOR *pnormalRet); void ConvertEmitoPosVec(EMITO *pemito, VECTOR *ppos, VECTOR *pv); void CalculateEmitvx(int cParticlePerRing, LM *plmTilt, int cParticle, EMITVX *pemitvx); void ChooseEmitVelocity(EMITVX *pemitvx, float uRandom, float rSvz, LM *plmSv, VECTOR *pvecNormal, int iParticle, VECTOR *pv); void ChooseEmitvVelocityAge(EMITV *pemitv, EMITVX *pemitvx, EMITO *pemito, int iParticle, VECTOR *ppos, VECTOR *pnormal, VECTOR *pv, float *ptCreated, float *ptDestroy); void EmitRips(EMITB *pemitb, EMITG *pemitg, int crip, VECTOR *apos, VECTOR *av, float *atCreated, float *atDestroy); void EmitBlips(EMITB *pemitb, EMITG *pemitg, int cblipeRequested, VECTOR *apos, VECTOR *av, float *atCreated, float *atDestroy, VECTOR *aposFinal, VECTOR *avFinal); void OriginateParticles(int cParticle, EMITB *pemitb, EMITGEN *pemitgen); void OriginateSplineSinkParticles(int cParticle, EMITB *pemitb, EMITGEN *emitgen, EMITGEN *emitgenTarget); void EmitParticles(int cParticle, EMITB *pemitb, EMITG *pemitg); void EmitRipsSphere(VECTOR *ppos, VECTOR *pnormal, int crip, EMITRIP *pemitrip, EMITV *pemitv, RIPG **ppripg, LO *ploSubscribe); void StockSplashBig(VECTOR *ppos, float gScale, SO *psoTouch); void StockSplashSmall(VECTOR *ppos, float gScale, SO *psoTouch); void AddEmitoSkeleton(EMITO *pemito, OID oid, OID oidOther, float sRadius, float gDensity, float sRadiusOther, float gDensityOther, LO *ploContext); void BindEmitb(EMITB *pemitb, LO *ploContext); void SetEmitdvEmitb(EMITDV *pemitdv, EMITB *pemitb); void CalculateEmitdvMatrix(EMITDV *pemitdv, float dt, MATRIX4 *pmat4Dv); void PostExplLoad(EXPL *pexpl); void CalculateExplTransform(EXPL *pexpl, VECTOR *pposLocal, MATRIX3 *pmatLocal); void ExplodeExpl(EXPL *pexpl); void ExplodeExplParams(EXPL *pexpl, GRFEXPLSO grfexplso, ALO *paloReference, VECTOR *pvec, VECTOR *pposOrigin, float rScale, float sRadius); void ExplodeExplExplso(EXPL *pexpl, EXPLSO *pexplso); void LoadExplgFromBrx(EXPLG *pexplg, CBinaryInputStream *pbis); void CloneExplg(EXPLG *pexplg, EXPLG *pexplgBase); void BindExplg(EXPLG *pexplg); void ExplodeExplgExplso(EXPLG *pexplg, EXPLSO *pexplso); void InitExplo(EXPLO *pexplo); void LoadExploFromBrx(EXPLO *pexplo, CBinaryInputStream *pbis); void CloneExplo(EXPLO *pexplo, EXPLO *pexploBase); void BindExplo(EXPLO *pexplo); void ExplodeExploExplso(EXPLO *pexplo, EXPLSO *pexplso); void AddExploSkeleton(EXPLO *pexplo, OID oid, OID oidOther, float sRadius, float gDensity, float sRadiusOther, float gDensityOther); EMITB *PemitbEnsureExplo(EXPLO *pexplo, ENSK ensk); void InitExpls(EXPLS *pexpls); void BindExpls(EXPLS *pexpls); void HandleExplsMessage(EXPLS *pexpls, MSGID msgid, void *pv); void ExplodeExplsExplso(EXPLS *pexpls, EXPLSO *pexplso); SFX *PsfxEnsureExpls(EXPLS *pexpls, ENSK ensk); void FireExplsExplso(EXPLS *pexpls, EXPLSO *pexplso); void InferExpl(EXPL **ppexpl, ALO *palo); void FireSwTimedExplodeStyles(SW *psw); #endif // EMITTER_H ================================================ FILE: include/ensure.h ================================================ /** * @file ensure.h * * @brief Dynamic difficulty system. * * @todo Possibly merge this into another header, if appropriate. */ #ifndef ENSURE_H #define ENSURE_H /** * @brief Ensure kind. Further research needed. */ enum ENSK { ENSK_Get, ENSK_Set }; #endif // ENSURE_H ================================================ FILE: include/eyes.h ================================================ /** * @file eyes.h */ #ifndef EYES_H #define EYES_H #include "common.h" #include /** * @brief Eyes state. */ enum EYESS { EYESS_Nil = -1, EYESS_Open = 0, EYESS_Closing = 1, EYESS_Closed = 2, EYESS_Opening = 3, EYESS_Max = 4 }; /** * @brief Eyes. */ struct EYES : public SAA { // ... }; void InitEyes(EYES *peyes, SAAF *psaaf); void PostEyesLoad(EYES *peyes); void SetEyesEyess(EYES *peyes, EYESS eyess); void UpdateEyes(EYES *peyes, float dt); void SetEyesClosed(EYES *peyes, float uClosed); SAI *PsaiFromEyesShd(EYES *peyes, SHD *pshd); #endif // EYES_H ================================================ FILE: include/fader.h ================================================ /** * @file fader.h */ #ifndef FADER_H #define FADER_H #include "common.h" #include /** * @todo Implement the struct. */ struct FADER { // ... }; /** * @brief Update the fader. */ void UpdateFader(FADER *pfader, float dt); /** * @brief Create a new fader. */ FADER *PfaderNew(ALO *palo); /** * @brief Remove the fader. */ void RemoveFader(FADER *pfader); #endif // FADER_H ================================================ FILE: include/find.h ================================================ /** * @file find.h * * @brief Find objects in the SW. */ #ifndef FIND_H #define FIND_H #include "common.h" #include #include #include #include /** * @brief Gets the DL for the SW object with the given OID. * * @param psw The SW object. * @param oid The OID of the object. * * @return The DL for the object, or NULL if the object was not found. */ DL *PdlFromSwOid(SW *psw, OID oid); void MatchSwObject(LO *ploMatch, int grffsoMask, int fIncludeRemoved, int fProxyMatch, LO *ploContext, int cploMax, int *pcploMatch, LO **aplo, int *pcpaloBest); int CploFindSwObjects(SW *psw, GRFFSO grffso, OID oid, LO *ploContext, int cploMax, LO **aplo); LO *PloFindSwObject(SW *psw, GRFFSO grffso, OID oid, LO *ploContext); /** * @brief Finds the nearest SW object with the given OID from the context LO. * * @param psw The SW object. * @param oid The OID of the object to find. * @param ploContext The LO to search from. * * @return The nearest LO with the given OID, or NULL if no such object was found. */ LO *PloFindSwNearest(SW *psw, OID oid, LO *ploContext); /** * @brief Finds a child SW object with the given OID under the specified ancestor ALO. * * @param psw The SW object. * @param oid The OID of the child object to find. * @param paloAncestor The ancestor ALO under which to search for the child. * * @return The found child LO, or NULL if no such child was found. */ LO *PloFindSwChild(SW *psw, OID oid, ALO *paloAncestor); /** * @brief Checks if the given CID is derived from another. * * @param cid The CID to check. * @param cidAncestor The CID to check against. * * @retval 1 if the CID is derived from the ancestor. * @retval 0 if the CID is not derived from the ancestor. */ int FIsCidDerivedFrom(int cid, int cidAncestor); int CploFindSwObjectsByClass(SW *psw, GRFFSO grffso, CID cid, LO *ploContext, int cploMax, LO **aplo); LO *PloFindSwObjectByClass(SW *psw, GRFFSO grffso, CID cid, LO *ploContext); /** * @brief Finds the common parent of two LOs. * * @param plo The first LO. * @param ploOther The second LO. * * @return The common parent of the two LOs. */ ALO *PaloFindLoCommonParent(LO *plo, LO *ploOther); extern void** g_mpcidpvt; #endif // FIND_H ================================================ FILE: include/flash.h ================================================ /** * @file flash.h * * @brief Flash (might be flash animation, or literal screen flashes). */ #ifndef FLASH_H #define FLASH_H #include "common.h" #include #include #include /** * @brief Unknown (render options?). */ struct RO { MATRIX4 mat; float uAlpha; float uAlphaCelBorder; undefined4 unk0; undefined4 unk1; }; /** * @class FLASHLIGHT * @brief Flashlight guard's flashlight (maybe reused for spotlights?). */ struct FLASH : public ALO { /* 0x2d0 */ int ctsurf; /* 0x2d4 */ TSURF *atsurf; /* 0x2d8 */ int ctbsp; /* 0x2dc */ TBSP *atbsp; /* 0x2e0 */ SMP smpScale; /* 0x2ec */ float gScaleCur; /* 0x2f0 */ float gScaleTarget; undefined4 unk0; undefined4 unk1; undefined4 unk2; }; /** * @brief Initializes the given flashlight. * * @param pflash Flash to initialize. */ void InitFlash(FLASH *pflash); /** * @brief Loads a flashlight from the given binary input stream. * * @param pflash Where to load the flash. * @param pbis Binary input stream. */ void LoadFlashFromBrx(FLASH *pflash, CBinaryInputStream *pbis); /** * @brief Updates the given flashlight. * * @param pflash Flash to update. * @param dt Delta time. */ void UpdateFlash(FLASH *pflash, float dt); /** * @brief Renders the given flashlight. * * @param pflash Flash to render. * @param pcm Camera to render from. * @param pro Render options(?). */ void RenderFlashSelf(FLASH *pflash, CM *pcm, RO *pro); int FPosFlashWithin(FLASH *pflash, VECTOR *ppos); #endif // FLASH_H ================================================ FILE: include/fly.h ================================================ /** * @file fly.h * * @brief Flying animals. */ #ifndef FLY_H #define FLY_H #include "common.h" #include #include #include #include #include #include #include #include // Forward. struct WKR; struct SOP; /** * @brief Flying animal kind. */ enum FLYK { FLYK_Nil = -1, FLYK_Insect = 0, FLYK_Pigeon = 1, FLYK_Max = 2 }; /** * @brief Flying animal state. */ enum FLYS { FLYS_Nil = -1, FLYS_Wander = 0, FLYS_Dying = 1, FLYS_Dead = 2, FLYS_Attract = 3, FLYS_Stuck = 4, FLYS_Land = 5, FLYS_Ground = 6, FLYS_Max = 7 }; /** * @class FLY * @brief Flying animal. */ struct FLY : public SO { // ... FLYK flyk; FLYS flys; float tFlys; float tFlysnext; FLYS flysInit; int cpaloRender; int ipaloRender; ALO *apaloRender[16]; int cpaloRenderGround; ALO *apaloRenderGround[8]; ALO *paloRenderDead; EXPL *pexpl; TARGET *ptarget; DLE dleFly; AMB *pambBuzz; // ... }; void InitFly(FLY *pfly); void LoadFlyFromBrx(FLY *pfly, CBinaryInputStream *pbis); void CloneFly(FLY *pfly, FLY *pflyBase); void FreezeFly(FLY *pfly, int fFreeze); void PostFlyLoad(FLY *pfly); void PresetFlyAccel(FLY *pfly, float dt); void UpdateFly(FLY *pfly, float dt); void RenderFlySelf(FLY *pfly, CM *pcm, RO *pro); int FAbsorbFlyWkr(FLY *pfly, WKR *pwkr); void GetFlyParams(FLY *pfly, SOP **ppsop); void SetFlyFlys(FLY *pfly, FLYS flys); void EmitFlyDroppings(FLY *pfly); int FFindFlyClosestLandingPos(FLY *pfly, VECTOR *ppos); FLYS FlysAttemptedFlyLanding(FLY *pfly); int FShouldFlyFlee(FLY *pfly); int FFilterFly(void *pv, SO *pso); int FCheckFlyOpenSpaceBelow(FLY *pfly); #endif // FLY_H ================================================ FILE: include/font.h ================================================ /** * @file font.h * * @brief Font system. */ #ifndef FONT_H #define FONT_H #include "common.h" /** * @brief Scaled font ratio. */ struct SFR { float rx, ry; }; class CFont { public: void CopyTo(CFont *pfontDest); protected: int m_dxCharUnscaled; int m_dxSpaceUnscaled; int m_dyUnscaled; int m_csfr; SFR m_asfr[4]; int m_fGstest; undefined4 unk_1; ulong m_gstest; uint m_z; float m_rxScale; float m_ryScale; }; class CFontBrx : public CFont { private: undefined1 m_padding[0x33]; }; extern CFont *g_pfont; class CRichText { public: CRichText(char *achz, CFont *pfont); int Cch(); void Reset(); void SetBaseColor(RGBA *rgba); private: char *m_achz; char *m_pchCur; CFont *m_pfontCur; CFont *m_pfontBase; CFontBrx m_fontOther; undefined4 m_unknown; // todo: figure out what this is RGBA m_rgbaCur; RGBA m_rgbaSet; RGBA m_rgbaBase; RGBA m_rgbaOther; }; void StartupFont(); #endif // FONT_H ================================================ FILE: include/freeze.h ================================================ /** * @file freeze.h */ #ifndef FREEZE_H #define FREEZE_H #include "common.h" #include #include #include #include /** * @brief Merge (?) * @todo Should this be defined elsewhere? */ struct MRG { DLE dle; int cpalo; ALO **apalo; }; void RemergeSwObject(SW *psw, ALO *palo); void MergeSwFreezeGroups(SW *psw, ALO *paloFreezeGroup1, ALO *paloFreezeGroup2); void SplinterSwFreezeGroup(SW *psw, ALO *paloFreezeRoot); void MergeSwGroup(SW *psw, MRG *pmrg); void AddSwMergeGroup(SW *psw, MRG *pmrg); void RemoveFromArray(int *pcpv, void **apv, void *pv); void RemoveSwMergeGroup(SW *psw, MRG *pmrg); void RemergeSwObjects(SW *psw); void FreezeAloHierarchy(ALO *palo, int fFreeze); void GetAloFrozen(ALO *palo, int *pfFrozen); void FreezeAlo(ALO *palo, int fFreeze); void FreezeSo(SO *pso, int fFreeze); void RefreezeSwObjects(SW *psw); void UpdateSwBusyList(SW *psw); #endif // FREEZE_H ================================================ FILE: include/frm.h ================================================ /** * @file frm.h * * @brief Frame manager. */ #ifndef FRM_H #define FRM_H #include "common.h" #include // Forward. class VIFS; struct GIFS; /** * @brief Frame. * @todo Add the rest of the fields. */ struct FRM { /* 0x00 */ int cqwGifs; /* 0x04 */ QW *aqwGifs; /* 0x08 */ int cqwVifs; /* 0x0c */ QW *aqwVifs; /* 0x10 */ SLI *asli; /* 0x14 */ int cframe; /* 0x18 */ int grffont; /* 0x1c */ int fBackgroundUploadRequired; STRUCT_PADDING(9); /* 0x44 */ GRFZON grfzon; // ... }; void StartupFrame(); void OpenFrame(); void EnsureVu1Code(VIFS *pvifs, void *pvStart, void *pvEnd); void FinalizeFrameVifs(VIFS *pvifs, int *pcqwVifs, QW **ppqwVifs); void FinalizeFrameGifs(GIFS *pgifs, int *pcqwGifs, QW **ppqwGifs); void CloseFrame(); void PrepareGsForFrameRender(FRM *pfrm); void FrameRenderLoop(void *); void RenderFrame(FRM *pfrm, int fRenderGifs); void ClearPendingFrame(FRM *pfrm); void FlushFrames(int fFreeze); void BlendPrevFrame(); extern uchar g_abRenderLoopStack[0x20000]; extern int g_cframe; #endif // FRM_H ================================================ FILE: include/frzg.h ================================================ /** * @file frzg.h */ #ifndef FRZG_H #define FRZG_H #include "common.h" #include #include #include /** * @class FREEZE_GROUP * @brief Group of freeze objects. */ struct FRZG : public LO { int coid; OID aoid[8]; MRG mrg; }; void PostFrzgLoad(FRZG *pfrzg); void AddFrzgObject(FRZG *pfrzg, OID oid); #endif // FRZG_H ================================================ FILE: include/game.h ================================================ /** * @file game.h * * @brief Game state and level management. * * @todo Cleanup/update structs and function names/parameters. */ #ifndef GAME_H #define GAME_H #include "common.h" #include #include /** * @brief World ID. */ enum GAMEWORLD { GAMEWORLD_Nil = -1, GAMEWORLD_Intro = 0, GAMEWORLD_Underwater = 1, GAMEWORLD_Muggshot = 2, GAMEWORLD_Voodoo = 3, GAMEWORLD_Snow = 4, GAMEWORLD_Clockwerk = 5, GAMEWORLD_Max = 6 }; /** * @brief Level ID. */ enum WORLDLEVEL { WORLDLEVEL_Nil = -1, WORLDLEVEL_Approach = 0, WORLDLEVEL_Hub = 1, WORLDLEVEL_Level1 = 2, WORLDLEVEL_Level2 = 3, WORLDLEVEL_Level3 = 4, WORLDLEVEL_Level4 = 5, WORLDLEVEL_Level5 = 6, WORLDLEVEL_Level6 = 7, WORLDLEVEL_Boss = 8, WORLDLEVEL_Max = 9 }; /** * @brief Game state flags. */ enum FGS { FGS_FirstClue = 0x1, FGS_HalfClues = 0x2, FGS_AllClues = 0x4, FGS_FirstVault = 0x8, FGS_SecondVault = 0x10 }; /** * @brief World state flags. */ enum FWS { FWS_Visited = 0x1, FWS_Lock_0 = 0x2, FWS_Lock_1 = 0x4, FWS_Lock_2 = 0x8, FWS_Lock_3 = 0x10, FWS_Lock_All = 0x1e }; /** * @brief Level state flags. */ enum FLS { FLS_Visited = 0x1, FLS_KeyCollected = 0x2, FLS_Secondary = 0x4, FLS_Tertiary = 0x8, FLS_BossDefeated = 0x10 }; /** * @brief Game state flags integer type. */ typedef int GRFGS; /** * @brief World state flags integer type. */ typedef int GRFWS; /** * @brief Level state flags integer type. */ typedef int GRFLS; /** * @brief Vault powerup flags integer type. */ typedef int GRFVAULT; /** * @brief Level State. */ struct LS { FLS fls; // Level state flags float dt; // Time spent in level (secs) float dtTimedBest; // Best MTS time for level (secs) float uSuck; // Current player suck for this level float unk_suck_0x10; // unknown, seems suck related int afDialogPlayed[12]; // Dialog played flags int sceneVars[2][4]; // Scene variables int cclue; // Count of clues collected uint fclue; // Clue collected flags int unk_field_0x6c; // Unknown int unk_field_0x70; // Unknown char *unk_field_0x74; // Unknown }; /** * @brief World State. */ struct WS { LS als[9]; // Level states array int ckey; // Count of keys collected in world int cvault; // Count of vaults opened on worls int ctimed; // Count of MTSs completed in world float dt; // Time spent in world (secs) FWS fws; // World state flags }; /** * @brief Game State. */ struct GS { int gsv; // not sure why this isn't caled fgs int cbThis; // Struct size (bytes) int nChecksum; // Expected size (bytes) float dt; // Time spent in game (secs) WS aws[6]; // World states array GAMEWORLD gameworldCur; // Current world WORLDLEVEL worldlevelCur; // Current level int clife; // Lives count int ccharm; // Charm count int ccoin; // Coin count GRFGS grfgs; // Game settings flags(?) GRFVAULT grfvault; // Unlocked powerup flags unsigned int unlocked_cutscenes; unsigned int fgs; int fspLast; // Last selected powerup }; /** * @brief World ID */ enum WID { // Intro WID_stock_objects = 0x0, WID_splash = 0x1, WID_attract = 0x2, WID_jb_intro = 0x3, // Underwater WID_uw_exterior_approach = 0x4, WID_uw_exterior_boat = 0x5, WID_uw_bonus_security = 0x6, WID_uw_bonus_drivewheels_final = 0x7, WID_uw_bonus_library = 0x8, WID_uw_t3_final = 0x9, WID_uw_rip_off = 0xa, WID_uw_c2_final = 0xb, WID_uw_boss_blimp = 0xc, // Mesa WID_ms_approach = 0xd, WID_ms_casino = 0xe, WID_ms_exterior = 0xf, WID_ms_inspector = 0x10, WID_ms_rooftop = 0x11, WID_ms_vertigo = 0x12, WID_ms_sniper = 0x13, WID_ms_suv = 0x14, WID_ms_boss_battle = 0x15, // Voodoo WID_v_approach = 0x16, WID_v_gomerville = 0x17, WID_v_swamp_monster = 0x18, WID_v_hub = 0x19, WID_v_skinterior = 0x1a, WID_v_murray = 0x1b, WID_v_chicken = 0x1c, WID_v_puffer = 0x1d, WID_v_boss = 0x1e, // Snow WID_s_approach = 0x1f, WID_s_barrel = 0x20, WID_s_hub = 0x21, WID_s_inspector = 0x22, WID_s_security = 0x23, WID_s_sniper = 0x24, WID_s_suv = 0x25, WID_s_tank = 0x26, WID_s_boss = 0x27, // Clockwerk WID_cw_suv = 0x28, WID_cw_turret = 0x29, WID_cw_security = 0x2a, WID_cw_bentley = 0x2b, WID_cw_reverse_sniper = 0x2c, WID_cw_outclimb = 0x2d, WID_cw_finish = 0x2e, WID_Max = 0x2f }; struct GAME { VTGAME *pvtgame; int cAlarmsTriggered; int fTimedChallenge; float dtChallenge; int cgoldLatest; }; /** * @brief Used to locate level data by its location on the disc. * * @todo implement */ struct LevelLoadData { // ... }; extern const LevelLoadData *D_00247AB0[]; /** * @brief Calls StartGame. */ void StartupGame(); // LevelLoadData * search_level_by_load_data(LevelLoadData *search_level); // LevelLoadData * search_level_by_id(int search_id); /** * @brief Gets the friendly name of a level from its world ID. * * @param wid World ID. */ char *PchzFriendlyFromWid(int wid); // LevelLoadData *call_search_level_by_id(int level_id); // WORLDLEVEL FFindLevel(LevelLoadData *level) uint get_level_completion_by_id(int level_id); /** * @brief Tally the completion of a world. * * @param wid World ID. * @param ckey Result of the tally of keys. * @param cvault Result of the tally of vaults. * @param cmts Result of the tally of Master Thief Sprints */ void tally_world_completion(int wid, int *ckey, int *cvault, int *cmts); /** * @brief Get the game completion flags based on the current game state. */ FGS get_game_completion(); /** * @brief Unlocks the intro cutscene for a world. * * @param wid World ID. */ void UnlockIntroCutsceneFromWid(int wid); /** * @brief Updates game state upon defeating the boss of a world. * * Unlocks specific reward cutscenes and powerups based on the world ID. * * @param wid World ID. */ void DefeatBossFromWid(int wid); /** * @brief Unlocks the endgame cutscenes based on the completion flags. * * E.g. Ten Seconds, Thievius Raccoonus, etc. * * @param fgs Completion flags. */ void UnlockEndgameCutscenesFromFgs(FGS fgs); /** * @brief Plays the ending cutscene based on the completion flags. * * @param grfgs Completion flags. */ void PlayEndingFromCompletionFlags(GRFGS grfgs); /** * @brief Initializes the game state. * * @param pgs Game state. */ void InitGameState(GS *pgs); /** * @brief Unknown function. * * @param param_1 Unknown parameter. */ int FUN_00160650(int param_1); // void SetupGame(LevelLoadData *search_data,FTRANS transition_flags); /** * @brief Updates the timers on the game state. * * @param dt Delta time. */ void UpdateGameState(float dt); /** * @brief Gets the level state object from a world ID. * * @param wid World ID. */ int *LsFromWid(WID wid); /** * @brief Gets the level state flags from a world ID. * * @param wid World ID. */ GRFLS GrflsFromWid(WID wid); /** * @brief Unloads the game. */ void UnloadGame(); /** * @brief TBD */ void RetryGame(); /** * Unloads the game and wipes to the default world warp. */ void StartGame(); /** * @brief Unknown function. */ int FUN_00160948(); /** * @brief Calculates the percentage completion of the game. * * Tallies up the completion of each world and returns the percentage * as an int out of 100. * * @param pgs Game state. */ int CalculatePercentCompletion(GS *pgs); /** * @brief Sets the number of charms the player has. * * @param nParam Number of charms. */ void SetCcharm(int nParam); /** * @brief Checks if the player has any charms available. * * Will return true if the ccharm on the g_gs is > 0, of if the * infinite charms cheat is enabled. */ bool FCharmAvailable(); /** * @brief Unknown function, TBD. * * @param pls Pointer to level state. * @param param_2 OID of the dialog. */ //int PfLookupDialog(LS *pls, OID oidDialog); /** * @brief Clears 8 bytes of memory. * * Used in UnloadGame and FUN_00160948. * Probably used to clear a pointer or something. * * @param pv Pointer to the memory to clear. */ extern "C" void *clr_8_bytes_1(void *pv); /** * @brief Unknown function. * * @param param_1 Unknown parameter. */ void FUN_00160ce8(int param_1); /** * @brief Increases the count of alarms triggered in the given GAME. * * The count is used as a multiplier for the MTS countdown timer. */ void OnGameAlarmTriggered(GAME *pgame); /** * @brief Decreases the count of alarms triggered in the given GAME. * * The count is used as a multiplier for the MTS countdown timer. */ void OnGameAlarmDisabled(GAME *pgame); /** * @brief Unknown function. */ GRFVAULT GetGrfvault_unknown(); /** * @brief Gets the blueprint info for a vault. * * @param pgrfvault Pointer to the vault flags. * @param pipdialog Pointer to the dialog flags. * * @todo Fix parameter types. */ void GetBlueprintInfo(int *pgrfvault, int *pipdialog); /** * @brief Returns the max number of charms the player can hold. * * @note Always returns 2. This is a holdover from earlier in development where * there was a powerup that allowed you to have more than 2 charms. */ int CcharmMost(); /** * @brief Reloads the game state after the player dies. */ void reload_post_death(); // todo these should be somewhere else? extern GS g_gsCur; extern WS g_wsCur; extern LS g_lsCur; extern GS *g_pgsCur; extern WS *g_pwsCur; extern LS *g_plsCur; #ifdef SKIP_ASM // For CalculatePercentCompletion /** * @brief Level Info * * Used by the game to load the level. */ struct PchzLevel // maybe wrong name { double lsn_and_unk_ciphers; int search_Val; unsigned int unk_0xc; unsigned int unk_0x10; unsigned int unk_0x14; unsigned int unk_0x18; unsigned int for_lsn; int search_cipher; unsigned int for_size; unsigned int level_id; char* level_name; FLS tasks; }; extern PchzLevel pchzLevelTable[]; // Level table #endif #endif // GAME_H ================================================ FILE: include/gcc/math.h ================================================ /** * @file math.h * * @brief Library math functions. */ #ifndef MATH_H #define MATH_H extern "C" { float tanf(float x); float atan2f(float x, float y); float fmodf(float x, float y); float cosf(float x); } #endif // MATH_H ================================================ FILE: include/geom.h ================================================ /** * @file geom.h * * @brief Geometry. */ #ifndef GEOM_H #define GEOM_H #include #include /** * @todo Define struct */ struct TBSP; /** * @brief Edge in a geometry. */ struct EDGE { ushort aipos[2]; ushort aisurf[2]; EDGE *pedgeNext; EDGE *pedgeOtherNext; }; /** * @brief Unknown. */ struct SUR { int cb; void *pvSrc; void *pvDst; int cvtx; }; /** * @brief Unknown. */ struct SURF { VECTOR normal; float gDot; EDGE *pedge; EDGE *pedgeOther; short grfsurf; short ipos; }; /** * @brief Unknown. */ struct TSURF { float gDot; undefined4 unk1; undefined4 unk2; undefined4 unk3; VECTOR normal; }; /** * @brief Geometry. */ struct GEOM { float sRadius; int cpos; VECTOR *apos; int csurf; SURF *asurf; int cedge; EDGE *aedge; int *mpiposiiedgeMac; int *aiedge; VECTOR *mpisurfposCenter; float *mpisurfsRadius; }; /** * @brief Initializes the geometry struct. */ void InitGeom(GEOM *pgeom); /** * @brief Clones the geometry struct. */ void CloneGeom(GEOM *pgeomSrc, MATRIX4 *pdmat, GEOM *pgeomDst); #endif // GEOM_H ================================================ FILE: include/gifs.h ================================================ /** * @file gifs.h */ #ifndef GIFS_H #define GIFS_H #include /** * @brief Unknown. Constructs primitives for rendering? */ struct GIFS : public DMAS { QW *m_pqwPrim; uint m_creg; uint m_cregAll; GIFS(); void AddPrimEnd(); void EndPrim(int fEOP); void CheckReg(int fExpectPack, int regExpect); void AddPrimBulk(int prim, int c, int creg, ulong regs, QW **paqwBulk); void AddPrimPack(int prim, int creg, unsigned long regs); void PackRGBA(uint rgba); void PackUV(int u, int v); void PackSTQ(float s, float t, float q); void PackXYZ(int x, int y, int z); void PackXYZF(int x, int y, int z, int fog); void PackXYZFNoKick(int x, int y, int z, int fog); void PackAD(long int a, long int d); void AddPrimList(int creg, ulong regs); void ListRGBAQ(uint rgba, float q); void ListUV(int u, int v); void ListXYZF(int x, int y, int z, int fog); void AddImage(int cqw); }; #endif // GIFS_H ================================================ FILE: include/glbs.h ================================================ /** * @file glbs.h */ #ifndef GLBS_H #define GLBS_H #include "common.h" #include #include #include #include #include // Forward. struct UV; /** * @brief (?) kind. */ enum TRLK { TRLK_Nil = -1, TRLK_Download = 0, TRLK_DownloadRelight = 1, TRLK_Relight = 2, TRLK_RelightCache = 3, TRLK_Quick = 4, TRLK_Max = 5 }; /** * @brief Unknown. */ typedef struct RGL { /* 0x00 */ MATRIX4 matObjectToWorld; /* 0x40 */ MATRIX4 matWorldToObject; FGFN fgfn; float uAlpha; /* 0x94 */ TRLK trlk; int fCull; /* 0x9c */ TWPS twps; QW qwPosCenter; } RGLD; /** * @brief Unknown. * @todo Implement the struct. */ struct VTXG { STRUCT_PADDING(10); }; /** * @brief Unknown. */ struct GLBS { /* 0x00 */ RGLD m_rgld; /* 0xb0 */ int m_cplightStatic; /* 0xb4 */ int m_cplightAll; LIGHT *m_aplight[16]; /* 0xf8 */ SHD *m_pshd; VTXG m_vtxg; /* 0x124 */ int m_cvtxg; /* 0x128 */ VTXG m_avtxg[148]; /** * @brief Constructor. */ GLBS(); /** * @brief Destructor. */ ~GLBS(); void SetTransform(VECTOR *ppos, MATRIX3 *pmat); void FindLights(VECTOR *ppos, float sRadius); void ResetStrip(); void BeginStrip(SHD *pshd); void DrawPrelit(); void DrawThreeWay(); void EndStrip(); void SetNormal(VECTOR *ppos); // Might be SetPos? void SetRgba(RGBA &rgba); // Might not be correct. void SetUv(UV *puv); void SetVtx(int fAdc); }; #endif // GLBS_H ================================================ FILE: include/glob.h ================================================ /** * @file glob.h */ #ifndef GLOB_H #define GLOB_H #include #include #include typedef int GRFGLOB; /** * @todo Implement struct. */ struct GLOBSET { // ... }; /** * @todo Implement struct. */ struct GLOB { // ... }; /** * @todo Implement struct. */ struct SUBGLOB { // ... }; /** * @todo Implement the struct and figure out does it belong here. */ struct SGVR { // ... }; /* void BuildGlobsetSaaArray(GLOBSET *pglobset); void LoadGlobsetFromBrx(GLOBSET *pglobset, CBinaryInputStream *pbis, ALO *palo); void EnsureBuffer(int iBuffer, VIFS *pvifs); void EnsureBufferCel(int iBuffer, VIFS *pvifs); void BuildSubcel(GLOBSET *pglobset, int iBuffer, SUBCEL *psubcel, int cposf, VECTORF *aposf, int ctwef, TWEF *atwef, SUBPOSEF *asubposef, VECTORF *aposfPoses, float *agWeights, VIFS *pvifs); void BuildSubglobSinglePass(GLOBSET *pglobset, GLOB *pglob, int iBuffer, SUBGLOB *psubglob, SHD *pshd, VECTORF *aposf, VECTORF *anormalf, RGBAF *argbaf, UVF *auvf, int cvtxf, VTXF *avtxf, SUBPOSEF *asubposef, VECTORF *aposfPoses, VECTORF *anormalfPoses, float *agWeights, VIFS *avifs, SGVR *psgvr); void BuildSubglobThreeWay(GLOBSET *pglobset, GLOB *pglob, int iBuffer, SUBGLOB *psubglob, SHD *pshd, VECTORF *aposf, VECTORF *anormalf, RGBAF *argbaf, UVF *auvf, int cvtxf, VTXF *avtxf, SUBPOSEF *asubposef, VECTORF *aposfPoses, VECTORF *anormalfPoses, float *agWeights, VIFS *avifs, SGVR *psgvr); void BuildSubglobLighting(GLOB *pglob, SUBGLOB *psubglob, SUBGLOBI *psubglobi); void PostGlobsetLoad(GLOBSET *pglobset, ALO *palo); void BindGlobset(GLOBSET *pglobset, ALO *palo); void CloneGlobset(GLOBSET *pglobset, ALO *palo, GLOBSET *pglobsetBase); void CloneGlob(GLOBSET *pglobset, GLOB *pglob, GLOBI *pglobi); void UpdateGlobset(GLOBSET * pglobset, ALO *palo, float dt); void UpdateAloConstraints(ALO *palo); void UpdateAloInfluences(ALO *palo, RO *pro); void PredrawGlob(GLOBSET *pglobset, GLOB *pglob, GLOBI *pglobi, ALO *palo); void RotateVu1Buffer(); void DrawGlob(RPL *prpl); */ #endif // GLOB_H ================================================ FILE: include/gomer.h ================================================ /** * @file gomer.h */ #ifndef GOMER_H #define GOMER_H #include "common.h" #include /** * @brief Gomer state. * * @todo Populate enum values. */ enum GOMERS { GOMERS_Nil = -1 // ... }; /** * @class GOMER * @brief Unknown, related to bosses. * @todo Implement the struct. */ struct GOMER : public STEPGUARD { // ... /* 0xc40 */ int fAbandonExternal; }; #endif // GOMER_H ================================================ FILE: include/gs.h ================================================ /** * @file gs.h * * @brief Graphics synthesizer. * * @note Note to be confused with GS (game state), declared in game.h. */ #ifndef GS_H #define GS_H #include "common.h" #include #include struct GSB { int igsMin; int igsMac; int igsMax; }; /** * @brief Initializes a GSB with the given values. * * @param pgsb The GSB to initialize. * @param igsMin The minimum index. * @param igsMax The maximum index. */ void InitGsb(GSB *pgsb, int igsMin, int igsMax); /** * @brief Resets the igsMac to the minimum index. * * @param pGsb The GSB to reset. */ void ResetGsb(GSB *pGsb); /** * @brief Allocates a range of indices in the GSB. * * @param pgsb The GSB to allocate from. * @param iCount The number of indices to allocate. * * @return The old value of igsMac. */ int IgsAllocGsb(GSB *pgsb, int iCount); void BlastAqwGifsBothFrames(QW *); void SendDmaSyncGsFinish(sceDmaChan *pdc, QW *pqw); void StartupGs(); void ClearFrameBuffers(); void UploadBitmaps(GRFZON grfzon, GSB *pgsb); #endif // GS_H ================================================ FILE: include/hide.h ================================================ /** * @file hide.h */ #ifndef HIDE_H #define HIDE_H #include "common.h" // ... void StartupHide(); #endif // HIDE_H ================================================ FILE: include/hnd.h ================================================ /** * @file hnd.h */ #ifndef HND_H #define HND_H #include "common.h" #include #include /** * @class HANDLE * @brief Unknown. * @todo Implement the struct. */ struct HND : public TARGET { // ... }; void InitHnd(HND *phnd); void LoadHndFromBrx(HND *phnd, CBinaryInputStream *pbis); #endif // HND_H ================================================ FILE: include/ik.h ================================================ /** * @file ik.h */ #ifndef IK_H #define IK_H #include "common.h" #include #include #include // Forward. struct RO; /** * @class IK_HANDLE * @brief Inverse kinematics handle. * @todo Implement the struct. */ struct IKH : public SO { // ... }; /** * @class LIGHTWEIGHT_IK_HAN * @brief Lightweight(?) inverse kinematics handle. * @todo Implement the struct. */ struct LIKH : public ALO { // ... }; void RenderIkhSelf(IKH *pikh, CM pcm, RO *pro); void RenderLikhSelf(LIKH *plikh, CM *pcm, RO *pro); void SolveAloIK(ALO *palo); #endif // IK_H ================================================ FILE: include/include_asm.h ================================================ #ifndef INCLUDE_ASM_H #define INCLUDE_ASM_H #if !defined(M2CTX) && !defined(PERMUTER) && !defined(SKIP_ASM) #ifndef INCLUDE_ASM #define INCLUDE_ASM(FOLDER, NAME) \ __asm__( \ ".section .text\n" \ " .set noat\n" \ " .set noreorder\n" \ " .include \"" FOLDER "/" #NAME ".s\"\n" \ " .set reorder\n" \ " .set at\n" \ ) #endif #ifndef INCLUDE_RODATA #define INCLUDE_RODATA(FOLDER, NAME) \ __asm__( \ ".section .rodata\n" \ " .include \"" FOLDER "/" #NAME ".s\"\n" \ ".section .text" \ ) #endif __asm__(".include \"include/labels.inc\"\n"); #else #ifndef INCLUDE_ASM #define INCLUDE_ASM(FOLDER, NAME) #endif #ifndef INCLUDE_RODATA #define INCLUDE_RODATA(FOLDER, NAME) #endif #endif /* !defined(M2CTX) && !defined(PERMUTER) && !defined(SKIP_ASM) */ #endif /* INCLUDE_ASM_H */ ================================================ FILE: include/intrinsics.h ================================================ /** * @file intrinsics.h * * @brief Hardware intrinsics and inline assembly macros for MIPS/PS2 EE. */ #ifndef INTRINSICS_H #define INTRINSICS_H /** * @brief Hardware square root using MIPS FPU sqrt.s instruction. * * @details Inline assembly to invoke the standard MIPS II FPU sqrt.s * instruction. Available on R5900 (PS2 EE) and most MIPS processors with an * FPU. * * @param value Expression to compute square root of * @return Square root result as a float */ #define SQRTF(value) \ ({ \ float __result; \ __asm__ volatile("sqrt.s %0, %1" \ : "=&f"(__result) \ : "f"(value) \ : "memory"); \ __result; \ }) /** * @brief Read MIPS CP0 Count register (register $9). * * @details The Count register increments automatically every CPU cycle and is * used for high-resolution timing. On PS2 EE, it runs at 294.912 MHz. * https://psi-rockin.github.io/ps2tek/#eecop0timer * * @return 32-bit Count value as unsigned long */ #define READ_CP0_COUNT() \ ({ \ unsigned long __result; \ __asm__ volatile("mfc0 %0, $9" : "=r"(__result)); \ __result; \ }) #endif // INTRINSICS_H ================================================ FILE: include/jlo.h ================================================ /** * @file jlo.h */ #ifndef JLO_H #define JLO_H #include "common.h" #include #include #include #include /** * @brief (?) state. */ enum JLOS { JLOS_Nil = -1, JLOS_Jump = 0, JLOS_Land = 1, JLOS_Idle = 2, JLOS_Fire = 3, JLOS_Taunt = 4, JLOS_Max = 5 }; /** * @class JLO * @brief Unknown. * @todo Implement the struct. */ struct JLO : public SO { // ... }; /** * @class JLO_VOLUME * @brief Unknown. * @todo Implement the struct. */ struct JLOVOL : public VOLBTN { // ... }; /** * @class JLO_CLUSTER * @brief Unknown. * @todo Implement the struct. */ struct JLOC : public ALO { // ... }; void InitJlo(JLO *pjlo); void LoadJloFromBrx(JLO *pjlo, CBinaryInputStream *pbis); void PostJloLoad(JLO *pjlo); void PresetJloAccel(JLO *pjlo, float dt); void UpdateJlo(JLO *pjlo, float dt); JLOS JlosNextJlo(JLO *pjlo); void SetJloJlovol(JLO *pjlo, JLOVOL *pjlovol); void FireJlo(JLO *pjlo); void LandJlo(JLO *pjlo); void JumpJlo(JLO *pjlo); void HandleJloMessage(JLO *pjlo, MSGID msgid, void *pv); void SetJloJlos(JLO *pjlo, JLOS jlos); void ActivateJlo(JLO *pjlo); void DeactivateJlo(JLO *pjlo); void InitJloc(JLOC *pjloc); void LoadJlocFromBrx(JLOC *pjloc, CBinaryInputStream *pbis); void PostJlocLoad(JLOC *pjloc); XFM *PxfmChooseJloc(JLOC *pjloc); void InitJlovol(JLOVOL *pjlovol); void BindJlovol(JLOVOL *pjlovol); void HandleJlovolMessage(JLOVOL *pjlovol, MSGID msgid, void *pv); #endif // JLO_H ================================================ FILE: include/joy.h ================================================ /** * @file joy.h * * @brief Joypad manager. */ #ifndef JOY_H #define JOY_H #include "common.h" #include #include #define JOY_BUTTON_PRESSED(pjoy, pad_button) (pjoy->grfbtnPressed & (pad_button) != _NOT_PRESSED) // MARK:Pad enum PAD { _NOT_PRESSED = 0x0, PAD_L2 = 0x1, PAD_R2 = 0x2, PAD_L1 = 0x4, PAD_R1 = 0x8, PAD_TRIANGLE = 0x10, PAD_CIRCLE = 0x20, PAD_CROSS = 0x40, PAD_SQUARE = 0x80, PAD_SELECT = 0x100, PAD_L3 = 0x200, PAD_R3 = 0x400, PAD_START = 0x800, PAD_UP_ARROW = 0x1000, PAD_RIGHT_ARROW = 0x2000, PAD_DOWN_ARROW = 0x4000, PAD_LEFT_ARROW = 0x8000 }; enum BTNP { BTNP_Nil = -1, BTNP_PadRight = 0, BTNP_PadLeft = 1, BTNP_PadUp = 2, BTNP_PadDown = 3, BTNP_Triangle = 4, BTNP_Circle = 5, BTNP_X = 6, BTNP_Square = 7, BTNP_L1 = 8, BTNP_R1 = 9, BTNP_L2 = 10, BTNP_R2 = 11, BTNP_Max = 12 }; // MARK:Joy /** * @brief Joypad button integer type. */ typedef ushort GRFBTN; /** * @brief Joypad state. */ enum JOYS { JOYS_Initing = 0, JOYS_Searching = 1, JOYS_Waiting = 2, JOYS_Ready = 3, JOYS_Max = 4 }; /** * @brief Joypad kind. */ enum JOYK { JOYK_Unknown = 0, JOYK_Digital = 1, JOYK_Analog = 2, JOYK_Shock = 3, JOYK_Shock2 = 4, JOYK_Max = 5 }; /** * @brief Joypad id. */ enum JOYID { JOYID_Nil = -1, JOYID_Left = 0, JOYID_Right = 1, JOYID_Max = 2 }; /** * @brief Joypad. */ struct JOY { undefined4 *pvtjoy; // joypad info int nPort; int nSlot; uint *aullDma; // todo: fix type int term; JOYS joys; JOYK joyk; float tJoys; float tRead; float tActive; int dxLatch; int dyLatch; float tLatchX; float dtLatchX; float tLatchY; float dtLatchY; // left analog stick float x, y; /* 0x48 */ float uDeflect; byte bX, bY; ushort unk_short; int fStickMoved; LM almDeflect[4]; // right analog stick float x2, y2; /* 0x7c */ float uDeflect2; byte bX2, bY2; ushort unk_short2; int fStickMoved2; LM almDeflect2[4]; // face buttons GRFBTN grfbtn; GRFBTN grfbtnPressed; GRFBTN grfbtnReleased; byte mpbtnpb[12]; // rumble short unk_short_3; RUMBLE *prumble; int fRumbleEnabled; }; extern JOY g_joy; // MARK:User /** * @brief User flags integer type. */ typedef int GRFUSR; extern GRFUSR g_grfusr; extern int g_grfjoyt; /** * @brief User Flags. */ enum FUSR { FUSR_Menu = 0x1, FUSR_HandsOff = 0x2, FUSR_NoPause = 0x4 }; // MARK:Cheats struct CODE { ushort *ajbc; // Pointer to code sequence int cjbc; // Code sequence length void (*pfn)(int); // Callback function pointer int nParam; // Param for callback function int nInputCounter; // Counter for correct inputs int index; // Index of cheat code in linked list CODE *pchtNext; // Pointer to next cheat code }; extern CODE *g_pcode; extern float g_tCodeCheck; /** * @brief Cheat flags. */ enum FCHT { FCHT_None = 0x0, FCHT_Invulnerability = 0x1, FCHT_InfiniteCharms = 0x2, FCHT_LowGravity = 0x4, FCHT_LowFriction = 0x8, FCHT_ResetWorld = 0x4000 }; /** * @brief Cheat flags integer type. */ typedef int GRFCHT; extern GRFCHT g_grfcht; /** * @brief Cheat type. * * @note Usage unknown. */ enum CHT { CHT_Nil = 0x0, CHT_Charms = 0x1, CHT_Max = 0x2 }; void StartupJoy(); void AddGrfusr(GRFUSR grfusr); void RemoveGrfusr(GRFUSR grfusr); void UpdateGrfjoytFromGrfusr(); void InitJoy(JOY *pjoy, int nPort, int nSlot); void UpdateJoy(JOY *pjoy); void SetJoyJoys(JOY *pjoy, JOYS joys, JOYK joyk); void GetJoyXYDeflection(JOY *pjoy, uchar bX, uchar bY, float *px, float *py, float *puDeflect, uchar *pbX, uchar *pbY, int *pfStickMoved, LM *almDeflect); int FReadJoy(JOY *pjoy); void SetJoyBtnHandled(JOY *joy, ushort btn); void TriggerJoyRumbleRumk(RUMBLE *prumble, JOY *pjoy, float dt); void StartJoySelection(JOY *pjoy); int DxSelectionJoy(JOY *pjoy); int DySelectionJoy(JOY *pjoy); float UBtnpJoy(JOY *pjoy, BTNP btnp); void AddCode(CODE *pcode); void _ResetCodes(); void _MatchCodes(JOY *pjoy, short grfbtnPrev); void UpdateCodes(); void ClearFchts(); void AddFcht(uint nParam); void Chetkido(); void StartupCodes(); #endif // JOY_H ================================================ FILE: include/jsg.h ================================================ /** * @brief jsg.h */ #ifndef JSG_H #define JSG_H #include "common.h" #include #include #include #include #include #include /** * @brief (?) kind. */ enum FTAK { FTAK_Nil = -1, FTAK_None = 0, FTAK_Reach = 1, FTAK_Sweep = 2, FTAK_Whack = 2, FTAK_Smash = 4, FTAK_Rush = 8, FTAK_Bomb = 16, FTAK_Gun = 16, FTAK_Max = 17, FTAK_Shock = 32 }; /** * @brief Script element(?) kind. */ enum JSGEK { JSGEK_Nil = -1, JSGEK_Context = 0, JSGEK_Cut = 1, JSGEK_Label = 2, JSGEK_Tunnel = 3, JSGEK_Pause = 4, JSGEK_Jump = 5, JSGEK_Run = 6, JSGEK_Climb = 7, JSGEK_Attack = 8, JSGEK_Aseg = 9, JSGEK_Focus = 10, JSGEK_Clock = 11, JSGEK_Unknown = 12, JSGEK_Max = 13 }; /** * @brief Script jump(?) kind. */ enum JSGJK { JSGJK_Nil = -1, JSGJK_Fall = 0, JSGJK_Jump = 1, JSGJK_DoubleJump = 2, JSGJK_Max = 3 }; /** * @brief Script leap(?) kind. */ enum JSGLK { JSGLK_Nil = -1, JSGLK_Normal = 0, JSGLK_Big = 1, JSGLK_Max = 2 }; /** * @brief Script element(?). */ struct JSGE { JSGEK jsgek; OID oid; int fAsync; union { struct { OID oid; } label; struct { float dtPause; } pause; struct { JSGJK jsgjk; JSGLK jsglk; } jump; struct { float uRun; } run; struct { float uClimb; } climb; struct { FTAK ftak; } attack; struct { float rdt; } clock; }; }; /** * @class SCRIPT * @brief Object representing a script of some kind. */ struct JSG : public LO { int cjsge; JSGE *ajsge; JT *pjt; int ijsgeCur; float tCur; JSGE *pjsgeJoy; LO *ploContext; ASEGA *pasegaCur; LO *ploFocus; TN *ptnCur; int fHideTn; undefined4 unk1; undefined4 unk2; undefined4 unk3; }; /** * @brief Initializes the given script. */ void InitJsg(JSG *pjsg); void GetJsgLocation(JSG *pjsg, LO *plo, VECTOR *ppos, float *prad); void SetJsgFocus(JSG *pjsg, LO *plo); void SetJsgTn(JSG *pjsg, TN *ptn); void NextJsgJsge(JSG *pjsg); int FIsJsgJsgeComplete(JSG *pjsg, JSGE *pjsge); void UpdateJsgJsge(JSG *pjsg); void ReadJsgJoystick(JSG *pjsg, JOY *pjoy); /** * @brief Updates the script and returns true if there are still script elements to execute. * * @return 1 if count of script elements > 0, and current script element index < count of script elements. * @return 0 otherwise. */ int FIsJsgActive(JSG *pjsg); /** * @brief Retracts the script and clears the count of script elements. */ void ClearJsg(JSG *pjsg); void ApplyJsg(JSG *pjsg, JT *pjt); void RetractJsg(JSG *pjsg); JSGE *PjsgeAllocJsg(JSG *pjsg, JSGEK jsgek, OID oid, int fAsync); /** * @brief Apply the script to a JT context and mark it active. * * @param pjsg Script instance. * @param pjt JT context to attach the script to. */ void ApplyJsg(JSG *pjsg, JT *pjt); /** * @brief Retract the script from its JT context and stop it. * * @param pjsg Script instance. */ void RetractJsg(JSG *pjsg); /** * @brief Allocate and initialize a new script element (JSGE). * * @param pjsg Script instance. * @param jsgek Type of script element to allocate. * @param oid Object id associated with the element. * @param fAsync Whether the element is asynchronous. * * @returns Returns a pointer to an initialized JSGE within the script's array, or * a pointer to a static fallback if the script is full. */ JSGE *PjsgeAllocJsg(JSG *pjsg, JSGEK jsgek, OID oid, int fAsync); /** * @brief Add a context element to the script sequence. * * @param pjsg Script instance. * @param oid Object to use as context. */ void AddJsgContext(JSG *pjsg, OID oid); /** * @brief Add a cut element to the script sequence. * * @param pjsg Script instance. * @param oid Object marking the cut. */ void AddJsgCut(JSG *pjsg, OID oid); /** * @brief Add a focus element to the script sequence. * * @param pjsg Script instance. * @param oid Object to focus on. */ void AddJsgFocus(JSG *pjsg, OID oid); /** * @brief Add a label element to the script sequence. * * @param pjsg Script instance. * @param oid Label object ID. */ void AddJsgLabel(JSG *pjsg, OID oid); /** * @brief Add a tunnel element to the script sequence. * * @param pjsg Script instance. * @param oid Tunnel node to use. */ void AddJsgTunnel(JSG *pjsg, OID oid); /** * @brief Add a pause element to the script sequence. * * @param pjsg Script instance. * @param oid Object ID for pause context. * @param dtPause Duration to pause. */ void AddJsgPause(JSG *pjsg, OID oid, float dtPause); /** * @brief Add an animation segment (ASEGA) element. * * @param pjsg Script instance. * @param oid Animation sequence ID. * @param fAsync Whether the segment runs asynchronously. */ void AddJsgAseg(JSG *pjsg, OID oid, int fAsync); /** * @brief Add a jump action to the script sequence. * * @param pjsg Script instance. * @param oid Object ID to perform jump. * @param jsgjk Jump kind. * @param jsglk Leap size kind. * @param fAsync Whether the action is asynchronous. */ void AddJsgJump(JSG *pjsg, OID oid, JSGJK jsgjk, JSGLK jsglk, int fAsync); /** * @brief Add a run action to the script sequence. * * @param pjsg Script instance. * @param oid Object ID to run. * @param uRun Speed of run. * @param fAsync Whether the action is asynchronous. */ void AddJsgRun(JSG *pjsg, OID oid, float uRun, int fAsync); /** * @brief Add a climb action to the script sequence. * * @param pjsg Script instance. * @param oid Object ID to climb. * @param uClimb Climb speed. * @param fAsync Whether the action is asynchronous. */ void AddJsgClimb(JSG *pjsg, OID oid, float uClimb, int fAsync); /** * @brief Add an attack action to the script sequence. * * @param pjsg Script instance. * @param oid Object ID to attack with. * @param ftak Attack kind. * @param fAsync Whether the attack is asynchronous. */ void AddJsgAttack(JSG *pjsg, OID oid, FTAK ftak, int fAsync); /** * @brief Add a clock rate change to the script sequence. * * @param pjsg Script instance. * @param rdt Rate delta time factor. */ void AddJsgClock(JSG *pjsg, float rdt); #endif // JSG_H ================================================ FILE: include/jt.h ================================================ /** * @file jt.h * * @brief Sly entity. */ #ifndef JT_H #define JT_H #include "common.h" #include /** * JT state. * * @note Based on May proto, may be inaccurate. */ enum JTS { JTS_Nil = -1, JTS_Stand = 0, JTS_Run = 1, JTS_Jump = 2, JTS_Zap = 3, JTS_Sidestep = 4, JTS_Hide = 5, JTS_Pipe = 6, JTS_Edge = 7, JTS_Celebrate = 8, JTS_Rush = 9, JTS_Puppet = 10, JTS_Peek = 11, JTS_Ball = 12, JTS_Max = 13 }; /** * JT body state. * * @note Based on May proto, may be inaccurate. */ enum JTBS { JTBS_Nil = -1, JTBS_Jump_Init = 0, JTBS_Jump_Rise = 1, JTBS_Jump_Fall = 2, JTBS_Jump_Boost = 3, JTBS_Jump_In = 4, JTBS_Jump_Out = 5, JTBS_Jump_Thrown = 6, JTBS_Jump_Smash = 7, JTBS_Jump_Dive = 8, JTBS_Jump_Target = 9, JTBS_Jump_Spire = 10, JTBS_Jump_Rail = 11, JTBS_Jump_Hshape = 12, JTBS_Jump_Hpnt = 13, JTBS_Hide_Stand = 14, JTBS_Hide_Sidestep = 15, JTBS_Hide_PeekLeft = 16, JTBS_Hide_PeekRight = 17, JTBS_Hide_Run = 18, JTBS_Hide_Spin = 19, JTBS_Pipe_Init = 20, JTBS_Pipe_Stay = 21, JTBS_Pipe_Up = 22, JTBS_Pipe_Down = 23, JTBS_Pipe_Spin = 24, JTBS_Celebrate_Key = 25, JTBS_Celebrate_Timed = 26, JTBS_Celebrate_UseKey = 27, JTBS_Rush_Attack = 28, JTBS_Rush_Bounce = 29, JTBS_Peek_Enter = 30, JTBS_Peek_Peek = 31, JTBS_Peek_Exit = 32, JTBS_Zap_Blunt = 33, JTBS_Zap_Electric = 34, JTBS_Zap_Fire = 35, JTBS_Zap_Water = 36, // ... JTBS_Unk_54 = 54, JTBS_Unk_55 = 55 }; /** * @brief JT Health State. */ enum JTHS { JTHS_Nil = -1, JTHS_Normal = 0, JTHS_Damaged = 1, JTHS_Dead = 2, JTHS_Max = 3 }; /** * @brief JT cane state. * * @note Copied from May proto, may be outdated/out of order. */ enum JTCS { // ... }; /** * @brief JT hide kind? */ enum JTHK { JTHK_Nil = -1, JTHK_Flatten = 0, JTHK_Duck = 1, JTHK_Basket = 2, JTHK_Nonchalant = 3, JTHK_Rail = 4, JTHK_Spire = 5, JTHK_Reach = 6, JTHK_Vault = 7, JTHK_Max = 8 }; /** * @brief JT pipe direction kind. */ enum JTPDK { JTPDK_Nil = -1, JTPDK_Up = 0, JTPDK_Down = 1, JTPDK_Max = 2 }; /** * @class JT * @brief Jewel thief (AKA Sly Cooper). * * JT = "jewel thief" = codename for Sly. */ struct JT : public STEP { STRUCT_PADDING(1090); undefined2 padding0_extra; ALO *paloMine_0x1518; // 0x1518 STRUCT_PADDING(832); undefined2 padding1_extra; JTS jts; // 0x2220 int unk_0x2224; JTBS jtbs; // 0x2228 STRUCT_PADDING(328); undefined1 padding2_extra; int unk_0x2750; }; /** * @brief Sets the JT state and JT body state on the given JT. * * @param pjt Pointer to the JT instance. * @param jts JT state value * @param JTBS JT body state value */ void SetJtJts(JT *pjt, JTS jts, JTBS jtbs); /** * @brief Stubbed, does nothing. * * @param pjt Pointer to JT instance. * @param fProfile Profile flag. * * @deprecated */ void ProfileJt(JT *pjt, int fProfile); extern JT *g_pjt; #endif // JT_H ================================================ FILE: include/jump.h ================================================ /** * @file jump.h */ #ifndef JUMP_H #define JUMP_H #include "common.h" #include #include #include #include #include #include #include // Forward. struct XP; /** * @class JUMP_TARGET * @brief Target point for a jump. * @todo Implement the struct. */ struct JMT : public PNT { undefined4 unk1; DLE dleJmt; float sRadius; /* 0x5c */ OID oidSetIgnoreJt; /* 0x60 */ SO *psoSetIgnoreJt; // ... }; void PresetJtAccelJump(JT *pjt); void UpdateJtActiveJump(JT *pjt, JOY *pjoy); int FCheckJtSingleEdge(JT *pjt, SO *psoOther, EDGE *pedge, VECTOR *pnormal); int FCheckJtEdgeNormal(JT *pjt, VECTOR *pposEdge, VECTOR *pnormal); int FCheckJtEdgeGrab(JT *pjt, SO *psoOther, VECTOR *pposEdge, XPK xpk, void *pv, VECTOR *pnormal); XP *PxpFindJtBestEdge(JT *pjt, int *pixpdBest, VECTOR *pnormalBest); JTS JtsResetJt(JT *pjt); void HandleJtDiveEffect(JT *pjt); void UpdateJtJump(JT *pjt); int FTimeJtJumpToTarget(JT *pjt, VECTOR *pposJt, VECTOR *pvJt, VECTOR *pposTarget, VECTOR *pvTarget, float *pdtProject); void GetJtJumpVelocity(JT *pjt, VECTOR *pv); void GetJtJumpToTargetVelocity(JT *pjt, VECTOR *pv); void GetJtJumpBoostVelocity(JT *pjt, VECTOR *pv); void StartupJmt(); void ResetJmtList(); void OnJmtAdd(JMT *pjmt); void OnJmtRemove(JMT *pjmt); void CloneJmt(JMT *pjmt, JMT *pjmtBase); void PostJmtLoad(JMT *pjmt); #endif // JUMP_H ================================================ FILE: include/keyhole.h ================================================ /** * @file keyhole.h */ #ifndef KEYHOLE_H #define KEYHOLE_H #include "common.h" #include #include /** * @class KEYHOLE * @brief Spot where keys are inserted into locks? * @todo Implement the struct. */ struct KEYHOLE : public LO { // ... }; void InitKeyhole(KEYHOLE *pkeyhole); void LoadKeyholeFromBrx(KEYHOLE *pkeyhole, CBinaryInputStream *pbis); void DrawKeyholeMask(KEYHOLE *pkeyhole, float x, float y, float rScale, float uAlpha); void DrawKeyhole(KEYHOLE *pkeyhole, float uClosed); #endif // KEYHOLE_H ================================================ FILE: include/labels.inc ================================================ # This file is used by the original compiler/assembler. # Defines the expected assembly macros. # A function symbol. .macro glabel label, visibility=global .\visibility \label .type \label, @function \label: .ent \label .endm # The end of a function symbol. .macro endlabel label .size \label, . - \label .end \label .endm # An alternative entry to a function. .macro alabel label, visibility=global .\visibility \label .type \label, @function \label: .endm # A label referenced by an error handler table. .macro ehlabel label, visibility=global .\visibility \label \label: .endm # A label referenced by a jumptable. .macro jlabel label, visibility=global .\visibility \label \label: .endm # A data symbol. .macro dlabel label, visibility=global .\visibility \label .type \label, @object \label: .endm # End of a data symbol. .macro enddlabel label .size \label, . - \label .endm # Label to signal the symbol haven't been matched yet. .macro nonmatching label, size=1 .global \label\().NON_MATCHING .type \label\().NON_MATCHING, @object .size \label\().NON_MATCHING, \size \label\().NON_MATCHING: .endm ================================================ FILE: include/landing.h ================================================ /** * @file landing.h */ #ifndef LANDING_H #define LANDING_H #include "common.h" #include #include /** * @class LANDING * @brief Unknown. */ struct LANDING : public SHAPE { /* 0x38 */ DLE dleLanding; }; void OnLandingAdd(LANDING *planding); void OnLandingRemove(LANDING *planding); void CloneLanding(LANDING *planding, LANDING *plandingBase); #endif // LANDING_H ================================================ FILE: include/lgn.h ================================================ /** * @file lgn.h */ #ifndef LGN_H #define LGN_H #include "common.h" #include #include #include #include #include #include #include #include // Forward. struct RO; struct CPDEFI; /** * @class SWOOPER. * @brief Unknown. */ struct SWP : public BRK { // ... }; /** * @brief Light gun state. */ enum LGNS { LGNS_Nil = -1, LGNS_Passive = 0, LGNS_Active = 1, LGNS_Zap = 2, LGNS_Dead = 3, LGNS_Max = 4 }; /** * @class LIGHT_GUN * @brief Light gun weapon (maybe the one used by Carmelita). * * @note Inherits from PO in the prototype but not in retail. * Judging on the function calls it might inherit from SUV? */ struct LGN { // ... /* 0xbf0 */ int fFlash; /* 0xbf4 */ float tFlash; // ... }; /** * @brief Light gun something (?). */ struct LGNR : public BLOT { // ... }; void InitLgn(LGN *plgn); void PostLgnLoad(LGN *plgn); void UpdateLgnActive(LGN *plgn, JOY *pjoy, float dt); void UpdateLgn(LGN *plgn, float dt); void OnLgnActive(LGN *plgn, int fActive, PO *ppoOther); void RenderLgnAll(LGN *plgn, CM *pcm, RO *pro); void GetLgnCpdefi(LGN *plgn, float dt, CPDEFI *pcpdefi); int FInvulnerableLgn(LGN *plgn, ZPK zpk); JTHS JthsCurrentLgn(LGN *plgn); void UseLgnCharm(LGN *plgn); void ApplyLgnThrow(LGN *plgn, PO *ppo); int FTakeLgnDamage(LGN *plgn, ZPR *pzpr); void HandleLgnMessage(LGN *plgn, MSGID msgid, void *pv); void SetLgnLgns(LGN *plgn, LGNS lgns); void UpdateLgnrAim(LGNR *plgnr, JOY *pjoy); void DrawLgnr(LGNR *plgnr); void InitSwp(SWP *pswp); void PostSwpLoad(SWP *pswp); void UpdateSwp(SWP *pswp, float dt); void ProjectSwpTransform(SWP *pswp, float dt, int fParentDirty); void SetSwpShape(SWP *pswp, SHAPE *pshape, float tMax); #endif // LGN_H ================================================ FILE: include/lib/libkernl/filestub.h ================================================ /** * @file include/lib/libkernl/filestub.h * @note src/lib/libkernl/filestub.c */ #ifndef FILESTUB_H #define FILESTUB_H extern "C" { int sceFsReset(); int sceClose(int fd); int sceRead(int fd, void *pv, int cb); int sceIoctl(int, int, void *); }; #endif // FILESTUB_H ================================================ FILE: include/light.h ================================================ /** * @file light.h * * @brief Light and shadow system. */ #ifndef LIGHT_H #define LIGHT_H #include "common.h" #include #include // Forward. struct SW; /** * @brief Unknown. */ enum TWPS { TWPS_Shadow = 0, TWPS_ShadowMidtone = 1, TWPS_ShadowMidtoneSaturate = 2 }; /** * @brief Light kind. */ enum LIGHTK { LIGHTK_Nil = -1, LIGHTK_Direction = 0, LIGHTK_Position = 1, LIGHTK_Frustrum = 2, LIGHTK_Spot = 3, LIGHTK_Max = 4 }; /** * @brief Light shadow & midtone. */ struct LSM { float uShadow; /* 0x04 */ float uMidtone; }; /** * @brief Light. * @todo Implement the struct. */ struct LIGHT : public ALO { // ... /* 0x2e0 */ VECTOR vecHighlight; /* 0x2f0 */ float gMidtone; /* 0x2f4 */ float gShadow; /* 0x2f8 */ float degHighlight; /* 0x2fc */ float degMidtone; /* 0x300 */ float degShadow; /* 0x304 */ int fDynamic; STRUCT_PADDING(13); /* 0x338 */ float degCone; /* 0x33c */ float degHotSpot; // ... }; extern int g_cframeStaticLightsInvalid; /** * @brief Initializes a light. * * @param plight Pointer to a light. */ void InitLight(LIGHT *plight); /** * @brief TODO. */ void UpdateLightXfWorldHierarchy(LIGHT *plight); /** * @brief Removes a light from the SW. * * @param plight Pointer to a light. */ void RemoveLightFromSw(LIGHT *plight); /** * @brief Adds a light to the SW. * * @param plight Pointer to a light. */ void AddLightToSw(LIGHT *plight); /** * @brief Adds a light. * * @param plight Pointer to a light. */ void OnLightAdd(LIGHT *plight); /** * @brief Removes a light. * * @param plight Pointer to a light. */ void OnLightRemove(LIGHT *plight); /** * @brief Clones a light. * * @param plight Pointer to a light. * @param plight Pointer to the light to clone. */ void CloneLight(LIGHT *plight, LIGHT *plightBase); void FitLinearFunction(float x0, float y0, float x1, float y1, float *pdu, float *pru); void FitRecipFunction(float x0, float y0, float x1, float y1, float *pdu, float *pru); void ConvertFallOff(LM *plm, float *pdu, float *pru); void ConvertAngleStrength(float deg0, float g0, float deg1, float g1, float *pdu, float *pru); void InvalidateLight(LIGHT *plight); void RebuildLightVifs(LIGHT *plight); void SetLightKind(LIGHT *plight, LIGHTK lightk); void SetLightHighlightColor(LIGHT *plight, VECTOR *pvecHighlight); void SetLightMidtoneStrength(LIGHT *plight, float gMidtone); void SetLightShadowStrength(LIGHT *plight, float gShadow); void SetLightHighlightAngle(LIGHT *plight, float degHighlight); void SetLightMidtoneAngle(LIGHT *plight, float degMidtone); void SetLightShadowAngle(LIGHT *plight, float degShadow); void SetLightDirection(LIGHT *plight, VECTOR *pvecDirection); void SetLightDynamic(LIGHT *plight, int fDynamic); void SetLightFallOff(LIGHT *plight, LM *plm); void SetLightConeAngle(LIGHT *plight, float degCone); void SetLightHotSpotAngle(LIGHT *plight, float degHotSpot); void SetLightFrustrumUp(LIGHT *plight, VECTOR *pvecUpLocal); void RebuildLightFrustrum(LIGHT *plight); void UpdateLightBeamGrfzon(LIGHT *plight); void SetLightDiffuse_Old(LIGHT *plight, float gDiffuse); void GetLightDiffuse_Old(LIGHT *plight, float *pgDiffuse); void SetLightSaturate_Old(LIGHT *plight, VECTOR *pvecSaturate); void GetLightSaturate_Old(LIGHT *plight, VECTOR *pvecSaturate); int NCmpFindLight(LIGHT **pplight1, LIGHT **pplight2); void PrepareSwLightsForDraw(SW *psw); TWPS TwpsFindSwLights(SW *psw, VECTOR *ppos, float sRadius, int grffindlight, int cplightMax, int *pcplightStatic, int *pcplightAll, LIGHT **aplight); #endif // LIGHT_H ================================================ FILE: include/lo.h ================================================ /** * @file lo.h * * @brief Level objects. */ #ifndef LO_H #define LO_H #include "common.h" #include #include #include #include #include struct ALO; // Forward declaration. struct SW; struct PXR; struct LM; struct CLQ; struct VECTOR; /** * @brief Unknown. * @todo Does this belong here? */ enum OPTID { OPTID_Nil = -1 }; /** * @class LO * @brief Unknown, maybe "level object". * * @note The fields "pchzName" and "dtickPerf" present in the prototype are not in release. */ struct LO : public BASIC { /* 0x08 */ OID oid; /* 0x10 */ DLE dleOid; /* 0x14 */ SW *psw; /* 0x18 */ ALO *paloParent; /* 0x1c */ DLE dleChild; /* 0x24 */ LO *ploCidNext; /* 0x28 */ MQ *pmqFirst; /* 0x2c */ CFrame *pframe; /* 0x30 */ PXR *ppxr; }; /** * @brief "Proxy Root"? */ struct PXR { LO *plo; OID oidProxyRoot; DLE dleProxyRoot; char *pchzProxyRoot; }; /** * @brief Initialize LO with defaults set */ void InitLo(LO *plo); /** * @brief Calls HandleLoSpliceEvent with unknown event * Called by LO subclasses? */ void PostLoLoad(LO *plo); /** * @brief Adds LO to 'dlChild' of either parent ALO, if present, or SW * If LO is in world, also calls AddLoHierarchy */ void AddLo(LO *plo); /** * @brief Calls OnLoAdd, and SendLoMessage with MSGID_added */ void AddLoHierarchy(LO *plo); /** * @brief Does nothing */ void OnLoAdd(LO *plo); /** * @brief Removes LO from 'dlChild' of either parent ALO, if present, or SW * If LO is in world, also calls RemoveLoHierarchy */ void RemoveLo(LO *plo); /** * @todo */ void DeferLoRemove(LO *plo); /** * @brief If global 'uSuck' is within given range, calls DeferLoRemove with this LO */ void SetLoSuckHideLimits(LO *plo, LM *plmUSuck); /** * @brief Calls OnLoRemove, and SendLoMessage with MSGID_removed */ void RemoveLoHierarchy(LO *plo); /** * @brief Does nothing */ void OnLoRemove(LO *plo); /** * @brief If LO is in world, remove it */ void SnipLo(LO *plo); /** * @brief Check ALO is parent/grandparent/etc of LO */ int FFindLoParent(LO *plo, ALO *paloParent); /** * @brief Removes LO, sets ALO as parent, then re-adds LO */ void SetLoParent(LO *plo, ALO *paloParent); /** * @brief Checks if the LO is currently in the world. */ int FIsLoInWorld(LO *PLO); /** * @brief Check if LO is in world and updates provided flag with result */ void GetLoInWorld(LO *plo, int *pfInWorld); /** * @brief Creates new LO, clones provided LO, returns new LO */ LO* PloCloneLo(LO *plo, SW *psw, ALO *paloParent); /** * @brief Clones from 'base' LO into provided LO */ void CloneLoHierarchy(LO *plo, LO *ploBase); /** * @brief Clones from 'base' LO into provided LO */ void CloneLo(LO *plo, LO *ploBase); /** * @todo */ void SubscribeSwPpmqStruct(SW *psw, MQ **ppmqFirst, PFNMQ pfnmq, void *pvContext); void UnsubscribeSwPpmqStruct(SW *psw, MQ **ppmqFirst, PFNMQ pfnmq, void *pvContext); void SubscribeLoStruct(LO *plo, PFNMQ pfnmq, void *pvContext); void UnsubscribeLoStruct(LO *plo, PFNMQ pfnmq, void *pvContext); void SubscribeLoObject(LO *plo, LO *ploTarget); void UnsubscribeLoObject(LO *plo, LO *ploTarget); /** * @brief Calls HandleLoMessage, then each MQ function with provided MSGID and data pointer */ void SendLoMessage(LO *plo, MSGID msgid, void *pv); /** * @brief Loads options from Brx */ void LoadLoFromBrx(LO *plo, CBinaryInputStream *pbis); /** * @brief Checks if LO OID, or LO's PXR OID, match provided OID */ int FMatchesLoName(LO *plo, OID oid); /** * @brief Return OID of LO's PXR, or Nil */ OID GetProxyLo(LO *plo); /** * @brief Return OID of LO's PXR, or LO's own OID */ OID OidProxyLoPreferred(LO *plo); /** * @brief Updates provided OID pointer with LO's PXR OID */ void GetLoOidProxy(LO *plo, OID *poid); /** * @todo Args for following functions based on proto */ void PostSpliceEventCallback(LO *plo, uint symidEvent, void *pvarg); int FFilterSpliceEvent(LO *plo, /* SYMEVID */ int symevid, int cargs, void **ppvargs); void HandleLoSpliceEvent(LO *plo, uint symidEvent, int cargs, void **ppvargs); void EnsureLoSidebagBool(LO *plo, OPTID optid, int f); void EnsureLoSidebagInt(LO *plo, OPTID optid, int n); void EnsureLoSidebagFoat(LO *plo, OPTID optid, float g); void EnsureLoSidebagClq(LO *plo, OPTID optid, CLQ *pclq); void EnsureLoSidebagLm(LO *plo, OPTID optid, LM *plm); void EnsureLoSidebagOid(LO *plo, OPTID optid, OID oid); void EnsureLoSidebagVector(LO *plo, OPTID optid, VECTOR *pvec); #endif // LO_H ================================================ FILE: include/lookat.h ================================================ /** * @file lookat.h */ #ifndef LOOKAT_H #define LOOKAT_H #include "common.h" #include #include #include #include /** * @brief Actor Look At (?) */ struct ACTLA { int fUseTarget; ALO *paloTarget; VECTOR posTargetLocal; float sIgnore; int nPriorityEnabled; int nPriorityDisabled; int fPaused; CLQ clqPanToPan; LM lmPan; CLQ clqTiltToTilt; LM lmTilt; }; void InitActla(ACTLA *pactla, ALO *palo); void SetActlaTarget(ACTLA *pactla, ALO *paloTarget, VECTOR *pposLocal); ALO *PaloGetActlaTarget(ACTLA *pactla); void UpdateActla(ACTLA *pactla, float dt); void GetActlaRotationGoal(ACTLA *pactla, float dtOffset, MATRIX3 *pmat, VECTOR *pw); #endif // LOOKAT_H ================================================ FILE: include/macro.inc ================================================ # This file is used by modern gas. # Defines the expected assembly macros # Evaluate this file only once in case it's included more than once .ifndef _MACRO_INC_GUARD .internal _MACRO_INC_GUARD .set _MACRO_INC_GUARD, 1 # A function symbol. .macro glabel label, visibility=global .\visibility "\label" .type "\label", @function "\label": .ent "\label" .endm # The end of a function symbol. .macro endlabel label .size "\label", . - "\label" .end "\label" .endm # An alternative entry to a function. .macro alabel label, visibility=global .\visibility "\label" .type "\label", @function "\label": .endm # A label referenced by an error handler table. .macro ehlabel label, visibility=global .\visibility "\label" "\label": .endm # A label referenced by a jumptable. .macro jlabel label, visibility=global .\visibility "\label" "\label": .endm # A data symbol. .macro dlabel label, visibility=global .\visibility "\label" .type "\label", @object "\label": .endm # End of a data symbol. .macro enddlabel label .size "\label", . - "\label" .endm # Label to signal the symbol haven't been matched yet. .macro nonmatching label, size=1 .global "\label\().NON_MATCHING" .type "\label\().NON_MATCHING", @object .size "\label\().NON_MATCHING", \size "\label\().NON_MATCHING": .endm .endif ================================================ FILE: include/mark.h ================================================ /** * @file mark.h */ #ifndef MARK_H #define MARK_H #include "common.h" #include #include #include #include // Forward. struct SO; struct XP; // TODO: Figure out where this should be defined at. /** * @brief (?) kind. */ enum XPK { XPK_Nil = -1 }; /** * @brief Material kind? */ enum MTLK { MTLK_Nil = -1, MTLK_Default = 0, MTLK_Sand = 1, MTLK_Metal = 2, MTLK_Wood = 3, MTLK_Rock = 4, MTLK_Rubber = 5, MTLK_Ice = 6, MTLK_Tire = 7, MTLK_Velcro = 8, MTLK_NoBounce = 9, MTLK_NoFriction = 10, MTLK_NoFrictionElastic = 11, MTLK_Max = 12 }; /** * @brief Unknown. */ struct SBI { VECTOR pos; VECTOR normal; float gDist; XPK xpk; // ... }; float MuFromAmtlk(MTLK *amtlk); float ElasFromAmtlk(MTLK *amtlk); XP *PxpAdd(SO *pso0, SO *pso1, VECTOR *ppos, VECTOR *pnormal, float gDist, XPK xpk, void *pv0, void *pv1, XP **ppxpFirst); void RecalcSwXpPos(SW *psw, int cpxp, XP **apxp); void RecalcSwXpMovement(SW *psw, int cpxp, XP **apxp); void FreeSwXpList(SW *psw, XP *pxpFirst); void FindClosestPointOnLine(VECTOR *ppos, VECTOR *pposSeg0, VECTOR *pposSeg1, float *pu, float *ps); void FindClosestPointOnLineSegment(VECTOR *ppos, VECTOR *pposSeg0, VECTOR *pposSeg1, float *pu, float *ps); int ClsgClipSoAllEdges(SO *pso0, SO *pso1, BSP *pbsp, int clsgMax, LSG *alsg); int ClsgClipSoBspEdges(SO *pso0, SO *pso1, int cbspPruned, BSP *abspPruned, int clsgMax, LSG *alsg); void CategorizeAlsg(int clsg, LSG *alsg, int *pciposEmbed, int *aiposEmbed, LSG **aplsgEmbed, LSG **pplsgEdge); int CplsgFindEdgePath(SURF *asurf, int isurf, int isurfTarget, LSG *plsgEdge, LSG **aplsg); void MarkSoContactsBspBsp(SO *pso0, SO *pso1, int cbspPruned, BSP *abspPruned, BSP *pbspPruned, XP **ppxpFirst); int CsbiIntersectSphereBsp(VECTOR *pposCenter, float sRadius, int cbsp, BSP *absp, BSP *pbspPrune, GEOM *pgeom, int csbiMax, SBI *asbi); void MarkSoContactsSphereBsp(SO *pso0, VECTOR *pposCenter, float sRadius, SO *pso1, int cbsp, BSP *absp, BSP *pbspPrune, XP **ppxpFirst); void MarkSoContactsSphereSphere(SO *pso0, SO *pso1, XP **ppxpFirst); void CalculateCenterContact(SO *pso, VECTOR *pnormal, float gDot, VECTOR *ppos, float *ps); int FMarkSoContactsCenterBsp(SO *pso0, SO *pso1, int cbspPruned, BSP *abspPruned, BSP *pbspPruned, XP **ppxpFirst); int FClipEdgeToSphere(VECTOR *pposSphere, float sRadius, VECTOR *ppos0, VECTOR *ppos1, float *pu, VECTOR *ppos, VECTOR *pnormal, float *pgDot); int FMarkSoContactsCenterSphere(SO *pso0, SO *pso1, XP **ppxpFirst); void AddSoXps(SO *psoRoot, SO *psoOther, int fCenterXp, int cbspPruned, BSP *abspPruned, BSP *pbspPruned, XP **ppxpFirst); XP *PxpMarkSwContactsRoot(SW *psw, SO **apso, int fCenterXp); #endif // MARK_H ================================================ FILE: include/mat.h ================================================ /** * @file mat.h * * @brief 3x3 and 4x4 matrix types. */ #ifndef MAT_H #define MAT_H #include /** * @brief 4x4 Matrix */ struct MATRIX4 { float mat[4][4]; }; /** * @brief 3x3 Matrix */ struct MATRIX3 { float mat[3][3]; }; void PostCopyMatrix3(MATRIX4 *pmat); MATRIX3 *MatMulMatTransMat(MATRIX3 *matLeft, MATRIX3 *matRight); void LoadIdentityMatrix4(MATRIX4 *pmat); void MultiplyMatrix4Vector(MATRIX4 *pmat4, VECTOR *pvecIn, float gImplied, VECTOR *pvecOut); void TransposeMatrix4(MATRIX4 *pmatSrc, MATRIX4 *pmatDst); void AddMatrix4Matrix4(MATRIX4 *pmatLeft, MATRIX4 *pmatRight, MATRIX4 *pmatDst); void LoadRotateMatrixRad(float rad, VECTOR *pnormal, MATRIX3 *pmat); void LoadRotateMatrix(VECTOR *pvec, MATRIX3 *pmat); void LoadRotateMatrixEuler(VECTOR *peul, MATRIX3 *pmatRot); void LoadMatrixFromPosRot(VECTOR *ppos, MATRIX3 *pmat, MATRIX4 *pmatDst); void LoadMatrixFromPosRotInverse(VECTOR *pposSrc, MATRIX3 *pmatSrc, MATRIX4 *pmatDst); void LoadMatrixFromPosRotScale(VECTOR *pvecPos, MATRIX3 *pmatRot, VECTOR *pvecScale, MATRIX4 *pmat); float CosRotateMatrixMagnitude(MATRIX3 *pmat); void DecomposeRotateMatrixRad(MATRIX3 *pmat, float *prad, VECTOR *pnormal); void DecomposeRotateMatrixEuler(MATRIX3 *pmat, VECTOR *peul); void NormalizeRotateMatrix3(MATRIX3 *pmat); void CalculateDmat(MATRIX3 *pmat0, MATRIX3 *pmat1, MATRIX3 *pdmat); void CalculateDmat4(MATRIX4 *pmat0, MATRIX4 *pmat1, MATRIX4 *pdmat); void DecomposeRotateMatrixPanTilt(MATRIX3 *pmat, float *pradPan, float *pradTilt); void LoadRotateMatrixPanTilt(float radPan, float radTilt, MATRIX3 *pmat); void LoadLookAtMatrix(VECTOR *pdpos, MATRIX3 *pmat); void TiltMatUpright(MATRIX3 *pmat, MATRIX3 *pdmat, MATRIX3 *pmatUpright); bool FInvertMatrix(int c, float *aagSrc, float *aagDst); bool FInvertMatrix3(MATRIX3 *pmatSrc, MATRIX3 *pmatDst); bool FInvertMatrix4(MATRIX4 *pmatSrc, MATRIX4 *pmatDst); void BuildOrthonormalMatrixY(VECTOR *pvecX, VECTOR *pvecY, MATRIX3 *pmat); void BuildOrthonormalMatrixZ(VECTOR *pvecX, VECTOR *pvecZ, MATRIX3 *pmat); void BuildRotateVectorsMatrix(VECTOR *pvec1, VECTOR *pvec2, MATRIX3 *pmat); /** * @brief Creates a perspective projection matrix with optional center offsets. * * @param rx Horizontal field-of-view scale. * @param ry Vertical field-of-view scale. * @param dxOffset Horizontal offset of the projection center. * @param dyOffset Vertical offset of the projection center. * @param sFar Far plane distance. * @param sNear Near plane distance. * @param pmat Pointer to the output. */ void BuildSimpleProjectionMatrix(float rx, float ry, float dxOffset, float dyOffset, float sFar, float sNear, MATRIX4 *pmat); void LoadScaleMatrixScalar(VECTOR *ppos, float rScale, MATRIX4 *pmatScale); void LoadScaleMatrixVector(VECTOR *ppos, MATRIX3 *pmat, VECTOR *pvecScale, MATRIX4 *pmatScale); void LoadRotateVectorMatrix(VECTOR *pvecFrom, VECTOR *pvecTo, MATRIX3 *pmat); #endif // MAT_H ================================================ FILE: include/mb.h ================================================ /** * @file mb.h * * @brief Mesa boss. */ #ifndef MB_H #define MB_H #include /** * @class MS_BOSS_GUARD * @brief Mesa boss guard (Muggshot). */ struct MBG : public STEPGUARD { // ... }; #endif // MB_H ================================================ FILE: include/memcard.h ================================================ /** * @file memcard.h */ #ifndef MEMCARD_H #define MEMCARD_H #include "common.h" /** * @todo Incomplete. */ struct MEMCARD { /* 0x00 */ int semaphoreId; /* 0x04 */ int threadId; /* 0x08 */ int field_0x08; /* 0x0c */ int field_0x0c; /* 0x10 */ int field_0x10; }; /** * @note Judging from the memset in InitSave, * this struct could be over 20k bytes long. */ struct SAVE { int field_0x00; // ... }; /** * @brief Startup the memory card system. */ void StartupMemcard(); void UpdateSave(SAVE *psave); extern SAVE g_save; #endif // MEMCARD_H ================================================ FILE: include/memory.h ================================================ /** * @file memory.h */ #ifndef MEMORY_H #define MEMORY_H #include "common.h" typedef struct _reent; /** * @brief Starts up the memory manager system. */ void StartupMemMgr(); /** * @brief Allocates memory from the global heap. * * @param cb Size in bytes. * * @return Pointer to the allocated memory. */ void *PvAllocGlobalImpl(int cb); #ifdef PROTO /** * @brief Shows an error message on the screen. * @note Called if we have run out of memory on the stack. * * @param rgba Background color for the text box. */ void HardLockError(RGBA *rgba); #endif /** * @brief Stubbed, does nothing. * * @note Would have checked to see if we are out of stack memory. * * @deprecated */ void CheckForOutOfMemory(); /** * @brief Allocates memory for an SW. * * @param cb Size in bytes. * * @return Pointer to the allocated memory. */ void *PvAllocSwImpl(int cb); /** * @brief Clears the SW stack. */ void FreeSw(); /** * @brief Allocates memory for an SW and copies data to it. * * @param cb Size of the block in bytes. * @param pvBase Data to copy. * * @return Pointer to the allocated memory. */ void *PvAllocSwCopyImpl(int cb, void *pvBase); /** * @brief Allocates memory for an SW and clears it. * * @param cb Size in bytes. * * @return Pointer to the allocated memory. */ void *PvAllocSwClearImpl(int cb); /** * @brief Initializes a new allocation frame on the stack. */ void InitStackImpl(); /** * @brief Allocates memory on the stack. * * @param cb Size in bytes. * * @note Rounds up `cb` to next multiple of 16. */ void *PvAllocStackImpl(int cb); /** * @brief Allocates memory on the stack and clears it. * * @param cb Size in bytes. * * @note Rounds up `cb` to next multiple of 16. */ void *PvAllocStackClearImpl(int cb); /** * @brief Unravels the current stack allocation frame. */ void FreeStackImpl(); extern "C" { void *malloc(uint __size); void *_malloc_r(_reent *pre, uint __size); void free(void *pv); } /** * @brief Copies an array of quadwords (16-byte blocks). * * @param pvDst Destination pointer. * @param pvSrc Source pointer. * @param cqw Number of quadwords to copy (16 bytes each). * * @note Total bytes copied will be `cqw * 16`. */ void CopyAqw(void *pvDst, void *pvSrc, int cqw); /** * @brief Copies an array of bytes. * * @param pvDst Destination pointer. * @param pvSrc Source pointer. * @param cb Number of bytes to copy. */ void CopyAb(void *pvDst, void *pvSrc, uint cb); #endif // MEMORY_H ================================================ FILE: include/missile.h ================================================ /** * @file missile.h */ #ifndef MISSILE_H #define MISSILE_H #include "common.h" #include #include #include #include #include // Forward. struct RO; /** * @class MISSILE * @brief Missile (maybe the ones fired by smartguards?). * @todo Implement the struct. */ struct MISSILE : public BOMB { // ... /* 0x6b4 */ ASEGA *pasegaCur; /* 0x6b8 */ int fFollowTrajectory; // ... }; /** * @class ACCEL_MISSILE * @brief Accelerating missile. * @todo Implement the struct. */ struct ACCMISS : public MISSILE { // ... }; /** * @class TARGET_MISSILE * @brief Target missile. * @todo Implement the struct. */ struct TARMISS : public MISSILE { // ... }; /** * @class SPLINE_MISSILE * @brief Spline missile. * @todo Implement the struct. */ struct SPLMISS : public MISSILE { // ... }; /** * @class GROUND_MISSILE * @brief Ground missile. * @todo Implement the struct. */ struct GROUNDMISS : public MISSILE { // ... }; void InitMissile(MISSILE *pmissile); void LoadMissileFromBrx(MISSILE *pmissile, CBinaryInputStream *pbis); void OnMissileRemove(MISSILE *pmissile); void ProjectMissileTransform(MISSILE *pmissile, float dt, int fParentDirty); void FireMissile(MISSILE *pmissile, ALO *paloTarget, VECTOR *pposTargetLocal); void RenderMissileAll(MISSILE *pmissile, CM *pcm, RO *pro); void InitAccmiss(ACCMISS *paccmiss); void FireAccmiss(ACCMISS *paccmiss, ALO *paloTarget, VECTOR *pposTarget); void PresetAccmissAccel(ACCMISS *paccmiss, float dt); void FireSplmiss(SPLMISS *psplmiss, ALO *paloTarget, VECTOR *pposTargetLocal); void ProjectSplmissTransform(SPLMISS *psplmiss, float dt, int fParentDirty); #endif // MISSILE_H ================================================ FILE: include/mpeg.h ================================================ /** * @file mpeg.h * * @brief Mpeg video. */ #ifndef MPEG_H #define MPEG_H #include "common.h" #include #include class CMpeg { public: OID oid_1; OID oid_2; // todo void ExecuteOids(); void Execute(OID *poid); void Start(CBinaryAsyncStream *pbas); void Update(); void Finish(); }; void StartupMpeg(); extern CMpeg g_mpeg; #endif // MPEG_H ================================================ FILE: include/mq.h ================================================ /** * @file mq.h * * @brief Message queue. */ #ifndef MQ_H #define MQ_H #include "common.h" typedef int GRFCMQ; // TODO: Does this belong to mq.h? /** * @brief Message ID * * @note Based on values from May 19, may not be accurate to release. */ enum MSGID { MSGID_Nil = -1, MSGID_callback = 0, MSGID_added = 1, MSGID_removed = 2, MSGID_translated = 3, MSGID_rotated = 4, MSGID_asega_limit = 5, MSGID_asega_retracted = 6, MSGID_asega_wrapped = 7, MSGID_sfx_start = 8, MSGID_sfx_end = 9, MSGID_water_entered = 10, MSGID_water_left = 11, MSGID_button_trigger = 12, MSGID_button_untrigger = 13, MSGID_break_break = 14, MSGID_break_piece = 15, MSGID_rip_removed = 16, MSGID_color_change = 17, MSGID_user_message = 18, MSGID_label = 19, MSGID_sma_transition = 20, MSGID_waypoint = 21, MSGID_waypoint_transition = 22, MSGID_damaged = 23, MSGID_param_read = 24, MSGID_param_write = 25, MSGID_Max = 26 }; typedef void (*PFNMQ)(void *, MSGID, void *); /** * @brief Message queue(?) */ struct MQ { /* 0x00 */ PFNMQ pfnmq; /* 0x04 */ void *pvContext; /* 0x08 */ MSGID msgid; /* 0x0c */ void *pvCallbackData; /* 0x10 */ MQ *pmqNext; }; #endif // MQ_H ================================================ FILE: include/mrkv.h ================================================ /** * @file mrkv.h */ #ifndef MRKV_H #define MRKV_H #include "common.h" #include /** * @brief Unknown. * @todo Implement the struct. */ struct MRKV : public SO { // ... }; void InitMrkv(MRKV *pmrkv); #endif // MRKV_H ================================================ FILE: include/ms.h ================================================ /** * @file Unknown. */ #include "common.h" #include struct RO; // todo define this struct somewhere /** * @class MERGED_STATICS * @brief Unknown. */ struct MS { // ... }; void RenderMsGlobset(MS *pms, CM *pcm, RO *pro); ================================================ FILE: include/murray.h ================================================ /** * @file murray.h * * @brief "The Murray". */ #ifndef MURRAY_H #define MURRAY_H #include "common.h" #include #include #include // Forward. struct WKR; /** * @class MURRAY * @brief Used for Murray in Murray's Big Gamble and King of the Hill. * @todo Implement the struct. */ struct MURRAY : public STEPGUARD { // ... }; void InitMurray(MURRAY *pmurray); void PostMurrayLoad(MURRAY *pmurray); void OnMurrayEnteringSgs(MURRAY *pmurray, SGS sgsPrev, ASEG *pasegOverride); void OnMurrayExitingSgs(MURRAY *pmurray, SGS sgs); void UpdateMurrayGoal(MURRAY *pmurray, int fEnter); void UpdateMurraySgs(MURRAY *pmurray); int FAbsorbMurrayWkr(MURRAY *pmurray, WKR *pwkr); int FDetectMurray(MURRAY *pmurray); /** * @brief Always returns false and never gets called anywhere. */ int FCanMurrayAttack(MURRAY *pmurray); void AddMurrayEnemy(MURRAY *pmurray, ALO *paloEnemy); void SetMurrayPursueXfm(MURRAY *pmurray, XFM *pxfm); void SetMurrayPatrolXfm(MURRAY *pmurray, XFM *pxfm); void CollectMurrayPrize(MURRAY *pmurray, PCK pck, ALO *paloOther); #endif // MURRAY_H ================================================ FILE: include/oid.h ================================================ /** * @file oid.h * * @brief Object IDs. */ #ifndef OID_H #define OID_H #include "common.h" /** * @brief Object ID. */ enum OID { OID_Nil = -1, OID_Unknown = 0x0, OID__MERGED_STATICS = 0x1, OID__VISIBILITY_MAP = 0x2, OID__WORLD = 0x3, OID__CAMERA = 0x4, OID_jt = 0x5, OID_bentley = 0x6, OID_murray = 0x7, // ... OID_shd_stock_shadow = 0x2c, // ... OID_rat = 0x269, // ... OID_state_ubb_round_2 = 0x2da, OID_state_ubb_round_3 = 0x2db, // ... OID_state_ubb_dunk = 0x2e0, // ... }; #endif // OID_H ================================================ FILE: include/path.h ================================================ /** * @file path.h */ #ifndef PATH_H #define PATH_H #include "common.h" // ... #endif // PATH_H ================================================ FILE: include/phasemem.h ================================================ /** * @file phasemem.h */ #ifndef PHASEMEM_H #define PHASEMEM_H #include "common.h" /** * @brief Engine phase. */ enum PHASE { PHASE_Nil = -1, PHASE_None = 0, PHASE_Startup = 1, PHASE_Load = 2, PHASE_Main = 3, PHASE_Mpeg = 4, PHASE_Max = 5 }; /** * @brief Current engine phase. */ extern PHASE g_phase; /** * @brief Set the current engine phase. */ void SetPhase(PHASE phase); /** * @brief Clear the current engine phase. */ void ClearPhase(PHASE phase); #endif // PHASEMEM_H ================================================ FILE: include/pipe.h ================================================ /** * @file pipe.h */ #ifndef PIPE_H #define PIPE_H #include "common.h" #include /** * @class PIPE * @brief Pipe that JT can climb on. * @todo Implement the struct. */ struct PIPE : public LO { /* 0x34 */ undefined4 unk; /* 0x38 */ DLE dlePipe; /* 0x40 */ STRUCT_PADDING(9); /* 0x64 */ OID oid; // TODO: Verify name. /* 0x68 */ LO *plo; // TODO: Verify type and name. }; void StartupPipe(); void ResetPipeList(); void InitPipe(PIPE *ppipe); void OnPipeAdd(PIPE *ppipe); void OnPipeRemove(PIPE *ppipe); void PostPipeLoad(PIPE *ppipe); void ClonePipe(PIPE *ppipe, PIPE *ppipeBase); #endif // PIPE_H ================================================ FILE: include/pnt.h ================================================ /** * @file pnt.h * * @brief Points. */ #ifndef PNT_H #define PNT_H #include "common.h" #include #include #include #include #include /** * @class POINT * @brief Object defined only by a point in space. */ struct PNT : public LO { /* 0x34 */ STRUCT_PADDING(3); // This could be a vector, something like posGlobal? /* 0x40 */ VECTOR posLocal; }; /** * @class POINT_WITH_SPEED * @brief Object defined by a point in space with a velocity. */ struct PNTSV : PNT { // ... }; /** * @class POINT_WITH_DISTANCE * @brief Object defined by a point in space with a distance. */ struct PNTS : PNT { // ... }; /** * @class POINT_WITH_VECTOR * @brief Object defined by a point in space with a vector. */ struct PNTVEC : PNT { // ... }; void LoadPntFromBrx(PNT *ppnt, CBinaryInputStream *pbis); void GetPntPos(PNT *ppnt, VECTOR *ppos); void SetPntParent(PNT *ppnt, ALO *paloParent); void ApplyPntProxy(PNT *ppnt, PROXY *pproxyApply); #endif // PNT_H ================================================ FILE: include/po.h ================================================ /** * @file po.h * * @brief Player object. */ #ifndef PO_H #define PO_H #include "common.h" #include #include #include // Forward. struct ALO; struct AMB; struct CPDEFI; /** * @brief (?) kind. * @todo This should maybe be moved to pzo.h? */ enum PCK { PCK_Nil = -1, PCK_Key = 0, PCK_Gold = 1, PCK_Max = 2 }; /** * @todo Unknown. * @note Based on proto, may be inaccurate. */ struct PZI { int fCollectEnabled; ALO *paloBag; ALO *mpccharmpaloCharm[5]; float sAutoCollect; ALO *paloCollect; }; /** * @class PO * @brief Used for playable objects (e.g. JT). * * @note Based on proto, may be inaccurate. */ struct PO : public SO { /* 0x550 */ int fPlayable; int fLockBase; VECTOR posBasePrev; float tWakeRipple; AMB *pambWake; PZI pzi; ALO *paloUseCharm; }; void InitPo(PO *ppo); void ClonePo(PO *ppo, PO *ppoBase); void HandlePoMessage(PO *ppo, MSGID msgid, void *pv); void OnPoActive(PO *ppo, int fActive, PO *ppoOther); void GetPoCpdefi(PO *ppo, float dt, CPDEFI *pcpdefi); int FIsPoSoundBase(PO * ppo); /** * @brief Switch to the given PO, if it isn't the currently active one. */ void MakePoActive(PO *ppo); int FInvulnerablePo(PO *ppo, ZPK zpk); int FTakePoDamage(PO *ppo, ZPR *pzpr); // JTHS JthsCurrentPo(PO *ppo); // TODO: Fix includes. /** * @brief Collect a prize. */ void CollectPoPrize(PO *ppo, PCK pck, ALO *paloOther); /** * @brief Gets a pointer to the current PO. */ PO *PpoCur(); PO *PpoStart(void); /** * @brief Finds the index of the given PO (?) */ int _IppoFindPo(PO *ppo); /** * @brief Add the given PO to the list. */ void AddPoToList(PO *ppo); /** * @brief Remove the given PO from the list. */ void RemovePoFromList(PO *ppo); /** * @brief Adds the given PO to the list and then calls an unknown function. */ void OnPoAdd(PO *ppo); /** * @brief Removes the given PO from the list and then calls an unknown function. */ void OnPoRemove(PO *ppo); /** * @brief Unknown. */ void SwitchToIppo(int index); /** * @brief Unknown. */ void SetPoPlayable(PO *ppo, int playable); /** * @brief Switch to the given PO. */ void SwitchToPo(PO *ppo); PZI *PpziCur(); void GetPoDiapi(PO *ppo, DIALOG *pdialog, DIAPI *pdiapi); void PlayPoDialog(PO *ppo, DIALOG *pdialog); /** * @brief Update the PO. */ void UpdatePo(PO *ppo, float dt); /** * @brief Use a charm. */ void UsePoCharm(PO *ppo); #endif // PO_H ================================================ FILE: include/prog.h ================================================ /** * @file prog.h * * @brief Progress bar. */ #ifndef PROG_H #define PROG_H #include "common.h" #include class CProg { int m_fActive; int m_nMax; int m_nTarget; int m_nRemain; int m_cRetry; RGBA m_rgbaComplete; RGBA m_rgbaRemain; RGBA m_rgbaWarning; RGBA m_rgbaTrouble; public: /** * @brief Initializes CProg with RGBA values. * * @param rgbaComplete Color of the filled portion of the bar (e.g. blue or green). * @param rgbaRemain Color of the unfilled portion of the bar (e.g. gray). * @param rgbaWarning Color of the bar if there's a warning (e.g. yellow). * @param rgbaTrouble Color of the bar if there's trouble (e.g. red) */ CProg(RGBA *rgbaComplete, RGBA *rgbaRemain, RGBA *rgbaWarning, RGBA *rgbaTrouble); /** * @brief Zeroes out the variables. * */ void Begin(); /** * @brief Clear's Frame Buffers, updates remain and calls draw. * * @param nRemain new Remain value. */ void SetRemain(int nRemain); /** * @brief Zeroes out the variables. * */ void End(); /** * @brief Draws the progress bar on the screen with the current colors. */ void Draw(); }; #endif // PROG_H ================================================ FILE: include/proxy.h ================================================ /** * @file proxy.h */ #ifndef PROXY_H #define PROXY_H #include "common.h" #include #include #include /** * @brief Unknown. */ struct PROXY : public ALO { DL dlProxyRoot; DLE dleProxy; undefined4 unk_0x8; undefined4 unk_0xC; undefined4 unk_0x10; }; void InitProxy(PROXY *pproxy); void LoadProxyFromBrx(PROXY *pproxy, CBinaryInputStream *pbis); void CloneProxy(PROXY *pproxy, PROXY *pproxyBase); void PostProxyLoad(PROXY *pproxy); #endif // PROXY_H ================================================ FILE: include/puffer.h ================================================ /** * @file puffer.h * * @brief Piranha Lake in Vicious Voodoo (believed to be formerly called "Pufferfish Pond"). */ #ifndef PUFFER_H #define PUFFER_H #include "common.h" #include #include #include #include #include #include /** * @class PUFFER * @brief Piranha fish used in Piranha Lake. * @todo Implement the struct. */ struct PUFFER : public PO { // ... }; /** * @class PUFFER_COLLECTION * @brief Collection of piranha fish. * @todo Implement the struct. */ struct PUFFC : public ALO { // ... }; /** * @class PUFFER_BRAIN * @brief AI controller for piranha fish. * @todo Implement the struct. */ struct PUFFB : public ALO { // ... }; /** * @class PUFFER_TORCH * @brief Tiki torch object in Piranha Lake. * @todo Implement the struct. */ struct PUFFT : public SO { // ... }; void InitPuffer(PUFFER *ppuffer); void LoadPufferFromBrx(PUFFER *ppuffer, CBinaryInputStream *pbis); void PostPufferLoad(PUFFER *ppuffer); void PresetPufferAccel(PUFFER *ppuffer, float dt); int FFilterPuffer(PUFFER *ppuffer, SO *psoOther); void UpdatePuffer(PUFFER *ppuffer, float dt); PUFFT *PpufftChoosePuffer(PUFFER *ppuffer); void OnPufferActive(PUFFER *ppuffer, int fActive, PO *ppoOther); void UpdatePufferActive(PUFFER *ppuffer, JOY *pjoy, float dt); void AddPufferWaterAcceleration(PUFFER *ppuffer, WATER *pwater, float dt); void HandlePufferMessage(PUFFER *ppuffer, MSGID msgid, void *pv); void PostPuffcLoad(PUFFC *ppuffc); void PresetPuffcAccel(PUFFC *ppuffc, float dt); void UpdatePuffcGoal(PUFFC *ppuffc, int fEnter); void OnPuffcExitingSgs(PUFFC *ppuffc, SGS sgsNext); void OnPuffcEnteringSgs(PUFFC *ppuffc, SGS sgsPrev, ASEG *pasegOverride); void UpdatePuffcSgs(PUFFC *ppuffc); void HandlePuffcMessage(PUFFC *ppuffc, MSGID msgid, void *pv); void UpdatePuffc(PUFFC *ppuffc, float dt); int FCanPuffcAttack(PUFFC *ppuffc); void PostPuffbLoad(PUFFB *ppuffb); #endif // PUFFER_H ================================================ FILE: include/pzo.h ================================================ /** * @file pzo.h * * @brief Vaults, clue bottles, keys and locks. */ #ifndef PZO_H #define PZO_H #include "common.h" #include #include #include #include #include #include // Forward. struct RO; struct WKR; /** * @brief Something (?) clue state? */ enum PCS { PCS_Nil = -1, PCS_Collected = 0, PCS_Collectible = 1, PCS_NotCollectible = 2, PCS_Max = 3 }; /** * @brief Goal advice dialog kind (?) */ enum GOADK { GOADK_Nil = -1, GOADK_LessThanHalf = 0, GOADK_MoreThanHalf = 1, GOADK_Most = 2, GOADK_AllButOne = 3, GOADK_All = 4, GOADK_Max = 5 }; /** * @class _SPRIZE * @brief Base class for SPRIZEs. */ struct SPRIZE : public SO { // ... }; /** * @class _SCPRIZE * @brief Base class for SCPRIZEs. */ struct SCPRIZE : public SPRIZE { // ... }; /** * @class CLUE * @brief Clue bottle. */ struct CLUE : public SPRIZE { // ... }; /** * @class LOCK * @brief Treasure key lock. */ struct LOCK : public ALO { // ... }; /** * @class LOCK_GROUP * @brief Group of treasure key lock objects. */ struct LOCKG : public ALO { STRUCT_PADDING(3); /* 0x2DC */ uint coidLock; /* 0x2E0 */ OID aoidLock[8]; }; /** * @class VAULT * @brief Vault used for unlocking thief moves in levels. */ struct VAULT : public PO { // ... }; /** * @brief Vault tumbler. */ struct TMBL { ALO *palo; SM *psmDial; SMA *psmaDial; }; void InitSprize(SPRIZE *psprize); void LoadSprizeFromBrx(SPRIZE *psprize, CBinaryInputStream *pbis); void BindSprize(SPRIZE *psprize); void PostSprizeLoad(SPRIZE *psprize); void UpdateSprize(SPRIZE *psprize, float dt); void CollectSprize(SPRIZE *psprize); void EmitSprizeExplosion(SPRIZE *psprize); PCS PcsFromSprize(SPRIZE *psprize); void AddSprizeAseg(SPRIZE *psprize, OID oidAseg); void HandleSprizeMessage(SPRIZE *psprize, MSGID msgid, void *pv); int FIgnoreSprizeIntersection(SPRIZE *psprize, SO *psoOther); void InitScprize(SCPRIZE *pscprize); void CloneScprize(SCPRIZE *pscprize, SCPRIZE *pscprizeBase); PCS PcsFromScprize(SCPRIZE *pscprize); void CollectScprize(SCPRIZE *pscprize); /** * @brief Loads a LOCK object from a binary input stream. * * @param plock Pointer to the LOCK to initialize. * @param pbis Pointer to the binary input stream to read from. */ void LoadLockFromBrx(LOCK *plock, CBinaryInputStream *pbis); /** * @brief Sets up a LOCK object after loading. * * @param plock Pointer to the LOCK object. */ void PostLockLoad(LOCK *plock); /** * @brief Loads a LOCKG object from a binary input stream. * * @param plockg Pointer to the LOCKG to initialize. * @param pbis Pointer to the binary input stream to read from. */ void LoadLockgFromBrx(LOCKG *plockg, CBinaryInputStream *pbis); /** * @brief Sets up a LOCKG object after loading. * * @param plockg Pointer to the LOCKG object. */ void PostLockgLoad(LOCKG *plockg); /** * @brief Sets the index of the LOCKG object(?) * * @param plockg Pointer to the LOCKG object. * @param ifws Index to set. */ void SetLockgIndex(LOCKG *plockg, int ifws); /** * @brief Adds a lock to the given lock group. * * @param plockg Pointer to the LOCKG object. * @param oidLock OID of the LOCK to add. */ void AddLockgLock(LOCKG *plockg, OID oidLock); void TriggerLockg(LOCKG *plockg); void InitClue(CLUE *pclue); void LoadClueFromBrx(CLUE *pclue, CBinaryInputStream *pbis); void CloneClue(CLUE *pclue, CLUE *pclueBase); void PostClueLoad(CLUE *pclue); void OnClueSmack(CLUE *pclue); void CollectClue(CLUE *pclue); void BreakClue(CLUE *pclue); void CollectClueSilent(CLUE *pclue); void ImpactClue(CLUE *pclue, int fParentDirty); int FAbsorbClueWkr(CLUE *pclue, WKR *pwkr); void RenderClueAll(CLUE *pclue, CM *pcm, RO *pro); void CollectAllClues(int nParam); void SetGrfvault(int grfvault); void InitVault(VAULT *pvault); void PostTmblLoad(TMBL *ptmbl, OID oidInitialState); void PostVaultLoad(VAULT *pvault); void OnVaultActive(VAULT *pvault, int fActive, PO *ppoOther); void UpdateVaultActive(VAULT *pvault, JOY *pjoy, float dt); void HandleVaultMessage(VAULT *pvault, MSGID msgid, void *pv); void AddVaultGoadDialog(VAULT *pvault, GOADK goadk, OID oidDialog); #endif // PZO_H ================================================ FILE: include/rail.h ================================================ /** * @file rail.h */ #ifndef RAIL_H #define RAIL_H #include "common.h" #include #include /** * @class RAIL * @brief Rail that JT can walk/slide on. * @todo Check if the field names are correct. */ struct RAIL : public SHAPE { /* 0x38 */ DLE dleRail; /* 0x40 */ int fSlippery; /* 0x44 */ float svMax; /* 0x48 */ float rdvGravity; /* 0x4c */ float unk1; /* 0x50 */ undefined4 unk2; /* 0x54 */ OID oid; /* 0x58 */ LO *plo; }; void InitRail(RAIL *prail); void OnRailAdd(RAIL *prail); void OnRailRemove(RAIL *prail); void PostLoadRail(RAIL *prail); void CloneRail(RAIL *prail, RAIL *prailBase); #endif // RAIL_H ================================================ FILE: include/rat.h ================================================ /** * @file rat.h * * @brief Rats. */ #ifndef RAT_H #define RAT_H #include "common.h" #include #include #include #include #include // Forward. struct XP; struct WKR; /** * @brief Rat state. */ enum RATS { RATS_Nil = -1, RATS_Stopped = 0, RATS_Scurry = 1, RATS_Flee = 2, RATS_Dead = 3, RATS_Hidden = 4, RATS_Max = 5 }; /** * @class RAT * @brief Rat animal. * @todo Implement the struct. */ struct RAT : public SO { // ... /* 0x55c */ float tRatSqueak; /* 0x560 */ STRUCT_PADDING(40); /* 0x600 */ DLE dleRat; /* 0x608 */ LM lmDtStop; /* 0x610 */ STRUCT_PADDING(21); /* 0x664 */ int ccoin; // ... }; /** * @class RATHOLE * @brief Hole where rats come from/go to. * @todo Implement the struct. */ struct RATHOLE : public LO { // ... }; void InitRat(RAT *prat); void LoadRatFromBrx(RAT *prat, CBinaryInputStream *pbis); void PostRatLoad(RAT *prat); void OnRatAdd(RAT *prat); void OnRatRemove(RAT *prat); void CloneRat(RAT *prat, RAT *pratBase); void PresetRatAccel(RAT *prat, float dt); void UpdateRat(RAT *prat, float dt); void AdjustRatNewXp(RAT *prat, XP *pxp, int ixpd); void AdjustRatXpVelocity(RAT *prat, XP *pxp, int ixpd); void RenderRatAll(RAT *prat, CM *pcm, RO *pro); int FAbsorbRatWkr(RAT *prat, WKR *pwkr); void ChooseRatFleeTarget(RAT *prat); void HideRat(RAT *prat, int fHide); void SetRatRats(RAT *prat, RATS rats); void OnRatholeAdd(RATHOLE *prathole); void OnRatholeRemove(RATHOLE *prathole); #endif // RAT_H ================================================ FILE: include/rchm.h ================================================ /** * @file rchm.h */ #ifndef RCHM_H #define RCHM_H #include "common.h" #include #include #include #include #include #include /** * @brief Unknown. */ struct TWR { int aipos[4]; }; /** * @class REACH_MAP * @brief Spatial map determining where JT can reach with his cane. * @todo Implement the struct. */ struct RCHM : public LO { /* 0x34 */ OID oidHost; /* 0x38 */ OID oidTouch; /* 0x3c */ STRUCT_PADDING(6); /* 0x54 */ float rclNatural; /* 0x58 */ float ioNatural; /* 0x5c */ float lhubNatural; /* 0x60 */ STRUCT_PADDING(8); /* 0x80 */ int fCenterSet; // ... }; void InitRchm(RCHM *prchm); void LoadRchmFromBrx(RCHM *prchm, CBinaryInputStream *pbis); void PostRchmLoad(RCHM *prchm); void ReblendRchm(RCHM *prchm, TWR *ptwr, VECTOR *ppos); void BuildRchmCoefficients(RCHM *prch, float rcl, float io, float lhub, float *mpiblu); void ConvertRchmIposToRclIoLhub(RCHM *prchm, int ipos, float *prcl, float *pio, float *plhub); void SetRchmNaturalCoefficients(RCHM *prchm, float rcl, float io, float lhub); void SetRchmCenterCoefficients(RCHM *prchm, float rcl, float io, float lhub); void PredictRchmTargetPos(RCHM *prchm, TARGET *ptarget, float dt, VECTOR *ppos); void PredictRchmTargetLocalPos(RCHM *prchm, TARGET *ptarget, float dt, VECTOR *pposLocal); TWR *PtwrMapRchmSafe(RCHM *prchm, BSP *pbsp, VECTOR *ppos); void FindRchmClosestPoint(RCHM *prchm, VECTOR *ppos, VECTOR *pposClosest, TWR **pptwr, float *ps); void TrackJtTarget(JT *pjt, RCHM *prchm, TARGET *ptarget); void TrackJtPipe(JT *pjt, RCHM *prchm, PIPE *ppipe, float *psPipe); #endif // RCHM_H ================================================ FILE: include/render.h ================================================ /** * @file render.h * * @brief Rendering system. */ #ifndef RENDER_H #define RENDER_H #include "common.h" #include #include #include #include /** * @brief Unknown. */ enum RP { RP_Nil = -1, RP_DynamicTexture = 0, RP_Background = 1, RP_BlotContext = 2, RP_Opaque = 3, RP_Cutout = 4, RP_CelBorder = 5, RP_ProjVolume = 6, RP_OpaqueAfterProjVolume = 7, RP_CutoutAfterProjVolume = 8, RP_CelBorderAfterProjVolume = 9, RP_MurkClear = 10, RP_MurkOpaque = 11, RP_MurkFill = 12, RP_Translucent = 13, RP_TranslucentCelBorder = 14, RP_Blip = 15, RP_Foreground = 16, RP_WorldMap = 17, RP_Max = 18 }; /** * @brief Render Primitive List (?) * @todo Implement the struct. */ struct RPL { undefined4 *pfndraw; // NOTE: This is a function pointer. float z; RP rp; // ... }; void SubmitRpl(RPL *prpl); int NCmpPrplReverseZ(RPL **pprpl1, RPL **pprpl2); int CprplPartitionArpl(int cprpl, RPL *arpl, RPL **aprpl); /** * @brief Renders the given SW with the given camera. * * @param psw Pointer to the SW object. * @param pcm Pointer to the camera. */ void RenderSw(SW *psw, CM *pcm); void EnsureRenderGlobals(); void EnsureCameraGlobals(); void EnsureScreenCleared(); void SetupRpDynamicTexture(RPL *prpl); void SetupRpBackground(RPL *prpl); void SetupRpBlotContext(RPL *prpl); void SetupRpGlob(RPL *prpl); void SetupRpBlip(RPL *prpl); void SetupRpWorldMap(RPL *prpl); /** * @brief Draws the given SW with the given camera. * * @param psw Pointer to the SW object. * @param pcm Pointer to the camera. */ void DrawSw(SW *psw, CM *pcm); /** * @brief Fills a rectangular area of the screen with a specified color and alpha value. * * @param r The red component of the fill color (0-255). * @param g The green component of the fill color (0-255). * @param b The blue component of the fill color (0-255). * @param alpha The alpha (transparency) value of the fill (0-255). * @param xLeft The left x-coordinate of the rectangle. * @param yTop The top y-coordinate of the rectangle. * @param xRight The right x-coordinate of the rectangle. * @param yBottom The bottom y-coordinate of the rectangle. * @param pgifs Pointer to a GIFS structure used for rendering. */ void FillScreenRect(int r, int g, int b, int alpha, float xLeft, float yTop, float xRight, float yBottom, GIFS *pgifs); /** * @briefs Starts up the rendering system. */ void StartupRender(); #endif // RENDER_H ================================================ FILE: include/rip.h ================================================ /** * @file rip.h * * @brief Particle system (?) */ #ifndef RIP_H #define RIP_H #include "common.h" #include #include #include #include #include // Forward. struct RO; struct RIPG; // TODO: Does this belong here or puffer.h? struct PUFF; // TODO: Add to vtables. struct VTRIP; /** * @brief (?) particle type? * @note All of these values are taken straight * from the prototype so they may be incorrect. */ enum RIPT { RIPT_Nil = -1, RIPT_Rip = 0, RIPT_Shadow = 1, RIPT_Droplet = 2, RIPT_Bublet = 3, RIPT_Ripple = 4, RIPT_Puff = 5, RIPT_Dablet = 6, RIPT_Flake = 7, RIPT_Spark = 8, RIPT_Burst = 9, RIPT_Trail = 10, RIPT_Fireball = 11, RIPT_SmokeCloud = 12, RIPT_SmokeTrail = 13, RIPT_Debris = 14, RIPT_Orbit = 15, RIPT_Smack = 16, RIPT_Ray = 17, RIPT_Rose = 18, RIPT_Flying = 19, RIPT_Stuck = 20, RIPT_Leaf = 21, RIPT_Flame = 22, RIPT_Bullet = 23, RIPT_Shrapnel = 24, RIPT_Glint = 25, RIPT_Match = 26, RIPT_Emitter = 27, RIPT_Max = 28 }; /** * @brief (?) type? */ enum RIPGT { RIPGT_Nil = -1, RIPGT_Default = 0, RIPGT_Bounce = 1, RIPGT_Loot = 2, RIPGT_Max = 3 }; /** * @brief Rose state. */ enum ROSES { ROSES_Nil = -1, ROSES_Closing = 0, ROSES_Spinning = 1, ROSES_Opening = 2, ROSES_Max = 3 }; /** * @brief Unknown. */ enum TRLS { TRLS_Nil = -1, TRLS_None = 0, TRLS_TrackingRip = 1, TRLS_TrackingAlo = 2, TRLS_ChainingRip = 3, TRLS_Max = 4 }; /** * @brief Unknown. * @todo Implement the struct. */ struct RIP { STRUCT_PADDING(2); int cref; RIPG *pripg; // ... }; /** * @brief (?) group? * @todo Implement the struct. */ struct RIPG : public SO { // ... }; /** * @brief Rose. * @todo Implement the struct. */ struct ROSE : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct DROPLET : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct BUBLET : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct RIPPLE : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct DABLET : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct FLAKE : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct SPARK : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct BURST : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct TRAIL : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct FIREBALL : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct SMOKETRAIL : public TRAIL { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct DEBRIS : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct SMOKECLOUD : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct SMACK : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct ORBIT : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct RAY : public SPARK { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct FLYING : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct STUCK : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct LEAF : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct FLAME : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct BULLET : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct SHRAPNEL : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct GLINT : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct MATCH : public RIP { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct REMIT : public RIP { // ... }; /** * @brief Unknown. */ struct HP { VECTOR pos; VECTOR posHull; float radHull; float sEdge; float sCorner; int xhpKey; }; RIPG *PripgNew(SW *psw, RIPGT ripgt); void InitRipg(RIPG *pripg); void SetRipgEmitb(RIPG *pripg, EMITB *pemitb); void OnRipgRemove(RIPG *pripg); void ProjectRipgTransform(RIPG *pripg, float dt, int fForce); void UpdateRipgBounds(RIPG *pripg); void UpdateRipg(RIPG *pripg, float dt); void BounceRipgRips(RIPG *pripg); void RenderRipgSelf(RIPG *pripg, CM *pcm, RO *pro); VTRIP *PvtripFromRipt(RIPT ript); RIP *PripNewRipg(RIPT ript, RIPG *pripg); void InitRip(RIP *prip, VECTOR *ppos, float gScale, SO *psoTouch); void RemoveRip(RIP *prip); void AddRipRef(RIP *prip); void ReleaseRip(RIP *prip); void TouchRip(RIP *prip, int fTouching); void ForceRipFade(RIP *prip, float dtFade); int FBounceRip(RIP *prip, SO *psoOther, VECTOR *ppos, VECTOR *pnormal); void ProjectRipTransform(RIP *prip, float dt); void UpdateRip(RIP *prip, float dt); int FRenderRipPosMat(RIP *prip, CM *pcm, VECTOR *ppos, MATRIX3 *pmat); void RenderRip(RIP *prip, CM *pcm); void SubscribeRipObject(RIP *prip, LO *ploTarget); void SubscribeRipStruct(RIP *prip, PFNMQ pfnmq, void *pvContext); void UnsubscribeRipStruct(RIP *prip, PFNMQ pfnmq, void *pvContext); void InitDroplet(DROPLET *pdroplet, VECTOR *ppos, float gScale, SO *psoTouch); void TouchDroplet(DROPLET *pdroplet, int fTouching); void InitBublet(BUBLET *pbublet, VECTOR *ppos, float gScale, SO *psoTouch); void ProjectBubletTransform(BUBLET *pbublet, float dt); void TouchBublet(BUBLET *pbublet, int fTouching); void InitRipple(RIPPLE *pripple, VECTOR *ppos, float gScale, SO *psoTouch); void InitPuff(PUFF *ppuff, VECTOR *ppos, float gScale, SO *psoTouch); void InitDablet(DABLET *pdablet, VECTOR *ppos, float gScale, SO *psoTouch); void InitFlake(FLAKE *pflake, VECTOR *ppos, float gScale, SO *psoTouch); void UpdateFlake(FLAKE *pflake, float dt); void RenderFlake(FLAKE *pflake, CM *pcm); void TouchFlake(FLAKE *pflake, int fTouching); void InitSpark(SPARK *pspark, VECTOR *ppos, float gScale, SO *psoTouch); void RenderSpark(SPARK *pspark, CM *pcm); void InitBurst(BURST *pburst, VECTOR *ppos, float gScale, SO *psoTouch); void InitTrail(TRAIL *ptrail, VECTOR *ppos, float gScale, SO *psoTouch); void OnTrailRemove(TRAIL *ptrail); void SetTrailTrls(TRAIL *ptrail, TRLS trls, void *pv); void DetachTrail(TRAIL *ptrail); void ProjectTrailTransform(TRAIL *ptrail, float dt); void RenderTrail(TRAIL *ptrail, CM *pcm); void HandleTrailMessage(TRAIL *ptrail, MSGID msgid, void *pv); void InitFireball(FIREBALL *pfireball, VECTOR *ppos, float gScale, SO *psoTouch); void UpdateFireball(FIREBALL *pfireball, float dt); void InitSmokecloud(SMOKECLOUD *psmokecloud, VECTOR *ppos, float gScale, SO *psoTouch); void InitSmoketrail(SMOKETRAIL *psmoketrail, VECTOR *ppos, float gScale, SO *psoTouch); void InitDebris(DEBRIS *pdebris, VECTOR *ppos, float gScale, SO *psoTouch); void InitSmack(SMACK *psmack, VECTOR *ppos, float gScale, SO *psoTouch); void ProjectSmackTransform(SMACK *psmack, float dt); void RenderSmack(SMACK *psmack, CM *pcm); void UpdateSmack(SMACK *psmack, float dt); void InitOrbit(ORBIT *porbit, VECTOR *ppos, float gScale, SO *psoTouch); void ProjectOrbitTransform(ORBIT *porbit, float dt); void UpdateOrbit(ORBIT *porbit, float dt); void RenderOrbit(ORBIT *porbit, CM *pcm); void InitRay(RAY *pray, VECTOR *ppos, float gScale, SO *psoTouch); void InitRose(ROSE *prose, VECTOR *ppos, float gScale, SO *psoTouch); void ProjectRoseTransform(ROSE *prose, float dt); void UpdateRose(ROSE *prose, float dt); void RenderRose(ROSE *prose, CM *pcm); void SetRoseRoses(ROSE *prose, ROSES roses); int SgnCmpHp(void *pv0, void *pv1); int ChpBuildConvexHullScreen(VECTOR *pposCenter, int chp, HP *ahp); int ChpBuildConvexHullXY(MATRIX4 *pdmat, int chp, HP *ahp); void PostFlyingEmit(FLYING *pflying, EMITB *pemitb); void RenderFlying(FLYING *pflying, CM *pcm); void CreateStuck(RIP *pripSrc, ALO *paloRender, SO *psoOther, VECTOR *ppos, VECTOR *pnormal, STUCK **ppstuck); int FBounceFlying(FLYING *pflying, SO *psoOther, VECTOR *ppos, VECTOR *pnormal); void UpdateStuck(STUCK *pstuck, float dt); void RenderStuck(STUCK *pstuck, CM *pcm); void PostLeafEmit(LEAF *pleaf, EMITB *pemitb); void ProjectLeafTransform(LEAF *pleaf, float dt); int FBounceLeaf(LEAF *pleaf, SO *psoOther, VECTOR *ppos, VECTOR *pnormal); int FFilterFlameObjects(void *pv, SO *pso); void PostFlameEmit(FLAME *pflame, EMITB *pemitb); void PostBulletEmit(BULLET *pbullet, EMITB *pemitb); void RenderBullet(BULLET *pbullet, CM *pcm); int FBounceBullet(BULLET *pbullet, SO *psoOther, VECTOR *ppos, VECTOR *pnormal); void PostShrapnelEmit(SHRAPNEL *pshrapnel, EMITB *pemitb); int FBounceShrapnel(SHRAPNEL *pshrapnel, SO *psoOther, VECTOR *ppos, VECTOR *pnormal); void RenderShrapnel(SHRAPNEL *pshrapnel, CM *pcm); void InitGlint(GLINT *pglint, VECTOR *ppos, float gScale, SO *psoTouch); void RenderGlint(GLINT *pglint, CM *pcm); void InitMatch(MATCH *pmatch, VECTOR *ppos, float gScale, SO *psoTouch); void LaunchMatch(MATCH *pmatch); void ProjectMatchTransform(MATCH *pmatch, float dt); void UpdateMatch(MATCH *pmatch, float dt); void RenderMatch(MATCH *pmatch, CM *pcm); void PostRemitEmit(REMIT *premit, EMITB *pemitb); void UpdateRemit(REMIT *premit, float dt); #endif // RIP_H ================================================ FILE: include/rog.h ================================================ /** * @file rog.h * * @note At the time of writing, all the enum values were taken * straight from the prototype, so they may be incorrect/incomplete. */ #ifndef ROG_H #define ROG_H #include "common.h" #include #include #include #include #include // Forward. struct XP; struct DZ; struct FX; struct WKR; typedef int GRFSG; /** * @brief (?) state. */ enum ROVS { ROVS_Nil = -1, ROVS_Brake = 0, ROVS_Drive = 1, ROVS_Descend = 2, ROVS_Ascend = 3, ROVS_Max = 4 }; /** * @brief (?) state. */ enum ROBS { ROBS_Nil = -1, ROBS_Descend = 0, ROBS_Instruct = 1, ROBS_Normal = 2, ROBS_Lose = 3, ROBS_Win = 4, ROBS_Ascend = 5, ROBS_Max = 6 }; /** * @brief (?) state. */ enum ROVTS { ROVTS_Nil = -1, ROVTS_Calm = 0, ROVTS_Firing = 1, ROVTS_Max = 2 }; /** * @brief (?) state. */ enum ROHS { ROHS_Nil = -1, ROHS_Inactive = 0, ROHS_Spawn = 1, ROHS_Wander = 2, ROHS_Collect = 3, ROHS_Grab = 4, ROHS_Return = 5, ROHS_Exit = 6, ROHS_Happy = 7, ROHS_Sad = 8, ROHS_Die = 9, ROHS_Dead = 10, ROHS_Max = 11 }; /** * @brief (?) state. */ enum ROCS { ROCS_Nil = -1, ROCS_Rest = 0, ROCS_Hit1 = 1, ROCS_Hit2 = 2, ROCS_Hit3 = 3, ROCS_Hit4 = 4, ROCS_Hit5 = 5, ROCS_Hit6 = 6, ROCS_Hit7 = 7, ROCS_Hit8 = 8, ROCS_Destroyed = 9, ROCS_Max = 10 }; /** * @brief (?) state. */ enum ROPS { ROPS_Nil = -1, ROPS_StayPut = 0, ROPS_Reveal = 1, ROPS_Collect = 2, ROPS_Collected = 3, ROPS_Max = 4 }; /** * @brief (?) state. */ enum ROSTS { ROSTS_Nil = -1, ROSTS_Close = 0, ROSTS_Open = 1, ROSTS_Max = 2 }; /** * @brief (?) kind. */ enum ROBK { ROBK_Nil = -1, ROBK_Primary = 0, ROBK_Secondary = 1, ROBK_Tertiary = 2, ROBK_Max = 3 }; /** * @brief Unknown. * @todo Implement the struct. */ struct ROV : public PO { /* 0x610 */ ROVS rovs; /* 0x614 */ ROVTS rovts; /* 0x618 */ float radJoyLeft; /* 0x61c */ float uJoyDeflectLeft; /* 0x620 */ float radJoyRight; /* 0x624 */ float uJoyDeflectRight; /* 0x628 */ float svMax; // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct ROB : public ALO { // ... /* 0x2e0 */ int coidRost; /* 0x2e4 */ OID aoidRost[16]; // TODO: Verify size. // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct ROH : public SO { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct ROC : public SO { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct ROST : public SO { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct ROP : public SO { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct RODD { // ... }; void InitRov(ROV *prov); void LoadRovFromBrx(ROV *prov, CBinaryInputStream *pbis); void PostRovLoad(ROV *prov); void UpdateRovActive(ROV *prov, JOY *pjoy, float dt); void UpdateRov(ROV *prov, float dt); void ReadRovJoystick(ROV *prov, JOY *pjoy); ROVS RovsNextRov(ROV *prov); void SetRovRovs(ROV *prov, ROVS rovs); ROVTS RovtsNextRov(ROV *prov); void SetRovRovts(ROV *prov, ROVTS rovts); void HandleRovMessage(ROV *prov, MSGID msgid, void *pv); void PresetRovAccel(ROV *prov, float dt); void AdjustRovXpVelocity(ROV *prov, XP *pxp, int ixpd); void AdjustRovNewXp(ROV *prov, XP *pxp, int ixpd); void PropagateRovForce(ROV *prov, GRFSG grfsg, XP *pxp, int ixpd, DZ *pdz, FX *afx); int FIsRovSoundBase(ROV *prov); void InitRob(ROB *prob); void SetRobCollectible(ROB *prob, OID oidCollectible); void SetRobHarvester(ROB *prob, OID oidHarvester); void SetRobVehicle(ROB *prob, OID oidVehicle); void SetRobPrize(ROB *prob, OID oidPrize); void AddRobSpawnTunnel(ROB *prob, OID oidSpawnTunnel); ROBK RobkCur(); void BindRob(ROB *prob); void PostRobLoad(ROB *prob); void UpdateRob(ROB *prob, float dt); ROBS RobsNextRob(ROB *prob); void SetRobRobs(ROB *prob, ROBS robs); void AddRobRoc(ROB *prob); void AddRobRoh(ROB *prob); void AdjustRobDifficulty(ROB *prob, float rRoc); void DestroyedRobRoc(ROB *prob, ROC *proc); void SpawnedRobRoh(ROB *prob, ROH *proh); void GrabbedRobRoh(ROB *prob, ROH *proh); void DroppedRobRoh(ROB *prob, ROH *proh); void ReturnedRobRoh(ROB *prob, ROH *proh); void ExitedRobRoh(ROB *prob, ROH *proh); void KilledRobRoh(ROB *prob, ROH *proh); int FChooseRobRoc(ROB *prob, ROH *proh); void TakeRobRoc(ROB *prob, ROH *proh, ROC *proc); int FChooseRobRoh(ROB *prob, ROC *proc); int FChooseRobReturnPoint(ROB *prob, ROH *proh); void ChooseRobWanderLocation(ROB *prob, ROH *proh); RODD *ProddCurRob(ROB *prob, ENSK ensk); void InitRoh(ROH *proh); void LoadRohFromBrx(ROH *proh, CBinaryInputStream *pbis); void CloneRoh(ROH *proh, ROH *prohBase); void PostRohLoad(ROH *proh); void UpdateRoh(ROH *proh, float dt); void MoveRohToTarget(ROH *proh, VECTOR *ppos, int fBackwards); ROHS RohsNextRoh(ROH *proh); void SetRohRohs(ROH *proh, ROHS rohs); int FAbsorbRohWkr(ROH *proh, WKR *pwkr); ROC *ProcContactRoh(ROH *proh); void InitRoc(ROC *proc); void LoadRocFromBrx(ROC *proc, CBinaryInputStream *pbis); void CloneRoc(ROC *proc, ROC *procBase); void PostRocLoad(ROC *proc); void UpdateRoc(ROC *proc, float dt); void PresetRocAccel(ROC *proc, float dt); void AdjustRocNewXp(ROC *proc, XP *pxp, int ixpd); int FAbsorbRocWkr(ROC *proc, WKR *pwkr); ROCS RocsNextRoc(ROC *proc); void SetRocRocs(ROC *proc, ROCS rocs); void InitRost(ROST *prost); void LoadRostFromBrx(ROST *prost, CBinaryInputStream *pbis); void CloneRost(ROST *prost, ROST *prostBase); void PostRostLoad(ROST *prost); void UpdateRost(ROST *prost, float dt); ROSTS RostsNextRost(ROST *prost); void SetRostRosts(ROST *prost, ROSTS rosts); void InitRop(ROP *prop); void LoadRopFromBrx(ROP *prop, CBinaryInputStream *pbis); void PostRopLoad(ROP *prop); void UpdateRop(ROP *prop, float dt); void SetRopRops(ROP *prop, ROPS rops); ROPS RopsNextRop(ROP *prop); #endif // ROG_H ================================================ FILE: include/rs.h ================================================ /** * @file rs.h * * @note No functions are declared here. */ #ifndef RS_H #define RS_H #include "common.h" #include /** * @brief Unknown. * * @todo Figure out what this struct represents. */ struct RSMG { OID oidRoot; OID oidSM; OID oidTriggerGoal; OID oidUntriggerGoal; }; #endif // RS_H ================================================ FILE: include/rumble.h ================================================ /** * @file rumble.h * * @brief Joypad rumble. */ #ifndef RUMBLE_H #define RUMBLE_H #include "common.h" struct JOY; // Forward declaration /** * @brief Rumble state */ enum RUMS { RUMS_Dead = 0, RUMS_Idle = 1, RUMS_Rumble = 2, RUMS_Stop = 3, RUMS_Kill = 4, RUMS_Max = 5 }; /** * @brief Rumble kind */ enum RUMK { RUMK_Nil = -1, RUMK_SteadyBuzz = 0, RUMK_LowThrob = 1, RUMK_MediumThrob = 2, RUMK_HardThrob = 3, RUMK_Blunt = 4, RUMK_Electric = 5, RUMK_Fire = 6, RUMK_Water = 7, RUMK_Crush = 8, RUMK_Break = 9, RUMK_Bomb = 10, RUMK_Max = 11 }; /** * @brief Rumble intensity */ struct RUMINS { byte fHighSpeedMotor; byte bLowSpeedMotor; byte unk1; byte unk2; float dt; }; /** * @brief Rumble pattern */ struct RUMPAT { int crumins; RUMINS arumins[32]; }; /** * @brief Rumble * * Combines the rumble state, rumble pattern, and rumble intensity along with the * port and slot of the controller. */ struct RUMBLE { /* 0x00 */ STRUCT_PADDING(1); // TODO: Add vtable. /* 0x04 */ int nPort; /* 0x08 */ int nSlot; /* 0x0c */ RUMS rums; RUMPAT *prumpat; int irumins; float dtRumble; float dtRumins; }; void InitRumble(RUMBLE *prumble, int nPort, int nSlot); void TriggerRumbleRumk(RUMBLE *prumble, RUMK rumk, float dt); void SetRumbleRums(RUMBLE *prumble, RUMS rums); void StopRumbleActuators(RUMBLE *prumble); #endif // RUMBLE_H ================================================ FILE: include/rwm.h ================================================ /** * @file rwm.h */ #ifndef RWM_H #define RWM_H #include "common.h" #include #include #include #include /** * @class AMMO_MANAGER * @brief Object representing a manager for projectile ammo. * @todo Implement the struct. */ struct RWM : public LO { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct RWTI { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct RWAC { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct RWFI { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct RWC { // ... }; void InitRwm(RWM *prwm); void PostRwmLoad(RWM *prwm); RWC *PrwcFindRwm(RWM *prwm, OID oidCache); void EnableRwmRwc(RWM *prwm, OID oidCache); void DisableRwmRwc(RWM *prwm, OID oidCache); void ResizeRwmRwc(RWM *prwm, OID oidCache, int cpso); int FIsRwmAmmo(RWM *prwm, SO *psoAmmo); int FAvailableRwmAmmo(RWM *prwm, SO *psoAmmo); void CycleRwmCache(RWM *prwm); void ReloadRwm(RWM *prwm); int FEnsureRwmLoaded(RWM *prwm); int FFireRwm(RWM *prwm, int fAim); void ClearRwmFireInfo(RWM *prwm); void ClearRwmTargetInfo(RWM *prwm); void ClearRwmAimConstraints(RWM *prwm); void GetRwfiPosMat(RWFI *prwfi, VECTOR *ppos, MATRIX3 *pmat); void GetRwtiPos(RWTI *prwti, VECTOR *pposSource, VECTOR *ppos); void GetRwacPan(RWAC *prwac, float *pradPan); void GetRwacTilt(RWAC *prwac, float *pradTilt); #endif // RWM_H ================================================ FILE: include/sb.h ================================================ /** * @file sb.h * * @brief Snow boss. */ #ifndef SB_H #define SB_H #include /** * @class S_BOSS_GUARD * @brief Snow boss guard (Panda King). */ struct SBG : public STEPGUARD { // ... }; void PostSbgLoad(SBG *psbg); undefined4 FUN_001a9928(SBG *psbg); void UpdateSbgGoal(SBG *psbg, int fEnter); void UpdateSbgSgs(SBG *psbg, SGS sgsPrev, ASEG *pasegTargetOverride); void UpdateSbg(SBG *psbg, float dt); // ... int FAbsorbSbgWkr(SBG *psbg, WKR *pwkr); // ... #endif // SB_H ================================================ FILE: include/sce/libdma.h ================================================ /** * @file libdma.h * * @brief Direct memory access library. */ #ifndef LIBDMA_H #define LIBDMA_H typedef unsigned char u_char; typedef unsigned short u_short; typedef unsigned int u_int; extern "C" { struct tD_CHCR { unsigned DIR : 1; /* Direction */ unsigned pad0: 1; unsigned MOD : 2; /* Mode */ unsigned ASP : 2; /* Address stack pointer */ unsigned TTE : 1; /* Tag trasfer enable */ unsigned TIE : 1; /* Tag interrupt enable */ unsigned STR : 1; /* start */ unsigned pad1: 7; unsigned TAG :16; /* DMAtag */ }; struct _sceDmaTag { u_short qwc; /* transfer count */ u_char mark; /* mark */ u_char id; /* tag */ _sceDmaTag *next; /* next tag */ u_int p[2]; /* padding */ } __attribute__ ((aligned(16))); struct sceDmaChan { tD_CHCR chcr; // Channel control u_int p0[3]; volatile void *madr; // Transfer memory address u_int p1[3]; volatile u_int qwc; // Transfer count u_int p2[3]; volatile _sceDmaTag *tadr; // Transfer tag address u_int p3[3]; volatile void *as0; // Address stack 0 u_int p4[3]; volatile void *as1; // Address stack Dn_ASR1 u_int p5[3]; u_int p6[4]; // pad u_int p7[4]; // pad void* sadr; // SPR address u_int p8[3]; }; /** * @brief Get a DMA channel structure by ID * * @param id Channel number * @return sceDmaChan* */ sceDmaChan *sceDmaGetChan(int id); /** * @brief Reset the DMA controller * * @param mode 0 = disable, 1 = enable * @return Previous mode before reset */ int sceDmaReset(int mode); // ... /** * @brief Start DMA transfer from memory to a device using Source Chain Mode. * * @param chan DMA channel for performing the transfer * @param tag Starting address of the transfer list */ void sceDmaSend(sceDmaChan *chan, void *tag); /** * @todo Document this function. */ u_int sceDmaSync(sceDmaChan *pdmaChan, int mode, int timeout); } #endif // LIBDMA_H ================================================ FILE: include/sce/memset.h ================================================ /** * @file memset.h * * @brief Memset. */ #ifndef MEMSET_H #define MEMSET_H #include extern "C" { void* memset(void* ptr, int value, size_t num); } #endif // MEMSET_H ================================================ FILE: include/sce/rand.h ================================================ /** * @file rand.h * @note /sce/ee/gcc/src/newlib/libc/stdlib/rand.c * * @brief Random number generation. */ #ifndef RAND_H #define RAND_H typedef unsigned int undefined4; typedef unsigned int u_int; extern "C" { struct RNG { undefined4 field0_0x0; undefined4 field1_0x4; undefined4 field2_0x8; undefined4 field3_0xc; undefined4 field4_0x10; undefined4 field5_0x14; undefined4 field6_0x18; undefined4 field7_0x1c; undefined4 field8_0x20; undefined4 field9_0x24; undefined4 field10_0x28; undefined4 field11_0x2c; undefined4 field12_0x30; undefined4 field13_0x34; undefined4 field14_0x38; undefined4 field15_0x3c; undefined4 field16_0x40; undefined4 field17_0x44; undefined4 field18_0x48; undefined4 field19_0x4c; undefined4 field20_0x50; undefined4 field21_0x54; u_int next; }; /** * @brief Seed the random number generator. */ void srand(u_int seed); /** * @brief Generate a random number. */ u_int rand(); }; #endif // RAND_H ================================================ FILE: include/screen.h ================================================ /** * @file screen.h * * @brief GUI elements. */ #ifndef SCREEN_H #define SCREEN_H #include "common.h" #include #include struct SHD; // Forward declaration. class CTextEdge; // Forward declaration // MARK: Blot enum BLOTE { BLOTE_Nil = -1, BLOTE_Left = 0, BLOTE_Right = 1, BLOTE_Top = 2, BLOTE_Bottom = 3, BLOTE_Max = 4 }; enum BLOTK { BLOTK_Nil = -1, // ... BLOTK_Max = 0x1d }; enum BLOTS { BLOTS_Nil = -1, BLOTS_Hidden = 0, BLOTS_Appearing = 1, BLOTS_Visible = 2, BLOTS_Disappearing = 3, BLOTS_Max = 4 }; struct BLOTI { float x, y; BLOTE blote; BLOTK blotkPeg; BLOTE blotePeg; }; struct BLOT { union { VTBLOT *pvtblot; VTNOTE *pvtnote; VTBINOC *pvtbinoc; VTTIMER *pvttimer; VTTOTALS *pvttotals; }; CFont *pfont; char achzDraw[512]; RGBA rgba; float rFontScale; CTextEdge *pte; BLOTK blotk; BLOTI *bloti; float x, y; float xOn, yOn; float dx, dy; float width, height; float uOn; float dtAppear; float dtVisible; float dtDisappear; float dtBlotsExtra; BLOTS blots; float tBlots; float *ptNow; int fActive; }; // MARK: Timer /** * @brief Timer state. */ enum TIMERS { TIMERS_Nil = -1, TIMERS_Expired = 0, TIMERS_Paused = 1, TIMERS_Running = 2, TIMERS_Max = 3 }; struct TIMER : public BLOT { TIMERS timers; float tTimers; float dt; float svt; int nSecondsLast; int nTenthsLast; float dtThreshold; RGBA rgbaThreshold; void *pfntnThreshold; // should be a function pointer int fThreshold; float dtExpire; void *pfntnExpire; // should be a function pointer int fStopped; }; // MARK: Counters struct CTR : public BLOT { int nDisplay; int *pnActual; int *pnTotal; float dgDisplayMax; float uRemain; void (*pfnsmack)(void *); void *pv; }; struct TRUNKCTR : public CTR { }; struct CRUSHERCTR : public CTR { }; struct LIFECTR : public CTR { }; struct CLUECTR : public CTR { }; struct KEYCTR : public CTR { }; struct COINCTR : public CTR { }; extern LIFECTR g_lifectr; extern CLUECTR g_cluectr; extern KEYCTR g_keyctr; extern COINCTR g_coinctr; // MARK: Totals struct TOTALS : public BLOT { int fReshow; GRFLS grflsReshow; }; extern TOTALS g_totals; // MARK: Note struct NOTE : public BLOT { STRUCT_PADDING(6); struct NOTE *unk278; }; extern NOTE g_note; // MARK: Letterbox struct LETTERBOX : public BLOT { // empty }; // MARK: Title struct TITLE : public BLOT { int fReshow; char *pchzReshow; }; // MARK: Attract struct ATTRACT : public BLOT { int fJoyValid; int fReshow; char *pchzReshow; }; // MARK: Logo struct LOGO : public BLOT { SHD *pshd; }; // MARK: CTextEdge class CTextEdge { CFont *m_pfont; char m_ch; // 3 empty bytes for alignment float m_dxExtra; float m_dyExtra; float m_rxScaling; float m_ryScaling; RGBA m_rgba; }; // Global blots extern LIFECTR g_lifectr; extern CLUECTR g_cluectr; extern KEYCTR g_keyctr; extern COINCTR g_coinctr; void StartupScreen(); void PostBlotsLoad(); void UpdateBlots(); void ForceHideBlots(); void ResetBlots(); void RenderBlots(); void DrawBlots(); void InitBlot(BLOT *pblot, BLOTK blotk); void PostBlotLoad(BLOT *pblot); void UpdateBlot(BLOT *pblot); void SetBlotAchzDraw(BLOT *pblot, char *achzDraw); void FUN_001aa5a0(undefined1 *param_1); void SetBlotFontScale(float rFontScale, BLOT *pblot); void DrawBlot(BLOT *pblot); float DtAppearBlot(BLOT *pblot); float DtVisibleBlot(BLOT *pblot); float DtDisappearBlot(BLOT *pblot); void SetBlotDtAppear(BLOT *pblot, float dtAppear); void SetBlotDtVisible(BLOT *pblot, float dtVisible); void SetBlotDtDisappear(BLOT *pblot, float dtDisappear); void OnBlotReset(BLOT *pblot); void ShowBlot(BLOT *pblot); void HideBlot(BLOT *pblot); void SetBlotBlots(BLOT *pblot, BLOTS blots); int pfnFIncludeBlotForPeg(BLOT *pblot, BLOT *pblotOther); void ResizeBlot(BLOT *pblot, float dx, float dy); void RepositionBlot(BLOT *pblot); void RepositionBlotDependents(BLOT *pblot); void SetBlotClock(BLOT *pblot, float *pt); void PostCtrLoad(CTR *pctr); void UpdateCtr(CTR *pctr); void DrawCtr(CTR *pctr); void RebuildCtrAchzDraw(CTR *pctr); float DtVisibleCtr(CTR *pctr); void FUN_001ab600(BLOT *pblot); void UpdateTimer(TIMER *ptimer); void DrawTimer(TIMER *ptimer); void SetTimer(TIMER *ptimer, float dt); void SetTimerSpeed(TIMER *ptimer, float svt); void SetTimerExpire(TIMER *ptimer, float dt, void *pfntn); void StartTimer(TIMER *ptimer); void StartTimer(TIMER *ptimer); void RebuildTimerAchzDraw(TIMER *ptimer, float dt); void SetTimerTimers(TIMER *ptimer, TIMERS timers); float DtVisibleTrunkctr(TRUNKCTR *ptrunkctr); float DtVisibleCrusherctr(CRUSHERCTR *pcrusherctr); void FUN_001abe70(BLOT *pblot); void FUN_001ac060(BLOT *pblot); void FUN_001ac0e8(int param_1); void PostNoteLoad(); void PostNoteLoad(BLOT *pblot); void SetNoteAchzDraw(NOTE *pnote, char *pchz); void DrawNote(BLOT *pblot); void FUN_001ac888(BLOT *pblot); void FUN_001ac910(undefined8 param_1, char *param_2); void FUN_001ac990(BLOT *pblot, int param_2); undefined4 FUN_001ac9e0(BLOT *pblot, BLOT *pblotOther); void FUN_001aca30(BLOT *pblot); void FUN_001aca68(BLOT *pblot); void DrawTitle(TITLE *ptitle); void PostTotalsLoad(TOTALS *ptotals); void FUN_001ace38(undefined8 param_1, long param_2); ulong FUN_001acee0(char *pchz, uint *param_2, ulong param_3); void render_level_info_from_id(BLOT *pblot, uint level_id); void render_level_info(BLOT *pblot, uint world_id, uint map_id); void render_hideout_world_info(BLOT *pblot, int world_id); void SetTotalsBlots(TOTALS *ptotals, BLOTS blots); void ShowTotals(TOTALS *ptotals); void HideTotals(TOTALS *ptotals); void DrawTotals(TOTALS *ptotals); void FUN_001ad6a8(undefined8 param_1); void FUN_001ad718(BLOT *pblot); void FUN_001ad7b0(int param_1); void FUN_001ad940(BLOT *pblot); void FUN_001ad970(BLOT *pblot, uint blots); void DrawLetterbox(LETTERBOX *pletterbox); void FUN_001adc60(undefined8 param_1); void DrawLogo(LOGO *ploto); void FUN_001adf28(BLOT *pblot); void FUN_001adff0(BLOT *pblot); void FUN_001ae130(BLOT *pblot, int param_2); void UpdateAttract(ATTRACT *pattract); void DrawLineScreen(uint x1, uint y1, uint z1, uint x2, uint y2, uint z2, RGBA *rgba, int fDepthTest); #endif // SCREEN_H ================================================ FILE: include/sdk/ee/eekernel.h ================================================ /** * @file kernel.h * * @brief Control for semaphores and threads. */ #ifndef KERNEL_H #define KERNEL_H // FlushCache modes #define WRITEBACK_DCACHE 0 #define INVALIDATE_DCACHE 1 #define INVALIDATE_ICACHE 2 #define INVALIDATE_CACHE (INVALIDATE_DCACHE | INVALIDATE_ICACHE) /* XXX this is a bit extra, but should match SCE headers */ extern "C" { /** * @brief Thread parameters for initialization */ struct ThreadParam { int status; // Thread status void (*entry)(void *); // Thread entry point void *stack; // Stack address used by the thread (16-byte aligned) int stackSize; // Stack size in bytes, must be a multiple of 16 void *gpReg; // GP register value int initPriority; // Initial thread priority (1-127). Must be specified when creating a thread int currentPriority; // Current thread priority unsigned int attr; // Reserved for system use unsigned int option; // Reserved for system use int waitType; // Wait type int waitId; // Semaphore ID if waitType is "semaphore" int wakeupCount; // Wakeup request count }; /** * @brief Semaphore parameters for initialization */ struct SemaParam { int currentCount; // Current semaphore count int maxCount; // Maximum semaphore count int initCount; // Initial semaphore count int numWaitThreads; // Number of threads waiting on the semaphore unsigned int attr; // Semaphore attributes unsigned int option; // Optional user-defined data }; /** * @brief Create a counting semaphore object. * * @details Up to 256 semaphores can be created, 3 of which are reserved during runtime * initialization by `crt0.s` (2 from `_InitSys` and 1 from `InitThread`). * * @param sparam Initial semaphore parameters * @return Semaphore ID on success, -1 if creation would exceed the maximum number of semaphores * or a negative value was passed for `sema->initCount` */ int CreateSema(SemaParam *sparam); /** * @brief Get semaphore resource * * @param sema Semaphore ID * @return Semaphore count on success, -1 on failure */ int WaitSema(int sema); /** * @brief Release semaphore resource * * @details If the `sid` value is 0 and there is no free space in the semaphore queue, * the thread at the wait queue start will be released and placed in READY state. * In all other cases, the value of the semaphore is incremented. * * @param sid Semaphore ID * @return Semaphore ID on success, -1 on failure */ int SignalSema(int sid); /** * @brief Create a new thread * * @details The created thread is placed in a DORMANT state and not executed until the thread is started. * * @param tparam Initial thread parameters * * @return Thread ID on success, -1 on failure */ int CreateThread(struct ThreadParam *tparam); /** * @brief Get the ID of the calling thread. * * @return Thread ID */ int GetThreadId(); /** * @brief Change the priority of a thread * * @details The thread will be entered at the end of the ready queue at the corresponding priority. * The new priority setting will be valid until the thread is terminated or the priority is changed again. * * @param tid Thread ID * @param priority New priority (1-127) * * @return The previous priority of the thread on success, -1 on failure */ int ChangeThreadPriority(int tid, int priority); /** * @brief Flushes the cache. * @param mode Can be WRITEBACK_DCACHE, INVALIDATE_DCACHE, INVALIDATE_ICACHE, or INVALIDATE_CACHE */ void FlushCache(int mode); } #endif // KERNEL_H ================================================ FILE: include/sdk/ee/eestruct.h ================================================ /** * @file include/sdk/ee/eestruct.h * * @brief Graphics synthesizer. */ #ifndef SCE_EESTRUCT_H #define SCE_EESTRUCT_H // TODO: Remove this. #include "types.h" extern "C" { struct sceGsTex0 { undefined4 unk_0x0; undefined4 unk_0x4; }; struct sceGsTex2 { undefined4 unk_0x0; undefined4 unk_0x4; }; /** * @todo Figure out is this in the right place. */ void sceGsResetPath(); } #endif // SCE_EESTRUCT_H ================================================ FILE: include/sdk/ee/libpad.h ================================================ /** * @file include/sdk/ee/libpad.h * * @brief Joypad (controller) library. */ #ifndef PAD_H #define PAD_H typedef unsigned char u_char; extern "C" { int scePadInit(int mode); int scePadPortOpen(int port, int slot, void *data); int scePadGetState(int port, int slot); int scePadInfoAct(int port, int slot, int actno, int term); int scePadInfoMode(int port, int slow, int term, int offs); int scePadSetMainMode(int port, int slow, int offs, int lock); int scePadSetActDirect(int port, int slot, const u_char *data); int scePadSetActAlign(int port, int slow, const u_char *data); int scePadInfoPressMode(int port, int slot); int scePadEnterPressMode(int port, int slot); int scePadExitPressMode(int port, int slot); } #endif // PAD_H ================================================ FILE: include/sdk/ee/sifdev.h ================================================ #ifndef SIFDEV_H #define SIFDEV_H extern "C" { int sceSifLoadFileReset(); int sceSifLoadModule(const char *filename, int args, const char *argp); int sceSifRebootIop(const char *img); int sceSifSyncIop(void); }; #endif // SIFDEV_H ================================================ FILE: include/sdk/ee/sifrpc.h ================================================ #ifndef SIFRPC_H_ #define SIFRPC_H_ extern "C" { typedef void (*sceSifEndFunc)(void*); typedef void* (*sceSifRpcFunc)(unsigned, void*, int); struct _sif_rpc_data { // 0x10 /* 0x0 */ void* paddr; /* 0x4 */ unsigned int pid; /* 0x8 */ int tid; /* 0xc */ unsigned int mode; }; typedef _sif_rpc_data sceSifRpcData; struct _sif_client_data { // 0x28 /* 0x00 */ struct _sif_rpc_data rpcd; /* 0x10 */ unsigned int command; /* 0x14 */ void* buff; /* 0x18 */ void* cbuff; /* 0x1c */ sceSifEndFunc func; /* 0x20 */ void* para; /* 0x24 */ struct _sif_serve_data* serve; }; typedef _sif_client_data sceSifClientData; struct _sif_serve_data { // 0x44 /* 0x00 */ unsigned int command; /* 0x04 */ sceSifRpcFunc func; /* 0x08 */ void* buff; /* 0x0c */ int size; /* 0x10 */ sceSifRpcFunc cfunc; /* 0x14 */ void* cbuff; /* 0x18 */ int csize; /* 0x1c */ sceSifClientData* client; /* 0x20 */ void* paddr; /* 0x24 */ unsigned int fno; /* 0x28 */ void* receive; /* 0x2c */ int rsize; /* 0x30 */ int rmode; /* 0x34 */ unsigned int rid; /* 0x38 */ struct _sif_serve_data* link; /* 0x3c */ struct _sif_serve_data* next; /* 0x40 */ struct _sif_queue_data* base; }; typedef _sif_serve_data sceSifServeData; struct _sif_queue_data { // 0x18 /* 0x00 */ int key; /* 0x04 */ int active; /* 0x08 */ struct _sif_serve_data* link; /* 0x0c */ struct _sif_serve_data* start; /* 0x10 */ struct _sif_serve_data* end; /* 0x14 */ struct _sif_queue_data* next; }; typedef _sif_queue_data sceSifQueueData; void sceSifInitRpc(unsigned int mode); int sceSifBindRpc(sceSifClientData*, unsigned int, unsigned int); int sceSifCallRpc(sceSifClientData*, unsigned int, unsigned int, void*, int, void*, int, sceSifEndFunc, void*); int sceSifCheckStatRpc(sceSifRpcData*); } #endif // SIFRPC_H_ ================================================ FILE: include/sdk/libcdvd.h ================================================ /** * @file include/sdk/libcdvd.h * * @brief DVD handler. */ #ifndef EEDVD_H #define EEDVD_H typedef unsigned char u_char; typedef unsigned int u_int; extern "C" { struct sceCdRMode { u_char trycount; u_char spindlctrl; u_char datapattern; u_char pad; }; enum SCECdvdMediaType { SCECdGDTFUNCFAIL = -1, SCECdNODISC = 0x00, SCECdDETCT, SCECdDETCTCD, SCECdDETCTDVDS, SCECdDETCTDVDD, SCECdUNKNOWN, SCECdPSCD = 0x10, SCECdPSCDDA, SCECdPS2CD, SCECdPS2CDDA, SCECdPS2DVD, SCECdDVDVR = 0xFC, SCECdCDDA = 0xFD, SCECdDVDV, SCECdIllegalMedia }; int sceCdSync(int mode); int sceCdInit(int mode); int sceCdDiskReady(int mode); int sceCdMmode(int mode); int sceCdRead(u_int lbn, u_int sectors, void *buf, sceCdRMode *mode); int sceCdGetDiskType(void); int sceCdGetError(void); int sceCdBreak(void); }; #endif // EEDVD_H ================================================ FILE: include/sensor.h ================================================ #ifndef SENSOR_H #define SENSOR_H #include "common.h" #include #include #include #include // Forward. struct RO; /** * @brief Sensor state. */ enum SENSORS { SENSORS_Nil = -1, SENSORS_SenseEnabling = 0, SENSORS_SenseEnabled = 1, SENSORS_SenseTriggered = 2, SENSORS_SenseDisabling = 3, SENSORS_DamageEnabling = 4, SENSORS_DamageEnabled = 5, SENSORS_DamageTriggered = 6, SENSORS_DamageDisabling = 7, SENSORS_Disabled = 8, SENSORS_Max = 9 }; /** * @brief Sensor mode. */ enum SENSM { SENSM_Nil = -1, SENSM_SenseOnly = 0, SENSM_DamageTarget = 1, SENSM_Max = 2 }; /** * @brief (?) state. */ enum CSDTS { CSDTS_Nil = -1, CSDTS_Focus = 0, CSDTS_Zap = 1, CSDTS_Unfocus = 2, CSDTS_Max = 3, }; /** * @class _SENSOR * @brief Base class for security sensors. * @todo Implement the struct. */ struct SENSOR : public SO { /* 0x550 */ ALARM *palarm; // Pointer to the alarm this sensor is associated with. STRUCT_PADDING(1); /* 0x558 */ SENSORS sensors; // Current sensor state. STRUCT_PADDING(2); /* 0x564 */ uint ctriggerObjects; // Current count of trigger object IDs. /* 0x568 */ OID atriggerObjects[4]; // Array of trigger object IDs. STRUCT_PADDING(4); /* 0x578 */ uint cnoTriggerObjects; // Current count of no-trigger object IDs. /* 0x57C */ OID anoTriggerObjects[4]; // Array of no-trigger object IDs. STRUCT_PADDING(4); /* 0x58c */ uint ctriggerClasses; // Current count of trigger class IDs. /* 0x590 */ CID atriggerClasses[4]; // Array of trigger class IDs. STRUCT_PADDING(4); /* 0x5a0 */ uint cnoTriggerClasses; // Current count of no-trigger class IDs. /* 0x5a4 */ CID anoTriggerClasses[4]; // Array of no-trigger class IDs. }; /** * @class LASER_SENSOR * @brief Laser sensor for alarm systems. * @todo Implement the struct. */ struct LASEN : public SENSOR { // ... }; /** * @class CAMERA_SENSOR * @brief Camera sensor for alarm system. * @todo Implement the struct. */ struct CAMSEN : public SENSOR { // ... }; /** * @class PRESSURE_SENSOR * @brief Pressusre sensor for alarm systems. * @todo Implement the struct. */ struct PRSEN : public SENSOR { // ... }; /** * @brief Laser beam? * @todo Implement the struct. */ struct LBEAM { // ... }; // MARK: SENSOR methods /** * @brief Sets the default values for the sensor. * * @param psensor Pointer to the sensor to initialize. */ void InitSensor(SENSOR *psensor); /** * @brief Sets the sensor's associated alarm. * * @param psensor Pointer to the sensor. * @param palarm Pointer to the alarm to associate with the sensor. */ void SetSensorAlarm(SENSOR *psensor, ALARM *palarm); /** * @brief Sets the sensor's state and handles triggering the sensor's alarm. * * @param psensor Pointer to the sensor. * @param sensors New sensor state. * * If the sensor is transitioning from SENSORS_SenseEnabled to SENSORS_SenseTriggered, * it will trigger the associated alarm if one is set. If the sensor's state changes, * it will also notify any listeners of the change via an LO splice event. * */ void SetSensorSensors(SENSOR *psensor, SENSORS sensors); int FCheckSensorObject(SENSOR *psensor, SO *psoOther); int FIgnoreSensorObject(SENSOR *psensor, SO *psoOther); int FOnlySensorTriggerObject(SENSOR *psensor, SO *psoOther); void PauseSensor(SENSOR *psensor); void UpdateSensor(SENSOR *psensor, float dt); /** * @brief Add an object ID to the sensor's trigger list. * * @param psensor Pointer to the sensor. * @param oid Object ID to add. */ void AddSensorTriggerObject(SENSOR *psensor, OID oid); /** * @brief Add an object ID to the sensor's no-trigger list. * * @param psensor Pointer to the sensor. * @param oid Object ID to add. */ void AddSensorNoTriggerObject(SENSOR *psensor, OID oid); /** * @brief Add a class ID to the sensor's trigger class list. * * @param psensor Pointer to the sensor. * @param cid Class ID to add. */ void AddSensorTriggerClass(SENSOR *psensor, CID cid); /** * @brief Add a class ID to the sensor's no-trigger class list. * * @param psensor Pointer to the sensor. * @param cid Class ID to add. */ void AddSensorNoTriggerClass(SENSOR *psensor, CID cid); // MARK: LASEN methods void InitLasen(LASEN *plasen); void LoadLasenFromBrx(LASEN *plasen, CBinaryInputStream *pbis); void BindLasen(LASEN *plasen); void PostLasenLoad(LASEN *plasen); void UpdateBusyLasenSenseTimes(); void UpdateLasen(LASEN *plasen, float dt); void FreezeLasen(LASEN *plasen, int fFreeze); void RenderLasenSelf(LASEN *plasen, CM *pcm, RO *pro); int FFilterLasen(void *pv, SO *pso); void SenseLasen(LASEN *plasen, SENSORS *psensors); void EnableLasen(LASEN *plasen, SENSM sensm); void DisableLasen(LASEN *plasen); void OnLasenAlarmTriggered(LASEN *plasen); void SetLasenSensors(LASEN *plasen, SENSORS sensors); float SCalcLasenShapeExtent(LASEN *plasen, LBEAM *plbeam); void RetractLasen(LASEN *plasen, float dtRetract); void ExtendLasen(LASEN *plasen, float dtExpand); // MARK: CAMSEN methods void InitCamsen(CAMSEN *pcamsen); void PostCamsenLoad(CAMSEN *pcamsen); void UpdateCamsen(CAMSEN *pcamsen, float dt); void RenderCamsenSelf(CAMSEN *pcamsen, CM *pcm, RO *pro); int FIgnoreCamsenIntersection(CAMSEN *pcamsen, SO *psoOther); int FFilterCamsen(void *pv, SO *pso); void SenseCamsen(CAMSEN *pcamsen, SENSORS *psensors); void EnableCamsen(CAMSEN *pcamsen, SENSM sensm); void DisableCamsen(CAMSEN *pcamsen); void OnCamsenAlarmTriggered(CAMSEN *pcamsen); void SetCamsenSensors(CAMSEN *pcamsen, SENSORS sensors); void SetCamsenCsdts(CAMSEN *pcamsen, CSDTS csdts); // MARK: PRSEN methods void InitPrsen(PRSEN *pprsen); void PostPrsenLoad(PRSEN *pprsen); void UpdatePrsen(PRSEN *pprsen, float dt); void SensePrsen(PRSEN *pprsen, SENSORS *psensors); void EnablePrsen(PRSEN *pprsen, SENSM sensm); void DisablePrsen(PRSEN *pprsen); void OnPrsenAlarmTriggered(PRSEN *pprsen); void SetPrsenSensors(PRSEN *pprsen, SENSORS sensors); void UpdatePrsenLoopShader(PRSEN *pprsen); #endif // SENSOR_H ================================================ FILE: include/shadow.h ================================================ /** * @file shadow.h */ #ifndef SHADOW_H #define SHADOW_H #include "common.h" #include #include #include #include #include // Forward. struct SHD; /** * @brief Shadow. * @todo Implement the struct. */ struct SHADOW { /* 0x00 */ SHD *pshd; /* 0x04 */ float sNearRadius; /* 0x08 */ float sFarRadius; /* 0x0c */ STRUCT_PADDING(13); /* 0x40 */ float sNearCast; /* 0x44 */ float sFarCast; /* 0x48 */ STRUCT_PADDING(26); /* 0xb0 */ OID oidDysh; /* 0xb4 */ STRUCT_PADDING(3); /* 0xc0 */ int cqwVifs; }; void InitShadow(SHADOW *pshadow); void PostShadowLoad(SHADOW *pshadow); void InvalidateShadowVifs(SHADOW *pshadow); void RebuildShadowRegion(SHADOW *pshadow); void SetShadowShader(SHADOW *pshadow, OID oidShdShadow); int FShadowRadiusSet(SHADOW *pshadow); void SetShadowNearRadius(SHADOW *pshadow, float sNearRadius); void SetShadowFarRadius(SHADOW *pshadow, float sFarRadius); void SetShadowCastPosition(SHADOW *pshadow, VECTOR *pposCast); void SetShadowCastNormal(SHADOW *pshadow, VECTOR *pnormalCast); void SetShadowNearCast(SHADOW *pshadow, float sNearCast); void SetShadowFarCast(SHADOW *pshadow, float sFarCast); void SetShadowConeAngle(SHADOW *pshadow, float degConeAngle); void SetShadowFrustrumUp(SHADOW *pshadow, VECTOR *pvecUp); int FShadowValid(SHADOW *pshadow, GRFGLOB grfglob); int FFilterFastShadows(void *pv, SO *pso); void UpdateShadow(SHADOW *pshadow, float dt); void RebuildShadowVifs(SHADOW *pshadow); void DrawShadow(SHADOW *pshadow); int FShadowIntersectsSphere(SHADOW *pshadow, VECTOR *ppos, float sRadius); void FindSwShadows(SW *psw, VECTOR *ppos, float sRadius, int cpshadowMax, int *pcpshadow, SHADOW ** apshadow); #endif // SHADOW_H ================================================ FILE: include/shape.h ================================================ /** * @file shape.h */ #ifndef SHAPE_H #define SHAPE_H #include "common.h" #include #include #include #include #include /** * @class SHAPE * @brief Unknown. */ struct SHAPE : public LO { CRV *pcrv; }; void LoadShapeFromBrx(SHAPE *pshape, CBinaryInputStream *pbis); void SetShapeParent(SHAPE *pshape, ALO *paloParent); #endif // SHAPE_H ================================================ FILE: include/shd.h ================================================ /** * @file shd.h * * @brief Shaders. */ #ifndef SHD_H #define SHD_H #include "common.h" #include #include #include #include #include #include typedef struct SHD; // Forward declaration typedef struct SHDP; // Forward declaration typedef int GRFZON; /** * @brief (?) kind. */ enum CTK { CTK_Nil = -1, CTK_Original = 0, CTK_Pass0 = 0, CTK_Ambient = 0, CTK_Pass1 = 1, CTK_Diffuse = 1, CTK_Saturation = 2, CTK_Pass2 = 2, CTK_Max = 3, }; // MARK: BMP struct BMPF { short dx; short dy; uint grfzon; uchar psm; uchar cgsRow; short cgsPixels; uint cbPixels; uchar *pbPixels; }; struct BMP : public BMPF { int cqwPixels; sceGsTex0 tex0; }; // MARK: CLUT struct CLUTF { uint grfzon; ushort crgba; ushort cgsColors; RGBA *prgba; }; struct CLUT : public CLUTF { int cqwColors; sceGsTex2 tex2; }; // MARK: Texture? struct TCX { float du; float dv; }; struct TEXF { ushort OID; short grdtex; uchar cibmp; uchar ciclut; }; struct TEX : public TEXF { ushort unk_0; SHD *pshd; BMP **apbmp; CLUT **apclut; }; // MARK: SAIR struct SAIR { SHDP *pshdp; SUR *psur; SAIR *psairNext; }; // MARK: SAI struct SAI { int grfsai; SHD *pshd; int iframe; TCX txt; SAIR *psairFirst; SAI *psaiNext; }; // MARK: SAA enum SAAK { SAAK_Nil = -1, SAAK_None = 0, SAAK_Loop = 1, SAAK_PingPong = 2, SAAK_Shuffle = 3, SAAK_Hologram = 4, SAAK_Eyes = 5, SAAK_Scroller = 6, SAAK_Circler = 7, SAAK_Looker = 8, SAAK_Max = 9 }; struct SAA { undefined4 unk_0; float tUpdates; SAAK saak; OID oid; SAI sai; }; /** * @brief Unknown. */ struct SAAF { // ... }; // MARK: SHD enum SHDK { SHDK_Nil = -1, SHDK_ThreeWay = 0, SHDK_Prelit = 1, SHDK_Shadow = 2, SHDK_SpotLight = 3, SHDK_ProjectedVolume = 4, SHDK_CreateTexture = 5, SHDK_Background = 6, SHDK_Foreground = 7, SHDK_WorldMap = 8, SHDK_MurkClear = 9, SHDK_MurkFill = 10, SHDK_Max = 11 }; struct SHDP { int cqwRegs; QW *aaqwRegs; }; struct SHDF { /* 0x00 */ uchar shdk; /* 0x01 */ uchar grfshd; /* 0x02 */ short oid; RGBA rgba; RGBA rgbaVolume; uint grfzon; ushort OidAltSat; uchar rp; uchar ctex; }; struct SHD : public SHDF { TEX *atex; int cshdp; SHDP *ashdp; int cframe; SAA *psaa; }; /** * @brief Unknown. * @todo Does this belong here? */ struct SLI { }; sceGsTex0 Tex0FromTexIframeCtk(TEX *ptex, int iframe, CTK ctk); void PackTexGifs(TEX *ptex, int iframe, CTK ctk, SHDK shdk, GIFS *pgifs); void LoadClutFromBrx(CBinaryInputStream *pbis, CLUT *pclut); void LoadColorTablesFromBrx(CBinaryInputStream *pbis); void LoadBmpFromBrx(CBinaryInputStream *pbis, BMP *pbmp); void LoadBitmapsFromBrx(CBinaryInputStream *pbis); void LoadFontsFromBrx(CBinaryInputStream *pbis); void LoadTexFromBrx(CBinaryInputStream *pbis, TEX *ptex); void LoadShadersFromBrx(CBinaryInputStream *pbis); void UploadPermShaders(); void PropagateShaders(GRFZON grfzonCamera); void FillShaders(GRFZON grfzon); void UnloadShaders(); void ConvertRgbToHsv(VECTOR *pvecRGB, VECTOR *pvecHSV); void ConvertHsvToRgb(VECTOR *pvecHSV, VECTOR *pvecRGB); void ConvertUserHsvToUserRgb(VECTOR *pvecHSV, VECTOR *pvecRGB); void ConvertUserRgbToUserHsv(VECTOR *pvecRGB, VECTOR *pvecHSV); SHD *PshdFindShader(OID oid); void SetSaiIframe(SAI *psai, int iframe); void SetSaiDuDv(SAI *psai, float du, float dv); void PropagateSais(); void UpdateShaders(float dt); #endif // SHD_H ================================================ FILE: include/shdanim.h ================================================ /** * @file shdanim.h * * @brief Shader animations. */ #ifndef SHDANIM_H #define SHDANIM_H #include "common.h" #include #include // Forward. struct UV; struct UVQD; struct POSAD; struct RPL; /** * @brief Unknown. * @todo Implement the struct. */ struct LOOP : public SAA { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct PINGPONG : public SAA { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct SHUFFLE : public SAA { float dtPauseMin; float dtPauseMax; float dtPause; }; /** * @brief Level transition hologram? * @todo Implement the struct. */ struct HOLOGRAM : public SAA { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct SCROLLER : public SAA { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct CIRCLER : public SAA { // ... }; /** * @brief Unknown. * @todo Implement the struct. */ struct LOOKER : public SAA { // ... }; int CbFromSaak(SAAK saak); VTSAA *PvtsaaFromSaak(SAAK saak); SAA *PsaaLoadFromBrx(CBinaryInputStream *pbis); void InitSaa(SAA *psaa, SAAF *psaaf); void PostSaaLoad(SAA *psaa); int FUpdatableSaa(SAA *psaa); float UCompleteSaa(SAA *psaa); SAI *PsaiFromSaaShd(SAA *psaa, SHD *pshd); void InitLoop(LOOP *ploop, SAAF *psaaf); void PostLoopLoad(LOOP *ploop); void UpdateLoop(LOOP *ploop, float dt); float UCompleteLoop(LOOP *ploop); void InitPingpong(PINGPONG *ppingpong, SAAF *psaaf); void PostPingpongLoad(PINGPONG *ppingpong); void UpdatePingpong(PINGPONG *ppingpong, float dt); float UCompletePingpong(PINGPONG *ppingpong); void InitShuffle(SHUFFLE *pshuffle, SAAF *psaaf); void UpdateShuffle(SHUFFLE *pshuffle, float dt); void InitHologram(HOLOGRAM *phologram, SAAF *psaaf); void PostHologramLoad(HOLOGRAM *phologram); void NotifyHologramRender(HOLOGRAM *phologram, ALO *palo, RPL *prpl); void InitScroller(SCROLLER *pscroller, SAAF *psaaf); void UpdateScroller(SCROLLER *pscroller, float dt); float UCompleteScroller(SCROLLER *pscroller); void SetScrollerMasterSpeeds(SCROLLER *pscroller, float svu, float svv); void InitCircler(CIRCLER *pcircler, SAAF *psaaf); void UpdateCircler(CIRCLER *pcircler, float dt); float UCompleteCircler(CIRCLER *pcircler); void InitLooker(LOOKER *plooker, SAAF *psaaf); void SetLookerSgvr(LOOKER *plooker, SGVR *psgvr, GLOBSET *pglobset, GLOB *pglob, SUBGLOB *psubglob); void SetVecPosad(VECTOR *pvec, POSAD *pposad); void SetUvPuvqd(UV *puv, UVQD *puvqd); void NotifyLookerRender(LOOKER *plooker, ALO *palo, RPL *prpl); #endif // SHDANIM_H ================================================ FILE: include/sky.h ================================================ /** * @file sky.h * * @brief Skyboxes. */ #ifndef SKY_H #define SKY_H #include "common.h" /** * @class SKY * @brief Skyboxes. * * @todo Fill out the structure. */ struct SKY { // ... }; /** * @brief Initializes the sky with default values. * Calls super function PostAloLoad(). * * @param psky Pointer to the sky. */ void PostSkyLoad(SKY *psky); /** * @brief Updates the given sky. * * @param psky Pointer to the sky. * @param dt Delta time. */ void UpdateSky(SKY *psky, float dt); #endif // SKY_H ================================================ FILE: include/slotheap.h ================================================ /** * @file slotheap.h * * @brief Fixed-size memory pool allocator using a linked list of free slots. */ #ifndef SLOTHEAP_H #define SLOTHEAP_H #include "common.h" /** * @brief Slot. */ struct SLOT { /* 0x00 */ SLOT *pslotNext; }; // 0x04 bytes. /** * @brief Slot heap. */ struct SLOTHEAP { /* 0x00 */ int cb; /* 0x04 */ byte *ab; /* 0x08 */ SLOT *pslotFree; }; // 0x0c bytes. /** * @brief Initializes a slot heap with a linked list of free slots. * * @param pslotheap Pointer to the slot heap. * @param cb Size of a slot in bytes. * @param c Number of slots to allocate. */ void _InitSlotheap(SLOTHEAP *pslotheap, int cb, int c); /** * @brief Creates the slot heap with slots aligned to 8 bytes. * * @param pslotheap Pointer to the slot heap. * @param cb Size of a slot in bytes. * @param c Number of slots to allocate. */ void CreateSlotheapSw(SLOTHEAP *pslotheap, int cb, int c); /** * @brief Creates the slot heap with slots aligned to 64 bytes. * * @param pslotheap Pointer to the slot heap. * @param cb Size of a slot in bytes. * @param c Number of slots to allocate. */ void CreateSlotheapSwAlign64(SLOTHEAP *pslotheap, int cb, int c); /** * @brief Allocates a slot from the slot heap. * * @param pslotheap Pointer to the slot heap. * * @return Pointer to an allocated slot. */ void *PvAllocSlotheapUnsafe(SLOTHEAP *pslotheap); /** * @brief Wrapper for PvAllocSlotheapUnsafe. * * @param pslotheap Pointer to the slot heap. * * @return Pointer to an allocated slot. */ void *PvAllocSlotheapImpl(SLOTHEAP *pslotheap); /** * @brief Allocates a slot from the slot heap and clears it. * * @param pslotheap Pointer to the slot heap. * * @return Pointer to an allocated slot. */ void *PvAllocSlotheapClearImpl(SLOTHEAP *pslotheap); /** * @brief Frees a slot and returns it to the slot heap. * * @param pslotheap Pointer to the slot heap. * @param pv Pointer to the slot being freed. */ void FreeSlotheapPv(SLOTHEAP *pslotheap, void *pv); #endif // SLOTHEAP_H ================================================ FILE: include/sm.h ================================================ /** * @file sm.h * * @brief Probabilistic finite state machines. */ #ifndef SM_H #define SM_H #include "common.h" #include #include #include // Forward declatations. struct SM; struct SMA; struct SMT; struct SMS; struct SMP; struct SMPA; // todo define struct ASEGA; typedef int GRFAPL; typedef int GRFSMT; // State machine transition integer type. /** * @class STATE_MACHINE * @brief State machine defined by a number of states and transitions. */ struct SM : public LO { /* 0x34 */ int csms; // Count of states. /* 0x38 */ SMS *asms; // Array of states. /* 0x3c */ int csmt; // Count of transitions. /* 0x40 */ SMT *asmt; // Array of transitions. /* 0x44 */ int fDefault; /* 0x48 */ DL dlSma; }; /** * @class STATE_MACHINE_APPLICATION * @brief Unknown. */ struct SMA : public BASIC { DLE dleSm; DLE dleSw; SM *psm; ALO *paloRoot; int grfapl; ASEGA *pasegaCur; int ismsCur; int ismsNext; int ismsGoal; SMT *psmtCur; float svtLocal; MQ *pmqFirst; }; /** * @brief State machine transition. */ struct SMT { undefined4 unk_0; int ismsFrom; // From state int ismsTo; // To state GRFSMT grfsmt; // Unknown float gProbability; // Probability of transition }; /** * @brief State machine state. */ struct SMS { OID oid; undefined4 unk_0; }; /** * @brief State machine pace(?). * * @note Used for the Fast/Slow powerups. */ struct SMP { float svFast; // todo check if this is correct float svSlow; float dtFast; }; void LoadSmFromBrx(SM *psm, CBinaryInputStream *pbis); void PostSmLoad(SM *psm); void PostSmLoadCallback(SM *psm, MSGID msgid, void *pvData); SMA *PsmaApplySm(SM *psm, ALO *paloRoot, OID oidInitialState, GRFAPL grfapl); SMA *PsmaFindSm(SM *psm, ALO *paloRoot); int IsmsFindSmOptional(SM *psm, OID oid); int IsmsFindSmRequired(SM *psm, OID oid); OID OidFromSmIsms(SM *psm, int isms); void RetractSma(SMA *psma); void SetSmaGoal(SMA *psma, OID oid); void GetSmaGoal(SMA *psma, OID *poid); void GetSmaCur(SMA *psma, OID *poid); void GetSmaNext(SMA *psma, OID *poid); void SetSmaSvt(SMA *psma, float svt); void SeekSma(SMA *psma, OID oid); void ChooseSmaTransition(SMA *psma); void EndSmaTransition(SMA *psma); void HandleSmaMessage(SMA *psma, MSGID msgid, void *pv); void SkipSma(SMA *psma, float dtSkip); void SendSmaMessage(SMA *psma, MSGID msgid, void *pv); void NotifySmaSpliceOnEnterState(SMA *psma, int ismsFrom, int ismsTo); #endif // SM_H ================================================ FILE: include/smartguard.h ================================================ #ifndef SMARTGUARD_H #define SMARTGUARD_H #include "common.h" #include #include #include #include #include struct SGFT { /* 0x00 */ OID oidTarget; /* 0x04 */ ALO *paloTarget; }; /** * @class SMART_GUARD * @brief non-flashlight guard. */ struct SMARTGUARD : public STEPGUARD { // ... /* 0xc38 */ SGFT mpsgssgft[SGS_Max]; // ... }; void InitSmartguard(SMARTGUARD *psmartguard); void PostSmartguardLoadFlashlight(SMARTGUARD *psmartguard); void UseSmartguardFlashlightTarget(SMARTGUARD *psmartguard, SGS sgs, OID oidTarget); /** * @todo Figure out what this function does, determine the right types and rename. */ void FUN_001B7100(SMARTGUARD *psmartguard, int unk); void PostSmartguardLoad(SMARTGUARD *psmartguard); int FFilterSmartguardDetect(SMARTGUARD *psmartguard, SO *pso); int FDetectSmartguard(SMARTGUARD *psmartguard); void UpdateSmartguard(SMARTGUARD *psmartguard, float dt); void UpdateSmartguardFlashlight(SMARTGUARD *psmartguard); void OnSmartguardEnteringSgs(SMARTGUARD *psmartguard, SGS sgsPrev, ASEG *pasegOverride); int FCanSmartguardAttack(SMARTGUARD *psmartguard); SGAS SgasGetSmartguard(SMARTGUARD *psmartguard); void HandleSmartguardMessage(SMARTGUARD *psmartguard, MSGID msgid, void *pv); void FreezeSmartguard(SMARTGUARD *psmartguard, int fFreeze); #endif // SMARTGUARD_H ================================================ FILE: include/so.h ================================================ /** * @file so.h * * @brief Scene objects. */ #ifndef SO_H #define SO_H #include "common.h" #include #include #include #include #include #include #include #include #include // Forward. class CBinaryInputStream; struct XA; struct XP; struct RO; struct WKR; struct ZPR; struct WATER; struct CNSTR; struct CONSTR; typedef int GRFFSO; /** * @brief Unknown. * @todo Does this belong here? */ enum EGK { // ... }; /** * @brief Unknown. * @todo Does this belong here? */ enum CT { CT_Free = 0, CT_Tangent = 1, CT_Project = 2, CT_Locked = 3 }; enum FSO { FSO_FindChild = 0x1, FSO_FindImmediateChild = 0x2, FSO_FindParent = 0x3, FSO_FindNearest = 0x4, FSO_FindAll = 0x5, GRFFSO_FindMask = 0xFF, FSO_IncludeRemovedObjects = 0x100, FSO_ReturnActualCount = 0x200 }; /** * @class OBJECT * @brief Unknown, related to level objects. * * @todo Implement struct. */ struct SO : public ALO { // ... //* 0x368 */ float mass; }; /** * @brief Initialize the given SO. * * @param pso Pointer to the SO. */ void InitSo(SO *pso); /** * @brief Event handler for SO added to world(?) * * @param pso Pointer to the SO. */ void OnSoAdd(SO *pso); /** * @brief Event handler for SO removed from world(?) * * @param pso Pointer to the SO. */ void OnSoRemove(SO *pso); void EnableSoPhys(SO *pso, int fPhys); void DisplaceSo(SO *pso, int fParentDirty); void ImpactSo(SO *pso, int fParentDirty); void PivotSo(SO *pso, int fParentDirty); void ExtendSoBounds(SO *pso, VECTOR *ppos, float sRadius); void UpdateSoBounds(SO *pso); void UpdateGeomWorld(GEOM *pgeomLocal, GEOM *pgeomWorld, VU_VECTOR pos, MATRIX3 *pmat); void UpdateSoXfWorldHierarchy(SO *pso); void UpdateSoXfWorld(SO *pso); int FIgnoreSoIntersection(SO *pso, SO *psoOther); void UpdateSoImpacts(SO *pso); float UProjectVector(VECTOR *ppos0, VECTOR *ppos1, VECTOR *ppos); void AdjustSoXpLocal(SO *pso, XP *pxp, int ixpd); void CalculateSoAngularEffectWorld(SO *pso, VECTOR *ptau, VECTOR *pdw); void AccelSoTowardPosSpring(SO *pso, VECTOR *pposTarget, CLQ *pclqPos, VECTOR *pvTarget, CLQ *pclqV, float dt); void AccelSoTowardMatSpring(SO *pso, MATRIX3 *pmatTarget, CLQ *pclqRot, VECTOR *pwTarget, CLQ *pclqW, float dt); /** * @brief TODO. */ void PresetSoAccel(SO *pso, float dt); void DrawGeom(GEOM *pgeom, CM *pcm, RGBA *rgba); void RenderSoSelf(SO *pso, CM *pcm, RO *pro); void UpdateSo(SO *pso, float dt); /** * @brief Sets the mass of a scene object. * * @param pso Pointer to the SO. * @param m The new mass value. */ void SetSoMass(SO *pso, float m); void AdjustSoMomint(SO *pso, float r); void DiscardSoXps(SO *pso); void UpdateSoPosWorldPrev(SO *pso); void TranslateSoToPos(SO *pso, VECTOR *ppos); void RotateSoToMat(SO *pso, MATRIX3 *pmat); void TranslateSoToPosSafe(SO *pso, VECTOR *ppos, VECTOR *pdpos); void SetSoVelocityVec(SO *pso, VECTOR *pv); void SetSoAngularVelocityVec(SO *pso, VECTOR *pw); void AddSoAcceleration(SO *pso, VECTOR *pdv); void AddSoAngularAcceleration(SO *pso, VECTOR *pdw); void SetSoConstraints(SO *pso, CT ctForce, VECTOR *pnormalForce, CT ctTorque, VECTOR *pnormalTorque); void SetSoParent(SO *pso, ALO *paloParent); void ApplySoProxy(SO *pso, PROXY *pproxyApply); /** * @brief TODO. */ void AccelSoTowardMatSmooth(SO *pso, float dt, MATRIX3 *pmat, SMP *psmp); void GetSoCpdefi(SO *pso, float dt, CPDEFI *pcpdefi); int FIsSoTouching(SO *pso, SO *psoTarget); SO *PsoFirstSoTouching(SO *pso); /** * @brief Clones an SO. */ void CloneSo(SO *pso, SO *psoBase); void ApplySoConstraintWorld(SO *pso, CONSTR *pconstr, VECTOR *pvecWorld, VECTOR *pvecConstr, VECTOR *pvecRemain); void ApplyConstr(CONSTR *pconstr, VECTOR *pvec, VECTOR *pvecConstr, VECTOR *pvecRemain); void ApplySoConstraintLocal(SO *pso, CONSTR *pconstr, VECTOR *pvecLocal, VECTOR *pvecConstr, VECTOR *pvecRemain); void AddSoXa(SO *pso, XA *pxaAdd); void RemoveSoXa(SO *pso, XA *pxaRemove); void AddSoWaterAcceleration(SO *pso, WATER *pwater, float dt); void AddSoExternalAccelerations(SO *pso, XA *pxa, float dt); /** * @brief Load SO from BRX. * * @param pso Pointer to the SO. * @param pbis Pointer to the binary input stream. */ void LoadSoFromBrx(SO *pso, CBinaryInputStream *pbis); void SetSoSphere(SO *pso, float sRadius); void SetSoNoInteract(SO *pso, int fNoInteract); void ConstrFromCnstr(CNSTR cnstr, CT *pct, VECTOR *pnormal); void SetSoCnstrForce(SO *pso, CNSTR cnstr); void SetSoCnstrTorque(SO *pso, CNSTR cnstr); void SetSoCameraStyle(SO *pso, CMK cmk); void SetSoIgnoreLocked(SO *pso, int fIgnoreLocked); void SetSoIceable(SO *pso, int fIceable); void SetSoMtlk(SO *pso, MTLK mtlk); void SetSoEdgeGrab(SO *pso, EGK egk); void SendSoMessage(SO *pso, MSGID msgid, void *pv); XP *PxpFindSoGround(SO *psoRoot, SO *psoLeaf, int *pixpd); void SetSoNoGravity(SO *pso, int fNoGravity); void SetSoNoXpsAll(SO *pso, int fNoXps); void SetSoNoXpsSelf(SO *pso, int fNoXps); void SetSoNoXpsCenter(SO *pso, int fNoXps); void RebuildSoPhysHook(SO *pso); SO *PsoFindSoPhysHook(SO *psoLeaf, int ib); void RecalcSoLocked(SO *pso); int FGetSoContactList(SO *pso, void *pvstate); void GetSoContacts(SO *pso, int *pcpso, SO ***papso); int FSoInStsoList(STSO *pstsoFirst, SO *pso); void GenerateSoSpliceTouchingEvents(SO *pso); int FInflictSoZap(SO *pso, XP *pxp, ZPR *pzpr); void EnsureSoLvo(SO *pso); void ProjectSoLvo(SO *pso, float dt); void ProjectSoTransform(SO *pso, float dt, int fForce); void ApplySoImpulse(SO *pso, VECTOR *ppos, VECTOR *pv, float sftMax); void CalculateSoTrajectoryApex(SO *pso, VECTOR *pposTarget, float dzMax, VECTOR *pv); int FAbsorbSoWkr(SO *pso, WKR *pwkr); void CloneSoPhys(SO *pso, SO *psoPhys, int cposExtra); #endif // SO_H ================================================ FILE: include/solve.h ================================================ /** * @file solve.h */ #ifndef SOLVE_H #define SOLVE_H #include #include #include typedef int GRFSG; /** * @brief Unknown. */ enum DZK { DZK_Normal = 0, DZK_Friction = 1, DZK_Equality = 2, }; /** * @brief Unknown. */ struct FX { VECTOR dv; VECTOR dw; }; /** * @brief Unknown. */ struct XP { // ... }; /** * @brief Unknown. * * @todo Based on the May 19 prototype. * May be incomplete and/or inaccurate. */ struct DZ { XP *pxp; undefined1 unknown[12]; VECTOR f; FX *aafx[2]; DZK dzk; int fMax; float sfMax; float sf; float sdv; float dsdv; VECTOR *mpipxpdv; float *mpidzg; DZ *pdzOther; DLE dle; // ... }; void RenumberSo(SO *pso, int *pcpso, SO **apso); void CalculateSoEffect(SO *pso, VECTOR *ppos, FX *pfx, VECTOR *pdv); void PropagateSoForce(SO *psoRoot, GRFSG grfsg, XP *pxp, int ixpd, DZ *pdz, FX *afx); void DistributeSoEffects(SO *psoRoot, GRFSG grfsg, int cpso, SO **apso, FX *afx); void SolveSwGroup(SW *psw, int cpsoRoot, SO **apsoRoot, int cpxp, XP **apxp, float dt, GRFSG grfsg); int CpxpBuildXpArray(int cpso, SO **apso, int cpxpMax, XP **apxp); void BuildContactGroup(SO *psoSeed, int *pcpso, SO **apso, int *pcpsoLocked, SO **apsoLocked); void SplitSoFreeze(SO *pso, int fFreeze); void SortSwGroup(int cpso, SO **apso); void SplitSwGroup(SW *psw, int cpso, SO **apso, float dt, GRFSG grfsg); void SolveSw(SW *psw, float dt, GRFSG grfsg); #endif // SOLVE_H ================================================ FILE: include/sort.h ================================================ /** * @file sort.h */ #ifndef SORT_H #define SORT_H #include "common.h" /** * @brief Comparison function pointer for sorting. */ typedef int (* PFNCMP)(void *, void *); /** * @brief Swaps two entries in an array. * The swap is performed using 4-bytes at a time. * * @param afoo Pointer to the array. * @param cb Size of each element in bytes. * @param i1 Index of the first element to swap. * @param i2 Index of the second element to swap. */ void SwapEntries(void *afoo, int cb, int i1, int i2); /** * @brief Sorts an array in-place using the heap sort algorithm. * * @param afoo Pointer to the array. * @param iMac Number of elements in the array. * @param cb Size of each element in bytes. * @param pfncmp Pointer to a comparison function. */ void HeapSort(void *afoo, int iMac, int cb, PFNCMP pfncmp); #endif // SORT_H ================================================ FILE: include/sound.h ================================================ /** * @file sound.h * * @brief Sound playback. */ #ifndef SOUND_H #define SOUND_H #include "common.h" #include // Forward. struct ALO; /** * @brief SFX ID. * * @todo Figure out what DAT_00262050 is as well as what value is being used in the following functions: * WakeSoWater (Gets sound 0, 16, 32, or 48 from DAT_00262050) * FireExplsExplso (Seems like an enemy or actor that moves and emits particles) * StartSwIntermittentSounds() * SetJtJtcs() * FUN_001eb748 */ enum SFXID { SFXID_UnkNeg2 = -2, // Found in FUN_001be8f8() SFXID_Nil = -1, // Used to call a sound in FUN_001a54f8() for some reason? SFXID_UiTick = 0, // Probably wrong value, but needed for UpdateCodes in joy.c. Also Found in FUN_001ed318 SFXID_Unk1 = 1, // Found in RebuildTimerAchzDraw() SFXID_Click1 = 2, SFXID_Swoosh = 3, SFXID_JtFootfall1 = 4, SFXID_JtFootfall2 = 5, SFXID_JtFootfall3 = 6, SFXID_JtFootfall4 = 7, SFXID_EnvCaneReach1 = 8, SFXID_EnvCaneReach2 = 9, SFXID_EnvCaneReach3 = 10, SFXID_Cane_Attack1 = 11, SFXID_EnvDartsHit = 12, SFXID_CaneHandleLock = 13, SFXID_Unk14 = 14, // Found in SetJtJts() SFXID_Unk15 = 15, // Found in UndeinedFunction_001b17b0() SFXID_Fire = 19, SFXID_Thud1 = 20, SFXID_EnvAlarmSounding = 21, SFXID_EnvCricketChirp = 22, SFXID_Splash = 22, // note: same value as EnvCricketChirp....No idea why theres a dupe. SFXID_Unk26 = 26, // Found in FUN_001b01b0() SFXID_AmbElectric = 27, SFXID_Unk33 = 33, // Found in FUN_001999d0() SFXID_Unk34 = 34, // Found in FUN_001eef90() SFXID_Ripoff_Something = 35, SFXID_Env_Holographic_Marker = 40, SFXID_Unk42 = 42, // Found in BreakBrk() SFXID_Bottle_Break = 44, SFXID_Darts_Fire = 51, SFXID_EnvDartsHi = 52, SFXID_Unk53 = 53, // Found in FUN_0013bf68() SFXID_Roc_Hit = 55, SFXID_Blaster_Fire = 58, SFXID_Unk59 = 59, // Found in FUN_0019b378 SFXID_Npc_Whistle = 63, SFXID_Unk65 = 65, // Found in FUN_0015ad80(), FUN_0015ae38(), FUN_0015b128() SFXID_Unk71 = 71, // Found in UpdateStepFootfall(). Most likely Land sound. SFXID_Unk72 = 72, // Found in UpdateStepFootfall(). Most likely Land sound. SFXID_Jt_Land = 73, SFXID_Unk74 = 74, // Found in UpdateStepFootfall(). Most likely Land sound. SFXID_Unk77 = 77, // Found in SetJtJts() SFXID_Unk78 = 78, // Found in SetJtJts() SFXID_Unk79 = 79, // Found in SetJtJts() SFXID_Unk80 = 80, // Found in SetJtJts() SFXID_Unk81 = 81, // Found in ExitedRobRoh(), FUN_001eb748() SFXID_Unk89 = 89, // Found in SetJtJts() SFXID_unk90 = 90, // Found in UpdateSuvActive() SFXID_Unk103 = 103, // Found in FUN_001d32d8() SFXID_Collect_Life = 105, SFXID_Last_Clue = 106, SFXID_Yipee = 109, SFXID_Binoc_Hum = 112, SFXID_Binoc_Zoom = 113, SFXID_Unk114 = 114, // Found in RebuildTimerAchzDraw() SFXID_Click2 = 115, SFXID_Collect_Charm = 116, SFXID_Sneaky_Footstep = 119, SFXID_Collect_Coin = 120, SFXID_Click3 = 121, SFXID_Click4 = 122, SFXID_Thud7 = 123, SFXID_Unk126 = 126, // Found in SetJtJts(), UpdateJtActive(), RebuildTimerAchzDraw(), runs_on_cane_hook_grab() SFXID_Unk127 = 127, // Found in RebuildTimerAchzDraw() SFXId_unk138 = 138, // Found in SetWmWms() SFXId_unk139 = 139, // Found in SetWmWms() SFXID_Unk140 = 140, // Found in SetTvTvgs() SFXID_Unk141 = 141, // Found in SetTvTvgs() SFXID_Take_out_Binoc = 142, SFXID_Put_Away_Binoc = 143, SFXID_Unk148 = 148, // Found in SetJtJts() SFXID_Jt_Hurt = 163, SFXID_Unk166 = 166, // Found in FUN_001d5398() SFXID_Unk333 = 333, // Found in FUN_001a4070() SFXID_Unk334 = 334, // Found in FUN_001a54f8() SFXID_Ripoff_Hit = 335, SFXID_Unk336 = 336, // Found in SetRovRovts() SFXID_Honk = 337, SFXID_Ricochet = 338, SFXID_Unk429 = 429, // Found in init_burning_rubber() SFXID_Unk431 = 431, // Found in init_burning_rubber() SFXID_Unk443 = 443, // Found in init_burning_rubber() SFXID_Unk460 = 460, // Found in FUN_0018ae38() SFXID_Unk466 = 466, // Found in init_burning_rubber() SFXID_Unk637 = 637, // Found in init_burning_rubber() SFXID_Unk639 = 639, // Found in init_burning_rubber() SFXID_Unk640 = 640, // Found in init_burning_rubber() SFXID_Unk678 = 678, // Found in init_burning_rubber() SFXID_Unk731 = 731, // Found in init_burning_rubber() SFXID_Unk732 = 732, // Found in init_burning_rubber() SFXID_Unk733 = 733, // Found in init_burning_rubber() SFXID_Unk734 = 734, // Found in init_burning_rubber() }; enum MVGK { MVGK_Effects = 0x0, MVGK_Music = 0x1, // MVGK_Dialog = 0x2, // MVGK_User1 = 0x3, // MVGK_User2 = 0x4, // MVGK_UIser3 = 0x5, // MVGK_User4 = 0x6, // MVGK_External = 0x7, // MVGK_Global = 0x8, MVGK_Max = 0x9 }; /** * @brief Ambient sound. */ struct AMB { SFXID sfxid; int iSerial; void *bnk; AMB **ppamb; float tStarted; float uVolAtSource; uint sfxh; undefined4 unk_1; VECTOR pos; ALO *palo; float sStart; float sFull; int fContinuous; int fOutOfRange; int fAttached; int fStopped; float volAttenuated; float pan; float frq; float rDoppler; int dnDoppler; int fPitchOrig; int ptchOrig; float tNext; LM lmRepeat; LM lmRepDist; undefined4 unk_2; undefined4 unk_3; undefined4 unk_4; }; /** * @brief Sound Effect. */ struct SFX { /* 0x00 */ SFXID sfxid; /* 0x04 */ float sStart; /* 0x08 */ float sFull; /* 0x0c */ float uVol; float uPitch; LM lmRepeat; /* 0x1c */ AMB *pamb; /* 0x20 */ float uDoppler; }; /** * @brief Excitement. * @todo Implement the struct. */ struct EXC { int iexc; DLE dle; }; typedef int IEXC; extern IEXC g_iexcHyst; /** * @brief Check if a VAG is playing. */ int FVagPlaying(); /** * @brief Set VAG unpaused state. */ int SetVagUnpaused(); /** * @brief Unknown. */ void UnsetExcitement(EXC *pexc); /** * @brief Unknown. */ void KillExcitement(); /** * @brief Starts up the sound system. */ void StartupSound(); /** * @brief Ensures the soundbank is available. */ void SbpEnsureBank(int bank); /** * @brief Create a new sound effect. */ void NewSfx(SFX **ppsfx); /** * @brief Starts sound playback. * * @param sfxid The sound effect ID * @param ppamb Pointer to the ambient sound object * @param palo Pointer to the ALO object * @param ppos Position of the sound source * @param sStart The start time(?) * @param sFull The full time(?) * @param uVolAtSource Volume at the source * @param frq Frequency * @param uDoppler Doppler effect * @param plmRepeat Pointer to the repeat limit * @param plmRepDis Pointer to the repeat distance limit */ void StartSound(SFXID sfxid, AMB **ppamb, ALO *palo, VECTOR *ppos, float sStart, float sFull, float uVolAtSource, float frq, float uDoppler, LM *plmRepeat, LM *plmRepDis); /** * @brief TODO */ void StopSound(AMB *pamb, int msRampdown); /** * @brief TODO */ void SetPambVol(AMB *pamb, float uVolAtSource); /** * @brief TODO */ void SetPambFrq(AMB *pamb, float frq); /** * @brief Set the uvol of an mvgk. * * @note May version takes an mvgk as an argument, but this seems not to. */ void SetMvgkUvol(float uvol); /** * @brief Unknown. */ void MvgkUnknown1(MVGK mvgk); /** * @brief Sets the rvol of an mvgk. */ void SetMvgkRvol(int channel, MVGK mvgk, float rvol); /** * @brief Unknown. */ void MvgkUnknown2(); /** * @brief Stops everything related to the sound system. */ void KillSoundSystem(); /** * @brief Unknown. */ void KillSounds(int param_1); /** * @brief Unknown. */ void FUN_001c0cb0(); #endif // SOUND_H ================================================ FILE: include/spaprops.h ================================================ /** * @file spaprops.h */ #ifndef SPAPROPS_H #define SPAPROPS_H #include "common.h" void BuildEopids(); #endif // SPAPROPS_H ================================================ FILE: include/speaker.h ================================================ /** * @file speaker.h * * @brief Sound speaker management. */ #ifndef SPEAKER_H #define SPEAKER_H #include "common.h" #include /** * @class SPEAKER * @brief Sound speaker. * @todo Implement the struct. */ struct SPEAKER : public ALO { // ... }; // ... #endif // SPEAKER_H ================================================ FILE: include/spire.h ================================================ /** * @file spire.h */ #ifndef SPIRE_H #define SPIRE_H #include "common.h" #include /** * @class SPIRE * @brief Spire point that JT can balance on. */ struct SPIRE : public PNT { DLE dleSpire; }; #endif // SPIRE_H ================================================ FILE: include/splice/bif.h ================================================ /** * @file splice/bif.h */ #ifndef SPLICE_BIF_H #define SPLICE_BIF_H #include "common.h" // Forward declaration. class CRef; class CFrame; /** * @enum BIFK * * @todo Fill in enum. */ enum BIFK { // ... BIFK_AddO = 99, BIFK_EnsureO = 100, BIFK_SetO = 101, BIFK_GetO = 102, // ... }; /** * @brief Comparison Kind. */ enum CMPK { CMPK_L = 0, CMPK_LE = 1, CMPK_G = 2, CMPK_GE = 3, CMPK_Max = 4, }; /** * @brief (?) operation kind? */ enum UFOK { UFOK_Sqrt = 0, UFOK_Sin = 1, UFOK_Cos = 2, UFOK_Tan = 3, UFOK_Asin = 4, UFOK_Acos = 5, UFOK_Atan = 6, UFOK_RadNormalize = 7, UFOK_Max = 8, }; CRef RefOpAdd(int carg, CRef *aref, CFrame *pframe); CRef RefOpSub(int carg, CRef *aref, CFrame *pframe); CRef RefOpMult(int carg, CRef *aref, CFrame *pframe); CRef RefOpDiv(int carg, CRef *aref, CFrame *pframe); CRef RefOpPrint(int carg, CRef *aref, CFrame *pframe); CRef RefOpPrintFrame(int carg, CRef *aref, CFrame *pframe); CRef RefOpPrintSidebag(int carg, CRef *aref, CFrame *pframe); CRef RefOpIntEqual(int carg, CRef *aref, CFrame *pframe); CRef RefCmp(CRef *aref, CMPK cmpk); CRef RefOpL(int carg, CRef *aref, CFrame *pframe); CRef RefOpLE(int carg, CRef *aref, CFrame *pframe); CRef RefOpG(int carg, CRef *aref, CFrame *pframe); CRef RefOpGE(int carg, CRef *aref, CFrame *pframe); CRef RefOpEqv(int carg, CRef *aref, CFrame *pframe); CRef RefEqualHelper(CRef *prefA, CRef *prefB); CRef RefOpEqual(int carg, CRef *aref, CFrame *pframe); CRef RefOpIsBoolean(int carg, CRef *aref, CFrame *pframe); CRef RefOpIsNum(int carg, CRef *aref, CFrame *pframe); CRef RefOpIsFloat(int carg, CRef *aref, CFrame *pframe); CRef RefOpIsInteger(int carg, CRef *aref, CFrame *pframe); CRef RefOpIsSymbol(int carg, CRef *aref, CFrame *pframe); CRef RefOpIsVector(int carg, CRef *aref, CFrame *pframe); CRef RefOpIsMatrix(int carg, CRef *aref, CFrame *pframe); CRef RefOpIsClq(int carg, CRef *aref, CFrame *pframe); CRef RefOpIsLm(int carg, CRef *aref, CFrame *pframe); CRef RefOpIsSmp(int carg, CRef *aref, CFrame *pframe); CRef RefOpIsList(int carg, CRef *aref, CFrame *pframe); CRef RefOpIsNull(int carg, CRef *aref, CFrame *pframe); CRef RefOpIsObject(int carg, CRef *aref, CFrame *pframe); CRef RefOpIsNullObj(int carg, CRef *aref, CFrame *pframe); CRef RefOpIsMethod(int carg, CRef *aref, CFrame *pframe); CRef RefOpIsProcedure(int carg, CRef *aref, CFrame *pframe); CRef RefOpAreNear(int carg, CRef *aref, CFrame *pframe); CRef RefOpNot(int carg, CRef *aref, CFrame *pframe); CRef RefOpCons(int carg, CRef *aref, CFrame *pframe); CRef RefOpCar(int carg, CRef *aref, CFrame *pframe); CRef RefOpCdr(int carg, CRef *aref, CFrame *pframe); CRef RefOpSetCadr(int carg, CRef *aref, CFrame *pframe, BIFK bifk); CRef RefOpSetCar(int carg, CRef *aref, CFrame *pframe); CRef RefOpSetCdr(int carg, CRef *aref, CFrame *pframe); CRef RefOpLength(int carg, CRef *aref, CFrame *pframe); CRef RefOpNth(int carg, CRef *aref, CFrame *pframe); CRef RefOpIsMember(int carg, CRef *aref, CFrame *pframe); CRef RefOpList(int carg, CRef *aref, CFrame *pframe); CRef RefOpAppend(int carg, CRef *aref, CFrame *pframe); CRef RefOpMap(int carg, CRef *aref, CFrame *pframe); CRef RefOpFilter(int carg, CRef *aref, CFrame *pframe); CRef RefOpForEach(int carg, CRef *aref, CFrame *pframe); CRef RefOpEval(int carg, CRef *aref, CFrame *pframe); CRef RefOpVector(int carg, CRef *aref, CFrame *pframe); CRef RefOpMatrix(int carg, CRef *aref, CFrame *pframe); CRef RefOpSetMusicRegister(int carg, CRef *aref, CFrame *pframe); CRef RefOpClq(int carg, CRef *aref, CFrame *pframe); CRef RefOpLm(int carg, CRef *aref, CFrame *pframe); CRef RefOpSmp(int carg, CRef *aref, CFrame *pframe); CRef RefOpGetElement(int carg, CRef *aref, CFrame *pframe); CRef RefOpRandomSeed(int carg, CRef *aref, CFrame *pframe); CRef RefOpRandom(int carg, CRef *aref, CFrame *pframe); CRef RefUfo(CRef *pref, UFOK ufok); CRef RefOpSqrt(int carg, CRef *aref, CFrame *pframe); CRef RefOpSin(int carg, CRef *aref, CFrame *pframe); CRef RefOpCos(int carg, CRef *aref, CFrame *pframe); CRef RefOpTan(int carg, CRef *aref, CFrame *pframe); CRef RefOpAsin(int carg, CRef *aref, CFrame *pframe); CRef RefOpAcos(int carg, CRef *aref, CFrame *pframe); CRef RefOpAtan(int carg, CRef *aref, CFrame *pframe); CRef RefOpRadNormalize(int carg, CRef *aref, CFrame *pframe); CRef RefOpAtan2(int carg, CRef *aref, CFrame *pframe); CRef RefOpVectorDotProduct(int carg, CRef *aref, CFrame *pframe); CRef RefOpVectorCrossProduct(int carg, CRef *aref, CFrame *pframe); CRef RefOpVectorLth(int carg, CRef *aref, CFrame *pframe); CRef RefOpVectorDistance(int carg, CRef *aref, CFrame *pframe); CRef RefOpVectorDistanceSquared(int carg, CRef *aref, CFrame *pframe); CRef RefOpVectorNormalize(int carg, CRef *aref, CFrame *pframe); CRef RefOpVectorProjectNormal(int carg, CRef *aref, CFrame *pframe); CRef RefOpVectorProjectTangent(int carg, CRef *aref, CFrame *pframe); CRef RefOpVectorBallisticVelocity(int carg, CRef *aref, CFrame *pframe); CRef RefOpVectorRadianNormal(int carg, CRef *aref, CFrame *pframe); CRef RefOpMatrixTranspose(int carg, CRef *aref, CFrame *pframe); CRef RefOpMatrixInvert(int carg, CRef *aref, CFrame *pframe); CRef RefOpMatrixCalculateDmat(int carg, CRef *aref, CFrame *pframe); CRef RefOpMatrixInterpolateRotate(int carg, CRef *aref, CFrame *pframe); CRef RefOpMatrixDecomposeToTranslate(int carg, CRef *aref, CFrame *pframe); CRef RefOpMatrixDecomposeToRotate(int carg, CRef *aref, CFrame *pframe); CRef RefOpMatrixDecomposeToEuler(int carg, CRef *aref, CFrame *pframe); CRef RefOpMatrixDecomposeToRadianNormal(int carg, CRef *aref, CFrame *pframe); CRef RefOpMatrixLookAt(int carg, CRef *aref, CFrame *pframe); CRef RefOpMatrixTiltUpright(int carg, CRef *aref, CFrame *pframe); CRef RefOpClqEvaluate(int carg, CRef *aref, CFrame *pframe); CRef RefOpClqEvaluateLm(int carg, CRef *aref, CFrame *pframe); CRef RefOpClqFit(int carg, CRef *aref, CFrame *pframe); CRef RefOpLmLimit(int carg, CRef *aref, CFrame *pframe); CRef RefOpLmCheck(int carg, CRef *aref, CFrame *pframe); CRef RefOpFloor(int carg, CRef *aref, CFrame *pframe); CRef RefOpCeiling(int carg, CRef *aref, CFrame *pframe); CRef RefOpRound(int carg, CRef *aref, CFrame *pframe); CRef RefOpTruncate(int carg, CRef *aref, CFrame *pframe); CRef RefOpAbs(int carg, CRef *aref, CFrame *pframe); CRef RefOpMaximum(int carg, CRef *aref, CFrame *pframe); CRef RefOpMinimum(int carg, CRef *aref, CFrame *pframe); CRef RefOpModulo(int carg, CRef *aref, CFrame *pframe); CRef RefOpCurrentTime(int carg, CRef *aref, CFrame *pframe); CRef RefOpScheduleCallback(int carg, CRef *aref, CFrame *pframe); CRef RefOpDeferObjectUpdate(int carg, CRef *aref, CFrame *pframe); CRef RefOpObjectOption(int carg, CRef *aref, CFrame *pframe, BIFK bifk); CRef RefOpAddO(int carg, CRef *aref, CFrame *pframe); CRef RefOpEnsureO(int carg, CRef *aref, CFrame *pframe); CRef RefOpSetO(int carg, CRef *aref, CFrame *pframe); CRef RefOpGetO(int carg, CRef *aref, CFrame *pframe); CRef RefPairFromAplo(int cplo, LO **aplo); CRef RefOpFindObject(int carg, CRef *aref, CFrame *pframe); CRef RefOpFindObjects(int carg, CRef *aref, CFrame *pframe); CRef RefOpFindNearestObject(int carg, CRef *aref, CFrame *pframe); CRef RefOpFindNearestObjects(int carg, CRef *aref, CFrame *pframe); CRef RefOpFindPlayerObject(int carg, CRef *aref, CFrame *pframe); CRef RefOpFindWorldObject(int carg, CRef *aref, CFrame *pframe); CRef RefOpFindCameraObject(int carg, CRef *aref, CFrame *pframe); CRef RefOpFindClassObjects(int carg, CRef *aref, CFrame *pframe); CRef RefOpFindObjectsInBoundingBox(int carg, CRef *aref, CFrame *pframe); CRef RefOpFindObjectsInBoundingSphere(int carg, CRef *aref, CFrame *pframe); CRef RefOpHitTestObjectsImpl(BIFK bifk, int carg, CRef *aref, CFrame *pframe); CRef RefOpHitTestObjects(int carg, CRef *aref, CFrame *pframe); CRef RefOpHitTestObjectsFirst(int carg, CRef *aref, CFrame *pframe); CRef RefOpConvertObjectPosition(int carg, CRef *aref, CFrame *pframe); CRef RefOpConvertObjectVector(int carg, CRef *aref, CFrame *pframe); CRef RefOpConvertObjectMatrix(int carg, CRef *aref, CFrame *pframe); CRef RefOpNearClipCenter(int carg, CRef *aref, CFrame *pframe); CRef RefOpStartSound(int carg, CRef *aref, CFrame *pframe); CRef RefOpStopSound(int carg, CRef *aref, CFrame *pframe); CRef RefOpStartRumble(int carg, CRef *aref, CFrame *pframe); CRef RefOpEmitSmokeCloud(int carg, CRef *aref, CFrame *pframe); CRef RefOpPredictAnimationEffect(int carg, CRef *aref, CFrame *pframe); #endif // SPLICE_BIF_H ================================================ FILE: include/splice/eval.h ================================================ /** * @file splice/eval.h */ #ifndef SPLICE_EVAL_H #define SPLICE_EVAL_H #include "common.h" // ... #endif // SPLICE_EVAL_H ================================================ FILE: include/splice/frame.h ================================================ /** * @file splice/frame.h */ #ifndef SPLICE_FRAME_H #define SPLICE_FRAME_H #include "common.h" // Forward. class CRef; class CFrame { private: /* 0x00 */ int m_cpframeParent; /* 0x04 */ CFrame *m_apframeParent[4]; // ... public: void SetSingleParent(CFrame *pframeParent); void AddParent(CFrame *pframeParent); CFrame *RefAddBinding(int symid, CRef * pref); CFrame *RefSetBinding(int symid, CRef *pref); int FFindBinding(int symid, int fRecursive, CRef *pref); CRef *PrefFindBinding(int symid, int fRecursive); void CloneTo(CFrame *pframeClone); }; /** * @brief Creates a new frame. */ CFrame *PframeNew(); /** * @brief Deletes the frame. */ void DeleteFrame(CFrame *pframe); #endif // SPLICE_FRAME_H ================================================ FILE: include/splice/gc.h ================================================ /** * @file splice/gc.h */ #ifndef SPLICE_GC_H #define SPLICE_GC_H #include "common.h" class CFrame; class CPair; class CProc; class CSidebag; class CGc { private: int m_cpframeRoot; CFrame *m_apframeRoot[256]; STRUCT_PADDING(64); int m_cpsidebagRoot; CSidebag *m_apsidebagRoot[128]; int m_cpframeStack; CFrame *m_apframeStack[512]; int m_cppairStack; CPair *m_appairStack[256]; int m_cpprocStack; CProc *m_approcStack[1024]; public: CGc(); ~CGc(); void Startup(); void Shutdown(); void AddRootFrame(CFrame *pframe); void AddRootSidebag(CSidebag *psidebag); void PushFrame(CFrame *pframe); CFrame *PframePop(); void PushPair(CPair *ppair); CPair *PpairPop(); void PushProc(CProc *pproc); CProc *PprocPop(); void UpdateRecyclable(); void MarkLiveObjects(); void Collect(); }; extern CGc g_gc; #endif // SPLICE_GC_H ================================================ FILE: include/splice/method.h ================================================ /** * @file splice/method.h */ #ifndef SPLICE_METHOD_H #define SPLICE_METHOD_H #include "common.h" struct BASIC; /** * @class CMethod */ class CMethod { BASIC* m_pbasic; void* m_pfnthunk; //todo: fix type? int m_crefReq; }; CMethod* PmethodNew(); #endif // SPLICE_METHOD_H ================================================ FILE: include/splice/pair.h ================================================ /** * @file splice/pair.h */ #ifndef SPLICE_PAIR_H #define SPLICE_PAIR_H #include "common.h" #include "splice/ref.h" /** * @class CPair * * @todo Fill in class. */ class CPair { CRef m_ref; CPair* m_ppairNext; public: void CloneTo(CPair* ppairClone, CFrame* pframeClone); }; CPair* PpairNew(); void DeletePair(CPair* ppair); #endif // SPLICE_PAIR_H ================================================ FILE: include/splice/proc.h ================================================ /** * @file splice/proc.h */ #ifndef SPLICE_PROC_H #define SPLICE_PROC_H #include "common.h" class CFrame; class CPair; /** * @class CProc * * @todo Fill in class. */ class CProc { private: CFrame *m_pframe; CPair *m_ppair; int m_crefReq; int m_fVarArg; CPair *m_ppairCodeExpr; public: void CloneTo(CProc *pprocClone, CFrame *pframeClone); }; CProc *PprocNew(); #endif // SPLICE_PROC_H ================================================ FILE: include/splice/ref.h ================================================ /** * @file splice/ref.h */ #ifndef SPLICE_REF_H #define SPLICE_REF_H #include "common.h" #include #include #include #include #include class CPair; enum TAGK { TAGK_Nil = -1, TAGK_None = 0, TAGK_Set = 1, TAGK_Define = 2, TAGK_DefineMacro = 3, TAGK_DefineMacroLambda = 4, TAGK_Assert = 5, TAGK_If = 6, TAGK_Or = 7, TAGK_And = 8, TAGK_Cond = 9, TAGK_Else = 10, TAGK_Case = 11, TAGK_Let = 12, TAGK_While = 13, TAGK_Lambda = 14, TAGK_Begin = 15, TAGK_Import = 16, TAGK_Quote = 17, TAGK_Dot = 18, TAGK_Pipe = 19, TAGK_S32 = 20, TAGK_F32 = 21, TAGK_Vector = 22, TAGK_Matrix = 23, TAGK_Clq = 24, TAGK_Lm = 25, TAGK_Smp = 26, TAGK_Bool = 27, TAGK_Symid = 28, TAGK_Bifk = 29, TAGK_Pair = 30, TAGK_Proc = 31, TAGK_Basic = 32, TAGK_Method = 33, TAGK_Void = 34, TAGK_Err = 35, TAGK_Max = 36 }; union TAG { int m_n; float m_g; int m_bool; uint m_symid; BIFK m_bifk; CPair* m_ppair; CProc* m_pproc; VECTOR* m_pvector; MATRIX4* m_pmatrix; CLQ* m_pclq; LM* m_plm; SMP* m_psmp; BASIC* m_pbasic; CMethod* m_pmethod; }; class CRef { public: TAGK m_tagk; TAG m_tag; CRef(); CRef(const CRef &ref); ~CRef(); CRef &operator=(const CRef &ref); bool operator==(const CRef &ref); void CloneTo(CRef *prefClone, CFrame *pframeClone); void Decref(); void Incref(); void SetTag(TAGK tagk); void SetS32(int n); void SetF32(float g); void SetBool(int fBool); void SetSymid(uint symid); void SetBifk(BIFK bifk); void SetPair(CPair *ppair); void SetProc(CProc *pproc); void SetVector(VECTOR *pvector); void SetMatrix(MATRIX4 *pmatrix); void SetClq(CLQ *pclq); void SetLm(LM *plm); void SetSmp(SMP *psmp); void SetBasic(BASIC *pbasic); void SetMethod(CMethod *pmethod); int RefCoerceS32() const; float RefCoerceF32() const; }; #endif // SPLICE_REF_H ================================================ FILE: include/splice/serialize.h ================================================ /** * @file splice/serialize.h */ #ifndef SPLICE_SERIALIZE_H #define SPLICE_SERIALIZE_H #include "common.h" // ... #endif // SPLICE_SERIALIZE_H ================================================ FILE: include/splice/sidebag.h ================================================ /** * @file splice/sidebag.h * * @brief Sidebag for splice. */ #ifndef SPLICE_SIDEBAG_H #define SPLICE_SIDEBAG_H #include "common.h" class CRef; /** * @brief Unknown. * @todo Find where this struct should be implemented. */ struct SBB { int n; // CRef ref; }; /** * @brief Sidebag. */ class CSidebag { private: int m_csbb; SBB m_asbb[16]; public: CSidebag& RefAddBinding(int n, CRef *pref); CSidebag& RefSetBinding(int n, CRef *pref); bool FFindBinding(int n, CRef *pref); void CloneTo(CSidebag *psidebagClone); }; /** * @brief Creates a new sidebag. * * @return A pointer to the newly created sidebag. */ CSidebag *PsidebagNew(); #endif // SPLICE_SIDEBAG_H ================================================ FILE: include/splice/spliceutils.h ================================================ /** * @file splice/spliceutils.h * * @brief Utility functions for the splice scripting engine. */ #ifndef SPLICE_SPLICEUTILS_H #define SPLICE_SPLICEUTILS_H #include "common.h" /** * @brief Splice startup function. */ void StartupSplice(); /** * @brief Startup function for the splice structured type factories. */ void StartupSpliceStructuredTypeFactories(); #endif // SPLICE_SPLICEUTILS_H ================================================ FILE: include/splice/splotheap.h ================================================ /** * @file splice/splotheap.h */ #ifndef SPLICE_SPLOTHEAP_H #define SPLICE_SPLOTHEAP_H #include "common.h" typedef void (*PFNDELETE)(void *); struct SPLOT { SPLOT *psplotNext; int fAlive; }; class CSplotheap { private: int m_cb; int m_c; byte *m_ab; SPLOT *m_psplotFree; SPLOT *m_psplotAlloc; SPLOT *m_psplotRecyclable; public: PFNDELETE m_pfndelete; void Startup(int cb, int c); void Shutdown(); void *PvAllocUnsafe(); void *PvAllocClear(); SPLOT *PsplotLookup(int i); void UpdateRecyclable(); void UnmarkAll(); void FreeGarbage(); }; extern CSplotheap g_splotheapPair; extern CSplotheap g_splotheapFrame; extern CSplotheap g_splotheapUnk1; extern CSplotheap g_splotheapProc; extern CSplotheap g_splotheapMethod; static void *PvFromPsplot(SPLOT *psplot); static SPLOT *PsplotFromPv(void *pv); bool FIsPvGarbage(void *pv); void MarkPvAlive(void *pv); #endif // SPLICE_SPLOTHEAP_H ================================================ FILE: include/splice/vecmat.h ================================================ /** * @file splice/vecmat.h */ #ifndef SPLICE_VECMAT_H #define SPLICE_VECMAT_H #include "common.h" #include #include #include VECTOR *PvectorNew(); void IncrefVector(VECTOR *pvector); void DecrefVector(VECTOR *pvector); void IncrefMatrix(MATRIX4 *pmatrix); void DecrefMatrix(MATRIX4 *pmatrix); void IncrefClq(CLQ *pclq); void DecrefClq(CLQ *pclq); void IncrefLm(LM *plm); void DecrefLm(LM *plm); SMP *PsmpNew(); void IncrefSmp(SMP *psmp); void DecrefSmp(SMP *psmp); void StartupSpliceStructuredTypeFactories(); void ShutdownSpliceStructuredTypeFactories(); #endif // SPLICE_VECMAT_H ================================================ FILE: include/splicemap.h ================================================ /** * @file splicemap.h * * @brief Splice maps. */ #ifndef SPLICEMAP_H #define SPLICEMAP_H #include "common.h" #include #include #include void LoadSwSpliceFromBrx(SW *psw, CBinaryInputStream *pbis); CFrame *PframeFromIsplice(int isplice, SW *psw); CRef RefEvalModule(int isplice, SW *psw); #endif // SPLICEMAP_H ================================================ FILE: include/spliceobj.h ================================================ /** * @file spliceobj.h * * @brief Splice objects. */ #ifndef SPLICEOBJ_H #define SPLICEOBJ_H #include "common.h" #include #include #include typedef void (*PFNGET)(OTYP); EOPID *PeopidFind(BASIC *pbasic, int optid); CRef RefGetObjectList(BASIC *pbasic, OTYP otyp, PFNGET pfnget); CRef RefGetPeopid(BASIC *pbasic, EOPID *peopid); int FAppendSpliceListElement(void *pvstate, void *pvdata); int FSpliceListElementExists(void *pvstate, void *pvdata); CRef RefSetPvsFromSplice(int cref, CRef *aref, OTYP *aotyp, void **apv); CRef RefSetArgListFromPvs(int cargs, OTYP *aotyp, void **apv); CRef RefSetPeopid(BASIC *pbasic, EOPID *peopid, CRef *prefValue); CRef RefGetOption(BASIC *pbasic, int optid); CRef RefSetOption(BASIC *pbasic, int optid, CRef *prefValue); CRef RefAddOption(BASIC *pbasic, int optid, CRef *prefValue); CRef RefEnsureOption(BASIC *pbasic, int optid, CRef *prefValue); CRef RefSetArgsFromSplice(int cref, CRef *aref, OTYP *aotyp); #endif // SPLICEOBJ_H ================================================ FILE: include/sprbuf.h ================================================ /** * @file sprbuf.h */ #ifndef SPRBUF_H #define SPRBUF_H #include "common.h" void LoadSprBuf(int cb); void SaveSprBuf(void *pv); #endif // SPRBUF_H ================================================ FILE: include/sqtr.h ================================================ /** * @file sqtr.h */ #ifndef SQTR_H #define SQTR_H #include "common.h" #include #include #include #include /** * @brief Unknown. * @todo Implement the struct. */ struct SQTRM { // ... }; void UpdateSqtrm(SQTRM *psqtrm, VECTOR *ppos, MATRIX3 *pmat, float swExtra, float dt); void RenderSqtrm(SQTRM *psqtrm, CM *pcm); void DrawSqtrm(RPL *prpl); #endif SQTR_H ================================================ FILE: include/step.h ================================================ /** * @file step.h */ #ifndef STEP_H #define STEP_H #include "common.h" #include #include #include #include #include #include #include #include // Forward. struct FX; struct XP; struct SFF; typedef int GRFSG; typedef int GRFADJ; /** * @brief STEP_FIGURE * @brief Moving/waking characters. */ struct STEP : public PO { ALO *paloLeftFoot; ALO *paloRightFoot; ALO *paloLeftHand; ALO *paloRightHand; ALO *paloLeftHeel; ALO *paloRightHeel; ALO *paloLeftBall; ALO *paloRightBall; float radJoy; float uJoyDeflect; float radTarget; float uTarget; VECTOR vTarget; float zBaseTarget; undefined4 unk_0x614[3]; MATRIX3 matTarget; int fBaseXp; float tBaseXp; undefined4 unk_0x658[2]; VECTOR posBaseXp; VECTOR normalBaseXp; SO *psoBaseXp; float uFootFall; float tLastFootfall; float dzBase; int iposBase; VECTOR *pposBase; VECTOR *pposBumper; SO *psoPhys; SMP smpSpin; undefined4 unk_0x6ac; CLQ clqDradToURun; float rGravity; SMP smpCompress; SMP smpExpand; undefined4 unk_0x6dc; }; void InitStep(STEP *pstep); void PostStepLoad(STEP *pstep); void LimitStepHands(STEP *pstep, int fLimit); void RetractStepExtremity(STEP *pstep, ALO *paloExtrem, float sRadius, ALO *paloAdjust, ALO *paloIkh); void RenderStepSelf(STEP *pstep, CM *pcm, RO *pro); void ReadStepJoystick(STEP *pstep, JOY *pjoy); void UpdateStepFootfall(STEP *pstep, float u, SFF *psff); void UpdateStepPhys(STEP *pstep); void SetStepPhys(STEP *pstep, SO *pso, int fForceSnap); void UpdateStep(STEP *pstep, float dt); CT CtTorqueStep(STEP *pstep); void PropagateStepForce(STEP *pstep, GRFSG grfsg, XP *pxp, int ixpd, DZ *pdz, FX *afx); void RotateStepToMat(STEP *pstep, MATRIX3 *pmat); void CloneStepPhys(STEP *pstep, SO *psoPhys, int cposExtra); void PresetStepAccel(STEP *pstep, float dt); void PresetStepAccelBase(STEP *pstep); int FCheckStepXpBase(STEP *pstep, XP *pxp, int ixpd); void AdjustStepNewXp(STEP *pstep, XP *pxp, int ixpd); void AdjustStepDz(STEP *pstep, GRFADJ grfadj, DZ *pdz, int ixpd, float dt); void AdjustStepDzBase(STEP *pstep, GRFADJ grfadj, DZ *pdz, int ixpd); void UpdateStepMatTarget(STEP *pstep); void AdjustStepXpVelocity(STEP *pstep, XP *pxp, int ixpd); void UpdateStepXfWorld(STEP *pstep); void AdjustStepXpVelocityBase(STEP *pstep, XP *pxp, int ixpd); void AdjustStepXps(STEP *pstep); void AddStepCustomXps(STEP *pstep, SO *psoOther, int cbspPruned, BSP *abspPruned, BSP *pbspPruned, XP **ppxpFirst); void AddStepCustomXpsBase(STEP *pstep, SO *psoOther, BSP *pbspPruned, XP **ppxpFirst); void FixStepAngularVelocity(STEP *pstep); void PredictStepPosition(STEP *pstep, float dtOffset, VECTOR *ppos, VECTOR *pv); void PredictStepRotation(STEP *pstep, float dtOffset, MATRIX3 *pmat, VECTOR *pw); void SetStepSpinRatio(STEP *pstep, float r); void SetStepGravityRatio(STEP *pstep, float rGravity); #endif // STEP_H ================================================ FILE: include/stepact.h ================================================ /** * @file stepact.h */ #ifndef STEPACT_H #define STEPACT_H #include "common.h" #include /** * @brief Unknown. * @todo Implement the struct. */ struct ACTADD : public ACT { // ... }; void GetActaddPositionGoal(ACTADD *pactadd, float dtOffset, VECTOR *ppos, VECTOR *pv); void GetActaddRotationGoal(ACTADD *pactadd, float dtOffset, MATRIX3 *pmat, VECTOR *pw); #endif // STEPACT_H ================================================ FILE: include/stepcane.h ================================================ /** * @file stepcane.h */ #ifndef STEPCANE_H #define STEPCANE_H #include "common.h" #include #include #include #include // Forward. struct ASEGBL; /** * @brief Unknown. * @todo Implement the struct. */ struct BL { // ... }; void SetJtJtcs(JT *pjt, JTCS jtcs); void UpdateJtCane(JT *pjt); void UpdateJtActiveCane(JT *pjt, JOY *pjoy); void ChooseJtAttackTarget(JT *pjt, GRFTAK grftak, VECTOR *pposNaturalLocal, float dtProj, float dradMax, TARGET **pptarget, VECTOR *pdposProj); void ChooseJtSweepTarget(JT *pjt, BL *ablSweep, ASEGBL *pasegbl); void ChooseJtRushTarget(JT *pjt); void ChooseJtSmashTarget(JT *pjt); #endif // STEPCANE_H ================================================ FILE: include/stepguard.h ================================================ /** * @file stepguard.h */ #ifndef STEPGUARD_H #define STEPGUARD_H #include "common.h" #include #include #include // Forward. struct ASEG; /** * @brief Unknown. */ enum SGAS { SGAS_Nil = -1, SGAS_No = 0, SGAS_Yes = 1, SGAS_Force = 2, SGAS_Max = 3 }; /** * @brief Stepguard (?) state. */ enum SGGS { SGGS_Nil = -1, SGGS_Patrol = 0, SGGS_Search = 1, SGGS_Attack = 2, SGGS_Dead = 3, SGGS_Max = 4 }; /** * @brief Stepguard State. */ enum SGS { SGS_Nil = -1, SGS_Reset = 0, SGS_Patrol = 1, SGS_PatrolIdle = 2, SGS_PatrolWaypoint = 3, SGS_ReturnToPatrol = 4, SGS_Search = 5, SGS_SearchIdle = 6, SGS_Discover = 7, SGS_LostPlayer = 8, SGS_GiveUpSearch = 9, SGS_Taunt = 10, SGS_Dying = 11, SGS_Pursue = 12, SGS_PursueIdle = 13, SGS_Attack = 14, SGS_AttackIdle = 15, SGS_Stun = 16, SGS_Max = 17 }; /** * @brief Stepguard (?). * @todo Implement the struct. */ struct SGG : public LO { // ... /* 0x168 */ int calarms; // count of alarms /* 0x16c */ ALARM **palarms; // array of alarm pointers // ... /* 0x180 */ OID oidSync; // ... }; /** * @class STEP_GUARD * @brief Non-flashlight guard. */ struct STEPGUARD : public STEP { // ... /* 0x720 */ SGG *psgg; /* 0x724 */ SGS sgs; /* 0x728 */ STRUCT_PADDING(11); /* 0x754 */ ASEGA *pasegaPatrol; /* 0x758 */ STRUCT_PADDING(35); /* 0x7e0 */ ASEGA *pasegaSgs; /* 0x7e4 */ STRUCT_PADDING(203); /* 0xb10 */ int ichkDead; /* 0xb14 */ STRUCT_PADDING(24); /* 0xb74 */ STEPGUARD *pstepguardBase; // ... }; /** * @brief Initializes the stepguard fields with default values. */ void InitStepguard(STEPGUARD *pstepguard); void LoadStepguardFromBrx(STEPGUARD *pstepguard, CBinaryInputStream *pbis); void CloneStepguard(STEPGUARD *pstepguard, STEPGUARD *pstepguardBase); void BindStepguard(STEPGUARD *pstepguard); void PostStepguardLoadCallback(STEPGUARD *pstepguard, MSGID msgid, void *pv); void PostStepguardLoad(STEPGUARD *pstepguard); int FIgnoreStepguardIntersection(STEPGUARD *pstepguard, SO *psoOther); void OnStepguardAdd(STEPGUARD *pstepguard); void OnStepguardRemove(STEPGUARD *pstepguard); void PresetStepguardAccel(STEPGUARD *pstepguard, float dt); float DradEnemyStepguard(STEPGUARD *pstepguard); void SetStepguardTargetHeading(STEPGUARD *pstepguard, float radTarget, float radTilt); void UpdateStepguardDrive(STEPGUARD *pstepguard); void UpdateStepguard(STEPGUARD *pstepguard, float dt); SGS SgsNextStepguardAI(STEPGUARD *pstepguard); void SetStepguardGoal(STEPGUARD *pstepguard, VECTOR *pposGoal); int FReachedStepguardGoal(STEPGUARD *pstepguard); int FFilterStepguardJump(STEPGUARD *pstepguard, SO *pso); void MoveStepguardToGoal(STEPGUARD *pstepguard); void LookStepguardAtGoal(STEPGUARD *pstepguard); void UpdateStepguardGoal(STEPGUARD *pstepguard, int fEnter); void OnStepguardWaypointActive(STEPGUARD *pstepguard); void UpdateStepguardSgs(STEPGUARD *pstepguard); void SetStepguardSgs(STEPGUARD *pstepguard, SGS sgs, ASEG *pasegTargetOverride); void SetStepguardSgsExternal(STEPGUARD *pstepguard, SGS sgs, ASEG *pasegTargetOverride); void OnStepguardExitingSgs(STEPGUARD *pstepguard, SGS sgsNext); void OnStepguardEnteringSgs(STEPGUARD *pstepguard, SGS sgsPrev, ASEG *pasegTargetOverride); SGGS SggsGetStepguard(STEPGUARD *pstepguard); int FAbsorbStepguardWkr(STEPGUARD *pstepguard, WKR *pwkr); int FTakeStepguardDamage(STEPGUARD *pstepguard, ZPR *pzpr); void HandleStepguardGrfsgsc(STEPGUARD *pstepguard); void DoStepguardFreefallJump(STEPGUARD *pstepguard); void DoStepguardFreefallLanding(STEPGUARD *pstepguard); void HandleStepguardMessage(STEPGUARD *pstepguard, MSGID msgid, void *pv); SGAS SgasGetStepguard(STEPGUARD *pstepguard); int FCanStepguardAttack(STEPGUARD *pstepguard); void RenderStepguardSelf(STEPGUARD *pstepguard, CM *pcm, RO *pro); int FValidSgs(SGS sgs); void UseStepguardAnimation(STEPGUARD *pstepguard, SGS sgs, OID oidAseg); void UseStepguardAnimationImmediate(STEPGUARD *pstepguard, SGS sgs, OID oidAseg); void UseStepguardDeathAnimation(STEPGUARD *pstepguard, GRFTAK grftak, OID oidAseg); ASEG *PasegFindStepguard(STEPGUARD *pstepguard, OID oidAseg); void LoadStepguardAnimations(STEPGUARD *pstepguard); void UseStepguardExpl(STEPGUARD *pstepguard, OID oidExpl); void UseStepguardRwm(STEPGUARD *pstepguard, OID oidRwm); void UseStepguardPhys(STEPGUARD *pstepguard, SGS sgs, OID oidPhys); void LoadStepguardPhys(STEPGUARD *pstepguard); void AddStepguardEffect(STEPGUARD *pstepguard, OID oidEffect, ZPK zpk); void SetStepguardPathzone(STEPGUARD *pstepguard, OID oidPathzone); SO *PsoEnemyStepguard(STEPGUARD *pstepguard); void SetStepguardEnemyObject(STEPGUARD *pstepguard, SO *psoEnemy); void RebindStepguardEnemy(STEPGUARD *pstepguard); void AdjustStepguardDz(STEPGUARD *pstepguard, GRFADJ grfadj, DZ *pdz, int ixpd, float dt); void SetStepguardAttackAngleMax(STEPGUARD *pstepguard, float degAttackMax); void AddStepguardAlarm(STEPGUARD *pstepguard, ALARM *palarm); void MatchStepguardAnimationPhase(STEPGUARD *pstepguard, OID oid0, OID oid1, OID oid2, OID oid3); void AddStepguardCustomXps(STEPGUARD *pstepguard, SO *psoOther, int cbspPruned, BSP *abspPruned, BSP *pbspPruned, XP **ppxp); void UpdateStepguardEffect(STEPGUARD *pstepguard); void SetStepguardPatrolAnimation(STEPGUARD *pstepguard, ASEG *pasegPatrol); int FInflictStepguardZap(STEPGUARD *pstepguard, XP *pxp, ZPR *pzpr); int FDetectStepguard(STEPGUARD *pstepguard); int FCheckStepguardEnemyHidden(STEPGUARD *pstepguard); SGG *PsggNew(SW *psw); void InitSgg(SGG *psgg); void AddSggGuard(SGG *psgg, STEPGUARD *pstepguard); void AddSggGuardName(SGG *psgg, OID oidGuard); void AddSggSearchXfmName(SGG *psgg, OID oidXfm); void RemoveSggGuard(SGG *psgg, STEPGUARD *pstepguard); void BindSgg(SGG *psgg); void PostSggLoadCallback(SGG *psgg, MSGID msgid, void *pv); void EnsureSggCallback(SGG *psgg); SO *PsoEnemySgg(SGG *psgg); void UpdateSggCallback(SGG *psgg, MSGID msgid, void *pv); SGGS SggsNextSgg(SGG *psgg); int FDetectSgg(SGG *psgg); int FAbandonSggSearch(SGG *psgg); void EnsureSggAlarm(SGG *psgg, ALARM *palarm); void TriggerSggAlarms(SGG *psgg, ALTK altk); void SetSggSggs(SGG *psgg, SGGS sggs); void AssignSggSearchPoints(SGG *psgg); #endif // STEPGUARD_H ================================================ FILE: include/stephang.h ================================================ /** * @file stephang.h */ #ifndef STEPHANG_H #define STEPHANG_H #include "common.h" #include #include // Forward. struct BL; struct FX; struct ASEGBL; typedef int GRFAHX; void PostJtLoadSwing(JT *pjt, BL *ablSwing, ASEGBL **ppasegbl); void AnticipateJtForce_(JT *pjt, SO *psoOther, VECTOR *pposOther, VECTOR *pdv, FX *afx); void CalculateJtHangAccel(JT *pjt); void PresetJtAccelHang(JT *pjt); void AddJtExternalAccelerations(JT *pjt, XA *pxa, float dt); void UpdateJtActiveHang(JT *pjt, JOY *pjoy); void CheckJtUnhook(JT *pjt); void UpdateJtHookOx(JT *pjt, LO *ploHook, int fHook); void AddJtHookXps(JT *pjt, GRFAHX grfahx, LO *ploHook, VECTOR *pposHook, VECTOR *pvecHook, VECTOR *pposHang); void GetJtHangHeading(JT *pjt, float *pradForward); void UpdateJtIkHang(JT *pjt); #endif // STEPHANG_H ================================================ FILE: include/stephide.h ================================================ /** * @file stephide.h */ #ifndef STEPHIDE_H #define STEPHIDE_H #include "common.h" #include // Forward. struct MJR; struct MJH; struct XMG; struct RAIL; struct ACTADJ; /** * @brief Unknown. */ enum HFDK { HFDK_Nil = -1, HFDK_Match = 0, HFDK_Left = 1, HFDK_Right = 2, HFDK_Stand = 3, HFDK_Max = 4 }; JTBS JtbsChooseJtHide(JT *pjt, LO *ploForce, JTHK *pjthk); void MeasureJtJumpToTarget(JT *pjt, VECTOR *pvJump, ALO *palo, VECTOR *pposTarget, VECTOR *pdvTarget, float *pdtJump, float *pgInteg, VECTOR *pposPredict, VECTOR *pvPredict); void GetJtRailLanding(JT *pjt, RAIL *prail, float uRail, VECTOR *ppos, VECTOR *pv); float GMeasureJumpRail(MJR *pmjr, float u); float GMeasureJumpHshape(MJH *pmjh, float s); // TODO: Add unknown functions here. void UpdateJtActiveHide(JT *pjt, JOY *pjoy); void MatchJtXmgRail(JT *pjt, XMG *pxmg, ACTADJ *pactadj); void UpdateJtHide(JT *pjt); void UpdateJtInternalXpsHide(JT *pjt); void SetJtHfdk(JT *pjt, HFDK hfdk); void ResetJtDynamicTunnel(JT *pjt); void PresetJtAccelHide(JT *pjt); #endif // STEPHIDE_H ================================================ FILE: include/steppipe.h ================================================ /** * @file steppipe.h */ #ifndef STEPPIPE_H #define STEPPIPE_H #include "common.h" #include #include #include void PostJtLoadPipe(JT *pjt); void GetJtPipeGoalMat(JT *pjt, PIPE *ppipe, float s, MATRIX3 *pmat); void PresetJtAccelPipe(JT *pjt); void UpdateJtActivePipe(JT *pjt, JOY *pjoy); void UpdateJtInternalXpsPipe(JT *pjt); void SetJtJtpdk(JT *pjt, JTPDK jtpdk); void PlaceJtOnPipe(JT *pjt, PIPE *ppipe); #endif // STEPPIPE_H ================================================ FILE: include/steppower.h ================================================ /** * @file steppower.h */ #ifndef STEPPOWER_H #define STEPPOWER_H #include "common.h" #include #include #include /** * @brief Selected powerup flags. */ enum FSP { FSP_Nil = -1, FSP_Dive = 0, FSP_Ball = 1, FSP_SlowDownClock = 2, FSP_Mine = 3, FSP_SpeedUpClock = 4, FSP_Decoy = 5, FSP_Stun = 6, FSP_Max = 7 }; extern FSP g_fsp; /*static const char *s_mpfspachz[] = { "&2T&.: Dive", "&2T&.: Roll", "&2T&.: Slow", "&2T&.: Mine", "&2T&.: Fast", "&2T&.: Decoy", "&2T&.: Stun" };*/ extern const char *s_mpfspachz[]; extern float RT_JtSpeedUpClock; extern float RT_JtSlowDownClock; extern GRFVAULT s_mpfspgrfvault[]; // Should be static + initialized. extern SMP SMP_00274f78; // temp /** * @brief Set the selected powerup. * * @param fsp Bitflags representing a certain powerup. */ void SetFsp(FSP fsp); /** * @brief Update the currently selected powerup. * * @param pjt Pointer to the jt to update. * @param pjoy Pointer to the joypad input. */ void UpdateJtActivePowerUp(JT *pjt, JOY *pjoy); /** * @brief Rotate the selected powerup, making the next one in the cycle active. * * @param pjoy Pointer to the joypad input. * @param iCur Current powerup index. * @param iMax Maximum powerup index. * @param mpigrfvault Array of integer bitflags representing which powerups are available. * * @return Index of the newly active powerup. */ int IRotatePowerUp(JOY *pjoy, int iCur, int iMax, int *mpigrfvault); #endif // STEPPOWER_H ================================================ FILE: include/steprail.h ================================================ /** * @file steprail.h * * @brief Rail behavior for STEP objects. */ #ifndef STEPRAIL_H #define STEPRAIL_H #include "common.h" #include /** * @brief Unknown function, more research needed. */ void func_001D31D0(LO *param_1, int param_2); /** * @brief Unknown function, more research needed. */ void func_001D32D8(int param_1, JT *param_2, long param_3); #endif // STEPRAIL_H ================================================ FILE: include/steprun.h ================================================ /** * @file steprun.h */ #ifndef STEPRUN_H #define STEPRUN_H #include "common.h" #include // Forward. struct MRSG; struct ASEGA; struct ASEGBL; /** * @brief Unknown. * @todo Implement the struct. */ struct BLRUN : public BL { // ... }; void PostStepLoadRun(STEP *pstep, BLRUN *ablrun, ASEGBL **ppasegbl); void CalculateBlrunV(int cblrun, BLRUN *ablrun, MRSG *amrsgBlend, VECTOR *pv); void ProjectStepRunPlant(STEP *pstep, BLRUN *ablrun, float uPlant, float rJt, int iblrunWalk, int iblrunRun, VECTOR *pposPlant); int FIntersectStepRunPlant(STEP *pstep, VECTOR *pposUp, VECTOR *pposDown, float *pu); int FReblendAbl2D(int cbBl, int c1, int c2, BL *abl); void AdjustStepRun(STEP *pstep, BLRUN *ablrun, ASEGBL *pasegbl, ASEGA *pasega); void SetStepRunTarget(STEP *pstep, float rad, float u, BLRUN *ablrun, ASEGBL *pasegbl); #endif // STEPRUN_H ================================================ FILE: include/stepside.h ================================================ /** * @file stepside.h */ #ifndef STEPSIDE_H #define STEPSIDE_H #include "common.h" #include // Forward. struct JT; struct ASEGBL; /** * @brief Unknown. * @todo Implement the struct. */ struct BLSS : public BL { // ... }; void PostJtLoadSidestep(JT *pjt, BLSS *ablss, ASEGBL **ppasegbl); void AdjustJtSidestep(JT *pjt, BLSS *ablss, ASEGBL *pasegbl); void SetJtSidestepTarget(JT *pjt, BLSS *ablss, ASEGBL *pasegbl, float rad, float u); #endif // STEPSIDE_H ================================================ FILE: include/stepzap.h ================================================ /** * @file stepzap.h */ #ifndef STEPZAP_H #define STEPZAP_H #include "common.h" // ... #endif // STEPZAP_H ================================================ FILE: include/stream.h ================================================ /** * @file stream.h * * @brief Output stream. */ #ifndef STREAM_H #define STREAM_H #include "common.h" /** * @brief Output stream. */ struct OSTRM { uchar *m_abDest; int m_cbDest; int m_ibCur; int m_fd; int m_cbWritten; int m_cbBuffered; uchar m_abBuffered[1024]; /** * @brief Create a new output stream that writes to a file. * * @param fd File descriptor. */ OSTRM(int fd); /** * @brief Create a new output stream that writes to a buffer. * * @param abDest Pointer to the destination. * @param cbDest Size of the destination in bytes. */ OSTRM(void *abDest, int cbDest); ~OSTRM(); int CbWrite(void *ab, int cb); void Flush(); }; #endif // STREAM_H ================================================ FILE: include/suv.h ================================================ /** * @file suv.h * * @brief Smash-up vehicle (the van and other racecars). */ #ifndef SUV_H #define SUV_H #include "common.h" /** * @class SMASHUP_VEHICLE * @brief Vehicles used in At the Dog Track, A Desperate Race, and Burning Rubber (not A Hazardous Path). * * @todo What is the base class? */ struct SUV // : TBD { // ... }; void InitSuv(SUV *psuv); #endif // SUV_H ================================================ FILE: include/sw.h ================================================ /** * @file sw.h * * @brief Scene world? */ #ifndef SW_H #define SW_H #include "common.h" #include #include #include #include #include #include #include #include typedef void (*PFNFILTER)(void *, SO *); // TODO: Figure out if this is correct. // Forward. struct OXA; struct VISMAP; /** * @class WORLD * * @brief Not fully understood, but everything in the * game world is owned by an instance of this struct. * * @todo Add the rest of the fields. */ struct SW : public LO { /* 0x34 */ int cpsoAll; /* 0x38 */ int cpsoRoot; /* 0x3c */ DL dlRoot; /* 0x48 */ DL dlChild; /* 0x54 */ DL dlMRD; /* 0x60 */ DL dlBusy; /* 0x6c */ DL dlBusySo; /* 0x78 */ DL dlMRDRealClock; /* 0x84 */ DL adlHash[512]; /* 0x1884 */ LO *aploCidHead[154]; /* 0x1aec */ int fAaoxValid; /* 0x1af0 */ SLOTHEAP slotheapOx; /* 0x1afc */ STRUCT_PADDING(3); // Likely a SLOTHEAP. /* 0x1b08 */ SLOTHEAP slotheapXa; /* 0x1b14 */ SLOTHEAP slotheapMq; /* 0x1b20 */ STRUCT_PADDING(14); /* 0x1b58 */ SLOTHEAP slotheapAsega; /* 0x1b64 */ STRUCT_PADDING(6); /* 0x1b7c */ DL dlAsegaPending; /* 0x1b88 */ STRUCT_PADDING(24); /* 0x1be8 */ DL dlLight; /* 0x1bf4 */ STRUCT_PADDING(6); /* 0x1c0c */ SLOTHEAP slotheapStso; /* 0x1c18 */ STRUCT_PADDING(9); /* 0x1c3c */ DL dlProxy; /* 0x1c48 */ DL dlFly; /* 0x1c54 */ DL dlDprize; /* 0x1c60 */ DL dlRat; /* 0x1c6c */ DL dlRathole; /* 0x1c78 */ DL dlDartFree; /* 0x1c84 */ DL dlSpire; /* 0x1c90 */ DL dlRail; /* 0x1c9c */ DL dlLanding; /* 0x1ca8 */ STRUCT_PADDING(9); // Likely 3 DL's. /* 0x1ccc */ DL dlCrfod; /* 0x1cd8 */ STRUCT_PADDING(36); /* 0x1d68 */ LSM lsmDefault; /* 0x1d70 */ STRUCT_PADDING(85); /* 0x1ec4 */ VISMAP *pvismap; /* 0x1ec8 */ MQ *pmqCallbackFirst; /* 0x1ecc */ MQ *pmqCallbackLast; /* 0x1ed0 */ STRUCT_PADDING(274); /* 0x2318 */ float gexcMenu; /* 0x231c */ int cHandsOff; /* 0x2320 */ STRUCT_PADDING(11); /* 0x234c */ float rDarken; /* 0x2350 */ float rDarkenSmooth; // ... // MISALIGNED: void (*pcbUpdate)(float fDelta); }; /** * @brief Unknown. * @todo Implement the struct and figure out where it belongs. */ struct XA { /* 0x00 */ STRUCT_PADDING(3); /* 0x0c */ XA *pxaNextTarget; }; // 0x10 bytes. /** * @brief Unknown. * @todo Implement the struct and figure out where it belongs. */ struct STSO { /* 0x00 */ STRUCT_PADDING(1); /* 0x04 */ STSO *pstsoNext; }; // 0x08 bytes. extern SW *g_psw; void InitSwDlHash(SW *psw); void InitSw(SW *psw); void DeleteSw(SW *psw); void SetupBulkDataFromBrx(int fLoadBulkData, CBinaryInputStream *pbis); void LoadBulkDataFromBrx(CBinaryInputStream *pbis); void SetSwGravity(SW *psw, float z); // TODO: Add unknown functions here. int FOverflowSwLo(SW *psw, LO *plo, int fHiPri); XA *PxaAllocSw(SW *psw); void FreeSwXaList(SW *psw, XA *pxaFirst); MQ *PmqAllocSw(SW *psw); void FreeSwMqList(SW *psw, MQ *pmq); void EnsureSwCallback(SW *psw, PFNMQ pfnmq, void *pvContext, MSGID msgid, void *pvCallbackData); void PostSwCallback(SW *psw, PFNMQ pfnmq, void *pvContext, MSGID msgid, void *pvCallbackData); void ClearSwCallbacks(SW *psw, GRFCMQ grfcmq, PFNMQ pfnmq, void *pvContext, MSGID msgid, void *pvCallback); void ProcessSwCallbacks(SW *psw); void ProcessSwSpliceScheduledCallbacks(SW *psw, float dt); STSO *PstsoAllocSw(SW *psw); void FreeSwStsoList(SW *psw, STSO *pstsoFirst); void AddSwProxySource(SW *psw, LO *ploProxySource, int cploClone); LO *PloGetSwProxySource(SW *psw, int ipsl); void IntersectSwBoundingBox(SW *psw, SO *psoIntersect, VECTOR *ppos1, VECTOR *ppos2, PFNFILTER pfn, void *pvContext, int *pcpso, SO ***papso); void IntersectSwBoundingSphere(SW *psw, SO *psoIntersect, VECTOR *pposCenter, float sRadius, PFNFILTER pfn, void *pvContext, int *pcpso, SO ***papso); void RemoveOxa(OXA *poxa, OXA **ppoxaFirst); void InitSwAoxa(SW *psw); void AddOxa(OXA *poxa, OXA **ppoxaFirst); OXA *PoxaAllocSw(SW *psw, SO *pso); void FreeSwPoxa(SW *psw, OXA *poxa); void CreateSwDefaultLights(SW *psw); void CreateSwPrizes(SW *psw); void LoadSwFromBrx(SW *psw, CBinaryInputStream *pbis); int FClipLineHomogeneous(VECTOR4 *apos); void DrawLineWorld(VECTOR *ppos1, VECTOR *ppos2, RGBA *rgba, CM *pcm, int fDepthTest); void DrawAxesWorld(VECTOR *ppos, MATRIX3 *pmat, float sScale, CM *pcm, int fDepthTest); void DrawBezWorld(VECTOR *ppos0, VECTOR *pv0, VECTOR *ppos1, VECTOR *pv1, float dtSeg, RGBA *rgba, CM *pcm, int fDepthTest); void SetSwIllum(SW *psw, float uMidtone); void SetSwIllumShadow(SW *psw, float uShadow); void SetSwExcitement(SW *psw, float gexcMenu); int FLevelSwVisited(SW *psw, WID wid); int FLevelSwPrimary(SW *psw, WID wid); int FLevelSwSecondary(SW *psw, WID wid); int FLevelSwTertiary(SW *psw, WID wid); // TODO: Add unknown functions here. void SetSwPlayerSuck(SW *psw, float uSuck); void GetSwPlayerSuck(SW *psw, float *puSuck); void IncrementSwHandsOff(SW *psw); void DecrementSwHandsOff(SW *psw); /** * @note Not in the prototype, so name is unofficial. */ int IsSwHandsOff(SW *psw); void IsSwVagPlaying(SW *psw, int *pfPlaying); void SetSwDarken(SW *psw, float rDarken); void SetSwDarkenSmooth(SW *psw, float rDarkenSmooth); void CancelSwDialogPlaying(SW *psw); #endif // SW_H ================================================ FILE: include/tail.h ================================================ /** * @file tail.h * * @brief JT tail physics. */ #ifndef TAIL_H #define TAIL_H #include "common.h" /** * @class TAIL * @brief Used for Sly's tail, and the accessory on top of the Cooper van. */ struct TAIL { // ... }; #endif // TAIL_H ================================================ FILE: include/tank.h ================================================ /** * @file tank.h */ #ifndef TANK_H #define TANK_H #include "common.h" #include #include #include #include #include #include #include // Forward. enum MSGID; /** * @brief Tank State. */ enum TANKS { TANKS_Nil = -1, TANKS_Passive = 0, TANKS_Active = 1, TANKS_Zap = 2, TANKS_Dead = 3, TANKS_Peek = 4, TANKS_Max = 5 }; /** * @class HOVER_TANK * @brief Hover tank used in A Ghastly Voyage and Rapid Fire Assault. */ struct TANK : public STEP { // ... }; void InitTank(TANK *ptank); void PostTankLoad(TANK *ptank); void UpdateTank(TANK *ptank, float dt); void UseTankCharm(TANK *ptank); void UpdateTankActive(TANK *ptank, JOY *pjoy, float dt); void OnTankActive(TANK *ptank, int fActive, PO *ppoOther); void RenderTankAll(TANK *ptank, CM *pcm, RO *pro); void ImpactTank(TANK *ptank, int fParentDirty); int FInvulnerableTank(TANK *ptank, ZPK zpk); void ApplyTankThrow(TANK *ptank, PO *ppo); int FTakeTankDamage(TANK *ptank, ZPR *pzpr); // TODO: Define XP. // void AdjustTankNewXp(TANK *ptank, XP *pxp, int ixpd); void HandleTankMessage(TANK *ptank, MSGID msgid, void *pv); JTHS JthsCurrentTank(TANK *ptank); void SetTankTanks(TANK *ptank, TANKS tanks); #endif // TANK_H ================================================ FILE: include/target.h ================================================ /** * @file target.h */ #ifndef TARGET_H #define TARGET_H #include "common.h" #include #include /** * @class TARGET * @brief Target point defined by a transform, radius, and some other data. */ struct TARGET : public XFM { /* 0x80 */ DLE dleTarget; /* 0x88 */ int grftak; /* 0x8c */ float sRadiusTarget; /* 0x90 */ int fHitTest; undefined4 unk0; undefined4 unk1; undefined4 unk2; }; void StartupTarget(); void ResetTargetList(); void InitTarget(TARGET *ptarget); void OnTargetAdd(TARGET *ptarget); void OnTargetRemove(TARGET *ptarget); void CloneTarget(TARGET *ptarget, TARGET *ptargetBase); #endif // TARGET_H ================================================ FILE: include/text.h ================================================ /** * @file text.h * * @brief Text manipulation functions. */ #ifndef TEXT_H #define TEXT_H #include "common.h" #include /** * @brief Text format value width. * * @note Based on may proto. */ enum TFVW { TFVW_Nil = -1, TFVW_32 = 0, TFVW_16 = 1, TFVW_64 = 2, TFVW_Max = 3 }; /** * @brief Text format type. * * @note Based on may proto. */ enum TFTS { TFTS_Nil = -1, TFTS_Percent = 0, TFTS_Flags = 1, TFTS_Width = 2, TFTS_Precision = 3, TFTS_Type = 4, TFTS_Conversion = 5, TFTS_Done = 6, TFTS_Max = 7 }; /** * @brief Text format structure. * * @note Based on may proto. */ struct TFT { int fMinus; int fPlus; int fSpace; int fHash; int fZero; int fZeroPrecision; int cchWidth; int cchPrecision; TFVW tfvw; int cCol; int cRow; uchar chConversion; int fUpperize; }; int CchParsePchzInt(char *pch, int *pn); int CchParsePchzTft(char *pchzFormat, TFT *ptft, char **pval); void WriteTftPchz(TFT *ptft, OSTRM *postrm, char *pchz); int FNegTftUl(TFT *ptft, union UL *pul); // todo: define type of pul uint UnRadixFromChConversion(int chConversion); int CchAchFromUl(char *achDest, int cchDest, ulong ul, uint unRadix); void WriteTftUl(TFT *ptft, OSTRM *postrm, ulong ul); int ExpFirstFromG(long g); char ChDigitFromG(long g, int expFirst, int exp); int CchAchFromDouble(char *achDest, int cchDest, TFT *ptft, long g); void WriteTftDouble(TFT *ptft, OSTRM *postrm, long g); void WriteTft(TFT *ptft, OSTRM *postrm, char **pval, ulong param_4, ulong param_5, undefined8 param_6, double param_7); int CchOstrmPrintf(OSTRM *postrm, char *pchzFormat, char *val); extern "C" { /** * @todo Document this function. */ int vprintf(char *pchzFormat, char *val); /** * @brief Print formatted output to stdout. * * @param pchzFormat The format string. * @param ... The arguments to format. * * @return The number of characters written. */ int printf(char *pchzFormat, ...); /** * @todo Document this function. */ int vsprintf(char *pchzDest, char *pchzFormat, char *val); /** * @brief Write formatted output to a string. * * @param pchzDest The destination string. * @param pchzFormat The format string. * @param ... The arguments to format. * * @return The number of characters written. */ int sprintf(char *pchzDest, char *pchzFormat, ...); /** * @todo Document this function. */ int _vsnprintf(char *pchzDest, int cchDest, char *pchzFormat, char *val); /** * @brief Write formatted output to a string with a specified length. * * @param pchzDest The destination string. * @param cchDest The maximum number of characters to write. * @param pchzFormat The format string. * @param ... The arguments to format. * * @return The number of characters written. */ int _snprintf(char *pchzDest, int cchDest, char *pchzFormat, ...); /** * @brief Count the number of characters in a string. * * @param pchz The string to count. */ //uint strlen(char *pchz); // conflicts with built-in strlen /** * @brief Copy a string. * * @param pchzDst The destination string. * @param pchzSrc The source string. */ //char *strcpy(char *pchzDst, char *pchzSrc); // conflicts with built-in strcpy /** * @brief Search for a character in a string. * * @param pchz The string to search. * @param ch The character to search for. * * @return A pointer to the first occurrence of the character in the string, or NULL if the character is not found. */ char *strchr(char *pchz, int ch); } void UpperizePchz(char *pchz); #endif // TEXT_H ================================================ FILE: include/thread.h ================================================ /** * @file thread.h * * @brief Semaphore, thread, and critical section utilities. */ #ifndef THREAD_H #define THREAD_H #include "common.h" /** * @brief Details for a critical section */ struct CRITSECT { int cEnter; int thread; int sema; }; /** * @brief Create a semaphore. * * @param initCount Initial count. * @param maxCount Maximum count. * @return The semaphore ID. */ int SemaCreate(int initCount, int maxCount); /** * @brief Initialize a critical section. * * @param pcritsect Critical section. */ void InitCritSect(CRITSECT* pcritsect); /** * @brief Enter a critical section. * * @param pcritsect Critical section. */ void EnterCritSect(CRITSECT* pcritsect); /** * @brief Leave a critical section. * * @param pcritsect Critical section. */ void LeaveCritSect(CRITSECT* pcritsect); /** * @brief Initialize parameters for a rendering thread. */ void StartupThread(); extern CRITSECT g_athread; #endif // THREAD_H ================================================ FILE: include/tn.h ================================================ /** * @brief tn.h */ #ifndef TN_H #define TN_H #include "common.h" #include #include #include #include #include // Forward. struct RO; /** * @brief Tunnel state? */ enum TNS { TNS_Nil = -1, TNS_Out = 0, TNS_In = 1, TNS_Max = 2 }; /** * @class NEW_TUNNEL * @brief Unknown. * @todo Implement the struct. */ struct TN : public ALO { // ... }; /** * @brief Tunnel something (?) * @todo Implement the struct. */ struct TNFN { // ... }; TNFN *PtnfnFromTn(TN *ptn); void GetTnfnNose(TNFN *ptnfn, CPDEFI *pcpdefi, VECTOR *pposNose, TN *ptnAdjust); void InitTn(TN *ptn); void OnTnRemove(TN *ptn); void LoadTnFromBrx(TN *ptn, CBinaryInputStream *pbis); void PostTnLoad(TN *ptn); void SetTnTns(TN *ptn, TNS tns); void UpdateTnCallback(TN *ptn, MSGID msgid, void *pv); void UpdateTn(TN *ptn, float dt); void RenderTnSelf(TN *ptn, CM *pcm, RO *pro); void FreezeTn(TN *ptn, int fFreeze); void SetTnFocusRatio(TN *ptn, float u); void CalculateTnCrv(TN *ptn, VECTOR *ppos, VECTOR *pdposCrv, VECTOR *pvecClosest); void CalculateTnPos(TN *ptn, VECTOR *pdposCrv, float sBase, float dsOffset, CLQ *aclq, LM *alm, FTND ftnd, VECTOR *pposOther); void ActivateCptn(CPTN *pcptn, void *pv); void DeactivateCptn(CPTN *pcptn, void *pv); void SetCptn(CPTN *pcptn, void *pv); void RevokeCptn(CPTN *pcptn, void *pv); void UpdateCptn(CPTN *pcptn, CPDEFI *pcpdefi, JOY *pjoy, float dt); void LoadTbspFromBrx(CBinaryInputStream *pbis, int *pctsurf, TSURF **patsurf, int *pctbsp, TBSP **patbsp); int FCheckTbspPoint(TBSP *atbsp, VECTOR *pposLocal); #endif TN_H ================================================ FILE: include/transition.h ================================================ /** * @file transition.h * * @brief Level transitions. */ #ifndef TRANSITION_H #define TRANSITION_H #include "common.h" #include #include #include class CTransition; extern CTransition g_transition; /** * @brief Level Table Struct * * Holds data about the level file. * * @note Name is not official. */ struct LevelTableStruct { CFileLocation fileLocation; /* Ciphers for lsn and size */ uint search_val; uint for_lsn; uint search_cipher; /* Cipher for search val */ uint for_size; uint level_id; /* Level ID */ uint level_name; /* Pointer to level name string */ FLS tasks; /* Tasks to complete (visited, key, vault, mts) */ }; /** * @brief Transition flags. */ enum FTRANS { FTRANS_None = 0, FTRANS_Checkpoint = 1, FTRANS_RetryWorld = 2, FTRANS_ClearGame = 4, FTRANS_SameWorld = 8, FTRANS_ShowLives = 16 }; /** * @brief Transition flags integer type. */ typedef int GRFTRANS; /** * @brief Transition data * * Responsible for holding data bout a level transition. */ struct TRANS { uint fSet; LevelTableStruct *pchzWorld; // Current file thats loading struct OID oidWarp; // Checkpoint Warps OID oidWarpContet; GRFTRANS grftrans; // Lost all lives flags }; /** * @brief Transition */ class CTransition { public: int m_fPending; // Basically like a level pending flag. char *m_pchzWorld; // This is the ptr to enc level sector offset and size in memory OID m_oidWarp; // Which checkpoint you spawn at when you start a level OID m_oidWarpContext; GRFTRANS grftrans; // Flags that affect level loading, one of them checks if you lost all lives when you die. char m_achzWorldCur[64]; // File description contents. /** * @brief Constructor. */ CTransition(); /** * @brief Sets the conditions on the level if you died or loading a level. */ void Set(char *pchzWorld, OID oidWarp, OID oidWarpContext, GRFTRANS grftrans); /** * @brief Executes the conditions from CTransition::Set by setting some engine vaules to default and loading the level file. */ void Execute(); }; /** * @brief Reloads the current level. The value of FTRANS affects the load. * * @param ftrans Transition flags. */ void ResetWorld(FTRANS ftrans); #endif // TRANSITION_H ================================================ FILE: include/turret.h ================================================ /** * @file turret.h * * @brief Stationary turret from Murray levels(?). */ #ifndef TURRET_H #define TURRET_H #include "common.h" #include #include #include #include #include #include /** * @class TURRET * @brief Stationary turret (maybe the one used in the murray levels). */ struct TURRET : public PO { // ... }; void InitTurret(TURRET *pturret); void PostTurretLoad(TURRET *pturret); void UpdateTurret(TURRET *pturret, float dt); void UpdateTurretActive(TURRET *pturret, JOY *pjoy, float dt); void OnTurretActive(TURRET *pturret, int fActive, PO *ppoOther); int FFilterTurret(TURRET *pturret, SO *psoOther); void UpdateTurretAim(TURRET *pturret); void FireTurret(TURRET *pturret); void HandleTurretMessage(TURRET *pturret, MSGID msgid, void *pv); int FIgnoreTurretIntersection(TURRET *pturret, SO *psoOther); void CollectTurretPrize(TURRET *pturret, PCK pck, ALO *paloOther); void GetTurretDiapi(TURRET *pturret, DIALOG *pdialog, DIAPI *pdiapi); #endif // TURRET_H ================================================ FILE: include/tv.h ================================================ /** * @file tv.h */ #ifndef TV_H #define TV_H #include "common.h" #include #include #include #include // Forward. struct RPL; /** * @brief TV State. */ enum TVS { TVS_Nil = -1, TVS_Listen = 0, TVS_Talk = 1, TVS_Max = 2 }; /** * @brief TV (?) State. */ enum TVGS { TVGS_Nil = -1, TVGS_Opening = 0, TVGS_Open = 1, TVGS_Closing = 2, TVGS_Closed = 3, TVGS_Max = 4 }; /** * @brief Unknown. * @todo Implement the struct. */ struct TV : public BLOT { // ... }; void InitTv(TV *ptv, BLOTK blotk); void PostTvLoad(TV *ptv); void GetTvItvbMinMax(TV *ptv, int *pitvbDrawMin, int *pitvbDrawMax); void DrawTvArea(TV *ptv, GIFS *gifs, int z); void DrawTvBands(TV *ptv, GIFS *gifs); void DrawTvOutline(TV *ptv, GIFS *gifs); void DrawTv(TV *ptv); void SetTvTvs(TV *ptv, TVS tvs); void AcceptTvSpeaker(TV *ptv); void SetTvTvgs(TV *ptv, TVGS tvgs); void SetTvBlots(TV *ptv, BLOTS blots); void UpdateTv(TV *ptv); void RenderTv(TV *ptv); void PreTvContext(RPL *prpl); void PostTvContext(RPL *prpl); void SetTvSpeaker(TV *ptv, SPEAKER *pspeaker); void SetTvReplace(TV *ptv, ALO *paloReplace); void OnTvReset(TV *ptv); #endif // TV_H ================================================ FILE: include/types.h ================================================ /** * @file types.h * * @brief Common types used across the codebase. */ #ifndef TYPES_H #define TYPES_H #include // Exact-width integers (don't use these in most cases) typedef signed char int8_t; typedef short int16_t; typedef int int32_t; typedef long long int64_t; typedef unsigned char uint8_t; typedef unsigned short uint16_t; typedef unsigned int uint32_t; typedef unsigned long long uint64_t; // Unsigned aliases typedef uint8_t uchar; typedef uint16_t ushort; typedef uint32_t uint; typedef uint64_t ulong; // Helper types for unknown struct fields typedef uchar undefined1; typedef ushort undefined2; typedef uint undefined4; typedef ulong undefined8; // 128-bit quad-word type for lq/sq instructions typedef unsigned long long qword __attribute__((mode(TI))); // Misc typedef uchar byte; typedef union QW; #endif // TYPES_H ================================================ FILE: include/ub.h ================================================ /** * @file ub.h * * @brief Underwater boss. */ #ifndef UB_H #define UB_H #include "common.h" #include #include #include // Forward. struct ASEG; /** * @class UW_BOSS_GOMER * @brief Underwater boss gomer (Raleigh). */ struct UBG : public GOMER { // ... /* 0xc58 */ OID oidPatrolGoal; /* 0xc5c */ int cJump; /* 0xc60 */ STRUCT_PADDING(1); /* 0xc64 */ SO *apsoPads[6]; // ... }; void InitUbg(UBG *pubg); void PostUbgLoad(UBG *pubg); SO *PsoPadUbgClosest(UBG *pubg, VECTOR *ppos); void OnUbgEnteringSgs(UBG *pubg, SGS sgsPrev, ASEG *pasegOverride); SGS SgsNextUbgAI(UBG *pubg); int FDetectUbg(UBG *pubg); int FCanUbgAttack(UBG *pubg); void DoUbgFreefallJump(UBG *pubg); void DoUbgFreefallLanding(UBG *pubg); void UpdateUbgGoal(UBG *pubg, int fEnter); void UpdateUbgSgs(UBG *pubg); int FIgnoreUbgIntersection(UBG *pubg, SO *psoOther); #endif // UB_H ================================================ FILE: include/ui.h ================================================ /** * @file ui.h * * @brief User interface. */ #ifndef UI_H #define UI_H #include "common.h" #include /** * @brief User interface state. */ enum UIS { UIS_Nil = -1, UIS_Splash = 0, UIS_Attract = 1, UIS_Playing = 2, UIS_Pausing = 3, UIS_Paused = 4, UIS_Unpausing = 5, UIS_WorldMap = 6, // todo: What is 7? UIS_Wiping = 8, UIS_Max = 9 }; /** * @brief User interface. * * @note Roughly based on May proto, may be inaccurate. */ struct UI { UIS uis; int tUis; BLOT *apblotActive; int cpblotActive; UIS uisPlaying; float rvolMusicPrepause; float rvolEffectsPrepause; int unk1; int unk2; int unk3; int unk4; int unk5; int unk6; }; void StartupUi(); void InitUi(UI *pui); void PostUiLoad(UI *pui); void UpdateUi(UI *pui); void PushUiActiveBlot(UI *pui, BLOT *pblot); void PopUiActiveBlot(UI *pui); /** * @brief Calls DrawBlots to draw the UI. */ void DrawUi(); /** * @brief Calls RenderBlots to render the UI. */ void RenderUi(); /** * @brief Resets the UI to its initial state. * * @param pui Pointer to UI struct */ void ResetUi(UI *pui); /** * @brief Sets the UI state. * * @param pui Pointer to UI struct * @param uis UI state */ void SetUiUis(UI *pui, UIS uis); /** * @brief Sets the UI pause state. * * @param pui Pointer to UI struct * @param rPause Pause state */ void SetUiUPause(UI *pui, float rPause); // ...more functions... extern UI g_ui; // Global UI object #endif // UI_H ================================================ FILE: include/update.h ================================================ /** * @file update.h */ #ifndef UPDATE_H #define UPDATE_H #include "common.h" #include /** * @brief Updates all objects in the given SW. * * @param psw The SW to update. * @param dt Delta time. */ void UpdateSwObjects(SW *psw, float dt); void UpdateSwPosWorldPrev(SW *psw); void UpdateSwRealClock(SW *psw, float dt); void UpdateSwDarkening(SW *psw, float dt); /** * @brief Updates the given SW. * * @param psw The SW to update. * @param dt Delta time. */ void UpdateSw(SW *psw, float dt); #endif // UPDATE_H ================================================ FILE: include/util.h ================================================ /** * @file util.h * * @brief Utility functions. */ #ifndef UTIL_H #define UTIL_H #include "common.h" #include #include #include /** * @brief Constant Linear Quadratic. * * @note Quadratic curve representation */ struct CLQ { union { struct { float g0, g1, g2, gUnused; }; float ag[4]; }; }; /** * @brief Evaluates a quadratic curve at parameter x. * * @details Computes the quadratic equation: g0 + x*g1 + x²*g2 * Uses Horner's method for efficient evaluation: g0 + x*(g1 + x*g2) * This reduces multiplications from 3 to 2 compared to the expanded form. * * @param pclq Pointer to the quadratic curve * @param x Parameter value * @return Evaluated curve value at x */ static inline float GEvaluateClq(CLQ *pclq, float x) { return pclq->g0 + x * (pclq->g1 + x * pclq->g2); } /** * @brief Linear interpolation between two values. * * @details Returns (1-t)*a + t*b, smoothly blending from a (at t=0) to b (at t=1). * * @param a Starting value * @param b Ending value * @param t Interpolation parameter (typically 0.0-1.0) * @return Interpolated value between a and b */ static inline float GLerp(float a, float b, float t) { return (1.0f - t) * a + t * b; } /** * @brief Limits for a float. */ struct LM { float gMin, gMax; }; extern LM g_lmZeroOne; /** * @brief Normalizes a float to the range [-PI, PI]. * * @param rad The float to normalize * * @retval The normalized float */ float RadNormalize(float rad); /** * @brief Clamps the float to the inteval [-absLimit, absLimit] * * @param g The float to clamp * @param absLimit The limit to clamp to * * @retval The clamped float */ float GLimitAbs(float g, float absLimit); float GSmooth(float gCur, float gTarget, float dt, SMP *psmp, float *pdgNext); float GSmoothA(float gCur, float dgCur, float gTarget, float dt, SMPA *psmpa, float *pdgNext); float RadSmooth(float radCur, float radTarget, float dt, SMP *psmp, float *pdradNext); float RadSmoothA(float radCur, float dradCur, float radTarget, float dt, SMPA *psmpa, float *pdradNext); VU_VECTOR PosSmooth(VU_VECTOR posCur, VU_VECTOR posTarget, float dt, SMP *psmp, VECTOR *pv); void SmoothMatrix(MATRIX3 *pmatPrev, MATRIX3 *pmatNext, SMP *psmp, float dt, MATRIX3 *pmatSmooth, VECTOR *pwSmooth); /** * @brief Gets a random int that falls between the given values. * * @param nLow The lower bound * @param nHigh The upper bound * * @retval A random int that falls between the given values */ int NRandInRange(int nLow, int nHigh); /** * @brief Gets a random float that falls between the given values. * * @param gLow The lower bound * @param gHigh The upper bound * * @retval A random float that falls between the given values */ float GRandInRange(float gLow, float gHigh); /** * @brief Returns a random number from the Gaussian distribution. * * @param gMean The mean of the distribution * @param gDeviation The standard deviation of the distribution * @param gLimit The limit of the distribution * * @retval A random number from the Gaussian distribution */ float GRandGaussian(float gMean, float gDeviation, float gLimit); /** * @brief Checks if two floats are within a given epsilon of each other. * * @param g1 The first float * @param g2 The second float * @param gEpsilon The epsilon * * @retval true if the floats are within the epsilon of each other * @retval false otherwise */ int FFloatsNear(float g1, float g2, float gEpsilon); /** * @brief Solves a quadratic equation. * * A quadratic equation is of the form ax^2 + bx + c = 0. The solutions (if any) * are stored in ax[0] and ax[1]. * * @param a The coefficient of the x^2 term * @param b The coefficient of the x term * @param c The constant term * @param ax The array to store the solutions in * * @return The number of solutions found (0, 1, or 2) */ int CSolveQuadratic(float a, float b, float c, float *ax); /** * @todo Add documentation for this function. */ void PrescaleClq(CLQ *pclqSrc, float ru, float du, CLQ *pclqDst); /** * @brief Calculates the sine and cosine of a given angle. * * @param rad The angle * @param pgSin The pointer to store the sine in * @param pgCos The pointer to store the cosine in */ void CalculateSinCos(float rad, float *pgSin, float *pgCos); /** * @brief Truncates a double precision floating point number to an integer value, * rounding up if the fractional part is exactly 0.5. * * @param g The double precision floating point number to truncate */ double GTrunc(double g); /** * @brief Truncates a single precision floating point number to an integer value, * rounding up if the fractional part is exactly 0.5. * * @param g The single precision floating point number to truncate */ float GTrunc(float g); /** * @brief Calculates the positive remainder of dividing the dividend by the divisor. * * If the result is negative, it is adjusted to be positive by adding the divisor. * * @param gDividend The dividend. * @param gDivisor The divisor. * * @return The positive remainder of the division. */ float GModPositive(float gDividend, float gDivisor); void FitClq(float g0, float g1, float u, float gU, CLQ *pclq); /** * @brief Checks if a float falls within the given limit. * * @param plm Pointer to the limit * @param g The float to check */ int FCheckLm(LM *plm, float g); /** * @brief Limits a float to the given range. * * @param plm Pointer to the limit * @param g The float to limit */ float GLimitLm(LM *plm, float g); /** * @brief Stubbed function, does nothing. */ void Force(void *pv); // todo: see if these exist and/or in the right oder //int CSolveClq(CLQ* pclq, float g, float* ag); //float DtSmooth(float gCur, float gTarget, SMP* psmp, float* pdg); //void ExtendRange(PFNGG pfn, void* pv, float g, float dg, float gMax, float* pgMic, float* pgMac); //int NRoundG(float g); //void SmoothMulti(int c, float dt, float r); #endif // UTIL_H ================================================ FILE: include/vb.h ================================================ /** * @file vb.h * * @brief Voodoo boss. */ #ifndef VB_H #define VB_H #include /** * @class V_BOSS_GUARD * @brief Voodoo boss guard (Mz Ruby). */ struct VBG : public STEPGUARD { // ... }; #endif // VB_H ================================================ FILE: include/vec.h ================================================ /** * @file vec.h * * @brief Vector math. */ #ifndef VEC_H #define VEC_H #include "common.h" struct SO; /** * @brief Vector3 with X, Y, and Z * @todo This probably needs to be 16-byte aligned? */ struct VECTOR { float x, y, z; }; struct VECTOR4 { float x, y, z, w; }; /** * @todo Should be 16-byte aligned. */ struct VU_VECTOR { ushort data; }; /** * @brief Sets the coordinates of a vector using cylindrical coordinates. * * @param pvec Pointer to the vector * @param rad Degrees in radians * @param sXY XY-Scale/Radius * @param sZ Z Offset */ void SetVectorCylind(VECTOR *pvec, float rad, float sXY, float sZ); /** * @brief Sets the coordinates of a vector using spherical coordinates. * * @param pvec Pointer to the vector * @param radPan Angle around Z axis * @param radTilt Angle above horizontal * @param s Scale/Radius */ void SetVectorSphere(VECTOR *pvec, float radPan, float radTilt, float s); /** * @brief Projects one vector onto another using scalar projection. * * @param pvec1 Vector to project * @param pvec2 Vector to project onto * * @return Scalar projection of vec1 onto vec2 */ float SProjectVector(VECTOR *pvec1, VECTOR *pvec2); /** * @brief Gets the normal vectors of a vector. * * @param param_1 Unknown * @param param_2 Unknown * @param param_3 Unknown * @param param_4 Unknown * * @todo Static analysis */ void GetNormalVectors(VECTOR *param_1, VECTOR *param_2, VECTOR *param_3, VECTOR *param_4); /** * @brief Gets the normal vector of a vector. * * @param pvec Pointer to the vector * @param presult Pointer to store the resulting normal vector */ void GetNormalVector(VECTOR *pvec, VECTOR *presult); /** * @brief Calculates the angle between vectors in radians. * * @param pvecStart Unknown * @param pvecFinish Unknown * @param pnormal Unknown * * @return Angle between vectors in radians. */ long RadBetweenVectors(VECTOR *pvecStart, VECTOR *pvecFinish, VECTOR *pnormal); /** * @brief Finds the closest point between the lines AB and CD. * * @param pA Pointer to the first point of line AB * @param pB Pointer to the second point of line AB * @param pC Pointer to the first point of line CD * @param pD Pointer to the second point of line CD * @param unk_float1 Unknown float * @param unk_float2 Unknown float * @param presult Pointer to store the resulting point */ void FindClosestPointBetweenLines(VECTOR *pA, VECTOR *pB, VECTOR *pC, VECTOR **pD, float *unk_float1, float *unk_float2, VECTOR *presult); /** * @brief Finds the closest point between two line segments. * * @todo Static analysis of parameters and return values. */ void FindClosestPointBetweenLineSegments(VECTOR *param_1, VECTOR *param_2, VECTOR *param_3, VECTOR *param_4, VECTOR param_5, float *param_6, VECTOR *param_7); /** * @brief Calculates the pan and tilt of a vector * * @param pvec Pointer to the vector * @param pradPan Float pointer to store the pan result * @param pradTilt Float pointer to store the tilt result */ void CalculateVectorPanTilt(VECTOR *pvec, float *pradPan, float *pradTilt); /** * @brief Creates a vector from a rotation vector and an offset vector * * @details Use the peul vector to define euler angles for a vector, * Using the forward vector as a reference direction, * pdeul's X is a Rightward offset * pdeul's Y is a Forward offset * pdeul's Z is a Vertical offset * * @param peul Rotation vector, defines a "forward" * @param pdeul Offset vector * @param pw Resultant Vector */ void ConvertDeulToW(VECTOR *peul, VECTOR *pdeul, VECTOR *pw); /** * @brief Calculates the muzzle velocity of a projectile. * * @param pposLaunch Initial position * @param pposTarget Target position * @param radVert Vertical angle? * @param pvecMuzzle Target velocity * @param psoLaunch Unknown * * @note This is an educated guess and may not be accurate. */ int FCalculateMuzzleVelocity(VECTOR *pposLaunch,VECTOR *pposTarget,float radVert,VECTOR *pvecMuzzle,SO *psoLaunch); /** * @brief Calculates the muzzle velocity angle of a projectile. * * @param param_1 Initial position * @param param_2 Target position * @param param_3 Target velocity * @param param_4 Unknown * * @note The name/paremeters for this function are an educated guess and may not be accurate. */ int FCalculateMuzzleVelocityAngle(VECTOR *pposLaunch, VECTOR *pposTarget, float radTilt, VECTOR *pvecMuzzle, SO *psoLaunch); /** * @brief Limits the length of a vector. * * @param pvec Pointer to the vector * @param glength Length to limit the vector to * @param presult Pointer to store the resulting vector */ void LimitVectorLength(VECTOR *pvec, float glength, VECTOR *presult); #endif // VEC_H ================================================ FILE: include/vifs.h ================================================ /** * @file vifs.h */ #ifndef VIFS_H #define VIFS_H #include "common.h" #include #include /** * @brief Unpack kind? */ enum UPK { UPK_Nil = -1, UPK_S32 = 0, UPK_S16 = 1, UPK_S8 = 2, UPK_V2_32 = 4, UPK_V2_16 = 5, UPK_V2_8 = 6, UPK_V3_32 = 8, UPK_V3_16 = 9, UPK_V3_8 = 10, UPK_V4_32 = 12, UPK_V4_16 = 13, UPK_V4_8 = 14, UPK_V4_5 = 15, UPK_Max = 16 }; /** * @brief Vector Interface System? */ class VIFS : public DMAS { public: /* 0x1c */ uint m_unMask; /* 0x20 */ int m_fCheckCnt; VIFS(); void Align(int iun); void AddVifBaseOffset(int iqwBase, int diqwOffset); void AddVifMscal(void *pv); void AddVifMscalf(void *pv); void AddVifFlush(); void AddVifFlusha(); void AddVifFlushe(); void AddVifStcycl(int wl, int cl); void AddVifStrow(QW *pqw); void AddVifStmask(uint unMask); int CbUnpackSetup(UPK upk, int c, int iqw); void UnpackHelper(UPK upk, int c, int iqw, int *pcb, uint **ppun); void AddVifUnpack(UPK upk, int c, void *pvSrc, int iqw); void AddVifUnpackRefs(UPK upk, int c, void *pvSrc, int iqw, void ***pppv); void AddVifDirect(int cqw, QW *aqw, int fInt); void AddVifDirectRefs(int cqw, QW *aqw, int fInt); void AddVifGifs(GIFS *pgifs); }; #endif // VIFS_H ================================================ FILE: include/vis.h ================================================ /** * @file vis.h * * @brief Visibility map. */ #ifndef VIS_H #define VIS_H #include "common.h" #include #include #include #include typedef int GRFZON; /** * @class VISMAP * @brief Visibility map. */ struct VISMAP : public LO { /* 0x30 */ int cvbsp; /* 0x34 */ VBSP *avbsp; /* 0x3c */ int cgrfzon; /* 0x40 */ GRFZON *agrfzonOneHop; }; void InitVismap(VISMAP *pvismap); void LoadVismapFromBrx(VISMAP *pvismap, CBinaryInputStream *pbis); GRFZON GrfzonOneHop(VISMAP *pvismap, VBSP *pvbsp); void ClipVbspSphereOneHop(VISMAP *pvismap, VBSP *pvbsp, VU_VECTOR pos, float sRadius, GRFZON *pgrfzon); void ClipVismapSphereOneHop(VISMAP *pvismap, VECTOR *ppos, float sRadius, GRFZON *pgrfzon); void ClipVismapPointNoHop(VISMAP *pvismap, VECTOR *ppos, GRFZON *pgrfzon); #endif // VIS_H ================================================ FILE: include/vol.h ================================================ /** * @file vol.h * * @brief Volume object. * * @note Not referenced in any debug symbols, but it doesn't make sense * to put the VOL struct anywhere else. */ #ifndef VOL_H #define VOL_H #include "common.h" #include /** * @class VOLUME * @brief Volume in space defined by transform, tsurf, and tbsp. */ struct VOL : public XFM { int ctsurf; TSURF *atsurf; int ctbsp; TBSP *atbsp; }; #endif // VOL_H ================================================ FILE: include/vtables.h ================================================ /** * @file vtables.h * * @brief Manually crafted vtables for various structs. */ #ifndef VTABLES_H #define VTABLES_H #include #include typedef int GRFCID; /** * @brief Generic VT struct. Used to determine which VTables an entity inherits at runtime. */ struct VT { VT *pvtSuper; CID cid; GRFCID grfcid; int cb; }; /***************************************************************** * BASIC-DERIVED VTABLES *****************************************************************/ struct CBinaryInputStream; struct LO; /** * @brief VT for basic objects. */ struct VTBASIC { VT *pvtSuper; CID cid; }; /** * @brief VT for LO objects. */ struct VTLO : VT { void (*pfnInitLo)(LO *); void (*pfnSetLoDefaults)(LO *); void (*pfnAddLo)(LO *); void (*pfnRemoveLo)(LO *); void (*pfnAddLoHierarchy)(LO *); void (*pfnRemoveLoHierarchy)(LO *); void (*pfnOnLoAdd)(LO *); void (*pfnOnLoRemove)(LO *); void (*pfnCloneLoHierarchy)(LO *, LO *); void (*pfnCloneLo)(LO *, LO *); void (*pfnLoadLoFromBrx)(LO *, CBinaryInputStream *); void (*pfnAddLoRecursive)(/* @todo: null in release & proto? */); void (*pfnRemoveLoRecursive)(/* @todo: null in release & proto? */); void (*pfnHandleLoMessage)(LO *, MSGID, void *); void (*pfnSendLoMessage)(LO *, MSGID, void *); void (*pfnBindLo)(LO *); void (*pfnPostLoLoad)(LO *); /** * @todo From prototype, not confirmed if in release */ void (*pfnUpdateLo)(); void (*pfnUpdateLoXfWorld)(); void (*pfnUpdateLoXfWorldHierarchy)(); void (*pfnFreezeLo)(); void (*pfnSetLoParent)(); void (*pfnApplyLoProxy)(); void (*pfnSubscribeLoObject)(); void (*pfnUnsubscribeLoObject)(); void (*pfnSubscribeLoStruct)(); void (*pfnUnsubscribeLoStruct)(); void (*pfnGetLoParams)(); void (*pfnUpdateLoLiveEdit)(); }; /***************************************************************** * BLOT-DERIVED VTABLES *****************************************************************/ struct BLOT; /** * @brief VT for generic blots. */ struct VTBLOT { void (*pfnInitBlot)(BLOT *); void (*pfnPostBlotLoad)(BLOT *); void (*pfnUpdateBlot)(BLOT *); void (*pfnOnBlotActive)(BLOT *); void (*pfnUpdateBlotActive)(BLOT *); void (*pfnOnBlotReset)(BLOT *); void (*pfnOnBlotPush)(BLOT *); void (*pfnOnBlotPop)(BLOT *); void (*pfnSetBlotAchzDraw)(BLOT *, const char *); void (*pfnDrawBlot)(BLOT *); void (*pfnRenderBlot)(BLOT *); void (*pfnDtAppearBlot)(BLOT *); void (*pfnDtVisibleBlot)(BLOT *); void (*pfnDtDisappearBlot)(BLOT *); void (*pfnShowBlot)(BLOT *); void (*pfnHideBlot)(BLOT *); void (*pfnSetBlotBlots)(BLOT *); void (*pfnSetBlotClock)(BLOT *); int (*pfnFIncludeBlotForPeg)(BLOT *); }; /** * @brief VT for the note blot. */ struct VTNOTE { void (*pfnInitBlot)(BLOT *); void (*pfnPostNoteLoad)(BLOT *); void (*pfnUpdateBlot)(BLOT *); void (*pfnOnBlotActive)(BLOT *); void (*pfnUpdateBlotActive)(BLOT *); void (*pfnOnBlotReset)(BLOT *); void (*pfnOnBlotPush)(BLOT *); void (*pfnOnBlotPop)(BLOT *); void (*pfnSetNoteAchzDraw)(BLOT *, const char *); void (*pfnDrawNote)(BLOT *); void (*pfnRenderBlot)(BLOT *); void (*pfnDtAppearBlot)(BLOT *); void (*pfnDtVisibleBlot)(BLOT *); void (*pfnDtDisappearBlot)(BLOT *); void (*pfnShowBlot)(BLOT *); void (*pfnHideBlot)(BLOT *); void (*pfnSetBlotBlots)(BLOT *); void (*pfnSetBlotClock)(BLOT *); int (*pfnFIncludeBlotForPeg)(BLOT *); }; /** * @brief VT for the binoc blot. */ struct VTBINOC { void (*pfnInitBinoc)(BLOT *); void (*pfnPostBinocLoad)(BLOT *); void (*pfnUpdateBlot)(BLOT *); void (*pfnOnBinocActive)(BLOT *); void (*pfnUpdateBinocActive)(BLOT *); void (*pfnOnBinocReset)(BLOT *); void (*pfnOnBinocPush)(BLOT *); void (*pfnOnBinocPop)(BLOT *); void (*pfnSetBinocAchzDraw)(BLOT *, const char *); void (*pfnDrawBinoc)(BLOT *); void (*pfnRenderBlot)(BLOT *); void (*pfnDtAppearBinoc)(BLOT *); void (*pfnDtVisibleBlot)(BLOT *); void (*pfnDtDisappearBinoc)(BLOT *); void (*pfnShowBlot)(BLOT *); void (*pfnHideBlot)(BLOT *); void (*pfnSetBinocBlots)(BLOT *); void (*pfnSetBlotClock)(BLOT *); int (*pfnFIncludeBlotForPeg)(BLOT *); }; /** * @brief VT for the timer blot. */ struct VTTIMER { void (*pfnInitBlot)(BLOT *); void (*pfnPostTimerLoad)(BLOT *); void (*pfnUpdateTimer)(BLOT *); void (*pfnOnBlotActive)(BLOT *); void (*pfnUpdateBlotActive)(BLOT *); void (*pfnOnBlotReset)(BLOT *); void (*pfnOnBlotPush)(BLOT *); void (*pfnOnBlotPop)(BLOT *); void (*pfnSetBlotAchzDraw)(BLOT *, const char *); void (*pfnDrawTimer)(BLOT *); void (*pfnRenderBlot)(BLOT *); void (*pfnDtAppearBlot)(BLOT *); void (*pfnDtVisibleBlot)(BLOT *); void (*pfnDtDisappearBlot)(BLOT *); void (*pfnShowBlot)(BLOT *); void (*pfnHideBlot)(BLOT *); void (*pfnSetBlotBlots)(BLOT *); void (*pfnSetBlotClock)(BLOT *); int (*pfnFIncludeBlotForPeg)(BLOT *); }; /** * @brief VT for the totals blot. */ struct VTTOTALS { void (*pfnInitBlot)(BLOT *); void (*pfnPostBlotLoad)(BLOT *); void (*pfnUpdateBlot)(BLOT *); void (*pfnOnBlotActive)(BLOT *); void (*pfnUpdateBlotActive)(BLOT *); void (*pfnOnBlotReset)(BLOT *); void (*pfnOnBlotPush)(BLOT *); void (*pfnOnBlotPop)(BLOT *); void (*pfnSetBlotAchzDraw)(BLOT *, const char *); void (*pfnDrawBlot)(BLOT *); void (*pfnRenderBlot)(BLOT *); void (*pfnDtAppearBlot)(BLOT *); void (*pfnDtVisibleBlot)(BLOT *); void (*pfnDtDisappearBlot)(BLOT *); void (*pfnShowBlot)(BLOT *); void (*pfnHideBlot)(BLOT *); void (*pfnSetBlotBlots)(BLOT *); void (*pfnSetBlotClock)(BLOT *); int (*pfnFIncludeBlotForPeg)(BLOT *); }; struct GAME; /** * @brief VT for the game struct. */ struct VTGAME { // ... }; struct GOMER; /** * @brief VT for the gomer struct. */ struct VTGOMER { // ... }; /** * @brief VT for a waypoint related struct. */ struct VTWPSG { // ... }; /** * @brief VT for a shader related struct. */ struct VTSAA { // ... }; /** * @brief VT for an act related struct. */ struct VTACT { // ... }; #endif // VTABLES_H ================================================ FILE: include/water.h ================================================ /** * @file water.h * * @brief Good ol' H20. */ #ifndef WATER_H #define WATER_H #include "common.h" #include #include #include #include // Forward. struct XA; struct XP; /** * @class WATER * @brief Water? */ struct WATER : public SO { // ... }; void InitWater(WATER *pwater); void PostWaterLoad(WATER *pwater); void CalculateWaterCurrent(WATER *pwater, VECTOR *ppos, VECTOR *pv, VECTOR *pw); void UpdateSwXaList(SW *psw, XA **ppxa); void UpdateWater(WATER *pwater, float dt); void AddWaterExternalAccelerations(WATER *pwater, XA *pxa, float dt); void HandleWaterMessage(WATER *pwater, MSGID msgid, void *pv); void UpdateWaterMergeGroup(WATER *pwater); float UGetWaterSubmerged(WATER *pwater, SO *pso, VECTOR *pposSurface, VECTOR *pnormalSurface); void UpdateWaterBounds(WATER *pwater); int FInflictWaterZap(WATER *pwater, XP *pxp, ZPR *pzpr); ZPD *PzpdEnsureWater(WATER *pwater, ENSK ensk); #endif // WATER_H ================================================ FILE: include/waypoint.h ================================================ /** * @file waypoint.h */ #ifndef WAYPOINT_H #define WAYPOINT_H #include "common.h" #include #include #include // Forward. struct SGG; /** * @brief Waypoint state. */ enum WPS { WPS_Nil = -1, WPS_Passive = 0, WPS_Sync = 1, WPS_Active = 2, WPS_Max = 3 }; /** * @class WAY_POINT * @brief Waypoint. */ struct WAYPOINT : public ALO { undefined1 unknown[2]; WPS wps; float tWps; float dtPause; // ... }; /** * @brief Stepguard waypoint? */ struct WPSG { /* 0x00 */ VTWPSG *pvtwpsg; /* 0x04 */ uint cpwaypoint; /* 0x08 */ WAYPOINT *apwaypoint[8]; /* 0x28 */ int fCallback; /* 0x2c */ SGG *psgg; }; void InitWaypoint(WAYPOINT *pwaypoint); void PostWaypointLoad(WAYPOINT *pwaypoint); void SetWaypointRsmg(WAYPOINT *pwaypoint, int fOnTrigger, OID oidRoot, OID oidSm, OID oidGoal); void UpdateWaypoint(WAYPOINT *pwaypoint, float dt); void SetWaypointWps(WAYPOINT *pwaypoint, WPS wps); void HandleWaypointMessage(WAYPOINT *pwaypoint, MSGID msgid, void *pv); WPSG *PwpsgNew(); void AddWpsgWaypoint(WPSG *pwpsg, WAYPOINT *pwaypoint); void RemoveWpsgWaypoint(WPSG *pwpsg, WAYPOINT *pwaypoint); void UpdateWpsgCallback(WPSG *pwpsg, MSGID msgid, void *pv); void EnsureWpsgCallback(WPSG *pwpsg); #endif // WAYPOINT_H ================================================ FILE: include/wipe.h ================================================ /** * @file wipe.h * * @brief Screen wipes. * * @todo Figure out if the function signatures are correct. */ #ifndef WIPE_H #define WIPE_H #include "common.h" #include #include #include /** * @brief Wipe Kind. */ enum WIPEK { WIPEK_Fade = 0, WIPEK_Keyhole = 1, WIPEK_WorldMap = 2, WIPEK_Frozen = 3, WIPEK_Max = 4 }; /** * @brief Wipe State. */ enum WIPES { WIPES_Nil = -1, WIPES_Idle = 0, WIPES_WipingOut = 1, WIPES_Black = 2, WIPES_WipingIn = 3, WIPES_Max = 4 }; /** * @brief Screen wipe. */ struct WIPE { undefined4 unk_0x0; WIPES wipes; float tWipes; float uBlack; TRANS transButton; WIPEK wipek; WIPEK wipekButton; }; extern WIPE *g_pwipe; extern WIPE g_wipe; void InitWipe(WIPE *pwipe); void UpdateWipe(WIPE *pwipe, JOY *pjoy); void DrawWipe(WIPE *pwipe); void ActivateWipe(WIPE *pwipe, TRANS *ptrans, WIPEK wipek); void SetWipeButtonTrans(WIPE *pwipe, TRANS *ptrans, WIPEK wipek); int FCatchWipeButtonTrans(WIPE *pwipe, JOY *pjoy, WIPES wipesNew); void SetWipeWipes(WIPE *pwipe, WIPES wipes); extern "C" void WipeToWorldWarp(const void *pchzWorld, OID oidWarp, WIPEK wipek); #endif // WIPE_H ================================================ FILE: include/wm.h ================================================ /** * @file wm.h * * @brief World map? */ #ifndef WM_H #define WM_H #include "common.h" #include #include #include #include #include #include #include typedef int GRFDS; /** * @brief World map state. */ enum WMS { WMS_Nil = -1, WMS_Hidden = 0, WMS_Appearing = 1, WMS_Manual = 2, WMS_Warping = 3, WMS_Disappearing = 4, WMS_Max = 5 }; /** * @brief World map direction. */ enum WMD { WMD_Nil = -1, WMD_Up = 0, WMD_Down = 1, WMD_Left = 2, WMD_Right = 3, WMD_Max = 4 }; /** * @brief World map something (?) * @todo Implement the struct. */ struct WMC { // ... }; /** * @class WORLD_MAP * @brief World map accessed from the hideout, by pressing Select, or Pause > View Map. * @todo Implement the struct. */ struct WM : public ALO { // ... }; void PostWmLoad(WM *pwm); void BindWm(WM *pwm); void RefreshWmMoveStats(WM *pwm, WORLDLEVEL worldlevel); void ThrowWmDisplayState(WM *pwm, WORLDLEVEL worldlevel, int fReverse); void CatchWmDisplayState(WM *pwm); void UpdateWm(WM *pwm, float dt); void RenderWmAll(WM *pwm, CM *pcm, RO *pro); void HandleWmMessage(WM *pwm, MSGID msgid, void *pv); /** * @brief Sets the WM state. * * @param pwm Pointer to the WM. * @param pwms Pointer to the WM state. */ void SetWmWms(WM* pwm, WMS wms); void ShowWm(WM *pwm, WORLDLEVEL worldlevel, WMS wmsActive); void HideWm(WM *pwm); void MoveWm(WM *pwm, WMD wmd); void GetWmWorldPosScreen(WM *pwm, WORLDLEVEL worldlevel, VECTOR *pposScreen); void SetWmCursor(WM *pwm, WORLDLEVEL worldlevel); void PostWmcLoad(WMC *pwmc); void UpdateWmcActive(WMC *pwmc, JOY *pjoy); void OnWmcActive(WMC *pwmc, int fActive); void DrawWmFan(float xCenter, float yCenter, float sRadius, float rad, int cseg, RGBA *rgbaCenter, RGBA rgbaEdge, GRFDS grfds); void DrawWmc(WMC *pwmc); #endif // WM_H ================================================ FILE: include/wr.h ================================================ /** * @file wr.h * @note At the time of writing all structs were * based on the may prototype so they can be inaccurate. */ #ifndef WR_H #define WR_H #include "common.h" #include #include #include #include #include #include #include // Forward. struct WR; /** * @brief (?) Kind. */ enum WEK { WEK_Nil = -1, WEK_XYZ = 0, WEK_XY = 1, WEK_XZ = 2, WEK_YZ = 3, WEK_X = 4, WEK_Y = 5, WEK_Z = 6, WEK_Max = 7 }; /** * @brief (?) Kind. */ enum WREK { WREK_Nil = -1, WREK_Circle = 0, WREK_Bend = 1, WREK_Max = 2 }; /** * @brief Unknown. */ struct ONZE { float uAmpl; float gFreq; float gPhase; float uRandom; }; /** * @brief Unknown. */ struct ONZ { LM lm; float uBias; int conze; ONZE aonze[4]; }; /** * @brief Unknown. */ struct WEKI { WEK wek; float sInner; float uInner; float sOuter; float uOuter; undefined1 unknown[12]; MATRIX4 dmat; }; /** * @brief Unknown. */ struct WRE { WREK wrek; int imat; STRUCT_PADDING(50); }; /** * @brief Unknown. */ struct WRBG { ALO *palo; GLOB *pglob; OID oid; WR *pwr; int cmat; int fDpos; int fDuv; undefined1 unknown[4]; WEKI weki; WRBG *pwrbgNextGlobset; WRBG *pwrbgNextWr; }; /** * @class SPACE_WARM * @brief Unknown. */ struct WR : public LO { /* 0x34 */ float tLastUpdate; /* 0x38 */ int cwre; int cmat; /* 0x40 */ int imatHalf; /* 0x44 */ STRUCT_PADDING(3); /* 0x50 */ WRE awre[8]; /* 0x6d0 */ int iwreCur; /* 0x6d4 */ STRUCT_PADDING(3); MATRIX4 amatDpos[4]; MATRIX4 amotDuv[4]; void *pwrbgFirst; /* 0x8e4 */ int fValuesChanged; }; void InitWr(WR *pwr); void HandleWrMessage(WR *pwr, MSGID msgid, void *pv); void ApplyWrGlob(WR *pwr, ALO *palo, GLOB *pglob); void UpdateWrStateVectors(WR *pwr); void WarpWrTransform(WR *pwr, float sWavelengthMin, VECTOR *pposSrc, MATRIX3 *pmatSrc, VECTOR *pposDst, MATRIX3 *pmatDst, VECTOR *pvDst); void GetWrBounds(WR *pwr, VECTOR * pdpos); float UNoise(int n); float UNoise(float gFreq, float gPhase, float uRandom); float UBias(float u, float uBias); float GFromOnz(ONZ *ponz); void UpdateWrMatrixes(WR *pwr); void AddWrCircleWarp(WR *pwr); void AddWrBendWarp(WR *pwr); WRE *PwreGetWrCur(WR *pwr, ENSK ensk, WREK wrek); WRE *PwreGetWrCircle(WR *pwr, ENSK ensk); WRE *PwreGetWrBend(WR *pwr, ENSK ensk); void SetWrWavelength(WR *pwr, float sWavelength); void GetWrWavelength(WR *pwr, float *psWavelength); void AddOnzOnze(ONZ *ponz, float uAmpl, float gFreq, float gPhase, float uRandom); void AddWrBendNoise(WR *pwr, float uAmpl, float gFreq, float gPhase, float uRandom); void AddWrSwivelNoise(WR *pwr, float uAmpl, float gFreq, float gPhase, float uRandom); #endif // WR_H ================================================ FILE: include/xform.h ================================================ /** * @file xform.h * * @brief Transform. */ #ifndef XFORM_H #define XFORM_H #include "common.h" #include #include #include #include #include #include #include #include #include #include #include #include #include // Forward declarations struct XF; struct XFM; struct EXPL; struct EXPLG; struct EXPLO; struct EXPLS; struct EXPLSO; struct EXPLSTE; struct CAMERA; struct ASEG; /** * @class TRANSFORM * @brief Transform defined by position vector + local matrix. */ struct XFM : public LO { /* 0x34 */ STRUCT_PADDING(3); /* 0x40 */ VECTOR posLocal; uint padding; // TODO: Remove once VECTOR is 16 bytes long. /* 0x50 */ MATRIX3 matLocal; }; /** * @class _EXPLODE_BASE * @brief Base class for explodes. */ struct EXPL : public XFM { // ... }; /** * @class EXPLODE_GROUP * @brief Group of explode objects. */ struct EXPLG : public EXPL { // ... }; /** * @class BLACK_HOLD * @brief Unknown. */ struct EXPLO : public EXPL { // ... }; /** * @class EXPLODE_STYLE * @brief Unknown. */ struct EXPLS : public EXPLO { // ... }; /** * @brief Unknown. */ struct EXPLSO { // ... }; /** * @brief Unknown. */ struct EXPLSTE { // ... }; /** * @class WARP * @brief Unknown. */ struct WARP : XFM { WID widMenu; undefined4 unk0_0x4; undefined4 unk1_0x8; undefined4 unk2_0xC; VECTOR v; int fDefault; float radCmInit; int cpaseg; ASEG **apaseg; int coidHide; OID *aoidHide; int coidShowWhenDifficult; OID aoidShowWhenDifficult[4]; OID oidAlias; int crsmg; RSMG arsmg[4]; undefined4 unk3; undefined4 unk4; undefined4 unk5; }; /** * @struct CAMERA * @brief Game camera instance. */ struct CAMERA : public ALO { OID oidTarget; PNT *ppntTarget; ALO *paloTarget; undefined4 unk_1; VECTOR posEye; VECTOR vecView; VECTOR vecUp; int fSetCplcy; undefined4 unk_2; undefined4 unk_3; undefined4 unk_4; }; /** * @brief Exit state. */ enum EXITS { EXITS_Nil = -1, EXITS_Blocked = 0, EXITS_Unblocked = 1, EXITS_Disabled = 2, EXITS_Enabled = 3, EXITS_Totals = 4, EXITS_Exiting = 5, EXITS_Max = 6 }; /** * @brief Exit destination kind. */ enum EDK { EDK_Nil = -1, EDK_DestinationKey = 0, EDK_CurrentKey = 1, EDK_Max = 2 }; /** * @class EXIT * @brief Exit to another worldlevel. */ struct EXIT : public ALO { int fDefault; /* 0x2e4 */ EXITS exits; EXITS fKeyed; float fFollowDefault; int fTotals; /* 0x2e8 */ float tExits; int ctsurf; TSURF *atsurf; int ctbsp; TBSP *atbsp; WID widWarp; OID oidWarp; EDK edkAlt; WID widAlt; OID oidAlt; int cpaseg; ASEG *apaseg; WIPEK wipek; float tWipe; float dtUnblock; float dtTriggerWipe; }; void InitXfm(XFM *pxfm); void LoadXfmFromBrx(XFM *pxfm, CBinaryInputStream *pbis); void SetXfmParent(XFM *pxfm, ALO *paloParent); void ApplyXfmProxy(XFM *pxfm, PROXY *pproxyApply); void ConvertXfmWorldToLocal(XFM *pxfm, VECTOR *pposWorld, VECTOR *pposLocal); void GetXfmPos(XFM *xfm, VECTOR *ppos); void GetXfmMat(XFM *pxfm, MATRIX3 *pmat); WARP *PwarpFromOid(OID oid, OID oidContext); void LoadWarpFromBrx(WARP *pwarp, CBinaryInputStream *pbis); void CloneWarp(WARP *pwarp, WARP *pwarpBase); void PostWarpLoad(WARP *pwarp); void TriggerWarp(WARP *pwarp); void SetWarpRsmg(WARP *pwarp, int fOnTrigger, OID oidRoot, OID oidSM, OID oidGoal); void TeleportSwPlayer(SW *psw, OID oidWarp, OID oidWarpContext); EXIT *PexitDefault(); void TriggerDefaultExit(int fInhibitAsegs, WIPEK wipek); void LoadExitFromBrx(EXIT *pexit, CBinaryInputStream *pbis); void PostExitLoad(EXIT *pexit); /** * @brief Sets the EXIT state. * * @param pexit Pointer to the EXIT. * @param exits EXIT state. */ void SetExitExits(EXIT *pexit, EXITS exits); void TriggerExit(EXIT *pexit); void WipeExit(EXIT *pexit); void UpdateExit(float dt, EXIT *pexit); void InitCamera(CAMERA *pcamera); void PostCameraLoad(CAMERA *camera); void EnableCamera(CAMERA *pcamera); #endif // XFORM_H ================================================ FILE: include/zap.h ================================================ /** * @file zap.h * * @brief Zap (damage) system. */ #ifndef ZAP_H #define ZAP_H #include "common.h" #include #include #include // Forward. struct XP; struct PO; struct ZPD; typedef void (*PFNZAP)(ZPD *pzpd, PO *ppo); /** * @brief Zap kind. */ enum ZPK { ZPK_Nil = -1, ZPK_Blunt = 0, ZPK_Electric = 1, ZPK_Fire = 2, ZPK_Water = 3, ZPK_Crush = 4, ZPK_Pit = 5, ZPK_Max = 6 }; /** * @brief Zap _?_ Kind * * @todo Figure out what the O stands for. */ enum ZOK { ZOK_Nil = -1, ZOK_Inherit = 0, ZOK_Zap = 1, ZOK_NoZap = 2, ZOK_Ignore = 3, ZOK_ZapAndIgnore = 4, ZOK_Max = 5 }; /** * @brief Unknown. */ struct ZPD { /* 0x00 */ SO *pso; /* 0x04 */ ZPK zpk; float dzThrow; int fThrowCut; int coidThrow; OID aoidThrow[32]; /* 0x94 */ int cploThrow; /* 0x98 */ LO *aploThrow[32]; }; /** * @brief Zap. */ struct ZAP { // ... }; /** * @brief TOUCH_ZAPPER * @brief Zapper trigger on touching the player. * * @todo Does it inherit from ZAP? */ struct TZP : public SO { // ... /* 0x550 */ ZPD zpd; // ... }; /** * @brief Unknown. */ struct ZPR { /* 0x00 */ ZPK zpk; LO *ploSource; /* 0x08 */ void *pv; /* 0x0c */ PFNZAP pfnzap; }; /** * @brief Zap volume? * @todo Implement the struct. */ struct VOLZP : public TZP { // ... }; void InitTzp(TZP *ptzp); void PostTzpLoad(TZP *ptzp); void UpdateTzp(TZP *ptzp, float dt); void CloneTzp(TZP *ptzp, TZP *ptzpBase); void RenderTzpAll(TZP *ptzp, CM *pcm, RO *pro); int FInflictTzpZap(TZP *ptzp, XP *pxp, ZPR *pzpr); ZPD *PzpdEnsureTzp(TZP *ptzp, ENSK ensk); /** * @todo Rename. */ void FUN_001F5210(TZP *ptzp); void InitVolzp(VOLZP *pvolzp); void UpdateVolzp(VOLZP *pvolzp, float dt); void InitZpd(ZPD *pzpd, SO *pso); void PostZpdLoad(ZPD *pzpd); void ApplyZpdThrow(ZPD *pzpd, PO *ppo); void InflictZpdZap(ZPD *pzpd, XP *pxp, ZPR *pzpr); void AddZpdZapObject(ZPD *pzpd, OID oid); void AddZpdZapLo(ZPD *pzpd, LO *plo); void RemoveZpdZapLo(ZPD *pzpd, LO *plo); #endif // ZAP_H ================================================ FILE: requirements.txt ================================================ splat64[mips]>=0.36.0,<1.0.0 spimdisasm>=1.36.1,<2.0.0 rabbitizer==1.13.0 tqdm n64img pygfxd crunch64 ninja ninja_syntax mapfile_parser ================================================ FILE: scripts/build.sh ================================================ #!/bin/bash set -e PROJECT_DIR="$(dirname "$0")/.." # Ensure disc/SCUS_971.98 exists if [ ! -f "$PROJECT_DIR/disc/SCUS_971.98" ]; then echo "Error: SCUS_971.98 not found. Copy it from your own game disc to the 'disc' directory of this project." >&2 exit 1 fi pushd $PROJECT_DIR > /dev/null trap "popd > /dev/null" EXIT if [ -z "$VIRTUAL_ENV" ]; then source "env/bin/activate" fi python3 "configure.py" --clean ninja ================================================ FILE: scripts/check_progress.py ================================================ import json import sys try: with open("report.json", "r") as f: data = json.load(f) except FileNotFoundError: print("Error: \"report.json\" not found. Please run \"./scripts/checks.sh --report\" first to generate the report file.") sys.exit(1) for category in data["categories"]: name = category.get("name") if name != "Engine" and name != "Splice": continue measures = category.get("measures", {}) fuzzy_match_percent = measures.get("fuzzy_match_percent", 0.0) total_code = int(measures.get("total_code", 0)) / 1024 matched_code = int(measures.get("matched_code", 0)) / 1024 matched_code_percent = measures.get("matched_code_percent", 0.0) total_data = int(measures.get("total_data", 0)) / 1024 matched_data = int(measures.get("matched_data", 0)) / 1024 matched_data_percent = measures.get("matched_data_percent", 0.0) total_functions = measures.get("total_functions") matched_functions = measures.get("matched_functions") print(f"{name}:") print(f" - Fuzzy match: {fuzzy_match_percent:.2f}%") print(f" - Perfect match: {matched_code_percent:.2f}% ({matched_code:.2f} KiB / {total_code:.2f} KiB)") print(f" - Matched data: {matched_data_percent:.2f}% ({matched_data:.2f} KiB / {total_data:.2f} KiB)") print(f" - Matched functions: {matched_functions} / {total_functions}\n") ================================================ FILE: scripts/checks.sh ================================================ #!/bin/bash set -e PROJECT_DIR="$(dirname "$0")/.." pushd $PROJECT_DIR > /dev/null trap "popd > /dev/null" EXIT if [ -z "$VIRTUAL_ENV" ]; then source "env/bin/activate" fi python3 "configure.py" --clean && ninja python3 "configure.py" --clean --objects && ninja # Output the progress report to a file if --report is not passed, otherwise discard it. if [[ "$1" == "--report" ]]; then ./tools/objdiff/objdiff-cli report generate > report.json else ./tools/objdiff/objdiff-cli report generate > /dev/null fi ================================================ FILE: scripts/codematcher/match_all.sh ================================================ #!/bin/bash # Set working dir to codematcher directory project_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.." codematcher_path="$project_dir/tools/codematcher" pushd $codematcher_path > /dev/null # Invoke codematcher to compile and match source tree echo "Matching source tree..." source_tree_path="$project_dir/src/P2" ./codematcher may_proto.elf --compile $source_tree_path # Done popd > /dev/null ================================================ FILE: scripts/codematcher/match_file.sh ================================================ #!/bin/bash # Get the name of the source file as a parameter source_file="$1" # Check if the source file parameter is empty if [ -z "$source_file" ]; then echo "No source file specified!" echo " Usage: $0 " exit 1 fi # Strip the extension from the source file source_basename="$(basename "$source_file" | cut -d. -f1)" # Set working dir to project dir and make object file project_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/.." codematcher_path="$project_dir/tools/codematcher" pushd $project_dir > /dev/null echo "Compiling $source_basename.o..." make clean > /dev/null make obj/debug/$source_basename.o > /dev/null # CD to codematcher directory and invoke codematcher with the compiled object file echo "Matching $source_basename.o..." cd tools/codematcher >/dev/null ./codematcher may_proto.elf --match "$project_dir/obj/debug/$source_basename.o" # Move back to the original directory popd >/dev/null popd >/dev/null ================================================ FILE: scripts/codematcher/match_function_live.sh ================================================ #!/bin/bash # Get name of source file and target function as parameters source_file="$1" target_function="$2" # Check if the source file parameter is empty if [ -z "$source_file" ]; then echo "No source file specified!" echo " Usage: $0 " exit 1 fi # Check if the target function parameter is empty if [ -z "$target_function" ]; then echo "No target function specified!" echo " Usage: $0 " exit 1 fi # Strip the extension from the source file source_basename="$(basename "$source_file" | cut -d. -f1)" # Match command: match_file script grepped with relevant lines match_cmd="./match_file.sh $source_file | grep -e'------------' -e'+' -e'$target_function'" # Print command: ee-objdump grepped with regex matching everything from the function name to a blank line objdump_cmd="wine ~/.wine/drive_c/usr/local/sce/ee/gcc/bin/ee-objdump.exe -d ../obj/debug/$source_basename.o | grep -e'$target_function' -A1000 -e'^$'" # Watch the match_single script with the source file and dump file commands watch -n 1 --color "( $match_cmd && $objdump_cmd )" ================================================ FILE: scripts/diff.sh ================================================ #!/bin/bash set -e if [ -z "$1" ]; then echo "Usage: $0 FunctionName [ObjectName]" >&2 exit 1 fi cd "$(dirname "$0")/.." if [ -z "$VIRTUAL_ENV" ]; then source "env/bin/activate" fi python3 configure.py --objects ninja if [ -n "$2" ]; then ./tools/objdiff/objdiff-cli diff --project . -u "$2" "$1" else ./tools/objdiff/objdiff-cli diff --project . "$1" fi ================================================ FILE: scripts/extract_elf.sh ================================================ #!/bin/bash set -e ISO_FILE="$1" # Check for ISO [ -z "$ISO_FILE" ] && { echo "Error: No ISO path provided." >&2; echo "Usage: $0 /path/to/game.iso" >&2; exit 1; } [ ! -f "$ISO_FILE" ] && { echo "Error: ISO file not found: $ISO_FILE" >&2; exit 1; } PROJECT_DIR="$(dirname "$0")/.." ELF_FILE="$PROJECT_DIR/disc/SCUS_971.98" CHECKSUM="57dc305db57932ad3f1122966cdb695d2e62a47a" # Extract SCUS_971.98 echo "Extracting from $ISO_FILE..." if command -v bsdtar &>/dev/null; then bsdtar --no-same-permissions --no-same-owner -xf "$ISO_FILE" -C "$PROJECT_DIR/disc" SCUS_971.98 elif command -v 7z &>/dev/null; then 7z e "$ISO_FILE" -o"$PROJECT_DIR/disc" SCUS_971.98 -y elif command -v isoinfo &>/dev/null; then isoinfo -i "$ISO_FILE" -x /SCUS_971.98 > "$ELF_FILE" else echo "Error: No extraction tool found. Install bsdtar, 7z, or isoinfo." >&2 exit 1 fi [ ! -f "$ELF_FILE" ] && { echo "Extraction failed." >&2; exit 1; } chmod 644 "$ELF_FILE" # Verify checksum echo "Verifying SCUS_971.98..." ACTUAL=$(sha1sum "$ELF_FILE" | awk '{print $1}') if [ "$ACTUAL" != "$CHECKSUM" ]; then echo "Error: Checksum mismatch! Expected: $CHECKSUM, Got: $ACTUAL" >&2 echo "Please ensure you have the correct version of the game (NTSC-U)." >&2 exit 1 fi echo "SCUS_971.98 is ready!" ================================================ FILE: scripts/frogress/mapfile_progress.sh ================================================ #!/bin/bash set -e script_dir=$(dirname $0) pushd $script_dir/../.. > /dev/null if [[ "$1" == "--help" || "$1" == "-h" ]]; then echo "Usage: $0 [--skip-build]" echo " --skip-build: Skip building and just check progress" exit 0 fi if [[ "$1" != "--skip-build" ]]; then ./scripts/build.sh fi python3 -m mapfile_parser progress out/SCUS_971.98.map asm asm/nonmatchings/ popd > /dev/null ================================================ FILE: scripts/frogress/upload_progress.py ================================================ """ Script for uploading progress reported by mapfile_parser to the Frogress API. Adapted from https://github.com/zeldaret/af/blob/aeb01dcb95e8281f89f355604dbeba519ef073d5/tools/progress.py MIT License: https://opensource.org/license/mit """ from pathlib import Path from datetime import datetime import argparse import mapfile_parser ASMPATH = Path("asm") NONMATCHINGS = "nonmatchings" BASE_URL = "https://progress.deco.mp" SLUG = "slycooper1" VERSION = "us" def getProgressFromMapFile(mapFile: mapfile_parser.MapFile, asmPath: Path, nonmatchings: Path, aliases: dict[str, str]=dict(), pathIndex: int=2) -> tuple[mapfile_parser.ProgressStats, dict[str, mapfile_parser.ProgressStats]]: totalStats = mapfile_parser.ProgressStats() progressPerFolder: dict[str, mapfile_parser.ProgressStats] = dict() for segment in mapFile: for file in segment: if len(file) == 0: continue folder = file.filepath.parts[pathIndex] if ".a" in folder: folder = folder.split('.a')[0] if folder in aliases: folder = aliases[folder] if folder not in progressPerFolder: progressPerFolder[folder] = mapfile_parser.ProgressStats() originalFilePath = Path(*file.filepath.parts[pathIndex:]) extensionlessFilePath = originalFilePath while extensionlessFilePath.suffix: extensionlessFilePath = extensionlessFilePath.with_suffix("") fullAsmFile = asmPath / extensionlessFilePath.with_suffix(".s") handwrittenAsmFiles = [Path("sce/crt0.o")] if originalFilePath in handwrittenAsmFiles: wholeFileIsUndecomped = False else: wholeFileIsUndecomped = fullAsmFile.exists() for func in file: funcAsmPath = nonmatchings / extensionlessFilePath / f"{func.name}.s" symSize = 0 if func.size is not None: symSize = func.size if wholeFileIsUndecomped: totalStats.undecompedSize += symSize progressPerFolder[folder].undecompedSize += symSize elif funcAsmPath.exists(): totalStats.undecompedSize += symSize progressPerFolder[folder].undecompedSize += symSize else: totalStats.decompedSize += symSize progressPerFolder[folder].decompedSize += symSize return totalStats, progressPerFolder def getProgress(mapPath: Path) -> tuple[mapfile_parser.ProgressStats, dict[str, mapfile_parser.ProgressStats]]: """ Gets the progress of the using the mapfile parser. """ mapFile = mapfile_parser.MapFile() mapFile.readMapFile(mapPath) for segment in mapFile: for file in segment: if len(file) == 0: continue filepathParts = list(file.filepath.parts) file.filepath = Path(*filepathParts) nonMatchingsPath = ASMPATH / NONMATCHINGS progress = getProgressFromMapFile(mapFile.filterBySectionType(".text"), ASMPATH, nonMatchingsPath, aliases={"ultralib": "libultra"}) return progress def main(args: argparse.ArgumentParser) -> None: """ Main function, calculates the progress and uploads it to the frogress. """ frogress_api_key = args.frogress_api_key if not frogress_api_key: raise ValueError("Missing frogress API key.") mapPath = "out/SCUS_971.98.map" codeTotalStats, codeProgressPerFolder = getProgress(mapPath) codeEntries: dict[str, int] = mapfile_parser.frontends.upload_frogress.getFrogressEntriesFromStats(codeTotalStats, codeProgressPerFolder, verbose=True) print(codeEntries) url = mapfile_parser.utils.generateFrogressEndpointUrl(BASE_URL, SLUG, VERSION) mapfile_parser.frontends.upload_frogress.uploadEntriesToFrogress(codeEntries, "all", url, apikey=frogress_api_key, verbose=True) if __name__ == "__main__": parser = argparse.ArgumentParser(description="Upload progress to the frogress") parser.add_argument("--frogress_api_key", help="API key for the frogress") args = parser.parse_args() main(args) ================================================ FILE: scripts/quickstart.sh ================================================ #!/bin/bash set -e ### Install Dependencies ### PACKAGES="binutils-mips-linux-gnu ninja-build python3 python3-pip python3-venv" ISO_ARG="$1" PROJECT_DIR="$(dirname "$0")/.." DISC_DIR="$PROJECT_DIR/disc" TOOLS_DIR="$PROJECT_DIR/tools" WIBO_URL="https://github.com/decompals/wibo/releases/download/1.0.0/wibo-i686" # If no ISO specified, look for one in the disc directory if [ -z "$ISO_ARG" ] && [ ! -f $PROJECT_DIR/disc/SCUS_971.98 ]; then echo "No ISO file specified, looking in disc directory..." ISO_FILES=("$DISC_DIR"/*.iso) if [ -f "${ISO_FILES[0]}" ]; then ISO_ARG="${ISO_FILES[0]}" echo "Found ISO: $(basename "$ISO_ARG")" else echo "No ISO found in disc directory. Skipping executable extraction." fi fi # If ISO is specified, validate it if [ -n "$ISO_ARG" ]; then if [ ! -f "$ISO_ARG" ]; then echo "Error: ISO file not found: $ISO_ARG" >&2 exit 1 fi ISO_ARG="$(realpath "$ISO_ARG")" PACKAGES="$PACKAGES libarchive-tools" fi # Download Wibo WIBO_PATH="$TOOLS_DIR/wibo-i686" echo "Downloading Wibo..." mkdir -p "$TOOLS_DIR" if wget -q -O "$WIBO_PATH" "$WIBO_URL"; then chmod +x "$WIBO_PATH" else echo "Wibo download failed, adding wine32 to dependencies instead..." PACKAGES="$PACKAGES wine32" fi # Install missing dependencies if ! sudo -n true 2>/dev/null; then echo "Root privileges are required to install dependencies. Please enter your password." fi if ! sudo -v; then echo "Error: Unable to obtain root privileges" >&2 exit 1 fi echo "Adding i386 architecture support..." sudo dpkg --add-architecture i386 echo "Updating package lists..." sudo apt-get update -qq > /dev/null echo "Dependencies: $PACKAGES" echo "Installing missing dependencies..." sudo apt-get install -y -qq $PACKAGES > /dev/null pushd $PROJECT_DIR > /dev/null trap "popd > /dev/null" EXIT # Set up Python virtual environment echo "Setting up Python virtual environment..." python3 -m venv env source env/bin/activate echo "Installing Python packages..." pip install -q -U -r requirements.txt ### Download ProDG compilers and runtimes ### echo "Starting ProDG setup script..." ./scripts/setup_prodg_linux.sh ## Extract ELF ### if [ -n "$ISO_ARG" ]; then echo "Extracting executable from ISO..." ./scripts/extract_elf.sh "$ISO_ARG" fi popd > /dev/null trap - EXIT ### Final Instructions ### echo "" echo "Quickstart complete!" echo "" if [ ! -f $PROJECT_DIR/disc/SCUS_971.98 ]; then echo "Copy SCUS_971.98 from your copy of the game to the 'disc' directory of this project." fi echo "To build the project, run '$(dirname "$0")/build.sh'" ================================================ FILE: scripts/readme.md ================================================ # Scripts This directory contains the following scripts used to setup and build the project. There are a few others, but they are not used in the normal contributing workflow. ## Setup scripts ### quickstart.sh Installs the necessary dependencies using pip/apt and sets up the build environment. This will run all the other setup scripts for you. You only need to run this script once. ### setup_prodg_linux.sh Installs the compiler needed to build the project on Linux. `quickstart.sh` will run this script for you, so you don't need to run both. There is an equivalent script for Windows, but the assembler does not work on Windows, so you can't build the project on Windows. You must use Linux or WSL. ## Utility scripts ### build.sh Runs a clean reconfigure (deletes build files and splits the binary), then builds the project. Will warn you if `disc/SCUS_971.98` is not present. ### diff.sh Compares a decompiled function against the original using objdiff. Takes a function name as a required argument and an optional object name. ### run.sh Runs the last successful build in an emulator. Before using, you must install PCSX2, build the project, and either place an ISO in the `disc` directory or specify one as an argument. The script will boot the emulator using the compiled elf, and load the assets from the provided ISO. PCSX2 will be auto detected in this order: * System PATH * Flatpak * AppImage in the `tools` directory with "pcsx2" in the file name * XDG Desktop entry with "pcsx2" in the file name ### checks.sh Runs the same build commands that GitHub actions uses to verify that the project builds successfully. This must pass before a pull request will be merged. If the argument `--report` is passed it outputs the current project progress to `report.json`. ### check_progress.py Prints the current project progress based on the data in `report.json`. ================================================ FILE: scripts/run.sh ================================================ #!/bin/bash set -e PROJECT_DIR="$(dirname "$0")/.." ELF="$PROJECT_DIR/out/SCUS_971.98" # Parse Arguments if [[ $# -gt 1 ]]; then echo "Usage: $0 [/path/to/game.iso]" >&2 exit 1 fi if [[ $# -eq 1 ]]; then ISO="$1" else # Find any ISO in disc directory ISO=$(find "$PROJECT_DIR/disc" -maxdepth 1 -type f -iname "*.iso" -print -quit 2>/dev/null) if [[ -z "$ISO" ]]; then echo "Error: No ISO found in $PROJECT_DIR/disc" >&2 exit 1 fi echo "Using ISO: $(basename "$ISO")" fi # Verify Files if [[ ! -f "$ISO" ]]; then echo "Error: ISO not found: $ISO" >&2 exit 1 fi if [[ ! -f "$ELF" ]]; then echo "Error: ELF not found: $ELF" >&2 echo "Build the project first with: ./configure.py && ninja" >&2 exit 1 fi # Resolve full paths for sandboxed environments ISO="$(realpath "$ISO")" ELF="$(realpath "$ELF")" find_pcsx2() { # Check system PATH if command -v pcsx2 &>/dev/null; then printf "pcsx2" return 0 fi # Check flatpak if command -v flatpak &>/dev/null && flatpak list --app 2>/dev/null | grep -q "net.pcsx2.PCSX2"; then printf "flatpak run net.pcsx2.PCSX2" return 0 fi # Check for AppImage in tools directory local appimage=$(find "$PROJECT_DIR/tools" -maxdepth 1 -type f -iname "*pcsx2*.appimage" -executable -print -quit 2>/dev/null) if [[ -n "$appimage" ]]; then printf '%q' "$appimage" return 0 fi # Check XDG Desktop entries local desktop_file=$(find ~/.local/share/applications /usr/share/applications /usr/local/share/applications \ -maxdepth 1 -type f -iname "*pcsx2*.desktop" -print -quit 2>/dev/null) if [[ -n "$desktop_file" ]]; then # Extract executable path, stripping env vars and desktop file arguments local exec_line=$(grep -m1 "^Exec=" "$desktop_file" | \ sed 's/^Exec=//' | \ sed 's/^env //' | \ sed 's/[A-Z_][A-Z0-9_]*=[^ ]* *//g' | \ sed 's/ %.*//' | \ awk '{print $1}') printf '%q' "$exec_line" return 0 fi return 1 } PCSX2=$(find_pcsx2) if [[ -z "$PCSX2" ]]; then echo "Error: PCSX2 not found. Install it via:" >&2 echo " - System package manager (pcsx2)" >&2 echo " - Flatpak: flatpak install net.pcsx2.PCSX2" >&2 echo " - Download AppImage to $PROJECT_DIR/tools/" >&2 exit 1 fi run_verbose() { ( PS4=''; set -x; "$@" ) } # Grant Flatpak Permissions if [[ "$PCSX2" == "flatpak run"* ]]; then run_verbose flatpak override --user net.pcsx2.PCSX2 \ --filesystem="$ISO":ro \ --filesystem="$ELF":ro fi # Launch PCSX2 run_verbose $PCSX2 -elf "$ELF" -fastboot -nogui -- "$ISO" ================================================ FILE: scripts/setup_prodg_linux.sh ================================================ #!/bin/bash # Sets up the ProDG compilers + SCE Runtime Library to build the project. set -e PROJECT_DIR="$(dirname "$0")/.." TOOLS_DIR="$PROJECT_DIR/tools" DOWNLOAD_URL="https://github.com/TheOnlyZac/compilers/releases/download/ee-gcc2.95.2-SN-v2.73a/ee-gcc2.95.2-SN-v2.73a.tar.gz" echo "Downloading compiler..." wget -q -O - "$DOWNLOAD_URL" | tar -xz -C "$TOOLS_DIR" echo "ProDG setup complete!" ================================================ FILE: scripts/windows/backup_registry.bat ================================================ REM backup registry to C:\usr\local\sce\regbackup.reg echo Backing up registry, please accept the UAC prompt regedit /E C:\usr\local\sce\regbackup.reg "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment" ================================================ FILE: scripts/windows/run.bat ================================================ @echo off REM ############################################################################## REM Set these paths to point to your PCSX2 1.7 executable and your copy of the game set PCSX2_PATH="C:\path\to\pcsx2.exe" set ISO_PATH="" REM ############################################################################## goto :start REM die: MESSAGE REM perl-style `die` expressions. :die echo run.bat: error: %* exit /b 1 REM start REM main entrypoint :start if not defined PCSX2_PATH ( call :die "PCSX2 path is empty, please edit the paths in 'run.bat'" ) if not defined ISO_PATH ( echo Warning: ISO path is empty, please edit the paths in 'run.bat' ) if not exist "!ISO_PATH!" ( call :die "Game ISO not found at '!ISO_PATH!'" ) if not exist "!PCSX2_PATH!" ( call :die "PCSX2 executable not found at '!PCSX2_PATH!'" ) if not "!PCSX2_PATH:~-4!"==".exe" ( call :die "PCSX2 exe is not executable" ) REM Switch to the project root directory pushd "%~dp0..\.." > nul REM Build the game echo Compiling ELF... ::make clean > nul make > nul REM Run the game echo Booting ELF in PCSX2... "%PCSX2_PATH%" -elf ".\bin\debug\SCUS_971.98" %ISO_PATH% REM Switch back to the original directory popd > nul echo Done. ================================================ FILE: scripts/windows/setup_prodg_windows.bat ================================================ @echo off setlocal REM The SDK (Runtime Library) version to install. set SDK_VER=242 echo Starting ProDG setup script... goto :start REM die: MESSAGE REM perl-style `die` expressions. :die echo Error: %* exit /b 1 REM download_file: URL REM downloads file using curl :download_file echo Downloading %~1... set output_file=%TEMP%\progd.zip curl -L %~1 -o %output_file% if exist "%output_file%" ( echo File downloaded to %output_file% ) else ( call :die Failed to download file ) goto :eof REM start REM main entrypoint :start echo NOTE This script is untested with the new build system and may not work as expected! echo Please report any issues on github or discord. echo REM download required files (registry + SDK package) call :download_file "https://github.com/TheOnlyZac/compilers/releases/download/ee-gcc2.95.2-SN-v2.73a/ee-gcc2.95.2-SN-v2.73a.zip" ::REM apply environment variables from the registry file ::echo Applying environment variables, please accept the UAC prompt ::regedit %TEMP%\prodg_env.reg REM Extract the compiler to the project/tools directory echo Extracting compiler to tools directory... 7z x -y %TEMP%\progd.zip -otools ::echo Removing temporary files echo Removing temporary files... ::del %TEMP%\ee-gcc2.95.2-SN-v2.73a.zip echo Setup complete! endlocal ================================================ FILE: src/P2/989snd.c ================================================ #include "989snd.h" #include #include #include #include #include typedef unsigned int u_int; typedef unsigned long u_long; // Linux style volatile access macro's #define READ_ONCE(x) (*(const volatile typeof(x)*)(&x)) #define WRITE_ONCE(x, val) (*(volatile typeof(x)*)(&x) = (val)) u_int snd_SendIOPCommandAndWait(int command, int data_used, char* in_data); void snd_SendIOPCommandNoWait(int command, int data_used, char* in_data, SndCompleteProc done, u_long u_data); int snd_GotReturns(void); void snd_SendCurrentBatch(void); void snd_PostMessage(void); struct SndCommandReturnDef { // 0x10 /* 0x0 */ SndCompleteProc done; /* 0x8 */ u_long u_data; }; struct SndCommandBuffer { // 0x1000 /* 0x0000 */ int num_commands; /* 0x0004 */ char buf[4092]; }; typedef struct SndCommandReturnDef* SndCommandReturnDefPtr; struct SndSystemStatus { // 0x40 /* 0x00 */ int cd_busy; /* 0x04 */ int pad_0; /* 0x08 */ int pad_1; /* 0x0c */ int pad_2; /* 0x10 */ int cd_error; /* 0x14 */ int pad_3; /* 0x18 */ int pad_4; /* 0x1c */ int pad_5; /* 0x20 */ char pad_big[32]; }; struct SndMessageData { // 0x20 /* 0x00 */ int data[7]; /* 0x1c */ int command; }; typedef struct SndMessageData* SndMessageDataPtr; u_int* gCommBusy = 0; int gAwaitingInts = 0; int gUnkBankLoadError = 0; int gStreamingInited = 0; void (*gCdCallback)(int) = NULL; int gSSRead = 0; int gSSReadDone = 0; int gLoadingFromFS = 0; extern struct SndCommandBuffer gSndCommandBuffer1; extern struct SndCommandBuffer gSndCommandBuffer2; struct SndCommandBuffer* gSndCommandBuffePtr[2] = { &gSndCommandBuffer1, &gSndCommandBuffer2 }; int gCommandBuffeBytesAvail[2] = { 0xffc, 0xffc }; extern struct SndCommandReturnDef gSndCommandReturnDef1[256]; extern struct SndCommandReturnDef gSndCommandReturnDef2[256]; struct SndCommandReturnDef* gSndCommandReturnDefPtr[2] = { gSndCommandReturnDef1, gSndCommandReturnDef2 }; extern unsigned int gActualReturnValues1[272]; extern unsigned int gActualReturnValues2[272]; u_int* gReturnValuesPtr[2] = { gActualReturnValues1, gActualReturnValues2 }; int gCommandFillBuffer = 0; int gCaching = 0; u_int gLoadBusy = 0; struct SndCommandReturnDef gLoadReturnDef = {}; static SndCompleteProc gLoadCB = NULL; static u_long gLoadUserData = 0; u_int gLoadCommand = 0; int gLoadAwaits = 0; // Aligment for DMA transfer buffers unsigned int gSyncBuffer[16] __attribute__((aligned(16))) = {}; char gSyncSendBuffer[64] __attribute__((aligned(16))) = {}; char gSyncStringBuffer[256] __attribute__((aligned(16))) = {}; struct SndCommandBuffer gSndCommandBuffer1 __attribute__((aligned(16))) = {}; struct SndCommandBuffer gSndCommandBuffer2 __attribute__((aligned(16))) = {}; struct SndCommandReturnDef gSndCommandReturnDef1[256] = {}; struct SndCommandReturnDef gSndCommandReturnDef2[256] = {}; // Not actually sure on their size unsigned int gActualReturnValues1[272] __attribute__((aligned(16))) = {}; unsigned int gActualReturnValues2[272] __attribute__((aligned(16))) = {}; struct SndSystemStatus gStats __attribute__((aligned(16))) = {}; unsigned int gLoadReturnValue[16] __attribute__((aligned(16))) = {}; int gLoadParams[8] __attribute__((aligned(16))) = {}; // BSS extern sceSifClientData gSLClientData; extern sceSifClientData gSLClientLoaderData; INCLUDE_ASM("asm/nonmatchings/P2/989snd", snd_StartSoundSystem); #ifdef SKIP_ASM // Assembler delay slot diff void snd_StartSoundSystem(void) { int i; gSndCommandBuffePtr[0] = &gSndCommandBuffer1; gSndCommandBuffePtr[1] = &gSndCommandBuffer2; gReturnValuesPtr[0] = gActualReturnValues1; gReturnValuesPtr[1] = gActualReturnValues2; gSndCommandReturnDefPtr[0] = gSndCommandReturnDef1; gSndCommandReturnDefPtr[1] = gSndCommandReturnDef2; sceSifInitRpc(0); while (1) { if (sceSifBindRpc(&gSLClientData, 0x123456, 0) < 0) { printf("error: sceSifBindRpc in %s, at line %d\n", "989snd.c", 0x6e); while (1) ; } i = 10000; while (i--) ; if (gSLClientData.serve != 0) { break; } } gLoadBusy = 0; gLoadReturnDef.done = NULL; gLoadReturnDef.u_data = 0; gLoadReturnValue[0] = 0; while (1) { if (sceSifBindRpc(&gSLClientLoaderData, 0x123457, 0) < 0) { printf("error: sceSifBindRpc in %s, at line %d\n", "989snd.c", 0x83); while (1) ; } i = 10000; while (i--) ; if (gSLClientLoaderData.serve != 0) { break; } } gStats.cd_busy = 0; gStats.cd_error = 0; gSndCommandBuffer2.num_commands = gSndCommandBuffer1.num_commands = 0; gCommandBuffeBytesAvail[1] = gCommandBuffeBytesAvail[0] = 0xffc; i = (int)&gStats; snd_SendIOPCommandAndWait(0, sizeof(i), (char*)&i); } #endif int snd_FlushSoundCommands() { SndCompleteProc done; u_long u_data; int which, x; if (gCommBusy && snd_GotReturns()) { if (gLoadingFromFS) { if (gLoadCB) { gLoadCB(gSyncBuffer[1], gLoadUserData); } gLoadCB = NULL; gLoadingFromFS = 0; } else { which = gCommandFillBuffer != 1; for (x = 0; x < gSndCommandBuffePtr[which]->num_commands; x++) { done = gSndCommandReturnDefPtr[which][x].done; if (gSndCommandReturnDefPtr[which][x].done) { u_data = gSndCommandReturnDefPtr[which][x].u_data; done(gReturnValuesPtr[which][x + 1], u_data); } } } } if (gLoadBusy) { FlushCache(0); if (gLoadReturnValue[0] != -1) { if (gLoadReturnDef.done) { u_data = gLoadReturnDef.u_data; done = gLoadReturnDef.done; gLoadReturnDef.done = NULL; gLoadReturnDef.u_data = 0; done(gLoadReturnValue[0], u_data); } gLoadBusy = 0; gLoadReturnValue[0] = 0; } } if (!gCommBusy && gSndCommandBuffePtr[gCommandFillBuffer]->num_commands && !gCaching) { snd_SendCurrentBatch(); } if (gSSRead) { snd_StreamSafeCdSync(1); if (gSSReadDone) { gSSRead = 0; gSSReadDone = 0; if (gCdCallback) { gCdCallback(1); } } } if (gCommBusy || gLoadBusy) { return 1; } return 0; } JUNK_NOP(); JUNK_ADDIU(10); JUNK_ADDIU(10); JUNK_ADDIU(10); INCLUDE_ASM("asm/nonmatchings/P2/989snd", snd_GotReturns__Fv); #ifdef SKIP_ASM // Rodata int snd_GotReturns(void) { FlushCache(0); if (gCommBusy == NULL) { return 1; } if (sceSifCheckStatRpc(&gSLClientData.rpcd)) { return 0; } if (*gCommBusy == -1 && (gCommBusy[gAwaitingInts + 1] == -1)) { gCommBusy = NULL; return 1; } else { printf("989snd.c: Sif says RPC isn\'t busy, but we still don\'t have returns from the IOP!\n"); return 0; } return 1; } #endif void snd_PrepareReturnBuffer(u_int* buffer, int num_ints) { gAwaitingInts = num_ints; gCommBusy = buffer; buffer[num_ints + 1] = 0; buffer[0] = 0; } JUNK_NOP(); JUNK_ADDIU(60); INCLUDE_ASM("asm/nonmatchings/P2/989snd", snd_BankLoadByLoc); #ifdef SKIP_ASM SoundBankPtr snd_BankLoadByLoc(int loc, int offset) { gUnkBankLoadError = 0; if (gLoadBusy) { printf("snd_BankLoadByLoc: Load already in progress!\n"); return NULL; } if (snd_StreamSafeCdSync(1) == 1) { printf("snd_BankLoadByLoc: CD BUSY!\n"); return NULL; } gLoadReturnValue[0] = 0xffffffff; gLoadParams[0] = loc; gLoadParams[1] = offset; while (sceSifCheckStatRpc(&gSLClientLoaderData.rpcd)) { printf("989snd.c: RPC collision!\n"); snd_FlushSoundCommands(); FlushCache(0); } if (sceSifCallRpc(&gSLClientLoaderData, 3, 1, gLoadParams, 8, gLoadReturnValue, 4, NULL, NULL) < 0) { printf("989snd.c: RPC call has failed inside snd_BankLoadByLoc\n"); gUnkBankLoadError = 0x106; return NULL; } while ((SoundBankPtr)gLoadReturnValue[0] == (SoundBankPtr)0xffffffff) { FlushCache(0); } return (SoundBankPtr)gLoadReturnValue[0]; } #endif INCLUDE_ASM("asm/nonmatchings/P2/989snd", snd_BankLoadByLoc_CB); #ifdef SKIP_ASM void snd_BankLoadByLoc_CB(int loc, int offset, SndCompleteProc cb, u_long u_data) { gUnkBankLoadError = 0; if (gLoadBusy) { printf("snd_BankLoadByLoc: Load already in progress!\n"); return; } if (snd_StreamSafeCdSync(1) == 1) { printf("snd_BankLoadByLoc: CD BUSY!\n"); return; } gLoadReturnValue[0] = 0xffffffff; gLoadParams[0] = loc; gLoadParams[1] = offset; gLoadReturnDef.done = cb; gLoadReturnDef.u_data = u_data; while (sceSifCheckStatRpc(&gSLClientLoaderData.rpcd)) { printf("989snd.c: RPC collision!\n"); snd_FlushSoundCommands(); FlushCache(0); } gLoadBusy = 1; sceSifCallRpc(&gSLClientLoaderData, 3, 1, gLoadParams, 8, gLoadReturnValue, 4, NULL, NULL); } #endif JUNK_ADDIU(70); JUNK_ADDIU(70); JUNK_ADDIU(70); JUNK_ADDIU(70); JUNK_ADDIU(70); JUNK_ADDIU(60); JUNK_ADDIU(70); void snd_ResolveBankXREFS(void) { snd_SendIOPCommandNoWait(8, 0, NULL, NULL, 0); } void snd_UnloadBank(SoundBankPtr bank) { int data[1]; data[0] = (int)bank; snd_SendIOPCommandNoWait(6, 4, (char*)data, NULL, 0); } void snd_SetMasterVolume(int which, int vol) { int data[2]; data[0] = which; data[1] = vol; snd_SendIOPCommandNoWait(9, 8, (char*)data, NULL, 0); } int snd_GetMasterVolume(int which) { int data[1]; data[0] = which; return snd_SendIOPCommandAndWait(10, 4, (char*)data); } void snd_SetPlaybackMode(int mode) { int data[1]; data[0] = mode; snd_SendIOPCommandNoWait(0xb, 4, (char*)data, NULL, 0); } JUNK_ADDIU(10); JUNK_ADDIU(10); void snd_SetMixerMode(int channel_mode, int reverb_mode) { int data[2]; data[0] = channel_mode; data[1] = reverb_mode; snd_SendIOPCommandNoWait(0xd, 8, (char*)data, NULL, 0); } void snd_SetGroupVoiceRange(int group, int min, int max) { int data[3]; data[0] = group; data[1] = min; data[2] = max; snd_SendIOPCommandNoWait(0x4e, 0xc, (char*)data, NULL, 0); } u_int snd_PlaySoundVolPanPMPB(SoundBankPtr bank, int sound, int vol, int pan, int pitch_mod, int bend) { int data[6]; data[0] = (int)bank; data[1] = sound; data[2] = vol; data[3] = pan; data[4] = pitch_mod; data[5] = bend; return snd_SendIOPCommandAndWait(0x11, 0x18, (char*)data); } JUNK_NOP(); JUNK_ADDIU(30); JUNK_ADDIU(40); JUNK_ADDIU(10); JUNK_ADDIU(10); JUNK_ADDIU(10); void snd_StopSound(u_int handle) { int data[1]; data[0] = handle; snd_SendIOPCommandNoWait(0x15, 4, (char*)data, NULL, 0); } JUNK_ADDIU(40); JUNK_ADDIU(40); void snd_PauseSound(u_int handle) { int data[1]; data[0] = handle; snd_SendIOPCommandNoWait(0x13, 4, (char*)data, NULL, 0); } void snd_ContinueSound(u_int handle) { int data[1]; data[0] = handle; snd_SendIOPCommandNoWait(0x14, 4, (char*)data, NULL, 0); } JUNK_ADDIU(10); void snd_PauseAllSoundsInGroup(u_int groups) { int data[1]; data[0] = groups; snd_SendIOPCommandNoWait(0x16, 4, (char*)data, NULL, 0); } void snd_ContinueAllSoundsInGroup(u_int groups) { int data[1]; data[0] = groups; snd_SendIOPCommandNoWait(0x17, 4, (char*)data, NULL, 0); } u_int snd_SoundIsStillPlaying(u_int handle) { u_int data[1]; data[0] = handle; return snd_SendIOPCommandAndWait(0x19, 4, (char*)data); } void snd_SoundIsStillPlaying_CB(u_int handle, SndCompleteProc cb, u_long user_data) { int data[1]; data[0] = handle; snd_SendIOPCommandNoWait(0x19, 4, (char*)data, cb, user_data); } int snd_IsSoundALooper(SoundBankPtr bank, u_int sound) { int data[2]; data[0] = (int)bank; data[1] = sound; return snd_SendIOPCommandAndWait(0x1a, 8, (char*)data); } JUNK_NOP(); JUNK_ADDIU(20); void snd_SetSoundVolPan(u_int handle, int vol, int pan) { int data[3]; data[0] = handle; data[1] = vol; data[2] = pan; snd_SendIOPCommandNoWait(0x1b, 0xc, (char*)data, NULL, 0); } int snd_GetSoundOriginalPitch(SoundBankPtr bank, int index) { int data[2]; data[0] = (int)bank; data[1] = index; return snd_SendIOPCommandAndWait(0x1c, 8, (char*)data); } JUNK_NOP(); JUNK_ADDIU(20); void snd_SetSoundPitch(u_int handle, int pitch) { int data[2]; data[0] = handle; data[1] = pitch; snd_SendIOPCommandNoWait(0x1e, 8, (char*)data, NULL, 0); } JUNK_NOP(); JUNK_ADDIU(20); JUNK_ADDIU(20); JUNK_ADDIU(30); void snd_AutoVol(u_int handle, int vol, int delta_time, int delta_from) { int data[4]; data[0] = handle; data[1] = vol; data[2] = delta_time; data[3] = delta_from; snd_SendIOPCommandNoWait(0x22, 0x10, (char*)data, NULL, 0); } JUNK_NOP(); JUNK_ADDIU(20); JUNK_ADDIU(20); void snd_SetMIDIRegister(u_int handle, int reg, int value) { int data[3]; data[0] = handle; data[1] = reg; data[2] = value; snd_SendIOPCommandNoWait(0x29, 0xc, (char*)data, NULL, 0); } int snd_GetMIDIRegister(u_int handle, int reg) { int data[2]; data[0] = handle; data[1] = reg; return snd_SendIOPCommandAndWait(0x28, 8, (char*)data); } JUNK_NOP(); JUNK_ADDIU(20); void snd_SetGlobalExcite(int value) { int data[1]; data[0] = value; snd_SendIOPCommandNoWait(0x27, 4, (char*)data, NULL, 0); } JUNK_ADDIU(10); JUNK_ADDIU(10); INCLUDE_ASM("asm/nonmatchings/P2/989snd", snd_SendIOPCommandAndWait__FiiPc); #ifdef SKIP_ASM u_int snd_SendIOPCommandAndWait(int command, int data_used, char* in_data) { u_int ret_val; int x; for (x = 0; x < data_used; x++) { gSyncSendBuffer[x] = in_data[x]; } while (gCommBusy) { snd_FlushSoundCommands(); FlushCache(0); } snd_PrepareReturnBuffer(gSyncBuffer, 1); while (sceSifCheckStatRpc(&gSLClientData.rpcd)) { printf("989nsd.c: RPC collision!\n"); snd_FlushSoundCommands(); FlushCache(0); } if (data_used) { sceSifCallRpc(&gSLClientData, command, 1, gSyncSendBuffer, data_used, gSyncBuffer, 0xc, NULL, NULL); } else { sceSifCallRpc(&gSLClientData, command, 1, NULL, 0, gSyncBuffer, 0xc, NULL, NULL); } while (!snd_GotReturns()) ; ret_val = gSyncBuffer[1]; if (gSndCommandBuffePtr[gCommandFillBuffer]->num_commands && !gCaching) { snd_SendCurrentBatch(); } return ret_val; } #endif INCLUDE_ASM("asm/nonmatchings/P2/989snd", snd_SendIOPCommandNoWait__FiiPcPFiUl_vUl); #ifdef SKIP_ASM void snd_SendIOPCommandNoWait(int command, int data_used, char* in_data, SndCompleteProc done, u_long u_data) { int x, was_caching = 0, y; char* msg; int msg_size; if (!gCaching && !gCommBusy && !data_used && !done) { snd_PrepareReturnBuffer(gSyncBuffer, 1); while (sceSifCheckStatRpc(&gSLClientData.rpcd)) { printf("989snd.c: RPC collision!\n"); snd_FlushSoundCommands(); FlushCache(0); } sceSifCallRpc(&gSLClientData, command, 1, NULL, 0, gSyncBuffer, 0xc, NULL, NULL); return; } y = 0; msg_size = data_used + 4; if (msg_size % 4) { msg_size = ((data_used) - ((msg_size % 4) - 8)); } while (gSndCommandBuffePtr[gCommandFillBuffer]->num_commands == 256 || gCommandBuffeBytesAvail[gCommandFillBuffer] < msg_size) { if (gCaching != 0) { gCaching = 0; was_caching = 1; } snd_FlushSoundCommands(); if (y == 1) { printf("snd_SendIOPCommandNoWait: BUFFER %d FULL(%d)! Sound stalled waiting for IOP coma nds to finish!\n", gCommandFillBuffer, gSndCommandBuffePtr[gCommandFillBuffer]->num_commands); } y++; } if (y) { printf("snd_SendIOPCommandNoWait: continueing (%d).\n", y); } if (was_caching) { gCaching = 1; } msg = gSndCommandBuffePtr[gCommandFillBuffer]->buf + 0xffc - gCommandBuffeBytesAvail[gCommandFillBuffer]; *((short*)(msg)) = command; msg += 2; *((short*)(msg)) = data_used; msg += 2; for (x = 0; x < data_used; x++) { msg[x] = in_data[x]; } gCommandBuffeBytesAvail[gCommandFillBuffer] -= msg_size; gSndCommandReturnDefPtr[gCommandFillBuffer][gSndCommandBuffePtr[gCommandFillBuffer]->num_commands].done = done; gSndCommandReturnDefPtr[gCommandFillBuffer][gSndCommandBuffePtr[gCommandFillBuffer]->num_commands].u_data = u_data; snd_PostMessage(); } #endif void snd_PostMessage(void) { gSndCommandBuffePtr[gCommandFillBuffer]->num_commands = gSndCommandBuffePtr[gCommandFillBuffer]->num_commands + 1; snd_FlushSoundCommands(); } INCLUDE_ASM("asm/nonmatchings/P2/989snd", snd_SendCurrentBatch__Fv); #ifdef SKIP_ASM void snd_SendCurrentBatch(void) { snd_PrepareReturnBuffer(gReturnValuesPtr[gCommandFillBuffer], gSndCommandBuffePtr[gCommandFillBuffer]->num_commands); while (sceSifCheckStatRpc(&gSLClientData.rpcd)) { printf("989snd.c: RPC collision!\n"); FlushCache(0); } sceSifCallRpc(&gSLClientData, 0x4d, 1, gSndCommandBuffePtr[gCommandFillBuffer], 0x1000 - gCommandBuffeBytesAvail[gCommandFillBuffer], gReturnValuesPtr[gCommandFillBuffer], gSndCommandBuffePtr[gCommandFillBuffer]->num_commands * 4 + 8, NULL, NULL); gCommandFillBuffer = gCommandFillBuffer != 1; gSndCommandBuffePtr[gCommandFillBuffer]->num_commands = 0; gCommandBuffeBytesAvail[gCommandFillBuffer] = 0xffc; } #endif int snd_InitVAGStreamingEx(int num_channels, int buffer_size, unsigned int read_mode, int enable_streamsafe_from_ee) { int data[4]; if (gStreamingInited == 1) { return 0; } if (gLoadBusy) { while (snd_FlushSoundCommands()) ; } snd_StreamSafeCdSync(0); data[0] = num_channels; data[1] = buffer_size; data[2] = read_mode; data[3] = enable_streamsafe_from_ee; gStreamingInited = snd_SendIOPCommandAndWait(0x2a, 0x10, (char*)data); return gStreamingInited; } void snd_StopAllStreams(void) { snd_SendIOPCommandNoWait(0x34, 0, NULL, NULL, 0); } JUNK_NOP(); JUNK_ADDIU(20); u_int snd_PlayVAGStreamByLoc(int loc1, int loc2, int offset1, int offset2, int vol, int pan, int vol_group, u_int queue, u_int flags) { int data[7]; data[0] = loc1; data[1] = loc2; data[2] = vol << 0x10 | offset1 & 0xffffU; data[3] = pan << 0x10 | offset2 & 0xffffU; data[4] = vol_group; data[5] = queue; data[6] = flags; return snd_SendIOPCommandAndWait(0x2c, 0x1c, (char*)data); } JUNK_ADDIU(30); void snd_ContinueVAGStream(u_int stream) { int data[1]; data[0] = stream; snd_SendIOPCommandNoWait(0x2e, 4, (char*)data, NULL, 0); } void snd_IsVAGStreamBuffered_CB(u_int stream, SndCompleteProc cb, u_long user_data) { u_int data[1]; data[0] = stream; snd_SendIOPCommandNoWait(0x4f, 4, (char*)data, cb, user_data); } int snd_StreamSafeCheckCDIdle(int block_ee_iop) { int data[1]; data[0] = block_ee_iop; return snd_SendIOPCommandAndWait(0x36, 4, (char*)data); } int snd_StreamSafeCdRead(u_int lbn, u_int sectors, void* buf, sceCdRMode* mode) { int data[3]; if (gStreamingInited == 0) { return sceCdRead(lbn, sectors, buf, mode); } if (snd_StreamSafeCdSync(1) == 1) { return 0; } WRITE_ONCE(gStats.cd_busy, 1); WRITE_ONCE(gStats.cd_error, 0); data[0] = lbn; data[1] = sectors; data[2] = (int)buf; snd_SendIOPCommandNoWait(0x38, 0xc, (char*)data, NULL, 0); gSSReadDone = 0; gSSRead = 1; return 1; } int snd_StreamSafeCdSync(int mode) { if (gStreamingInited == 0) { return sceCdSync(mode); } FlushCache(0); gSSReadDone = !READ_ONCE(gStats.cd_busy); if (gSSReadDone != 1) { if (mode == 1) { return 1; } while (!gSSReadDone) { snd_FlushSoundCommands(); FlushCache(0); gSSReadDone = !READ_ONCE(gStats.cd_busy); } } return 0; } int snd_StreamSafeCdBreak(void) { if (gStreamingInited == 0) { return sceCdBreak(); } snd_SendIOPCommandNoWait(0x37, 0, NULL, NULL, 0); return 1; } int snd_StreamSafeCdGetError(void) { if (!gStreamingInited) { return sceCdGetError(); } return ((volatile SndSystemStatus*)&gStats)->cd_error; } void snd_SetReverbType(int core, int type) { int data[2]; data[0] = core; data[1] = type; snd_SendIOPCommandNoWait(0xe, 8, (char*)data, NULL, 0); } void snd_SetReverbDepth(int core, int left, int right) { int data[3]; data[0] = core; data[1] = left; data[2] = right; snd_SendIOPCommandNoWait(0xf, 0xc, (char*)data, NULL, 0); } void snd_PreAllocReverbWorkArea(int core, int type) { int data[2]; data[0] = core; data[1] = type; snd_SendIOPCommandNoWait(0x51, 8, (char*)data, NULL, 0); } JUNK_NOP(); JUNK_ADDIU(20); JUNK_ADDIU(10); JUNK_ADDIU(20); JUNK_ADDIU(10); JUNK_ADDIU(20); JUNK_ADDIU(20); JUNK_ADDIU(10); JUNK_ADDIU(10); JUNK_ADDIU(10); JUNK_ADDIU(10); int snd_InitMovieSound(int sizeOfIOPBuffer, int volumeLevel, int panCenter, int volumeGroup, int type) { int data[5]; data[0] = sizeOfIOPBuffer; data[1] = volumeLevel; data[2] = panCenter; data[3] = volumeGroup; data[4] = type; return snd_SendIOPCommandAndWait(0x3b, 0x14, (char*)data); } void snd_ResetMovieSound(void) { snd_SendIOPCommandAndWait(0x3d, 0, NULL); } JUNK_NOP(); JUNK_ADDIU(10); JUNK_ADDIU(20); void snd_CloseMovieSound(void) { snd_SendIOPCommandAndWait(0x3c, 0, NULL); } void snd_StartMovieSound(int iopBuffer, int iopBufferSize, int iopPausePosition, u_int sr, int ch) { int data[5]; data[0] = iopBuffer; data[1] = iopBufferSize; data[2] = iopPausePosition; data[3] = sr; data[4] = ch; snd_SendIOPCommandAndWait(0x3e, 0x14, (char*)data); } int snd_GetTransStatus() { return snd_SendIOPCommandAndWait(0x40, 0, NULL); } JUNK_NOP(); JUNK_ADDIU(20); JUNK_ADDIU(10); JUNK_ADDIU(10); int snd_GetDopplerPitchMod(int approaching_mph) { return (approaching_mph * 0x5f4) / 0x2e5; } ================================================ FILE: src/P2/ac.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/ac", FindKey__FfiiiPcPfT5PPv); void EvaluateAcp(ACP *pacp, ALO *palo, float t, float svt, GRFEVAL grfeval, VECTOR *ppos, VECTOR *pv) { return; } void GetAcpTimes(ACP *pacp, int *pct, float **pat) { *pct = 0; if (pat) { *pat = NULL; } } void EvaluateAcr(ACR *pacr, ALO *palo, float t, float svt, GRFEVAL grfeval, MATRIX3 *pmat, VECTOR *pw) { return; } void EvaluateAcrEul(ACR *pacr, ALO *palo, float t, float svt, GRFEVAL grfeval, VECTOR *peul, VECTOR *pdeul) { return; } void GetAcrTimes(ACR *pacr, int *pct, float **pat) { *pct = 0; if (pat) { *pat = NULL; } } void EvaluateAcs(ACS *pacs, ALO *palo, float t, GRFEVAL grfeval, MATRIX3 *pmat) { return; } void GetAcsTimes(ACS *pacs, int *pct, float **pat) { *pct = 0; if (pat) { *pat = NULL; } } void EvaluateAcg(ACG *pacg, ALO *palo, float t, float svt, GRFEVAL grfeval, float *pg, float *pdg) { return; } void GetAcgTimes(ACG *pacg, int *pct, float **pat) { *pct = 0; if (pat) { *pat = NULL; } } INCLUDE_ASM("asm/nonmatchings/P2/ac", LoadAcgbFromBrx__FP4ACGBP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/ac", EvaluateAcgb__FP4ACGBP3ALOffiPfT5); INCLUDE_ASM("asm/nonmatchings/P2/ac", GetAcgbTimes__FP4ACGBPiPPf); INCLUDE_ASM("asm/nonmatchings/P2/ac", LoadAcgbwFromBrx__FP5ACGBWP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/ac", EvaluateAcgbw__FP5ACGBWP3ALOffiPfT5); INCLUDE_ASM("asm/nonmatchings/P2/ac", GetAcgbwTimes__FP5ACGBWPiPPf); INCLUDE_ASM("asm/nonmatchings/P2/ac", EvaluateAcgl__FP4ACGLP3ALOffiPfT5); INCLUDE_ASM("asm/nonmatchings/P2/ac", LoadAcglFromBrx__FP4ACGLP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/ac", GetAcglTimes__FP4ACGLPiPPf); INCLUDE_ASM("asm/nonmatchings/P2/ac", EvaluateApacg__FPP3ACGP3ALOffiP6VECTORN25); INCLUDE_ASM("asm/nonmatchings/P2/ac", LoadApacgFromBrx__FPP3ACGP6VECTORP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/ac", GetApacgTimes__FPP3ACGPiPPf); INCLUDE_ASM("asm/nonmatchings/P2/ac", EvaluateAkvb__FiP3KVBffiP6VECTORT5); INCLUDE_ASM("asm/nonmatchings/P2/ac", LoadAkvbFromBrx__FPiPP3KVBP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/ac", GetAkvbTimes__FiP3KVBPiPPf); INCLUDE_ASM("asm/nonmatchings/P2/ac", EvaluateAcpc__FP4ACPCP3ALOffiP6VECTORT5); INCLUDE_ASM("asm/nonmatchings/P2/ac", LoadAcpcFromBrx__FP4ACPCP18CBinaryInputStream); void GetAcpcTimes(ACPC *pacpc, int *pct, float **pat) { GetApacgTimes(&STRUCT_OFFSET(pacpc, 0x20, ACG *), pct, pat); // pacpc->apacg } INCLUDE_ASM("asm/nonmatchings/P2/ac", EvaluateAcpb__FP4ACPBP3ALOffiP6VECTORT5); INCLUDE_ASM("asm/nonmatchings/P2/ac", LoadAcpbFromBrx__FP4ACPBP18CBinaryInputStream); void GetAcpbTimes(ACPB *pacpb, int *pct, float **pat) { // pacpb->ckvb, pacpb->akvb GetAkvbTimes(STRUCT_OFFSET(pacpb, 0xc, int), STRUCT_OFFSET(pacpb, 0x10, KVB *), pct, pat); } INCLUDE_ASM("asm/nonmatchings/P2/ac", EvaluateAcrc__FP4ACRCP3ALOffiP7MATRIX3P6VECTOR); void EvaluateAcrcEul(ACRC *pacrc, ALO *palo, float t, float svt, GRFEVAL grfeval, VECTOR *peul, VECTOR *pdeul) { // pacrc->apacg, pacrc->eulDefault EvaluateApacg(&STRUCT_OFFSET(pacrc, 0x20, ACG *), palo, t, svt, grfeval, &STRUCT_OFFSET(pacrc, 0x10, VECTOR), peul, pdeul); } INCLUDE_ASM("asm/nonmatchings/P2/ac", LoadAcrcFromBrx__FP4ACRCP18CBinaryInputStream); void GetAcrcTimes(ACRC *pacrc, int *pct, float **pat) { // pacrc->apacg GetApacgTimes(&STRUCT_OFFSET(pacrc, 0x20, ACG *), pct, pat); } INCLUDE_ASM("asm/nonmatchings/P2/ac", EvaluateAcrb__FP4ACRBP3ALOffiP7MATRIX3P6VECTOR); void EvaluateAcrbEul(ACRB *pacrb, ALO *palo, float t, float svt, GRFEVAL grfeval, VECTOR *peul, VECTOR *pdeul) { // pacrb->ckvb, pacrb->akvb EvaluateAkvb(STRUCT_OFFSET(pacrb, 0xc, int), STRUCT_OFFSET(pacrb, 0x10, KVB *), t, svt, grfeval, peul, pdeul); } INCLUDE_ASM("asm/nonmatchings/P2/ac", LoadAcrbFromBrx__FP4ACRBP18CBinaryInputStream); void GetAcrbTimes(ACRB *pacrb, int *pct, float **pat) { // pacrb->ckvb, pacrb->akvb GetAkvbTimes(STRUCT_OFFSET(pacrb, 0xc, int), STRUCT_OFFSET(pacrb, 0x10, KVB *), pct, pat); } INCLUDE_ASM("asm/nonmatchings/P2/ac", EvaluateAcsc__FP4ACSCP3ALOfiP7MATRIX3); void LoadAcscFromBrx(ACSC *pacsc, CBinaryInputStream *pbis) { // pacsc->apacg, pacsc->vecDefault LoadApacgFromBrx(&STRUCT_OFFSET(pacsc, 0x20, ACG *), &STRUCT_OFFSET(pacsc, 0x10, VECTOR), pbis); } void GetAcscTimes(ACSC *pacsc, int *pct, float **pat) { // pacsc->apacg GetApacgTimes(&STRUCT_OFFSET(pacsc, 0x20, ACG *), pct, pat); } INCLUDE_ASM("asm/nonmatchings/P2/ac", EvaluateAcsb__FP4ACSBP3ALOfiP7MATRIX3); void LoadAcsbFromBrx(ACSB *pacsb, CBinaryInputStream *pbis) { // pacsb->ckvb, pacsb->akvb LoadAkvbFromBrx(&STRUCT_OFFSET(pacsb, 0x08, int), &STRUCT_OFFSET(pacsb, 0x0c, KVB *), pbis); } void GetAcsbTimes(ACSB *pacsb, int *pct, float **pat) { // pacsb->ckvb, pacsb->akvb GetAkvbTimes(STRUCT_OFFSET(pacsb, 0x08, int), STRUCT_OFFSET(pacsb, 0x0c, KVB *), pct, pat); } INCLUDE_ASM("asm/nonmatchings/P2/ac", EvaluateAcpbl__FP5ACPBLP3ALOffiP6VECTORT5); INCLUDE_ASM("asm/nonmatchings/P2/ac", EvaluateAcrbl__FP5ACRBLP3ALOffiP7MATRIX3P6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/ac", EvaluateAcgblt__FP6ACGBLTP3ALOffiPfT5); INCLUDE_ASM("asm/nonmatchings/P2/ac", EvaluateAcgblp__FP6ACGBLPP3ALOffiPfT5); INCLUDE_ASM("asm/nonmatchings/P2/ac", PacpNew__F4ACVK); INCLUDE_ASM("asm/nonmatchings/P2/ac", PacrNew__F4ACVK); INCLUDE_ASM("asm/nonmatchings/P2/ac", PacsNew__F4ACVK); INCLUDE_ASM("asm/nonmatchings/P2/ac", PacgNew__F4ACGK); ================================================ FILE: src/P2/act.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/act", PactNew__FP2SWP3ALOP5VTACT); INCLUDE_ASM("asm/nonmatchings/P2/act", PactNewClone__FP3ACTP2SWP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/act", CloneAct__FP3ACTT0); INCLUDE_ASM("asm/nonmatchings/P2/act", InitAct__FP3ACTP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/act", RetractAct__FP3ACTi); INCLUDE_ASM("asm/nonmatchings/P2/act", GetActPositionGoal__FP3ACTfP6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/act", GetActRotationGoal__FP3ACTfP7MATRIX3P6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/act", GetActTwistGoal__FP3ACTPfT1); INCLUDE_ASM("asm/nonmatchings/P2/act", GetActScale__FP3ACTP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/act", GGetActPoseGoal__FP3ACTi); INCLUDE_ASM("asm/nonmatchings/P2/act", CalculateActDefaultAck__FP3ACT); INCLUDE_ASM("asm/nonmatchings/P2/act", SnapAct__FP3ACTi); INCLUDE_ASM("asm/nonmatchings/P2/act", CalculateAloPositionSpring__FP3ALOfP6VECTORN22); INCLUDE_ASM("asm/nonmatchings/P2/act", ProjectActPosition__FP3ACT); INCLUDE_ASM("asm/nonmatchings/P2/act", CalculateAloRotationSpring__FP3ALOfP7MATRIX3P6VECTORT3); INCLUDE_ASM("asm/nonmatchings/P2/act", ProjectActRotation__FP3ACT); INCLUDE_ASM("asm/nonmatchings/P2/act", ProjectActPose__FP3ACTi); INCLUDE_ASM("asm/nonmatchings/P2/act", PredictAloPosition__FP3ALOfP6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/act", PredictAloRotation__FP3ALOfP7MATRIX3P6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/act", AdaptAct__FP3ACT); INCLUDE_ASM("asm/nonmatchings/P2/act", InitActval__FP6ACTVALP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/act", GetActvalPositionGoal__FP6ACTVALfP6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/act", GetActvalRotationGoal__FP6ACTVALfP7MATRIX3P6VECTOR); void GetActvalTwistGoal(ACTVAL *pactval, float *pradTwist, float *pdradTwist) { *pradTwist = pactval->radTwistGoal; *pdradTwist = pactval->dradTwistGoal; } INCLUDE_ASM("asm/nonmatchings/P2/act", GetActvalScale__FP6ACTVALP7MATRIX3); float GGetActvalPoseGoal(ACTVAL *pactval, int ipose) { return pactval->agPoses[ipose]; } INCLUDE_ASM("asm/nonmatchings/P2/act", InitActref__FP6ACTREFP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/act", GetActrefPositionGoal__FP6ACTREFfP6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/act", GetActrefRotationGoal__FP6ACTREFfP7MATRIX3P6VECTOR); void GetActrefTwistGoal(ACTREF *pactref, float *pradTwist, float *pdradTwist) { *pradTwist = *pactref->pradTwistGoal; *pdradTwist = *pactref->pdradTwistGoal; } INCLUDE_ASM("asm/nonmatchings/P2/act", GetActrefScale__FP6ACTREFP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/act", GGetActrefPoseGoal__FP6ACTREFi); INCLUDE_ASM("asm/nonmatchings/P2/act", InitActadj__FP6ACTADJP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/act", GetActadjPositionGoal__FP6ACTADJfP6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/act", GetActadjRotationGoal__FP6ACTADJfP7MATRIX3P6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/act", GetActadjTwistGoal__FP6ACTADJPfT1); INCLUDE_ASM("asm/nonmatchings/P2/act", GetActadjScale__FP6ACTADJP7MATRIX3); float GGetActadjPoseGoal(ACTADJ *pactadj, int ipose) { return 0.0f; } void InitActbank(ACTBANK *pactbank, ALO *palo) { InitAct(pactbank, palo); pactbank->uBank = 1.0f; pactbank->dtPredict = 0.25f; } INCLUDE_ASM("asm/nonmatchings/P2/act", GetActbankRotationGoal__FP7ACTBANKfP7MATRIX3P6VECTOR); ================================================ FILE: src/P2/actseg.c ================================================ #include #include void RetractActseg(ACTSEG *pactseg, GRFRA grfra) { ASEGA *pasega = pactseg->pasega; RemoveDlEntry(&pasega->dlActseg, pactseg); if (pasega->pactsegError == pactseg) { pasega->pactsegError = NULL; } RetractAct(pactseg, grfra); } void CloneActseg(ACTSEG *pactseg, ACTSEG *pactsegBase) { ASEGA *pasega = pactseg->pasega; DLE dleAsega = pactseg->dleAsega; CloneAct(pactseg, pactsegBase); pactseg->dleAsega = dleAsega; pactseg->pasega = pasega; } INCLUDE_ASM("asm/nonmatchings/P2/actseg", GetActsegPositionGoal__FP6ACTSEGfP6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/actseg", GetActsegRotationGoal__FP6ACTSEGfP7MATRIX3P6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/actseg", GetActsegTwistGoal__FP6ACTSEGPfT1); INCLUDE_ASM("asm/nonmatchings/P2/actseg", GetActsegScale__FP6ACTSEGP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/actseg", GGetActsegPoseGoal__FP6ACTSEGi); ================================================ FILE: src/P2/alarm.c ================================================ #include #include #include void BreakAlbrk(ALBRK *palbrk) { if (STRUCT_OFFSET(palbrk, 0x680, int) == 0) { DisableAlarmAlbrk(STRUCT_OFFSET(palbrk, 0x6c0, ALARM *)); // palbrk->palarm } BreakBrk(palbrk); } void SetAlbrkAlarm(ALBRK *palbrk, ALARM *palarm) { STRUCT_OFFSET(palbrk, 0x6c0, ALARM *) = palarm; // palbrk->palarm } void InitAlarm(ALARM *palarm) { InitSo(palarm); STRUCT_OFFSET(palarm, 0x550, ALARMS) = ALARMS_Nil; // palarm->alarms STRUCT_OFFSET(palarm, 0x6b0, int) = IchkAllocChkmgr(&g_chkmgr); // palarm->ichkDisabled } INCLUDE_ASM("asm/nonmatchings/P2/alarm", PostAlarmLoad__FP5ALARM); void CloneAlarm(ALARM *palarm, ALARM *palarmBase) { int ichkDisabled = STRUCT_OFFSET(palarm, 0x6b0, int); // palarm->ichkDisabled CloneSo(palarm, palarmBase); STRUCT_OFFSET(palarm, 0x6b0, int) = ichkDisabled; // palarm->ichkDisabled } INCLUDE_ASM("asm/nonmatchings/P2/alarm", UpdateAlarm__FP5ALARMf); INCLUDE_ASM("asm/nonmatchings/P2/alarm", PostAlarmLoadCallbackHookup__FP5ALARM5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/alarm", SetAlarmAlarms__FP5ALARM6ALARMS); void TriggerAlarm(ALARM *palarm, ALTK altk) { ALARMS alarms; switch (altk) { case ALTK_Trigger: alarms = ALARMS_Triggered; break; case ALTK_Untrigger: alarms = ALARMS_Enabled; break; case ALTK_Disable: alarms = ALARMS_Disabled; break; default: return; } SetAlarmAlarms(palarm, alarms); } void DisableAlarmAlbrk(ALARM *palarm) { STRUCT_OFFSET(palarm, 0x61c, int)++; // palarm->calbrksDisabled } INCLUDE_ASM("asm/nonmatchings/P2/alarm", EnableAlarmSensors__FP5ALARM); INCLUDE_ASM("asm/nonmatchings/P2/alarm", DisableAlarmSensors__FP5ALARM); INCLUDE_ASM("asm/nonmatchings/P2/alarm", NotifyAlarmSensorsOnTrigger__FP5ALARM); void AddAlarmAlbrk(ALARM *palarm, OID oid) { uint calbrks = STRUCT_OFFSET(palarm, 0x564, int); // palarm->calbrks if (calbrks < 4) // Max 4 breakable alarms { // Add new breakable object ID to the list STRUCT_OFFSET_INDEX(palarm, 0x568, OID, calbrks) = oid; // palarm->aoidAlbrks[calbrks] STRUCT_OFFSET(palarm, 0x564, int) = calbrks + 1; // palarm->calbrks } } void AddAlarmSensor(ALARM *palarm, OID oid) { uint coidSensors = STRUCT_OFFSET(palarm, 0x578, int); // palarm->coidSensors if (coidSensors < 16) // Max 16 sensors { // Add new sensor object ID to the list STRUCT_OFFSET_INDEX(palarm, 0x57c, OID, coidSensors) = oid; // palarm->aoidSensors[coidSensors] STRUCT_OFFSET(palarm, 0x578, int) = coidSensors + 1; // palarm->coidSensors } } void AddAlarmStepguard(ALARM *palarm, OID oid) { uint coidStepguards = STRUCT_OFFSET(palarm, 0x600, int); // palarm->coidStepguards if (coidStepguards < 6) // Max 6 stepguards { // Add new stepguard object ID to the list STRUCT_OFFSET_INDEX(palarm, 0x604, OID, coidStepguards) = oid; // palarm->aoidStepguards[coidStepguards] STRUCT_OFFSET(palarm, 0x600, int) = coidStepguards + 1; // palarm->coidStepguards } } void SetAlarmRsmg(ALARM *palarm, int fOnTrigger, OID oidRoot, OID oidSM, OID oidGoal) { // palarm->arsmg & palarm->crsmg FAddRsmg(&STRUCT_OFFSET(palarm, 0x630, RSMG), 8, &STRUCT_OFFSET(palarm, 0x62c, int), fOnTrigger, oidRoot, oidSM, oidGoal); } INCLUDE_ASM("asm/nonmatchings/P2/alarm", FGetAlarmSensorList__FP5ALARMPv); ================================================ FILE: src/P2/alo.c ================================================ #include #include #include #include #include #include #include #include extern VTACT g_vtactseg; extern SHADOW s_shadow; INCLUDE_ASM("asm/nonmatchings/P2/alo", FIsZeroV__FP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/alo", FIsZeroW__FP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/alo", FIsZeroDv__FP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/alo", FIsZeroDw__FP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/alo", InitAlo__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", AddAloHierarchy__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", OnAloAdd__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", RemoveAloHierarchy__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", OnAloRemove__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", UpdateAloOrig__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloParent__FP3ALOT0); INCLUDE_ASM("asm/nonmatchings/P2/alo", ApplyAloProxy__FP3ALOP5PROXY); INCLUDE_ASM("asm/nonmatchings/P2/alo", BindAlo__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", PostAloLoad__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", PostAloLoadCallback__FP3ALO5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/alo", SnipAloObjects__FP3ALOiP4SNIP); INCLUDE_ASM("asm/nonmatchings/P2/alo", UpdateAloHierarchy__FP3ALOf); INCLUDE_ASM("asm/nonmatchings/P2/alo", UpdateAlo__FP3ALOf); INCLUDE_ASM("asm/nonmatchings/P2/alo", InvalidateAloLighting__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", UpdateAloXfWorld__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", UpdateAloXfWorldHierarchy__FP3ALO); void PresetAloAccel(ALO *palo, float dt) { return; } INCLUDE_ASM("asm/nonmatchings/P2/alo", ProjectAloTransform__FP3ALOfi); INCLUDE_ASM("asm/nonmatchings/P2/alo", PredictAloTransform__FP3ALOT0fP6VECTORP7MATRIX3T3T3); INCLUDE_ASM("asm/nonmatchings/P2/alo", PredictAloTransformAdjust__FP3ALOT0fP6VECTORP7MATRIX3T3T3); INCLUDE_ASM("asm/nonmatchings/P2/alo", DupAloRo__FP3ALOP2ROT1); INCLUDE_ASM("asm/nonmatchings/P2/alo", RenderFastShadow__FP3ALOP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/alo", RenderAloAll__FP3ALOP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/alo", RenderAloSelf__FP3ALOP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/alo", RenderAloGlobset__FP3ALOP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/alo", RenderAloLine__FP3ALOP2CMP6VECTORT2ff); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloOverrideCel__FP3ALOG4RGBA); INCLUDE_ASM("asm/nonmatchings/P2/alo", FUN_00126ab0); INCLUDE_ASM("asm/nonmatchings/P2/alo", UpdateAloThrob__FP3ALOf); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloBlotContext__FP3ALOP4BLOT); INCLUDE_ASM("asm/nonmatchings/P2/alo", EnsureAloFader__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", FadeAloIn__FP3ALOf); INCLUDE_ASM("asm/nonmatchings/P2/alo", FadeAloOut__FP3ALOf); INCLUDE_ASM("asm/nonmatchings/P2/alo", AdjustAloRtckMat__FP3ALOP2CM4RTCKP6VECTORP7MATRIX4); INCLUDE_ASM("asm/nonmatchings/P2/alo", CloneAloHierarchy__FP3ALOT0); INCLUDE_ASM("asm/nonmatchings/P2/alo", CloneAlo__FP3ALOT0); INCLUDE_ASM("asm/nonmatchings/P2/alo", HandleAloMessage__FP3ALO5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/alo", TranslateAloToPos__FP3ALOP6VECTOR); JUNK_ADDIU(20); JUNK_ADDIU(20); INCLUDE_ASM("asm/nonmatchings/P2/alo", RotateAloToMat__FP3ALOP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloVelocityVec__FP3ALOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloVelocityXYZ__FP3ALOfff); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloAngularVelocityVec__FP3ALOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloAngularVelocityXYZ__FP3ALOfff); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloVelocityLocal__FP3ALOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloVelocityLocal__FP3ALOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/alo", MatchAloOtherObject__FP3ALOT0); INCLUDE_ASM("asm/nonmatchings/P2/alo", CalculateAloMovement__FP3ALOT0P6VECTORN42); INCLUDE_ASM("asm/nonmatchings/P2/alo", CalculateAloTransform__FP3ALOT0iP6VECTORP7MATRIX3T3T3); INCLUDE_ASM("asm/nonmatchings/P2/alo", CalculateAloTransformAdjust__FP3ALOT0P6VECTORP7MATRIX3T2T2); INCLUDE_ASM("asm/nonmatchings/P2/alo", ConvertAloPos__FP3ALOT0P6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/alo", ConvertAloVec__FP3ALOT0P6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/alo", ConvertAloMat__FP3ALOT0P7MATRIX3T2); INCLUDE_ASM("asm/nonmatchings/P2/alo", FDrivenAlo__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", RetractAloDrive__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", ConvertAloMovement__FP3ALOT0P6VECTORN82); INCLUDE_ASM("asm/nonmatchings/P2/alo", CalculateAloDrive__FP3ALOP3CLQP2LMffPfN25); INCLUDE_ASM("asm/nonmatchings/P2/alo", FGetAloChildrenList__FP3ALOPv); ACTSEG *PactsegNewAlo(ALO *palo) { return (ACTSEG *)PactNew(palo->psw, palo, &g_vtactseg); } INCLUDE_ASM("asm/nonmatchings/P2/alo", LoadAloFromBrx__FP3ALOP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/alo", LoadAloAloxFromBrx__FP3ALOP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/alo", BindAloAlox__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", AdjustAloRotation__FP3ALOP7MATRIX3P6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/alo", UnadjustAloRotation__FP3ALOP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloInitialVelocity__FP3ALOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloInitialAngularVelocity__FP3ALOP6VECTOR); ASEGD *PasegdEnsureAlo(ALO *palo) { ASEGD *&pasegd = STRUCT_OFFSET(palo, 0x2a0, ASEGD *); // palo->pasegd if (!pasegd) { pasegd = (ASEGD *)PvAllocSwClearImpl(sizeof(ASEGD)); pasegd->oidAseg = OID_Nil; pasegd->iak = IAK_Time; pasegd->tLocal = 0.0f; pasegd->svtLocal = 1.0f; } return pasegd; } void SetAloFastShadowRadius(ALO *palo, float sRadius) { // palo->sFastShadowRadius STRUCT_OFFSET(palo, 0x28c, float) = sRadius * 0.01f; } void GetAloFastShadowRadius(ALO *palo, float *psRadius) { // palo->sFastShadowRadius *psRadius = STRUCT_OFFSET(palo, 0x28c, float) * 100.0f; } void SetAloFastShadowDepth(ALO *palo, float sDepth) { // palo->sFastShadowDepth STRUCT_OFFSET(palo, 0x290, float) = sDepth * 0.01f; } void GetAloFastShadowDepth(ALO *palo, float *psDepth) { // palo->sFastShadowDepth *psDepth = STRUCT_OFFSET(palo, 0x290, float) * 100.0f; } INCLUDE_ASM("asm/nonmatchings/P2/alo", PshadowAloEnsure__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloCastShadow__FP3ALOi); void SetAloShadowShader(ALO *palo, OID oidShdShadow) { SHADOW *pshadow = PshadowAloEnsure(palo); SetShadowShader(pshadow, oidShdShadow); } void SetAloShadowNearRadius(ALO *palo, float sNearRadius) { SHADOW *pshadow = PshadowAloEnsure(palo); SetShadowNearRadius(pshadow, sNearRadius); } void SetAloShadowFarRadius(ALO *palo, float sFarRadius) { SHADOW *pshadow = PshadowAloEnsure(palo); SetShadowFarRadius(pshadow, sFarRadius); } void SetAloShadowNearCast(ALO *palo, float sNearCast) { SHADOW *pshadow = PshadowAloEnsure(palo); SetShadowNearCast(pshadow, sNearCast); } void SetAloShadowFarCast(ALO *palo, float sFarCast) { SHADOW *pshadow = PshadowAloEnsure(palo); SetShadowFarCast(pshadow, sFarCast); } void SetAloShadowConeAngle(ALO *palo, float degConeAngle) { SHADOW *pshadow = PshadowAloEnsure(palo); SetShadowConeAngle(pshadow, degConeAngle); } void SetAloShadowFrustrumUp(ALO *palo, VECTOR *pvecUp) { SHADOW *pshadow = PshadowAloEnsure(palo); SetShadowFrustrumUp(pshadow, pvecUp); } void SetAloDynamicShadowObject(ALO *palo, OID oidDysh) { SHADOW *pshadow = PshadowAloEnsure(palo); STRUCT_OFFSET(pshadow, 0xb0, OID) = oidDysh; // pshadow->oidDysh } SHADOW *PshadowInferAlo(ALO *palo) { // palo->pshadow if (STRUCT_OFFSET(palo, 0x284, SHADOW *)) { return STRUCT_OFFSET(palo, 0x284, SHADOW *); } InitShadow(&s_shadow); return &s_shadow; } void GetAloCastShadow(ALO *palo, int *pfCastShadow) { // palo->pshadow *pfCastShadow = (STRUCT_OFFSET(palo, 0x284, SHADOW *) != NULL); } void GetAloShadowShader(ALO *palo, OID *poidShdShadow) { // palo->pshadow SHADOW *pshadow = STRUCT_OFFSET(palo, 0x284, SHADOW *); if (pshadow && pshadow->pshd) { *poidShdShadow = (OID)pshadow->pshd->oid; } else { *poidShdShadow = OID_Nil; } } void GetAloShadowNearRadius(ALO *palo, float *psNearRadius) { SHADOW *pshadow = PshadowInferAlo(palo); *psNearRadius = pshadow->sNearRadius; } void GetAloShadowFarRadius(ALO *palo, float *psFarRadius) { SHADOW *pshadow = PshadowInferAlo(palo); *psFarRadius = pshadow->sFarRadius; } void GetAloShadowNearCast(ALO *palo, float *psNearCast) { SHADOW *pshadow = PshadowInferAlo(palo); *psNearCast = pshadow->sNearCast; } void GetAloShadowFarCast(ALO *palo, float *psFarCast) { SHADOW *pshadow = PshadowInferAlo(palo); *psFarCast = pshadow->sFarCast; } void GetAloShadowConeAngle(ALO *palo, float *pdegConeAngle) { const float RAD_TO_DEG = 57.295776f; SHADOW *pshadow = PshadowInferAlo(palo); *pdegConeAngle = atan2f(pshadow->sNearRadius / pshadow->sNearCast, 1.0f) * RAD_TO_DEG * 2.0f; } INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloShadowFrustrumUp__FP3ALOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloEuler__FP3ALOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloEuler__FP3ALOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/alo", EnsureAloActRestore__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", EnsureAloActla__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", RecacheAloActList__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", InsertAloAct__FP3ALOP3ACT); INCLUDE_ASM("asm/nonmatchings/P2/alo", ResortAloActList__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", PasegaFindAlo__FP3ALO3OID); INCLUDE_ASM("asm/nonmatchings/P2/alo", PsmaFindAlo__FP3ALO3OID); INCLUDE_ASM("asm/nonmatchings/P2/alo", PasegaFindAloNearest__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", CreateAloActadj__FP3ALOiPP6ACTADJ); INCLUDE_ASM("asm/nonmatchings/P2/alo", FIsAloStatic__FP3ALO); void ResolveAlo(ALO *palo) { if (palo->paloRoot) { STRUCT_OFFSET(palo->paloRoot, 0x228, int) = 0; // palo->paloRoot->cframeStatic } } INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloPositionSpring__FP3ALOf); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloPositionSpringDetail__FP3ALOP3CLQ); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloPositionDamping__FP3ALOf); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloPositionDampingDetail__FP3ALOP3CLQ); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloRotationSpring__FP3ALOf); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloRotationSpringDetail__FP3ALOP3CLQ); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloRotationDamping__FP3ALOf); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloRotationDampingDetail__FP3ALOP3CLQ); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloPositionSmooth__FP3ALOf); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloPositionSmoothMaxAccel__FP3ALOf); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloPositionSmoothDetail__FP3ALOP4SMPA); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloRotationSmooth__FP3ALOf); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloRotationSmoothMaxAccel__FP3ALOf); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloRotationSmoothDetail__FP3ALOP4SMPA); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloDefaultAckPos__FP3ALO3ACK); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloDefaultAckRot__FP3ALO3ACK); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloRestorePosition__FP3ALOi); INCLUDE_ASM("asm/nonmatchings/P2/alo", FUN_0012a3c8); INCLUDE_ASM("asm/nonmatchings/P2/alo", FUN_0012a3e8); INCLUDE_ASM("asm/nonmatchings/P2/alo", FUN_0012a418); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloRestorePositionAck__FP3ALO3ACK); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloRestoreRotation__FP3ALOi); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloRestoreRotationAck__FP3ALO3ACK); INCLUDE_ASM("asm/nonmatchings/P2/alo", FUN_0012a4e8); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloLookAt__FP3ALO3ACK); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloLookAtIgnore__FP3ALOf); INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloLookAtIgnore__FP3ALOPf); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloLookAtPanFunction__FP3ALOP3CLQ); INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloLookAtPanFunction__FP3ALOP3CLQ); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloLookAtPanLimits__FP3ALOP2LM); INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloLookAtPanLimits__FP3ALOP2LM); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloLookAtTiltFunction__FP3ALOP3CLQ); INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloLookAtTiltFunction__FP3ALOP3CLQ); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloLookAtTiltLimits__FP3ALOP2LM); INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloLookAtTiltLimits__FP3ALOP2LM); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloLookAtEnabledPriority__FP3ALOi); INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloLookAtEnabledPriority__FP3ALOPi); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloLookAtDisabledPriority__FP3ALOi); INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloLookAtDisabledPriority__FP3ALOPi); INCLUDE_ASM("asm/nonmatchings/P2/alo", FUN_0012a810); INCLUDE_ASM("asm/nonmatchings/P2/alo", FUN_0012a848); INCLUDE_ASM("asm/nonmatchings/P2/alo", FUN_0012a860); INCLUDE_ASM("asm/nonmatchings/P2/alo", FUN_0012a888); INCLUDE_ASM("asm/nonmatchings/P2/alo", FUN_0012a8b8); INCLUDE_ASM("asm/nonmatchings/P2/alo", FUN_0012a8c8); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloRotationMatchesVelocity__FP3ALOff3ACK); INCLUDE_ASM("asm/nonmatchings/P2/alo", PtargetEnsureAlo__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloTargetAttacks__FP3ALOi); void SetAloTargetRadius(ALO *palo, float sRadiusTarget) { TARGET *ptarget = PtargetEnsureAlo(palo); STRUCT_OFFSET(ptarget, 0x8c, float) = sRadiusTarget; // ptarget->sRadiusTarget } void SetAloTargetHitTest(ALO *palo, int fHitTest) { TARGET *ptarget = PtargetEnsureAlo(palo); STRUCT_OFFSET(ptarget, 0x90, int) = fHitTest; // ptarget->fHitTest } INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloScrollingMasterSpeeds__FP3ALOff); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloEyesClosed__FP3ALOf); void EnsureAloSfx(ALO *palo) { // palo->psfx if (!STRUCT_OFFSET(palo, 0x2ac, SFX *)) { NewSfx(&STRUCT_OFFSET(palo, 0x2ac, SFX *)); } } void SetAloSfxid(ALO *palo, SFXID sfxid) { EnsureAloSfx(palo); STRUCT_OFFSET(palo, 0x2ac, SFX *)->sfxid = sfxid; // palo->psfx } INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloSfxidSpl__FP3ALO5SFXID); void GetAloSfxid(ALO *palo, SFXID *psfxid) { SFXID sfxid = SFXID_Nil; if (STRUCT_OFFSET(palo, 0x2ac, SFX *)) // palo->psfx { sfxid = STRUCT_OFFSET(palo, 0x2ac, SFX *)->sfxid; } *psfxid = sfxid; } void SetAloSStart(ALO *palo, float sStart) { EnsureAloSfx(palo); STRUCT_OFFSET(palo, 0x2ac, SFX *)->sStart = sStart; // palo->psfx } void GetAloSStart(ALO *palo, float *psStart) { float sStart = 3000.0f; if (STRUCT_OFFSET(palo, 0x2ac, SFX *)) // palo->psfx { sStart = STRUCT_OFFSET(palo, 0x2ac, SFX *)->sStart; } *psStart = sStart; } void SetAloSFull(ALO *palo, float sFull) { EnsureAloSfx(palo); STRUCT_OFFSET(palo, 0x2ac, SFX *)->sFull = sFull; // palo->psfx } INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloSndRepeat__FP3ALOP2LM); void GetAloSFull(ALO *palo, float *psFull) { float sFull = 300.0f; if (STRUCT_OFFSET(palo, 0x2ac, SFX *)) // palo->psfx { sFull = STRUCT_OFFSET(palo, 0x2ac, SFX *)->sFull; } *psFull = sFull; } void SetAloUVolume(ALO *palo, float uVol) { EnsureAloSfx(palo); STRUCT_OFFSET(palo, 0x2ac, SFX *)->uVol = uVol; // palo->psfx } void SetAloUDoppler(ALO *palo, float uDoppler) { EnsureAloSfx(palo); STRUCT_OFFSET(palo, 0x2ac, SFX *)->uDoppler = uDoppler; // palo->psfx } void GetAloUDoppler(ALO *palo, float *puDoppler) { float uDoppler = 0.0f; if (STRUCT_OFFSET(palo, 0x2ac, SFX *)) // palo->psfx { uDoppler = STRUCT_OFFSET(palo, 0x2ac, SFX *)->uDoppler; } *puDoppler = uDoppler; } void SetAloUVolumeSpl(ALO *palo, float uVol) { // palo->psfx if (STRUCT_OFFSET(palo, 0x2ac, SFX *) && STRUCT_OFFSET(palo, 0x2ac, SFX *)->pamb) { SetPambVol(STRUCT_OFFSET(palo, 0x2ac, SFX *)->pamb, uVol); } } void GetAloUVolume(ALO *palo, float *puVol) { float uVol = 1.0f; if (STRUCT_OFFSET(palo, 0x2ac, SFX *)) // palo->psfx { uVol = STRUCT_OFFSET(palo, 0x2ac, SFX *)->uVol; } *puVol = uVol; } void SetAloUPitch(ALO *palo, float uPitch) { EnsureAloSfx(palo); STRUCT_OFFSET(palo, 0x2ac, SFX *)->uPitch = uPitch; // palo->psfx } void SetAloUPitchSpl(ALO *palo, float uPitch) { // palo->psfx if (STRUCT_OFFSET(palo, 0x2ac, SFX *) && STRUCT_OFFSET(palo, 0x2ac, SFX *)->pamb) { SetPambFrq(STRUCT_OFFSET(palo, 0x2ac, SFX *)->pamb, uPitch); } } void GetAloUPitch(ALO *palo, float *puPitch) { float uPitch = 0.0f; if (STRUCT_OFFSET(palo, 0x2ac, SFX *)) // palo->psfx { uPitch = STRUCT_OFFSET(palo, 0x2ac, SFX *)->uPitch; } *puPitch = uPitch; } INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloSndRepeat__FP3ALOP2LM); INCLUDE_ASM("asm/nonmatchings/P2/alo", StartAloSound__FP3ALO5SFXIDfffP2LM); void StopAloSound(ALO *palo) { // palo->psfx if (STRUCT_OFFSET(palo, 0x2ac, SFX *)) { StopSound(STRUCT_OFFSET(palo, 0x2ac, SFX *)->pamb, 0); } } INCLUDE_ASM("asm/nonmatchings/P2/alo", EnsureAloThrob__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloThrobKind__FP3ALO6THROBK); void GetAloThrobKind(ALO *palo, THROBK *pthrobk) { THROBK throbk = THROBK_Nil; if (STRUCT_OFFSET(palo, 0x288, THROB *)) // palo->throb { throbk = STRUCT_OFFSET(palo, 0x288, THROB *)->throbk; } *pthrobk = throbk; } INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloThrobInColor__FP3ALOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloThrobInColor__FP3ALOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloThrobOutColor__FP3ALOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloThrobOutColor__FP3ALOP6VECTOR); void SetAloThrobDtInOut(ALO *palo, float dtInOut) { EnsureAloThrob(palo); STRUCT_OFFSET(palo, 0x288, THROB *)->dtInOut = dtInOut; } void GetAloThrobDtInOut(ALO *palo, float *pdtInOut) { float dtInOut = 0.0f; if (STRUCT_OFFSET(palo, 0x288, THROB *)) // palo->throb { dtInOut = STRUCT_OFFSET(palo, 0x288, THROB *)->dtInOut; } *pdtInOut = dtInOut; } INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloInteractCane__FP3ALOi); INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloInteractCane__FP3ALOPi); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloInteractCaneSweep__FP3ALOi); INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloInteractCaneSweep__FP3ALOPi); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloInteractCaneRush__FP3ALOi); INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloInteractCaneRush__FP3ALOPi); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloInteractCaneSmash__FP3ALOi); INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloInteractCaneSmash__FP3ALOPi); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloInteractBomb__FP3ALOi); INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloInteractBomb__FP3ALOPi); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloInteractShock__FP3ALOi); INCLUDE_ASM("asm/nonmatchings/P2/alo", GetAloInteractShock__FP3ALOPi); int FAbsorbAloWkr(ALO *palo, WKR *pwkr) { return (pwkr->grfic != 0); } INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloPoseCombo__FP3ALO3OID); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloForceCameraFade__FP3ALOi); INCLUDE_ASM("asm/nonmatchings/P2/alo", SetAloRealClock__FP3ALOi); INCLUDE_ASM("asm/nonmatchings/P2/alo", FUN_0012b550); INCLUDE_ASM("asm/nonmatchings/P2/alo", FUN_0012b590); INCLUDE_ASM("asm/nonmatchings/P2/alo", FUN_0012b5b8); JUNK_ADDIU(10); JUNK_WORD(0x7c450000); JUNK_WORD(0x48220800); INCLUDE_ASM("asm/nonmatchings/P2/alo", FUN_0012b6b8); INCLUDE_ASM("asm/nonmatchings/P2/alo", anticrack_itm_firewall); ================================================ FILE: src/P2/aseg.c ================================================ #include #include void StartupAseg() { return; } INCLUDE_ASM("asm/nonmatchings/P2/aseg", InitAseg__FP4ASEG); INCLUDE_ASM("asm/nonmatchings/P2/aseg", LoadAsegFromBrx__FP4ASEGP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/aseg", LoadAsegEventsFromBrx__FP4ASEGP18CBinaryInputStreamiPiPP2EA); void CloneAseg(ASEG *paseg, LO *ploBase) { CloneLo(paseg, ploBase); } INCLUDE_ASM("asm/nonmatchings/P2/aseg", PostAsegLoad__FP4ASEG); INCLUDE_ASM("asm/nonmatchings/P2/aseg", PostAsegLoadCallback__FP4ASEG5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/aseg", ApplyAsegOvr__FP4ASEGP3ALOiP3OVRffiPP5ASEGA); void ApplyAseg(ASEG *paseg, ALO *paloAsegRoot, float tLocal, float svtLocal, GRFAPL grfapl, ASEGA **ppasega) { ApplyAsegOvr(paseg, paloAsegRoot, 0, NULL, tLocal, svtLocal, grfapl, ppasega); } ASEGA *PasegaApplyAseg(ASEG *paseg, ALO *paloAsegRoot, float tLocal, float svtLocal, GRFAPL grfapl) { ASEGA *pasega; ApplyAsegOvr(paseg, paloAsegRoot, 0, NULL, tLocal, svtLocal, grfapl, &pasega); return pasega; } INCLUDE_ASM("asm/nonmatchings/P2/aseg", PasegaFindAseg__FP4ASEGP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/aseg", EnsureAseg__FP4ASEGP3ALO4SEEKffiPP5ASEGA); ASEGA *PasegaEnsureAseg(ASEG *paseg, ALO *paloRoot, SEEK seek, float t, float svt, GRFAPL grfapl) { ASEGA *pasega; EnsureAseg(paseg, paloRoot, seek, t, svt, grfapl, &pasega); return pasega; } void ApplyAsegCur(ASEG *paseg, ALO *paloRoot, float t, float svt, GRFAPL grfapl, ASEGA **ppasega) { if (*ppasega) { RetractAsega(*ppasega); *ppasega = NULL; } if (paseg) { ApplyAseg(paseg, paloRoot, t, svt, grfapl, ppasega); } } INCLUDE_ASM("asm/nonmatchings/P2/aseg", FWipingAseg__FP4ASEG); INCLUDE_ASM("asm/nonmatchings/P2/aseg", FindAsegClosestPoint__FP4ASEGP3ALOP6VECTORfPfT2T2); INCLUDE_ASM("asm/nonmatchings/P2/aseg", PeaFindAsegLabel__FP4ASEG3OID); float TFindAsegLabel(ASEG *paseg, OID oidLabel) { EA *pea = PeaFindAsegLabel(paseg, oidLabel); if (pea) { return pea->tLocal; } return 0.0f; } INCLUDE_ASM("asm/nonmatchings/P2/aseg", PchnFindAseg__FP4ASEGP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/aseg", PredictAsegEffect__FP4ASEGffP3ALOT3iP6VECTORP7MATRIX3T6T6); INCLUDE_ASM("asm/nonmatchings/P2/aseg", GetAsegWaypoints__FP4ASEGP3ALOPiPPP8WAYPOINT); INCLUDE_ASM("asm/nonmatchings/P2/aseg", StripAsegChn__FP4ASEGP3CHN); void StripAsegAlo(ASEG *aseg, ALO *alo) { if (aseg->pchnStrip) { return; } CHN *chn = PchnFindAseg(aseg, alo); if (chn) { StripAsegChn(aseg, chn); } } void LoadAsegblFromBrx(ASEGBL *pasegbl, CBinaryInputStream *pbis) { return; } void PostAsegblLoad(ASEGBL *pasegbl) { return; } void CloneAsegbl(ASEGBL *pasegbl, LO *ploBase) { return; } ================================================ FILE: src/P2/asega.c ================================================ #include #include INCLUDE_ASM("asm/nonmatchings/P2/asega", PasegaNew__FP2SW); void SetAsegaHandsOff(ASEGA *pasega, int fHandsOff) { if (fHandsOff == pasega->fHandsOff) return; if (fHandsOff) { IncrementSwHandsOff(g_psw); } else { DecrementSwHandsOff(g_psw); } pasega->fHandsOff = fHandsOff; } INCLUDE_ASM("asm/nonmatchings/P2/asega", UpdateAsegaIeaCur__FP5ASEGA); INCLUDE_ASM("asm/nonmatchings/P2/asega", PactsegFindAsega__FP5ASEGA3OID); JUNK_ADDIU(10); INCLUDE_ASM("asm/nonmatchings/P2/asega", HandleAsegaEvent__FP5ASEGAP2EAPi); INCLUDE_ASM("asm/nonmatchings/P2/asega", HandleAsegaEventsFF__FP5ASEGAP4ASEGPi); INCLUDE_ASM("asm/nonmatchings/P2/asega", HandleAsegaEvents__FP5ASEGAP4ASEGPi); void RemoveAsega(ASEGA *pasega) { RemoveDlEntry(&g_psw->dlAsegaPending, pasega); FreeSlotheapPv(&g_psw->slotheapAsega, pasega); } INCLUDE_ASM("asm/nonmatchings/P2/asega", RetractAsega__FP5ASEGA); INCLUDE_ASM("asm/nonmatchings/P2/asega", FUN_0012e928); INCLUDE_ASM("asm/nonmatchings/P2/asega", UFromEaErrorFunc__FP2EAf); INCLUDE_ASM("asm/nonmatchings/P2/asega", FWrapAsegaTime__FP5ASEGAPfT1); INCLUDE_ASM("asm/nonmatchings/P2/asega", UpdateAsega__FP5ASEGAf); INCLUDE_ASM("asm/nonmatchings/P2/asega", SeekAsega__FP5ASEGA4SEEKff); INCLUDE_ASM("asm/nonmatchings/P2/asega", SnapAsega__FP5ASEGAi); INCLUDE_ASM("asm/nonmatchings/P2/asega", AdaptAsega__FP5ASEGA); INCLUDE_ASM("asm/nonmatchings/P2/asega", FindChnClosestPointLocal__FP3CHNP3ALOP6VECTORfffPfT2T2); INCLUDE_ASM("asm/nonmatchings/P2/asega", SetAsegaSpeed__FP5ASEGAf); INCLUDE_ASM("asm/nonmatchings/P2/asega", SetAsegaMasterSpeed__FP5ASEGAf); INCLUDE_ASM("asm/nonmatchings/P2/asega", SetAsegaPriority__FP5ASEGAi); INCLUDE_ASM("asm/nonmatchings/P2/asega", SendAsegaMessage__FP5ASEGA5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/asega", SubscribeAsegaStruct__FP5ASEGAPFPv5MSGIDPv_vPv); INCLUDE_ASM("asm/nonmatchings/P2/asega", SubscribeAsegaObject__FP5ASEGAP2LO); ================================================ FILE: src/P2/barrier.c ================================================ #include #include void InitBarrier(BARRIER *pbarrier) { InitSo(pbarrier); SetSoConstraints(pbarrier, CT_Locked, NULL, CT_Locked, NULL); STRUCT_OFFSET(pbarrier, 0x590, OID) = OID_Nil; // pbarrier->barwarp.oidWarp } void CloneBarrier(BARRIER *pbarrier, BARRIER *pbarrierBase) { CloneSo(pbarrier, pbarrierBase); if (!pbarrier->paloParent) { RecalcSwOxfFilterForObject(pbarrier->psw, pbarrier); } } INCLUDE_ASM("asm/nonmatchings/P2/barrier", PostBarrierLoad__FP7BARRIER); INCLUDE_ASM("asm/nonmatchings/P2/barrier", UpdateBarrier__FP7BARRIERf); INCLUDE_ASM("asm/nonmatchings/P2/barrier", FIgnoreBarrierIntersection__FP7BARRIERP2SO); INCLUDE_ASM("asm/nonmatchings/P2/barrier", NotifyBarrierImpact__FP7BARRIERP2XPi); void AddBarrierObject(BARRIER *pbarrier, OID oid) { int coid = STRUCT_OFFSET(pbarrier, 0x554, int); // pbarrier->coid OID *aoid = &STRUCT_OFFSET(pbarrier, 0x558, OID); // pbarrier->aoid aoid[coid] = oid; STRUCT_OFFSET(pbarrier, 0x554, int) = coid + 1; // pbarrier->coid } void AddBarrierClass(BARRIER *pbarrier, CID cid) { int ccid = STRUCT_OFFSET(pbarrier, 0x568, int); // pbarrier->ccid CID *acid = &STRUCT_OFFSET(pbarrier, 0x56c, CID); // pbarrier->acid acid[ccid] = cid; STRUCT_OFFSET(pbarrier, 0x568, int) = ccid + 1; // pbarrier->ccid } ================================================ FILE: src/P2/bas.c ================================================ #include #include #include #include CBinaryAsyncStream::CBinaryAsyncStream(void *pvSpool) { m_isector = 0; m_abSpool = (byte *)(((int)pvSpool + 0x3f) & ~0x3f); m_fd = -1; m_pbSpooling = NULL; m_pb = NULL; m_cbFile = 0; m_cbUnspooled = 0; m_cbSpooling = 0; m_ibCur = 0; m_cb = 0; } CBinaryAsyncStream::~CBinaryAsyncStream() { Close(); } bool CBinaryAsyncStream::FOpenFile(CFileLocation *pfl) { return FOpenSector(pfl->m_fcl.isector, pfl->m_fcl.cb); } JUNK_ADDIU(30); bool CBinaryAsyncStream::FOpenSector(uint isector, uint cb) { m_isector = isector; m_cbFile = cb; m_cbUnspooled = cb; m_bask = BASK_Cd; m_cb = 0; m_pb = m_abSpool; m_ibCur = 0; StartSpooling(); return true; } void CBinaryAsyncStream::Close() { switch (m_bask) { case BASK_Host: { if (m_fd > -1) { sceClose(m_fd); } m_fd = -1; break; } case BASK_Cd: { if (FSpooling()) { sceCdSync(0); FinishSpooling(); } m_isector = 0; break; } } m_bask = BASK_Nil; } void CBinaryAsyncStream::StartSpooling() { if (FSpooling() || m_cbUnspooled == 0) return; int cb = 0x4000; if (m_cbUnspooled < cb) { cb = m_cbUnspooled; } byte *pv = m_abSpool; if (m_pb == pv) { pv += 0x4000; } m_pbSpooling = pv; m_cbSpooling = cb; switch (m_bask) { case BASK_Host: { sceRead(m_fd, pv, cb); break; } case BASK_Cd: { ReadCdDirect(m_isector, (m_cbSpooling + 0x7ffu) >> 0x0b, pv); break; } } } bool CBinaryAsyncStream::FSpooling() { return m_cbSpooling != 0; } bool CBinaryAsyncStream::FSpoolingComplete() { int status = 0; bool fComplete = false; if (m_cb == m_ibCur && FSpooling()) { switch (m_bask) { case BASK_Host: { int fExecuting; status = sceIoctl(m_fd, 1, &fExecuting); fComplete = (fExecuting == 0); break; } case BASK_Cd: { fComplete = (sceCdSync(1) == 0); if (fComplete) { status = sceCdGetError(); } break; } } } if (status) { m_cbSpooling = 0; m_pbSpooling = 0; fComplete = false; } return fComplete; } void CBinaryAsyncStream::FinishSpooling() { if (!FSpoolingComplete()) return; if (m_bask == BASK_Cd) { int n; if (m_cbSpooling <= -1) { n = m_cbSpooling + 0x7ffu; } else { n = m_cbSpooling; } m_isector += n >> 0x0b; } m_cbUnspooled -= m_cbSpooling; m_pb = m_pbSpooling; m_cb = m_cbSpooling; m_cbSpooling = 0; m_pbSpooling = 0; m_ibCur = 0; } void CBinaryAsyncStream::Spool() { switch (m_bask) { case BASK_Host: { StartSpooling(); FinishSpooling(); break; } case BASK_Cd: { FinishSpooling(); StartSpooling(); break; } } } void CBinaryAsyncStream::Skip(int cb) { m_ibCur += cb; } ================================================ FILE: src/P2/basic.c ================================================ #include #include #include extern CGc g_gc; int FIsBasicDerivedFrom(BASIC *pbasic, CID cid) { VT *vt = (VT *)pbasic->pvtbasic; while (vt) { if (vt->cid == cid) return 1; vt = vt->pvtSuper; } return 0; } void EnsureBasicSidebag(BASIC *pbasic) { if (!pbasic->psidebag) { CSidebag *psidebag = PsidebagNew(); pbasic->psidebag = psidebag; g_gc.AddRootSidebag(psidebag); } } void GetBasicCid(BASIC *pbasic, CID* pcid) { *pcid = pbasic->pvtbasic->cid; } ================================================ FILE: src/P2/bbmark.c ================================================ #include #include #include INCLUDE_ASM("asm/nonmatchings/P2/bbmark", UpdateSwPox__FP2SWP3OXAT1UcUc); OX *PoxAddSw(SW *psw, OXA *poxa, OXA *poxaOther) { OX *pox = (OX *)PvAllocSlotheapImpl(&psw->slotheapOx); pox->pxp = NULL; pox->psoOther = poxaOther->pso; pox->poxNext = poxa->pox; poxa->pox = pox; return pox; } INCLUDE_ASM("asm/nonmatchings/P2/bbmark", PoxRemoveSw__FP2SWP3OXAT1); INCLUDE_ASM("asm/nonmatchings/P2/bbmark", PoxFromSoSo__FP2SOT0); XP *PxpFirstFromSoSo(SO *pso, SO *psoOther) { OX *pox = PoxFromSoSo(pso, psoOther); return pox ? pox->pxp : NULL; } INCLUDE_ASM("asm/nonmatchings/P2/bbmark", AddSwAaobrObject__FP2SWP2SO); INCLUDE_ASM("asm/nonmatchings/P2/bbmark", RemoveSwAaobrObject__FP2SWP2SO); void InvalidateSwAaox(SW *psw) { psw->fAaoxValid = 0; } INCLUDE_ASM("asm/nonmatchings/P2/bbmark", UpdateSwAaox__FP2SW); INCLUDE_ASM("asm/nonmatchings/P2/bbmark", InvalidateSwXpForObject__FP2SWP2SOi); INCLUDE_ASM("asm/nonmatchings/P2/bbmark", RecalcSwXpAll__FP2SWi); INCLUDE_ASM("asm/nonmatchings/P2/bbmark", RecalcSwOxfFilterForObject__FP2SWP2SO); ================================================ FILE: src/P2/bez.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/bez", EvaluateBezierWeightedFloat__FfffffffffPfN29); INCLUDE_ASM("asm/nonmatchings/P2/bez", EvaluateBezierFloat__FfffffffPfN27); INCLUDE_ASM("asm/nonmatchings/P2/bez", EvaluateBezierPos__FfffP6VECTORN63); INCLUDE_ASM("asm/nonmatchings/P2/bez", EvaluateBezierMat__FfffP7MATRIX3P6VECTORT3T4T3T4T4); INCLUDE_ASM("asm/nonmatchings/P2/bez", TesselateBezier__FfffP6VECTORN33iT3); INCLUDE_ASM("asm/nonmatchings/P2/bez", SBezierPosLength__FffP6VECTORN32); INCLUDE_ASM("asm/nonmatchings/P2/bez", LimitBezierMulti__Fie); ================================================ FILE: src/P2/binoc.c ================================================ #include #include #include #include void InitBei(BEI *pbei, CLQ *pclq, float duWidth, float dgHeight, int cseg) { // Copy CLQ *(qword *)&pbei->clq = *(qword *)pclq; pbei->cseg = cseg; // Calculate segment count of half the notch float duSegWidth = 1.0f / cseg; float csegNotchWidth = duWidth / duSegWidth; int csegNotchHalf = (int)csegNotchWidth >> 1; // Simplifies to duWidth * cseg / 2 pbei->csegNotchHalf = csegNotchHalf; // Calculate notch segment indices pbei->isegNotchMid = cseg / 2; pbei->isegNotchFirst = pbei->isegNotchMid - csegNotchHalf; pbei->isegNotchLast = pbei->isegNotchMid + csegNotchHalf; // Evaluate curve at notch edges and center pbei->gNotchEdge = GEvaluateClq(pclq, pbei->isegNotchFirst / pbei->cseg); pbei->gNotchCenter = GEvaluateClq(pclq, 0.5f) + dgHeight; } float GEvaluateBei(BEI *pbei, int iseg) { // A more idiomatic structure would check if inside the notch first // and use the CLQ evaluation as the default return value. // Outside notch region if (iseg < pbei->isegNotchFirst || iseg > pbei->isegNotchLast) { // Evaluate quadratic curve float t = iseg / pbei->cseg; return GEvaluateClq(&pbei->clq, t); } // Notch edges if (iseg == pbei->isegNotchFirst || iseg == pbei->isegNotchLast) { // Return edge height return pbei->gNotchEdge; } // Left side of notch if (iseg < pbei->isegNotchMid) { // Interpolate between edge and center float t = (iseg - pbei->isegNotchFirst) / pbei->csegNotchHalf; return GLerp(pbei->gNotchEdge, pbei->gNotchCenter, t); } // Right side of notch if (iseg > pbei->isegNotchMid) { // Interpolate between center and edge float t = (iseg - pbei->isegNotchMid) / pbei->csegNotchHalf; return GLerp(pbei->gNotchCenter, pbei->gNotchEdge, t); } return pbei->gNotchCenter; } void InitBinoc(BINOC *binoc, BLOTK blotk) { binoc->width = 640.0f; binoc->height = 492.80001f; binoc->unk0 = 15.0f; binoc->unk1 = 0x80ffffff; InitBlot(binoc, blotk); } void ResetBinoc(BINOC *binoc) { binoc->pvtbinoc->pfnSetBinocAchzDraw(binoc, 0); SetBinocLookat(binoc, NULL); binoc->dxReticle = 0.0f; binoc->dyReticle = 0.0f; binoc->uCompassBarOffset = 0.4f; binoc->zoom = 0.0f; } INCLUDE_ASM("asm/nonmatchings/P2/binoc", PostBinocLoad__FP5BINOC); INCLUDE_ASM("asm/nonmatchings/P2/binoc", DrawBinocCompass); INCLUDE_ASM("asm/nonmatchings/P2/binoc", DrawBinocZoom); INCLUDE_ASM("asm/nonmatchings/P2/binoc", DrawBinocReticle); INCLUDE_ASM("asm/nonmatchings/P2/binoc", DrawBinocOutline); INCLUDE_ASM("asm/nonmatchings/P2/binoc", FUN_00134aa0); INCLUDE_ASM("asm/nonmatchings/P2/binoc", FUN_00134b48); INCLUDE_ASM("asm/nonmatchings/P2/binoc", DrawBinocFilter); INCLUDE_ASM("asm/nonmatchings/P2/binoc", FUN_00135550); INCLUDE_ASM("asm/nonmatchings/P2/binoc", open_close_binoc); INCLUDE_ASM("asm/nonmatchings/P2/binoc", FUN_001357f0); INCLUDE_ASM("asm/nonmatchings/P2/binoc", FUN_00135858); INCLUDE_ASM("asm/nonmatchings/P2/binoc", FUN_001358d0); JUNK_ADDIU(30); JUNK_WORD(0xE4C00000); INCLUDE_ASM("asm/nonmatchings/P2/binoc", FUN_00135E30); JUNK_ADDIU(A0); INCLUDE_ASM("asm/nonmatchings/P2/binoc", FUN_00135E48); JUNK_ADDIU(10); INCLUDE_ASM("asm/nonmatchings/P2/binoc", SetBinocBfk); INCLUDE_ASM("asm/nonmatchings/P2/binoc", FUN_00135f48); INCLUDE_ASM("asm/nonmatchings/P2/binoc", FUN_00136040); INCLUDE_ASM("asm/nonmatchings/P2/binoc", FUN_00136238); INCLUDE_ASM("asm/nonmatchings/P2/binoc", FUN_001363d0); INCLUDE_ASM("asm/nonmatchings/P2/binoc", SetBinocAchzDraw); bool FDoneBinocAchz(BINOC *pbinoc) { if (pbinoc->achzDraw[0] == '\0') { return true; } CRichText rt(pbinoc->achzDraw, pbinoc->pfont); int cchTotal = rt.Cch(); float tAchzDraw = g_clock.t - STRUCT_OFFSET(pbinoc, 0x268, float); // pbinoc->tAchzSet int cchDrawn = (int)(tAchzDraw * STRUCT_OFFSET(pbinoc, 0x2F0, float)); // pbinoc->svch return cchDrawn >= cchTotal; } void SetBinocLookat(BINOC *binoc, ALO *paloLookat) { binoc->paloLookat = paloLookat; } void SetBinocZoom(BINOC *binoc, float zoom) { float cappedZoom = zoom * 0.01f; float one = 1.0f; float zero = 0.0f; if (cappedZoom < zero) { cappedZoom = zero; } else if (cappedZoom > one) { cappedZoom = one; } binoc->zoom = cappedZoom; } INCLUDE_ASM("asm/nonmatchings/P2/binoc", FUN_001365f0); INCLUDE_ASM("asm/nonmatchings/P2/binoc", FUN_00136648); INCLUDE_ASM("asm/nonmatchings/P2/binoc", DrawBinoc); void GetBinocReticleFocus(BINOC *binoc, float *dxReticle, float *dyReticle) { *dxReticle = binoc->dxReticle + 320.0f; *dyReticle = binoc->dyReticle + 180.40001f; } INCLUDE_ASM("asm/nonmatchings/P2/binoc", FUN_00136ef8); INCLUDE_ASM("asm/nonmatchings/P2/binoc", FUN_00136fa8); INCLUDE_ASM("asm/nonmatchings/P2/binoc", binoc__static_initialization_and_destruction_0); void CTextBox::SetPos(float x, float y) { m_x = x; m_y = y; } void CTextBox::SetSize(float dx, float dy) { m_dx = dx; m_dy = dy; } void CTextBox::SetTextColor(RGBA *rgba) { this->m_rgba = *rgba; } void CTextBox::SetHorizontalJust(JH jh) { m_jh = jh; } void CTextBox::SetVerticalJust(JV jv) { m_jv = jv; } INCLUDE_ASM("asm/nonmatchings/P2/binoc", _GLOBAL_$I$InitBei__FP3BEIP3CLQffi); ================================================ FILE: src/P2/bis.c ================================================ #include #include #include <989snd.h> #include #include INCLUDE_ASM("asm/nonmatchings/P2/bis", __18CBinaryInputStreamPvii); #ifdef SKIP_ASM /** * @todo 92.85% match. Class fields might be incorrect, * but they seem to be used correctly elsewhere? * https://decomp.me/scratch/CpeOx */ CBinaryInputStream::CBinaryInputStream(void *pvSpool, int cbSpool, GRFBIS grfbis) { int aligned = (cbSpool + 0x3f) & ~0x3f; int padding = (aligned - cbSpool); m_bisk = BISK_Nil; m_grfbis = grfbis; m_abSpool = (byte *)pvSpool - padding; m_cbSpool = aligned; // m_pbRaw = 0; m_pb = 0; m_cbRaw = 0; m_cb = 0; m_pprog = 0; m_grfDecomp = 0; m_cbSpillOver = 0; m_cbFile = 0; } #endif CBinaryInputStream::~CBinaryInputStream() { Close(); } int CBinaryInputStream::FOpenSector(uint isector, uint cb) { m_bisk = BISK_Cd; m_cbAsyncRequest = isector; m_cbFile = cb; m_cbRemaining = cb; m_fd = cb; m_pbRaw = m_abSpool; *(uint *)&m_tickWait = 0; m_cbAsyncComplete = 0; *(uint *)((int)&m_tickWait + 4) = 0; int cbSpool = m_cbSpool; if (cbSpool < 0) { cbSpool += 0xfffff; } m_cbPartialRead = 0; int cbAsyncRemaining = 2; int shr = 20; if ((cbSpool >> shr) > cbAsyncRemaining) { cbAsyncRemaining = cbSpool >> shr; } m_isector = 0; m_cbAsyncRemaining = cbAsyncRemaining; m_cbuf = cbAsyncRemaining - 1; return 1; } void CBinaryInputStream::OpenMemory(int cb, void *pv) { m_bisk = BISK_Mem; m_pb = (byte *)pv; m_cb = cb; } int CBinaryInputStream::FOpenFile(CFileLocation *pfl) { return FOpenSector(pfl->m_fcl.isector, pfl->m_fcl.cb); } void CBinaryInputStream::Close() { switch (m_bisk) { case BISK_Host: { // NOTE: This is m_fd if m_tickWait is removed. if (*(int *)((uchar *)&m_tickWait - 0x4) >= 0) sceClose(*(int *)((uchar *)&m_tickWait - 0x4)); break; } case BISK_Cd: { // NOTE: This is m_cbAsyncComplete if m_tickWait is removed. if (STRUCT_OFFSET(this, 0x3c, int)) { if (m_grfbis & 0x2) { sceCdBreak(); } else { snd_StreamSafeCdBreak(); } } break; } } m_bisk = BISK_Nil; m_pbRaw = 0; m_pb = 0; m_cbRaw = 0; m_cb = 0; m_grfDecomp = 0; m_cbSpillOver = 0; } void CBinaryInputStream::DecrementCdReadLimit(int cb) { m_fd -= cb; } INCLUDE_ASM("asm/nonmatchings/P2/bis", PumpCd__18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/bis", PumpHost__18CBinaryInputStream); void CBinaryInputStream::Pump() { switch (m_bisk) { case BISK_Host: PumpHost(); break; case BISK_Cd: PumpCd(); break; default: break; } // TODO: This code matches perfectly, but it could look much better. int iVar1 = m_cbRemaining - STRUCT_OFFSET(this, 0x24, int); int zero = 0; int remain = (iVar1 > zero) ? iVar1 : 0; m_cbRemaining = remain; if (m_pprog) { m_pprog->SetRemain(remain); } } INCLUDE_ASM("asm/nonmatchings/P2/bis", Decompress__18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/bis", Read__18CBinaryInputStreamiPv); #ifdef SKIP_ASM /** * @brief Reads a certain number of bytes from the stream. * * @param cb Count of bytes to read. * @param pv Pointer to the memory destination. * * @todo 74.27% matched */ void CBinaryInputStream::Read(int cb, void *pv) { uint uVar1; uint cb_00; if ((-1 < m_cb) && (0 < cb)) { for (int i = 0; i < cb; i++) { uVar1 = m_cb; if (uVar1 == 0) { if ((m_grfbis & 4U) == 0) { Decompress(); Pump(); m_cb = m_cbRaw; m_pb = m_pbRaw; m_pbRaw = m_pbRaw + m_cbRaw; m_cbRaw = 0; uVar1 = m_cb; } else { uVar1 = m_cb; } if (uVar1 == 0) { m_cb = -1; return; } } cb_00 = cb; if ((int)uVar1 <= cb) { cb_00 = uVar1; } if (pv != NULL) { byte* pb = reinterpret_cast(pv); CopyAb(pb, m_pb, cb_00); pv = reinterpret_cast(pb + cb_00); } m_pb = m_pb + cb_00; m_cb = m_cb - cb_00; } } } #endif void CBinaryInputStream::Align(int n) { int pbAligned = ((int)m_pb + (n - 1)) & -n; m_cb -= (pbAligned - (int)m_pb); m_pb = (byte *)pbAligned; } uchar CBinaryInputStream::U8Read() { if (m_cb >= 1) { uchar b = *m_pb; m_pb++; m_cb--; return b; } uchar b; Read(sizeof(uchar), &b); return b; } ushort CBinaryInputStream::U16Read() { if (m_cb >= 2) { ushort u = m_pb[0]; ushort v = m_pb[1]; m_pb += 2; m_cb -= 2; return (v << 8) | u; } ushort v; Read(sizeof(ushort), &v); return v; } uint CBinaryInputStream::U32Read() { if (m_cb >= 4) { uint u = m_pb[0]; uint v = m_pb[1]; uint w = m_pb[2]; uint x = m_pb[3]; m_pb += 4; m_cb -= 4; return u + (v * 0x100) + (w * 0x10000) + (x * 0x1000000); } uint v; Read(sizeof(uint), &v); return v; } JUNK_NOP(); JUNK_ADDIU(20); char CBinaryInputStream::S8Read() { if (m_cb >= 1) { char b = *m_pb; m_pb += 1; m_cb -= 1; return b; } char b; Read(sizeof(char), &b); return b; } short CBinaryInputStream::S16Read() { if (m_cb >= 2) { short v = m_pb[1] << 8; v |= m_pb[0]; m_pb += 2; m_cb -= 2; return v; } short v; Read(sizeof(short), &v); return v; } int CBinaryInputStream::S32Read() { if (m_cb >= 4) { int u = m_pb[0]; int v = m_pb[1]; int w = m_pb[2]; char x = m_pb[3]; m_pb += 4; m_cb -= 4; return u + (v << 8) + (w << 16) + (x << 24); } int v; Read(sizeof(int), &v); return v; } JUNK_NOP(); JUNK_ADDIU(20); float CBinaryInputStream::F32Read() { if (m_cb >= 4) { int g = (m_pb[0] + (m_pb[1] << 8) + (m_pb[2] << 16) + (m_pb[3] << 24)); m_pb += 4; m_cb -= 4; return *(float *)&g; } float g; Read(sizeof(float), &g); return g; } void CBinaryInputStream::ReadVector(VECTOR *pvec) { Read(sizeof(VECTOR), pvec); } void CBinaryInputStream::ReadVector4(VECTOR4 *pvec) { Read(sizeof(VECTOR4), pvec); } void CBinaryInputStream::ReadMatrix(MATRIX3 *pmat) { int size = sizeof(pmat->mat[0]); Read(size, &pmat->mat[0]); Read(size, &pmat->mat[1][1]); Read(size, &pmat->mat[2][2]); } void CBinaryInputStream::ReadMatrix4(MATRIX4 *pmat) { // TODO: This might be possible to clean up, but I wasn't able to. // The compiler seems to insist that must we have pointer to each row. -545u float *row0 = &pmat->mat[0][0]; float *row1 = &pmat->mat[1][0]; float *row2 = &pmat->mat[2][0]; float *row3 = &pmat->mat[3][0]; const int cbRow = sizeof(float) * 3; Read(cbRow, row0); Read(cbRow, row1); Read(cbRow, row2); Read(cbRow, row3); row0[3] = 0.0f; row1[3] = 0.0f; row2[3] = 0.0f; row3[3] = 1.0f; } INCLUDE_ASM("asm/nonmatchings/P2/bis", ReadGeom__18CBinaryInputStreamP4GEOM); INCLUDE_ASM("asm/nonmatchings/P2/bis", ReadBspc__18CBinaryInputStreamP4GEOMP4BSPC); void CBinaryInputStream::ReadVbsp(int *pcvbsp, VBSP **pavbsp) { *pcvbsp = U16Read(); *pavbsp = (VBSP *)PvAllocSwClearImpl(*pcvbsp * sizeof(VBSP)); for (int i = 0; i < *pcvbsp; i++) { VBSP *pvbsp = *pavbsp + i; ReadVector(&pvbsp->normal); pvbsp->gDot = F32Read(); uint negIndex = U32Read(); if (negIndex & 0x80000000) { pvbsp->pvbspNeg = (VBSP *)negIndex; } else { pvbsp->pvbspNeg = *pavbsp + negIndex; } uint posIndex = U32Read(); if (posIndex & 0x80000000) { pvbsp->pvbspPos = (VBSP *)posIndex; } else { pvbsp->pvbspPos = *pavbsp + posIndex; } } } void CBinaryInputStream::ReadStringSw(char **pachz) { ushort length = U16Read(); char *buffer = (char *)PvAllocSwImpl((int)length + 1); Read((int)length, buffer); buffer[length] = 0; *pachz = buffer; } JUNK_NOP(); JUNK_ADDIU(50); void CBinaryInputStream::Unknown1() { ushort size = U16Read(); Read(size, NULL); } void CBinaryInputStream::Unknown2(void **ppv) { uint data[8]; Read(0x20, &data); if (data[1] != data[7]) { *ppv = PvAllocSwCopyImpl(0x20, data); return; } *ppv = NULL; } ================================================ FILE: src/P2/blend.c ================================================ #include #include // 96% Match INCLUDE_ASM("asm/nonmatchings/P2/blend", VerifyAeaEquivalence__FiP2EAiT1); #ifdef SKIP_ASM void VerifyAeaEquivalence(int cea0, EA *aea0, int cea1, EA *aea1) { int fLess = (cea0 < cea1); int ceaMin = cea0; if (cea0 >= cea1) { ceaMin = cea1; } int i; if (0 < ceaMin) { if (fLess) { i = cea0; } else { i = cea1; } do { i--; } while (i != 0); } } #endif INCLUDE_ASM("asm/nonmatchings/P2/blend", EnsureAsegBlendDynamic__FP3ALOiiPviPiT5PP6ASEGBL); INCLUDE_ASM("asm/nonmatchings/P2/blend", FillBlAmrsg__FiiPviiP3OID); INCLUDE_ASM("asm/nonmatchings/P2/blend", CalculateBlendAmrsg__FiiPviiP4MRSGPf); INCLUDE_ASM("asm/nonmatchings/P2/blend", ImrsgLookUp__FffiP4MRSGPf); JUNK_ADDIU(90); INCLUDE_ASM("asm/nonmatchings/P2/blend", ReblendAsegbl__FP6ASEGBLiiPv); void SetAsegblSlerp(ASEGBL *pasegbl, ALO *palo) { CHN *pchn = PchnFindAseg(pasegbl, palo); if (!pchn) return; if (!STRUCT_OFFSET(pchn, 0x8, void *)) return; STRUCT_OFFSET(STRUCT_OFFSET(pchn, 0x8, void *), 0x18, int) = 1; } ================================================ FILE: src/P2/blip.c ================================================ #include extern QW *g_aqwBlipeGifsNormal; extern QW *g_aqwBlipeGifsClampedAdd; INCLUDE_ASM("asm/nonmatchings/P2/blip", BuildBlipAqwGifs__FiPP2QW); void StartupBlips() { BuildBlipAqwGifs(1, &g_aqwBlipeGifsNormal); BuildBlipAqwGifs(2, &g_aqwBlipeGifsClampedAdd); } INCLUDE_ASM("asm/nonmatchings/P2/blip", PblipNew__FP5BLIPG); INCLUDE_ASM("asm/nonmatchings/P2/blip", RemoveBlip__FP4BLIP); INCLUDE_ASM("asm/nonmatchings/P2/blip", PblipgNew__FP2SW); INCLUDE_ASM("asm/nonmatchings/P2/blip", InitBlipg__FP5BLIPG); INCLUDE_ASM("asm/nonmatchings/P2/blip", OnBlipgAdd__FP5BLIPG); INCLUDE_ASM("asm/nonmatchings/P2/blip", OnBlipgRemove__FP5BLIPG); INCLUDE_ASM("asm/nonmatchings/P2/blip", SetBlipgShader__FP5BLIPG3OID); INCLUDE_ASM("asm/nonmatchings/P2/blip", PropagateBlipgShader__FP5BLIPG); INCLUDE_ASM("asm/nonmatchings/P2/blip", SetBlipgEmitb__FP5BLIPGP5EMITB); INCLUDE_ASM("asm/nonmatchings/P2/blip", UpdateBlipg__FP5BLIPGf); INCLUDE_ASM("asm/nonmatchings/P2/blip", SubscribeBlipgObject__FP5BLIPGP2LO); INCLUDE_ASM("asm/nonmatchings/P2/blip", CblipeProjectBlipTransformAccel__FP7MATRIX4G8VU_FLOATP5BLIPPP5BLIPVP5BLIPXi6BLIPOKP6VECTORT7); INCLUDE_ASM("asm/nonmatchings/P2/blip", ProjectBlipgTransformAccel__FP5BLIPGf); INCLUDE_ASM("asm/nonmatchings/P2/blip", ProjectBlipgTransform__FP5BLIPGfi); INCLUDE_ASM("asm/nonmatchings/P2/blip", RenderBlipgSelf__FP5BLIPGP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/blip", DrawBlipg__FP3RPL); INCLUDE_ASM("asm/nonmatchings/P2/blip", PropagateBlipgShaders__Fi); ================================================ FILE: src/P2/bomb.c ================================================ #include #include #include INCLUDE_ASM("asm/nonmatchings/P2/bomb", InitBomb__FP4BOMB); void LoadBombFromBrx(BOMB *pbomb, CBinaryInputStream *pbis) { LoadSoFromBrx(pbomb, pbis); // pbomb->pexpl InferExpl(&STRUCT_OFFSET(pbomb, 0x5bc, EXPL *), pbomb); } void CloneBomb(BOMB *pbomb, BOMB *pbombBase) { CloneSo(pbomb, pbombBase); // pbombBase->psfxDet if (STRUCT_OFFSET(pbombBase, 0x680, SFX *)) { // pbomb->psfxDet & pbombBase->psfxDet STRUCT_OFFSET(pbomb, 0x680, SFX *) = (SFX *)PvAllocSwCopyImpl(0x24, STRUCT_OFFSET(pbombBase, 0x680, SFX *)); } } INCLUDE_ASM("asm/nonmatchings/P2/bomb", PostBombLoad__FP4BOMB); INCLUDE_ASM("asm/nonmatchings/P2/bomb", HandleBombMessage__FP4BOMB5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/bomb", UpdateBomb__FP4BOMBf); INCLUDE_ASM("asm/nonmatchings/P2/bomb", FUN_0013b828); INCLUDE_ASM("asm/nonmatchings/P2/bomb", FUN_0013b9d8); INCLUDE_ASM("asm/nonmatchings/P2/bomb", FUN_0013ba70); INCLUDE_ASM("asm/nonmatchings/P2/bomb", FAbsorbBombWkr__FP4BOMBP3WKR); INCLUDE_ASM("asm/nonmatchings/P2/bomb", FUN_0013bc80); void PrimeBomb(BOMB *pbomb, float dt) { // pbomb->tDetonate STRUCT_OFFSET(pbomb, 0x554, float) = g_clock.t + dt; } INCLUDE_ASM("asm/nonmatchings/P2/bomb", ApplyBombThrow__FP4BOMBP2PO); INCLUDE_ASM("asm/nonmatchings/P2/bomb", DetonateBomb__FP4BOMB); INCLUDE_ASM("asm/nonmatchings/P2/bomb", PsfxEnsureBomb__FP4BOMB4ENSK); ================================================ FILE: src/P2/bq.c ================================================ #include void CByteQueue::Init(int cb, void *pv) { m_cb = cb; m_ab = (byte *)pv; Reset(); } void CByteQueue::Reset() { m_cbFree = m_cb; m_cbDrain = 0; m_cbAlloc = 0; m_ibAlloc = 0; m_ibFree = 0; m_cbTotal = 0; } INCLUDE_ASM("asm/nonmatchings/P2/bq", CbFill__10CByteQueueiP11CQueueInput); INCLUDE_ASM("asm/nonmatchings/P2/bq", CbDrain__10CByteQueueiP12CQueueOutput); INCLUDE_ASM("asm/nonmatchings/P2/bq", CbFill__10CByteQueueiPUc); void CByteQueue::FreeDrain(int cb) { if (cb == 0) { cb = m_cbDrain; if (cb == 0) { return; } } m_cbFree += cb; m_cbDrain -= cb; } INCLUDE_ASM("asm/nonmatchings/P2/bq", CbRead__17CQueueInputMemoryiPv); INCLUDE_ASM("asm/nonmatchings/P2/bq", CbRead__15CQueueInputFileiPv); JUNK_WORD(0xAC80000C); ================================================ FILE: src/P2/break.c ================================================ #include #include INCLUDE_ASM("asm/nonmatchings/P2/break", InitBrk__FP3BRK); INCLUDE_ASM("asm/nonmatchings/P2/break", LoadBrkFromBrx__FP3BRKP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/break", CloneBrk__FP3BRKT0); void PostBrkLoad(BRK *pbrk) { PostAloLoad((ALO *)pbrk); PostSwCallback(pbrk->psw, PostBrkLoadCallbackHookup, pbrk, MSGID_callback, NULL); } INCLUDE_ASM("asm/nonmatchings/P2/break", PostBrkLoadCallbackHookup__FP3BRK5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/break", UpdateBrk__FP3BRKf); INCLUDE_ASM("asm/nonmatchings/P2/break", FAbsorbBrkWkr__FP3BRKP3WKR); INCLUDE_ASM("asm/nonmatchings/P2/break", BreakBrk__FP3BRK); void SetBrkBroken(BRK *pbrk, int fBroken) { STRUCT_OFFSET(pbrk, 0x680, int) = fBroken; // pbrk->fBroken if (fBroken) { SetChkmgrIchk(&g_chkmgr, STRUCT_OFFSET(pbrk, 0x688, int)); // pbrk->ichkBroken } else { ClearChkmgrIchk(&g_chkmgr, STRUCT_OFFSET(pbrk, 0x688, int)); // pbrk->ichkBroken } } void SetBrkExclude(BRK *pbrk, OID oid) { if (STRUCT_OFFSET(pbrk, 0x550, uint) >= 0x10) return; (&STRUCT_OFFSET(pbrk, 0x554, BRP))[STRUCT_OFFSET(pbrk, 0x550, uint)].oid = oid; (&STRUCT_OFFSET(pbrk, 0x554, BRP))[STRUCT_OFFSET(pbrk, 0x550, uint)].brpt = BRPT_Disappear; STRUCT_OFFSET(pbrk, 0x550, uint)++; } void SetBrkRemain(BRK *pbrk, OID oid) { if (STRUCT_OFFSET(pbrk, 0x550, uint) >= 0x10) return; (&STRUCT_OFFSET(pbrk, 0x554, BRP))[STRUCT_OFFSET(pbrk, 0x550, uint)].oid = oid; (&STRUCT_OFFSET(pbrk, 0x554, BRP))[STRUCT_OFFSET(pbrk, 0x550, uint)].brpt = BRPT_Remain; STRUCT_OFFSET(pbrk, 0x550, uint)++; } void SetBrkFixed(BRK *pbrk, OID oid) { if (STRUCT_OFFSET(pbrk, 0x550, uint) >= 0x10) return; (&STRUCT_OFFSET(pbrk, 0x554, BRP))[STRUCT_OFFSET(pbrk, 0x550, uint)].oid = oid; (&STRUCT_OFFSET(pbrk, 0x554, BRP))[STRUCT_OFFSET(pbrk, 0x550, uint)].brpt = BRPT_Fixed; STRUCT_OFFSET(pbrk, 0x550, uint)++; } void SetBrkRemainFixed(BRK *pbrk, OID oid) { if (STRUCT_OFFSET(pbrk, 0x550, uint) >= 0x10) return; (&STRUCT_OFFSET(pbrk, 0x554, BRP))[STRUCT_OFFSET(pbrk, 0x550, uint)].oid = oid; (&STRUCT_OFFSET(pbrk, 0x554, BRP))[STRUCT_OFFSET(pbrk, 0x550, uint)].brpt = BRPT_RemainFixed; STRUCT_OFFSET(pbrk, 0x550, uint)++; } INCLUDE_ASM("asm/nonmatchings/P2/break", SetBrkOnPlayer__FP3BRKi); void GetBrkOnPlayer(BRK *pbrk, int *pfBreakOnPlayer) { // pbrk->grfbrk *pfBreakOnPlayer = STRUCT_OFFSET(pbrk, 0x63c, int) & 1; } INCLUDE_ASM("asm/nonmatchings/P2/break", SetBrkOnBomb__FP3BRKi); void GetBrkOnBomb(BRK *pbrk, int *pfBreakOnBomb) { // pbrk->grfbrk *pfBreakOnBomb = (STRUCT_OFFSET(pbrk, 0x63c, int) >> 2) & 1; } INCLUDE_ASM("asm/nonmatchings/P2/break", AddBrkTouchObject__FP3BRK3OID); INCLUDE_ASM("asm/nonmatchings/P2/break", AddBrkTouchClass__FP3BRK3CID); INCLUDE_ASM("asm/nonmatchings/P2/break", FUN_0013DAB8); SFX *PsfxEnsureBrk(BRK *pbrk, ENSK ensk) { // pbrk->psfxBreak if (!STRUCT_OFFSET(pbrk, 0x6b4, SFX *)) { NewSfx(&STRUCT_OFFSET(pbrk, 0x6b4, SFX *)); } return STRUCT_OFFSET(pbrk, 0x6b4, SFX *); } INCLUDE_ASM("asm/nonmatchings/P2/break", FCheckBrkTouchObject__FP3BRKP2SO); INCLUDE_ASM("asm/nonmatchings/P2/break", UpdateBrkp__FP4BRKPf); INCLUDE_ASM("asm/nonmatchings/P2/break", HandleBrkpMessage__FP4BRKP5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/break", FIgnoreBrkpIntersection__FP4BRKPP2SO); INCLUDE_ASM("asm/nonmatchings/P2/break", SetBrkpBrkps__FP4BRKP5BRKPS); void InitBreak(BREAK *pbreak) { InitBrk(pbreak); STRUCT_OFFSET(pbreak, 0x63c, int) = 5; STRUCT_OFFSET(pbreak, 0x698, int) = -1; } INCLUDE_ASM("asm/nonmatchings/P2/break", InitFragile__FP7FRAGILE); INCLUDE_ASM("asm/nonmatchings/P2/break", AdjustFragileNewXp__FP7FRAGILEP2XPi); INCLUDE_ASM("asm/nonmatchings/P2/break", AdjustZapbreakNewXp__FP8ZAPBREAKP2XPi); INCLUDE_ASM("asm/nonmatchings/P2/break", UpdateZapbreak__FP8ZAPBREAKf); ================================================ FILE: src/P2/brx.c ================================================ #include #include extern EOPID g_aeopid[]; void StartupBrx() { BuildEopids(); } INCLUDE_ASM("asm/nonmatchings/P2/brx", PloNew__F3CIDP2SWP3ALO3OIDi); #ifdef SKIP_ASM /** * @todo 2.19% matched. */ LO *PloNew(CID cid, SW *psw, ALO *paloParent, OID oid, int isplice) { return psw; } #endif INCLUDE_ASM("asm/nonmatchings/P2/brx", LoadOptionFromBrx__FPvP5EOPIDP18CBinaryInputStream); void LoadOptionsFromBrx(void *pvStruct, CBinaryInputStream *pbis) { while (true) { short eopid = pbis->S16Read(); if (eopid < 0) { break; } LoadOptionFromBrx(pvStruct, &g_aeopid[eopid], pbis); } } uint IploFromStockOid(int oid) { int iplo; // Ensure oid is a stock object (OID between 12 and 42) if (oid >= 12 && oid <= 42) { iplo = oid - 12; } else { iplo = -1; } return iplo; } INCLUDE_ASM("asm/nonmatchings/P2/brx", LoadSwObjectsFromBrx__FP2SWP3ALOP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/brx", SetLoDefaults__FP2LO); ================================================ FILE: src/P2/bsp.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/bsp", ClsgClipEdgeToBsp__FP3BSPP6VECTORT1PiiP3LSG); INCLUDE_ASM("asm/nonmatchings/P2/bsp", PruneBsp__FP3BSPP6VECTORfPP3BSP); INCLUDE_ASM("asm/nonmatchings/P2/bsp", PbspPointInBspQuick__FP6VECTORP3BSP); INCLUDE_ASM("asm/nonmatchings/P2/bsp", CloneBspc__FP4GEOMP4BSPCT0T1); ================================================ FILE: src/P2/button.c ================================================ #include #include INCLUDE_ASM("asm/nonmatchings/P2/button", PostAshLoad__FP2SWP3ASHP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/button", FFoundAshAseg__FP3ASHP4ASEG); INCLUDE_ASM("asm/nonmatchings/P2/button", FAddAshAseg__FP3ASHP4ASEG); INCLUDE_ASM("asm/nonmatchings/P2/button", FAddAshOid__FP3ASH3OID); void InitBtn(BTN *pbtn) { STRUCT_OFFSET(pbtn, 0x120, int) = IchkAllocChkmgr(&g_chkmgr); // pbtn->ichkPushed STRUCT_OFFSET(pbtn, 0x140, OID) = OID_Nil; // pbtn->oidDialog } INCLUDE_ASM("asm/nonmatchings/P2/button", LoadBtn__FP3BTNP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/button", PostBtnLoad__FP3BTN); INCLUDE_ASM("asm/nonmatchings/P2/button", RestoreBtnFromCheckpointCallback__FP3BTN5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/button", SetBtnRsmg__FP3BTNi3OIDN22); INCLUDE_ASM("asm/nonmatchings/P2/button", SetBtnButtons__FP3BTN7BUTTONS); INCLUDE_ASM("asm/nonmatchings/P2/button", FAddRsmg__FP4RSMGiPii3OIDN24); INCLUDE_ASM("asm/nonmatchings/P2/button", TriggerRsmg__FP2SWiP4RSMGP2LOi); INCLUDE_ASM("asm/nonmatchings/P2/button", RunBtnAsegs__FP3BTN4IASHii); void TriggerBtn(BTN *pbtn, int fSeekToEnd, int fChkTrigger) { if (fChkTrigger) HandleLoSpliceEvent(pbtn->paloOwner, 0x16, 0, NULL); else HandleLoSpliceEvent(pbtn->paloOwner, 2, 0, NULL); if (!STRUCT_OFFSET(pbtn, 0x134, int) && !fChkTrigger) // pbtn->fSilent { float sStart = 3000.0f; float sFull = 300.0f; float uVolAtSource = 1.0f; StartSound(SFXID_Click1, NULL, pbtn->paloOwner, NULL, sStart, sFull, uVolAtSource, 0.0f, 0.0f, NULL, NULL); } RunBtnAsegs(pbtn, IASH_On, fSeekToEnd, fChkTrigger); if (!STRUCT_OFFSET(pbtn, 0x13C, int)) // pbtn->fManualReset SetBtnButtons(pbtn, BUTTONS_Pushed); if (STRUCT_OFFSET(pbtn, 0x11C, int)) // pbtn->fCheckpointed SetChkmgrIchk(&g_chkmgr, STRUCT_OFFSET(pbtn, 0x120, int)); // pbtn->ichkPushed pbtn->paloOwner->pvtlo->pfnSendLoMessage(pbtn->paloOwner, MSGID_button_trigger, pbtn); } void UntriggerBtn(BTN *pbtn, int fSeekToEnd) { HandleLoSpliceEvent(pbtn->paloOwner, 3, 0, NULL); // untrigger event RunBtnAsegs(pbtn, IASH_Off, fSeekToEnd, 0); pbtn->paloOwner->pvtlo->pfnSendLoMessage(pbtn->paloOwner, MSGID_button_untrigger, pbtn); } void InitButton(BUTTON *pbutton) { InitSo(pbutton); InitBtn(&STRUCT_OFFSET(pbutton, 0x554, BTN)); // pbutton->btn } void LoadButtonFromBrx(BUTTON *pbutton, CBinaryInputStream *pbis) { LoadSoFromBrx(pbutton, pbis); LoadBtn(&STRUCT_OFFSET(pbutton, 0x554, BTN), pbutton); // pbutton->btn } INCLUDE_ASM("asm/nonmatchings/P2/button", InsertButtonPos__FP6BUTTONP3PNTP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/button", InsertButtonMat__FP6BUTTONP3XFMP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/button", PostButtonLoad__FP6BUTTON); INCLUDE_ASM("asm/nonmatchings/P2/button", CloneButton__FP6BUTTONT0); INCLUDE_ASM("asm/nonmatchings/P2/button", SetButtonButtons__FP6BUTTON7BUTTONS); INCLUDE_ASM("asm/nonmatchings/P2/button", FCheckButtonObject__FP6BUTTONP2SO); INCLUDE_ASM("asm/nonmatchings/P2/button", IposFindButtonClosest__FP6BUTTONPf); INCLUDE_ASM("asm/nonmatchings/P2/button", ImatFindButtonClosest__FP6BUTTONPf); INCLUDE_ASM("asm/nonmatchings/P2/button", PresetButtonAccel__FP6BUTTONf); INCLUDE_ASM("asm/nonmatchings/P2/button", UpdateButtonInternalXps__FP6BUTTON); INCLUDE_ASM("asm/nonmatchings/P2/button", UpdateButton__FP6BUTTONf); INCLUDE_ASM("asm/nonmatchings/P2/button", FAbsorbButtonWkr__FP6BUTTONP3WKR); INCLUDE_ASM("asm/nonmatchings/P2/button", InitVolbtn__FP6VOLBTN); INCLUDE_ASM("asm/nonmatchings/P2/button", LoadVolbtnFromBrx__FP6VOLBTNP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/button", PostVolbtnLoad__FP6VOLBTN); INCLUDE_ASM("asm/nonmatchings/P2/button", CloneVolbtn__FP6VOLBTNT0); INCLUDE_ASM("asm/nonmatchings/P2/button", SetVolbtnButtons__FP6VOLBTN7BUTTONS); INCLUDE_ASM("asm/nonmatchings/P2/button", UpdateVolbtn__FP6VOLBTNf); INCLUDE_ASM("asm/nonmatchings/P2/button", FGetVolbtnPushObjectsWithinList__FP6VOLBTNPv); INCLUDE_ASM("asm/nonmatchings/P2/button", AddBtnAseg__FP3BTNP3ALO3OID); INCLUDE_ASM("asm/nonmatchings/P2/button", AddButtonAseg__FP6BUTTON3OID); INCLUDE_ASM("asm/nonmatchings/P2/button", AddVolbtnAseg__FP6VOLBTN3OID); INCLUDE_ASM("asm/nonmatchings/P2/button", AddBtnOffAseg__FP3BTNP3ALO3OID); INCLUDE_ASM("asm/nonmatchings/P2/button", AddButtonOffAseg__FP6BUTTON3OID); INCLUDE_ASM("asm/nonmatchings/P2/button", AddVolbtnOffAseg__FP6VOLBTN3OID); INCLUDE_ASM("asm/nonmatchings/P2/button", AddButtonPushObject__FP6BUTTON3OID); INCLUDE_ASM("asm/nonmatchings/P2/button", AddButtonNoPushObject__FP6BUTTON3OID); INCLUDE_ASM("asm/nonmatchings/P2/button", AddButtonPushClass__FP6BUTTON3CID); INCLUDE_ASM("asm/nonmatchings/P2/button", AddButtonNoPushClass__FP6BUTTON3CID); void AddVolbtnPushObject(VOLBTN *pvolbtn, OID oid) { int coidPush = STRUCT_OFFSET(pvolbtn, 0x550, int); // pvolbtn->coidPush STRUCT_OFFSET_INDEX(pvolbtn, 0x554, OID, coidPush) = oid; // pvolbtn->aoidPush[coidPush] STRUCT_OFFSET(pvolbtn, 0x550, int) = coidPush + 1; // pvolbtn->coidPush } void SetButtonRsmg(BUTTON *pbutton, int fOnTrigger, OID oidRoot, OID oidSM, OID oidGoal) { SetBtnRsmg(&STRUCT_OFFSET(pbutton, 0x554, BTN), fOnTrigger, oidRoot, oidSM, oidGoal); // pbutton->btn } void SetVolbtnRsmg(VOLBTN *pvolbtn, int fOnTrigger, OID oidRoot, OID oidSM, OID oidGoal) { SetBtnRsmg(&STRUCT_OFFSET(pvolbtn, 0x5c0, BTN), fOnTrigger, oidRoot, oidSM, oidGoal); // pvolbtn->btn } ================================================ FILE: src/P2/cat.c ================================================ #include #include extern CDS g_cds; void StartupCatalog() { g_cds = CDS_Ready; } int FUN_001407A0(uint *pui) { return pui[1]; } ================================================ FILE: src/P2/cd.c ================================================ #include #include <989snd.h> #include extern int g_scecd; extern int s_retCdRead; extern int s_retCdError; extern sceCdRMode s_cdmode; INCLUDE_ASM("asm/nonmatchings/P2/cd", CpchzTokenizePath__FPc); bool FValidCdMmode() { // TODO: This is the only way I managed to get the code to match. // This might be possible to clean up, but I wasn't able to. - 545u int type = sceCdGetDiskType(); if (g_scecd == type) { type = g_scecd; } else { g_scecd = type; } return g_scecd == SCECdPS2DVD; } void SetCdMmode() { if (g_scecd == SCECdPS2DVD) { sceCdMmode(2); } } void StartupCd() { return; } INCLUDE_ASM("asm/nonmatchings/P2/cd", UpdateCd__Fv); INCLUDE_ASM("asm/nonmatchings/P2/cd", CdPath__FPcT0i); void ReadCd(uint isector, uint csector, void *pv) { do { s_retCdRead = snd_StreamSafeCdRead(isector, csector, pv, &s_cdmode); if (s_retCdRead == 1) { break; } snd_StreamSafeCdSync(0); s_retCdError = snd_StreamSafeCdGetError(); } while (true); } void ReadCdDirect(uint isector, uint csector, void *pv) { do { s_retCdRead = sceCdRead(isector, csector, pv, &s_cdmode); if (s_retCdRead == 1) { break; } sceCdSync(0); s_retCdError = sceCdGetError(); } while (true); } bool FCdCompleted(int fBlock) { return !snd_StreamSafeCdSync(!fBlock); } JUNK_ADDIU(10); ================================================ FILE: src/P2/chkpnt.c ================================================ #include #include INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", ResetChkmgrCheckpoints__FP6CHKMGR); #ifdef SKIP_ASM /** * @brief Resets the checkpoints on the checkpoint manager. * * @param pchkmgr Pointer to the checkpoint manager. * * @todo 67.19% matched. */ void ResetChkmgrCheckpoints(CHKMGR *pchkmgr) { pchkmgr->cbitChk = 0; pchkmgr->unk_0x8 = 0; memset(STRUCT_OFFSET(pchkmgr, 0xc, void *), 0, 0x200); pchkmgr->fChkDirty = 0; float temp_should_be_global_var = 0.0f; pchkmgr->posVolChkpnt.x = temp_should_be_global_var; pchkmgr->posVolChkpnt.z = temp_should_be_global_var; pchkmgr->posVolChkpnt.x = temp_should_be_global_var; pchkmgr->posVolChkpnt.x = (float)((int)temp_should_be_global_var >> 0x1f); memset(pchkmgr->csSaved, 0, 0x20c); pchkmgr->fCheckpoint = 0; pchkmgr->unk_oid_0x424 = (OID)0xFFFFFFFF; pchkmgr->unk_oid_0x428 = (OID)0xFFFFFFFF; } #endif INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", SaveChkmgrCheckpoint__FP6CHKMGR3OIDT1); INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", ReturnChkmgrToCheckpoint__FP6CHKMGR); INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", RestoreChkmgrFromCheckpoint__FP6CHKMGR); int IchkAllocChkmgr(CHKMGR *pchkmgr) { return ++pchkmgr->cbitChk; } INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", FGetChkmgrIchk__FP6CHKMGRi); INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", SetChkmgrIchk__FP6CHKMGRi); INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", ClearChkmgrIchk__FP6CHKMGRi); INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", LoadVolFromBrx__FP3VOLP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", FCheckVolPoint__FP3VOLP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", InitChkpnt__FP6CHKPNT); INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", LoadChkpntFromBrx__FP6CHKPNTP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", BindChkpnt__FP6CHKPNT); INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", PostChkpntLoad__FP6CHKPNT); INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", CloneChkpnt__FP6CHKPNTT0); INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", UpdateChkpnt__FP6CHKPNTf); INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", FUN_001417f0); INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", TriggerChkpnt__FP6CHKPNT); INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", FUN_001419A0); INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", FUN_001419C0); INCLUDE_ASM("asm/nonmatchings/P2/chkpnt", FUN_001419E0); ================================================ FILE: src/P2/clip.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/clip", PsoHitTestLineObjects__FiP6VECTORT1iPP2SOP3LSG); INCLUDE_ASM("asm/nonmatchings/P2/clip", FUN_00141b48); INCLUDE_ASM("asm/nonmatchings/P2/clip", ClsgClipEdgeToObject__FP2SOP6VECTORT1iP3LSG); INCLUDE_ASM("asm/nonmatchings/P2/clip", ClsgClipEdgeToObjectPruned__FP2SOP3BSPP6VECTORT2iP3LSG); INCLUDE_ASM("asm/nonmatchings/P2/clip", ClsgClipCylinderToObject__FP2SOP6VECTORT1fiP3LSG); INCLUDE_ASM("asm/nonmatchings/P2/clip", ClsgClipLineToSphere__FP6VECTORfT0T0iP3LSG); INCLUDE_ASM("asm/nonmatchings/P2/clip", ClsgClipEdgeToSphere__FP6VECTORfT0T0iP3LSG); INCLUDE_ASM("asm/nonmatchings/P2/clip", ClsgClipCylinderToSphere__FP6VECTORfT0T0fiP3LSG); INCLUDE_ASM("asm/nonmatchings/P2/clip", ClsgClipEdgeToCylinder__FP6VECTORT0fT0T0iP3LSG); JUNK_WORD(0x27BD01C0); INCLUDE_ASM("asm/nonmatchings/P2/clip", SgnCompareMaa__FP3MAAT0); INCLUDE_ASM("asm/nonmatchings/P2/clip", ClsgMergeAlsg__FiP3LSG); INCLUDE_ASM("asm/nonmatchings/P2/clip", ClsgClipCylinderToBsp__FP4BSPCP4GEOMP6VECTORT2fiP3LSG); JUNK_WORD(0x27BD0120); ================================================ FILE: src/P2/clock.c ================================================ #include #include // constants static const int CLOCK_FRAMERATE = 60; // 60 FPS static const float CLOCK_FRAMETIME = 1.f / CLOCK_FRAMERATE; // 1/60th of a second static const int CLOCK_EE_TICK_RATE = 294912000; // 294.912 MHz static const float CLOCK_EE_TICK_DURATION = 1.f / CLOCK_EE_TICK_RATE; // 1/294.912 MHz // data float g_rtClock = 1.0f; float g_rtClockPowerUp = 1.0f; CLOCK g_clock = { 0, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0 }; TICK s_tickLastRaw; // Should be static? void SetClockRate(float rt) { g_rtClock = rt; SetClockEnabled(&g_clock, rt > 0.0f); } void MarkClockTick(CLOCK *pclock) { const TICK currentTick = TickNow(); const TICK deltaTick = currentTick - pclock->tickFrame; float dt = deltaTick * CLOCK_EE_TICK_DURATION; // Clamp delta time between one and two frames float dtMin = CLOCK_FRAMETIME; float dtMax = CLOCK_FRAMETIME * 2; if (dt < dtMin) { dt = dtMin; } else if (dt > dtMax) { dt = dtMax; } // Store unscaled real delta time pclock->dtReal = dt; float dtScaled = pclock->fEnabled ? dt : 0.0f; dtScaled *= g_rtClockPowerUp * g_rtClock; // If scaled delta time is at least one frame, store the scaled value if (dtScaled >= CLOCK_FRAMETIME) { pclock->dtReal = dtScaled; } // Update clock state pclock->t += dtScaled; pclock->dtPrev = pclock->dt; pclock->dt = dtScaled; pclock->tReal += pclock->dtReal; pclock->tickFrame = currentTick; } void MarkClockTickRealOnly(CLOCK *pclock) { const TICK currentTick = TickNow(); const TICK deltaTick = currentTick - pclock->tickFrame; float dt = deltaTick * CLOCK_EE_TICK_DURATION; pclock->dtReal = dt; pclock->tReal += pclock->dtReal; pclock->tickFrame = currentTick; } void ResetClock(CLOCK *pclock, float t) { pclock->t = t; } void SetClockEnabled(CLOCK *pclock, int fEnabled) { pclock->fEnabled = fEnabled; } void StartupClock() { ulong cTick = READ_CP0_COUNT(); s_tickLastRaw = (TICK)cTick; g_clock.tickFrame = TickNow(); } /** * @todo Correct cWrapAround once the bss section of the TU is migrated. */ const TICK TickNow() { // Read 32-bit CP0 Count register ulong cTick = READ_CP0_COUNT(); // Mask count to ensure clean 32-bit value (likely not necessary) ulong ulMask = 0xFFFFFFFF; cTick = cTick & ulMask; // Detect wraparound: if count < previous count, the register overflowed if (cTick < s_tickLastRaw) { cWrapAround++; } // Store current count for next wraparound detection s_tickLastRaw = cTick; // Combine wraparound count (upper 32 bits) with current count (lower 32 bits) return (cWrapAround << 32) | cTick; } ================================================ FILE: src/P2/cm.c ================================================ /** * @todo Mangle all function names in INCLUDE_ASM macros. */ #include #include #include #include // todo fix data and rodata // VECTOR4 g_posEyeDefault = { 0.0f, -2000.0f, 500.0f, 0.0f }; // VECTOR4 g_posCenterDefault = { 0.0f, 0.0f, 0.0f, 0.0f }; // float g_sNearFog = 500.0f; // float g_sFarFog = 20000.0f; // float g_uFogMax = 0.5f; // RGBA g_rgbaFog = { 0, 0, 0, 0 }; // VECTOR4 D_002618B8 = { 0.5f, 0.0f, 0.1f, 10.0f }; // unknown // float DT_CmJoltMax = 0.5f; // float SW_CmJolt = 50.0f; // CLQ s_clqUToUJolt = { 1.0f, -2.0f, 1.0f, 0.0f }; // VECTOR4 s_dposJolt = { 0.0f, 0.0f, 0.0f, 0.0f }; // VECTOR4 s_rotJolt = { 0.05f, 0.0f, 0.0f, 0.0f }; // VECTOR4 s_vecRange = { 0.0f, 0.0f, 0.0f, 0.0f }; // VECTOR4 s_vecOffset = { 0.0f, 0.0f, 0.0f, 0.0f }; // float R_SetCmSpring = 15.0f; // float R_SetCmDamping = -8.0f; // float D_00261928[] = { 1.0f, 5.0f, 10.0f, 12.0f, 15.0f, 12.0f, 10.0f, 5.0f, 1.0f }; // array of 9 floats // float D_0026194C = 250.0f; // float D_00261950 = 1500.0f; // SMP s_smpSquishEye = { 2500.0f, 0.0f, 0.25f }; // SMP unk_padding = { 0.0f, 0.0f, 0.0f }; // needed to align next variables // float D_00261970 = -250.0f; // float D_00261974 = 250.0f; // float D_00261978 = 250.0f; // float D_0026197C = 0.0f; // float D_00261980 = 250.0f; // float D_00261984 = 250.0f; // float D_00261988 = 250.0f; // float D_0026198C = 0.0f; // CM* g_pcm = NULL; void StartupCm() { return; } INCLUDE_ASM("asm/nonmatchings/P2/cm", CalcCmAdjust__FP2CMP2SOP6CPDEFIP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/cm", SpringCm__FfffP2CMP6VECTORP6VECTORP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/cm", AdjustCmCpdefi__FP2CMP2SOfP6CPDEFI); INCLUDE_ASM("asm/nonmatchings/P2/cm", ResetCmAdjust__FP2CMP2SOP6CPDEFI); INCLUDE_ASM("asm/nonmatchings/P2/cm", GetCmCpdefi__FP2CMP2SOfP6CPDEFI); INCLUDE_ASM("asm/nonmatchings/P2/cm", BuildCmFgfn__FP2CMfP4FGFN); INCLUDE_ASM("asm/nonmatchings/P2/cm", RecalcCmFrustrum__FP2CM); INCLUDE_ASM("asm/nonmatchings/P2/cm", InitCm__FP2CM); void SetSwCameraFov(float fov) { SetCmFov(g_pcm, fov); } INCLUDE_ASM("asm/nonmatchings/P2/cm", FUN_001437e8); void SetSwCameraFarClip(float sFarClip) { SetCmFarClip(g_pcm, sFarClip); } INCLUDE_ASM("asm/nonmatchings/P2/cm", FUN_00143838); INCLUDE_ASM("asm/nonmatchings/P2/cm", FUN_00143860); INCLUDE_ASM("asm/nonmatchings/P2/cm", FUN_00143888); void SetSwCameraRgbaFog(SW *psw, RGBA *prgbaFog) { SetCmRgbaFog(g_pcm, prgbaFog); } INCLUDE_ASM("asm/nonmatchings/P2/cm", FUN_001438d8); void SetCmPos(CM *pcm, VECTOR *ppos) { SetCmPosMat(pcm, ppos, NULL); } void SetCmMat(CM *pcm, MATRIX3 *pmat) { SetCmPosMat(pcm, NULL, pmat); } void SetCmFov(CM *pcm, float fov) { STRUCT_OFFSET(pcm, 0x1c4, float) = fov; STRUCT_OFFSET(pcm, 0x1c8, float) = fov; STRUCT_OFFSET(pcm, 0x1cc, int) = 0; RecalcCmFrustrum(pcm); } void SetCmNearClip(CM *pcm, float sNearClip) { pcm->sNearClip = sNearClip; RecalcCmFrustrum(pcm); } void SetCmFarClip(CM *pcm, float sFarClip) { pcm->sFarClip = sFarClip; RecalcCmFrustrum(pcm); } void SetCmSProgress(CM *pcm, float uSProgress) { pcm->uSProgress = uSProgress; RecalcCmFrustrum(pcm); } void FUN_001439c8(CM *pcm, float param_2) { pcm->field35_0x1fc = param_2; RecalcCmFrustrum(pcm); } void FUN_001439e8(CM *pcm, float param_2) { pcm->field36_0x200 = param_2; RecalcCmFrustrum(pcm); } void SetCmRgbaFog(CM *pcm, RGBA *prgbaFog) { STRUCT_OFFSET(pcm, 0x204, RGBA) = *prgbaFog; // pcm->rgbaFog = *prgbaFog; RecalcCmFrustrum(pcm); } void SetCmMrdRatio(CM *pcm, float ratio) { STRUCT_OFFSET(pcm, 0x1c0, float) = ratio; RecalcCmFrustrum(g_pcm); } INCLUDE_ASM("asm/nonmatchings/P2/cm", ResetCm); void ClearCmFadeObjects(CM *pcm) { pcm->field67_0x340 = 0; } INCLUDE_ASM("asm/nonmatchings/P2/cm", AddCmFadeObject); INCLUDE_ASM("asm/nonmatchings/P2/cm", RemoveCmFadeObject); INCLUDE_ASM("asm/nonmatchings/P2/cm", FUN_00143BA8); INCLUDE_ASM("asm/nonmatchings/P2/cm", UpdateCmFade); INCLUDE_ASM("asm/nonmatchings/P2/cm", UpdateCmLast); INCLUDE_ASM("asm/nonmatchings/P2/cm", SetupCmRotateToCam); INCLUDE_ASM("asm/nonmatchings/P2/cm", ConvertCmScreenToWorld); INCLUDE_ASM("asm/nonmatchings/P2/cm", ConvertCmWorldToScreen); INCLUDE_ASM("asm/nonmatchings/P2/cm", SetupCm__FP2CM); INCLUDE_ASM("asm/nonmatchings/P2/cm", CombineEyeLookAtProj); INCLUDE_ASM("asm/nonmatchings/P2/cm", BuildFrustrum); INCLUDE_ASM("asm/nonmatchings/P2/cm", UpdateCmMat4); INCLUDE_ASM("asm/nonmatchings/P2/cm", DrawCm__FP2CM); INCLUDE_ASM("asm/nonmatchings/P2/cm", SetCmPosMat__FP2CMP6VECTORP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/cm", SetCmLookAt); INCLUDE_ASM("asm/nonmatchings/P2/cm", ConvertWorldToCylindVelocity); INCLUDE_ASM("asm/nonmatchings/P2/cm", ConvertCylindToWorldVelocity); INCLUDE_ASM("asm/nonmatchings/P2/cm", ResetCmLookAtSmooth); INCLUDE_ASM("asm/nonmatchings/P2/cm", SetCmLookAtSmooth); INCLUDE_ASM("asm/nonmatchings/P2/cm", AdjustCmJoy__FP2CMP3JOY5JOYIDPf); JUNK_WORD(0x0000102D); INCLUDE_ASM("asm/nonmatchings/P2/cm", SetCmPolicy__FP2CM3CPPP5CPLCYP2SOPv); INCLUDE_ASM("asm/nonmatchings/P2/cm", RevokeCmPolicy__FP2CMi3CPPP5CPLCYP2SOPv); INCLUDE_ASM("asm/nonmatchings/P2/cm", FInsideCmMrd); INCLUDE_ASM("asm/nonmatchings/P2/cm", DecomposeCylind); INCLUDE_ASM("asm/nonmatchings/P2/cm", DecomposeSphere); void SetCmCut(CM *pcm, float *pradCut) { pcm->field41_0x224 = 1; // Likely pcm->fCut if (pradCut) { pcm->field42_0x228 = 1; // Likely pcm->fRadCut pcm->field43_0x22c = pradCut[0]; // Likely pcm->radCut } } void SetResetFlag(CM *pcm) { pcm->reset_flag = true; } void ClearCmCut(CM *pcm) { SetCmCut(pcm, 0); } INCLUDE_ASM("asm/nonmatchings/P2/cm", AdaptCm); INCLUDE_ASM("asm/nonmatchings/P2/cm", SetCm); INCLUDE_ASM("asm/nonmatchings/P2/cm", PsoEnemyStepguard); INCLUDE_ASM("asm/nonmatchings/P2/cm", FUN_00145950); INCLUDE_ASM("asm/nonmatchings/P2/cm", FUN_00145b68); INCLUDE_ASM("asm/nonmatchings/P2/cm", FUN_00145DD8); INCLUDE_ASM("asm/nonmatchings/P2/cm", FUN_00145de8); INCLUDE_ASM("asm/nonmatchings/P2/cm", FUN_00145e68); void PushLookkCm(CM *pcm, LOOKK lookk) { PushCplookLookk(&pcm->cplook, lookk); } LOOKK LookkPopCm(CM *pcm) { return LookkPopCplook(&pcm->cplook); } LOOKK LookkCurCm(CM *pcm) { return LookkCurCplook(&pcm->cplook); } void SetCmSniperFocus(CM *pcm, PNT *ppntAnchor, float sRadiusSniper, float rScreenSniper) { pcm->cplook.ppntAnchor = ppntAnchor; pcm->cplook.sRadiusSniper = sRadiusSniper; pcm->cplook.rScreenSniper = rScreenSniper; } void FUN_00146028(CM *pcm) { pcm->vCenter.z = g_clock.t; } INCLUDE_ASM("asm/nonmatchings/P2/cm", FUN_00146038); INCLUDE_ASM("asm/nonmatchings/P2/cm", cm__static_initialization_and_destruction_0__Fii); void _GLOBAL_$I$StartupCm() { cm__static_initialization_and_destruction_0(1, 0xffff); } ================================================ FILE: src/P2/cnvo.c ================================================ #include #include void InitCnvo(CNVO *pcnvo) { InitSo(pcnvo); STRUCT_OFFSET(pcnvo, 0x550, float) = 100.0f; // pcnvo->svBelt } void LoadCnvoFromBrx(CNVO *pcnvo, CBinaryInputStream *pbis) { LoadSoFromBrx(pcnvo, pbis); STRUCT_OFFSET(pcnvo, 0x554, float) = pbis->F32Read(); // pcnvo->svuAvg STRUCT_OFFSET(pcnvo, 0x558, float) = pbis->F32Read(); // pcnvo->svvAvg } void PostCnvoLoad(CNVO *pcnvo) { PostAloLoad(pcnvo); MatchCnvoScrollerToBeltSpeed(pcnvo); } INCLUDE_ASM("asm/nonmatchings/P2/cnvo", AdjustCnvoXpVelocity__FP4CNVOP2XPi); void SetCnvoBeltSpeed(CNVO *pcnvo, float svBelt) { if (svBelt == STRUCT_OFFSET(pcnvo, 0x550, float)) // pcnvo->svBelt return; STRUCT_OFFSET(pcnvo, 0x550, float) = svBelt; // pcnvo->svBelt InvalidateSwXpForObject(pcnvo->psw, pcnvo, 7); MatchCnvoScrollerToBeltSpeed(pcnvo); ResolveAlo(pcnvo); } INCLUDE_ASM("asm/nonmatchings/P2/cnvo", MatchCnvoScrollerToBeltSpeed__FP4CNVO); ================================================ FILE: src/P2/coin.c ================================================ #include #include #include #include void InitDprize(DPRIZE *pdprize) { pdprize->dprizesInit = DPRIZES_Normal; pdprize->dprizes = DPRIZES_Nil; pdprize->svcAttract = 30.0f; pdprize->oidInitialState = OID_Nil; InitAlo(pdprize); AppendDlEntry(&pdprize->psw->dlDprize, pdprize); pdprize->ichkCollected = IchkAllocChkmgr(&g_chkmgr); pdprize->ficg.grficSmash = '\x10'; pdprize->ficg.grficRush = '\x10'; pdprize->ficg.grficSweep = '\x10'; pdprize->ficg.grficBomb = '\x10'; pdprize->fLastBounce = 1; } void LoadDprizeFromBrx(DPRIZE *pdprize, CBinaryInputStream *pbis) { SetAloTargetHitTest(pdprize, 1); LoadAloFromBrx(pdprize, pbis); SnipAloObjects(pdprize, 5, s_asnipDprize); } void CloneDprize(DPRIZE *pdprize, DPRIZE *pdprizeBase) { int ichkCollected = pdprize->ichkCollected; DLE dle = pdprize->dle; CloneAlo(pdprize, pdprizeBase); pdprize->dle = dle; pdprize->ichkCollected = ichkCollected; } INCLUDE_ASM("asm/nonmatchings/P2/coin", PostDprizeLoad__FP6DPRIZE); INCLUDE_ASM("asm/nonmatchings/P2/coin", ProjectDprizeTransform__FP6DPRIZEfi); INCLUDE_ASM("asm/nonmatchings/P2/coin", FFilterDprizeObjects__FP6DPRIZEP2SO); INCLUDE_ASM("asm/nonmatchings/P2/coin", CheckDprizeBounce__FP6DPRIZE); INCLUDE_ASM("asm/nonmatchings/P2/coin", CheckDprizeCollect__FP6DPRIZE); INCLUDE_ASM("asm/nonmatchings/P2/coin", FAbsorbDprizeWkr__FP6DPRIZEP3WKR); INCLUDE_ASM("asm/nonmatchings/P2/coin", UpdateDprize__FP6DPRIZEf); INCLUDE_ASM("asm/nonmatchings/P2/coin", RenderDprizeAll__FP6DPRIZEP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/coin", SetDprizeDprizes__FP6DPRIZE7DPRIZES); void InitCoin(COIN *pcoin) { InitDprize(pcoin); pcoin->sRadiusBounce = 45.0f; pcoin->svLastBounceMax = 250.0f; pcoin->sRadiusCollect = 50.0f; pcoin->svLastBounce = 50.0f; pcoin->rxyBounce = 0.6f; pcoin->rzBounce = 0.75f; pcoin->uGlintChance = 0.25f; pcoin->lmDtMaxLifetime.gMin = 8.0f; pcoin->lmDtMaxLifetime.gMax = 10.0f; } INCLUDE_ASM("asm/nonmatchings/P2/coin", FUN_00147ed0); INCLUDE_ASM("asm/nonmatchings/P2/coin", FUN_00147ef8); INCLUDE_ASM("asm/nonmatchings/P2/coin", UpdateCoin__FP4COINf); INCLUDE_ASM("asm/nonmatchings/P2/coin", CreateSwCharm__FP2SW); void AddLife(void *ptr) { int new_clife = g_pgsCur->clife + 1; int capped_clife = 99; if (new_clife < 99) { capped_clife = new_clife; } g_pgsCur->clife = capped_clife; } INCLUDE_ASM("asm/nonmatchings/P2/coin", OnCoinSmack__FP4COIN); #ifdef SKIP_ASM /** * @todo 91.21% matched. */ void OnCoinSmack(COIN *pcoin) { g_pgsCur->ccoin++; if (g_pgsCur->ccoin < 100) return; if (g_pgsCur->ccharm < CcharmMost()) { // Give the player a charm and reset the coin count g_pgsCur->ccoin = 0; g_coinctr.dgDisplayMax = 250.0f; g_coinctr.pfnsmack = CreateSwCharm; g_coinctr.pv = pcoin->psw; } else { if (g_pgsCur->clife < 99) { // Give the player a life and reset the coin count g_pgsCur->ccoin = 0; g_coinctr.dgDisplayMax = 250.0f; g_coinctr.pv = NULL; g_coinctr.pfnsmack = AddLife; g_lifectr.pvtblot->pfnShowBlot(&g_lifectr); } else { // Clamp coin count to 99 g_pgsCur->ccoin = 99; } } } #endif INCLUDE_ASM("asm/nonmatchings/P2/coin", SetCoinDprizes__FP4COIN7DPRIZES); void InitCharm(CHARM *pcharm) { InitDprize(pcharm); pcharm->sRadiusBounce = 60.0f; pcharm->sRadiusCollect = 60.0f; pcharm->svLastBounceMax = 300.0f; pcharm->svLastBounce = 0.0f; pcharm->rxyBounce = 0.75f; pcharm->rzBounce = 0.5f; pcharm->uGlintChance = 0.35f; } void SetCharmDprizes(CHARM *pcharm, DPRIZES dprizes) { // if (pcharm->dprizes == dprizes) if (STRUCT_OFFSET(pcharm, 0x2d0, DPRIZES) == dprizes) return; if (dprizes == DPRIZES_Collect) { dprizes = DPRIZES_Swirl; StartSound(SFXID_Collect_Charm, NULL, pcharm, NULL, 1500.0f, 0.0f, 1, 0.0f, 0.0f, NULL, NULL); HandleLoSpliceEvent(pcharm, 2, 0, NULL); } SetDprizeDprizes(pcharm, dprizes); } void InitKey(KEY *pkey) { InitDprize(pkey); pkey->sRadiusBounce = 35.0f; pkey->sRadiusCollect = 35.0f; pkey->svLastBounceMax = 500.0f; pkey->svLastBounce = 250.0f; pkey->rxyBounce = 0.6f; pkey->rzBounce = 0.6f; pkey->uGlintChance = 0.75f; if (g_plsCur->fls & FLS_KeyCollected) { pkey->dprizesInit = DPRIZES_Removed; } } INCLUDE_ASM("asm/nonmatchings/P2/coin", SetKeyDprizes__FP3KEY7DPRIZES); INCLUDE_ASM("asm/nonmatchings/P2/coin", FUN_00148698); INCLUDE_ASM("asm/nonmatchings/P2/coin", FUN_00148718); INCLUDE_ASM("asm/nonmatchings/P2/coin", FUN_00148748); INCLUDE_ASM("asm/nonmatchings/P2/coin", FUN_00148770); INCLUDE_ASM("asm/nonmatchings/P2/coin", FUN_00148828); INCLUDE_ASM("asm/nonmatchings/P2/coin", FUN_00148888); int FUN_00148910(float *pf0, float *pf1) { return (*pf0 < *pf1) ? 1 : -1; } INCLUDE_ASM("asm/nonmatchings/P2/coin", FUN_00148938); INCLUDE_ASM("asm/nonmatchings/P2/coin", CpdprizeAttractSwDprizes__FP2SW3CIDP6VECTORiPP6DPRIZE); INCLUDE_ASM("asm/nonmatchings/P2/coin", RemoveSwExtraneousCharms__FP2SW); INCLUDE_ASM("asm/nonmatchings/P2/coin", FUN_00148d90); INCLUDE_ASM("asm/nonmatchings/P2/coin", FUN_00148e18); INCLUDE_ASM("asm/nonmatchings/P2/coin", FUN_00148e40); INCLUDE_ASM("asm/nonmatchings/P2/coin", FUN_00148ef8); INCLUDE_ASM("asm/nonmatchings/P2/coin", increment_and_show_life_count); INCLUDE_ASM("asm/nonmatchings/P2/coin", CollectLifetkn__FP7LIFETKN); INCLUDE_ASM("asm/nonmatchings/P2/coin", FUN_00149168); INCLUDE_ASM("asm/nonmatchings/P2/coin", break_bottle); ================================================ FILE: src/P2/cplcy.c ================================================ /** * @todo Mangle all function names in INCLUDE_ASM macros. */ #include INCLUDE_ASM("asm/nonmatchings/P2/cplcy", InitCplcy); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", FActiveCplcy); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", SetCpmanCpmt); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", FUN_001493c0); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", PosCplookAnchor); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", FUN_00149458); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", plays_binoc_sfx); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", PushCplookLookk__FP6CPLOOK5LOOKK); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", LookkPopCplook__FP6CPLOOK); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", LookkCurCplook__FP6CPLOOK); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", InitCplook); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", FUN_001496c0); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", UpdateCplook); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", FUN_0014a7b8); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", InitCpalign); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", FUN_0014a8d0); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", UpdateCpalign); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", FUN_0014aa90); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", FUN_0014aa98); INCLUDE_ASM("asm/nonmatchings/P2/cplcy", UpdateCpaseg); ================================================ FILE: src/P2/credit.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/credit", InitCredit__FP6CREDIT5BLOTK); INCLUDE_ASM("asm/nonmatchings/P2/credit", PostCreditLoad__FP6CREDIT); INCLUDE_ASM("asm/nonmatchings/P2/credit", SetCreditClock__FP6CREDITPf); INCLUDE_ASM("asm/nonmatchings/P2/credit", UpdateCredit__FP6CREDIT); INCLUDE_ASM("asm/nonmatchings/P2/credit", DrawCredit__FP6CREDIT); INCLUDE_ASM("asm/nonmatchings/P2/credit", PlaceCredit__FP6CREDITffi); INCLUDE_ASM("asm/nonmatchings/P2/credit", VacateCredit__FP6CREDIT); INCLUDE_ASM("asm/nonmatchings/P2/credit", SetCreditLine__FP6CREDITiPcf); ================================================ FILE: src/P2/crout.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/crout", CroutDecomp__FiPfT1); INCLUDE_ASM("asm/nonmatchings/P2/crout", CroutSolve__FiPfN21); ================================================ FILE: src/P2/crusher.c ================================================ #include /** * @todo Rename. */ extern int DAT_0027c008; void OnCrfodAdd(CRFOD *pcrfod) { OnStepguardAdd(pcrfod); AppendDlEntry(&pcrfod->psw->dlCrfod, pcrfod); } void OnCrfodRemove(CRFOD *pcrfod) { OnStepguardRemove(pcrfod); RemoveDlEntry(&pcrfod->psw->dlCrfod, pcrfod); } void CloneCrfod(CRFOD *pcrfod, CRFOD *pcrfodBase) { DLE dleCrfod = STRUCT_OFFSET(pcrfod, 0xc10, DLE); CloneStepguard(pcrfod, pcrfodBase); STRUCT_OFFSET(pcrfod, 0xc10, DLE) = dleCrfod; } void InitCrfodb(CRFODB *pcrfodb) { InitStepguard(pcrfodb); STRUCT_OFFSET(pcrfodb, 0xc24, int) = 1; DAT_0027c008 = 0; } void PostCrfodbLoad(CRFODB *pcrfodb) { PostStepguardLoad(pcrfodb); STRUCT_OFFSET(pcrfodb, 0xc2c, int) = DAT_0027c008++; } void CalcHeadingVector(float rad, VECTOR *pvector) { CalculateSinCos(rad, &pvector->y, (float *)pvector); pvector->z = 0.0f; } INCLUDE_ASM("asm/nonmatchings/P2/crusher", UpdateCrfodbGoal__FP6CRFODBi); INCLUDE_ASM("asm/nonmatchings/P2/crusher", FDetectCrfodb__FP6CRFODB); INCLUDE_ASM("asm/nonmatchings/P2/crusher", FAbsorbCrfodbWkr__FP6CRFODBP3WKR); INCLUDE_ASM("asm/nonmatchings/P2/crusher", FUN_0014bd38); INCLUDE_ASM("asm/nonmatchings/P2/crusher", SgsNextCrfodkAI__FP6CRFODK); INCLUDE_ASM("asm/nonmatchings/P2/crusher", FDetectCrfodk__FP6CRFODK); INCLUDE_ASM("asm/nonmatchings/P2/crusher", FAbsorbCrfodkWkr__FP6CRFODKP3WKR); INCLUDE_ASM("asm/nonmatchings/P2/crusher", FUN_0014bf88); INCLUDE_ASM("asm/nonmatchings/P2/crusher", InitCrbrain__FP7CRBRAIN); INCLUDE_ASM("asm/nonmatchings/P2/crusher", post_load_crbrain); INCLUDE_ASM("asm/nonmatchings/P2/crusher", FUN_0014c2f0); INCLUDE_ASM("asm/nonmatchings/P2/crusher", FUN_0014c5e8); INCLUDE_ASM("asm/nonmatchings/P2/crusher", FUN_0014c668); INCLUDE_ASM("asm/nonmatchings/P2/crusher", update_crbrain); INCLUDE_ASM("asm/nonmatchings/P2/crusher", FUN_0014c788); INCLUDE_ASM("asm/nonmatchings/P2/crusher", FUN_0014c820); INCLUDE_ASM("asm/nonmatchings/P2/crusher", FUN_0014c838); INCLUDE_ASM("asm/nonmatchings/P2/crusher", FUN_0014c858); INCLUDE_ASM("asm/nonmatchings/P2/crusher", FUN_0014cba8); INCLUDE_ASM("asm/nonmatchings/P2/crusher", FUN_0014cd70); INCLUDE_ASM("asm/nonmatchings/P2/crusher", FUN_0014cdc8); INCLUDE_ASM("asm/nonmatchings/P2/crusher", handle_crbrain_message); ================================================ FILE: src/P2/crv.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/crv", SMeasureApos__FiP6VECTORPf); INCLUDE_ASM("asm/nonmatchings/P2/crv", GWrapApos__FfiPfi); INCLUDE_ASM("asm/nonmatchings/P2/crv", IposFindAposG__FfiPfiT2T2); INCLUDE_ASM("asm/nonmatchings/P2/crv", EvaluateAposG__FfiP6VECTORPfiT2T2); INCLUDE_ASM("asm/nonmatchings/P2/crv", FindAposClosestPointAll__FP6VECTORP6CONSTRiT0N20PiPf); INCLUDE_ASM("asm/nonmatchings/P2/crv", FindAposClosestPointSegment__FP6VECTORP6CONSTRiT0iiT0T0PiPf); INCLUDE_ASM("asm/nonmatchings/P2/crv", ConvertApos__FiP6VECTORP7MATRIX4T2); INCLUDE_ASM("asm/nonmatchings/P2/crv", PcrvNew__F4CRVK); INCLUDE_ASM("asm/nonmatchings/P2/crv", SFromCrvU__FP3CRVf); INCLUDE_ASM("asm/nonmatchings/P2/crv", UFromCrvS__FP3CRVf); INCLUDE_ASM("asm/nonmatchings/P2/crv", IcvFindCrvU__FP3CRVfPfT2); INCLUDE_ASM("asm/nonmatchings/P2/crv", IcvFindCrvS__FP3CRVfPfT2); INCLUDE_ASM("asm/nonmatchings/P2/crv", GMeasureCrvU__FP5CRVMCf); INCLUDE_ASM("asm/nonmatchings/P2/crv", UMaxCrv__FP3CRV); INCLUDE_ASM("asm/nonmatchings/P2/crv", SMaxCrv__FP3CRV); JUNK_ADDIU(A0); INCLUDE_ASM("asm/nonmatchings/P2/crv", SMeasureCrvSegmentU__FP5CRVMSf); INCLUDE_ASM("asm/nonmatchings/P2/crv", FindCrvClosestPointOnLineSegmentFromU__FP3CRVP6VECTORT1fT1T1PfT6); JUNK_ADDIU(A0); INCLUDE_ASM("asm/nonmatchings/P2/crv", DuGetCrvSearchIncrement__FP3CRV); INCLUDE_ASM("asm/nonmatchings/P2/crv", LoadCrvlFromBrx__FP4CRVLP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/crv", EvaluateCrvlFromU__FP4CRVLfP6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/crv", EvaluateCrvlFromS__FP4CRVLfP6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/crv", RenderCrvlSegment__FP4CRVLiP7MATRIX4P2CMG4RGBAi); INCLUDE_ASM("asm/nonmatchings/P2/crv", ConvertCrvl__FP4CRVLP7MATRIX4T1); INCLUDE_ASM("asm/nonmatchings/P2/crv", SFromCrvlU__FP4CRVLf); INCLUDE_ASM("asm/nonmatchings/P2/crv", UFromCrvlS__FP4CRVLf); INCLUDE_ASM("asm/nonmatchings/P2/crv", MeasureCrvl__FP4CRVL); INCLUDE_ASM("asm/nonmatchings/P2/crv", FindCrvlClosestPointAll__FP4CRVLP6VECTORP6CONSTRT1T1PfT5); INCLUDE_ASM("asm/nonmatchings/P2/crv", FindCrvlClosestPointFromU__FP4CRVLP6VECTORfP6CONSTRT1T1PfT6); INCLUDE_ASM("asm/nonmatchings/P2/crv", FindCrvlClosestPointFromS__FP4CRVLP6VECTORfP6CONSTRT1T1PfT6); INCLUDE_ASM("asm/nonmatchings/P2/crv", LoadCrvcFromBrx__FP4CRVCP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/crv", InvalidateCrvcCache__FP4CRVC); INCLUDE_ASM("asm/nonmatchings/P2/crv", FillCrvcCache__FP4CRVCi); INCLUDE_ASM("asm/nonmatchings/P2/crv", EvaluateCrvcFromU__FP4CRVCfP6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/crv", EvaluateCrvcFromS__FP4CRVCfP6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/crv", RenderCrvcSegment__FP4CRVCiP7MATRIX4P2CMG4RGBAi); INCLUDE_ASM("asm/nonmatchings/P2/crv", ConvertCrvc__FP4CRVCP7MATRIX4T1); INCLUDE_ASM("asm/nonmatchings/P2/crv", SFromCrvcU__FP4CRVCf); INCLUDE_ASM("asm/nonmatchings/P2/crv", UFromCrvcS__FP4CRVCf); INCLUDE_ASM("asm/nonmatchings/P2/crv", MeasureCrvc__FP4CRVC); INCLUDE_ASM("asm/nonmatchings/P2/crv", FindCrvcClosestPointAll__FP4CRVCP6VECTORP6CONSTRT1T1PfT5); INCLUDE_ASM("asm/nonmatchings/P2/crv", FindCrvcClosestPointFromU__FP4CRVCP6VECTORfP6CONSTRT1T1PfT6); INCLUDE_ASM("asm/nonmatchings/P2/crv", FindCrvcClosestPointFromS__FP4CRVCP6VECTORfP6CONSTRT1T1PfT6); ================================================ FILE: src/P2/dart.c ================================================ #include #include #include extern SNIP s_asnipDart[]; void InitDart(DART *pdart) { InitSo(pdart); SetDartDarts(pdart, DARTS_Nil); } INCLUDE_ASM("asm/nonmatchings/P2/dart", OnDartAdd__FP4DART); void RemoveDart(DART *pdart) { RemoveLo(pdart); AppendDlEntry(&pdart->psw->dlDartFree, pdart); SetDartDarts(pdart, DARTS_AvailToFire); } void CloneDart(DART *pdart, DART *pdartBase) { DLE dleDartFree = STRUCT_OFFSET(pdart, 0x56c, DLE); // pdart->dleDartFree CloneSo(pdart, pdartBase); STRUCT_OFFSET(pdart, 0x56c, DLE) = dleDartFree; // pdart->dleDartFree } void LoadDartFromBrx(DART *pdart, CBinaryInputStream *pbis) { LoadSoFromBrx(pdart, pbis); InferExpl(&STRUCT_OFFSET(pdart, 0x58c, EXPL *), pdart); // pdart->pexpl } void HandleDartMessage(DART *pdart, MSGID msgid, void *pv) { HandleAloMessage(pdart, msgid, pv); // pdart->pasegaSticking if (msgid == MSGID_asega_retracted && (ASEGA *)pv == STRUCT_OFFSET(pdart, 0x578, ASEGA *)) { STRUCT_OFFSET(pdart, 0x578, ASEGA *) = NULL; SetDartDarts(pdart, DARTS_Stuck); } } void PostDartLoad(DART *pdart) { PostAloLoad(pdart); SnipAloObjects(pdart, 1, s_asnipDart); } void UpdateDart(DART *pdart, float dt) { UpdateSo(pdart, dt); switch (STRUCT_OFFSET(pdart, 0x550, DARTS)) { case DARTS_AvailToFire: case DARTS_ReadyToFire: case DARTS_Sticking: case DARTS_Fading: default: { break; } case DARTS_Airborne: { UpdateDartAirborne(pdart, dt); break; } case DARTS_Stuck: { // pdart->dtMaxStuck, pdart->tDarts, g_pjt->phbsk if (STRUCT_OFFSET(pdart, 0x568, float) < g_clock.t - STRUCT_OFFSET(pdart, 0x554, float) && (!g_pjt || (HBSK *)pdart->paloParent != STRUCT_OFFSET(g_pjt, 0x23b0, HBSK *))) { SetDartDarts(pdart, DARTS_Fading); } break; } } } void SetDartDarts(DART *pdart, DARTS darts) { // pdart->darts if (STRUCT_OFFSET(pdart, 0x550, DARTS) == darts) { return; } if (STRUCT_OFFSET(pdart, 0x550, DARTS) == DARTS_Airborne) { STRUCT_OFFSET(pdart, 0x57c, ALO *) = NULL; // pdart->paloTarget STRUCT_OFFSET(pdart, 0x580, float) = 0.0f; // pdart->dtLaunchToTarget STRUCT_OFFSET(pdart, 0x584, float) = 0.0f; // pdart->dzTarget STRUCT_OFFSET(pdart, 0x588, DARTGUN *) = NULL; // pdart->pdartgunFiredFrom } STRUCT_OFFSET(pdart, 0x550, DARTS) = darts; // pdart->darts STRUCT_OFFSET(pdart, 0x554, float) = g_clock.t; // pdart->tDarts if (darts == DARTS_Fading) { FadeAloOut(pdart, STRUCT_OFFSET(pdart, 0x564, float)); // pdart->dtFade } } INCLUDE_ASM("asm/nonmatchings/P2/dart", ApplyDartThrow__FP4DARTP2PO); INCLUDE_ASM("asm/nonmatchings/P2/dart", UpdateDartAirborne__FP4DARTf); ================================================ FILE: src/P2/dartgun.c ================================================ #include void InitDartgun(DARTGUN *pdartgun) { InitBreak((BREAK *)pdartgun); STRUCT_OFFSET(pdartgun, 0x6c0, OID) = OID_Nil; // pdartgun->oidDart } INCLUDE_ASM("asm/nonmatchings/P2/dartgun", HandleDartgunMessage__FP7DARTGUN5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/dartgun", BindDartgun__FP7DARTGUN); INCLUDE_ASM("asm/nonmatchings/P2/dartgun", FUN_0014f900); INCLUDE_ASM("asm/nonmatchings/P2/dartgun", PostDartgunLoad__FP7DARTGUN); INCLUDE_ASM("asm/nonmatchings/P2/dartgun", UpdateDartgun__FP7DARTGUNf); INCLUDE_ASM("asm/nonmatchings/P2/dartgun", FIgnoreDartgunIntersection__FP7DARTGUNP2SO); INCLUDE_ASM("asm/nonmatchings/P2/dartgun", BreakDartgun__FP7DARTGUN); INCLUDE_ASM("asm/nonmatchings/P2/dartgun", SetDartgunGoalState__FP7DARTGUN3OID); INCLUDE_ASM("asm/nonmatchings/P2/dartgun", TrackDartgun__FP7DARTGUNP3OID); INCLUDE_ASM("asm/nonmatchings/P2/dartgun", FPrepareDartgunToFire__FP7DARTGUN); INCLUDE_ASM("asm/nonmatchings/P2/dartgun", FireDartgun__FP7DARTGUN); INCLUDE_ASM("asm/nonmatchings/P2/dartgun", AgeDartgunStuckDart__FP7DARTGUN); INCLUDE_ASM("asm/nonmatchings/P2/dartgun", PratGetDartgunRatTarget__FP7DARTGUN); /** * @todo Cleanup once struct is implemented. */ void AddDartgunRatTarget(DARTGUN *pdartgun, OID oid) { if (STRUCT_OFFSET(pdartgun, 0x744, uint) >= 8) { return; } // pdartgun->aoidRatTarget[pdartgun->coidRatTarget++] = oid; OID *aoidRatTarget = &STRUCT_OFFSET(pdartgun, 0x748, OID); aoidRatTarget[STRUCT_OFFSET(pdartgun, 0x744, uint)++] = oid; } void StartDartgunTargetAreaChange(DARTGUN *pdartgun) { STRUCT_OFFSET(pdartgun, 0x78c, int) = 0; // pdartgun->cpratInTargetArea STRUCT_OFFSET(pdartgun, 0x7b0, int) = 0; // pdartgun->fJtInTargetArea } INCLUDE_ASM("asm/nonmatchings/P2/dartgun", AddDartgunTargetAreaTarget__FP7DARTGUNP3ALO); ================================================ FILE: src/P2/dialog.c ================================================ #include #include #include #include #include #include extern BLOT g_binoc; void InitDialog(DIALOG *pdialog) { InitAlo(pdialog); STRUCT_OFFSET(pdialog, 0x2c8, ulong) = STRUCT_OFFSET(pdialog, 0x2c8, ulong) | 0x100000000; STRUCT_OFFSET(pdialog, 0x300, OID) = OID_Nil; STRUCT_OFFSET(pdialog, 0x30c, OID) = OID_Nil; } void LoadDialogFromBrx(DIALOG *pdialog, CBinaryInputStream *pbis) { LoadAloFromBrx(pdialog, pbis); // pdialog->cde & pdialog->ade LoadDialogEventsFromBrx(pdialog, pbis, &STRUCT_OFFSET(pdialog, 0x2dc, int), &STRUCT_OFFSET(pdialog, 0x2e0, DE *)); } INCLUDE_ASM("asm/nonmatchings/P2/dialog", LoadDialogEventsFromBrx__FP6DIALOGP18CBinaryInputStreamPiPP2DE); INCLUDE_ASM("asm/nonmatchings/P2/dialog", PostDialogLoad__FP6DIALOG); void SetDialogInstruct(DIALOG *pdialog) { // pdialog->dialogk STRUCT_OFFSET(pdialog, 0x2d0, DIALOGK) = DIALOGK_Instruct; } void SetDialogConfront(DIALOG *pdialog) { // pdialog->dialogk STRUCT_OFFSET(pdialog, 0x2d0, DIALOGK) = DIALOGK_Confront; } void GetDialogPlayed(DIALOG *pdialog, int *pfPlayed) { // pdialog->pfPlayed *pfPlayed = *STRUCT_OFFSET(pdialog, 0x304, int *); } void SetDialogPlayed(DIALOG *pdialog, int fPlayed) { // pdialog->pfPlayed *STRUCT_OFFSET(pdialog, 0x304, int *) = fPlayed; } INCLUDE_ASM("asm/nonmatchings/P2/dialog", SetDialogDialogs__FP6DIALOG7DIALOGS); INCLUDE_ASM("asm/nonmatchings/P2/dialog", UpdateDialog__FP6DIALOGf); INCLUDE_ASM("asm/nonmatchings/P2/dialog", HandleDialogEvent__FP6DIALOGP2DE); void HandleDialogMessage(DIALOG *pdialog, MSGID msgid, void *pv) { HandleAloMessage(pdialog, msgid, pv); // pdialog->dp if (msgid == MSGID_asega_retracted && (ASEGA *)pv == STRUCT_OFFSET(pdialog, 0x2e8, DP).pasegaLipsync) { STRUCT_OFFSET(pdialog, 0x2e8, DP).pasegaLipsync = NULL; } } INCLUDE_ASM("asm/nonmatchings/P2/dialog", FPauseDialog__FP6DIALOG); INCLUDE_ASM("asm/nonmatchings/P2/dialog", FUN_001516c0); INCLUDE_ASM("asm/nonmatchings/P2/dialog", HandleDialogEvents__FP6DIALOG); void FUN_00151860(DIALOG *pdialog, BLOT *pblot) { if (pblot) { ((void (*)(BLOT *, DIALOG *))STRUCT_OFFSET(pblot->pvtblot, 0x158, void *))(pblot, pdialog); } else { BLOT *pbinoc = &g_binoc; STRUCT_OFFSET(pbinoc, 0x324, DIALOG *) = pdialog; PushUiActiveBlot(&g_ui, pbinoc); } } void TriggerDialog(DIALOG *pdialog) { NOTE *pnote = &g_note; if (STRUCT_OFFSET(pnote, 0x260, int) >= 2) return; if (STRUCT_OFFSET(pnote, 0x26c, int) != 0) return; if (SetVagUnpaused()) return; if (g_wipe.wipes == WIPES_WipingOut) return; if (pdialog == g_pdialogPlaying) return; DIALOGS dialogs = DIALOGS_Triggered; if (*STRUCT_OFFSET(pdialog, 0x304, int *) != 0) // pdialog->pfPlayed { if (STRUCT_OFFSET(pdialog, 0x2d0, DIALOGK) != DIALOGK_Confront) // pdialog->dialogk { dialogs = DIALOGS_UnableToCall; } else { dialogs = STRUCT_OFFSET(pdialog, 0x2d4, DIALOGS); // pdialog->dialogs } } else { int cpfEquivalence = STRUCT_OFFSET(pdialog, 0x310, int); // pdialog->cpfEquivalence if (cpfEquivalence > 0) { for (int i = 0; i < cpfEquivalence; i++) { if (*STRUCT_OFFSET_INDEX(pdialog, 0x314, int *, i) != 0) // pdialog->cpfEquivalenceArray[i] { dialogs = DIALOGS_UnableToCall; break; } } } } SetDialogDialogs(pdialog, dialogs); } void UntriggerDialog(DIALOG *pdialog) { // pdialog->dialogs if (STRUCT_OFFSET(pdialog, 0x2d4, DIALOGS) != DIALOGS_Triggered && STRUCT_OFFSET(pdialog, 0x2d4, DIALOGS) != DIALOGS_Playing) { SetDialogDialogs(pdialog, DIALOGS_Enabled); } } ================================================ FILE: src/P2/difficulty.c ================================================ #include #include #include #include #include INCLUDE_ASM("asm/nonmatchings/P2/difficulty", PdifficultyEnsureSw); INCLUDE_ASM("asm/nonmatchings/P2/difficulty", FUN_00151A58); void OnDifficultyGameLoad(DIFFICULTY *pdifficulty) { memset(pdifficulty, 0, sizeof(DIFFICULTY)); // note: DIFFICULTY should be 0x24 bytes } INCLUDE_ASM("asm/nonmatchings/P2/difficulty", OnDifficultyWorldPreLoad); #ifdef SKIP_ASM /** * @todo 16.92% matched. */ void OnDifficultyWorldPreLoad(DIFFICULTY *pdifficulty) { const GS* gsCur = g_pgsCur; const LS* lsCur = g_plsCur; const int gameworld = (int)(gsCur->gameworldCur); const int worldlevel = (int)(gsCur->worldlevelCur); DIFFICULTYLEVEL *difficultyProps; pdifficulty->ccoinRichMin = 4; pdifficulty->ccoinRichMax = 6; pdifficulty->ccoinPoorMax = 3; pdifficulty->ccoinPoorMin = 1; if (((gameworld == (int)GAMEWORLD_Intro) || (gameworld == (int)GAMEWORLD_Clockwerk)) || (worldlevel == (int)WORLDLEVEL_Hub)) { // Case: Current world is 0 or 5, or current level is a hub difficultyProps = &g_difficultyEasy; // Set easy difficulty } else if (((int)lsCur->fls & (int)FLS_KeyCollected) == 0) { // Case: Key NOT collected on current level difficultyProps = &g_difficultyMedium; // set medium difficulty } else { // Case: Key collected on current level difficultyProps = &g_difficultyHard; // set hard difficulty } pdifficulty->pDifficultyLevel = difficultyProps; ChangeSuck(lsCur->uSuck, pdifficulty); difficultyProps = pdifficulty->pDifficultyLevel; // redundant? // todo: finish function } #endif INCLUDE_ASM("asm/nonmatchings/P2/difficulty", OnDifficultyWorldPostLoad); #ifdef SKIP_ASM /** * @todo 30.85% matched. */ void OnDifficultyWorldPostLoad(DIFFICULTY *pdifficulty) { DIFFICULTYLEVEL *difficultyProps; int csuckCharms; // Case: The transition is a quit-game reload if ((g_transition.grftrans & 8) == 0) { const float newSuck = GLimitLm((LM*)&pdifficulty->pDifficultyLevel->unk_lm_0x8, g_plsCur->uSuck); ChangeSuck(newSuck, pdifficulty); } // Case: The ransition is not a quit-game reload else { difficultyProps = pdifficulty->pDifficultyLevel; // Case: Suck value is BELOW charmLow or ABOVE charmHigh if ((g_plsCur->uSuck < difficultyProps->uSuckCharmLow) || (difficultyProps->uSuckCharmHigh <= g_plsCur->uSuck)) { // Suck value is lower than both thresholds if (g_plsCur->uSuck < difficultyProps->uSuckCharmHigh) { RemoveSwExtraneousCharms(g_psw); return; } // Suck value is not below the charmLow, so it must be above charmHigh csuckCharms = difficultyProps->ccharmHigh; } // Case: Suck value is ABOVE charmLow but BELOW charmHigh else { csuckCharms = difficultyProps->ccharmLow; } if (g_pgsCur->ccharm < csuckCharms) { SetCcharm(csuckCharms); pdifficulty->dps = DPS_GivenCharms; } } } #endif void OnDifficultyInitialTeleport(DIFFICULTY *pdifficulty) { return; } INCLUDE_ASM("asm/nonmatchings/P2/difficulty", OnDifficultyPlayerDeath); #ifdef SKIP_ASM /** * @todo 88.43% matched. */ void OnDifficultyPlayerDeath(float scalar, DIFFICULTY* pdifficulty) { DIFFICULTYLEVEL* pdifflevel = pdifficulty->pDifficultyLevel; // Get suck values for current level float uSuckCur = g_plsCur->uSuck; float duSuckDeath = pdifflevel->duSuckDeath; // Increase suck value ChangeSuck(uSuckCur + scalar * duSuckDeath, pdifficulty); // Update suckunknown_0x10 float result; if (g_pgsCur->clife < 0) { // itgame over result = pdifficulty->pDifficultyLevel->field18_0x40; } else { // not game over result = pdifflevel->field17_0x3c; if (g_pgsCur->clife <= pdifflevel->field21_0x4c) { result = result + pdifflevel->field22_0x50; } } result = GLimitLm(&g_lmZeroOne, g_plsCur->unk_suck_0x10 + scalar * result); g_plsCur->unk_suck_0x10 = result; } #endif INCLUDE_ASM("asm/nonmatchings/P2/difficulty", OnDifficultyTriggerCheckpoint__FP10DIFFICULTYP6CHKPNT); #ifdef SKIP_ASM /** * @todo 3.33% matched. */ void OnDifficultyTriggerCheckpoint(DIFFICULTY *pdifficulty, CHKPNT *pchkpnt) { DIFFICULTYLEVEL *pdifflevel; if (!pchkpnt) { pdifflevel = pdifficulty->pDifficultyLevel; } // todo: implement CHKPNT struct and finish this function // ... } #endif void OnDifficultyCollectKey(DIFFICULTY *pdifficulty) { ChangeSuck(0.0f, pdifficulty); g_plsCur->unk_suck_0x10 = 0.0f; g_plsCur->unk_field_0x70 = 0; memset(&g_plsCur->unk_field_0x74, 0, 1); } INCLUDE_ASM("asm/nonmatchings/P2/difficulty", OnDifficultyBreak); void ChangeSuck(float nParam, DIFFICULTY *pdifficulty) { g_plsCur->uSuck = GLimitLm(&pdifficulty->pDifficultyLevel->suck_lm, nParam); } ================================================ FILE: src/P2/dl.c ================================================ #include extern DLI *s_pdliFirst; // Global iterator list. void InitDl(DL *pdl, int ibDle) { pdl->ibDle = ibDle; } void ClearDl(DL *pdl) { pdl->tail = NULL; pdl->head = NULL; } void ClearDle(DLE *pdle) { pdle->prev = NULL; pdle->next = NULL; } DLE *PdleFromDlEntry(DL *pdl, void *pv) { return (DLE *)((uchar *)pv + pdl->ibDle); } void AppendDlEntry(DL *pdl, void *pv) { DLE *newEntry = PdleFromDlEntry(pdl, pv); if (!pdl->tail) { pdl->head = pv; } else { DLE *currentTail = PdleFromDlEntry(pdl, pdl->tail); newEntry->prev = pdl->tail; currentTail->next = pv; } pdl->tail = pv; } void PrependDlEntry(DL *pdl, void *pv) { DLE *newEntry = PdleFromDlEntry(pdl, pv); if (!pdl->head) { pdl->tail = pv; pdl->head = pv; } else { DLE *currentHead = PdleFromDlEntry(pdl, pdl->head); newEntry->next = pdl->head; currentHead->prev = pv; pdl->head = pv; } } void InsertDlEntryBefore(DL *pdl, void *pvNext, void *pv) { if (!pvNext) { AppendDlEntry(pdl, pv); } else if (pvNext == pdl->head) { PrependDlEntry(pdl, pv); } else { DLE *newEntry = PdleFromDlEntry(pdl, pv); DLE *nextEntry = PdleFromDlEntry(pdl, pvNext); void *prevEntryPointer = nextEntry->prev; DLE *prevEntry = PdleFromDlEntry(pdl, prevEntryPointer); newEntry->next = pvNext; newEntry->prev = prevEntryPointer; nextEntry->prev = pv; prevEntry->next = pv; } } JUNK_NOP(); JUNK_ADDIU(60); void RemoveDlEntry(DL *pdl, void *pv) { DLE *pentry = PdleFromDlEntry(pdl, pv); DLI *pcurrent = s_pdliFirst; // Loop through global iterator list to find DLI that houses the DLE we're looking for. while (pcurrent) { if ((DLE *)pcurrent->m_ppv == pentry) { // If the DLE is the current index of the DLI, replace the with prev. void *pprev = pentry->prev; if (pprev) { (DLE *)pcurrent->m_ppv = PdleFromDlEntry(pdl, pprev); } else { (DLE *)pcurrent->m_ppv = pdl; } } pcurrent = pcurrent->m_pdliNext; } // Adjust head void *pprev = pentry->prev; if (pprev) { DLE *pdle = PdleFromDlEntry(pdl, pprev); pdle->next = pentry->next; } else { pdl->head = pentry->next; } // Adjust tail pprev = pentry->next; if (pprev) { DLE *pdle = PdleFromDlEntry(pdl, pprev); pdle->prev = pentry->prev; } else { pdl->tail = pentry->prev; } // Clear links pentry->next = NULL; pentry->prev = NULL; } bool FFindDlEntry(DL *pdl, void *pv) { DLE *pdle = PdleFromDlEntry(pdl, pv); return (pdle->next) || (pdl->tail == pv); } bool FIsDlEmpty(DL *pdl) { return !pdl->head; } void MergeDl(DL *pdlDst, DL *pdlSrc) { if (!pdlSrc->head) return; if (!pdlDst->head) { memcpy(pdlDst, pdlSrc, 12); ClearDl(pdlSrc); return; } DLE *pdstTail = PdleFromDlEntry(pdlDst, pdlDst->tail); DLE *psrcHead = PdleFromDlEntry(pdlSrc, pdlSrc->head); pdstTail->next = pdlSrc->head; psrcHead->prev = pdlDst->tail; pdlDst->tail = pdlSrc->tail; ClearDl(pdlSrc); } int CPvDl(DL *pdl) { void *pCurItem = pdl->head; int iCount = 0; while (pCurItem) { DLE *pDle = (DLE *)((uchar *)pCurItem + pdl->ibDle); pCurItem = pDle->next; iCount++; } return iCount; } ================================================ FILE: src/P2/dmas.c ================================================ #include #include #include extern sceDmaChan *g_pdcVif0; extern sceDmaChan *g_pdcVif1; extern sceDmaChan *g_pdcGif; extern sceDmaChan *g_pdcFromSpr; extern sceDmaChan *g_pdcToSpr; void StartupDma() { sceDmaReset(1); sceGsResetPath(); g_pdcVif0 = sceDmaGetChan(0); g_pdcVif1 = sceDmaGetChan(1); g_pdcGif = sceDmaGetChan(2); g_pdcFromSpr = sceDmaGetChan(8); g_pdcToSpr = sceDmaGetChan(9); } DMAS::DMAS() { m_fPad = 0; m_fEndPrim = 0; Clear(); } void DMAS::Clear() { m_pbMax = NULL; m_ab = NULL; m_pqwCnt = NULL; m_pb = NULL; } void DMAS::Reset() { m_pqwCnt = NULL; m_pb = m_ab; } INCLUDE_ASM("asm/nonmatchings/P2/dmas", AllocGlobal__4DMASi); INCLUDE_ASM("asm/nonmatchings/P2/dmas", AllocSw__4DMASii); INCLUDE_ASM("asm/nonmatchings/P2/dmas", AllocStack__4DMASi); INCLUDE_ASM("asm/nonmatchings/P2/dmas", AllocStatic__4DMASiP2QW); void DMAS::Detach(int *pcqw, QW **paqw) { EndDmaCnt(); if (pcqw) { *pcqw = (uint)(m_pb - m_ab) >> 4; } if (paqw) { *paqw = (QW *)m_ab; } Clear(); } INCLUDE_ASM("asm/nonmatchings/P2/dmas", DetachCopySw__4DMASPiPP2QWT2i); void DMAS::Send(sceDmaChan *chan) { EndDmaCnt(); FlushCache(WRITEBACK_DCACHE); sceDmaSend(chan, m_ab); m_pb = m_ab; } JUNK_NOP(); JUNK_ADDIU(10); INCLUDE_ASM("asm/nonmatchings/P2/dmas", AddDmaCnt__4DMAS); INCLUDE_ASM("asm/nonmatchings/P2/dmas", AddDmaRefs__4DMASiP2QW); INCLUDE_ASM("asm/nonmatchings/P2/dmas", AddDmaCall__4DMASP2QW); INCLUDE_ASM("asm/nonmatchings/P2/dmas", AddDmaRet__4DMAS); INCLUDE_ASM("asm/nonmatchings/P2/dmas", AddDmaBulk__4DMASiP2QW); INCLUDE_ASM("asm/nonmatchings/P2/dmas", AddDmaEnd__4DMAS); INCLUDE_ASM("asm/nonmatchings/P2/dmas", EndDmaCnt__4DMAS); void DMAS::EndPrim() { return; } JUNK_WORD(0x00021102); ================================================ FILE: src/P2/dysh.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/dysh", InitDysh__FP4DYSH); INCLUDE_ASM("asm/nonmatchings/P2/dysh", SetDyshShadow__FP4DYSHP6SHADOW); INCLUDE_ASM("asm/nonmatchings/P2/dysh", RenderDyshSelf__FP4DYSHP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/dysh", DrawDysh__FP3RPL); ================================================ FILE: src/P2/dzg.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/dzg", InitDzg__FP3DZGi); INCLUDE_ASM("asm/nonmatchings/P2/dzg", ClearDzgSolution__FP3DZG); INCLUDE_ASM("asm/nonmatchings/P2/dzg", AppendDzgDz__FP3DZGP2DZ); INCLUDE_ASM("asm/nonmatchings/P2/dzg", FillDzgDz__FP3DZGiP2DZiPP2XPPiPPP2SO); INCLUDE_ASM("asm/nonmatchings/P2/dzg", EnforceDzgDz__FP3DZGP2DZ); INCLUDE_ASM("asm/nonmatchings/P2/dzg", SolveDzg__FP3DZGiiPP2XPPiPPP2SO); INCLUDE_ASM("asm/nonmatchings/P2/dzg", SolveDzgFric__FP3DZGiiPP2XPPiPPP2SOf); INCLUDE_ASM("asm/nonmatchings/P2/dzg", ApplyDzg__FP3DZGiPiPPP2SOff); INCLUDE_ASM("asm/nonmatchings/P2/dzg", SolveInequalities__FiPfN21); ================================================ FILE: src/P2/emitter.c ================================================ #include extern float DAT_0024a124; INCLUDE_ASM("asm/nonmatchings/P2/emitter", InitEmitb__FP5EMITB); INCLUDE_ASM("asm/nonmatchings/P2/emitter", InitEmitter__FP7EMITTER); INCLUDE_ASM("asm/nonmatchings/P2/emitter", LoadEmitmeshFromBrx__FP8EMITMESHP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/emitter", LoadEmitblipColorsFromBrx__FP8EMITBLIPiP2LOP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/emitter", LoadEmitterFromBrx__FP7EMITTERP18CBinaryInputStream); void CloneEmitter(EMITTER *pemitter, EMITTER *pemitterBase) { CloneAlo(pemitter, pemitterBase); STRUCT_OFFSET(pemitter, 0x2d0, EMITB *)->cref++; } INCLUDE_ASM("asm/nonmatchings/P2/emitter", BindEmitterCallback__FP7EMITTER5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/emitter", BindEmitter__FP7EMITTER); INCLUDE_ASM("asm/nonmatchings/P2/emitter", PostEmitterLoad__FP7EMITTER); INCLUDE_ASM("asm/nonmatchings/P2/emitter", HandleEmitterMessage__FP7EMITTER5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/emitter", PemitbCopyOnWrite__FP5EMITB); EMITB *PemitbEnsureEmitter(EMITTER *pemitter, ENSK ensk) { if (ensk == ENSK_Set) { STRUCT_OFFSET(pemitter, 0x34c, int) = 1; // pemitter->fValuesChanged STRUCT_OFFSET(pemitter, 0x2d0, EMITB *) = PemitbCopyOnWrite(STRUCT_OFFSET(pemitter, 0x2d0, EMITB *)); } return STRUCT_OFFSET(pemitter, 0x2d0, EMITB *); // pemitter->pemitb } EMITTER *PemitterEnsureEmitter(EMITTER *pemitter, ENSK ensk) { if (ensk == ENSK_Set) { STRUCT_OFFSET(pemitter, 0x34c, int) = 1; // pemitter->fValuesChanged } return pemitter; } void AddEmitterSkeleton(EMITTER *pemitter, OID oid, OID oidOther, float sRadius, float gDensity, float sRadiusOther, float gDensityOther) { EMITB *pemitb = PemitbEnsureEmitter(pemitter, ENSK_Set); AddEmitoSkeleton(&pemitb->emito, oid, oidOther, sRadius, gDensity, sRadiusOther, gDensityOther, pemitter); } INCLUDE_ASM("asm/nonmatchings/P2/emitter", ModifyEmitterParticles__FP7EMITTER); INCLUDE_ASM("asm/nonmatchings/P2/emitter", UpdateEmitter__FP7EMITTERf); INCLUDE_ASM("asm/nonmatchings/P2/emitter", FUN_00155f28); void PauseEmitter(EMITTER *pemitter, float dtPause) { STRUCT_OFFSET(pemitter, 0x340, float) = g_clock.t + dtPause; // pemitter->tUnpause } void PauseEmitterIndefinite(EMITTER *pemitter) { STRUCT_OFFSET(pemitter, 0x340, float) = DAT_0024a124; // pemitter->tUnpause } void UnpauseEmitter(EMITTER *pemitter) { STRUCT_OFFSET(pemitter, 0x340, float) = -1.0f; // pemitter->tUnpause } INCLUDE_ASM("asm/nonmatchings/P2/emitter", FPausedEmitter__FP7EMITTER); void SetEmitterEnabled(EMITTER *pemitter, int fEnabled) { if (fEnabled) { UnpauseEmitter(pemitter); return; } PauseEmitterIndefinite(pemitter); } void GetEmitterEnabled(EMITTER *pemitter, int *pfEnabled) { *pfEnabled = !FPausedEmitter(pemitter); } void GetEmitterPaused(EMITTER *pemitter, int *pfPaused) { *pfPaused = FPausedEmitter(pemitter); } INCLUDE_ASM("asm/nonmatchings/P2/emitter", OnEmitterValuesChanged__FP7EMITTER); INCLUDE_ASM("asm/nonmatchings/P2/emitter", SetEmitterParticleCount__FP7EMITTERi); void SetEmitterAutoPause(EMITTER *pemitter, int fAutoPause) { STRUCT_OFFSET(pemitter, 0x308, int) = fAutoPause; // pemitter->fAutoPause STRUCT_OFFSET(pemitter, 0x34c, int) = 1; // pemitter->fValuesChanged } INCLUDE_ASM("asm/nonmatchings/P2/emitter", SetEmitbRipt__FP5EMITB4RIPT); void SetEmitterRipt(EMITTER *pemitter, RIPT ript) { EMITB *pemitb = PemitbEnsureEmitter(pemitter, ENSK_Set); SetEmitbRipt(pemitb, ript); } void SetExploRipt(EXPLO *pexplo, RIPT ript) { EMITB *pemitb = PemitbEnsureExplo(pexplo, ENSK_Set); SetEmitbRipt(pemitb, ript); } INCLUDE_ASM("asm/nonmatchings/P2/emitter", WakeSoWater__FP2SOP5WATERfP6VECTORT3ff); INCLUDE_ASM("asm/nonmatchings/P2/emitter", StandardSmokeCloud__FP6VECTORf); INCLUDE_ASM("asm/nonmatchings/P2/emitter", ChooseEmitoPos__FP5EMITOiiP6VECTORT3); INCLUDE_ASM("asm/nonmatchings/P2/emitter", ConvertEmitoPosVec__FP5EMITOP6VECTORT1); INCLUDE_ASM("asm/nonmatchings/P2/emitter", CalculateEmitvx__FiP2LMiP6EMITVX); INCLUDE_ASM("asm/nonmatchings/P2/emitter", ChooseEmitVelocity__FP6EMITVXffP2LMP6VECTORiT4); INCLUDE_ASM("asm/nonmatchings/P2/emitter", ChooseEmitvVelocityAge__FP5EMITVP6EMITVXP5EMITOiP6VECTORN24PfT7); INCLUDE_ASM("asm/nonmatchings/P2/emitter", EmitRips__FP5EMITBP5EMITGiP6VECTORT3PfT5); INCLUDE_ASM("asm/nonmatchings/P2/emitter", EmitBlips__FP5EMITBP5EMITGiP6VECTORT3PfT5T3T3); INCLUDE_ASM("asm/nonmatchings/P2/emitter", OriginateParticles__FiP5EMITBP7EMITGEN); INCLUDE_ASM("asm/nonmatchings/P2/emitter", OriginateSplineSinkParticles__FiP5EMITBR7EMITGENT2); INCLUDE_ASM("asm/nonmatchings/P2/emitter", EmitParticles__FiP5EMITBP5EMITG); INCLUDE_ASM("asm/nonmatchings/P2/emitter", EmitRipsSphere__FP6VECTORT0iP7EMITRIPP5EMITVPP4RIPGP2LO); JUNK_WORD(0x27bd0290); // junk_00157FF0 INCLUDE_ASM("asm/nonmatchings/P2/emitter", StockSplashBig__FP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/emitter", StockSplashSmall__FP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/emitter", AddEmitoSkeleton__FP5EMITO3OIDT1ffffP2LO); INCLUDE_ASM("asm/nonmatchings/P2/emitter", BindEmitb__FP5EMITBP2LO); INCLUDE_ASM("asm/nonmatchings/P2/emitter", SetEmitdvEmitb__FP6EMITDVP5EMITB); INCLUDE_ASM("asm/nonmatchings/P2/emitter", CalculateEmitdvMatrix__FP6EMITDVfP7MATRIX4); INCLUDE_ASM("asm/nonmatchings/P2/emitter", PostExplLoad__FP4EXPL); INCLUDE_ASM("asm/nonmatchings/P2/emitter", CalculateExplTransform__FP4EXPLP6VECTORP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/emitter", ExplodeExpl__FP4EXPL); INCLUDE_ASM("asm/nonmatchings/P2/emitter", ExplodeExplParams__FP4EXPLUiP3ALOP6VECTORT3ff); void ExplodeExplExplso(EXPL *pexpl, EXPLSO *pexplso) { return; } INCLUDE_ASM("asm/nonmatchings/P2/emitter", LoadExplgFromBrx__FP5EXPLGP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/emitter", CloneExplg__FP5EXPLGT0); INCLUDE_ASM("asm/nonmatchings/P2/emitter", BindExplg__FP5EXPLG); INCLUDE_ASM("asm/nonmatchings/P2/emitter", ExplodeExplgExplso__FP5EXPLGP6EXPLSO); INCLUDE_ASM("asm/nonmatchings/P2/emitter", InitExplo__FP5EXPLO); INCLUDE_ASM("asm/nonmatchings/P2/emitter", LoadExploFromBrx__FP5EXPLOP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/emitter", CloneExplo__FP5EXPLOT0); INCLUDE_ASM("asm/nonmatchings/P2/emitter", BindExplo__FP5EXPLO); void ExplodeExploExplso(EXPLO *pexplo, EXPLSO *pexplso) { return; } INCLUDE_ASM("asm/nonmatchings/P2/emitter", AddExploSkeleton__FP5EXPLO3OIDT1ffff); INCLUDE_ASM("asm/nonmatchings/P2/emitter", PemitbEnsureExplo__FP5EXPLO4ENSK); INCLUDE_ASM("asm/nonmatchings/P2/emitter", InitExpls__FP5EXPLS); INCLUDE_ASM("asm/nonmatchings/P2/emitter", BindExpls__FP5EXPLS); INCLUDE_ASM("asm/nonmatchings/P2/emitter", HandleExplsMessage__FP5EXPLS5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/emitter", ExplodeExplsExplso__FP5EXPLSP6EXPLSO); INCLUDE_ASM("asm/nonmatchings/P2/emitter", PsfxEnsureExpls__FP5EXPLS4ENSK); INCLUDE_ASM("asm/nonmatchings/P2/emitter", FireExplsExplso__FP5EXPLSP6EXPLSO); INCLUDE_ASM("asm/nonmatchings/P2/emitter", InferExpl__FPP4EXPLP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/emitter", FireSwTimedExplodeStyles__FP2SW); // junk_00159668 JUNK_ADDIU(10); JUNK_WORD(0x7c450000); JUNK_WORD(0x48220800); ================================================ FILE: src/P2/eyes.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/eyes", InitEyes__FP4EYESP4SAAF); INCLUDE_ASM("asm/nonmatchings/P2/eyes", PostEyesLoad__FP4EYES); INCLUDE_ASM("asm/nonmatchings/P2/eyes", SetEyesEyess__FP4EYES5EYESS); INCLUDE_ASM("asm/nonmatchings/P2/eyes", UpdateEyes__FP4EYESf); INCLUDE_ASM("asm/nonmatchings/P2/eyes", SetEyesClosed__FP4EYESf); INCLUDE_ASM("asm/nonmatchings/P2/eyes", PsaiFromEyesShd__FP4EYESP3SHD); ================================================ FILE: src/P2/fader.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/fader", UpdateFader__FP5FADERf); INCLUDE_ASM("asm/nonmatchings/P2/fader", PfaderNew__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/fader", RemoveFader__FP5FADER); ================================================ FILE: src/P2/find.c ================================================ #include DL *PdlFromSwOid(SW *psw, OID oid) { return &psw->adlHash[(oid * 0x95675) & 0x1ff]; } INCLUDE_ASM("asm/nonmatchings/P2/find", MatchSwObject__FP2LOiiiT0iPiPP2LOT6); INCLUDE_ASM("asm/nonmatchings/P2/find", CploFindSwObjects__FP2SWi3OIDP2LOiPP2LO); LO *PloFindSwObject(SW *psw, GRFFSO grffso, OID oid, LO *ploContext) { LO *aplo = NULL; CploFindSwObjects(psw, grffso | FSO_ReturnActualCount, oid, ploContext, 1, &aplo); return aplo; } LO *PloFindSwNearest(SW *psw, OID oid, LO *ploContext) { LO *aplo = NULL; CploFindSwObjects(psw, FSO_ReturnActualCount | FSO_FindNearest, oid, ploContext, 1, &aplo); return aplo; } LO *PloFindSwChild(SW *psw, OID oid, ALO *paloAncestor) { LO *aplo = NULL; CploFindSwObjects(psw, FSO_ReturnActualCount | FSO_FindChild, oid, paloAncestor, 1, &aplo); return aplo; } int FIsCidDerivedFrom(CID cid, CID cidAncestor) { void **ppv = (&g_mpcidpvt)[cid]; while (ppv) { if (ppv[1] == (void *)cidAncestor) { return 1; } ppv = (void **)*ppv; } return 0; } INCLUDE_ASM("asm/nonmatchings/P2/find", CploFindSwObjectsByClass__FP2SWi3CIDP2LOiPP2LO); LO *PloFindSwObjectByClass(SW *psw, GRFFSO grffso, CID cid, LO *ploContext) { LO *aplo = NULL; CploFindSwObjectsByClass(psw, grffso | FSO_ReturnActualCount, cid, ploContext, 1, &aplo); return aplo; } ALO *PaloFindLoCommonParent(LO *plo, LO *ploOther) { while (plo) { ALO *current = (ALO *)ploOther; while (current) { if (plo == current) { return (ALO *)plo; } current = (ALO *)current->paloParent; } plo = (LO *)plo->paloParent; } return NULL; } ================================================ FILE: src/P2/flash.c ================================================ #include #include #include // NOTE: Could also belong to P2/find.c. JUNK_ADDIU(60); void InitFlash(FLASH *pflash) { InitAlo(pflash); pflash->gScaleTarget = 1.0f; pflash->gScaleCur = 1.0f; SMP *psmpScale = &pflash->smpScale; psmpScale->svFast = 1.0f; psmpScale->svSlow = 0.2f; psmpScale->dtFast = 0.1f; } void LoadFlashFromBrx(FLASH *pflash, CBinaryInputStream *pbis) { LoadAloFromBrx(pflash, pbis); LoadTbspFromBrx(pbis, &pflash->ctsurf, &pflash->atsurf, &pflash->ctbsp, &pflash->atbsp); } void UpdateFlash(FLASH *pflash, float dt) { UpdateAlo(pflash, dt); pflash->gScaleCur = GSmooth(pflash->gScaleCur, pflash->gScaleTarget, g_clock.dt, &pflash->smpScale, 0); } INCLUDE_ASM("asm/nonmatchings/P2/flash", RenderFlashSelf__FP5FLASHP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/flash", FPosFlashWithin__FP5FLASHP6VECTOR); ================================================ FILE: src/P2/fly.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/fly", InitFly__FP3FLY); INCLUDE_ASM("asm/nonmatchings/P2/fly", LoadFlyFromBrx__FP3FLYP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/fly", CloneFly__FP3FLYT0); INCLUDE_ASM("asm/nonmatchings/P2/fly", FreezeFly__FP3FLYi); INCLUDE_ASM("asm/nonmatchings/P2/fly", PostFlyLoad__FP3FLY); INCLUDE_ASM("asm/nonmatchings/P2/fly", PresetFlyAccel__FP3FLYf); INCLUDE_ASM("asm/nonmatchings/P2/fly", UpdateFly__FP3FLYf); INCLUDE_ASM("asm/nonmatchings/P2/fly", RenderFlySelf__FP3FLYP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/fly", FAbsorbFlyWkr__FP3FLYP3WKR); INCLUDE_ASM("asm/nonmatchings/P2/fly", SetFlyFlys__FP3FLY4FLYS); INCLUDE_ASM("asm/nonmatchings/P2/fly", EmitFlyDroppings__FP3FLY); INCLUDE_ASM("asm/nonmatchings/P2/fly", FFindFlyClosestLandingPos__FP3FLYP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/fly", FlysAttemptedFlyLanding__FP3FLY); INCLUDE_ASM("asm/nonmatchings/P2/fly", FShouldFlyFlee__FP3FLY); INCLUDE_ASM("asm/nonmatchings/P2/fly", FFilterFly__FPvP2SO); INCLUDE_ASM("asm/nonmatchings/P2/fly", FCheckFlyOpenSpaceBelow__FP3FLY); ================================================ FILE: src/P2/font.c ================================================ #include #include void StartupFont() { g_pfont = NULL; } INCLUDE_ASM("asm/nonmatchings/P2/font", FUN_0015c188); INCLUDE_ASM("asm/nonmatchings/P2/font", FUN_0015c1c0); INCLUDE_ASM("asm/nonmatchings/P2/font", FUN_0015c200); void CFont::CopyTo(CFont *pfontDest) { pfontDest->m_dxCharUnscaled = this->m_dxCharUnscaled; pfontDest->m_dxSpaceUnscaled = this->m_dxSpaceUnscaled; pfontDest->m_dyUnscaled = this->m_dyUnscaled; pfontDest->m_rxScale = this->m_rxScale; pfontDest->m_ryScale = this->m_ryScale; pfontDest->m_csfr = this->m_csfr; CopyAb(&pfontDest->m_asfr, &this->m_asfr, this->m_csfr * 8); pfontDest->m_fGstest = this->m_fGstest; pfontDest->m_gstest = this->m_gstest; pfontDest->m_z = this->m_z; } INCLUDE_ASM("asm/nonmatchings/P2/font", SetupDraw__5CFontP8CTextBoxP4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/font", CleanupDraw__5CFontP8CTextBoxP4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/font", DxFromPchz__5CFontPc); INCLUDE_ASM("asm/nonmatchings/P2/font", DyWrapPchz__5CFontPcf); INCLUDE_ASM("asm/nonmatchings/P2/font", ClineWrapPchz__5CFontPcf); JUNK_ADDIU(50); INCLUDE_ASM("asm/nonmatchings/P2/font", DrawPchz__5CFontPcP8CTextBoxT2P4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/font", PushScaling__5CFontff); INCLUDE_ASM("asm/nonmatchings/P2/font", PopScaling__5CFont); INCLUDE_ASM("asm/nonmatchings/P2/font", PfontClone__8CFontBrxff); INCLUDE_ASM("asm/nonmatchings/P2/font", CopyTo__8CFontBrxP8CFontBrx); INCLUDE_ASM("asm/nonmatchings/P2/font", FValid__8CFontBrxc); INCLUDE_ASM("asm/nonmatchings/P2/font", DxFromCh__8CFontBrxc); INCLUDE_ASM("asm/nonmatchings/P2/font", FEnsureLoaded__8CFontBrxP4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/font", SetupDraw__8CFontBrxP8CTextBoxP4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/font", SwitchTex0__8CFontBrxP4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/font", DxDrawCh__8CFontBrxcffUiP4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/font", FUN_0015cf70); INCLUDE_ASM("asm/nonmatchings/P2/font", DrawPart__8CFontBrxffffffffUiP4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/font", EdgeRect__8CFontBrxP9CTextEdgeP8CTextBoxP4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/font", LoadFromBrx__8CFontBrxP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/font", PostLoad__8CFontBrxP3GSB); INCLUDE_ASM("asm/nonmatchings/P2/font", PglyffFromCh__8CFontBrxc); INCLUDE_ASM("asm/nonmatchings/P2/font", __9CRichTextPcP5CFont); void CRichText::Reset() { this->m_pchCur = this->m_achz; this->m_pfontCur = this->m_pfontBase; this->m_rgbaSet = this->m_rgbaBase; this->m_rgbaCur = this->m_rgbaSet; this->m_unknown = 0; } void CRichText::SetBaseColor(RGBA *rgba) { this->m_rgbaBase = *rgba; this->m_rgbaCur = this->m_rgbaBase; } INCLUDE_ASM("asm/nonmatchings/P2/font", ChNext__9CRichText); INCLUDE_ASM("asm/nonmatchings/P2/font", Cch__9CRichText); INCLUDE_ASM("asm/nonmatchings/P2/font", Trim__9CRichTexti); INCLUDE_ASM("asm/nonmatchings/P2/font", Dx__9CRichText); INCLUDE_ASM("asm/nonmatchings/P2/font", ClineWrap__9CRichTextf); INCLUDE_ASM("asm/nonmatchings/P2/font", FUN_0015e1b0); INCLUDE_ASM("asm/nonmatchings/P2/font", DxMaxLine__9CRichText); INCLUDE_ASM("asm/nonmatchings/P2/font", GetExtents__9CRichTextPfT1f); INCLUDE_ASM("asm/nonmatchings/P2/font", Draw__9CRichTextP8CTextBoxT1P4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/font", PostFontsLoad__Fv); JUNK_WORD(0x46000802); JUNK_WORD(0x46000802); JUNK_WORD(0x46000802); JUNK_ADDIU(10); JUNK_WORD(0x0002102A); JUNK_WORD(0xAC850030); ================================================ FILE: src/P2/freeze.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/freeze", RemergeSwObject__FP2SWP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/freeze", MergeSwFreezeGroups__FP2SWP3ALOT1); INCLUDE_ASM("asm/nonmatchings/P2/freeze", SplinterSwFreezeGroup__FP2SWP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/freeze", MergeSwGroup__FP2SWP3MRG); INCLUDE_ASM("asm/nonmatchings/P2/freeze", AddSwMergeGroup__FP2SWP3MRG); INCLUDE_ASM("asm/nonmatchings/P2/freeze", RemoveFromArray__FPiPPvPv); INCLUDE_ASM("asm/nonmatchings/P2/freeze", RemoveSwMergeGroup__FP2SWP3MRG); INCLUDE_ASM("asm/nonmatchings/P2/freeze", RemergeSwObjects__FP2SW); INCLUDE_ASM("asm/nonmatchings/P2/freeze", FreezeAloHierarchy__FP3ALOi); INCLUDE_ASM("asm/nonmatchings/P2/freeze", GetAloFrozen__FP3ALOPi); INCLUDE_ASM("asm/nonmatchings/P2/freeze", FreezeAlo__FP3ALOi); INCLUDE_ASM("asm/nonmatchings/P2/freeze", FreezeSo__FP2SOi); INCLUDE_ASM("asm/nonmatchings/P2/freeze", RefreezeSwObjects__FP2SW); INCLUDE_ASM("asm/nonmatchings/P2/freeze", UpdateSwBusyList__FP2SW); ================================================ FILE: src/P2/frm.c ================================================ #include #include #include #include #include #include #include #include extern void *g_pvVu1Code; // TODO: Should these be defined here? extern SLI *g_psliCur; extern QW *g_aqwGifsBackgroundUpload; INCLUDE_ASM("asm/nonmatchings/P2/frm", VU1_Interrupt__Fi); INCLUDE_ASM("asm/nonmatchings/P2/frm", StartupFrame__Fv); INCLUDE_ASM("asm/nonmatchings/P2/frm", OpenFrame__Fv); #ifdef SKIP_ASM /** * @todo 11.12% matched. * Missing some global data definitions. */ void OpenFrame() { SetPhase(PHASE_Main); //WaitSema(DAT_002623b4); // int i = g_ifrmMax * 72; // g_ifrmMax += 1; // ... // ClearPendingFrame(g_pfrmOpen); // ... } #endif void EnsureVu1Code(VIFS *pvifs, void *pvStart, void *pvEnd) { if (g_pvVu1Code != pvStart) { g_pvVu1Code = pvStart; uint cqw = (uint)((byte *)pvEnd - (byte *)pvStart + 0x0f) >> 0x04; pvifs->AddDmaRefs(cqw, (QW *)pvStart); } } INCLUDE_ASM("asm/nonmatchings/P2/frm", FinalizeFrameVifs__FP4VIFSPiPP2QW); void FinalizeFrameGifs(GIFS *pgifs, int *pcqwGifs, QW **ppqwGifs) { pgifs->AddPrimPack(0, 1, 0x0e); pgifs->PackAD(0x61, 0); pgifs->AddPrimEnd(); pgifs->AddDmaEnd(); pgifs->Detach(pcqwGifs, ppqwGifs); } INCLUDE_ASM("asm/nonmatchings/P2/frm", CloseFrame__Fv); void PrepareGsForFrameRender(FRM *pfrm) { g_psliCur = pfrm->asli; PropagateShaders(pfrm->grfzon); if (pfrm->fBackgroundUploadRequired && g_aqwGifsBackgroundUpload) { *((volatile uint *)0x10003010) = 4; // REG_GIF_MODE sceDmaSend(g_pdcGif, g_aqwGifsBackgroundUpload); } } INCLUDE_ASM("asm/nonmatchings/P2/frm", check_anticrack_antigrab__Fv); INCLUDE_ASM("asm/nonmatchings/P2/frm", FrameRenderLoop__FPv); void RenderFrame(FRM *pfrm, int fRenderGifs) { PrepareGsForFrameRender(pfrm); SendDmaSyncGsFinish(g_pdcVif1, pfrm->aqwVifs); if (fRenderGifs) { *((volatile uint *)0x10003010) = 0; // REG_GIF_MODE SendDmaSyncGsFinish(g_pdcGif, pfrm->aqwGifs); } } INCLUDE_ASM("asm/nonmatchings/P2/frm", ClearPendingFrame__FP3FRM); INCLUDE_ASM("asm/nonmatchings/P2/frm", FlushFrames__Fi); INCLUDE_ASM("asm/nonmatchings/P2/frm", BlendPrevFrame__Fv); /** * @note These are automatically generated static initalization functions. * Once the appropriate functions are matched these can be removed. */ INCLUDE_ASM("asm/nonmatchings/P2/frm", func_0015F618); INCLUDE_ASM("asm/nonmatchings/P2/frm", func_0015F658); ================================================ FILE: src/P2/frzg.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/frzg", PostFrzgLoad__FP4FRZG); INCLUDE_ASM("asm/nonmatchings/P2/frzg", AddFrzgObject__FP4FRZG3OID); ================================================ FILE: src/P2/game.c ================================================ #include #include #include #include #include #include // I know these functions are here somewhere but I don't know which one they are. -Zac // void SetClife(int nParam) // { // g_pgsCur->clife = nParam; // } // void ClearLs(LS* pls) // { // memset(pls, 0, sizeof(LS)); // } // void SetCcoin(int nParam) // { // g_pgsCur->ccoin = nParam; // } // void OnGameLoad(GAME* pgame) // { // memset(pgame, 0, sizeof(GAME)); // } extern WORLDLEVEL g_worldlevelPrev; void StartupGame() { StartGame(); } JUNK_NOP(); JUNK_WORD(0x00E0102D); JUNK_WORD(0x0000102D); INCLUDE_ASM("asm/nonmatchings/P2/game", search_level_by_load_data); INCLUDE_ASM("asm/nonmatchings/P2/game", search_level_by_id); INCLUDE_ASM("asm/nonmatchings/P2/game", PchzFriendlyFromWid); JUNK_WORD(0x24420010); INCLUDE_ASM("asm/nonmatchings/P2/game", call_search_level_by_id); INCLUDE_ASM("asm/nonmatchings/P2/game", FFindLevel); JUNK_WORD(0x24420010); INCLUDE_ASM("asm/nonmatchings/P2/game", get_level_completion_by_id); INCLUDE_ASM("asm/nonmatchings/P2/game", tally_world_completion); INCLUDE_ASM("asm/nonmatchings/P2/game", get_game_completion__Fv); INCLUDE_ASM("asm/nonmatchings/P2/game", UnlockIntroCutsceneFromWid__Fi); #ifdef SKIP_ASM /** * @todo Close to matching but there's a problem with the rodata. */ void UnlockIntroCutsceneFromWid(int wid) { /* Check the unlocked cutscene by setting the corresponding flag on the unlocked_cutscenes in the game state */ switch (wid) { case 1: /* Unlock cutscene "Tide of Terror" */ g_pgsCur->unlocked_cutscenes = g_pgsCur->unlocked_cutscenes | 0x10; return; case 2: /* Unlock cutscene "Sunset Snake Eyes" */ g_pgsCur->unlocked_cutscenes = g_pgsCur->unlocked_cutscenes | 0x40; return; case 3: /* Unlock cutscene "Vicious Voodoo" */ g_pgsCur->unlocked_cutscenes = g_pgsCur->unlocked_cutscenes | 0x100; return; case 4: /* Unlock cutscene "Fire in the Sky" */ g_pgsCur->unlocked_cutscenes = g_pgsCur->unlocked_cutscenes | 0x400; return; case 5: /* Unlock cutscene "The Cold Heart of Hate" */ g_pgsCur->unlocked_cutscenes = g_pgsCur->unlocked_cutscenes | 0x1000; } } #endif // SKIP_ASM INCLUDE_ASM("asm/nonmatchings/P2/game", DefeatBossFromWid); INCLUDE_ASM("asm/nonmatchings/P2/game", UnlockEndgameCutscenesFromFgs); INCLUDE_ASM("asm/nonmatchings/P2/game", PlayEndingFromCompletionFlags); INCLUDE_ASM("asm/nonmatchings/P2/game", InitGameState__FP2GS); /** * @todo 86.46% matched. */ #ifdef SKIP_ASM void InitGameState(GS *pgs) { memset(pgs, 0, sizeof(GS)); pgs->gameworldCur = GAMEWORLD_Intro; pgs->grfvault = 0; pgs->gsv = 0x12; pgs->cbThis = sizeof(GS); pgs->worldlevelCur = WORLDLEVEL_Level2; pgs->clife = 5; pgs->fspLast = -1; // todo: implement function (name is wrong) // reset_settings(pgs); } #endif // SKIP_ASM INCLUDE_ASM("asm/nonmatchings/P2/game", FUN_00160650); INCLUDE_ASM("asm/nonmatchings/P2/game", SetupGame__FPci); void UpdateGameState(float dt) { g_pgsCur->dt += dt; g_pwsCur->dt += dt; g_plsCur->dt += dt; } INCLUDE_ASM("asm/nonmatchings/P2/game", LsFromWid); INCLUDE_ASM("asm/nonmatchings/P2/game", GrflsFromWid__F3WID); INCLUDE_ASM("asm/nonmatchings/P2/game", UnloadGame__Fv); #ifdef SKIP_ASM /** * @todo 60.42% matched. */ void UnloadGame() { InitGameState(g_pgsCur); // unk_gs? = NULL; // clr_8_bytes_1(&DAT_002623d8); OnDifficultyGameLoad(&g_difficulty); g_grfcht = (GRFCHT)FCHT_None; g_worldlevelPrev = WORLDLEVEL_Nil; RetryGame(); } #endif // SKIP_ASM void RetryGame() { g_pgsCur->clife = 5; // Set lives to 5 g_pgsCur->ccharm = 0; // Set charms to 0 ResetChkmgrCheckpoints(&g_chkmgr); } void StartGame() { UnloadGame(); WipeToWorldWarp(D_00247AB0, OID_Nil, WIPEK_Fade); } INCLUDE_ASM("asm/nonmatchings/P2/game", FUN_00160948); INCLUDE_ASM("asm/nonmatchings/P2/game", CalculatePercentCompletion__FP2GS); #ifdef SKIP_ASM PchzLevel pchzLevelTable[0x2e]; /** * @todo 59.54% matched. */ int CalculatePercentCompletion(GS *pgs) { int cTasksChecked = 0; int cTasksCompleted = 0; // Iterate over all the levels in the PchzLevel table for (int i = 0; i < 0x2e; i++) { int levelId = *(int*)&((pchzLevelTable[0].level_id)) + i * sizeof(PchzLevel); int world = levelId >> 8; // if world is part of Intro (ie. Splash, Paris, Hideout), skip it if (world != static_cast(GAMEWORLD_Intro)) { // get all tasks for the current level int levelTasks = static_cast(pchzLevelTable[0].tasks) + i; // get save data for the current level LS* currLs = pgs->aws[world].als + (levelId & 0xff); int currFls = (int)(currLs->fls); // check if the level is visited cTasksChecked++; cTasksCompleted = cTasksCompleted + (currFls & (int)(FLS_Visited)); /* Loop over the bits in the FLS cmp and count how many are set, * but only if those bits are also set in the level_tasks the pchz table */ int flsMask = static_cast(FLS_KeyCollected); int tasksToCheck = (int)(levelTasks) & (int)(FLS_KeyCollected); while ((flsMask & ((int)(FLS_KeyCollected) | (int)(FLS_Secondary) | (int)(FLS_Tertiary))) != 0) { if (tasksToCheck != 0) { cTasksChecked++; if ((currFls & flsMask) != 0) { cTasksCompleted++; } } flsMask = flsMask << 1; tasksToCheck = levelTasks & flsMask; } } } FWS* pCurrFws = &pgs->aws[1].fws; int i = 4; while (i > -1) { FWS fws_cmp = static_cast(*pCurrFws); cTasksChecked++; pCurrFws += 1; i--; if (((int)(fws_cmp) & 0x20) != 0) { cTasksCompleted++; } } /* This check ensures we only calculate the % if we have to. * * If cTasksCompleted is 0, finalPercent is left as 0 and * the if block is skipped. * * If cTasksCompleted == cTasksChecked (ie. all tasks are completed), * finalPercent is set to 100 and the if block is skipped. * * In all other cases, the if block sets finalPercent to a calculated value. */ int finalPercent = 0; if ((cTasksCompleted != 0) && (finalPercent = 100, cTasksCompleted != cTasksChecked)) { // if cTasksChecked is 0 then something has gone wrong if (cTasksChecked == 0) { return -1; } // convert the number of tasks completed to a value between 1 and 100 int percent = (cTasksCompleted * 100) / cTasksChecked; /* This check accounts for integer division errors. * * If cTasksChecked is <= 0, finalPercent is left as 1 and the * if block is skipped because we already know we have completed at least * one task. * * If the calclated percent is >= 100, finalPercent is set to 99 and the * if block is skipped because we already know all tasks are not complete. * * In all other cases, finalPercent is set to the calculated percent. */ finalPercent = 1; if ((cTasksChecked > 0) && (finalPercent = 99, percent < 100)) { finalPercent = percent; } } return finalPercent; } #endif // SKIP_ASM void SetCcharm(int ccharm) { g_pgsCur->ccharm = ccharm; } /** * @todo 77.50% matched. */ bool FCharmAvailable() { return (g_pgsCur->ccharm > 0) || (g_grfcht & (GRFCHT)FCHT_InfiniteCharms); } INCLUDE_ASM("asm/nonmatchings/P2/game", FUN_00160C90); int PfLookupDialog(LS *pls, OID oidDialog) { // todo figure out what these magic numbers represent if (oidDialog - 0x33bU >= 0xc) { return 0; } return -0xcd8 + (int)pls + (oidDialog * 4); } // TODO: Come up with a name and mangle it. void *clr_8_bytes_1(void *pv) { return memset(pv, 0, 8); } void FUN_00160ce8(int param_1) { STRUCT_OFFSET(param_1, 4, undefined4) = 0; } void OnGameAlarmTriggered(GAME *pgame) { pgame->cAlarmsTriggered++; } void OnGameAlarmDisabled(GAME *pgame) { pgame->cAlarmsTriggered--; } GRFVAULT GetGrfvault_unknown() { return g_pgsCur->grfvault & STRUCT_OFFSET(g_psw, 0x235c, GRFVAULT); } INCLUDE_ASM("asm/nonmatchings/P2/game", GetBlueprintInfo__FPiT0); #ifdef SKIP_ASM /** * @todo 97.65% matched * https://decomp.me/scratch/l86al */ void GetBlueprintInfo(int *pgrfvault, int *pipdialog) { switch (g_pgsCur->gameworldCur) { case GAMEWORLD_Snow: pipdialog = (int *)0x00000000; break; case GAMEWORLD_Intro: pipdialog = (int *)0x10000000; break; case GAMEWORLD_Clockwerk: pipdialog = (int *)0x20000000; break; case GAMEWORLD_Underwater: pipdialog = (int *)0x40000000; break; case GAMEWORLD_Muggshot: pipdialog = (int *)0x60000000; break; case GAMEWORLD_Voodoo: pipdialog = (int *)0x60000000; break; default: pipdialog = (int *)0x00000000; break; } if (pgrfvault) { *pgrfvault = (int)pipdialog; } } #endif // SKIP_ASM int CcharmMost() { // Leftover from when there was a powerup that increased the charm limit. return 2; } INCLUDE_ASM("asm/nonmatchings/P2/game", reload_post_death); ================================================ FILE: src/P2/geom.c ================================================ #include void InitGeom(GEOM *pgeom) { pgeom->cpos = 0; pgeom->apos = NULL; pgeom->csurf = 0; pgeom->asurf = NULL; pgeom->cedge = 0; pgeom->aedge = NULL; } INCLUDE_ASM("asm/nonmatchings/P2/geom", CloneGeom__FP4GEOMP7MATRIX4T0); INCLUDE_ASM("asm/nonmatchings/P2/geom", FUN_00161028); ================================================ FILE: src/P2/gifs.c ================================================ #include /** * @todo 100% match, but checksum check fails. */ INCLUDE_ASM("asm/nonmatchings/P2/gifs", __4GIFS); /* GIFS::GIFS() { m_fEndPrim = 1; m_pqwPrim = 0; m_creg = 0; m_cregAll = 0; } */ INCLUDE_ASM("asm/nonmatchings/P2/gifs", AddPrimEnd__4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/gifs", EndPrim__4GIFSi); void GIFS::CheckReg(int fExpectPack, int regExpect) { m_cregAll++; } INCLUDE_ASM("asm/nonmatchings/P2/gifs", AddPrimBulk__4GIFSiiiUlPP2QW); INCLUDE_ASM("asm/nonmatchings/P2/gifs", AddPrimPack__4GIFSiiUl); void GIFS::PackRGBA(uint rgba) { CheckReg(1, 1); QW *pqw = ((QW *)m_pb)++; pqw->aun[0] = (rgba) & 0xff; pqw->aun[1] = (rgba & 0xff00) >> 8; pqw->aun[2] = (rgba >> 16) & 0xff; pqw->aun[3] = (rgba >> 24) & 0xff; } void GIFS::PackUV(int u, int v) { CheckReg(1, 3); QW *pqw = ((QW *)m_pb)++; pqw->an[0] = u; pqw->an[1] = v; } INCLUDE_ASM("asm/nonmatchings/P2/gifs", PackSTQ__4GIFSfff); void GIFS::PackXYZ(int x, int y, int z) { CheckReg(1, 5); QW *pqw = ((QW *)m_pb)++; pqw->an[0] = x; pqw->an[1] = y; pqw->al[1] = z; } void GIFS::PackXYZF(int x, int y, int z, int fog) { CheckReg(1, 4); QW *pqw = ((QW *)m_pb)++; pqw->an[0] = x; pqw->an[1] = y; pqw->an[2] = z; pqw->an[3] = (fog & 0xff) << 4; } INCLUDE_ASM("asm/nonmatchings/P2/gifs", PackXYZFNoKick__4GIFSiiii); void GIFS::PackAD(long int a, long int d) { CheckReg(1, 14); QW *pqw = ((QW *)m_pb)++; pqw->aul[0] = d; pqw->aul[1] = a; } JUNK_ADDIU(30); INCLUDE_ASM("asm/nonmatchings/P2/gifs", AddPrimList__4GIFSiUl); INCLUDE_ASM("asm/nonmatchings/P2/gifs", ListRGBAQ__4GIFSUif); JUNK_ADDIU(30); INCLUDE_ASM("asm/nonmatchings/P2/gifs", ListUV__4GIFSii); INCLUDE_ASM("asm/nonmatchings/P2/gifs", ListXYZF__4GIFSiiii); JUNK_ADDIU(80); INCLUDE_ASM("asm/nonmatchings/P2/gifs", AddImage__4GIFSi); ================================================ FILE: src/P2/glbs.c ================================================ #include #include #include INCLUDE_ASM("asm/nonmatchings/P2/glbs", __4GLBS); GLBS::~GLBS() { return; } void GLBS::SetTransform(VECTOR *ppos, MATRIX3 *pmat) { EndStrip(); LoadMatrixFromPosRot(ppos, pmat, &m_rgld.matObjectToWorld); LoadMatrixFromPosRotInverse(ppos, pmat, &m_rgld.matWorldToObject); } void GLBS::FindLights(VECTOR *ppos, float sRadius) { if (m_pshd->shdk != SHDK_ThreeWay) { m_cplightStatic = 0; m_cplightAll = 0; m_rgld.trlk = TRLK_Nil; return; } m_rgld.twps = TwpsFindSwLights(g_psw, ppos, sRadius, 1, 0x10, &m_cplightStatic, &m_cplightAll, m_aplight); m_rgld.trlk = TRLK_Quick; } void GLBS::ResetStrip() { m_pshd = NULL; m_cvtxg = 0; memset(m_avtxg, 0, 148 * sizeof(VTXG)); } INCLUDE_ASM("asm/nonmatchings/P2/glbs", BeginStrip__4GLBSP3SHD); INCLUDE_ASM("asm/nonmatchings/P2/glbs", DrawPrelit__4GLBS); INCLUDE_ASM("asm/nonmatchings/P2/glbs", DrawThreeWay__4GLBS); INCLUDE_ASM("asm/nonmatchings/P2/glbs", EndStrip__4GLBS); INCLUDE_ASM("asm/nonmatchings/P2/glbs", SetNormal__4GLBSP6VECTOR); JUNK_WORD(0xE4800110); INCLUDE_ASM("asm/nonmatchings/P2/glbs", SetRgba__4GLBSG4RGBA); INCLUDE_ASM("asm/nonmatchings/P2/glbs", SetUv__4GLBSP3UVF); INCLUDE_ASM("asm/nonmatchings/P2/glbs", AddVtx__4GLBSi); ================================================ FILE: src/P2/glob.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/glob", BuildGlobsetSaaArray__FP7GLOBSET); INCLUDE_ASM("asm/nonmatchings/P2/glob", LoadGlobsetFromBrx__FP7GLOBSETP18CBinaryInputStreamP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/glob", EnsureBuffer__FiP4VIFS); INCLUDE_ASM("asm/nonmatchings/P2/glob", EnsureBufferCel__FiP4VIFS); INCLUDE_ASM("asm/nonmatchings/P2/glob", BuildSubcel__FP7GLOBSETiP6SUBCELiP7VECTORFiP4TWEFP8SUBPOSEFT4PfP4VIFS); INCLUDE_ASM("asm/nonmatchings/P2/glob", BuildSubglobSinglePass__FP7GLOBSETP4GLOBiP7SUBGLOBP3SHDP7VECTORFT5P4RGBAP3UVFiP4VTXFP8SUBPOSEFT5T5PfP4VIFSP4SGVR); INCLUDE_ASM("asm/nonmatchings/P2/glob", BuildSubglobThreeWay__FP7GLOBSETP4GLOBiP7SUBGLOBP3SHDP7VECTORFT5P4RGBAP3UVFiP4VTXFP8SUBPOSEFT5T5PfP4VIFSP4SGVR); INCLUDE_ASM("asm/nonmatchings/P2/glob", BuildSubglobLighting__FP4GLOBP7SUBGLOBP8SUBGLOBI); INCLUDE_ASM("asm/nonmatchings/P2/glob", PostGlobsetLoad__FP7GLOBSETP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/glob", BindGlobset__FP7GLOBSETP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/glob", CloneGlobset__FP7GLOBSETP3ALOT0); INCLUDE_ASM("asm/nonmatchings/P2/glob", CloneGlob__FP7GLOBSETP4GLOBP5GLOBI); INCLUDE_ASM("asm/nonmatchings/P2/glob", UpdateGlobset__FP7GLOBSETP3ALOf); INCLUDE_ASM("asm/nonmatchings/P2/glob", UpdateAloConstraints__FP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/glob", UpdateAloInfluences__FP3ALOP2RO); INCLUDE_ASM("asm/nonmatchings/P2/glob", PredrawGlob__FP7GLOBSETP4GLOBP5GLOBIP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/glob", RotateVu1Buffer__Fv); INCLUDE_ASM("asm/nonmatchings/P2/glob", DrawGlob__FP3RPL); INCLUDE_ASM("asm/nonmatchings/P2/glob", glob__static_initialization_and_destruction_0); INCLUDE_ASM("asm/nonmatchings/P2/glob", _GLOBAL_$I$g_dro); ================================================ FILE: src/P2/gomer.c ================================================ #include #include #include #include #include #include #include #include #include #define PI 3.1415927f void InitGomer(GOMER *pgomer) { InitStepguard(pgomer); STRUCT_OFFSET(pgomer, 0xC20, float) = 1000.0f; STRUCT_OFFSET(pgomer, 0xC24, float) = 1500.0f; STRUCT_OFFSET(pgomer, 0xC28, float) = PI / 4.0f; STRUCT_OFFSET(pgomer, 0xC2C, float) = PI; STRUCT_OFFSET(pgomer, 0xC10, float) = 2000.0f; STRUCT_OFFSET(pgomer, 0xC30, OID) = OID_Nil; STRUCT_OFFSET(pgomer, 0xC14, float) = 300.0f; STRUCT_OFFSET(pgomer, 0xC18, OID) = OID_Nil; STRUCT_OFFSET(pgomer, 0x73C, float) = 300.0f; STRUCT_OFFSET(pgomer, 0x738, int) = 0; STRUCT_OFFSET(pgomer, 0x74C, float) = PI / 3.0f; } void PostGomerLoad(GOMER *pgomer) { PostStepguardLoad(pgomer); // If OID at 0xC18 is not NIL, find nearest LO of OID at 0xc18, and save it to 0xC1C. if (STRUCT_OFFSET(pgomer, 0xC18, OID) != OID_Nil) { STRUCT_OFFSET(pgomer, 0xC1C, LO *) = PloFindSwNearest( pgomer->psw, STRUCT_OFFSET(pgomer, 0xC18, OID), pgomer); } // If OID at 0xC30 is not NIL, find nearest LO of OID at 0xc30, and save it to 0xC34. if (STRUCT_OFFSET(pgomer, 0xC30, OID) != OID_Nil) { STRUCT_OFFSET(pgomer, 0xC34, LO *) = PloFindSwNearest( pgomer->psw, STRUCT_OFFSET(pgomer, 0xC30, OID), pgomer); } // If aseg pointer at 0x750 is null, skip waypoint collection. if (!STRUCT_OFFSET(pgomer, 0x750, ASEG *)) { return; } InitStackImpl(); // Collect aseg waypoints. WAYPOINT **apwaypoint; int cpwaypoint; GetAsegWaypoints(STRUCT_OFFSET(pgomer, 0x750, ASEG *), pgomer, &cpwaypoint, &apwaypoint); for (int i = 0; i < cpwaypoint; i++) { WAYPOINT *waypoint = apwaypoint[i]; if (!STRUCT_OFFSET(waypoint, 0x328, WPSG *)) { WPSG *newwpsg = PwpsgNew(); STRUCT_OFFSET(waypoint, 0x328, WPSG *) = newwpsg; AddWpsgWaypoint(newwpsg, (WAYPOINT *)waypoint); } } FreeStackImpl(); } void RenderGomerSelf(GOMER *pgomer, CM *pcm, RO *pro) { RenderStepguardSelf(pgomer, pcm, pro); } INCLUDE_ASM("asm/nonmatchings/P2/gomer", FDetectGomer__FP5GOMER); #ifdef SKIP_ASM extern float func_001C7A60(GOMER *pgomer); extern int func_001CB3D0(GOMER *pgomer); /** * @todo 52.12% matched. */ int FDetectGomer(GOMER *pgomer) { if (!pgomer->psw) { return 0; } GOMERS gomers = STRUCT_OFFSET(pgomer, 0x724, GOMERS); if (gomers == (GOMERS)0x10 || gomers == (GOMERS)0x08) { return 0; } // Call func at pvtgomer->0x198 to get pbasic. VT *pvtgomer = STRUCT_OFFSET(pgomer, 0x0, VT *); void *fp = STRUCT_OFFSET(pvtgomer, 0x198, void *); void *(*fn)(GOMER *) = (void *(*)(GOMER *))fp; void *pbasic = fn(pgomer); // If C40 flag set, or basic is null, clear latch and return 0. if (!STRUCT_OFFSET(pgomer, 0xC40, int) || !pbasic) { STRUCT_OFFSET(pgomer, 0xC38, int) = 0; return 0; } if (pbasic && FIsBasicDerivedFrom((BASIC *)pbasic, (CID)5)) // CID_PO? { // If basic derived from CID 5, call method at pvt???->0x144 and check for return == 2. VTBASIC *pvtbasic = STRUCT_OFFSET(pbasic, 0x0, VTBASIC *); void *fp2 = STRUCT_OFFSET(pvtbasic, 0x144, void *); int (*getState)(void *) = (int (*)(void *))fp2; if (getState(pbasic) == 2) { STRUCT_OFFSET(pgomer, 0xC38, int) = 0; return 0; } } // If exclude volume at 0xC1C exists, and point NOT inside it, clear C38 and return 0. if (STRUCT_OFFSET(pgomer, 0xC1C, void *)) { VOL *vol = STRUCT_OFFSET(pgomer, 0xC1C, VOL *); int inside = FCheckVolPoint(vol, &STRUCT_OFFSET(pbasic, 0x140, VECTOR)); if (!inside) { STRUCT_OFFSET(pgomer, 0xC38, int) = 0; return 0; } } else { // Vertical threshold then 2D XY distance check against C10 using pbasic@0x140 vs pgomer@0x190. float vert_diff; float vth; float dx; float dy; float dist; float *tpos; float *gpos2; vert_diff = STRUCT_OFFSET(pbasic, 0x148, float) - STRUCT_OFFSET(pgomer, 0x198, float); if (vert_diff < 0.0f) { vert_diff = -vert_diff; } vth = STRUCT_OFFSET(pgomer, 0xC14, float); if (vert_diff > vth) { STRUCT_OFFSET(pgomer, 0xC38, int) = 0; return 0; } tpos = &STRUCT_OFFSET(pbasic, 0x140, float); gpos2 = &STRUCT_OFFSET(pgomer, 0x190, float); dx = tpos[0] - gpos2[0]; dy = tpos[1] - gpos2[1]; /* sqrtf prototype (avoid including headers) */ { extern float sqrtf(float); dist = sqrtf(dx * dx + dy * dy); } if (dist > STRUCT_OFFSET(pgomer, 0xC10, float)) { STRUCT_OFFSET(pgomer, 0xC38, int) = 0; return 0; } } /* Second-phase: if already latched (C38!=0), return 1 */ if (STRUCT_OFFSET(pgomer, 0xC38, int)) { return 1; } /* If include volume at 0xC34 exists and point inside, skip straight to final checks */ if (STRUCT_OFFSET(pgomer, 0xC34, void *)) { int inside2 = FCheckVolPoint(STRUCT_OFFSET(pgomer, 0xC34, VOL *), &STRUCT_OFFSET(pbasic, 0x140, VECTOR)); if (inside2) { if (func_001CB3D0(pgomer)) { return 0; } STRUCT_OFFSET(pgomer, 0xC38, int) = 1; return 1; } } /* Range gating using positions at 0x140 for both */ float *gpos; float *tpos2; float dx2; float dy2; float dist2; float outer; gpos = &STRUCT_OFFSET(pgomer, 0x140, float); tpos2 = &STRUCT_OFFSET(pbasic, 0x140, float); dx2 = gpos[0] - tpos2[0]; dy2 = gpos[1] - tpos2[1]; { extern float sqrtf(float); dist2 = sqrtf(dx2 * dx2 + dy2 * dy2); } outer = STRUCT_OFFSET(pgomer, 0xC24, float); if (!(dist2 < outer)) { return 0; } float inner; float angle_min; float angle_max; float f20; float a; inner = STRUCT_OFFSET(pgomer, 0xC20, float); if (dist2 < inner) { f20 = STRUCT_OFFSET(pgomer, 0xC2C, float); } else { float one; float num; float den; float t; one = 1.0f; angle_max = STRUCT_OFFSET(pgomer, 0xC2C, float); angle_min = STRUCT_OFFSET(pgomer, 0xC28, float); num = dist2 - inner; den = outer - inner; if (den != 0.0f) { t = num / den; } else { t = 0.0f; } f20 = t * angle_min + (one - t) * angle_max; } a = func_001C7A60(pgomer); if (a < 0.0f) { a = -a; } if (a <= f20) { return 0; } if (func_001CB3D0(pgomer)) { return 0; } STRUCT_OFFSET(pgomer, 0xC38, int) = 1; return STRUCT_OFFSET(pgomer, 0xC38, int); } #endif ================================================ FILE: src/P2/gs.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/gs", BlendDisplayOnBufferMismatch__Fv); INCLUDE_ASM("asm/nonmatchings/P2/gs", VBlankS_Interrupt__Fi); INCLUDE_ASM("asm/nonmatchings/P2/gs", SyncVBlank__Fv); INCLUDE_ASM("asm/nonmatchings/P2/gs", SwapGsBuffers__Fv); INCLUDE_ASM("asm/nonmatchings/P2/gs", RestoreGsBuffers__Fv); INCLUDE_ASM("asm/nonmatchings/P2/gs", GS_Interrupt__Fi); INCLUDE_ASM("asm/nonmatchings/P2/gs", ResetGs__Fv); INCLUDE_ASM("asm/nonmatchings/P2/gs", SendDmaSyncGsFinish__FP10sceDmaChanP2QW); INCLUDE_ASM("asm/nonmatchings/P2/gs", BuildClearGifs__FP2QWG4RGBAi); INCLUDE_ASM("asm/nonmatchings/P2/gs", StartupGs__Fv); INCLUDE_ASM("asm/nonmatchings/P2/gs", BlastAqwGifsBothFrames__FP2QW); INCLUDE_ASM("asm/nonmatchings/P2/gs", ClearFrameBuffers__Fv); INCLUDE_ASM("asm/nonmatchings/P2/gs", FadeFramesToBlack__Ff); INCLUDE_ASM("asm/nonmatchings/P2/gs", ResetGsMemory__Fv); uint NLog2(uint value) { uint log2 = 0; uint bit = 1; while (bit < value && log2 < 31) { bit <<= 1; log2++; } return log2; } void InitGsb(GSB *pgsb, int igsMin, int igsMax) { pgsb->igsMac = igsMin; pgsb->igsMin = igsMin; pgsb->igsMax = igsMax; } void ResetGsb(GSB *pGsb) { pGsb->igsMac = pGsb->igsMin; } int IgsAllocGsb(GSB *pgsb, int iCount) { int igsOld = pgsb->igsMac; pgsb->igsMac += iCount; return igsOld; } INCLUDE_ASM("asm/nonmatchings/P2/gs", BuildImageGifs__FiiiiiiP4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/gs", BuildClutTex2__FP4CLUTi); INCLUDE_ASM("asm/nonmatchings/P2/gs", BuildClutGifs__FP4CLUTiP4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/gs", BuildBmpTex0__FP3BMPi); INCLUDE_ASM("asm/nonmatchings/P2/gs", BuildBmpGifs__FP3BMPiP4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/gs", FBuildUploadBitmapGifs__FiP3GSBP4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/gs", UploadBitmaps__FiP3GSB); INCLUDE_ASM("asm/nonmatchings/P2/gs", PqwGifsBitmapUpload__Fi); INCLUDE_ASM("asm/nonmatchings/P2/gs", PropagateSur__FP3SUR); INCLUDE_ASM("asm/nonmatchings/P2/gs", ReferenceShaderAqwRegs__FP3SHDP4SHDPP2QWiiP3SAI); INCLUDE_ASM("asm/nonmatchings/P2/gs", ReferenceUVAnimation__FP2QWiP3SAI); INCLUDE_ASM("asm/nonmatchings/P2/gs", RebaseSurs__FiiPvT2); INCLUDE_ASM("asm/nonmatchings/P2/gs", PropagateSurs__Fv); INCLUDE_ASM("asm/nonmatchings/P2/gs", PqwVifsBitmapUpload__Fi); INCLUDE_ASM("asm/nonmatchings/P2/gs", DrawOnBitmap__FP3BMPP4GIFS); ================================================ FILE: src/P2/hide.c ================================================ #include #include extern DL g_dlHshape; extern DL g_dlHpnt; extern DL g_dlHbsk; void StartupHide() { InitDl(&g_dlHshape, 0x38); InitDl(&g_dlHpnt, 0x50); InitDl(&g_dlHbsk, 0x558); } INCLUDE_ASM("asm/nonmatchings/P2/hide", ResetHideList__Fv); INCLUDE_ASM("asm/nonmatchings/P2/hide", InitHshape__FP6HSHAPE); INCLUDE_ASM("asm/nonmatchings/P2/hide", OnHshapeAdd__FP6HSHAPE); INCLUDE_ASM("asm/nonmatchings/P2/hide", OnHshapeRemove__FP6HSHAPE); INCLUDE_ASM("asm/nonmatchings/P2/hide", BindHshape__FP6HSHAPE); INCLUDE_ASM("asm/nonmatchings/P2/hide", CloneHshape__FP6HSHAPET0); INCLUDE_ASM("asm/nonmatchings/P2/hide", GetHshapeHidePos__FP6HSHAPEfP6VECTORPf); INCLUDE_ASM("asm/nonmatchings/P2/hide", GetHshapeClosestHidePos__FP6HSHAPEPfP6VECTORT1); INCLUDE_ASM("asm/nonmatchings/P2/hide", InitHpnt__FP4HPNT); INCLUDE_ASM("asm/nonmatchings/P2/hide", OnHpntAdd__FP4HPNT); INCLUDE_ASM("asm/nonmatchings/P2/hide", OnHpntRemove__FP4HPNT); INCLUDE_ASM("asm/nonmatchings/P2/hide", BindHpnt__FP4HPNT); INCLUDE_ASM("asm/nonmatchings/P2/hide", CloneHpnt__FP4HPNTT0); INCLUDE_ASM("asm/nonmatchings/P2/hide", GetHpntClosestHidePos__FP4HPNTP6VECTORPf); INCLUDE_ASM("asm/nonmatchings/P2/hide", FUN_0016a320); INCLUDE_ASM("asm/nonmatchings/P2/hide", InitHbsk__FP4HBSK); INCLUDE_ASM("asm/nonmatchings/P2/hide", LoadHbskFromBrx__FP4HBSKP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/hide", OnHbskAdd__FP4HBSK); INCLUDE_ASM("asm/nonmatchings/P2/hide", OnHbskRemove__FP4HBSK); INCLUDE_ASM("asm/nonmatchings/P2/hide", CloneHbsk__FP4HBSKT0); INCLUDE_ASM("asm/nonmatchings/P2/hide", FIgnoreHbskIntersection__FP4HBSKP2SO); INCLUDE_ASM("asm/nonmatchings/P2/hide", PresetHbskAccel__FP4HBSKf); INCLUDE_ASM("asm/nonmatchings/P2/hide", SetHbskHbsks__FP4HBSK5HBSKS); INCLUDE_ASM("asm/nonmatchings/P2/hide", CdartStuckHbsk__FP4HBSK); INCLUDE_ASM("asm/nonmatchings/P2/hide", PdartOldestHbskStuck__FP4HBSK); INCLUDE_ASM("asm/nonmatchings/P2/hide", GetHbskClosestHidePos__FP4HBSKP6VECTORPf); ================================================ FILE: src/P2/hnd.c ================================================ #include extern float D_0024A7DC; void InitHnd(HND *phnd) { InitTarget(phnd); float val = D_0024A7DC; STRUCT_OFFSET(phnd, 0x88, int) = 1; // phnd->grftak STRUCT_OFFSET(phnd, 0xa8, int) = 8; // Likely phnd->sfxidRelease STRUCT_OFFSET(phnd, 0xac, int) = 9; // Likely phnd->sfxidGrab STRUCT_OFFSET(phnd, 0xb4, float) = val; } /** * @todo Objdiff reports a 100% match, but checksum check still fails. */ INCLUDE_ASM("asm/nonmatchings/P2/hnd", LoadHndFromBrx__FP3HNDP18CBinaryInputStream); #ifdef SKIP_ASM void LoadHndFromBrx(HND *phnd, CBinaryInputStream *pbis) { LoadXfmFromBrx(phnd, pbis); } #endif // SKIP_ASM JUNK_ADDIU(A0); JUNK_ADDIU(E0); ================================================ FILE: src/P2/ik.c ================================================ #include void RenderIkhSelf(IKH *pikh, CM *pcm, RO *pro) { RenderSoSelf(pikh, pcm, pro); } void RenderLikhSelf(LIKH *plikh, CM *pcm, RO *pro) { RenderAloSelf(plikh, pcm, pro); } INCLUDE_ASM("asm/nonmatchings/P2/ik", SolveAloIK__FP3ALO); ================================================ FILE: src/P2/jlo.c ================================================ #include #include extern JLO *g_pjloCur; extern VECTOR g_normalZ; // TODO: This should be elsewhere. void InitJlo(JLO *pjlo) { InitSo(pjlo); STRUCT_OFFSET(pjlo, 0x578, JLOS) = JLOS_Nil; // pjlo->jlos STRUCT_OFFSET(pjlo, 0x598, OID) = OID_Nil; // pjlo->oidJlovolStart STRUCT_OFFSET(pjlo, 0x5c4, float) = 3000.0f; STRUCT_OFFSET(pjlo, 0x5c8, float) = 1000.0f; InitDl(&STRUCT_OFFSET(pjlo, 0x55c, DL), 0x7b0); // pjlo->dlJlovol SMP *psmp = &STRUCT_OFFSET(pjlo, 0x5b0, SMP); STRUCT_OFFSET(psmp, 0x00, float) = 25.0f; // pjlo->smpSpin.ag[0] STRUCT_OFFSET(psmp, 0x04, float) = 0.0f; // pjlo->smpSpin.svSlow STRUCT_OFFSET(psmp, 0x08, float) = 0.25f; // pjlo->smpSpin.dtFast g_pjloCur = NULL; } INCLUDE_ASM("asm/nonmatchings/P2/jlo", LoadJloFromBrx__FP3JLOP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/jlo", PostJloLoad__FP3JLO); INCLUDE_ASM("asm/nonmatchings/P2/jlo", FUN_0016d040); void PresetJloAccel(JLO *pjlo, float dt) { PresetSoAccel(pjlo, dt); if (STRUCT_OFFSET(pjlo, 0x5d8, int) == 0) { MATRIX3 matTarget; LoadRotateMatrixRad(STRUCT_OFFSET(pjlo, 0x5a0, float), &g_normalZ, &matTarget); AccelSoTowardMatSmooth(pjlo, dt, &matTarget, &STRUCT_OFFSET(pjlo, 0x5b0, SMP)); } } INCLUDE_ASM("asm/nonmatchings/P2/jlo", UpdateJlo__FP3JLOf); INCLUDE_ASM("asm/nonmatchings/P2/jlo", JlosNextJlo__FP3JLO); INCLUDE_ASM("asm/nonmatchings/P2/jlo", SetJloJlovol__FP3JLOP6JLOVOL); INCLUDE_ASM("asm/nonmatchings/P2/jlo", FireJlo__FP3JLO); INCLUDE_ASM("asm/nonmatchings/P2/jlo", LandJlo__FP3JLO); INCLUDE_ASM("asm/nonmatchings/P2/jlo", JumpJlo__FP3JLO); INCLUDE_ASM("asm/nonmatchings/P2/jlo", FUN_0016d928); INCLUDE_ASM("asm/nonmatchings/P2/jlo", FUN_0016d9a8); INCLUDE_ASM("asm/nonmatchings/P2/jlo", HandleJloMessage__FP3JLO5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/jlo", SetJloJlos__FP3JLO4JLOS); void ActivateJlo(JLO *pjlo) { g_pjloCur = pjlo; } void DeactivateJlo(JLO *pjlo) { g_pjloCur = NULL; } INCLUDE_ASM("asm/nonmatchings/P2/jlo", InitJloc__FP4JLOC); INCLUDE_ASM("asm/nonmatchings/P2/jlo", LoadJlocFromBrx__FP4JLOCP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/jlo", PostJlocLoad__FP4JLOC); INCLUDE_ASM("asm/nonmatchings/P2/jlo", PxfmChooseJloc__FP4JLOC); void InitJlovol(JLOVOL *pjlovol) { InitVolbtn(pjlovol); STRUCT_OFFSET(pjlovol, 0x7a0, OID) = OID_Nil; // pjlovol->oidJloc STRUCT_OFFSET(pjlovol, 0x7a8, OID) = OID_Nil; // pjlovol->oidLand STRUCT_OFFSET(pjlovol, 0x6e8, float) = 0.0f; // pjlovol->btn.dtRepush } INCLUDE_ASM("asm/nonmatchings/P2/jlo", BindJlovol__FP6JLOVOL); INCLUDE_ASM("asm/nonmatchings/P2/jlo", HandleJlovolMessage__FP6JLOVOL5MSGIDPv); ================================================ FILE: src/P2/joy.c ================================================ #include #include #include #include #include #include #include #include #include #include // static char g_chzThePasswordIs[] = "The password is: %s"; // static char g_chzCiphertext[] = "@KFWHJGL"; // decrypts to "chetkido" extern char g_chzThePasswordIs[]; extern char g_chzCiphertext[]; void StartupJoy() { UpdateGrfjoytFromGrfusr(); scePadInit(0); InitJoy(&g_joy, 0, 0); } void AddGrfusr(int mask) { g_grfusr |= mask; UpdateGrfjoytFromGrfusr(); } void RemoveGrfusr(int mask) { g_grfusr &= ~mask; UpdateGrfjoytFromGrfusr(); } void UpdateGrfjoytFromGrfusr() { if (g_grfusr & 0x84) { // Unknown state g_grfjoyt = 0; } else if (g_grfusr & FUSR_Menu) { // Pause menu/dialog box is open g_grfjoyt = 5; } else if (g_grfusr & FUSR_HandsOff) { // In-game cutscene/transition/animation is playing g_grfjoyt = 4; } else { // Game is running normally g_grfjoyt = 7; } } // todo: investigate if aullDma assignment can be cleaned up when type is known void InitJoy(JOY *pjoy, int nPort, int nSlot) { memset(pjoy, 0, sizeof(JOY)); SetJoyJoys(pjoy, JOYS_Searching, JOYK_Unknown); pjoy->nPort = nPort; pjoy->nSlot = nSlot; pjoy->aullDma = (uint *)(((int)PvAllocGlobalImpl(0x140) + 0x3F) & ~0x3F); scePadPortOpen(pjoy->nPort, pjoy->nSlot, pjoy->aullDma); pjoy->prumble = (RUMBLE *)PvAllocGlobalImpl(0x20); pjoy->fRumbleEnabled = true; } INCLUDE_ASM("asm/nonmatchings/P2/joy", UpdateJoy__FP3JOY); #ifdef SKIP_ASM /** * @todo 31.94% matched. */ void UpdateJoy(JOY *pjoy) { bool cond = false; JOYS joysNew; JOYK joykNew, joyk; uint padState; // if the joy manager is initializing, early return if (pjoy->joys == JOYS_Initing) return; padState = scePadGetState(pjoy->nPort, pjoy->nSlot); if (padState == 6 || padState == 2) // todo: enum for padState { cond = true; // todo: what is this condition? } joysNew = pjoy->joys; if (joysNew != JOYS_Ready) { if (pjoy->joyk != JOYK_Unknown) { if (g_clock.tReal - pjoy->tJoys >= 2.0f) { padState = 0; } } } if (pjoy->joyk != JOYK_Unknown && padState == 0) { SetJoyJoys(pjoy, JOYS_Searching, JOYK_Unknown); } // Return if condition not met if (!cond) return; joysNew = pjoy->joys; joykNew = pjoy->joyk; if (joysNew == JOYS_Waiting) { padState = scePadGetState(pjoy->nPort, pjoy->nSlot); if (padState != '\x01') { if (padState > '\x01') { if (padState != '\x02') { joykNew = JOYK_Unknown; } SetJoyJoys(pjoy, joysNew, joykNew); return; } joykNew = JOYK_Unknown; if (padState != '\0') { SetJoyJoys(pjoy, joysNew, joykNew); return; } joyk = pjoy->joyk; if (joyk == JOYK_Analog) { joykNew = JOYK_Shock; } else { if (static_cast(joyk) > 2) { joykNew = JOYK_Unknown; if (joyk != JOYK_Shock) { SetJoyJoys(pjoy, joysNew, joykNew); return; } joykNew = JOYK_Shock2; joysNew = JOYS_Ready; SetJoyJoys(pjoy, joysNew, joykNew); return; } // todo //... } } } else { // todo // ... } SetJoyJoys(pjoy, joysNew, joykNew); } #endif // SKIP_ASM void SetJoyJoys(JOY *pjoy, JOYS joys, JOYK joyk) { if (joys == pjoy->joys && joyk == pjoy->joyk) return; if (joyk == JOYK_Unknown) { pjoy->term = 0; joys = JOYS_Searching; } JOYK joykPrev = pjoy->joyk; if (joykPrev < JOYK_Shock && joyk > JOYK_Analog) { InitRumble(pjoy->prumble, pjoy->nPort, pjoy->nSlot); } if (joys == JOYS_Ready) { uint i = 0; pjoy->tRead = 0.0f; pjoy->fStickMoved2 = 0; pjoy->fStickMoved = 0; pjoy->grfbtn = 0; float *almDeflectMax = &pjoy->almDeflect[0].gMax; float *almDeflect2Max = &pjoy->almDeflect2[0].gMax; LM *almDeflect = pjoy->almDeflect; LM *almDeflect2 = pjoy->almDeflect2; for (; i < 4; i++) { almDeflect2->gMin = -0.75f; almDeflect2++; almDeflect->gMin = -0.75f; almDeflect++; *almDeflect2Max = 0.75f; almDeflect2Max += 2; *almDeflectMax = 0.75f; almDeflectMax += 2; } } pjoy->joys = joys; pjoy->joyk = joyk; pjoy->tJoys = g_clock.tReal; } INCLUDE_ASM("asm/nonmatchings/P2/joy", GetJoyXYDeflection__FP3JOYUcUcPfN23PUcT6PiP2LM); INCLUDE_ASM("asm/nonmatchings/P2/joy", FReadJoy__FP3JOY); void SetJoyBtnHandled(JOY *pjoy, GRFBTN btn) { pjoy->grfbtnPressed &= ~btn; } void TriggerJoyRumbleRumk(JOY *pjoy, RUMK rumk, float dt) { if (pjoy->fRumbleEnabled && pjoy->joyk > JOYK_Analog && pjoy->joys == JOYS_Ready) { TriggerRumbleRumk(pjoy->prumble, rumk, dt); } } JUNK_NOP(); JUNK_ADDIU(10); void StartJoySelection(JOY *pjoy) { pjoy->dxLatch = 0; pjoy->dyLatch = 0; } INCLUDE_ASM("asm/nonmatchings/P2/joy", DxSelectionJoy__FP3JOY); INCLUDE_ASM("asm/nonmatchings/P2/joy", DySelectionJoy__FP3JOY); INCLUDE_ASM("asm/nonmatchings/P2/joy", UBtnpJoy__FP3JOY4BTNP); void AddCode(CODE *pcode) { CODE *p_inputs_counter = g_pcode; while (p_inputs_counter) { if (pcode == p_inputs_counter) { return; } p_inputs_counter = p_inputs_counter->pchtNext; } pcode->pchtNext = g_pcode; g_pcode = pcode; if (g_joy.grfbtn == *pcode->ajbc) { pcode->nInputCounter = 1; } else { pcode->nInputCounter = 0; } } JUNK_NOP(); JUNK_WORD(0xAC820014); void _ResetCodes() { CODE *pcode = g_pcode; if (!pcode) return; pcode->nInputCounter = 0; while (pcode = pcode->pchtNext) { pcode->nInputCounter = 0; } } void _MatchCodes(JOY *pjoy, GRFBTN btn) { if (!g_pcode || pjoy != &g_joy || btn == g_joy.grfbtn || g_joy.grfbtn == 0) return; CODE *pcode = g_pcode; while (pcode) { if (pcode->nInputCounter < pcode->cjbc) { if (g_joy.grfbtn == pcode->ajbc[pcode->nInputCounter]) { pcode->nInputCounter++; } else { pcode->nInputCounter = 0; } } pcode = pcode->pchtNext; } g_tCodeCheck = g_clock.tReal + 1.0f; } INCLUDE_ASM("asm/nonmatchings/P2/joy", UpdateCodes__Fv); #ifdef SKIP_ASM /** * @todo 45.89% matched. */ void UpdateCodes() { int i; CODE **ppcht; CODE *pchtToExecute; CODE *pcht; if (g_tCodeCheck != 0x0f && g_tCodeCheck <= g_clock.tReal) { pchtToExecute = NULL; pcht = g_pcode; if (g_pcode != NULL) { i = g_pcode->index; pcht = g_pcode; while (true) { if (i == 0) { if (pcht->nInputCounter < pcht->cjbc) { ppcht = &pcht->pchtNext; } else if ((/* pchtToExecute == NULL || */ // todo fix ppcht = &pcht->pchtNext, pchtToExecute->cjbc < pcht->cjbc)) { ppcht = &pcht->pchtNext; pchtToExecute = pcht; } } else { *ppcht = pcht->pchtNext; pcht->pchtNext = NULL; pcht->nInputCounter = 0; pcht->index = 0; } pcht = *ppcht; if (pcht == NULL) break; i = pcht->index; } } // Check if we found a match if (pchtToExecute != NULL) { // Execute the cheat StartSound(SFXID_UiTick, NULL, NULL, NULL, 3000, 300, 1, 0, 0, NULL, NULL); //(pchtToExecute->pfn)(pchtToExecute->nParam); //todo fix function pointer } _ResetCodes(); g_tCodeCheck = 0.0f; } } #endif void ClearFchts() { g_grfcht = FCHT_None; ResetWorld(FTRANS_None); } void AddFcht(int nParam) { g_grfcht |= nParam & ~FCHT_ResetWorld; if (nParam & FCHT_ResetWorld) { ResetWorld(FTRANS_None); } } JUNK_NOP(); JUNK_ADDIU(10); void Chetkido() { // Check preconditions. int widCur = (g_pgsCur->gameworldCur << 8) | (g_pgsCur->worldlevelCur); if (widCur != 0x400) // level is "A Perilous Ascent" return; FGS cmpFlags = get_game_completion(); if ((cmpFlags & (FGS_HalfClues | FGS_AllClues)) != (FGS_HalfClues | FGS_AllClues)) // clues collected return; GS *gsCur = g_pgsCur; if (gsCur->ccoin != 99 || gsCur->clife != 0) // 99 coins and 0 lives return; // Decrypt chetkido using XOR cipher, key 0x23 char buf[64]; char achzPlaintext[16]; strcpy(achzPlaintext, g_chzCiphertext); char *pchCur = achzPlaintext; while (*pchCur != '\0') { *pchCur++ ^= 0x23; } // Show note blot with message sprintf(buf, g_chzThePasswordIs, achzPlaintext); ((NOTE *)&g_note.unk278)->pvtnote->pfnSetNoteAchzDraw((NOTE *)&g_note.unk278, buf); SetBlotDtVisible((NOTE *)&g_note.unk278, 10.0f); ((NOTE *)&g_note.unk278)->pvtnote->pfnShowBlot((NOTE *)&g_note.unk278); } INCLUDE_ASM("asm/nonmatchings/P2/joy", StartupCodes__Fv); #ifdef SKIP_ASM /** * @todo 4.38% matched. */ void StartupCodes() { ////AddCode(&cheat_reload_level.pCodeSeq); ////AddCode(&cheat_reload_no_cheats.pCodeSeq); ////AddCode(&cheat_reload_slippery_movement.pCodeSeq); ////AddCode(&cheat_slippery_objects.pCodeSeq); ////AddCode(&cheat_infinite_charms.pCodeSeq); ////AddCode(&cheat_collect_bottles.pCodeSeq); ////AddCode(&cheat_unlock_pages.pCodeSeq); ////AddCode(&cheat_unlock_all_worlds.pCodeSeq); ////AddCode(&cheat_chetkido_password.pCodeSeq); } #endif // SKIP_ASM ================================================ FILE: src/P2/jsg.c ================================================ #include #include #include #include #include extern JSGE s_jsge; void InitJsg(JSG *pjsg) { InitLo(pjsg); pjsg->ajsge = (JSGE *)PvAllocSwImpl(0xa00); pjsg->unk3 = 1; } INCLUDE_ASM("asm/nonmatchings/P2/jsg", GetJsgLocation__FP3JSGP2LOP6VECTORPf); INCLUDE_ASM("asm/nonmatchings/P2/jsg", SetJsgFocus__FP3JSGP2LO); INCLUDE_ASM("asm/nonmatchings/P2/jsg", SetJsgTn__FP3JSGP2TN); INCLUDE_ASM("asm/nonmatchings/P2/jsg", NextJsgJsge__FP3JSG); INCLUDE_ASM("asm/nonmatchings/P2/jsg", FIsJsgJsgeComplete__FP3JSGP4JSGE); INCLUDE_ASM("asm/nonmatchings/P2/jsg", UpdateJsgJsge__FP3JSG); INCLUDE_ASM("asm/nonmatchings/P2/jsg", ReadJsgJoystick__FP3JSGP3JOY); int FIsJsgActive(JSG *pjsg) { UpdateJsgJsge(pjsg); int fActive = 0; if (pjsg->cjsge > 0) { fActive = pjsg->ijsgeCur < pjsg->cjsge; } return fActive; } void ClearJsg(JSG *pjsg) { if (pjsg->pjt) { RetractJsg(pjsg); } pjsg->ijsgeCur = 0; pjsg->cjsge = 0; } void ApplyJsg(JSG *pjsg, JT *pjt) { STRUCT_OFFSET(pjt, 0x2740, JSG *) = pjsg; // pjt->pjsgCur pjsg->pjt = pjt; pjsg->ijsgeCur = -1; HandleLoSpliceEvent(pjsg, 0x17, 0, NULL); if (pjsg->unk3) { AddGrfusr(4); IncrementSwHandsOff(pjsg->psw); } } void RetractJsg(JSG *pjsg) { if (!pjsg->pjt) return; SetJsgTn(pjsg, NULL); SetJsgFocus(pjsg, NULL); if (pjsg->pasegaCur) { RetractAsega(pjsg->pasegaCur); pjsg->pasegaCur = 0; } SetClockRate(1.0f); pjsg->ijsgeCur = pjsg->cjsge; pjsg->ploContext = NULL; pjsg->pjsgeJoy = NULL; STRUCT_OFFSET(pjsg->pjt, 0x2740, JSG *) = NULL; // pjsg->pjt->pjsgCur pjsg->pjt = NULL; HandleLoSpliceEvent(pjsg, 0x19, 0, NULL); if (pjsg->unk3) { RemoveGrfusr(4); DecrementSwHandsOff(pjsg->psw); } } /** * @todo Objdiff reports a 100% match, but compiler seemingly * adds extra instructions? */ INCLUDE_ASM("asm/nonmatchings/P2/jsg", PjsgeAllocJsg__FP3JSG5JSGEK3OIDi); #ifdef SKIP_ASM JSGE *PjsgeAllocJsg(JSG *pjsg, JSGEK jsgek, OID oid, int fAsync) { JSGE *pjsge; int cjsge = pjsg->cjsge; if (cjsge < 0x80) { pjsg->cjsge = cjsge + 1; pjsge = &pjsg->ajsge[cjsge]; memset(pjsge, 0, sizeof(JSGE)); pjsge->jsgek = jsgek; pjsge->oid = oid; pjsge->fAsync = fAsync; } else { pjsge = &s_jsge; } return pjsge; } #endif // SKIP_ASM void AddJsgContext(JSG *pjsg, OID oid) { PjsgeAllocJsg(pjsg, JSGEK_Context, oid, 1); } void AddJsgCut(JSG *pjsg, OID oid) { PjsgeAllocJsg(pjsg, JSGEK_Cut, oid, 1); } void AddJsgFocus(JSG *pjsg, OID oid) { PjsgeAllocJsg(pjsg, JSGEK_Focus, oid, 1); } void AddJsgLabel(JSG *pjsg, OID oid) { JSGE *pjsge = PjsgeAllocJsg(pjsg, JSGEK_Label, OID_Nil, 1); pjsge->label.oid = oid; } void AddJsgTunnel(JSG *pjsg, OID oid) { PjsgeAllocJsg(pjsg, JSGEK_Tunnel, oid, 1); } void AddJsgPause(JSG *pjsg, OID oid, float dtPause) { JSGE *pjsge = PjsgeAllocJsg(pjsg, JSGEK_Pause, oid, 0); pjsge->pause.dtPause = dtPause; } void AddJsgAseg(JSG *pjsg, OID oid, int fAsync) { PjsgeAllocJsg(pjsg, JSGEK_Aseg, oid, fAsync); } void AddJsgJump(JSG *pjsg, OID oid, JSGJK jsgjk, JSGLK jsglk, int fAsync) { JSGE *pjsge = PjsgeAllocJsg(pjsg, JSGEK_Jump, oid, fAsync); pjsge->jump.jsgjk = jsgjk; pjsge->jump.jsglk = jsglk; } void AddJsgRun(JSG *pjsg, OID oid, float uRun, int fAsync) { JSGE *pjsge = PjsgeAllocJsg(pjsg, JSGEK_Run, oid, fAsync); pjsge->run.uRun = uRun; } void AddJsgClimb(JSG *pjsg, OID oid, float uClimb, int fAsync) { JSGE *pjsge = PjsgeAllocJsg(pjsg, JSGEK_Climb, oid, fAsync); pjsge->climb.uClimb = uClimb; } void AddJsgAttack(JSG *pjsg, OID oid, FTAK ftak, int fAsync) { JSGE *pjsge = PjsgeAllocJsg(pjsg, JSGEK_Attack, oid, fAsync); pjsge->attack.ftak = ftak; } void AddJsgClock(JSG *pjsg, float rdt) { JSGE *pjsge = PjsgeAllocJsg(pjsg, JSGEK_Clock, OID_Nil, 1); pjsge->clock.rdt = rdt; } void AddJsgUnknown(JSG *pjsg) { PjsgeAllocJsg(pjsg, JSGEK_Unknown, OID_Nil, 0); } ================================================ FILE: src/P2/jt.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/jt", InitJt__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jt", LoadJtFromBrx__FP2JTP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/jt", PostJtLoad__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jt", PresetJtAccelBase); INCLUDE_ASM("asm/nonmatchings/P2/jt", PresetJtAccel__FP2JTf); INCLUDE_ASM("asm/nonmatchings/P2/jt", AdjustJtNewXp__FP2JTP2XPi); INCLUDE_ASM("asm/nonmatchings/P2/jt", AdjustJtDz__FP2JTiP2DZif); INCLUDE_ASM("asm/nonmatchings/P2/jt", HandleJtGrfjtsc); INCLUDE_ASM("asm/nonmatchings/P2/jt", UpdateJtInternalXps__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jt", FCheckJtXpBase__FP2JTP2XPi); INCLUDE_ASM("asm/nonmatchings/P2/jt", AdjustJtXpVelocity__FP2JTP2XPi); INCLUDE_ASM("asm/nonmatchings/P2/jt", HandleJtMessage__FP2JT5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/jt", FTurnJtToTarget__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jt", UpdateJtBalance__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jt", RebuildJtXmg__FP2JTP3ALOfT1P6ACTADJP3XMG); INCLUDE_ASM("asm/nonmatchings/P2/jt", FMatchJtXmg__FP2JTP3XMGP6ACTADJ); INCLUDE_ASM("asm/nonmatchings/P2/jt", UpdateJtStand__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jt", ThrowJt__FP2JTP6VECTORff); INCLUDE_ASM("asm/nonmatchings/P2/jt", UnhookJt__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jt", CalculateJtToolSpin__FP2JTfP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/jt", RenderJtAll__FP2JTP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/jt", FUN_00172530); INCLUDE_ASM("asm/nonmatchings/P2/jt", FUN_001725e0); INCLUDE_ASM("asm/nonmatchings/P2/jt", UpdateJtTool__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jt", FUN_00172898); INCLUDE_ASM("asm/nonmatchings/P2/jt", UpdateJtPosWorldPrev__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jt", FUN_00172b08); INCLUDE_ASM("asm/nonmatchings/P2/jt", UpdateJtBounds__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jt", PsoGetJtEffect__FP2JTPi); INCLUDE_ASM("asm/nonmatchings/P2/jt", AddJtCustomXps__FP2JTP2SOiP3BSPT3PP2XP); INCLUDE_ASM("asm/nonmatchings/P2/jt", CtTorqueJt__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jt", FUN_00172ee0); INCLUDE_ASM("asm/nonmatchings/P2/jt", GetJtCpdefiFlatten__FP2JTP6CPDEFI); INCLUDE_ASM("asm/nonmatchings/P2/jt", FUN_00173708); INCLUDE_ASM("asm/nonmatchings/P2/jt", FUN_00173750); INCLUDE_ASM("asm/nonmatchings/P2/jt", UpdateJtActive__FP2JTP3JOYf); INCLUDE_ASM("asm/nonmatchings/P2/jt", UpdateJt__FP2JTf); INCLUDE_ASM("asm/nonmatchings/P2/jt", UpdateJtDrive__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jt", ChooseJtPhys__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jt", EnableJtActadj__FP2JTi); INCLUDE_ASM("asm/nonmatchings/P2/jt", SetJtJts__FP2JT3JTS4JTBS); void ProfileJt(JT *pjt, int fProfile) { return; } INCLUDE_ASM("asm/nonmatchings/P2/jt", SetJtPuppet__FP2JTP5ASEGA); INCLUDE_ASM("asm/nonmatchings/P2/jt", FUN_00177828); INCLUDE_ASM("asm/nonmatchings/P2/jt", PaloAbsorbWkr__FP3WKRiPP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/jt", NCmpWkr__FP3WKRT0); INCLUDE_ASM("asm/nonmatchings/P2/jt", UpdateJtEffect__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jt", FIsJtSoundBase__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jt", CollectJtPrize__FP2JT3PCKP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/jt", GetJtDiapi__FP2JTP6DIALOGP5DIAPI); INCLUDE_ASM("asm/nonmatchings/P2/jt", PlayJtDialog__FP2JTP6DIALOG); ================================================ FILE: src/P2/jump.c ================================================ #include #include extern DL g_dlJmt; INCLUDE_ASM("asm/nonmatchings/P2/jump", PresetJtAccelJump__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jump", UpdateJtActiveJump__FP2JTP3JOY); INCLUDE_ASM("asm/nonmatchings/P2/jump", FCheckJtSingleEdge__FP2JTP2SOP4EDGEP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/jump", FCheckJtEdgeNormal__FP2JTP6VECTORT1); INCLUDE_ASM("asm/nonmatchings/P2/jump", FCheckJtEdgeGrab__FP2JTP2SOP6VECTOR3XPKPvT2); INCLUDE_ASM("asm/nonmatchings/P2/jump", PxpFindJtBestEdge__FP2JTPiP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/jump", JtsResetJt__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jump", HandleJtDiveEffect__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jump", FUN_0017ece8); INCLUDE_ASM("asm/nonmatchings/P2/jump", UpdateJtJump__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/jump", FTimeJtJumpToTarget__FP2JTP6VECTORN31Pf); INCLUDE_ASM("asm/nonmatchings/P2/jump", GetJtJumpVelocity__FP2JTP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/jump", GetJtJumpToTargetVelocity__FP2JTP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/jump", GetJtJumpBoostVelocity__FP2JTP6VECTOR); void StartupJmt() { InitDl(&g_dlJmt, 0x50); } void ResetJmtList() { ClearDl(&g_dlJmt); } void OnJmtAdd(JMT *pjmt) { OnLoAdd(pjmt); AppendDlEntry(&g_dlJmt, pjmt); } void OnJmtRemove(JMT *pjmt) { OnLoRemove(pjmt); RemoveDlEntry(&g_dlJmt, pjmt); } INCLUDE_ASM("asm/nonmatchings/P2/jump", CloneJmt__FP3JMTT0); void PostJmtLoad(JMT *pjmt) { PostLoLoad(pjmt); if (pjmt->oidSetIgnoreJt != OID_Nil) { pjmt->psoSetIgnoreJt = (SO *)PloFindSwObject(pjmt->psw, 0x104, pjmt->oidSetIgnoreJt, pjmt); } } ================================================ FILE: src/P2/keyhole.c ================================================ #include extern KEYHOLE *g_pkeyhole; void InitKeyhole(KEYHOLE *pkeyhole) { InitLo(pkeyhole); g_pkeyhole = pkeyhole; } INCLUDE_ASM("asm/nonmatchings/P2/keyhole", LoadKeyholeFromBrx__FP7KEYHOLEP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/keyhole", DrawKeyholeMask__FP7KEYHOLEffff); INCLUDE_ASM("asm/nonmatchings/P2/keyhole", DrawKeyhole__FP7KEYHOLEf); INCLUDE_ASM("asm/nonmatchings/P2/keyhole", keyhole__static_initialization_and_destruction_0); INCLUDE_ASM("asm/nonmatchings/P2/keyhole", _GLOBAL_$I$InitKeyhole__FP7KEYHOLE); ================================================ FILE: src/P2/landing.c ================================================ #include #include void OnLandingAdd(LANDING *planding) { OnLoAdd(planding); AppendDlEntry(&planding->psw->dlLanding, planding); } void OnLandingRemove(LANDING *planding) { OnLoRemove(planding); RemoveDlEntry(&planding->psw->dlLanding, planding); } void CloneLanding(LANDING *planding, LANDING *plandingBase) { DLE dleLanding = planding->dleLanding; CloneLo(planding, plandingBase); planding->dleLanding = dleLanding; } ================================================ FILE: src/P2/lgn.c ================================================ #include #include void InitLgn(LGN *plgn) { InitSuv((SUV *)plgn); STRUCT_OFFSET(plgn, 0xbf4, float) = -10.0f; // plgn->tFlash } INCLUDE_ASM("asm/nonmatchings/P2/lgn", PostLgnLoad__FP3LGN); INCLUDE_ASM("asm/nonmatchings/P2/lgn", UpdateLgnActive__FP3LGNP3JOYf); INCLUDE_ASM("asm/nonmatchings/P2/lgn", UpdateLgn__FP3LGNf); INCLUDE_ASM("asm/nonmatchings/P2/lgn", FUN_00181658); INCLUDE_ASM("asm/nonmatchings/P2/lgn", OnLgnActive__FP3LGNiP2PO); INCLUDE_ASM("asm/nonmatchings/P2/lgn", RenderLgnAll__FP3LGNP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/lgn", GetLgnCpdefi__FP3LGNfP6CPDEFI); INCLUDE_ASM("asm/nonmatchings/P2/lgn", FInvulnerableLgn__FP3LGN3ZPK); JTHS JthsCurrentLgn(LGN *plgn) { return (JTHS)(STRUCT_OFFSET(plgn, 0xbf0, int) != 0); // plgn->fFlash } void UseLgnCharm(LGN *plgn) { UsePoCharm((PO *)plgn); SetLgnLgns(plgn, LGNS_Active); } INCLUDE_ASM("asm/nonmatchings/P2/lgn", ApplyLgnThrow__FP3LGNP2PO); INCLUDE_ASM("asm/nonmatchings/P2/lgn", FTakeLgnDamage__FP3LGNP3ZPR); INCLUDE_ASM("asm/nonmatchings/P2/lgn", HandleLgnMessage__FP3LGN5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/lgn", FUN_00181d88); INCLUDE_ASM("asm/nonmatchings/P2/lgn", SetLgnLgns__FP3LGN4LGNS); INCLUDE_ASM("asm/nonmatchings/P2/lgn", UpdateLgnrAim__FP4LGNRP3JOY); INCLUDE_ASM("asm/nonmatchings/P2/lgn", DrawLgnr__FP4LGNR); INCLUDE_ASM("asm/nonmatchings/P2/lgn", InitSwp__FP3SWP); INCLUDE_ASM("asm/nonmatchings/P2/lgn", PostSwpLoad__FP3SWP); INCLUDE_ASM("asm/nonmatchings/P2/lgn", UpdateSwp__FP3SWPf); INCLUDE_ASM("asm/nonmatchings/P2/lgn", ProjectSwpTransform__FP3SWPfi); INCLUDE_ASM("asm/nonmatchings/P2/lgn", SetSwpShape__FP3SWPP5SHAPEf); ================================================ FILE: src/P2/light.c ================================================ #include #include #include #include #include INCLUDE_ASM("asm/nonmatchings/P2/light", InitLight__FP5LIGHT); void UpdateLightXfWorldHierarchy(LIGHT *plight) { UpdateAloXfWorldHierarchy(plight); RebuildLightVifs(plight); UpdateLightBeamGrfzon(plight); } void RemoveLightFromSw(LIGHT *plight) { RemoveDlEntry(&plight->psw->dlLight, plight); InvalidateLight(plight); } INCLUDE_ASM("asm/nonmatchings/P2/light", AddLightToSw__FP5LIGHT); void OnLightAdd(LIGHT *plight) { OnAloAdd(plight); AddLightToSw(plight); } void OnLightRemove(LIGHT *plight) { OnAloRemove(plight); RemoveLightFromSw(plight); } INCLUDE_ASM("asm/nonmatchings/P2/light", CloneLight__FP5LIGHTT0); void FitLinearFunction(float x0, float y0, float x1, float y1, float *pdu, float *pru) { if (FFloatsNear(x0, x1, 0.0001f)) { *pru = 0.0f; *pdu = y0; return; } float a = (y1 - y0) / (x1 - x0); *pru = a; *pdu = y0 - a * x0; } /** * @todo 88.80% match. The code is possibly in the wrong order. * https://decomp.me/scratch/c1tUS */ INCLUDE_ASM("asm/nonmatchings/P2/light", FitRecipFunction__FffffPfT4); #ifdef SKIP_ASM void FitRecipFunction(float x0, float y0, float x1, float y1, float *pdu, float *pru) { float gEpsilon = 0.0001f; if (!FFloatsNear(x0, x1, gEpsilon) && __builtin_fabsf(x0) < gEpsilon && __builtin_fabsf(x1) < gEpsilon) { *pru = 0.0f; *pdu = y0; return; } float deltaX = x0 - x1; float deltaY = y1 - y0; float r = ((x0 * x1) * deltaY) / deltaX; float d = y0 - (r / x0); *pru = r; *pdu = d; } #endif // SKIP_ASM void ConvertFallOff(LM *plm, float *pdu, float *pru) { FitLinearFunction(plm->gMin, 1.0f, plm->gMax, 0.0f, pdu, pru); } void ConvertAngleStrength(float deg0, float g0, float deg1, float g1, float *pdu, float *pru) { // NOTE: The constant kDegToHalfRad is (3.1415926f / 180.0f) * 0.5f // Putting that here doesn't yield the same output due to precision loss. const float kDegToHalfRad = 0.008726647f; const float kStrengthScale = 1.0f / 255.0f; float strength0 = cosf(deg0 * kDegToHalfRad); strength0 += strength0 * strength0 * strength0; float strength1 = cosf(deg1 * kDegToHalfRad); strength1 += strength1 * strength1 * strength1; FitLinearFunction(strength0, g0 * kStrengthScale, strength1, g1 * kStrengthScale, pdu, pru); } void InvalidateLight(LIGHT *plight) { if (STRUCT_OFFSET(plight, 0x304, int) == 0) // plight->fDynamic { g_cframeStaticLightsInvalid = g_cframe; } } INCLUDE_ASM("asm/nonmatchings/P2/light", RebuildLightVifs__FP5LIGHT); INCLUDE_ASM("asm/nonmatchings/P2/light", SetLightKind__FP5LIGHT6LIGHTK); INCLUDE_ASM("asm/nonmatchings/P2/light", SetLightHighlightColor__FP5LIGHTP6VECTOR); void SetLightMidtoneStrength(LIGHT *plight, float gMidtone) { STRUCT_OFFSET(plight, 0x2f0, float) = gMidtone; // plight->gMidtone RebuildLightVifs(plight); } void SetLightShadowStrength(LIGHT *plight, float gShadow) { STRUCT_OFFSET(plight, 0x2f4, float) = gShadow; // plight->gShadow RebuildLightVifs(plight); } void SetLightHighlightAngle(LIGHT *plight, float degHighlight) { STRUCT_OFFSET(plight, 0x2f8, float) = degHighlight; // plight->degHighlight RebuildLightVifs(plight); } void SetLightMidtoneAngle(LIGHT *plight, float degMidtone) { STRUCT_OFFSET(plight, 0x2fc, float) = degMidtone; // plight->degMidtone RebuildLightVifs(plight); } void SetLightShadowAngle(LIGHT *plight, float degShadow) { STRUCT_OFFSET(plight, 0x300, float) = degShadow; // plight->degShadow RebuildLightVifs(plight); } INCLUDE_ASM("asm/nonmatchings/P2/light", SetLightDirection__FP5LIGHTP6VECTOR); void SetLightDynamic(LIGHT *plight, int fDynamic) { if (fDynamic != STRUCT_OFFSET(plight, 0x304, int)) // plight->fDynamic { STRUCT_OFFSET(plight, 0x304, int) = fDynamic; // plight->fDynamic RebuildLightVifs(plight); } } INCLUDE_ASM("asm/nonmatchings/P2/light", SetLightFallOff__FP5LIGHTP2LM); void SetLightConeAngle(LIGHT *plight, float degCone) { STRUCT_OFFSET(plight, 0x338, float) = degCone; // plight->degCone RebuildLightFrustrum(plight); RebuildLightVifs(plight); UpdateLightBeamGrfzon(plight); } void SetLightHotSpotAngle(LIGHT *plight, float degHotSpot) { STRUCT_OFFSET(plight, 0x33c, float) = degHotSpot; // plight->degHotSpot RebuildLightFrustrum(plight); RebuildLightVifs(plight); } INCLUDE_ASM("asm/nonmatchings/P2/light", SetLightFrustrumUp__FP5LIGHTP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/light", RebuildLightFrustrum__FP5LIGHT); INCLUDE_ASM("asm/nonmatchings/P2/light", UpdateLightBeamGrfzon__FP5LIGHT); void SetLightDiffuse_Old(LIGHT *plight, float gDiffuse) { SetLightMidtoneStrength(plight, gDiffuse); SetLightShadowStrength(plight, gDiffuse); } void GetLightDiffuse_Old(LIGHT *plight, float *pgDiffuse) { *pgDiffuse = STRUCT_OFFSET(plight, 0x2f0, float); // plight->gMidtone } void SetLightSaturate_Old(LIGHT *plight, VECTOR *pvecSaturate) { VECTOR vecHsv; ConvertUserRgbToUserHsv(pvecSaturate, &vecHsv); SetLightHighlightColor(plight, &vecHsv); } void GetLightSaturate_Old(LIGHT *plight, VECTOR *pvecSaturate) { ConvertUserHsvToUserRgb(&STRUCT_OFFSET(plight, 0x2e0, VECTOR), pvecSaturate); // plight->vecHighlight } INCLUDE_ASM("asm/nonmatchings/P2/light", NCmpFindLight__FPP5LIGHTT0); INCLUDE_ASM("asm/nonmatchings/P2/light", PrepareSwLightsForDraw__FP2SW); INCLUDE_ASM("asm/nonmatchings/P2/light", TwpsFindSwLights__FP2SWP6VECTORfiiPiT5PP5LIGHT); ================================================ FILE: src/P2/lo.c ================================================ #include #include #include #include #include #include #include #include #include #include #include #include extern CGc g_gc; void InitLo(LO *plo) { plo->pvtlo->pfnSetLoDefaults(plo); plo->pvtlo->pfnAddLo(plo); } void PostLoLoad(LO *plo) { HandleLoSpliceEvent(plo, 0, 0, NULL); } void AddLo(LO *plo) { DL *pdl = plo->paloParent ? &plo->paloParent->dlChild : &plo->psw->dlChild; if (FFindDlEntry(pdl, plo)) return; AppendDlEntry(pdl, plo); if (FIsLoInWorld(plo)) { plo->pvtlo->pfnAddLoHierarchy(plo); } } void AddLoHierarchy(LO *plo) { plo->pvtlo->pfnOnLoAdd(plo); plo->pvtlo->pfnSendLoMessage(plo, MSGID_added, plo); } void OnLoAdd(LO *plo) { return; } void RemoveLo(LO *plo) { DL *pdl = plo->paloParent ? &plo->paloParent->dlChild : &plo->psw->dlChild; if (!FFindDlEntry(pdl, plo)) return; if (FIsLoInWorld(plo)) { RemoveDlEntry(pdl, plo); plo->pvtlo->pfnRemoveLoHierarchy(plo); } else { RemoveDlEntry(pdl, plo); } } void DeferLoRemove(LO *plo) { ALO *palo = (plo->pvtlo->grfcid & 1U) ? (ALO *)plo : plo->paloParent; if (!palo) return; DLR *pdlr = (DLR *)PvAllocSwImpl(sizeof(DLR)); pdlr->oidChild = plo->oid; pdlr->pdlrNext = STRUCT_OFFSET(palo, 0x2c4, DLR *); // palo->pdlrFirst STRUCT_OFFSET(palo, 0x2c4, DLR *) = pdlr; // palo->pdlrFirst } void SetLoSuckHideLimits(LO *plo, LM *plmUSuck) { if (FCheckLm(plmUSuck, g_plsCur->uSuck)) { DeferLoRemove(plo); } } void RemoveLoHierarchy(LO *plo) { plo->pvtlo->pfnOnLoRemove(plo); plo->pvtlo->pfnSendLoMessage(plo, MSGID_removed, plo); } void OnLoRemove(LO *plo) { return; } void SnipLo(LO *plo) { if (!FIsLoInWorld(plo)) return; if (plo->pvtlo->pfnBindLo) { plo->pvtlo->pfnBindLo(plo); } plo->pvtlo->pfnPostLoLoad(plo); plo->pvtlo->pfnRemoveLo(plo); } int FFindLoParent(LO *plo, ALO *paloParent) { if (!plo) { return 0; } while (plo) { if (plo == paloParent) { return 1; } plo = plo->paloParent; } return (paloParent == NULL); } void SetLoParent(LO *plo, ALO *paloParent) { plo->pvtlo->pfnRemoveLo(plo); plo->paloParent = paloParent; plo->pvtlo->pfnAddLo(plo); } int FIsLoInWorld(LO *plo) { while (plo) { ALO *paloParent = plo->paloParent; if (paloParent) { if (!FFindDlEntry(&paloParent->dlChild, plo)) { return 0; } } else { if (!FFindDlEntry(&plo->psw->dlChild, plo)) { return 0; } } plo = paloParent; } return 1; } void GetLoInWorld(LO *plo, int *pfInWorld) { *pfInWorld = FIsLoInWorld(plo); } JUNK_ADDIU(30); LO *PloCloneLo(LO *plo, SW *psw, ALO *paloParent) { LO *ploClone = PloNew(plo->pvtbasic->cid, psw, paloParent, plo->oid, -1); ploClone->pvtlo->pfnCloneLoHierarchy(ploClone, plo); return ploClone; } void CloneLoHierarchy(LO *plo, LO *ploBase) { plo->pvtlo->pfnCloneLo(plo, ploBase); } void CloneLo(LO *plo, LO *ploBase) { if (ploBase->psidebag) { CSidebag *psidebag = PsidebagNew(); ploBase->psidebag->CloneTo(psidebag); plo->psidebag = psidebag; g_gc.AddRootSidebag(psidebag); } SW *psw = plo->psw; // Adjusted arguments for target assembly alignment CopyAb(&STRUCT_OFFSET(plo, 0x34, void *), &STRUCT_OFFSET(ploBase, 0x34, void *), ploBase->pvtlo->cb - 0x34); DL *pdl = PdlFromSwOid(psw, plo->oid); RemoveDlEntry(pdl, plo); pdl = PdlFromSwOid(psw, ploBase->oid); AppendDlEntry(pdl, plo); plo->oid = ploBase->oid; if (ploBase->pframe) { g_gc.UpdateRecyclable(); CFrame *pframe = PframeNew(); ploBase->pframe->CloneTo(pframe); plo->pframe = pframe; g_gc.AddRootFrame(pframe); } plo->ppxr = ploBase->ppxr; } void SubscribeSwPpmqStruct(SW *psw, MQ **ppmqFirst, PFNMQ pfnmq, void *pvContext) { MQ *pmq = PmqAllocSw(psw); pmq->pfnmq = pfnmq; pmq->pvContext = pvContext; pmq->pmqNext = *ppmqFirst; *ppmqFirst = pmq; } void UnsubscribeSwPpmqStruct(SW *psw, MQ **ppmqFirst, PFNMQ pfnmq, void *pvContext) { MQ *pmq; while (pmq = *ppmqFirst) { MQ *pmqTarget; MQ **ppmqList = ppmqFirst; if (pmq->pfnmq == pfnmq && pmq->pvContext == pvContext) { *ppmqFirst = pmq->pmqNext; pmq->pmqNext = NULL; pmqTarget = pmq; FreeSwMqList(psw, pmqTarget); break; } pmqTarget = *ppmqList; pmq = pmqTarget; ppmqFirst = &pmq->pmqNext; } } void SubscribeLoStruct(LO *plo, PFNMQ pfnmq, void *pvContext) { SubscribeSwPpmqStruct(plo->psw, &plo->pmqFirst, pfnmq, pvContext); } void UnsubscribeLoStruct(LO *plo, PFNMQ pfnmq, void *pvContext) { UnsubscribeSwPpmqStruct(plo->psw, &plo->pmqFirst, pfnmq, pvContext); } void SubscribeLoObject(LO *plo, LO *ploTarget) { SubscribeSwPpmqStruct(plo->psw, &plo->pmqFirst, ploTarget->pvtlo->pfnHandleLoMessage, ploTarget); } void UnsubscribeLoObject(LO *plo, LO *ploTarget) { UnsubscribeSwPpmqStruct(plo->psw, &plo->pmqFirst, ploTarget->pvtlo->pfnHandleLoMessage, ploTarget); } void SendLoMessage(LO *plo, MSGID msgid, void *pv) { if (plo->pvtlo->pfnHandleLoMessage) { plo->pvtlo->pfnHandleLoMessage(plo, msgid, pv); } MQ *pmq = plo->pmqFirst; while (pmq) { PFNMQ pfnmq = pmq->pfnmq; void *pmqContext = pmq->pvContext; pmq = pmq->pmqNext; pfnmq(pmqContext, msgid, pv); } } void LoadLoFromBrx(LO *plo, CBinaryInputStream *pbis) { LoadOptionsFromBrx(plo, pbis); } int FMatchesLoName(LO *plo, OID oid) { if (oid == OID_Nil) { return 0; } if (plo->oid == oid || (plo->ppxr && plo->ppxr->oidProxyRoot == oid)) { return 1; } return 0; } OID OidProxyLo(LO *plo) { if (plo->ppxr) { return plo->ppxr->oidProxyRoot; } return OID_Nil; } OID OidProxyLoPreferred(LO *plo) { if (plo->ppxr) { return plo->ppxr->oidProxyRoot; } return plo->oid; } void GetLoOidProxy(LO *plo, OID *poid) { *poid = OidProxyLo(plo); } INCLUDE_ASM("asm/nonmatchings/P2/lo", PostSpliceEventCallback__FP2LOUiPv); INCLUDE_ASM("asm/nonmatchings/P2/lo", FFilterSpliceEvent__FP2LO7SYMEVIDiPPv); INCLUDE_ASM("asm/nonmatchings/P2/lo", HandleLoSpliceEvent__FP2LOUiiPPv); void EnsureLoSidebagBool(LO *plo, OPTID optid, int f) { CRef ref = CRef(); ref.SetBool(f); RefEnsureOption(plo, optid, &ref); } void EnsureLoSidebagInt(LO *plo, OPTID optid, int n) { CRef ref = CRef(); ref.SetS32(n); RefEnsureOption(plo, optid, &ref); } void EnsureLoSidebagFloat(LO *plo, OPTID optid, float g) { CRef ref = CRef(); ref.SetF32(g); RefEnsureOption(plo, optid, &ref); } INCLUDE_ASM("asm/nonmatchings/P2/lo", EnsureLoSidebagClq__FP2LO5OPTIDP3CLQ); INCLUDE_ASM("asm/nonmatchings/P2/lo", EnsureLoSidebagLm__FP2LO5OPTIDP2LM); void EnsureLoSidebagOid(LO *plo, OPTID optid, OID oid) { CRef ref = CRef(); ref.SetS32(oid); RefEnsureOption(plo, optid, &ref); } /** * @todo 92.29% match. * https://decomp.me/scratch/uhZNV */ INCLUDE_ASM("asm/nonmatchings/P2/lo", EnsureLoSidebagVector__FP2LO5OPTIDP6VECTOR); #ifdef SKIP_ASM void EnsureLoSidebagVector(LO *plo, OPTID optid, VECTOR *pvec) { CRef ref = CRef(); VECTOR *pvector = PvectorNew(); *pvector = *pvec; ref.SetVector(pvector); RefEnsureOption(plo, optid, &ref); } #endif // SKIP_ASM ================================================ FILE: src/P2/lookat.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/lookat", InitActla__FP5ACTLAP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/lookat", SetActlaTarget__FP5ACTLAP3ALOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/lookat", PaloGetActlaTarget__FP5ACTLA); INCLUDE_ASM("asm/nonmatchings/P2/lookat", UpdateActla__FP5ACTLAf); INCLUDE_ASM("asm/nonmatchings/P2/lookat", GetActlaRotationGoal__FP5ACTLAfP7MATRIX3P6VECTOR); ================================================ FILE: src/P2/main.c ================================================ #include "common.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include extern void *D_00211E10; extern void *D_00212110; // Forward declarations. void Startup(); void StartupSif(); void StartupVU0(); void StartupVU1(); /** * @brief List of IOP modules. */ static char *s_apchzSifModules[6] = { "sio2man.irx", "padman.irx", "mcman.irx", "mcserv.irx", "libsd.irx", "989snd.irx" }; /** * @brief Startup function pointer. */ typedef void (*SFN)(void); /** * @brief Array of startup functions. */ static SFN s_asfn[29] = { StartupAseg, StartupMemMgr, StartupDma, StartupThread, StartupGs, StartupSif, StartupCd, StartupCatalog, StartupJoy, StartupCodes, StartupFrame, StartupFont, StartupBrx, StartupCm, StartupSound, StartupScreen, StartupUi, StartupTarget, StartupJmt, StartupPipe, StartupHide, StartupVU0, StartupVU1, StartupBlips, StartupRender, StartupClock, StartupMemcard, StartupGame, StartupMpeg }; /** * @brief Global pointers to command-line arguments. * @todo Are these the right way around? */ int g_cpchzArgs = 0; char **g_apchzArgs = NULL; /** * @brief Main function. * * Invoked by the startup routine, starts the main game loop. * * @todo 80.99% matched * https://decomp.me/scratch/4XwiN */ INCLUDE_ASM("asm/nonmatchings/P2/main", main); #ifdef SKIP_ASM int main(char **argv, int argc) { g_apchzArgs = argv; g_cpchzArgs = argc; // These appear to be loaded into registers in the target assembly Startup(); CMpeg* mpeg = &g_mpeg; while (true) { if (g_mpeg.oid_1 && g_pwipe->wipes != WIPES_WipingOut) { FlushFrames(1); mpeg->ExecuteOids(); } if (g_transition.m_fPending) { FlushFrames(1); g_transition.Execute(); } if (g_mpeg.oid_1 && g_pwipe->wipes != WIPES_WipingOut) { FlushFrames(1); mpeg->ExecuteOids(); } UpdateJoy(&g_joy); UpdateCodes(); UpdateSave(&g_save); UpdateUi(&g_ui); UpdateGameState(g_clock.dt); if (g_psw) { SetupCm(g_pcm); OpenFrame(); MarkClockTick(&g_clock); if (g_psw->pcbUpdate) { g_psw->pcbUpdate(g_clock.dt); } RenderSw(g_psw, g_pcm); RenderUi(); DrawSw(g_psw, g_pcm); DrawUi(); CloseFrame(); } g_cframe += 1; } } #endif /** * @brief Starts up the PS2 subsystem interface. */ void StartupSif() { // Create a path to the "ioprp243.img" image. char achzPath[256]; CdPath(achzPath, "ioprp243.img", 1); // Initialize SIF RPC system and CD/DVD subsystem. sceSifInitRpc(0); sceCdInit(0); // Hang if the CD media mode is invalid at startup. if (!FValidCdMmode()) { while (true) {} } // Set the CD media mode and reset the filesystem. SetCdMmode(); sceFsReset(); // Reboot the IOP using the "ioprp243.img" image and wait until it completes. while (!sceSifRebootIop(achzPath)) {} while (!sceSifSyncIop()) {} // Reinitialize SIF and CD/DVD systems after reboot. sceSifInitRpc(0); sceSifLoadFileReset(); sceCdInit(0); // Hang if the CD media mode is invalid after reboot. if (!FValidCdMmode()) { while (true) {} } // Restore CD media mode and reset FS again after reboot. SetCdMmode(); sceFsReset(); sceCdDiskReady(0); FCdCompleted(1); // Load IOP modules listed in s_apchzSifModules. for (uint i = 0; i < 6; i++) { CdPath(achzPath, s_apchzSifModules[i], 1); while (sceSifLoadModule(achzPath, 0, 0) < 0) {} } } /** * @brief Starts up the VU0. */ void StartupVU0() { g_pdcVif0->chcr.TTE = 1; FlushCache(0); /* XXX: bring in eekernel defs and use WRITEBACK_DCACHE */ // Send VU0 init DMAtag sceDmaSend(g_pdcVif0, &D_00211E10); // D_00211E10 is start of .vutext sceDmaSync(g_pdcVif0, 0, 0); g_pdcVif0->chcr.TTE = 0; } /** * @brief Starts up the VU1. */ void StartupVU1() { // Enable tag transfer g_pdcVif1->chcr.TTE = 1; FlushCache(0); /* XXX: bring in eekernel defs and use WRITEBACK_DCACHE */ // Send initialization DMAtag and wait. Then, disable tag transfer again. sceDmaSend(g_pdcVif1, &D_00212110); sceDmaSync(g_pdcVif1, 0, 0); g_pdcVif1->chcr.TTE = 0; } INCLUDE_ASM("asm/nonmatchings/P2/main", Startup__Fv); #ifdef SKIP_ASM /** * @brief Starts each game system. * * @todo 99.71% matched. * Stack frame is 48 bytes smaller than expected. * https://decomp.me/scratch/IOVxc * https://decomp.me/scratch/NNtNR */ void Startup() { // Set up the progress bar. int nRemain = 26; int rgbaComplete = 0x007f0000; // blue int rgbaRemain = 0x003f3f3f; // gray int rgbaWarning = 0x00003f3f; // yellow int rgbaTrouble = 0x0000003f; // red CProg prog = CProg((RGBA *)&rgbaComplete, (RGBA *)&rgbaRemain, (RGBA *)&rgbaWarning, (RGBA *)&rgbaTrouble); // Begin startup phase. SetPhase(PHASE_Startup); prog.Begin(); // Call each function in the startup function array. SFN *psfn = s_asfn; for (int i = 0; i < sizeof(s_asfn) / sizeof(s_asfn[0]); i++) { if (i > 2) { prog.SetRemain(nRemain); } (*psfn++)(); nRemain--; } // Cleanup. prog.SetRemain(0); prog.End(); ClearPhase(PHASE_Startup); } #endif ================================================ FILE: src/P2/mark.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/mark", MuFromAmtlk__FP4MTLK); INCLUDE_ASM("asm/nonmatchings/P2/mark", ElasFromAmtlk__FP4MTLK); INCLUDE_ASM("asm/nonmatchings/P2/mark", PxpAdd__FP2SOT0P6VECTORT2f3XPKPvT6PP2XP); INCLUDE_ASM("asm/nonmatchings/P2/mark", RecalcSwXpPos__FP2SWiPP2XP); INCLUDE_ASM("asm/nonmatchings/P2/mark", RecalcSwXpMovement__FP2SWiPP2XP); INCLUDE_ASM("asm/nonmatchings/P2/mark", FreeSwXpList__FP2SWP2XP); INCLUDE_ASM("asm/nonmatchings/P2/mark", FindClosestPointOnLine__FP6VECTORN20PfT3); INCLUDE_ASM("asm/nonmatchings/P2/mark", FindClosestPointOnLineSegment__FP6VECTORN20PfT3); INCLUDE_ASM("asm/nonmatchings/P2/mark", ClsgClipSoAllEdges__FP2SOT0P3BSPiP3LSG); INCLUDE_ASM("asm/nonmatchings/P2/mark", ClsgClipSoBspEdges__FP2SOT0iP3BSPiP3LSG); INCLUDE_ASM("asm/nonmatchings/P2/mark", CategorizeAlsg__FiP3LSGPiT2PP3LSGT4); INCLUDE_ASM("asm/nonmatchings/P2/mark", CplsgFindEdgePath__FP4SURFiiP3LSGPP3LSG); INCLUDE_ASM("asm/nonmatchings/P2/mark", MarkSoContactsBspBsp__FP2SOT0iP3BSPT3PP2XP); INCLUDE_ASM("asm/nonmatchings/P2/mark", CsbiIntersectSphereBsp__FP6VECTORfiP3BSPT3P4GEOMiP3SBI); INCLUDE_ASM("asm/nonmatchings/P2/mark", MarkSoContactsSphereBsp__FP2SOP6VECTORfT0iP3BSPT5PP2XP); INCLUDE_ASM("asm/nonmatchings/P2/mark", MarkSoContactsSphereSphere__FP2SOT0PP2XP); INCLUDE_ASM("asm/nonmatchings/P2/mark", CalculateCenterContact__FP2SOP6VECTORfT1Pf); INCLUDE_ASM("asm/nonmatchings/P2/mark", FMarkSoContactsCenterBsp__FP2SOT0iP3BSPT3PP2XP); INCLUDE_ASM("asm/nonmatchings/P2/mark", FClipEdgeToSphere__FP6VECTORfT0T0PfT0T0T4); INCLUDE_ASM("asm/nonmatchings/P2/mark", FMarkSoContactsCenterSphere__FP2SOT0PP2XP); INCLUDE_ASM("asm/nonmatchings/P2/mark", AddSoXps__FP2SOT0iiP3BSPT4PP2XP); INCLUDE_ASM("asm/nonmatchings/P2/mark", PxpMarkSwContactsRoot__FP2SWPP2SOi); ================================================ FILE: src/P2/mat.c ================================================ #include #include extern VECTOR g_normalZ; INCLUDE_ASM("asm/nonmatchings/P2/mat", PostCopyMatrix3__7MATRIX4); INCLUDE_ASM("asm/nonmatchings/P2/mat", __as__7MATRIX4RC7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/mat", MatMulMatTransMat__FRC7MATRIX3T0); INCLUDE_ASM("asm/nonmatchings/P2/mat", LoadIdentityMatrix4__FP7MATRIX4); INCLUDE_ASM("asm/nonmatchings/P2/mat", __ml__FRC7MATRIX4G8VU_FLOAT); INCLUDE_ASM("asm/nonmatchings/P2/mat", __ml__FRC7MATRIX4T0); JUNK_ADDIU(50); INCLUDE_ASM("asm/nonmatchings/P2/mat", MultiplyMatrix4Vector__FP7MATRIX4P6VECTORfT1); INCLUDE_ASM("asm/nonmatchings/P2/mat", __ml__FRC7MATRIX4G10VU_VECTOR4); INCLUDE_ASM("asm/nonmatchings/P2/mat", TransposeMatrix4__FP7MATRIX4T0); void AddMatrix4Matrix4(MATRIX4 *pmatLeft, MATRIX4 *pmatRight, MATRIX4 *pmatDst) { for (int i = 0; i < 16; i++) { pmatDst->mat[0][i] = pmatLeft->mat[0][i] + pmatRight->mat[0][i]; } } JUNK_NOP(); JUNK_WORD(0x24020001); INCLUDE_ASM("asm/nonmatchings/P2/mat", LoadRotateMatrixRad__FfP6VECTORP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/mat", LoadRotateMatrix__FP6VECTORP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/mat", LoadRotateMatrixEuler__FP6VECTORP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/mat", LoadMatrixFromPosRot__FP6VECTORP7MATRIX3P7MATRIX4); INCLUDE_ASM("asm/nonmatchings/P2/mat", LoadMatrixFromPosRotInverse__FP6VECTORP7MATRIX3P7MATRIX4); INCLUDE_ASM("asm/nonmatchings/P2/mat", LoadMatrixFromPosRotScale__FP6VECTORP7MATRIX3T0P7MATRIX4); JUNK_WORD(0x7CC30020); JUNK_NOP(); JUNK_NOP(); JUNK_ADDIU(60); INCLUDE_ASM("asm/nonmatchings/P2/mat", CosRotateMatrixMagnitude__FP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/mat", DecomposeRotateMatrixRad__FP7MATRIX3PfP6VECTOR); JUNK_ADDIU(50); INCLUDE_ASM("asm/nonmatchings/P2/mat", DecomposeRotateMatrixEuler__FP7MATRIX3P6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/mat", NormalizeRotateMatrix3__FP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/mat", CalculateDmat__FP7MATRIX3N20); INCLUDE_ASM("asm/nonmatchings/P2/mat", CalculateDmat4__FP7MATRIX4N20); INCLUDE_ASM("asm/nonmatchings/P2/mat", DecomposeRotateMatrixPanTilt__FP7MATRIX3PfT1); INCLUDE_ASM("asm/nonmatchings/P2/mat", LoadRotateMatrixPanTilt__FffP7MATRIX3); void LoadLookAtMatrix(VECTOR *pdpos, MATRIX3 *pmat) { BuildOrthonormalMatrixZ(pdpos, &g_normalZ, pmat); } INCLUDE_ASM("asm/nonmatchings/P2/mat", TiltMatUpright__FP7MATRIX3N20); JUNK_WORD(0x27BD0130); INCLUDE_ASM("asm/nonmatchings/P2/mat", FInvertMatrix__FiPfT1); INCLUDE_ASM("asm/nonmatchings/P2/mat", FInvertMatrix3__FP7MATRIX3T0); bool FInvertMatrix4(MATRIX4 *pmatSrc, MATRIX4 *pmatDst) { return FInvertMatrix(4, (float *)pmatSrc, (float *)pmatDst); } INCLUDE_ASM("asm/nonmatchings/P2/mat", BuildOrthonormalMatrixY__FP6VECTORT0P7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/mat", BuildOrthonormalMatrixZ__FP6VECTORT0P7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/mat", BuildRotateVectorsMatrix__FP6VECTORT0P7MATRIX3); void BuildSimpleProjectionMatrix(float rx, float ry, float dxOffset, float dyOffset, float sFar, float sNear, MATRIX4 *pmat) { memset(pmat, 0, sizeof(MATRIX4)); float zScale = (sFar + sNear) / (sFar - sNear); float zTrans = (sFar * (1.0f - zScale)); pmat->mat[0][0] = rx; pmat->mat[2][3] = 1.0f; pmat->mat[2][0] = dxOffset; pmat->mat[1][1] = ry; pmat->mat[2][1] = dyOffset; pmat->mat[2][2] = zScale; pmat->mat[3][2] = zTrans; } INCLUDE_ASM("asm/nonmatchings/P2/mat", LoadScaleMatrixScalar__FP6VECTORfP7MATRIX4); INCLUDE_ASM("asm/nonmatchings/P2/mat", LoadScaleMatrixVector__FP6VECTORP7MATRIX3T0P7MATRIX4); INCLUDE_ASM("asm/nonmatchings/P2/mat", LoadRotateVectorMatrix__FP6VECTORT0P7MATRIX3); ================================================ FILE: src/P2/mb.c ================================================ #include extern SNIP s_asnipLoadMbg[2]; void InitMbg(MBG *pmbg) { InitStepguard(pmbg); STRUCT_OFFSET(pmbg, 0xe3c, int) = -1; } void LoadMbgFromBrx(MBG *pmbg, CBinaryInputStream *pbis) { LoadStepguardFromBrx(pmbg, pbis); SnipAloObjects(pmbg, 2, s_asnipLoadMbg); } INCLUDE_ASM("asm/nonmatchings/P2/mb", PostMbgLoad__FP3MBG); INCLUDE_ASM("asm/nonmatchings/P2/mb", FUN_0018a510); INCLUDE_ASM("asm/nonmatchings/P2/mb", FUN_0018a628); INCLUDE_ASM("asm/nonmatchings/P2/mb", PsoHitTestCylinderObjects__FiP6VECTORT1fiPP2SOP3LSG); INCLUDE_ASM("asm/nonmatchings/P2/mb", FFilterMbgAttackObjects__FP3MBGP2SO); INCLUDE_ASM("asm/nonmatchings/P2/mb", FObstructedMbg__FP3MBGP6VECTORT1); INCLUDE_ASM("asm/nonmatchings/P2/mb", FCanMbgAttack__FP3MBG); INCLUDE_ASM("asm/nonmatchings/P2/mb", FDetectMbg__FP3MBG); INCLUDE_ASM("asm/nonmatchings/P2/mb", FUN_0018ab88__Fi); INCLUDE_ASM("asm/nonmatchings/P2/mb", FUN_0018abf0__Fi); INCLUDE_ASM("asm/nonmatchings/P2/mb", FUN_0018ac58__Fi); void UpdateMbg(MBG *pmbg, float dt) { UpdateStepguard(pmbg, dt); } INCLUDE_ASM("asm/nonmatchings/P2/mb", FUN_0018acf0); INCLUDE_ASM("asm/nonmatchings/P2/mb", UpdateMbgGoal__FP3MBGi); INCLUDE_ASM("asm/nonmatchings/P2/mb", UpdateMbgSgs__FP3MBG); INCLUDE_ASM("asm/nonmatchings/P2/mb", OnMgExitingSgs__FP3MBG3SGS); INCLUDE_ASM("asm/nonmatchings/P2/mb", HandleMbgMessage__FP3MBG5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/mb", FUN_0018b460); ================================================ FILE: src/P2/memory.c ================================================ #include #include #include /** * @todo Change these to static when possible. */ extern int s_pvGlobalMin; extern int s_pvGlobalMac; extern int s_pvWorldMin; extern int s_pvWorldMac; extern int s_pvStackMin; extern int s_pvStackMac; extern CRITSECT s_critsectStack; extern int s_ipvStackCur; extern int s_apvStackMin[]; extern int g_pvHeapMin; extern int g_pvHeapMax; extern int D_0064C70F; void StartupMemMgr() { int end = (int)&D_0064C70F & ~0x0f; g_pvHeapMin = end; g_pvHeapMax = 0x02000000; s_pvGlobalMin = s_pvGlobalMac = s_pvWorldMin = s_pvWorldMac = end; s_pvStackMin = s_pvStackMac = 0x02000000; s_ipvStackCur = -1; InitCritSect(&s_critsectStack); } void *PvAllocGlobalImpl(int cb) { if (cb == 0) { return 0; } void *pv = (void *)s_pvGlobalMac; s_pvGlobalMac += (cb + 0x0f) & -0x10; s_pvWorldMin = s_pvWorldMac = s_pvGlobalMac; return pv; } JUNK_NOP(); JUNK_WORD(0xACC20004); #ifdef DEBUG /** * @todo Implement debugging function (low-priority). */ void HardLockError() { } #endif void CheckForOutOfMemory() { return; } void *PvAllocSwImpl(int cb) { if (cb == 0) { return NULL; } CheckForOutOfMemory(); void *pvSw = (void *)s_pvWorldMac; s_pvWorldMac += (cb + 0x0f) & -0x10; return pvSw; } void FreeSw() { s_pvWorldMac = s_pvWorldMin; } void *PvAllocSwCopyImpl(int cb, void *pvBase) { void *pvDst = PvAllocSwImpl(cb); if (pvDst) { CopyAb(pvDst, pvBase, cb); } return pvDst; } void *PvAllocSwClearImpl(int cb) { void *pvBlock = PvAllocSwImpl(cb); if (pvBlock) { memset(pvBlock, 0, cb); } return pvBlock; } void InitStackImpl() { EnterCritSect(&s_critsectStack); s_apvStackMin[++s_ipvStackCur] = s_pvStackMin; } void *PvAllocStackImpl(int cb) { if (cb == 0) { return NULL; } CheckForOutOfMemory(); s_pvStackMin -= (cb + 0x0f) & -0x10; return (void *)s_pvStackMin; } void *PvAllocStackClearImpl(int cb) { void *pvBlock = PvAllocStackImpl(cb); if (pvBlock) { memset(pvBlock, 0, cb); } return pvBlock; } void FreeStackImpl() { s_pvStackMin = s_apvStackMin[s_ipvStackCur--]; LeaveCritSect(&s_critsectStack); } void *malloc(uint __size) { return NULL; } void *_malloc_r(_reent *pre, uint __size) { return NULL; } void free(void *pv) { return; } void *__builtin_new(unsigned int cb) { return PvAllocSwClearImpl(cb); } void __builtin_delete() { return; } void CopyAqw(void *pvDst, void *pvSrc, int cqw) { qword *dst = (qword *)pvDst; qword *src = (qword *)pvSrc; int remainder = cqw & 0x03; int nQWords = cqw - remainder; int processed = 0; while (processed < remainder) { *dst++ = *src++; processed++; } processed = 0; while (processed < nQWords) { qword qw0 = src[0]; qword qw1 = src[1]; qword qw2 = src[2]; qword qw3 = src[3]; src += 4; dst[0] = qw0; dst[1] = qw1; dst[2] = qw2; dst[3] = qw3; dst += 4; processed += 4; } } void CopyAb(void *pvDst, void *pvSrc, uint cb) { // Do a byte copy, if not word aligned. if (((uint)pvDst | (uint)pvSrc | cb) & 0x03) { uchar *dst = (uchar *)pvDst; uchar *src = (uchar *)pvSrc; for (uint i = 0; i < cb; i++) { *dst++ = *src++; } return; } // Copy 4 uints at a time, if aligned properly. if (((uint)pvDst | (uint)pvSrc | cb) & 0x0f) { uint *dst = (uint *)pvDst; uint *src = (uint *)pvSrc; int remainder = (cb >> 2) & 0x03; int nWords = (cb >> 2) - remainder; int processed = 0; while (processed < remainder) { *dst++ = *src++; processed++; } // TODO: This part might be possible to clean up, // but I wasn't able to. -545u processed = 0; while (processed < nWords) { uint w0 = src[0]; uint w1 = src[1]; uint w2 = src[2]; uint w3 = src[3]; src += 4; dst[0] = w0; dst[1] = w1; dst[2] = w2; dst[3] = w3; dst += 4; processed += 4; } return; } // Use CopyAqw, if fully 16-byte aligned. CopyAqw(pvDst, pvSrc, cb >> 4); } ================================================ FILE: src/P2/missile.c ================================================ #include #include void InitMissile(MISSILE *pmissile) { InitBomb(pmissile); STRUCT_OFFSET(pmissile, 0x6b8, int) = 1; // pmissile->fFollowTrajectory } INCLUDE_ASM("asm/nonmatchings/P2/missile", LoadMissileFromBrx__FP7MISSILEP18CBinaryInputStream); void OnMissileRemove(MISSILE *pmissile) { OnSoRemove(pmissile); if (STRUCT_OFFSET(pmissile, 0x6b4, ASEGA *)) // pmissile->pasegaCur { RetractAsega(STRUCT_OFFSET(pmissile, 0x6b4, ASEGA *)); STRUCT_OFFSET(pmissile, 0x6b4, ASEGA *) = NULL; // pmissile->pasegaCur } } INCLUDE_ASM("asm/nonmatchings/P2/missile", ProjectMissileTransform__FP7MISSILEfi); INCLUDE_ASM("asm/nonmatchings/P2/missile", FireMissile__FP7MISSILEP3ALOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/missile", RenderMissileAll__FP7MISSILEP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/missile", FUN_0018dc88); INCLUDE_ASM("asm/nonmatchings/P2/missile", FUN_0018dd50); INCLUDE_ASM("asm/nonmatchings/P2/missile", FUN_0018dd78); INCLUDE_ASM("asm/nonmatchings/P2/missile", InitAccmiss__FP7ACCMISS); INCLUDE_ASM("asm/nonmatchings/P2/missile", FireAccmiss__FP7ACCMISSP3ALOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/missile", PresetAccmissAccel__FP7ACCMISSf); INCLUDE_ASM("asm/nonmatchings/P2/missile", FireSplmiss__FP7SPLMISSP3ALOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/missile", ProjectSplmissTransform__FP7SPLMISSfi); ================================================ FILE: src/P2/mpeg.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/mpeg", FUN_0018e410); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", FUN_0018e480); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", FUN_0018e4c0); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", FUN_0018e4f0); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", FUN_0018e558); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", StartupMpeg__Fv); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", Init__15CQueueOutputIopii); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", Reset__15CQueueOutputIop); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", CbWrite__15CQueueOutputIopiPv); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", CbSend__15CQueueOutputIopiPv); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", Update__15CQueueOutputIop); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", FAsyncDrain__15CQueueOutputIop); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", CbWrite__15CQueueOutputIpuiPv); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", FAsyncDrain__15CQueueOutputIpu); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", Init__10CMpegAudio); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", Reset__10CMpegAudio); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", Close__10CMpegAudio); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", FAccept__10CMpegAudioiPUc); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", Update__10CMpegAudio); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", FMpegAcceptVideo__FP7sceMpegP16sceMpegCbDataStrP5CMpeg); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", FMpegAcceptAudio__FP7sceMpegP16sceMpegCbDataStrP5CMpeg); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", FMpegDecodeVideo__FP7sceMpegP13sceMpegCbDataP5CMpeg); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", FMpegDecoderIdle__FP7sceMpegP13sceMpegCbDataP5CMpeg); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", FMpegDecoderError__FP7sceMpegP13sceMpegCbDataP5CMpeg); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", BuildMpegGifs__FP2QWP11sceIpuRGB32iiiii); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", FUN_0018ef78); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", FUN_0018f0e8); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", ExecuteOids__5CMpeg); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", Execute__5CMpeg); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", Start__5CMpegP18CBinaryAsyncStream); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", FUN_0018f610__5CMpeg); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", Update__5CMpeg); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", Finish__5CMpeg); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", CbDemuxed__5CMpegi); JUNK_WORD(0x0002102B); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", mpeg__static_initialization_and_destruction_0); INCLUDE_ASM("asm/nonmatchings/P2/mpeg", _GLOBAL_$I$g_mpeg); ================================================ FILE: src/P2/mrkv.c ================================================ #include void InitMrkv(MRKV *pmrkv) { InitSo(pmrkv); STRUCT_OFFSET(pmrkv, 0x538, ulong) = STRUCT_OFFSET(pmrkv, 0x538, ulong) | 0x80000000000; SetSoConstraints(pmrkv, CT_Locked, NULL, CT_Locked, NULL); } ================================================ FILE: src/P2/ms.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/ms", RenderMsGlobset__FP2MSP2CMP2RO); ================================================ FILE: src/P2/murray.c ================================================ #include void InitMurray(MURRAY *pmurray) { InitStepguard(pmurray); STRUCT_OFFSET(pmurray, 0xbd4, int) = 0; // pmurray->fAutoFadeDying STRUCT_OFFSET(pmurray, 0xbd0, float) = 0.0f; // pmurray->uFling } INCLUDE_ASM("asm/nonmatchings/P2/murray", PostMurrayLoad__FP6MURRAY); INCLUDE_ASM("asm/nonmatchings/P2/murray", FUN_0018ffb0); INCLUDE_ASM("asm/nonmatchings/P2/murray", OnMurrayExitingSgs__FP6MURRAY3SGS); INCLUDE_ASM("asm/nonmatchings/P2/murray", UpdateMurrayGoal__FP6MURRAYi); INCLUDE_ASM("asm/nonmatchings/P2/murray", UpdateMurraySgs__FP6MURRAY); INCLUDE_ASM("asm/nonmatchings/P2/murray", FUN_001903f0); INCLUDE_ASM("asm/nonmatchings/P2/murray", FUN_00190450); INCLUDE_ASM("asm/nonmatchings/P2/murray", FAbsorbMurrayWkr__FP6MURRAYP3WKR); INCLUDE_ASM("asm/nonmatchings/P2/murray", FDetectMurray__FP6MURRAY); int FCanMurrayAttack(MURRAY *pmurray) { return false; } INCLUDE_ASM("asm/nonmatchings/P2/murray", FUN_00190660); void SetMurrayPursueXfm(MURRAY *pmurray, XFM *pxfm) { STRUCT_OFFSET(pmurray, 0xc28, XFM *) = pxfm; // pmurray->pxfmPursue } void SetMurrayPatrolXfm(MURRAY *pmurray, XFM *pxfm) { STRUCT_OFFSET(pmurray, 0xc24, XFM *) = pxfm; // pmurray->pxfmPatrol } void CollectMurrayPrize(MURRAY *pmurray, PCK pck, ALO *palo) { CollectPoPrize(pmurray, pck, palo); if (pck == PCK_Key) { SetStepguardSgs(pmurray, SGS_LostPlayer, STRUCT_OFFSET(pmurray, 0x5f0, ASEG *)); // pmurray->pasegCelebrateKey } } INCLUDE_ASM("asm/nonmatchings/P2/murray", FUN_00190740); INCLUDE_ASM("asm/nonmatchings/P2/murray", HandleMurrayMessage); ================================================ FILE: src/P2/path.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/path", PcbspExtract__FP4CBSP); INCLUDE_ASM("asm/nonmatchings/P2/path", PcgtExtract__FP3CGT); INCLUDE_ASM("asm/nonmatchings/P2/path", PcgtPointInCbspQuick__FP4CBSPP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/path", PcgtPointInCbspSafe__FP4CBSPP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/path", CbskFromG__Ff); INCLUDE_ASM("asm/nonmatchings/P2/path", ClsgClipEdgeToCbsp__FP4CBSPP6VECTORT1iP3LSG); INCLUDE_ASM("asm/nonmatchings/P2/path", FClipEdgeToCbsp__FP4CBSPP6VECTORT1); INCLUDE_ASM("asm/nonmatchings/P2/path", IcgvFromPcgv__FP2CGP3CGV); INCLUDE_ASM("asm/nonmatchings/P2/path", FindPathAStar__FP2CGP3CGVT1iPiPP3CGV); INCLUDE_ASM("asm/nonmatchings/P2/path", SimplifyApcgvNeighbor__FP4CBSPPiPP3CGV); INCLUDE_ASM("asm/nonmatchings/P2/path", CposFindPath__FP2CGP6VECTORT1iT1); INCLUDE_ASM("asm/nonmatchings/P2/path", FindClosestPointInCg__FP2CGP6VECTORT1); INCLUDE_ASM("asm/nonmatchings/P2/path", LoadPathzoneFromBrx__FP8PATHZONEP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/path", HookupCg__FP2CG); INCLUDE_ASM("asm/nonmatchings/P2/path", CposFindPathzonePath__FP8PATHZONEP6VECTORT1iT1); INCLUDE_ASM("asm/nonmatchings/P2/path", FindPathzoneClosestPoint__FP8PATHZONEP6VECTORT1); INCLUDE_ASM("asm/nonmatchings/P2/path", FUN_00191aa8); INCLUDE_ASM("asm/nonmatchings/P2/path", FUN_00191ac8); INCLUDE_ASM("asm/nonmatchings/P2/path", ChoosePathzoneRandomPoint__FP8PATHZONEP6VECTOR); ================================================ FILE: src/P2/phasemem.c ================================================ #include #include // PHASE g_phase = PHASE_None; // TODO: There may be other data in this file. void SetPhase(PHASE phase) { if (g_phase == phase) return; FlushCache(0); g_phase = phase; } void ClearPhase(PHASE phase) { g_phase = PHASE_None; } ================================================ FILE: src/P2/pipe.c ================================================ #include #include #include extern DL g_dlPipe; void StartupPipe() { InitDl(&g_dlPipe, 0x38); } void ResetPipeList() { ClearDl(&g_dlPipe); } INCLUDE_ASM("asm/nonmatchings/P2/pipe", InitPipe__FP4PIPE); void OnPipeAdd(PIPE *ppipe) { OnLoAdd(ppipe); AppendDlEntry(&g_dlPipe, ppipe); } void OnPipeRemove(PIPE *ppipe) { OnLoRemove(ppipe); RemoveDlEntry(&g_dlPipe, ppipe); } void PostPipeLoad(PIPE *ppipe) { PostLoLoad(ppipe); if (ppipe->oid != OID_Nil) { // TODO: Check whether this is LO or something that inherits from it. ppipe->plo = PloFindSwObject(ppipe->psw, 4, ppipe->oid, ppipe); } } void ClonePipe(PIPE *ppipe, PIPE *ppipeBase) { DLE dlePipe = ppipe->dlePipe; CloneLo(ppipe, ppipeBase); ppipe->dlePipe = dlePipe; } ================================================ FILE: src/P2/pnt.c ================================================ #include #include void LoadPntFromBrx(PNT *ppnt, CBinaryInputStream *pbis) { pbis->ReadVector(&ppnt->posLocal); LoadOptionsFromBrx(ppnt, pbis); } void GetPntPos(PNT *ppnt, VECTOR *ppos) { ConvertAloPos(ppnt->paloParent, NULL, &ppnt->posLocal, ppos); } void SetPntParent(PNT *ppnt, ALO *paloParent) { ConvertAloPos(ppnt->paloParent, paloParent, &ppnt->posLocal, &ppnt->posLocal); SetLoParent(ppnt, paloParent); } void ApplyPntProxy(PNT *ppnt, PROXY *pproxyApply) { ConvertAloPos((ALO *)pproxyApply, NULL, &ppnt->posLocal, &ppnt->posLocal); } /** * @todo Rename function and figure out what does it actually do. */ void FUN_00192150(PNT *ppnt, CBinaryInputStream *pbis) { LoadPntFromBrx(ppnt, pbis); pbis->ReadStringSw(&STRUCT_OFFSET(ppnt, 0x50, char *)); } /** * @todo Rename function and figure out what does it actually do. */ void FUN_00192190(PNT *ppnt) { STRUCT_OFFSET(ppnt, 0x54, float) = 0.5f; STRUCT_OFFSET(ppnt, 0x58, float) = 0.5f; } ================================================ FILE: src/P2/po.c ================================================ #include #include #include extern int g_ippoCur; extern PO *g_appo[]; void InitPo(PO *ppo) { InitSo(ppo); STRUCT_OFFSET(ppo, 0x598, PO *) = ppo; STRUCT_OFFSET(ppo, 0x580, int) = 1; SetPoPlayable(ppo, 1); } void ClonePo(PO *ppo, PO *ppoBase) { CloneSo(ppo, ppoBase); if (STRUCT_OFFSET(ppo, 0x550, int) == 0) // ppo->fPlayable { STRUCT_OFFSET(ppo, 0x550, int) = 1; // ppo->fPlayable SetPoPlayable(ppo, 0); } } INCLUDE_ASM("asm/nonmatchings/P2/po", HandlePoMessage__FP2PO5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/po", OnPoActive__FP2POiT0); INCLUDE_ASM("asm/nonmatchings/P2/po", GetPoCpdefi__FP2POfP6CPDEFI); int FIsPoSoundBase(PO *ppo) { return 1; } void MakePoActive(PO *ppo) { if (ppo != PpoCur()) { SwitchToPo(ppo); } } INCLUDE_ASM("asm/nonmatchings/P2/po", FInvulnerablePo__FP2PO3ZPK); int FTakePoDamage(PO *ppo, ZPR *pzpr) { return 0; } JTHS JthsCurrentPo(PO *ppo) { return JTHS_Normal; } INCLUDE_ASM("asm/nonmatchings/P2/po", FUN_00192498); INCLUDE_ASM("asm/nonmatchings/P2/po", CollectPoPrize__FP2PO3PCKP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/po", FUN_001925C0); PO *PpoCur() { if (g_ippoCur < 0) { return NULL; } return g_appo[g_ippoCur]; } INCLUDE_ASM("asm/nonmatchings/P2/po", PpoStart__Fv); INCLUDE_ASM("asm/nonmatchings/P2/po", _IppoFindPo__FP2PO); INCLUDE_ASM("asm/nonmatchings/P2/po", AddPoToList__FP2PO); INCLUDE_ASM("asm/nonmatchings/P2/po", RemovePoFromList__FP2PO); void OnPoAdd(PO *ppo) { OnSoAdd(ppo); AddPoToList(ppo); } void OnPoRemove(PO *ppo) { OnSoRemove(ppo); RemovePoFromList(ppo); } INCLUDE_ASM("asm/nonmatchings/P2/po", SwitchToIppo__Fi); JUNK_ADDIU(10); void SetPoPlayable(PO *ppo, int fPlayable) { if (STRUCT_OFFSET(ppo, 0x550, int) == fPlayable) return; STRUCT_OFFSET(ppo, 0x550, int) = fPlayable; if (fPlayable) { AddPoToList(ppo); } else { RemovePoFromList(ppo); } } void SwitchToPo(PO *ppo) { SwitchToIppo(_IppoFindPo(ppo)); } INCLUDE_ASM("asm/nonmatchings/P2/po", PpziCur__Fv); void GetPoDiapi(PO *ppo, DIALOG *pdialog, DIAPI *pdiapi) { pdiapi->fPlayable = 1; pdiapi->fCallable = 1; } INCLUDE_ASM("asm/nonmatchings/P2/po", PlayPoDialog__FP2POP6DIALOG); INCLUDE_ASM("asm/nonmatchings/P2/po", FUN_00192a70); INCLUDE_ASM("asm/nonmatchings/P2/po", UpdatePo__FP2POf); INCLUDE_ASM("asm/nonmatchings/P2/po", UsePoCharm__FP2PO); INCLUDE_ASM("asm/nonmatchings/P2/po", FUN_00192dd0); INCLUDE_ASM("asm/nonmatchings/P2/po", FUN_001930B0); INCLUDE_ASM("asm/nonmatchings/P2/po", po__static_initialization_and_destruction_04); INCLUDE_ASM("asm/nonmatchings/P2/po", _GLOBAL_$I$InitPo__FP2PO); ================================================ FILE: src/P2/prog.c ================================================ #include #include #include #include #include CProg::CProg(RGBA *rgbaComplete, RGBA *rgbaRemain, RGBA *rgbaWarning, RGBA *rgbaTrouble) { m_rgbaComplete = *rgbaComplete; m_rgbaRemain = *rgbaRemain; m_rgbaWarning = *rgbaWarning; m_rgbaTrouble = *rgbaTrouble; m_fActive = 0; m_cRetry = 0; m_nRemain = 0; m_nTarget = 0; m_nMax = 0; } void CProg::Begin() { m_fActive = 0; m_cRetry = 0; m_nRemain = 0; m_nTarget = 0; m_nMax = 0; } void CProg::SetRemain(int nRemain) { if (m_fActive != 0) { if (m_nTarget == 0) { m_nTarget = nRemain; m_nMax = nRemain << 1; ClearFrameBuffers(); } else if (this->m_nRemain == nRemain) { m_cRetry = m_cRetry + 1; } else { m_cRetry = 0; } this->m_nRemain = nRemain; Draw(); } } void CProg::End() { m_fActive = 0; m_cRetry = 0; m_nRemain = 0; m_nTarget = 0; m_nMax = 0; } INCLUDE_ASM("asm/nonmatchings/P2/prog", Draw__5CProg); #ifdef SKIP_ASM /** * @todo 34.05% matched. * Stack frame doesn't line up. * https://decomp.me/scratch/06mco */ void CProg::Draw() { QW aqwProgress[64]; GIFS gifs = GIFS(); RGBA fgColor, bgColor; float xLeft, yTop, xRight, yBottom; const float width = 620.0f; const float offsetY = 412.9091f; int totalWidth = (int)(((float)m_nTarget * width) / (float)m_nMax); int filledWidth = (int)((float)totalWidth * (float)(m_nTarget - m_nRemain) / (float)m_nTarget); gifs.AllocStatic(0x40, aqwProgress); gifs.AddDmaCnt(); fgColor = m_rgbaComplete; xLeft = 10.0f; yTop = GTrunc(offsetY) * 1.1; xRight = (float)filledWidth + 10.0f; yBottom = GTrunc(offsetY) * 1.1 + 6.6; FillScreenRect(fgColor.bRed, fgColor.bGreen, fgColor.bBlue, 0xFF, xLeft, yTop, xRight, yBottom, &gifs); if (m_cRetry < 1) { bgColor = m_rgbaRemain; } else if (m_cRetry == 1) { bgColor = m_rgbaWarning; } else { bgColor = m_rgbaTrouble; } xLeft = filledWidth + 10.0f; yTop = GTrunc(offsetY) * 1.1; xRight = (float)totalWidth + 10.0f; yBottom = GTrunc(offsetY) * 1.1 + 6.6; FillScreenRect(bgColor.bRed, bgColor.bGreen, bgColor.bBlue, 0xFF, xLeft, yTop, xRight, yBottom, &gifs); gifs.AddPrimEnd(); gifs.AddDmaEnd(); gifs.EndDmaCnt(); gifs.Detach(NULL, NULL); BlastAqwGifsBothFrames(aqwProgress); } #endif ================================================ FILE: src/P2/proxy.c ================================================ #include #include void InitProxy(PROXY *pproxy) { InitAlo(pproxy); AppendDlEntry(&pproxy->psw->dlProxy, pproxy); } INCLUDE_ASM("asm/nonmatchings/P2/proxy", LoadProxyFromBrx__FP5PROXYP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/proxy", CloneProxy__FP5PROXYT0); void PostProxyLoad(PROXY *pproxy) { PostAloLoad(pproxy); pproxy->pvtlo->pfnRemoveLo(pproxy); } ================================================ FILE: src/P2/puffer.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/puffer", InitPuffer__FP6PUFFER); INCLUDE_ASM("asm/nonmatchings/P2/puffer", LoadPufferFromBrx__FP6PUFFERP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/puffer", PostPufferLoad__FP6PUFFER); INCLUDE_ASM("asm/nonmatchings/P2/puffer", PresetPufferAccel__FP6PUFFERf); INCLUDE_ASM("asm/nonmatchings/P2/puffer", FFilterPuffer__FP6PUFFERP2SO); INCLUDE_ASM("asm/nonmatchings/P2/puffer", UpdatePuffer__FP6PUFFERf); INCLUDE_ASM("asm/nonmatchings/P2/puffer", PpufftChoosePuffer__FP6PUFFER); INCLUDE_ASM("asm/nonmatchings/P2/puffer", FUN_001973d8); INCLUDE_ASM("asm/nonmatchings/P2/puffer", FUN_00197458); INCLUDE_ASM("asm/nonmatchings/P2/puffer", OnPufferActive__FP6PUFFERiP2PO); INCLUDE_ASM("asm/nonmatchings/P2/puffer", UpdatePufferActive__FP6PUFFERP3JOYf); INCLUDE_ASM("asm/nonmatchings/P2/puffer", FUN_00197788); INCLUDE_ASM("asm/nonmatchings/P2/puffer", FUN_00197848); INCLUDE_ASM("asm/nonmatchings/P2/puffer", FUN_00197a08); INCLUDE_ASM("asm/nonmatchings/P2/puffer", FUN_00197a68); INCLUDE_ASM("asm/nonmatchings/P2/puffer", AddPufferWaterAcceleration__FP6PUFFERP5WATERf); INCLUDE_ASM("asm/nonmatchings/P2/puffer", HandlePufferMessage__FP6PUFFER5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/puffer", PostPuffcLoad__FP5PUFFC); INCLUDE_ASM("asm/nonmatchings/P2/puffer", PresetPuffcAccel__FP5PUFFCf); INCLUDE_ASM("asm/nonmatchings/P2/puffer", FUN_001982a0); INCLUDE_ASM("asm/nonmatchings/P2/puffer", UpdatePuffcGoal__FP5PUFFCi); INCLUDE_ASM("asm/nonmatchings/P2/puffer", OnPuffcExitingSgs__FP5PUFFC3SGS); INCLUDE_ASM("asm/nonmatchings/P2/puffer", OnPuffcEnteringSgs__FP5PUFFC3SGSP4ASEG); INCLUDE_ASM("asm/nonmatchings/P2/puffer", UpdatePuffcSgs__FP5PUFFC); INCLUDE_ASM("asm/nonmatchings/P2/puffer", HandlePuffcMessage__FP5PUFFC5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/puffer", UpdatePuffc__FP5PUFFCf); INCLUDE_ASM("asm/nonmatchings/P2/puffer", FCanPuffcAttack__FP5PUFFC); INCLUDE_ASM("asm/nonmatchings/P2/puffer", FUN_00198860); INCLUDE_ASM("asm/nonmatchings/P2/puffer", PostPuffbLoad__FP5PUFFB); ================================================ FILE: src/P2/pzo.c ================================================ #include #include INCLUDE_ASM("asm/nonmatchings/P2/pzo", InitSprize__FP6SPRIZE); INCLUDE_ASM("asm/nonmatchings/P2/pzo", LoadSprizeFromBrx__FP6SPRIZEP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/pzo", BindSprize__FP6SPRIZE); INCLUDE_ASM("asm/nonmatchings/P2/pzo", PostSprizeLoad__FP6SPRIZE); INCLUDE_ASM("asm/nonmatchings/P2/pzo", UpdateSprize__FP6SPRIZEf); INCLUDE_ASM("asm/nonmatchings/P2/pzo", CollectSprize__FP6SPRIZE); INCLUDE_ASM("asm/nonmatchings/P2/pzo", EmitSprizeExplosion__FP6SPRIZE); INCLUDE_ASM("asm/nonmatchings/P2/pzo", PcsFromSprize__FP6SPRIZE); INCLUDE_ASM("asm/nonmatchings/P2/pzo", AddSprizeAseg__FP6SPRIZE3OID); INCLUDE_ASM("asm/nonmatchings/P2/pzo", HandleSprizeMessage__FP6SPRIZE5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/pzo", FIgnoreSprizeIntersection__FP6SPRIZEP2SO); INCLUDE_ASM("asm/nonmatchings/P2/pzo", FUN_00199000); INCLUDE_ASM("asm/nonmatchings/P2/pzo", InitScprize__FP7SCPRIZE); INCLUDE_ASM("asm/nonmatchings/P2/pzo", CloneScprize__FP7SCPRIZET0); INCLUDE_ASM("asm/nonmatchings/P2/pzo", PcsFromScprize__FP7SCPRIZE); INCLUDE_ASM("asm/nonmatchings/P2/pzo", CollectScprize__FP7SCPRIZE); INCLUDE_ASM("asm/nonmatchings/P2/pzo", LoadLockFromBrx__FP4LOCKP18CBinaryInputStream); #ifdef SKIP_ASM /** * @todo 95.80% matched. s_asnip may not be defined correctly. */ void LoadLockFromBrx(LOCK *plock, CBinaryInputStream *pbis) { static SNIP *s_asnip; LoadAloFromBrx(plock, pbis); SnipAloObjects(plock, 1, s_asnip); } #endif INCLUDE_ASM("asm/nonmatchings/P2/pzo", PostLockLoad__FP4LOCK); #ifdef SKIP_ASM /** * @todo 95.00% matched. s_asnip may not be defined correctly. */ void PostLockLoad(LOCK *plock) { static SNIP *s_asnip; PostAloLoad(plock); SnipAloObjects(plock, 1, s_asnip); } #endif INCLUDE_ASM("asm/nonmatchings/P2/pzo", LoadLockgFromBrx__FP5LOCKGP18CBinaryInputStream); #ifdef SKIP_ASM /** * @todo 95.00% matched. s_asnip may not be defined correctly. */ void LoadLockgFromBrx(LOCKG *plockg, CBinaryInputStream *pbis) { LoadAloFromBrx(plockg, pbis); // SnipAloObjects(plockg, 1, PostLockgLoad); } #endif INCLUDE_ASM("asm/nonmatchings/P2/pzo", PostLockgLoad__FP5LOCKG); #ifdef SKIP_ASM /** * @todo 63.40% matched. */ void PostLockgLoad(LOCKG *plockg) { PostAloLoad(plockg); int count; SW *psw = plockg->psw; LO **aplo = STRUCT_OFFSET(plockg, 0x304, LO **); count = CploFindSwObjectsByClass(psw, 1, (CID)0x5C, (LO *)plockg, 8, aplo); STRUCT_OFFSET(plockg, 0x300, uint) = count; count = STRUCT_OFFSET(plockg, 0x2DC, uint); if (count > 0) { LO **aploIn = STRUCT_OFFSET(plockg, 0x2E0, LO **); LO **aploOut = STRUCT_OFFSET(plockg, 0x304, LO **); for (int i = 0; i < count; i++) { LO *plo = PloFindSwObject(psw, 4, STRUCT_OFFSET(aploIn, i * 4, OID), (LO *)plockg); if (plo) { uint curCount = STRUCT_OFFSET(plockg, 0x300, uint); if (curCount < 8) { aploOut[curCount] = plo; curCount++; STRUCT_OFFSET(plockg, 0x300, uint) = curCount; } } } } int mask = STRUCT_OFFSET(plockg, 0x2D0, int); int goalStart = 0x22E; int goalEnd = 0x22F; if ((STRUCT_OFFSET(g_pwsCur, 0x448, int) & mask)) goalStart = goalEnd; SMA *psma; count = STRUCT_OFFSET(plockg, 0x300, uint); if (count > 0) { ALO **aploState = STRUCT_OFFSET(plockg, 0x304, ALO **); for (int i = 0; i < count; i++) { ALO *paloChild = aploState[i]; psma = PsmaApplySm(STRUCT_OFFSET(paloChild, 0x2D0, SM *), paloChild, (OID)-1, 0); STRUCT_OFFSET(paloChild, 0x2D4, SMA *) = psma; SetSmaGoal(psma, (OID)goalStart); } } psma = PsmaApplySm(STRUCT_OFFSET(plockg, 0x2D4, SM *), (ALO *)plockg, OID_Nil, 0); STRUCT_OFFSET(plockg, 0x2D8, SMA *) = psma; SetSmaGoal(psma, (OID)goalStart); } #endif void SetLockgIndex(LOCKG *plockg, int ifws) { STRUCT_OFFSET(plockg, 0x2D0, int) = 1 << ++ifws; } /** * @note Will stop matching if ALO or LOCKG fields are changed. */ void AddLockgLock(LOCKG *plockg, OID oidLock) { uint ccur = plockg->coidLock; if (ccur >= 8) return; plockg->aoidLock[ccur] = oidLock; plockg->coidLock = ++ccur; } INCLUDE_ASM("asm/nonmatchings/P2/pzo", TriggerLockg__FP5LOCKG); INCLUDE_ASM("asm/nonmatchings/P2/pzo", InitClue__FP4CLUE); INCLUDE_ASM("asm/nonmatchings/P2/pzo", LoadClueFromBrx__FP4CLUEP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/pzo", CloneClue__FP4CLUET0); INCLUDE_ASM("asm/nonmatchings/P2/pzo", PostClueLoad__FP4CLUE); INCLUDE_ASM("asm/nonmatchings/P2/pzo", UpdateClue); INCLUDE_ASM("asm/nonmatchings/P2/pzo", OnClueSmack__FP4CLUE); INCLUDE_ASM("asm/nonmatchings/P2/pzo", CollectClue__FP4CLUE); INCLUDE_ASM("asm/nonmatchings/P2/pzo", BreakClue__FP4CLUE); INCLUDE_ASM("asm/nonmatchings/P2/pzo", CollectClueSilent__FP4CLUE); INCLUDE_ASM("asm/nonmatchings/P2/pzo", FUN_00199c10); INCLUDE_ASM("asm/nonmatchings/P2/pzo", ImpactClue__FP4CLUEi); INCLUDE_ASM("asm/nonmatchings/P2/pzo", FAbsorbClueWkr__FP4CLUEP3WKR); INCLUDE_ASM("asm/nonmatchings/P2/pzo", RenderClueAll__FP4CLUEP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/pzo", CollectAllClues__Fi); INCLUDE_ASM("asm/nonmatchings/P2/pzo", SetGrfvault__Fi); INCLUDE_ASM("asm/nonmatchings/P2/pzo", FUN_0019a000); INCLUDE_ASM("asm/nonmatchings/P2/pzo", FUN_0019a088); INCLUDE_ASM("asm/nonmatchings/P2/pzo", FUN_0019a0f0); INCLUDE_ASM("asm/nonmatchings/P2/pzo", InitVault__FP5VAULT); INCLUDE_ASM("asm/nonmatchings/P2/pzo", PostTmblLoad__FP4TMBL3OID); INCLUDE_ASM("asm/nonmatchings/P2/pzo", PostVaultLoad__FP5VAULT); INCLUDE_ASM("asm/nonmatchings/P2/pzo", OnVaultActive__FP5VAULTiP2PO); INCLUDE_ASM("asm/nonmatchings/P2/pzo", UpdateVaultActive__FP5VAULTP3JOYf); INCLUDE_ASM("asm/nonmatchings/P2/pzo", HandleVaultMessage__FP5VAULT5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/pzo", AddVaultGoadDialog__FP5VAULT5GOADK3OID); INCLUDE_ASM("asm/nonmatchings/P2/pzo", OpenVault__FP5VAULT); ================================================ FILE: src/P2/rail.c ================================================ #include #include #include extern float D_0024C8C4; void InitRail(RAIL *prail) { InitLo(prail); prail->unk1 = D_0024C8C4; prail->oid = OID_Nil; } void OnRailAdd(RAIL *prail) { OnLoAdd(prail); AppendDlEntry(&prail->psw->dlRail, prail); } void OnRailRemove(RAIL *prail) { OnLoRemove(prail); RemoveDlEntry(&prail->psw->dlRail, prail); } void PostLoadRail(RAIL *prail) { PostLoLoad(prail); if (prail->oid != OID_Nil) { // TODO: Check if the field at 0x58 is LO or something that inherits from it. prail->plo = PloFindSwObject(prail->psw, 4, prail->oid, prail); } } void CloneRail(RAIL *prail, RAIL *prailBase) { DLE dleRail = prail->dleRail; CloneLo(prail, prailBase); prail->dleRail = dleRail; } ================================================ FILE: src/P2/rat.c ================================================ #include #include #include void InitRat(RAT *prat) { InitSo(prat); STRUCT_OFFSET(prat, 0x608, LM).gMin = 0.5f; // prat->lmDtStop.gMin STRUCT_OFFSET(prat, 0x608, LM).gMax = 1.0f; // prat->lmDtStop.gMax STRUCT_OFFSET(prat, 0x55c, float) = GRandGaussian(g_clock.t + 3.0f, 1.0f, 2.5f); // prat->tRatSqueak STRUCT_OFFSET(prat, 0x664, int) = -1; // prat->ccoin } INCLUDE_ASM("asm/nonmatchings/P2/rat", LoadRatFromBrx__FP3RATP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/rat", PostRatLoad__FP3RAT); void OnRatAdd(RAT *prat) { OnSoAdd(prat); AppendDlEntry(&prat->psw->dlRat, prat); } void OnRatRemove(RAT *prat) { OnSoRemove(prat); RemoveDlEntry(&prat->psw->dlRat, prat); } void CloneRat(RAT *prat, RAT *pratBase) { DLE dleRat = STRUCT_OFFSET(prat, 0x600, DLE); // prat->dleRat CloneSo(prat, pratBase); STRUCT_OFFSET(prat, 0x600, DLE) = dleRat; // prat->dleRat } INCLUDE_ASM("asm/nonmatchings/P2/rat", PresetRatAccel__FP3RATf); INCLUDE_ASM("asm/nonmatchings/P2/rat", UpdateRat__FP3RATf); INCLUDE_ASM("asm/nonmatchings/P2/rat", AdjustRatNewXp__FP3RATP2XPi); INCLUDE_ASM("asm/nonmatchings/P2/rat", AdjustRatXpVelocity__FP3RATP2XPi); INCLUDE_ASM("asm/nonmatchings/P2/rat", RenderRatAll__FP3RATP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/rat", FAbsorbRatWkr__FP3RATP3WKR); INCLUDE_ASM("asm/nonmatchings/P2/rat", ChooseRatFleeTarget__FP3RAT); INCLUDE_ASM("asm/nonmatchings/P2/rat", HideRat__FP3RATi); INCLUDE_ASM("asm/nonmatchings/P2/rat", SetRatRats__FP3RAT4RATS); void OnRatholeAdd(RATHOLE *prathole) { OnLoAdd(prathole); AppendDlEntry(&prathole->psw->dlRathole, prathole); } void OnRatholeRemove(RATHOLE *prathole) { OnLoRemove(prathole); RemoveDlEntry(&prathole->psw->dlRathole, prathole); } ================================================ FILE: src/P2/rchm.c ================================================ #include void InitRchm(RCHM *prchm) { InitLo(prchm); prchm->oidTouch = OID_Nil; prchm->oidHost = OID_Nil; } INCLUDE_ASM("asm/nonmatchings/P2/rchm", LoadRchmFromBrx__FP4RCHMP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/rchm", PostRchmLoad__FP4RCHM); INCLUDE_ASM("asm/nonmatchings/P2/rchm", ReblendRchm__FP4RCHMP3TWRP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/rchm", BuildRchmCoefficients__FP4RCHMfffPf); INCLUDE_ASM("asm/nonmatchings/P2/rchm", ConvertRchmIposToRclIoLhub__FP4RCHMiPfN22); void SetRchmNaturalCoefficients(RCHM *prchm, float rcl, float io, float lhub) { prchm->rclNatural = rcl; prchm->ioNatural = io; prchm->lhubNatural = lhub; } void SetRchmCenterCoefficients(RCHM *prchm, float rcl, float io, float lhub) { prchm->fCenterSet = 1; prchm->rclNatural = rcl; prchm->ioNatural = io; prchm->lhubNatural = lhub; } INCLUDE_ASM("asm/nonmatchings/P2/rchm", PredictRchmTargetPos__FP4RCHMP6TARGETfP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/rchm", PredictRchmTargetLocalPos__FP4RCHMP6TARGETfP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/rchm", PtwrMapRchmSafe__FP4RCHMP3BSPP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/rchm", FindRchmClosestPoint__FP4RCHMP6VECTORT1PP3TWRPf); INCLUDE_ASM("asm/nonmatchings/P2/rchm", TrackJtTarget__FP2JTP4RCHMP6TARGET); INCLUDE_ASM("asm/nonmatchings/P2/rchm", TrackJtPipe__FP2JTP4RCHMP4PIPEPf); ================================================ FILE: src/P2/render.c ================================================ #include extern int s_fFBCleared; extern int s_fZBCleared; extern int s_fCameraGlobals; extern int s_fRenderGlobals; INCLUDE_ASM("asm/nonmatchings/P2/render", SubmitRpl__FP3RPL); INCLUDE_ASM("asm/nonmatchings/P2/render", NCmpPrplReverseZ__FPP3RPLT0); #ifdef SKIP_ASM /** * @todo 100% match, if the struct is exactly 8 bytes long. * Once the struct is fully implemented this code needs to be changed to account for that. * https://decomp.me/scratch/4xKRS */ int NCmpPrplReverseZ(RPL **pprpl1, RPL **pprpl2) { RPL *plhs = *pprpl1; RPL *prhs = *pprpl2; if (prhs->z < plhs->z) { return -1; } if (plhs->z < prhs->z) { return 1; } return (plhs - prhs) >> 0x04; } #endif INCLUDE_ASM("asm/nonmatchings/P2/render", CprplPartitionArpl__FiP3RPLPP3RPL); INCLUDE_ASM("asm/nonmatchings/P2/render", RenderSw__FP2SWP2CM); INCLUDE_ASM("asm/nonmatchings/P2/render", EnsureRenderGlobals__Fv); void EnsureCameraGlobals() { if (s_fCameraGlobals == 0) { s_fCameraGlobals = 1; DrawCm(g_pcm); } } INCLUDE_ASM("asm/nonmatchings/P2/render", EnsureScreenCleared__Fv); INCLUDE_ASM("asm/nonmatchings/P2/render", SetupRpDynamicTexture__FP3RPL); INCLUDE_ASM("asm/nonmatchings/P2/render", SetupRpBackground__FP3RPL); INCLUDE_ASM("asm/nonmatchings/P2/render", SetupRpBlotContext__FP3RPL); INCLUDE_ASM("asm/nonmatchings/P2/render", SetupRpGlob__FP3RPL); INCLUDE_ASM("asm/nonmatchings/P2/render", SetupRpBlip__FP3RPL); INCLUDE_ASM("asm/nonmatchings/P2/render", SetupRpWorldMap__FP3RPL); INCLUDE_ASM("asm/nonmatchings/P2/render", DrawSw__FP2SWP2CM); INCLUDE_ASM("asm/nonmatchings/P2/render", FillScreenRect__FiiiiffffP4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/render", StartupRender__Fv); ================================================ FILE: src/P2/rip.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/rip", PripgNew__FP2SW5RIPGT); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitRipg__FP4RIPG); void SetRipgEmitb(RIPG *pripg, EMITB *pemitb) { // pripg->sExpand & pemib->emitp.emitrip.sExpand STRUCT_OFFSET(pripg, 0x554, float) = STRUCT_OFFSET(pemitb, 0x1e8, float); } INCLUDE_ASM("asm/nonmatchings/P2/rip", OnRipgRemove__FP4RIPG); INCLUDE_ASM("asm/nonmatchings/P2/rip", ProjectRipgTransform__FP4RIPGfi); void UpdateRipgBounds(RIPG *pripg) { return; } INCLUDE_ASM("asm/nonmatchings/P2/rip", FUN_0019e420); INCLUDE_ASM("asm/nonmatchings/P2/rip", BounceRipgRips__FP4RIPG); INCLUDE_ASM("asm/nonmatchings/P2/rip", RenderRipgSelf__FP4RIPGP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/rip", PvtripFromRipt__F4RIPT); INCLUDE_ASM("asm/nonmatchings/P2/rip", PripNewRipg__F4RIPTP4RIPG); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitRip__FP3RIPP6VECTORfP2SO); void RemoveRip(RIP *prip) { RemoveDlEntry(&STRUCT_OFFSET(prip->pripg, 0x558, DL), prip); ReleaseRip(prip); } void AddRipRef(RIP *prip) { prip->cref++; } INCLUDE_ASM("asm/nonmatchings/P2/rip", ReleaseRip__FP3RIP); void TouchRip(RIP *prip, int fTouching) { if (fTouching) { RemoveRip(prip); } } INCLUDE_ASM("asm/nonmatchings/P2/rip", ForceRipFade__FP3RIPf); INCLUDE_ASM("asm/nonmatchings/P2/rip", FBounceRip__FP3RIPP2SOP6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/rip", ProjectRipTransform__FP3RIPf); INCLUDE_ASM("asm/nonmatchings/P2/rip", UpdateRip__FP3RIPf); INCLUDE_ASM("asm/nonmatchings/P2/rip", FRenderRipPosMat__FP3RIPP2CMP6VECTORP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/rip", RenderRip__FP3RIPP2CM); INCLUDE_ASM("asm/nonmatchings/P2/rip", SubscribeRipObject__FP3RIPP2LO); INCLUDE_ASM("asm/nonmatchings/P2/rip", SubscribeRipStruct__FP3RIPPFPv5MSGIDPv_vPv); INCLUDE_ASM("asm/nonmatchings/P2/rip", UnsubscribeRipStruct__FP3RIPPFPv5MSGIDPv_vPv); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitDroplet__FP7DROPLETP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", TouchDroplet__FP7DROPLETi); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitBublet__FP6BUBLETP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", ProjectBubletTransform__FP6BUBLETf); INCLUDE_ASM("asm/nonmatchings/P2/rip", TouchBublet__FP6BUBLETi); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitRipple__FP6RIPPLEP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitPuff__FP4PUFFP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitDablet__FP6DABLETP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitFlake__FP5FLAKEP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", UpdateFlake__FP5FLAKEf); INCLUDE_ASM("asm/nonmatchings/P2/rip", RenderFlake__FP5FLAKEP2CM); INCLUDE_ASM("asm/nonmatchings/P2/rip", TouchFlake__FP5FLAKEi); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitSpark__FP5SPARKP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", RenderSpark__FP5SPARKP2CM); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitBurst__FP5BURSTP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitTrail__FP5TRAILP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", OnTrailRemove__FP5TRAIL); INCLUDE_ASM("asm/nonmatchings/P2/rip", SetTrailTrls__FP5TRAIL4TRLSPv); INCLUDE_ASM("asm/nonmatchings/P2/rip", DetachTrail__FP5TRAIL); INCLUDE_ASM("asm/nonmatchings/P2/rip", ProjectTrailTransform__FP5TRAILf); INCLUDE_ASM("asm/nonmatchings/P2/rip", RenderTrail__FP5TRAILP2CM); INCLUDE_ASM("asm/nonmatchings/P2/rip", HandleTrailMessage__FP5TRAIL5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitFireball__FP8FIREBALLP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", UpdateFireball__FP8FIREBALLf); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitSmokecloud__FP10SMOKECLOUDP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitSmoketrail__FP10SMOKETRAILP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitDebris__FP6DEBRISP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitSmack__FP5SMACKP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", ProjectSmackTransform__FP5SMACKf); INCLUDE_ASM("asm/nonmatchings/P2/rip", RenderSmack__FP5SMACKP2CM); INCLUDE_ASM("asm/nonmatchings/P2/rip", UpdateSmack__FP5SMACKf); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitOrbit__FP5ORBITP6VECTORfP2SO); JUNK_ADDIU(80); INCLUDE_ASM("asm/nonmatchings/P2/rip", ProjectOrbitTransform__FP5ORBITf); INCLUDE_ASM("asm/nonmatchings/P2/rip", UpdateOrbit__FP5ORBITf); INCLUDE_ASM("asm/nonmatchings/P2/rip", RenderOrbit__FP5ORBITP2CM); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitRay__FP3RAYP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitRose__FP4ROSEP6VECTORfP2SO); void ProjectRoseTransform(ROSE *prose, float dt) { return; } INCLUDE_ASM("asm/nonmatchings/P2/rip", UpdateRose__FP4ROSEf); INCLUDE_ASM("asm/nonmatchings/P2/rip", RenderRose__FP4ROSEP2CM); INCLUDE_ASM("asm/nonmatchings/P2/rip", SetRoseRoses__FP4ROSE5ROSES); INCLUDE_ASM("asm/nonmatchings/P2/rip", SgnCmpHp__FPCvT0); INCLUDE_ASM("asm/nonmatchings/P2/rip", ChpBuildConvexHullScreen__FP6VECTORiP2HP); INCLUDE_ASM("asm/nonmatchings/P2/rip", ChpBuildConvexHullXY__FP7MATRIX4iP2HP); INCLUDE_ASM("asm/nonmatchings/P2/rip", PostFlyingEmit__FP6FLYINGP5EMITB); INCLUDE_ASM("asm/nonmatchings/P2/rip", RenderFlying__FP6FLYINGP2CM); INCLUDE_ASM("asm/nonmatchings/P2/rip", CreateStuck__FP3RIPP3ALOP2SOP6VECTORT3PP5STUCK); INCLUDE_ASM("asm/nonmatchings/P2/rip", FBounceFlying__FP6FLYINGP2SOP6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/rip", UpdateStuck__FP5STUCKf); INCLUDE_ASM("asm/nonmatchings/P2/rip", RenderStuck__FP5STUCKP2CM); INCLUDE_ASM("asm/nonmatchings/P2/rip", PostLeafEmit__FP4LEAFP5EMITB); INCLUDE_ASM("asm/nonmatchings/P2/rip", ProjectLeafTransform__FP4LEAFf); INCLUDE_ASM("asm/nonmatchings/P2/rip", FBounceLeaf__FP4LEAFP2SOP6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/rip", FFilterFlameObjects__FPvP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", PostFlameEmit__FP5FLAMEP5EMITB); INCLUDE_ASM("asm/nonmatchings/P2/rip", PostBulletEmit__FP6BULLETP5EMITB); INCLUDE_ASM("asm/nonmatchings/P2/rip", RenderBullet__FP6BULLETP2CM); INCLUDE_ASM("asm/nonmatchings/P2/rip", FBounceBullet__FP6BULLETP2SOP6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/rip", PostShrapnelEmit__FP8SHRAPNELP5EMITB); INCLUDE_ASM("asm/nonmatchings/P2/rip", FBounceShrapnel__FP8SHRAPNELP2SOP6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/rip", RenderShrapnel__FP8SHRAPNELP2CM); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitGlint__FP5GLINTP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", RenderGlint__FP5GLINTP2CM); INCLUDE_ASM("asm/nonmatchings/P2/rip", InitMatch__FP5MATCHP6VECTORfP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rip", LaunchMatch__FP5MATCH); INCLUDE_ASM("asm/nonmatchings/P2/rip", ProjectMatchTransform__FP5MATCHf); INCLUDE_ASM("asm/nonmatchings/P2/rip", UpdateMatch__FP5MATCHf); INCLUDE_ASM("asm/nonmatchings/P2/rip", RenderMatch__FP5MATCHP2CM); INCLUDE_ASM("asm/nonmatchings/P2/rip", PostRemitEmit__FP5REMITP5EMITB); INCLUDE_ASM("asm/nonmatchings/P2/rip", UpdateRemit__FP5REMITf); JUNK_ADDIU(10); JUNK_WORD(0x7C450000); JUNK_WORD(0x48220800); ================================================ FILE: src/P2/rog.c ================================================ #include #include extern SNIP s_asnipLoadRov[2]; void InitRov(ROV *prov) { InitPo(prov); STRUCT_OFFSET(prov, 0x628, float) = 2000.0f; // prov->svMax STRUCT_OFFSET(prov, 0x610, ROVS) = ROVS_Nil; // prov->rovs STRUCT_OFFSET(prov, 0x614, ROVTS) = ROVTS_Nil; // prov->rovts } void LoadRovFromBrx(ROV *prov, CBinaryInputStream *pbis) { LoadSoFromBrx(prov, pbis); SnipAloObjects(prov, 2, s_asnipLoadRov); } INCLUDE_ASM("asm/nonmatchings/P2/rog", PostRovLoad__FP3ROV); INCLUDE_ASM("asm/nonmatchings/P2/rog", UpdateRovActive__FP3ROVP3JOYf); INCLUDE_ASM("asm/nonmatchings/P2/rog", UpdateRov__FP3ROVf); void ReadRovJoystick(ROV *prov, JOY *pjoy) { if (pjoy->uDeflect > 0.3f) { // prov->radJoyLeft AdjustCmJoy(g_pcm, pjoy, JOYID_Left, &STRUCT_OFFSET(prov, 0x618, float)); } STRUCT_OFFSET(prov, 0x61c, float) = pjoy->uDeflect; if (pjoy->uDeflect2 > 0.8f) { // prov->radJoyRight AdjustCmJoy(g_pcm, pjoy, JOYID_Right, &STRUCT_OFFSET(prov, 0x620, float)); } STRUCT_OFFSET(prov, 0x624, float) = pjoy->uDeflect2; } INCLUDE_ASM("asm/nonmatchings/P2/rog", RovsNextRov__FP3ROV); INCLUDE_ASM("asm/nonmatchings/P2/rog", SetRovRovs__FP3ROV4ROVS); INCLUDE_ASM("asm/nonmatchings/P2/rog", RovtsNextRov__FP3ROV); INCLUDE_ASM("asm/nonmatchings/P2/rog", SetRovRovts__FP3ROV5ROVTS); INCLUDE_ASM("asm/nonmatchings/P2/rog", HandleRovMessage__FP3ROV5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/rog", PresetRovAccel__FP3ROVf); INCLUDE_ASM("asm/nonmatchings/P2/rog", AdjustRovXpVelocity__FP3ROVP2XPi); INCLUDE_ASM("asm/nonmatchings/P2/rog", AdjustRovNewXp__FP3ROVP2XPi); INCLUDE_ASM("asm/nonmatchings/P2/rog", PropagateRovForce__FP3ROViP2XPiP2DZP2FX); int FIsRovSoundBase(ROV *prov) { return 0; } INCLUDE_ASM("asm/nonmatchings/P2/rog", InitRob__FP3ROB); void SetRobCollectible(ROB *prob, OID oidCollectible) { STRUCT_OFFSET(prob, 0x2d0, OID) = oidCollectible; } void SetRobHarvester(ROB *prob, OID oidHarvester) { STRUCT_OFFSET(prob, 0x2d4, OID) = oidHarvester; } void SetRobVehicle(ROB *prob, OID oidVehicle) { STRUCT_OFFSET(prob, 0x2d8, OID) = oidVehicle; } void SetRobPrize(ROB *prob, OID oidPrize) { STRUCT_OFFSET(prob, 0x2dc, OID) = oidPrize; } void AddRobSpawnTunnel(ROB *prob, OID oidSpawnTunnel) { int coidRost = STRUCT_OFFSET(prob, 0x2e0, int); // prob->coidRost OID *aoidRost = &STRUCT_OFFSET(prob, 0x2e4, OID); // prob->aoidRost aoidRost[coidRost] = oidSpawnTunnel; STRUCT_OFFSET(prob, 0x2e0, int) = coidRost + 1; // prob->coidRost } /** * @brief 80% match. * https://decomp.me/scratch/s3oRy */ INCLUDE_ASM("asm/nonmatchings/P2/rog", RobkCur__Fv); #ifdef SKIP_ASM ROBK RobkCur() { if ((uint)g_plsCur->fls & FLS_Secondary) { return ROBK_Tertiary; } return (ROBK)((uint)g_plsCur->fls & FLS_KeyCollected); } #endif // SKIP_ASM INCLUDE_ASM("asm/nonmatchings/P2/rog", BindRob__FP3ROB); INCLUDE_ASM("asm/nonmatchings/P2/rog", PostRobLoad__FP3ROB); INCLUDE_ASM("asm/nonmatchings/P2/rog", UpdateRob__FP3ROBf); INCLUDE_ASM("asm/nonmatchings/P2/rog", FUN_001a4d60); INCLUDE_ASM("asm/nonmatchings/P2/rog", RobsNextRob__FP3ROB); INCLUDE_ASM("asm/nonmatchings/P2/rog", SetRobRobs__FP3ROB4ROBS); INCLUDE_ASM("asm/nonmatchings/P2/rog", AddRobRoc__FP3ROB); INCLUDE_ASM("asm/nonmatchings/P2/rog", AddRobRoh__FP3ROB); INCLUDE_ASM("asm/nonmatchings/P2/rog", AdjustRobDifficulty__FP3ROBf); INCLUDE_ASM("asm/nonmatchings/P2/rog", DestroyedRobRoc__FP3ROBP3ROC); INCLUDE_ASM("asm/nonmatchings/P2/rog", SpawnedRobRoh__FP3ROBP3ROH); INCLUDE_ASM("asm/nonmatchings/P2/rog", GrabbedRobRoh__FP3ROBP3ROH); INCLUDE_ASM("asm/nonmatchings/P2/rog", DroppedRobRoh__FP3ROBP3ROH); INCLUDE_ASM("asm/nonmatchings/P2/rog", ReturnedRobRoh__FP3ROBP3ROH); INCLUDE_ASM("asm/nonmatchings/P2/rog", ExitedRobRoh__FP3ROBP3ROH); INCLUDE_ASM("asm/nonmatchings/P2/rog", KilledRobRoh__FP3ROBP3ROH); INCLUDE_ASM("asm/nonmatchings/P2/rog", FChooseRobRoc__FP3ROBP3ROH); INCLUDE_ASM("asm/nonmatchings/P2/rog", TakeRobRoc__FP3ROBP3ROHP3ROC); INCLUDE_ASM("asm/nonmatchings/P2/rog", FChooseRobRoh__FP3ROBP3ROC); INCLUDE_ASM("asm/nonmatchings/P2/rog", FChooseRobReturnPoint__FP3ROBP3ROH); INCLUDE_ASM("asm/nonmatchings/P2/rog", ChooseRobWanderLocation__FP3ROBP3ROH); INCLUDE_ASM("asm/nonmatchings/P2/rog", ProddCurRob__FP3ROB4ENSK); INCLUDE_ASM("asm/nonmatchings/P2/rog", InitRoh__FP3ROH); INCLUDE_ASM("asm/nonmatchings/P2/rog", LoadRohFromBrx__FP3ROHP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/rog", CloneRoh__FP3ROHT0); INCLUDE_ASM("asm/nonmatchings/P2/rog", PostRohLoad__FP3ROH); INCLUDE_ASM("asm/nonmatchings/P2/rog", UpdateRoh__FP3ROHf); INCLUDE_ASM("asm/nonmatchings/P2/rog", MoveRohToTarget__FP3ROHP6VECTORi); INCLUDE_ASM("asm/nonmatchings/P2/rog", RohsNextRoh__FP3ROH); INCLUDE_ASM("asm/nonmatchings/P2/rog", SetRohRohs__FP3ROH4ROHS); INCLUDE_ASM("asm/nonmatchings/P2/rog", FAbsorbRohWkr__FP3ROHP3WKR); INCLUDE_ASM("asm/nonmatchings/P2/rog", ProcContactRoh__FP3ROH); INCLUDE_ASM("asm/nonmatchings/P2/rog", InitRoc__FP3ROC); INCLUDE_ASM("asm/nonmatchings/P2/rog", LoadRocFromBrx__FP3ROCP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/rog", CloneRoc__FP3ROCT0); INCLUDE_ASM("asm/nonmatchings/P2/rog", PostRocLoad__FP3ROC); INCLUDE_ASM("asm/nonmatchings/P2/rog", UpdateRoc__FP3ROCf); INCLUDE_ASM("asm/nonmatchings/P2/rog", PresetRocAccel__FP3ROCf); INCLUDE_ASM("asm/nonmatchings/P2/rog", AdjustRocNewXp__FP3ROCP2XPi); INCLUDE_ASM("asm/nonmatchings/P2/rog", FAbsorbRocWkr__FP3ROCP3WKR); INCLUDE_ASM("asm/nonmatchings/P2/rog", RocsNextRoc__FP3ROC); INCLUDE_ASM("asm/nonmatchings/P2/rog", SetRocRocs__FP3ROC4ROCS); INCLUDE_ASM("asm/nonmatchings/P2/rog", InitRost__FP4ROST); INCLUDE_ASM("asm/nonmatchings/P2/rog", LoadRostFromBrx__FP4ROSTP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/rog", CloneRost__FP4ROSTT0); INCLUDE_ASM("asm/nonmatchings/P2/rog", PostRostLoad__FP4ROST); INCLUDE_ASM("asm/nonmatchings/P2/rog", UpdateRost__FP4ROSTf); INCLUDE_ASM("asm/nonmatchings/P2/rog", RostsNextRost__FP4ROST); INCLUDE_ASM("asm/nonmatchings/P2/rog", SetRostRosts__FP4ROST5ROSTS); INCLUDE_ASM("asm/nonmatchings/P2/rog", InitRop__FP3ROP); INCLUDE_ASM("asm/nonmatchings/P2/rog", LoadRopFromBrx__FP3ROPP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/rog", PostRopLoad__FP3ROP); INCLUDE_ASM("asm/nonmatchings/P2/rog", UpdateRop__FP3ROPf); INCLUDE_ASM("asm/nonmatchings/P2/rog", SetRopRops__FP3ROP4ROPS); INCLUDE_ASM("asm/nonmatchings/P2/rog", RopsNextRop__FP3ROP); ================================================ FILE: src/P2/rumble.c ================================================ #include #include #include /** * @brief Rename. */ extern int DAT_0026c3dc; void InitRumble(RUMBLE *prumble, int nPort, int nSlot) { if (prumble->rums == RUMS_Dead) { SetRumbleRums(prumble, RUMS_Idle); } else { SetRumbleRums(prumble, RUMS_Stop); } prumble->nPort = nPort; prumble->nSlot = nSlot; } INCLUDE_ASM("asm/nonmatchings/P2/rumble", UpdateRumble__FP6RUMBLE); INCLUDE_ASM("asm/nonmatchings/P2/rumble", TriggerRumbleRumk__FP6RUMBLE4RUMKf); INCLUDE_ASM("asm/nonmatchings/P2/rumble", TriggerRumbleRumpat__FP6RUMBLEP6RUMPATf); /** * @brief 100% match. Rodata issue. * https://decomp.me/scratch/tFbRA */ INCLUDE_ASM("asm/nonmatchings/P2/rumble", SetRumbleRums__FP6RUMBLE4RUMS); #ifdef SKIP_ASM void SetRumbleRums(RUMBLE *prumble, RUMS rums) { if (rums == prumble->rums) return; unsigned char abShockDirect[6]; switch(rums) { case RUMS_Dead: case RUMS_Idle: { break; } case RUMS_Rumble: { abShockDirect[0] = prumble->prumpat->arumins[0].fHighSpeedMotor; abShockDirect[1] = prumble->prumpat->arumins[0].bLowSpeedMotor; scePadSetActDirect(prumble->nPort, prumble->nSlot, abShockDirect); prumble->rums = rums; break; } case RUMS_Stop: case RUMS_Kill: { StopRumbleActuators(prumble); prumble->dtRumins = g_clock.dtReal * 4.0f; } default: { prumble->rums = rums; break; } } } #endif // SKIP_ASM void StopRumbleActuators(RUMBLE *prumble) { unsigned char abShockDirect[6]; abShockDirect[0] = '\0'; abShockDirect[1] = '\0'; scePadSetActDirect(prumble->nPort, prumble->nSlot, abShockDirect); } /** * @todo Rename and figure out what does this do. */ void FUN_001A7E70() { if (DAT_0026c3dc == 0) { DAT_0026c3dc = 1; } } INCLUDE_ASM("asm/nonmatchings/P2/rumble", FUN_001A7E90); INCLUDE_ASM("asm/nonmatchings/P2/rumble", FUN_001A7EE8); INCLUDE_ASM("asm/nonmatchings/P2/rumble", FUN_001A7F50); ================================================ FILE: src/P2/rwm.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/rwm", InitRwm__FP3RWM); INCLUDE_ASM("asm/nonmatchings/P2/rwm", OnRwmRemove); INCLUDE_ASM("asm/nonmatchings/P2/rwm", FUN_001a8110); INCLUDE_ASM("asm/nonmatchings/P2/rwm", FUN_001a8150); INCLUDE_ASM("asm/nonmatchings/P2/rwm", InitRwmCallback__FP3RWM5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/rwm", FUN_001a84c8); INCLUDE_ASM("asm/nonmatchings/P2/rwm", PostRwmLoad__FP3RWM); INCLUDE_ASM("asm/nonmatchings/P2/rwm", FUN_001a86f8); INCLUDE_ASM("asm/nonmatchings/P2/rwm", PrwcFindRwm__FP3RWM3OID); INCLUDE_ASM("asm/nonmatchings/P2/rwm", EnableRwmRwc__FP3RWM3OID); INCLUDE_ASM("asm/nonmatchings/P2/rwm", DisableRwmRwc__FP3RWM3OID); INCLUDE_ASM("asm/nonmatchings/P2/rwm", ResizeRwmRwc__FP3RWM3OIDi); INCLUDE_ASM("asm/nonmatchings/P2/rwm", FIsRwmAmmo__FP3RWMP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rwm", FAvailableRwmAmmo__FP3RWMP2SO); INCLUDE_ASM("asm/nonmatchings/P2/rwm", CycleRwmCache__FP3RWM); INCLUDE_ASM("asm/nonmatchings/P2/rwm", ReloadRwm__FP3RWM); INCLUDE_ASM("asm/nonmatchings/P2/rwm", FEnsureRwmLoaded__FP3RWM); INCLUDE_ASM("asm/nonmatchings/P2/rwm", FFireRwm__FP3RWMi); INCLUDE_ASM("asm/nonmatchings/P2/rwm", FUN_001a93c8); INCLUDE_ASM("asm/nonmatchings/P2/rwm", ClearRwmFireInfo__FP3RWM); INCLUDE_ASM("asm/nonmatchings/P2/rwm", ClearRwmTargetInfo__FP3RWM); INCLUDE_ASM("asm/nonmatchings/P2/rwm", ClearRwmAimConstraints__FP3RWM); INCLUDE_ASM("asm/nonmatchings/P2/rwm", GetRwfiPosMat__FP4RWFIP6VECTORP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/rwm", GetRwtiPos__FP4RWTIP6VECTORT1); INCLUDE_ASM("asm/nonmatchings/P2/rwm", GetRwacPan__FP4RWACPf); INCLUDE_ASM("asm/nonmatchings/P2/rwm", GetRwacTilt__FP4RWACPf); ================================================ FILE: src/P2/sb.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/sb", PostSbgLoad__FP3SBG); INCLUDE_ASM("asm/nonmatchings/P2/sb", FUN_001a9928__FP3SBG); INCLUDE_ASM("asm/nonmatchings/P2/sb", UpdateSbgGoal__FP3SBGi); void UpdateSbgSgs(SBG *psbg) { UpdateStepguardSgs(psbg); // TODO: This might be an enum? if (STRUCT_OFFSET(psbg, 0x724, int) == 0x10) { LookStepguardAtGoal(psbg); } } INCLUDE_ASM("asm/nonmatchings/P2/sb", OnSbgEnteringSgs__FP3SBG3SGSP4ASEG); INCLUDE_ASM("asm/nonmatchings/P2/sb", UpdateSbg__FP3SBGf); INCLUDE_ASM("asm/nonmatchings/P2/sb", FUN_001a9a98); INCLUDE_ASM("asm/nonmatchings/P2/sb", FAbsorbSbgWkr__FP3SBGP3WKR); INCLUDE_ASM("asm/nonmatchings/P2/sb", FUN_001a9c58); ================================================ FILE: src/P2/screen.c ================================================ #include #include #include INCLUDE_ASM("asm/nonmatchings/P2/screen", StartupScreen__Fv); INCLUDE_ASM("asm/nonmatchings/P2/screen", PostBlotsLoad__Fv); INCLUDE_ASM("asm/nonmatchings/P2/screen", UpdateBlots__Fv); INCLUDE_ASM("asm/nonmatchings/P2/screen", ForceHideBlots__Fv); INCLUDE_ASM("asm/nonmatchings/P2/screen", ResetBlots__Fv); INCLUDE_ASM("asm/nonmatchings/P2/screen", RenderBlots__Fv); INCLUDE_ASM("asm/nonmatchings/P2/screen", DrawBlots__Fv); INCLUDE_ASM("asm/nonmatchings/P2/screen", InitBlot__FP4BLOT5BLOTK); void PostBlotLoad(BLOT *pblot) { pblot->pfont = g_pfont; *(int*)&pblot->rgba = 0xff808080; // Union? pblot->achzDraw[0] = 0; pblot->rFontScale = 1.0f; } INCLUDE_ASM("asm/nonmatchings/P2/screen", UpdateBlot__FP4BLOT); INCLUDE_ASM("asm/nonmatchings/P2/screen", SetBlotAchzDraw__FP4BLOTPc); INCLUDE_ASM("asm/nonmatchings/P2/screen", SetBlotRgba__FP4BLOTUi); void SetBlotFontScale(float rFontScale, BLOT *pblot) { pblot->rFontScale = rFontScale; } INCLUDE_ASM("asm/nonmatchings/P2/screen", DrawBlot__FP4BLOT); JUNK_ADDIU(10); float DtAppearBlot(BLOT *pblot) { return pblot->dtAppear; } float DtVisibleBlot(BLOT *pblot) { return pblot->dtVisible; } float DtDisappearBlot(BLOT *pblot) { return pblot->dtDisappear; } void SetBlotDtAppear(BLOT *pblot, float dtAppear) { pblot->dtAppear = dtAppear; } void SetBlotDtVisible(BLOT *pblot, float dtVisible) { pblot->dtVisible = dtVisible; } void SetBlotDtDisappear(BLOT *pblot, float dtDisappear) { pblot->dtDisappear = dtDisappear; } INCLUDE_ASM("asm/nonmatchings/P2/screen", OnBlotReset__FP4BLOT); INCLUDE_ASM("asm/nonmatchings/P2/screen", ShowBlot__FP4BLOT); INCLUDE_ASM("asm/nonmatchings/P2/screen", HideBlot__FP4BLOT); INCLUDE_ASM("asm/nonmatchings/P2/screen", SetBlotBlots__FP4BLOT5BLOTS); INCLUDE_ASM("asm/nonmatchings/P2/screen", FIncludeBlotForPeg__FP4BLOTT0); INCLUDE_ASM("asm/nonmatchings/P2/screen", ResizeBlot__FP4BLOTff); INCLUDE_ASM("asm/nonmatchings/P2/screen", RepositionBlot__FP4BLOT); INCLUDE_ASM("asm/nonmatchings/P2/screen", RepositionBlotDependents__FP4BLOT); INCLUDE_ASM("asm/nonmatchings/P2/screen", SetBlotClock__FP4BLOTPf); INCLUDE_ASM("asm/nonmatchings/P2/screen", PostCtrLoad__FP3CTR); INCLUDE_ASM("asm/nonmatchings/P2/screen", UpdateCtr__FP3CTR); INCLUDE_ASM("asm/nonmatchings/P2/screen", DrawCtr__FP3CTR); INCLUDE_ASM("asm/nonmatchings/P2/screen", RebuildCtrAchzDraw__FP3CTR); INCLUDE_ASM("asm/nonmatchings/P2/screen", DtVisibleCtr__FP3CTR); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ab600); INCLUDE_ASM("asm/nonmatchings/P2/screen", UpdateTimer__FP5TIMER); INCLUDE_ASM("asm/nonmatchings/P2/screen", DrawTimer__FP5TIMER); void SetTimer(TIMER *ptimer, float dt) { float threshold = D_0024CD4C; ptimer->pfntnThreshold = NULL; ptimer->fThreshold = 0; ptimer->dtExpire = 0.0; ptimer->pfntnExpire = NULL; ptimer->fStopped = 0; *(int*)&ptimer->rgba = 0xff808080; // Union? ptimer->svt = -1.0; ptimer->nSecondsLast = -1; ptimer->nTenthsLast = -1; ptimer->dtThreshold = threshold; ptimer->dt = dt; SetTimerTimers(ptimer, TIMERS_Paused); RebuildTimerAchzDraw(ptimer, 0.0); ptimer->pvttimer->pfnShowBlot(ptimer); } void SetTimerSpeed(TIMER *ptimer, float svt) { ptimer->svt = svt; } /** * @brief Sets the time until the timer expires, and callback function. */ void SetTimerExpire(TIMER *ptimer, float dt, void *pfntn) { STRUCT_OFFSET(ptimer, 0x288, float) = dt; // ptimer->dt = dt; STRUCT_OFFSET(ptimer, 0x28c, void *) = pfntn; // ptimer->pfntnThreshold = pfntn; } void StartTimer(TIMER *ptimer) { SetTimerTimers(ptimer, TIMERS_Running); } void StopTimer(TIMER *ptimer) { ptimer->fStopped = 1; SetTimerTimers(ptimer, TIMERS_Expired); } INCLUDE_ASM("asm/nonmatchings/P2/screen", RebuildTimerAchzDraw__FP5TIMERf); void SetTimerTimers(TIMER *ptimer, TIMERS timers) { if (ptimer->timers != timers) { ptimer->timers = timers; ptimer->tTimers = g_clock.t; } } float DtVisibleTrunkctr(TRUNKCTR *ptrunkctr) { return 0.0f; } float DtVisibleCrusherctr(CRUSHERCTR *pcrusherctr) { return 0.0f; } /** * @todo Rename function. */ float FUN_001ABE60() { return 0.0f; } INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001abe70); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ac060); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ac0e8); INCLUDE_ASM("asm/nonmatchings/P2/screen", PostNoteLoad__FP4NOTE); INCLUDE_ASM("asm/nonmatchings/P2/screen", SetNoteAchzDraw__FP4NOTEPc); INCLUDE_ASM("asm/nonmatchings/P2/screen", DrawNote__FP4NOTE); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ac888); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ac910); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ac990); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ac9e0); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001aca30); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001aca68); INCLUDE_ASM("asm/nonmatchings/P2/screen", DrawTitle__FP5TITLE); INCLUDE_ASM("asm/nonmatchings/P2/screen", PostTotalsLoad__FP6TOTALS); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ace38); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001acee0); INCLUDE_ASM("asm/nonmatchings/P2/screen", render_level_info_from_id); INCLUDE_ASM("asm/nonmatchings/P2/screen", render_level_info); INCLUDE_ASM("asm/nonmatchings/P2/screen", render_hideout_world_info); INCLUDE_ASM("asm/nonmatchings/P2/screen", SetTotalsBlots__FP6TOTALS5BLOTS); INCLUDE_ASM("asm/nonmatchings/P2/screen", ShowTotalsQMARK); INCLUDE_ASM("asm/nonmatchings/P2/screen", HideTotalsQMARK); INCLUDE_ASM("asm/nonmatchings/P2/screen", DrawTotals__FP6TOTALS); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ad6a8); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ad718); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ad7b0); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ad940); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ad970); INCLUDE_ASM("asm/nonmatchings/P2/screen", DrawLetterbox__FP9LETTERBOX); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001adc60); INCLUDE_ASM("asm/nonmatchings/P2/screen", DrawLogo__FP4LOGO); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001adf28); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001adff0); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ae130); INCLUDE_ASM("asm/nonmatchings/P2/screen", UpdateAttract__FP7ATTRACT); INCLUDE_ASM("asm/nonmatchings/P2/screen", DrawAttract__FP7ATTRACT); INCLUDE_ASM("asm/nonmatchings/P2/screen", DrawLineScreen__FUiUiUiUiUiUiG4RGBAi); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ae510); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ae5e0); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ae758); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ae7f8); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001ae820); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001aea08); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001aea70); JUNK_WORD(0xE48C0000); JUNK_WORD(0xE48C0008); INCLUDE_ASM("asm/nonmatchings/P2/screen", FUN_001aec90); ================================================ FILE: src/P2/sensor.c ================================================ #include #include #include #include #include void InitSensor(SENSOR *psensor) { InitSo(psensor); STRUCT_OFFSET(psensor, 0x558, SENSORS) = SENSORS_Nil; STRUCT_OFFSET(psensor, 0x554, int) = 0; } void SetSensorAlarm(SENSOR *psensor, ALARM *palarm) { STRUCT_OFFSET(psensor, 0x550, ALARM *) = palarm; // psensor->palarm = palarm; } INCLUDE_ASM("asm/nonmatchings/P2/sensor", SetSensorSensors__FP6SENSOR7SENSORS); #ifdef SKIP_ASM /** * @todo 82.08% matched. */ void SetSensorSensors(SENSOR *psensor, SENSORS sensors) { SENSORS sensorsCur = STRUCT_OFFSET(psensor, 0x558, SENSORS); // sensorsCur = psensor->sensors; if (sensorsCur == sensors) { return; } if (sensorsCur == SENSORS_SenseEnabled && sensors == SENSORS_SenseTriggered) { ALARM *palarm = STRUCT_OFFSET(psensor, 0x550, ALARM *); if (palarm) { TriggerAlarm(palarm, ALTK_Trigger); } // Recheck current sensor state: if it's not SENSORS_SenseEnabled, // override the current sensors with the new one. sensorsCur = STRUCT_OFFSET(psensor, 0x558, SENSORS); if (sensorsCur != SENSORS_SenseEnabled) { sensors = sensorsCur; } } HandleLoSpliceEvent(psensor, 2, 0, NULL); STRUCT_OFFSET(psensor, 0x558, SENSORS) = sensors; // psensor->sensors = sensors; STRUCT_OFFSET(psensor, 0x55C, float) = g_clock.t; } #endif INCLUDE_ASM("asm/nonmatchings/P2/sensor", FCheckSensorObject__FP6SENSORP2SO); INCLUDE_ASM("asm/nonmatchings/P2/sensor", FIgnoreSensorObject__FP6SENSORP2SO); INCLUDE_ASM("asm/nonmatchings/P2/sensor", FOnlySensorTriggerObject__FP6SENSORP2SO); INCLUDE_ASM("asm/nonmatchings/P2/sensor", PauseSensor__FP6SENSOR); INCLUDE_ASM("asm/nonmatchings/P2/sensor", UpdateSensor__FP6SENSORf); INCLUDE_ASM("asm/nonmatchings/P2/sensor", AddSensorTriggerObject__FP6SENSOR3OID); #ifdef SKIP_ASM /** * @todo 100% matched but sensor struct offsets are wrong. */ void AddSensorTriggerObject(SENSOR *psensor, OID oid) { uint ccur = psensor->ctriggerObjects; if (ccur >= 4) return; psensor->atriggerObjects[ccur] = oid; psensor->ctriggerObjects = ccur + 1; } #endif INCLUDE_ASM("asm/nonmatchings/P2/sensor", AddSensorNoTriggerObject__FP6SENSOR3OID); #ifdef SKIP_ASM /** * @todo 100% matched but sensor struct offsets are wrong. */ void AddSensorNoTriggerObject(SENSOR *psensor, OID oid) { uint ccur = psensor->cnoTriggerObjects; if (ccur >= 4) return; psensor->anoTriggerObjects[ccur] = oid; psensor->cnoTriggerObjects = ccur + 1; } #endif INCLUDE_ASM("asm/nonmatchings/P2/sensor", AddSensorTriggerClass__FP6SENSOR3CID); #ifdef SKIP_ASM /** * @todo 100% matched but sensor struct offsets are wrong. */ void AddSensorTriggerClass(SENSOR *psensor, CID cid) { uint ccur = psensor->ctriggerClasses; if (ccur >= 4) return; psensor->atriggerClasses[ccur] = cid; psensor->ctriggerClasses = ccur + 1; } #endif INCLUDE_ASM("asm/nonmatchings/P2/sensor", AddSensorNoTriggerClass__FP6SENSOR3CID); #ifdef SKIP_ASM /** * @todo 100% matched but sensor struct offsets are wrong. */ void AddSensorNoTriggerClass(SENSOR *psensor, CID cid) { uint ccur = psensor->cnoTriggerClasses; if (ccur >= 4) return; psensor->anoTriggerClasses[ccur] = cid; psensor->cnoTriggerClasses = ccur + 1; } #endif INCLUDE_ASM("asm/nonmatchings/P2/sensor", InitLasen__FP5LASEN); INCLUDE_ASM("asm/nonmatchings/P2/sensor", LoadLasenFromBrx__FP5LASENP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/sensor", BindLasen__FP5LASEN); INCLUDE_ASM("asm/nonmatchings/P2/sensor", PostLasenLoad__FP5LASEN); INCLUDE_ASM("asm/nonmatchings/P2/sensor", UpdateBusyLasenSenseTimes__Fv); INCLUDE_ASM("asm/nonmatchings/P2/sensor", UpdateLasen__FP5LASENf); INCLUDE_ASM("asm/nonmatchings/P2/sensor", FreezeLasen__FP5LASENi); INCLUDE_ASM("asm/nonmatchings/P2/sensor", RenderLasenSelf__FP5LASENP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/sensor", FUN_001afaf8__FP6SENSORP2SO); #ifdef SKIP_ASM /** * @todo 73.57% matched. */ int FUN_001afaf8(SENSOR *psensor, SO *pso) { extern void *g_pjt; unsigned long long mask; uint tmp2cc; /* Mask: (0x8000 << 28) in 64-bits */ mask = ((ulong)0x8000) << 28; if (STRUCT_OFFSET(pso, 0x538, ulong) & mask) return 0; if (STRUCT_OFFSET(pso, 0x50, uint) == STRUCT_OFFSET(psensor, 0x50, uint)) return 0; if (FIgnoreSensorObject(psensor, pso)) return 0; if (pso == g_pjt) { if (STRUCT_OFFSET(pso, 0x2220, uint) != 6) return 0; if (STRUCT_OFFSET(pso, 0x239C, uint) != 3) return 0; if (GetGrfvault_unknown() & 0x12000) return 0; } tmp2cc = STRUCT_OFFSET(pso, 0x2CC, uint); /* Invert lowest bit and mask to 1 */ return (int)(((tmp2cc ^ 1u) & 1u)); } #endif INCLUDE_ASM("asm/nonmatchings/P2/sensor", SenseLasen__FP5LASENP7SENSORS); INCLUDE_ASM("asm/nonmatchings/P2/sensor", EnableLasen__FP5LASEN5SENSM); INCLUDE_ASM("asm/nonmatchings/P2/sensor", DisableLasen__FP5LASEN); INCLUDE_ASM("asm/nonmatchings/P2/sensor", OnLasenAlarmTriggered__FP5LASEN); INCLUDE_ASM("asm/nonmatchings/P2/sensor", SetLasenSensors__FP5LASEN7SENSORS); INCLUDE_ASM("asm/nonmatchings/P2/sensor", SCalcLasenShapeExtent__FP5LASENP5LBEAM); INCLUDE_ASM("asm/nonmatchings/P2/sensor", RetractLasen__FP5LASENf); INCLUDE_ASM("asm/nonmatchings/P2/sensor", ExtendLasen__FP5LASENf); INCLUDE_ASM("asm/nonmatchings/P2/sensor", InitCamsen__FP6CAMSEN); INCLUDE_ASM("asm/nonmatchings/P2/sensor", PostCamsenLoad__FP6CAMSEN); INCLUDE_ASM("asm/nonmatchings/P2/sensor", UpdateCamsen__FP6CAMSENf); INCLUDE_ASM("asm/nonmatchings/P2/sensor", RenderCamsenSelf__FP6CAMSENP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/sensor", FIgnoreCamsenIntersection__FP6CAMSENP2SO); INCLUDE_ASM("asm/nonmatchings/P2/sensor", FFilterCamsen__FPvP2SO); INCLUDE_ASM("asm/nonmatchings/P2/sensor", SenseCamsen__FP6CAMSENP7SENSORS); INCLUDE_ASM("asm/nonmatchings/P2/sensor", EnableCamsen__FP6CAMSEN5SENSM); INCLUDE_ASM("asm/nonmatchings/P2/sensor", DisableCamsen__FP6CAMSEN); INCLUDE_ASM("asm/nonmatchings/P2/sensor", OnCamsenAlarmTriggered__FP6CAMSEN); INCLUDE_ASM("asm/nonmatchings/P2/sensor", SetCamsenSensors__FP6CAMSEN7SENSORS); INCLUDE_ASM("asm/nonmatchings/P2/sensor", SetCamsenCsdts__FP6CAMSEN5CSDTS); INCLUDE_ASM("asm/nonmatchings/P2/sensor", InitPrsen__FP5PRSEN); INCLUDE_ASM("asm/nonmatchings/P2/sensor", PostPrsenLoad__FP5PRSEN); INCLUDE_ASM("asm/nonmatchings/P2/sensor", UpdatePrsen__FP5PRSENf); INCLUDE_ASM("asm/nonmatchings/P2/sensor", SensePrsen__FP5PRSENP7SENSORS); INCLUDE_ASM("asm/nonmatchings/P2/sensor", EnablePrsen__FP5PRSEN5SENSM); INCLUDE_ASM("asm/nonmatchings/P2/sensor", DisablePrsen__FP5PRSEN); INCLUDE_ASM("asm/nonmatchings/P2/sensor", OnPrsenAlarmTriggered__FP5PRSEN); INCLUDE_ASM("asm/nonmatchings/P2/sensor", SetPrsenSensors__FP5PRSEN7SENSORS); INCLUDE_ASM("asm/nonmatchings/P2/sensor", UpdatePrsenLoopShader__FP5PRSEN); ================================================ FILE: src/P2/shadow.c ================================================ #include #include #include INCLUDE_ASM("asm/nonmatchings/P2/shadow", InitShadow__FP6SHADOW); INCLUDE_ASM("asm/nonmatchings/P2/shadow", PostShadowLoad__FP6SHADOW); void InvalidateShadowVifs(SHADOW *pshadow) { pshadow->cqwVifs = 0; } INCLUDE_ASM("asm/nonmatchings/P2/shadow", RebuildShadowRegion__FP6SHADOW); void SetShadowShader(SHADOW *pshadow, OID oidShdShadow) { OID oid = (oidShdShadow != OID_Nil) ? oidShdShadow : OID_shd_stock_shadow; pshadow->pshd = PshdFindShader(oid); if (pshadow->pshd) { InvalidateShadowVifs(pshadow); } } int FShadowRadiusSet(SHADOW *pshadow) { return (pshadow->sNearRadius >= 0.0f && pshadow->sFarRadius >= 0.0f); } void SetShadowNearRadius(SHADOW *pshadow, float sNearRadius) { pshadow->sNearRadius = sNearRadius; if (pshadow->sFarRadius < 0.0f) { pshadow->sFarRadius = sNearRadius; } InvalidateShadowVifs(pshadow); } void SetShadowFarRadius(SHADOW *pshadow, float sFarRadius) { pshadow->sFarRadius = sFarRadius; if (pshadow->sNearRadius < 0.0f) { pshadow->sNearRadius = sFarRadius; } InvalidateShadowVifs(pshadow); } INCLUDE_ASM("asm/nonmatchings/P2/shadow", SetShadowCastPosition__FP6SHADOWP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/shadow", SetShadowCastNormal__FP6SHADOWP6VECTOR); void SetShadowNearCast(SHADOW *pshadow, float sNearCast) { pshadow->sNearCast = sNearCast; RebuildShadowRegion(pshadow); InvalidateShadowVifs(pshadow); } void SetShadowFarCast(SHADOW *pshadow, float sFarCast) { pshadow->sFarCast = sFarCast; RebuildShadowRegion(pshadow); InvalidateShadowVifs(pshadow); } void SetShadowConeAngle(SHADOW *pshadow, float degConeAngle) { float fAngleTan = tanf(degConeAngle * 0.008726647f); pshadow->sNearRadius = fAngleTan * pshadow->sNearCast; pshadow->sFarRadius = fAngleTan * pshadow->sFarCast; InvalidateShadowVifs(pshadow); } INCLUDE_ASM("asm/nonmatchings/P2/shadow", SetShadowFrustrumUp__FP6SHADOWP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/shadow", FShadowValid__FP6SHADOWi); INCLUDE_ASM("asm/nonmatchings/P2/shadow", FFilterFastShadows__FPvP2SO); INCLUDE_ASM("asm/nonmatchings/P2/shadow", UpdateShadow__FP6SHADOWf); INCLUDE_ASM("asm/nonmatchings/P2/shadow", RebuildShadowVifs__FP6SHADOW); INCLUDE_ASM("asm/nonmatchings/P2/shadow", DrawShadow__FP6SHADOW); INCLUDE_ASM("asm/nonmatchings/P2/shadow", FShadowIntersectsSphere__FP6SHADOWP6VECTORf); INCLUDE_ASM("asm/nonmatchings/P2/shadow", FindSwShadows__FP2SWP6VECTORfiPiPP6SHADOW); ================================================ FILE: src/P2/shape.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/shape", LoadShapeFromBrx__FP5SHAPEP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/shape", SetShapeParent__FP5SHAPEP3ALO); ================================================ FILE: src/P2/shd.c ================================================ #include #include extern GRFZON g_grfzonShaders; extern byte *g_pbBulkData; INCLUDE_ASM("asm/nonmatchings/P2/shd", Tex0FromTexIframeCtk__FP3TEXi3CTK); INCLUDE_ASM("asm/nonmatchings/P2/shd", PackTexGifs__FP3TEXi3CTK4SHDKP4GIFS); void LoadClutFromBrx(CBinaryInputStream *pbis, CLUT *pclut) { pbis->Read(0xc, pclut); pclut->prgba = (RGBA *)(g_pbBulkData + (uint)pclut->prgba); pclut->cqwColors = (uint)pclut->crgba * 4 + 0xf >> 4; } INCLUDE_ASM("asm/nonmatchings/P2/shd", LoadColorTablesFromBrx__FP18CBinaryInputStream); void LoadBmpFromBrx(CBinaryInputStream *pbis, BMP *pbmp) { pbis->Read(0x14, pbmp); pbmp->pbPixels = (byte *)(g_pbBulkData + (int)pbmp->pbPixels); pbmp->cqwPixels = pbmp->cbPixels + 0xf >> 4; } INCLUDE_ASM("asm/nonmatchings/P2/shd", LoadBitmapsFromBrx__FP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/shd", LoadFontsFromBrx__FP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/shd", LoadTexFromBrx__FP18CBinaryInputStreamP3TEX); INCLUDE_ASM("asm/nonmatchings/P2/shd", LoadShadersFromBrx__FP18CBinaryInputStream); void UploadPermShaders() { GSB gsbPerm; InitGsb(&gsbPerm, 0x1e00, 0x4000); UploadBitmaps(0x10000000, &gsbPerm); g_grfzonShaders = 0; } INCLUDE_ASM("asm/nonmatchings/P2/shd", PropagateShaders__Fi); INCLUDE_ASM("asm/nonmatchings/P2/shd", FillShaders__Fi); INCLUDE_ASM("asm/nonmatchings/P2/shd", UnloadShaders__Fv); JUNK_WORD(0xE4A00008); INCLUDE_ASM("asm/nonmatchings/P2/shd", ConvertRgbToHsv__FP6VECTORT0); INCLUDE_ASM("asm/nonmatchings/P2/shd", ConvertHsvToRgb__FP6VECTORT0); INCLUDE_ASM("asm/nonmatchings/P2/shd", ConvertUserHsvToUserRgb__FP6VECTORT0); INCLUDE_ASM("asm/nonmatchings/P2/shd", ConvertUserRgbToUserHsv__FP6VECTORT0); JUNK_ADDIU(10); JUNK_NOP(); JUNK_NOP(); JUNK_ADDIU(50); INCLUDE_ASM("asm/nonmatchings/P2/shd", PshdFindShader__F3OID); INCLUDE_ASM("asm/nonmatchings/P2/shd", SetSaiIframe__FP3SAIi); INCLUDE_ASM("asm/nonmatchings/P2/shd", SetSaiDuDv__FP3SAIff); INCLUDE_ASM("asm/nonmatchings/P2/shd", PropagateSais__Fv); INCLUDE_ASM("asm/nonmatchings/P2/shd", UpdateShaders__Ff); ================================================ FILE: src/P2/shdanim.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/shdanim", CbFromSaak__F4SAAK); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", PvtsaaFromSaak__F4SAAK); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", PsaaLoadFromBrx__FP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", InitSaa__FP3SAAP4SAAF); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", PostSaaLoad__FP3SAA); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", FUpdatableSaa__FP3SAA); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", UCompleteSaa__FP3SAA); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", PsaiFromSaaShd__FP3SAAP3SHD); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", InitLoop__FP4LOOPP4SAAF); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", PostLoopLoad__FP4LOOP); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", UpdateLoop__FP4LOOPf); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", UCompleteLoop__FP4LOOP); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", InitPingpong__FP8PINGPONGP4SAAF); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", PostPingpongLoad__FP8PINGPONG); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", UpdatePingpong__FP8PINGPONGf); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", UCompletePingpong__FP8PINGPONG); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", InitShuffle__FP7SHUFFLEP4SAAF); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", UpdateShuffle__FP7SHUFFLEf); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", InitHologram__FP8HOLOGRAMP4SAAF); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", PostHologramLoad__FP8HOLOGRAM); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", NotifyHologramRender__FP8HOLOGRAMP3ALOP3RPL); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", InitScroller__FP8SCROLLERP4SAAF); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", UpdateScroller__FP8SCROLLERf); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", UCompleteScroller__FP8SCROLLER); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", SetScrollerMasterSpeeds__FP8SCROLLERff); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", InitCircler__FP7CIRCLERP4SAAF); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", UpdateCircler__FP7CIRCLERf); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", UCompleteCircler__FP7CIRCLER); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", InitLooker__FP6LOOKERP4SAAF); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", SetLookerSgvr__FP6LOOKERP4SGVRP7GLOBSETP4GLOBP7SUBGLOB); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", SetVecPosad__FP6VECTORP5POSAD); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", SetUvPuvqd__FP3UVFP3UVQ); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", NotifyLookerRender__FP6LOOKERP3ALOP3RPL); JUNK_ADDIU(60); JUNK_WORD(0x0003100B); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", FUN_001b5b58); INCLUDE_ASM("asm/nonmatchings/P2/shdanim", FUN_001b5c40); ================================================ FILE: src/P2/sky.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/sky", PostSkyLoad__FP3SKY); INCLUDE_ASM("asm/nonmatchings/P2/sky", UpdateSky__FP3SKYf); ================================================ FILE: src/P2/slotheap.c ================================================ #include #include #include void _InitSlotheap(SLOTHEAP *pslotheap, int cb, int c) { byte *pbBase = pslotheap->ab; pslotheap->cb = cb; pslotheap->pslotFree = (SLOT *)pbBase; for (int i = 1; i < c; i++) { SLOT *pslotPrev = (SLOT *)pbBase; pbBase = &pslotheap->ab[i * pslotheap->cb]; pslotPrev->pslotNext = (SLOT *)pbBase; } ((SLOT *)pbBase)->pslotNext = NULL; } void CreateSlotheapSw(SLOTHEAP *pslotheap, int cb, int c) { cb = (cb + 7) & -8; pslotheap->ab = (byte *)PvAllocSwImpl(cb * c); _InitSlotheap(pslotheap, cb, c); } void CreateSlotheapSwAlign64(SLOTHEAP *pslotheap, int cb, int c) { byte *pb = (byte *)PvAllocSwImpl(cb * c + 0x30); pslotheap->ab = (byte *)(((int)pb + 0x3f) & -0x40); _InitSlotheap(pslotheap, cb, c); } JUNK_NOP(); JUNK_ADDIU(40); void *PvAllocSlotheapUnsafe(SLOTHEAP *pslotheap) { SLOT *pslotFree = pslotheap->pslotFree; if (pslotFree) { pslotheap->pslotFree = pslotFree->pslotNext; } return pslotFree; } void *PvAllocSlotheapImpl(SLOTHEAP *pslotheap) { return PvAllocSlotheapUnsafe(pslotheap); } void *PvAllocSlotheapClearImpl(SLOTHEAP *pslotheap) { void *pv = PvAllocSlotheapUnsafe(pslotheap); memset(pv, 0, pslotheap->cb); return pv; } void FreeSlotheapPv(SLOTHEAP *pslotheap, void *pv) { if (!pv) { return; } SLOT *pslot = (SLOT *)pv; pslot->pslotNext = pslotheap->pslotFree; pslotheap->pslotFree = pslot; } JUNK_NOP(); JUNK_WORD(0x00E0102D); ================================================ FILE: src/P2/sm.c ================================================ #include #include INCLUDE_ASM("asm/nonmatchings/P2/sm", LoadSmFromBrx__FP2SMP18CBinaryInputStream); void PostSmLoad(SM *psm) { PostLoLoad(psm); if (psm->fDefault) { PostSwCallback(psm->psw, PostSmLoadCallback, psm, MSGID_callback, NULL); } } INCLUDE_ASM("asm/nonmatchings/P2/sm", PostSmLoadCallback__FP2SM5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/sm", PsmaApplySm__FP2SMP3ALO3OIDi); INCLUDE_ASM("asm/nonmatchings/P2/sm", PsmaFindSm__FP2SMP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/sm", IsmsFindSmOptional__FP2SM3OID); INCLUDE_ASM("asm/nonmatchings/P2/sm", IsmsFindSmRequired__FP2SM3OID); INCLUDE_ASM("asm/nonmatchings/P2/sm", OidFromSmIsms__FP2SMi); INCLUDE_ASM("asm/nonmatchings/P2/sm", RetractSma__FP3SMA); INCLUDE_ASM("asm/nonmatchings/P2/sm", SetSmaGoal__FP3SMA3OID); INCLUDE_ASM("asm/nonmatchings/P2/sm", GetSmaGoal__FP3SMAP3OID); INCLUDE_ASM("asm/nonmatchings/P2/sm", GetSmaCur__FP3SMAP3OID); INCLUDE_ASM("asm/nonmatchings/P2/sm", GetSmaNext__FP3SMAP3OID); INCLUDE_ASM("asm/nonmatchings/P2/sm", SetSmaSvt__FP3SMAf); INCLUDE_ASM("asm/nonmatchings/P2/sm", SeekSma__FP3SMA3OID); INCLUDE_ASM("asm/nonmatchings/P2/sm", ChooseSmaTransition__FP3SMA); INCLUDE_ASM("asm/nonmatchings/P2/sm", EndSmaTransition__FP3SMA); INCLUDE_ASM("asm/nonmatchings/P2/sm", HandleSmaMessage__FP3SMA5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/sm", SkipSma__FP3SMAf); INCLUDE_ASM("asm/nonmatchings/P2/sm", SendSmaMessage__FP3SMA5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/sm", FUN_001b6df8); INCLUDE_ASM("asm/nonmatchings/P2/sm", NotifySmaSpliceOnEnterState__FP3SMAii); ================================================ FILE: src/P2/smartguard.c ================================================ #include #include #include INCLUDE_ASM("asm/nonmatchings/P2/smartguard", InitSmartguard__FP10SMARTGUARD); INCLUDE_ASM("asm/nonmatchings/P2/smartguard", PostSmartguardLoadFlashlight__FP10SMARTGUARD); void UseSmartguardFlashlightTarget(SMARTGUARD *psmartguard, SGS sgs, OID oidTarget) { FValidSgs(sgs); SGFT *mpsgssgft = &STRUCT_OFFSET(psmartguard, 0xc38, SGFT); // psmartguard->mpsgssgft[sgs] mpsgssgft[sgs].oidTarget = oidTarget; } INCLUDE_ASM("asm/nonmatchings/P2/smartguard", FUN_001B7100__FP10SMARTGUARDi); INCLUDE_ASM("asm/nonmatchings/P2/smartguard", PostSmartguardLoad__FP10SMARTGUARD); INCLUDE_ASM("asm/nonmatchings/P2/smartguard", FFilterSmartguardDetect__FP10SMARTGUARDP2SO); INCLUDE_ASM("asm/nonmatchings/P2/smartguard", FDetectSmartguard__FP10SMARTGUARD); void UpdateSmartguard(SMARTGUARD *psmartguard, float dt) { UpdateStepguard(psmartguard, dt); UpdateSmartguardFlashlight(psmartguard); } INCLUDE_ASM("asm/nonmatchings/P2/smartguard", UpdateSmartguardFlashlight__FP10SMARTGUARD); INCLUDE_ASM("asm/nonmatchings/P2/smartguard", OnSmartguardEnteringSgs__FP10SMARTGUARD3SGSP4ASEG); INCLUDE_ASM("asm/nonmatchings/P2/smartguard", FCanSmartguardAttack__FP10SMARTGUARD); INCLUDE_ASM("asm/nonmatchings/P2/smartguard", SgasGetSmartguard__FP10SMARTGUARD); void HandleSmartguardMessage(SMARTGUARD *psmartguard, MSGID msgid, void *pv) { HandleStepguardMessage(psmartguard, msgid, pv); // psmartguard->pasegaSgs if (msgid == MSGID_asega_wrapped && (ASEGA *)pv == STRUCT_OFFSET(psmartguard, 0x7e0, ASEGA *)) { STRUCT_OFFSET(psmartguard, 0xcc4, int)++; // psmartguard->cidleSearch } } void FreezeSmartguard(SMARTGUARD *psmartguard, int fFreeze) { FreezeSo(psmartguard, fFreeze); if (fFreeze) { // psmartguard->pexcSneak UnsetExcitement(STRUCT_OFFSET(psmartguard, 0xcc0, EXC *)); STRUCT_OFFSET(psmartguard, 0xcc0, EXC *) = NULL; } } ================================================ FILE: src/P2/so.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/so", InitSo__FP2SO); INCLUDE_ASM("asm/nonmatchings/P2/so", OnSoAdd__FP2SO); INCLUDE_ASM("asm/nonmatchings/P2/so", OnSoRemove__FP2SO); INCLUDE_ASM("asm/nonmatchings/P2/so", EnableSoPhys__FP2SOi); INCLUDE_ASM("asm/nonmatchings/P2/so", DisplaceSo__FP2SOi); INCLUDE_ASM("asm/nonmatchings/P2/so", ImpactSo__FP2SOi); INCLUDE_ASM("asm/nonmatchings/P2/so", PivotSo__FP2SOi); INCLUDE_ASM("asm/nonmatchings/P2/so", ExtendSoBounds__FP2SOP6VECTORf); INCLUDE_ASM("asm/nonmatchings/P2/so", UpdateSoBounds__FP2SO); INCLUDE_ASM("asm/nonmatchings/P2/so", UpdateGeomWorld__FP4GEOMT0G9VU_VECTORP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/so", UpdateSoXfWorldHierarchy__FP2SO); INCLUDE_ASM("asm/nonmatchings/P2/so", UpdateSoXfWorld__FP2SO); INCLUDE_ASM("asm/nonmatchings/P2/so", FIgnoreSoIntersection__FP2SOT0); INCLUDE_ASM("asm/nonmatchings/P2/so", UpdateSoImpacts__FP2SO); INCLUDE_ASM("asm/nonmatchings/P2/so", UProjectVector__FP6VECTORN20); INCLUDE_ASM("asm/nonmatchings/P2/so", AdjustSoXpLocal__FP2SOP2XPi); JUNK_WORD(0xF8C10000); INCLUDE_ASM("asm/nonmatchings/P2/so", CalculateSoAngularEffectWorld__FP2SOP6VECTORT1); INCLUDE_ASM("asm/nonmatchings/P2/so", AccelSoTowardPosSpring__FP2SOP6VECTORP3CLQT1T2f); INCLUDE_ASM("asm/nonmatchings/P2/so", AccelSoTowardMatSpring__FP2SOP7MATRIX3P3CLQP6VECTORT2f); INCLUDE_ASM("asm/nonmatchings/P2/so", PresetSoAccel__FP2SOf); INCLUDE_ASM("asm/nonmatchings/P2/so", RenderSoSelf__FP2SOP2CMP2RO); void UpdateSo(SO *pso, float dt) { UpdateAlo(pso, dt); } void SetSoMass(SO *pso, float mass) { float oldMass = STRUCT_OFFSET(pso, 0x368, float); // pso->mass float massRatio = mass / oldMass; // Redundant multiplication needed for match ¯\_(ツ)_/¯ float newMass = oldMass * massRatio; STRUCT_OFFSET(pso, 0x368, float) = newMass; // Should be pso->mass = mass // Technically newMass != mass due to floating point precision errors AdjustSoMomint(pso, massRatio); } INCLUDE_ASM("asm/nonmatchings/P2/so", AdjustSoMomint__FP2SOf); INCLUDE_ASM("asm/nonmatchings/P2/so", DiscardSoXps__FP2SO); INCLUDE_ASM("asm/nonmatchings/P2/so", UpdateSoPosWorldPrev__FP2SO); INCLUDE_ASM("asm/nonmatchings/P2/so", TranslateSoToPos__FP2SOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/so", RotateSoToMat__FP2SOP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/so", TranslateSoToPosSafe__FP2SOP6VECTORT1); JUNK_ADDIU(40); INCLUDE_ASM("asm/nonmatchings/P2/so", SetSoVelocityVec__FP2SOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/so", SetSoAngularVelocityVec__FP2SOP6VECTOR); JUNK_ADDIU(20); INCLUDE_ASM("asm/nonmatchings/P2/so", AddSoAcceleration__FP2SOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/so", AddSoAngularAcceleration__FP2SOP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/so", SetSoConstraints__FP2SO2CTP6VECTORT1T2); INCLUDE_ASM("asm/nonmatchings/P2/so", SetSoParent__FP2SOP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/so", ApplySoProxy__FP2SOP5PROXY); JUNK_WORD(0x27BD0150); INCLUDE_ASM("asm/nonmatchings/P2/so", AccelSoTowardMatSmooth__FP2SOfP7MATRIX3P3SMP); JUNK_WORD(0x27BD01C0); INCLUDE_ASM("asm/nonmatchings/P2/so", GetSoCpdefi__FP2SOfP6CPDEFI); INCLUDE_ASM("asm/nonmatchings/P2/so", FIsSoTouching__FP2SOT0); INCLUDE_ASM("asm/nonmatchings/P2/so", PsoFirstSoTouching__FP2SO); INCLUDE_ASM("asm/nonmatchings/P2/so", CloneSo__FP2SOT0); INCLUDE_ASM("asm/nonmatchings/P2/so", ApplySoConstraintWorld__FP2SOP6CONSTRP6VECTORN22); INCLUDE_ASM("asm/nonmatchings/P2/so", ApplyConstr__FP6CONSTRP6VECTORN21); void ApplySoConstraintLocal(SO *pso, CONSTR *pconstr, VECTOR *pvecLocal, VECTOR *pvecConstr, VECTOR *pvecRemain) { ApplyConstr(pconstr, pvecLocal, pvecConstr, pvecRemain); } INCLUDE_ASM("asm/nonmatchings/P2/so", AddSoXa__FP2SOP2XA); INCLUDE_ASM("asm/nonmatchings/P2/so", RemoveSoXa__FP2SOP2XA); INCLUDE_ASM("asm/nonmatchings/P2/so", AddSoWaterAcceleration__FP2SOP5WATERf); void AddSoExternalAccelerations(SO *pso, XA *pxa, float dt) { return; } INCLUDE_ASM("asm/nonmatchings/P2/so", LoadSoFromBrx__FP2SOP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/so", SetSoSphere__FP2SOf); void SetSoNoInteract(SO *pso, int fNoInteract) { SetSoConstraints(pso, CT_Locked, NULL, CT_Locked, NULL); } INCLUDE_ASM("asm/nonmatchings/P2/so", ConstrFromCnstr__F5CNSTRP2CTP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/so", SetSoCnstrForce__FP2SO5CNSTR); INCLUDE_ASM("asm/nonmatchings/P2/so", SetSoCnstrTorque__FP2SO5CNSTR); INCLUDE_ASM("asm/nonmatchings/P2/so", SetSoCameraStyle__FP2SO3CMK); INCLUDE_ASM("asm/nonmatchings/P2/so", SetSoIgnoreLocked__FP2SOi); INCLUDE_ASM("asm/nonmatchings/P2/so", SetSoIceable__FP2SOi); INCLUDE_ASM("asm/nonmatchings/P2/so", SetSoMtlk__FP2SO4MTLK); INCLUDE_ASM("asm/nonmatchings/P2/so", SetSoEdgeGrab__FP2SO3EGK); INCLUDE_ASM("asm/nonmatchings/P2/so", SendSoMessage__FP2SO5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/so", PxpFindSoGround__FP2SOT0Pi); INCLUDE_ASM("asm/nonmatchings/P2/so", SetSoNoGravity__FP2SOi); INCLUDE_ASM("asm/nonmatchings/P2/so", SetSoNoXpsAll__FP2SOi); INCLUDE_ASM("asm/nonmatchings/P2/so", SetSoNoXpsSelf__FP2SOi); INCLUDE_ASM("asm/nonmatchings/P2/so", SetSoNoXpsCenter__FP2SOi); INCLUDE_ASM("asm/nonmatchings/P2/so", RebuildSoPhysHook__FP2SO); INCLUDE_ASM("asm/nonmatchings/P2/so", PsoFindSoPhysHook__FP2SOi); INCLUDE_ASM("asm/nonmatchings/P2/so", RecalcSoLocked__FP2SO); INCLUDE_ASM("asm/nonmatchings/P2/so", FGetSoContactList__FP2SOPv); INCLUDE_ASM("asm/nonmatchings/P2/so", GetSoContacts__FP2SOPiPPP2SO); INCLUDE_ASM("asm/nonmatchings/P2/so", FSoInStsoList__FP4STSOP2SO); INCLUDE_ASM("asm/nonmatchings/P2/so", GenerateSoSpliceTouchingEvents__FP2SO); INCLUDE_ASM("asm/nonmatchings/P2/so", FInflictSoZap__FP2SOP2XPP3ZPR); INCLUDE_ASM("asm/nonmatchings/P2/so", EnsureSoLvo__FP2SO); INCLUDE_ASM("asm/nonmatchings/P2/so", ProjectSoLvo__FP2SOf); INCLUDE_ASM("asm/nonmatchings/P2/so", ProjectSoTransform__FP2SOfi); INCLUDE_ASM("asm/nonmatchings/P2/so", ApplySoImpulse__FP2SOP6VECTORT1f); INCLUDE_ASM("asm/nonmatchings/P2/so", CalculateSoTrajectoryApex__FP2SOP6VECTORfT1); INCLUDE_ASM("asm/nonmatchings/P2/so", FAbsorbSoWkr__FP2SOP3WKR); INCLUDE_ASM("asm/nonmatchings/P2/so", CloneSoPhys__FP2SOT0i); INCLUDE_ASM("asm/nonmatchings/P2/so", FUN_001bc4d8); INCLUDE_ASM("asm/nonmatchings/P2/so", FUN_001bc670); INCLUDE_ASM("asm/nonmatchings/P2/so", FUN_001bc710); INCLUDE_ASM("asm/nonmatchings/P2/so", FUN_001bc748); ================================================ FILE: src/P2/solve.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/solve", RenumberSo__FP2SOPiPP2SO); INCLUDE_ASM("asm/nonmatchings/P2/solve", CalculateSoEffect__FP2SOP6VECTORP2FXT1); INCLUDE_ASM("asm/nonmatchings/P2/solve", PropagateSoForce__FP2SOiP2XPiP2DZP2FX); INCLUDE_ASM("asm/nonmatchings/P2/solve", DistributeSoEffects__FP2SOiiPP2SOP2FX); INCLUDE_ASM("asm/nonmatchings/P2/solve", SolveSwGroup__FP2SWiPP2SOiPP2XPfi); INCLUDE_ASM("asm/nonmatchings/P2/solve", CpxpBuildXpArray__FiPP2SOiPP2XP); INCLUDE_ASM("asm/nonmatchings/P2/solve", BuildContactGroup__FP2SOPiPP2SOT1T2); INCLUDE_ASM("asm/nonmatchings/P2/solve", SplitSoFreeze__FP2SOi); INCLUDE_ASM("asm/nonmatchings/P2/solve", SortSwGroup__FiPP2SO); INCLUDE_ASM("asm/nonmatchings/P2/solve", SplitSwGroup__FP2SWiPP2SOfi); INCLUDE_ASM("asm/nonmatchings/P2/solve", SolveSw__FP2SWfi); ================================================ FILE: src/P2/sort.c ================================================ #include void SwapEntries(void *afoo, int cb, int i1, int i2) { int *p1 = (int *)(i1 * cb + (int)afoo); int *p2 = (int *)(i2 * cb + (int)afoo); while (cb > 0) { int temp = *p1; *p1 = *p2; *p2 = temp; p1++; p2++; cb -= sizeof(int); } } INCLUDE_ASM("asm/nonmatchings/P2/sort", HeapSort__FPviiPFPvPv_i); ================================================ FILE: src/P2/sound.c ================================================ #include #include <989snd.h> #include extern uchar D_00604790[]; // temp /** * @brief Media volume float. * @todo Does this even exist? */ struct MVG { float vol; // Current volume MVGK mvgk; // Media volume float kind undefined4 unk2; undefined4 unk3; }; extern float D_00274838[10][4]; // temp INCLUDE_ASM("asm/nonmatchings/P2/sound", UnloadMusic__Fv); INCLUDE_ASM("asm/nonmatchings/P2/sound", SbpEnsureBank__Fi); INCLUDE_ASM("asm/nonmatchings/P2/sound", SbpEnsureBank__F5SFXID); INCLUDE_ASM("asm/nonmatchings/P2/sound", NewSfx__FPP3SFX); INCLUDE_ASM("asm/nonmatchings/P2/sound", FContinuousSound__F5SFXID); INCLUDE_ASM("asm/nonmatchings/P2/sound", FUN_001BE5D8); INCLUDE_ASM("asm/nonmatchings/P2/sound", SetVagUnpaused__Fv); INCLUDE_ASM("asm/nonmatchings/P2/sound", PreloadVag__FPc2FK); INCLUDE_ASM("asm/nonmatchings/P2/sound", FUN_001be708); INCLUDE_ASM("asm/nonmatchings/P2/sound", PreloadVag1); INCLUDE_ASM("asm/nonmatchings/P2/sound", FPauseForVag__Fv); INCLUDE_ASM("asm/nonmatchings/P2/sound", RefreshPambVolPan__FP3AMB); INCLUDE_ASM("asm/nonmatchings/P2/sound", FUN_001be8f8); INCLUDE_ASM("asm/nonmatchings/P2/sound", FVagPlaying__Fv); JUNK_WORD(0x0080102D); INCLUDE_ASM("asm/nonmatchings/P2/sound", StopVag__Fv); INCLUDE_ASM("asm/nonmatchings/P2/sound", PauseVag__Fv); INCLUDE_ASM("asm/nonmatchings/P2/sound", ContinueVag__Fv); INCLUDE_ASM("asm/nonmatchings/P2/sound", KillMusic__Fv); INCLUDE_ASM("asm/nonmatchings/P2/sound", PreloadMusidSongComplete__FUiUl); INCLUDE_ASM("asm/nonmatchings/P2/sound", PreloadMusidSong__F5MUSID); INCLUDE_ASM("asm/nonmatchings/P2/sound", StartMusidSong__F5MUSID); void PauseMusic() { SetMvgkRvol(2, MVGK_Music, 0.0f); } void ContinueMusic() { SetMvgkRvol(2, MVGK_Music, 1.0f); } INCLUDE_ASM("asm/nonmatchings/P2/sound", SfxhMusicUnknown1); INCLUDE_ASM("asm/nonmatchings/P2/sound", SfxhMusicUnknown2); INCLUDE_ASM("asm/nonmatchings/P2/sound", PexcAlloc__Fv); INCLUDE_ASM("asm/nonmatchings/P2/sound", RemoveExc__FP3EXC); INCLUDE_ASM("asm/nonmatchings/P2/sound", KillExcitement__Fv); INCLUDE_ASM("asm/nonmatchings/P2/sound", PexcSetExcitement__Fi); INCLUDE_ASM("asm/nonmatchings/P2/sound", SetIexcCurHigh__FP3EXC); INCLUDE_ASM("asm/nonmatchings/P2/sound", UnsetExcitement__FP3EXC); INCLUDE_ASM("asm/nonmatchings/P2/sound", UnsetExcitementHyst__FP3EXC); void StartupSound() { memset(D_00604790, 0, 0x1c); snd_StartSoundSystem(); SbpEnsureBank(0); snd_InitVAGStreamingEx(1, 0x2000, 1, 1); snd_SetGlobalExcite(0x14); MvgkUnknown2(); snd_SetMixerMode(0, 1); snd_SetGroupVoiceRange(0, 0, 0x2f); snd_SetGroupVoiceRange(1, 0x18, 0x2f); snd_SetGroupVoiceRange(3, 0x18, 0x2f); snd_SetGroupVoiceRange(2, 0x18, 0x2f); snd_PreAllocReverbWorkArea(2, 4); } JUNK_NOP(); JUNK_ADDIU(10); INCLUDE_ASM("asm/nonmatchings/P2/sound", FAmbientsPaused__Fv); INCLUDE_ASM("asm/nonmatchings/P2/sound", CalculateVolPan__FfP6VECTORPfT2fff); INCLUDE_ASM("asm/nonmatchings/P2/sound", FUN_001BF2E0); INCLUDE_ASM("asm/nonmatchings/P2/sound", FUN_001BF398); INCLUDE_ASM("asm/nonmatchings/P2/sound", PposEar__Fv); INCLUDE_ASM("asm/nonmatchings/P2/sound", SetDoppler__FP3AMB); INCLUDE_ASM("asm/nonmatchings/P2/sound", PfneardistGet__Fv); INCLUDE_ASM("asm/nonmatchings/P2/sound", SDistEar__FP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/sound", CalculateDistVolPan__FP6VECTORPfT1fff); INCLUDE_ASM("asm/nonmatchings/P2/sound", PambAlloc__Fv); INCLUDE_ASM("asm/nonmatchings/P2/sound", DropPamb__FPP3AMB); INCLUDE_ASM("asm/nonmatchings/P2/sound", RemoveAmb__FP3AMB); INCLUDE_ASM("asm/nonmatchings/P2/sound", StopSound__FP3AMBi); INCLUDE_ASM("asm/nonmatchings/P2/sound", SetPambFrq__FP3AMBf); INCLUDE_ASM("asm/nonmatchings/P2/sound", SetPambVol__FP3AMBf); INCLUDE_ASM("asm/nonmatchings/P2/sound", FillPamb__FP3AMBPP3AMBiP3ALOP6VECTORfffffP2LMT10_); INCLUDE_ASM("asm/nonmatchings/P2/sound", ActivatePamb__FP3AMB5SFXID); INCLUDE_ASM("asm/nonmatchings/P2/sound", ScheduleNextIntermittentSound__FP3AMB); INCLUDE_ASM("asm/nonmatchings/P2/sound", StartSound__F5SFXIDPP3AMBP3ALOP6VECTORfffffP2LMT9); INCLUDE_ASM("asm/nonmatchings/P2/sound", FUN_001BFFC8); INCLUDE_ASM("asm/nonmatchings/P2/sound", HandleWipeHandleWipeVolumes__FifVolumes); INCLUDE_ASM("asm/nonmatchings/P2/sound", UpdateSounds__Fv); void SetMvgkUvol(float uvol) { snd_SetMasterVolume(8, (int)(uvol * 1024.0f)); } void MvgkUnknown1(MVGK mvgk) { float v = 1.0f; for (int i = 0; i < 11; ++i) { v *= D_00274838[i][mvgk]; } float one = 1.0f; float zero = 0.0f; if (v < zero) { v = zero; } else if (v > one) { v = one; } snd_SetMasterVolume(mvgk, (int)(v * 1024.0f)); } void SetMvgkRvol(int channel, MVGK mvgk, float rvol) { D_00274838[channel][mvgk] = rvol; MvgkUnknown1(mvgk); } INCLUDE_ASM("asm/nonmatchings/P2/sound", MvgkUnknown2__Fv); INCLUDE_ASM("asm/nonmatchings/P2/sound", MvgkUnknown3); INCLUDE_ASM("asm/nonmatchings/P2/sound", MvgkUnknown4); /** * @todo Figure out func_001c0cb0, and use enum values for params where applicable. */ void KillSoundSystem() { snd_StopAllStreams(); KillSounds(0); KillExcitement(); FUN_001c0cb0(); while (snd_FlushSoundCommands()) {} snd_StreamSafeCheckCDIdle(1); snd_StreamSafeCdSync(0); } INCLUDE_ASM("asm/nonmatchings/P2/sound", KillSounds__Fi); INCLUDE_ASM("asm/nonmatchings/P2/sound", PushSwReverb__FP2SW7REVERBKi); INCLUDE_ASM("asm/nonmatchings/P2/sound", PopSwReverb__FP2SW); INCLUDE_ASM("asm/nonmatchings/P2/sound", SetSwDefaultReverb__FP2SW7REVERBKi); INCLUDE_ASM("asm/nonmatchings/P2/sound", FUN_001C0A50); INCLUDE_ASM("asm/nonmatchings/P2/sound", FUN_001C0AB8); INCLUDE_ASM("asm/nonmatchings/P2/sound", FUN_001C0B08); INCLUDE_ASM("asm/nonmatchings/P2/sound", StartSwIntermittentSounds__FP2SW); // TODO: Verify signature. INCLUDE_ASM("asm/nonmatchings/P2/sound", SetAMRegister__FiUc); INCLUDE_ASM("asm/nonmatchings/P2/sound", FUN_001c0c50); INCLUDE_ASM("asm/nonmatchings/P2/sound", FUN_001c0c68); INCLUDE_ASM("asm/nonmatchings/P2/sound", FUN_001c0cb0__Fv); INCLUDE_ASM("asm/nonmatchings/P2/sound", HsNextFootFall__Fv); INCLUDE_ASM("asm/nonmatchings/P2/sound", NextSneakyFootstep__Fv); ================================================ FILE: src/P2/speaker.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/speaker", InitSpeaker__FP7SPEAKER); INCLUDE_ASM("asm/nonmatchings/P2/speaker", PostSpeakerLoad__FP7SPEAKER); INCLUDE_ASM("asm/nonmatchings/P2/speaker", SetSpeakerSmIdle__FP7SPEAKER3OID); ================================================ FILE: src/P2/spire.c ================================================ #include #include /** * @todo Rename. */ extern float DAT_0024d3b4; void InitSpire(SPIRE *pspire) { InitLo(pspire); STRUCT_OFFSET(pspire, 0x58, float) = DAT_0024d3b4; } void OnSpireAdd(SPIRE *pspire) { OnLoAdd(pspire); AppendDlEntry(&pspire->psw->dlSpire, pspire); } void OnSpireRemove(SPIRE *pspire) { OnLoRemove(pspire); RemoveDlEntry(&pspire->psw->dlSpire, pspire); } void CloneSpire(SPIRE *pspire, SPIRE *pspireBase) { // pspire->dleSpire DLE dleSpire = STRUCT_OFFSET(pspire, 0x50, DLE); CloneLo(pspire, pspireBase); STRUCT_OFFSET(pspire, 0x50, DLE) = dleSpire; } ================================================ FILE: src/P2/splice/bif.cpp ================================================ #include #include #include #include INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpAdd__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpSub__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpMult__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpDiv__FiP4CRefP6CFrame); CRef RefOpPrint(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetTag(TAGK_Void); return CRef(cref); } CRef RefOpPrintFrame(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetTag(TAGK_Void); return CRef(cref); } CRef RefOpPrintSidebag(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetTag(TAGK_Void); return CRef(cref); } CRef RefOpIntEqual(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref[0].m_tag.m_n == aref[1].m_tag.m_n); return CRef(cref); } INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefCmp__FP4CRef4CMPK); CRef RefOpL(int carg, CRef *aref, CFrame *pframe) { return RefCmp(aref, CMPK_L); } CRef RefOpLE(int carg, CRef *aref, CFrame *pframe) { return RefCmp(aref, CMPK_LE); } CRef RefOpG(int carg, CRef *aref, CFrame *pframe) { return RefCmp(aref, CMPK_G); } CRef RefOpGE(int carg, CRef *aref, CFrame *pframe) { return RefCmp(aref, CMPK_GE); } INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpEqv__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefEqualHelper__FP4CRefT0); CRef RefOpEqual(int carg, CRef *aref, CFrame *pframe) { return RefEqualHelper(&aref[0], &aref[1]); } CRef RefOpIsBoolean(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref->m_tagk == TAGK_Bool); return CRef(cref); } CRef RefOpIsNum(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref->m_tagk == TAGK_S32 || aref->m_tagk == TAGK_F32); return CRef(cref); } CRef RefOpIsFloat(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref->m_tagk == TAGK_F32); return CRef(cref); } CRef RefOpIsInteger(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref->m_tagk == TAGK_S32); return CRef(cref); } CRef RefOpIsSymbol(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref->m_tagk == TAGK_Symid); return CRef(cref); } CRef RefOpIsVector(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref->m_tagk == TAGK_Vector); return CRef(cref); } CRef RefOpIsMatrix(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref->m_tagk == TAGK_Matrix); return CRef(cref); } CRef RefOpIsClq(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref->m_tagk == TAGK_Clq); return CRef(cref); } CRef RefOpIsLm(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref->m_tagk == TAGK_Lm); return CRef(cref); } CRef RefOpIsSmp(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref->m_tagk == TAGK_Smp); return CRef(cref); } CRef RefOpIsList(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref->m_tagk == TAGK_Pair || aref->m_tagk == TAGK_None); return CRef(cref); } CRef RefOpIsNull(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref->m_tagk == TAGK_None); return CRef(cref); } CRef RefOpIsObject(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref->m_tagk == TAGK_Basic); return CRef(cref); } CRef RefOpIsNullObj(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref->m_tagk == TAGK_Basic && !aref->m_tag.m_pbasic); return CRef(cref); } CRef RefOpIsMethod(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref->m_tagk == TAGK_Method); return CRef(cref); } CRef RefOpIsProcedure(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref->m_tagk == TAGK_Proc || aref->m_tagk == TAGK_Bifk); return CRef(cref); } INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpAreNear__FiP4CRefP6CFrame); CRef RefOpNot(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBool(aref->m_tagk == TAGK_Bool && !aref->m_tag.m_bool); return CRef(cref); } INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpCons__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpCar__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpCdr__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpSetCadr__FiP4CRefP6CFrame4BIFK); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpSetCar__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpSetCdr__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpLength__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpNth__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpIsMember__FiP4CRefP6CFrame); CRef RefOpList(int carg, CRef *aref, CFrame *pframe) { return CRef(*aref); } INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpAppend__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpMap__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpFilter__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpForEach__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpEval__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpVector__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpMatrix__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpSetMusicRegister__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpClq__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpLm__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpSmp__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpGetElement__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpRandomSeed__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpRandom__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefUfo__FP4CRef4UFOK); CRef RefOpSqrt(int carg, CRef *aref, CFrame *pframe) { return RefUfo(aref, UFOK_Sqrt); } CRef RefOpSin(int carg, CRef *aref, CFrame *pframe) { return RefUfo(aref, UFOK_Sin); } CRef RefOpCos(int carg, CRef *aref, CFrame *pframe) { return RefUfo(aref, UFOK_Cos); } CRef RefOpTan(int carg, CRef *aref, CFrame *pframe) { return RefUfo(aref, UFOK_Tan); } CRef RefOpAsin(int carg, CRef *aref, CFrame *pframe) { return RefUfo(aref, UFOK_Asin); } CRef RefOpAcos(int carg, CRef *aref, CFrame *pframe) { return RefUfo(aref, UFOK_Acos); } CRef RefOpAtan(int carg, CRef *aref, CFrame *pframe) { return RefUfo(aref, UFOK_Atan); } CRef RefOpRadNormalize(int carg, CRef *aref, CFrame *pframe) { return RefUfo(aref, UFOK_RadNormalize); } INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpAtan2__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpVectorDotProduct__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpVectorCrossProduct__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpVectorLth__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpVectorDistance__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpVectorDistanceSquared__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpVectorNormalize__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpVectorProjectNormal__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpVectorProjectTangent__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpVectorBallisticVelocity__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpVectorRadianNormal__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpMatrixTranspose__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpMatrixInvert__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpMatrixCalculateDmat__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpMatrixInterpolateRotate__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpMatrixDecomposeToTranslate__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpMatrixDecomposeToRotate__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpMatrixDecomposeToEuler__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpMatrixDecomposeToRadianNormal__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpMatrixLookAt__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpMatrixTiltUpright__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpClqEvaluate__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpClqEvaluateLm__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpClqFit__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpLmLimit__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpLmCheck__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpFloor__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpCeiling__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpRound__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpTruncate__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpAbs__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpMaximum__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpMinimum__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpModulo__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpCurrentTime__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpScheduleCallback__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpDeferObjectUpdate__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpObjectOption__FiP4CRefP6CFrame4BIFK); CRef RefOpAddO(int carg, CRef *aref, CFrame *pframe) { return RefOpObjectOption(carg, aref, pframe, BIFK_AddO); } CRef RefOpEnsureO(int carg, CRef *aref, CFrame *pframe) { return RefOpObjectOption(carg, aref, pframe, BIFK_EnsureO); } CRef RefOpSetO(int carg, CRef *aref, CFrame *pframe) { return RefOpObjectOption(carg, aref, pframe, BIFK_SetO); } CRef RefOpGetO(int carg, CRef *aref, CFrame *pframe) { return RefOpObjectOption(carg, aref, pframe, BIFK_GetO); } INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefPairFromAplo__FiPP2LO); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpFindObject__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpFindObjects__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpFindNearestObject__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpFindNearestObjects__FiP4CRefP6CFrame); CRef RefOpFindPlayerObject(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBasic(PpoCur()); return CRef(cref); } CRef RefOpFindWorldObject(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBasic(g_psw); return CRef(cref); } CRef RefOpFindCameraObject(int carg, CRef *aref, CFrame *pframe) { CRef cref = CRef(); cref.SetBasic(g_pcm); return CRef(cref); } INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpFindClassObjects__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpFindObjectsInBoundingBox__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpFindObjectsInBoundingSphere__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpHitTestObjectsImpl__F4BIFKiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpHitTestObjects__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpHitTestObjectsFirst__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpConvertObjectPosition__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpConvertObjectVector__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpConvertObjectMatrix__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpNearClipCenter__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpStartSound__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpStopSound__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpStartRumble__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpEmitSmokeCloud__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", RefOpPredictAnimationEffect__FiP4CRefP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", __8VU_FLOATf); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", __9VU_VECTORRC6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", __as__6VECTORG9VU_VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/splice/bif", __ml__FG8VU_FLOATG9VU_VECTOR); ================================================ FILE: src/P2/splice/eval.cpp ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/splice/eval", RefEvalSymbol__FP5CPairP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/eval", RefEvalSet__FP5CPairP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/eval", RefEvalDefine__FP5CPairP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/eval", RefEvalAssert__FP5CPairP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/eval", RefEvalIf__FP5CPairP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/eval", RefEvalOr__FP5CPairP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/eval", RefEvalAnd__FP5CPairP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/eval", RefEvalCond__FP5CPairP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/eval", RefEvalCase__FP5CPairP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/eval", RefEvalLet__FP5CPairP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/eval", RefEvalWhile__FP5CPairP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/eval", RefEvalLambda__FP5CPairP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/eval", RefEvalLambdaBody__FP5CPairP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/eval", RefEvalBegin__FP5CPairP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/eval", RefEvalApply__FP5CPairP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/eval", RefEvalImport__FP5CPairP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/eval", RefEval__FP5CPairP6CFrame); ================================================ FILE: src/P2/splice/frame.cpp ================================================ #include #include #include void CFrame::SetSingleParent(CFrame *pframeParent) { m_apframeParent[0] = pframeParent; m_cpframeParent = 1; } void CFrame::AddParent(CFrame *pframeParent) { m_apframeParent[m_cpframeParent++] = pframeParent; } INCLUDE_ASM("asm/nonmatchings/P2/splice/frame", RefAddBinding__6CFrameUiP4CRef); INCLUDE_ASM("asm/nonmatchings/P2/splice/frame", RefSetBinding__6CFrameUiP4CRef); INCLUDE_ASM("asm/nonmatchings/P2/splice/frame", FFindBinding__6CFrameUiiP4CRef); INCLUDE_ASM("asm/nonmatchings/P2/splice/frame", PrefFindBinding__6CFrameUii); INCLUDE_ASM("asm/nonmatchings/P2/splice/frame", CloneTo__6CFrameP6CFrame); CFrame *PframeNew() { CFrame *pframe = (CFrame *)g_splotheapFrame.PvAllocClear(); memset(pframe, 0, 0x1c); return pframe; } void DeleteFrame(CFrame *pframe) { return; } ================================================ FILE: src/P2/splice/gc.cpp ================================================ #include #include #include CGc::CGc() { return; } CGc::~CGc() { return; } void CGc::Startup() { m_cpframeRoot = 0; m_cpsidebagRoot = 0; } void CGc::Shutdown() {} void CGc::AddRootFrame(CFrame *pframe) { for (int i = 0; i < m_cpframeRoot; ++i) { if (m_apframeRoot[i] == pframe) { return; } } m_apframeRoot[m_cpframeRoot++] = pframe; } void CGc::AddRootSidebag(CSidebag *psidebag) { m_apsidebagRoot[m_cpsidebagRoot++] = psidebag; } void CGc::PushFrame(CFrame *pframe) { m_apframeStack[m_cpframeStack++] = pframe; } CFrame *CGc::PframePop() { if (m_cpframeStack >= 1) { return m_apframeStack[--m_cpframeStack]; } return NULL; } void CGc::PushPair(CPair *ppair) { m_appairStack[m_cppairStack++] = ppair; } CPair *CGc::PpairPop() { if (m_cppairStack >= 1) { return m_appairStack[--m_cppairStack]; } return NULL; } void CGc::PushProc(CProc *pproc) { m_approcStack[m_cpprocStack++] = pproc; } CProc *CGc::PprocPop() { if (m_cpprocStack >= 1) { return m_approcStack[--m_cpprocStack]; } return NULL; } void CGc::UpdateRecyclable() { g_splotheapPair.UpdateRecyclable(); g_splotheapFrame.UpdateRecyclable(); g_splotheapUnk1.UpdateRecyclable(); g_splotheapProc.UpdateRecyclable(); g_splotheapMethod.UpdateRecyclable(); } INCLUDE_ASM("asm/nonmatchings/P2/splice/gc", MarkLiveObjects__3CGc); INCLUDE_ASM("asm/nonmatchings/P2/splice/gc", Collect__3CGc); // The functions below are compiler generated and their INCLUDE_ASM can just be removed once g_gc is defined // Currently blocked until references to g_gc are resolved INCLUDE_ASM("asm/nonmatchings/P2/splice/gc", gc__static_initialization_and_destruction_0); INCLUDE_ASM("asm/nonmatchings/P2/splice/gc", _GLOBAL_$I$g_gc); INCLUDE_ASM("asm/nonmatchings/P2/splice/gc", _GLOBAL_$D$g_gc); ================================================ FILE: src/P2/splice/method.cpp ================================================ #include #include #include // todo: matches but blocked by reference in 001c15d8 // INCLUDE_ASM("asm/nonmatchings/P2/splice/method", PmethodNew__Fv); CMethod *PmethodNew() { CMethod *method = (CMethod *)g_splotheapMethod.PvAllocClear(); memset(method, 0, sizeof(CMethod)); return method; } ================================================ FILE: src/P2/splice/pair.cpp ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/splice/pair", CloneTo__5CPairP5CPairP6CFrame); INCLUDE_ASM("asm/nonmatchings/P2/splice/pair", PpairNew__Fv); INCLUDE_ASM("asm/nonmatchings/P2/splice/pair", DeletePair__FP5CPair); ================================================ FILE: src/P2/splice/proc.cpp ================================================ #include #include #include void CProc::CloneTo(CProc *pprocClone, CFrame *pframeClone) { pprocClone->m_pframe = pframeClone ? pframeClone : m_pframe; pprocClone->m_ppair = m_ppair; pprocClone->m_crefReq = m_crefReq; pprocClone->m_fVarArg = m_fVarArg; pprocClone->m_ppairCodeExpr = m_ppairCodeExpr; } CProc *PprocNew() { CProc *proc = (CProc *)g_splotheapProc.PvAllocClear(); memset(proc, 0, sizeof(CProc)); return proc; } ================================================ FILE: src/P2/splice/ref.cpp ================================================ #include #include CRef::CRef() { m_tagk = TAGK_Nil; } CRef::CRef(const CRef &ref) { const_cast(ref).Incref(); m_tagk = ref.m_tagk; m_tag = ref.m_tag; } CRef::~CRef() { Decref(); } CRef &CRef::operator=(const CRef &ref) { const_cast(ref).Incref(); Decref(); m_tagk = ref.m_tagk; m_tag = ref.m_tag; return *this; } /** * @todo fix misalignment */ INCLUDE_ASM("asm/nonmatchings/P2/splice/ref", __eq__4CRefRC4CRef); #ifdef SKIP_ASM bool CRef::operator==(const CRef& ref) { if (m_tagk != ref.m_tagk) { return false; } switch(m_tagk) { case TAGK_F32: return m_tag.m_g == ref.m_tag.m_g; case TAGK_S32: return m_tag.m_n == ref.m_tag.m_n; case TAGK_Symid: return m_tag.m_symid == ref.m_tag.m_symid; case TAGK_Bifk: return m_tag.m_bifk == ref.m_tag.m_bifk; case TAGK_Pair: return m_tag.m_ppair == ref.m_tag.m_ppair; case TAGK_Proc: return m_tag.m_pproc == ref.m_tag.m_pproc; case TAGK_Method: return m_tag.m_pmethod == ref.m_tag.m_pmethod; case TAGK_Basic: return (!m_tag.m_pbasic && !ref.m_tag.m_pbasic) || (m_tag.m_pbasic && ref.m_tag.m_pbasic); case TAGK_Matrix: return memcmp(m_tag.m_pmatrix,ref.m_tag.m_pmatrix, 0x40) == 0; case TAGK_Lm: return (m_tag.m_plm->gMin == ref.m_tag.m_plm->gMin) && (m_tag.m_plm->gMax == ref.m_tag.m_plm->gMax); case TAGK_Vector: return (m_tag.m_pvector->x == ref.m_tag.m_pvector->x) && (m_tag.m_pvector->y == ref.m_tag.m_pvector->y) && (m_tag.m_pvector->z == ref.m_tag.m_pvector->z); case TAGK_Clq: return (m_tag.m_pclq->g0 == ref.m_tag.m_pclq->g0) && (m_tag.m_pclq->g1 == ref.m_tag.m_pclq->g1) && (m_tag.m_pclq->g2 == ref.m_tag.m_pclq->g2); case TAGK_Smp: return (m_tag.m_psmp->svFast == ref.m_tag.m_psmp->svFast) && (m_tag.m_psmp->svSlow == ref.m_tag.m_psmp->svSlow) && (m_tag.m_psmp->dtFast == ref.m_tag.m_psmp->dtFast); case TAGK_Bool: return m_tag.m_bool == ref.m_tag.m_bool; default: return true; } } #endif // SKIP_ASM INCLUDE_ASM("asm/nonmatchings/P2/splice/ref", CloneTo__4CRefP4CRefP6CFrame); /** * @todo match rodata */ INCLUDE_ASM("asm/nonmatchings/P2/splice/ref", Decref__4CRef); #ifdef SKIP_ASM void CRef::Decref() { switch(m_tagk) { case TAGK_Vector: DecrefVector(m_tag.m_pvector); break; case TAGK_Matrix: DecrefMatrix(m_tag.m_pmatrix); break; case TAGK_Clq: DecrefClq(m_tag.m_pclq); break; case TAGK_Lm: DecrefLm(m_tag.m_plm); break; case TAGK_Smp: DecrefSmp(m_tag.m_psmp); break; } } #endif // SKIP_ASM /** * @todo match rodata */ INCLUDE_ASM("asm/nonmatchings/P2/splice/ref", Incref__4CRef); #ifdef SKIP_ASM void CRef::Incref() { switch(m_tagk) { case TAGK_Vector: IncrefVector(m_tag.m_pvector); break; case TAGK_Matrix: IncrefMatrix(m_tag.m_pmatrix); break; case TAGK_Clq: IncrefClq(m_tag.m_pclq); break; case TAGK_Lm: IncrefLm(m_tag.m_plm); break; case TAGK_Smp: IncrefSmp(m_tag.m_psmp); break; } } #endif void CRef::SetTag(TAGK tagk) { Decref(); m_tagk = tagk; } void CRef::SetS32(int n) { Decref(); m_tag.m_n = n; m_tagk = TAGK_S32; } void CRef::SetF32(float g) { Decref(); m_tag.m_g = g; m_tagk = TAGK_F32; } void CRef::SetBool(int fBool) { Decref(); if (fBool) { m_tag.m_bool = 1; } else { m_tag.m_bool = 0; } m_tagk = TAGK_Bool; } void CRef::SetSymid(uint symid) { Decref(); m_tag.m_symid = symid; m_tagk = TAGK_Symid; } void CRef::SetBifk(BIFK bifk) { Decref(); m_tag.m_bifk = bifk; m_tagk = TAGK_Bifk; } void CRef::SetPair(CPair *ppair) { Decref(); m_tag.m_ppair = ppair; m_tagk = TAGK_Pair; } void CRef::SetProc(CProc *pproc) { Decref(); m_tag.m_pproc = pproc; m_tagk = TAGK_Proc; } void CRef::SetVector(VECTOR *pvector) { IncrefVector(pvector); Decref(); m_tag.m_pvector = pvector; m_tagk = TAGK_Vector; } void CRef::SetMatrix(MATRIX4 *pmatrix) { IncrefMatrix(pmatrix); Decref(); m_tag.m_pmatrix = pmatrix; m_tagk = TAGK_Matrix; } void CRef::SetClq(CLQ *pclq) { IncrefClq(pclq); Decref(); m_tag.m_pclq = pclq; m_tagk = TAGK_Clq; } void CRef::SetLm(LM *plm) { IncrefLm(plm); Decref(); m_tag.m_plm = plm; m_tagk = TAGK_Lm; } void CRef::SetSmp(SMP *psmp) { IncrefSmp(psmp); Decref(); m_tag.m_psmp = psmp; m_tagk = TAGK_Smp; } void CRef::SetBasic(BASIC *pbasic) { Decref(); m_tag.m_pbasic = pbasic; m_tagk = TAGK_Basic; } void CRef::SetMethod(CMethod *pmethod) { Decref(); m_tag.m_pmethod = pmethod; m_tagk = TAGK_Method; } INCLUDE_ASM("asm/nonmatchings/P2/splice/ref", RefCoerceS32__4CRef); INCLUDE_ASM("asm/nonmatchings/P2/splice/ref", RefCoerceF32__4CRef); ================================================ FILE: src/P2/splice/serialize.cpp ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/splice/serialize", PpairSerializeIn__FP18CBinaryInputStream); ================================================ FILE: src/P2/splice/sidebag.cpp ================================================ #include #include #include INCLUDE_ASM("asm/nonmatchings/P2/splice/sidebag", RefAddBinding__8CSidebagiP4CRef); INCLUDE_ASM("asm/nonmatchings/P2/splice/sidebag", RefSetBinding__8CSidebagiP4CRef); INCLUDE_ASM("asm/nonmatchings/P2/splice/sidebag", FFindBinding__8CSidebagiP4CRef); INCLUDE_ASM("asm/nonmatchings/P2/splice/sidebag", CloneTo__8CSidebagP8CSidebag); CSidebag *PsidebagNew() { CSidebag *psidebag = (CSidebag *)PvAllocSwClearImpl(4); memset(psidebag, 0, 4); return psidebag; } ================================================ FILE: src/P2/splice/spliceutils.cpp ================================================ #include #include #include #include #include #include extern CGc g_gc; // todo: match and fix blocked references INCLUDE_ASM("asm/nonmatchings/P2/splice/spliceutils", StartupSplice__Fv); #ifdef SKIP_ASM void StartupSplice() { g_gc.Startup(); g_splotheapPair.Startup(0xc, 0x2000); g_splotheapPair.m_pfndelete = reinterpret_cast(DeletePair); g_splotheapFrame.Startup(0x1c, 0x190); g_splotheapFrame.m_pfndelete = reinterpret_cast(DeleteFrame); g_splotheapUnk1.Startup(0x10, 0x800); g_splotheapUnk1.m_pfndelete = reinterpret_cast(0x11C4E8); g_splotheapProc.Startup(0x14, 0x800); StartupSpliceStructuredTypeFactories(); g_splotheapMethod.Startup(0xc, 0x80); } #endif // SKIP_ASM void ShutdownSplice() { g_splotheapPair.Shutdown(); g_splotheapFrame.Shutdown(); g_splotheapUnk1.Shutdown(); g_splotheapProc.Shutdown(); ShutdownSpliceStructuredTypeFactories(); g_splotheapMethod.Shutdown(); g_gc.Shutdown(); } INCLUDE_ASM("asm/nonmatchings/P2/splice/spliceutils", spliceutils__static_initialization_and_destruction_0); INCLUDE_ASM("asm/nonmatchings/P2/splice/spliceutils", _GLOBAL_$I$g_splotheapPair); INCLUDE_ASM("asm/nonmatchings/P2/splice/spliceutils", _GLOBAL_$D$g_splotheapPair); ================================================ FILE: src/P2/splice/splotheap.cpp ================================================ #include #include #include #include /** * @todo 94.76% match. * https://decomp.me/scratch/3gv6F */ INCLUDE_ASM("asm/nonmatchings/P2/splice/splotheap", Startup__10CSplotheapii); #ifdef SKIP_ASM void CSplotheap::Startup(int cb, int c) { m_c = c; m_cb = cb + 8; m_ab = (byte *)PvAllocSwImpl(m_cb * m_c); SPLOT *psplotCurr = PsplotLookup(0); for (int i = 1; i < c; i++) { SPLOT *psplotPrev = psplotCurr; psplotCurr = PsplotLookup(i); psplotPrev->psplotNext = psplotCurr; } psplotCurr->psplotNext = NULL; m_psplotAlloc = NULL; m_psplotRecyclable = NULL; } #endif // SKIP_ASM void CSplotheap::Shutdown() { return; } void *CSplotheap::PvAllocUnsafe() { if (!m_psplotFree) { g_gc.Collect(); } SPLOT *psplot = m_psplotFree; if (psplot) { m_psplotFree = psplot->psplotNext; psplot->psplotNext = m_psplotAlloc; m_psplotAlloc = psplot; return PvFromPsplot(psplot); } return NULL; } void *CSplotheap::PvAllocClear() { void *pv = PvAllocUnsafe(); memset(pv, 0, m_cb - sizeof(SPLOT)); return pv; } SPLOT *CSplotheap::PsplotLookup(int i) { return (SPLOT *)(m_ab + i * m_cb); } void CSplotheap::UpdateRecyclable() { m_psplotRecyclable = m_psplotAlloc; } void CSplotheap::UnmarkAll() { SPLOT *psplot = m_psplotAlloc; while (psplot) { psplot->fAlive = 0; psplot = psplot->psplotNext; } } INCLUDE_ASM("asm/nonmatchings/P2/splice/splotheap", FreeGarbage__10CSplotheap); static void *PvFromPsplot(SPLOT *psplot) { return (byte *)psplot + sizeof(SPLOT); } static SPLOT *PsplotFromPv(void *pv) { return (SPLOT *)((byte *)pv - sizeof(SPLOT)); } bool FIsPvGarbage(void *pv) { SPLOT *psplot = PsplotFromPv(pv); return !psplot->fAlive; } void MarkPvAlive(void *pv) { SPLOT *psplot = PsplotFromPv(pv); psplot->fAlive = 1; } INCLUDE_ASM("asm/nonmatchings/P2/splice/splotheap", FUN_0011C418); INCLUDE_ASM("asm/nonmatchings/P2/splice/splotheap", FUN_0011C498); INCLUDE_ASM("asm/nonmatchings/P2/splice/splotheap", FUN_0011C4E8); ================================================ FILE: src/P2/splice/vecmat.cpp ================================================ #include #include #include #include #include /** * @todo Once the data for this TU is migrated the code can be made much simpler. */ extern int _t18CStructTypeFactory1Z6VECTOR$s_cmax; extern int _t18CStructTypeFactory1Z7MATRIX4$s_cmax; extern int _t18CStructTypeFactory1Z3CLQ$s_cmax; extern int _t18CStructTypeFactory1Z2LM$s_cmax; extern int _t18CStructTypeFactory1Z3SMP$s_cmax; extern byte *_t18CStructTypeFactory1Z6VECTOR$s_acref; extern byte *_t18CStructTypeFactory1Z7MATRIX4$s_acref; extern byte *_t18CStructTypeFactory1Z3CLQ$s_acref; extern byte *_t18CStructTypeFactory1Z2LM$s_acref; extern byte *_t18CStructTypeFactory1Z3SMP$s_acref; extern SLOTHEAP _t18CStructTypeFactory1Z6VECTOR$s_slotheap; extern SLOTHEAP _t18CStructTypeFactory1Z7MATRIX4$s_slotheap; extern SLOTHEAP _t18CStructTypeFactory1Z3CLQ$s_slotheap; extern SLOTHEAP _t18CStructTypeFactory1Z2LM$s_slotheap; extern SLOTHEAP _t18CStructTypeFactory1Z3SMP$s_slotheap; VECTOR *PvectorNew() { VECTOR *pvector = (VECTOR *)PvAllocSlotheapUnsafe(&_t18CStructTypeFactory1Z6VECTOR$s_slotheap); if (pvector) { memset(pvector, 0, _t18CStructTypeFactory1Z6VECTOR$s_slotheap.cb); } else { g_gc.Collect(); pvector = (VECTOR *)PvAllocSlotheapClearImpl(&_t18CStructTypeFactory1Z6VECTOR$s_slotheap); } return pvector; } void IncrefVector(VECTOR *pvector) { // TODO: Size of VECTOR should be 16 bytes. _t18CStructTypeFactory1Z6VECTOR$s_acref[((uint)pvector - (uint)_t18CStructTypeFactory1Z6VECTOR$s_slotheap.ab) / 16]++; } void DecrefVector(VECTOR *pvector) { // TODO: Size of VECTOR should be 16 bytes. uint index = ((uint)pvector - (uint)_t18CStructTypeFactory1Z6VECTOR$s_slotheap.ab) / 16; if (--_t18CStructTypeFactory1Z6VECTOR$s_acref[index]) return; FreeSlotheapPv(&_t18CStructTypeFactory1Z6VECTOR$s_slotheap, pvector); } JUNK_NOP(); JUNK_ADDIU(10); MATRIX4 *PmatrixNew() { MATRIX4 *pmatrix = (MATRIX4 *)PvAllocSlotheapUnsafe(&_t18CStructTypeFactory1Z7MATRIX4$s_slotheap); if (pmatrix) { memset(pmatrix, 0, _t18CStructTypeFactory1Z7MATRIX4$s_slotheap.cb); } else { g_gc.Collect(); pmatrix = (MATRIX4 *)PvAllocSlotheapClearImpl(&_t18CStructTypeFactory1Z7MATRIX4$s_slotheap); } return pmatrix; } void IncrefMatrix(MATRIX4 *pmatrix) { uint index = ((uint)pmatrix - (uint)_t18CStructTypeFactory1Z7MATRIX4$s_slotheap.ab) / sizeof(MATRIX4); _t18CStructTypeFactory1Z7MATRIX4$s_acref[index]++; } void DecrefMatrix(MATRIX4 *pmatrix) { uint index = ((uint)pmatrix - (uint)_t18CStructTypeFactory1Z7MATRIX4$s_slotheap.ab) / sizeof(MATRIX4); if (--_t18CStructTypeFactory1Z7MATRIX4$s_acref[index]) return; FreeSlotheapPv(&_t18CStructTypeFactory1Z7MATRIX4$s_slotheap, pmatrix); } void DeleteMatrix(MATRIX4 *pmatrix) { FreeSlotheapPv(&_t18CStructTypeFactory1Z7MATRIX4$s_slotheap, pmatrix); } CLQ *PclqNew() { CLQ *pclq = (CLQ *)PvAllocSlotheapUnsafe(&_t18CStructTypeFactory1Z3CLQ$s_slotheap); if (pclq) { memset(pclq, 0, _t18CStructTypeFactory1Z3CLQ$s_slotheap.cb); } else { g_gc.Collect(); pclq = (CLQ *)PvAllocSlotheapClearImpl(&_t18CStructTypeFactory1Z3CLQ$s_slotheap); } return pclq; } void IncrefClq(CLQ *pclq) { uint index = ((uint)pclq - (uint)_t18CStructTypeFactory1Z3CLQ$s_slotheap.ab) / sizeof(CLQ); _t18CStructTypeFactory1Z3CLQ$s_acref[index]++; } void DecrefClq(CLQ *pclq) { uint index = ((uint)pclq - (uint)_t18CStructTypeFactory1Z3CLQ$s_slotheap.ab) / sizeof(CLQ); if (--_t18CStructTypeFactory1Z3CLQ$s_acref[index]) return; FreeSlotheapPv(&_t18CStructTypeFactory1Z3CLQ$s_slotheap, pclq); } JUNK_NOP(); JUNK_ADDIU(10); LM *PlmNew() { LM *plm = (LM *)PvAllocSlotheapUnsafe(&_t18CStructTypeFactory1Z2LM$s_slotheap); if (plm) { memset(plm, 0, _t18CStructTypeFactory1Z2LM$s_slotheap.cb); } else { g_gc.Collect(); plm = (LM *)PvAllocSlotheapClearImpl(&_t18CStructTypeFactory1Z2LM$s_slotheap); } return plm; } void IncrefLm(LM *plm) { uint index = ((uint)plm - (uint)_t18CStructTypeFactory1Z2LM$s_slotheap.ab) / sizeof(LM); _t18CStructTypeFactory1Z2LM$s_acref[index]++; } void DecrefLm(LM *plm) { uint index = ((uint)plm - (uint)_t18CStructTypeFactory1Z2LM$s_slotheap.ab) / sizeof(LM); if (--_t18CStructTypeFactory1Z2LM$s_acref[index]) return; FreeSlotheapPv(&_t18CStructTypeFactory1Z2LM$s_slotheap, plm); } JUNK_NOP(); JUNK_ADDIU(10); SMP *PsmpNew() { SMP *psmp = (SMP *)PvAllocSlotheapUnsafe(&_t18CStructTypeFactory1Z3SMP$s_slotheap); if (psmp) { memset(psmp, 0, _t18CStructTypeFactory1Z3SMP$s_slotheap.cb); } else { g_gc.Collect(); psmp = (SMP *)PvAllocSlotheapClearImpl(&_t18CStructTypeFactory1Z3SMP$s_slotheap); } return psmp; } void IncrefSmp(SMP *psmp) { uint index = ((uint)psmp - (uint)_t18CStructTypeFactory1Z3SMP$s_slotheap.ab) / sizeof(SMP); _t18CStructTypeFactory1Z3SMP$s_acref[index]++; } void DecrefSmp(SMP *psmp) { uint index = ((uint)psmp - (uint)_t18CStructTypeFactory1Z3SMP$s_slotheap.ab) / sizeof(SMP); if (--_t18CStructTypeFactory1Z3SMP$s_acref[index]) return; FreeSlotheapPv(&_t18CStructTypeFactory1Z3SMP$s_slotheap, psmp); } void StartupSpliceStructuredTypeFactories() { // TODO: Size of VECTOR should be 16 bytes. CreateSlotheapSw(&_t18CStructTypeFactory1Z6VECTOR$s_slotheap, 0x10, _t18CStructTypeFactory1Z6VECTOR$s_cmax); _t18CStructTypeFactory1Z6VECTOR$s_acref = (byte *)PvAllocSwClearImpl(_t18CStructTypeFactory1Z6VECTOR$s_cmax); CreateSlotheapSw(&_t18CStructTypeFactory1Z7MATRIX4$s_slotheap, sizeof(MATRIX4), _t18CStructTypeFactory1Z7MATRIX4$s_cmax); _t18CStructTypeFactory1Z7MATRIX4$s_acref = (byte *)PvAllocSwClearImpl(_t18CStructTypeFactory1Z7MATRIX4$s_cmax); CreateSlotheapSw(&_t18CStructTypeFactory1Z3CLQ$s_slotheap, sizeof(CLQ), _t18CStructTypeFactory1Z3CLQ$s_cmax); _t18CStructTypeFactory1Z3CLQ$s_acref = (byte *)PvAllocSwClearImpl(_t18CStructTypeFactory1Z3CLQ$s_cmax); CreateSlotheapSw(&_t18CStructTypeFactory1Z2LM$s_slotheap, sizeof(LM) ,_t18CStructTypeFactory1Z2LM$s_cmax); _t18CStructTypeFactory1Z2LM$s_acref = (byte *)PvAllocSwClearImpl(_t18CStructTypeFactory1Z2LM$s_cmax); CreateSlotheapSw(&_t18CStructTypeFactory1Z3SMP$s_slotheap, sizeof(SMP), _t18CStructTypeFactory1Z3SMP$s_cmax); _t18CStructTypeFactory1Z3SMP$s_acref = (byte *)PvAllocSwClearImpl(_t18CStructTypeFactory1Z3SMP$s_cmax); } void ShutdownSpliceStructuredTypeFactories() { return; } ================================================ FILE: src/P2/splicemap.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/splicemap", LoadSwSpliceFromBrx__FP2SWP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/splicemap", PframeFromIsplice__FiP2SW); INCLUDE_ASM("asm/nonmatchings/P2/splicemap", RefEvalModule__FiP2SW); ================================================ FILE: src/P2/spliceobj.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/spliceobj", PeopidFind__FP5BASICi); INCLUDE_ASM("asm/nonmatchings/P2/spliceobj", RefGetObjectList__FP5BASIC4OTYPPFPv_v); INCLUDE_ASM("asm/nonmatchings/P2/spliceobj", RefGetPeopid__FP5BASICP5EOPID); INCLUDE_ASM("asm/nonmatchings/P2/spliceobj", FAppendSpliceListElement__FPvT0); INCLUDE_ASM("asm/nonmatchings/P2/spliceobj", FSpliceListElementExists__FPvT0); INCLUDE_ASM("asm/nonmatchings/P2/spliceobj", RefSetPvsFromSplice__FiP4CRefP4OTYPPPv); INCLUDE_ASM("asm/nonmatchings/P2/spliceobj", RefSetArgListFromPvs__FiP4OTYPPPv); INCLUDE_ASM("asm/nonmatchings/P2/spliceobj", RefSetPeopid__FP5BASICP5EOPIDP4CRef); INCLUDE_ASM("asm/nonmatchings/P2/spliceobj", RefGetOption__FP5BASICi); INCLUDE_ASM("asm/nonmatchings/P2/spliceobj", RefSetOption__FP5BASICiP4CRef); INCLUDE_ASM("asm/nonmatchings/P2/spliceobj", RefAddOption__FP5BASICiP4CRef); INCLUDE_ASM("asm/nonmatchings/P2/spliceobj", RefEnsureOption__FP5BASICiP4CRef); INCLUDE_ASM("asm/nonmatchings/P2/spliceobj", RefSetArgsFromSplice__FiP4CRefP4OTYPe); ================================================ FILE: src/P2/sprbuf.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/sprbuf", LoadSprBuf__Fie); INCLUDE_ASM("asm/nonmatchings/P2/sprbuf", SaveSprBuf__FPve); JUNK_ADDIU(A0); INCLUDE_ASM("asm/nonmatchings/P2/sprbuf", sprbuf__static_initialization_and_destruction_0); INCLUDE_ASM("asm/nonmatchings/P2/sprbuf", _GLOBAL_$I$g_asprbuf); ================================================ FILE: src/P2/sqtr.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/sqtr", FUN_001c29e8); INCLUDE_ASM("asm/nonmatchings/P2/sqtr", UpdateSqtrm__FP5SQTRMP6VECTORP7MATRIX3ff); INCLUDE_ASM("asm/nonmatchings/P2/sqtr", RenderSqtrm__FP5SQTRMP2CM); INCLUDE_ASM("asm/nonmatchings/P2/sqtr", DrawSqtrm__FP3RPL); ================================================ FILE: src/P2/step.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/step", InitStep__FP4STEP); INCLUDE_ASM("asm/nonmatchings/P2/step", PostStepLoad__FP4STEP); INCLUDE_ASM("asm/nonmatchings/P2/step", LimitStepHands__FP4STEPi); // TODO: This might be "RetractStepExtremity". Further research needed. INCLUDE_ASM("asm/nonmatchings/P2/step", FUN_001c4618); INCLUDE_ASM("asm/nonmatchings/P2/step", FUN_001c4790); INCLUDE_ASM("asm/nonmatchings/P2/step", FUN_001c4848); void RenderStepSelf__FP4STEPP2CMP2RO(STEP *pstep, CM *pcm, RO *pro) { RenderSoSelf(pstep, pcm, pro); } INCLUDE_ASM("asm/nonmatchings/P2/step", ReadStepJoystick__FP4STEPP3JOY); INCLUDE_ASM("asm/nonmatchings/P2/step", UpdateStepFootfall__FP4STEPfP3SFF); INCLUDE_ASM("asm/nonmatchings/P2/step", UpdateStepPhys__FP4STEP); INCLUDE_ASM("asm/nonmatchings/P2/step", SetStepPhys__FP4STEPP2SOi); void UpdateStep(STEP *pstep, float dt) { UpdatePo(pstep, dt); UpdateStepPhys(pstep); } CT CtTorqueStep(STEP *pstep) { return CT_Locked; } INCLUDE_ASM("asm/nonmatchings/P2/step", PropagateStepForce__FP4STEPiP2XPiP2DZP2FX); INCLUDE_ASM("asm/nonmatchings/P2/step", RotateStepToMat__FP4STEPP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/step", CloneStepPhys__FP4STEPP2SOi); void PresetStepAccel(STEP *pstep, float dt) { PresetSoAccel(pstep, dt); PresetStepAccelBase(pstep); } INCLUDE_ASM("asm/nonmatchings/P2/step", PresetStepAccelBase__FP4STEP); INCLUDE_ASM("asm/nonmatchings/P2/step", FCheckStepXpBase__FP4STEPP2XPi); INCLUDE_ASM("asm/nonmatchings/P2/step", AdjustStepNewXp__FP4STEPP2XPi); void AdjustStepDz(STEP *pstep, GRFADJ grfadj, DZ *pdz, int ixpd, float dt) { AdjustStepDzBase(pstep, grfadj, pdz, ixpd); } void AdjustStepDzBase(STEP *pstep, GRFADJ grfadj, DZ *pdz, int ixpd) { return; } INCLUDE_ASM("asm/nonmatchings/P2/step", UpdateStepMatTarget__FP4STEP); INCLUDE_ASM("asm/nonmatchings/P2/step", AdjustStepXpVelocity__FP4STEPP2XPi); INCLUDE_ASM("asm/nonmatchings/P2/step", UpdateStepXfWorld__FP4STEP); INCLUDE_ASM("asm/nonmatchings/P2/step", AdjustStepXpVelocityBase__FP4STEPP2XPi); INCLUDE_ASM("asm/nonmatchings/P2/step", AdjustStepXps__FP4STEP); INCLUDE_ASM("asm/nonmatchings/P2/step", AddStepCustomXps__FP4STEPP2SOiP3BSPT3PP2XP); INCLUDE_ASM("asm/nonmatchings/P2/step", AddStepCustomXpsBase__FP4STEPP2SOP3BSPPP2XP); INCLUDE_ASM("asm/nonmatchings/P2/step", FixStepAngularVelocity__FP4STEP); INCLUDE_ASM("asm/nonmatchings/P2/step", PredictStepRotation__FP4STEPfP7MATRIX3P6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/step", SetStepSpinRatio__FP4STEPf); INCLUDE_ASM("asm/nonmatchings/P2/step", SetStepGravityRatio__FP4STEPf); ================================================ FILE: src/P2/stepact.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/stepact", GetActaddPositionGoal__FP6ACTADDfP6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/stepact", GetActaddRotationGoal__FP6ACTADDfP7MATRIX3P6VECTOR); ================================================ FILE: src/P2/stepcane.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/stepcane", SetJtJtcs__FP2JT4JTCS); INCLUDE_ASM("asm/nonmatchings/P2/stepcane", UpdateJtCane__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/stepcane", UpdateJtActiveCane__FP2JTP3JOY); INCLUDE_ASM("asm/nonmatchings/P2/stepcane", ChooseJtAttackTarget__FP2JTiP6VECTORffPP6TARGETT2); INCLUDE_ASM("asm/nonmatchings/P2/stepcane", ChooseJtSweepTarget__FP2JTP2BLP6ASEGBL); INCLUDE_ASM("asm/nonmatchings/P2/stepcane", ChooseJtRushTarget__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/stepcane", ChooseJtSmashTarget__FP2JT); ================================================ FILE: src/P2/stepguard.c ================================================ #include #include extern SNIP s_asnipStepguardLoad; INCLUDE_ASM("asm/nonmatchings/P2/stepguard", InitStepguard__FP9STEPGUARD); void LoadStepguardFromBrx(STEPGUARD *pstepguard, CBinaryInputStream *pbis) { LoadSoFromBrx(pstepguard, pbis); SnipAloObjects(pstepguard, 1, &s_asnipStepguardLoad); LoadStepguardAnimations(pstepguard); LoadStepguardPhys(pstepguard); } void CloneStepguard(STEPGUARD *pstepguard, STEPGUARD *pstepguardBase) { int ichkDead = STRUCT_OFFSET(pstepguard, 0xb10, int); // pstepguard->ichkDead SGG *psgg = STRUCT_OFFSET(pstepguard, 0x720, SGG *); // pstepguard->psgg ClonePo(pstepguard, pstepguardBase); STRUCT_OFFSET(pstepguard, 0xb10, int) = ichkDead; // pstepguard->ichkDead STRUCT_OFFSET(pstepguard, 0x720, SGG *) = psgg; // pstepguard->psgg STRUCT_OFFSET(pstepguard, 0xb74, STEPGUARD *) = pstepguardBase; // pstepguard->pstepguardBase } INCLUDE_ASM("asm/nonmatchings/P2/stepguard", BindStepguard__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", PostStepguardLoadCallback__FP9STEPGUARD5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", PostStepguardLoad__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FIgnoreStepguardIntersection__FP9STEPGUARDP2SO); void OnStepguardAdd(STEPGUARD *pstepguard) { OnPoAdd(pstepguard); // pstepguard->psgg if (STRUCT_OFFSET(pstepguard, 0x720, SGG *)) { AddSggGuard(STRUCT_OFFSET(pstepguard, 0x720, SGG *), pstepguard); } } /** * @todo 96.67% match. * https://decomp.me/scratch/HcoZ7 */ INCLUDE_ASM("asm/nonmatchings/P2/stepguard", OnStepguardRemove__FP9STEPGUARD); #ifdef SKIP_ASM extern float D_0024D654; void OnStepguardRemove(STEPGUARD *pstepguard) { OnPoRemove(pstepguard); ASEGA *pasegaSgs = STRUCT_OFFSET(pstepguard, 0x7e0, ASEGA *); if (pasegaSgs) { RetractAsega(pasegaSgs); STRUCT_OFFSET(pstepguard, 0x7e0, ASEGA *) = 0; } ASEGA *pasegaPatrol = STRUCT_OFFSET(pstepguard, 0x754, ASEGA *); if (pasegaPatrol) { RetractAsega(pasegaPatrol); STRUCT_OFFSET(pstepguard, 0x754, ASEGA *) = 0; } SGG *psgg = STRUCT_OFFSET(pstepguard, 0x720, SGG *); if (psgg) { RemoveSggGuard(psgg, pstepguard); } const float val = D_0024D654; STRUCT_OFFSET(pstepguard, 0xa60, int) = 0; STRUCT_OFFSET(pstepguard, 0x748, int) = 0; STRUCT_OFFSET(pstepguard, 0xba4, int) = 0; STRUCT_OFFSET(pstepguard, 0xbf4, float) = val; STRUCT_OFFSET(pstepguard, 0xbf8, float) = val; STRUCT_OFFSET(pstepguard, 0xbfc, float) = val; STRUCT_OFFSET(pstepguard, 0x72c, int) = 0; STRUCT_OFFSET(pstepguard, 0xc00, float) = val; } #endif // SKIP_ASM INCLUDE_ASM("asm/nonmatchings/P2/stepguard", PresetStepguardAccel__FP9STEPGUARDf); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", DradEnemyStepguard__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", SetStepguardTargetHeading__FP9STEPGUARDff); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FUN_001c7b60); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", UpdateStepguardDrive__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", UpdateStepguard__FP9STEPGUARDf); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", SgsNextStepguardAI__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", SetStepguardGoal__FP9STEPGUARDP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FReachedStepguardGoal__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FFilterStepguardJump__FP9STEPGUARDP2SO); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", MoveStepguardToGoal__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FUN_001c8920); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", LookStepguardAtGoal__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", UpdateStepguardGoal__FP9STEPGUARDi); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FUN_001c8d40); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", OnStepguardWaypointActive__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", UpdateStepguardSgs__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", SetStepguardSgs__FP9STEPGUARD3SGSP4ASEG); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", SetStepguardSgsExternal__FP9STEPGUARD3SGSP4ASEG); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", OnStepguardExitingSgs__FP9STEPGUARD3SGS); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", OnStepguardEnteringSgs__FP9STEPGUARD3SGSP4ASEG); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", SggsGetStepguard__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FAbsorbStepguardWkr__FP9STEPGUARDP3WKR); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FTakeStepguardDamage__FP9STEPGUARDP3ZPR); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FUN_001c9a48); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", HandleStepguardGrfsgsc__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", DoStepguardFreefallJump__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", DoStepguardFreefallLanding__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FUN_001c9d50); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", HandleStepguardMessage__FP9STEPGUARD5MSGIDPv); SGAS SgasGetStepguard(STEPGUARD *pstepguard) { return SGAS_Force; } INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FCanStepguardAttack__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", RenderStepguardSelf__FP9STEPGUARDP2CMP2RO); int FValidSgs(SGS sgs) { return ((uint)sgs < 0x11); } INCLUDE_ASM("asm/nonmatchings/P2/stepguard", UseStepguardAnimation__FP9STEPGUARD3SGS3OID); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", UseStepguardAnimationImmediate__FP9STEPGUARD3SGS3OID); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FUN_001ca6d0); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", UseStepguardDeathAnimation__FP9STEPGUARDi3OID); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", PasegFindStepguard__FP9STEPGUARD3OID); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", LoadStepguardAnimations__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", UseStepguardExpl__FP9STEPGUARD3OID); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", UseStepguardRwm__FP9STEPGUARD3OID); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", UseStepguardPhys__FP9STEPGUARD3SGS3OID); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", LoadStepguardPhys__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", AddStepguardEffect__FP9STEPGUARD3OID3ZPK); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", SetStepguardPathzone__FP9STEPGUARD3OID); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", PsoEnemyStepguard__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FUN_001caad0); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", SetStepguardEnemyObject__FP9STEPGUARDP2SO); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", RebindStepguardEnemy__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FUN_001cac28__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FUN_001cac30); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", AdjustStepguardDz__FP9STEPGUARDiP2DZif); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", SetStepguardAttackAngleMax__FP9STEPGUARDf); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", AddStepguardAlarm__FP9STEPGUARDP5ALARM); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", MatchStepguardAnimationPhase__FP9STEPGUARD3OIDN31); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", AddStepguardCustomXps__FP9STEPGUARDP2SOiP3BSPT3PP2XP); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FUN_001caee0); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", UpdateStepguardEffect__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", SetStepguardPatrolAnimation__FP9STEPGUARDP4ASEG); int FInflictStepguardZap(STEPGUARD *pstepguard, XP *pxp, ZPR *pzpr) { return 1; } int FDetectStepguard(STEPGUARD *pstepguard) { return 0; } INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FCheckStepguardEnemyHidden__FP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FUN_001cb578); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", PsggNew__FP2SW); void InitSgg(SGG *psgg) { InitLo(psgg); STRUCT_OFFSET(psgg, 0x180, OID) = OID_Nil; // psgg->oidSync } INCLUDE_ASM("asm/nonmatchings/P2/stepguard", AddSggGuard__FP3SGGP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", AddSggGuardName__FP3SGG3OID); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", AddSggSearchXfmName__FP3SGG3OID); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", RemoveSggGuard__FP3SGGP9STEPGUARD); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", BindSgg__FP3SGG); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", PostSggLoadCallback__FP3SGG5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", EnsureSggCallback__FP3SGG); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", PsoEnemySgg__FP3SGG); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", UpdateSggCallback__FP3SGG5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", SggsNextSgg__FP3SGG); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FDetectSgg__FP3SGG); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", FAbandonSggSearch__FP3SGG); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", EnsureSggAlarm__FP3SGGP5ALARM); void TriggerSggAlarms(SGG *psgg, ALTK altk) { for (int i = 0; i < STRUCT_OFFSET(psgg, 0x168, int); i++) // psgg->calarms { TriggerAlarm(STRUCT_OFFSET_INDEX(psgg, 0x16c, ALARM *, i), altk); // psgg->palarms[i] } } INCLUDE_ASM("asm/nonmatchings/P2/stepguard", SetSggSggs__FP3SGG4SGGS); INCLUDE_ASM("asm/nonmatchings/P2/stepguard", AssignSggSearchPoints__FP3SGG); // junk_001CC3F8 JUNK_ADDIU(10); JUNK_WORD(0x7c450000); JUNK_WORD(0x48220800); ================================================ FILE: src/P2/stephang.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/stephang", PostJtLoadSwing__FP2JTP2BLPP6ASEGBL); INCLUDE_ASM("asm/nonmatchings/P2/stephang", AnticipateJtForce__FP2JTP2SOP6VECTORT2P2FX); INCLUDE_ASM("asm/nonmatchings/P2/stephang", CalculateJtHangAccel__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/stephang", PresetJtAccelHang__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/stephang", AddJtExternalAccelerations__FP2JTP2XAf); INCLUDE_ASM("asm/nonmatchings/P2/stephang", UpdateJtActiveHang__FP2JTP3JOY); INCLUDE_ASM("asm/nonmatchings/P2/stephang", CheckJtUnhook__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/stephang", UpdateJtHookOx__FP2JTP2LOi); INCLUDE_ASM("asm/nonmatchings/P2/stephang", AddJtHookXps__FP2JTiP2LOP6VECTORN23); INCLUDE_ASM("asm/nonmatchings/P2/stephang", GetJtHangHeading__FP2JTPf); INCLUDE_ASM("asm/nonmatchings/P2/stephang", UpdateJtIkHang__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/stephang", FUN_001cdd98); INCLUDE_ASM("asm/nonmatchings/P2/stephang", FUN_001cdf78); ================================================ FILE: src/P2/stephide.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/stephide", JtbsChooseJtHide__FP2JTP2LOP4JTHK); INCLUDE_ASM("asm/nonmatchings/P2/stephide", MeasureJtJumpToTarget__FP2JTP6VECTORP3ALOT1T1PfT5T1T1); INCLUDE_ASM("asm/nonmatchings/P2/stephide", GetJtRailLanding__FP2JTP4RAILfP6VECTORT3); INCLUDE_ASM("asm/nonmatchings/P2/stephide", GMeasureJumpRail__FP3MJRf); INCLUDE_ASM("asm/nonmatchings/P2/stephide", FUN_001cea58); INCLUDE_ASM("asm/nonmatchings/P2/stephide", GMeasureJumpHshape__FP3MJHf); INCLUDE_ASM("asm/nonmatchings/P2/stephide", FUN_001ceb18); INCLUDE_ASM("asm/nonmatchings/P2/stephide", FUN_001cedf8); INCLUDE_ASM("asm/nonmatchings/P2/stephide", FUN_001cee30); INCLUDE_ASM("asm/nonmatchings/P2/stephide", FUN_001ceec8); INCLUDE_ASM("asm/nonmatchings/P2/stephide", FUN_001cf138); INCLUDE_ASM("asm/nonmatchings/P2/stephide", FUN_001cf158); INCLUDE_ASM("asm/nonmatchings/P2/stephide", UpdateJtActiveHide__FP2JTP3JOY); INCLUDE_ASM("asm/nonmatchings/P2/stephide", MatchJtXmgRail__FP2JTP3XMGP6ACTADJ); INCLUDE_ASM("asm/nonmatchings/P2/stephide", UpdateJtHide__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/stephide", UpdateJtInternalXpsHide__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/stephide", SetJtHfdk__FP2JT4HFDK); INCLUDE_ASM("asm/nonmatchings/P2/stephide", ResetJtDynamicTunnel__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/stephide", PresetJtAccelHide__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/stephide", FUN_001d1478); ================================================ FILE: src/P2/steppipe.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/steppipe", PostJtLoadPipe__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/steppipe", GetJtPipeGoalMat__FP2JTP4PIPEfP7MATRIX3); INCLUDE_ASM("asm/nonmatchings/P2/steppipe", PresetJtAccelPipe__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/steppipe", UpdateJtActivePipe__FP2JTP3JOY); INCLUDE_ASM("asm/nonmatchings/P2/steppipe", UpdateJtInternalXpsPipe__FP2JT); INCLUDE_ASM("asm/nonmatchings/P2/steppipe", SetJtJtpdk__FP2JT5JTPDK); INCLUDE_ASM("asm/nonmatchings/P2/steppipe", PlaceJtOnPipe__FP2JTP4PIPE); ================================================ FILE: src/P2/steppower.c ================================================ #include #include #include #include #include #include // GRFVAULT s_mpfspgrfvault[7]; extern BLOT g_binoc; // todo: find where this belongs. extern int D_00270458; // temp // SMP SMP_00274f78; // initialized with { 2.0f, 0.0f, 0.1f } void SetFsp(FSP fsp) { // Cleanup current powerup. switch (g_fsp) { case FSP_Ball: { // If current powerup is roll, reset JT's body state. if (g_pjt && g_pjt->jts == (JTS)13) { SetJtJts(g_pjt, JTS_Stand, JTBS_Nil); } break; } case FSP_Mine: { // If current powerup is mine, fade out the mine. if (g_pjt && g_pjt->paloMine_0x1518 && FIsLoInWorld(g_pjt->paloMine_0x1518)) { FadeAloOut(g_pjt->paloMine_0x1518, 0.5f); } break; } default: { break; } } if (g_pjt) { g_rtClockPowerUp = 1.0f; if (g_pjt->unk_0x2750 && FIsLoInWorld((JT *)g_pjt->unk_0x2750)) { func_001D32D8(g_pjt->unk_0x2750, g_pjt, 1); } func_001D31D0(g_pjt, 0); if (g_pjt && g_pjt == PpoCur()) { g_fsp = fsp; } } // If fsp is unchanged or invalid, return. if (fsp == g_pgsCur->fspLast || fsp >= (uint)FSP_Max) { return; } // Show note. SetBlotDtVisible((NOTE *)&g_note.unk278, (g_pjt && g_pjt == PpoCur()) ? 3.0f : 8.0f); SetBlotFontScale(0.6f, (NOTE *)&g_note.unk278); ((NOTE *)&g_note.unk278)->pvtnote->pfnSetNoteAchzDraw((NOTE *)&g_note.unk278, s_mpfspachz[fsp]); ((NOTE *)&g_note.unk278)->pvtnote->pfnShowBlot((NOTE *)&g_note.unk278); // Update last fsp in game state. g_pgsCur->fspLast = fsp; } INCLUDE_ASM("asm/nonmatchings/P2/steppower", UpdateJtActivePowerUp__FP2JTP3JOY); // #ifdef SKIP_ASM /** * @todo 46.12% match. */ /* void UpdateJtActivePowerUp(JT *pjt, JOY *pjoy) { if (g_fsp > FSP_Nil) { // Some powerup is active, so get the grfvault. GRFVAULT grfvault = GetGrfvault_unknown(); if (s_mpfspgrfvault[(uint)g_fsp] & (uint)grfvault == 0) { // Disable powerup if grfvault didn't match a valid powerup. SetFsp(FSP_Nil); g_pgsCur->fspLast = FSP_Nil; } } // Check whether jt is in a state where rotating powerups is allowed. bool fcanRotate; uint jtsval; switch (g_fsp) { case FSP_Dive: // Only rotate if JT is rushing or ledge grabbing. if (g_pjt == NULL || g_pjt->jts != JTS_Rush || !g_pjt->jts == JTS_Jump && g_pjt->jtbs == (JTBS)0x8) { fcanRotate = true; } else { fcanRotate = false; } break; case FSP_Ball: // Only rotate if JT is not rolling. if (g_pjt != NULL && !(g_pjt->jts == JTS_Ball && g_pjt->jtbs == (JTBS)0xd)) { fcanRotate = true; } else { fcanRotate = false; } break; case FSP_SlowDownClock: case FSP_SpeedUpClock: // Only rotate when clock rate is close enough to 1.0. fcanRotate = FFloatsNear(g_rtClockPowerUp, 1.0, 0.0001); break; case FSP_Mine: // Only rotate if Xor of current jts with 0x10 != 0. jtsval = g_pjt->jts ^ 0x10; fcanRotate = (uint)(jtsval != 0); break; case FSP_Decoy: // Only rotate if Xor of current jts with 0xe != 0. jtsval = g_pjt->jts ^ 0xE; fcanRotate = (uint)(jtsval != 0); break; case FSP_Stun: // Only rotate if ??? fcanRotate = 0; if (g_pjt->jts != (JTS)0xF) { fcanRotate = STRUCT_OFFSET(g_pjt, 0x275c, uint) == 0; } break; case FSP_Nil: // Always rotate is no powerup is selected. fcanRotate = 1; break; default: break; } // Disallow rotating if JT status is Zap or binoc is showing. if (g_pjt != NULL && g_pjt->jts == JTS_Zap) fcanRotate = false; if (g_binoc.blots != BLOTS_Hidden) fcanRotate = false; // Rotate the selected powerup flags if allowed to and L2/R2 pressed. if (fcanRotate && JOY_BUTTON_PRESSED(pjoy, PAD_L2|PAD_R2)) { FSP newFsp = (FSP)IRotatePowerUp(pjoy, (int)g_fsp, (int)FSP_Max, s_mpfspgrfvault); g_pgsCur->fspLast = FSP_Nil; SetFsp(newFsp); } // Powerup activation logic (how the sausage is actually made). switch (g_fsp) { case FSP_Ball: if (pjt->jts > JTS_Nil && pjt->jts < (JTS)3 && JOY_BUTTON_PRESSED(pjoy, PAD_TRIANGLE)) { SetJoyBtnHandled(pjoy, PAD_TRIANGLE); // Two different animations based on 0x690 offset(?). if (STRUCT_OFFSET(g_pjt, 0x690, float) = 0.0f) { SetJtJts(pjt, (JTS)13, (JTBS)0x36); } else { SetJtJts(pjt, (JTS)13, (JTBS)0x37); } } break; case FSP_SlowDownClock: if (g_grfusr & (FUSR_Menu|FUSR_HandsOff) == 0) { if (D_00270458 == 3) { // LAB_001d2ef0: STRUCT_OFFSET(pjt, 0x2744, float) = 0.0f; } else if (pjt->jts == (JTS)2) { if (JOY_BUTTON_PRESSED(pjoy, PAD_TRIANGLE)) { SetJoyBtnHandled(pjoy, PAD_TRIANGLE); // goto lab_001d2ee8; } } else if (pjoy->grfbtn & 0x10 == 0) { STRUCT_OFFSET(pjt, 0x2744, int) = 0; } else { GRFVAULT grfvault = GetGrfvault_unknown(); if ((grfvault & 0x1000) == 0) { // goto LAB_001d2ef0; // LAB_001d2ee8: STRUCT_OFFSET(pjt, 0x2744, int) = 1; } } } else { STRUCT_OFFSET(pjt, 0x2744, int) = 0; } if (STRUCT_OFFSET(pjt, 0x2744, int) == 0) { g_rtClockPowerUp = 1.0f; } else { g_rtClockPowerUp = RT_JtSlowDownClock; } break; case FSP_Mine: if (pjt->jts < (JTS)2 && JOY_BUTTON_PRESSED(pjoy, PAD_TRIANGLE) && STRUCT_OFFSET(pjt, 0x1518, LO *) != NULL) { SetJoyBtnHandled(pjoy, PAD_TRIANGLE); LO *ploMine = STRUCT_OFFSET(pjt, 0x1518, LO *); if (FIsLoInWorld(ploMine)) { // Compute vector from JT pos to mine VECTOR posMine = ploMine->pos; VECTOR posJt = pjt->pos; VECTOR3 dir = RadNormalize(posMine - posJt); float angle = atan2f(dir.y, dir.x); STRUCT_OFFSET(pjt, 0x01010, float) = angle; // FUN_001c5d58(pjt) // Spawns the mine? SetJtJts(pjt, (JTS)0x10, (JTBS)0x3a); } else { SetJtJts(pjt, (JTS)0x10, (JTBS)0x39); } } break; case FSP_SpeedUpClock: if (D_00270458 == 3) { STRUCT_OFFSET(pjt, 0x2748, float) = 0.0f; } else if (pjoy->grfbtn & 0x10 == 0) { STRUCT_OFFSET(pjt, 0x2748, float) = GSmooth(STRUCT_OFFSET(pjt, 0x2748, float), 0.0f, g_clock.dtReal, &SMP_00274f78, 0); } break; case FSP_Decoy: if (pjt->jts < (JTS)2 && JOY_BUTTON_PRESSED(pjoy, PAD_TRIANGLE) && STRUCT_OFFSET(pjt, 0x2750, float) != 0.0f) { SetJoyBtnHandled(pjoy, PAD_TRIANGLE); SetJtJts(pjt, (JTS)0xE, JTBS_Nil); } break; case FSP_Stun: int stunVar; if (pjt->jts < (JTS)2) { if (JOY_BUTTON_PRESSED(pjoy, PAD_TRIANGLE)) { SetJoyBtnHandled(pjoy, PAD_TRIANGLE); SetJtJts(pjt, (JTS)0xf, JTBS_Nil); } stunVar = STRUCT_OFFSET(pjt, 0x275c, int); } else { stunVar = STRUCT_OFFSET(pjt, 0x275c, int); } if (stunVar && (3.0 < g_clock.t - STRUCT_OFFSET(pjt, 0x2758, float))) { // FUN_002d31d0(pjt, 0); } break; default: break; } } */ // #endif int IRotatePowerUp(JOY *pjoy, int iCur, int iMax, int *mpigrfvault) { // If L2 or R2 not pressed, powerup is unchanged. if ((pjoy->grfbtnPressed & (PAD_L2 | PAD_R2)) == _NOT_PRESSED) { return iCur; } // Default to next powerup (assume R2 pressed). int direction = 1; if ((pjoy->grfbtnPressed & PAD_L2) != _NOT_PRESSED) { // L2 pressed, previous powerup. direction = -1; } SetJoyBtnHandled(pjoy, (ushort)(PAD_L2 | PAD_R2)); uint grfValue; int iNew = iCur; int attemptsLeft = iMax; do { attemptsLeft--; iNew += direction; if (attemptsLeft < 0) { return iCur; } if (iNew < 0) { iNew = iMax - 1; } else if (iMax <= iNew) { iNew = 0; } grfValue = GetGrfvault_unknown(); } while ((grfValue & mpigrfvault[iNew]) == 0); // Return the new powerup index. return iNew; } ================================================ FILE: src/P2/steprail.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/steprail", func_001D31D0__FP2LOi); INCLUDE_ASM("asm/nonmatchings/P2/steprail", post_load_steprail); INCLUDE_ASM("asm/nonmatchings/P2/steprail", func_001D32D8__FiP2JTl); INCLUDE_ASM("asm/nonmatchings/P2/steprail", update_steprail); INCLUDE_ASM("asm/nonmatchings/P2/steprail", preset_steprail_accel); INCLUDE_ASM("asm/nonmatchings/P2/steprail", FUN_001d34e0); INCLUDE_ASM("asm/nonmatchings/P2/steprail", FUN_001d3500); INCLUDE_ASM("asm/nonmatchings/P2/steprail", FUN_001d35a8); INCLUDE_ASM("asm/nonmatchings/P2/steprail", update_steprail_message); ================================================ FILE: src/P2/steprun.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/steprun", PostStepLoadRun__FP4STEPP5BLRUNPP6ASEGBL); INCLUDE_ASM("asm/nonmatchings/P2/steprun", CalculateBlrunV__FiP5BLRUNP4MRSGP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/steprun", ProjectStepRunPlant__FP4STEPP5BLRUNffiiP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/steprun", FIntersectStepRunPlant__FP4STEPP6VECTORT1Pf); INCLUDE_ASM("asm/nonmatchings/P2/steprun", FReblendAbl2D__FiiiP2BLe); INCLUDE_ASM("asm/nonmatchings/P2/steprun", AdjustStepRun__FP4STEPP5BLRUNP6ASEGBLP5ASEGA); INCLUDE_ASM("asm/nonmatchings/P2/steprun", SetStepRunTarget__FP4STEPffP5BLRUNP6ASEGBL); ================================================ FILE: src/P2/stepside.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/stepside", PostJtLoadSidestep__FP2JTP4BLSSPP6ASEGBL); INCLUDE_ASM("asm/nonmatchings/P2/stepside", AdjustJtSidestep__FP2JTP4BLSSP6ASEGBL); INCLUDE_ASM("asm/nonmatchings/P2/stepside", SetJtSidestepTarget__FP2JTP4BLSSP6ASEGBLff); ================================================ FILE: src/P2/stream.c ================================================ #include OSTRM::OSTRM(int fd) { m_fd = fd; m_abDest = 0; m_cbDest = 0; m_ibCur = 0; m_cbWritten = 0; m_cbBuffered = 0; } OSTRM::OSTRM(void *abDest, int cbDest) { m_abDest = (uchar *)abDest; m_cbDest = cbDest; m_fd = -1; m_ibCur = 0; m_cbWritten = 0; m_cbBuffered = 0; } OSTRM::~OSTRM() { Flush(); } INCLUDE_ASM("asm/nonmatchings/P2/stream", CbWrite__5OSTRMPvi); INCLUDE_ASM("asm/nonmatchings/P2/stream", Flush__5OSTRM); ================================================ FILE: src/P2/suv.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/suv", InitSuv__FP3SUV); INCLUDE_ASM("asm/nonmatchings/P2/suv", PostSuvLoad__FP3SUV); INCLUDE_ASM("asm/nonmatchings/P2/suv", PresetSuvAccel__FP3SUVf); INCLUDE_ASM("asm/nonmatchings/P2/suv", GExcludeAlm__FiP2LMf); INCLUDE_ASM("asm/nonmatchings/P2/suv", UpdateSuvBalance__FP3SUV); INCLUDE_ASM("asm/nonmatchings/P2/suv", DsGetTrackRelative__Ffff); INCLUDE_ASM("asm/nonmatchings/P2/suv", FIsSuvAheadOf__FP3SUVT0); INCLUDE_ASM("asm/nonmatchings/P2/suv", UpdateSuvLine__FP3SUVPi); INCLUDE_ASM("asm/nonmatchings/P2/suv", UpdateSuvHeading__FP3SUV); INCLUDE_ASM("asm/nonmatchings/P2/suv", UpdateSuvWheels__FP3SUV); INCLUDE_ASM("asm/nonmatchings/P2/suv", UpdateSuvExpls__FP3SUV); INCLUDE_ASM("asm/nonmatchings/P2/suv", BoostSuv__FP3SUV); INCLUDE_ASM("asm/nonmatchings/P2/suv", FUN_001d9338); INCLUDE_ASM("asm/nonmatchings/P2/suv", UpdateSuvVolumes__FP3SUVi); INCLUDE_ASM("asm/nonmatchings/P2/suv", UpdateSuvSounds__FP3SUVf); INCLUDE_ASM("asm/nonmatchings/P2/suv", UpdateSuvPuncher__FP3SUV); INCLUDE_ASM("asm/nonmatchings/P2/suv", UpdateSuv__FP3SUVf); INCLUDE_ASM("asm/nonmatchings/P2/suv", UpdateSuvActive__FP3SUVP3JOYf); INCLUDE_ASM("asm/nonmatchings/P2/suv", FUN_001da170); INCLUDE_ASM("asm/nonmatchings/P2/suv", UpdateSuvInternalXps__FP3SUV); INCLUDE_ASM("asm/nonmatchings/P2/suv", AddSuvCustomXps__FP3SUVP2SOiP3BSPT3PP2XP); INCLUDE_ASM("asm/nonmatchings/P2/suv", AdjustSuvNewXp__FP3SUVP2XPi); INCLUDE_ASM("asm/nonmatchings/P2/suv", UpdateSuvInfluences__FP3SUVP2RO); INCLUDE_ASM("asm/nonmatchings/P2/suv", RenderSuvSelf__FP3SUVP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/suv", UpdateSuvBounds__FP3SUV); INCLUDE_ASM("asm/nonmatchings/P2/suv", CollectSuvPrize__FP3SUV3PCKP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/suv", UpdateSuvShapes__FP3SUV); INCLUDE_ASM("asm/nonmatchings/P2/suv", UpdateSuvXfWorld__FP3SUV); INCLUDE_ASM("asm/nonmatchings/P2/suv", GetSuvCpdefi__FP3SUVfP6CPDEFI); INCLUDE_ASM("asm/nonmatchings/P2/suv", OnSuvActive__FP3SUViP2PO); INCLUDE_ASM("asm/nonmatchings/P2/suv", HandleSuvMessage__FP3SUV5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/suv", SetSuvTrack__FP3SUVP5SHAPE); INCLUDE_ASM("asm/nonmatchings/P2/suv", SetSuvLine__FP3SUVP5SHAPE); INCLUDE_ASM("asm/nonmatchings/P2/suv", AddSuvCheckPoint__FP3SUVP3VOL); INCLUDE_ASM("asm/nonmatchings/P2/suv", AddSuvFeature__FP3SUVP3VOLffP4EXPLT4); INCLUDE_ASM("asm/nonmatchings/P2/suv", SetSuvSuvs__FP3SUV4SUVS); INCLUDE_ASM("asm/nonmatchings/P2/suv", ResetSuv__FP3SUV); JUNK_ADDIU(10); JUNK_WORD(0x7C450000); JUNK_WORD(0x48220800); INCLUDE_ASM("asm/nonmatchings/P2/suv", VecCombo__FG8VU_FLOATG9VU_VECTORT0T1); ================================================ FILE: src/P2/sw.c ================================================ #include #include #include #include #include #include #include <989snd.h> #include extern SW *g_psw; extern int g_fLoadDebugInfo; extern byte *g_pbBulkData; extern int g_fLoadBulkData; extern int g_cbBulkData; extern int g_nBulkDataSig; extern int g_cbBulkDataReadAdjustment; void InitSwDlHash(SW *psw) { DL *pdl = psw->adlHash; for (uint i = 0; i < 512; i++) { InitDl(pdl, sizeof(DL)); pdl++; } } INCLUDE_ASM("asm/nonmatchings/P2/sw", InitSw__FP2SW); INCLUDE_ASM("asm/nonmatchings/P2/sw", DeleteSw__FP2SW); INCLUDE_ASM("asm/nonmatchings/P2/sw", SetupBulkDataFromBrx__FiP18CBinaryInputStream); void LoadBulkDataFromBrx(CBinaryInputStream *pbis) { if (g_fLoadBulkData) { g_cbBulkDataReadAdjustment = pbis->m_cbRemaining; pbis->Align(16); pbis->Read(g_cbBulkData, g_pbBulkData); } } INCLUDE_ASM("asm/nonmatchings/P2/sw", SetSwGravity__FP2SWf); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001dbac0); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001dbae0); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001dbb00); INCLUDE_ASM("asm/nonmatchings/P2/sw", FOverflowSwLo__FP2SWP2LOi); XA *PxaAllocSw(SW *psw) { XA *pxa = (XA *)PvAllocSlotheapImpl(&psw->slotheapXa); memset(pxa, 0, sizeof(XA)); return pxa; } void FreeSwXaList(SW *psw, XA *pxaFirst) { while (pxaFirst) { XA *pxa = pxaFirst->pxaNextTarget; FreeSlotheapPv(&psw->slotheapXa, pxaFirst); pxaFirst = pxa; } } MQ *PmqAllocSw(SW *psw) { MQ *pmq = (MQ *)PvAllocSlotheapImpl(&psw->slotheapMq); memset(pmq, 0, sizeof(MQ)); return pmq; } void FreeSwMqList(SW *psw, MQ *pmqFirst) { while (pmqFirst) { MQ *pmq = pmqFirst->pmqNext; FreeSlotheapPv(&psw->slotheapMq, pmqFirst); pmqFirst = pmq; } } void EnsureSwCallback(SW *psw, PFNMQ pfnmq, void *pvContext, MSGID msgid, void *pvCallbackData) { MQ *pmq = psw->pmqCallbackFirst; while (pmq) { if (pmq->pfnmq == pfnmq && pmq->pvContext == pvContext && pmq->msgid == msgid && pmq->pvCallbackData == pvCallbackData) { return; } pmq = pmq->pmqNext; } PostSwCallback(psw, pfnmq, pvContext, msgid, pvCallbackData); } void PostSwCallback(SW *psw, PFNMQ pfnmq, void *pvContext, MSGID msgid, void *pvCallbackData) { MQ *pmq = PmqAllocSw(psw); pmq->pfnmq = pfnmq; pmq->pvContext = pvContext; pmq->msgid = msgid; pmq->pvCallbackData = pvCallbackData; if (psw->pmqCallbackLast) { psw->pmqCallbackLast->pmqNext = pmq; } else { psw->pmqCallbackFirst = pmq; } psw->pmqCallbackLast = pmq; } INCLUDE_ASM("asm/nonmatchings/P2/sw", ClearSwCallbacks__FP2SWiPFPv5MSGIDPv_vPv5MSGIDT3); INCLUDE_ASM("asm/nonmatchings/P2/sw", ProcessSwCallbacks__FP2SW); INCLUDE_ASM("asm/nonmatchings/P2/sw", ProcessSwSpliceScheduledCallbacks__FP2SWf); STSO *PstsoAllocSw(SW *psw) { STSO *pstso = (STSO *)PvAllocSlotheapImpl(&psw->slotheapStso); memset(pstso, 0, sizeof(STSO)); return pstso; } void FreeSwStsoList(SW *psw, STSO *pstsoFirst) { while (pstsoFirst) { STSO *pstso = pstsoFirst->pstsoNext; FreeSlotheapPv(&psw->slotheapStso, pstsoFirst); pstsoFirst = pstso; } } INCLUDE_ASM("asm/nonmatchings/P2/sw", AddSwProxySource__FP2SWP2LOi); INCLUDE_ASM("asm/nonmatchings/P2/sw", PloGetSwProxySource__FP2SWi); INCLUDE_ASM("asm/nonmatchings/P2/sw", IntersectSwBoundingBox__FP2SWP2SOP6VECTORT2PFPvP2SO_iPvPiPPP2SO); INCLUDE_ASM("asm/nonmatchings/P2/sw", IntersectSwBoundingSphere__FP2SWP2SOP6VECTORfPFPvP2SO_iPvPiPPP2SO); INCLUDE_ASM("asm/nonmatchings/P2/sw", RemoveOxa__FP3OXAPP3OXA); INCLUDE_ASM("asm/nonmatchings/P2/sw", InitSwAoxa__FP2SW); INCLUDE_ASM("asm/nonmatchings/P2/sw", AddOxa__FP3OXAPP3OXA); INCLUDE_ASM("asm/nonmatchings/P2/sw", PoxaAllocSw__FP2SWP2SO); INCLUDE_ASM("asm/nonmatchings/P2/sw", FreeSwPoxa__FP2SWP3OXA); INCLUDE_ASM("asm/nonmatchings/P2/sw", CreateSwDefaultLights__FP2SW); /** * @todo Rename. */ void FUN_001dccc0(CBinaryInputStream *pbis) { int count = pbis->U32Read(); if (g_fLoadDebugInfo == 0) return; for (int i = 1; i < count; i++) { pbis->Unknown1(); } } INCLUDE_ASM("asm/nonmatchings/P2/sw", CreateSwPrizes__FP2SW); INCLUDE_ASM("asm/nonmatchings/P2/sw", LoadSwFromBrx__FP2SWP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/sw", FClipLineHomogeneous__FP7VECTOR4); INCLUDE_ASM("asm/nonmatchings/P2/sw", DrawLineWorld__FP6VECTORT0G4RGBAP2CMi); INCLUDE_ASM("asm/nonmatchings/P2/sw", DrawAxesWorld__FP6VECTORP7MATRIX3fP2CMi); void SetSwIllum(SW *psw, float uMidtone) { psw->lsmDefault.uMidtone = uMidtone; g_cframeStaticLightsInvalid = g_cframe; } void SetSwIllumShadow(SW *psw, float uShadow) { psw->lsmDefault.uShadow = uShadow; g_cframeStaticLightsInvalid = g_cframe; } void SetSwExcitement(SW *psw, float gexcMenu) { psw->gexcMenu = gexcMenu; g_iexcHyst = -100; SetMvgkRvol(7, MVGK_Music, 1.0f); snd_SetGlobalExcite((int)(psw->gexcMenu + 0.5f)); } int FLevelSwVisited(SW *psw, WID wid) { return GrflsFromWid(wid) & 1; } int FLevelSwPrimary(SW *psw, WID wid) { return GrflsFromWid(wid) & 2; } int FLevelSwSecondary(SW *psw, WID wid) { return GrflsFromWid(wid) & 4; } int FLevelSwTertiary(SW *psw, WID wid) { return GrflsFromWid(wid) & 8; } INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001dd710); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001dd758); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001dd7a0); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001dd7e8); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001dd888); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001dd8e8); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001dd908); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001dd928); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001dd950); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001dd9a0); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001dd9c0); void SetSwPlayerSuck(SW *psw, float uSuck) { g_plsCur->unk_suck_0x10 = GLimitLm(&g_lmZeroOne, uSuck); } void GetSwPlayerSuck(SW *psw, float *puSuck) { // TODO: This should be "uSuck"? *puSuck = g_plsCur->unk_suck_0x10; } void IncrementSwHandsOff(SW *psw) { if (++psw->cHandsOff == 1) { AddGrfusr(2); } } void DecrementSwHandsOff(SW *psw) { if (psw->cHandsOff-- == 1) { RemoveGrfusr(2); } } int IsSwHandsOff(SW *psw) { return psw->cHandsOff > 0; } void IsSwVagPlaying(SW *psw, int *pfPlaying) { *pfPlaying = FVagPlaying(); } void SetSwDarken(SW *psw, float rDarken) { psw->rDarkenSmooth = rDarken; psw->rDarken = rDarken; } void SetSwDarkenSmooth(SW *psw, float rDarkenSmooth) { psw->rDarkenSmooth = rDarkenSmooth; } void CancelSwDialogPlaying(SW *psw) { if (g_pdialogPlaying && STRUCT_OFFSET(g_pdialogPlaying, 0x2d4, DIALOGS) != 4 && (STRUCT_OFFSET(g_pdialogPlaying, 0x2d0, DIALOGK) - 1u) < 2) { PopUiActiveBlot(&g_ui); } } INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001ddb20); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001ddb58); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001ddbb8); JUNK_WORD(0x0002102a); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001ddbf8); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001ddc18); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001ddc38); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001ddc40); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001ddc78); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001ddc90); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001ddcb0); INCLUDE_ASM("asm/nonmatchings/P2/sw", FUN_001ddcc8); ================================================ FILE: src/P2/tail.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/tail", InitTail__FP4TAIL); INCLUDE_ASM("asm/nonmatchings/P2/tail", PostTailLoad__FP4TAIL); INCLUDE_ASM("asm/nonmatchings/P2/tail", UpdateTailConstraints__FP4TAIL); INCLUDE_ASM("asm/nonmatchings/P2/tail", MatchTailOtherObject__FP4TAILP3ALO); ================================================ FILE: src/P2/tank.c ================================================ #include #include INCLUDE_ASM("asm/nonmatchings/P2/tank", InitTank__FP4TANK); INCLUDE_ASM("asm/nonmatchings/P2/tank", PostTankLoad__FP4TANK); INCLUDE_ASM("asm/nonmatchings/P2/tank", UpdateTank__FP4TANKf); INCLUDE_ASM("asm/nonmatchings/P2/tank", FUN_001deb30); void UseTankCharm(TANK *ptank) { UsePoCharm(ptank); SetTankTanks(ptank, TANKS_Active); } INCLUDE_ASM("asm/nonmatchings/P2/tank", UpdateTankActive__FP4TANKP3JOYf); void OnTankActive(TANK *ptank, int fActive, PO *ppoOther) { OnPoActive(ptank, fActive, ppoOther); if (!fActive) { STRUCT_OFFSET(ptank, 0x728, int) = 0; // ptank->fFlash } } INCLUDE_ASM("asm/nonmatchings/P2/tank", RenderTankAll__FP4TANKP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/tank", ImpactTank__FP4TANKi); INCLUDE_ASM("asm/nonmatchings/P2/tank", FInvulnerableTank__FP4TANK3ZPK); INCLUDE_ASM("asm/nonmatchings/P2/tank", ApplyTankThrow__FP4TANKP2PO); INCLUDE_ASM("asm/nonmatchings/P2/tank", FTakeTankDamage__FP4TANKP3ZPR); INCLUDE_ASM("asm/nonmatchings/P2/tank", FUN_001dfa10); INCLUDE_ASM("asm/nonmatchings/P2/tank", AdjustTankNewXp__FP4TANKP2XPi); INCLUDE_ASM("asm/nonmatchings/P2/tank", HandleTankMessage__FP4TANK5MSGIDPv); JTHS JthsCurrentTank(TANK *ptank) { return (JTHS)(STRUCT_OFFSET(ptank, 0x728, int) != 0); // ptank->fFlash } INCLUDE_ASM("asm/nonmatchings/P2/tank", SetTankTanks__FP4TANK5TANKS); ================================================ FILE: src/P2/target.c ================================================ #include extern DL g_dlTarget; void StartupTarget() { InitDl(&g_dlTarget, 0x80); } void ResetTargetList() { ClearDl(&g_dlTarget); } void InitTarget(TARGET *ptarget) { InitXfm(ptarget); STRUCT_OFFSET(ptarget, 0x88, int) = 0x1e; // ptarget->grftak STRUCT_OFFSET(ptarget, 0x8c, float) = 25.0f; // ptarget->sRadiusTarget } void OnTargetAdd(TARGET *ptarget) { OnLoAdd(ptarget); AppendDlEntry(&g_dlTarget, ptarget); } void OnTargetRemove(TARGET *ptarget) { OnLoRemove(ptarget); RemoveDlEntry(&g_dlTarget, ptarget); } void CloneTarget(TARGET *ptarget, TARGET *ptargetBase) { DLE dleTarget = STRUCT_OFFSET(ptarget, 0x80, DLE); // ptarget->dleTarget CloneLo(ptarget, ptargetBase); STRUCT_OFFSET(ptarget, 0x80, DLE) = dleTarget; // ptarget->dleTarget } ================================================ FILE: src/P2/text.c ================================================ #include #include #include INCLUDE_ASM("asm/nonmatchings/P2/text", CchParsePchzInt__FPcPi); INCLUDE_ASM("asm/nonmatchings/P2/text", CchParsePchzTft__FPcP3TFTPPc); INCLUDE_ASM("asm/nonmatchings/P2/text", WriteTftPchz__FP3TFTP5OSTRMPc); INCLUDE_ASM("asm/nonmatchings/P2/text", FNegTftUl__FP3TFTP2UL); INCLUDE_ASM("asm/nonmatchings/P2/text", UnRadixFromChConversion__Fc); INCLUDE_ASM("asm/nonmatchings/P2/text", CchAchFromUl__FPciUlUi); INCLUDE_ASM("asm/nonmatchings/P2/text", WriteTftUl__FP3TFTP5OSTRMUl); INCLUDE_ASM("asm/nonmatchings/P2/text", ExpFirstFromG__Fd); INCLUDE_ASM("asm/nonmatchings/P2/text", ChDigitFromG__Fdii); INCLUDE_ASM("asm/nonmatchings/P2/text", CchAchFromDouble__FPciP3TFTd); INCLUDE_ASM("asm/nonmatchings/P2/text", WriteTftDouble__FP3TFTP5OSTRMd); INCLUDE_ASM("asm/nonmatchings/P2/text", WriteTft__FP3TFTP5OSTRMPPcPci); INCLUDE_ASM("asm/nonmatchings/P2/text", CchOstrmPrintf__FP5OSTRMPcT1); INCLUDE_ASM("asm/nonmatchings/P2/text", vprintf); extern "C" int printf(char *pchzFormat, ...) { va_list arg; va_start(arg, pchzFormat); int ret = vprintf(pchzFormat, arg); va_end(arg); return ret; } INCLUDE_ASM("asm/nonmatchings/P2/text", vsprintf); extern "C" int sprintf(char *pchzDest, char *pchzFormat, ...) { va_list arg; va_start(arg, pchzFormat); int ret = vsprintf(pchzDest, pchzFormat, arg); va_end(arg); return ret; } INCLUDE_ASM("asm/nonmatchings/P2/text", _vsnprintf); JUNK_ADDIU(10); int _snprintf(char *pchzDest, int cchDest, char *pchzFormat, ...) { va_list arg; va_start(arg, pchzFormat); int ret = _vsnprintf(pchzDest, cchDest, pchzFormat, arg); va_end(arg); return ret; } JUNK_WORD(0x27BD0450); extern "C" uint strlen(const char *pchz) { uint len = 0; while (*pchz != '\0') { pchz++; len++; } return len; } extern "C" char *strcpy(char *pchzDst, const char *pchzSrc) { CopyAb(pchzDst, (char *)pchzSrc, strlen(pchzSrc) + 1); return pchzDst; } extern "C" char *strcpy1(char *pchzDst, char *pchzSrc) { uint dstLength = strlen(pchzDst); uint srcLength = strlen(pchzSrc); CopyAb(pchzDst + dstLength, pchzSrc, srcLength + 1); return pchzDst; } extern "C" char *strchr(char *pchz, int ch) { while (*pchz != '\0') { if (*pchz == ch) { return pchz; } pchz++; } return NULL; } JUNK_NOP(); JUNK_ADDIU(30); INCLUDE_ASM("asm/nonmatchings/P2/text", UpperizePchz__FPc); ================================================ FILE: src/P2/thread.c ================================================ #include #include #include #include int SemaCreate(int initCount, int maxCount) { SemaParam sp; memset(&sp, 0, sizeof(SemaParam)); sp.initCount = initCount; sp.maxCount = maxCount; return CreateSema(&sp); } JUNK_NOP(); JUNK_ADDIU(50); void InitCritSect(CRITSECT *pcritsect) { pcritsect->thread = -1; pcritsect->sema = SemaCreate(1, 1); } void EnterCritSect(CRITSECT *pcritsect) { int threadId = GetThreadId(); if (threadId != pcritsect->thread) { WaitSema(pcritsect->sema); pcritsect->thread = threadId; pcritsect->cEnter = 1; } else { pcritsect->cEnter++; } } void LeaveCritSect(CRITSECT *pcritsect) { int critSects = pcritsect->cEnter - 1; pcritsect->cEnter = critSects; if (critSects == 0) { pcritsect->thread = -1; SignalSema(pcritsect->sema); } } JUNK_ADDIU(30); void StartupThread() { ThreadParam tp; g_athread.cEnter = GetThreadId(); ChangeThreadPriority(g_athread.cEnter, 4); memset(&tp, 0, sizeof(ThreadParam)); tp.stackSize = 0x20000; tp.stack = g_abRenderLoopStack; tp.initPriority = 2; tp.gpReg = &_gpReg; tp.entry = FrameRenderLoop; g_athread.thread = CreateThread(&tp); } ================================================ FILE: src/P2/tn.c ================================================ #include #include #include INCLUDE_ASM("asm/nonmatchings/P2/tn", PtnfnFromTn__FP2TN); INCLUDE_ASM("asm/nonmatchings/P2/tn", GetTnfnNose__FP4TNFNP6CPDEFIP6VECTORP2TN); INCLUDE_ASM("asm/nonmatchings/P2/tn", InitTn__FP2TN); void OnTnRemove(TN *ptn) { OnAloRemove(ptn); SetTnTns(ptn, TNS_Out); ClearSwCallbacks(ptn->psw, 2, NULL, ptn, MSGID_Nil, NULL); } INCLUDE_ASM("asm/nonmatchings/P2/tn", LoadTnFromBrx__FP2TNP18CBinaryInputStream); void PostTnLoad(TN *ptn) { PostAloLoad(ptn); } INCLUDE_ASM("asm/nonmatchings/P2/tn", SetTnTns__FP2TN3TNS); /** * @todo Rename. */ void FUN_001e2840(TN *ptn, TNS tns) { // NOTE: Doesn't match if this is the other way around. if (tns == STRUCT_OFFSET(ptn, 0x398, TNS)) { return; } STRUCT_OFFSET(ptn, 0x398, TNS) = tns; UpdateTnCallback(ptn, MSGID_callback, NULL); } INCLUDE_ASM("asm/nonmatchings/P2/tn", UpdateTnCallback__FP2TN5MSGIDPv); void UpdateTn(TN *ptn, float dt) { UpdateAlo(ptn, dt); if (STRUCT_OFFSET(ptn, 0x398, TNS) != TNS_Out) // ptn->tns { PostSwCallback(ptn->psw, UpdateTnCallback, ptn, MSGID_callback, NULL); } } void RenderTnSelf(TN *ptn, CM *pcm, RO *pro) { RenderAloSelf(ptn, pcm, pro); } void FreezeTn(TN *ptn, int fFreeze) { FreezeAlo(ptn, fFreeze); if (fFreeze) { SetTnTns(ptn, TNS_Out); } } INCLUDE_ASM("asm/nonmatchings/P2/tn", FUN_001e29e8); INCLUDE_ASM("asm/nonmatchings/P2/tn", CalculateTnCrv__FP2TNP6VECTORN21); INCLUDE_ASM("asm/nonmatchings/P2/tn", CalculateTnPos__FP2TNP6VECTORffP3CLQP2LM4FTNDT1); INCLUDE_ASM("asm/nonmatchings/P2/tn", ActivateCptn__FP4CPTNPv); INCLUDE_ASM("asm/nonmatchings/P2/tn", DeactivateCptn__FP4CPTNPv); void SetCptn(CPTN *pcptn, void *pv) { return; } void RevokeCptn(CPTN *pcptn, void *pv) { return; } INCLUDE_ASM("asm/nonmatchings/P2/tn", FUN_001e30e8); INCLUDE_ASM("asm/nonmatchings/P2/tn", UpdateCptn__FP4CPTNP6CPDEFIP3JOYf); INCLUDE_ASM("asm/nonmatchings/P2/tn", FUN_001e4578); INCLUDE_ASM("asm/nonmatchings/P2/tn", FUN_001e4880); INCLUDE_ASM("asm/nonmatchings/P2/tn", FUN_001e4888); INCLUDE_ASM("asm/nonmatchings/P2/tn", LoadTbspFromBrx__FP18CBinaryInputStreamPiPP5TSURFT1PP4TBSP); INCLUDE_ASM("asm/nonmatchings/P2/tn", FCheckTbspPoint__FP4TBSPP6VECTOR); ================================================ FILE: src/P2/transition.c ================================================ #include #include #include #include #include #include #include #include CTransition::CTransition() { m_pchzWorld = NULL; grftrans = FTRANS_None; m_oidWarp = OID_Nil; m_oidWarpContext = OID_Nil; memset(m_achzWorldCur, 0, 0x20); } void CTransition::Set(char *pchzWorld, OID oidWarp, OID oidWarpContext, GRFTRANS grftrans) { if (m_fPending == false) { this->m_fPending = true; this->m_pchzWorld = pchzWorld; this->m_oidWarp = oidWarp; this->m_oidWarpContext = oidWarpContext; this->grftrans = grftrans; } } INCLUDE_ASM("asm/nonmatchings/P2/transition", Execute__11CTransition); #ifdef SKIP_ASM /** * @todo 15.60% matched. * * Some functions called in this function are not implemented yet. */ void CTransition::Execute() { CFileLocation fileLocation; LevelTableStruct levelInfo = {}; SetPhase(PHASE_Load); // func_0018d410(); if (levelInfo.fileLocation.m_fcl.cb != 0) { // fileLocation.Clear(); // Decrypting the sector offsets and file size uint cb = levelInfo.fileLocation.m_fcl.cb ^ levelInfo.level_name; uint isector = levelInfo.fileLocation.m_fcl.isector ^ levelInfo.for_size; fileLocation.m_fcl.cb = cb; fileLocation.m_fcl.isector = isector; // Set up progress bar (temp, this was copied from Startup) int nRemain = cb; int rgbaComplete = 0x007f0000; // blue int rgbaRemain = 0x003f3f3f; // gray int rgbaWarning = 0x00003f3f; // yellow int rgbaTrouble = 0x0000003f; // red CProg prog = CProg((RGBA *)&rgbaComplete, (RGBA *)&rgbaRemain, (RGBA *)&rgbaWarning, (RGBA *)&rgbaTrouble); if (cb == 0) { MvgkUnknown1(MVGK_Music); SetMvgkRvol(0, MVGK_Music, 1.0f); ClearPhase(PHASE_None); levelInfo.fileLocation.m_fcl.isector = 0; return; } DeleteSw(g_psw); g_psw = 0; // SetupBulkDataFromBrx() ResetClock(&g_clock, 0.0); AddGrfusr(0x80); // SetupGame(levelInfo.level_id); g_psw = (SW *)PloNew(CID_SW, 0, 0, OID__WORLD, -1); } } #endif // SKIP_ASM void ResetWorld(FTRANS ftrans) { SetMvgkUvol(0.0f); GRFTRANS grftrans; switch (ftrans) { case FTRANS_None: grftrans = FTRANS_None; break; case FTRANS_Checkpoint: ReturnChkmgrToCheckpoint(&g_chkmgr); return; case FTRANS_RetryWorld: grftrans = FTRANS_RetryWorld; break; case (FTRANS_Checkpoint | FTRANS_RetryWorld): // Transitions with the Sly Cooper logo wipe grftrans = 4; break; } g_transition.Set(g_transition.m_achzWorldCur, OID_Nil, OID_Nil, grftrans); } INCLUDE_ASM("asm/nonmatchings/P2/transition", transition__static_initialization_and_destruction_0); INCLUDE_ASM("asm/nonmatchings/P2/transition", _GLOBAL_$I$g_transition); ================================================ FILE: src/P2/turret.c ================================================ #include #include INCLUDE_ASM("asm/nonmatchings/P2/turret", InitTurret__FP6TURRET); INCLUDE_ASM("asm/nonmatchings/P2/turret", FUN_001e53f8); INCLUDE_ASM("asm/nonmatchings/P2/turret", PostTurretLoad__FP6TURRET); INCLUDE_ASM("asm/nonmatchings/P2/turret", UpdateTurret__FP6TURRETf); INCLUDE_ASM("asm/nonmatchings/P2/turret", UpdateTurretActive__FP6TURRETP3JOYf); INCLUDE_ASM("asm/nonmatchings/P2/turret", OnTurretActive__FP6TURRETiP2PO); INCLUDE_ASM("asm/nonmatchings/P2/turret", FFilterTurret__FP6TURRETP2SO); INCLUDE_ASM("asm/nonmatchings/P2/turret", UpdateTurretAim__FP6TURRET); INCLUDE_ASM("asm/nonmatchings/P2/turret", FireTurret__FP6TURRET); INCLUDE_ASM("asm/nonmatchings/P2/turret", HandleTurretMessage__FP6TURRET5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/turret", FIgnoreTurretIntersection__FP6TURRETP2SO); INCLUDE_ASM("asm/nonmatchings/P2/turret", CollectTurretPrize__FP6TURRET3PCKP3ALO); void GetTurretDiapi(TURRET *pturret, DIALOG *pdialog, DIAPI *pdiapi) { pdiapi->fCallable = 0; pdiapi->fPlayable = 0; } INCLUDE_ASM("asm/nonmatchings/P2/turret", FUN_001e5e60); ================================================ FILE: src/P2/tv.c ================================================ #include #include INCLUDE_ASM("asm/nonmatchings/P2/tv", InitTv__FP2TV5BLOTK); INCLUDE_ASM("asm/nonmatchings/P2/tv", PostTvLoad__FP2TV); void GetTvItvbMinMax(TV *ptv, int *pitvbDrawMin, int *pitvbDrawMax) { // ptv->uUnwind int max = (int)(STRUCT_OFFSET(ptv, 0xc70, float) * 57.0f); *pitvbDrawMin = (0x39 - max) / 2; *pitvbDrawMax = *pitvbDrawMin + max; } INCLUDE_ASM("asm/nonmatchings/P2/tv", DrawTvArea__FP2TVR4GIFSi); INCLUDE_ASM("asm/nonmatchings/P2/tv", DrawTvBands__FP2TVR4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/tv", DrawTvOutline__FP2TVR4GIFS); INCLUDE_ASM("asm/nonmatchings/P2/tv", DrawTv__FP2TV); void SetTvTvs(TV *ptv, TVS tvs) { // ptv->tvs if (tvs == STRUCT_OFFSET(ptv, 0x260, TVS)) { return; } STRUCT_OFFSET(ptv, 0x260, TVS) = tvs; // ptv->tvs STRUCT_OFFSET(ptv, 0x264, float) = g_clock.tReal; // ptv->tTvs } INCLUDE_ASM("asm/nonmatchings/P2/tv", AcceptTvSpeaker__FP2TV); INCLUDE_ASM("asm/nonmatchings/P2/tv", SetTvTvgs__FP2TV4TVGS); INCLUDE_ASM("asm/nonmatchings/P2/tv", SetTvBlots__FP2TV5BLOTS); INCLUDE_ASM("asm/nonmatchings/P2/tv", UpdateTv__FP2TV); INCLUDE_ASM("asm/nonmatchings/P2/tv", RenderTv__FP2TV); INCLUDE_ASM("asm/nonmatchings/P2/tv", PreTvContext__FP3RPL); INCLUDE_ASM("asm/nonmatchings/P2/tv", PostTvContext__FP3RPL); INCLUDE_ASM("asm/nonmatchings/P2/tv", SetTvSpeaker__FP2TVP7SPEAKER); INCLUDE_ASM("asm/nonmatchings/P2/tv", SetTvReplace__FP2TVP3ALO); INCLUDE_ASM("asm/nonmatchings/P2/tv", OnTvReset__FP2TV); INCLUDE_ASM("asm/nonmatchings/P2/tv", tv__static_initialization_and_destruction_0); INCLUDE_ASM("asm/nonmatchings/P2/tv", _GLOBAL_$I$RGBA_Distortion); ================================================ FILE: src/P2/ub.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/ub", InitUbg__FP3UBG); INCLUDE_ASM("asm/nonmatchings/P2/ub", PostUbgLoad__FP3UBG); INCLUDE_ASM("asm/nonmatchings/P2/ub", PsoPadUbgClosest__FP3UBGP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/ub", OnUbgEnteringSgs__FP3UBG3SGSP4ASEG); SGS SgsNextUbgAI(UBG *pubg) { if (STRUCT_OFFSET(pubg, 0xc5c, SGS) < 1) // pubg->cJump { STRUCT_OFFSET(pubg, 0xbfc, float) = 3.4028235e+38f; // pubg->tTaunt } SGS sgs = STRUCT_OFFSET(pubg, 0x724, SGS); // pubg->sgs if (sgs == SGS_Taunt) { if (!STRUCT_OFFSET(pubg, 0x7e0, ASEGA *)) // pubg->pasegaSgs { sgs = SGS_LostPlayer; } } else { sgs = SgsNextStepguardAI(pubg); } return sgs; } int FDetectUbg(UBG *pubg) { // pubg->fAbandonExternal if (STRUCT_OFFSET(pubg, 0xc40, int) != 0) return 0; // pubg->cJump return (STRUCT_OFFSET(pubg, 0xc5c, int)) != 0; } int FCanUbgAttack(UBG *pubg) { // pubg->oidPatrolGoal if(STRUCT_OFFSET(pubg, 0xc58, OID) != OID_state_ubb_round_3) return 0; // pubg->cJump if(STRUCT_OFFSET(pubg, 0xc5c, int) == 5 || STRUCT_OFFSET(pubg, 0xc5c, int) == 0) return 0; return 1; } void DoUbgFreefallJump(UBG *pubg) { // pubg->oidPatrolGoal if (STRUCT_OFFSET(pubg, 0xc58, OID) != OID_state_ubb_round_2) { // pubg->cJump int cJump = STRUCT_OFFSET(pubg, 0xc5c, int) - 1; if (cJump < 1) cJump = 0; STRUCT_OFFSET(pubg, 0xc5c, int) = cJump; } DoStepguardFreefallJump(pubg); } /** * @todo 100% match. Check if cleanup possible. */ void DoUbgFreefallLanding(UBG *pubg) { // pubg->oidPatrolGoal & pubg->sgs if (STRUCT_OFFSET(pubg, 0xc58, OID) == OID_state_ubb_round_2 && STRUCT_OFFSET(pubg, 0x724, SGS) == SGS_Pursue && PxpFindSoGround(pubg, NULL, NULL)) { SO *pso = PsoPadUbgClosest(pubg, &STRUCT_OFFSET(pubg, 0x140, VECTOR)); if (pso != STRUCT_OFFSET(pubg, 0xc7c, SO *)) // pubg->psoLastDunk { // pubg->cJump int cJump = STRUCT_OFFSET(pubg, 0xc5c, int) - 1; if (cJump < 1) cJump = 0; STRUCT_OFFSET(pubg, 0xc5c, int) = cJump; if (cJump > 0) { SMA *psma = PsmaFindAlo(pso, OID_Nil); if (psma) SetSmaGoal(psma, OID_state_ubb_dunk); STRUCT_OFFSET(pubg, 0xc7c, SO *) = pso; // pubg->psoLastDunk } } } DoStepguardFreefallLanding(pubg); } INCLUDE_ASM("asm/nonmatchings/P2/ub", UpdateUbgGoal__FP3UBGi); void UpdateUbgSgs(UBG *pubg) { // pubg->sgs if (STRUCT_OFFSET(pubg, 0x724, SGS) == SGS_LostPlayer) { LookStepguardAtGoal(pubg); return; } UpdateStepguardSgs(pubg); } INCLUDE_ASM("asm/nonmatchings/P2/ub", FUN_001e8fe8); int FIgnoreUbgIntersection(UBG *pubg, SO *psoOther) { for (uint i = 0; i < 6; i++) { // pubg->apsoPads SO **apsoPads = &STRUCT_OFFSET(pubg, 0xc64, SO *); if ((SO *)psoOther->paloRoot == apsoPads[i]) return 0; } return FIgnoreStepguardIntersection(pubg, psoOther); } ================================================ FILE: src/P2/ui.c ================================================ #include #include #include #include void StartupUi() { InitUi(&g_ui); } void InitUi(UI *pui) { pui->unk6 = -1; pui->tUis = -1; SetUiUis(pui, UIS_Pausing); pui->cpblotActive = 0; pui->unk5 = 1; } void PostUiLoad(UI *pui) { SetUiUis(pui, UIS_Pausing); } INCLUDE_ASM("asm/nonmatchings/P2/ui", UpdateUi__FP2UI); INCLUDE_ASM("asm/nonmatchings/P2/ui", PushUiActiveBlot__FP2UIP4BLOT); INCLUDE_ASM("asm/nonmatchings/P2/ui", PopUiActiveBlot__FP2UI); void DrawUi() { DrawBlots(); } void RenderUi() { RenderBlots(); } void ResetUi(UI *pui) { while (pui->unk5 >= 2) { PopUiActiveBlot(pui); } pui->unk5 = 1; pui->cpblotActive = 0; pui->unk6 = -1; SetRumbleRums(g_joy.prumble, RUMS_Stop); ResetBlots(); } INCLUDE_ASM("asm/nonmatchings/P2/ui", SetUiUis__FP2UI3UIS); void SetUiUPause(UI *pui, float uPause) { if (g_clock.t > 0.0f) { float vol = (1.0f - uPause) * 0.6f + uPause; SetMvgkRvol(4, MVGK_Music, vol); SetMvgkRvol(4, MVGK_Effects, vol); } SetClockRate(uPause); } INCLUDE_ASM("asm/nonmatchings/P2/ui", FUN_001e9970__Fv); INCLUDE_ASM("asm/nonmatchings/P2/ui", FUN_001e9a10__Fv); INCLUDE_ASM("asm/nonmatchings/P2/ui", FUN_001e9a68__Fv); INCLUDE_ASM("asm/nonmatchings/P2/ui", FUN_001e9ad8__Fv); INCLUDE_ASM("asm/nonmatchings/P2/ui", check_anticrack_collectibles_Fv); ================================================ FILE: src/P2/update.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/update", UpdateSwObjects__FP2SWf); INCLUDE_ASM("asm/nonmatchings/P2/update", UpdateSwPosWorldPrev__FP2SW); INCLUDE_ASM("asm/nonmatchings/P2/update", UpdateSwRealClock__FP2SWf); INCLUDE_ASM("asm/nonmatchings/P2/update", UpdateSwDarkening__FP2SWf); INCLUDE_ASM("asm/nonmatchings/P2/update", UpdateSw__FP2SWf); ================================================ FILE: src/P2/util.c ================================================ #include #include #include #include static const float PI = 3.14159265359f; const int PRIME_MOD = 0x95675; #ifdef SKIP_ASM LM g_lmZeroOne = {0.0f, 1.0f}; #endif float RadNormalize(float rad) { if (rad < -PI || PI < rad) { float modpos = GModPositive(rad + PI, 2 * PI); rad = modpos - PI; } return rad; } float GLimitAbs(float g, float absLimit) { if (g > absLimit) { g = absLimit; } else if (g < -absLimit) { g = -absLimit; } return g; } INCLUDE_ASM("asm/nonmatchings/P2/util", GSmooth__FfffP3SMPPf); INCLUDE_ASM("asm/nonmatchings/P2/util", GSmoothA__FffffP4SMPAPf); JUNK_ADDIU(40); float RadSmooth(float radCur, float radTarget, float dt, SMP *psmp, float *pdradNext) { float rad; rad = RadNormalize(radTarget - radCur); rad = GSmooth(0.0f, rad, dt, psmp, pdradNext); rad = RadNormalize(radCur + rad); return rad; } float RadSmoothA(float radCur, float dradCur, float radTarget, float dt, SMPA *psmpa, float *pdradNext) { float rad; rad = RadNormalize(radTarget - radCur); rad = GSmoothA(0.0f, dradCur, rad, dt, psmpa, pdradNext); rad = RadNormalize(radCur + rad); return rad; } INCLUDE_ASM("asm/nonmatchings/P2/util", PosSmooth); INCLUDE_ASM("asm/nonmatchings/P2/util", SmoothMatrix); // Generates a random integer in the range [nLow, nHi] int NRandInRange(int nLow, int nHi) { if (nLow == nHi) { return nLow; } int randVal = rand(); randVal %= PRIME_MOD; // Return a value within the range [nLow, nHi] int range = (nHi - nLow) + 1; return nLow + (randVal % range); } float GRandInRange(float gHi, float gLow) { if (gHi == gLow) { return gHi; } int nRand = rand(); return gHi + (gLow - gHi) * (float)nRand * 4.656613e-10f; } INCLUDE_ASM("asm/nonmatchings/P2/util", GRandGaussian__Ffff); #ifdef SKIP_ASM /** * @todo 64.35% matched. * log function needs to be defined. Does it use sce math lib? */ float GRandGaussian(float param_1, float param_2, float param_3) { float fVar1; float fVar2; float fVar3; float fVar4; fVar3 = -1.0f; fVar4 = 0.0f; do { do { fVar1 = (float)GRandInRange(fVar3, 1.0f); fVar2 = (float)GRandInRange(fVar3, 1.0f); fVar1 = fVar1 * fVar1 + fVar2 * fVar2; } while (1.0f < fVar1); } while (fVar1 == fVar4); // fVar3 = logf(fVar1); fVar4 = param_1 + param_2 * fVar2 * sqrtf((fVar3 * -2.0f) / fVar1); fVar3 = fVar4; if (param_3 != 0.0f) { fVar3 = param_1 - param_3; if ((param_1 - param_3 <= fVar4) && (fVar3 = fVar4, param_1 + param_3 < fVar4)) fVar3 = param_1 + param_3; } return fVar3; } #endif // SKIP_ASM int FFloatsNear(float g1, float g2, float gEpsilon) { g2 = g1 - g2; g1 = g1 > 0.0f ? g1 : -g1; g2 = g2 > 0.0f ? g2 : -g2; float x = 1.0f; x = g1 > x ? g1 : x; return (g2 / x) < gEpsilon; } INCLUDE_ASM("asm/nonmatchings/P2/util", CSolveQuadratic__FfffPf); #ifdef SKIP_ASM /** * @todo 95.96% matched. * * Compiler is using bc1f instead of bc1fl for (alpha < 0.0f) branch. * * https://decomp.me/scratch/A4VOu */ int CSolveQuadratic(float a, float b, float c, float *ax) { float alpha; float beta; alpha = b * b - 4.f * a * c; a = a * 2; if (alpha < 0.0f) { return 0; } else { beta = b / a; alpha = sqrtf(alpha) / a; if (fabsf(alpha) < 0.0001f) { *ax = -beta; return 1; } *ax = -beta + alpha; ax[1] = -beta - alpha; return 2; } } #endif // SKIP_ASM void PrescaleClq(CLQ *pclqSrc, float ru, float du, CLQ *pclqDst) { pclqDst->g2 = pclqSrc->g2 * ru * ru; pclqDst->g1 = (pclqSrc->g2 + pclqSrc->g2) * ru * du + pclqSrc->g1 * ru; pclqDst->g0 = pclqSrc->g2 * du * du + pclqSrc->g1 * du + pclqSrc->g0; } INCLUDE_ASM("asm/nonmatchings/P2/util", CalculateSinCos__FfPfT1); #ifdef SKIP_ASM /** * @tod 86.55% matched. */ void CalculateSinCos(float angle, float *sin, float *cos) { // Constants from the assembly (hex to float) const float PI_OVER_2 = 1.57079637051f; // 0x3FC90FDB const float INV_PI = 0.31830987334f; // 0x3EA2F983 const float PI = 3.14159274101f; // 0x40490FDB // Polynomial coefficients (from hex in asm) const float C1 = -0.1666666279f; // 0xBE2AAAA4 const float C2 = 0.00833302546f; // 0x3C08873E const float C3 = -0.000198074187f; // 0xB94FB21F const float C4 = 2.601887e-06f; // 0x362E9C14 float x = (angle + PI_OVER_2) * INV_PI; int n = (int)x; if (x < 0.0f) n -= 1; int odd = n & 1; float xn = (float)n; float theta = angle - xn * PI; if (odd) theta = -theta; float theta2 = theta * theta; float s = theta; float t = theta2 * theta; float u = t * theta2; float v = u * theta2; float w = v * theta2; float result = s + t * C1 + u * C2 + v * C3 + w * C4; float result2 = 1.0f - result * result; if (odd) result2 = -result2; *sin = result; *cos = result2; } #endif // SKIP_ASM INCLUDE_ASM("asm/nonmatchings/P2/util", GTrunc__Fd); // double version #ifdef SKIP_ASM /** * @todo 34.18% matched. */ double GTrunc(double param_1) { union { double d; ulong u; } conv; conv.d = param_1; int exp = (int)((conv.u >> 52) & 0x7FF) - 0x3FF; if (exp < 0) return 0.0; if (exp >= 52) return param_1; ulong mask = (1ULL << (52 - exp)) - 1; ulong frac = conv.u & 0xFFFFFFFFFFFFF; ulong intpart = conv.u & ~mask; if ((frac & mask) == mask) { // Special case: all masked bits set, round up intpart += (1ULL << (52 - exp)); // Clear fraction bits intpart &= ~mask; } conv.u = intpart; return conv.d; } #endif INCLUDE_ASM("asm/nonmatchings/P2/util", GTrunc__Ff); // float version #ifdef SKIP_ASM /** * @todo 36.07% matched. */ float GTrunc(float param_1) { union { float f; uint u; } conv; conv.f = param_1; int exp = ((conv.u >> 23) & 0xFF) - 0x7F; if (exp < 0) return 0.0f; if (exp >= 0x17) return param_1; uint mask = (1u << (0x17 - exp)) - 1; uint frac = conv.u & 0x7FFFFF; if ((frac & mask) == mask) { // All masked bits set, round up conv.u = (conv.u & 0xFF800000) | (frac & ~mask); conv.f += 1.0f; return conv.f; } else { conv.u = (conv.u & 0xFF800000) | (frac & ~mask); return conv.f; } } #endif // SKIP_ASM float GModPositive(float gDividend, float gDivisor) { float result = fmodf(gDividend, gDivisor); if (result < 0.0f) { result += gDivisor; } return result; } void FitClq(float g0, float g1, float u, float gU, CLQ *pclq) { pclq->g0 = g0; pclq->g2 = ((gU - g0) / u - (g1 - g0)) / (u - 1.0f); pclq->g1 = (g1 - g0) - pclq->g2; } int FCheckLm(LM *plm, float g) { return (plm->gMin < g) && (g < plm->gMax); } bool FCheckAlm(int clm, LM *alm, float g) { for (int i = 0; i < clm; i++) { if (FCheckLm(&alm[i], g)) { return true; } } return false; } float GLimitLm(LM *plm, float g) { if (g < plm->gMin) { return plm->gMin; } if (g > plm->gMax) { return plm->gMax; } return g; } int SgnCompareG(float *pg1, float *pg2) { if (*pg1 > *pg2) { return 1; } else if (*pg2 > *pg1) { return -1; } return 0; } void Force(void *pv) { return; } INCLUDE_ASM("asm/nonmatchings/P2/util", MinimizeRange); JUNK_ADDIU(C0); ================================================ FILE: src/P2/vec.c ================================================ #include #include #include #include void SetVectorCylind(VECTOR *pvec, float rad, float sXY, float sZ) { float gSin, gCos; CalculateSinCos(rad, &gSin, &gCos); pvec->z = sZ; pvec->x = gCos * sXY; pvec->y = gSin * sXY; } void SetVectorSphere(VECTOR *pvec, float radPan, float radTilt, float s) { float gSinPan, gCosPan, gSinTilt, gCosTilt; CalculateSinCos(radPan,&gSinPan, &gCosPan); CalculateSinCos(radTilt, &gSinTilt, &gCosTilt); pvec->z = gSinTilt * s; pvec->x = gCosTilt * gCosPan * s; pvec->y = gCosTilt * gSinPan * s; } INCLUDE_ASM("asm/nonmatchings/P2/vec", SProjectVector__FP6VECTORT0); INCLUDE_ASM("asm/nonmatchings/P2/vec", GetNormalVectors__FP6VECTORN30); INCLUDE_ASM("asm/nonmatchings/P2/vec", GetNormalVector__FP6VECTORT0); JUNK_ADDIU(A0); INCLUDE_ASM("asm/nonmatchings/P2/vec", RadBetweenVectors__FP6VECTORN20); INCLUDE_ASM("asm/nonmatchings/P2/vec", FindClosestPointBetweenLines__FP6VECTORN30PfT4T0); INCLUDE_ASM("asm/nonmatchings/P2/vec", FindClosestPointBetweenLineSegments__FP6VECTORN40PfT0); void CalculateVectorPanTilt(VECTOR *pvec, float *pradPan, float *pradTilt) { if (pradPan) { *pradPan = RadNormalize(atan2f(pvec->y, pvec->x)); } if (pradTilt) { float dXYDist = SQRTF(pvec->x * pvec->x + pvec->y * pvec->y); *pradTilt = RadNormalize(atan2f(pvec->z, dXYDist)); } } void ConvertDeulToW(VECTOR *peul, VECTOR *pdeul, VECTOR *pw) { float ySin, yCos, zSin, zCos; CalculateSinCos(peul->y, &ySin, &yCos); CalculateSinCos(peul->z, &zSin, &zCos); pw->x = yCos * zCos * pdeul->x - zSin * pdeul->y; pw->y = yCos * zSin * pdeul->x + zCos * pdeul->y; pw->z = -ySin * pdeul->x + pdeul->z; } INCLUDE_ASM("asm/nonmatchings/P2/vec", FCalculateMuzzleVelocity__FP6VECTORT0fT0P2SO); INCLUDE_ASM("asm/nonmatchings/P2/vec", FCalculateMuzzleVelocity1); int FCalculateMuzzleVelocityAngle(VECTOR *pposLaunch, VECTOR *pposTarget, float radTilt, VECTOR *pvecMuzzle, SO *psoLaunch) { return FCalculateMuzzleVelocity(pposLaunch, pposTarget, radTilt, pvecMuzzle, psoLaunch); } INCLUDE_ASM("asm/nonmatchings/P2/vec", LimitVectorLength); ================================================ FILE: src/P2/vifs.c ================================================ #include VIFS::VIFS() { m_fPad = 1; m_unMask = 0; m_fCheckCnt = 0; } JUNK_NOP(); JUNK_ADDIU(10); INCLUDE_ASM("asm/nonmatchings/P2/vifs", Align__4VIFSi); void VIFS::AddVifBaseOffset(int iqwBase, int diqwOffset) { AddDmaInt(this, iqwBase | 0x03000000); AddDmaInt(this, diqwOffset | 0x02000000); } /** * @todo Figure out why using the inlined function doesn't work here. */ void VIFS::AddVifMscal(void *pv) { int i = (int)pv < 0 ? (int)pv + 7 : (int)pv; uchar *p = m_pb; m_pb = p + 4; *(int *)p = (i >> 3) | 0x14000000; } /** * @todo Figure out why using the inlined function doesn't work here. */ void VIFS::AddVifMscalf(void *pv) { int i = (int)pv < 0 ? (int)pv + 7 : (int)pv; uchar *p = m_pb; m_pb = p + 4; *(int *)p = (i >> 3) | 0x15000000; } void VIFS::AddVifFlush() { AddDmaInt(this, 0x11000000); } void VIFS::AddVifFlusha() { AddDmaInt(this, 0x13000000); } void VIFS::AddVifFlushe() { AddDmaInt(this, 0x10000000); } void VIFS::AddVifStcycl(int wl, int cl) { AddDmaInt(this, cl | (wl << 8) | 0x1000000); } INCLUDE_ASM("asm/nonmatchings/P2/vifs", AddVifStrow__4VIFSP2QW); INCLUDE_ASM("asm/nonmatchings/P2/vifs", AddVifStmask__4VIFSUi); INCLUDE_ASM("asm/nonmatchings/P2/vifs", CbUnpackSetup__4VIFS3UPKii); INCLUDE_ASM("asm/nonmatchings/P2/vifs", UnpackHelper__4VIFS3UPKiiPiPPUi); INCLUDE_ASM("asm/nonmatchings/P2/vifs", AddVifUnpack__4VIFS3UPKiPvi); INCLUDE_ASM("asm/nonmatchings/P2/vifs", AddVifUnpackRefs__4VIFS3UPKiPviPPPv); /** * @todo Figure out why using the inlined function doesn't work here. */ void VIFS::AddVifDirect(int cqw, QW *aqw, int fInt) { Align(3); uchar *p = m_pb; m_pb = p + 4; *(int *)p = cqw | 0x50000000 | (fInt << 31); AddDmaBulk(cqw, aqw); } /** * @todo Figure out why using the inlined function doesn't work here. */ void VIFS::AddVifDirectRefs(int cqw, QW *aqw, int fInt) { Align(3); uchar *p = m_pb; m_pb = p + 4; *(int *)p = cqw | 0x50000000 | (fInt << 31); AddDmaRefs(cqw, aqw); } void VIFS::AddVifGifs(GIFS *pgifs) { AddVifDirect((uint)(pgifs->m_pb - pgifs->m_ab) >> 4, (QW *)pgifs->m_ab, 0); } ================================================ FILE: src/P2/vis.c ================================================ #include #include #include #include void InitVismap(VISMAP *pvismap) { InitLo(pvismap); pvismap->psw->pvismap = pvismap; } void LoadVismapFromBrx(VISMAP *pvismap, CBinaryInputStream *pbis) { pbis->ReadVbsp(&pvismap->cvbsp, &pvismap->avbsp); pvismap->cgrfzon = pbis->U16Read(); pvismap->agrfzonOneHop = (GRFZON *)PvAllocSwImpl(pvismap->cgrfzon * sizeof(GRFZON)); for (int i = 0; i < pvismap->cgrfzon; i++) { pvismap->agrfzonOneHop[i] = pbis->U32Read(); } LoadOptionsFromBrx(pvismap, pbis); } GRFZON GrfzonOneHop(VISMAP *pvismap, VBSP *pvbsp) { int bits = (int)((uint)pvbsp & 0x7fffffff); if (bits == 0) return 0; int acc = -1; for (int i = 0; i < pvismap->cgrfzon; i++) { int shifted = bits >> i; if ((shifted & 1) != 0) { acc &= pvismap->agrfzonOneHop[i]; } } return acc | (uint)bits; } INCLUDE_ASM("asm/nonmatchings/P2/vis", ClipVbspSphereOneHop__FP6VISMAPP4VBSPG9VU_VECTORfPi); /** * @brief 89.47% match. Single load instruction mismatch. VU_VECTOR implemented wrong? * https://decomp.me/scratch/5lzfX */ INCLUDE_ASM("asm/nonmatchings/P2/vis", ClipVismapSphereOneHop__FP6VISMAPP6VECTORfPi); #ifdef SKIP_ASM void ClipVismapSphereOneHop(VISMAP *pvismap, VECTOR *ppos, float sRadius, GRFZON *pgrfzon) { if (pvismap && pvismap->avbsp) { VU_VECTOR vuvector = *(VU_VECTOR *)ppos; *pgrfzon = 0; ClipVbspSphereOneHop(pvismap, pvismap->avbsp, vuvector, sRadius, pgrfzon); return; } *pgrfzon = 0xfffffff; } #endif // SKIP_ASM INCLUDE_ASM("asm/nonmatchings/P2/vis", ClipVismapPointNoHop__FP6VISMAPP6VECTORPi); ================================================ FILE: src/P2/water.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/water", InitWater__FP5WATER); INCLUDE_ASM("asm/nonmatchings/P2/water", PostWaterLoad__FP5WATER); INCLUDE_ASM("asm/nonmatchings/P2/water", CalculateWaterCurrent__FP5WATERP6VECTORN21); INCLUDE_ASM("asm/nonmatchings/P2/water", UpdateSwXaList__FP2SWPP2XA); INCLUDE_ASM("asm/nonmatchings/P2/water", UpdateWater__FP5WATERf); INCLUDE_ASM("asm/nonmatchings/P2/water", AddWaterExternalAccelerations__FP5WATERP2XAf); INCLUDE_ASM("asm/nonmatchings/P2/water", HandleWaterMessage__FP5WATER5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/water", UpdateWaterMergeGroup__FP5WATER); INCLUDE_ASM("asm/nonmatchings/P2/water", UGetWaterSubmerged__FP5WATERP2SOP6VECTORT2); INCLUDE_ASM("asm/nonmatchings/P2/water", UpdateWaterBounds__FP5WATER); INCLUDE_ASM("asm/nonmatchings/P2/water", FInflictWaterZap__FP5WATERP2XPP3ZPR); INCLUDE_ASM("asm/nonmatchings/P2/water", PzpdEnsureWater__FP5WATER4ENSK); INCLUDE_ASM("asm/nonmatchings/P2/water", FUN_001ef830); ================================================ FILE: src/P2/waypoint.c ================================================ #include #include #include #include extern SNIP s_asnipPostWaypointLoad; extern VTWPSG g_vtwpsg; void InitWaypoint(WAYPOINT *pwaypoint) { InitAlo(pwaypoint); STRUCT_OFFSET(pwaypoint, 0x2d0, int) = -1; // pwaypoint->oidSync STRUCT_OFFSET(pwaypoint, 0x2e0, int) = -1; // pwaypoint->wps } void PostWaypointLoad(WAYPOINT *pwaypoint) { PostAloLoad(pwaypoint); SnipAloObjects(pwaypoint, 1, &s_asnipPostWaypointLoad); SetWaypointWps(pwaypoint, WPS_Passive); pwaypoint->pvtlo->pfnRemoveLo(pwaypoint); } void SetWaypointRsmg(WAYPOINT *pwaypoint, int fOnTrigger, OID oidRoot, OID oidSm, OID oidGoal) { // pwaypoint->arsmgSet & pwaypoint->crsmgSet FAddRsmg(&STRUCT_OFFSET(pwaypoint, 0x2e8, RSMG), 4, &STRUCT_OFFSET(pwaypoint, 0x2e4, int), fOnTrigger, oidRoot, oidSm, oidGoal); } void UpdateWaypoint(WAYPOINT *pwaypoint, float dt) { return; } INCLUDE_ASM("asm/nonmatchings/P2/waypoint", SetWaypointWps__FP8WAYPOINT3WPS); void HandleWaypointMessage(WAYPOINT *pwaypoint, MSGID msgid, void *pv) { HandleAloMessage(pwaypoint, msgid, pv); // pwaypoint->paseg if (msgid == MSGID_asega_limit && STRUCT_OFFSET(pv, 0x08, ASEG *) == STRUCT_OFFSET(pwaypoint, 0x2dc, ASEG *)) { SetWaypointWps(pwaypoint, WPS_Passive); } } WPSG *PwpsgNew() { WPSG *pwpsg = (WPSG *)PvAllocSwClearImpl(sizeof(WPSG)); pwpsg->pvtwpsg = &g_vtwpsg; return pwpsg; } void AddWpsgWaypoint(WPSG *pwpsg, WAYPOINT *pwaypoint) { if (pwpsg->cpwaypoint < 8) { pwpsg->apwaypoint[pwpsg->cpwaypoint++] = pwaypoint; } } INCLUDE_ASM("asm/nonmatchings/P2/waypoint", RemoveWpsgWaypoint__FP4WPSGP8WAYPOINT); INCLUDE_ASM("asm/nonmatchings/P2/waypoint", UpdateWpsgCallback__FP4WPSG5MSGIDPv); void EnsureWpsgCallback(WPSG *pwpsg) { if (!pwpsg->fCallback) { pwpsg->fCallback = 1; PostSwCallback(g_psw, UpdateWpsgCallback, pwpsg, MSGID_Nil, NULL); } } JUNK_ADDIU(40); ================================================ FILE: src/P2/wipe.c ================================================ #include void InitWipe(WIPE *pwipe) { pwipe->wipes = WIPES_Nil; SetWipeWipes(pwipe, WIPES_Idle); } INCLUDE_ASM("asm/nonmatchings/P2/wipe", UpdateWipe__FP4WIPEP3JOY); INCLUDE_ASM("asm/nonmatchings/P2/wipe", DrawWipe__FP4WIPE); INCLUDE_ASM("asm/nonmatchings/P2/wipe", ActivateWipe__FP4WIPEP5TRANS5WIPEK); INCLUDE_ASM("asm/nonmatchings/P2/wipe", SetWipeButtonTrans__FP4WIPEP5TRANS5WIPEK); INCLUDE_ASM("asm/nonmatchings/P2/wipe", FCatchWipeButtonTrans__FP4WIPEP3JOY5WIPES); JUNK_WORD(0x00A0102D); INCLUDE_ASM("asm/nonmatchings/P2/wipe", SetWipeWipes__FP4WIPE5WIPES); void WipeToWorldWarp(const void *pchzWorld, OID oidWarp, WIPEK wipek) { TRANS trans; trans.fSet = 1; trans.grftrans = 0; trans.pchzWorld = (LevelTableStruct *)pchzWorld; trans.oidWarp = oidWarp; ActivateWipe(&g_wipe, &trans, wipek); } ================================================ FILE: src/P2/wm.c ================================================ #include INCLUDE_ASM("asm/nonmatchings/P2/wm", FUN_001f0468); INCLUDE_ASM("asm/nonmatchings/P2/wm", FUN_001f0490); INCLUDE_ASM("asm/nonmatchings/P2/wm", FUN_001f0580); INCLUDE_ASM("asm/nonmatchings/P2/wm", PostWmLoad__FP2WM); INCLUDE_ASM("asm/nonmatchings/P2/wm", BindWm__FP2WM); INCLUDE_ASM("asm/nonmatchings/P2/wm", RefreshWmMoveStats__FP2WM10WORLDLEVEL); INCLUDE_ASM("asm/nonmatchings/P2/wm", ThrowWmDisplayState__FP2WM10WORLDLEVELi); INCLUDE_ASM("asm/nonmatchings/P2/wm", CatchWmDisplayState__FP2WM); INCLUDE_ASM("asm/nonmatchings/P2/wm", UpdateWm__FP2WMf); INCLUDE_ASM("asm/nonmatchings/P2/wm", RenderWmAll__FP2WMP2CMP2RO); INCLUDE_ASM("asm/nonmatchings/P2/wm", HandleWmMessage__FP2WM5MSGIDPv); INCLUDE_ASM("asm/nonmatchings/P2/wm", SetWmWms__FP2WM3WMS); INCLUDE_ASM("asm/nonmatchings/P2/wm", ShowWm__FP2WM10WORLDLEVEL3WMS); INCLUDE_ASM("asm/nonmatchings/P2/wm", HideWm__FP2WM); INCLUDE_ASM("asm/nonmatchings/P2/wm", MoveWm__FP2WM3WMD); INCLUDE_ASM("asm/nonmatchings/P2/wm", GetWmWorldPosScreen__FP2WM10WORLDLEVELP6VECTOR); INCLUDE_ASM("asm/nonmatchings/P2/wm", SetWmCursor__FP2WM10WORLDLEVEL); INCLUDE_ASM("asm/nonmatchings/P2/wm", PostWmcLoad__FP3WMC); INCLUDE_ASM("asm/nonmatchings/P2/wm", UpdateWmcActive__FP3WMCP3JOY); INCLUDE_ASM("asm/nonmatchings/P2/wm", OnWmcActive__FP3WMCi); INCLUDE_ASM("asm/nonmatchings/P2/wm", DrawWmFan__FffffiG4RGBAT5i); INCLUDE_ASM("asm/nonmatchings/P2/wm", DrawWmc__FP3WMC); INCLUDE_ASM("asm/nonmatchings/P2/wm", wm__static_initialization_and_destruction_0); JUNK_WORD(0xE48C0000); JUNK_WORD(0xE48C0008); INCLUDE_ASM("asm/nonmatchings/P2/wm", _GLOBAL_$I$U_WmFadedLevels); ================================================ FILE: src/P2/wr.c ================================================ #include void InitWr(WR *pwr) { InitLo(pwr); pwr->tLastUpdate = -1.0f; pwr->imatHalf = -1; pwr->iwreCur = -1; } INCLUDE_ASM("asm/nonmatchings/P2/wr", ApplyWrGlob__FP2WRP3ALOP4GLOB); INCLUDE_ASM("asm/nonmatchings/P2/wr", UpdateWrStateVectors__FP2WR); INCLUDE_ASM("asm/nonmatchings/P2/wr", WarpWrTransform__FP2WRfP6VECTORP7MATRIX3T2T3T2); INCLUDE_ASM("asm/nonmatchings/P2/wr", GetWrBounds__FP2WRP6VECTOR); float UNoise(int n) { int x = (n << 13) ^ n; int y = x * x * 0x3d73 + 0xc0ae5; int z = x * y + 0x5208dd0d; x = z & 0x7fffffff; return (float)x / 2147483648.0f; } INCLUDE_ASM("asm/nonmatchings/P2/wr", UNoise__Ffff); float UBias(float u, float v) { return u / ((1.0f / v - 2.0f) * (1.0f - u) + 1.0f); } INCLUDE_ASM("asm/nonmatchings/P2/wr", GFromOnz__FP3ONZ); INCLUDE_ASM("asm/nonmatchings/P2/wr", UpdateWrMatrixes__FP2WR); INCLUDE_ASM("asm/nonmatchings/P2/wr", AddWrCircleWarp__FP2WR); INCLUDE_ASM("asm/nonmatchings/P2/wr", AddWrBendWarp__FP2WR); WRE *PwreGetWrCur(WR *pwr, ENSK ensk, WREK wrek) { if (pwr->cwre == 0) { return NULL; } if (ensk == ENSK_Set) { pwr->fValuesChanged = 1; } return &pwr->awre[pwr->iwreCur]; } WRE *PwreGetWrCircle(WR *pwr, ENSK ensk) { return PwreGetWrCur(pwr, ensk, WREK_Circle); } WRE *PwreGetWrBend(WR *pwr, ENSK ensk) { return PwreGetWrCur(pwr, ensk, WREK_Bend); } void SetWrWavelength(WR *pwr, float sWavelength) { WRE *pwre = PwreGetWrCircle(pwr, ENSK_Set); if (sWavelength == 0.0f) { STRUCT_OFFSET(pwre, 0x64, float) = 0.0f; } else { STRUCT_OFFSET(pwre, 0x64, float) = 1.0f / sWavelength; } } void GetWrWavelength(WR *pwr, float *psWavelength) { WRE *pwre = PwreGetWrCircle(pwr, ENSK_Set); if (STRUCT_OFFSET(pwre, 0x64, float) == 0.0f) { *psWavelength = 0.0f; } else { *psWavelength = 1.0f / STRUCT_OFFSET(pwre, 0x64, float); } } void AddOnzOnze(ONZ *ponz, float uAmpl, float gFreq, float gPhase, float uRandom) { uint conze = ponz->conze; if (conze < 4) { ONZE *ponze = ponz->aonze + conze; ponz->conze++; ponze->uAmpl = uAmpl; ponze->gFreq = gFreq; ponze->gPhase = gPhase; ponze->uRandom = uRandom; } } void AddWrBendNoise(WR *pwr, float uAmpl, float gFreq, float gPhase, float uRandom) { WRE *pwre = PwreGetWrBend(pwr, ENSK_Set); AddOnzOnze(&STRUCT_OFFSET(pwre, 0x30, ONZ), uAmpl, gFreq, gPhase, uRandom); } void AddWrSwivelNoise(WR *pwr, float uAmpl, float gFreq, float gPhase, float uRandom) { WRE *pwre = PwreGetWrBend(pwr, ENSK_Set); AddOnzOnze(&STRUCT_OFFSET(pwre, 0x80, ONZ), uAmpl, gFreq, gPhase, uRandom); } ================================================ FILE: src/P2/xform.c ================================================ #include #include #include #include #include INCLUDE_ASM("asm/nonmatchings/P2/xform", InitXfm__FP3XFM); void LoadXfmFromBrx(XFM *pxfm, CBinaryInputStream *pbis) { pbis->ReadMatrix(&pxfm->matLocal); pbis->ReadVector(&pxfm->posLocal); LoadOptionsFromBrx(pxfm, pbis); } void SetXfmParent(XFM *pxfm, ALO *paloParent) { ConvertAloPos(pxfm->paloParent, paloParent, &pxfm->posLocal, &pxfm->posLocal); ConvertAloMat(pxfm->paloParent, paloParent, &pxfm->matLocal, &pxfm->matLocal); SetLoParent(pxfm, paloParent); } void ApplyXfmProxy(XFM *pxfm, PROXY *pproxyApply) { ConvertAloPos(pproxyApply, NULL, &pxfm->posLocal, &pxfm->posLocal); ConvertAloMat(pproxyApply, NULL, &pxfm->matLocal, &pxfm->matLocal); } INCLUDE_ASM("asm/nonmatchings/P2/xform", ConvertXfmLocalToWorld__FP3XFMP6VECTORT1); void GetXfmPos(XFM *pxfm, VECTOR *ppos) { ConvertAloPos(pxfm->paloParent, NULL, &pxfm->posLocal, ppos); } void GetXfmMat(XFM *pxfm, MATRIX3 *pmat) { ConvertAloMat(pxfm->paloParent, NULL, &pxfm->matLocal, pmat); } INCLUDE_ASM("asm/nonmatchings/P2/xform", PwarpFromOid__F3OIDT0); INCLUDE_ASM("asm/nonmatchings/P2/xform", LoadWarpFromBrx__FP4WARPP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/xform", CloneWarp__FP4WARPT0); INCLUDE_ASM("asm/nonmatchings/P2/xform", PostWarpLoad__FP4WARP); INCLUDE_ASM("asm/nonmatchings/P2/xform", TriggerWarp__FP4WARP); void SetWarpRsmg(WARP *pwarp, int fOnTrigger, OID oidRoot, OID oidSM, OID oidGoal) { // pwarp->arsmg & pwarp->crsmg FAddRsmg(&STRUCT_OFFSET(pwarp, 0xb8, RSMG), 4, &STRUCT_OFFSET(pwarp, 0xb4, int), fOnTrigger, oidRoot, oidSM, oidGoal); } INCLUDE_ASM("asm/nonmatchings/P2/xform", FUN_001F4308); INCLUDE_ASM("asm/nonmatchings/P2/xform", TeleportSwPlayer__FP2SW3OIDT1); INCLUDE_ASM("asm/nonmatchings/P2/xform", PexitDefault__Fv); INCLUDE_ASM("asm/nonmatchings/P2/xform", TriggerDefaultExit__Fi5WIPEK); INCLUDE_ASM("asm/nonmatchings/P2/xform", LoadExitFromBrx__FP4EXITP18CBinaryInputStream); INCLUDE_ASM("asm/nonmatchings/P2/xform", PostExitLoad__FP4EXIT); void SetExitExits(EXIT *pexit, EXITS exits) { if (exits == STRUCT_OFFSET(pexit, 0x2e4, EXITS)) // pexit->exits { return; } // pexit->exits if (STRUCT_OFFSET(pexit, 0x2e4, EXITS) == EXITS_Totals && exits != EXITS_Exiting) { g_totals.pvttotals->pfnHideBlot(&g_totals); } if (exits != EXITS_Exiting) { STRUCT_OFFSET(pexit, 0x2e4, EXITS) = exits; // pexit->exits STRUCT_OFFSET(pexit, 0x2e8, float) = g_clock.t; // pexit->tExits return; } uint64_t tmp = STRUCT_OFFSET(pexit, 0x2c8, uint64_t); STRUCT_OFFSET(pexit, 0x2c8, uint64_t) = (tmp & ~0x30000000000ULL) | (0x8000ULL << 0x19); IncrementSwHandsOff(pexit->psw); STRUCT_OFFSET(pexit, 0x2e4, EXITS) = exits; // pexit->exits STRUCT_OFFSET(pexit, 0x2e8, float) = g_clock.t; // pexit->tExits } INCLUDE_ASM("asm/nonmatchings/P2/xform", TriggerExit__FP4EXIT); INCLUDE_ASM("asm/nonmatchings/P2/xform", WipeExit__FP4EXIT); INCLUDE_ASM("asm/nonmatchings/P2/xform", UpdateExit__FfP4EXIT); void InitCamera(CAMERA *pcamera) { InitAlo(pcamera); STRUCT_OFFSET(pcamera, 0x2d0, OID) = OID_Nil; // pcamera->oidTarget } INCLUDE_ASM("asm/nonmatchings/P2/xform", PostCameraLoad__FP6CAMERA); void EnableCamera(CAMERA *pcamera) { if (STRUCT_OFFSET(pcamera, 0x310, int) == 0) // pcamera->fSetCplcy { // g_pcm->cpaseg SetCmPolicy(g_pcm, CPP_Animated, &STRUCT_OFFSET(g_pcm, 0x510, CPLCY), NULL, pcamera); STRUCT_OFFSET(pcamera, 0x310, int) = 1; // pcamera->fSetCplcy } } void DisableCamera(CAMERA *pcamera) { if (STRUCT_OFFSET(pcamera, 0x310, int) != 0) // pcamera->fSetCplcy { // g_pcm->cpaseg RevokeCmPolicy(g_pcm, 0x0b, CPP_Animated, &STRUCT_OFFSET(g_pcm, 0x510, CPLCY), NULL, pcamera); STRUCT_OFFSET(pcamera, 0x310, int) = 0; // pcamera->fSetCplcy } } ================================================ FILE: src/P2/zap.c ================================================ #include #include #include void InitTzp(TZP *ptzp) { InitSo(ptzp); InitZpd(&STRUCT_OFFSET(ptzp, 0x550, ZPD), ptzp); STRUCT_OFFSET(ptzp, 0x4e0, ZOK) = ZOK_Zap; STRUCT_OFFSET(ptzp, 0x538, ulong) &= 0xffffff0fffffffff; // ptzp->bspcCamera.absp STRUCT_OFFSET(ptzp, 0x538, ulong) |= 0x2000000000; } void PostTzpLoad(TZP *ptzp) { PostAloLoad(ptzp); PostZpdLoad(&STRUCT_OFFSET(ptzp, 0x550, ZPD)); // ptzp->zpd } INCLUDE_ASM("asm/nonmatchings/P2/zap", UpdateTzp__FP3TZPf); void CloneTzp(TZP *ptzp, TZP *ptzpBase) { CloneSo(ptzp, ptzpBase); STRUCT_OFFSET(ptzp, 0x550, ZPD).pso = ptzp; // ptzp->zpd } void RenderTzpAll(TZP *ptzp, CM *pcm, RO *pro) { RenderAloAll(ptzp, pcm, pro); } int FInflictTzpZap(TZP *ptzp, XP *pxp, ZPR *pzpr) { InflictZpdZap(&STRUCT_OFFSET(ptzp, 0x550, ZPD), pxp, pzpr); // ptzp->zpd return 1; } ZPD *PzpdEnsureTzp(TZP *ptzp, ENSK ensk) { return &STRUCT_OFFSET(ptzp, 0x550, ZPD); // ptzp->zpd } /** * @todo Rename function and figure out what does it actually do. */ void FUN_001F5210(TZP *ptzp) { STRUCT_OFFSET(ptzp, 0x5e4, int) = 0; } void InitVolzp(VOLZP *pvolzp) { InitTzp(pvolzp); STRUCT_OFFSET(pvolzp, 0x538, ulong) |= 0x80000000000; // ptzp->bspcCamera.absp SetSoConstraints(pvolzp, CT_Locked, NULL, CT_Locked, NULL); } INCLUDE_ASM("asm/nonmatchings/P2/zap", UpdateVolzp__FP5VOLZPf); void InitZpd(ZPD *pzpd, SO *pso) { pzpd->pso = pso; pzpd->zpk = ZPK_Blunt; pzpd->dzThrow = 150.0f; } INCLUDE_ASM("asm/nonmatchings/P2/zap", PostZpdLoad__FP3ZPD); INCLUDE_ASM("asm/nonmatchings/P2/zap", ApplyZpdThrow__FP3ZPDP2PO); void InflictZpdZap(ZPD *pzpd, XP *pxp, ZPR *pzpr) { PpoCur(); pzpr->zpk = pzpd->zpk; pzpr->pv = pzpd; pzpr->pfnzap = ApplyZpdThrow; HandleLoSpliceEvent(pzpd->pso, 2, 0, NULL); } void AddZpdZapObject(ZPD *pzpd, OID oid) { if ((uint)pzpd->coidThrow >= 32) return; pzpd->aoidThrow[pzpd->coidThrow++] = oid; } void AddZpdZapLo(ZPD *pzpd, LO *plo) { if ((uint)pzpd->cploThrow >= 32) return; // TODO: Figure out the CIDs. if (!FIsBasicDerivedFrom(plo, (CID)0x7e) && !FIsBasicDerivedFrom(plo, (CID)0x6e) && !FIsBasicDerivedFrom(plo, (CID)0x76) && !FIsBasicDerivedFrom(plo, (CID)0x70) && !FIsBasicDerivedFrom(plo, (CID)0x71) && !FIsBasicDerivedFrom(plo, (CID)0x81)) return; pzpd->aploThrow[pzpd->cploThrow++] = plo; } /** * @todo 100% match. NOP bytes get added after this function * which makes the sce/libs TU not aligned properly. */ INCLUDE_ASM("asm/nonmatchings/P2/zap", RemoveZpdZapLo__FP3ZPDP2LO); #ifdef SKIP_ASM void RemoveZpdZapLo(ZPD *pzpd, LO *plo) { int i; for (i = 0; i < pzpd->cploThrow; i++) { if (pzpd->aploThrow[i] == plo) { break; } } if (i < pzpd->cploThrow) { CopyAb(&pzpd->aploThrow[i], &pzpd->aploThrow[i] + 1, (pzpd->cploThrow - i - 1) * sizeof(*pzpd->aploThrow)); pzpd->cploThrow--; } } #endif // SKIP_ASM ================================================ FILE: src/readme.md ================================================ # Source Files This directory contains the source code for the game engine, P2. Source code for the scripting engine, Splice, are in the `splice/` subdirectory. The following is a list of all known source code file names from a **prototype build** of the game. Note that it may be missing some files from the final build, and some files listed may not actually exist in the final build. ```txt splice/bif.cpp splice/callstack.cpp splice/error.cpp splice/eval.cpp splice/frame.cpp splice/gc.cpp splice/method.cpp splice/pair.cpp splice/proc.cpp splice/ref.cpp splice/serialize.cpp splice/sidebag.cpp splice/spliceutils.cpp splice/splotheap.cpp splice/vecmat.cpp ac.c act.c actseg.c alarm.c alo.c aseg.c asega.c barrier.c bas.c basic.c bbmark.c bez.c binoc.c bis.c blend.c blip.c bomb.c bone.c bq.c break.c brx.c bsp.c button.c can.c cat.c cd.c chkpnt.c clip.c clock.c cm.c cnvo.c coin.c cplcy.c credit.c crout.c crusher.c crv.c cycle.c dart.c dartgun.c dbg.c dialog.c difficulty.c dl.c dmas.c dsp.c dysh.c dzg.c emitter.c eyes.c fader.c find.c flash.c fly.c font.c freeze.c frm.c frzg.c game.c geom.c gifs.c glbs.c glob.c gomer.c gs.c hg.c hide.c hnd.c hull.c ik.c jack.c jlo.c joy.c jp.c jsg.c jt.c jump.c keyhole.c landing.c letters.c lgn.c light.c lo.c lookat.c main.c map2d.c map3d.c mark.c mat.c mb.c mecha.c memcard.c memory.c menu.c missile.c mouthgame.c mpeg.c mrkv.c ms.c murray.c path.c perf.c phasemem.c pipe.c pnt.c po.c pose.c prog.c prompt.c proxy.c ps2t/buildver.c ps2t/spaprops.ic puffer.c pzo.c rail.c rat.c rchm.c render.c rip.c rog.c rope.c rumble.c rwm.c sampler.c sc.c screen.c sensor.c shadow.c shape.c shd.c shdanim.c sky.c slotheap.c sm.c smartguard.c so.c solve.c sort.c sound.c speaker.c spire.c splicemap.c spliceobj.c sprbuf.c sqtr.c squish.c step.c stepact.c stepcane.c stepguard.c stephang.c stephide.c steppipe.c steppower.c steprun.c stepside.c stepski.c stepzap.c stream.c suv.c sw.c tail.c tank.c target.c text.c texture.c thread.c tn.c transition.c turret.c tv.c ub.c ui.c unzip.c update.c util.c vec.c vife.c vifs.c vis.c water.c waypoint.c wibu_ee.c wipe.c wm.c wr.c xform.c zap.c ``` Library sources in the prototype (not exhaustive): ```txt bit.c cache.c classes.c csc.c deci2.c defhandler.c diei.c dp-bit.c eeloadfile.c evtwalk.c exit.c filestub.c fp-bit.c glue.c graphdev.c init.c initsys.c inl.c intr.c iopreset.c ipuinit.c klib.s kprintf.c libdma.c libipu.c libosd.c libpad.c libscedemo.c mpc.c pack.c shiftjis.c sifcmd.c sifrpc.c tlbfunc.c tlbtrap.s tty.c var.c version.h vu/vu.c ``` ================================================ FILE: tools/codematcher/LICENSE.txt ================================================ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ + License for CodeMatcher ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ MIT License Copyright (c) 2022 felinis Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ================================================ FILE: tools/codematcher/README.md ================================================ # Code Matching Guide This guide will walk you through the process of matching your code against the Sly 1 May Prototype. ## 1. Clone the repository ```sh git clone https://github.com/TheOnlyZac/sly1.git ``` ## 2. Run the setup script The setup script will download and install the compiler needed to compile the code and run CodeMatcher. ### Linux ```sh cd sly1/scripts ./setup-progd-linux.sh ``` ### Windows ```powershell cd sly1\scripts .\setup-progd-windows.bat ``` ## 3. Get the Sly 1 May Prototype ELF You will need the Sly 1 May 2002 Prototype ELF for code matching. Download and and extract the ELF to the `tools/codematcher` folder (alongside `CodeMatcher.exe`). Rename it from `SCUS971.98` to `sly_proto.elf`. ## 4. Match your code After you have written your code, you can use the scripts in the `scripts` folder to compile the code and match functions. * `match_all.sh` will compile the complete source tree and match all functions. * `match_file.sh ` will compile a single file and match all functions in that file. * `match_function_live.sh ` will compile a single file and match a single function in that file. * It will continuously dump the function bytes and print the disassembly to the console so you can compare it against the original. These scripts will only work on Linux or WSL. If you are on Windows, you will have to run CodeMatcher manually from the command line. **Good luck, and have fun!** ================================================ FILE: tools/codematcher/ghidra_tips.txt ================================================ Useful tips when decompiling with Ghidra: - Never, ever use floating-point numbers without the 'f' as it will produce a code that is more than twice as bigger. (example: write 1.0f, not 1.0 like Ghidra's decompiler likes to output) ================================================ FILE: tools/codematcher/match_all.cmd ================================================ @echo off CodeMatcher.exe sly_proto.elf -compile ../src/P2 ================================================ FILE: tools/codematcher/match_single.cmd ================================================ @echo off REM use this script to quickly match one source file, just drag it on this CMD file... C:\usr\local\sce\ee\gcc\bin\ee-gcc.exe -IC:\usr\local\sce\common\include -IC:\usr\local\sce\ee\gcc\include\g++-2 -g -O2 -x c++ -c %1 -o temp\%1.o ================================================ FILE: tools/objdiff/LICENSE ================================================ Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "{}" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright 2022 Luke Street. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.