mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-22 22:33:43 -07:00
various merge fixes
This commit is contained in:
parent
5c4e722b9b
commit
c16f153485
5 changed files with 44 additions and 66 deletions
|
@ -243,7 +243,8 @@ static LRESULT CALLBACK gfx_dxgi_wnd_proc(HWND h_wnd, UINT message, WPARAM w_par
|
||||||
if (dxgi.in_paint) {
|
if (dxgi.in_paint) {
|
||||||
dxgi.recursive_paint_detected = true;
|
dxgi.recursive_paint_detected = true;
|
||||||
return DefWindowProcW(h_wnd, message, w_param, l_param);
|
return DefWindowProcW(h_wnd, message, w_param, l_param);
|
||||||
} else {
|
}
|
||||||
|
else {
|
||||||
if (dxgi.run_one_game_iter != nullptr) {
|
if (dxgi.run_one_game_iter != nullptr) {
|
||||||
dxgi.in_paint = true;
|
dxgi.in_paint = true;
|
||||||
dxgi.run_one_game_iter();
|
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;
|
break;
|
||||||
case WM_ACTIVATEAPP:
|
case WM_ACTIVATEAPP:
|
||||||
if (dxgi.on_all_keys_up != nullptr) {
|
if (dxgi.on_all_keys_up != nullptr) {
|
||||||
|
@ -282,6 +282,7 @@ static LRESULT CALLBACK gfx_dxgi_wnd_proc(HWND h_wnd, UINT message, WPARAM w_par
|
||||||
return DefWindowProcW(h_wnd, message, w_param, l_param);
|
return DefWindowProcW(h_wnd, message, w_param, l_param);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void gfx_dxgi_init(const char* game_name, bool start_in_fullscreen) {
|
void gfx_dxgi_init(const char* game_name, bool start_in_fullscreen) {
|
||||||
|
|
|
@ -234,7 +234,6 @@ extern "C" void LoadItemLocations(const char* spoilerFileName);
|
||||||
|
|
||||||
static void gfx_sdl_handle_events(void) {
|
static void gfx_sdl_handle_events(void) {
|
||||||
SDL_Event event;
|
SDL_Event event;
|
||||||
char* dropped_filedir;
|
|
||||||
while (SDL_PollEvent(&event)) {
|
while (SDL_PollEvent(&event)) {
|
||||||
SohImGui::EventImpl event_impl;
|
SohImGui::EventImpl event_impl;
|
||||||
event_impl.sdl = { &event };
|
event_impl.sdl = { &event };
|
||||||
|
@ -256,12 +255,8 @@ static void gfx_sdl_handle_events(void) {
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case SDL_DROPFILE:
|
case SDL_DROPFILE:
|
||||||
{
|
|
||||||
#ifndef __linux__
|
|
||||||
LoadItemLocations(event.drop.file);
|
LoadItemLocations(event.drop.file);
|
||||||
#endif
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case SDL_QUIT:
|
case SDL_QUIT:
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
|
@ -259,7 +259,8 @@ namespace SohImGui {
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadRainbowColor() {
|
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 cvarName = RainbowColorCvarList[s];
|
||||||
std::string Cvar_Red = cvarName;
|
std::string Cvar_Red = cvarName;
|
||||||
Cvar_Red += "R";
|
Cvar_Red += "R";
|
||||||
|
@ -270,8 +271,8 @@ namespace SohImGui {
|
||||||
std::string Cvar_RBM = cvarName;
|
std::string Cvar_RBM = cvarName;
|
||||||
Cvar_RBM += "RBM";
|
Cvar_RBM += "RBM";
|
||||||
std::string RBM_HUE = cvarName;
|
std::string RBM_HUE = cvarName;
|
||||||
RBM_HUE+="Hue";
|
RBM_HUE += "Hue";
|
||||||
f32 Canon = 10.f*s;
|
f32 Canon = 10.f * s;
|
||||||
ImVec4 NewColor;
|
ImVec4 NewColor;
|
||||||
const f32 deltaTime = 1.0f / ImGui::GetIO().Framerate;
|
const f32 deltaTime = 1.0f / ImGui::GetIO().Framerate;
|
||||||
f32 hue = CVar_GetFloat(RBM_HUE.c_str(), 0.0f);
|
f32 hue = CVar_GetFloat(RBM_HUE.c_str(), 0.0f);
|
||||||
|
@ -293,10 +294,10 @@ namespace SohImGui {
|
||||||
case 6: NewColor.x = 255; NewColor.y = 0; NewColor.z = a; break;
|
case 6: NewColor.x = 255; NewColor.y = 0; NewColor.z = a; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(CVar_GetS32(Cvar_RBM.c_str(), 0) != 0) {
|
if (CVar_GetS32(Cvar_RBM.c_str(), 0) != 0) {
|
||||||
CVar_SetS32(Cvar_Red.c_str(), ClampFloatToInt(NewColor.x,0,255));
|
CVar_SetS32(Cvar_Red.c_str(), ClampFloatToInt(NewColor.x, 0, 255));
|
||||||
CVar_SetS32(Cvar_Green.c_str(), ClampFloatToInt(NewColor.y,0,255));
|
CVar_SetS32(Cvar_Green.c_str(), ClampFloatToInt(NewColor.y, 0, 255));
|
||||||
CVar_SetS32(Cvar_Blue.c_str(), ClampFloatToInt(NewColor.z,0,255));
|
CVar_SetS32(Cvar_Blue.c_str(), ClampFloatToInt(NewColor.z, 0, 255));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,6 @@
|
||||||
|
|
||||||
#include "soh/frame_interpolation.h"
|
#include "soh/frame_interpolation.h"
|
||||||
|
|
||||||
#include "soh/frame_interpolation.h"
|
|
||||||
|
|
||||||
static s16 sUnused = 106;
|
static s16 sUnused = 106;
|
||||||
|
|
||||||
static s16 sScreenFillAlpha = 255;
|
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) {
|
void SpriteLoad(FileChooseContext* this, Sprite* sprite) {
|
||||||
OPEN_DISPS(this->state.gfxCtx, "gfx.c", 12);
|
OPEN_DISPS(this->state.gfxCtx, "gfx.c", 12);
|
||||||
|
|
||||||
|
@ -211,14 +207,11 @@ void DrawSeedHashSprites(FileChooseContext* this) {
|
||||||
// Draw Seed Icons
|
// Draw Seed Icons
|
||||||
u16 xStart = 64;
|
u16 xStart = 64;
|
||||||
for (u8 i = 0; i < 5; i++) {
|
for (u8 i = 0; i < 5; i++) {
|
||||||
// gSaveContext.seedIcons[i];
|
|
||||||
// hacky check to make sure we leaded the icons
|
// hacky check to make sure we leaded the icons
|
||||||
if(gSaveContext.seedIcons[i].height) {
|
if (gSaveContext.seedIcons[i].height) {
|
||||||
SpriteLoad(this, &gSaveContext.seedIcons[i]);
|
SpriteLoad(this, &gSaveContext.seedIcons[i]);
|
||||||
SpriteDraw(this, &gSaveContext.seedIcons[i], xStart + (40 * i), 10, 24, 24);
|
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++);
|
gDPPipeSync(POLY_OPA_DISP++);
|
||||||
|
|
|
@ -449,18 +449,6 @@ void FileChoose_DrawNameEntry(GameState* thisx) {
|
||||||
|
|
||||||
dayTime = ((void)0, gSaveContext.dayTime);
|
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);
|
Sram_InitSave(this, &this->sramCtx);
|
||||||
|
|
||||||
// todo: fill link's pocket here
|
// todo: fill link's pocket here
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue