Rotation options for bombs and grottos (#3146)

Co-authored-by: Garrett Cox <garrettjcox@gmail.com>
This commit is contained in:
aMannus 2023-09-15 04:51:38 +02:00 committed by GitHub
parent 7dffd63c39
commit 8d3adb4c6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 18 additions and 5 deletions

View File

@ -878,8 +878,17 @@ void DrawEnhancementsMenu() {
if (ImGui::BeginMenu("Graphics"))
{
if (UIWidgets::PaddedEnhancementCheckbox("Use Alternate Assets", "gAltAssets", true, false)) {
ShouldClearTextureCacheAtEndOfFrame = true;
if (ImGui::BeginMenu("Mods")) {
if (UIWidgets::PaddedEnhancementCheckbox("Use Alternate Assets", "gAltAssets", false, false)) {
ShouldClearTextureCacheAtEndOfFrame = true;
}
UIWidgets::Tooltip("Toggle between standard assets and alternate assets. Usually mods will indicate if this setting has to be used or not.");
UIWidgets::PaddedEnhancementCheckbox("Disable Bomb Billboarding", "gDisableBombBillboarding", true, false);
UIWidgets::Tooltip("Disables bombs always rotating to face the camera. To be used in conjunction with mods that want to replace bombs with 3D objects.");
UIWidgets::PaddedEnhancementCheckbox("Disable Grotto Fixed Rotation", "gDisableGrottoRotation", true, false);
UIWidgets::Tooltip("Disables grottos rotating with the camera. To be used in conjunction with mods that want to replace grottos with 3D objects.");
ImGui::EndMenu();
}
UIWidgets::PaddedEnhancementCheckbox("Disable LOD", "gDisableLOD", true, false);
UIWidgets::Tooltip("Turns off the Level of Detail setting, making models use their higher-poly variants at any distance");

View File

@ -180,8 +180,10 @@ void DoorAna_Update(Actor* thisx, PlayState* play) {
DoorAna* this = (DoorAna*)thisx;
this->actionFunc(this, play);
// changes the grottos facing angle based on camera angle
this->actor.shape.rot.y = Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x8000;
// Changes the grottos facing angle based on camera angle
if (!CVarGetInteger("gDisableGrottoRotation", 0)) {
this->actor.shape.rot.y = Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x8000;
}
}
void DoorAna_Draw(Actor* thisx, PlayState* play) {

View File

@ -397,7 +397,9 @@ void EnBom_Draw(Actor* thisx, PlayState* play) {
if (thisx->params == BOMB_BODY) {
Gfx_SetupDL_25Opa(play->state.gfxCtx);
Matrix_ReplaceRotation(&play->billboardMtxF);
if (!CVarGetInteger("gDisableBombBillboarding", 0)) {
Matrix_ReplaceRotation(&play->billboardMtxF);
}
func_8002EBCC(thisx, play, 0);
gSPMatrix(POLY_OPA_DISP++, MATRIX_NEWMTX(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);