Clean up header dependencies

A lot of source files were depending on utils.h being included by other headers
Cleaned up code that was depending on Input.h being included in Pi.h
master
Webster Sheets 2020-03-27 16:45:17 -04:00
parent 2376b050eb
commit 0c67f400c9
11 changed files with 23 additions and 10 deletions

View File

@ -11,12 +11,13 @@
#include "graphics/Frustum.h"
#include "graphics/Graphics.h"
#include "graphics/Material.h"
#include "graphics/Renderer.h"
#include "graphics/RenderState.h"
#include "graphics/Renderer.h"
#include "graphics/Texture.h"
#include "graphics/VertexArray.h"
#include "graphics/opengl/GenGasGiantColourMaterial.h"
#include "perlin.h"
#include "utils.h"
#include "vcacheopt/vcacheopt.h"
RefCountedPtr<GasPatchContext> GasGiant::s_patchContext;

View File

@ -6,6 +6,7 @@
#include "Pi.h"
#include "graphics/Graphics.h"
#include "graphics/Renderer.h"
#include "utils.h"
#include "perlin.h"
#include "vcacheopt/vcacheopt.h"

View File

@ -20,6 +20,7 @@
#include "graphics/TextureBuilder.h"
#include "graphics/VertexArray.h"
#include "perlin.h"
#include "utils.h"
#include "vcacheopt/vcacheopt.h"
#include <algorithm>
#include <deque>

View File

@ -3,6 +3,7 @@
#include "KeyBindings.h"
#include "GameConfig.h"
#include "Input.h"
#include "Lang.h"
#include "Pi.h"
#include "StringF.h"

View File

@ -6,7 +6,7 @@
#include "Game.h"
#include "GameConfig.h"
#include "GameSaveError.h"
#include "KeyBindings.h"
#include "Input.h"
#include "MathUtil.h"
#include "Pi.h"
#include "Player.h"
@ -22,6 +22,7 @@
#include "gui/Gui.h"
#include "lua/LuaConstants.h"
#include "lua/LuaObject.h"
#include "utils.h"
#include <algorithm>
#include <sstream>
#include <unordered_set>

View File

@ -7,6 +7,7 @@
#include "Frame.h"
#include "Game.h"
#include "GameLog.h"
#include "Input.h"
#include "Lang.h"
#include "Pi.h"
#include "Player.h"

View File

@ -7,6 +7,7 @@
#include "OS.h"
#include "Renderer.h"
#include "StringF.h"
#include "utils.h"
#include <iterator>
#include <sstream>

View File

@ -7,6 +7,7 @@
#include "StringF.h"
#include "StringRange.h"
#include "graphics/Graphics.h"
#include "utils.h"
#include <set>

View File

@ -2,9 +2,12 @@
// Licensed under the terms of the GPL v3. See licenses/GPL-3.txt
#include "PiGui.h"
#include "Input.h"
#include "Pi.h"
#include "graphics/opengl/TextureGL.h" // nasty, usage of GL is implementation specific
#include "imgui/imgui.h"
// Use GLEW instead of GL3W.
#define IMGUI_IMPL_OPENGL_LOADER_GLEW 1
#include "imgui/examples/imgui_impl_opengl3.h"

View File

@ -87,6 +87,9 @@ public:
// Call at the start of every frame. Calls ImGui::NewFrame() internally.
void NewFrame(SDL_Window *window);
// Call at the end of a frame that you're not going to render the results of
void EndFrame();
// Calls ImGui::EndFrame() internally and does book-keeping before rendering.
void Render();
@ -131,8 +134,6 @@ public:
static void ThrustIndicator(const std::string &id_string, const ImVec2 &size, const ImVec4 &thrust, const ImVec4 &velocity, const ImVec4 &bg_col, int frame_padding, ImColor vel_fg, ImColor vel_bg, ImColor thrust_fg, ImColor thrust_bg);
private:
void EndFrame();
LuaRef m_handlers;
LuaRef m_keys;
static std::vector<Graphics::Texture *> m_svg_textures;

View File

@ -5,6 +5,7 @@
#include "GameConfig.h"
#include "Pi.h"
#include "utils.h"
void Terrain::DebugDump() const
{