mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-01 02:11:44 -04:00
Adds a new cheat that let you transform from the start of the game. (#1241)
* Adds a new cheat that let you transform from the start of the game. * Preserves transformation when passing loadzones similar to having shadow crystal * standards compliance * code compliance with decomp
This commit is contained in:
@@ -72,7 +72,7 @@ void daAlink_c::handleQuickTransform() {
|
||||
}
|
||||
|
||||
// Check to see if Link has the ability to transform.
|
||||
if (!dComIfGs_isEventBit(dSv_event_flag_c::M_077)) {
|
||||
if (!dComIfGs_isEventBit(dSv_event_flag_c::M_077) && !dusk::getSettings().game.transformWithoutShadowCrystal) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ void daAlink_c::handleQuickTransform() {
|
||||
}
|
||||
|
||||
// Ensure that the Z Button is not dimmed
|
||||
if (meterDrawPtr->getButtonZAlpha() != 1.f) {
|
||||
if (meterDrawPtr->getButtonZAlpha() != 1.f && !dusk::getSettings().game.transformWithoutShadowCrystal) {
|
||||
Z2GetAudioMgr()->seStart(Z2SE_SYS_ERROR, NULL, 0, 0, 1.0f, 1.0f, -1.0f, -1.0f, 0);
|
||||
return;
|
||||
}
|
||||
@@ -122,7 +122,7 @@ void daAlink_c::handleQuickTransform() {
|
||||
bool canTransform = false;
|
||||
|
||||
if (mLinkAcch.ChkGroundHit() && !checkModeFlg(MODE_PLAYER_FLY) && !checkMagneBootsOn()) {
|
||||
if (checkMidnaRide()) {
|
||||
if (checkMidnaRide() || dusk::getSettings().game.transformWithoutShadowCrystal) {
|
||||
if ((checkWolf() &&
|
||||
(checkModeFlg(MODE_UNK_1000) || dComIfGp_checkPlayerStatus0(0, 0x10))) ||
|
||||
(!checkWolf() &&
|
||||
|
||||
@@ -3106,14 +3106,18 @@ void daMidna_c::setMidnaNoDrawFlg() {
|
||||
|
||||
BOOL daMidna_c::checkMetamorphoseEnableBase() {
|
||||
BOOL tmp;
|
||||
if (!daAlink_getAlinkActorClass()->checkMidnaRide() || (g_env_light.mEvilInitialized & 0x80) ||
|
||||
/* dSv_event_flag_c::M_077 - Main Event - Get shadow crystal (can now transform) */
|
||||
!dComIfGs_isEventBit(0xD04) ||
|
||||
#if TARGET_PC
|
||||
(fopAcIt_Judge((fopAcIt_JudgeFunc)daMidna_searchNpc, &tmp) &&
|
||||
!dusk::getSettings().game.canTransformAnywhere)
|
||||
if (((!daAlink_getAlinkActorClass()->checkMidnaRide() || (g_env_light.mEvilInitialized & 0x80) ||
|
||||
/* dSv_event_flag_c::M_077 - Main Event - Get shadow crystal (can now transform) */
|
||||
!dComIfGs_isEventBit(0xD04)) &&
|
||||
!dusk::getSettings().game.transformWithoutShadowCrystal) ||
|
||||
(fopAcIt_Judge((fopAcIt_JudgeFunc)daMidna_searchNpc, &tmp) &&
|
||||
!dusk::getSettings().game.canTransformAnywhere)
|
||||
#else
|
||||
fopAcIt_Judge((fopAcIt_JudgeFunc)daMidna_searchNpc, &tmp)
|
||||
if (!daAlink_getAlinkActorClass()->checkMidnaRide() || (g_env_light.mEvilInitialized & 0x80) ||
|
||||
/* dSv_event_flag_c::M_077 - Main Event - Get shadow crystal (can now transform) */
|
||||
!dComIfGs_isEventBit(0xD04) ||
|
||||
fopAcIt_Judge((fopAcIt_JudgeFunc)daMidna_searchNpc, &tmp)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
|
||||
@@ -2843,7 +2843,11 @@ BOOL dComIfGs_Wolf_Change_Check() {
|
||||
BOOL is_wolf = false;
|
||||
|
||||
// Transforming Unlocked
|
||||
if (dComIfGs_isEventBit(0x0D04)) {
|
||||
if (dComIfGs_isEventBit(0x0D04)
|
||||
#if TARGET_PC
|
||||
|| dusk::getSettings().game.transformWithoutShadowCrystal
|
||||
#endif
|
||||
) {
|
||||
is_wolf = dComIfGs_getTransformStatus();
|
||||
} else if (dComIfGs_isTransformLV(0) && !dComIfGs_isDarkClearLV(0)) {
|
||||
is_wolf = true;
|
||||
|
||||
Reference in New Issue
Block a user