Fixed Shooting Gallery Difficulty Menu implementation issues (#1991)

This commit is contained in:
Oliver Schall 2022-11-22 00:53:23 +01:00 committed by GitHub
parent c44dec1e35
commit 8841e0b607
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 4 deletions

View File

@ -235,6 +235,17 @@ namespace GameMenuBar {
// Fairy Revive Percent Restore // Fairy Revive Percent Restore
CVar_SetS32("gFairyRevivePercentRestore", 0); CVar_SetS32("gFairyRevivePercentRestore", 0);
// Customize Shooting Gallery
CVar_SetS32("gCustomizeShootingGallery", 0);
// Shooting Gallery Instant Win
CVar_SetS32("gInstantShootingGalleryWin", 0);
// Constant Adult Shooting Gallery
CVar_SetS32("gConstantAdultGallery", 0);
// Child Starting Ammunition (10 to 30)
CVar_SetS32("gChildShootingGalleryAmmunition", 15);
// Adult Starting Ammunition (10 to 30)
CVar_SetS32("gAdultShootingGalleryAmmunition", 15);
// Instant Fishing // Instant Fishing
CVar_SetS32("gInstantFishing", 0); CVar_SetS32("gInstantFishing", 0);
// Guarantee Bite // Guarantee Bite

View File

@ -111,7 +111,7 @@ void EnSyatekiItm_Idle(EnSyatekiItm* this, PlayState* play) {
player->actor.world.rot.x = player->actor.shape.rot.x = player->actor.world.rot.z = player->actor.shape.rot.z = player->actor.world.rot.x = player->actor.shape.rot.x = player->actor.world.rot.z = player->actor.shape.rot.z =
0; 0;
s32 ammunition = 15; s32 ammunition = 15;
if(CVar_Get("gCustomizeShootingGallery", 0)) { if(CVar_GetS32("gCustomizeShootingGallery", 0)) {
ammunition = CVar_GetS32(LINK_IS_ADULT ? "gAdultShootingGalleryAmmunition" : "gChildShootingGalleryAmmunition", 15); ammunition = CVar_GetS32(LINK_IS_ADULT ? "gAdultShootingGalleryAmmunition" : "gChildShootingGalleryAmmunition", 15);
} }
func_8008EF44(play, ammunition); func_8008EF44(play, ammunition);
@ -132,7 +132,7 @@ void EnSyatekiItm_StartRound(EnSyatekiItm* this, PlayState* play) {
Player* player = GET_PLAYER(play); Player* player = GET_PLAYER(play);
if (this->unkTimer == 0) { if (this->unkTimer == 0) {
if (LINK_IS_ADULT && !(CVar_Get("gCustomizeShootingGallery", 0) && CVar_Get("gConstantAdultGallery", 0))) { if (LINK_IS_ADULT && !(CVar_GetS32("gCustomizeShootingGallery", 0) && CVar_GetS32("gConstantAdultGallery", 0))) {
for (i = 0, j = 0; i < SYATEKI_ROUND_MAX; i++) { for (i = 0, j = 0; i < SYATEKI_ROUND_MAX; i++) {
if (this->roundFlags[i]) { if (this->roundFlags[i]) {
j++; j++;

View File

@ -289,7 +289,7 @@ void EnSyatekiMan_StartGame(EnSyatekiMan* this, PlayState* play) {
Message_CloseTextbox(play); Message_CloseTextbox(play);
gallery = ((EnSyatekiItm*)this->actor.parent); gallery = ((EnSyatekiItm*)this->actor.parent);
if (gallery->actor.update != NULL) { if (gallery->actor.update != NULL) {
if(CVar_Get("gCustomizeShootingGallery", 0) && CVar_Get("gInstantShootingGalleryWin", 0)) { if(CVar_GetS32("gCustomizeShootingGallery", 0) && CVar_GetS32("gInstantShootingGalleryWin", 0)) {
gallery->hitCount = 10; gallery->hitCount = 10;
gallery->signal = ENSYATEKI_END; gallery->signal = ENSYATEKI_END;
} else { } else {
@ -401,7 +401,7 @@ void EnSyatekiMan_EndGame(EnSyatekiMan* this, PlayState* play) {
case SYATEKI_RESULT_ALMOST: case SYATEKI_RESULT_ALMOST:
this->timer = 20; this->timer = 20;
s32 ammunition = 15; s32 ammunition = 15;
if(CVar_Get("gCustomizeShootingGallery", 0)) { if(CVar_GetS32("gCustomizeShootingGallery", 0)) {
ammunition = CVar_GetS32(LINK_IS_ADULT ? "gAdultShootingGalleryAmmunition" : "gChildShootingGalleryAmmunition", 15); ammunition = CVar_GetS32(LINK_IS_ADULT ? "gAdultShootingGalleryAmmunition" : "gChildShootingGalleryAmmunition", 15);
} }
func_8008EF44(play, ammunition); func_8008EF44(play, ammunition);