Skip to content

Commit

Permalink
Merge branch 'develop' into test-things-together-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Sarge-117 committed Feb 18, 2025
2 parents 76f4908 + 3d7da51 commit 4335ea3
Show file tree
Hide file tree
Showing 13 changed files with 38 additions and 33 deletions.
2 changes: 1 addition & 1 deletion CMake/Packaging.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ if (NOT LINUXDEPLOY_EXECUTABLE)
message(STATUS "Downloading linuxdeploy")
set(LINUXDEPLOY_EXECUTABLE ${CPACK_PACKAGE_DIRECTORY}/linuxdeploy/linuxdeploy)
file(DOWNLOAD
https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
https://github.com/linuxdeploy/linuxdeploy/releases/download/1-alpha-20240109-1/linuxdeploy-x86_64.AppImage
${LINUXDEPLOY_EXECUTABLE}
INACTIVITY_TIMEOUT 10
LOG ${CPACK_PACKAGE_DIRECTORY}/linuxdeploy/download.log
Expand Down
8 changes: 3 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR)
cmake_minimum_required(VERSION 3.26.0 FATAL_ERROR)

set(CMAKE_SYSTEM_VERSION 10.0 CACHE STRING "" FORCE)
set(CMAKE_CXX_STANDARD 20 CACHE STRING "The C++ standard to use")
Expand Down Expand Up @@ -195,8 +195,7 @@ find_package(Python3 COMPONENTS Interpreter)
# Target to generate OTRs
add_custom_target(
ExtractAssets
# CMake versions prior to 3.17 do not have the rm command, use remove instead for older versions
COMMAND ${CMAKE_COMMAND} -E $<IF:$<VERSION_LESS:${CMAKE_VERSION},3.17>,remove,rm> -f oot.otr oot-mq.otr soh.otr
COMMAND ${CMAKE_COMMAND} -E rm -f oot.otr oot-mq.otr soh.otr
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$<TARGET_FILE:ZAPD>" --non-interactive --xml-root ../soh/assets/xml --custom-otr-file soh.otr "--custom-assets-path" ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom --port-ver "${CMAKE_PROJECT_VERSION}"
COMMAND ${CMAKE_COMMAND} -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DTARGET_DIR="$<TARGET_FILE_DIR:ZAPD>" -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -P ${CMAKE_CURRENT_SOURCE_DIR}/copy-existing-otrs.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter
Expand All @@ -217,8 +216,7 @@ add_custom_target(
# Target to generate only soh.otr
add_custom_target(
GenerateSohOtr
# CMake versions prior to 3.17 do not have the rm command, use remove instead for older versions
COMMAND ${CMAKE_COMMAND} -E $<IF:$<VERSION_LESS:${CMAKE_VERSION},3.17>,remove,rm> -f soh.otr
COMMAND ${CMAKE_COMMAND} -E rm -f soh.otr
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter/extract_assets.py -z "$<TARGET_FILE:ZAPD>" --norom --custom-otr-file soh.otr "--custom-assets-path" ${CMAKE_CURRENT_SOURCE_DIR}/soh/assets/custom --port-ver "${CMAKE_PROJECT_VERSION}"
COMMAND ${CMAKE_COMMAND} -DSYSTEM_NAME=${CMAKE_SYSTEM_NAME} -DTARGET_DIR="$<TARGET_FILE_DIR:ZAPD>" -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -DBINARY_DIR=${CMAKE_BINARY_DIR} -DONLYSOHOTR=On -P ${CMAKE_CURRENT_SOURCE_DIR}/copy-existing-otrs.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/OTRExporter
Expand Down
Empty file removed mods/custom_mod_files_go_here.txt
Empty file.
18 changes: 15 additions & 3 deletions soh/include/z64effect.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,18 @@ struct PlayState;

#define TOTAL_EFFECT_COUNT SPARK_COUNT + BLURE_COUNT + SHIELD_PARTICLE_COUNT

typedef enum {
TRAIL_TYPE_REST,
TRAIL_TYPE_SWORDS,
TRAIL_TYPE_BOOMERANG,
TRAIL_TYPE_BOMBCHU,
TRAIL_TYPE_KOKIRI_SWORD,
TRAIL_TYPE_MASTER_SWORD,
TRAIL_TYPE_BIGGORON_SWORD,
TRAIL_TYPE_STICK,
TRAIL_TYPE_HAMMER
} TrailType; //SOH [Enhancements]

typedef struct {
/* 0x00 */ u8 active;
/* 0x01 */ u8 unk_01;
Expand Down Expand Up @@ -73,7 +85,7 @@ typedef struct {
/* 0x194 */ s32 elemDuration;
/* 0x198 */ s32 unkFlag;
/* 0x19C */ s32 calcMode;
/* 0x1A0 */ u8 trailType; // 1 is swords, 2 is boomerang, 3 is bombchu, 0 is rest
/* 0x1A0 */ TrailType trailType; //SOH [Enhancements]
} EffectBlureInit1; // size = 0x1A0

typedef struct {
Expand All @@ -90,7 +102,7 @@ typedef struct {
/* 0x1B */ u8 mode4Param;
/* 0x1C */ Color_RGBA8 altPrimColor; // used with drawMode 1
/* 0x20 */ Color_RGBA8 altEnvColor; // used with drawMode 1
/* 0x1A0 */ u8 trailType; // 1 is swords, 2 is boomerang, 3 is bombchu, 4 is stick, 0 is rest
/* 0x1A0 */ TrailType trailType; //SOH [Enhancements]
} EffectBlureInit2; // size = 0x24

typedef struct {
Expand All @@ -110,7 +122,7 @@ typedef struct {
/* 0x1A1 */ u8 drawMode; // 0: simple; 1: simple with alt colors; 2+: smooth
/* 0x1A2 */ Color_RGBA8 altPrimColor; // used with drawMode 1
/* 0x1A6 */ Color_RGBA8 altEnvColor; // used with drawMode 1
/* 0x1A0 */ u8 trailType; // 1 is default swords, 2 is boomerang, 3 is bombchu, 0 is rest. 4 is Kokiri, 5 is Master, 6 is BGS, 7 is Stick, 8 is Hammer.
/* 0x1A0 */ TrailType trailType; //SOH [Enhancements]
} EffectBlure; // size = 0x1AC

typedef struct {
Expand Down
4 changes: 0 additions & 4 deletions soh/soh/Enhancements/Autosave.h

This file was deleted.

1 change: 0 additions & 1 deletion soh/soh/SohGui/SohMenuBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
#include "soh/Enhancements/randomizer/Plandomizer.h"
#include "soh/Enhancements/TimeDisplay/TimeDisplay.h"
#include "soh/AboutWindow.h"
#include "soh/Enhancements/Autosave.h"

// FA icons are kind of wonky, if they worked how I expected them to the "+ 2.0f" wouldn't be needed, but
// they don't work how I expect them to so I added that because it looked good when I eyeballed it
Expand Down
18 changes: 9 additions & 9 deletions soh/src/code/z_eff_blure.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,8 @@ s32 EffectBlure_Update(void* thisx) {
static u8 changed = 0;
u8 reset = 0;

switch (this->trailType) { //there HAS to be a better way to do this.
case 2:
switch (this->trailType) {
case TRAIL_TYPE_BOOMERANG:
if (CVarGetInteger(CVAR_COSMETIC("Trails.Boomerang.Changed"), 0)) {
color = CVarGetColor(CVAR_COSMETIC("Trails.Boomerang.Value"), (Color_RGBA8){ 255, 255, 100, 255 });
changed = 1;
Expand All @@ -216,7 +216,7 @@ s32 EffectBlure_Update(void* thisx) {
reset = 1;
}
break;
case 3:
case TRAIL_TYPE_BOMBCHU:
if (CVarGetInteger(CVAR_COSMETIC("Trails.Bombchu.Changed"), 0)) {
color = CVarGetColor(CVAR_COSMETIC("Trails.Bombchu.Value"), (Color_RGBA8){ 250, 0, 0, 255 });
this->p1StartColor.r = color.r;
Expand Down Expand Up @@ -247,7 +247,7 @@ s32 EffectBlure_Update(void* thisx) {
this->p2EndColor.b = color.b * 0.4f;
}
break;
case 4:
case TRAIL_TYPE_KOKIRI_SWORD:
if (CVarGetInteger(CVAR_COSMETIC("Trails.KokiriSword.Changed"), 0)) {
color = CVarGetColor(CVAR_COSMETIC("Trails.KokiriSword.Value"), (Color_RGBA8){ 255, 255, 255, 255 });
changed = 1;
Expand All @@ -256,7 +256,7 @@ s32 EffectBlure_Update(void* thisx) {
reset = 1;
}
break;
case 5:
case TRAIL_TYPE_MASTER_SWORD:
if (CVarGetInteger(CVAR_COSMETIC("Trails.MasterSword.Changed"), 0)) {
color = CVarGetColor(CVAR_COSMETIC("Trails.MasterSword.Value"), (Color_RGBA8){ 255, 255, 255, 255 });
changed = 1;
Expand All @@ -265,7 +265,7 @@ s32 EffectBlure_Update(void* thisx) {
reset = 1;
}
break;
case 6:
case TRAIL_TYPE_BIGGORON_SWORD:
if (CVarGetInteger(CVAR_COSMETIC("Trails.BiggoronSword.Changed"), 0)) {
color = CVarGetColor(CVAR_COSMETIC("Trails.BiggoronSword.Value"), (Color_RGBA8){ 255, 255, 255, 255 });
changed = 1;
Expand All @@ -274,7 +274,7 @@ s32 EffectBlure_Update(void* thisx) {
reset = 1;
}
break;
case 7:
case TRAIL_TYPE_STICK:
if (CVarGetInteger(CVAR_COSMETIC("Trails.Stick.Changed"), 0)) {
color = CVarGetColor(CVAR_COSMETIC("Trails.Stick.Value"), (Color_RGBA8){ 255, 255, 255, 255 });
changed = 1;
Expand All @@ -283,7 +283,7 @@ s32 EffectBlure_Update(void* thisx) {
reset = 1;
}
break;
case 8:
case TRAIL_TYPE_HAMMER:
if (CVarGetInteger(CVAR_COSMETIC("Trails.Hammer.Changed"), 0)) {
color = CVarGetColor(CVAR_COSMETIC("Trails.Hammer.Value"), (Color_RGBA8){ 255, 255, 255, 255 });
changed = 1;
Expand Down Expand Up @@ -316,7 +316,7 @@ s32 EffectBlure_Update(void* thisx) {
}

// Don't override boomerang and bombchu trail durations
if (this->trailType != 2 && this->trailType != 3) {
if (this->trailType != TRAIL_TYPE_BOOMERANG && this->trailType != TRAIL_TYPE_BOMBCHU) {
if (CVarGetInteger(CVAR_COSMETIC("Trails.Duration.Changed"), 0)) {
this->elemDuration = CVarGetInteger(CVAR_COSMETIC("Trails.Duration.Value"), 4);
}
Expand Down
4 changes: 2 additions & 2 deletions soh/src/code/z_player_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -1748,7 +1748,7 @@ f32 sMeleeWeaponLengths[] = {
};

f32 sSwordTypes[] = {
0, 5, 4, 6, 0, 8,
TRAIL_TYPE_REST, TRAIL_TYPE_MASTER_SWORD, TRAIL_TYPE_KOKIRI_SWORD, TRAIL_TYPE_BIGGORON_SWORD, TRAIL_TYPE_REST, TRAIL_TYPE_HAMMER,
};

Gfx* sBottleDLists[] = { gLinkAdultBottleDL, gLinkChildBottleDL };
Expand Down Expand Up @@ -1821,7 +1821,7 @@ void Player_PostLimbDrawGameplay(PlayState* play, s32 limbIndex, Gfx** dList, Ve
D_80126080.x = this->unk_85C * 5000.0f;
func_80090A28(this, sp124);
if (this->meleeWeaponState != 0) {
EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), 7); // stick sword type
EffectBlure_ChangeType(Effect_GetByIndex(this->meleeWeaponEffectIndex), TRAIL_TYPE_STICK);
func_800906D4(play, this, sp124);
} else {
Math_Vec3f_Copy(&this->meleeWeaponInfo[0].tip, &sp124[0]);
Expand Down
8 changes: 4 additions & 4 deletions soh/src/overlays/actors/ovl_En_Arrow/z_en_arrow.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@ void EnArrow_SetupAction(EnArrow* this, EnArrowActionFunc actionFunc) {
void EnArrow_Init(Actor* thisx, PlayState* play) {
static EffectBlureInit2 blureNormal = {
0, 4, 0, { 0, 255, 200, 255 }, { 0, 255, 255, 255 }, { 0, 255, 200, 0 }, { 0, 255, 255, 0 }, 16,
0, 1, 0, { 255, 255, 170, 255 }, { 0, 150, 0, 0 }, 0,
0, 1, 0, { 255, 255, 170, 255 }, { 0, 150, 0, 0 }, TRAIL_TYPE_REST,
};
static EffectBlureInit2 blureFire = {
0, 4, 0, { 0, 255, 200, 255 }, { 0, 255, 255, 255 }, { 0, 255, 200, 0 }, { 0, 255, 255, 0 }, 16,
0, 1, 0, { 255, 200, 0, 255 }, { 255, 0, 0, 0 }, 0,
0, 1, 0, { 255, 200, 0, 255 }, { 255, 0, 0, 0 }, TRAIL_TYPE_REST,
};
static EffectBlureInit2 blureIce = {
0, 4, 0, { 0, 255, 200, 255 }, { 0, 255, 255, 255 }, { 0, 255, 200, 0 }, { 0, 255, 255, 0 }, 16,
0, 1, 0, { 170, 255, 255, 255 }, { 0, 100, 255, 0 }, 0,
0, 1, 0, { 170, 255, 255, 255 }, { 0, 100, 255, 0 }, TRAIL_TYPE_REST,
};
static EffectBlureInit2 blureLight = {
0, 4, 0, { 0, 255, 200, 255 }, { 0, 255, 255, 255 }, { 0, 255, 200, 0 }, { 0, 255, 255, 0 }, 16,
0, 1, 0, { 255, 255, 170, 255 }, { 255, 255, 0, 0 }, 0,
0, 1, 0, { 255, 255, 170, 255 }, { 255, 255, 0, 0 }, TRAIL_TYPE_REST,
};
static u32 dmgFlags[] = {
0x00000800, 0x00000020, 0x00000020, 0x00000800, 0x00001000,
Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Bom_Chu/z_en_bom_chu.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void EnBomChu_Init(Actor* thisx, PlayState* play) {
blureInit.elemDuration = 16;
blureInit.unkFlag = 0;
blureInit.calcMode = 0;
blureInit.trailType = 3;
blureInit.trailType = TRAIL_TYPE_BOMBCHU;

Effect_Add(play, &this->blure1Index, EFFECT_BLURE1, 0, 0, &blureInit);
Effect_Add(play, &this->blure2Index, EFFECT_BLURE1, 0, 0, &blureInit);
Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_En_Boom/z_en_boom.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ void EnBoom_Init(Actor* thisx, PlayState* play) {
blure.elemDuration = 8;
blure.unkFlag = 0;
blure.calcMode = 0;
blure.trailType = 2;
blure.trailType = TRAIL_TYPE_BOOMERANG;

Effect_Add(play, &this->effectIndex, EFFECT_BLURE1, 0, 0, &blure);

Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_player_actor/z_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -10697,7 +10697,7 @@ static InitChainEntry sInitChain[] = {

static EffectBlureInit2 blureSword = {
0, 8, 0, { 255, 255, 255, 255 }, { 255, 255, 255, 64 }, { 255, 255, 255, 0 }, { 255, 255, 255, 0 }, 4,
0, 2, 0, { 255, 255, 255, 255 }, { 255, 255, 255, 64 }, 1,
0, 2, 0, { 255, 255, 255, 255 }, { 255, 255, 255, 64 }, TRAIL_TYPE_SWORDS,
};

static Vec3s sSkeletonBaseTransl = { -57, 3377, 0 };
Expand Down

0 comments on commit 4335ea3

Please sign in to comment.