mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-05-27 23:45:55 -04:00
Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer
This commit is contained in:
@@ -62,6 +62,7 @@ struct UserSettings {
|
||||
ConfigVar<bool> enableFastIronBoots;
|
||||
ConfigVar<bool> canTransformAnywhere;
|
||||
ConfigVar<bool> fastSpinner;
|
||||
ConfigVar<bool> freeMagicArmor;
|
||||
|
||||
// Technical
|
||||
ConfigVar<bool> restoreWiiGlitches;
|
||||
|
||||
@@ -12677,7 +12677,11 @@ void daAlink_c::setMagicArmorBrk(int i_status) {
|
||||
}
|
||||
|
||||
BOOL daAlink_c::checkMagicArmorHeavy() const {
|
||||
#if TARGET_PC
|
||||
return checkMagicArmorWearAbility() && (dComIfGs_getRupee() == 0 && !dusk::getSettings().game.freeMagicArmor);
|
||||
#else
|
||||
return checkMagicArmorWearAbility() && dComIfGs_getRupee() == 0;
|
||||
#endif
|
||||
}
|
||||
|
||||
BOOL daAlink_c::checkBootsOrArmorHeavy() const {
|
||||
@@ -18583,7 +18587,13 @@ int daAlink_c::execute() {
|
||||
field_0x372c = cXyz::Zero;
|
||||
field_0x2fb8 = 0;
|
||||
|
||||
#if TARGET_PC
|
||||
// This handles rupee drain and transitions between rupees/no rupees
|
||||
// We can skip all of that if the magic armor doesn't use rupees
|
||||
if (!dusk::getSettings().game.freeMagicArmor && checkMagicArmorWearAbility() && mClothesChangeWaitTimer == 0) {
|
||||
#else
|
||||
if (checkMagicArmorWearAbility() && mClothesChangeWaitTimer == 0) {
|
||||
#endif
|
||||
if (checkMagicArmorNoDamage() && !checkEventRun()) {
|
||||
if (field_0x2fc3 == 0) {
|
||||
field_0x2fc3 = 10;
|
||||
|
||||
@@ -187,6 +187,11 @@ int daAlink_c::setDamagePoint(int i_dmgAmount, BOOL i_checkZoraMag, BOOL i_setDm
|
||||
}
|
||||
|
||||
if (checkMagicArmorNoDamage()) {
|
||||
#if TARGET_PC
|
||||
if(dusk::getSettings().game.freeMagicArmor) {
|
||||
i_dmgAmount = 0;
|
||||
}
|
||||
#endif
|
||||
dComIfGp_setItemRupeeCount(-i_dmgAmount * 10);
|
||||
} else
|
||||
#if DEBUG
|
||||
|
||||
@@ -313,7 +313,12 @@ void daAlink_c::changeLink(int param_0) {
|
||||
mpLinkHandModel =
|
||||
initModel(static_cast<J3DModelData*>(dComIfG_getObjectRes(l_mArcName, "al_hands.bmd")), 0);
|
||||
|
||||
if (dComIfGs_getRupee() != 0) {
|
||||
#if TARGET_PC
|
||||
if (dComIfGs_getRupee() != 0 || dusk::getSettings().game.freeMagicArmor)
|
||||
#else
|
||||
if (dComIfGs_getRupee() != 0)
|
||||
#endif
|
||||
{
|
||||
setMagicArmorBrk(1);
|
||||
} else {
|
||||
setMagicArmorBrk(0);
|
||||
@@ -398,7 +403,11 @@ void daAlink_c::changeLink(int param_0) {
|
||||
field_0x06ec = field_0x064C->getMaterialNodePointer(1)->getShape();
|
||||
field_0x06f0 = field_0x064C->getMaterialNodePointer(2)->getShape();
|
||||
|
||||
#if TARGET_PC
|
||||
if (dComIfGs_getRupee() != 0 || dusk::getSettings().game.freeMagicArmor) {
|
||||
#else
|
||||
if (dComIfGs_getRupee() != 0) {
|
||||
#endif
|
||||
var_r27 = 4;
|
||||
} else {
|
||||
var_r27 = 5;
|
||||
|
||||
@@ -300,11 +300,19 @@ int daGrdWater_c::Draw() {
|
||||
J3DTexMtxInfo* mtxInfo = &material->getTexGenBlock()->getTexMtx(0)->getTexMtxInfo();
|
||||
if (mtxInfo != NULL) {
|
||||
Mtx afStack_50;
|
||||
|
||||
#if TARGET_PC
|
||||
C_MTXLightPerspective(afStack_50, dComIfGd_getView()->fovy, dComIfGd_getView()->aspect,
|
||||
1.0f, 1.0f, dusk::getSettings().game.useWaterProjectionOffset ? -0.01f : 0.0f, 0.0f);
|
||||
#else
|
||||
C_MTXLightPerspective(afStack_50, dComIfGd_getView()->fovy, dComIfGd_getView()->aspect,
|
||||
1.0f, 1.0f, -0.01f, 0.0f);
|
||||
#endif
|
||||
|
||||
#if WIDESCREEN_SUPPORT
|
||||
mDoGph_gInf_c::setWideZoomLightProjection(afStack_50);
|
||||
#endif
|
||||
|
||||
mtxInfo->setEffectMtx(afStack_50);
|
||||
modelData2->simpleCalcMaterial(0, (MtxP)j3dDefaultMtx);
|
||||
}
|
||||
|
||||
@@ -371,8 +371,14 @@ int daLv3Water_c::Draw() {
|
||||
texMtxInfo = &material->getTexGenBlock()->getTexMtx(0)->getTexMtxInfo();
|
||||
if (texMtxInfo != NULL) {
|
||||
Mtx lightProjMtx;
|
||||
|
||||
#if TARGET_PC
|
||||
C_MTXLightPerspective(lightProjMtx, dComIfGd_getView()->fovy,
|
||||
dComIfGd_getView()->aspect, 1.0f, 1.0f, dusk::getSettings().game.useWaterProjectionOffset ? -0.01f : 0.0f, 0.0f);
|
||||
#else
|
||||
C_MTXLightPerspective(lightProjMtx, dComIfGd_getView()->fovy,
|
||||
dComIfGd_getView()->aspect, 1.0f, 1.0f, -0.01f, 0.0f);
|
||||
#endif
|
||||
|
||||
#if WIDESCREEN_SUPPORT
|
||||
mDoGph_gInf_c::setWideZoomLightProjection(lightProjMtx);
|
||||
|
||||
@@ -197,7 +197,13 @@ int daLv3Water2_c::Draw() {
|
||||
texMtxInfo = &btkMaterial->getTexGenBlock()->getTexMtx(0)->getTexMtxInfo();
|
||||
if(texMtxInfo) {
|
||||
Mtx lightProjMtx;
|
||||
|
||||
#if TARGET_PC
|
||||
C_MTXLightPerspective(lightProjMtx, dComIfGd_getView()->fovy,
|
||||
dComIfGd_getView()->aspect, 1.0f, 1.0f, dusk::getSettings().game.useWaterProjectionOffset ? -0.01f : 0.0f, 0);
|
||||
#else
|
||||
C_MTXLightPerspective(lightProjMtx, dComIfGd_getView()->fovy, dComIfGd_getView()->aspect, 1.0f, 1.0f, -0.01f, 0);
|
||||
#endif
|
||||
|
||||
#if WIDESCREEN_SUPPORT
|
||||
mDoGph_gInf_c::setWideZoomLightProjection(lightProjMtx);
|
||||
|
||||
@@ -27,8 +27,15 @@ static int daObj_Lv3waterB_Draw(obj_lv3WaterB_class* i_this) {
|
||||
J3DTexMtxInfo* tex_mtx_info = &material_p->getTexGenBlock()->getTexMtx(0)->getTexMtxInfo();
|
||||
if (tex_mtx_info != NULL) {
|
||||
Mtx m;
|
||||
|
||||
#if TARGET_PC
|
||||
C_MTXLightPerspective(m, dComIfGd_getView()->fovy, dComIfGd_getView()->aspect, 1.0f, 1.0f,
|
||||
dusk::getSettings().game.useWaterProjectionOffset ? -0.015f : 0.0f, 0.0f);
|
||||
#else
|
||||
C_MTXLightPerspective(m, dComIfGd_getView()->fovy, dComIfGd_getView()->aspect, 1.0f,
|
||||
1.0f, -0.015f, 0.0f);
|
||||
#endif
|
||||
|
||||
#if WIDESCREEN_SUPPORT
|
||||
mDoGph_gInf_c::setWideZoomLightProjection(m);
|
||||
#endif
|
||||
|
||||
@@ -313,8 +313,15 @@ int daObjRotStair_c::Draw() {
|
||||
J3DTexMtxInfo* texMtxInfo = &material->getTexGenBlock()->getTexMtx(0)->getTexMtxInfo();
|
||||
if (texMtxInfo != NULL) {
|
||||
Mtx lightMtx;
|
||||
|
||||
#if TARGET_PC
|
||||
C_MTXLightPerspective(lightMtx, dComIfGd_getView()->fovy,
|
||||
dComIfGd_getView()->aspect, 1.0f, 1.0f, dusk::getSettings().game.useWaterProjectionOffset ? -0.01f : 0.0f, 0);
|
||||
#else
|
||||
C_MTXLightPerspective(lightMtx, dComIfGd_getView()->fovy,
|
||||
dComIfGd_getView()->aspect, 1.0f, 1.0f, -0.01f, 0);
|
||||
#endif
|
||||
|
||||
#if WIDESCREEN_SUPPORT
|
||||
mDoGph_gInf_c::setWideZoomLightProjection(lightMtx);
|
||||
#endif
|
||||
|
||||
@@ -36,8 +36,15 @@ static int daObj_Tp_Draw(obj_tp_class* i_this) {
|
||||
&material->getTexGenBlock()->getTexMtx(0)->getTexMtxInfo();
|
||||
if (texMtxInfo != NULL) {
|
||||
Mtx lightProjMtx;
|
||||
|
||||
#if TARGET_PC
|
||||
C_MTXLightPerspective(lightProjMtx, dComIfGd_getView()->fovy,
|
||||
dComIfGd_getView()->aspect, 1.0f, 1.0f, dusk::getSettings().game.useWaterProjectionOffset ? -0.01f : 0.0f, 0);
|
||||
#else
|
||||
C_MTXLightPerspective(lightProjMtx, dComIfGd_getView()->fovy,
|
||||
dComIfGd_getView()->aspect, 1.0f, 1.0f, -0.01f, 0);
|
||||
#endif
|
||||
|
||||
#if WIDESCREEN_SUPPORT
|
||||
mDoGph_gInf_c::setWideZoomLightProjection(lightProjMtx);
|
||||
#endif
|
||||
|
||||
@@ -411,7 +411,7 @@ void dMsgScrnItem_c::drawSelf() {
|
||||
|
||||
f32 globalPosX = mpTm_c[0]->getGlobalPosX();
|
||||
|
||||
#if WIDESCREEN_SUPPORT
|
||||
#if WIDESCREEN_SUPPORT && !TARGET_PC
|
||||
if (mDoGph_gInf_c::isWide()) {
|
||||
drawOutFont(g_MsgObject_HIO_c.mBoxItemTextPosX + 7.0f + YREG_F(2),
|
||||
g_MsgObject_HIO_c.mBoxItemTextPosY, 1.0f);
|
||||
|
||||
@@ -111,6 +111,11 @@ namespace dusk {
|
||||
ImGui::SetTooltip("Speeds up Spinner movement when holding R.");
|
||||
}
|
||||
|
||||
config::ImGuiCheckbox("Free Magic Armor", getSettings().game.freeMagicArmor);
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Makes the magic armor work without rupees.");
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ UserSettings g_userSettings = {
|
||||
.enableFastIronBoots {"game.enableFastIronBoots", false},
|
||||
.canTransformAnywhere {"game.canTransformAnywhere", false},
|
||||
.fastSpinner {"game.fastSpinner", false},
|
||||
.freeMagicArmor {"game.freeMagicArmor", false},
|
||||
|
||||
// Technical
|
||||
.restoreWiiGlitches {"game.restoreWiiGlitches", false},
|
||||
@@ -95,6 +96,7 @@ void registerSettings() {
|
||||
Register(g_userSettings.game.useWaterProjectionOffset);
|
||||
Register(g_userSettings.game.enableFastIronBoots);
|
||||
Register(g_userSettings.game.canTransformAnywhere);
|
||||
Register(g_userSettings.game.freeMagicArmor);
|
||||
Register(g_userSettings.game.restoreWiiGlitches);
|
||||
Register(g_userSettings.game.noMissClimbing);
|
||||
Register(g_userSettings.game.noLowHpSound);
|
||||
|
||||
Reference in New Issue
Block a user