Move to dtk-template
This commit is contained in:
14
.gitattributes
vendored
14
.gitattributes
vendored
@@ -1,5 +1,13 @@
|
||||
# Auto detect text files and perform LF normalization
|
||||
* text=auto
|
||||
config/**/*.txt text eol=lf
|
||||
|
||||
*.sh text eol=lf
|
||||
*.bat text eol=lf
|
||||
# Explicitly declare text files
|
||||
*.py text
|
||||
|
||||
# Enforce platform-specific encodings
|
||||
*.bat text eol=crlf
|
||||
*.sh text eol=lf
|
||||
*.sha1 text eol=lf
|
||||
|
||||
# decomp-toolkit writes files with LF
|
||||
config/**/*.txt text eol=lf
|
||||
|
||||
53
.github/workflows/build.yml
vendored
Normal file
53
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
name: Build
|
||||
|
||||
on:
|
||||
push:
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
# Private repo for build
|
||||
container: ghcr.io/koopthekoopa/wii-ipl-build:main
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
version: [43U, 43E, 43J, 43K]
|
||||
|
||||
steps:
|
||||
# Checkout the repository
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
# Set Git config
|
||||
- name: Git config
|
||||
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
|
||||
|
||||
# Copy the original files to the workspace
|
||||
- name: Prepare
|
||||
run: cp -R /orig .
|
||||
|
||||
# Build the project
|
||||
- name: Build
|
||||
run: |
|
||||
python configure.py --map --version ${{ matrix.version }} \
|
||||
--binutils /binutils --compilers /compilers
|
||||
ninja all_source build/${{ matrix.version }}/progress.json \
|
||||
build/${{ matrix.version }}/report.json
|
||||
|
||||
# Upload map files
|
||||
- name: Upload map
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.version }}_maps
|
||||
path: build/${{ matrix.version }}/**/*.MAP
|
||||
|
||||
# Upload progress report
|
||||
- name: Upload report
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.version }}_report
|
||||
path: build/${{ matrix.version }}/report.json
|
||||
111
.gitignore
vendored
111
.gitignore
vendored
@@ -1,79 +1,40 @@
|
||||
# Prerequisites
|
||||
*.d
|
||||
# IDE folders
|
||||
.idea/
|
||||
.vs/
|
||||
|
||||
# Compiled Object files
|
||||
*.slo
|
||||
*.lo
|
||||
# Caches
|
||||
__pycache__
|
||||
.mypy_cache
|
||||
.cache/
|
||||
|
||||
# Original files
|
||||
orig/*/*
|
||||
!orig/*/.gitkeep
|
||||
*.dol
|
||||
*.rel
|
||||
*.elf
|
||||
*.o
|
||||
*.obj
|
||||
|
||||
# Precompiled Headers
|
||||
*.gch
|
||||
*.pch
|
||||
|
||||
# Compiled Dynamic libraries
|
||||
*.so
|
||||
*.dylib
|
||||
*.dll
|
||||
|
||||
# Fortran module files
|
||||
*.mod
|
||||
*.smod
|
||||
|
||||
# Compiled Static libraries
|
||||
*.lai
|
||||
*.la
|
||||
*.a
|
||||
*.lib
|
||||
|
||||
# Executables
|
||||
*.exe
|
||||
*.out
|
||||
*.app
|
||||
*.dol
|
||||
*.elf
|
||||
|
||||
# Exclusive for decomp
|
||||
ctx.c
|
||||
*.bat
|
||||
*.sh
|
||||
*.sln
|
||||
*.7z
|
||||
*.dump
|
||||
*.idb
|
||||
*.id0
|
||||
*.id1
|
||||
*.id2
|
||||
*.nam
|
||||
.private/*
|
||||
build/*
|
||||
data/*
|
||||
tools/GC/*
|
||||
tools/Wii/*
|
||||
tools/src/*
|
||||
tools/PPC/*
|
||||
tools/*.txt
|
||||
tools/makesel
|
||||
tools/ipl2dtk
|
||||
tools/elf2bs
|
||||
.vscode/settings.json
|
||||
*.filters
|
||||
*.vcxproj
|
||||
*.user
|
||||
.DS_Store
|
||||
*.bat
|
||||
*.img
|
||||
*.bin
|
||||
*.map
|
||||
*.log
|
||||
*.elf
|
||||
*.dol
|
||||
*.bak
|
||||
*.dtk
|
||||
objdiff.json
|
||||
*.lnk
|
||||
*.wad
|
||||
*.swf
|
||||
*.MAP
|
||||
|
||||
# Scrapped :(
|
||||
.web/*
|
||||
# Build files
|
||||
build/
|
||||
.ninja_*
|
||||
build.ninja
|
||||
.private/*
|
||||
|
||||
# decompctx output
|
||||
ctx.*
|
||||
*.ctx
|
||||
|
||||
# Generated configs
|
||||
objdiff.json
|
||||
compile_commands.json
|
||||
|
||||
# Miscellaneous
|
||||
progress/*
|
||||
/*.txt
|
||||
*.exe
|
||||
*.lnk
|
||||
*.bat
|
||||
*.log
|
||||
47
.vscode/c_cpp_properties.json
vendored
47
.vscode/c_cpp_properties.json
vendored
@@ -1,19 +1,58 @@
|
||||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Linux",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/include/**",
|
||||
"${workspaceFolder}/libs/MSL/include/**",
|
||||
"${workspaceFolder}/libs/MetroTRK/include/**",
|
||||
"${workspaceFolder}/libs/Runtime/include/**",
|
||||
"${workspaceFolder}/libs/RVL_SDK/include/**",
|
||||
"${workspaceFolder}/libs/RevoEX/include/**",
|
||||
"${workspaceFolder}/libs/NW4R/include/**",
|
||||
"${workspaceFolder}/libs/EGG/include/**",
|
||||
"${workspaceFolder}/libs/RVLFaceLib/include/**"
|
||||
"${workspaceFolder}/libs/RVLFaceLib/include"
|
||||
],
|
||||
"cStandard": "c89",
|
||||
"cppStandard": "c++03"
|
||||
"cStandard": "c99",
|
||||
"cppStandard": "c++03",
|
||||
"intelliSenseMode": "linux-clang-x86",
|
||||
"compilerPath": "",
|
||||
"configurationProvider": "ms-vscode.makefile-tools"
|
||||
},
|
||||
{
|
||||
"name": "Win32",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/include/**",
|
||||
"${workspaceFolder}/libs/MSL/include/**",
|
||||
"${workspaceFolder}/libs/Runtime/include/**",
|
||||
"${workspaceFolder}/libs/RVL_SDK/include/**",
|
||||
"${workspaceFolder}/libs/RevoEX/include/**",
|
||||
"${workspaceFolder}/libs/NW4R/include/**",
|
||||
"${workspaceFolder}/libs/EGG/include/**",
|
||||
"${workspaceFolder}/libs/RVLFaceLib/include"
|
||||
],
|
||||
"cStandard": "c99",
|
||||
"cppStandard": "c++03",
|
||||
"intelliSenseMode": "windows-clang-x86",
|
||||
"compilerPath": "",
|
||||
"configurationProvider": "ms-vscode.makefile-tools"
|
||||
},
|
||||
{
|
||||
"name": "Mac",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/include/**",
|
||||
"${workspaceFolder}/libs/MSL/include/**",
|
||||
"${workspaceFolder}/libs/Runtime/include/**",
|
||||
"${workspaceFolder}/libs/RVL_SDK/include/**",
|
||||
"${workspaceFolder}/libs/RevoEX/include/**",
|
||||
"${workspaceFolder}/libs/NW4R/include/**",
|
||||
"${workspaceFolder}/libs/EGG/include/**",
|
||||
"${workspaceFolder}/libs/RVLFaceLib/include"
|
||||
],
|
||||
"cStandard": "c99",
|
||||
"cppStandard": "c++03",
|
||||
"intelliSenseMode": "macos-clang-x86",
|
||||
"compilerPath": "",
|
||||
"configurationProvider": "ms-vscode.makefile-tools"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
|
||||
13
.vscode/extensions.json
vendored
Normal file
13
.vscode/extensions.json
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"recommendations": [
|
||||
"llvm-vs-code-extensions.vscode-clangd",
|
||||
"ms-python.black-formatter",
|
||||
"ms-python.flake8",
|
||||
],
|
||||
"unwantedRecommendations": [
|
||||
"ms-vscode.cmake-tools",
|
||||
"ms-vscode.cpptools-extension-pack",
|
||||
"ms-vscode.cpptools",
|
||||
]
|
||||
}
|
||||
|
||||
24
.vscode/settings.json
vendored
Normal file
24
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,24 @@
|
||||
{
|
||||
"[c]": {
|
||||
"files.encoding": "utf8",
|
||||
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd"
|
||||
},
|
||||
"[cpp]": {
|
||||
"files.encoding": "utf8",
|
||||
"editor.defaultFormatter": "llvm-vs-code-extensions.vscode-clangd"
|
||||
},
|
||||
"[python]": {
|
||||
"editor.defaultFormatter": "ms-python.black-formatter"
|
||||
},
|
||||
// "editor.tabSize": 2,
|
||||
"files.autoSave": "onFocusChange",
|
||||
"files.insertFinalNewline": true,
|
||||
"files.trimFinalNewlines": true,
|
||||
"files.associations": {
|
||||
"*.inc": "c",
|
||||
".clangd": "yaml"
|
||||
},
|
||||
// Disable C/C++ IntelliSense, use clangd instead
|
||||
"C_Cpp.intelliSenseEngine": "disabled",
|
||||
}
|
||||
|
||||
16
.vscode/tasks.json
vendored
Normal file
16
.vscode/tasks.json
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
{
|
||||
// Use Ctrl+Shift+B to run build tasks.
|
||||
// Or "Run Build Task" in the Command Palette.
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "ninja",
|
||||
"type": "shell",
|
||||
"command": "ninja",
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
}
|
||||
},
|
||||
]
|
||||
}
|
||||
117
Makefile
117
Makefile
@@ -1,117 +0,0 @@
|
||||
DEPENDENCIES =
|
||||
|
||||
# IPL executable defines
|
||||
VERSION := 43U
|
||||
|
||||
IPL_INFILE = base.$(VERSION).app
|
||||
IPL_DTKFILE = base.$(VERSION).dtk
|
||||
IPL_OUTFILE = ipl.$(VERSION).app
|
||||
|
||||
# Directory defines (must be here)
|
||||
BUILD_ROOT = build
|
||||
BUILD_INPUT_ROOT = $(BUILD_ROOT)/inputs
|
||||
CONFIG_ROOT = config/$(VERSION)
|
||||
DATA_ROOT = data/$(VERSION)
|
||||
DATA_OUT_ROOT = $(DATA_ROOT)/build
|
||||
ASSEMBLY_ROOT = asm
|
||||
SOURCE_ROOT = src
|
||||
INCLUDE_ROOT = include
|
||||
OBJECT_ROOT = obj
|
||||
RULES_ROOT = rules
|
||||
TOOLS_ROOT = tools
|
||||
LIBRARIES_ROOT = libs
|
||||
|
||||
SPLIT_UNITS = $(CONFIG_ROOT)/splits.txt
|
||||
SPLIT_SYMBOLS = $(CONFIG_ROOT)/symbols.txt
|
||||
SPLIT_FILE = $(CONFIG_ROOT)/dtkconfig.yml
|
||||
SPLIT_ROOT = $(BUILD_ROOT)/split_$(VERSION)
|
||||
SPLIT_OBJ_ROOT = $(SPLIT_ROOT)/obj
|
||||
SPLIT_LIBOBJ_ROOT = $(SPLIT_OBJ_ROOT)/libs
|
||||
LINKER_FILE = $(SPLIT_ROOT)/ldscript.lcf
|
||||
|
||||
# Library path defines (must be here)
|
||||
RUNTIME_ROOT = $(LIBRARIES_ROOT)/Runtime
|
||||
METROTRK_ROOT = $(LIBRARIES_ROOT)/MetroTRK
|
||||
MSL_ROOT = $(LIBRARIES_ROOT)/MSL
|
||||
REVOLUTION_SDK_ROOT = $(LIBRARIES_ROOT)/RVL_SDK
|
||||
REVOLUTION_EXT_ROOT = $(LIBRARIES_ROOT)/RevoEX
|
||||
NW4R_ROOT = $(LIBRARIES_ROOT)/NW4R
|
||||
EGG_ROOT = $(LIBRARIES_ROOT)/EGG
|
||||
RVLFACELIB_ROOT = $(LIBRARIES_ROOT)/RVLFaceLib
|
||||
EZITEXT_ROOT = $(LIBRARIES_ROOT)/RVLMiddleware/eZiText
|
||||
JSATOK_ROOT = $(LIBRARIES_ROOT)/RVLMiddleware/ATOKDict
|
||||
TMCJPEG_ROOT = $(LIBRARIES_ROOT)/RVLMiddleware/TMC_JPEG
|
||||
|
||||
# Checks
|
||||
|
||||
ifeq (,$(wildcard $(IPL_INFILE)))
|
||||
$(error Obtain the Wii Menu's Executable file, place it in this directory and rename it to $(IPL_INFILE))
|
||||
endif
|
||||
|
||||
# Include the main definitions
|
||||
-include $(RULES_ROOT)/global/define.mak
|
||||
-include $(RULES_ROOT)/global/build.mak
|
||||
|
||||
.PHONY: prepare all clean
|
||||
|
||||
.NOTPARALLEL: $(BUILD_ROOT)/$(IPL_OUTFILE)
|
||||
|
||||
# Build
|
||||
all: $(SPLIT_ROOT) $(BUILD_ROOT)/$(IPL_OUTFILE)
|
||||
@echo Build complete!
|
||||
|
||||
# Split
|
||||
$(SPLIT_ROOT): $(SPLIT_FILE) $(SPLIT_UNITS) $(SPLIT_SYMBOLS)
|
||||
@echo Splitting IPL executable...
|
||||
@mkdir -p $(BUILD_INPUT_ROOT)
|
||||
@$(TOOLS_ROOT)/$(IPL2DTK) $(IPL_INFILE) $(BUILD_INPUT_ROOT)/$(IPL_DTKFILE)
|
||||
@$(DTK) dol split $(SPLIT_FILE) $(SPLIT_ROOT)
|
||||
|
||||
# Link
|
||||
$(BUILD_ROOT)/$(IPL_OUTFILE): $(SPLIT_ROOT) bs1 bs2
|
||||
@echo Converting ELF files to $@...
|
||||
@$(TOOLS_ROOT)/$(ELF2BS) -b $(IPL_INFILE) -bs1 $(BS1_BLD_PATH)/$(BS1_ELF_NAME).elf -bs2 $(BS2_GBL_BLD_PATH)/$(BS2_ELF_NAME).elf -bs2_size $(BS2_IMAGE_SIZE) -output $@
|
||||
@echo ========================================================================
|
||||
@echo SHA1 Sum should fail here as it does not link a matching executable yet.
|
||||
@echo ========================================================================
|
||||
@$(SHA1) -c $(CONFIG_ROOT)/sha1.txt
|
||||
|
||||
# Clean
|
||||
clean: clean_Runtime clean_RVL_SDK clean_RevoEX clean_NW4R clean_RFL clean_eZiText clean_TMCJpeg clean_bs1 clean_bs2 clean_data clean_ATOK
|
||||
@rm -rf $(SPLIT_ROOT)
|
||||
@rm -rf $(BUILD_ROOT)/$(IPL_OUTFILE)
|
||||
|
||||
# Prepare
|
||||
prepare: PrepareDecomp
|
||||
|
||||
### Prepare rules
|
||||
-include $(RULES_ROOT)/Prepare.mak
|
||||
|
||||
# Library rules
|
||||
-include $(RUNTIME_ROOT)/$(RULES_ROOT)/$(DEFRULES).mak
|
||||
-include $(REVOLUTION_SDK_ROOT)/$(RULES_ROOT)/$(DEFRULES).mak
|
||||
-include $(REVOLUTION_EXT_ROOT)/$(RULES_ROOT)/$(DEFRULES).mak
|
||||
-include $(NW4R_ROOT)/$(RULES_ROOT)/$(DEFRULES).mak
|
||||
-include $(RVLFACELIB_ROOT)/$(RULES_ROOT)/$(DEFRULES).mak
|
||||
-include $(EZITEXT_ROOT)/$(RULES_ROOT)/$(DEFRULES).mak
|
||||
-include $(JSATOK_ROOT)/$(RULES_ROOT)/$(DEFRULES).mak
|
||||
-include $(TMCJPEG_ROOT)/$(RULES_ROOT)/$(DEFRULES).mak
|
||||
|
||||
# App rules
|
||||
-include $(RULES_ROOT)/BS1rules.mak
|
||||
-include $(RULES_ROOT)/BS2rules.mak
|
||||
|
||||
# Inlcude dependencies
|
||||
DEPENDENCIES += $(MAKECMDGOALS:.o=.d)
|
||||
ifneq ($(MAKECMDGOALS),clean)
|
||||
ifneq ($(MAKECMDGOALS),prepare)
|
||||
-include $(DEPENDENCIES)
|
||||
endif
|
||||
endif
|
||||
|
||||
# Data rules (auto generated by extract_bin.py)
|
||||
ifneq (,$(wildcard $(DATA_ROOT)/$(DEFRULES).mak))
|
||||
-include $(DATA_ROOT)/$(DEFRULES).mak
|
||||
endif
|
||||
|
||||
|
||||
147
README.md
147
README.md
@@ -1,87 +1,104 @@
|
||||

|
||||
# Wii Menu Decompilation [![Discord Server][discord-server-badge]][discord-server-link]
|
||||
[discord-server-link]: https://discord.gg/hKx3FJJgrV
|
||||
[discord-server-badge]: https://img.shields.io/discord/727908905392275526?color=%237289DA&logo=discord&logoColor=%23FFFFFF
|
||||
This work in progress repository aims to a full 1:1 decompilation of version 4.3 of the Wii Menu.
|
||||
Currenty working supported versions:
|
||||
- 4.3U (USA)
|
||||
- 4.3E (Europe)
|
||||

|
||||
Wii Menu
|
||||
[![Build Status]][actions] [![Discord Badge]][discord]
|
||||
========
|
||||
|
||||
This repository requires a WAD of the Wii Menu.
|
||||
[Build Status]: https://github.com/koopthekoopa/wii-ipl/actions/workflows/build.yml/badge.svg
|
||||
[actions]: https://github.com/koopthekoopa/ipl/actions/workflows/build.yml
|
||||
[Discord Badge]: https://img.shields.io/discord/727908905392275526?color=%237289DA&logo=discord&logoColor=%23FFFFFF
|
||||
[discord]: https://discord.gg/hKx3FJJgrV
|
||||
|
||||
## Dependencies
|
||||
**TODO: Build for Mac OS**
|
||||
The following dependencies are required to build the decompilation:
|
||||
A work-in-progress decompilation of the Wii Menu (4.3).
|
||||
|
||||
- Git (optional)
|
||||
- Python 3
|
||||
- GCC
|
||||
This repository does **not** contain any assets or assembly of the executable whatsoever. An existing copy of the Wii Menu is required.
|
||||
|
||||
Below is how to install the dependencies that is depending on your Operating System.
|
||||
Supported versions:
|
||||
- `43J`: Version 4.3J (Japan)
|
||||
- `43U`: Version 4.3U (USA)
|
||||
- `43E`: Version 4.3E (Europe)
|
||||
- `43K`: Version 4.3K (Korean)
|
||||
|
||||
### Windows
|
||||
Installing Dependencies
|
||||
=======================
|
||||
|
||||
**If you are using WSL, you should follow the [Linux](#linux) section instead.**
|
||||
Windows
|
||||
-------
|
||||
|
||||
With MSYS2, this is how you install the dependencies
|
||||
> [!NOTE]
|
||||
> On Windows, it's **highly recommended** to use native tooling. WSL or MSYS2 are **not** required.
|
||||
> When running under WSL, [objdiff](#diffing) is unable to get filesystem notifications for automatic rebuilds.
|
||||
|
||||
```
|
||||
pacman -S git make mingw-w64-x86_64-gcc mingw-w64-x86_64-python mingw-w64-i686-gcc mingw-w64-i686-python
|
||||
```
|
||||
- Install [Python](https://www.python.org/downloads/) and add it to `PATH` environment variable.
|
||||
- Setup will ask you if you want to add python to `%PATH%`, make sure that is enabled.
|
||||
- Python is also available from the [Windows Store](https://apps.microsoft.com/store/detail/python-311/9NRWMJP3717K).
|
||||
- Download the ninja tool [here](https://github.com/ninja-build/ninja/releases) and either add it to `PATH` environment variable **or** the repository directory.
|
||||
- You can install ninja quickly via pip (if you have it installed via Python's setup)
|
||||
- `pip install ninja`
|
||||
|
||||
If you wish to not use either MSYS2 nor WSL then make sure that GCC and Make are in PATH environment variable.
|
||||
You will also need to install Python 3 yourself [here](https://www.python.org/downloads/) (make sure that `python.exe` is in your `PATH` variable).
|
||||
macOS
|
||||
-----
|
||||
|
||||
### Linux
|
||||
- Install the [ninja](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages) tool:
|
||||
|
||||
For Ubuntu/Debian:
|
||||
```
|
||||
sudo apt install build-essential git python3
|
||||
```
|
||||
|
||||
For Arch Linux:
|
||||
```
|
||||
sudo pacman -S base-devel python git
|
||||
```
|
||||
|
||||
### Automatically downloaded tools
|
||||
Here are a list of tools that get downloaded when you run `make prepare`:
|
||||
- [wibo](https://github.com/decompals/wibo) (when using linux)
|
||||
- [gc-wii-binutils](https://github.com/encounter/gc-wii-binutils)
|
||||
- [decomp-toolkit](https://www.github.com/encounter/decomp-toolkit)
|
||||
|
||||
## Building the Decompilation
|
||||
**NOTE: This will not compile a working Wii Menu yet!**
|
||||
- If you have git, clone the decompilation repository by inputting this to your terminal:
|
||||
```sh
|
||||
brew install ninja
|
||||
```
|
||||
|
||||
- Install [wine-crossover](https://github.com/Gcenx/homebrew-wine):
|
||||
|
||||
```sh
|
||||
brew install --cask --no-quarantine gcenx/wine/wine-crossover
|
||||
```
|
||||
|
||||
After OS upgrades, if macOS complains about `Wine Crossover.app` being unverified, you can unquarantine it using:
|
||||
|
||||
```sh
|
||||
sudo xattr -rd com.apple.quarantine '/Applications/Wine Crossover.app'
|
||||
```
|
||||
|
||||
Linux
|
||||
-----
|
||||
|
||||
- Install [ninja](https://github.com/ninja-build/ninja/wiki/Pre-built-Ninja-packages).
|
||||
- For non-x86(_64) platforms, you must install wine from your package manager.
|
||||
- For x86(_64), [wibo](https://github.com/decompals/wibo), a minimal 32-bit Windows binary wrapper, will be automatically downloaded and used.
|
||||
|
||||
Building the Decompilation
|
||||
==========================
|
||||
|
||||
- Clone the repository:
|
||||
|
||||
```sh
|
||||
git clone https://github.com/koopthekoopa/wii-ipl.git
|
||||
```
|
||||
- Otherwise download the repository by clicking on **Code** then **Download ZIP** then extract the .zip contents
|
||||
|
||||
- As stated above, you will need a WAD of the Wii Menu to grab its executable.
|
||||
- Use your preferred WAD Extractor (I recommend ShowMiiWADs as it also works fine on Linux, if you have Wine) and use it to extract the Wii Menu WAD file.
|
||||
- Then copy the executable file `00000008.app` to the decompilation directory and rename it to `base.<version>.app`
|
||||
- Make sure the version on the filename does not include the decimal at the middle (for example `4.3U` should be `43U`)
|
||||
- Check to make sure the file matches with the [SHA-1 Sums](#sums)!
|
||||
- Copy the Wii Menu WAD to `orig/[Wii Menu Version]`.
|
||||
- Rename the WAD to `base.wad`
|
||||
|
||||
- You are now ready to build! To build you need to type in:
|
||||
- Configure:
|
||||
|
||||
```sh
|
||||
python configure.py
|
||||
```
|
||||
make VERSION=<version>
|
||||
|
||||
To use a version other than the default one, 4.3U, use the `--version` argument.
|
||||
|
||||
- Build:
|
||||
|
||||
```sh
|
||||
ninja
|
||||
```
|
||||
- Where `<version>` is the chosen version to compile. (If you do not define `VERSION`, it will compile 4.3U by default)
|
||||
- The output should be `ipl.<version>.app` in the build folder.
|
||||
|
||||
## Sums
|
||||
|File|SHA-1|
|
||||
|-------------------------------|-----------------------------|
|
||||
|`ipl.43U.app` (Wii Menu 4.3U)|`26116613f624061ba99c8d1a299aaa6efa85670d`|
|
||||
|`ipl.43E.app` (Wii Menu 4.3E)|`2ebea6ed22473857ed64b12daa71ae2d1ed61708`|
|
||||
|`ipl.43J.app` (Wii Menu 4.3J)|`c94c8e671854d56fa2abd4c4c886e6c62a2c7f0e`|
|
||||
|`ipl.43K.app` (Wii Menu 4.3K)|`98496cc8467f0749d7605fc175b1911827aa1fd0`|
|
||||
> [!WARNING]
|
||||
> The code is not 100% shiftable, most of it works aside from a couple of things (such as Wii Settings and a few channel banners like the Forecast Channel)
|
||||
|
||||
# Tools used
|
||||
[decomp-toolkit](https://www.github.com/encounter/decomp-toolkit) - A tool that can do a lot and will make decompiling GameCube/Wii games easier and better.
|
||||
[objdiff](https://www.github.com/encounter/objdiff) - Used to check whenever if the compiled object is matching or not.
|
||||
[Ghidra](https://www.github.com/NationalSecurityAgency/ghidra) - Used to load executables and output a rough decompilaton of a function.
|
||||
Diffing
|
||||
=======
|
||||
|
||||
Once the initial build succeeds, an `objdiff.json` should exist in the project root.
|
||||
|
||||
Download the latest release from [encounter/objdiff](https://github.com/encounter/objdiff). Under project settings, set `Project directory`. The configuration should be loaded automatically.
|
||||
|
||||
Select an object from the left sidebar to begin diffing. Changes to the project will rebuild automatically: changes to source files, headers, `configure.py`, `splits.txt` or `symbols.txt`.
|
||||
|
||||

|
||||
|
||||
162
asm/BS1.s
162
asm/BS1.s
@@ -1,162 +0,0 @@
|
||||
/*-------------------------------------------------*
|
||||
Wii Menu Boot Stage 1
|
||||
Disassembled from Version 4.3 (PAL)
|
||||
but they are the exact same in every version
|
||||
*--------------------------------------------------*/
|
||||
|
||||
/* `__start` MUST BE LINKED FIRST AT 0x80003400 */
|
||||
|
||||
#include "BS1.inc"
|
||||
.text
|
||||
.globl __start
|
||||
__start:
|
||||
/* Set up HID0 */
|
||||
addis r4, r0, HID0_DEFAULT@ha
|
||||
addi r4, r4, HID0_DEFAULT@l
|
||||
mtspr hid0, r4
|
||||
|
||||
/* Set up MSR */
|
||||
addis r4, r0, MSR_ADDRESS@ha
|
||||
addi r4, r4, MSR_ADDRESS@l
|
||||
mtmsr r4
|
||||
|
||||
/* Enable L1 cache */
|
||||
mfspr r3, hid0
|
||||
ori r4, r3, ENABLE_L1@l
|
||||
mtspr hid0, r4
|
||||
|
||||
/* Clear BATs */
|
||||
isync
|
||||
addi r4, r0, 0
|
||||
mtspr dbat0u, r4
|
||||
mtspr dbat1u, r4
|
||||
mtspr dbat2u, r4
|
||||
mtspr dbat3u, r4
|
||||
mtspr dbat4u, r4
|
||||
mtspr dbat5u, r4
|
||||
mtspr ibat0u, r4
|
||||
mtspr ibat1u, r4
|
||||
mtspr ibat2u, r4
|
||||
mtspr ibat3u, r4
|
||||
mtspr ibat4u, r4
|
||||
mtspr ibat5u, r4
|
||||
|
||||
/* Initialize SR registers for exceptions */
|
||||
isync
|
||||
addis r4, r0, SR_EXCEPTION@ha
|
||||
addi r4, r4, SR_EXCEPTION@l
|
||||
|
||||
mtsr 0, r4
|
||||
mtsr 1, r4
|
||||
mtsr 2, r4
|
||||
mtsr 3, r4
|
||||
mtsr 4, r4
|
||||
mtsr 5, r4
|
||||
mtsr 6, r4
|
||||
mtsr 7, r4
|
||||
mtsr 8, r4
|
||||
mtsr 9, r4
|
||||
mtsr 10, r4
|
||||
mtsr 11, r4
|
||||
mtsr 12, r4
|
||||
mtsr 13, r4
|
||||
mtsr 14, r4
|
||||
mtsr 15, r4
|
||||
|
||||
/* Initialize BATs */
|
||||
|
||||
/* BAT 0 */
|
||||
addis r4, r0, BAT0_ADDR@ha
|
||||
addi r4, r4, BAT0_ADDR@l
|
||||
addis r3, r0, BAT0_VALUE@ha
|
||||
addi r3, r3, BAT0_VALUE@l
|
||||
|
||||
mtspr dbat0l, r4
|
||||
mtspr dbat0u, r3
|
||||
|
||||
isync
|
||||
|
||||
mtspr ibat0l, r4
|
||||
mtspr ibat0u, r3
|
||||
|
||||
isync
|
||||
|
||||
/* BAT 1 */
|
||||
addis r4, r0, BAT1_ADDR@ha
|
||||
addi r4, r4, BAT1_ADDR@l
|
||||
addis r3, r0, BAT1_VALUE@ha
|
||||
addi r3, r3, BAT1_VALUE@l
|
||||
|
||||
mtspr dbat1l, r4
|
||||
mtspr dbat1u, r3
|
||||
|
||||
isync
|
||||
|
||||
/* BAT 4 */
|
||||
addis r4, r0, BAT4_ADDR@ha
|
||||
addi r4, r4, BAT4_ADDR@l
|
||||
addis r3, r0, BAT4_VALUE@ha
|
||||
addi r3, r3, BAT4_VALUE@l
|
||||
|
||||
mtspr dbat4l, r4
|
||||
mtspr dbat4u, r3
|
||||
|
||||
isync
|
||||
|
||||
mtspr ibat4l, r4
|
||||
mtspr ibat4u, r3
|
||||
|
||||
isync
|
||||
|
||||
/* BAT 5 */
|
||||
addis r4, r0, BAT5_ADDR@ha
|
||||
addi r4, r4, BAT5_ADDR@l
|
||||
addis r3, r0, BAT5_VALUE@ha
|
||||
addi r3, r3, BAT5_VALUE@l
|
||||
|
||||
mtspr dbat5l, r4
|
||||
mtspr dbat5u, r3
|
||||
|
||||
isync
|
||||
|
||||
/* BAT 3 */
|
||||
addis r4, r0, BAT3_ADDR@ha
|
||||
addi r4, r4, BAT3_ADDR@l
|
||||
addis r3, r0, BAT3_VALUE@ha
|
||||
addi r3, r3, BAT3_VALUE@l
|
||||
|
||||
mtspr dbat3l, r4
|
||||
mtspr dbat3u, r3
|
||||
|
||||
isync
|
||||
|
||||
mtspr ibat3l, r4
|
||||
mtspr ibat3u, r3
|
||||
|
||||
/* Set up MMU */
|
||||
isync
|
||||
mfmsr r4
|
||||
ori r4, r4, 0x0030
|
||||
mtmsr r4
|
||||
|
||||
isync
|
||||
|
||||
/* Load the Boot Info 2 (BI2) Data */
|
||||
lis r3, BI2_ADDRESS@ha
|
||||
li r4, 0
|
||||
stw r4, BI2_ADDRESS@l(r3)
|
||||
lis r4, 0
|
||||
|
||||
/* The First Boot Stage (BS1) is done! Now jump the Second Boot Stage (BS2). */
|
||||
ori r4, r4, BS2_ENTRY_OFFSET@l
|
||||
lwz r4, 0(r4)
|
||||
mtlr r4
|
||||
blr
|
||||
|
||||
.align BS1_ALIGN
|
||||
|
||||
/* At the end of BS1 */
|
||||
.space BS2_ENTRY_PAD
|
||||
.long BS2_ENTRY
|
||||
|
||||
|
||||
1
config/43E/build.real.sha1
Normal file
1
config/43E/build.real.sha1
Normal file
@@ -0,0 +1 @@
|
||||
2ebea6ed22473857ed64b12daa71ae2d1ed61708 build/43E/main.app
|
||||
1
config/43E/build.sha1
Normal file
1
config/43E/build.sha1
Normal file
@@ -0,0 +1 @@
|
||||
CBBF437BA9508A842B27C833323C960FD42435D8 build/43E/main.app
|
||||
65
config/43E/config.yml
Normal file
65
config/43E/config.yml
Normal file
@@ -0,0 +1,65 @@
|
||||
object: 'build/43E/base/main.dol'
|
||||
|
||||
symbols: 'config/43E/symbols.txt'
|
||||
splits: 'config/43E/splits.txt'
|
||||
|
||||
ldscript_template: ldscript_ipl2.lcf
|
||||
|
||||
export_all: true
|
||||
fill_gaps: false
|
||||
|
||||
extract:
|
||||
- symbol: ipl_error_eng_bmg
|
||||
binary: ipl_error_eng.bmg
|
||||
header: ipl_error_eng_bmg.inc
|
||||
|
||||
- symbol: ipl_error_fra_bmg
|
||||
binary: ipl_error_fra.bmg
|
||||
header: ipl_error_fra_bmg.inc
|
||||
|
||||
- symbol: ipl_error_ger_bmg
|
||||
binary: ipl_error_ger.bmg
|
||||
header: ipl_error_ger_bmg.inc
|
||||
|
||||
- symbol: ipl_error_ita_bmg
|
||||
binary: ipl_error_ita.bmg
|
||||
header: ipl_error_ita_bmg.inc
|
||||
|
||||
- symbol: ipl_error_jpn_bmg
|
||||
binary: ipl_error_jpn.bmg
|
||||
header: ipl_error_jpn_bmg.inc
|
||||
|
||||
- symbol: ipl_error_ned_bmg
|
||||
binary: ipl_error_ned.bmg
|
||||
header: ipl_error_ned_bmg.inc
|
||||
|
||||
- symbol: ipl_error_spa_bmg
|
||||
binary: ipl_error_spa.bmg
|
||||
header: ipl_error_spa_bmg.inc
|
||||
|
||||
- symbol: ipl_error_kor_bmg
|
||||
binary: ipl_error_kor.bmg
|
||||
header: ipl_error_kor_bmg.inc
|
||||
|
||||
- symbol: ipl_error_chn_bmg
|
||||
binary: ipl_error_chn.bmg
|
||||
header: ipl_error_chn_bmg.inc
|
||||
|
||||
- symbol: fatalDlg_ash
|
||||
binary: fatalDlg.ash
|
||||
header: fatalDlg_ash.inc
|
||||
|
||||
- symbol: backToWiiMenu_arc
|
||||
binary: backToWiiMenu.arc
|
||||
header: backToWiiMenu_arc.inc
|
||||
|
||||
- symbol: axDspSlave
|
||||
binary: axDspSlave.bin
|
||||
header: axDspSlave.inc
|
||||
|
||||
# fix up bss nightmare from the generated dol
|
||||
block_relocations:
|
||||
- target: .bss:0x811B1498
|
||||
end: .bss:0x8132FFFF
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
object: 'build/inputs/base.43E.dtk'
|
||||
|
||||
symbols: 'config/43E/symbols.txt'
|
||||
splits: 'config/43E/splits.txt'
|
||||
|
||||
ldscript_template: ldscript_ipl2.lcf
|
||||
|
||||
export_all: true
|
||||
fill_gaps: false
|
||||
|
||||
# fix up bss nightmare from the generated dol
|
||||
block_relocations:
|
||||
- target: .bss:0x811B1498
|
||||
end: .bss:0x8132FFFF
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
ipl_error_eng.bmg,0x30A0E0,0x3E0
|
||||
ipl_error_fra.bmg,0x30A4C0,0x420
|
||||
ipl_error_ger.bmg,0x30A8E0,0x460
|
||||
ipl_error_ita.bmg,0x30AD40,0x460
|
||||
ipl_error_jpn.bmg,0x30B1A0,0x280
|
||||
ipl_error_ned.bmg,0x30B420,0x3A0
|
||||
ipl_error_spa.bmg,0x30B7C0,0x420
|
||||
ipl_error_kor.bmg,0x30BBE0,0x220
|
||||
ipl_error_chn.bmg,0x30BE00,0x1C0
|
||||
fatalDlg.ash,0x30BFC0,0x5A08
|
||||
backToWiiMenu.arc,0x318FC0,0x2720
|
||||
|
@@ -1 +0,0 @@
|
||||
2ebea6ed22473857ed64b12daa71ae2d1ed61708 build/ipl.43E.app
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1
config/43J/build.real.sha1
Normal file
1
config/43J/build.real.sha1
Normal file
@@ -0,0 +1 @@
|
||||
c94c8e671854d56fa2abd4c4c886e6c62a2c7f0e build/43J/main.app
|
||||
1
config/43J/build.sha1
Normal file
1
config/43J/build.sha1
Normal file
@@ -0,0 +1 @@
|
||||
F944B6F05F25EC50992F25B39655314BDF566201 build/43J/main.app
|
||||
65
config/43J/config.yml
Normal file
65
config/43J/config.yml
Normal file
@@ -0,0 +1,65 @@
|
||||
object: 'build/43J/base/main.dol'
|
||||
|
||||
symbols: 'config/43J/symbols.txt'
|
||||
splits: 'config/43J/splits.txt'
|
||||
|
||||
ldscript_template: ldscript_ipl2.lcf
|
||||
|
||||
export_all: true
|
||||
fill_gaps: false
|
||||
|
||||
extract:
|
||||
- symbol: ipl_error_eng_bmg
|
||||
binary: ipl_error_eng.bmg
|
||||
header: ipl_error_eng_bmg.inc
|
||||
|
||||
- symbol: ipl_error_fra_bmg
|
||||
binary: ipl_error_fra.bmg
|
||||
header: ipl_error_fra_bmg.inc
|
||||
|
||||
- symbol: ipl_error_ger_bmg
|
||||
binary: ipl_error_ger.bmg
|
||||
header: ipl_error_ger_bmg.inc
|
||||
|
||||
- symbol: ipl_error_ita_bmg
|
||||
binary: ipl_error_ita.bmg
|
||||
header: ipl_error_ita_bmg.inc
|
||||
|
||||
- symbol: ipl_error_jpn_bmg
|
||||
binary: ipl_error_jpn.bmg
|
||||
header: ipl_error_jpn_bmg.inc
|
||||
|
||||
- symbol: ipl_error_ned_bmg
|
||||
binary: ipl_error_ned.bmg
|
||||
header: ipl_error_ned_bmg.inc
|
||||
|
||||
- symbol: ipl_error_spa_bmg
|
||||
binary: ipl_error_spa.bmg
|
||||
header: ipl_error_spa_bmg.inc
|
||||
|
||||
- symbol: ipl_error_kor_bmg
|
||||
binary: ipl_error_kor.bmg
|
||||
header: ipl_error_kor_bmg.inc
|
||||
|
||||
- symbol: ipl_error_chn_bmg
|
||||
binary: ipl_error_chn.bmg
|
||||
header: ipl_error_chn_bmg.inc
|
||||
|
||||
- symbol: fatalDlg_ash
|
||||
binary: fatalDlg.ash
|
||||
header: fatalDlg_ash.inc
|
||||
|
||||
- symbol: backToWiiMenu_arc
|
||||
binary: backToWiiMenu.arc
|
||||
header: backToWiiMenu_arc.inc
|
||||
|
||||
- symbol: axDspSlave
|
||||
binary: axDspSlave.bin
|
||||
header: axDspSlave.inc
|
||||
|
||||
# fix up bss nightmare from the generated dol
|
||||
block_relocations:
|
||||
- target: .bss:0x811C10D8
|
||||
end: .bss:0x8132FFFF
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
object: 'build/inputs/base.43J.dtk'
|
||||
|
||||
symbols: 'config/43J/symbols.txt'
|
||||
splits: 'config/43J/splits.txt'
|
||||
|
||||
ldscript_template: ldscript_ipl2.lcf
|
||||
|
||||
export_all: true
|
||||
fill_gaps: false
|
||||
|
||||
# fix up bss nightmare from the generated dol
|
||||
block_relocations:
|
||||
- target: .bss:0x811C10D8
|
||||
end: .bss:0x8132FFFF
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
ipl_error_eng.bmg,0x33A700,0x3E0
|
||||
ipl_error_fra.bmg,0x33AAE0,0x420
|
||||
ipl_error_ger.bmg,0x33AF00,0x460
|
||||
ipl_error_ita.bmg,0x33B360,0x460
|
||||
ipl_error_jpn.bmg,0x33B7C0,0x280
|
||||
ipl_error_ned.bmg,0x33BA40,0x3A0
|
||||
ipl_error_spa.bmg,0x33BDE0,0x420
|
||||
ipl_error_kor.bmg,0x33C200,0x220
|
||||
ipl_error_chn.bmg,0x33C420,0x1C0
|
||||
fatalDlg.ash,0x33C5E0,0x5A08
|
||||
backToWiiMenu.arc,0x3495E0,0x2720
|
||||
|
@@ -1 +0,0 @@
|
||||
c94c8e671854d56fa2abd4c4c886e6c62a2c7f0e build/ipl.43J.app
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1
config/43K/build.real.sha1
Normal file
1
config/43K/build.real.sha1
Normal file
@@ -0,0 +1 @@
|
||||
98496cc8467f0749d7605fc175b1911827aa1fd0 build/43K/main.app
|
||||
1
config/43K/build.sha1
Normal file
1
config/43K/build.sha1
Normal file
@@ -0,0 +1 @@
|
||||
B055733997FBE8D0C531E3E105C6AAFAC18E7C66 build/43K/main.app
|
||||
65
config/43K/config.yml
Normal file
65
config/43K/config.yml
Normal file
@@ -0,0 +1,65 @@
|
||||
object: 'build/43K/base/main.dol'
|
||||
|
||||
symbols: 'config/43K/symbols.txt'
|
||||
splits: 'config/43K/splits.txt'
|
||||
|
||||
ldscript_template: ldscript_ipl2.lcf
|
||||
|
||||
export_all: true
|
||||
fill_gaps: false
|
||||
|
||||
extract:
|
||||
- symbol: ipl_error_eng_bmg
|
||||
binary: ipl_error_eng.bmg
|
||||
header: ipl_error_eng_bmg.inc
|
||||
|
||||
- symbol: ipl_error_fra_bmg
|
||||
binary: ipl_error_fra.bmg
|
||||
header: ipl_error_fra_bmg.inc
|
||||
|
||||
- symbol: ipl_error_ger_bmg
|
||||
binary: ipl_error_ger.bmg
|
||||
header: ipl_error_ger_bmg.inc
|
||||
|
||||
- symbol: ipl_error_ita_bmg
|
||||
binary: ipl_error_ita.bmg
|
||||
header: ipl_error_ita_bmg.inc
|
||||
|
||||
- symbol: ipl_error_jpn_bmg
|
||||
binary: ipl_error_jpn.bmg
|
||||
header: ipl_error_jpn_bmg.inc
|
||||
|
||||
- symbol: ipl_error_ned_bmg
|
||||
binary: ipl_error_ned.bmg
|
||||
header: ipl_error_ned_bmg.inc
|
||||
|
||||
- symbol: ipl_error_spa_bmg
|
||||
binary: ipl_error_spa.bmg
|
||||
header: ipl_error_spa_bmg.inc
|
||||
|
||||
- symbol: ipl_error_kor_bmg
|
||||
binary: ipl_error_kor.bmg
|
||||
header: ipl_error_kor_bmg.inc
|
||||
|
||||
- symbol: ipl_error_chn_bmg
|
||||
binary: ipl_error_chn.bmg
|
||||
header: ipl_error_chn_bmg.inc
|
||||
|
||||
- symbol: fatalDlg_ash
|
||||
binary: fatalDlg.ash
|
||||
header: fatalDlg_ash.inc
|
||||
|
||||
- symbol: backToWiiMenu_arc
|
||||
binary: backToWiiMenu.arc
|
||||
header: backToWiiMenu_arc.inc
|
||||
|
||||
- symbol: axDspSlave
|
||||
binary: axDspSlave.bin
|
||||
header: axDspSlave.inc
|
||||
|
||||
# fix up bss nightmare from the generated dol
|
||||
block_relocations:
|
||||
- target: .bss:0x811AF814
|
||||
end: .bss:0x8132FFFF
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
object: 'build/inputs/base.43K.dtk'
|
||||
|
||||
symbols: 'config/43K/symbols.txt'
|
||||
splits: 'config/43K/splits.txt'
|
||||
|
||||
ldscript_template: ldscript_ipl2.lcf
|
||||
|
||||
export_all: true
|
||||
fill_gaps: false
|
||||
|
||||
# fix up bss nightmare from the generated dol
|
||||
block_relocations:
|
||||
- target: .bss:0x811AF814
|
||||
end: .bss:0x8132FFFF
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
ipl_error_eng.bmg,0x2E1F60,0x3E0
|
||||
ipl_error_fra.bmg,0x2E2340,0x420
|
||||
ipl_error_ger.bmg,0x2E2760,0x460
|
||||
ipl_error_ita.bmg,0x2E2BC0,0x460
|
||||
ipl_error_jpn.bmg,0x2E3020,0x280
|
||||
ipl_error_ned.bmg,0x2E32A0,0x3A0
|
||||
ipl_error_spa.bmg,0x2E3640,0x420
|
||||
ipl_error_kor.bmg,0x2E3A60,0x220
|
||||
ipl_error_chn.bmg,0x2E3C80,0x1C0
|
||||
fatalDlg.ash,0x2E3E40,0x2780
|
||||
backToWiiMenu.arc,0x2EDBC0,0x2720
|
||||
|
@@ -1 +0,0 @@
|
||||
98496cc8467f0749d7605fc175b1911827aa1fd0 build/ipl.43K.app
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1
config/43U/build.real.sha1
Normal file
1
config/43U/build.real.sha1
Normal file
@@ -0,0 +1 @@
|
||||
26116613f624061ba99c8d1a299aaa6efa85670d build/43U/main.app
|
||||
1
config/43U/build.sha1
Normal file
1
config/43U/build.sha1
Normal file
@@ -0,0 +1 @@
|
||||
9BD9ABBEC9007889ACB852A4B2E6E115C0A299F5 build/43U/main.app
|
||||
65
config/43U/config.yml
Normal file
65
config/43U/config.yml
Normal file
@@ -0,0 +1,65 @@
|
||||
object: 'build/43U/base/main.dol'
|
||||
|
||||
symbols: 'config/43U/symbols.txt'
|
||||
splits: 'config/43U/splits.txt'
|
||||
|
||||
ldscript_template: ldscript_ipl2.lcf
|
||||
|
||||
export_all: true
|
||||
fill_gaps: false
|
||||
|
||||
extract:
|
||||
- symbol: ipl_error_eng_bmg
|
||||
binary: ipl_error_eng.bmg
|
||||
header: ipl_error_eng_bmg.inc
|
||||
|
||||
- symbol: ipl_error_fra_bmg
|
||||
binary: ipl_error_fra.bmg
|
||||
header: ipl_error_fra_bmg.inc
|
||||
|
||||
- symbol: ipl_error_ger_bmg
|
||||
binary: ipl_error_ger.bmg
|
||||
header: ipl_error_ger_bmg.inc
|
||||
|
||||
- symbol: ipl_error_ita_bmg
|
||||
binary: ipl_error_ita.bmg
|
||||
header: ipl_error_ita_bmg.inc
|
||||
|
||||
- symbol: ipl_error_jpn_bmg
|
||||
binary: ipl_error_jpn.bmg
|
||||
header: ipl_error_jpn_bmg.inc
|
||||
|
||||
- symbol: ipl_error_ned_bmg
|
||||
binary: ipl_error_ned.bmg
|
||||
header: ipl_error_ned_bmg.inc
|
||||
|
||||
- symbol: ipl_error_spa_bmg
|
||||
binary: ipl_error_spa.bmg
|
||||
header: ipl_error_spa_bmg.inc
|
||||
|
||||
- symbol: ipl_error_kor_bmg
|
||||
binary: ipl_error_kor.bmg
|
||||
header: ipl_error_kor_bmg.inc
|
||||
|
||||
- symbol: ipl_error_chn_bmg
|
||||
binary: ipl_error_chn.bmg
|
||||
header: ipl_error_chn_bmg.inc
|
||||
|
||||
- symbol: fatalDlg_ash
|
||||
binary: fatalDlg.ash
|
||||
header: fatalDlg_ash.inc
|
||||
|
||||
- symbol: backToWiiMenu_arc
|
||||
binary: backToWiiMenu.arc
|
||||
header: backToWiiMenu_arc.inc
|
||||
|
||||
- symbol: axDspSlave
|
||||
binary: axDspSlave.bin
|
||||
header: axDspSlave.inc
|
||||
|
||||
# fix up bss nightmare from the generated dol
|
||||
block_relocations:
|
||||
- target: .bss:0x811B1498
|
||||
end: .bss:0x8132FFFF
|
||||
|
||||
|
||||
@@ -1,16 +0,0 @@
|
||||
object: 'build/inputs/base.43U.dtk'
|
||||
|
||||
symbols: 'config/43U/symbols.txt'
|
||||
splits: 'config/43U/splits.txt'
|
||||
|
||||
ldscript_template: ldscript_ipl2.lcf
|
||||
|
||||
export_all: true
|
||||
fill_gaps: false
|
||||
|
||||
# fix up bss nightmare from the generated dol
|
||||
block_relocations:
|
||||
- target: .bss:0x811B1498
|
||||
end: .bss:0x8132FFFF
|
||||
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
ipl_error_eng.bmg,0x309E20,0x3E0
|
||||
ipl_error_fra.bmg,0x30A200,0x420
|
||||
ipl_error_ger.bmg,0x30A620,0x460
|
||||
ipl_error_ita.bmg,0x30AA80,0x460
|
||||
ipl_error_jpn.bmg,0x30AEE0,0x280
|
||||
ipl_error_ned.bmg,0x30B160,0x3A0
|
||||
ipl_error_spa.bmg,0x30B500,0x420
|
||||
ipl_error_kor.bmg,0x30B920,0x220
|
||||
ipl_error_chn.bmg,0x30BB40,0x1C0
|
||||
fatalDlg.ash,0x30BD00,0x5A08
|
||||
backToWiiMenu.arc,0x318D00,0x2720
|
||||
|
@@ -1 +0,0 @@
|
||||
26116613f624061ba99c8d1a299aaa6efa85670d build/ipl.43U.app
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
1395
configure.py
Normal file
1395
configure.py
Normal file
File diff suppressed because it is too large
Load Diff
@@ -7,7 +7,9 @@
|
||||
|
||||
#include "channelScript/CHANSVmError.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define CHANS_VM_WORK_SIZE 0x40000
|
||||
|
||||
@@ -69,7 +71,9 @@ int CHANSVmGetArgInteger(CHANSVm* vm, int arg);
|
||||
float CHANSVmGetArgFloat(CHANSVm* vm, int arg);
|
||||
char* CHANSVmGetArgString(CHANSVm* vm, int arg);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // IPL_CHANNEL_SCRIPT_H
|
||||
|
||||
|
||||
@@ -10,8 +10,33 @@
|
||||
*/
|
||||
// #define ENABLE_BS2_REPORT
|
||||
|
||||
/** @brief Enables OSReport for DSP */
|
||||
// #define ENABLE_DSP_REPORT
|
||||
|
||||
#define SYSMENU_TITLE_ID 0x0000000100000002
|
||||
|
||||
/* Build options (set by the version being used) */
|
||||
|
||||
#if defined(VERSION_43U) || defined(VERSION_43E) || defined(VERSION_43J)
|
||||
#define USE_DICTIONARY
|
||||
#endif
|
||||
|
||||
#if defined(VERSION_43U) || defined(VERSION_43E)
|
||||
#define USE_ZI8
|
||||
#endif
|
||||
|
||||
#if defined(VERSION_43J)
|
||||
#define USE_ATOK
|
||||
#endif
|
||||
|
||||
/* Build types */
|
||||
|
||||
#if defined(VERSION_43U) || defined(VERSION_43E)
|
||||
#define ENGLISH_BUILD
|
||||
#endif
|
||||
|
||||
#if defined(VERSION_43K)
|
||||
#define KOREAN_BUILD
|
||||
#endif
|
||||
|
||||
#endif // IPL_CONFIG_H
|
||||
|
||||
|
||||
|
||||
@@ -6,11 +6,14 @@
|
||||
#define ROUNDUP(x, a) (((unsigned int)(x) + (a) - 1) & ~((a) - 1))
|
||||
#define PTR_ROUNDUP(x, a) ((void*)(((unsigned int)(x) + ((a) - 1)) & ~((a) - 1)))
|
||||
|
||||
#ifdef UNIT_DOESNT_MATCH
|
||||
#ifndef OBJDIFF
|
||||
#error This unit does not match yet. Use the assembly instead.
|
||||
#endif
|
||||
#endif
|
||||
#define NO_INLINE __attribute__((never_inline))
|
||||
|
||||
#define DECOMP_FORCEACTIVE(module, ...) \
|
||||
void fake_function(...); \
|
||||
void CONCAT(FORCEACTIVE##module, __LINE__)(void); \
|
||||
void CONCAT(FORCEACTIVE##module, __LINE__)(void) { \
|
||||
fake_function(__VA_ARGS__); \
|
||||
}
|
||||
|
||||
#endif // DECOMP_UTILS_H
|
||||
|
||||
|
||||
@@ -2,6 +2,8 @@
|
||||
#define IPL_MATH_H
|
||||
|
||||
#include "math/iplMathTypes.h"
|
||||
#include "math/iplInterporation.h"
|
||||
#include "math/iplMathRandom.h"
|
||||
|
||||
#endif // IPL_MATH_H
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace ext_ead {
|
||||
void IPLWWWVReport(int type, const char* format, va_list args);
|
||||
|
||||
// maybe this was defined in the header?
|
||||
char* Message[] = {
|
||||
static char* Message[] = {
|
||||
"[TickTimer]",
|
||||
"[Warning]",
|
||||
"[Info]",
|
||||
|
||||
@@ -11,30 +11,48 @@
|
||||
|
||||
#include "system/iplNand.h"
|
||||
|
||||
#include "utility/iplFrameController.h"
|
||||
|
||||
namespace ipl {
|
||||
enum {
|
||||
ANIM_TYPE_FORWARD = 0,
|
||||
ANIM_TYPE_BACKWARD,
|
||||
ANIM_TYPE_LOOP,
|
||||
ANIM_TYPE_ALTERNATE
|
||||
};
|
||||
namespace layout {
|
||||
class Animator : utility::FrameController {
|
||||
public:
|
||||
Animator(nw4r::lyt::AnimTransform* animTrans, bool, bool);
|
||||
virtual ~Animator();
|
||||
|
||||
virtual void calc();
|
||||
virtual void setFlag(bool flag);
|
||||
virtual void bind();
|
||||
|
||||
void setFrame();
|
||||
|
||||
void initAnmFrame();
|
||||
void initAnmFrame(float frame);
|
||||
private:
|
||||
nw4r::lyt::AnimTransform* mAnimTrans; // 0x20
|
||||
undefined4 unk_0x24;
|
||||
undefined4 unk_0x28;
|
||||
u32 unk_0x2C;
|
||||
};
|
||||
|
||||
class Object {
|
||||
public:
|
||||
/**
|
||||
* @param pHeap The work heap.
|
||||
* @param heap The work heap.
|
||||
* @param pLayoutArchive The layout archive.
|
||||
* @param layoutDirectory The directory containing the layout.
|
||||
* @param layoutFileName The file name of the layout.
|
||||
*/
|
||||
Object(EGG::Heap* pHeap, nand::LayoutFile* pLayoutArchive, const char* layoutDirectory, const char* layoutFileName);
|
||||
Object(EGG::Heap* heap, nand::LayoutFile* pLayoutArchive, const char* layoutDirectory, const char* layoutFileName);
|
||||
/**
|
||||
* @param pHeap The work heap.
|
||||
* @param heap The work heap.
|
||||
* @param pLayoutArcBuffer The layout archive buffer.
|
||||
* @param layoutDirectory The directory containing the layout.
|
||||
* @param layoutFileName The file name of the layout.
|
||||
*/
|
||||
Object(EGG::Heap* pHeap, void* pLayoutArcBuffer, const char* layoutDirectory, const char* layoutFileName);
|
||||
Object(EGG::Heap* heap, void* pLayoutArcBuffer, const char* layoutDirectory, const char* layoutFileName);
|
||||
|
||||
virtual ~Object();
|
||||
|
||||
/** @brief Bind animation to layout */
|
||||
void start(int lytId = -1);
|
||||
@@ -58,18 +76,16 @@ namespace ipl {
|
||||
void setAnmType(int arg0, int arg1);
|
||||
BOOL isPlaying(int arg0) const;
|
||||
|
||||
|
||||
/** @brief Gets the root of the Layout. */
|
||||
nw4r::lyt::Pane* GetRootPane() { return mpRootPane; }
|
||||
/** @brief Gets the layout object. */
|
||||
nw4r::lyt::Layout* getLayout() { return &mLayout; }
|
||||
/** @brief Gets the root of the layout. */
|
||||
nw4r::lyt::Pane* getRoot() { return getLayout()->GetRootPane(); }
|
||||
|
||||
private:
|
||||
undefined unk_0x00[0x14]; // 0x00
|
||||
nw4r::lyt::Pane* mpRootPane; // 0x14
|
||||
undefined unk_0x40[1384]; // 0x40
|
||||
nw4r::lyt::Layout mLayout; // 0x04
|
||||
undefined unk_0x20[0x580 - 0x20];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // IPL_LAYOUT_H
|
||||
|
||||
|
||||
|
||||
28
include/math/iplMathRandom.h
Normal file
28
include/math/iplMathRandom.h
Normal file
@@ -0,0 +1,28 @@
|
||||
#ifndef IPL_MATH_RANDOM_H
|
||||
#define IPL_MATH_RANDOM_H
|
||||
|
||||
#include <revolution/types.h>
|
||||
|
||||
namespace ipl {
|
||||
namespace math {
|
||||
class Random {
|
||||
#define NEXT (next = next * 1664525 + 1013904223)
|
||||
|
||||
public:
|
||||
u8 get_u8() { return (u8) NEXT; }
|
||||
u16 get_u16() { return (u16)NEXT; }
|
||||
u32 get_u32() { return (u32)NEXT; }
|
||||
|
||||
f32 get_f01() { return (f32)NEXT / 0xFFFFFFFF; }
|
||||
|
||||
private:
|
||||
u32 next;
|
||||
|
||||
#undef NEXT
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // IPL_MATH_RANDOM_H
|
||||
|
||||
|
||||
@@ -7,22 +7,27 @@ namespace ipl {
|
||||
namespace scene {
|
||||
FADER_SCENE_CLASS(BackMenu) {
|
||||
public:
|
||||
BackMenu(EGG::Heap* pHeap);
|
||||
BackMenu(EGG::Heap* heap);
|
||||
virtual ~BackMenu() {}
|
||||
|
||||
virtual BOOL isReady() const;
|
||||
virtual BOOL isReady() const;
|
||||
|
||||
virtual void prepare();
|
||||
virtual void create();
|
||||
virtual void draw();
|
||||
virtual void prepare();
|
||||
virtual void create();
|
||||
virtual void draw();
|
||||
|
||||
virtual void initCalcFadeout();
|
||||
virtual void initCalcFadeout();
|
||||
|
||||
virtual void calcCommon();
|
||||
virtual void calcCommon();
|
||||
|
||||
virtual SceneCommand calcFadein();
|
||||
virtual SceneCommand calcNormal();
|
||||
virtual SceneCommand calcFadeout();
|
||||
virtual SceneCommand calcFadein();
|
||||
virtual SceneCommand calcNormal();
|
||||
virtual SceneCommand calcFadeout();
|
||||
|
||||
// :sob:
|
||||
#if defined(VERSION_43K)
|
||||
virtual void someUnusedVirtualMember() = 0;
|
||||
#endif
|
||||
|
||||
private:
|
||||
layout::Object* mpLayout; // 0x58
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace ipl {
|
||||
namespace scene {
|
||||
FADER_SCENE_CLASS(skHealth) {
|
||||
public:
|
||||
skHealth(EGG::Heap* pHeap);
|
||||
skHealth(EGG::Heap* heap);
|
||||
virtual ~skHealth();
|
||||
|
||||
virtual BOOL isReady() const;
|
||||
|
||||
@@ -25,13 +25,13 @@ namespace ipl {
|
||||
|
||||
SCENE_CLASS(FaderSceneBase) {
|
||||
public:
|
||||
FaderSceneBase(EGG::Heap* pHeap);
|
||||
FaderSceneBase(EGG::Heap* heap);
|
||||
virtual ~FaderSceneBase() {}
|
||||
|
||||
virtual void calc();
|
||||
|
||||
virtual void initCalcNormal() {} // 0x4C
|
||||
virtual void initCalcFadeout() {} // 0x50
|
||||
virtual void initCalcNormal(); // 0x4C
|
||||
virtual void initCalcFadeout(); // 0x50
|
||||
|
||||
virtual void calcCommon() {} // 0x54
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace ipl {
|
||||
virtual SceneCommand calcNormal() { return SCENE_NEXT; } // 0x5C
|
||||
virtual SceneCommand calcFadeout() { return SCENE_NEXT; } // 0x60
|
||||
|
||||
virtual void calcCommonAfter() {} // 0x64
|
||||
virtual void calcCommonAfter(); // 0x64
|
||||
|
||||
int getState() { return mState; }
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ namespace ipl {
|
||||
class Base : utility::Tree, EGG::Disposer {
|
||||
public:
|
||||
/** @brief If the scene is ready */
|
||||
Base(EGG::Heap* pHeap);
|
||||
Base(EGG::Heap* heap);
|
||||
virtual ~Base();
|
||||
|
||||
/** @brief If the scene is ready */
|
||||
@@ -38,7 +38,7 @@ namespace ipl {
|
||||
/** @brief The scene running code when powering off/resetting the system */
|
||||
virtual void startResetting() {}
|
||||
/** @brief If the scene has finished its powering off/resetting task */
|
||||
virtual BOOL isResetProcessDone() const { return TRUE; }
|
||||
virtual BOOL isResetProcessDone() { return TRUE; }
|
||||
|
||||
/** @brief Prepare to create scene */
|
||||
virtual void prepare() {}
|
||||
@@ -47,7 +47,7 @@ namespace ipl {
|
||||
/** @brief Update the scene */
|
||||
virtual void calc() {}
|
||||
/** @brief Rendering the scene */
|
||||
virtual void draw() {}
|
||||
virtual void draw();
|
||||
/** @brief Destroy the scene and clear from memory */
|
||||
virtual void destroy() {}
|
||||
|
||||
@@ -69,10 +69,15 @@ namespace ipl {
|
||||
* @param arg Arguments for the scene.
|
||||
*/
|
||||
void reserveSceneChange(int sceneId, void* arg);
|
||||
void reserveAllSceneDestruction(int newSceneId, void* arg);
|
||||
void reserveAllSceneDestruction(int sceneId, void* arg);
|
||||
|
||||
virtual Tree* getParent() { return mpParent; }
|
||||
virtual Tree* getChild() { return mpChild; }
|
||||
virtual Tree* getNext() { return mpNext; }
|
||||
virtual Tree* getPrev() { return mpPrev; }
|
||||
|
||||
protected:
|
||||
EGG::Heap* mpHeap; // 0x24
|
||||
EGG::Heap* mheap; // 0x24
|
||||
|
||||
u32 mFlags; // 0x28
|
||||
u32 unk_0x2C;
|
||||
|
||||
@@ -20,9 +20,9 @@ namespace ipl {
|
||||
|
||||
struct Command {
|
||||
int mType; // 0x00
|
||||
int mNextScene; // 0x04 (name unsure)
|
||||
int mUnk0Scene; // 0x04
|
||||
u32 mNandToken; // 0x08
|
||||
u32 mNewScene; // 0x0C (name unsure)
|
||||
u32 mUnk1Scene; // 0x0C
|
||||
Base* mParent; // 0x10
|
||||
Base* mChild; // 0x14
|
||||
void* mArgs; // 0x18
|
||||
|
||||
@@ -10,15 +10,25 @@ namespace ipl {
|
||||
static bool resourceLoaded() {
|
||||
bool allResLoaded = false;
|
||||
bool cmnResLoaded = false;
|
||||
#ifdef USE_ZI8
|
||||
if (System::isCmnResLoaded() && System::isFontResLoaded() && System::isSndResLoaded()) {
|
||||
cmnResLoaded = true;
|
||||
}
|
||||
if (cmnResLoaded && System::isRsrcZi8Loaded()) {
|
||||
if (cmnResLoaded && System::isZi8ResLoaded()) {
|
||||
allResLoaded = true;
|
||||
}
|
||||
#else
|
||||
if (System::isCmnResLoaded() && System::isFontResLoaded()) {
|
||||
cmnResLoaded = true;
|
||||
}
|
||||
if (cmnResLoaded && System::isSndResLoaded()) {
|
||||
allResLoaded = true;
|
||||
}
|
||||
#endif
|
||||
if (allResLoaded) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -7,7 +7,7 @@ namespace ipl {
|
||||
namespace scene {
|
||||
SCENE_CLASS(SettingBg) {
|
||||
public:
|
||||
SettingBg(EGG::Heap* pHeap, int sceneID);
|
||||
SettingBg(EGG::Heap* heap, int sceneID);
|
||||
virtual ~SettingBg();
|
||||
|
||||
virtual void prepare();
|
||||
|
||||
@@ -10,7 +10,9 @@ namespace ipl {
|
||||
class System {
|
||||
public:
|
||||
System();
|
||||
|
||||
|
||||
void shutup(BOOL shutUpDMA);
|
||||
|
||||
virtual void fn_815F6278(); // 0x08
|
||||
virtual void calc(); // 0x0C
|
||||
|
||||
|
||||
@@ -3,52 +3,52 @@
|
||||
|
||||
/* Play Time Log */
|
||||
|
||||
#define MESG_PLAYTIME_TITLE 132
|
||||
#define MESG_PLAYTIME_TOTAL 135
|
||||
#define MESG_PLAYTIME_HEADER 136
|
||||
#define MESG_PLAYTIME_MISC_TITLES 137
|
||||
#define MESG_PLAYTIME_COLON 138
|
||||
#define MESG_PLAYTIME_SENT 144
|
||||
#define MESG_PLAYTIME_AND 145
|
||||
#define MESG_PLAYTIME_MORE 146
|
||||
#define MESG_PLAYTIME_TITLE 132
|
||||
#define MESG_PLAYTIME_TOTAL 135
|
||||
#define MESG_PLAYTIME_HEADER 136
|
||||
#define MESG_PLAYTIME_MISC_TITLES 137
|
||||
#define MESG_PLAYTIME_COLON 138
|
||||
#define MESG_PLAYTIME_SENT 144
|
||||
#define MESG_PLAYTIME_AND 145
|
||||
#define MESG_PLAYTIME_MORE 146
|
||||
|
||||
/* Warning Handler */
|
||||
|
||||
#define MESG_WARN_ACCEPT 46
|
||||
#define MESG_WARN_ACCEPT 46
|
||||
|
||||
/* Address */
|
||||
|
||||
#define MESG_ADDRESS_WII_ID 66
|
||||
#define MESG_ADDRESS_CHOOSE 78
|
||||
#define MESG_ADDRESS_WII_ID 66
|
||||
#define MESG_ADDRESS_CHOOSE 78
|
||||
|
||||
/* Friend List Cache (awaiting friends) */
|
||||
/* Friend List Cache (awaiting friends?) */
|
||||
|
||||
#define MESG_FRIEND_CACHE_TITLE 385
|
||||
#define MESG_FRIEND_CACHE_BODY 386
|
||||
#define MESG_FRIEND_CACHE_EMAIL_TITLE 385
|
||||
#define MESG_FRIEND_CACHE_EMAIL_BODY 386
|
||||
|
||||
/* Channel Edit */
|
||||
|
||||
#define MESG_CHAN_EDIT_BLOCKS_OPEN 156
|
||||
#define MESG_CHAN_EDIT_BLANK 242
|
||||
#define MESG_CHAN_EDIT_BLOCKS_OPEN 156
|
||||
#define MESG_CHAN_EDIT_BLANK 242
|
||||
|
||||
/* Channel Select */
|
||||
|
||||
#define MESG_CHAN_SEL_SAFE_MODE 27
|
||||
#define MESG_CHAN_SEL_NAND_FULL 154
|
||||
#define MESG_CHAN_SEL_SAFE_MODE 27
|
||||
#define MESG_CHAN_SEL_NAND_FULL 154
|
||||
|
||||
/* Error Messages */
|
||||
|
||||
#define MESG_ERROR_CODE 400
|
||||
#define MESG_ERROR_UPD_SERVER 401
|
||||
#define MESG_ERROR_UPD_INTERNET 402
|
||||
#define MESG_ERROR_UPD_NAND_FULL 403
|
||||
#define MESG_ERROR_UPD_UNKNOWN 404
|
||||
#define MESG_ERROR_NCD_INTERNET 405
|
||||
#define MESG_ERROR_NCD_NOSETUP 406
|
||||
#define MESG_ERROR_NCD_INVALID 407
|
||||
#define MESG_ERROR_NCD_LAN_INVALID 408
|
||||
#define MESG_ERROR_NCD_WL_INVALID 409
|
||||
#define MESG_ERROR_NCD_UNKNOWN 410
|
||||
#define MESG_ERROR_CODE 400
|
||||
#define MESG_ERROR_UPD_SERVER 401
|
||||
#define MESG_ERROR_UPD_INTERNET 402
|
||||
#define MESG_ERROR_UPD_NAND_FULL 403
|
||||
#define MESG_ERROR_UPD_UNKNOWN 404
|
||||
#define MESG_ERROR_NCD_INTERNET 405
|
||||
#define MESG_ERROR_NCD_NOSETUP 406
|
||||
#define MESG_ERROR_NCD_INVALID 407
|
||||
#define MESG_ERROR_NCD_LAN_INVALID 408
|
||||
#define MESG_ERROR_NCD_WL_INVALID 409
|
||||
#define MESG_ERROR_NCD_UNKNOWN 410
|
||||
|
||||
#endif // IPL_MESSAGE_ENTRIES_H
|
||||
|
||||
|
||||
@@ -15,8 +15,8 @@ namespace ipl {
|
||||
namespace bs2 {
|
||||
class Manager {
|
||||
public:
|
||||
/** @param pHeap The work heap used. */
|
||||
Manager(EGG::Heap* pHeap);
|
||||
/** @param heap The work heap used. */
|
||||
Manager(EGG::Heap* heap);
|
||||
virtual ~Manager();
|
||||
|
||||
/** @brief Initialize Disc Update */
|
||||
|
||||
@@ -11,8 +11,8 @@ namespace ipl {
|
||||
|
||||
class RsoThread : public utility::ut_thread {
|
||||
public:
|
||||
/** @param pHeap The work heap used. */
|
||||
RsoThread(EGG::Heap* pHeap);
|
||||
/** @param heap The work heap used. */
|
||||
RsoThread(EGG::Heap* heap);
|
||||
virtual ~RsoThread(); // 0x08
|
||||
|
||||
virtual void* Run(); // 0x0C
|
||||
|
||||
@@ -33,7 +33,7 @@ namespace ipl {
|
||||
|
||||
ChannelScriptManager();
|
||||
|
||||
void create(EGG::ExpHeap* heap);
|
||||
void create(EGG::Exheap* heap);
|
||||
BOOL init(nand::File* file, RsoThread* thread);
|
||||
|
||||
void calc();
|
||||
@@ -55,7 +55,7 @@ namespace ipl {
|
||||
};
|
||||
|
||||
u8* mpChansWork; // 0x00
|
||||
EGG::ExpHeap* mpHeap;
|
||||
EGG::Exheap* mheap;
|
||||
|
||||
CSData mCSData; // 0x08
|
||||
u32 unk_0x28[2];
|
||||
|
||||
@@ -9,9 +9,9 @@ namespace ipl {
|
||||
class DialogWindow {
|
||||
public:
|
||||
/**
|
||||
* @param pHeap The work heap used.
|
||||
* @param heap The work heap used.
|
||||
*/
|
||||
DialogWindow(EGG::Heap* pHeap);
|
||||
DialogWindow(EGG::Heap* heap);
|
||||
|
||||
void calc();
|
||||
void draw();
|
||||
|
||||
@@ -9,6 +9,8 @@
|
||||
|
||||
#include "layout/iplLayout.h"
|
||||
|
||||
/*** Message IDs for the Error Message ***/
|
||||
|
||||
/* An error has occurred. */
|
||||
#define MESG_ERR_GENERIC 0
|
||||
/* The Wii System Memory is damaged. */
|
||||
@@ -22,17 +24,20 @@
|
||||
|
||||
namespace ipl {
|
||||
class ErrorHandler {
|
||||
public:
|
||||
private:
|
||||
enum Type {
|
||||
NONE = 0,
|
||||
DEFAULT
|
||||
};
|
||||
|
||||
/** @param pHeap The work heap. */
|
||||
ErrorHandler(EGG::Heap* pHeap);
|
||||
/** @param heap The work heap. */
|
||||
ErrorHandler(EGG::Heap* heap);
|
||||
|
||||
void draw();
|
||||
void check();
|
||||
void calc();
|
||||
|
||||
/**
|
||||
* @brief Display the error screen.
|
||||
* @param type The error type.
|
||||
* @param msgId The message ID that will be displayed.
|
||||
* @param arg1 Unknown. Left as `NULL`.
|
||||
@@ -40,22 +45,15 @@ namespace ipl {
|
||||
* @param arg3 Unknown. Left as `-1`.
|
||||
*/
|
||||
void set(Type type, u32 msgId, const char* arg1 = NULL, int arg2 = 0, int arg3 = -1);
|
||||
|
||||
|
||||
/**
|
||||
* @brief Log the error to the NAND log. (`shared2/test2/nanderr.log`)
|
||||
* @param type The error type.
|
||||
* @param result The result it thrown.
|
||||
* @param file The source file name.
|
||||
* @param line The source file line.
|
||||
*/
|
||||
void log(const char* type, int result, const char* file, int line);
|
||||
|
||||
/** @return Whenether the error handler is readty. */
|
||||
BOOL isReady() { return mbReady; }
|
||||
|
||||
private:
|
||||
void draw();
|
||||
void check();
|
||||
void calc();
|
||||
|
||||
BOOL mbReady; // 0x00
|
||||
|
||||
Type mType; // 0x04
|
||||
|
||||
@@ -11,10 +11,10 @@ namespace ipl {
|
||||
class Exception {
|
||||
public:
|
||||
/**
|
||||
* @param pHeap The memory heap used.
|
||||
* @param heap The memory heap used.
|
||||
* @param rMode Render mode used.
|
||||
*/
|
||||
Exception(EGG::Heap* pHeap, const GXRenderModeObj& rMode);
|
||||
Exception(EGG::Heap* heap, const GXRenderModeObj& rMode);
|
||||
|
||||
/* @note pretty please, unless you wanna crash the ipl, dont run this . */
|
||||
void exception_callback(nw4r::db::ConsoleHandle console);
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace ipl {
|
||||
namespace message {
|
||||
class Manager {
|
||||
public:
|
||||
Manager(EGG::Heap* pHeap);
|
||||
Manager(EGG::Heap* heap);
|
||||
|
||||
/** @return The message data in use. */
|
||||
Message* getMessage() { return mpMessage; }
|
||||
|
||||
@@ -25,18 +25,18 @@ namespace ipl {
|
||||
Base();
|
||||
virtual ~Base(); // 0x08
|
||||
|
||||
virtual void read() {} // 0x0C
|
||||
virtual void read(); // 0x0C
|
||||
virtual void write(); // 0x10
|
||||
|
||||
virtual bool isFinished() { return false; } // 0x14
|
||||
virtual bool checkData() { return false; } // 0x18
|
||||
virtual bool isFatalError() { return false; } // 0x1C
|
||||
virtual bool isFinished(); // 0x14
|
||||
virtual bool checkData(); // 0x18
|
||||
virtual bool isFatalError(); // 0x1C
|
||||
};
|
||||
|
||||
class File : Base {
|
||||
class File : public Base {
|
||||
public:
|
||||
File(EGG::Heap* pHeap, const char* fileName, ARCHandle* arc, const char* unk2, int offset, u32 length, bool isInNand);
|
||||
File(EGG::Heap* pHeap, const char* fileName, u8* buffer, u32 length, u8 perms);
|
||||
File(EGG::Heap* heap, const char* fileName, ARCHandle* arc, const char* unk2, int offset, u32 length, bool isInNand);
|
||||
File(EGG::Heap* heap, const char* fileName, u8* buffer, u32 length, u8 perms);
|
||||
virtual ~File(); // 0x08
|
||||
|
||||
/**
|
||||
@@ -80,10 +80,9 @@ namespace ipl {
|
||||
|
||||
protected:
|
||||
NandErrResult calcMD5_(const u8* sum, const u8* buffer, u32 length) const;
|
||||
BOOL nand_error_handling(int result);
|
||||
|
||||
BOOL nand_error_handling(int errcode);
|
||||
|
||||
EGG::Heap* mpHeap; // 0x04
|
||||
EGG::Heap* mheap; // 0x04
|
||||
|
||||
char msFileName[NAND_MAX_PATH + 1]; // 0x08
|
||||
|
||||
@@ -113,9 +112,9 @@ namespace ipl {
|
||||
BOOL mbIsNandFile; // 0x18C
|
||||
};
|
||||
|
||||
class LangFile : Base {
|
||||
class LangFile : public Base {
|
||||
public:
|
||||
LangFile(EGG::Heap* pHeap, const char* dirName, const char* fileName, ARCHandle* arc, bool isInNand);
|
||||
LangFile(EGG::Heap* heap, const char* dirName, const char* fileName, ARCHandle* arc, bool isInNand);
|
||||
virtual ~LangFile(); // 0x08
|
||||
|
||||
virtual void read(); // 0x0C
|
||||
@@ -132,16 +131,10 @@ namespace ipl {
|
||||
File* mpLangFile; // 0x08
|
||||
};
|
||||
|
||||
class LayoutFile : LangFile {
|
||||
class LayoutFile : public LangFile {
|
||||
public:
|
||||
LayoutFile(EGG::Heap* pHeap, const char* dirName, const char* fileName, ARCHandle* arc, bool isNandFile);
|
||||
LayoutFile(EGG::Heap* heap, const char* dirName, const char* fileName, ARCHandle* arc, bool isNandFile);
|
||||
virtual ~LayoutFile(); // 0x08
|
||||
|
||||
virtual void read(); // 0x0C
|
||||
|
||||
virtual bool isFinished(); // 0x14
|
||||
virtual bool checkData(); // 0x18
|
||||
virtual bool isFatalError(); // 0x1C
|
||||
};
|
||||
|
||||
class Manager {
|
||||
@@ -150,13 +143,13 @@ namespace ipl {
|
||||
|
||||
/**
|
||||
* @brief Reads an ASH compressed Layout File.
|
||||
* @param pHeap The memory heap used.
|
||||
* @param heap The memory heap used.
|
||||
* @param archiveName The file name of the ASH compressed archive.
|
||||
* @param unk Unkown boolean.
|
||||
* @return The Layout File Data as `ipl::nand::LayoutFile`.
|
||||
*/
|
||||
LayoutFile* readLayout(EGG::Heap* pHeap, const char* archiveName, bool unk);
|
||||
LayoutFile* readLayoutAsync(EGG::Heap* pHeap, const char* archiveName, bool unk);
|
||||
LayoutFile* readLayout(EGG::Heap* heap, const char* archiveName, bool unk);
|
||||
LayoutFile* readLayoutAsync(EGG::Heap* heap, const char* archiveName, bool unk);
|
||||
|
||||
void closeContentsAll();
|
||||
void sendToken(int token);
|
||||
|
||||
@@ -11,7 +11,7 @@ namespace ipl {
|
||||
typedef void (*MetaCallback)(void*);
|
||||
|
||||
public:
|
||||
MetaFile(EGG::Heap* pHeap, const char* fileName, ARCHandle* arc, ESTitleId titleId, int offset, u32 length, MetaCallback callBack, void* callBackWork, int ticketIdx);
|
||||
MetaFile(EGG::Heap* heap, const char* fileName, ARCHandle* arc, ESTitleId titleId, int offset, u32 length, MetaCallback callBack, void* callBackWork, int ticketIdx);
|
||||
virtual ~MetaFile();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace ipl {
|
||||
namespace nand {
|
||||
class SharedFile : File {
|
||||
public:
|
||||
SharedFile(EGG::Heap* pHeap, const char* fileName, u32 index, int offset, u32 length, ESTitleId titleId, int ticket);
|
||||
SharedFile(EGG::Heap* heap, const char* fileName, u32 index, int offset, u32 length, ESTitleId titleId, int ticket);
|
||||
virtual ~SharedFile();
|
||||
|
||||
protected:
|
||||
|
||||
@@ -15,12 +15,12 @@ namespace ipl {
|
||||
public:
|
||||
typedef void (*MakeIconCallback)(Object*, void*);
|
||||
|
||||
Object(EGG::Heap* pHeap, int width, int height, int faceId, MakeIconCallback callback, void* callBackWork);
|
||||
Object(EGG::Heap* pHeap, int width, int height, RFLiCharData* pCharData, MakeIconCallback callback, void* callBackWork);
|
||||
Object(EGG::Heap* heap, int width, int height, int faceId, MakeIconCallback callback, void* callBackWork);
|
||||
Object(EGG::Heap* heap, int width, int height, RFLiCharData* faceData, MakeIconCallback callback, void* callBackWork);
|
||||
~Object();
|
||||
|
||||
private:
|
||||
void init(EGG::Heap* pHeap, int width, int height);
|
||||
void init(EGG::Heap* heap, int width, int height);
|
||||
void make_icon();
|
||||
|
||||
BOOL created() { return mbCreated; }
|
||||
@@ -49,5 +49,3 @@ namespace ipl {
|
||||
}
|
||||
|
||||
#endif // IPL_NIGAOE_H
|
||||
|
||||
|
||||
|
||||
@@ -12,10 +12,10 @@ namespace ipl {
|
||||
namespace nigaoe {
|
||||
class Manager {
|
||||
public:
|
||||
Manager(EGG::Heap* pHeap);
|
||||
Manager(EGG::Heap* heap);
|
||||
|
||||
Object* create(EGG::Heap* pHeap, int width, int height, int faceId, Object::MakeIconCallback callback, void* callbackWork);
|
||||
Object* create(EGG::Heap* pHeap, int width, int height, RFLiCharData* faceData, Object::MakeIconCallback callback, void* callbackWork);
|
||||
Object* create(EGG::Heap* heap, int width, int height, int faceId, Object::MakeIconCallback callback, void* callbackWork);
|
||||
Object* create(EGG::Heap* heap, int width, int height, RFLiCharData* faceData, Object::MakeIconCallback callback, void* callbackWork);
|
||||
|
||||
void makeIcon();
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ namespace ipl {
|
||||
private:
|
||||
u8 unk_0x00[0xA31];
|
||||
bool unk_0xA31;
|
||||
u8 unk_0xA32[0x02];
|
||||
u8 unk_0xA32[0xA34 - 0xA32];
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,14 +19,28 @@
|
||||
|
||||
namespace ipl {
|
||||
class Pointer;
|
||||
/**
|
||||
* @warning Do not use `ipl::PointerCoreObject`, Please instead use `ipl::Pointer`
|
||||
*/
|
||||
|
||||
class PointerType {
|
||||
public:
|
||||
enum {
|
||||
LayoutPoint = 0,
|
||||
LayoutGrab,
|
||||
LayoutUnknown2,
|
||||
LayoutMax, /* ??? */
|
||||
};
|
||||
|
||||
enum {
|
||||
StateNoScroll = 0,
|
||||
StateScroll,
|
||||
};
|
||||
};
|
||||
|
||||
/** @warning Do not use `ipl::PointerCoreObject`, Please instead use `ipl::Pointer` */
|
||||
class PointerCoreObject {
|
||||
public:
|
||||
PointerCoreObject();
|
||||
|
||||
void calc(Pointer* pPointer, const controller::Interface* pController);
|
||||
void calc(Pointer* pointer, const controller::Interface* pController);
|
||||
void draw();
|
||||
|
||||
void setState(int newState) { mState = newState; }
|
||||
@@ -42,17 +56,15 @@ namespace ipl {
|
||||
int mLayoutType; // 0x08
|
||||
int mChan; // 0x0C
|
||||
|
||||
f32 unk_0x10;
|
||||
f32 unused_0x10;
|
||||
};
|
||||
|
||||
/**
|
||||
* @warning Do not use `ipl::PointerCore`, Please instead use `ipl::Pointer`
|
||||
*/
|
||||
/** @warning Do not use `ipl::PointerCore`, Please instead use `ipl::Pointer` */
|
||||
class PointerCore {
|
||||
public:
|
||||
PointerCore();
|
||||
|
||||
void calc(Pointer* pPointer);
|
||||
void calc(Pointer* pointer);
|
||||
void draw();
|
||||
|
||||
void setState(int chan, int state);
|
||||
@@ -63,29 +75,9 @@ namespace ipl {
|
||||
};
|
||||
|
||||
class Pointer {
|
||||
private:
|
||||
enum {
|
||||
LYT_POINT = 0,
|
||||
LYT_GRABBING,
|
||||
LYT_UNK2,
|
||||
LYT_UNK3
|
||||
};
|
||||
|
||||
enum {
|
||||
POINT_DOWN = 0,
|
||||
POINT_UP
|
||||
};
|
||||
|
||||
public:
|
||||
enum {
|
||||
LayoutPoint = LYT_POINT,
|
||||
LayoutGrab = LYT_GRABBING,
|
||||
LayoutUnknown2 = LYT_UNK2,
|
||||
LayoutUnknown3 = LYT_UNK3
|
||||
};
|
||||
|
||||
/** @param pHeap The memory heap used for work. */
|
||||
Pointer(EGG::Heap* pHeap);
|
||||
/** @param heap The memory heap used for work. */
|
||||
Pointer(EGG::Heap* heap);
|
||||
|
||||
/** @brief Updates the Wii Remote Pointers. */
|
||||
void calc();
|
||||
@@ -112,13 +104,18 @@ namespace ipl {
|
||||
*/
|
||||
layout::Object* get_layout(int chan, int type);
|
||||
|
||||
void setVisible(bool value) { mbVisible = value; }
|
||||
void setVisible(bool value) { mbVisible = value; }
|
||||
|
||||
void setOrigin(f32 x, f32 y) { mOriginPos.x = x; mOriginPos.y = y; }
|
||||
void setOrigin(math::VEC2 vec) { mOriginPos = vec; }
|
||||
|
||||
void setArrowLength(f32 length) { mArrowLength = length; }
|
||||
|
||||
private:
|
||||
nand::LayoutFile* mpLayoutArchive; // 0x00
|
||||
layout::Object* mpLayout[MAX_LAYOUT_FILES]; // 0x04
|
||||
|
||||
int unk_0x28;
|
||||
int mIsScrolling; // 0x28
|
||||
math::VEC2 mOriginPos; // 0x2C
|
||||
|
||||
f32 mArrowLength; // 0x34
|
||||
@@ -127,13 +124,10 @@ namespace ipl {
|
||||
bool mbScrolling; // 0x3C
|
||||
bool mbVisible; // 0x3D
|
||||
|
||||
u8 unk_0x3E;
|
||||
u8 unk_0x3F;
|
||||
|
||||
PointerCore mCore; // 0x40
|
||||
|
||||
friend class PointerCoreObject;
|
||||
friend class PointerCore;
|
||||
friend class PointerCoreObject;
|
||||
friend class PointerCore;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ namespace ipl {
|
||||
};
|
||||
|
||||
public:
|
||||
ResetHandler(EGG::Heap* pHeap);
|
||||
ResetHandler(EGG::Heap* heap);
|
||||
|
||||
void reset();
|
||||
void check();
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#ifndef IPL_SYSTEM_H
|
||||
#define IPL_SYSTEM_H
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <decomp.h>
|
||||
|
||||
#include <revolution.h>
|
||||
@@ -25,6 +27,8 @@
|
||||
#include "system/iplNigaoeManager.h"
|
||||
#include "system/iplBS2Manager.h"
|
||||
|
||||
#include "iplMath.h"
|
||||
|
||||
#include "scene/iplSceneManager.h"
|
||||
|
||||
namespace ipl {
|
||||
@@ -35,21 +39,21 @@ namespace ipl {
|
||||
Arg();
|
||||
|
||||
private:
|
||||
u8 unk_0x00[0x04];
|
||||
EGG::Heap* mpAppHeap; // 0x04
|
||||
u8 unk_0x00[0x04 - 0x00];
|
||||
EGG::Heap* mpApheap; // 0x04
|
||||
EGG::Heap* mpMem1SysHeap; // 0x08
|
||||
EGG::Heap* unk_0x0C; // 0x0C
|
||||
u8 unk_0x10[0x10];
|
||||
u8 unk_0x10[0x20 - 0x10];
|
||||
EGG::Heap* mpNandSharedHeap; // 0x20
|
||||
undefined4* unk_0x24;
|
||||
EGG::Heap* unk_0x28;
|
||||
EGG::Heap* mpTreasureHeap; // 0x2C
|
||||
u8 unk_0x30[0x34];
|
||||
u8 unk_0x30[0x64 - 0x30];
|
||||
scene::Manager* mpSceneManager; // 0x64
|
||||
nigaoe::Manager* mpNigaoeManager; // 0x68
|
||||
nand::Manager* mpNandManager; // 0x6C
|
||||
undefined unk_0x74[0x10];
|
||||
message::Message* mpMessage; // 0x80
|
||||
undefined unk_0x70[0x80 - 0x70];
|
||||
message::Message* mpMessage; // 0x80
|
||||
undefined4 unk_0x84;
|
||||
undefined4 unk_0x88;
|
||||
nwc24::Manager* mpNwc24Manager; // 0x8C
|
||||
@@ -61,19 +65,20 @@ namespace ipl {
|
||||
postman::Manager* mpPostmanManager; // 0xA4
|
||||
bs2::Manager* mpBS2Manager; // 0xA8
|
||||
DialogWindow* mpDialog; // 0xAC
|
||||
Pointer* mpPointer; // 0xB0
|
||||
Pointer* mpointer; // 0xB0
|
||||
HomeButtonMenu* mpHomeButton; // 0xB4
|
||||
undefined4* unk_0xB8;
|
||||
message::Manager* mpMesgMgr; // 0xBC
|
||||
EGG::Thread* mpUnkThread; // 0xC0
|
||||
EGG::ColorFader* mpFader; // 0xC4
|
||||
EGG::ColorFader* pResetFader; // 0xC8
|
||||
EGG::ColorFader* mpResetFader; // 0xC8
|
||||
math::Random* mpRandom; // 0xCC
|
||||
|
||||
u8 unk_0xCC[0x34];
|
||||
u8 unk_0xD0[0x100 - 0xD0];
|
||||
|
||||
nand::File* mpFaceArcBuffer; // 0x100
|
||||
|
||||
u8 unk_0x104[0x2C];
|
||||
u8 unk_0x104[0x130 - 0x104];
|
||||
|
||||
nand::File* mpEngMsg; // 0x130
|
||||
nand::File* mpFraMsg; // 0x134
|
||||
@@ -86,9 +91,9 @@ namespace ipl {
|
||||
nand::File* mpChnTradMsg; // 0x150
|
||||
nand::File* mpKorMsg; // 0x154
|
||||
|
||||
u8 unk_0x158[0x88];
|
||||
u8 unk_0x158[0x1E0 - 0x158];
|
||||
OSAlarm mUnkAlarm; // 0x1E0
|
||||
u8 unk_0x20C[0xA0];
|
||||
u8 unk_0x210[0x2B0 - 0x210];
|
||||
|
||||
volatile bool mbResLoaded; // 0x2B0
|
||||
bool unk_0x2B1;
|
||||
@@ -107,12 +112,13 @@ namespace ipl {
|
||||
volatile bool unk_0x2BE;
|
||||
bool unk_0x2BF;
|
||||
|
||||
u8 unk_0x2C0[0x17];
|
||||
u8 unk_0x2C0[0x2D8 - 0x2C0];
|
||||
|
||||
friend class System;
|
||||
};
|
||||
|
||||
/** @return Heap used for the IPL.*/
|
||||
static EGG::Heap* getAppHeap() { return smArg.mpAppHeap; }
|
||||
static EGG::Heap* getApheap() { return smArg.mpApheap; }
|
||||
/** @return MEM1 Heap */
|
||||
static EGG::Heap* getSysMEM1() { return smArg.mpMem1SysHeap; }
|
||||
/** @return MEM2 Heap */
|
||||
@@ -148,7 +154,7 @@ namespace ipl {
|
||||
/** @return The Dialog object. */
|
||||
static DialogWindow* getDialog() { return smArg.mpDialog; }
|
||||
/** @return The Pointer object. */
|
||||
static Pointer* getPointer() { return smArg.mpPointer; }
|
||||
static Pointer* getPointer() { return smArg.mpointer; }
|
||||
/** @return The Message Manager object. */
|
||||
static message::Manager* getMessageManager() { return smArg.mpMesgMgr; }
|
||||
/** @return something */
|
||||
@@ -156,7 +162,9 @@ namespace ipl {
|
||||
/** @return The Fader object */
|
||||
static EGG::ColorFader* getFader() { return smArg.mpFader; }
|
||||
/** @return The fader object for the reset handler. */
|
||||
static EGG::ColorFader* getResetFader() { return smArg.pResetFader; }
|
||||
static EGG::ColorFader* getResetFader() { return smArg.mpResetFader; }
|
||||
/** @return The Random Number Generator object. */
|
||||
static math::Random* getRndm() { return smArg.mpRandom; }
|
||||
/** @return The Mii Archive Data */
|
||||
static nand::File* getRFLArc() { return smArg.mpFaceArcBuffer; }
|
||||
/** @return The English message data. */
|
||||
@@ -197,16 +205,23 @@ namespace ipl {
|
||||
static void setUnk_0x2BE(bool val) { smArg.unk_0x2BE = val; }
|
||||
static bool isUnk_0x2BF() { return smArg.unk_0x2BF; }
|
||||
static void setUnk_0x2BF(bool val) { smArg.unk_0x2BF = val; }
|
||||
|
||||
// TODO investigate this madness
|
||||
/** @return Whether the system resources have loaded */
|
||||
static bool isRsrcLoaded() { return smArg.mbResLoaded && smArg.mbFontResLoaded && smArg.mbSndResLoaded && smArg.mbZi8ResLoaded; }
|
||||
static bool isCmnResLoaded() { return smArg.mbResLoaded; }
|
||||
static bool isFontResLoaded() { return smArg.mbFontResLoaded; }
|
||||
static bool isSndResLoaded() { return smArg.mbSndResLoaded; }
|
||||
static bool isRsrcZi8Loaded() { return smArg.mbZi8ResLoaded; }
|
||||
|
||||
static bool unkBool() { return smArg.mbCreatedAfter && smArg.unk_0x2B4; }
|
||||
|
||||
|
||||
static bool isCmnResLoaded() { return smArg.mbResLoaded; }
|
||||
static bool isFontResLoaded() { return smArg.mbFontResLoaded; }
|
||||
static bool isSndResLoaded() { return smArg.mbSndResLoaded; }
|
||||
static bool isZi8ResLoaded() { return smArg.mbZi8ResLoaded; }
|
||||
|
||||
static bool isRsrcLoaded() { return smArg.mbResLoaded
|
||||
&& smArg.mbFontResLoaded
|
||||
&& smArg.mbSndResLoaded
|
||||
#ifdef USE_ZI8
|
||||
&& smArg.mbZi8ResLoaded
|
||||
#endif
|
||||
;}
|
||||
|
||||
static bool unkBool() { return smArg.mbCreatedAfter && smArg.unk_0x2B4; }
|
||||
|
||||
/**
|
||||
* @brief Initializes the system.
|
||||
@@ -237,19 +252,44 @@ namespace ipl {
|
||||
|
||||
/** @brief Prepare the system for error handler */
|
||||
static void err_run();
|
||||
#define err_log(type, result, line) err_log_(#type, result, __FILE__, line)
|
||||
static inline void err_log_(const char* type, int result, const char* file, int line) {
|
||||
/**
|
||||
* @brief Log the result to the NAND log. (`shared2/test2/nanderr.log`)
|
||||
* @param type The error type as a string
|
||||
* @param result The result
|
||||
* @param line The line number
|
||||
*/
|
||||
#define err_log(type, result, line) err_log_ex(type, result, __FILE__, line)
|
||||
/**
|
||||
* @brief Best to use `err_log`
|
||||
* @param type The error type as a string
|
||||
* @param result The result
|
||||
* @param file The source file name
|
||||
* @param line The line number
|
||||
*/
|
||||
static inline void err_log_ex(const char* type, int result, const char* file, int line) {
|
||||
smArg.mpErrorHandler->log(type, result, file, line);
|
||||
}
|
||||
#define err_display err_display_
|
||||
static inline void err_display_(int msg) {
|
||||
/**
|
||||
* @brief Display the error screen.
|
||||
* @param msg The Message ID (`iplErrorHandler.h` has the list of available IDs)
|
||||
*/
|
||||
static inline void err_display(int msg = MESG_ERR_GENERIC) {
|
||||
smArg.mpErrorHandler->set(ErrorHandler::DEFAULT, msg);
|
||||
}
|
||||
|
||||
/** @brief Prepare the system for reset handler */
|
||||
static void reset_run();
|
||||
|
||||
/** @brief Prepare the system for warning handler */
|
||||
static void warning_run();
|
||||
/**
|
||||
* @brief Display the warning dialog.
|
||||
* @param msgId The Message ID.
|
||||
*/
|
||||
static inline void warning_display(int msg) {
|
||||
smArg.mpWarningHandler->set(WarningHandler::DEFAULT, msg);
|
||||
}
|
||||
|
||||
static void checkNandOverFlowFlagAsync();
|
||||
|
||||
private:
|
||||
|
||||
@@ -7,33 +7,26 @@
|
||||
|
||||
#include "system/iplDialogWindow.h"
|
||||
|
||||
#define WARN_NONE ipl::WarningHandler::NONE
|
||||
#define WARN_DEFAULT ipl::WarningHandler::DEFAULT
|
||||
|
||||
namespace ipl {
|
||||
class WarningHandler {
|
||||
public:
|
||||
private:
|
||||
enum Type {
|
||||
NONE = 0,
|
||||
DEFAULT
|
||||
};
|
||||
|
||||
WarningHandler(EGG::Heap* pHeap);
|
||||
|
||||
WarningHandler(EGG::Heap* heap);
|
||||
/**
|
||||
* @brief Display the warning screen.
|
||||
*
|
||||
* @param type The warning type.
|
||||
* @param msgId The message ID.
|
||||
*/
|
||||
void set(Type type, u32 msgId);
|
||||
|
||||
private:
|
||||
|
||||
void calc();
|
||||
void draw();
|
||||
|
||||
|
||||
BOOL check();
|
||||
|
||||
|
||||
Type mType; // 0x00
|
||||
u32 mMessageID; // 0x04
|
||||
|
||||
|
||||
@@ -12,14 +12,14 @@ namespace ipl {
|
||||
class Capture {
|
||||
public:
|
||||
/**
|
||||
* @param pHeap The memory heap used for this.
|
||||
* @param heap The memory heap used for this.
|
||||
* @param x The X position of the capture.
|
||||
* @param y The Y position of the capture.
|
||||
* @param width The width position of the capture.
|
||||
* @param height The height position of the capture.
|
||||
* @param texFmt Texture format of the capture. (RGB5A3 by default)
|
||||
*/
|
||||
Capture(EGG::Heap* pHeap, int x, int y, int width, int height, _GXTexFmt texFmt = GX_TF_RGB5A3);
|
||||
Capture(EGG::Heap* heap, int x, int y, int width, int height, _GXTexFmt texFmt = GX_TF_RGB5A3);
|
||||
~Capture();
|
||||
|
||||
/**
|
||||
|
||||
38
include/utility/iplFrameController.h
Normal file
38
include/utility/iplFrameController.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef IPL_FRAME_CONTROLLER_H
|
||||
#define IPL_FRAME_CONTROLLER_H
|
||||
|
||||
#include <revolution/types.h>
|
||||
|
||||
namespace ipl {
|
||||
enum {
|
||||
ANIM_PLAYBACK_FORWARD = 0,
|
||||
ANIM_PLAYBACK_BACKWARD,
|
||||
ANIM_PLAYBACK_LOOP,
|
||||
ANIM_PLAYBACK_ALTERNATE
|
||||
};
|
||||
namespace utility {
|
||||
class FrameController {
|
||||
public:
|
||||
virtual ~FrameController();
|
||||
virtual void unkvt0(bool something) = 0;
|
||||
virtual void unkvt4(bool something) = 0;
|
||||
|
||||
void init(int playback, f32 maxFrame, f32 begin, f32 speed);
|
||||
void initFrame();
|
||||
|
||||
void calc();
|
||||
|
||||
protected:
|
||||
f32 initAnmFrame; // 0x04
|
||||
f32 mBeginFrame; // 0x08
|
||||
f32 mFrame; // 0x0C
|
||||
f32 mSpeed; // 0x10
|
||||
|
||||
int unk_0x14;
|
||||
int mPlayback; // 0x18
|
||||
bool unk_0x1C;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // IPL_FRAME_CONTROLLER_H
|
||||
@@ -12,16 +12,16 @@ namespace ipl {
|
||||
|
||||
virtual ~Tree() {}; // 0x08
|
||||
|
||||
virtual Tree* getPrev() { return mpPrev; } // 0x0C
|
||||
virtual Tree* getNext() { return mpNext; } // 0x10
|
||||
virtual Tree* getChild() { return mpChild; } // 0x14
|
||||
virtual Tree* getParent() { return mpParent; } // 0x18
|
||||
virtual Tree* getParent() { return mpParent; } // 0x0C
|
||||
virtual Tree* getChild() { return mpChild; } // 0x10
|
||||
virtual Tree* getNext() { return mpNext; } // 0x14
|
||||
virtual Tree* getPrev() { return mpPrev; } // 0x18
|
||||
|
||||
void attach(Tree* pTree);
|
||||
void insert(Tree* pTree, Tree* pTree2);
|
||||
void detach();
|
||||
|
||||
private:
|
||||
protected:
|
||||
Tree* mpParent; // 0x04
|
||||
Tree* mpChild; // 0x08
|
||||
Tree* mpNext; // 0x0C
|
||||
|
||||
@@ -1,17 +1,13 @@
|
||||
MEMORY {
|
||||
// The BSS is moved to there as since version 2.0
|
||||
// they were running out of free space in the BS2 area
|
||||
// they were very tight on memory space in the BS2 area
|
||||
// (0x81330000 - 0x8137D0000) which is where the Wii Menu is stored.
|
||||
|
||||
da_bss: origin = 0x81080000
|
||||
|
||||
main: origin = 0x81330000
|
||||
da_bss: origin = 0x81080000
|
||||
}
|
||||
|
||||
SECTIONS {
|
||||
GROUP: {
|
||||
.bss ALIGN(0x20):{}
|
||||
} > da_bss
|
||||
|
||||
GROUP: {
|
||||
.init ALIGN(0x20): {}
|
||||
extab ALIGN(0x20): {}
|
||||
@@ -19,7 +15,7 @@ SECTIONS {
|
||||
.text ALIGN(0x20): {}
|
||||
.ctors ALIGN(0x20): {}
|
||||
.dtors ALIGN(0x20): {}
|
||||
.rodata ALIGN(0x20): {}
|
||||
.rodata ALIGN(0x40): {}
|
||||
.data ALIGN(0x20): {}
|
||||
.sdata2 ALIGN(0x20): {}
|
||||
.sbss2 ALIGN(0x20): {}
|
||||
@@ -27,6 +23,10 @@ SECTIONS {
|
||||
.sbss ALIGN(0x20): {}
|
||||
.stack ALIGN(0x100): {}
|
||||
} > main
|
||||
|
||||
GROUP: {
|
||||
.bss ALIGN(0x4): {}
|
||||
} > da_bss
|
||||
|
||||
_stack_end = $LAST_SECTION_SYMBOL + SIZEOF($LAST_SECTION_NAME);
|
||||
_stack_addr = (_stack_end + $STACKSIZE + 0x7) & ~0x7;
|
||||
@@ -38,7 +38,8 @@ SECTIONS {
|
||||
|
||||
// Force active symbols that are likely going to get stripped out.
|
||||
// (automatically generated by DTK)
|
||||
//FORCEACTIVE {
|
||||
//}
|
||||
FORCEACTIVE {
|
||||
$FORCEACTIVE
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <egg/core/eggDisposer.h>
|
||||
#include <egg/core/eggAllocator.h>
|
||||
#include <egg/core/eggHeap.h>
|
||||
#include <egg/core/eggExpHeap.h>
|
||||
#include <egg/core/eggExpheap.h>
|
||||
|
||||
#include <egg/core/eggThread.h>
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ namespace EGG {
|
||||
virtual ~Disposer();
|
||||
|
||||
private:
|
||||
Heap* mpHeap; // 0x00
|
||||
Heap* mheap; // 0x00
|
||||
nw4r::ut::Link mLink; // 0x04
|
||||
};
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include <egg/core/eggHeap.h>
|
||||
|
||||
namespace EGG {
|
||||
class ExpHeap : public Heap {
|
||||
class Exheap : public Heap {
|
||||
|
||||
};
|
||||
}
|
||||
|
||||
@@ -30,11 +30,11 @@ namespace EGG {
|
||||
|
||||
void *operator new(size_t size);
|
||||
void *operator new(size_t size, int align);
|
||||
void *operator new(size_t size, EGG::Heap *pHeap, int align);
|
||||
void *operator new(size_t size, EGG::Heap *heap, int align);
|
||||
|
||||
void *operator new[](size_t size);
|
||||
void *operator new[](size_t size, int align);
|
||||
void *operator new[](size_t size, EGG::Heap *pHeap, int align);
|
||||
void *operator new[](size_t size, EGG::Heap *heap, int align);
|
||||
|
||||
void operator delete(void *ptr);
|
||||
void operator delete[](void *ptr);
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace EGG {
|
||||
private:
|
||||
static nw4r::ut::List smThreadList;
|
||||
|
||||
Heap* mpHeap; // 0x04
|
||||
Heap* mheap; // 0x04
|
||||
OSThread* mpThread; // 0x08
|
||||
|
||||
OSMessageQueue mMesgQueue; // 0x0C
|
||||
|
||||
40
libs/MSL/include/cctype
Normal file
40
libs/MSL/include/cctype
Normal file
@@ -0,0 +1,40 @@
|
||||
#ifndef MSL_CCTYPE_H
|
||||
#define MSL_CCTYPE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct __CMap {
|
||||
char UNK_0x0[0x10];
|
||||
const u8* to_lower_table; // at 0x10
|
||||
const u8* to_upper_table; // at 0x14
|
||||
} __CMap;
|
||||
|
||||
typedef struct __Locale {
|
||||
char UNK_0x0[0x38];
|
||||
struct __CMap* cmap; // at 0x38
|
||||
char UNK_0x3C[0x44 - 0x3C];
|
||||
} __Locale;
|
||||
|
||||
extern __Locale _current_locale;
|
||||
|
||||
inline int tolower(int x) {
|
||||
return (x < 0 || x >= 256)
|
||||
? x
|
||||
: (int)(&_current_locale)->cmap->to_lower_table[x];
|
||||
}
|
||||
|
||||
inline int toupper(int x) {
|
||||
return (x < 0 || x >= 256)
|
||||
? x
|
||||
: (int)(&_current_locale)->cmap->to_upper_table[x];
|
||||
}
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // MSL_CCTYPE_H
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
#define MSL_CSTDIO_H
|
||||
|
||||
#include <size_t.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
17
libs/MSL/include/ctype.h
Normal file
17
libs/MSL/include/ctype.h
Normal file
@@ -0,0 +1,17 @@
|
||||
#ifndef MSL_CTYPE_H
|
||||
#define MSL_CTYPE_H
|
||||
|
||||
#include <cctype>
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace std {
|
||||
using ::tolower;
|
||||
using ::toupper;
|
||||
} // namespace std
|
||||
|
||||
#endif
|
||||
|
||||
#endif // MSL_CTYPE_H
|
||||
|
||||
|
||||
@@ -1,13 +1,19 @@
|
||||
# NintendoWare for Revolution (IPL version; NW4IPL)
|
||||
A decompilation of NintendoWare for Revolution (NW4R) from the Wii Menu.
|
||||
NintendoWare for Revolution (IPL version; NW4IPL)
|
||||
=================================================
|
||||
A decompilation of NintendoWare for Revolution (NW4R) from the Wii Menu.
|
||||
|
||||
This version of NW4R is a bit unique compare to other applications using the library (hence is why it is dubbed the IPL version)
|
||||
- It seems to be a mix of NW4R 2006 and 2007 or above.
|
||||
- Every assert message were replaced with the `Error#004` screen.
|
||||
- Every assert message were replaced with the `Error#004` screen.
|
||||
|
||||
The Wii Menu has the following libraries linked:
|
||||
* Core (db, math, ut)
|
||||
* Sound (snd)
|
||||
* Layout (lyt)
|
||||
* **DB** (Debug; for crash handler)
|
||||
* **MATH** (Math utilities)
|
||||
* **UT** (Utilities; mostly used for NW4R libraries)
|
||||
* **SND** (Sound Library; for ".brsar" files)
|
||||
* **LYT** (Layout Library; for ".brlyt" files)
|
||||
|
||||
References
|
||||
----------
|
||||
[kiwi515/ogws](https://github.com/kiwi515/ogws)
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef NW4R_DEBUG_H
|
||||
#define NW4R_DEBUG_H
|
||||
#ifndef NW4R_DB_H
|
||||
#define NW4R_DB_H
|
||||
|
||||
#include <nw4r/db/assert.h>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include <nw4r/db/exception.h>
|
||||
#include <nw4r/db/directPrint.h>
|
||||
|
||||
#endif // NW4R_DEBUG_H
|
||||
#endif // NW4R_DB_H
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef NW4R_DEBUG_CONSOLE_H
|
||||
#define NW4R_DEBUG_CONSOLE_H
|
||||
#ifndef NW4R_DB_CONSOLE_H
|
||||
#define NW4R_DB_CONSOLE_H
|
||||
|
||||
#include <revolution.h>
|
||||
|
||||
@@ -50,6 +50,6 @@ namespace nw4r {
|
||||
}
|
||||
}
|
||||
|
||||
#endif // NW4R_DEBUG_CONSOLE_H
|
||||
#endif // NW4R_DB_CONSOLE_H
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef NW4R_DEBUG_DIRECT_PRINT_H
|
||||
#define NW4R_DEBUG_DIRECT_PRINT_H
|
||||
#ifndef NW4R_DB_DIRECT_PRINT_H
|
||||
#define NW4R_DB_DIRECT_PRINT_H
|
||||
|
||||
#include <revolution.h>
|
||||
|
||||
@@ -9,6 +9,6 @@ namespace nw4r {
|
||||
}
|
||||
}
|
||||
|
||||
#endif // NW4R_DEBUG_DIRECT_PRINT_H
|
||||
#endif // NW4R_DB_DIRECT_PRINT_H
|
||||
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
#ifndef NW4R_DEBUG_EXCEPTION_H
|
||||
#define NW4R_DEBUG_EXCEPTION_H
|
||||
#ifndef NW4R_DB_EXCEPTION_H
|
||||
#define NW4R_DB_EXCEPTION_H
|
||||
|
||||
#include <revolution.h>
|
||||
|
||||
@@ -16,6 +16,6 @@ namespace nw4r {
|
||||
}
|
||||
}
|
||||
|
||||
#endif // NW4R_DEBUG_EXCEPTION_H
|
||||
#endif // NW4R_DB_EXCEPTION_H
|
||||
|
||||
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
#ifndef NW4R_LAYOUT_H
|
||||
#define NW4R_LAYOUT_H
|
||||
#ifndef NW4R_LYT_H
|
||||
#define NW4R_LYT_H
|
||||
|
||||
#include <nw4r/lyt/types.h>
|
||||
|
||||
#include <nw4r/lyt/animation.h>
|
||||
|
||||
#include <nw4r/lyt/pane.h>
|
||||
#include <nw4r/lyt/textBox.h>
|
||||
|
||||
#include <nw4r/lyt/material.h>
|
||||
|
||||
#endif // NW4R_LAYOUT_H
|
||||
|
||||
|
||||
#include <nw4r/lyt/layout.h>
|
||||
|
||||
#endif // NW4R_LYT_H
|
||||
|
||||
41
libs/NW4R/include/nw4r/lyt/animation.h
Normal file
41
libs/NW4R/include/nw4r/lyt/animation.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef NW4R_LYT_ANIMATION_H
|
||||
#define NW4R_LYT_ANIMATION_H
|
||||
|
||||
#include <nw4r/ut.h>
|
||||
|
||||
#include <nw4r/lyt/resources.h>
|
||||
|
||||
namespace nw4r {
|
||||
namespace lyt {
|
||||
class AnimTransform {
|
||||
public:
|
||||
virtual ~AnimTransform();
|
||||
|
||||
void SetFrame(f32 frame) { mFrame = frame; }
|
||||
|
||||
u16 GetFrameSize() const;
|
||||
|
||||
bool IsLoopData() const;
|
||||
|
||||
NW4R_CREATE_LINKLIST;
|
||||
|
||||
protected:
|
||||
const res::AnimationBlock* mpRes; // 0x0C
|
||||
|
||||
f32 mFrame; // 0x10
|
||||
};
|
||||
|
||||
class AnimationLink {
|
||||
public:
|
||||
NW4R_CREATE_LINKLIST;
|
||||
|
||||
private:
|
||||
AnimTransform* mAnimTrans; // 0x08
|
||||
|
||||
u16 mIdx; // 0x0C
|
||||
bool mbDisable; // 0x0E
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // NW4R_LYT_ANIMATION_H
|
||||
47
libs/NW4R/include/nw4r/lyt/group.h
Normal file
47
libs/NW4R/include/nw4r/lyt/group.h
Normal file
@@ -0,0 +1,47 @@
|
||||
#ifndef NW4R_LYT_GROUP_H
|
||||
#define NW4R_LYT_GROUP_H
|
||||
|
||||
#include <revolution/types.h>
|
||||
|
||||
#include <nw4r/lyt/pane.h>
|
||||
|
||||
#include <nw4r/ut/LinkList.h>
|
||||
|
||||
namespace nw4r {
|
||||
namespace lyt {
|
||||
namespace detail {
|
||||
struct PaneLink {
|
||||
NW4R_CREATE_LINKLIST;
|
||||
|
||||
Pane* mTarget; // 0x08
|
||||
};
|
||||
}
|
||||
|
||||
class Group {
|
||||
public:
|
||||
Group();
|
||||
virtual ~Group();
|
||||
|
||||
NW4R_CREATE_LINKLIST;
|
||||
|
||||
protected:
|
||||
NW4R_LINKLIST(detail::PaneLink) mPaneLinkList; // 0x0C
|
||||
char mName[NW4R_RES_NAME_SIZE]; // 0x18
|
||||
|
||||
bool mbUserAllocated; // 0x29
|
||||
u8 mPadding[2]; // 0x2A
|
||||
};
|
||||
|
||||
class GroupContainer {
|
||||
public:
|
||||
GroupContainer();
|
||||
|
||||
protected:
|
||||
NW4R_LINKLIST(Group) mGroupList; // 0x00
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // NW4R_LYT_GROUP_H
|
||||
|
||||
|
||||
35
libs/NW4R/include/nw4r/lyt/layout.h
Normal file
35
libs/NW4R/include/nw4r/lyt/layout.h
Normal file
@@ -0,0 +1,35 @@
|
||||
#ifndef NW4R_LYT_LAYOUT_H
|
||||
#define NW4R_LYT_LAYOUT_H
|
||||
|
||||
#include <decomp.h>
|
||||
|
||||
#include <revolution/types.h>
|
||||
|
||||
#include <nw4r/lyt/group.h>
|
||||
#include <nw4r/lyt/types.h>
|
||||
|
||||
#include <nw4r/ut/LinkList.h>
|
||||
|
||||
namespace nw4r {
|
||||
namespace lyt {
|
||||
class Layout {
|
||||
public:
|
||||
Layout();
|
||||
virtual ~Layout();
|
||||
|
||||
nw4r::lyt::Pane* GetRootPane() { return mpRootPane; }
|
||||
|
||||
protected:
|
||||
ut::LinkList<undefined4, 4> mAnimTransList; // 0x04
|
||||
|
||||
Pane* mpRootPane; // 0x10
|
||||
GroupContainer* mpGroupContainer; // 0x14
|
||||
|
||||
Size* mLayoutSize; // 0x18
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // NW4R_LYT_LAYOUT_H
|
||||
|
||||
|
||||
@@ -1,10 +1,5 @@
|
||||
#ifndef NW4R_LAYOUT_MATERIAL_H
|
||||
#define NW4R_LAYOUT_MATERIAL_H
|
||||
|
||||
#include <revolution/types.h>
|
||||
#include <nw4r/lyt/types.h>
|
||||
#include <nw4r/ut/Color.h>
|
||||
#include <stddef.h>
|
||||
#ifndef NW4R_LYT_MATERIAL_H
|
||||
#define NW4R_LYT_MATERIAL_H
|
||||
|
||||
namespace nw4r {
|
||||
namespace lyt {
|
||||
@@ -15,6 +10,6 @@ namespace nw4r {
|
||||
}
|
||||
}
|
||||
|
||||
#endif // NW4R_LAYOUT_MATERIAL_H
|
||||
#endif // NW4R_LYT_MATERIAL_H
|
||||
|
||||
|
||||
|
||||
@@ -1,17 +1,16 @@
|
||||
#ifndef NW4R_LAYOUT_PANE_H
|
||||
#define NW4R_LAYOUT_PANE_H
|
||||
#ifndef NW4R_LYT_PANE_H
|
||||
#define NW4R_LYT_PANE_H
|
||||
|
||||
#include <revolution/types.h>
|
||||
|
||||
#include <nw4r/math/types.h>
|
||||
|
||||
#include <nw4r/lyt/types.h>
|
||||
#include <nw4r/lyt/animation.h>
|
||||
#include <nw4r/lyt/material.h>
|
||||
|
||||
#include <nw4r/ut.h>
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
namespace nw4r {
|
||||
namespace lyt {
|
||||
class Pane;
|
||||
@@ -19,10 +18,10 @@ namespace nw4r {
|
||||
namespace detail {
|
||||
class PaneBase {
|
||||
public:
|
||||
inline PaneBase() : mNode() {}
|
||||
inline PaneBase() : mLink() {}
|
||||
virtual ~PaneBase();
|
||||
|
||||
ut::LinkListNode mNode; // 0x00
|
||||
NW4R_CREATE_LINKLIST;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -82,32 +81,31 @@ namespace nw4r {
|
||||
void SetVisible(bool visible) { detail::SetBit(&mFlags, 0, visible); };
|
||||
|
||||
private:
|
||||
Pane* mpParent; // 0x0C
|
||||
ut::LinkList<detail::PaneBase, 0> mChildList; // 0x10
|
||||
ut::LinkList<AnimationLink, 0> mAnimList; // 0x1C
|
||||
Pane* mpParent; // 0x0C
|
||||
|
||||
Material* mpMaterial; // 0x28
|
||||
NW4R_LINKLIST(detail::PaneBase) mChildList; // 0x10
|
||||
NW4R_LINKLIST(AnimationLink) mAnimList; // 0x1C
|
||||
|
||||
math::VEC3 mTranslate; // 0x2C
|
||||
math::VEC3 mRotate; // 0x38
|
||||
math::VEC2 mScale; // 0x44
|
||||
Size mSize; // 0x4C
|
||||
Material* mpMaterial; // 0x28
|
||||
|
||||
math::MTX34 mMtx; // 0x54
|
||||
math::MTX34 mGlobalMtx; // 0x84
|
||||
math::VEC3 mTranslate; // 0x2C
|
||||
math::VEC3 mRotate; // 0x38
|
||||
math::VEC2 mScale; // 0x44
|
||||
Size mSize; // 0x4C
|
||||
|
||||
math::MTX34 mMtx; // 0x54
|
||||
math::MTX34 mGlobalMtx; // 0x84
|
||||
|
||||
char mName[16]; // 0xB4
|
||||
char mUserData[8]; // 0xC4
|
||||
char mName[NW4R_RES_NAME_SIZE-1]; // 0xB4
|
||||
char mUserData[8]; // 0xC4
|
||||
|
||||
u8 mBasePosition; // 0xCC
|
||||
u8 mAlpha; // 0xCD
|
||||
u8 mGlbAlpha; // 0xCE
|
||||
u8 mFlags; // 0xCF
|
||||
bool mbUserAllocated; // 0xD0
|
||||
u8 mBasePosition; // 0xCC
|
||||
u8 mAlpha; // 0xCD
|
||||
u8 mGlbAlpha; // 0xCE
|
||||
u8 mFlags; // 0xCF
|
||||
bool mbUserAllocated; // 0xD0
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
#endif // NW4R_LAYOUT_PANE_H
|
||||
|
||||
|
||||
#endif // NW4R_LYT_PANE_H
|
||||
|
||||
33
libs/NW4R/include/nw4r/lyt/resources.h
Normal file
33
libs/NW4R/include/nw4r/lyt/resources.h
Normal file
@@ -0,0 +1,33 @@
|
||||
#ifndef NW4R_LYT_RESOURCES_H
|
||||
#define NW4R_LYT_RESOURCES_H
|
||||
|
||||
#include <revolution/types.h>
|
||||
|
||||
namespace nw4r {
|
||||
namespace lyt {
|
||||
namespace res {
|
||||
typedef struct DataBlockHeader {
|
||||
char kind[4]; // 0x00
|
||||
u32 size; // 0x04
|
||||
} DataBlockHeader;
|
||||
|
||||
typedef struct AnimationBlock {
|
||||
DataBlockHeader blockHeader; // 0x00
|
||||
|
||||
u16 frameSize; // 0x08
|
||||
u8 loop; // 0x0A
|
||||
|
||||
u8 padding1; // 0x0B
|
||||
|
||||
u16 fileNum; // 0x0C
|
||||
|
||||
u16 animContNum; // 0x0E
|
||||
u32 animContOffsetsOffset; // 0x10
|
||||
} AnimationBlock;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif // NW4R_LYT_RESOURCES_H
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user