mirror of
https://github.com/CraftyBoss/SuperMarioOdysseyOnline.git
synced 2024-11-21 10:45:14 +00:00
First Commit
This commit is contained in:
parent
0584c9cc90
commit
381293e2b8
604 changed files with 227753 additions and 0 deletions
74
.clang-format
Normal file
74
.clang-format
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
---
|
||||||
|
Language: Cpp
|
||||||
|
AccessModifierOffset: -4
|
||||||
|
AlignAfterOpenBracket: Align
|
||||||
|
AlignConsecutiveAssignments: false
|
||||||
|
AlignConsecutiveDeclarations: false
|
||||||
|
AlignOperands: true
|
||||||
|
AlignTrailingComments: true
|
||||||
|
AllowAllParametersOfDeclarationOnNextLine: true
|
||||||
|
AllowShortBlocksOnASingleLine: Never
|
||||||
|
AllowShortCaseLabelsOnASingleLine: false
|
||||||
|
AllowShortFunctionsOnASingleLine: Inline
|
||||||
|
AllowShortIfStatementsOnASingleLine: Never
|
||||||
|
AllowShortLoopsOnASingleLine: false
|
||||||
|
AlwaysBreakAfterDefinitionReturnType: None
|
||||||
|
AlwaysBreakAfterReturnType: None
|
||||||
|
AlwaysBreakBeforeMultilineStrings: false
|
||||||
|
AlwaysBreakTemplateDeclarations: Yes
|
||||||
|
BinPackArguments: true
|
||||||
|
BinPackParameters: true
|
||||||
|
BreakBeforeBinaryOperators: None
|
||||||
|
BreakBeforeBraces: Attach
|
||||||
|
BreakBeforeTernaryOperators: false
|
||||||
|
BreakConstructorInitializersBeforeComma: false
|
||||||
|
ColumnLimit: 100
|
||||||
|
CommentPragmas: '^ (IWYU pragma:|NOLINT)'
|
||||||
|
ConstructorInitializerAllOnOneLineOrOnePerLine: false
|
||||||
|
ConstructorInitializerIndentWidth: 4
|
||||||
|
ContinuationIndentWidth: 4
|
||||||
|
Cpp11BracedListStyle: true
|
||||||
|
DerivePointerAlignment: false
|
||||||
|
DisableFormat: false
|
||||||
|
ForEachMacros: []
|
||||||
|
IncludeCategories:
|
||||||
|
- Regex: '^<[Ww]indows\.h>$'
|
||||||
|
Priority: 1
|
||||||
|
- Regex: '^<'
|
||||||
|
Priority: 2
|
||||||
|
- Regex: '^"'
|
||||||
|
Priority: 3
|
||||||
|
IndentCaseLabels: false
|
||||||
|
IndentWidth: 4
|
||||||
|
IndentWrappedFunctionNames: false
|
||||||
|
KeepEmptyLinesAtTheStartOfBlocks: false
|
||||||
|
MacroBlockBegin: ''
|
||||||
|
MacroBlockEnd: ''
|
||||||
|
MaxEmptyLinesToKeep: 1
|
||||||
|
NamespaceIndentation: None
|
||||||
|
ObjCBlockIndentWidth: 4
|
||||||
|
ObjCSpaceAfterProperty: false
|
||||||
|
ObjCSpaceBeforeProtocolList: true
|
||||||
|
PenaltyBreakBeforeFirstCallParameter: 19
|
||||||
|
PenaltyBreakComment: 300
|
||||||
|
PenaltyBreakFirstLessLess: 120
|
||||||
|
PenaltyBreakString: 1000
|
||||||
|
PenaltyExcessCharacter: 1000000
|
||||||
|
PenaltyReturnTypeOnItsOwnLine: 60
|
||||||
|
PointerAlignment: Left
|
||||||
|
ReflowComments: true
|
||||||
|
SortIncludes: true
|
||||||
|
SpaceAfterCStyleCast: false
|
||||||
|
SpaceBeforeAssignmentOperators: true
|
||||||
|
SpaceBeforeParens: ControlStatements
|
||||||
|
SpaceInEmptyParentheses: false
|
||||||
|
SpacesBeforeTrailingComments: 2
|
||||||
|
SpacesInAngles: false
|
||||||
|
SpacesInContainerLiterals: true
|
||||||
|
SpacesInCStyleCastParentheses: false
|
||||||
|
SpacesInParentheses: false
|
||||||
|
SpacesInSquareBrackets: false
|
||||||
|
Standard: c++17
|
||||||
|
TabWidth: 4
|
||||||
|
UseTab: Never
|
||||||
|
...
|
2
.clangd
Normal file
2
.clangd
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
CompileFlags:
|
||||||
|
Add: [-std=c++20]
|
9
.gitignore
vendored
Normal file
9
.gitignore
vendored
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
starlight_patch_100/**
|
||||||
|
build100/**
|
||||||
|
romfs stuff/**
|
||||||
|
.vscode/**
|
||||||
|
Crash Reports/**
|
||||||
|
.cache/**
|
||||||
|
Custom Stage Builds/**
|
||||||
|
|
||||||
|
compile_commands.json
|
55
Makefile
Normal file
55
Makefile
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
# TODO (Khangaroo): Make this process a lot less hacky (no, export did not work)
|
||||||
|
# See MakefileNSO
|
||||||
|
|
||||||
|
.PHONY: all clean starlight send
|
||||||
|
|
||||||
|
SMOVER ?= 100
|
||||||
|
BUILDVER ?= 99.37
|
||||||
|
IP ?= 10.0.0.221
|
||||||
|
DEBUGLOG ?= 0 # defaults to disable debug logger
|
||||||
|
SERVERIP ?= 0.0.0.0 # put debug logger server IP here
|
||||||
|
|
||||||
|
PROJNAME ?= StarlightBase
|
||||||
|
|
||||||
|
all: starlight
|
||||||
|
|
||||||
|
starlight:
|
||||||
|
$(MAKE) all -f MakefileNSO SMOVER=$(SMOVER) BUILDVER=$(BUILDVER) DEBUGLOG=$(DEBUGLOG) SERVERIP=${SERVERIP}
|
||||||
|
$(MAKE) starlight_patch_$(SMOVER)/*.ips
|
||||||
|
|
||||||
|
mkdir -p starlight_patch_$(SMOVER)/atmosphere/exefs_patches/$(PROJNAME)/
|
||||||
|
mkdir -p starlight_patch_$(SMOVER)/atmosphere/contents/0100000000010000/exefs/
|
||||||
|
|
||||||
|
mv starlight_patch_$(SMOVER)/3CA12DFAAF9C82DA064D1698DF79CDA1.ips starlight_patch_$(SMOVER)/atmosphere/exefs_patches/$(PROJNAME)/3CA12DFAAF9C82DA064D1698DF79CDA1.ips
|
||||||
|
mv $(shell basename $(CURDIR))$(SMOVER).elf starlight_patch_$(SMOVER)/subsdk1.elf
|
||||||
|
mv $(shell basename $(CURDIR))$(SMOVER).nso starlight_patch_$(SMOVER)/atmosphere/contents/0100000000010000/exefs/subsdk1
|
||||||
|
|
||||||
|
starlight_patch_$(SMOVER)/*.ips: patches/*.slpatch patches/configs/$(SMOVER).config patches/maps/$(SMOVER)/*.map \
|
||||||
|
build$(SMOVER)/$(shell basename $(CURDIR))$(SMOVER).map scripts/genPatch.py
|
||||||
|
@rm -f starlight_patch_$(SMOVER)/*.ips
|
||||||
|
python3 scripts/genPatch.py $(SMOVER)
|
||||||
|
|
||||||
|
# builds project with the file structure used in the yuzu emulator
|
||||||
|
yuzu:
|
||||||
|
$(MAKE) all -f MakefileNSO SMOVER=$(SMOVER) BUILDVER=$(BUILDVER)
|
||||||
|
$(MAKE) starlight_patch_$(SMOVER)/*.ips
|
||||||
|
|
||||||
|
mkdir -p starlight_patch_$(SMOVER)/yuzu/
|
||||||
|
|
||||||
|
mv starlight_patch_$(SMOVER)/3CA12DFAAF9C82DA064D1698DF79CDA1.ips starlight_patch_$(SMOVER)/yuzu/3CA12DFAAF9C82DA064D1698DF79CDA1.ips
|
||||||
|
mv $(shell basename $(CURDIR))$(SMOVER).elf starlight_patch_$(SMOVER)/subsdk1.elf
|
||||||
|
mv $(shell basename $(CURDIR))$(SMOVER).nso starlight_patch_$(SMOVER)/yuzu/subsdk1
|
||||||
|
# builds and sends project to FTP server hosted on provided IP
|
||||||
|
send: all
|
||||||
|
python3.8 scripts/sendPatch.py $(IP) $(PROJNAME)
|
||||||
|
|
||||||
|
log: all
|
||||||
|
python3.8 scripts/tcpServer.py $(SERVERIP)
|
||||||
|
|
||||||
|
sendlog: all
|
||||||
|
python3.8 scripts/sendPatch.py $(IP) $(PROJNAME) $(USER) $(PASS)
|
||||||
|
python3.8 scripts/tcpServer.py $(SERVERIP)
|
||||||
|
|
||||||
|
clean:
|
||||||
|
$(MAKE) clean -f MakefileNSO
|
||||||
|
@rm -fr starlight_patch_*
|
176
MakefileNSO
Normal file
176
MakefileNSO
Normal file
|
@ -0,0 +1,176 @@
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
# Starlight-specific
|
||||||
|
# SMOVER is the target version of Super Mario Odyssey, but without the decimal points
|
||||||
|
# This can be changed by compiling for a different version (e.g. make 100)
|
||||||
|
# (used for C defines, filenames, etc)
|
||||||
|
# (used for user-facing stuff)
|
||||||
|
# LINKERSCRIPTS is the directory where the function addresses for Super Mario Odyssey are
|
||||||
|
# stored
|
||||||
|
# Each script is stored as syms$(SMOVER).ld
|
||||||
|
# (used for mapping Super Mario Odyssey functions to the proper address)
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
LINKERSCRIPTS := linkerscripts
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
#.SUFFIXES:
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
ifeq ($(strip $(DEVKITPRO)),)
|
||||||
|
$(error "Please set DEVKITPRO in your environment. export DEVKITPRO=<path to>/devkitpro")
|
||||||
|
endif
|
||||||
|
|
||||||
|
TOPDIR ?= $(CURDIR)
|
||||||
|
include $(DEVKITPRO)/libnx/switch_rules
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
# TARGET is the name of the output
|
||||||
|
# BUILD is the directory where object files & intermediate files will be placed
|
||||||
|
# SOURCES is a list of directories containing source code
|
||||||
|
# DATA is a list of directories containing data files
|
||||||
|
# INCLUDES is a list of directories containing header files
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
TARGET ?= $(notdir $(CURDIR))$(SMOVER)
|
||||||
|
BUILD ?= build$(SMOVER)
|
||||||
|
SOURCES := source/sead/time source/sead source/puppets source/server source/layouts source/states source/cameras source
|
||||||
|
DATA := data
|
||||||
|
INCLUDES := include include/sead
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
# options for code generation
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
ARCH := -march=armv8-a -mtune=cortex-a57 -mtp=soft -fPIC -ftls-model=local-exec
|
||||||
|
|
||||||
|
CFLAGS := -g -Wall -ffunction-sections \
|
||||||
|
$(ARCH) $(DEFINES)
|
||||||
|
|
||||||
|
CFLAGS += $(INCLUDE) -D__SWITCH__ -DSMOVER=$(SMOVER) -O3 -DNNSDK -DSWITCH -DBUILDVER=$(BUILDVER) -DDEBUGLOG=$(DEBUGLOG) -DSERVERIP=$(SERVERIP)
|
||||||
|
|
||||||
|
CXXFLAGS := $(CFLAGS) -fno-rtti -fomit-frame-pointer -fno-exceptions -fno-asynchronous-unwind-tables -fno-unwind-tables -std=gnu++20
|
||||||
|
|
||||||
|
ASFLAGS := -g $(ARCH)
|
||||||
|
LDFLAGS = -specs=../switch.specs -g $(ARCH) -Wl,-Map,$(notdir $*.map) -Wl,--version-script=$(TOPDIR)/exported.txt -Wl,-init=__custom_init -Wl,-fini=__custom_fini -nostdlib
|
||||||
|
|
||||||
|
LIBS := -lnx
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
# list of directories containing libraries, this must be the top level containing
|
||||||
|
# include and lib
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
LIBDIRS := $(PORTLIBS) $(LIBNX)
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
# no real need to edit anything past this point unless you need to add additional
|
||||||
|
# rules for different file extensions
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
ifneq ($(BUILD),$(notdir $(CURDIR)))
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
export OUTPUT := $(CURDIR)/$(TARGET)
|
||||||
|
export TOPDIR := $(CURDIR)
|
||||||
|
|
||||||
|
export VPATH := $(foreach dir,$(SOURCES),$(CURDIR)/$(dir)) \
|
||||||
|
$(foreach dir,$(DATA),$(CURDIR)/$(dir))
|
||||||
|
|
||||||
|
export DEPSDIR ?= $(CURDIR)/$(BUILD)
|
||||||
|
|
||||||
|
CFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.c)))
|
||||||
|
CPPFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.cpp)))
|
||||||
|
SFILES := $(foreach dir,$(SOURCES),$(notdir $(wildcard $(dir)/*.s)))
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
# use CXX for linking C++ projects, CC for standard C
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
ifeq ($(strip $(CPPFILES)),)
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
export LD := $(CC)
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
else
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
export LD := $(CXX)
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
endif
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
export OFILES_BIN := $(addsuffix .o,$(BINFILES))
|
||||||
|
export OFILES_SRC := $(CPPFILES:.cpp=.o) $(CFILES:.c=.o) $(SFILES:.s=.o)
|
||||||
|
export OFILES := $(OFILES_BIN) $(OFILES_SRC)
|
||||||
|
export HFILES_BIN := $(addsuffix .h,$(subst .,_,$(BINFILES)))
|
||||||
|
|
||||||
|
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(CURDIR)/$(dir)) \
|
||||||
|
$(foreach dir,$(LIBDIRS),-I$(dir)/include) \
|
||||||
|
-I$(CURDIR)/$(BUILD)
|
||||||
|
|
||||||
|
export LIBPATHS := $(foreach dir,$(LIBDIRS),-L$(dir)/lib)
|
||||||
|
|
||||||
|
ifeq ($(strip $(ICON)),)
|
||||||
|
icons := $(wildcard *.jpg)
|
||||||
|
ifneq (,$(findstring $(TARGET).jpg,$(icons)))
|
||||||
|
export APP_ICON := $(TOPDIR)/$(TARGET).jpg
|
||||||
|
else
|
||||||
|
ifneq (,$(findstring icon.jpg,$(icons)))
|
||||||
|
export APP_ICON := $(TOPDIR)/icon.jpg
|
||||||
|
endif
|
||||||
|
endif
|
||||||
|
else
|
||||||
|
export APP_ICON := $(TOPDIR)/$(ICON)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(NO_ICON)),)
|
||||||
|
export NROFLAGS += --icon=$(APP_ICON)
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifeq ($(strip $(NO_NACP)),)
|
||||||
|
export NROFLAGS += --nacp=$(CURDIR)/$(TARGET).nacp
|
||||||
|
endif
|
||||||
|
|
||||||
|
.PHONY: $(BUILD) clean all
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
all: $(BUILD)
|
||||||
|
|
||||||
|
$(BUILD):
|
||||||
|
@[ -d $@ ] || mkdir -p $@
|
||||||
|
@cp $(LINKERSCRIPTS)/syms$(SMOVER).ld $(LINKERSCRIPTS)/symstemp.ld # This is required because you can't pass a variable to the .specs
|
||||||
|
$(MAKE) -C $(BUILD) -f $(CURDIR)/MakefileNSO
|
||||||
|
@rm -f $(LINKERSCRIPTS)/symstemp.ld
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
clean:
|
||||||
|
@echo clean ...
|
||||||
|
@rm -fr build* *.nso *.elf
|
||||||
|
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
else
|
||||||
|
.PHONY: all
|
||||||
|
|
||||||
|
DEPENDS := $(OFILES:.o=.d)
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
# main targets
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
%.nso: %.elf
|
||||||
|
@elf2nso $< $@
|
||||||
|
@echo built ... $(notdir $@)
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
all : $(OUTPUT).nso
|
||||||
|
|
||||||
|
$(OUTPUT).elf : $(OFILES)
|
||||||
|
|
||||||
|
|
||||||
|
$(OFILES_SRC) : $(HFILES_BIN)
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
# you need a rule like this for each extension you use as binary data
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
%.bin.o %_bin.h : %.bin
|
||||||
|
#---------------------------------------------------------------------------------
|
||||||
|
@echo $(notdir $<)
|
||||||
|
@$(bin2o)
|
||||||
|
|
||||||
|
-include $(DEPENDS)
|
||||||
|
|
||||||
|
#---------------------------------------------------------------------------------------
|
||||||
|
endif
|
||||||
|
#---------------------------------------------------------------------------------------
|
82
README.md
Normal file
82
README.md
Normal file
|
@ -0,0 +1,82 @@
|
||||||
|
# Super Mario Odyssey - Online Multiplayer Mod
|
||||||
|
|
||||||
|
Welcome to the official repository for the Super Mario Odyssey Online mod! Have fun exploring kingdoms with friends, playing gamemodes, or beating the game as fast as possible! This mod is still early in development, so expect bugs and un-refined aspects as we work hard to improve it and make the mod as polished as possible.
|
||||||
|
|
||||||
|
## Features
|
||||||
|
|
||||||
|
* Explore Kingdoms together with up to 10 People
|
||||||
|
* Almost every capture in the game is synced between players
|
||||||
|
* Full 2D and Costume models syncing
|
||||||
|
* Moon Collection is shared between all players
|
||||||
|
* Custom Configuration Menu (Accessible by holding ZL and selecting any option in the pause/start menu)
|
||||||
|
* Support for custom gamemodes (WIP)
|
||||||
|
### Available Gamemodes
|
||||||
|
* Hide and Seek
|
||||||
|
|
||||||
|
## SMO Version Support
|
||||||
|
|
||||||
|
* 1.0
|
||||||
|
|
||||||
|
## Installation Tutorial
|
||||||
|
|
||||||
|
Before installing, Ensure that your switch is hacked. If not, follow [This Guide](https://switch.homebrew.guide/) to get your switch setup for modding. Make sure you set up a way to block Nintendo's servers as you will need to have your switch connected to the internet for this mod to work!
|
||||||
|
|
||||||
|
1. Download the latest mod build from either [Gamebanana](https://gamebanana.com/games/6376) or from the [Releases](https://github.com/CraftyBoss/SuperMarioOdysseyOnline/releases) tab. (Alternatively, build from source)
|
||||||
|
2. Extract the downloaded zip onto the root of your Switch's SD card.
|
||||||
|
3. If you need to host an online server, head over to the [Super Mario Odyssey Online Server](https://github.com/Sanae6/SmoOnlineServer) repository and follow the instructions there to set up the server.
|
||||||
|
4. Launch the game! Upon first time bootup, the mod should ask for a server IP to save to the games common save file. This IP address will be the server you wish to connect to every time you launch the game with the mod installed. (Note: un-installing the mod and launching the game will remove the server IP from the common save file.)
|
||||||
|
|
||||||
|
## Gamemode Info
|
||||||
|
### Hide and Seek
|
||||||
|
* Depending on Group size, select who will start as seekers at the beginning of each round and a kingdom to hide in.
|
||||||
|
* Each player has a timer on the top right of the screen that will increase while they are hiding during a round.
|
||||||
|
* When a seeker gets close enough to a player, the player will die and respawn as a seeker.
|
||||||
|
* During the round, hiders who die by other means will also become seekers upon respawning.
|
||||||
|
* If a hider loads into a new stage (via a pipe, door, etc.) the hider will get 5 seconds of tag invincibility to prevent spawn point camping.
|
||||||
|
* The player with the most time at the end of a round (or set of rounds) is considered the winner.
|
||||||
|
* While not a concrete rule, it's generally agreed upon that hiding should not be done out of bounds, inside objects that don't sync across games yet, and inside objects that completely conceal a player from others (such as trees).
|
||||||
|
|
||||||
|
## Gamemode Controls
|
||||||
|
### Hide and Seek
|
||||||
|
- Left D-Pad: Decrease time
|
||||||
|
- Right D-Pad: Increase Time
|
||||||
|
- L + D-Pad Down: Reset Time
|
||||||
|
- D-Pad Up: Switch from Hider/Seeker
|
||||||
|
|
||||||
|
## Building Prerequisites
|
||||||
|
|
||||||
|
- [devkitPro](https://devkitpro.org/)
|
||||||
|
- Python 3
|
||||||
|
- The [Keystone-Engine](https://www.keystone-engine.org/) Python Module
|
||||||
|
|
||||||
|
## Building
|
||||||
|
|
||||||
|
Build has only been tested on WSL2 running Ubuntu 20.04.1.
|
||||||
|
|
||||||
|
Just run:
|
||||||
|
```
|
||||||
|
DEVKITPRO={path_to_devkitpro} make
|
||||||
|
```
|
||||||
|
|
||||||
|
On Ubuntu (and other Debian-based systems), devkitPro will be installed to `/opt/devkitpro` by default:
|
||||||
|
|
||||||
|
```
|
||||||
|
DEVKITPRO=/opt/devkitpro/ make
|
||||||
|
```
|
||||||
|
|
||||||
|
## Installing (Atmosphère)
|
||||||
|
|
||||||
|
After a successful build, simply transfer the `atmosphere` folder located inside `starlight_patch_100` to the root of your switch's SD card.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
# Contributors
|
||||||
|
|
||||||
|
- [Sanae](https://github.com/sanae6) Wrote the majority of the server code
|
||||||
|
- [Shadow](https://github.com/shadowninja108) original author of starlight, the tool used to make this entire mod possible
|
||||||
|
- [GRAnimated](https://github.com/GRAnimated)
|
||||||
|
|
||||||
|
# Credits
|
||||||
|
- [OdysseyDecomp](https://github.com/shibbo/OdysseyDecomp)
|
||||||
|
- [OdysseyReversed](https://github.com/shibbo/OdysseyReversed)
|
||||||
|
- [open-ead](https://github.com/open-ead/sead) sead Headers
|
5
exported.txt
Normal file
5
exported.txt
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
global:
|
||||||
|
_Z14stageSceneHookv;
|
||||||
|
local: *;
|
||||||
|
};
|
49
include/Keyboard.hpp
Normal file
49
include/Keyboard.hpp
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <cstddef>
|
||||||
|
#include "al/async/AsyncFunctorThread.h"
|
||||||
|
#include "al/async/FunctorV0M.hpp"
|
||||||
|
|
||||||
|
#include "nn/swkbd/swkbd.h"
|
||||||
|
|
||||||
|
#include "logger.hpp"
|
||||||
|
#include "sead/prim/seadSafeString.h"
|
||||||
|
|
||||||
|
class Keyboard {
|
||||||
|
public:
|
||||||
|
Keyboard(ulong strSize);
|
||||||
|
void keyboardThread();
|
||||||
|
|
||||||
|
void openKeyboard(const char* initialText);
|
||||||
|
|
||||||
|
const char* getResult() {
|
||||||
|
if (mThread->isDone()) {
|
||||||
|
return mResultString.cstr();
|
||||||
|
}
|
||||||
|
return nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
bool isThreadDone() { return mThread->isDone(); }
|
||||||
|
|
||||||
|
void setHeaderText(const char16_t* text) { mHeaderText = text; }
|
||||||
|
void setSubText(const char16_t* text) { mSubText = text; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
|
||||||
|
al::AsyncFunctorThread* mThread;
|
||||||
|
nn::swkbd::String mResultString;
|
||||||
|
|
||||||
|
bool mIsDoneKeyboard;
|
||||||
|
|
||||||
|
sead::FixedSafeString<0x10> mInitialText;
|
||||||
|
|
||||||
|
const char16_t *mHeaderText = u"Enter Server IP Here!";
|
||||||
|
const char16_t *mSubText = u"Must be a Valid Address.";
|
||||||
|
|
||||||
|
char* mWorkBuf;
|
||||||
|
int mWorkBufSize;
|
||||||
|
char* mTextCheckBuf;
|
||||||
|
int mTextCheckSize;
|
||||||
|
char* mCustomizeDicBuf;
|
||||||
|
int mCustomizeDicSize;
|
||||||
|
};
|
41
include/SocketBase.hpp
Normal file
41
include/SocketBase.hpp
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
#include <cstring>
|
||||||
|
#include "types.h"
|
||||||
|
#include "nn.h"
|
||||||
|
#include "sead/basis/seadNew.h"
|
||||||
|
|
||||||
|
class SocketBase {
|
||||||
|
|
||||||
|
public:
|
||||||
|
SocketBase(const char *name);
|
||||||
|
|
||||||
|
virtual nn::Result init(const char * ip, u16 port) = 0;
|
||||||
|
|
||||||
|
const char *getStateChar();
|
||||||
|
u8 getLogState();
|
||||||
|
s32 getSocket();
|
||||||
|
|
||||||
|
void set_sock_flags(int flags);
|
||||||
|
|
||||||
|
bool closeSocket();
|
||||||
|
|
||||||
|
void setName(const char *name) {strcpy(sockName, name);};
|
||||||
|
|
||||||
|
protected:
|
||||||
|
s32 socket_log(const char* str);
|
||||||
|
s32 socket_read_char(char *out);
|
||||||
|
|
||||||
|
char sockName[0x10] = {};
|
||||||
|
const char *sock_ip;
|
||||||
|
|
||||||
|
u16 port;
|
||||||
|
u8 socket_log_state;
|
||||||
|
s32 socket_log_socket;
|
||||||
|
|
||||||
|
int sock_flags;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
85
include/actors/PuppetActor.h
Normal file
85
include/actors/PuppetActor.h
Normal file
|
@ -0,0 +1,85 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/LiveActor/LiveActor.h"
|
||||||
|
#include "al/async/FunctorV0M.hpp"
|
||||||
|
#include "al/async/FunctorBase.h"
|
||||||
|
#include "al/util.hpp"
|
||||||
|
#include "al/string/StringTmp.h"
|
||||||
|
#include "al/layout/BalloonMessage.h"
|
||||||
|
|
||||||
|
#include "game/Player/PlayerFunction.h"
|
||||||
|
#include "game/Player/PlayerJointControlPartsDynamics.h"
|
||||||
|
#include "game/Player/PlayerConst.h"
|
||||||
|
#include "game/Player/PlayerModelHolder.h"
|
||||||
|
|
||||||
|
#include "actors/PuppetCapActor.h"
|
||||||
|
#include "actors/PuppetHackActor.h"
|
||||||
|
#include "layouts/NameTag.h"
|
||||||
|
#include "sead/math/seadVector.h"
|
||||||
|
#include "server/DeltaTime.hpp"
|
||||||
|
|
||||||
|
#include "logger.hpp"
|
||||||
|
#include "puppets/PuppetInfo.h"
|
||||||
|
#include "puppets/HackModelHolder.hpp"
|
||||||
|
#include "helpers.hpp"
|
||||||
|
#include "algorithms/CaptureTypes.h"
|
||||||
|
|
||||||
|
class PuppetActor : public al::LiveActor {
|
||||||
|
public:
|
||||||
|
PuppetActor(const char *name);
|
||||||
|
virtual void init(al::ActorInitInfo const &) override;
|
||||||
|
virtual void initAfterPlacement(void) override;
|
||||||
|
virtual void control(void) override;
|
||||||
|
virtual void movement(void) override;
|
||||||
|
virtual void makeActorAlive(void) override;
|
||||||
|
virtual void makeActorDead(void) override;
|
||||||
|
|
||||||
|
void initOnline(PuppetInfo *pupInfo);
|
||||||
|
|
||||||
|
void startAction(const char *actName);
|
||||||
|
void hairControl();
|
||||||
|
|
||||||
|
void setBlendWeight(int index, float weight) { al::setSklAnimBlendWeight(getCurrentModel(), weight, index); };
|
||||||
|
|
||||||
|
bool isNeedBlending();
|
||||||
|
|
||||||
|
bool isInCaptureList(const char *hackName);
|
||||||
|
|
||||||
|
PuppetInfo* getInfo() { return mInfo; }
|
||||||
|
|
||||||
|
const char *getPuppetName() { return mInfo->puppetName; }
|
||||||
|
|
||||||
|
bool addCapture(PuppetHackActor *capture, const char *hackType);
|
||||||
|
|
||||||
|
al::LiveActor* getCurrentModel();
|
||||||
|
|
||||||
|
int getMaxCaptures() {return mCaptures->getEntryCount(); };
|
||||||
|
|
||||||
|
void debugTeleportCaptures(const sead::Vector3f& pos);
|
||||||
|
|
||||||
|
void debugTeleportCapture(const sead::Vector3f& pos, int index);
|
||||||
|
|
||||||
|
bool mIsDebug = false;
|
||||||
|
|
||||||
|
float mClosingSpeed = 0;
|
||||||
|
|
||||||
|
NameTag *mNameTag = nullptr; // temp public
|
||||||
|
private:
|
||||||
|
void changeModel(const char* newModel);
|
||||||
|
|
||||||
|
bool setCapture(const char* captureName);
|
||||||
|
|
||||||
|
void syncPose();
|
||||||
|
|
||||||
|
PlayerCostumeInfo *mCostumeInfo = nullptr;
|
||||||
|
PuppetInfo *mInfo = nullptr;
|
||||||
|
PuppetCapActor *mPuppetCap = nullptr;
|
||||||
|
PlayerModelHolder *mModelHolder = nullptr;
|
||||||
|
HackModelHolder* mCaptures = nullptr;
|
||||||
|
|
||||||
|
CaptureTypes::Type mCurCapture = CaptureTypes::Type::Unknown;
|
||||||
|
|
||||||
|
bool mIs2DModel = false;
|
||||||
|
|
||||||
|
bool mIsCaptureModel = false;
|
||||||
|
};
|
28
include/actors/PuppetCapActor.h
Normal file
28
include/actors/PuppetCapActor.h
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/LiveActor/LiveActor.h"
|
||||||
|
#include "al/util.hpp"
|
||||||
|
|
||||||
|
#include "game/Player/PlayerFunction.h"
|
||||||
|
#include "game/Player/HackCap/HackCapJointControlKeeper.h"
|
||||||
|
|
||||||
|
#include "logger.hpp"
|
||||||
|
#include "puppets/PuppetInfo.h"
|
||||||
|
#include "helpers.hpp"
|
||||||
|
|
||||||
|
class PuppetCapActor : public al::LiveActor {
|
||||||
|
public:
|
||||||
|
PuppetCapActor(const char *name);
|
||||||
|
virtual void init(al::ActorInitInfo const &) override;
|
||||||
|
virtual void initAfterPlacement() override;
|
||||||
|
virtual void control(void) override;
|
||||||
|
virtual void movement(void) override;
|
||||||
|
void initOnline(PuppetInfo *info);
|
||||||
|
|
||||||
|
void startAction(const char *actName);
|
||||||
|
void update();
|
||||||
|
|
||||||
|
private:
|
||||||
|
HackCapJointControlKeeper *mJointKeeper;
|
||||||
|
PuppetInfo *mInfo;
|
||||||
|
};
|
28
include/actors/PuppetHackActor.h
Normal file
28
include/actors/PuppetHackActor.h
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/LiveActor/LiveActor.h"
|
||||||
|
#include "al/util.hpp"
|
||||||
|
|
||||||
|
#include "logger.hpp"
|
||||||
|
#include "puppets/PuppetInfo.h"
|
||||||
|
#include "helpers.hpp"
|
||||||
|
|
||||||
|
// TODO: Make this actor only created once per puppet, and use SubActorKeeper to create PartsModel actors for each capture
|
||||||
|
|
||||||
|
class PuppetHackActor : public al::LiveActor {
|
||||||
|
public:
|
||||||
|
PuppetHackActor(const char *name);
|
||||||
|
virtual void init(al::ActorInitInfo const &) override;
|
||||||
|
virtual void initAfterPlacement() override;
|
||||||
|
virtual void control(void) override;
|
||||||
|
virtual void movement(void) override;
|
||||||
|
void initOnline(PuppetInfo *info, const char *hackType);
|
||||||
|
|
||||||
|
void startAction(const char* actName);
|
||||||
|
|
||||||
|
void startHackAnim(bool isOn);
|
||||||
|
|
||||||
|
private:
|
||||||
|
PuppetInfo *mInfo;
|
||||||
|
sead::FixedSafeString<0x20> mHackType;
|
||||||
|
};
|
52
include/agl/DisplayList.h
Normal file
52
include/agl/DisplayList.h
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
/**
|
||||||
|
* @file DisplayList.h
|
||||||
|
* @brief Defines a display list for the GPU.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
#include "agl/gpu.h"
|
||||||
|
#include "sead/heap/seadHeap.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
class DisplayList
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DisplayList();
|
||||||
|
|
||||||
|
virtual ~DisplayList();
|
||||||
|
|
||||||
|
void setControlMemeory(void *, s32);
|
||||||
|
void clear();
|
||||||
|
void setBuffer(agl::GPUMemAddr<u8>, u64);
|
||||||
|
void setValidSize(u64 size);
|
||||||
|
void copyTo(agl::DisplayList *) const;
|
||||||
|
void beginDisplayList();
|
||||||
|
void endDisplayList();
|
||||||
|
bool beginDisplayListBuffer(agl::GPUMemAddr<u8>, u64, bool);
|
||||||
|
void endDisplayListBuffer(sead::Heap *);
|
||||||
|
void adjustValueSize();
|
||||||
|
void invalidateCPUCache() const;
|
||||||
|
void dump() const;
|
||||||
|
bool suspend(void **);
|
||||||
|
void resume(void *, u64);
|
||||||
|
u64 calcRemainingSize();
|
||||||
|
|
||||||
|
u64 _8;
|
||||||
|
u64 _10;
|
||||||
|
u64 _18;
|
||||||
|
u32 mUsedSize; // _20
|
||||||
|
u32 _24;
|
||||||
|
u32 mSize; // _28
|
||||||
|
u32 _2C;
|
||||||
|
u64 _30;
|
||||||
|
u64 _38;
|
||||||
|
u8 _40[0x248-0x40]; // todo; what is here?
|
||||||
|
u32 _248; // init'd to 0x200
|
||||||
|
u32 _24C;
|
||||||
|
u64 _250;
|
||||||
|
char* mDisplayName; // _258
|
||||||
|
};
|
||||||
|
};
|
41
include/agl/DrawContext.h
Normal file
41
include/agl/DrawContext.h
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
/**
|
||||||
|
* @file DrawContext.h
|
||||||
|
* @brief Defines a draw context for textures in a GPU buffer.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
#include "DisplayList.h"
|
||||||
|
|
||||||
|
#include <sead/gfx/seadDrawContext.h>
|
||||||
|
#include <sead/thread/seadCriticalSection.h>
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
class DrawContext : public sead::DrawContext
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DrawContext();
|
||||||
|
virtual ~DrawContext();
|
||||||
|
|
||||||
|
void setCommandBuffer(agl::DisplayList *);
|
||||||
|
void flushCommandBuffer();
|
||||||
|
void setBoundRenderBuffer(u64 *);
|
||||||
|
void barrierTexture(u32);
|
||||||
|
void barrierShader(u32);
|
||||||
|
bool isTextureDirty(u32, s32) const;
|
||||||
|
void setTextureDirty(s32);
|
||||||
|
void setCommandBufferTemporary();
|
||||||
|
|
||||||
|
agl::DisplayList* mDisplayList; // _F0
|
||||||
|
u64* _F8; // agl::RenderBuffer*
|
||||||
|
u8 _100;
|
||||||
|
u8 _101;
|
||||||
|
u8 _102;
|
||||||
|
u8 _103;
|
||||||
|
u32 _104;
|
||||||
|
u32 _10C;
|
||||||
|
sead::CriticalSection mCriticalSection; // _110
|
||||||
|
};
|
||||||
|
};
|
48
include/agl/RenderBuffer.h
Normal file
48
include/agl/RenderBuffer.h
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
/**
|
||||||
|
* @file RenderBuffer.h
|
||||||
|
* @brief Defines classes that implement a render buffer.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "RenderTargetColor.h"
|
||||||
|
#include "RenderTargetDepth.h"
|
||||||
|
|
||||||
|
#include "sead/gfx/seadFrameBuffer.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
class RenderBuffer : public sead::FrameBuffer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
RenderBuffer();
|
||||||
|
RenderBuffer(sead::Vector2<f32> const &, sead::BoundBox2<f32> const &);
|
||||||
|
RenderBuffer(sead::Vector2<f32> const &, f32, f32, f32, f32);
|
||||||
|
virtual ~RenderBuffer();
|
||||||
|
|
||||||
|
virtual void copyToDisplayBuffer(sead::DrawContext *, sead::DisplayBuffer const *);
|
||||||
|
virtual void clear(sead::DrawContext *, u32, sead::Color4f const &, f32, u32);
|
||||||
|
virtual void bindImpl_(sead::DrawContext *) const;
|
||||||
|
|
||||||
|
void initialize_();
|
||||||
|
void setRenderTargetColorNullAll();
|
||||||
|
void adjustPhysicalAreaAndVirtualSizeFromColorTarget(u32);
|
||||||
|
void invalidateGPUCache(agl::DrawContext *) const;
|
||||||
|
void bind_(agl::DrawContext *, u16) const;
|
||||||
|
|
||||||
|
u32 _8;
|
||||||
|
u32 C;
|
||||||
|
u64 _10;
|
||||||
|
u32 _18;
|
||||||
|
u32 _1C;
|
||||||
|
agl::RenderTargetColor* _20;
|
||||||
|
agl::RenderTargetColor* _28;
|
||||||
|
agl::RenderTargetColor* _30;
|
||||||
|
agl::RenderTargetColor* _38;
|
||||||
|
agl::RenderTargetColor* _40;
|
||||||
|
agl::RenderTargetColor* _48;
|
||||||
|
agl::RenderTargetColor* _50;
|
||||||
|
agl::RenderTargetColor* _58;
|
||||||
|
agl::RenderTargetDepth* _60;
|
||||||
|
};
|
||||||
|
};
|
34
include/agl/RenderTargetColor.h
Normal file
34
include/agl/RenderTargetColor.h
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
/**
|
||||||
|
* @file RenderTargetColor.h
|
||||||
|
* @brief Defines classes implement a rendering target color.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "TextureData.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
class RenderTargetColor : agl::TextureData
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
RenderTargetColor();
|
||||||
|
RenderTargetColor(agl::TextureData const &, u32, u32);
|
||||||
|
|
||||||
|
void onApplyTextureData_();
|
||||||
|
void initRegs_(u32) const;
|
||||||
|
|
||||||
|
s32 _128;
|
||||||
|
u32 _12C;
|
||||||
|
u32 _130;
|
||||||
|
u32 _134;
|
||||||
|
u64 _138;
|
||||||
|
u64 _140;
|
||||||
|
u64 _148;
|
||||||
|
u64 _150;
|
||||||
|
u64 _158;
|
||||||
|
u64 _160;
|
||||||
|
u64 _168;
|
||||||
|
u64 _170;
|
||||||
|
};
|
||||||
|
};
|
29
include/agl/RenderTargetDepth.h
Normal file
29
include/agl/RenderTargetDepth.h
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
/**
|
||||||
|
* @file RenderTargetDepth.h
|
||||||
|
* @brief Defines a class to represent a render target depth.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "TextureData.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
class RenderTargetDepth : public agl::TextureData
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
RenderTargetDepth();
|
||||||
|
RenderTargetDepth(agl::TextureData const &, u32, u32);
|
||||||
|
|
||||||
|
void onApplyTextureData_();
|
||||||
|
void initRegs_(u32) const;
|
||||||
|
|
||||||
|
s32 _128;
|
||||||
|
u32 _12C;
|
||||||
|
u64 _130;
|
||||||
|
u64 _138;
|
||||||
|
u64 _140;
|
||||||
|
u64 _148;
|
||||||
|
u8 _150[0x178-0x150];
|
||||||
|
};
|
||||||
|
};
|
63
include/agl/TextureData.h
Normal file
63
include/agl/TextureData.h
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
/**
|
||||||
|
* @file TextureData.h
|
||||||
|
* @brief Defines a class that implements a texture compressor, and a texture data storage container.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "detail/Surface.h"
|
||||||
|
#include "driver/NVNtexture.h"
|
||||||
|
|
||||||
|
#include "sead/prim/seadSafeString.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
class TextureData
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
class CompressToWork
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CompressToWork(agl::TextureData const &);
|
||||||
|
|
||||||
|
u64 _0;
|
||||||
|
u64 _8;
|
||||||
|
u64 _10;
|
||||||
|
u64 _18;
|
||||||
|
u32 _20;
|
||||||
|
u64 _28;
|
||||||
|
u64 _30;
|
||||||
|
u32 _38;
|
||||||
|
u64 _40;
|
||||||
|
agl::detail::Surface mSurface; // _48
|
||||||
|
agl::driver::NVNtexture_ mTexture; // _70
|
||||||
|
};
|
||||||
|
|
||||||
|
TextureData();
|
||||||
|
|
||||||
|
void setMipLevelNum_(s32, bool);
|
||||||
|
u16 getMinSlice_() const;
|
||||||
|
void getTextureFormatName() const;
|
||||||
|
u32 calcMipByteSize(u32) const;
|
||||||
|
bool isCompressedFormat() const;
|
||||||
|
bool isRenderTargetCompressAvailable() const;
|
||||||
|
bool isDepthFormat() const;
|
||||||
|
bool hasStencil() const;
|
||||||
|
void invalidateCPUCache();
|
||||||
|
void flushCPUCache() const;
|
||||||
|
void setDebugLabel(sead::SafeStringBase<char> const &);
|
||||||
|
void getDebugLabel() const;
|
||||||
|
|
||||||
|
u64 _0;
|
||||||
|
u32 _8;
|
||||||
|
u32 C;
|
||||||
|
u64 _10;
|
||||||
|
u64 _18;
|
||||||
|
u64 _20;
|
||||||
|
u64 _28;
|
||||||
|
agl::detail::Surface mSurface; // _30
|
||||||
|
agl::TextureFormat mTextureFormat; // _54
|
||||||
|
u8 _58[0x120-0x58];
|
||||||
|
char* _120; // "agl::TextureData string"
|
||||||
|
};
|
||||||
|
};
|
77
include/agl/detail/FileIOMgr.h
Normal file
77
include/agl/detail/FileIOMgr.h
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
/**
|
||||||
|
* @file FileIOMgr.h
|
||||||
|
* @brief Defines classes that handle shader management I/O.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sead/heap.h"
|
||||||
|
#include "sead/hostio.h"
|
||||||
|
#include "sead/string.h"
|
||||||
|
#include "sead/xml.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
namespace detail
|
||||||
|
{
|
||||||
|
class FileIOMgr : public sead::hostio::Node
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
class SingletonDisposer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
~SingletonDisposer();
|
||||||
|
};
|
||||||
|
|
||||||
|
class CreateArg
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
CreateArg();
|
||||||
|
|
||||||
|
u32 mArg; // _0
|
||||||
|
};
|
||||||
|
|
||||||
|
class DialogArg
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DialogArg();
|
||||||
|
|
||||||
|
u64* _0;
|
||||||
|
u64* _8;
|
||||||
|
u64 _10;
|
||||||
|
u64 _18;
|
||||||
|
u64 _20;
|
||||||
|
char* mMsg; // _28
|
||||||
|
u64* _30;
|
||||||
|
u64* _38;
|
||||||
|
u64 _40;
|
||||||
|
u32 _48; // set to 0x20
|
||||||
|
u8 _4C;
|
||||||
|
u8 _4D;
|
||||||
|
u8 _4E;
|
||||||
|
u8 _4F;
|
||||||
|
u32 _50;
|
||||||
|
};
|
||||||
|
|
||||||
|
FileIOMgr();
|
||||||
|
|
||||||
|
void initialize(agl::detail::FileIOMgr::CreateArg const &, sead::Heap *);
|
||||||
|
void setCheckoutCommandPath(sead::SafeStringBase<char> const &);
|
||||||
|
void save(sead::XmlDocument const &, agl::detail::FileIOMgr::DialogArg const &, u32);
|
||||||
|
void showDialog(sead::hostio::FileInfo *, sead::SafeStringBase<char> const &, sead::SafeStringBase<char> const &, sead::SafeStringBase<char> const &, sead::SafeStringBase<char> const &) const;
|
||||||
|
void checkout_(sead::SafeStringBase<char> const &) const;
|
||||||
|
void showErrorDialog_(sead::SafeStringBase<char> const &) const;
|
||||||
|
void save(void const*, u32, agl::detail::FileIOMgr::DialogArg const &);
|
||||||
|
s32 load(agl::detail::FileIOMgr::DialogArg const &);
|
||||||
|
void close(s32);
|
||||||
|
void genMessage(sead::hostio::Context *);
|
||||||
|
void listenPropertyEvent(sead::hostio::PropertyEvent const *);
|
||||||
|
|
||||||
|
static agl::detail::FileIOMgr* createInstance(sead::Heap *);
|
||||||
|
static void deleteInstance();
|
||||||
|
|
||||||
|
u64* _28; // sead::NinHostIOFileDevice *
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
39
include/agl/detail/MemoryPool.h
Normal file
39
include/agl/detail/MemoryPool.h
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* @file MemoryPool.h
|
||||||
|
* @brief Defines classes for memory pools for storage.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
typedef s32 MemoryAttribute;
|
||||||
|
|
||||||
|
namespace detail
|
||||||
|
{
|
||||||
|
class MemoryPoolType
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static s32 convert(agl::MemoryAttribute);
|
||||||
|
|
||||||
|
static u32 cInvalidPoolType; // 0
|
||||||
|
static u32 cValidPoolType; // 0x80000000
|
||||||
|
};
|
||||||
|
|
||||||
|
class MemoryPool
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MemoryPool();
|
||||||
|
|
||||||
|
void initialize(void *, u64, agl::detail::MemoryPoolType const &);
|
||||||
|
void initialize(void *, u64, agl::detail::MemoryPoolType const &, agl::detail::MemoryPool const &, s32);
|
||||||
|
|
||||||
|
void finalize();
|
||||||
|
|
||||||
|
u8 _0[0x104]; // todo: where do the parent 0x100 bytes come from?
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
36
include/agl/detail/MemoryPoolHeap.h
Normal file
36
include/agl/detail/MemoryPoolHeap.h
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
/**
|
||||||
|
* @file MemoryPoolHeap.h
|
||||||
|
* @brief Defines classes that manage heaps for memory pools.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
#include "MemoryPool.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
class GPUMemBlockBase;
|
||||||
|
|
||||||
|
namespace detail
|
||||||
|
{
|
||||||
|
class GPUMemBlockMgrHeapEx;
|
||||||
|
|
||||||
|
class MemoryPoolHeap
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
MemoryPoolHeap(void *, u64, u64, agl::detail::MemoryPoolType const &, void *, u64, agl::detail::GPUMemBlockMgrHeapEx *);
|
||||||
|
~MemoryPoolHeap();
|
||||||
|
|
||||||
|
static agl::detail::MemoryPoolHeap* create(u64, s32, u64, s32, u64, u64, agl::detail::MemoryPoolType const &, agl::detail::GPUMemBlockMgrHeapEx *);
|
||||||
|
static void destroy(agl::detail::MemoryPoolHeap *);
|
||||||
|
|
||||||
|
void pushBack(agl::GPUMemBlockBase *);
|
||||||
|
u64* allocFromMemoryPool(u64, s32);
|
||||||
|
void freeToHeap(agl::GPUMemBlockBase *);
|
||||||
|
bool isAllocatable(agl::detail::MemoryPoolType const &, u64, s32) const;
|
||||||
|
|
||||||
|
agl::GPUMemBlockBase* _120;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
32
include/agl/detail/ShaderHolder.h
Normal file
32
include/agl/detail/ShaderHolder.h
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
/**
|
||||||
|
* @file ShaderHolder.h
|
||||||
|
* @brief Defines classes for shader storage.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sead/heap.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
namespace detail
|
||||||
|
{
|
||||||
|
class ShaderHolder
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
class SingletonDisposer_
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~SingletonDisposer_();
|
||||||
|
|
||||||
|
static SingletonDisposer_ sStaticDisposer;
|
||||||
|
};
|
||||||
|
|
||||||
|
ShaderHolder();
|
||||||
|
|
||||||
|
static agl::detail::ShaderHolder* createInstance(sead::Heap *);
|
||||||
|
static void deleteInstance();
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
56
include/agl/detail/Surface.h
Normal file
56
include/agl/detail/Surface.h
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
/**
|
||||||
|
* @file Surface.h
|
||||||
|
* @brief Defines classes to setup NVN textures on a surface.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
#include "agl/util.h"
|
||||||
|
|
||||||
|
class NVNtextureBuilder;
|
||||||
|
class NVNtexture;
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
namespace detail
|
||||||
|
{
|
||||||
|
struct SurfaceBase;
|
||||||
|
|
||||||
|
class Surface
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Surface();
|
||||||
|
void initialize(agl::TextureType, agl::TextureFormat, u32, agl::TextureAttribute, agl::MultiSampleType);
|
||||||
|
void initializeSize(u32, u32, u32);
|
||||||
|
void copyFrom(agl::detail::SurfaceBase const &);
|
||||||
|
void calcSizeAndAlignment();
|
||||||
|
void setupNVNtextureBuilder(NVNtextureBuilder *) const;
|
||||||
|
void printInfo() const;
|
||||||
|
void copyFrom(NVNtexture const &);
|
||||||
|
|
||||||
|
u16 _0;
|
||||||
|
u16 _2;
|
||||||
|
u16 _4;
|
||||||
|
u16 _6;
|
||||||
|
u8 _8;
|
||||||
|
u8 _9;
|
||||||
|
u16 _A;
|
||||||
|
u8 C[0x1A-0xC];
|
||||||
|
u8 _1A;
|
||||||
|
u8 _1B;
|
||||||
|
u32 _1C;
|
||||||
|
u8 _20;
|
||||||
|
u8 _21;
|
||||||
|
u8 _22;
|
||||||
|
u8 _23;
|
||||||
|
};
|
||||||
|
|
||||||
|
struct SurfaceBase
|
||||||
|
{
|
||||||
|
u64 _0;
|
||||||
|
u64 _8;
|
||||||
|
u64 _10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
26
include/agl/driver/NVNimage.h
Normal file
26
include/agl/driver/NVNimage.h
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
/**
|
||||||
|
* @file NVNimage.h
|
||||||
|
* @brief Defines a class for representing a NVN image.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
namespace driver
|
||||||
|
{
|
||||||
|
class NVNimage_
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
NVNimage_();
|
||||||
|
NVNimage_(agl::driver::NVNimage_ const &);
|
||||||
|
~NVNimage_();
|
||||||
|
|
||||||
|
void updateImageId(s32 id);
|
||||||
|
|
||||||
|
u64 mImageId; // _0
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
31
include/agl/driver/NVNsampler.h
Normal file
31
include/agl/driver/NVNsampler.h
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
/**
|
||||||
|
* @file NVNsampler.h
|
||||||
|
* @brief Defines a sampler for NVN images.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
class NVNsampler;
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
namespace driver
|
||||||
|
{
|
||||||
|
class NVNsampler_
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
NVNsampler_();
|
||||||
|
NVNsampler_(agl::driver::NVNsampler_ const &);
|
||||||
|
~NVNsampler_();
|
||||||
|
|
||||||
|
void releaseSampler();
|
||||||
|
bool registerSampler(NVNsampler const &, char const *);
|
||||||
|
void updateTextureId(s32);
|
||||||
|
|
||||||
|
u64 _0;
|
||||||
|
s16 _8;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
39
include/agl/driver/NVNtexture.h
Normal file
39
include/agl/driver/NVNtexture.h
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* @file device.h
|
||||||
|
* @brief Defines a class to represent a NVN texture.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
class NVNtextureView;
|
||||||
|
class NVNtexture;
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
namespace driver
|
||||||
|
{
|
||||||
|
class NVNtexture_
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
NVNtexture_();
|
||||||
|
NVNtexture_(agl::driver::NVNtexture_ const &);
|
||||||
|
~NVNtexture_();
|
||||||
|
|
||||||
|
void releaseTexture();
|
||||||
|
void updateTexId_(s32 newID);
|
||||||
|
//agl::driver:NVNtexture_ operator=(agl::driver::NVNtexture_ const &);
|
||||||
|
bool registerTexture(NVNtexture const *, NVNtextureView const *, char const *, bool);
|
||||||
|
|
||||||
|
void setReference_() const;
|
||||||
|
|
||||||
|
u8 _0[0xC0]; // NVNtexture
|
||||||
|
s32 mTextureID; // _C0
|
||||||
|
u8 _C4;
|
||||||
|
u8 _C5;
|
||||||
|
u8 _C6;
|
||||||
|
u8 _C7;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
3
include/agl/g3d.h
Normal file
3
include/agl/g3d.h
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <agl/g3d/g3d_ResFile.h>
|
16
include/agl/g3d/g3d_ResFile.h
Normal file
16
include/agl/g3d/g3d_ResFile.h
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <nn/g3d.h>
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
namespace g3d
|
||||||
|
{
|
||||||
|
class ResFile
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static void BindTexture(nn::g3d::ResFile *, nn::g3d::ResFile *);
|
||||||
|
static void Cleanup(nn::g3d::ResFile *);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
93
include/agl/gpu.h
Normal file
93
include/agl/gpu.h
Normal file
|
@ -0,0 +1,93 @@
|
||||||
|
/**
|
||||||
|
* @file gpu.h
|
||||||
|
* @brief Defines classes that use the GPU, such as memory blocks, and address blocks.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
#include "agl/detail/MemoryPool.h"
|
||||||
|
#include "agl/detail/MemoryPoolHeap.h"
|
||||||
|
#include "nn/gfx/api.h"
|
||||||
|
#include "nn/gfx/memory.h"
|
||||||
|
#include "sead/heap/seadHeap.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
typedef u64 GPUMemVoidAddr;
|
||||||
|
|
||||||
|
class GPUMemBlockBase
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
GPUMemBlockBase();
|
||||||
|
|
||||||
|
virtual ~GPUMemBlockBase();
|
||||||
|
|
||||||
|
void clear();
|
||||||
|
void freeBuffer();
|
||||||
|
void free();
|
||||||
|
void allocBuffer_(u64, sead::Heap *, s32, agl::MemoryAttribute);
|
||||||
|
bool tryAllocBuffer_(u64, sead::Heap *, s32, agl::MemoryAttribute);
|
||||||
|
void setBuffer_(u64, void *, void *, agl::MemoryAttribute);
|
||||||
|
void setVirtual_(u64, sead::Heap *, agl::MemoryAttribute, agl::GPUMemVoidAddr, s32);
|
||||||
|
void initializeGfxMemoryPool(nn::gfx::TMemoryPool<nn::gfx::ApiVariation<nn::gfx::ApiType<4>, nn::gfx::ApiVersion<8>>> *) const;
|
||||||
|
void addList(agl::GPUMemBlockBase*);
|
||||||
|
void setMemoryPool(void *, u64, agl::detail::MemoryPool *);
|
||||||
|
void setMemoryPoolHeap(void *, u64, agl::detail::MemoryPoolHeap *);
|
||||||
|
u64 getByteOffset() const;
|
||||||
|
u64 getMemoryPoolType() const;
|
||||||
|
|
||||||
|
void* mMemBlockBuffer; // _8
|
||||||
|
u64 mMemBlockBufferSize; // _10
|
||||||
|
agl::detail::MemoryPool* mMemoryPool; // _18
|
||||||
|
agl::detail::MemoryPoolHeap* mMemoryPoolHeap; // _20
|
||||||
|
u8 _28; // this is some sort of bitflag
|
||||||
|
u8 _29;
|
||||||
|
u8 _2A;
|
||||||
|
u8 _2B;
|
||||||
|
u32 _2C;
|
||||||
|
u64 _30;
|
||||||
|
};
|
||||||
|
|
||||||
|
class GPUMemAddrBase
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
GPUMemAddrBase(agl::GPUMemBlockBase const &, u64);
|
||||||
|
|
||||||
|
u32 verify_() const;
|
||||||
|
void deleteGPUMemBlock() const;
|
||||||
|
void invalidate();
|
||||||
|
u32 getAlignmentAddress() const;
|
||||||
|
void setByteOffsetByPtr(void *);
|
||||||
|
void roundUp(s32);
|
||||||
|
void flushCPUCache(u64);
|
||||||
|
void invalidateCPUCache(u64);
|
||||||
|
|
||||||
|
agl::detail::MemoryPool* mMemoryPool; // _0
|
||||||
|
u32 mAlignmentAddr; // _8
|
||||||
|
u32 GPUMemAddrBase_C; // most likely padding bytes
|
||||||
|
agl::GPUMemBlockBase* mMemoryBlock; // _10
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
class GPUMemBlock : public agl::GPUMemBlockBase
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~GPUMemBlock();
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
class GPUMemBlockT : public agl::GPUMemBlockBase
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~GPUMemBlockT();
|
||||||
|
};
|
||||||
|
|
||||||
|
template<typename T>
|
||||||
|
class GPUMemAddr
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
u64* mPtr; // _0
|
||||||
|
u64 _8;
|
||||||
|
};
|
||||||
|
};
|
69
include/agl/shader/Shader.h
Normal file
69
include/agl/shader/Shader.h
Normal file
|
@ -0,0 +1,69 @@
|
||||||
|
/**
|
||||||
|
* @file Shader.h
|
||||||
|
* @brief Defines a basic shader.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
enum ShaderType
|
||||||
|
{
|
||||||
|
ShaderType_Vertex = 0,
|
||||||
|
ShaderType_Fragment = 1,
|
||||||
|
ShaderType_Geometry = 2,
|
||||||
|
ShaderType_Compute = 3
|
||||||
|
};
|
||||||
|
|
||||||
|
class Shader
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Shader();
|
||||||
|
|
||||||
|
virtual ~Shader();
|
||||||
|
|
||||||
|
virtual s32 getShaderType() const = 0;
|
||||||
|
virtual s32 getShaderMode() const;
|
||||||
|
virtual s32 getRingItemSize() const;
|
||||||
|
|
||||||
|
void setBinary(void const *shaderBinary);
|
||||||
|
|
||||||
|
void* mShaderBinary; // _8
|
||||||
|
u64 _10;
|
||||||
|
u64 _18;
|
||||||
|
};
|
||||||
|
|
||||||
|
class VertexShader : public agl::Shader
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~VertexShader();
|
||||||
|
|
||||||
|
virtual s32 getShaderType() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
class FragmentShader : public agl::Shader
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~FragmentShader();
|
||||||
|
|
||||||
|
virtual s32 getShaderType() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
class GeometryShader : public agl::Shader
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~GeometryShader();
|
||||||
|
|
||||||
|
virtual s32 getShaderType() const;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ComputeShader : public agl::Shader
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual ~ComputeShader();
|
||||||
|
|
||||||
|
virtual s32 getShaderType() const;
|
||||||
|
};
|
||||||
|
};
|
42
include/agl/shader/ShaderCompileInfo.h
Normal file
42
include/agl/shader/ShaderCompileInfo.h
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
/**
|
||||||
|
* @file ShaderCompileInfo.h
|
||||||
|
* @brief Defines file devices and extensions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sead/heap.h"
|
||||||
|
#include "sead/hostio.h"
|
||||||
|
#include "sead/array.h"
|
||||||
|
#include "Shader.h"
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
class ShaderCompileInfo : public sead::hostio::Node
|
||||||
|
{
|
||||||
|
// this value is used as an index to a table of version lists
|
||||||
|
// on 1.2.0, located at 0x7101E80B30
|
||||||
|
typedef s32 Target;
|
||||||
|
|
||||||
|
ShaderCompileInfo();
|
||||||
|
|
||||||
|
virtual ~ShaderCompileInfo();
|
||||||
|
|
||||||
|
void destroy();
|
||||||
|
void create(s32, s32 bufferSize, sead::Heap *);
|
||||||
|
void clearVariation();
|
||||||
|
void pushBackVariation(char const *, char const *);
|
||||||
|
void calcCompileSource(agl::ShaderType, sead::BufferedSafeStringBase<char> *, agl::ShaderCompileInfo::Target, bool);
|
||||||
|
sead::SafeStringBase<char>* getRegitserUniformBlockName(); // "RegisterUBO"
|
||||||
|
|
||||||
|
u64 _8;
|
||||||
|
char* mName; // _10
|
||||||
|
u64 _18;
|
||||||
|
u64 _20;
|
||||||
|
sead::PtrArrayImpl _28;
|
||||||
|
sead::PtrArrayImpl _38;
|
||||||
|
sead::PtrArrayImpl _48;
|
||||||
|
sead::PtrArrayImpl _58;
|
||||||
|
};
|
||||||
|
};
|
67
include/agl/shader/ShaderProgram.h
Normal file
67
include/agl/shader/ShaderProgram.h
Normal file
|
@ -0,0 +1,67 @@
|
||||||
|
/**
|
||||||
|
* @file ShaderProgram.h
|
||||||
|
* @brief Defines a general shader program to compile raw shaders with macros.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "agl/DisplayList.h"
|
||||||
|
#include "sead/heap.h"
|
||||||
|
#include "sead/string.h"
|
||||||
|
#include "Shader.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
class ShaderProgram
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
class VariationBuffer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
void initialize(s32, sead::Heap *);
|
||||||
|
void createMacro(s32, sead::SafeStringBase<char> const &, sead::SafeStringBase<char> const &, s32, sead::Heap *);
|
||||||
|
void setMacroValue(s32, s32, sead::SafeStringBase<char> const &);
|
||||||
|
void create(sead::Heap *);
|
||||||
|
};
|
||||||
|
|
||||||
|
ShaderProgram();
|
||||||
|
|
||||||
|
virtual ~ShaderProgram();
|
||||||
|
|
||||||
|
void cleanUp();
|
||||||
|
void destroyLocationBuffers();
|
||||||
|
void initializeVariation(sead::SafeStringBase<char> const &, s32, sead::Heap *);
|
||||||
|
void createVariationMacro(s32, sead::SafeStringBase<char> const &, sead::SafeStringBase<char> const &, s32, sead::Heap *);
|
||||||
|
void setVariationMacroValue(s32, s32, sead::SafeStringBase<char> const &);
|
||||||
|
void createVariation(sead::Heap *);
|
||||||
|
|
||||||
|
u64* _8;
|
||||||
|
agl::DisplayList mShaderDisplayList; // _10
|
||||||
|
u32 _278;
|
||||||
|
u32 _27C;
|
||||||
|
u64 _280;
|
||||||
|
u32 _288;
|
||||||
|
u32 _28C;
|
||||||
|
u64 _290;
|
||||||
|
u32 _298;
|
||||||
|
u32 _29C;
|
||||||
|
u64 _2A0;
|
||||||
|
u32 _2A8;
|
||||||
|
u32 _2AC;
|
||||||
|
u64 _2B0;
|
||||||
|
u32 _2B8;
|
||||||
|
u32 _2BC;
|
||||||
|
u64 _2C0;
|
||||||
|
u32 _2C8;
|
||||||
|
u32 _2CC;
|
||||||
|
u64 _2D0;
|
||||||
|
agl::VertexShader mVertexShader; // _2D8
|
||||||
|
agl::FragmentShader mFragmentShader; // _2F8
|
||||||
|
agl::GeometryShader mGeometryShader; // _318
|
||||||
|
agl::ComputeShader mComputeShader; // _338
|
||||||
|
u8 _358[0x418-0x358]; // todo; what is here?
|
||||||
|
u64 _418;
|
||||||
|
u32 _420;
|
||||||
|
};
|
||||||
|
};
|
38
include/agl/shader/ShaderProgramArchive.h
Normal file
38
include/agl/shader/ShaderProgramArchive.h
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
/**
|
||||||
|
* @file ShaderProgramArchive.h
|
||||||
|
* @brief Defines a class wrapper for SHARCB (Shader Binary) archives.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sead/disposer.h"
|
||||||
|
#include "sead/heap.h"
|
||||||
|
#include "sead/hostio.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
class ResBinaryShaderArchive;
|
||||||
|
class ResShaderArchive;
|
||||||
|
class ResShaderProgram;
|
||||||
|
class ResShaderSource;
|
||||||
|
|
||||||
|
class ShaderProgramArchive : public sead::IDisposer, public sead::hostio::Node
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ShaderProgramArchive();
|
||||||
|
|
||||||
|
virtual ~ShaderProgramArchive();
|
||||||
|
|
||||||
|
void destroy();
|
||||||
|
void createWithOption(agl::ResBinaryShaderArchive, agl::ResShaderArchive, u32, sead::Heap *);
|
||||||
|
void destroyResFile_();
|
||||||
|
void initialize(agl::ShaderProgramArchive *, s32, agl::ResShaderProgram, sead::Heap *);
|
||||||
|
void updateCompileInfo();
|
||||||
|
void setUp();
|
||||||
|
void setUp_(bool);
|
||||||
|
|
||||||
|
u64 _20;
|
||||||
|
agl::ResBinaryShaderArchive* mBinaryShaderArchive; // _28
|
||||||
|
agl::ResShaderArchive* mResShaderArchive; // _30
|
||||||
|
};
|
||||||
|
};
|
56
include/agl/shtxt/Clause.h
Normal file
56
include/agl/shtxt/Clause.h
Normal file
|
@ -0,0 +1,56 @@
|
||||||
|
/**
|
||||||
|
* @file Clause.h
|
||||||
|
* @brief Defines a clause for shader processing.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sead/string.h"
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
namespace shtxt
|
||||||
|
{
|
||||||
|
class Clause
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
class TableChecker
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
TableChecker();
|
||||||
|
};
|
||||||
|
|
||||||
|
typedef u8 Type;
|
||||||
|
|
||||||
|
Clause();
|
||||||
|
Clause(agl::shtxt::Clause::Type, char const *, char const *);
|
||||||
|
~Clause();
|
||||||
|
|
||||||
|
u64 findNumberBlock(agl::shtxt::Clause::Type *, char const *);
|
||||||
|
void appendTo(sead::BufferedSafeStringBase<char> *) const;
|
||||||
|
void appendTo(sead::BufferedSafeStringBase<char> *, u32) const;
|
||||||
|
void copyTo(sead::BufferedSafeStringBase<char> *) const;
|
||||||
|
f64 toNumber() const;
|
||||||
|
f64 forceNumber() const;
|
||||||
|
u32 calcLineFeedCount() const;
|
||||||
|
bool compareImpl(agl::shtxt::Clause const &, u32, agl::shtxt::Clause const *, agl::shtxt::Clause const *) const;
|
||||||
|
bool compare(sead::SafeStringBase<char> const &, u32) const;
|
||||||
|
bool compare(agl::shtxt::Clause const &, u32) const;
|
||||||
|
s32 calcHash(void const *, u32, u32) const;
|
||||||
|
|
||||||
|
agl::shtxt::Clause* _0;
|
||||||
|
agl::shtxt::Clause* _8;
|
||||||
|
u8 mClauseType; // _10
|
||||||
|
u8 _11;
|
||||||
|
u8 _12;
|
||||||
|
u8 _13;
|
||||||
|
u32 _14;
|
||||||
|
char* _18;
|
||||||
|
char* _20;
|
||||||
|
|
||||||
|
static bool cTableChecked;
|
||||||
|
static u32* cHashTable;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
45
include/agl/shtxt/DefineLinker.h
Normal file
45
include/agl/shtxt/DefineLinker.h
Normal file
|
@ -0,0 +1,45 @@
|
||||||
|
/**
|
||||||
|
* @file DefineLinker.h
|
||||||
|
* @brief Defines a linker for shader source compilation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sead/heap.h"
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
namespace shtxt
|
||||||
|
{
|
||||||
|
class Clause;
|
||||||
|
|
||||||
|
class DefineLinker
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
DefineLinker();
|
||||||
|
~DefineLinker();
|
||||||
|
|
||||||
|
void clear();
|
||||||
|
bool set(sead::Heap *, agl::shtxt::Clause const *, agl::shtxt::Clause const *);
|
||||||
|
bool setImpl(sead::Heap *, agl::shtxt::Clause const *, agl::shtxt::Clause const *, bool);
|
||||||
|
void setDirect(agl::shtxt::Clause *, u32, bool);
|
||||||
|
void updateHash();
|
||||||
|
void replace(sead::Heap *, agl::shtxt::Clause const *, agl::shtxt::Clause const *, bool);
|
||||||
|
agl::shtxt::DefineLinker* clone(sead::Heap *, sead::Heap *) const;
|
||||||
|
agl::shtxt::DefineLinker* cloneAll(sead::Heap *, sead::Heap *) const;
|
||||||
|
|
||||||
|
agl::shtxt::DefineLinker* _0; // seems to copy itself twice
|
||||||
|
agl::shtxt::DefineLinker* _8;
|
||||||
|
agl::shtxt::Clause* _10;
|
||||||
|
agl::shtxt::Clause* _18; // hash clause?
|
||||||
|
u64 _20;
|
||||||
|
agl::shtxt::Clause* _28;
|
||||||
|
u64 _30;
|
||||||
|
u64 _38;
|
||||||
|
s32 mHash; // _40
|
||||||
|
s16 _44; // -1
|
||||||
|
u16 _46; // 0x101
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
53
include/agl/shtxt/ExpressionEvaluator.h
Normal file
53
include/agl/shtxt/ExpressionEvaluator.h
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
/**
|
||||||
|
* @file ExpressionEvaluator.h
|
||||||
|
* @brief Defines an evaluator for shader expressions.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sead/array.h"
|
||||||
|
#include "sead/delegate.h"
|
||||||
|
#include "sead/heap.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
namespace shtxt
|
||||||
|
{
|
||||||
|
class Clause;
|
||||||
|
class SyntaxLeash;
|
||||||
|
|
||||||
|
class ExpressionEvaluator
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ExpressionEvaluator();
|
||||||
|
ExpressionEvaluator(sead::Heap *, sead::Heap *, sead::AnyDelegate1Const<agl::shtxt::Clause *> const *);
|
||||||
|
|
||||||
|
void initialize(sead::Heap *, sead::Heap *, sead::AnyDelegate1Const<agl::shtxt::Clause *> const *);
|
||||||
|
u64 findSyntaxLeash(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause const *) const;
|
||||||
|
u64* createBinaryOperatorSyntaxTree(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *);
|
||||||
|
u64* createTernaryOperatorSyntaxTree(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *);
|
||||||
|
u64* createTokenOperatorSyntaxTree(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *);
|
||||||
|
void resolveOperatorTokenConnect(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *, agl::shtxt::Clause *);
|
||||||
|
void resolveOperatorUnary(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *, agl::shtxt::Clause *);
|
||||||
|
void resolveOperatorMathHigh(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *, agl::shtxt::Clause *);
|
||||||
|
void resolveOperatorMathLow(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *, agl::shtxt::Clause *);
|
||||||
|
void resolveOperatorShift(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *, agl::shtxt::Clause *);
|
||||||
|
void resolveOperatorCompareHigh(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *, agl::shtxt::Clause *);
|
||||||
|
void resolveOperatorCompareLow(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *, agl::shtxt::Clause *);
|
||||||
|
void resolveOperatorBitOpAnd(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *, agl::shtxt::Clause *);
|
||||||
|
void resolveOperatorBitOpXor(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *, agl::shtxt::Clause *);
|
||||||
|
void resolveOperatorBitOpOr(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *, agl::shtxt::Clause *);
|
||||||
|
void resolveOperatorLogicalAnd(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *, agl::shtxt::Clause *);
|
||||||
|
void resolveOperatorLogicalOr(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *, agl::shtxt::Clause *);
|
||||||
|
void resolveOperatorTernary(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *, agl::shtxt::Clause *);
|
||||||
|
void resolveOperatorAssignment(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *, agl::shtxt::Clause *);
|
||||||
|
void resolveOperator(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *, agl::shtxt::Clause *);
|
||||||
|
void resolveParenthesis(sead::ObjArray<agl::shtxt::SyntaxLeash> *, agl::shtxt::Clause *, agl::shtxt::Clause *);
|
||||||
|
void resolve(agl::shtxt::Clause *, agl::shtxt::Clause *, bool);
|
||||||
|
|
||||||
|
sead::Heap* _0;
|
||||||
|
sead::Heap* _8;
|
||||||
|
sead::AnyDelegate1Const<agl::shtxt::Clause *>* _10;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
36
include/agl/shtxt/Lexer.h
Normal file
36
include/agl/shtxt/Lexer.h
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
/**
|
||||||
|
* @file Lexer.h
|
||||||
|
* @brief Defines a lexer for parsing shader clauses.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sead/heap.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
namespace shtxt
|
||||||
|
{
|
||||||
|
class Clause;
|
||||||
|
|
||||||
|
class Lexer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Lexer();
|
||||||
|
~Lexer();
|
||||||
|
|
||||||
|
void initialize(sead::Heap *, char const *, agl::shtxt::Clause *);
|
||||||
|
void setupCurrentRange(u64 range);
|
||||||
|
u32 findNumberBlock() const;
|
||||||
|
agl::shtxt::Clause* createClause(u32) const;
|
||||||
|
bool execute(bool);
|
||||||
|
|
||||||
|
sead::Heap* _0;
|
||||||
|
agl::shtxt::Clause* _8;
|
||||||
|
char* mRefName; // _10
|
||||||
|
u64 _18;
|
||||||
|
u64 _20;
|
||||||
|
u64 _28;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
63
include/agl/shtxt/Preprocessor.h
Normal file
63
include/agl/shtxt/Preprocessor.h
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
/**
|
||||||
|
* @file Preprocessor.h
|
||||||
|
* @brief Defines a preprocessor for a collection of clauses and macros in a shader program.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sead/heap.h"
|
||||||
|
#include "sead/string.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
namespace shtxt
|
||||||
|
{
|
||||||
|
class Clause;
|
||||||
|
class DefineLinker;
|
||||||
|
class MacroDeployInfo;
|
||||||
|
class MacroReplaceInfo;
|
||||||
|
|
||||||
|
class Preprocessor
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Preprocessor(sead::Heap *, sead::Heap *);
|
||||||
|
~Preprocessor();
|
||||||
|
|
||||||
|
void finalize();
|
||||||
|
void initialize(char const *);
|
||||||
|
void removeClause(agl::shtxt::Clause *) const;
|
||||||
|
void removeClause(agl::shtxt::Clause *, agl::shtxt::Clause *, bool) const;
|
||||||
|
void removeClauseAll();
|
||||||
|
void removeDefineLinkerAll();
|
||||||
|
void setReplacedMacro(char const **, char const **, u32);
|
||||||
|
void setDeployMacro(char const**, u32);
|
||||||
|
void appendMacro(agl::shtxt::DefineLinker const *);
|
||||||
|
bool preprocess(u32, u64, u64);
|
||||||
|
void removeComment();
|
||||||
|
void forceLF();
|
||||||
|
void reduceSpace();
|
||||||
|
void reduceLF();
|
||||||
|
void format(bool);
|
||||||
|
bool construct(sead::BufferedSafeStringBase<char> *dest) const;
|
||||||
|
u64 calcConstructLength() const;
|
||||||
|
|
||||||
|
|
||||||
|
u64 _0;
|
||||||
|
u64 _8; // some sort of size
|
||||||
|
u64 _10;
|
||||||
|
sead::ExpHeap* _18;
|
||||||
|
u64 _20;
|
||||||
|
agl::shtxt::Clause* _28;
|
||||||
|
agl::shtxt::DefineLinker* _30;
|
||||||
|
char* mRefName; // _38
|
||||||
|
agl::shtxt::MacroReplaceInfo* _40;
|
||||||
|
u32 _48; // related to replace info
|
||||||
|
u32 _4C;
|
||||||
|
agl::shtxt::MacroDeployInfo* _50;
|
||||||
|
u32 _58; // related to deploy info
|
||||||
|
u32 _5C;
|
||||||
|
agl::shtxt::DefineLinker* _60;
|
||||||
|
u64 _68;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
39
include/agl/shtxt/SyntaxTree.h
Normal file
39
include/agl/shtxt/SyntaxTree.h
Normal file
|
@ -0,0 +1,39 @@
|
||||||
|
/**
|
||||||
|
* @file SyntaxTree.h
|
||||||
|
* @brief Defines a syntax tree for shader compilation.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sead/delegate.h"
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
namespace shtxt
|
||||||
|
{
|
||||||
|
class Clause;
|
||||||
|
|
||||||
|
class SyntaxTree
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SyntaxTree(agl::shtxt::Clause *);
|
||||||
|
~SyntaxTree();
|
||||||
|
|
||||||
|
void removeClauseRecursive(sead::AnyDelegate1Const<agl::shtxt::Clause *> const *);
|
||||||
|
f64 checkAndGetValue();
|
||||||
|
void checkAndEvaluate(agl::shtxt::SyntaxTree const *) const;
|
||||||
|
f64 evaluate();
|
||||||
|
void constructRecursive(sead::Heap *,sead::Heap *);
|
||||||
|
u64* construct(sead::Heap *, sead::Heap *) const;
|
||||||
|
|
||||||
|
agl::shtxt::SyntaxTree* _0;
|
||||||
|
agl::shtxt::SyntaxTree* _8;
|
||||||
|
agl::shtxt::SyntaxTree* _10;
|
||||||
|
u64 _18;
|
||||||
|
agl::shtxt::Clause* _20;
|
||||||
|
u64 _28;
|
||||||
|
u32 _30;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
109
include/agl/util.h
Normal file
109
include/agl/util.h
Normal file
|
@ -0,0 +1,109 @@
|
||||||
|
/**
|
||||||
|
* @file util.h
|
||||||
|
* @brief Defines enumerators for texture types and formats.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace agl
|
||||||
|
{
|
||||||
|
enum TextureType
|
||||||
|
{
|
||||||
|
TYPELESS = 0,
|
||||||
|
UNORM = 1,
|
||||||
|
SNORM = 2,
|
||||||
|
UFLOAT = 3,
|
||||||
|
FLOAT = 4,
|
||||||
|
SINT = 5,
|
||||||
|
UINT = 6,
|
||||||
|
SRGB = 7,
|
||||||
|
};
|
||||||
|
enum TextureFormat
|
||||||
|
{
|
||||||
|
INVALID,
|
||||||
|
R32_G32_B32_A32,
|
||||||
|
R32_G32_B32,
|
||||||
|
R16_G16_B16_A16,
|
||||||
|
R5_G5_B5_A1,
|
||||||
|
R32_G32,
|
||||||
|
R32_G8_X24,
|
||||||
|
D32_S8_X24,
|
||||||
|
R32_X8_X24,
|
||||||
|
X32_G8_X24,
|
||||||
|
R10_G10_B10_A2,
|
||||||
|
R11_G11_B10,
|
||||||
|
R8_G8_B8_A8,
|
||||||
|
R9_G9B9E5_SHAREDEXP,
|
||||||
|
R8_G8_B8_G8,
|
||||||
|
R8_G8_B8_X8,
|
||||||
|
R4_G4_B4_A4,
|
||||||
|
R16_G16,
|
||||||
|
R32,
|
||||||
|
D32,
|
||||||
|
R24_G8,
|
||||||
|
D24_S8,
|
||||||
|
R24_X8,
|
||||||
|
X24_G8,
|
||||||
|
R8G8,
|
||||||
|
R4_G4,
|
||||||
|
R16,
|
||||||
|
G8_R8_G8_B8,
|
||||||
|
D16,
|
||||||
|
D24,
|
||||||
|
D24S8,
|
||||||
|
D32S8,
|
||||||
|
R8,
|
||||||
|
A8,
|
||||||
|
R1,
|
||||||
|
B5_G6_R5,
|
||||||
|
A1_B5_G5_R5,
|
||||||
|
BC1,
|
||||||
|
BC2,
|
||||||
|
BC3,
|
||||||
|
BC4,
|
||||||
|
BC5,
|
||||||
|
BC6,
|
||||||
|
BC7,
|
||||||
|
AYUV,
|
||||||
|
Y410,
|
||||||
|
Y416,
|
||||||
|
NV12,
|
||||||
|
P010,
|
||||||
|
P016,
|
||||||
|
YUY2,
|
||||||
|
Y210,
|
||||||
|
Y216,
|
||||||
|
NV11,
|
||||||
|
AI44,
|
||||||
|
IA44,
|
||||||
|
P8,
|
||||||
|
A8P8,
|
||||||
|
P208,
|
||||||
|
V208,
|
||||||
|
V408,
|
||||||
|
ASTC4x4,
|
||||||
|
ASTC5x4,
|
||||||
|
ASTC5x5,
|
||||||
|
ASTC6x5,
|
||||||
|
ASTC6x6,
|
||||||
|
ASTC8x5,
|
||||||
|
ASTC8x6,
|
||||||
|
ASTC8x8,
|
||||||
|
ASTC10x5,
|
||||||
|
ASTC10x6,
|
||||||
|
ASTC10x8,
|
||||||
|
ASTC10x10,
|
||||||
|
ASTC12x10,
|
||||||
|
ASTC12x12
|
||||||
|
};
|
||||||
|
|
||||||
|
enum TextureAttribute
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
enum MultiSampleType
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
23
include/agl/utl.h
Normal file
23
include/agl/utl.h
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
/**
|
||||||
|
* @file GameDataFile.h
|
||||||
|
* @brief Utilitis for agl namespace.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "../types.h"
|
||||||
|
#include "DrawContext.h"
|
||||||
|
#include "sead/math/seadVector.h"
|
||||||
|
#include "sead/math/seadMatrix.h"
|
||||||
|
#include "sead/gfx/seadColor.h"
|
||||||
|
|
||||||
|
namespace agl {
|
||||||
|
namespace utl {
|
||||||
|
class DevTools{
|
||||||
|
public:
|
||||||
|
void static beginDrawImm(agl::DrawContext *,sead::Matrix34<float> const&,sead::Matrix44<float> const&);
|
||||||
|
void static drawTriangleImm(agl::DrawContext*, sead::Vector3<float> const&, sead::Vector3<float> const&, sead::Vector3<float> const&, sead::Color4f const&);
|
||||||
|
void static drawLineImm(agl::DrawContext*, sead::Vector3<float> const&, sead::Vector3<float> const&, sead::Color4f const&, float);
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
12
include/al/HtmlViewer.h
Normal file
12
include/al/HtmlViewer.h
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sead/prim/seadSafeString.hpp"
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class HtmlViewer
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
void call(const char *, sead::BufferedSafeStringBase<char> *) const;
|
||||||
|
};
|
||||||
|
};
|
124
include/al/LiveActor/LiveActor.h
Normal file
124
include/al/LiveActor/LiveActor.h
Normal file
|
@ -0,0 +1,124 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/actor/ActorInitInfo.h"
|
||||||
|
#include "al/actor/ActorSceneInfo.h"
|
||||||
|
#include "al/actor/ActorActionKeeper.h"
|
||||||
|
#include "al/area/AreaObjDirector.h"
|
||||||
|
#include "al/audio/AudioKeeper.h"
|
||||||
|
#include "al/camera/CameraDirector.h"
|
||||||
|
#include "al/collision/CollisionDirector.h"
|
||||||
|
#include "al/effect/EffectKeeper.h"
|
||||||
|
#include "al/hio/HioNode.h"
|
||||||
|
#include "al/nerve/Nerve.h"
|
||||||
|
#include "al/nerve/NerveStateCtrl.h"
|
||||||
|
#include "al/pose/ActorPoseKeeper.h"
|
||||||
|
#include "al/rail/RailKeeper.h"
|
||||||
|
#include "al/rail/RailRider.h"
|
||||||
|
#include "al/scene/SceneObjHolder.h"
|
||||||
|
#include "al/screen/ScreenPointKeeper.h"
|
||||||
|
#include "al/sensor/HitSensorKeeper.h"
|
||||||
|
#include "al/switch/StageSwitchKeeper.h"
|
||||||
|
#include "al/actor/SubActorKeeper.h"
|
||||||
|
|
||||||
|
// vtable for LiveActor: 1C4EB58
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
|
||||||
|
class ActorPoseKeeperBase;
|
||||||
|
class ActorExecuteInfo;
|
||||||
|
class ActorItemKeeper;
|
||||||
|
class ActorScoreKeeper;
|
||||||
|
class Collider;
|
||||||
|
class CollisionParts;
|
||||||
|
class ModelKeeper;
|
||||||
|
class ShadowKeeper;
|
||||||
|
class ActorPrePassLightKeeper;
|
||||||
|
class ActorOcclusionKeeper;
|
||||||
|
class LiveActorFlag;
|
||||||
|
|
||||||
|
class ActorInitInfo;
|
||||||
|
class HitSensor;
|
||||||
|
class SensorMsg;
|
||||||
|
class ScreenPointer;
|
||||||
|
class ScreenPointTarget;
|
||||||
|
|
||||||
|
class LiveActor : public al::IUseNerve, public al::IUseEffectKeeper, public al::IUseAudioKeeper, public al::IUseStageSwitch, public al::IUseSceneObjHolder, public al::IUseAreaObj, public al::IUseCamera, public al::IUseCollision, public al::IUseRail, public al::IUseHioNode
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
LiveActor(const char *);
|
||||||
|
|
||||||
|
virtual al::NerveKeeper* getNerveKeeper() const;
|
||||||
|
|
||||||
|
virtual void init(const ActorInitInfo &);
|
||||||
|
virtual void initAfterPlacement();
|
||||||
|
virtual void appear();
|
||||||
|
virtual void makeActorAlive();
|
||||||
|
virtual void kill();
|
||||||
|
virtual void makeActorDead();
|
||||||
|
virtual void movement();
|
||||||
|
virtual void calcAnim();
|
||||||
|
virtual void draw() const;
|
||||||
|
virtual void startClipped();
|
||||||
|
virtual void endClipped();
|
||||||
|
virtual void attackSensor(HitSensor *, HitSensor *);
|
||||||
|
virtual bool receiveMsg(const SensorMsg *, HitSensor *, HitSensor *);
|
||||||
|
virtual bool receiveMsgScreenPoint(const SensorMsg *, ScreenPointer *, ScreenPointTarget *);
|
||||||
|
|
||||||
|
virtual const char *getName() const { return this->mActorName; };
|
||||||
|
|
||||||
|
virtual sead::Matrix34f *getBaseMtx() const;
|
||||||
|
|
||||||
|
virtual al::EffectKeeper *getEffectKeeper() const { return this->mEffectKeeper; };
|
||||||
|
|
||||||
|
virtual al::AudioKeeper *getAudioKeeper() const { return this->mAudioKeeper; };
|
||||||
|
|
||||||
|
virtual al::StageSwitchKeeper *getStageSwitchKeeper() const { return this->mStageSwitchKeeper; };
|
||||||
|
|
||||||
|
virtual al::RailRider *getRailRider() const
|
||||||
|
{
|
||||||
|
if (this->mRailKeeper)
|
||||||
|
return this->mRailKeeper->getRailRider();
|
||||||
|
return nullptr;
|
||||||
|
};
|
||||||
|
|
||||||
|
virtual al::SceneObjHolder *getSceneObjHolder() const { return this->mSceneInfo->mSceneObjHolder; };
|
||||||
|
|
||||||
|
virtual al::CollisionDirector *getCollisionDirector() const { return this->mSceneInfo->mCollisionDirector; };
|
||||||
|
|
||||||
|
virtual al::AreaObjDirector *getAreaObjDirector() const { return this->mSceneInfo->mAreaObjDirector; };
|
||||||
|
|
||||||
|
virtual al::CameraDirector *getCameraDirector() const { return this->mSceneInfo->mCameraDirector; };
|
||||||
|
|
||||||
|
virtual void initStageSwitchKeeper() { this->mStageSwitchKeeper = new StageSwitchKeeper(); };
|
||||||
|
|
||||||
|
virtual void control();
|
||||||
|
|
||||||
|
virtual void updateCollider();
|
||||||
|
|
||||||
|
const char *mActorName; // 0x48
|
||||||
|
al::ActorPoseKeeperBase *mPoseKeeper; // 0x50
|
||||||
|
al::ActorExecuteInfo *mLayoutExecuteInfo; // 0x58
|
||||||
|
al::ActorActionKeeper *mActorActionKeeper; // 0x60
|
||||||
|
al::ActorItemKeeper *mActorItemKeeper; // 0x68
|
||||||
|
al::ActorScoreKeeper *mActorScoreKeeper; // 0x70
|
||||||
|
al::Collider *mCollider; // 0x78
|
||||||
|
al::CollisionParts *mCollisionParts; // 0x80
|
||||||
|
al::ModelKeeper *mModelKeeper; // 0x88
|
||||||
|
al::NerveKeeper *mNerveKeeper; // 0x90
|
||||||
|
al::HitSensorKeeper *mHitSensorKeeper; // 0x98
|
||||||
|
al::ScreenPointKeeper *mScreenPointKeeper; // 0xA0
|
||||||
|
al::EffectKeeper *mEffectKeeper; // 0xA8
|
||||||
|
al::AudioKeeper *mAudioKeeper; // 0xB0
|
||||||
|
void *gap_4; // 0xB8
|
||||||
|
al::StageSwitchKeeper *mStageSwitchKeeper; // 0xC0
|
||||||
|
al::RailKeeper *mRailKeeper; // 0xC8
|
||||||
|
al::ShadowKeeper *mShadowKeeper; // 0xD0
|
||||||
|
al::ActorPrePassLightKeeper *mActorPrePassLightKeeper; // 0xD8
|
||||||
|
al::ActorOcclusionKeeper *mActorOcclusionKeeper; // 0xE0
|
||||||
|
al::SubActorKeeper *mSubActorKeeper; // 0xE8
|
||||||
|
void *gap_6; // 0xF0
|
||||||
|
al::ActorSceneInfo *mSceneInfo; // 0xF8
|
||||||
|
al::LiveActorFlag *mLiveActorFlag; // 0x100
|
||||||
|
};
|
||||||
|
};
|
21
include/al/LiveActor/LiveActorGroup.h
Normal file
21
include/al/LiveActor/LiveActorGroup.h
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/hio/HioNode.h"
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class LiveActor;
|
||||||
|
|
||||||
|
class LiveActorGroup : public al::HioNode
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
LiveActorGroup(const char *, int);
|
||||||
|
|
||||||
|
virtual void registerActor(al::LiveActor *);
|
||||||
|
|
||||||
|
const char* mGroupName; // _8
|
||||||
|
int mMaxActorCount; // _10
|
||||||
|
int mActorCount; // _14
|
||||||
|
al::LiveActor** mActors; // _18
|
||||||
|
};
|
||||||
|
};
|
30
include/al/PlayerHolder/PlayerHolder.h
Normal file
30
include/al/PlayerHolder/PlayerHolder.h
Normal file
|
@ -0,0 +1,30 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sead/math/seadVector.h"
|
||||||
|
#include "al/scene/Scene.h"
|
||||||
|
#include "al/LiveActor/LiveActor.h"
|
||||||
|
#include "game/Player/PlayerActorHakoniwa.h"
|
||||||
|
#include "types.h"
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
|
||||||
|
class PadRumbleKeeper;
|
||||||
|
|
||||||
|
class PlayerHolder {
|
||||||
|
public:
|
||||||
|
PlayerHolder(int bufSize);
|
||||||
|
void clear(void);
|
||||||
|
void registerPlayer(al::LiveActor *, al::PadRumbleKeeper *);
|
||||||
|
PlayerActorHakoniwa *getPlayer(int) const;
|
||||||
|
PlayerActorHakoniwa *tryGetPlayer(int) const;
|
||||||
|
int getPlayerNum() const;
|
||||||
|
int getBufferSize() const {return bufferSize;};
|
||||||
|
bool isFull(void) const;
|
||||||
|
bool isExistPadRumbleKeeper(int) const;
|
||||||
|
al::PadRumbleKeeper *getPadRumbleKeeper(int) const;
|
||||||
|
|
||||||
|
undefined unkPointer[0x8];
|
||||||
|
int bufferSize;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
9
include/al/Scene.hpp
Normal file
9
include/al/Scene.hpp
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class Scene
|
||||||
|
{
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
11
include/al/action/ActionEffectCtrl.h
Normal file
11
include/al/action/ActionEffectCtrl.h
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/effect/EffectKeeper.h"
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
class ActionEffectCtrl {
|
||||||
|
public:
|
||||||
|
void startAction(char const *);
|
||||||
|
IUseEffectKeeper *mEffectKeeper;
|
||||||
|
};
|
||||||
|
}
|
47
include/al/actor/ActorActionKeeper.h
Normal file
47
include/al/actor/ActorActionKeeper.h
Normal file
|
@ -0,0 +1,47 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/LiveActor/LiveActor.h"
|
||||||
|
#include "al/action/ActionEffectCtrl.h"
|
||||||
|
|
||||||
|
#include "sead/math/seadVector.h"
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
|
||||||
|
class ActorResource;
|
||||||
|
class ActionAnimCtrl;
|
||||||
|
class NerveActionCtrl;
|
||||||
|
class ActionFlagCtrl;
|
||||||
|
class ActionSeCtrl;
|
||||||
|
class ActionBgmCtrl;
|
||||||
|
class ActionPadAndCameraCtrl {
|
||||||
|
public:
|
||||||
|
ActionPadAndCameraCtrl(LiveActor const *, al::ActorResource const *, sead::Vector3f const *, char const *);
|
||||||
|
unsigned char padding[0x18];
|
||||||
|
int mRumbleCount; // 0x18
|
||||||
|
};
|
||||||
|
class ActionScreenEffectCtrl;
|
||||||
|
class ActorActionKeeper
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
inline ActorActionKeeper(LiveActor *, char const*, ActionAnimCtrl *, NerveActionCtrl *, ActionFlagCtrl *, ActionEffectCtrl *, ActionSeCtrl *, ActionBgmCtrl *, ActionPadAndCameraCtrl *, ActionScreenEffectCtrl *);
|
||||||
|
void tryCreate(al::LiveActor *,al::ActorResource const*,char const*,char const*);
|
||||||
|
void startAction(char const*);
|
||||||
|
void tryStartActionNoAnim(char const*);
|
||||||
|
void updatePrev(void);
|
||||||
|
void updatePost(void);
|
||||||
|
void init(void);
|
||||||
|
|
||||||
|
LiveActor *mParentActor; // 0x0
|
||||||
|
const char *mActorName; // 0x8
|
||||||
|
bool unkBool; // 0x10
|
||||||
|
ActionAnimCtrl *mAnimCtrl; // 0x18
|
||||||
|
NerveActionCtrl *mNrvActionCtrl; // 0x20
|
||||||
|
ActionFlagCtrl *mFlagCtrl; // 0x28
|
||||||
|
ActionEffectCtrl *mEffectCtrl; // 0x30
|
||||||
|
ActionSeCtrl *mSeCtrl; // 0x38
|
||||||
|
ActionScreenEffectCtrl *mScreenEffectCtrl; // 0x40
|
||||||
|
ActionPadAndCameraCtrl *mPadAndCamCtrl; // 0x48
|
||||||
|
ActionBgmCtrl *mBgmCtrl; // 0x50
|
||||||
|
};
|
||||||
|
} // namespace al
|
25
include/al/actor/ActorCameraTarget.h
Normal file
25
include/al/actor/ActorCameraTarget.h
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sead/math/seadVector.h"
|
||||||
|
#include "al/LiveActor/LiveActor.h"
|
||||||
|
#include "al/camera/CameraTargetBase.h"
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class ActorCameraTarget : public al::CameraTargetBase
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ActorCameraTarget(al::LiveActor const *, float, sead::Vector3f const *);
|
||||||
|
|
||||||
|
void calcTrans(sead::Vector3f *) const;
|
||||||
|
void calcSide(sead::Vector3f *) const;
|
||||||
|
void calcUp(sead::Vector3f *) const;
|
||||||
|
void calcFront(sead::Vector3f *) const;
|
||||||
|
void calcGravity(sead::Vector3f *) const;
|
||||||
|
void calcVelocity(sead::Vector3f *) const;
|
||||||
|
|
||||||
|
al::LiveActor *actor; // 0x10
|
||||||
|
sead::Vector3f *pos; // 0x18
|
||||||
|
float distance; // 0x20
|
||||||
|
};
|
||||||
|
};
|
21
include/al/actor/ActorDimensionKeeper.h
Normal file
21
include/al/actor/ActorDimensionKeeper.h
Normal file
|
@ -0,0 +1,21 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/LiveActor/LiveActor.h"
|
||||||
|
|
||||||
|
class ActorDimensionKeeper {
|
||||||
|
public:
|
||||||
|
ActorDimensionKeeper(al::LiveActor const *);
|
||||||
|
void validate(void);
|
||||||
|
void invalidate(void);
|
||||||
|
void forceChange2DKeep(void);
|
||||||
|
void forceEndChange2DKeep(void);
|
||||||
|
void update(void);
|
||||||
|
|
||||||
|
al::LiveActor *curActor; // 0x0
|
||||||
|
bool is2D; // 0x8
|
||||||
|
bool is2DModel; // 0x9
|
||||||
|
bool unk2; // 0x10
|
||||||
|
bool unk3; // 0xA
|
||||||
|
bool unk4; // 0xB
|
||||||
|
struct In2DAreaMoveControl *mMoveControl; // 0x10
|
||||||
|
};
|
12
include/al/actor/ActorExecuteInfo.h
Normal file
12
include/al/actor/ActorExecuteInfo.h
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class ExecutorActorExecuteBase;
|
||||||
|
|
||||||
|
class ActorExecuteInfo
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
void addUpdater(al::ExecutorActorExecuteBase *);
|
||||||
|
};
|
||||||
|
};
|
77
include/al/actor/ActorInitInfo.h
Normal file
77
include/al/actor/ActorInitInfo.h
Normal file
|
@ -0,0 +1,77 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/actor/Placement.h"
|
||||||
|
#include "al/actor/ActorSceneInfo.h"
|
||||||
|
#include "al/LiveActor/LiveActorGroup.h"
|
||||||
|
#include "al/execute/ExecuteDirector.h"
|
||||||
|
#include "al/audio/AudioDirector.h"
|
||||||
|
#include "al/effect/EffectSystemInfo.h"
|
||||||
|
#include "al/gamepad/util.h"
|
||||||
|
#include "al/rumble/PadRumbleDirector.h"
|
||||||
|
#include "al/scene/SceneObjHolder.h"
|
||||||
|
#include "game/GameData/GameDataHolderBase.h"
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
|
||||||
|
class ModelDrawBufferCounter;
|
||||||
|
class ActorResourceHolder;
|
||||||
|
class HitSensorDirector;
|
||||||
|
class ScreenPointDirector;
|
||||||
|
class StageSwitchDirector;
|
||||||
|
class ViewIdHolder;
|
||||||
|
class ActorFactory;
|
||||||
|
class ClippingDirector;
|
||||||
|
class DemoDirector;
|
||||||
|
class GravityHolder;
|
||||||
|
class ItemDirectorBase;
|
||||||
|
class NatureDirector;
|
||||||
|
class SceneMsgCtrl;
|
||||||
|
class SceneStopCtrl;
|
||||||
|
class ScreenCoverCtrl;
|
||||||
|
class ShadowDirector;
|
||||||
|
class ModelGroup;
|
||||||
|
class GraphicsSystemInfo;
|
||||||
|
class PlayerHolder;
|
||||||
|
|
||||||
|
class ActorInitInfo
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ActorInitInfo();
|
||||||
|
void initViewIdSelf(al::PlacementInfo const*,al::ActorInitInfo const&);
|
||||||
|
void initNew(al::PlacementInfo const* placementInfo, al::LayoutInitInfo const* lytInfo,
|
||||||
|
al::LiveActorGroup* actorGroup, al::ActorFactory const* factory,
|
||||||
|
al::ActorResourceHolder* resourceHolder, al::AreaObjDirector* areaDir,
|
||||||
|
al::AudioDirector* audioDir, al::CameraDirector* camDir,
|
||||||
|
al::ClippingDirector* clippingDir, al::CollisionDirector* collDir,
|
||||||
|
al::DemoDirector* demoDir, al::EffectSystemInfo* effectSys,
|
||||||
|
al::ExecuteDirector* executeDir, al::GameDataHolderBase* dataHolder,
|
||||||
|
al::GravityHolder* gravityHolder, al::HitSensorDirector* hitSensorDir,
|
||||||
|
al::ItemDirectorBase* itemDir, al::NatureDirector* natureDir,
|
||||||
|
al::GamePadSystem const* gamepad, al::PadRumbleDirector* padRumbleDir,
|
||||||
|
al::PlayerHolder* playerHolder, al::SceneObjHolder* sceneObjHolder,
|
||||||
|
al::SceneMsgCtrl* sceneMsgCtrl, al::SceneStopCtrl* sceneStopCtrl,
|
||||||
|
al::ScreenCoverCtrl* screenCoverCtrl, al::ScreenPointDirector* screenPointDir,
|
||||||
|
al::ShadowDirector* shadowDir, al::StageSwitchDirector* stageSwitchDir,
|
||||||
|
al::ModelGroup* modelGroup, al::GraphicsSystemInfo* gfxSysInfo,
|
||||||
|
al::ModelDrawBufferCounter* mdlDrawBuffCtr,
|
||||||
|
al::LiveActorGroup *otherActorGroup);
|
||||||
|
LiveActorGroup *mLiveActorGroup; // 0x0
|
||||||
|
const al::PlacementInfo& mPlacementInfo; // 0x8
|
||||||
|
LayoutInitInfo *mLayoutInitInfo; // 0x10
|
||||||
|
ActorSceneInfo mActorSceneInfo; // 0x18-0xB0
|
||||||
|
LiveActorGroup *mLiveActorGroup2; // 0xB8
|
||||||
|
ActorFactory *mActorFactory; // 0xC0
|
||||||
|
ActorResourceHolder *mResourceHolder; // 0xC8
|
||||||
|
AudioDirector *mAudioDirector; // 0xD0
|
||||||
|
EffectSystemInfo *mEffectSysInfo; // 0xD8
|
||||||
|
ExecuteDirector *mExecuteDirector; // 0xE0
|
||||||
|
HitSensorDirector *mHitSensorDirector; // 0xE8
|
||||||
|
ScreenPointDirector *mScreenPointDirector; // 0xF0
|
||||||
|
StageSwitchDirector *mStageSwitchDirector; // 0xF8
|
||||||
|
ViewIdHolder *mViewIdHolder; // 0x100
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
// size not entirely known, guessing based off of ActorInitInfo::initNew
|
||||||
|
static_assert(sizeof(al::ActorInitInfo) == 0x108);
|
53
include/al/actor/ActorSceneInfo.h
Normal file
53
include/al/actor/ActorSceneInfo.h
Normal file
|
@ -0,0 +1,53 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/area/AreaObjDirector.h"
|
||||||
|
#include "al/camera/CameraDirector.h"
|
||||||
|
#include "al/collision/CollisionDirector.h"
|
||||||
|
#include "al/scene/SceneObjHolder.h"
|
||||||
|
#include "al/layout/LayoutInitInfo.h"
|
||||||
|
#include "game/GameData/GameDataHolderBase.h"
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
|
||||||
|
struct ClippingDirector;
|
||||||
|
struct DemoDirector;
|
||||||
|
struct GravityHolder;
|
||||||
|
struct ItemDirectorBase;
|
||||||
|
struct NatureDirector;
|
||||||
|
struct SceneMsgCtrl;
|
||||||
|
struct SceneStopCtrl;
|
||||||
|
struct ScreenCoverCtrl;
|
||||||
|
struct ShadowDirector;
|
||||||
|
struct ModelGroup;
|
||||||
|
struct GraphicsSystemInfo;
|
||||||
|
struct PlayerHolder;
|
||||||
|
struct ModelDrawBufferCounter;
|
||||||
|
|
||||||
|
class ActorSceneInfo
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
ActorSceneInfo() = default;
|
||||||
|
AreaObjDirector *mAreaObjDirector; // 0x0
|
||||||
|
CameraDirector *mCameraDirector; // 0x8
|
||||||
|
ClippingDirector *mClippingDirector; // 0x10
|
||||||
|
CollisionDirector *mCollisionDirector; // 0x18
|
||||||
|
DemoDirector *mDemoDirector; // 0x20
|
||||||
|
GameDataHolderBase *mGameDataHolder; // 0x28
|
||||||
|
GravityHolder *mGravityHolder; // 0x30
|
||||||
|
ItemDirectorBase *mItemDirector; // 0x38
|
||||||
|
NatureDirector *mNatureDirector; // 0x40
|
||||||
|
GamePadSystem *mGamePadSys; // 0x48
|
||||||
|
PadRumbleDirector *mPadRumbleDirector; // 0x50
|
||||||
|
PlayerHolder *mPlayerHolder; // 0x58
|
||||||
|
SceneObjHolder *mSceneObjHolder; // 0x60
|
||||||
|
SceneStopCtrl *mSceneStopCtrl; // 0x68
|
||||||
|
SceneMsgCtrl *mSceneMsgCtrl; // 0x70
|
||||||
|
ScreenCoverCtrl *mScreenCoverCtrl; // 0x78
|
||||||
|
ShadowDirector *mShadowDirector; // 0x80
|
||||||
|
ModelGroup *mModelGroup; // 0x88
|
||||||
|
GraphicsSystemInfo *mGfxSysInfo; // 0x90
|
||||||
|
ModelDrawBufferCounter *mDrawBuffCount; // 0x98
|
||||||
|
};
|
||||||
|
} // namespace al
|
||||||
|
|
||||||
|
static_assert(sizeof(al::ActorSceneInfo) == 0xA0, "Actor Scene Info Size");
|
43
include/al/actor/DemoActor.h
Normal file
43
include/al/actor/DemoActor.h
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/LiveActor/LiveActor.h"
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class DemoActor : public LiveActor {
|
||||||
|
public:
|
||||||
|
DemoActor(const char* name);
|
||||||
|
virtual void paddingFunc();
|
||||||
|
virtual void init(ActorInitInfo const &);
|
||||||
|
virtual void control(void);
|
||||||
|
virtual void initDemoActor(al::ActorInitInfo const&, al::ActorInitInfo const&,
|
||||||
|
sead::Matrix34f const*, bool);
|
||||||
|
virtual void initDemoActorSerial(al::ActorInitInfo const&, al::ActorInitInfo const&,
|
||||||
|
sead::Matrix34f const*);
|
||||||
|
virtual void initAfterCreateFromFactory(al::ActorInitInfo const&, al::ActorInitInfo const&,
|
||||||
|
sead::Matrix34f const*, bool);
|
||||||
|
virtual void startAction(int);
|
||||||
|
virtual void resetDynamics(void);
|
||||||
|
|
||||||
|
bool isExistAction(int) const;
|
||||||
|
const char* getDemoActionName(int) const;
|
||||||
|
void startActionByName(const char*);
|
||||||
|
void hideModelBySwitch(void);
|
||||||
|
void showModelBySwitch(void);
|
||||||
|
void endDemo(void);
|
||||||
|
|
||||||
|
void exeDelay(void);
|
||||||
|
void exeAction(void);
|
||||||
|
|
||||||
|
struct DemoActionList *mActList = nullptr; // 0x108
|
||||||
|
sead::Matrix34f mPoseMtx = sead::Matrix34f::ident; // 0x110 (size 0x30)
|
||||||
|
int mActDelay = 0; // 0x140
|
||||||
|
int mActionIndex = 0; // 0x144
|
||||||
|
int mSubActorNum = 0xFFFFFFFF; // 0x148
|
||||||
|
int mShowModelStartFrame = 0xFFFFFFFF; // 0x14C
|
||||||
|
int mShowModelEndFrame = 0; // 0x150
|
||||||
|
bool unkBool1 = false;
|
||||||
|
bool unkBool2 = false;
|
||||||
|
struct JointSpringControllerHolder *mJointControllerHolder = nullptr; // 0x158
|
||||||
|
};
|
||||||
|
} // namespace al
|
10
include/al/actor/IUseName.h
Normal file
10
include/al/actor/IUseName.h
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class IUseName
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual const char* getName() const = 0;
|
||||||
|
};
|
||||||
|
};
|
9
include/al/actor/LiveActorKit.h
Normal file
9
include/al/actor/LiveActorKit.h
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class LiveActorKit {
|
||||||
|
public:
|
||||||
|
|
||||||
|
};
|
||||||
|
} // namespace al
|
36
include/al/actor/Placement.h
Normal file
36
include/al/actor/Placement.h
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/byaml/ByamlIter.h"
|
||||||
|
#include "sead/prim/seadSafeString.hpp"
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class PlacementInfo
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PlacementInfo();
|
||||||
|
|
||||||
|
void set(const al::ByamlIter &, const al::ByamlIter &);
|
||||||
|
|
||||||
|
al::ByamlIter _0;
|
||||||
|
al::ByamlIter mZoneIter; // _10
|
||||||
|
};
|
||||||
|
|
||||||
|
class PlacementId
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
PlacementId();
|
||||||
|
PlacementId(const char *unitConifgName, const char *objId, const char *commonId);
|
||||||
|
|
||||||
|
bool init(const al::PlacementInfo &);
|
||||||
|
bool isEqual(const al::PlacementId &) const;
|
||||||
|
static bool isEqual(const al::PlacementId &, const al::PlacementId &);
|
||||||
|
bool isValid() const;
|
||||||
|
bool makeString(sead::BufferedSafeStringBase<char> *) const;
|
||||||
|
|
||||||
|
const char* _0;
|
||||||
|
const char* mUnitConfigName; // _8
|
||||||
|
const char* mID; // _10
|
||||||
|
const char* mCommonID; // _18
|
||||||
|
};
|
||||||
|
}
|
16
include/al/actor/SubActorKeeper.h
Normal file
16
include/al/actor/SubActorKeeper.h
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
#include "container/seadPtrArray.h"
|
||||||
|
namespace al {
|
||||||
|
struct SubActorInfo {
|
||||||
|
struct LiveActor* mActor;
|
||||||
|
void* unkPtr;
|
||||||
|
int unkInt;
|
||||||
|
};
|
||||||
|
|
||||||
|
class SubActorKeeper {
|
||||||
|
al::LiveActor* mRootActor;
|
||||||
|
sead::PtrArray<SubActorInfo> mArray;
|
||||||
|
};
|
||||||
|
}
|
11
include/al/actor/alPlacementFunction.h
Normal file
11
include/al/actor/alPlacementFunction.h
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/actor/ActorInitInfo.h"
|
||||||
|
|
||||||
|
namespace alPlacementFunction {
|
||||||
|
void getModelName(char const**,al::ActorInitInfo const&);
|
||||||
|
void getModelName(char const**,al::PlacementInfo const&);
|
||||||
|
bool tryGetModelName(char const**,al::PlacementInfo const&);
|
||||||
|
bool tryGetModelName(char const**, al::ActorInitInfo const&);
|
||||||
|
|
||||||
|
}
|
11
include/al/actor/misc.h
Normal file
11
include/al/actor/misc.h
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/LiveActor/LiveActor.h"
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
template<typename T>
|
||||||
|
al::LiveActor *createActorFunction(const char *actorName);
|
||||||
|
|
||||||
|
} // namespace al
|
||||||
|
|
12
include/al/area/AreaObjDirector.h
Normal file
12
include/al/area/AreaObjDirector.h
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class AreaObjDirector;
|
||||||
|
|
||||||
|
class IUseAreaObj
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual al::AreaObjDirector* getAreaObjDirector() const = 0;
|
||||||
|
};
|
||||||
|
};
|
10
include/al/area/AreaObjGroup.h
Normal file
10
include/al/area/AreaObjGroup.h
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class AreaObjGroup
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
41
include/al/area/ChangeStageInfo.h
Normal file
41
include/al/area/ChangeStageInfo.h
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/actor/Placement.h"
|
||||||
|
|
||||||
|
#include "game/GameData/GameDataHolder.h"
|
||||||
|
|
||||||
|
#include <sead/math/seadVector.h>
|
||||||
|
#include <sead/math/seadMatrix.h>
|
||||||
|
|
||||||
|
class ChangeStageInfo {
|
||||||
|
public:
|
||||||
|
enum SubScenarioType : unsigned int {
|
||||||
|
UNK,
|
||||||
|
UNK1,
|
||||||
|
UNK2,
|
||||||
|
UNK3,
|
||||||
|
UNK4
|
||||||
|
};
|
||||||
|
|
||||||
|
ChangeStageInfo(const GameDataHolder *mHolder, const al::PlacementInfo &placementInfo);
|
||||||
|
ChangeStageInfo(const GameDataHolder *mHolder, const al::PlacementInfo &placementInfo, const char *unk1, const char *unk2, bool unk3, int unk4, SubScenarioType type);
|
||||||
|
ChangeStageInfo(const GameDataHolder *mHolder, const char *changeId, const char *stageName, bool isReturn, int scenarioNo, SubScenarioType type);
|
||||||
|
void init(const al::PlacementInfo &placement, const GameDataHolder *mHolder);
|
||||||
|
void init(void);
|
||||||
|
void copy(const ChangeStageInfo &other);
|
||||||
|
inline void findScenarioNoByList(const GameDataHolder *holder);
|
||||||
|
bool isSubScenarioTypeLifeRecover(void) const;
|
||||||
|
bool isSubScenarioTypeResetMiniGame(void) const;
|
||||||
|
void setWipeType(const char *type);
|
||||||
|
void calcTrans(sead::Vector3f *result, const al::PlacementInfo &info);
|
||||||
|
|
||||||
|
sead::FixedSafeString<0x80> changeStageId; // 0x0 (Size: 0x98)
|
||||||
|
sead::FixedSafeString<0x80> changeStageName; // 0xA0
|
||||||
|
sead::FixedSafeString<0x80> placementString; // 0x138
|
||||||
|
bool isReturn; // 0x1C8
|
||||||
|
int scenarioNo; // 0x1CC or 0x134
|
||||||
|
SubScenarioType subType; // 0x1D0
|
||||||
|
sead::FixedSafeString<0x80> wipeType; // 0x1D8
|
||||||
|
int hintPriority; // 0x270
|
||||||
|
|
||||||
|
};
|
28
include/al/async/AsyncFunctorThread.h
Normal file
28
include/al/async/AsyncFunctorThread.h
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "types.h"
|
||||||
|
#include "sead/prim/seadSafeString.hpp"
|
||||||
|
#include "FunctorBase.h"
|
||||||
|
#include "sead/thread/seadDelegateThread.h"
|
||||||
|
#include "sead/thread/seadMessageQueue.h"
|
||||||
|
#include "sead/mc/seadCoreInfo.h"
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class AsyncFunctorThread {
|
||||||
|
public:
|
||||||
|
AsyncFunctorThread(sead::SafeStringBase<char> const &functorName, al::FunctorBase const &functor, int blockType, int stackSize, sead::CoreId id);
|
||||||
|
// this function is whats passed into the delegate thread as the function to call when the thread becomes unblocked
|
||||||
|
void threadFunction(sead::Thread *, s64); // unused args
|
||||||
|
|
||||||
|
bool isDone() const {return this->mIsDone;};
|
||||||
|
void start();
|
||||||
|
// private:
|
||||||
|
unsigned char padding_08[0x8];
|
||||||
|
sead::DelegateThread *mDelegateThread;
|
||||||
|
al::FunctorBase functor;
|
||||||
|
bool mIsDone;
|
||||||
|
};
|
||||||
|
} // namespace al
|
||||||
|
|
||||||
|
static_assert(sizeof(al::AsyncFunctorThread) == 0x20);
|
13
include/al/async/FunctorBase.h
Normal file
13
include/al/async/FunctorBase.h
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
|
||||||
|
class FunctorBase
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual void operator()(void) const {return;};
|
||||||
|
virtual FunctorBase *clone(void) const {return {0};};
|
||||||
|
virtual ~FunctorBase() {return;};
|
||||||
|
};
|
||||||
|
} // namespace al
|
41
include/al/async/FunctorV0M.hpp
Normal file
41
include/al/async/FunctorV0M.hpp
Normal file
|
@ -0,0 +1,41 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "FunctorBase.h"
|
||||||
|
#include "sead/basis/seadNew.h"
|
||||||
|
#include "types.h"
|
||||||
|
#include "nn.h"
|
||||||
|
|
||||||
|
namespace sead
|
||||||
|
{
|
||||||
|
namespace system
|
||||||
|
{
|
||||||
|
void DeleteImpl(void* ptr);
|
||||||
|
} // namespace system
|
||||||
|
} // namespace sead
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
template <class T, class F>
|
||||||
|
class FunctorV0M : public al::FunctorBase {
|
||||||
|
|
||||||
|
public:
|
||||||
|
inline FunctorV0M(T objPointer, F functPointer) : mFunctor(functPointer), mObjPointer(objPointer) { };
|
||||||
|
|
||||||
|
void operator()(void) const override {
|
||||||
|
(mObjPointer->*mFunctor)();
|
||||||
|
};
|
||||||
|
|
||||||
|
FunctorV0M<T,F> *clone(void) const override {
|
||||||
|
return new FunctorV0M<T,F>(mObjPointer, mFunctor);
|
||||||
|
};
|
||||||
|
|
||||||
|
~FunctorV0M() override {
|
||||||
|
sead::system::DeleteImpl(this);
|
||||||
|
};
|
||||||
|
|
||||||
|
protected:
|
||||||
|
// 0x0 = vtable
|
||||||
|
T mObjPointer; // 0x8 = object pointer
|
||||||
|
F mFunctor; // 0x10 = member function pointer
|
||||||
|
};
|
||||||
|
} // namespace al
|
7
include/al/audio/AudioDirector.h
Normal file
7
include/al/audio/AudioDirector.h
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class AudioDirector;
|
||||||
|
|
||||||
|
};
|
18
include/al/audio/AudioKeeper.h
Normal file
18
include/al/audio/AudioKeeper.h
Normal file
|
@ -0,0 +1,18 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class AudioKeeper;
|
||||||
|
|
||||||
|
class IUseAudioKeeper
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual al::AudioKeeper* getAudioKeeper() const = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class AudioKeeper
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
13
include/al/byaml/ByamlContainerHeader.h
Normal file
13
include/al/byaml/ByamlContainerHeader.h
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <basis/seadTypes.h>
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
class ByamlContainerHeader {
|
||||||
|
public:
|
||||||
|
int getType() const;
|
||||||
|
int getCount(bool) const;
|
||||||
|
|
||||||
|
u32 mType; // _0
|
||||||
|
};
|
||||||
|
}; // namespace al
|
34
include/al/byaml/ByamlData.h
Normal file
34
include/al/byaml/ByamlData.h
Normal file
|
@ -0,0 +1,34 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/byaml/ByamlHashPair.h"
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
enum DataType : unsigned char {
|
||||||
|
TYPE_STRING = 0xA0,
|
||||||
|
TYPE_BINARY = 0xA1,
|
||||||
|
TYPE_ARRAY = 0xC0,
|
||||||
|
TYPE_HASH = 0xC1,
|
||||||
|
TYPE_STRING_TABLE = 0xC2,
|
||||||
|
TYPE_BOOL = 0xD0,
|
||||||
|
TYPE_INT = 0xD1,
|
||||||
|
TYPE_FLOAT = 0xD2,
|
||||||
|
TYPE_UINT = 0xD3,
|
||||||
|
TYPE_LONG = 0xD4,
|
||||||
|
TYPE_ULONG = 0xD5,
|
||||||
|
TYPE_DOUBLE = 0xD6,
|
||||||
|
TYPE_NULL = 0xFF
|
||||||
|
};
|
||||||
|
|
||||||
|
class ByamlData {
|
||||||
|
public:
|
||||||
|
ByamlData();
|
||||||
|
|
||||||
|
void set(const ByamlHashPair*, bool);
|
||||||
|
void set(unsigned char, unsigned int, bool);
|
||||||
|
unsigned char getType() const;
|
||||||
|
unsigned int getValue() const;
|
||||||
|
|
||||||
|
unsigned int mValue; // _0
|
||||||
|
unsigned char mType; // _4
|
||||||
|
};
|
||||||
|
}; // namespace al
|
19
include/al/byaml/ByamlHashPair.h
Normal file
19
include/al/byaml/ByamlHashPair.h
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
class ByamlHashPair {
|
||||||
|
public:
|
||||||
|
int getKey(bool) const;
|
||||||
|
char getType() const;
|
||||||
|
int getValue(bool) const;
|
||||||
|
|
||||||
|
union {
|
||||||
|
const int mData;
|
||||||
|
struct {
|
||||||
|
const char _0, _1, _2, mType;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
const int mValue;
|
||||||
|
};
|
||||||
|
}; // namespace al
|
22
include/al/byaml/ByamlHeader.h
Normal file
22
include/al/byaml/ByamlHeader.h
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
class ByamlHeader {
|
||||||
|
public:
|
||||||
|
short getTag() const;
|
||||||
|
bool isInvertOrder() const;
|
||||||
|
short getVersion() const;
|
||||||
|
int getHashKeyTableOffset() const;
|
||||||
|
int getStringTableOffset() const;
|
||||||
|
int getDataOffset() const;
|
||||||
|
|
||||||
|
union {
|
||||||
|
int _0;
|
||||||
|
unsigned short mTag, mVersion;
|
||||||
|
};
|
||||||
|
|
||||||
|
int mHashKeyOffset; // _4
|
||||||
|
int mStringTableOffset; // _8
|
||||||
|
int mDataOffset; // _C
|
||||||
|
};
|
||||||
|
}; // namespace al
|
63
include/al/byaml/ByamlIter.h
Normal file
63
include/al/byaml/ByamlIter.h
Normal file
|
@ -0,0 +1,63 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/byaml/ByamlData.h"
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
class ByamlIter {
|
||||||
|
public:
|
||||||
|
ByamlIter();
|
||||||
|
ByamlIter(const char*);
|
||||||
|
ByamlIter(const char*, const char*);
|
||||||
|
|
||||||
|
bool isValid() const;
|
||||||
|
bool isTypeHash() const;
|
||||||
|
bool isTypeArray() const;
|
||||||
|
bool isTypeContainer() const;
|
||||||
|
bool isExistKey(char const* key) const;
|
||||||
|
int getKeyIndex(char const* key) const;
|
||||||
|
bool isInvertOrder() const;
|
||||||
|
unsigned int getSize() const;
|
||||||
|
al::ByamlIter* getIterByIndex(int index) const;
|
||||||
|
bool getByamlDataByIndex(al::ByamlData*, int index) const;
|
||||||
|
al::ByamlIter* getIterByKey(char const*) const;
|
||||||
|
bool getByamlDataByKey(al::ByamlData*, char const*) const;
|
||||||
|
bool getByamlDataByKeyIndex(al::ByamlData*, int) const;
|
||||||
|
bool getByamlDataAndKeyName(al::ByamlData*, char const**, int) const;
|
||||||
|
bool getKeyName(char const**, int) const;
|
||||||
|
bool tryGetIterByIndex(al::ByamlIter*, int) const;
|
||||||
|
bool tryGetIterAndKeyNameByIndex(al::ByamlIter*, char const**, int) const;
|
||||||
|
bool tryGetIterByKey(al::ByamlIter*, char const*) const;
|
||||||
|
bool tryGetStringByKey(char const**, char const*) const;
|
||||||
|
bool tryConvertString(char const**, al::ByamlData const*) const;
|
||||||
|
bool tryGetBinaryByKey(char const**, int*, char const*) const;
|
||||||
|
bool tryGetBinary(char const**, int*, al::ByamlData const*) const;
|
||||||
|
bool tryGetBoolByKey(bool*, char const*) const;
|
||||||
|
bool tryConvertBool(bool*, al::ByamlData const*) const;
|
||||||
|
bool tryGetIntByKey(int*, char const*) const;
|
||||||
|
bool tryConvertInt32(int*, al::ByamlData const*) const;
|
||||||
|
bool tryGetUInt32ByKey(unsigned int*, char const*) const;
|
||||||
|
bool tryConvertUInt32(unsigned int*, al::ByamlData const*) const;
|
||||||
|
bool tryGetFloatByKey(float*, char const*) const;
|
||||||
|
bool tryConvertFloat(float*, al::ByamlData const*) const;
|
||||||
|
bool tryGetInt64ByKey(long*, char const*) const;
|
||||||
|
bool tryConvertInt64(long*, al::ByamlData const*) const;
|
||||||
|
bool tryGetUInt64ByKey(unsigned long*, char const*) const;
|
||||||
|
bool tryConvertUInt64(unsigned long*, al::ByamlData const*) const;
|
||||||
|
bool tryGetDoubleByKey(double*, char const*) const;
|
||||||
|
bool tryConvertDouble(double*, al::ByamlData const*) const;
|
||||||
|
bool tryGetStringByIndex(char const**, int) const;
|
||||||
|
bool tryGetBinaryByIndex(char const**, int*, int) const;
|
||||||
|
bool tryGetBoolByIndex(bool*, int) const;
|
||||||
|
bool tryGetInt32ByIndex(int*, int) const;
|
||||||
|
bool tryGetUInt32ByIndex(unsigned int*, int) const;
|
||||||
|
bool tryGetFloatByindex(float*, int) const;
|
||||||
|
bool tryGetInt64ByIndex(long*, int) const;
|
||||||
|
bool tryGetUInt64ByIndex(unsigned long*, int) const;
|
||||||
|
bool tryGetDoubleByIndex(double*, int) const;
|
||||||
|
bool tryConvertIter(al::ByamlIter*, al::ByamlData const*) const;
|
||||||
|
bool isEqualData(al::ByamlIter const&) const;
|
||||||
|
|
||||||
|
unsigned char* mData; // _0
|
||||||
|
unsigned long mDataOffset; // _8
|
||||||
|
};
|
||||||
|
}; // namespace al
|
23
include/al/byaml/ByamlStringTableIter.h
Normal file
23
include/al/byaml/ByamlStringTableIter.h
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <basis/seadTypes.h>
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
class ByamlStringTableIter {
|
||||||
|
public:
|
||||||
|
ByamlStringTableIter();
|
||||||
|
ByamlStringTableIter(const unsigned char*, bool);
|
||||||
|
|
||||||
|
int getSize() const;
|
||||||
|
const u32* getAddressTable() const;
|
||||||
|
int getStringAddress(int) const;
|
||||||
|
int getEndAddress() const;
|
||||||
|
const char* getString(int) const;
|
||||||
|
int getStringSize(int) const;
|
||||||
|
int findStringIndex(const char*) const;
|
||||||
|
bool isValidate() const;
|
||||||
|
|
||||||
|
const u8* mData; // _0
|
||||||
|
bool mReversed;
|
||||||
|
};
|
||||||
|
}; // namespace al
|
74
include/al/byaml/writer/ByamlWriter.h
Normal file
74
include/al/byaml/writer/ByamlWriter.h
Normal file
|
@ -0,0 +1,74 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <sead/container/seadTList.h>
|
||||||
|
|
||||||
|
namespace sead {
|
||||||
|
class Heap;
|
||||||
|
class WriteStream;
|
||||||
|
} // namespace sead
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
|
||||||
|
class ByamlWriterStringTable;
|
||||||
|
class ByamlWriterContainer;
|
||||||
|
class ByamlWriterBigDataList;
|
||||||
|
|
||||||
|
class ByamlWriterArray;
|
||||||
|
class ByamlWriterHash;
|
||||||
|
|
||||||
|
class ByamlIter;
|
||||||
|
|
||||||
|
class ByamlWriter {
|
||||||
|
public:
|
||||||
|
ByamlWriter(sead::Heap*, bool);
|
||||||
|
virtual ~ByamlWriter();
|
||||||
|
|
||||||
|
void addBool(bool);
|
||||||
|
void addInt(int);
|
||||||
|
void addUInt(u32);
|
||||||
|
void addFloat(float);
|
||||||
|
void addInt64(long);
|
||||||
|
void addUInt64(u64);
|
||||||
|
void addDouble(double);
|
||||||
|
void addString(const char*);
|
||||||
|
void addNull();
|
||||||
|
void addBool(const char*, bool);
|
||||||
|
void addInt(const char*, int);
|
||||||
|
void addUInt(const char*, u32);
|
||||||
|
void addFloat(const char*, float);
|
||||||
|
void addInt64(const char*, long);
|
||||||
|
void addUInt64(const char*, u64);
|
||||||
|
void addDouble(const char*, double);
|
||||||
|
void addString(const char*, char const*);
|
||||||
|
void addNull(const char*);
|
||||||
|
|
||||||
|
ByamlWriterArray* getArrayCurrentContainer();
|
||||||
|
ByamlWriterHash* getHashCurrentContainer();
|
||||||
|
ByamlWriterContainer* getCurrentContainer();
|
||||||
|
void pushHash();
|
||||||
|
void pushContainer(ByamlWriterContainer*);
|
||||||
|
void pushArray();
|
||||||
|
void pushArray(char const*);
|
||||||
|
void pushHash(char const*);
|
||||||
|
void pushIter(const ByamlIter&);
|
||||||
|
void pushIter(const char*, const ByamlIter&);
|
||||||
|
void pushLocalIter(const ByamlIter&, const char*);
|
||||||
|
void pop();
|
||||||
|
u32 calcHeaderSize() const;
|
||||||
|
u32 calcPackSize() const;
|
||||||
|
void write(sead::WriteStream*);
|
||||||
|
void print() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
sead::Heap* mHeap;
|
||||||
|
ByamlWriterStringTable* mStringTable1 = nullptr;
|
||||||
|
ByamlWriterStringTable* mStringTable2 = nullptr;
|
||||||
|
sead::TList<ByamlWriterContainer*> mContainerList;
|
||||||
|
ByamlWriterBigDataList* mBigDataList = nullptr;
|
||||||
|
ByamlWriterContainer** mContainerStack = nullptr;
|
||||||
|
int mContainerStackSize = 64;
|
||||||
|
int mCurrentContainerIndex = -1;
|
||||||
|
bool _mAlwaysFalse;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace al
|
27
include/al/byaml/writer/ByamlWriterBigDataList.h
Normal file
27
include/al/byaml/writer/ByamlWriterBigDataList.h
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <basis/seadTypes.h>
|
||||||
|
#include <container/seadTList.h>
|
||||||
|
|
||||||
|
namespace sead {
|
||||||
|
class WriteStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
|
||||||
|
class ByamlWriterBigData;
|
||||||
|
|
||||||
|
class ByamlWriterBigDataList {
|
||||||
|
public:
|
||||||
|
ByamlWriterBigDataList();
|
||||||
|
virtual ~ByamlWriterBigDataList();
|
||||||
|
u32 calcPackSize() const;
|
||||||
|
void addData(al::ByamlWriterBigData*);
|
||||||
|
int setOffset(int);
|
||||||
|
void write(sead::WriteStream*);
|
||||||
|
|
||||||
|
private:
|
||||||
|
sead::TList<ByamlWriterBigData*> mList;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace al
|
268
include/al/byaml/writer/ByamlWriterData.h
Normal file
268
include/al/byaml/writer/ByamlWriterData.h
Normal file
|
@ -0,0 +1,268 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <basis/seadTypes.h>
|
||||||
|
#include <container/seadTList.h>
|
||||||
|
|
||||||
|
namespace sead {
|
||||||
|
class WriteStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
|
||||||
|
class ByamlWriterData {
|
||||||
|
public:
|
||||||
|
virtual ~ByamlWriterData();
|
||||||
|
virtual void makeIndex();
|
||||||
|
virtual u32 calcPackSize() const;
|
||||||
|
virtual u8 getTypeCode() const;
|
||||||
|
virtual bool isContainer() const;
|
||||||
|
virtual void write(sead::WriteStream*) const;
|
||||||
|
virtual void print(int) const;
|
||||||
|
void printIndent(int) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ByamlWriterBool : public ByamlWriterData {
|
||||||
|
public:
|
||||||
|
ByamlWriterBool(bool);
|
||||||
|
u8 getTypeCode() const override;
|
||||||
|
void write(sead::WriteStream*) const override;
|
||||||
|
void print(int) const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
bool mValue;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ByamlWriterInt : public ByamlWriterData {
|
||||||
|
public:
|
||||||
|
ByamlWriterInt(int);
|
||||||
|
u8 getTypeCode() const override;
|
||||||
|
void write(sead::WriteStream*) const override;
|
||||||
|
void print(int) const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
int mValue;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ByamlWriterFloat : public ByamlWriterData {
|
||||||
|
public:
|
||||||
|
ByamlWriterFloat(float);
|
||||||
|
u8 getTypeCode() const override;
|
||||||
|
void write(sead::WriteStream*) const override;
|
||||||
|
void print(int) const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
float mValue;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ByamlWriterUInt : public ByamlWriterData {
|
||||||
|
public:
|
||||||
|
ByamlWriterUInt(u32);
|
||||||
|
u8 getTypeCode() const override;
|
||||||
|
void write(sead::WriteStream*) const override;
|
||||||
|
void print(int) const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
u32 mValue;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ByamlWriterNull : public ByamlWriterData {
|
||||||
|
public:
|
||||||
|
ByamlWriterNull();
|
||||||
|
u8 getTypeCode() const override;
|
||||||
|
void write(sead::WriteStream*) const override;
|
||||||
|
void print(int) const override;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ByamlWriterStringTable;
|
||||||
|
class ByamlWriterString : public ByamlWriterData {
|
||||||
|
public:
|
||||||
|
ByamlWriterString(const char*, ByamlWriterStringTable*);
|
||||||
|
u8 getTypeCode() const override;
|
||||||
|
void write(sead::WriteStream*) const override;
|
||||||
|
void print(int) const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
const char* mString;
|
||||||
|
ByamlWriterStringTable* mStringTable;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ByamlWriterBigDataList;
|
||||||
|
|
||||||
|
class ByamlWriterBigData : public ByamlWriterData {
|
||||||
|
public:
|
||||||
|
ByamlWriterBigData(al::ByamlWriterBigDataList*);
|
||||||
|
~ByamlWriterBigData();
|
||||||
|
void write(sead::WriteStream*) const override;
|
||||||
|
virtual u32 calcBigDataSize() const;
|
||||||
|
virtual void writeBigData(sead::WriteStream*) const;
|
||||||
|
|
||||||
|
void setOffset(int offset) { mOffset = offset; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
al::ByamlWriterBigDataList* mList;
|
||||||
|
int mOffset = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ByamlWriterInt64 : public ByamlWriterBigData {
|
||||||
|
public:
|
||||||
|
ByamlWriterInt64(long, ByamlWriterBigDataList*);
|
||||||
|
~ByamlWriterInt64();
|
||||||
|
u8 getTypeCode() const override;
|
||||||
|
void writeBigData(sead::WriteStream*) const override;
|
||||||
|
void print(int) const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
long mValue;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ByamlWriterUInt64 : public ByamlWriterBigData {
|
||||||
|
public:
|
||||||
|
ByamlWriterUInt64(u64, ByamlWriterBigDataList*);
|
||||||
|
~ByamlWriterUInt64();
|
||||||
|
u8 getTypeCode() const override;
|
||||||
|
void writeBigData(sead::WriteStream*) const override;
|
||||||
|
void print(int) const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
u64 mValue;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ByamlWriterDouble : public ByamlWriterBigData {
|
||||||
|
public:
|
||||||
|
ByamlWriterDouble(double, ByamlWriterBigDataList*);
|
||||||
|
~ByamlWriterDouble();
|
||||||
|
u8 getTypeCode() const override;
|
||||||
|
void writeBigData(sead::WriteStream*) const override;
|
||||||
|
void print(int) const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
double mValue;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ByamlWriterHash;
|
||||||
|
class ByamlWriterArray;
|
||||||
|
class ByamlWriterStringTable;
|
||||||
|
|
||||||
|
class ByamlWriterContainer : public ByamlWriterData {
|
||||||
|
public:
|
||||||
|
bool isContainer() const override;
|
||||||
|
|
||||||
|
virtual void addBool(const char*, bool);
|
||||||
|
virtual void addInt(const char*, s32);
|
||||||
|
virtual void addUInt(const char*, u32);
|
||||||
|
virtual void addFloat(const char*, float);
|
||||||
|
virtual void addInt64(const char*, s64, ByamlWriterBigDataList*);
|
||||||
|
virtual void addUInt64(const char*, u64, ByamlWriterBigDataList*);
|
||||||
|
virtual void addDouble(const char*, double, ByamlWriterBigDataList*);
|
||||||
|
virtual void addString(const char*, const char*);
|
||||||
|
virtual void addHash(const char*, ByamlWriterHash*);
|
||||||
|
virtual void addArray(const char*, ByamlWriterArray*);
|
||||||
|
virtual void addNull(const char*);
|
||||||
|
|
||||||
|
virtual void addBool(bool);
|
||||||
|
virtual void addInt(s32);
|
||||||
|
virtual void addUInt(u32);
|
||||||
|
virtual void addFloat(float);
|
||||||
|
virtual void addInt64(s64, ByamlWriterBigDataList*);
|
||||||
|
virtual void addUInt64(u64, ByamlWriterBigDataList*);
|
||||||
|
virtual void addDouble(double, ByamlWriterBigDataList*);
|
||||||
|
virtual void addString(const char*);
|
||||||
|
virtual void addHash(ByamlWriterHash*);
|
||||||
|
virtual void addArray(ByamlWriterArray*);
|
||||||
|
virtual void addNull();
|
||||||
|
|
||||||
|
virtual void writeContainer(sead::WriteStream*) const;
|
||||||
|
virtual bool isHash() const;
|
||||||
|
virtual bool isArray() const;
|
||||||
|
virtual void deleteData();
|
||||||
|
|
||||||
|
int getOffset() const { return mOffset; }
|
||||||
|
void setOffset(int offset) { mOffset = offset; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
int mOffset = 0; // FIXME shouldn't be public
|
||||||
|
};
|
||||||
|
|
||||||
|
class ByamlWriterArray : public ByamlWriterContainer {
|
||||||
|
public:
|
||||||
|
ByamlWriterArray(ByamlWriterStringTable*);
|
||||||
|
~ByamlWriterArray();
|
||||||
|
|
||||||
|
void deleteData() override;
|
||||||
|
u32 calcPackSize() const override;
|
||||||
|
|
||||||
|
void addData(al::ByamlWriterData*);
|
||||||
|
void addBool(bool) override;
|
||||||
|
void addInt(s32) override;
|
||||||
|
void addUInt(u32) override;
|
||||||
|
void addFloat(float) override;
|
||||||
|
void addInt64(s64, ByamlWriterBigDataList*) override;
|
||||||
|
void addUInt64(u64, ByamlWriterBigDataList*) override;
|
||||||
|
void addDouble(double, ByamlWriterBigDataList*) override;
|
||||||
|
void addString(const char*) override;
|
||||||
|
void addHash(ByamlWriterHash*) override;
|
||||||
|
void addArray(ByamlWriterArray*) override;
|
||||||
|
void addNull() override;
|
||||||
|
|
||||||
|
u8 getTypeCode() const override;
|
||||||
|
void writeContainer(sead::WriteStream*) const override;
|
||||||
|
void write(sead::WriteStream*) const override;
|
||||||
|
void print(int) const override;
|
||||||
|
bool isArray() const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
sead::TList<ByamlWriterData*> mList;
|
||||||
|
al::ByamlWriterStringTable* mStringTable;
|
||||||
|
};
|
||||||
|
static_assert(sizeof(ByamlWriterArray) == 0x30);
|
||||||
|
|
||||||
|
class ByamlWriterHashPair : public sead::ListNode {
|
||||||
|
public:
|
||||||
|
ByamlWriterHashPair(const char*, ByamlWriterData*);
|
||||||
|
|
||||||
|
const char* getKey() { return mKey; }
|
||||||
|
al::ByamlWriterData* getValue() { return mValue; }
|
||||||
|
|
||||||
|
private:
|
||||||
|
void* selfReference = this;
|
||||||
|
void* test2 = nullptr;
|
||||||
|
const char* mKey;
|
||||||
|
al::ByamlWriterData* mValue;
|
||||||
|
};
|
||||||
|
static_assert(sizeof(ByamlWriterHashPair) == 0x30);
|
||||||
|
|
||||||
|
class ByamlWriterHash : public ByamlWriterContainer {
|
||||||
|
public:
|
||||||
|
ByamlWriterHash(ByamlWriterStringTable*, ByamlWriterStringTable*);
|
||||||
|
~ByamlWriterHash();
|
||||||
|
|
||||||
|
void deleteData() override; // TODO implementation missing
|
||||||
|
u32 calcPackSize() const override;
|
||||||
|
|
||||||
|
void addData(const char*, al::ByamlWriterData*); // TODO implementation missing
|
||||||
|
void addBool(const char*, bool) override;
|
||||||
|
void addInt(const char*, s32) override;
|
||||||
|
void addUInt(const char*, u32) override;
|
||||||
|
void addFloat(const char*, float) override;
|
||||||
|
void addInt64(const char*, s64, ByamlWriterBigDataList*) override;
|
||||||
|
void addUInt64(const char*, u64, ByamlWriterBigDataList*) override;
|
||||||
|
void addDouble(const char*, double, ByamlWriterBigDataList*) override;
|
||||||
|
void addString(const char*, const char*) override;
|
||||||
|
void addHash(const char*, ByamlWriterHash*) override;
|
||||||
|
void addArray(const char*, ByamlWriterArray*) override;
|
||||||
|
void addNull(const char*) override;
|
||||||
|
|
||||||
|
u8 getTypeCode() const override;
|
||||||
|
void writeContainer(sead::WriteStream*) const override; // TODO implementation missing
|
||||||
|
void write(sead::WriteStream*) const override;
|
||||||
|
void print(int) const override; // TODO implementation missing
|
||||||
|
bool isHash() const override;
|
||||||
|
|
||||||
|
private:
|
||||||
|
sead::TList<ByamlWriterHashPair> mList; // TODO not really... it's something different here.
|
||||||
|
al::ByamlWriterStringTable* mStringTable1;
|
||||||
|
al::ByamlWriterStringTable* mStringTable2;
|
||||||
|
};
|
||||||
|
static_assert(sizeof(ByamlWriterHash) == 0x38);
|
||||||
|
|
||||||
|
} // namespace al
|
29
include/al/byaml/writer/ByamlWriterStringTable.h
Normal file
29
include/al/byaml/writer/ByamlWriterStringTable.h
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <basis/seadTypes.h>
|
||||||
|
#include <container/seadTList.h>
|
||||||
|
|
||||||
|
namespace sead {
|
||||||
|
class WriteStream;
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
|
||||||
|
class ByamlWriterStringTable {
|
||||||
|
public:
|
||||||
|
ByamlWriterStringTable();
|
||||||
|
virtual ~ByamlWriterStringTable();
|
||||||
|
const char* tryAdd(const char*);
|
||||||
|
u32 calcHeaderSize() const;
|
||||||
|
u32 calcContentSize() const;
|
||||||
|
u32 calcPackSize() const;
|
||||||
|
bool isEmpty() const;
|
||||||
|
u32 calcIndex(const char*) const;
|
||||||
|
void write(sead::WriteStream*) const;
|
||||||
|
void print() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
sead::TList<const char*> mList;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace al
|
9
include/al/camera/CameraAngleCtrlInfo.h
Normal file
9
include/al/camera/CameraAngleCtrlInfo.h
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class CameraAngleCtrlInfo {
|
||||||
|
public:
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
9
include/al/camera/CameraAngleSwingInfo.h
Normal file
9
include/al/camera/CameraAngleSwingInfo.h
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class CameraAngleSwingInfo {
|
||||||
|
public:
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
11
include/al/camera/CameraArrowCollider.h
Normal file
11
include/al/camera/CameraArrowCollider.h
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sead/math/seadVector.h"
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class CameraArrowCollider {
|
||||||
|
public:
|
||||||
|
void update(sead::Vector3f const &,sead::Vector3f const &,sead::Vector3f const &);
|
||||||
|
};
|
||||||
|
};
|
66
include/al/camera/CameraDirector.h
Normal file
66
include/al/camera/CameraDirector.h
Normal file
|
@ -0,0 +1,66 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CameraPoseUpdater.h"
|
||||||
|
#include "CameraPoserSceneInfo.h"
|
||||||
|
#include "al/camera/CameraPoser.h"
|
||||||
|
#include "al/camera/CameraTicket.h"
|
||||||
|
#include "al/hio/HioNode.h"
|
||||||
|
#include "al/execute/IUseExecutor.h"
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
|
||||||
|
class CameraResourceHolder;
|
||||||
|
class CameraRailHolder;
|
||||||
|
class CameraPoserFactory;
|
||||||
|
class PlayerHolder;
|
||||||
|
class ICameraInput;
|
||||||
|
class NameToCameraParamTransferFunc;
|
||||||
|
|
||||||
|
class CameraDirector : public al::HioNode, public al::IUseExecutor {
|
||||||
|
public:
|
||||||
|
|
||||||
|
void init(al::CameraPoserSceneInfo *,al::CameraPoserFactory const*);
|
||||||
|
al::CameraPoseUpdater *getPoseUpdater(int) const;
|
||||||
|
void endInit(al::PlayerHolder const*);
|
||||||
|
al::CameraTicket *createCameraFromFactory(char const *creatorName, al::PlacementId const*,char const*, int priority, sead::Matrix34f const&);
|
||||||
|
void createCamera(al::CameraPoser *,al::PlacementId const*,char const*,int,sead::Matrix34f const&,bool);
|
||||||
|
void execute(void) override;
|
||||||
|
void update(void);
|
||||||
|
void createObjectCamera(al::PlacementId const*,char const*,char const*,int,sead::Matrix34f const&);
|
||||||
|
void createObjectEntranceCamera(al::PlacementId const*,char const*,sead::Matrix34f const&);
|
||||||
|
void createMirrorObjectCamera(al::PlacementId const*,char const*,int,sead::Matrix34f const&);
|
||||||
|
void initAreaCameraSwitcherMultiForPrototype(al::AreaObjDirector *);
|
||||||
|
al::ICameraInput *getCameraInput(int);
|
||||||
|
void setCameraInput(al::ICameraInput const*);
|
||||||
|
void setViewCameraInput(al::ICameraInput const*,int);
|
||||||
|
void initAreaCameraSwitcherSingle(void);
|
||||||
|
void initResourceHolder(al::CameraResourceHolder const*);
|
||||||
|
void registerCameraRailHolder(al::CameraRailHolder *);
|
||||||
|
void initSceneFovyDegree(float);
|
||||||
|
void setCameraParamTransferFuncTable(al::NameToCameraParamTransferFunc const*,int);
|
||||||
|
void initSettingCloudSea(float);
|
||||||
|
void initSnapShotCameraAudioKeeper(al::IUseAudioKeeper *);
|
||||||
|
void initAndCreatePauseCameraCtrl(float);
|
||||||
|
float getSceneFovyDegree(void) const;
|
||||||
|
void validateCameraArea2D(void);
|
||||||
|
void invalidateCameraArea2D(void);
|
||||||
|
void stopByDeathPlayer(void);
|
||||||
|
void restartByDeathPlayer(void);
|
||||||
|
void startInvalidStopJudgeByDemo(void);
|
||||||
|
void endInvalidStopJudgeByDemo(void);
|
||||||
|
void startSnapShotMode(bool);
|
||||||
|
void endSnapShotMode(void);
|
||||||
|
|
||||||
|
unsigned char padding[0x20];
|
||||||
|
al::CameraPoserFactory *mFactory; // 0x28
|
||||||
|
al::CameraPoserSceneInfo *mSceneInfo; // 0x30
|
||||||
|
// 0xBC float farClipDistance
|
||||||
|
// 0xB8 float nearClipDistance
|
||||||
|
};
|
||||||
|
|
||||||
|
class IUseCamera
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual al::CameraDirector* getCameraDirector() const = 0;
|
||||||
|
};
|
||||||
|
};
|
7
include/al/camera/CameraObjectRequestInfo.h
Normal file
7
include/al/camera/CameraObjectRequestInfo.h
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
class CameraObjectRequestInfo {
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
9
include/al/camera/CameraPoseUpdater.h
Normal file
9
include/al/camera/CameraPoseUpdater.h
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class CameraPoseUpdater {
|
||||||
|
public:
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
132
include/al/camera/CameraPoser.h
Normal file
132
include/al/camera/CameraPoser.h
Normal file
|
@ -0,0 +1,132 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/actor/Placement.h"
|
||||||
|
#include "al/byaml/ByamlIter.h"
|
||||||
|
#include "al/hio/HioNode.h"
|
||||||
|
#include "al/area/AreaObjDirector.h"
|
||||||
|
#include "al/audio/AudioKeeper.h"
|
||||||
|
#include "al/collision/CollisionDirector.h"
|
||||||
|
#include "al/actor/IUseName.h"
|
||||||
|
#include "al/nerve/Nerve.h"
|
||||||
|
#include "al/nerve/NerveKeeper.h"
|
||||||
|
#include "al/rail/RailKeeper.h"
|
||||||
|
|
||||||
|
#include "CameraPoserFlag.h"
|
||||||
|
#include "CameraStartInfo.h"
|
||||||
|
#include "CameraTurnInfo.h"
|
||||||
|
#include "CameraObjectRequestInfo.h"
|
||||||
|
#include "al/rail/RailRider.h"
|
||||||
|
|
||||||
|
#include "sead/math/seadQuat.h"
|
||||||
|
#include "sead/gfx/seadCamera.h"
|
||||||
|
#include "sead/math/seadVector.h"
|
||||||
|
#include "sead/math/seadMatrix.h"
|
||||||
|
|
||||||
|
// size is 0x140/320 bytes
|
||||||
|
namespace al {
|
||||||
|
|
||||||
|
class CameraVerticalAbsorber;
|
||||||
|
class CameraAngleCtrlInfo;
|
||||||
|
class CameraAngleSwingInfo;
|
||||||
|
class CameraArrowCollider;
|
||||||
|
class CameraOffsetCtrlPreset;
|
||||||
|
class CameraParamMoveLimit;
|
||||||
|
class GyroCameraCtrl;
|
||||||
|
class SnapShotCameraCtrl;
|
||||||
|
class CameraViewInfo;
|
||||||
|
|
||||||
|
class CameraPoser : public al::HioNode, public al::IUseAreaObj, public al::IUseAudioKeeper, public al::IUseCollision, public al::IUseName, public al::IUseNerve, public al::IUseRail {
|
||||||
|
public:
|
||||||
|
CameraPoser(char const* poserName);
|
||||||
|
|
||||||
|
virtual AreaObjDirector* getAreaObjDirector() const override;
|
||||||
|
virtual void init();
|
||||||
|
virtual void initByPlacementObj(al::PlacementInfo const&);
|
||||||
|
virtual void endInit();
|
||||||
|
virtual void start(CameraStartInfo const &);
|
||||||
|
virtual void update();
|
||||||
|
virtual void end();
|
||||||
|
virtual void loadParam(ByamlIter const &);
|
||||||
|
virtual void makeLookAtCamera(sead::LookAtCamera*) const;
|
||||||
|
virtual void receiveRequestFromObject(CameraObjectRequestInfo const&);
|
||||||
|
virtual bool isZooming(void) const;
|
||||||
|
virtual bool isEnableRotateByPad(void) const;
|
||||||
|
virtual void startSnapShotMode(void);
|
||||||
|
virtual void endSnapShotMode(void);
|
||||||
|
|
||||||
|
virtual const char *getName(void) const override;
|
||||||
|
virtual CollisionDirector *getCollisionDirector(void) const override;
|
||||||
|
virtual NerveKeeper *getNerveKeeper(void) const override;
|
||||||
|
virtual AudioKeeper *getAudioKeeper(void) const override;
|
||||||
|
virtual RailRider* getRailRider(void) const override;
|
||||||
|
|
||||||
|
virtual void load(ByamlIter const&);
|
||||||
|
virtual void movement(void);
|
||||||
|
virtual void calcCameraPose(sead::LookAtCamera *) const;
|
||||||
|
virtual void requestTurnToDirection(al::CameraTurnInfo const *);
|
||||||
|
|
||||||
|
bool isInterpoleByCameraDistance(void) const;
|
||||||
|
bool isInterpoleEaseOut(void) const;
|
||||||
|
bool isEndInterpoleByStep(void) const;
|
||||||
|
bool isFirstCalc(void) const;
|
||||||
|
|
||||||
|
void initNerve(al::Nerve const*,int);
|
||||||
|
void initArrowCollider(al::CameraArrowCollider *);
|
||||||
|
void initAudioKeeper(char const*);
|
||||||
|
void initRail(al::PlacementInfo const&);
|
||||||
|
void initLocalInterpole(void);
|
||||||
|
void initLookAtInterpole(float);
|
||||||
|
void initOrthoProjectionParam(void);
|
||||||
|
void tryInitAreaLimitter(al::PlacementInfo const&);
|
||||||
|
|
||||||
|
void makeLookAtCameraPrev(sead::LookAtCamera *) const;
|
||||||
|
void makeLookAtCameraPost(sead::LookAtCamera *) const;
|
||||||
|
void makeLookAtCameraLast(sead::LookAtCamera *) const;
|
||||||
|
void makeLookAtCameraCollide(sead::LookAtCamera*) const;
|
||||||
|
|
||||||
|
void getInterpoleStep(void);
|
||||||
|
void setInterpoleStep(int);
|
||||||
|
void resetInterpoleStep(void);
|
||||||
|
void setInterpoleEaseOut(void);
|
||||||
|
void getEndInterpoleStep(void);
|
||||||
|
|
||||||
|
void appear(al::CameraStartInfo const&);
|
||||||
|
void calcCameraPose(sead::LookAtCamera *);
|
||||||
|
void receiveRequestFromObjectCore(al::CameraObjectRequestInfo const&);
|
||||||
|
|
||||||
|
void startSnapShotModeCore(void);
|
||||||
|
void endSnapShotModeCore(void);
|
||||||
|
|
||||||
|
const char *mPoserName; // 0x30
|
||||||
|
float unkFloat1; // 0x38
|
||||||
|
sead::Vector3f mPosition; // 0x3C
|
||||||
|
sead::Vector3f mTargetTrans = sead::Vector3f::ex; // 0x48
|
||||||
|
sead::Vector3f mCameraUp = sead::Vector3f::ey; // 0x54
|
||||||
|
float mFovyDegree = 35.0f; // 0x60
|
||||||
|
float unkFloat; // 0x64
|
||||||
|
sead::Matrix34f mViewMtx = sead::Matrix34f::ident; // 0x68
|
||||||
|
bool unkBool1 = false; // 0x98
|
||||||
|
CameraViewInfo *mViewInfo; // 0xA0
|
||||||
|
al::AreaObjDirector *mAreaDirector; // 0xA8
|
||||||
|
CameraPoserFlag *mPoserFlags; // 0xB0
|
||||||
|
CameraVerticalAbsorber *mVerticalAbsorber; // 0xB8
|
||||||
|
CameraAngleCtrlInfo *mAngleCtrlInfo; // 0xC0
|
||||||
|
CameraAngleSwingInfo *mAngleSwingInfo; // 0xC8
|
||||||
|
CameraArrowCollider *mArrowCollider; // 0xD0
|
||||||
|
CameraOffsetCtrlPreset *mOffsetCtrlPreset; // 0xD8
|
||||||
|
float *mLocalInterpole; // 0xE0 (size = 0x20)
|
||||||
|
float *mLookAtInterpole; // 0xE8 (size = 0x10)
|
||||||
|
CameraParamMoveLimit *mParamMoveLimit; // 0xF0
|
||||||
|
void *unkPtr4; // 0xF8
|
||||||
|
GyroCameraCtrl *mGyroCtrl; // 0x100
|
||||||
|
SnapShotCameraCtrl *mSnapshotCtrl; // 0x108
|
||||||
|
AudioKeeper *mAudioKeeper; // 0x110
|
||||||
|
NerveKeeper *mNerveKeeper; // 0x118
|
||||||
|
RailKeeper *mRailKeeper; // 0x120
|
||||||
|
int *unkPtr5; // 0x128 (size = 0xC) interpolesteptype?
|
||||||
|
int *unkPtr6; // 0x130 (size - 0x8)
|
||||||
|
sead::Vector3f *mOrthoProjectionParam; // 0x138 (gets init'd with new of size 0xC)
|
||||||
|
};
|
||||||
|
|
||||||
|
static_assert(sizeof(CameraPoser) == 0x140, "Camera Poser Size");
|
||||||
|
};
|
25
include/al/camera/CameraPoserFlag.h
Normal file
25
include/al/camera/CameraPoserFlag.h
Normal file
|
@ -0,0 +1,25 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class CameraPoserFlag {
|
||||||
|
public:
|
||||||
|
CameraPoserFlag(void);
|
||||||
|
bool mFirstCalc = true;
|
||||||
|
bool mOffVerticalAbsorb = true;
|
||||||
|
bool mInvalidCollider = false;
|
||||||
|
bool unkBool4 = false;
|
||||||
|
bool mValidKeepPreSelfPoseNextCameraByParam = false;
|
||||||
|
bool unkBool6 = false;
|
||||||
|
bool mInvalidKeepPreSelfPoseNextCameraOverWriteProgram = false;
|
||||||
|
bool mInvalidKeepDistanceNextCamera = false;
|
||||||
|
bool unkBool9 = false;
|
||||||
|
bool unkBool10 = false;
|
||||||
|
bool mInvalidChangeSubjective = false;
|
||||||
|
bool unkBool12 = false;
|
||||||
|
bool unkBool13 = false;
|
||||||
|
bool mInvalidPreCameraEndAfterInterpole = false;
|
||||||
|
bool mStopUpdateGyro = false; // 0xE
|
||||||
|
// might be better to use a bool array?
|
||||||
|
};
|
||||||
|
};
|
9
include/al/camera/CameraPoserFollowLimit.h
Normal file
9
include/al/camera/CameraPoserFollowLimit.h
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
|
||||||
|
class CameraPoserFollowLimit {
|
||||||
|
public:
|
||||||
|
unsigned char massive[0x200];
|
||||||
|
|
||||||
|
//sead::Vector3f lookAtPos; // 0x1F4
|
||||||
|
};
|
7
include/al/camera/CameraPoserSceneInfo.h
Normal file
7
include/al/camera/CameraPoserSceneInfo.h
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
struct CameraPoserSceneInfo {
|
||||||
|
float mSceneFovyDegree;
|
||||||
|
};
|
||||||
|
}
|
7
include/al/camera/CameraStartInfo.h
Normal file
7
include/al/camera/CameraStartInfo.h
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
class CameraStartInfo {
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
31
include/al/camera/CameraTargetBase.h
Normal file
31
include/al/camera/CameraTargetBase.h
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "sead/math/seadVector.h"
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
|
||||||
|
struct CameraSubTargetBase;
|
||||||
|
|
||||||
|
class CameraTargetBase {
|
||||||
|
public:
|
||||||
|
CameraTargetBase();
|
||||||
|
|
||||||
|
virtual void calcSide(sead::Vector3f *) const {return;};
|
||||||
|
virtual void calcUp(sead::Vector3f *) const {return;};
|
||||||
|
virtual void calcFront(sead::Vector3f *) const {return;};
|
||||||
|
virtual void calcGravity(sead::Vector3f *input) const {input->x = -1.f; input->y = 0.f; input->z = 0.f; return;};
|
||||||
|
virtual void calcVelocity(sead::Vector3f *) const {return;};
|
||||||
|
virtual bool isCollideGround(void) const {return false;};
|
||||||
|
virtual bool isInWater(void) const {return false;};
|
||||||
|
virtual bool isInMooonGravity(void) const {return false;};
|
||||||
|
virtual bool isClimbPole(void) const {return false;};
|
||||||
|
virtual bool isGrabCeil(void) const {return false;};
|
||||||
|
virtual bool isWallWatch(void) const {return false;};
|
||||||
|
virtual bool isInvalidMoveByInput(void) const {return false;};
|
||||||
|
virtual bool isEnableEndAfterInterpole(void) const {return false;};
|
||||||
|
virtual void update(void) const {return;};
|
||||||
|
virtual float getRequestDistance(void) const {return -1.f;};
|
||||||
|
|
||||||
|
bool isActiveTarget; // 0x8
|
||||||
|
};
|
||||||
|
}
|
10
include/al/camera/CameraTargetHolder.h
Normal file
10
include/al/camera/CameraTargetHolder.h
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/actor/ActorCameraTarget.h"
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
class CameraTargetHolder {
|
||||||
|
public:
|
||||||
|
al::ActorCameraTarget *tryGetViewTarget(int) const;
|
||||||
|
};
|
||||||
|
}
|
32
include/al/camera/CameraTicket.h
Normal file
32
include/al/camera/CameraTicket.h
Normal file
|
@ -0,0 +1,32 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "al/actor/Placement.h"
|
||||||
|
#include "al/camera/CameraPoser.h"
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
|
||||||
|
class CameraTicketId {
|
||||||
|
public:
|
||||||
|
CameraTicketId(al::PlacementId const*,char const*);
|
||||||
|
void isEqual(al::CameraTicketId const&);
|
||||||
|
void isEqual(al::CameraTicketId const&,al::CameraTicketId const&);
|
||||||
|
void isEqual(al::ByamlIter const&);
|
||||||
|
void tryGetObjId(void);
|
||||||
|
void getObjId(void);
|
||||||
|
|
||||||
|
al::PlacementId *mPlacement;
|
||||||
|
const char *mTicketName;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class CameraTicket {
|
||||||
|
public:
|
||||||
|
CameraTicket(CameraPoser *poser, CameraTicketId const *ticketID, int priority);
|
||||||
|
void setPriority(int);
|
||||||
|
|
||||||
|
CameraPoser *mPoser;
|
||||||
|
CameraTicketId *mTicketID;
|
||||||
|
int mPriority;
|
||||||
|
bool mIsActive;
|
||||||
|
};
|
||||||
|
}
|
7
include/al/camera/CameraTurnInfo.h
Normal file
7
include/al/camera/CameraTurnInfo.h
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al {
|
||||||
|
class CameraTurnInfo {
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
10
include/al/camera/CameraVerticalAbsorber.h
Normal file
10
include/al/camera/CameraVerticalAbsorber.h
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class CameraVerticalAbsorber {
|
||||||
|
public:
|
||||||
|
bool isValid(void);
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
9
include/al/camera/GyroCameraCtrl.h
Normal file
9
include/al/camera/GyroCameraCtrl.h
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class GyroCameraCtrl {
|
||||||
|
public:
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
10
include/al/camera/Projection.h
Normal file
10
include/al/camera/Projection.h
Normal file
|
@ -0,0 +1,10 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class Projection {
|
||||||
|
public:
|
||||||
|
float getFovy(void) const;
|
||||||
|
void setFovy(float);
|
||||||
|
};
|
||||||
|
};
|
9
include/al/camera/SnapshotCameraCtrl.h
Normal file
9
include/al/camera/SnapshotCameraCtrl.h
Normal file
|
@ -0,0 +1,9 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class SnapShotCameraCtrl {
|
||||||
|
public:
|
||||||
|
|
||||||
|
};
|
||||||
|
};
|
228
include/al/camera/alCameraPoserFunction.h
Normal file
228
include/al/camera/alCameraPoserFunction.h
Normal file
|
@ -0,0 +1,228 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "CameraPoser.h"
|
||||||
|
#include "al/actor/Placement.h"
|
||||||
|
#include "sead/math/seadVector.h"
|
||||||
|
|
||||||
|
namespace alCameraPoserFunction {
|
||||||
|
|
||||||
|
struct CameraCollisionHitResult;
|
||||||
|
|
||||||
|
void initCameraArrowCollider(al::CameraPoser *);
|
||||||
|
void calcCameraPose(sead::Quat<float> *,al::CameraPoser const*);
|
||||||
|
void calcLookDir(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void calcCameraDir(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void calcCameraDirH(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void calcLookDirH(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void calcSideDir(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void calcPreCameraDir(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void calcPreCameraDirH(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void calcPreLookDir(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void calcPreLookDirH(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
float calcPreCameraAngleH(al::CameraPoser const*);
|
||||||
|
float calcPreCameraAngleV(al::CameraPoser const*);
|
||||||
|
void setLookAtPosToTarget(al::CameraPoser *);
|
||||||
|
void calcTargetTrans(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void setLookAtPosToTargetAddOffset(al::CameraPoser *,sead::Vector3<float> const&);
|
||||||
|
void setCameraPosToTarget(al::CameraPoser *);
|
||||||
|
void setCameraPosToTargetAddOffset(al::CameraPoser *,sead::Vector3<float> const&);
|
||||||
|
void calcTargetTransWithOffset(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void calcTargetVelocity(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void calcTargetVelocityH(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void calcTargetUp(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void calcTargetSpeedV(al::CameraPoser const*);
|
||||||
|
void calcTargetPose(sead::Quat<float> *,al::CameraPoser const*);
|
||||||
|
void calcTargetFront(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void calcTargetSide(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void calcTargetGravity(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void calcTargetSpeedH(al::CameraPoser const*);
|
||||||
|
void calcTargetJumpSpeed(al::CameraPoser const*);
|
||||||
|
void calcTargetFallSpeed(al::CameraPoser const*);
|
||||||
|
void tryGetTargetRequestDistance(float *,al::CameraPoser const*);
|
||||||
|
void tryGetBossDistanceCurve(al::CameraPoser const*);
|
||||||
|
void tryGetEquipmentDistanceCurve(al::CameraPoser const*);
|
||||||
|
void tryCalcSlopeCollisionDownFrontDirH(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void checkValidTurnToSubTarget(al::CameraPoser const*);
|
||||||
|
void calcSubTargetBack(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void calcSubTargetTrans(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void calcSubTargetFront(sead::Vector3<float> *,al::CameraPoser const*);
|
||||||
|
void tryCalcSubTargetTurnBrakeDistanceRate(float *,al::CameraPoser const*);
|
||||||
|
void clampAngleSubTargetTurnRangeV(float *,al::CameraPoser const*);
|
||||||
|
void initCameraVerticalAbsorber(al::CameraPoser *);
|
||||||
|
void initCameraVerticalAbsorberNoCameraPosAbsorb(al::CameraPoser *);
|
||||||
|
void liberateVerticalAbsorb(al::CameraPoser *);
|
||||||
|
void stopUpdateVerticalAbsorb(al::CameraPoser *);
|
||||||
|
void stopUpdateVerticalAbsorbForSnapShotMode(al::CameraPoser *,sead::Vector3<float> const&);
|
||||||
|
void restartUpdateVerticalAbsorb(al::CameraPoser *);
|
||||||
|
void validateVerticalAbsorbKeepInFrame(al::CameraPoser *);
|
||||||
|
void invalidateVerticalAbsorbKeepInFrame(al::CameraPoser *);
|
||||||
|
void setVerticalAbsorbKeepInFrameScreenOffsetUp(al::CameraPoser *,float);
|
||||||
|
void setVerticalAbsorbKeepInFrameScreenOffsetDown(al::CameraPoser *,float);
|
||||||
|
void initCameraArrowCollider(al::CameraPoser *);
|
||||||
|
void initCameraArrowColliderWithoutThroughPassCollision(al::CameraPoser *);
|
||||||
|
void initCameraMoveLimit(al::CameraPoser *);
|
||||||
|
void initCameraAngleCtrl(al::CameraPoser *);
|
||||||
|
void initCameraAngleCtrlWithRelativeH(al::CameraPoser *);
|
||||||
|
void initCameraDefaultAngleRangeV(al::CameraPoser *,float,float);
|
||||||
|
void setCameraStartAngleV(al::CameraPoser *,float);
|
||||||
|
void setCameraAngleV(al::CameraPoser *,float);
|
||||||
|
void initAngleSwing(al::CameraPoser *);
|
||||||
|
void initCameraOffsetCtrlPreset(al::CameraPoser *);
|
||||||
|
void initGyroCameraCtrl(al::CameraPoser *);
|
||||||
|
void resetGyro(al::CameraPoser *);
|
||||||
|
void calcCameraGyroPose(al::CameraPoser const*,sead::Vector3<float> *,sead::Vector3<float> *,sead::Vector3<float> *);
|
||||||
|
void setGyroLimitAngleV(al::CameraPoser *,float,float);
|
||||||
|
void setGyroSensitivity(al::CameraPoser *,float,float);
|
||||||
|
void reduceGyroSencitivity(al::CameraPoser *);
|
||||||
|
void stopUpdateGyro(al::CameraPoser *);
|
||||||
|
void restartUpdateGyro(al::CameraPoser *);
|
||||||
|
void initSnapShotCameraCtrl(al::CameraPoser *);
|
||||||
|
void initSnapShotCameraCtrlZoomAutoReset(al::CameraPoser *);
|
||||||
|
void initSnapShotCameraCtrlZoomRollMove(al::CameraPoser *);
|
||||||
|
void validateSnapShotCameraLookAtOffset(al::CameraPoser *);
|
||||||
|
void validateSnapShotCameraZoomFovy(al::CameraPoser *);
|
||||||
|
void validateSnapShotCameraRoll(al::CameraPoser *);
|
||||||
|
void updateSnapShotCameraCtrl(al::CameraPoser *);
|
||||||
|
void startResetSnapShotCameraCtrl(al::CameraPoser *,int);
|
||||||
|
void setSnapShotMaxZoomOutFovyDegree(al::CameraPoser *,float);
|
||||||
|
void onVerticalAbsorb(al::CameraPoser *);
|
||||||
|
void offVerticalAbsorb(al::CameraPoser *);
|
||||||
|
void invalidateCameraBlur(al::CameraPoser *);
|
||||||
|
void validateCollider(al::CameraPoser *);
|
||||||
|
void invalidateCollider(al::CameraPoser *);
|
||||||
|
void validateCtrlSubjective(al::CameraPoser *);
|
||||||
|
void invalidateChangeSubjective(al::CameraPoser *);
|
||||||
|
void invalidateKeepDistanceNextCamera(al::CameraPoser *);
|
||||||
|
void invalidateKeepDistanceNextCameraIfNoCollide(al::CameraPoser *);
|
||||||
|
void invalidatePreCameraEndAfterInterpole(al::CameraPoser *);
|
||||||
|
void checkFirstCameraCollisionArrow(sead::Vector3<float> *,sead::Vector3<float> *,al::IUseCollision const*,sead::Vector3<float> const&,sead::Vector3<float> const&);
|
||||||
|
void checkFirstCameraCollisionArrow(alCameraPoserFunction::CameraCollisionHitResult *,al::IUseCollision const*,sead::Vector3<float> const&,sead::Vector3<float> const&);
|
||||||
|
void checkFirstCameraCollisionArrowOnlyCeiling(sead::Vector3<float> *,sead::Vector3<float> *,al::IUseCollision const*,sead::Vector3<float> const&,sead::Vector3<float> const&);
|
||||||
|
void checkCameraCollisionMoveSphere(sead::Vector3<float> *,al::IUseCollision const*,sead::Vector3<float> const&,sead::Vector3<float> const&,float);
|
||||||
|
void calcZoneRotateAngleH(float,al::CameraPoser const*);
|
||||||
|
void calcZoneRotateAngleH(float,sead::Matrix34<float> const&);
|
||||||
|
void calcZoneInvRotateAngleH(float,sead::Matrix34<float> const&);
|
||||||
|
void multVecZone(sead::Vector3<float> *,sead::Vector3<float> const&,al::CameraPoser const*);
|
||||||
|
void multVecInvZone(sead::Vector3<float> *,sead::Vector3<float> const&,al::CameraPoser const*);
|
||||||
|
void rotateVecZone(sead::Vector3<float> *,sead::Vector3<float> const&,al::CameraPoser const*);
|
||||||
|
void calcOffsetCameraKeepInFrameV(sead::Vector3<float> *,sead::LookAtCamera *,sead::Vector3<float> const&,al::CameraPoser const*,float,float);
|
||||||
|
void makeCameraKeepInFrameV(sead::LookAtCamera *,sead::Vector3<float> const&,al::CameraPoser const*,float,float);
|
||||||
|
void initCameraRail(al::CameraPoser *,al::PlacementInfo const&,char const*);
|
||||||
|
void tryGetCameraRailArg(float *,al::PlacementInfo const&,char const*,char const*);
|
||||||
|
void tryFindNearestLimitRailKeeper(al::CameraPoser const*,sead::Vector3<float> const&);
|
||||||
|
void calcCameraRotateStick(sead::Vector2<float> *,al::CameraPoser const*);
|
||||||
|
float calcCameraRotateStickH(al::CameraPoser const*);
|
||||||
|
float calcCameraRotateStickV(al::CameraPoser const*);
|
||||||
|
float calcCameraRotateStickPower(al::CameraPoser const*);
|
||||||
|
void tryCalcCameraSnapShotMoveStick(sead::Vector2<float>*, al::CameraPoser const*);
|
||||||
|
|
||||||
|
void getViewIndex(al::CameraPoser const*);
|
||||||
|
sead::LookAtCamera* getLookAtCamera(al::CameraPoser const*);
|
||||||
|
void getProjectionSead(al::CameraPoser const*);
|
||||||
|
void getProjection(al::CameraPoser const*);
|
||||||
|
void getProjectionMtx(al::CameraPoser const*);
|
||||||
|
void getNear(al::CameraPoser const*);
|
||||||
|
void getFar(al::CameraPoser const*);
|
||||||
|
void getAspect(al::CameraPoser const*);
|
||||||
|
void getPreCameraPos(al::CameraPoser const*);
|
||||||
|
sead::Vector3f *getPreLookAtPos(al::CameraPoser const*);
|
||||||
|
void getPreUpDir(al::CameraPoser const*);
|
||||||
|
void getPreFovyDegree(al::CameraPoser const*);
|
||||||
|
void getPreFovyRadian(al::CameraPoser const*);
|
||||||
|
void getPreCameraSwingAngleH(al::CameraStartInfo const&);
|
||||||
|
void getPreCameraSwingAngleV(al::CameraStartInfo const&);
|
||||||
|
void getPreCameraMaxSwingAngleH(al::CameraStartInfo const&);
|
||||||
|
void getPreCameraMaxSwingAngleV(al::CameraStartInfo const&);
|
||||||
|
void getAreaAngleH(al::CameraStartInfo const&);
|
||||||
|
void getAreaAngleV(al::CameraStartInfo const&);
|
||||||
|
void getNextAngleHByPreCamera(al::CameraStartInfo const&);
|
||||||
|
void getNextAngleVByPreCamera(al::CameraStartInfo const&);
|
||||||
|
void getUnderTargetCollisionPos(al::CameraPoser const*);
|
||||||
|
void getUnderTargetCollisionNormal(al::CameraPoser const*);
|
||||||
|
void getSlopeCollisionUpSpeed(al::CameraPoser const*);
|
||||||
|
void getSlopeCollisionDownSpeed(al::CameraPoser const*);
|
||||||
|
void getSubTargetRequestDistance(al::CameraPoser const*);
|
||||||
|
void getSubTargetTurnSpeedRate1(al::CameraPoser const*);
|
||||||
|
void getSubTargetTurnSpeedRate2(al::CameraPoser const*);
|
||||||
|
void getSubTargetTurnRestartStep(al::CameraPoser const*);
|
||||||
|
void getCameraVerticalAbsorbPosUp(al::CameraPoser const*);
|
||||||
|
void getCameraVerticalAbsorbPosDown(al::CameraPoser const*);
|
||||||
|
float getCameraAngleH(al::CameraPoser const*);
|
||||||
|
float getCameraAngleV(al::CameraPoser const*);
|
||||||
|
float getOffset(al::CameraPoser const*);
|
||||||
|
void getGyroFront(al::CameraPoser *);
|
||||||
|
float getGyroAngleV(al::CameraPoser *);
|
||||||
|
float getGyroAngleH(al::CameraPoser *);
|
||||||
|
void getSnapShotRollDegree(al::CameraPoser const*);
|
||||||
|
void getSnapShotLookAtOffset(al::CameraPoser const*);
|
||||||
|
void getRequestTargetAngleV(al::CameraObjectRequestInfo const&);
|
||||||
|
float getRequestAngleSpeed(al::CameraObjectRequestInfo const&);
|
||||||
|
float getRequestAngleV(al::CameraObjectRequestInfo const&);
|
||||||
|
void getCameraRailPointObjId(al::CameraPoser const*,int);
|
||||||
|
float getStickSensitivityLevel(al::CameraPoser const*);
|
||||||
|
float getStickSensitivityScale(al::CameraPoser const*);
|
||||||
|
void getGyroSensitivityLevel(al::CameraPoser const*);
|
||||||
|
void getGyroSensitivityScale(al::CameraPoser const*);
|
||||||
|
|
||||||
|
bool isPrePriorityDemo(al::CameraStartInfo const&);
|
||||||
|
bool isPrePriorityDemo2(al::CameraStartInfo const&);
|
||||||
|
bool isPrePriorityDemoTalk(al::CameraStartInfo const&);
|
||||||
|
bool isPrePriorityDemoAll(al::CameraStartInfo const&);
|
||||||
|
bool isPrePriorityEntranceAll(al::CameraStartInfo const&);
|
||||||
|
bool isPrePriorityPlayer(al::CameraStartInfo const&);
|
||||||
|
bool isEqualPreCameraName(al::CameraStartInfo const&,char const*);
|
||||||
|
bool isPreCameraFixAbsolute(al::CameraStartInfo const&);
|
||||||
|
bool isInvalidCollidePreCamera(al::CameraStartInfo const&);
|
||||||
|
bool isInvalidKeepPreCameraDistance(al::CameraStartInfo const&);
|
||||||
|
bool isInvalidKeepPreCameraDistanceIfNoCollide(al::CameraStartInfo const&);
|
||||||
|
bool isValidResetPreCameraPose(al::CameraStartInfo const&);
|
||||||
|
bool isValidKeepPreSelfCameraPose(al::CameraStartInfo const&);
|
||||||
|
bool isExistAreaAngleH(al::CameraStartInfo const&);
|
||||||
|
bool isExistAreaAngleV(al::CameraStartInfo const&);
|
||||||
|
bool isExistNextPoseByPreCamera(al::CameraStartInfo const&);
|
||||||
|
bool isChangeTarget(al::CameraPoser const*);
|
||||||
|
bool isExistCollisionUnderTarget(al::CameraPoser const*);
|
||||||
|
bool isExistSlopeCollisionUnderTarget(al::CameraPoser const*);
|
||||||
|
bool isExistWallCollisionUnderTarget(al::CameraPoser const*);
|
||||||
|
bool isExistSubTarget(al::CameraPoser const*);
|
||||||
|
bool isChangeSubTarget(al::CameraPoser const*);
|
||||||
|
bool isValidSubTargetTurnV(al::CameraPoser const*);
|
||||||
|
bool isValidSubTargetResetAfterTurnV(al::CameraPoser const*);
|
||||||
|
bool isValidAngleSwing(al::CameraPoser const*);
|
||||||
|
bool isStopUpdateGyro(al::CameraPoser const*);
|
||||||
|
bool isTargetCollideGround(al::CameraPoser const*);
|
||||||
|
bool isTargetInWater(al::CameraPoser const*);
|
||||||
|
bool isTargetInMoonGravity(al::CameraPoser const*);
|
||||||
|
bool isTargetClimbPole(al::CameraPoser const*);
|
||||||
|
bool isTargetGrabCeil(al::CameraPoser const*);
|
||||||
|
bool isTargetInvalidMoveByInput(al::CameraPoser const*);
|
||||||
|
bool isTargetEnableEndAfterInterpole(al::CameraPoser const*);
|
||||||
|
bool isTargetWallCatch(al::CameraPoser const*);
|
||||||
|
bool isSnapShotMode(al::CameraPoser const*);
|
||||||
|
bool isOffVerticalAbsorb(al::CameraPoser const*);
|
||||||
|
bool isRequestStopVerticalAbsorb(al::CameraObjectRequestInfo const&);
|
||||||
|
bool isRequestResetPosition(al::CameraObjectRequestInfo const&);
|
||||||
|
bool isRequestResetAngleV(al::CameraObjectRequestInfo const&);
|
||||||
|
bool isRequestDownToDefaultAngleBySpeed(al::CameraObjectRequestInfo const&);
|
||||||
|
bool isRequestUpToTargetAngleBySpeed(al::CameraObjectRequestInfo const&);
|
||||||
|
bool isRequestMoveDownAngleV(al::CameraObjectRequestInfo const&);
|
||||||
|
bool isRequestSetAngleV(al::CameraObjectRequestInfo const&);
|
||||||
|
bool isInvalidCollider(al::CameraPoser const*);
|
||||||
|
bool isInvalidPreCameraEndAfterInterpole(al::CameraPoser const*);
|
||||||
|
bool isSceneCameraFirstCalc(al::CameraPoser const*);
|
||||||
|
bool isActiveInterpole(al::CameraPoser const*);
|
||||||
|
bool isInvalidEndEntranceCamera(al::CameraPoser const*);
|
||||||
|
bool isPause(al::CameraPoser const*);
|
||||||
|
bool isValidGyro(al::CameraPoser const*);
|
||||||
|
bool isTriggerCameraResetRotate(al::CameraPoser const*);
|
||||||
|
bool isHoldCameraZoom(al::CameraPoser const*);
|
||||||
|
bool isHoldCameraSnapShotZoomIn(al::CameraPoser const*);
|
||||||
|
bool isHoldCameraSnapShotZoomOut(al::CameraPoser const*);
|
||||||
|
bool isHoldCameraSnapShotRollLeft(al::CameraPoser const*);
|
||||||
|
bool isHoldCameraSnapShotRollRight(al::CameraPoser const*);
|
||||||
|
bool isPlayerTypeFlyer(al::CameraPoser const*);
|
||||||
|
bool isPlayerTypeHighSpeedMove(al::CameraPoser const*);
|
||||||
|
bool isPlayerTypeHighJump(al::CameraPoser const*);
|
||||||
|
bool isPlayerTypeNotTouchGround(al::CameraPoser const*);
|
||||||
|
bool isOnRideObj(al::CameraPoser const*);
|
||||||
|
}
|
43
include/al/collision/Collider.h
Normal file
43
include/al/collision/Collider.h
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include <sead/math/seadVector.h>
|
||||||
|
#include <sead/math/seadMatrix.h>
|
||||||
|
|
||||||
|
#include "al/hio/HioNode.h"
|
||||||
|
#include "CollisionDirector.h"
|
||||||
|
|
||||||
|
typedef unsigned int uint;
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
struct SphereInterpolator;
|
||||||
|
struct SphereHitInfo;
|
||||||
|
struct CollisionPartsFilterBase;
|
||||||
|
struct TriangleFilterBase;
|
||||||
|
|
||||||
|
class Collider : public al::HioNode, public IUseCollision {
|
||||||
|
public:
|
||||||
|
Collider(al::CollisionDirector*, sead::Matrix34f const*, sead::Vector3f const*,
|
||||||
|
sead::Vector3f const*, float, float, uint);
|
||||||
|
void calcCheckPos(sead::Vector3f*);
|
||||||
|
void calcMovePowerByContact(sead::Vector3f*, sead::Vector3f const&);
|
||||||
|
void clear();
|
||||||
|
void clearContactPlane();
|
||||||
|
void clearStoredPlaneNum();
|
||||||
|
sead::Vector3f collide(sead::Vector3f const&);
|
||||||
|
void findCollidePos(int*, al::SphereInterpolator*, al::SphereHitInfo*, uint);
|
||||||
|
void getCollisionDirector();
|
||||||
|
void getPlane(int);
|
||||||
|
void getRecentOnGroundNormal(uint);
|
||||||
|
void obtainMomentFixReaction(al::SphereHitInfo*, sead::Vector3f*,
|
||||||
|
sead::Vector3f*, bool, uint);
|
||||||
|
void onInvalidate();
|
||||||
|
void preCollide(al::SphereInterpolator*, sead::Vector3f*, float*, sead::Vector3f const&,
|
||||||
|
al::SphereHitInfo*, uint);
|
||||||
|
void setCollisionPartsFilter(al::CollisionPartsFilterBase const*);
|
||||||
|
void setTriangleFilter(al::TriangleFilterBase const *);
|
||||||
|
void storeContactPlane(al::SphereHitInfo *);
|
||||||
|
void storeCurrentHitInfo(al::SphereHitInfo *, uint);
|
||||||
|
void updateRecentOnGroundInfo();
|
||||||
|
};
|
||||||
|
} // namespace al
|
12
include/al/collision/CollisionDirector.h
Normal file
12
include/al/collision/CollisionDirector.h
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
namespace al
|
||||||
|
{
|
||||||
|
class CollisionDirector;
|
||||||
|
|
||||||
|
class IUseCollision
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
virtual al::CollisionDirector* getCollisionDirector() const = 0;
|
||||||
|
};
|
||||||
|
};
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue