From 021512337ea0bee698e950e44222fb391ae7cb91 Mon Sep 17 00:00:00 2001 From: fgenesis Date: Sat, 4 Jul 2020 18:12:03 +0200 Subject: [PATCH 1/6] fix build on RPi4 (and probably newer gcc), thx pelupessy Close #62 --- BBGE/Base.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/BBGE/Base.cpp b/BBGE/Base.cpp index 785e3fb..59b08f9 100644 --- a/BBGE/Base.cpp +++ b/BBGE/Base.cpp @@ -21,6 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "Base.h" #include "Core.h" #include +#include #ifdef BBGE_BUILD_WINDOWS #include From 2f55036986a784392f184981bae472f131b0be80 Mon Sep 17 00:00:00 2001 From: pelupessy Date: Mon, 6 Jul 2020 16:37:47 +0900 Subject: [PATCH 2/6] Update ScriptInterface.cpp Required space between literal and string macro added. --- Aquaria/ScriptInterface.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Aquaria/ScriptInterface.cpp b/Aquaria/ScriptInterface.cpp index d847a50..c2b6c04 100644 --- a/Aquaria/ScriptInterface.cpp +++ b/Aquaria/ScriptInterface.cpp @@ -10409,7 +10409,7 @@ static const struct { #undef MK_ALIAS #define MK_FUNC(base, getter, prefix, suffix) luaRegister(prefix##_##suffix), #define MK_STR(s) #s -#define MK_ALIAS(prefix, suffix, alias) {MK_STR(prefix)"_"MK_STR(alias), l_##prefix##_##suffix}, +#define MK_ALIAS(prefix, suffix, alias) {MK_STR(prefix) "_" MK_STR(alias), l_##prefix##_##suffix}, EXPAND_FUNC_PROTOTYPES From 470a89510da22bfa4b77774ba71843a0b32debfa Mon Sep 17 00:00:00 2001 From: pelupessy Date: Mon, 6 Jul 2020 17:03:34 +0900 Subject: [PATCH 3/6] Update SceneEditor.cpp Use of operand of type #bool# in #operator++# is depreciated. --- Aquaria/SceneEditor.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Aquaria/SceneEditor.cpp b/Aquaria/SceneEditor.cpp index ca6aea6..962638a 100644 --- a/Aquaria/SceneEditor.cpp +++ b/Aquaria/SceneEditor.cpp @@ -3386,7 +3386,7 @@ void SceneEditor::update(float dt) else if (cursorOffset.x < oldPosition.x-10) right = false; else - noSide++; + noSide = 1; if (cursorOffset.y > oldPosition.y+10) down = true; else if (cursorOffset.y < oldPosition.y-10) From 3d65f113c6794ecaacaa2d8ffbb3bca84bc14270 Mon Sep 17 00:00:00 2001 From: Dmitry Grigoryev Date: Sat, 2 Jan 2021 00:50:27 +0100 Subject: [PATCH 4/6] avoid conflict with quad precision types --- Aquaria/ScriptInterface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Aquaria/ScriptInterface.cpp b/Aquaria/ScriptInterface.cpp index 3338cdc..9e2eddf 100644 --- a/Aquaria/ScriptInterface.cpp +++ b/Aquaria/ScriptInterface.cpp @@ -1,4 +1,4 @@ -#/* +/* Copyright (C) 2007, 2010 - Bit-Blot This file is part of Aquaria. @@ -42,6 +42,8 @@ extern "C" #include "../BBGE/MathFunctions.h" +#undef quad // avoid conflict with quad precision types + // Define this to 1 to check types of pointers passed to functions, // and warn if a type mismatch is detected. In this case, // the pointer is treated as NULL, to avoid crashing or undefined behavior. From d15204758f86e0a19f505cd521136f24be5b924f Mon Sep 17 00:00:00 2001 From: Dmitry Grigoryev Date: Sat, 2 Jan 2021 00:50:27 +0100 Subject: [PATCH 5/6] avoid conflict with quad precision types --- Aquaria/ScriptInterface.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Aquaria/ScriptInterface.cpp b/Aquaria/ScriptInterface.cpp index 3338cdc..9e2eddf 100644 --- a/Aquaria/ScriptInterface.cpp +++ b/Aquaria/ScriptInterface.cpp @@ -1,4 +1,4 @@ -#/* +/* Copyright (C) 2007, 2010 - Bit-Blot This file is part of Aquaria. @@ -42,6 +42,8 @@ extern "C" #include "../BBGE/MathFunctions.h" +#undef quad // avoid conflict with quad precision types + // Define this to 1 to check types of pointers passed to functions, // and warn if a type mismatch is detected. In this case, // the pointer is treated as NULL, to avoid crashing or undefined behavior. From 9596e7eac8677c990c7483dc5f4bf8b656baae1e Mon Sep 17 00:00:00 2001 From: Dmitry Grigoryev Date: Sat, 2 Jan 2021 02:14:15 +0100 Subject: [PATCH 6/6] fix static FrameBuffer/Shader build --- BBGE/FrameBuffer.cpp | 4 +++- BBGE/Shader.cpp | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/BBGE/FrameBuffer.cpp b/BBGE/FrameBuffer.cpp index d291e41..7379a7b 100644 --- a/BBGE/FrameBuffer.cpp +++ b/BBGE/FrameBuffer.cpp @@ -23,7 +23,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. //WARNING: FrameBuffer objects have to have reloadDevice/unloadDevice called manually! -#ifdef BBGE_BUILD_FRAMEBUFFER +#if defined(BBGE_BUILD_FRAMEBUFFER) && defined(BBGE_BUILD_OPENGL_DYNAMIC) PFNGLISRENDERBUFFEREXTPROC glIsRenderbufferEXT = NULL; PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbufferEXT = NULL; PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffersEXT = NULL; @@ -131,6 +131,7 @@ bool FrameBuffer::init(int width, int height, bool fitToScreen, GLint filter) } else { +#if defined(BBGE_BUILD_OPENGL_DYNAMIC) if (!glIsRenderbufferEXT) { glIsRenderbufferEXT = (PFNGLISRENDERBUFFEREXTPROC)SDL_GL_GetProcAddress("glIsRenderbufferEXT"); @@ -162,6 +163,7 @@ bool FrameBuffer::init(int width, int height, bool fitToScreen, GLint filter) debugLog("One or more EXT_framebuffer_object functions were not found"); return false; } +#endif // // Create a frame-buffer object and a render-buffer object... diff --git a/BBGE/Shader.cpp b/BBGE/Shader.cpp index b793383..83994de 100644 --- a/BBGE/Shader.cpp +++ b/BBGE/Shader.cpp @@ -22,7 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "Shader.h" #include "algorithmx.h" -#ifdef BBGE_BUILD_SHADERS +#if defined(BBGE_BUILD_SHADERS) && defined(BBGE_BUILD_OPENGL_DYNAMIC) // GL_ARB_shader_objects PFNGLCREATEPROGRAMOBJECTARBPROC glCreateProgramObjectARB = NULL; PFNGLDELETEOBJECTARBPROC glDeleteObjectARB = NULL; @@ -77,6 +77,7 @@ void Shader::staticInit() } else { +#if defined(BBGE_BUILD_OPENGL_DYNAMIC) glCreateProgramObjectARB = (PFNGLCREATEPROGRAMOBJECTARBPROC)SDL_GL_GetProcAddress("glCreateProgramObjectARB"); glDeleteObjectARB = (PFNGLDELETEOBJECTARBPROC)SDL_GL_GetProcAddress("glDeleteObjectARB"); glUseProgramObjectARB = (PFNGLUSEPROGRAMOBJECTARBPROC)SDL_GL_GetProcAddress("glUseProgramObjectARB"); @@ -110,6 +111,7 @@ void Shader::staticInit() goto end; } } +#endif // everything fine when we are here _useShaders = true;