mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-22 09:22:18 -05:00
Removes unnecessary Environment.cpp file.
This commit is contained in:
parent
352b46c1f5
commit
1de525900d
@ -1,16 +0,0 @@
|
||||
#include "Environment.h"
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
std::map<std::string, std::string> environmentVars;
|
||||
|
||||
namespace SohUtils {
|
||||
void saveEnvironmentVar(const std::string& key, const std::string& value) {
|
||||
environmentVars[key] = value;
|
||||
}
|
||||
|
||||
std::string getEnvironmentVar(const std::string& key) {
|
||||
return environmentVars[key];
|
||||
}
|
||||
}
|
@ -1,8 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
#include <string>
|
||||
|
||||
namespace SohUtils {
|
||||
void saveEnvironmentVar(const std::string& key, const std::string& value);
|
||||
std::string getEnvironmentVar(const std::string& key);
|
||||
}
|
@ -8,7 +8,6 @@
|
||||
#include <vector>
|
||||
|
||||
#include "Archive.h"
|
||||
#include "Environment.h"
|
||||
#include "GameSettings.h"
|
||||
#include "Console.h"
|
||||
#include "Hooks.h"
|
||||
@ -1626,7 +1625,7 @@ namespace SohImGui {
|
||||
pos = ImVec2(size.x / 2 - sw / 2, 0);
|
||||
size = ImVec2(sw, size.y);
|
||||
}
|
||||
std::string fb_str = SohUtils::getEnvironmentVar("framebuffer");
|
||||
std::string fb_str = gfxFramebuffer;
|
||||
if (!fb_str.empty()) {
|
||||
uintptr_t fbuf = (uintptr_t)std::stoull(fb_str);
|
||||
//ImGui::ImageSimple(reinterpret_cast<ImTextureID>(fbuf), pos, size);
|
||||
|
@ -44,7 +44,6 @@
|
||||
#include "gfx_cc.h"
|
||||
#include "gfx_rendering_api.h"
|
||||
#include "../../ImGuiImpl.h"
|
||||
#include "../../Environment.h"
|
||||
#include "../../GlobalCtx2.h"
|
||||
#include "gfx_pc.h"
|
||||
|
||||
|
@ -32,7 +32,6 @@
|
||||
#include "../../luslog.h"
|
||||
#include "../StrHash64.h"
|
||||
#include "../../ImGuiImpl.h"
|
||||
#include "../../Environment.h"
|
||||
#include "../../GameVersions.h"
|
||||
#include "../../ResourceMgr.h"
|
||||
#include "../../Utils.h"
|
||||
@ -49,6 +48,8 @@ extern "C" {
|
||||
int ResourceMgr_OTRSigCheck(char* imgData);
|
||||
}
|
||||
|
||||
std::string gfxFramebuffer;
|
||||
|
||||
using namespace std;
|
||||
|
||||
#define SEG_ADDR(seg, addr) (addr | (seg << 24) | 1)
|
||||
@ -2782,7 +2783,7 @@ void gfx_run(Gfx *commands, const std::unordered_map<Mtx *, MtxF>& mtx_replaceme
|
||||
rendering_state.scissor = {};
|
||||
gfx_run_dl(commands);
|
||||
gfx_flush();
|
||||
SohUtils::saveEnvironmentVar("framebuffer", string());
|
||||
gfxFramebuffer = string();
|
||||
if (game_renders_to_framebuffer) {
|
||||
gfx_rapi->start_draw_to_framebuffer(0, 1);
|
||||
gfx_rapi->clear_framebuffer();
|
||||
@ -2792,12 +2793,12 @@ void gfx_run(Gfx *commands, const std::unordered_map<Mtx *, MtxF>& mtx_replaceme
|
||||
|
||||
if (different_size) {
|
||||
gfx_rapi->resolve_msaa_color_buffer(game_framebuffer_msaa_resolved, game_framebuffer);
|
||||
SohUtils::saveEnvironmentVar("framebuffer", std::to_string((uintptr_t)gfx_rapi->get_framebuffer_texture_id(game_framebuffer_msaa_resolved)));
|
||||
gfxFramebuffer = std::to_string((uintptr_t)gfx_rapi->get_framebuffer_texture_id(game_framebuffer_msaa_resolved));
|
||||
} else {
|
||||
gfx_rapi->resolve_msaa_color_buffer(0, game_framebuffer);
|
||||
}
|
||||
} else {
|
||||
SohUtils::saveEnvironmentVar("framebuffer", std::to_string((uintptr_t)gfx_rapi->get_framebuffer_texture_id(game_framebuffer)));
|
||||
gfxFramebuffer = std::to_string((uintptr_t)gfx_rapi->get_framebuffer_texture_id(game_framebuffer));
|
||||
}
|
||||
}
|
||||
SohImGui::DrawFramebufferAndGameInput();
|
||||
|
@ -14,6 +14,8 @@
|
||||
#define SCREEN_WIDTH 320
|
||||
#define SCREEN_HEIGHT 240
|
||||
|
||||
extern std::string gfxFramebuffer;
|
||||
|
||||
struct GfxRenderingAPI;
|
||||
struct GfxWindowManagerAPI;
|
||||
|
||||
|
@ -258,7 +258,6 @@
|
||||
<ClCompile Include="Blob.cpp" />
|
||||
<ClCompile Include="ControlDeck.cpp" />
|
||||
<ClCompile Include="Cvar.cpp" />
|
||||
<ClCompile Include="Environment.cpp" />
|
||||
<ClCompile Include="Factories\AudioFactory.cpp" />
|
||||
<ClCompile Include="InputEditor.cpp" />
|
||||
<ClCompile Include="GameOverlay.cpp" />
|
||||
@ -354,7 +353,6 @@
|
||||
<ClInclude Include="color.h" />
|
||||
<ClInclude Include="ControlDeck.h" />
|
||||
<ClInclude Include="Cvar.h" />
|
||||
<ClInclude Include="Environment.h" />
|
||||
<ClInclude Include="Factories\AudioFactory.h" />
|
||||
<ClInclude Include="InputEditor.h" />
|
||||
<ClInclude Include="GameOverlay.h" />
|
||||
|
@ -67,9 +67,6 @@
|
||||
<Filter Include="Source Files\Audio">
|
||||
<UniqueIdentifier>{ccd6359f-e357-41ca-9b89-5f509dd30649}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\CustomImpl\Environment">
|
||||
<UniqueIdentifier>{94ca4b98-cee2-48e6-a88b-68b8d2fed287}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="Source Files\CustomImpl\Utils">
|
||||
<UniqueIdentifier>{0dca2d94-45ba-4916-b03a-1dd5f949114c}</UniqueIdentifier>
|
||||
</Filter>
|
||||
@ -321,9 +318,6 @@
|
||||
<ClCompile Include="SDLAudioPlayer.cpp">
|
||||
<Filter>Source Files\Audio</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Environment.cpp">
|
||||
<Filter>Source Files\CustomImpl\Environment</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="Utils.cpp">
|
||||
<Filter>Source Files\CustomImpl\Utils</Filter>
|
||||
</ClCompile>
|
||||
@ -605,9 +599,6 @@
|
||||
<ClInclude Include="Lib\ImGui\backends\imgui_impl_win32.h">
|
||||
<Filter>Source Files\Lib\ImGui</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Environment.h">
|
||||
<Filter>Source Files\CustomImpl\Environment</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="Utils.h">
|
||||
<Filter>Source Files\CustomImpl\Utils</Filter>
|
||||
</ClInclude>
|
||||
|
Loading…
Reference in New Issue
Block a user