From de98bbef468c19489d77be5928de31c5d8b979c8 Mon Sep 17 00:00:00 2001 From: Lukas Werling Date: Wed, 6 Apr 2016 19:17:52 +0200 Subject: [PATCH] Fix compile errors on Linux/SDL --- src/landscape/C4Landscape.cpp | 4 ++-- src/platform/C4App.h | 4 ++++ src/platform/C4WindowSDL.cpp | 1 + 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/src/landscape/C4Landscape.cpp b/src/landscape/C4Landscape.cpp index 2861d80fb..dea702ab5 100644 --- a/src/landscape/C4Landscape.cpp +++ b/src/landscape/C4Landscape.cpp @@ -3658,7 +3658,7 @@ void C4Landscape::SetGravity(C4Real g) BYTE C4Landscape::_GetPix(int32_t x, int32_t y) const { #ifdef _DEBUG - if (x < 0 || y < 0 || x >= Width || y >= Height) { BREAKPOINT_HERE; } + if (x < 0 || y < 0 || x >= p->Width || y >= p->Height) { BREAKPOINT_HERE; } #endif return p->Surface8->_GetPix(x, y); } @@ -3721,7 +3721,7 @@ int32_t C4Landscape::GetPlacement(int32_t x, int32_t y) const // get landscape m BYTE C4Landscape::_GetBackPix(int32_t x, int32_t y) const // get landscape pixel (bounds not checked) { #ifdef _DEBUG - if (x < 0 || y < 0 || x >= Width || y >= Height) { BREAKPOINT_HERE; } + if (x < 0 || y < 0 || x >= p->Width || y >= p->Height) { BREAKPOINT_HERE; } #endif return p->Surface8Bkg->_GetPix(x, y); } diff --git a/src/platform/C4App.h b/src/platform/C4App.h index 13f8905d0..0a063d164 100644 --- a/src/platform/C4App.h +++ b/src/platform/C4App.h @@ -27,6 +27,10 @@ #include #endif +#ifdef USE_SDL_MAINLOOP +#include +#endif + #ifdef USE_WIN32_WINDOWS class CStdMessageProc : public StdSchedulerProc { diff --git a/src/platform/C4WindowSDL.cpp b/src/platform/C4WindowSDL.cpp index dd611a162..9b790c336 100644 --- a/src/platform/C4WindowSDL.cpp +++ b/src/platform/C4WindowSDL.cpp @@ -21,6 +21,7 @@ #include "game/C4Application.h" #include "graphics/C4DrawGL.h" +#include "editor/C4Console.h" #include "editor/C4ViewportWindow.h" #include "platform/StdFile.h" #include "lib/StdBuf.h"