Browse Source

Fixed Shooting Gallery Difficulty Menu implementation issues (#1991)

pull/1972/merge
Oliver Schall 3 months ago committed by GitHub
parent
commit
8841e0b607
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 11
      soh/soh/GameMenuBar.cpp
  2. 4
      soh/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c
  3. 4
      soh/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c

11
soh/soh/GameMenuBar.cpp

@ -235,6 +235,17 @@ namespace GameMenuBar { @@ -235,6 +235,17 @@ namespace GameMenuBar {
// Fairy Revive Percent Restore
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
CVar_SetS32("gInstantFishing", 0);
// Guarantee Bite

4
soh/src/overlays/actors/ovl_En_Syateki_Itm/z_en_syateki_itm.c

@ -111,7 +111,7 @@ void EnSyatekiItm_Idle(EnSyatekiItm* this, PlayState* play) { @@ -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 =
0;
s32 ammunition = 15;
if(CVar_Get("gCustomizeShootingGallery", 0)) {
if(CVar_GetS32("gCustomizeShootingGallery", 0)) {
ammunition = CVar_GetS32(LINK_IS_ADULT ? "gAdultShootingGalleryAmmunition" : "gChildShootingGalleryAmmunition", 15);
}
func_8008EF44(play, ammunition);
@ -132,7 +132,7 @@ void EnSyatekiItm_StartRound(EnSyatekiItm* this, PlayState* play) { @@ -132,7 +132,7 @@ void EnSyatekiItm_StartRound(EnSyatekiItm* this, PlayState* play) {
Player* player = GET_PLAYER(play);
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++) {
if (this->roundFlags[i]) {
j++;

4
soh/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c

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

Loading…
Cancel
Save