summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorBaoulettes <perlouzerie@hotmail.fr>2022-07-22 01:33:39 +0200
committerKenix3 <kenixwhisperwind@gmail.com>2022-07-25 19:06:05 -0400
commit50bc5de2dac65ba62f6a295ccf2be7ea99d86529 (patch)
treeedfc1e53a26cedfba3a5a89cd69f45c43a26a1a1 /soh/src/code
parent4a15e113f7c2d40a6c93e8931cecdc2cd05c7940 (diff)
Cosmetics editor - Feature requested (#841)
* Precise positionning, reset margin and pos * Fix big hearts issues * add + and - to the editor * add const to the char* * Fix labels issues
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/z_en_item00.c15
-rw-r--r--soh/src/code/z_message_PAL.c12
-rw-r--r--soh/src/code/z_parameter.c3
3 files changed, 17 insertions, 13 deletions
diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c
index a2447ac4c..6ca5d81b5 100644
--- a/soh/src/code/z_en_item00.c
+++ b/soh/src/code/z_en_item00.c
@@ -1036,15 +1036,9 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
Matrix_Scale(mtxScale, mtxScale, mtxScale, MTXMODE_APPLY);
break;
} else {
- this->actor.home.rot.z = Rand_CenteredFloat(65535.0f);
- this->actor.shape.yOffset = 430.0f;
- this->actor.shape.shadowScale = 0.03f;
- Actor_SetScale(&this->actor, 0.02f);
- this->scale = 0.02f;
if (this->unk_15A < 0) {
if (this->unk_15A == -1) {
s8 bankIndex = Object_GetIndex(&globalCtx->objectCtx, OBJECT_GI_HEART);
-
if (Object_IsLoaded(&globalCtx->objectCtx, bankIndex)) {
this->actor.objBankIndex = bankIndex;
Actor_SetObjectDependency(globalCtx, &this->actor);
@@ -1057,7 +1051,16 @@ void EnItem00_Draw(Actor* thisx, GlobalContext* globalCtx) {
}
break;
}
+ //Big hearts workaround
+ this->actor.home.rot.z = Rand_CenteredFloat(65535.0f);
+ this->actor.shape.yOffset = 430.0f;
+ this->actor.shape.shadowScale = 6.0f;
+ Actor_SetScale(&this->actor, 0.02f);
+ this->scale = 0.02f;
+ EnItem00_DrawCollectible(this, globalCtx);
+ break;
}
+
case ITEM00_BOMBS_A:
if (CVar_GetS32("gNewDrops", 0)) {
Actor_SetScale(&this->actor, 0.2f);
diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c
index af6a149c9..e711e8abe 100644
--- a/soh/src/code/z_message_PAL.c
+++ b/soh/src/code/z_message_PAL.c
@@ -520,12 +520,12 @@ void Message_DrawTextboxIcon(GlobalContext* globalCtx, Gfx** p, s16 x, s16 y) {
sIconEnvColors[1][1] = 255;
sIconEnvColors[1][2] = 130;
} else if (CVar_GetS32("gHudColors", 1) == 2) {
- sIconPrimColors[0][0] = (CVar_GetS32("gCCABtnPrimR", 50)/255)*95;
- sIconPrimColors[0][1] = (CVar_GetS32("gCCABtnPrimG", 255)/255)*95;
- sIconPrimColors[0][2] = (CVar_GetS32("gCCABtnPrimB", 130)/255)*95;
- sIconPrimColors[1][0] = CVar_GetS32("gCCABtnPrimR", 50);
- sIconPrimColors[1][1] = CVar_GetS32("gCCABtnPrimG", 255);
- sIconPrimColors[1][2] = CVar_GetS32("gCCABtnPrimB", 130);
+ sIconPrimColors[0][0] = (CVar_GetS32("gCCABtnPrimR", 0)/255)*95;
+ sIconPrimColors[0][1] = (CVar_GetS32("gCCABtnPrimG", 200)/255)*95;
+ sIconPrimColors[0][2] = (CVar_GetS32("gCCABtnPrimB", 80)/255)*95;
+ sIconPrimColors[1][0] = CVar_GetS32("gCCABtnPrimR", 0);
+ sIconPrimColors[1][1] = CVar_GetS32("gCCABtnPrimG", 200);
+ sIconPrimColors[1][2] = CVar_GetS32("gCCABtnPrimB", 80);
sIconEnvColors[0][0] = 0;
sIconEnvColors[0][1] = 0;
sIconEnvColors[0][2] = 0;
diff --git a/soh/src/code/z_parameter.c b/soh/src/code/z_parameter.c
index 4c7443f9f..2a4921d7f 100644
--- a/soh/src/code/z_parameter.c
+++ b/soh/src/code/z_parameter.c
@@ -4798,10 +4798,11 @@ void Interface_Draw(GlobalContext* globalCtx) {
PosY_BtnA = CVar_GetS32("gABtnPosY", 0)+Y_Margins_BtnA;
rAIconY = 98.0f - PosY_BtnA;
if (CVar_GetS32("gABtnPosType", 0) == 1) {//Anchor Left
+ if (CVar_GetS32("gABtnUseMargins", 0) != 0) {X_Margins_BtnA = Left_HUD_Margin;};
PosX_BtnA = OTRGetDimensionFromLeftEdge(CVar_GetS32("gABtnPosX", 0)+X_Margins_BtnA);
rAIconX = OTRGetDimensionFromLeftEdge(CVar_GetS32("gABtnPosX", 0)+X_Margins_BtnA);
} else if (CVar_GetS32("gABtnPosType", 0) == 2) {//Anchor Right
- X_Margins_BtnA = Right_HUD_Margin;
+ if (CVar_GetS32("gABtnUseMargins", 0) != 0) {X_Margins_BtnA = Right_HUD_Margin;};
PosX_BtnA = OTRGetDimensionFromRightEdge(CVar_GetS32("gABtnPosX", 0)+X_Margins_BtnA);
rAIconX= OTRGetDimensionFromRightEdge(CVar_GetS32("gABtnPosX", 0)+X_Margins_BtnA);
} else if (CVar_GetS32("gABtnPosType", 0) == 3) {//Anchor None