diff options
| author | earthcrafterman <banddstudios@gmail.com> | 2022-07-04 10:42:43 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-04 10:42:43 -0400 |
| commit | 818d5f90a8ebceda24361026790bdd8a8416b008 (patch) | |
| tree | 1db1d919a3d42ac282a406dae1e64548607d04fb /soh/src/code | |
| parent | d63c0077eea864f7fa004a2e61ba02108f6ea23c (diff) | |
Add toggles for disabling heart drops and random drops (#507)
* Adds toggles for disabling random drops and fixed heart drops
* Changed the "No Fixed Heart Drops" toggle to the more useful "No Random Heart Drops" toggle
* Adds an explanation that the no heart drops option is similar to Hero Mode
* Moved difficulty options into their own sub-menu
Moved time saver options into their own sub-menu
Moved clutter reducing options into their own sub-menu
* fixed the tag name of mweep speed
* Moved Skip Text to Experimental
Diffstat (limited to 'soh/src/code')
| -rw-r--r-- | soh/src/code/z_en_item00.c | 12 | ||||
| -rw-r--r-- | soh/src/code/z_message_PAL.c | 2 |
2 files changed, 10 insertions, 4 deletions
diff --git a/soh/src/code/z_en_item00.c b/soh/src/code/z_en_item00.c index a7de67900..7aa2a282b 100644 --- a/soh/src/code/z_en_item00.c +++ b/soh/src/code/z_en_item00.c @@ -1377,6 +1377,8 @@ EnItem00* Item_DropCollectible(GlobalContext* globalCtx, Vec3f* spawnPos, s16 pa params &= 0x3FFF; + if ((params & 0x00FF) == ITEM00_HEART && CVar_GetS32("gNoHeartDrops", 0)) { return NULL; } + if (((params & 0x00FF) == ITEM00_FLEXIBLE) && !param4000) { // TODO: Prevent the cast to EnItem00 here since this is a different actor (En_Elf) spawnedActor = (EnItem00*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, spawnPos->x, @@ -1420,6 +1422,8 @@ EnItem00* Item_DropCollectible2(GlobalContext* globalCtx, Vec3f* spawnPos, s16 p params &= 0x3FFF; + if ((params & 0x00FF) == ITEM00_HEART && CVar_GetS32("gNoHeartDrops", 0)) { return NULL; } + if (((params & 0x00FF) == ITEM00_FLEXIBLE) && !param4000) { // TODO: Prevent the cast to EnItem00 here since this is a different actor (En_Elf) spawnedActor = (EnItem00*)Actor_Spawn(&globalCtx->actorCtx, globalCtx, ACTOR_EN_ELF, spawnPos->x, @@ -1455,6 +1459,8 @@ void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3 param8000 = params & 0x8000; params &= 0x7FFF; + if (CVar_GetS32("gNoRandomDrops", 0)) { return; } + if (fromActor != NULL) { if (fromActor->dropFlag) { if (fromActor->dropFlag & 0x01) { @@ -1496,11 +1502,11 @@ void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3 EffectSsDeadSound_SpawnStationary(globalCtx, spawnPos, NA_SE_EV_BUTTERFRY_TO_FAIRY, true, DEADSOUND_REPEAT_MODE_OFF, 40); return; - } else if (gSaveContext.health <= 0x30) { // 3 hearts or less + } else if (gSaveContext.health <= 0x30 && !CVar_GetS32("gNoHeartDrops", 0)) { // 3 hearts or less params = 0xB * 0x10; dropTableIndex = 0x0; dropId = ITEM00_HEART; - } else if (gSaveContext.health <= 0x50) { // 5 hearts or less + } else if (gSaveContext.health <= 0x50 && !CVar_GetS32("gNoHeartDrops", 0)) { // 5 hearts or less params = 0xA * 0x10; dropTableIndex = 0x0; dropId = ITEM00_HEART; @@ -1533,7 +1539,7 @@ void Item_DropCollectibleRandom(GlobalContext* globalCtx, Actor* fromActor, Vec3 } } - if (dropId != 0xFF) { + if (dropId != 0xFF && (!CVar_GetS32("gNoHeartDrops", 0) || dropId != ITEM00_HEART)) { dropQuantity = sDropQuantities[params + dropTableIndex]; while (dropQuantity > 0) { if (!param8000) { diff --git a/soh/src/code/z_message_PAL.c b/soh/src/code/z_message_PAL.c index a3492f967..952fda106 100644 --- a/soh/src/code/z_message_PAL.c +++ b/soh/src/code/z_message_PAL.c @@ -1134,7 +1134,7 @@ void Message_DrawText(GlobalContext* globalCtx, Gfx** gfxP) { } } if (msgCtx->textDelayTimer == 0) { - msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 1); + msgCtx->textDrawPos = i + CVar_GetS32("gTextSpeed", 2); msgCtx->textDelayTimer = msgCtx->textDelay; } else { msgCtx->textDelayTimer--; |
