Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cosmetics menu rework #589

Merged
merged 17 commits into from
Jul 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
233 changes: 17 additions & 216 deletions libultraship/libultraship/ImGuiImpl.cpp

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions soh/include/z64.h
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,11 @@ typedef struct {
/* 0x0A */ u8 durationTimer; // how long the title card appears for before fading
/* 0x0B */ u8 delayTimer; // how long the title card waits to appear
/* 0x0C */ s16 alpha;
/* 0x0E */ s16 intensity;
/* ---- */ s16 isBossCard; //To detect if that a Boss name title card.
/* ---- */ s16 hasTranslation; // to detect if the current title card has translation (used for bosses only)
/* ---- */ s16 intensityR; //Splited intensity per channel to support precise recolor
/* ---- */ s16 intensityG;
/* ---- */ s16 intensityB;
/* ---- */ s16 isBossCard; //To detect if that a Boss name title card.
/* ---- */ s16 hasTranslation; // to detect if the current title card has translation (used for bosses only)
} TitleCardContext; // size = 0x10

typedef struct {
Expand Down
2 changes: 2 additions & 0 deletions soh/soh.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,7 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="soh\Enhancements\cosmetics\CosmeticsEditor.cpp" />
<ClCompile Include="soh\Enhancements\debugger\actorViewer.cpp" />
<ClCompile Include="soh\frame_interpolation.cpp" />
<ClCompile Include="soh\Enhancements\bootcommands.c" />
Expand Down Expand Up @@ -887,6 +888,7 @@
<ClCompile Include="src\overlays\misc\ovl_map_mark_data\z_map_mark_data.c" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="soh\Enhancements\cosmetics\CosmeticsEditor.h" />
<ClInclude Include="soh\Enhancements\debugger\actorViewer.h" />
<ClInclude Include="soh\frame_interpolation.h" />
<ClInclude Include="include\alloca.h" />
Expand Down
6 changes: 6 additions & 0 deletions soh/soh.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -2208,6 +2208,9 @@
<ClCompile Include="soh\SaveManager.cpp">
<Filter>Source Files\soh</Filter>
</ClCompile>
<ClCompile Include="soh\Enhancements\cosmetics\CosmeticsEditor.cpp">
<Filter>Header Files\include</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\overlays\actors\ovl_kaleido_scope\z_kaleido_scope.h">
Expand Down Expand Up @@ -3782,6 +3785,9 @@
<ClInclude Include="soh\SaveManager.h">
<Filter>Source Files\soh</Filter>
</ClInclude>
<ClInclude Include="soh\Enhancements\cosmetics\CosmeticsEditor.h">
<Filter>Header Files\include</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<Image Include="SHIPOFHARKINIAN.ico" />
Expand Down
1,036 changes: 1,036 additions & 0 deletions soh/soh/Enhancements/cosmetics/CosmeticsEditor.cpp

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions soh/soh/Enhancements/cosmetics/CosmeticsEditor.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#pragma once

void InitCosmeticsEditor();//Init the menu itself
2 changes: 2 additions & 0 deletions soh/soh/OTRGlobals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#define DRWAV_IMPLEMENTATION
#include "Lib/dr_libs/wav.h"
#include "AudioPlayer.h"
#include "Enhancements/cosmetics/CosmeticsEditor.h"
#include "Enhancements/debugconsole.h"
#include "Enhancements/debugger/debugger.h"
#include "soh/frame_interpolation.h"
Expand Down Expand Up @@ -113,6 +114,7 @@ extern "C" void InitOTR() {
clearMtx = (uintptr_t)&gMtxClear;
OTRMessage_Init();
OTRAudio_Init();
InitCosmeticsEditor();
DebugConsole_Init();
Debug_Init();
OTRExtScanner();
Expand Down
60 changes: 51 additions & 9 deletions soh/src/code/z_actor.c
Original file line number Diff line number Diff line change
Expand Up @@ -780,7 +780,9 @@ void Flags_SetCollectible(GlobalContext* globalCtx, s32 flag) {
}

void func_8002CDE4(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
titleCtx->durationTimer = titleCtx->delayTimer = titleCtx->intensity = titleCtx->alpha = 0;
titleCtx->durationTimer = titleCtx->delayTimer = titleCtx->intensityR = titleCtx->alpha = 0;
titleCtx->durationTimer = titleCtx->delayTimer = titleCtx->intensityG = titleCtx->alpha = 0;
titleCtx->durationTimer = titleCtx->delayTimer = titleCtx->intensityB = titleCtx->alpha = 0;
}

void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s16 x, s16 y, u8 width,
Expand All @@ -803,7 +805,6 @@ void TitleCard_InitBossName(GlobalContext* globalCtx, TitleCardContext* titleCtx
void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCtx, void* texture, s32 x, s32 y,
s32 width, s32 height, s32 delay) {
SceneTableEntry* loadedScene = globalCtx->loadedScene;

// size_t size = loadedScene->titleFile.vromEnd - loadedScene->titleFile.vromStart;
switch (globalCtx->sceneNum) {
case SCENE_YDAN:
Expand Down Expand Up @@ -1021,13 +1022,32 @@ void TitleCard_InitPlaceName(GlobalContext* globalCtx, TitleCardContext* titleCt
}

void TitleCard_Update(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
s16* TitleCard_Colors[3] = {255,255,255};
if (titleCtx->isBossCard && CVar_GetS32("gHudColors", 1) == 2) {//Bosses cards.
TitleCard_Colors[0] = CVar_GetS32("gCCTC_B_U_PrimR", 255);
TitleCard_Colors[1] = CVar_GetS32("gCCTC_B_U_PrimG", 255);
TitleCard_Colors[2] = CVar_GetS32("gCCTC_B_U_PrimB", 255);
} else if (!titleCtx->isBossCard && CVar_GetS32("gHudColors", 1) == 2) {
TitleCard_Colors[0] = CVar_GetS32("gCCTC_OW_U_PrimR", 255);
TitleCard_Colors[1] = CVar_GetS32("gCCTC_OW_U_PrimG", 255);
TitleCard_Colors[2] = CVar_GetS32("gCCTC_OW_U_PrimB", 255);
} else {
TitleCard_Colors[0] = 255;
TitleCard_Colors[1] = 255;
TitleCard_Colors[2] = 255;
}

if (DECR(titleCtx->delayTimer) == 0) {
if (DECR(titleCtx->durationTimer) == 0) {
Math_StepToS(&titleCtx->alpha, 0, 30);
Math_StepToS(&titleCtx->intensity, 0, 70);
Math_StepToS(&titleCtx->intensityR, 0, 70);
Math_StepToS(&titleCtx->intensityG, 0, 70);
Math_StepToS(&titleCtx->intensityB, 0, 70);
} else {
Math_StepToS(&titleCtx->alpha, 255, 10);
Math_StepToS(&titleCtx->intensity, 255, 20);
Math_StepToS(&titleCtx->intensityR, TitleCard_Colors[0], 20);
Math_StepToS(&titleCtx->intensityG, TitleCard_Colors[1], 20);
Math_StepToS(&titleCtx->intensityB, TitleCard_Colors[2], 20);
}
}
}
Expand All @@ -1047,8 +1067,30 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
if (titleCtx->alpha != 0) {
width = titleCtx->width;
height = titleCtx->height;
titleX = (titleCtx->x * 4) - (width * 2);
titleY = (titleCtx->y * 4) - (height * 2);
s16 TitleCard_PosX_Modifier = (titleCtx->isBossCard ? CVar_GetS32("gTCBPosX", 0) : CVar_GetS32("gTCMPosX", 0));
s16 TitleCard_PosY_Modifier = (titleCtx->isBossCard ? CVar_GetS32("gTCBPosY", 0) : CVar_GetS32("gTCMPosY", 0));
s16 TitleCard_PosType_Checker = (titleCtx->isBossCard ? CVar_GetS32("gTCBPosType", 0) : CVar_GetS32("gTCMPosType", 0));
s16 TitleCard_Margin_Checker = (titleCtx->isBossCard ? CVar_GetS32("gTCBUseMargins", 0) : CVar_GetS32("gTCMUseMargins", 0));
s16 TitleCard_MarginX = 0;
s16 TitleCard_PosX = titleCtx->x;
s16 TitleCard_PosY = titleCtx->y;
if (TitleCard_PosType_Checker != 0) {
TitleCard_PosY = TitleCard_PosY_Modifier;
if (TitleCard_PosType_Checker == 1) {//Anchor Left
if (TitleCard_Margin_Checker != 0) {TitleCard_MarginX = CVar_GetS32("gHUDMargin_L", 0)*-1;};
TitleCard_PosX = OTRGetDimensionFromLeftEdge(TitleCard_PosX_Modifier+TitleCard_MarginX)-11;
} else if (TitleCard_PosType_Checker == 2) {//Anchor Right
if (TitleCard_Margin_Checker != 0) {TitleCard_MarginX = CVar_GetS32("gHUDMargin_R", 0);};
TitleCard_PosX = OTRGetDimensionFromRightEdge(TitleCard_PosX_Modifier+TitleCard_MarginX);
} else if (TitleCard_PosType_Checker == 3) {//Anchor None
TitleCard_PosX = TitleCard_PosX_Modifier;
} else if (TitleCard_PosType_Checker == 4) {//Hidden
TitleCard_PosX = -9999;
}
}

titleX = (TitleCard_PosX * 4) - (width * 2);
titleY = (TitleCard_PosY * 4) - (height * 2);
doubleWidth = width * 2;

OPEN_DISPS(globalCtx->state.gfxCtx);
Expand All @@ -1075,15 +1117,15 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
// WORLD_OVERLAY_DISP Goes over POLY_XLU_DISP but under POLY_KAL_DISP
WORLD_OVERLAY_DISP = func_80093808(WORLD_OVERLAY_DISP);

gDPSetPrimColor(WORLD_OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensity, (u8)titleCtx->intensity, (u8)titleCtx->intensity,
gDPSetPrimColor(WORLD_OVERLAY_DISP++, 0, 0, (u8)titleCtx->intensityR, (u8)titleCtx->intensityG, (u8)titleCtx->intensityB,
(u8)titleCtx->alpha);

gDPLoadTextureBlock(WORLD_OVERLAY_DISP++, (uintptr_t)titleCtx->texture + textureLanguageOffset + shiftTopY, G_IM_FMT_IA,
G_IM_SIZ_8b,
width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMASK,
G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
//Removing the -1 there remove the gap between top and bottom textures.
gSPTextureRectangle(WORLD_OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4),
gSPWideTextureRectangle(WORLD_OVERLAY_DISP++, titleX, titleY, ((doubleWidth * 2) + titleX) - 4, titleY + (height * 4),
G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);

height = titleCtx->height - height;
Expand All @@ -1095,7 +1137,7 @@ void TitleCard_Draw(GlobalContext* globalCtx, TitleCardContext* titleCtx) {
G_IM_SIZ_8b, width, height, 0, G_TX_NOMIRROR | G_TX_WRAP, G_TX_NOMIRROR | G_TX_WRAP,
G_TX_NOMASK, G_TX_NOMASK, G_TX_NOLOD, G_TX_NOLOD);
//Removing the -1 there remove the gap between top and bottom textures.
gSPTextureRectangle(WORLD_OVERLAY_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4,
gSPWideTextureRectangle(WORLD_OVERLAY_DISP++, titleX, titleSecondY, ((doubleWidth * 2) + titleX) - 4,
titleSecondY + (height * 4), G_TX_RENDERTILE, 0, 0, 1 << 10, 1 << 10);
}

Expand Down
29 changes: 29 additions & 0 deletions soh/src/code/z_eff_blure.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,10 @@ void EffectBlure_Destroy(void* thisx) {
s32 EffectBlure_Update(void* thisx) {
EffectBlure* this = (EffectBlure*)thisx;
s32 i;
s16 RedColor;
s16 GreenColor;
s16 BlueColor;
s16 TrailDuration;

if (this == NULL) {
return 0;
Expand All @@ -203,6 +207,31 @@ s32 EffectBlure_Update(void* thisx) {
return 0;
}

if (CVar_GetS32("gUseTrailsCol", 0) !=0) {
RedColor = CVar_GetS32("gTrailColR",255);
GreenColor = CVar_GetS32("gTrailColG",255);
BlueColor = CVar_GetS32("gTrailColB",255);
TrailDuration = 4.0f*CVar_GetS32("gTrailDurantion",1);
} else {
RedColor = 255;
GreenColor = 255;
BlueColor = 255;
TrailDuration=4.0f;
}
this->p1StartColor.r = RedColor;
this->p2StartColor.r = RedColor;
this->p1EndColor.r = RedColor;
this->p2EndColor.r = RedColor;
this->p1StartColor.g = GreenColor;
this->p2StartColor.g = GreenColor;
this->p1EndColor.g = GreenColor;
this->p2EndColor.g = GreenColor;
this->p1StartColor.b = BlueColor;
this->p2StartColor.b = BlueColor;
this->p1EndColor.b = BlueColor;
this->p2EndColor.b = BlueColor;
this->elemDuration = TrailDuration;

while (true) {
if (this->elements[0].state == 0) {
for (i = 0; i < 15; i++) {
Expand Down
116 changes: 79 additions & 37 deletions soh/src/code/z_lifemeter.c
Original file line number Diff line number Diff line change
Expand Up @@ -181,17 +181,10 @@ void HealthMeter_Update(GlobalContext* globalCtx) {
s16 gFactor;
s16 bFactor;

if (CVar_GetS32("gHUDMargins", 0) != 0) {
Top_LM_Margin = CVar_GetS32("gHUDMargin_T", 0);
Left_LM_Margin = CVar_GetS32("gHUDMargin_L", 0);
Right_LM_Margin = CVar_GetS32("gHUDMargin_R", 0);
Bottom_LM_Margin = CVar_GetS32("gHUDMargin_B", 0);
} else {
Top_LM_Margin = 0;
Left_LM_Margin = 0;
Right_LM_Margin = 0;
Bottom_LM_Margin = 0;
}
Top_LM_Margin = CVar_GetS32("gHUDMargin_T", 0);
Left_LM_Margin = CVar_GetS32("gHUDMargin_L", 0);
Right_LM_Margin = CVar_GetS32("gHUDMargin_R", 0);
Bottom_LM_Margin = CVar_GetS32("gHUDMargin_B", 0);

if (CVar_GetS32("gHudColors", 1) == 2) {
HeartInner[0] = CVar_GetS32("gCCHeartsPrimR", sHeartsPrimColors[0][0]);
Expand Down Expand Up @@ -274,21 +267,25 @@ void HealthMeter_Update(GlobalContext* globalCtx) {
sHeartsDDEnv[0][2] = HeartDDInner[2];

if (CVar_GetS32("gHudColors", 1) == 2) {
sHeartsDDPrim[2][0] = HeartInner[0];
sHeartsDDPrim[2][1] = HeartInner[1];
sHeartsDDPrim[2][2] = HeartInner[2];
sHeartsDDPrim[2][0] = CVar_GetS32("gCCDDHeartsPrimR", 255);
sHeartsDDPrim[2][1] = CVar_GetS32("gCCDDHeartsPrimG", 70);
sHeartsDDPrim[2][2] = CVar_GetS32("gCCDDHeartsPrimB", 50);

sHeartsDDPrim[1][0] = HeartDDOutline[0];
sHeartsDDPrim[1][1] = HeartDDOutline[1];
sHeartsDDPrim[1][2] = HeartDDOutline[2];

sHeartsDDEnv[1][0] = HeartDDInner[0];
sHeartsDDEnv[1][1] = HeartDDInner[1];
sHeartsDDEnv[1][2] = HeartDDInner[2];
sHeartsDDEnv[1][0] = CVar_GetS32("gCCDDHeartsPrimR", 255);
sHeartsDDEnv[1][1] = CVar_GetS32("gCCDDHeartsPrimG", 70);
sHeartsDDEnv[1][2] = CVar_GetS32("gCCDDHeartsPrimB", 50);

HeartDDInner[0] = HeartInner[0];
HeartDDInner[1] = HeartInner[1];
HeartDDInner[2] = HeartInner[2];
HeartDDInner[0] = CVar_GetS32("gCCDDHeartsPrimR", 255);
HeartDDInner[1] = CVar_GetS32("gCCDDHeartsPrimG", 70);
HeartDDInner[2] = CVar_GetS32("gCCDDHeartsPrimB", 50);

sHeartsDDEnv[0][0] = CVar_GetS32("gCCDDHeartsPrimR", 255);
sHeartsDDEnv[0][1] = CVar_GetS32("gCCDDHeartsPrimG", 70);
sHeartsDDEnv[0][2] = CVar_GetS32("gCCDDHeartsPrimB", 0);

rFactor = sHeartsDDPrimFactors[ddType][0] * ddFactor;
gFactor = sHeartsDDPrimFactors[ddType][1] * ddFactor;
Expand All @@ -305,18 +302,22 @@ void HealthMeter_Update(GlobalContext* globalCtx) {
sBeatingHeartsDDEnv[0] = (u8)(rFactor + HeartDDInner[0]) & 0xFF;
sBeatingHeartsDDEnv[1] = (u8)(gFactor + HeartDDInner[1]) & 0xFF;
sBeatingHeartsDDEnv[2] = (u8)(bFactor + HeartDDInner[2]) & 0xFF;
} else {
// sHeartsDDPrim[2][0] = HEARTS_PRIM_R;
// sHeartsDDPrim[2][1] = HEARTS_PRIM_G;
// sHeartsDDPrim[2][2] = HEARTS_PRIM_B;
} else {
sHeartsDDPrim[0][0] = HEARTS_DD_PRIM_R;
sHeartsDDPrim[0][1] = HEARTS_DD_PRIM_G;
sHeartsDDPrim[0][2] = HEARTS_DD_PRIM_B;

sHeartsDDPrim[1][0] = HEARTS_DD_PRIM_R;
sHeartsDDPrim[1][1] = HEARTS_DD_PRIM_G;
sHeartsDDPrim[1][2] = HEARTS_DD_PRIM_B;
sHeartsDDEnv[0][0] = HEARTS_DD_ENV_R;
sHeartsDDEnv[0][1] = HEARTS_DD_ENV_G;
sHeartsDDEnv[0][2] = HEARTS_DD_ENV_B;

sHeartsDDEnv[1][0] = HEARTS_PRIM_R;
sHeartsDDEnv[1][1] = HEARTS_PRIM_G;
sHeartsDDEnv[1][2] = HEARTS_PRIM_B;
sHeartsDDPrim[1][0] = sHeartsDDPrimColors[ddType][0];
sHeartsDDPrim[1][1] = sHeartsDDPrimColors[ddType][1];
sHeartsDDPrim[1][2] = sHeartsDDPrimColors[ddType][2];

sHeartsDDEnv[1][0] = sHeartsDDEnvColors[ddType][0];
sHeartsDDEnv[1][1] = sHeartsDDEnvColors[ddType][1];
sHeartsDDEnv[1][2] = sHeartsDDEnvColors[ddType][2];

rFactor = sHeartsDDPrimFactors[ddType][0] * ddFactor;
gFactor = sHeartsDDPrimFactors[ddType][1] * ddFactor;
Expand All @@ -330,9 +331,9 @@ void HealthMeter_Update(GlobalContext* globalCtx) {
gFactor = sHeartsDDEnvFactors[ddType][1] * ddFactor;
bFactor = sHeartsDDEnvFactors[ddType][2] * ddFactor;

sBeatingHeartsDDEnv[0] = (u8)(rFactor + HEARTS_PRIM_R) & 0xFF;
sBeatingHeartsDDEnv[1] = (u8)(gFactor + HEARTS_PRIM_G) & 0xFF;
sBeatingHeartsDDEnv[2] = (u8)(bFactor + HEARTS_PRIM_B) & 0xFF;
sBeatingHeartsDDEnv[0] = (u8)(rFactor + HEARTS_DD_ENV_R) & 0xFF;
sBeatingHeartsDDEnv[1] = (u8)(gFactor + HEARTS_DD_ENV_G) & 0xFF;
sBeatingHeartsDDEnv[2] = (u8)(bFactor + HEARTS_DD_ENV_B) & 0xFF;
}

}
Expand Down Expand Up @@ -419,8 +420,33 @@ void HealthMeter_Draw(GlobalContext* globalCtx) {
}

curColorSet = -1;
offsetY = 0.0f+(Top_LM_Margin*-1);
offsetX = OTRGetDimensionFromLeftEdge(0.0f)+(Left_LM_Margin*-1);
s16 X_Margins;
s16 Y_Margins;
if (CVar_GetS32("gHeartsUseMargins", 0) != 0) {
X_Margins = Left_LM_Margin;
Y_Margins = (Top_LM_Margin*-1);
} else {
X_Margins = 0;
Y_Margins = 0;
}
s16 PosX_original = OTRGetDimensionFromLeftEdge(0.0f)+X_Margins;
s16 PosY_original = 0.0f+Y_Margins;
if (CVar_GetS32("gHeartsCountPosType", 0) != 0) {
offsetY = CVar_GetS32("gHeartsPosY", 0)+Y_Margins;
if (CVar_GetS32("gHeartsCountPosType", 0) == 1) {//Anchor Left
offsetX = OTRGetDimensionFromLeftEdge(CVar_GetS32("gHeartsPosX", 0)+X_Margins);
} else if (CVar_GetS32("gHeartsCountPosType", 0) == 2) {//Anchor Right
X_Margins = Right_LM_Margin;
offsetX = OTRGetDimensionFromRightEdge(CVar_GetS32("gHeartsPosX", 0)+X_Margins);
} else if (CVar_GetS32("gHeartsCountPosType", 0) == 3) {//Anchor None
offsetX = CVar_GetS32("gHeartsPosX", 0);
} else if (CVar_GetS32("gHeartsCountPosType", 0) == 4) {//Hidden
offsetX = -9999;
}
} else {
offsetY = PosY_original;
offsetX = PosX_original;
}

for (i = 0; i < totalHeartCount; i++) {
if ((ddHeartCountMinusOne < 0) || (i > ddHeartCountMinusOne)) {
Expand Down Expand Up @@ -579,8 +605,24 @@ void HealthMeter_Draw(GlobalContext* globalCtx) {

offsetX += 10.0f;
if (i == 9) {
offsetY += 10.0f;
offsetX = OTRGetDimensionFromLeftEdge(0.0f)+(Left_LM_Margin*-1);
PosX_original = OTRGetDimensionFromLeftEdge(0.0f)+X_Margins;
PosY_original = 10.0f+Y_Margins;
if (CVar_GetS32("gHeartsCountPosType", 0) != 0) {
offsetY = CVar_GetS32("gHeartsPosY", 0)+Y_Margins+10.0f;
if (CVar_GetS32("gHeartsCountPosType", 0) == 1) {//Anchor Left
offsetX = OTRGetDimensionFromLeftEdge(CVar_GetS32("gHeartsPosX", 0)+X_Margins);
} else if (CVar_GetS32("gHeartsCountPosType", 0) == 2) {//Anchor Right
X_Margins = Right_LM_Margin;
offsetX = OTRGetDimensionFromRightEdge(CVar_GetS32("gHeartsPosX", 0)+X_Margins);
} else if (CVar_GetS32("gHeartsCountPosType", 0) == 3) {//Anchor None
offsetX = CVar_GetS32("gHeartsPosX", 0);
} else if (CVar_GetS32("gHeartsCountPosType", 0) == 4) {//Hidden
offsetX = -9999;
}
} else {
offsetY = PosY_original;
offsetX = PosX_original;
}
}
}

Expand Down
Loading