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
This commit is contained in:
earthcrafterman 2022-07-04 10:42:43 -04:00 committed by GitHub
parent d63c0077ee
commit 818d5f90a8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 82 additions and 40 deletions

View file

@ -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) {

View file

@ -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--;