Skip to content

Commit

Permalink
Renamed HW>Hyrule Warriors/Changed rotate angles to hex
Browse files Browse the repository at this point in the history
  • Loading branch information
OtherBlue committed Jun 6, 2024
1 parent f9737f6 commit 6772e21
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
4 changes: 2 additions & 2 deletions mm/2s2h/BenGui/BenMenuBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "2s2h/Enhancements/Enhancements.h"
#include "2s2h/Enhancements/Graphics/MotionBlur.h"
#include "2s2h/Enhancements/Graphics/PlayAsKafei.h"
#include "2s2h/Enhancements/Graphics/HWStyledLink.h"
#include "2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.h"
#include "2s2h/Enhancements/Modes/TimeMovesWhenYouMove.h"
#include "2s2h/DeveloperTools/DeveloperTools.h"
#include "2s2h/DeveloperTools/WarpPoint.h"
Expand Down Expand Up @@ -594,7 +594,7 @@ void DrawEnhancementsMenu() {
if (UIWidgets::BeginMenu("Modes")) {
UIWidgets::CVarCheckbox("Play As Kafei", "gModes.PlayAsKafei",
{ .tooltip = "Requires scene reload to take effect." });
UIWidgets::CVarCheckbox("Hyrule Warriors Young Link", "gModes.HWStyledLink",
UIWidgets::CVarCheckbox("Hyrule Warriors Young Link", "gModes.HyruleWarriorsStyledLink",
{ .tooltip = "When acquired, places the Keaton and Fierce Deity masks on Link "
"similarly to how he wears them in Hyrule Warriors" });
if (UIWidgets::CVarCheckbox("Time Moves When You Move", "gModes.TimeMovesWhenYouMove")) {
Expand Down
2 changes: 1 addition & 1 deletion mm/2s2h/Enhancements/Enhancements.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ void InitEnhancements() {

// Graphics
RegisterDisableBlackBars();
RegisterHWStyledLink();
RegisterHyruleWarriorsStyledLink();

// Masks
RegisterFastTransformation();
Expand Down
2 changes: 1 addition & 1 deletion mm/2s2h/Enhancements/Enhancements.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "Saving/SavingEnhancements.h"
#include "Graphics/DisableBlackBars.h"
#include "Modes/TimeMovesWhenYouMove.h"
#include "Graphics/HWStyledLink.h"
#include "Graphics/HyruleWarriorsStyledLink.h"

enum AlwaysWinDoggyRaceOptions {
ALWAYS_WIN_DOGGY_RACE_OFF,
Expand Down
7 changes: 0 additions & 7 deletions mm/2s2h/Enhancements/Graphics/HWStyledLink.h

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "HWStyledLink.h"
#include "HyruleWarriorsStyledLink.h"
#include "libultraship/libultraship.h"
#include "2s2h/Enhancements/GameInteractor/GameInteractor.h"
#include "Enhancements/FrameInterpolation/FrameInterpolation.h"
Expand All @@ -18,15 +18,15 @@ void ResourceMgr_PatchGfxByName(const char* path, const char* patchName, int ind
void ResourceMgr_UnpatchGfxByName(const char* path, const char* patchName);
}

void UpdateHWStyledLink() {
void UpdateHyruleWarriorsStyledLink() {
GameInteractor::Instance->RegisterGameHookForID<GameInteractor::OnPlayerPostLimbDraw>(
PLAYER_LIMB_HEAD, [](Player* player, s32 limbIndex) {
if (CVarGetInteger("gModes.HWStyledLink", 0) && player->currentMask == PLAYER_MASK_NONE &&
if (CVarGetInteger("gModes.HyruleWarriorsStyledLink", 0) && player->currentMask == PLAYER_MASK_NONE &&
player->transformation == PLAYER_FORM_HUMAN && INV_CONTENT(ITEM_MASK_KEATON) == ITEM_MASK_KEATON) {
OPEN_DISPS(gPlayState->state.gfxCtx);
Matrix_Push();
Matrix_RotateYS(14563, MTXMODE_APPLY);
Matrix_RotateZS(-4854, MTXMODE_APPLY);
Matrix_RotateYS(0x38e3, MTXMODE_APPLY);
Matrix_RotateZS(-0x12F6, MTXMODE_APPLY);
Matrix_Translate(300.0f, -250.0f, 77.7f, MTXMODE_APPLY);
Matrix_Scale(0.648f, 0.648f, 0.648f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gPlayState->state.gfxCtx),
Expand All @@ -38,14 +38,14 @@ void UpdateHWStyledLink() {
});
GameInteractor::Instance->RegisterGameHookForID<GameInteractor::OnPlayerPostLimbDraw>(
PLAYER_LIMB_WAIST, [](Player* player, s32 limbIndex) {
if (CVarGetInteger("gModes.HWStyledLink", 0) && player->transformation == PLAYER_FORM_HUMAN &&
if (CVarGetInteger("gModes.HyruleWarriorsStyledLink", 0) && player->transformation == PLAYER_FORM_HUMAN &&
player->itemAction != PLAYER_IA_MASK_FIERCE_DEITY &&
INV_CONTENT(ITEM_MASK_FIERCE_DEITY) == ITEM_MASK_FIERCE_DEITY) {
OPEN_DISPS(gPlayState->state.gfxCtx);
Matrix_Push();
Matrix_RotateXS(-25000, MTXMODE_APPLY);
Matrix_RotateYS(-2000, MTXMODE_APPLY);
Matrix_RotateZS(-15000, MTXMODE_APPLY);
Matrix_RotateXS(-0x61A8, MTXMODE_APPLY);
Matrix_RotateYS(-0x7D0, MTXMODE_APPLY);
Matrix_RotateZS(-0x3A98, MTXMODE_APPLY);
Matrix_Translate(-85.0f, 658.0f, -165.0f, MTXMODE_APPLY);
Matrix_Scale(0.635f, 0.635f, 0.635f, MTXMODE_APPLY);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(gPlayState->state.gfxCtx),
Expand All @@ -57,9 +57,9 @@ void UpdateHWStyledLink() {
});
}

void RegisterHWStyledLink() {
UpdateHWStyledLink();
void RegisterHyruleWarriorsStyledLink() {
UpdateHyruleWarriorsStyledLink();

GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneInit>(
[](s8 sceneId, s8 spawnNum) { UpdateHWStyledLink(); });
[](s8 sceneId, s8 spawnNum) { UpdateHyruleWarriorsStyledLink(); });
}
7 changes: 7 additions & 0 deletions mm/2s2h/Enhancements/Graphics/HyruleWarriorsStyledLink.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#ifndef GRAPHICS_HYRULE_WARRIORS_STYLED_LINK
#define GRAPHICS_HYRULE_WARRIORS_STYLED_LINK

void RegisterHyruleWarriorsStyledLink();
void UpdateHyruleWarriorsStyledLink();

#endif // GRAPHICS_HYRULE_WARRIORS_STYLED_LINK

0 comments on commit 6772e21

Please sign in to comment.