Shooting gallery difficulty options menu (#1354)

* Added difficulty settings menu for shooting gallery

* Reverted linux assert fix for PR

* Added difficulty option to not randomize rupee order as adult

* Changed checkbox wording due to text overflow

* Reverted incorrect change from merge

* Update soh/src/overlays/actors/ovl_En_Syateki_Man/z_en_syateki_man.c

Co-authored-by: Garrett Cox <garrettjcox@gmail.com>

* Added Checkbox to turn on and off all customizations in shooting gallery behavior

* Added disable-switch for sliders, shooting gallery difficulty options are now disabled when customize behavior is turned off instead of hidden

Co-authored-by: Ralphie Morell <rafael.morell@techfield.us>
Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
This commit is contained in:
Oliver Schall 2022-11-19 00:55:22 +01:00 committed by GitHub
commit 82fff6486c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 97 additions and 11 deletions

View file

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

View file

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