Skip to content

Commit

Permalink
CVar API change
Browse files Browse the repository at this point in the history
  • Loading branch information
lilDavid committed Jan 18, 2023
1 parent e9b7ed9 commit 93f0ab1
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions soh/src/code/z_map_exp.c
Original file line number Diff line number Diff line change
Expand Up @@ -722,10 +722,10 @@ void Minimap_Draw(PlayState* play) {

u16 minimapToggleBtn;
bool enableMapToggle;
if (CVar_GetS32("gMapOnDDown", 0)) {
if (CVarGetInteger("gMapOnDDown", 0)) {
minimapToggleBtn = BTN_DDOWN;
// If you can use an item with D down, disable toggling the minimap with it
enableMapToggle = !(CVar_GetS32("gDpadEquips", 0) && gSaveContext.equips.buttonItems[5] < 0xF0);
enableMapToggle = !(CVarGetInteger("gDpadEquips", 0) && gSaveContext.equips.buttonItems[5] < 0xF0);
} else {
minimapToggleBtn = BTN_L;
// If any of these CVars are enabled, disable toggling the minimap with L
Expand Down
4 changes: 2 additions & 2 deletions soh/src/code/z_parameter.c
Original file line number Diff line number Diff line change
Expand Up @@ -5395,7 +5395,7 @@ void Interface_Draw(PlayState* play) {
G_TX_RENDERTILE, 0, 0, (1 << 10), (1 << 10));
}

bool dpadEquips = CVar_GetS32("gDpadEquips", 0);
bool dpadEquips = CVarGetInteger("gDpadEquips", 0);

// DPad-Up Button Icon & Ammo Count
// Ocarina is perma-mapped to D-up, so that part has to be drawn
Expand All @@ -5411,7 +5411,7 @@ void Interface_Draw(PlayState* play) {

// DPad-Down Button Icon & Ammo Count
bool itemOnDpad = dpadEquips && gSaveContext.equips.buttonItems[5] < 0xF0;
bool dpadMap = fullUi && CVar_GetS32("gMapOnDDown", 0) &&
bool dpadMap = fullUi && CVarGetInteger("gMapOnDDown", 0) &&
play->pauseCtx.state < 4 &&
((play->sceneNum >= SCENE_YDAN && play->sceneNum <= SCENE_ICE_DOUKUTO) ||
(play->sceneNum >= SCENE_SPOT00 && play->sceneNum <= SCENE_GANON_TOU));
Expand Down
2 changes: 1 addition & 1 deletion soh/src/overlays/actors/ovl_player_actor/z_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -2086,7 +2086,7 @@ void func_80833DF8(Player* this, PlayState* play) {
for (int buttonIndex = 0; buttonIndex < 3; buttonIndex++) {
hasOnCBtn |= func_80833C98(C_BTN_ITEM(buttonIndex), bootsItemAction);
}
if (CVar_GetS32("gDpadEquips", 0)) {
if (CVarGetInteger("gDpadEquips", 0)) {
for (int buttonIndex = 1; buttonIndex < 4; buttonIndex++) {
hasOnDpad |= func_80833C98(DPAD_ITEM(buttonIndex), bootsItemAction);
}
Expand Down
4 changes: 2 additions & 2 deletions soh/src/overlays/misc/ovl_kaleido_scope/z_kaleido_item.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void KaleidoScope_ArrowSelect(PlayState* play, u16 cursorSlot) {
}

pauseCtx->cursorColorSet = 8;
bool dpad = CVar_GetS32("gDpadPause", 0);
bool dpad = CVarGetInteger("gDpadPause", 0);

// Select arrow with stick/d-pad
// Up = Fire
Expand Down Expand Up @@ -176,7 +176,7 @@ void KaleidoScope_ArrowSelect(PlayState* play, u16 cursorSlot) {
}

u16 sfxId;
if (newBow == ITEM_BOW || CVar_GetS32("gSkipArrowAnimation", 0)) {
if (newBow == ITEM_BOW || CVarGetInteger("gSkipArrowAnimation", 0)) {
sfxId = NA_SE_SY_DECIDE;
pauseCtx->equipTargetItem = newBow;
pauseCtx->equipAnimAlpha = 255;
Expand Down

0 comments on commit 93f0ab1

Please sign in to comment.