mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-24 14:51:46 -05:00
simplify pause menu link (#5013)
This commit is contained in:
parent
2400ad1d68
commit
8f3711f008
@ -153,8 +153,6 @@ const std::vector<const char*> enhancementsCvars = {
|
|||||||
CVAR_ENHANCEMENT("InstantScarecrow"),
|
CVAR_ENHANCEMENT("InstantScarecrow"),
|
||||||
CVAR_ENHANCEMENT("BlueFireArrows"),
|
CVAR_ENHANCEMENT("BlueFireArrows"),
|
||||||
CVAR_ENHANCEMENT("SunlightArrows"),
|
CVAR_ENHANCEMENT("SunlightArrows"),
|
||||||
CVAR_ENHANCEMENT("PauseLiveLinkRotation"),
|
|
||||||
CVAR_ENHANCEMENT("PauseLiveLink"),
|
|
||||||
CVAR_ENHANCEMENT("MinFrameCount"),
|
CVAR_ENHANCEMENT("MinFrameCount"),
|
||||||
CVAR_ENHANCEMENT("NewDrops"),
|
CVAR_ENHANCEMENT("NewDrops"),
|
||||||
CVAR_ENHANCEMENT("DisableBlackBars"),
|
CVAR_ENHANCEMENT("DisableBlackBars"),
|
||||||
@ -240,7 +238,6 @@ const std::vector<const char*> enhancementsCvars = {
|
|||||||
CVAR_ENHANCEMENT("SceneSpecificDirtPathFix"),
|
CVAR_ENHANCEMENT("SceneSpecificDirtPathFix"),
|
||||||
CVAR_Z_FIGHTING_MODE,
|
CVAR_Z_FIGHTING_MODE,
|
||||||
CVAR_ENHANCEMENT("AuthenticLogo"),
|
CVAR_ENHANCEMENT("AuthenticLogo"),
|
||||||
CVAR_ENHANCEMENT("PauseLiveLinkRotationSpeed"),
|
|
||||||
CVAR_ENHANCEMENT("BowReticle"),
|
CVAR_ENHANCEMENT("BowReticle"),
|
||||||
CVAR_ENHANCEMENT("BoomerangFirstPerson"),
|
CVAR_ENHANCEMENT("BoomerangFirstPerson"),
|
||||||
CVAR_ENHANCEMENT("BoomerangReticle"),
|
CVAR_ENHANCEMENT("BoomerangReticle"),
|
||||||
@ -617,9 +614,6 @@ const std::vector<PresetEntry> vanillaPlusPresetEntries = {
|
|||||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartPiece"), 1),
|
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartPiece"), 1),
|
||||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartContainer"), 1),
|
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartContainer"), 1),
|
||||||
|
|
||||||
// Pause link animation (0 to 16)
|
|
||||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("PauseLiveLink"), 1),
|
|
||||||
|
|
||||||
// Dynamic Wallet Icon
|
// Dynamic Wallet Icon
|
||||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DynamicWalletIcon"), 1),
|
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DynamicWalletIcon"), 1),
|
||||||
// Always show dungeon entrances
|
// Always show dungeon entrances
|
||||||
@ -692,9 +686,6 @@ const std::vector<PresetEntry> enhancedPresetEntries = {
|
|||||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartPiece"), 1),
|
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartPiece"), 1),
|
||||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartContainer"), 1),
|
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("InjectItemCounts.HeartContainer"), 1),
|
||||||
|
|
||||||
// Pause link animation (0 to 16)
|
|
||||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("PauseLiveLink"), 1),
|
|
||||||
|
|
||||||
// Dynamic Wallet Icon
|
// Dynamic Wallet Icon
|
||||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DynamicWalletIcon"), 1),
|
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("DynamicWalletIcon"), 1),
|
||||||
// Always show dungeon entrances
|
// Always show dungeon entrances
|
||||||
@ -951,8 +942,6 @@ const std::vector<PresetEntry> randomizerPresetEntries = {
|
|||||||
// Color Temple of Time's Medallions
|
// Color Temple of Time's Medallions
|
||||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ToTMedallionsColors"), 1),
|
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("ToTMedallionsColors"), 1),
|
||||||
|
|
||||||
// Pause link animation (0 to 16)
|
|
||||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("PauseLiveLink"), 16),
|
|
||||||
// Frames to wait
|
// Frames to wait
|
||||||
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MinFrameCount"), 200),
|
PRESET_ENTRY_S32(CVAR_ENHANCEMENT("MinFrameCount"), 200),
|
||||||
|
|
||||||
|
@ -1335,52 +1335,7 @@ void DrawEnhancementsMenu() {
|
|||||||
|
|
||||||
UIWidgets::Spacer(0);
|
UIWidgets::Spacer(0);
|
||||||
|
|
||||||
if (ImGui::BeginMenu("Animated Link in Pause Menu")) {
|
UIWidgets::PaddedEnhancementCheckbox("Animated Link in Pause Menu", CVAR_ENHANCEMENT("PauseMenuAnimatedLink"), false, false);
|
||||||
ImGui::Text("Rotation");
|
|
||||||
UIWidgets::EnhancementRadioButton("Disabled", CVAR_ENHANCEMENT("PauseLiveLinkRotation"), 0);
|
|
||||||
UIWidgets::EnhancementRadioButton("Rotate Link with D-pad", CVAR_ENHANCEMENT("PauseLiveLinkRotation"), 1);
|
|
||||||
UIWidgets::Tooltip("Allow you to rotate Link on the Equipment menu with the D-pad\nUse D-pad Up or D-pad Down to reset Link's rotation");
|
|
||||||
UIWidgets::EnhancementRadioButton("Rotate Link with C-buttons", CVAR_ENHANCEMENT("PauseLiveLinkRotation"), 2);
|
|
||||||
UIWidgets::Tooltip("Allow you to rotate Link on the Equipment menu with the C-buttons\nUse C-Up or C-Down to reset Link's rotation");
|
|
||||||
UIWidgets::EnhancementRadioButton("Rotate Link with Right Stick", CVAR_ENHANCEMENT("PauseLiveLinkRotation"), 3);
|
|
||||||
UIWidgets::Tooltip("Allow you to rotate Link on the Equipment menu with the Right Stick\nYou can zoom in by pointing up and reset Link's rotation by pointing down");
|
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLinkRotation"), 0) != 0) {
|
|
||||||
UIWidgets::EnhancementSliderInt("Rotation Speed: %d", "##MinRotationSpeed", CVAR_ENHANCEMENT("PauseLiveLinkRotationSpeed"), 1, 20, "", 1);
|
|
||||||
}
|
|
||||||
UIWidgets::PaddedSeparator();
|
|
||||||
ImGui::Text("Static loop");
|
|
||||||
UIWidgets::EnhancementRadioButton("Disabled", CVAR_ENHANCEMENT("PauseLiveLink"), 0);
|
|
||||||
UIWidgets::EnhancementRadioButton("Idle (standing)", CVAR_ENHANCEMENT("PauseLiveLink"), 1);
|
|
||||||
UIWidgets::EnhancementRadioButton("Idle (look around)", CVAR_ENHANCEMENT("PauseLiveLink"), 2);
|
|
||||||
UIWidgets::EnhancementRadioButton("Idle (belt)", CVAR_ENHANCEMENT("PauseLiveLink"), 3);
|
|
||||||
UIWidgets::EnhancementRadioButton("Idle (shield)", CVAR_ENHANCEMENT("PauseLiveLink"), 4);
|
|
||||||
UIWidgets::EnhancementRadioButton("Idle (test sword)", CVAR_ENHANCEMENT("PauseLiveLink"), 5);
|
|
||||||
UIWidgets::EnhancementRadioButton("Idle (yawn)", CVAR_ENHANCEMENT("PauseLiveLink"), 6);
|
|
||||||
UIWidgets::EnhancementRadioButton("Battle Stance", CVAR_ENHANCEMENT("PauseLiveLink"), 7);
|
|
||||||
UIWidgets::EnhancementRadioButton("Walking (no shield)", CVAR_ENHANCEMENT("PauseLiveLink"), 8);
|
|
||||||
UIWidgets::EnhancementRadioButton("Walking (holding shield)", CVAR_ENHANCEMENT("PauseLiveLink"), 9);
|
|
||||||
UIWidgets::EnhancementRadioButton("Running (no shield)", CVAR_ENHANCEMENT("PauseLiveLink"), 10);
|
|
||||||
UIWidgets::EnhancementRadioButton("Running (holding shield)", CVAR_ENHANCEMENT("PauseLiveLink"), 11);
|
|
||||||
UIWidgets::EnhancementRadioButton("Hand on hip", CVAR_ENHANCEMENT("PauseLiveLink"), 12);
|
|
||||||
UIWidgets::EnhancementRadioButton("Spin attack charge", CVAR_ENHANCEMENT("PauseLiveLink"), 13);
|
|
||||||
UIWidgets::EnhancementRadioButton("Look at hand", CVAR_ENHANCEMENT("PauseLiveLink"), 14);
|
|
||||||
UIWidgets::PaddedSeparator();
|
|
||||||
ImGui::Text("Randomize");
|
|
||||||
UIWidgets::EnhancementRadioButton("Random", CVAR_ENHANCEMENT("PauseLiveLink"), 15);
|
|
||||||
UIWidgets::Tooltip("Randomize the animation played each time you open the menu");
|
|
||||||
UIWidgets::EnhancementRadioButton("Random cycle", CVAR_ENHANCEMENT("PauseLiveLink"), 16);
|
|
||||||
UIWidgets::Tooltip("Randomize the animation played on the menu after a certain time");
|
|
||||||
UIWidgets::EnhancementRadioButton("Random cycle (Idle)", CVAR_ENHANCEMENT("PauseLiveLink"), 17);
|
|
||||||
UIWidgets::Tooltip("Randomize the animation played on the menu after a certain time (Idle animations only)");
|
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLink"), 0) >= 16) {
|
|
||||||
UIWidgets::EnhancementSliderInt("Frame to wait: %d", "##MinFrameCount", CVAR_ENHANCEMENT("MinFrameCount"), 1, 1000, "", 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::EndMenu();
|
|
||||||
}
|
|
||||||
|
|
||||||
UIWidgets::Spacer(0);
|
|
||||||
|
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Disable LOD", CVAR_ENHANCEMENT("DisableLOD"), true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Disable LOD", CVAR_ENHANCEMENT("DisableLOD"), true, false);
|
||||||
UIWidgets::Tooltip(
|
UIWidgets::Tooltip(
|
||||||
"Turns off the Level of Detail setting, making models use their higher-poly variants at any distance");
|
"Turns off the Level of Detail setting, making models use their higher-poly variants at any distance");
|
||||||
|
@ -30,7 +30,6 @@ namespace SOH {
|
|||||||
{ MigrationAction::Rename, "gPrevTime", "gGeneral.PrevTime" },
|
{ MigrationAction::Rename, "gPrevTime", "gGeneral.PrevTime" },
|
||||||
{ MigrationAction::Rename, "gSwitchTimeline", "gGeneral.SwitchTimeline" },
|
{ MigrationAction::Rename, "gSwitchTimeline", "gGeneral.SwitchTimeline" },
|
||||||
{ MigrationAction::Rename, "gSpoilerLog", "gGeneral.SpoilerLog" },
|
{ MigrationAction::Rename, "gSpoilerLog", "gGeneral.SpoilerLog" },
|
||||||
{ MigrationAction::Rename, "gPauseTriforce", "gGeneral.PauseTriforce" },
|
|
||||||
{ MigrationAction::Rename, "gRestoreQPA", "gGeneral.RestoreQPA" },
|
{ MigrationAction::Rename, "gRestoreQPA", "gGeneral.RestoreQPA" },
|
||||||
{ MigrationAction::Rename, "gFixIceTrapWithBunnyHood", "gGeneral.FixIceTrapWithBunnyHood" },
|
{ MigrationAction::Rename, "gFixIceTrapWithBunnyHood", "gGeneral.FixIceTrapWithBunnyHood" },
|
||||||
{ MigrationAction::Rename, "gBetterDebugWarpScreenCurrentScene", "gGeneral.BetterDebugWarpScreenCurrentScene" },
|
{ MigrationAction::Rename, "gBetterDebugWarpScreenCurrentScene", "gGeneral.BetterDebugWarpScreenCurrentScene" },
|
||||||
@ -284,9 +283,6 @@ namespace SOH {
|
|||||||
{ MigrationAction::Rename, "gOcarinaGameRoundTwoNotes", "gEnhancements.OcarinaGameRoundTwoNotes" },
|
{ MigrationAction::Rename, "gOcarinaGameRoundTwoNotes", "gEnhancements.OcarinaGameRoundTwoNotes" },
|
||||||
{ MigrationAction::Rename, "gOcarinaGameStartingNotes", "gEnhancements.OcarinaGameStartingNotes" },
|
{ MigrationAction::Rename, "gOcarinaGameStartingNotes", "gEnhancements.OcarinaGameStartingNotes" },
|
||||||
{ MigrationAction::Rename, "gOcarinaUnlimitedFailTime", "gEnhancements.OcarinaUnlimitedFailTime" },
|
{ MigrationAction::Rename, "gOcarinaUnlimitedFailTime", "gEnhancements.OcarinaUnlimitedFailTime" },
|
||||||
{ MigrationAction::Rename, "gPauseLiveLink", "gEnhancements.PauseLiveLink" },
|
|
||||||
{ MigrationAction::Rename, "gPauseLiveLinkRotation", "gEnhancements.PauseLiveLinkRotation" },
|
|
||||||
{ MigrationAction::Rename, "gPauseLiveLinkRotationSpeed", "gEnhancements.PauseLiveLinkRotationSpeed" },
|
|
||||||
{ MigrationAction::Rename, "gPauseWarp", "gEnhancements.PauseWarp" },
|
{ MigrationAction::Rename, "gPauseWarp", "gEnhancements.PauseWarp" },
|
||||||
{ MigrationAction::Rename, "gPermanentHeartLoss", "gEnhancements.PermanentHeartLoss" },
|
{ MigrationAction::Rename, "gPermanentHeartLoss", "gEnhancements.PermanentHeartLoss" },
|
||||||
{ MigrationAction::Rename, "gQuickBongoKill", "gEnhancements.QuickBongoKill" },
|
{ MigrationAction::Rename, "gQuickBongoKill", "gEnhancements.QuickBongoKill" },
|
||||||
|
@ -27,9 +27,9 @@ void KaleidoSetup_Update(PlayState* play) {
|
|||||||
gSaveContext.unk_13EE = gSaveContext.unk_13EA;
|
gSaveContext.unk_13EE = gSaveContext.unk_13EA;
|
||||||
|
|
||||||
if (CHECK_BTN_ALL(input->cur.button, BTN_L))
|
if (CHECK_BTN_ALL(input->cur.button, BTN_L))
|
||||||
CVarSetInteger(CVAR_GENERAL("PauseTriforce"), 1);
|
CVarSetInteger(CVAR_GENERAL("PauseMenuAnimatedLinkTriforce"), 1);
|
||||||
else
|
else
|
||||||
CVarSetInteger(CVAR_GENERAL("PauseTriforce"), 0);
|
CVarSetInteger(CVAR_GENERAL("PauseMenuAnimatedLinkTriforce"), 0);
|
||||||
|
|
||||||
|
|
||||||
WREG(16) = -175;
|
WREG(16) = -175;
|
||||||
|
@ -2101,9 +2101,6 @@ s32 Player_OverrideLimbDrawPause(PlayState* play, s32 limbIndex, Gfx** dList, Ve
|
|||||||
type = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_SHEATH];
|
type = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_SHEATH];
|
||||||
if ((type == PLAYER_MODELTYPE_SHEATH_18) || (type == PLAYER_MODELTYPE_SHEATH_19)) {
|
if ((type == PLAYER_MODELTYPE_SHEATH_18) || (type == PLAYER_MODELTYPE_SHEATH_19)) {
|
||||||
dListOffset = playerSwordAndShield[1] * ptrSize;
|
dListOffset = playerSwordAndShield[1] * ptrSize;
|
||||||
} else if (type == PLAYER_MODELTYPE_SHEATH_16 && CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLink"), 0)) {
|
|
||||||
//if (playerSwordAndShield[0] == 1)
|
|
||||||
//dListOffset = 4;
|
|
||||||
}
|
}
|
||||||
} else if (limbIndex == PLAYER_LIMB_WAIST) {
|
} else if (limbIndex == PLAYER_LIMB_WAIST) {
|
||||||
type = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_WAIST];
|
type = gPlayerModelTypes[modelGroup][PLAYER_MODELGROUPENTRY_WAIST];
|
||||||
@ -2211,8 +2208,8 @@ void Player_DrawPauseImpl(PlayState* play, void* gameplayKeep, void* linkObject,
|
|||||||
playerSwordAndShield[0] = sword;
|
playerSwordAndShield[0] = sword;
|
||||||
playerSwordAndShield[1] = shield;
|
playerSwordAndShield[1] = shield;
|
||||||
|
|
||||||
Matrix_SetTranslateRotateYXZ(pos->x - ((CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLink"), 0) && LINK_AGE_IN_YEARS == YEARS_ADULT) ? 25 : 0),
|
Matrix_SetTranslateRotateYXZ(pos->x - ((CVarGetInteger(CVAR_ENHANCEMENT("PauseMenuAnimatedLink"), 0) && LINK_AGE_IN_YEARS == YEARS_ADULT) ? 25 : 0),
|
||||||
pos->y - (CVarGetInteger(CVAR_GENERAL("PauseTriforce"), 0) ? 16 : 0), pos->z, rot);
|
pos->y - (CVarGetInteger(CVAR_GENERAL("PauseMenuAnimatedLinkTriforce"), 0) ? 16 : 0), pos->z, rot);
|
||||||
Matrix_Scale(scale * (mirrorWorldActive ? -1 : 1), scale, scale, MTXMODE_APPLY);
|
Matrix_Scale(scale * (mirrorWorldActive ? -1 : 1), scale, scale, MTXMODE_APPLY);
|
||||||
|
|
||||||
gSPSegment(POLY_OPA_DISP++, 0x04, gameplayKeep);
|
gSPSegment(POLY_OPA_DISP++, 0x04, gameplayKeep);
|
||||||
@ -2231,7 +2228,7 @@ void Player_DrawPauseImpl(PlayState* play, void* gameplayKeep, void* linkObject,
|
|||||||
Player_DrawImpl(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, 0, tunic, boots, 0,
|
Player_DrawImpl(play, skelAnime->skeleton, skelAnime->jointTable, skelAnime->dListCount, 0, tunic, boots, 0,
|
||||||
Player_OverrideLimbDrawPause, NULL, &playerSwordAndShield);
|
Player_OverrideLimbDrawPause, NULL, &playerSwordAndShield);
|
||||||
|
|
||||||
if (CVarGetInteger(CVAR_GENERAL("PauseTriforce"), 0)) {
|
if (CVarGetInteger(CVAR_GENERAL("PauseMenuAnimatedLinkTriforce"), 0)) {
|
||||||
|
|
||||||
Matrix_SetTranslateRotateYXZ(pos->x - (LINK_AGE_IN_YEARS == YEARS_ADULT ? 25 : 0),
|
Matrix_SetTranslateRotateYXZ(pos->x - (LINK_AGE_IN_YEARS == YEARS_ADULT ? 25 : 0),
|
||||||
pos->y + 280 + (LINK_AGE_IN_YEARS == YEARS_ADULT ? 48 : 0), pos->z, rot);
|
pos->y + 280 + (LINK_AGE_IN_YEARS == YEARS_ADULT ? 48 : 0), pos->z, rot);
|
||||||
@ -2255,11 +2252,6 @@ void Player_DrawPauseImpl(PlayState* play, void* gameplayKeep, void* linkObject,
|
|||||||
CLOSE_DISPS(play->state.gfxCtx);
|
CLOSE_DISPS(play->state.gfxCtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
uintptr_t SelectedAnim = 0; // Current Animaiton on the menu
|
|
||||||
s16 EquipedStance; // Link's current mode (Two handed, One handed...)
|
|
||||||
s16 FrameCountSinceLastAnim = 0; // Time since last animation
|
|
||||||
s16 MinFrameCount; // Frame to wait before checking if we need to change the animation
|
|
||||||
|
|
||||||
void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, f32 scale,
|
void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f* pos, Vec3s* rot, f32 scale,
|
||||||
s32 sword, s32 tunic, s32 shield, s32 boots) {
|
s32 sword, s32 tunic, s32 shield, s32 boots) {
|
||||||
Input* p1Input = &play->state.input[0];
|
Input* p1Input = &play->state.input[0];
|
||||||
@ -2269,35 +2261,19 @@ void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f*
|
|||||||
Vec3s* srcTable;
|
Vec3s* srcTable;
|
||||||
s32 i;
|
s32 i;
|
||||||
bool canswitchrnd = false;
|
bool canswitchrnd = false;
|
||||||
s16 SelectedMode = CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLink"), 0);
|
|
||||||
MinFrameCount = CVarGetInteger(CVAR_ENHANCEMENT("MinFrameCount"), 200);
|
|
||||||
|
|
||||||
gSegments[4] = VIRTUAL_TO_PHYSICAL(segment + 0x3800);
|
gSegments[4] = VIRTUAL_TO_PHYSICAL(segment + 0x3800);
|
||||||
gSegments[6] = VIRTUAL_TO_PHYSICAL(segment + 0x8800);
|
gSegments[6] = VIRTUAL_TO_PHYSICAL(segment + 0x8800);
|
||||||
|
|
||||||
uintptr_t* PauseMenuAnimSet[15][4] = {
|
uintptr_t* PauseMenuAnimSet[4] = {
|
||||||
{ 0, 0, 0, 0 }, // 0 = none
|
// IDLE // Two Handed // No shield // Kid Hylian Shield
|
||||||
// IDLE // Two Handed // No shield // Kid Hylian Shield
|
gPlayerAnim_link_normal_wait, gPlayerAnim_link_fighter_wait_long, gPlayerAnim_link_normal_wait_free, gPlayerAnim_link_normal_wait_free
|
||||||
{ gPlayerAnim_link_normal_wait, gPlayerAnim_link_fighter_wait_long, gPlayerAnim_link_normal_wait_free, gPlayerAnim_link_normal_wait_free }, // Idle
|
|
||||||
{ gPlayerAnim_link_normal_waitF_typeA_20f, gPlayerAnim_link_normal_waitF_typeA_20f, gPlayerAnim_link_normal_waitF_typeA_20f, gPlayerAnim_link_normal_waitF_typeA_20f }, // Idle look around
|
|
||||||
{ gPlayerAnim_link_waitF_itemA_20f, gPlayerAnim_link_waitF_itemA_20f, gPlayerAnim_link_waitF_itemA_20f, gPlayerAnim_link_waitF_itemA_20f }, // Idle Belt
|
|
||||||
{ gPlayerAnim_link_wait_itemC_20f, gPlayerAnim_link_wait_itemC_20f, gPlayerAnim_link_wait_itemC_20f, gPlayerAnim_link_wait_itemC_20f }, // Idle shield adjust
|
|
||||||
{ gPlayerAnim_link_wait_itemD1_20f, gPlayerAnim_link_wait_itemD2_20f, gPlayerAnim_link_wait_itemD1_20f, gPlayerAnim_link_wait_itemD1_20f }, // Idle test sword
|
|
||||||
{ gPlayerAnim_link_waitF_typeD_20f, gPlayerAnim_link_waitF_typeD_20f, gPlayerAnim_link_waitF_typeD_20f, gPlayerAnim_link_waitF_typeD_20f }, // Idle yawn
|
|
||||||
{ gPlayerAnim_link_anchor_waitR, gPlayerAnim_link_fighter_waitR_long, gPlayerAnim_link_anchor_waitR, gPlayerAnim_link_anchor_waitR }, // Battle Stance
|
|
||||||
{ gPlayerAnim_link_normal_walk_free, gPlayerAnim_link_fighter_walk_long, gPlayerAnim_link_normal_walk_free, gPlayerAnim_link_normal_walk_free }, // Walking (No shield)
|
|
||||||
{ gPlayerAnim_link_normal_walk, gPlayerAnim_link_fighter_walk_long, gPlayerAnim_link_normal_walk, gPlayerAnim_link_normal_walk }, // Walking (Holding shield)
|
|
||||||
{ gPlayerAnim_link_normal_run, gPlayerAnim_link_fighter_run_long, gPlayerAnim_link_normal_run, gPlayerAnim_link_normal_run }, // Running (No shield)
|
|
||||||
{ gPlayerAnim_link_normal_run_free, gPlayerAnim_link_fighter_run_long, gPlayerAnim_link_normal_run_free, gPlayerAnim_link_normal_run_free }, // Running (Holding shield)
|
|
||||||
{ gPlayerAnim_link_normal_talk_free_wait, gPlayerAnim_link_normal_talk_free_wait, gPlayerAnim_link_normal_talk_free_wait, gPlayerAnim_link_normal_talk_free_wait }, // Hand on hip
|
|
||||||
{ gPlayerAnim_link_fighter_power_kiru_wait, gPlayerAnim_link_fighter_Lpower_kiru_wait, gPlayerAnim_link_fighter_power_kiru_wait, gPlayerAnim_link_fighter_power_kiru_wait }, // Spin Charge
|
|
||||||
{ gPlayerAnim_link_demo_look_hand_wait, gPlayerAnim_link_demo_look_hand_wait, gPlayerAnim_link_demo_look_hand_wait, gPlayerAnim_link_demo_look_hand_wait }, // Look at hand
|
|
||||||
};
|
};
|
||||||
s16 AnimArraySize = ARRAY_COUNT(PauseMenuAnimSet);
|
|
||||||
|
|
||||||
if (CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLink"), 0) || CVarGetInteger(CVAR_GENERAL("PauseTriforce"), 0)) {
|
if (CVarGetInteger(CVAR_ENHANCEMENT("PauseMenuAnimatedLink"), 0) || CVarGetInteger(CVAR_GENERAL("PauseMenuAnimatedLinkTriforce"), 0)) {
|
||||||
uintptr_t anim = 0; // Initialise anim
|
uintptr_t anim = 0; // Initialise anim
|
||||||
|
|
||||||
|
s16 EquipedStance;
|
||||||
if (CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) >= EQUIP_VALUE_SWORD_BIGGORON) {
|
if (CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) >= EQUIP_VALUE_SWORD_BIGGORON) {
|
||||||
EquipedStance = 1;
|
EquipedStance = 1;
|
||||||
} else if (CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) == EQUIP_VALUE_SWORD_NONE) {
|
} else if (CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) == EQUIP_VALUE_SWORD_NONE) {
|
||||||
@ -2308,159 +2284,17 @@ void Player_DrawPause(PlayState* play, u8* segment, SkelAnime* skelAnime, Vec3f*
|
|||||||
// Link is idle so revert to 0
|
// Link is idle so revert to 0
|
||||||
EquipedStance = 0;
|
EquipedStance = 0;
|
||||||
}
|
}
|
||||||
if (SelectedMode == 16) {
|
|
||||||
// Apply Random function
|
|
||||||
s16 SwitchAtFrame = 0;
|
|
||||||
s16 CurAnimDuration = 0;
|
|
||||||
if (FrameCountSinceLastAnim == 0) {
|
|
||||||
// When opening Kaleido this will be passed one time
|
|
||||||
SelectedAnim = rand() % (AnimArraySize - 0);
|
|
||||||
if (SelectedAnim == 0) {
|
|
||||||
// prevent loading 0 that would result to a crash.
|
|
||||||
SelectedAnim = 1;
|
|
||||||
}
|
|
||||||
} else if (FrameCountSinceLastAnim >= 1) {
|
|
||||||
SwitchAtFrame = Animation_GetLastFrame(PauseMenuAnimSet[SelectedAnim][EquipedStance]);
|
|
||||||
CurAnimDuration = Animation_GetLastFrame(PauseMenuAnimSet[SelectedAnim][EquipedStance]);
|
|
||||||
if (SwitchAtFrame < MinFrameCount) {
|
|
||||||
// Animation frame count is lower than minimal wait time then we wait for another round.
|
|
||||||
// This will be looped to always add current animation time if that still lower than minimum time
|
|
||||||
while (SwitchAtFrame < MinFrameCount) {
|
|
||||||
SwitchAtFrame = SwitchAtFrame + CurAnimDuration;
|
|
||||||
}
|
|
||||||
} else if (CurAnimDuration >= MinFrameCount) {
|
|
||||||
// Since we have more (or same) animation time than min duration we set the wait time to animation
|
|
||||||
// time.
|
|
||||||
SwitchAtFrame = CurAnimDuration;
|
|
||||||
}
|
|
||||||
if (FrameCountSinceLastAnim >= SwitchAtFrame) {
|
|
||||||
SelectedAnim = rand() % (AnimArraySize - 0);
|
|
||||||
if (SelectedAnim == 0) {
|
|
||||||
// prevent loading 0 that would result to a crash.
|
|
||||||
SelectedAnim = 1;
|
|
||||||
}
|
|
||||||
FrameCountSinceLastAnim = 1;
|
|
||||||
}
|
|
||||||
anim = PauseMenuAnimSet[SelectedAnim][EquipedStance];
|
|
||||||
}
|
|
||||||
FrameCountSinceLastAnim++;
|
|
||||||
} else if (SelectedMode == 17) {
|
|
||||||
// Apply Random function
|
|
||||||
s16 SwitchAtFrame = 0;
|
|
||||||
s16 CurAnimDuration = 0;
|
|
||||||
s16 LastAnim;
|
|
||||||
if (FrameCountSinceLastAnim == 0) {
|
|
||||||
// When opening Kaleido this will be passed one time
|
|
||||||
SelectedAnim = (rand() % (6 - 1 + 1)) + 1;
|
|
||||||
if (SelectedAnim == 0) {
|
|
||||||
// prevent loading 0 that would result to a crash.
|
|
||||||
SelectedAnim = 1;
|
|
||||||
}
|
|
||||||
} else if (FrameCountSinceLastAnim >= 1) {
|
|
||||||
SwitchAtFrame = Animation_GetLastFrame(PauseMenuAnimSet[SelectedAnim][EquipedStance]);
|
|
||||||
CurAnimDuration = Animation_GetLastFrame(PauseMenuAnimSet[SelectedAnim][EquipedStance]);
|
|
||||||
if (SwitchAtFrame < MinFrameCount) {
|
|
||||||
// Animation frame count is lower than minimal wait time then we wait for another round.
|
|
||||||
// This will be looped to always add current animation time if that still lower than minimum time
|
|
||||||
while (SwitchAtFrame < MinFrameCount) {
|
|
||||||
SwitchAtFrame = SwitchAtFrame + CurAnimDuration;
|
|
||||||
}
|
|
||||||
} else if (CurAnimDuration >= MinFrameCount) {
|
|
||||||
// Since we have more (or same) animation time than min duration we set the wait time to animation
|
|
||||||
// time.
|
|
||||||
SwitchAtFrame = CurAnimDuration;
|
|
||||||
}
|
|
||||||
if (FrameCountSinceLastAnim >= SwitchAtFrame) {
|
|
||||||
LastAnim = SelectedAnim;
|
|
||||||
if (LastAnim==1) {
|
|
||||||
if ((CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) != EQUIP_VALUE_SWORD_NONE) && (CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) != EQUIP_VALUE_SHIELD_NONE)) { // if the player has a sword and shield equipped
|
|
||||||
if ((LINK_AGE_IN_YEARS == YEARS_ADULT) || (CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) == EQUIP_VALUE_SHIELD_DEKU)) { // if he's an adult or a kid with the deku shield
|
|
||||||
SelectedAnim = (rand() % (6 - 2 + 1)) + 2; // select any 5 animations that aren't the default standing anim
|
|
||||||
} else { //else if he's a child with a shield that isn't the deku shield
|
|
||||||
s16 randval = (rand() % (5 - 2 + 1)) + 2; // 4 animations
|
|
||||||
if (randval==4) { //if its the shield anim
|
|
||||||
SelectedAnim==6; // set to yawn anim
|
|
||||||
} else {
|
|
||||||
SelectedAnim=randval;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if ((CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) != EQUIP_VALUE_SWORD_NONE) && (CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) == EQUIP_VALUE_SHIELD_NONE)) { // if the player has a sword equipped but no shield
|
|
||||||
s16 randval = (rand() % (5 - 2 + 1)) + 2; // 4 animations
|
|
||||||
if (randval==4) { //if its the shield anim
|
|
||||||
SelectedAnim==6; // set to yawn anim
|
|
||||||
} else {
|
|
||||||
SelectedAnim=randval;
|
|
||||||
}
|
|
||||||
} else if ((CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) == EQUIP_VALUE_SWORD_NONE) && (CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) != EQUIP_VALUE_SHIELD_NONE)) { //if the player has a shield equipped but no sword
|
|
||||||
if ((LINK_AGE_IN_YEARS == YEARS_ADULT) || (CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) == EQUIP_VALUE_SHIELD_DEKU)) {// if he's an adult or a kid with the deku shield
|
|
||||||
s16 randval = (rand() % (5 - 2 + 1)) + 2; // 4 animations
|
|
||||||
if (randval==5) { //if its the sword anim
|
|
||||||
SelectedAnim==6; // set to yawn anim
|
|
||||||
} else {
|
|
||||||
SelectedAnim=randval;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
s16 randval = (rand() % (4 - 2 + 1)) + 2; // 3 animations
|
|
||||||
if (randval==4) { //if its the shield anim
|
|
||||||
SelectedAnim==6; // set to yawn anim
|
|
||||||
} else {
|
|
||||||
SelectedAnim=randval;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if ((CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) == EQUIP_VALUE_SWORD_NONE) && (CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD) == EQUIP_VALUE_SHIELD_NONE)) { // if the player has no sword or shield equipped
|
|
||||||
s16 randval = (rand() % (4 - 2 + 1)) + 2; // 3 animations
|
|
||||||
if (randval==4) { //if its the shield anim
|
|
||||||
SelectedAnim==6; // set to yawn anim
|
|
||||||
} else {
|
|
||||||
SelectedAnim=randval;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
SelectedAnim = 1;
|
|
||||||
}
|
|
||||||
if (SelectedAnim == 0) {
|
|
||||||
// prevent loading 0 that would result to a crash. Also makes sure default idle is every other anim
|
|
||||||
SelectedAnim = 1;
|
|
||||||
}
|
|
||||||
FrameCountSinceLastAnim = 1;
|
|
||||||
}
|
|
||||||
anim = PauseMenuAnimSet[SelectedAnim][EquipedStance];
|
|
||||||
}
|
|
||||||
FrameCountSinceLastAnim++;
|
|
||||||
} else if (SelectedMode == 15) {
|
|
||||||
// When opening Kaleido this will be passed one time
|
|
||||||
if (FrameCountSinceLastAnim < 1) {
|
|
||||||
SelectedAnim = rand() % (AnimArraySize - 0);
|
|
||||||
FrameCountSinceLastAnim++;
|
|
||||||
if (SelectedAnim == 0) {
|
|
||||||
// prevent loading 0 that would result to a crash.
|
|
||||||
SelectedAnim = 1;
|
|
||||||
}
|
|
||||||
FrameCountSinceLastAnim = 1;
|
|
||||||
}
|
|
||||||
if (CHECK_BTN_ALL(p1Input->press.button, BTN_B) || CHECK_BTN_ALL(p1Input->press.button, BTN_START)) {
|
|
||||||
FrameCountSinceLastAnim = 0;
|
|
||||||
}
|
|
||||||
anim = PauseMenuAnimSet[SelectedAnim][EquipedStance];
|
|
||||||
} else if (SelectedMode < 16) {
|
|
||||||
// Not random so we place our CVar as SelectedAnim
|
|
||||||
SelectedAnim = SelectedMode;
|
|
||||||
anim = PauseMenuAnimSet[SelectedAnim][EquipedStance];
|
|
||||||
}
|
|
||||||
|
|
||||||
anim = PauseMenuAnimSet[SelectedAnim][EquipedStance];
|
if (!CVarGetInteger(CVAR_GENERAL("PauseMenuAnimatedLinkTriforce"), 0)) {
|
||||||
|
anim = PauseMenuAnimSet[EquipedStance];
|
||||||
//anim = gPlayerAnim_link_wait_itemD2_20f; // Use for biggoron sword?
|
} else {
|
||||||
|
|
||||||
if (CVarGetInteger(CVAR_GENERAL("PauseTriforce"), 0)) {
|
|
||||||
anim = gPlayerAnim_link_magic_kaze2;
|
anim = gPlayerAnim_link_magic_kaze2;
|
||||||
sword = 0;
|
sword = 0;
|
||||||
shield = 0;
|
shield = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (skelAnime->animation != anim) {
|
if (skelAnime->animation != anim) {
|
||||||
LinkAnimation_Change(play, skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(anim), ANIMMODE_LOOP,
|
LinkAnimation_Change(play, skelAnime, anim, 1.0f, 0.0f, Animation_GetLastFrame(anim), ANIMMODE_LOOP, -6.0f);
|
||||||
-6.0f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
LinkAnimation_Update(play, skelAnime);
|
LinkAnimation_Update(play, skelAnime);
|
||||||
|
@ -125,26 +125,18 @@ void KaleidoScope_DrawAButton(PlayState* play, Vtx* vtx, int16_t xTranslate, int
|
|||||||
CLOSE_DISPS(play->state.gfxCtx);
|
CLOSE_DISPS(play->state.gfxCtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vec3s link_kaleido_rot = { 0, 32300, 0 }; // Default rotation link face us.
|
|
||||||
|
|
||||||
void KaleidoScope_DrawPlayerWork(PlayState* play) {
|
void KaleidoScope_DrawPlayerWork(PlayState* play) {
|
||||||
PauseContext* pauseCtx = &play->pauseCtx;
|
PauseContext* pauseCtx = &play->pauseCtx;
|
||||||
Vec3f pos;
|
Vec3f pos;
|
||||||
//Vec3s rot; // Removed for not having it use din the function
|
Vec3s rot;
|
||||||
f32 scale;
|
f32 scale;
|
||||||
Input* input = &play->state.input[0];
|
|
||||||
s16 RotationSpeed = 150 * CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLinkRotationSpeed"), 0);
|
|
||||||
u8 AllowStickRotation = (CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLinkRotation"), 0) == 3) ? true : false;
|
|
||||||
u8 AllowCRotation = (CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLinkRotation"), 0) == 2) ? true : false;
|
|
||||||
u8 AllowDPadRotation = (CVarGetInteger(CVAR_ENHANCEMENT("PauseLiveLinkRotation"), 0) == 1) ? true : false;
|
|
||||||
|
|
||||||
|
|
||||||
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
|
if (LINK_AGE_IN_YEARS == YEARS_CHILD) {
|
||||||
pos.x = 2.0f;
|
pos.x = 2.0f;
|
||||||
pos.y = -130.0f;
|
pos.y = -130.0f;
|
||||||
pos.z = -150.0f;
|
pos.z = -150.0f;
|
||||||
scale = 0.046f;
|
scale = 0.046f;
|
||||||
} else if (CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) != EQUIP_VALUE_SWORD_MASTER && !CVarGetInteger(CVAR_GENERAL("PauseTriforce"), 0)) {
|
} else if (CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD) != EQUIP_VALUE_SWORD_MASTER && !CVarGetInteger(CVAR_GENERAL("PauseMenuAnimatedLinkTriforce"), 0)) {
|
||||||
pos.x = 25.0f;
|
pos.x = 25.0f;
|
||||||
pos.y = -228.0f;
|
pos.y = -228.0f;
|
||||||
pos.z = 60.0f;
|
pos.z = 60.0f;
|
||||||
@ -156,38 +148,10 @@ void KaleidoScope_DrawPlayerWork(PlayState* play) {
|
|||||||
scale = 0.047f;
|
scale = 0.047f;
|
||||||
}
|
}
|
||||||
|
|
||||||
link_kaleido_rot.x = link_kaleido_rot.z = 0;
|
|
||||||
|
|
||||||
if ((AllowDPadRotation && CHECK_BTN_ALL(input->cur.button, BTN_DLEFT)) || // rotate
|
|
||||||
(AllowCRotation && CHECK_BTN_ALL(input->cur.button, BTN_CLEFT))) {
|
|
||||||
link_kaleido_rot.y = link_kaleido_rot.y - RotationSpeed;
|
|
||||||
} else if ((AllowDPadRotation && CHECK_BTN_ALL(input->cur.button, BTN_DRIGHT)) ||
|
|
||||||
(AllowCRotation && CHECK_BTN_ALL(input->cur.button, BTN_CRIGHT))) {
|
|
||||||
link_kaleido_rot.y = link_kaleido_rot.y + RotationSpeed;
|
|
||||||
} else if (AllowStickRotation && input->cur.right_stick_x * 10.0f != 0) {
|
|
||||||
link_kaleido_rot.y = link_kaleido_rot.y + (input->cur.right_stick_x * 10.0f * (((f32)RotationSpeed) / 600.0f));
|
|
||||||
}
|
|
||||||
|
|
||||||
if ((AllowDPadRotation && CHECK_BTN_ALL(input->press.button, BTN_DUP)) || // reset rotation
|
|
||||||
(AllowDPadRotation && CHECK_BTN_ALL(input->press.button, BTN_DDOWN))) {
|
|
||||||
link_kaleido_rot.y = 32300;
|
|
||||||
} else if ((AllowCRotation && CHECK_BTN_ALL(input->press.button, BTN_CUP)) ||
|
|
||||||
(AllowCRotation && CHECK_BTN_ALL(input->press.button, BTN_CDOWN))) {
|
|
||||||
link_kaleido_rot.y = 32300;
|
|
||||||
} else if (AllowStickRotation && input->cur.right_stick_y * 10.0f < -1200) {
|
|
||||||
link_kaleido_rot.y = 32300;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (AllowStickRotation && input->cur.right_stick_y * 10.0f > 0) { // Zoom in
|
|
||||||
scale = scale + input->cur.right_stick_y * 10.0f * .00005f;
|
|
||||||
pos.y = pos.y - input->cur.right_stick_y * 10.0f * 0.25f;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
link_kaleido_rot.x = 0;
|
|
||||||
|
|
||||||
gsSPSetFB(play->state.gfxCtx->polyOpa.p++, gPauseLinkFrameBuffer);
|
gsSPSetFB(play->state.gfxCtx->polyOpa.p++, gPauseLinkFrameBuffer);
|
||||||
Player_DrawPause(play, pauseCtx->playerSegment, &pauseCtx->playerSkelAnime, &pos, &link_kaleido_rot, scale,
|
rot.y = 32300;
|
||||||
|
rot.x = rot.z = 0;
|
||||||
|
Player_DrawPause(play, pauseCtx->playerSegment, &pauseCtx->playerSkelAnime, &pos, &rot, scale,
|
||||||
SWORD_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD)),
|
SWORD_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_SWORD)),
|
||||||
TUNIC_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC)),
|
TUNIC_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_TUNIC)),
|
||||||
SHIELD_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD)),
|
SHIELD_EQUIP_TO_PLAYER(CUR_EQUIP_VALUE(EQUIP_TYPE_SHIELD)),
|
||||||
|
@ -4550,7 +4550,7 @@ void KaleidoScope_Update(PlayState* play)
|
|||||||
R_UPDATE_RATE = 3;
|
R_UPDATE_RATE = 3;
|
||||||
R_PAUSE_MENU_MODE = 0;
|
R_PAUSE_MENU_MODE = 0;
|
||||||
|
|
||||||
CVarSetInteger(CVAR_GENERAL("PauseTriforce"), 0);
|
CVarSetInteger(CVAR_GENERAL("PauseMenuAnimatedLinkTriforce"), 0);
|
||||||
|
|
||||||
func_800981B8(&play->objectCtx);
|
func_800981B8(&play->objectCtx);
|
||||||
func_800418D0(&play->colCtx, play);
|
func_800418D0(&play->colCtx, play);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user