Merge branch 'develop' into develop

This commit is contained in:
Thomas Achatz 2022-03-31 17:52:06 -05:00 committed by GitHub
commit 68cc6c528f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 147 additions and 107 deletions

View File

@ -55,7 +55,7 @@ Official Discord: https://discord.com/invite/BtBmd55HVH
2. Install [Visual Studio 2022 Community Edition](https://visualstudio.microsoft.com/vs/community/)
2b. In the Visual Studio Installer, install `MSVC v142 - VS 2019 C++`.
4. Clone the Ship of Harkinian repository.
5. Put your 2020 OoT debug rom in the `soh` folder.
5. Place `oot debug` rom (not Master Quest) in the `soh` folder named `baserom_original_non_mq`.
6. Launch `soh/fixbaserom.py`.
7. Launch `soh/extract_baserom.py`.
8. Copy the `baserom` folder from the `soh` folder into the `OTRExporter` folder.
@ -95,6 +95,7 @@ Official Discord: https://discord.com/invite/BtBmd55HVH
Rrrrry123 | Speedbunner, encouragement, and community moderation
Fierce deity | Encouragement and community moderation
mzxrules | For his contributions to decomp
zel. | For his contributions to decomp
Aloxado | Developer - General Programmer
MegaMech | Developer - General Programmer
Revo | Tester - GCC support and General Testing

View File

@ -61,6 +61,9 @@ namespace Game {
Settings.enhancements.dynamic_wallet_icon = stob(Conf[EnhancementSection]["dynamic_wallet_icon"]);
CVar_SetS32(const_cast<char*>("gDynamicWalletIcon"), Settings.enhancements.dynamic_wallet_icon);
Settings.enhancements.minimal_ui = stob(Conf[EnhancementSection]["minimal_ui"]);
CVar_SetS32(const_cast<char*>("gMinimalUI"), Settings.enhancements.minimal_ui);
// Audio
Settings.audio.master = Ship::stof(Conf[AudioSection]["master"]);
CVar_SetFloat(const_cast<char*>("gGameMasterVolume"), Settings.audio.master);
@ -143,7 +146,7 @@ namespace Game {
Conf[EnhancementSection]["disable_lod"] = std::to_string(Settings.enhancements.disable_lod);
Conf[EnhancementSection]["animated_pause_menu"] = std::to_string(Settings.enhancements.animated_pause_menu);
Conf[EnhancementSection]["dynamic_wallet_icon"] = std::to_string(Settings.enhancements.dynamic_wallet_icon);
Conf[EnhancementSection]["minimal_ui"] = std::to_string(Settings.enhancements.minimal_ui);
// Controllers
Conf[ControllerSection]["gyro_sensitivity"] = std::to_string(Settings.controller.gyro_sensitivity);

View File

@ -24,6 +24,7 @@ struct SoHConfigType {
bool disable_lod = false;
bool animated_pause_menu = false;
bool dynamic_wallet_icon = false;
bool minimal_ui = false;
} enhancements;
// Controller

View File

@ -673,7 +673,11 @@ static void gfx_opengl_resize_framebuffer(int fb, uint32_t width, uint32_t heigh
void gfx_opengl_set_framebuffer(int fb)
{
glClipControl(GL_UPPER_LEFT, GL_NEGATIVE_ONE_TO_ONE); // Set origin to upper left corner, to match N64 and DX11
if (GLEW_ARB_clip_control || GLEW_VERSION_4_5) {
// Set origin to upper left corner, to match N64 and DX11
// If this function is not supported, the texture will be upside down :(
glClipControl(GL_UPPER_LEFT, GL_NEGATIVE_ONE_TO_ONE);
}
glBindFramebuffer(GL_FRAMEBUFFER_EXT, fb);
glDepthMask(GL_TRUE);
@ -687,8 +691,10 @@ void gfx_opengl_reset_framebuffer(void)
glBindFramebuffer(GL_FRAMEBUFFER, 0);
glBindFramebuffer(GL_FRAMEBUFFER_EXT, framebuffer);
if (GLEW_ARB_clip_control || GLEW_VERSION_4_5) {
glClipControl(GL_LOWER_LEFT, GL_NEGATIVE_ONE_TO_ONE);
}
}
void gfx_opengl_select_texture_fb(int fbID)
{

View File

@ -341,6 +341,11 @@ namespace SohImGui {
needs_save = true;
}
if (ImGui::Checkbox("Minimal UI", &Game::Settings.enhancements.minimal_ui)) {
CVar_SetS32(const_cast<char*>("gMinimalUI"), Game::Settings.enhancements.minimal_ui);
needs_save = true;
}
ImGui::Text("Graphics");
ImGui::Separator();

View File

@ -24,6 +24,7 @@ void BootCommands_Init()
CVar_RegisterS32("gDisableLOD", 0);
CVar_RegisterS32("gDebugEnabled", 0);
CVar_RegisterS32("gPauseLiveLink", 0);
CVar_RegisterS32("gMinimalUI", 0);
}
//void BootCommands_ParseBootArgs(char* str)

View File

@ -462,7 +462,7 @@ void func_80111070(void) {
WREG(28) = 0;
R_OW_MINIMAP_X = 238;
R_OW_MINIMAP_Y = 164;
R_MINIMAP_DISABLED = false;
R_MINIMAP_DISABLED = CVar_GetS32("gMinimalUI", 0);
WREG(32) = 122;
WREG(33) = 60;
WREG(35) = 0;

View File

@ -3152,6 +3152,7 @@ void Interface_Draw(GlobalContext* globalCtx) {
s16 svar4;
s16 svar5;
s16 svar6;
bool fullUi = !CVar_GetS32("gMinimalUI", 0) || !R_MINIMAP_DISABLED || globalCtx->pauseCtx.state != 0;
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_parameter.c", 3405);
@ -3167,10 +3168,14 @@ void Interface_Draw(GlobalContext* globalCtx) {
if (pauseCtx->debugState == 0) {
Interface_InitVertices(globalCtx);
func_8008A994(interfaceCtx);
if (fullUi || gSaveContext.health != gSaveContext.healthCapacity) {
HealthMeter_Draw(globalCtx);
}
func_80094520(globalCtx->state.gfxCtx);
if (fullUi) {
// Rupee Icon
s16 *rColor;
if (CVar_GetS32("gDynamicWalletIcon", 0)) {
@ -3277,8 +3282,17 @@ void Interface_Draw(GlobalContext* globalCtx) {
Gfx_TextureI8(OVERLAY_DISP, ((u8*)digitTextures[interfaceCtx->counterDigits[svar2]]), 8, 16,
OTRGetRectDimensionFromLeftEdge(svar3), 206, 8, 16, 1 << 10, 1 << 10);
}
}
else {
// Make sure item counts have black backgrounds
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 0, 0, 0, interfaceCtx->magicAlpha);
gDPSetEnvColor(OVERLAY_DISP++, 0, 0, 0, 0);
}
if (fullUi || gSaveContext.unk_13F0 > 0) {
Interface_DrawMagicBar(globalCtx);
}
Minimap_Draw(globalCtx);
if ((R_PAUSE_MENU_MODE != 2) && (R_PAUSE_MENU_MODE != 3)) {
@ -3287,7 +3301,9 @@ void Interface_Draw(GlobalContext* globalCtx) {
func_80094520(globalCtx->state.gfxCtx);
if (fullUi) {
Interface_DrawItemButtons(globalCtx);
}
gDPPipeSync(OVERLAY_DISP++);
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, 255, 255, 255, interfaceCtx->bAlpha);
@ -3297,10 +3313,17 @@ void Interface_Draw(GlobalContext* globalCtx) {
// B Button Icon & Ammo Count
if (gSaveContext.equips.buttonItems[0] != ITEM_NONE)
{
if (fullUi) {
Interface_DrawItemIconTexture(globalCtx, gItemIcons[gSaveContext.equips.buttonItems[0]], 0);
}
if ((player->stateFlags1 & 0x00800000) || (globalCtx->shootingGalleryStatus > 1) ||
((globalCtx->sceneNum == SCENE_BOWLING) && Flags_GetSwitch(globalCtx, 0x38))) {
if (!fullUi) {
Interface_DrawItemIconTexture(globalCtx, gItemIcons[gSaveContext.equips.buttonItems[0]], 0);
}
gDPPipeSync(OVERLAY_DISP++);
gDPSetCombineLERP(OVERLAY_DISP++, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE,
0, PRIMITIVE, ENVIRONMENT, TEXEL0, ENVIRONMENT, TEXEL0, 0, PRIMITIVE, 0);
@ -3373,7 +3396,9 @@ void Interface_Draw(GlobalContext* globalCtx) {
gDPSetCombineMode(OVERLAY_DISP++, G_CC_MODULATEIA_PRIM, G_CC_MODULATEIA_PRIM);
gDPSetPrimColor(OVERLAY_DISP++, 0, 0, R_A_BTN_COLOR(0), R_A_BTN_COLOR(1), R_A_BTN_COLOR(2),
interfaceCtx->aAlpha);
if (fullUi) {
Interface_DrawActionButton(globalCtx, rABtnX, R_A_BTN_Y);
}
gDPPipeSync(OVERLAY_DISP++);
const f32 rAIconX = OTRGetDimensionFromRightEdge(R_A_ICON_X);
//func_8008A8B8(globalCtx, R_A_ICON_Y, R_A_ICON_Y + 45, rAIconX, rAIconX + 45);

View File

@ -2321,9 +2321,7 @@ s32 func_8083501C(Player* this, GlobalContext* globalCtx) {
if ((!Player_HoldsHookshot(this) || func_80834FBC(this)) && !func_80834758(globalCtx, this) &&
!func_80834F2C(this, globalCtx)) {
return 0;
}
else
{
} else if (this->rideActor != NULL) {
this->unk_6AD = 2; // OTRTODO: THIS IS A BAD IDEA BUT IT FIXES THE HORSE FIRST PERSON?
}