Skip to content

Commit

Permalink
Merge branch 'master' into player-action-function
Browse files Browse the repository at this point in the history
  • Loading branch information
MonsterDruide1 authored Jun 9, 2024
2 parents eb5ab33 + ab7ef8a commit ed84f5d
Show file tree
Hide file tree
Showing 123 changed files with 2,307 additions and 568 deletions.
24 changes: 24 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM ubuntu:24.04
WORKDIR /app

# avoid errors/configuration issues while installing other packages
ARG DEBIAN_FRONTEND=noninteractive
ARG TZ=Etc/UTC
RUN apt update
RUN apt install -y tzdata

# install git for collaboration management
RUN apt install -y git

# install dependencies for building and running the project
RUN apt install -y ccache clang cmake curl less libncurses6 libssl-dev ninja-build pip pkg-config python3-full xdelta3
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
RUN pip install --break-system-packages ansiwrap capstone colorama cxxfilt pyelftools python-Levenshtein toml watchdog

# install dependencies for code environment
RUN apt install -y clangd clang-format clang-tidy

# install (outdated) libtinfo5, required for old clang version
RUN curl -o libtinfo5_6.4-2_amd64.deb http://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.4-2_amd64.deb && dpkg -i libtinfo5_6.4-2_amd64.deb && rm -f libtinfo5_6.4-2_amd64.deb

ENTRYPOINT ["bash"]
15 changes: 15 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"build": {
"dockerfile": "Dockerfile"
},
"customizations": {
"vscode": {
"extensions": [
"xaver.clang-format",
"llvm-vs-code-extensions.vscode-clangd"
]
}
},
// mark root git repo and all submodules as safe
"postStartCommand": "git config --global --add safe.directory ${containerWorkspaceFolder} && git submodule --quiet foreach --recursive pwd | xargs -I% git config --global --add safe.directory %"
}
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: DoozyX/clang-format-lint-action@v0.12
- uses: DoozyX/clang-format-lint-action@v0.17
with:
source: 'src lib'
exclude: 'lib/NintendoSDK lib/aarch64 lib/agl lib/eui lib/sead'
clangFormatVersion: 12
clangFormatVersion: 14
custom-lint:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ bin/
.cache/
.DS_Store
/cmake-build-*
compile_commands.json
.clangd

# IDA
*.id0
Expand Down
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ The instructions below assume that you are using Linux (native or WSL) or macOS.

## 1. Set up dependencies

You can either set up all dependencies on your standard installation, or use a Visual Studio Code Dev Container. If you choose to do the latter, you can skip this section, just clone and open the folder in VS-Code, press F1 and select `Dev Containers: Rebuild and Reopen in Container`. You can copy the NSO executable into the container using `docker cp /path/to/main.nso [container-id]:/workspaces/main.nso`, where `[container-id]` is the ID listed in `docker container ls`.

* Python 3.6 or newer with [pip](https://pip.pypa.io/en/stable/installation/)
* Ninja
* CMake 3.13+
Expand All @@ -27,6 +29,12 @@ Ubuntu users can install those dependencies by running:
sudo apt install python3 ninja-build cmake ccache xdelta3 clang libssl-dev libncurses5
```

If you are running Ubuntu 23.10 or later, the `libncurses5` package won't be available anymore. You can install it from the archive using:

```shell
wget http://archive.ubuntu.com/ubuntu/pool/universe/n/ncurses/libtinfo5_6.4-2_amd64.deb && sudo dpkg -i libtinfo5_6.4-2_amd64.deb && rm -f libtinfo5_6.4-2_amd64.deb
```

Additionally, you'll also need:

* A Rust toolchain ([follow the instructions here](https://www.rust-lang.org/tools/install))
Expand Down
304 changes: 152 additions & 152 deletions data/odyssey_functions.csv

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/al/include/Library/Audio/IAudioSystemPause.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ namespace al {

class IAudioSystemPause {
public:
virtual void pauseSystem(bool, char const*, bool, f32, bool, bool, bool) = 0;
virtual void pauseSystem(bool, const char*, bool, f32, bool, bool, bool) = 0;
};

} // namespace al
12 changes: 0 additions & 12 deletions lib/al/include/Library/Base/Base.h

This file was deleted.

12 changes: 12 additions & 0 deletions lib/al/include/Library/Base/HashCodeUtil.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#pragma once

#include <basis/seadTypes.h>
#include <cstdarg>

namespace al {
s32 calcHashCode(const char* str);
s32 calcHashCodeLower(const char* str);
s32 calcHashCodeFmt(const char* format, std::va_list argv);
s32 calcHashCodeFmt(const char* format, ...);
const char* getBaseName(const char* name);
} // namespace al
File renamed without changes.
4 changes: 2 additions & 2 deletions lib/al/include/Library/Camera/SnapShotCameraCtrl.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class IUseCollision;

class SnapShotCameraCtrl : public NerveExecutor, public IUseAudioKeeper {
public:
SnapShotCameraCtrl(SnapShotCameraSceneInfo const*);
SnapShotCameraCtrl(const SnapShotCameraSceneInfo*);
void start(f32);
void load(ByamlIter const&);
void load(const ByamlIter&);
void startReset(s32);
void update(const sead::LookAtCamera&, const IUseCollision*, const ICameraInput*);
void makeLookAtCameraPost(sead::LookAtCamera*) const;
Expand Down
4 changes: 2 additions & 2 deletions lib/al/include/Library/Controller/JoyPadAccelPoseAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class JoyPadAccelPoseAnalyzer {
public:
class HistoryInfo {
public:
void calcHistory(sead::Vector3f const&, sead::Vector3f const&, f32);
void calcHistory(const sead::Vector3f&, const sead::Vector3f&, f32);

unsigned char padding_0[0x60];
f32 hist0;
Expand All @@ -19,7 +19,7 @@ class JoyPadAccelPoseAnalyzer {

class PoseAxisDir {
public:
void calcHistory(sead::Vector3f const&, sead::Vector3f const&);
void calcHistory(const sead::Vector3f&, const sead::Vector3f&);

unsigned char padding_1[0x88];
sead::Vector2f unkVec0;
Expand Down
2 changes: 1 addition & 1 deletion lib/al/include/Library/Debug/Host.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include <prim/seadSafeString.h>

#include "Library/Base/String.h"
#include "Library/Base/StringUtil.h"

namespace al {
bool tryGetComputerName(sead::BufferedSafeString* computerName);
Expand Down
2 changes: 1 addition & 1 deletion lib/al/include/Library/Effect/EffectSystemInfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void tryKillEmitterAndParticleAll(IUseEffectKeeper*);
void onCalcAndDrawEffect(IUseEffectKeeper*);
void offCalcAndDrawEffect(IUseEffectKeeper*);
void forceSetStopCalcAndDraw(IUseEffectKeeper*, bool);
bool isEffectEmitting(IUseEffectKeeper const*, const char*);
bool isEffectEmitting(const IUseEffectKeeper*, const char*);
void setEffectEmitRatio(IUseEffectKeeper*, const char*, f32);
void setEffectAllScale(IUseEffectKeeper*, const char*, const sead::Vector3<f32>&);
void setEffectEmitterVolumeScale(IUseEffectKeeper*, const char*, const sead::Vector3<f32>&);
Expand Down
18 changes: 18 additions & 0 deletions lib/al/include/Library/Event/SceneEventFlowMsg.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#pragma once

#include <prim/seadSafeString.h>

namespace al {
class SceneEventFlowMsg {
public:
SceneEventFlowMsg();

bool isReceiveCommand(const char* cmd) const;
void requestCommand(const char* cmd);

private:
sead::FixedSafeString<64> mCmd = {""};
};

static_assert(sizeof(SceneEventFlowMsg) == 0x58);
} // namespace al
2 changes: 1 addition & 1 deletion lib/al/include/Library/File/FileUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ u32 calcBufferSizeAlignment(const sead::SafeString& fileName);
u8* loadFile(const sead::SafeString& fileName);
void tryLoadFileToBuffer(const sead::SafeString& fileName, u8*, u32, s32);
sead::ArchiveRes* loadArchive(const sead::SafeString& fileName);
void loadArchiveWithExt(const sead::SafeString& fileName, char const* ext);
void loadArchiveWithExt(const sead::SafeString& fileName, const char* ext);
void tryRequestLoadArchive(const sead::SafeString& fileName, sead::Heap* heap);
void loadSoundItem(u32, u32, IAudioResourceLoader* resLoader);
void tryRequestLoadSoundItem(u32);
Expand Down
2 changes: 1 addition & 1 deletion lib/al/include/Library/HitSensor/SensorFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ void updateHitSensorsAll(al::LiveActor*);
void clearHitSensors(al::LiveActor*);

// TODO: find this type
void findSensorTypeByName(char const*);
void findSensorTypeByName(const char*);

} // namespace alSensorFunction
38 changes: 19 additions & 19 deletions lib/al/include/Library/Joint/JointControllerKeeper.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,42 +17,42 @@ void isExistJointControllerKeeper(const LiveActor*);
void registerJointController(const LiveActor*, JointControllerBase*);
void registerJointController(const LiveActor*, JointControllerBase*, const char*);
void initJointLocalRotator(const LiveActor*, sead::Vector3<f32>*, const char*);
void initJointLocalXRotator(const LiveActor*, f32 const*, const char*);
void initJointLocalYRotator(const LiveActor*, f32 const*, const char*);
void initJointLocalZRotator(const LiveActor*, f32 const*, const char*);
void initJointLocalAxisRotator(const LiveActor*, const sead::Vector3f&, f32 const*, const char*,
void initJointLocalXRotator(const LiveActor*, const f32*, const char*);
void initJointLocalYRotator(const LiveActor*, const f32*, const char*);
void initJointLocalZRotator(const LiveActor*, const f32*, const char*);
void initJointLocalAxisRotator(const LiveActor*, const sead::Vector3f&, const f32*, const char*,
bool);
void initJointLocalMinusXRotator(const LiveActor*, f32 const*, const char*);
void initJointLocalMinusYRotator(const LiveActor*, f32 const*, const char*);
void initJointLocalMinusZRotator(const LiveActor*, f32 const*, const char*);
void initJointLocalMinusXRotator(const LiveActor*, const f32*, const char*);
void initJointLocalMinusYRotator(const LiveActor*, const f32*, const char*);
void initJointLocalMinusZRotator(const LiveActor*, const f32*, const char*);
void initJointGlobalXRotator(const LiveActor*, f32*, const char*);
void initJointGlobalAxisRotator(const LiveActor*, const sead::Vector3f&, f32*, const char*);
void initJointGlobalYRotator(const LiveActor*, f32*, const char*);
void initJointGlobalZRotator(const LiveActor*, f32*, const char*);
void initJointGlobalMinusXRotator(const LiveActor*, f32*, const char*);
void initJointGlobalMinusYRotator(const LiveActor*, f32*, const char*);
void initJointGlobalMinusZRotator(const LiveActor*, f32*, const char*);
void initJointLocalTransControllerX(const LiveActor*, f32 const*, const char*);
void initJointLocalTransControllerY(const LiveActor*, f32 const*, const char*);
void initJointLocalTransControllerZ(const LiveActor*, f32 const*, const char*);
void initJointLocalTransControllerX(const LiveActor*, const f32*, const char*);
void initJointLocalTransControllerY(const LiveActor*, const f32*, const char*);
void initJointLocalTransControllerZ(const LiveActor*, const f32*, const char*);
void initJointLocalTransController(const LiveActor*, const sead::Vector3f*, const char*);
void initJointLocalScaleControllerX(const LiveActor*, f32 const*, const char*);
void initJointLocalScaleControllerY(const LiveActor*, f32 const*, const char*);
void initJointLocalScaleControllerZ(const LiveActor*, f32 const*, const char*);
void initJointLocalScaleControllerX(const LiveActor*, const f32*, const char*);
void initJointLocalScaleControllerY(const LiveActor*, const f32*, const char*);
void initJointLocalScaleControllerZ(const LiveActor*, const f32*, const char*);
void initJointLocalScaleController(const LiveActor*, const sead::Vector3f*, const char*);
void initJointLocalMtxController(const LiveActor*, const sead::Matrix34f*, const char*);
void initJointGlobalMtxController(const LiveActor*, const sead::Matrix34f*, const char*);
void initJointGlobalQuatController(const LiveActor*, sead::Quat<f32> const*, const char*);
void initJointGlobalQuatTransController(const LiveActor*, sead::Quat<f32> const*,
void initJointGlobalQuatController(const LiveActor*, const sead::Quat<f32>*, const char*);
void initJointGlobalQuatTransController(const LiveActor*, const sead::Quat<f32>*,
const sead::Vector3f*, const char*);
void initJointPostQuatController(const LiveActor*, sead::Quat<f32> const*, const char*);
void initJointLocalDirController(const LiveActor*, JointDirectionInfo const*, const char*);
void initJointAimController(const LiveActor*, JointAimInfo const*, const char*);
void initJointPostQuatController(const LiveActor*, const sead::Quat<f32>*, const char*);
void initJointLocalDirController(const LiveActor*, const JointDirectionInfo*, const char*);
void initJointAimController(const LiveActor*, const JointAimInfo*, const char*);
void initJointTranslateShaker(const LiveActor*, s32);
void appendJointTranslateShakerX(JointTranslateShaker*, const char*);
void appendJointTranslateShakerY(JointTranslateShaker*, const char*);
void appendJointTranslateShakerZ(JointTranslateShaker*, const char*);
void initJointMasher(const LiveActor*, bool const*, s32);
void initJointMasher(const LiveActor*, const bool*, s32);
void appendMashJoint(JointMasher*, const char*, f32);
void initJointRumbler(const LiveActor*, const char*, f32, f32, u32, s32);
void initJointLocalQuatRotator(const LiveActor*, const char*, const sead::Quatf*);
Expand Down
3 changes: 2 additions & 1 deletion lib/al/include/Library/Layout/LayoutActionFunction.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

namespace al {
class IUseLayoutAction;
class LayoutActor;
class Nerve;

void startAction(IUseLayoutAction* layout, const char* actionName, const char* paneName);
Expand Down Expand Up @@ -32,5 +33,5 @@ bool isActionEnd(const IUseLayoutAction* layout, const char* paneName);
bool isExistAction(const IUseLayoutAction* layout, const char* actionName);
bool isExistAction(const IUseLayoutAction* layout, const char* actionName, const char* paneName);

void setNerveAtActionEnd(const IUseLayoutAction* layout, const Nerve* nerve);
void setNerveAtActionEnd(LayoutActor*, const Nerve* nerve);
} // namespace al
Loading

0 comments on commit ed84f5d

Please sign in to comment.