Skip to content

Commit

Permalink
Merging dev into release for v1.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
Amethyst-szs authored Mar 18, 2023
2 parents 8e62ab2 + e36043f commit 880cbad
Show file tree
Hide file tree
Showing 89 changed files with 2,906 additions and 987 deletions.
8 changes: 2 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ endif ()
set(CMAKE_C_STANDARD 17)
set(CMAKE_CXX_STANDARD 23)

if (LOGGER_IP)
add_compile_definitions(LOGGER_IP="${LOGGER_IP}")
endif ()

## Title Id
set(TITLE_ID 0100000000010000)
set(CONFIG_TITLE_ID 0x${TITLE_ID})
Expand Down Expand Up @@ -56,12 +52,12 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/module/subsdk9.specs.template ${CMAKE
add_nso_target_subsdk(subsdk9)
set_target_properties(subsdk9 PROPERTIES CONFIG_JSON "${CMAKE_CURRENT_BINARY_DIR}/subsdk9.json")
__generate_npdm(subsdk9)
set_target_properties(subsdk9 PROPERTIES LINK_FLAGS "-specs ${CMAKE_BINARY_DIR}/subsdk9.specs -g3 ${ARCH} -nostartfiles")
set_target_properties(subsdk9 PROPERTIES LINK_FLAGS "-specs ${CMAKE_BINARY_DIR}/subsdk9.specs -g3 ${ARCH} -nostartfiles -nostdlib")

add_custom_target(subsdk9_meta DEPENDS create_npdm subsdk9_nso)
if (FTP_IP)
## Upload to target switch
add_custom_command(TARGET subsdk9_meta POST_BUILD COMMAND ncftpput -u crafty -p boss -P 5000 ${FTP_IP} /atmosphere/contents/${TITLE_ID}/exefs ${CMAKE_BINARY_DIR}/main.npdm ${CMAKE_BINARY_DIR}/subsdk9)
add_custom_command(TARGET subsdk9_meta POST_BUILD COMMAND ncftpput -u crafty -p boss -P 5000 ${FTP_IP} atmosphere/contents/${TITLE_ID}/exefs ${CMAKE_BINARY_DIR}/main.npdm ${CMAKE_BINARY_DIR}/subsdk9)
endif()

if(RYU_PATH)
Expand Down
Binary file modified LunaKit/LKData/CustomStages/Built-In.byml
Binary file not shown.
5 changes: 2 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
LOGGER_IP ?= "192.168.0.58" # put log server IP in string
FTP_IP ?= 192.168.0.9 # put console IP here
.PHONY: all clean

all:
cmake --toolchain=cmake/toolchain.cmake -DLOGGER_IP=$(LOGGER_IP) -S . -B build && $(MAKE) -C build subsdk9_meta
cmake --toolchain=cmake/toolchain.cmake -S . -B build && $(MAKE) -C build subsdk9_meta

send:
cmake --toolchain=cmake/toolchain.cmake -DFTP_IP=$(FTP_IP) -DLOGGER_IP=$(LOGGER_IP) -S . -B build && $(MAKE) -C build subsdk9_meta
cmake --toolchain=cmake/toolchain.cmake -DFTP_IP=$(FTP_IP) -S . -B build && $(MAKE) -C build subsdk9_meta

clean:
rm -r build || true
Expand Down
25 changes: 19 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ LunaKit is a development tool / modification of Super Mario Odyssey designed to
## Features:
- Custom in-game GUI built on [Dear ImGui](https://github.com/ocornut/imgui)
- View and edit large amounts of game info
- Browse, search, favorite, and manipulate every object in a stage
- Many game settings and cheats for players and developers alike
- Primitive Rendering to visually draw additonal game info
- Extremely fast stage warping, including custom stages using [Custom Stage plugins](https://github.com/Amethyst-szs/smo-lunakit/wiki)
Expand All @@ -18,21 +19,33 @@ LunaKit is a development tool / modification of Super Mario Odyssey designed to

## How to use:
### Controls:
- Open the interface by holding ZR + R and tapping L
- Hide windows by pressing L-Stick
- Navigate interface with a mouse
- Open the interface by holding ZR + R and tapping L
- Hide windows by pressing L-Stick
- Mouse controls (RECOMMENDED)
- Navigate interface with a mouse
- Connect mouse to switch via USB
- Controller controls (NOT RECOMMENDED)
- Activate or deactivate controller mode by holding ZR + R and tapping ZL
- Navigate window with D-Pad
- Interact with windows using A or B
- Change windows by holding Y and using shoulder buttons

### Building:
- More detailed building instructions to come!
- If you don't already know how to compile, download a precompiled build in releases!
- Requires running Linux (Ubuntu recommended)
- If you're running Windows, try [WSL](https://learn.microsoft.com/en-us/windows/wsl/install)!
- Install [devkitPro](https://devkitpro.org/wiki/Getting_Started) with the switch-dev platform
- Clone or fork this repository
- If using WSL, make sure to clone the repo inside your WSL directories! Using a folder on your windows machine with WSL drastically slows compile times
- Open bash and run `make`
- To send to your switch (requires editing FPT_IP in makefile), run make send
- To increase core usage for compile, run make -j# (# for total cores to use)

## Credits:
- [Amethyst-szs](https://github.com/Amethyst-szs): LunaKit Creator
- [CraftyBoss](https://github.com/CraftyBoss): SMO ExLaunch, ImGui, and more
- [Mars](https://github.com/Mars2032): Referenced TAS Mod, Emotional support



# Original SMO-Exlaunch-Base Description

A base repository using exlaunch-cmake that contains code for modifying Super Mario Odyssey 1.0.
Expand Down
3 changes: 1 addition & 2 deletions src/al/LiveActor/LiveActor.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include "al/LiveActor/LiveActorFlag.h"
#include "al/actor/ActorInitInfo.h"
#include "al/actor/ActorSceneInfo.h"
#include "al/actor/ActorActionKeeper.h"
Expand Down Expand Up @@ -35,10 +36,8 @@ namespace al
class ActorPrePassLightKeeper;
class ActorOcclusionKeeper;
class SubActorKeeper;
class LiveActorFlag;

class ActorInitInfo;
class HitSensor;
class SensorMsg;
class ScreenPointer;
class ScreenPointTarget;
Expand Down
25 changes: 25 additions & 0 deletions src/al/LiveActor/LiveActorFlag.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#pragma once

namespace al {

class LiveActorFlag {
public:
LiveActorFlag();

bool mIsDead;
bool mIsClipped;
bool mIsClippingInvalidated;
bool mIsDrawClipped;
bool mIsCalcAnimOn;
bool mIsModelVisible;
bool mIsNoCollide;
bool mIsFlag8;
bool mIsMaterialCodeValid;
bool mIsAreaTarget;
bool mIsUpdateMovementEffectAudioCollisionSensor;
bool mIsFlag12;
};

static_assert(sizeof(LiveActorFlag) == 0xC, "");

} // namespace al
9 changes: 5 additions & 4 deletions src/al/byaml/ByamlIter.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ class ByamlIter {
bool tryGetIterByKey(al::ByamlIter*, char const*) const;

bool tryGetStringByKey(char const**, char const*) const;
bool tryGetStringByIndex(char const**, int) const;
bool tryConvertString(char const**, al::ByamlData const*) const;

bool tryGetBinaryByIndex(char const**, int*, int) const;
Expand All @@ -48,8 +49,10 @@ class ByamlIter {
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 tryGetUIntByIndex(unsigned int*, int) const;
bool tryGetUIntByKey(unsigned int*, char const*) const;
bool tryConvertUInt(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;
Expand All @@ -58,9 +61,7 @@ class ByamlIter {
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 tryGetBoolByIndex(bool*, int) const;
bool tryGetUInt32ByIndex(unsigned int*, int) const;
bool tryGetFloatByIndex(float*, int) const;
bool tryGetInt64ByIndex(long*, int) const;
bool tryGetUInt64ByIndex(unsigned long*, int) const;
Expand Down
17 changes: 10 additions & 7 deletions src/al/nerve/NerveKeeper.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,27 @@
namespace al
{
class NerveStateCtrl;
class NerveActionCtrl;

class NerveKeeper
{
public:
NerveKeeper(al::IUseNerve *, const al::Nerve *, int);

void initNerveAction(al::NerveActionCtrl*);

void update();

void tryChangeNerve();
void setNerve(const al::Nerve *);
al::Nerve* getCurrentNerve() const;

al::IUseNerve* mParent; // _0
const al::Nerve* _8;
const al::Nerve* mNerve; // _10
int mStep; // _18
int _1C;
al::NerveStateCtrl* mStateCtrl; // _20
unsigned long _28;
al::IUseNerve* mParent; // 0x00
const al::Nerve* mPrevNrv; // 0x08
const al::Nerve* mNrv; // 0x10
int mStep; // 0x18
int padding; // 0x1c
al::NerveStateCtrl* mStateCtrl; // 0x20
al::NerveActionCtrl* mActionCtrl; // 0x28
};
};
1 change: 0 additions & 1 deletion src/al/sensor/HitSensor.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@

namespace al
{

class LiveActor;

class HitSensor
Expand Down
4 changes: 4 additions & 0 deletions src/al/sensor/HitSensorKeeper.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,9 @@ namespace al
void validateBySystem(void);
void invalidateBySystem(void);
al::HitSensor *getSensor(char const *sensorName) const;

int mSensorKeeperNum;
int mSensorNum;
al::HitSensor** mSensors; // 0x8
};
};
2 changes: 2 additions & 0 deletions src/al/util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ namespace al {

void setQuat(al::LiveActor *, const sead::Quatf &);

void updatePoseQuat(al::LiveActor*, sead::Quatf const&);

void setVelocityZero(al::LiveActor *);

void setEffectParticleScale(al::IUseEffectKeeper *actor, char const *effectName, float scale);
Expand Down
3 changes: 2 additions & 1 deletion src/al/util/SensorUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ namespace al
struct EventFlowExecutor;
struct ParabolicPath;

sead::Vector3f *getSensorPos(al::HitSensor const *);
sead::Vector3f* getActorTrans(al::HitSensor const*);
sead::Vector3f& getSensorPos(al::HitSensor const*);
float getSensorRadius(al::HitSensor const*);

void setSensorRadius(al::LiveActor *, const char *, float);

Expand Down
Loading

0 comments on commit 880cbad

Please sign in to comment.