various merge fixes

This commit is contained in:
MelonSpeedruns 2022-05-29 15:19:31 -04:00
commit c16f153485
5 changed files with 44 additions and 66 deletions

View file

@ -243,7 +243,8 @@ static LRESULT CALLBACK gfx_dxgi_wnd_proc(HWND h_wnd, UINT message, WPARAM w_par
if (dxgi.in_paint) {
dxgi.recursive_paint_detected = true;
return DefWindowProcW(h_wnd, message, w_param, l_param);
} else {
}
else {
if (dxgi.run_one_game_iter != nullptr) {
dxgi.in_paint = true;
dxgi.run_one_game_iter();
@ -255,7 +256,6 @@ static LRESULT CALLBACK gfx_dxgi_wnd_proc(HWND h_wnd, UINT message, WPARAM w_par
}
}
}
}
break;
case WM_ACTIVATEAPP:
if (dxgi.on_all_keys_up != nullptr) {
@ -283,6 +283,7 @@ static LRESULT CALLBACK gfx_dxgi_wnd_proc(HWND h_wnd, UINT message, WPARAM w_par
}
return 0;
}
}
void gfx_dxgi_init(const char* game_name, bool start_in_fullscreen) {
LARGE_INTEGER qpc_init, qpc_freq;

View file

@ -234,7 +234,6 @@ extern "C" void LoadItemLocations(const char* spoilerFileName);
static void gfx_sdl_handle_events(void) {
SDL_Event event;
char* dropped_filedir;
while (SDL_PollEvent(&event)) {
SohImGui::EventImpl event_impl;
event_impl.sdl = { &event };
@ -256,12 +255,8 @@ static void gfx_sdl_handle_events(void) {
}
break;
case SDL_DROPFILE:
{
#ifndef __linux__
LoadItemLocations(event.drop.file);
#endif
break;
}
case SDL_QUIT:
exit(0);
}

View file

@ -259,7 +259,8 @@ namespace SohImGui {
}
void LoadRainbowColor() {
for (uint16_t s=0; s <= sizeof(RainbowColorCvarList); s++) {
u8 arrayLength = sizeof(RainbowColorCvarList) / sizeof(*RainbowColorCvarList);
for (u8 s = 0; s < arrayLength; s++) {
std::string cvarName = RainbowColorCvarList[s];
std::string Cvar_Red = cvarName;
Cvar_Red += "R";

View file

@ -8,8 +8,6 @@
#include "soh/frame_interpolation.h"
#include "soh/frame_interpolation.h"
static s16 sUnused = 106;
static s16 sScreenFillAlpha = 255;
@ -169,8 +167,6 @@ void FileChoose_FinishFadeIn(GameState* thisx) {
}
}
Sprite sprDPad = { gHookshotIconTex, 32, 32, G_IM_FMT_RGBA, G_IM_SIZ_32b };
void SpriteLoad(FileChooseContext* this, Sprite* sprite) {
OPEN_DISPS(this->state.gfxCtx, "gfx.c", 12);
@ -211,14 +207,11 @@ void DrawSeedHashSprites(FileChooseContext* this) {
// Draw Seed Icons
u16 xStart = 64;
for (u8 i = 0; i < 5; i++) {
// gSaveContext.seedIcons[i];
// hacky check to make sure we leaded the icons
if (gSaveContext.seedIcons[i].height) {
SpriteLoad(this, &gSaveContext.seedIcons[i]);
SpriteDraw(this, &gSaveContext.seedIcons[i], xStart + (40 * i), 10, 24, 24);
}
// SpriteLoad(this, &sprDPad);
// SpriteDraw(this, &sprDPad, xStart + (40 * i), 10, 24, 24);
}
gDPPipeSync(POLY_OPA_DISP++);

View file

@ -449,18 +449,6 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
dayTime = ((void)0, gSaveContext.dayTime);
// hacky function for testing
// while drag and drop is broken on linux
// enter "rando" as file name
if(this->fileNames[1][0] == '5' &&
this->fileNames[1][1] == '$' &&
this->fileNames[1][2] == '1' &&
this->fileNames[1][3] == '\'' &&
this->fileNames[1][4] == '2')
{
ParseItemLocations("spoiler.json");
}
Sram_InitSave(this, &this->sramCtx);
// todo: fill link's pocket here