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,9 +878,18 @@ void DrawEnhancementsMenu() {
if (ImGui::BeginMenu("Graphics")) if (ImGui::BeginMenu("Graphics"))
{ {
if (UIWidgets::PaddedEnhancementCheckbox("Use Alternate Assets", "gAltAssets", true, false)) { if (ImGui::BeginMenu("Mods")) {
if (UIWidgets::PaddedEnhancementCheckbox("Use Alternate Assets", "gAltAssets", false, false)) {
ShouldClearTextureCacheAtEndOfFrame = true; 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::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"); UIWidgets::Tooltip("Turns off the Level of Detail setting, making models use their higher-poly variants at any distance");
if (UIWidgets::PaddedEnhancementCheckbox("Disable Draw Distance", "gDisableDrawDistance", true, false)) { if (UIWidgets::PaddedEnhancementCheckbox("Disable Draw Distance", "gDisableDrawDistance", true, false)) {

View File

@ -180,9 +180,11 @@ void DoorAna_Update(Actor* thisx, PlayState* play) {
DoorAna* this = (DoorAna*)thisx; DoorAna* this = (DoorAna*)thisx;
this->actionFunc(this, play); this->actionFunc(this, play);
// changes the grottos facing angle based on camera angle // 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; this->actor.shape.rot.y = Camera_GetCamDirYaw(GET_ACTIVE_CAM(play)) + 0x8000;
} }
}
void DoorAna_Draw(Actor* thisx, PlayState* play) { void DoorAna_Draw(Actor* thisx, PlayState* play) {
OPEN_DISPS(play->state.gfxCtx); OPEN_DISPS(play->state.gfxCtx);

View File

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