ref: 99fd64462baaa4fb2096b0f9f02aef2791b7fafd
parent: 8880c599b452df11cc791aca229de2fd3e2d6c35
parent: 720b1dfea7eeba14a77a493e714e1292f0399c60
author: Clownacy <Clownacy@users.noreply.github.com>
date: Thu Jul 2 10:56:34 EDT 2020
Merge pull request #133 from GabrielRavier/portableMinimizeHeaders portable: Cleaned up includes to only (and always) include what we use
--- a/src/Backends/Audio/SDL2.cpp
+++ b/src/Backends/Audio/SDL2.cpp
@@ -1,7 +1,6 @@
#include "../Audio.h"
#include <stddef.h>
-#include <stdio.h>
#include <string.h>
#include <string>
--- a/src/Backends/Audio/SoftwareMixer.cpp
+++ b/src/Backends/Audio/SoftwareMixer.cpp
@@ -2,9 +2,7 @@
#include <math.h>
#include <stddef.h>
-#include <stdio.h>
#include <stdlib.h>
-#include <string.h>
#include "../../Attributes.h"
--- a/src/Backends/Audio/miniaudio.cpp
+++ b/src/Backends/Audio/miniaudio.cpp
@@ -1,6 +1,7 @@
#include "../Audio.h"
#include <stddef.h>
+#include <string.h>
#define MINIAUDIO_IMPLEMENTATION
#define MA_NO_DECODING
--- a/src/Backends/Controller/SDL2.cpp
+++ b/src/Backends/Controller/SDL2.cpp
@@ -1,6 +1,7 @@
#include "../Controller.h"
#include <stddef.h>
+#include <stdlib.h>
#include "SDL.h"
--- a/src/Backends/Platform/GLFW3.cpp
+++ b/src/Backends/Platform/GLFW3.cpp
@@ -17,7 +17,6 @@
#include "../../Main.h"
#include "../../Organya.h"
#include "../../Profile.h"
-#include "../../Resource.h"
#define DO_KEY(GLFW_KEY, BACKEND_KEY) \
case GLFW_KEY: \
--- a/src/Backends/Platform/Null.cpp
+++ b/src/Backends/Platform/Null.cpp
@@ -2,6 +2,8 @@
#include <string>
+#include "../../Attributes.h"
+
bool Backend_Init(void)
{
return true;
--- a/src/Backends/Platform/SDL2.cpp
+++ b/src/Backends/Platform/SDL2.cpp
@@ -1,6 +1,8 @@
#include "../Misc.h"
+#include <stdarg.h>
#include <stddef.h>
+#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
@@ -9,10 +11,10 @@
#include "../Rendering.h"
#include "../Shared/SDL2.h"
+#include "../../Attributes.h"
#include "../../Main.h"
#include "../../Organya.h"
#include "../../Profile.h"
-#include "../../Resource.h"
#define DO_KEY(SDL_KEY, BACKEND_KEY) \
case SDL_KEY: \
--- a/src/Backends/Platform/WiiU.cpp
+++ b/src/Backends/Platform/WiiU.cpp
@@ -1,6 +1,7 @@
#include "../Misc.h"
#include <stdarg.h>
+#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <string>
--- a/src/Backends/Rendering/OpenGL3.cpp
+++ b/src/Backends/Rendering/OpenGL3.cpp
@@ -15,11 +15,8 @@
#define SPRITEBATCH_IMPLEMENTATION
#include "../../../external/cute_spritebatch.h"
-#include "../../WindowsWrapper.h"
-
#include "../Misc.h"
#include "Window/OpenGL.h"
-#include "../../Resource.h"
#define TOTAL_VBOS 8
--- a/src/Backends/Rendering/SDLTexture.cpp
+++ b/src/Backends/Rendering/SDLTexture.cpp
@@ -14,10 +14,6 @@
#include "../Misc.h"
#include "../Shared/SDL2.h"
-#include "../../Draw.h"
-#include "../../Ending.h"
-#include "../../MapName.h"
-#include "../../TextScr.h"
typedef struct RenderBackend_Surface
{
--- a/src/Backends/Rendering/Window/OpenGL3/GLFW3.cpp
+++ b/src/Backends/Rendering/Window/OpenGL3/GLFW3.cpp
@@ -1,11 +1,8 @@
#include "../OpenGL.h"
#include <stddef.h>
-#include <stdlib.h>
-#ifdef USE_OPENGLES2
-#include <GLES2/gl2.h>
-#else
+#ifndef USE_OPENGLES2
#include <glad/glad.h>
#endif
#include <GLFW/glfw3.h>
--- a/src/Backends/Rendering/Window/OpenGL3/SDL2.cpp
+++ b/src/Backends/Rendering/Window/OpenGL3/SDL2.cpp
@@ -3,9 +3,7 @@
#include <stddef.h>
#include <string>
-#ifdef USE_OPENGLES2
-#include <GLES2/gl2.h>
-#else
+#ifndef USE_OPENGLES2
#include <glad/glad.h>
#endif
#include "SDL.h"
--- a/src/Backends/Rendering/Window/Software/SDL2.cpp
+++ b/src/Backends/Rendering/Window/Software/SDL2.cpp
@@ -1,7 +1,6 @@
#include "../Software.h"
#include <stddef.h>
-#include <stdlib.h>
#include <string>
#include "SDL.h"
--- a/src/Draw.cpp
+++ b/src/Draw.cpp
@@ -1,7 +1,6 @@
#include "Draw.h"
#include <stddef.h>
-#include <stdio.h>
#include <string.h>
#include <string>
--- a/src/Font.cpp
+++ b/src/Font.cpp
@@ -1,6 +1,5 @@
#include "Font.h"
-#include <math.h>
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
@@ -9,9 +8,6 @@
#include FT_FREETYPE_H
#include FT_BITMAP_H
-#include "WindowsWrapper.h"
-
-#include "Draw.h"
#include "File.h"
#include "Backends/Rendering.h"
--- a/src/Game.cpp
+++ b/src/Game.cpp
@@ -1,7 +1,6 @@
#include "Game.h"
#include <stddef.h>
-#include <stdio.h>
#include <string>
#include "WindowsWrapper.h"
--- a/src/GenericLoad.cpp
+++ b/src/GenericLoad.cpp
@@ -1,7 +1,5 @@
#include "GenericLoad.h"
-#include <stdio.h>
-
#include "WindowsWrapper.h"
#include "CommonDefines.h"
--- a/src/Main.cpp
+++ b/src/Main.cpp
@@ -1,7 +1,6 @@
#include "Main.h"
#include <stddef.h>
-#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <string>
@@ -9,12 +8,10 @@
#include "WindowsWrapper.h"
#include "Backends/Misc.h"
-#include "Backends/Rendering.h"
#include "Bitmap.h"
#include "CommonDefines.h"
#include "Config.h"
#include "Draw.h"
-#include "File.h"
#include "Game.h"
#include "Generic.h"
#include "Input.h"
@@ -21,7 +18,6 @@
#include "KeyControl.h"
#include "MyChar.h"
#include "Organya.h"
-#include "Profile.h"
#include "Resource.h"
#include "Sound.h"
#include "Triangle.h"
--- a/src/Sound.cpp
+++ b/src/Sound.cpp
@@ -20,7 +20,7 @@
#include "WindowsWrapper.h"
#include "Backends/Audio.h"
-#include "Main.h"
+//#include "Main.h" // Was for gModulePath, but this is unneeded in the portable branch since LoadSoundObject is commented-out
#include "Organya.h"
#include "PixTone.h"
--- a/src/Stage.cpp
+++ b/src/Stage.cpp
@@ -1,7 +1,5 @@
#include "Stage.h"
-#include <stdio.h>
-#include <string.h>
#include <string>
#include "WindowsWrapper.h"