-lSDL2main -lSDL2 -lSDL2_image -lSDL2_mixer -lfreetype
endif
-CXXFLAGS = -g -m$(TARGET_BITS) -std=c++14 -fext-numeric-literals
+CXXFLAGS = -ggdb -m$(TARGET_BITS) -std=c++14 -fext-numeric-literals
CXXINC = -Iinclude -Iinclude/freetype
-CXXWARN = -Wall -Wextra -Werror
+CXXWARN = -Wall -Wextra -Werror -pedantic
CXXSRCDIR = src
CXXOUTDIR = out
#define GLM_NOT_BUGGY_VC32BITS (!(GLM_MODEL == GLM_MODEL_32 && (GLM_COMPILER & GLM_COMPILER_VC) && GLM_COMPILER < GLM_COMPILER_VC2013))
-#if GLM_COMPILER & GLM_COMPILER_LLVM
+/*#if GLM_COMPILER & GLM_COMPILER_LLVM
# define GLM_HAS_UNRESTRICTED_UNIONS __has_feature(cxx_unrestricted_unions)
-#elif GLM_LANG & (GLM_LANG_CXX11_FLAG | GLM_LANG_CXXMS_FLAG)
-# define GLM_HAS_UNRESTRICTED_UNIONS 1
-#else
+#elif GLM_LANG & (GLM_LANG_CXX11_FLAG | GLM_LANG_CXXMS_FLAG)*/
+# define GLM_HAS_UNRESTRICTED_UNIONS 0 // 1
+/*#else
# define GLM_HAS_UNRESTRICTED_UNIONS (GLM_LANG & GLM_LANG_CXX0X_FLAG) && (\
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_LANG & GLM_LANG_CXXMS_FLAG)) || \
((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2015)) || \
((GLM_COMPILER & GLM_COMPILER_CUDA) && (GLM_COMPILER >= GLM_COMPILER_CUDA75)) || \
((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC46)))
-#endif
+#endif*/
// N2346
#if GLM_COMPILER & GLM_COMPILER_LLVM
// -- Data --
-# if GLM_HAS_UNRESTRICTED_UNIONS
+/*# if GLM_HAS_UNRESTRICTED_UNIONS
union
{
struct{ T x, y; };
_GLM_SWIZZLE2_4_MEMBERS(T, P, tvec4, s, t)
# endif//GLM_SWIZZLE
};
-# else
+# else*/
union {T x, r, s;};
union {T y, g, t;};
# ifdef GLM_SWIZZLE
GLM_SWIZZLE_GEN_VEC_FROM_VEC2(T, P, tvec2, tvec2, tvec3, tvec4)
# endif//GLM_SWIZZLE
-# endif
+//# endif
// -- Component accesses --
*/
void waitForDialog(void) {
- while (dialogBoxExists);
+ while (dialogBoxExists)
+ std::this_thread::sleep_for(std::chrono::milliseconds(1));
}
void waitForCover(void) {
std::vector<std::pair<vec2,vec3>> c;
for (int i = iStart; i < iEnd; i++) {
+
+ // world switching changes world data size, render doesn't know
+ // because it's in a different thread, I guess. make sure we don't
+ // die:
+ if (i > static_cast<int>(world.data.size()))
+ return; // death for a frame is okay, right?
+
+
if (world.data[i].groundHeight <= 0) { // TODO holes (andy)
world.data[i].groundHeight = GROUND_HEIGHT_MINIMUM - 1;
glColor4ub(0, 0, 0, 255);
std::vector<GLfloat> grasst;
for (int i = iStart; i < iEnd; i++) {
+
+ if (i > static_cast<int>(world.data.size()))
+ return; // see dirt rendering
+
auto wd = world.data[i];
auto gh = wd.grassHeight;
void WorldSystem::goWorldRight(Position& p, Solid &d)
{
if (!(world.toRight.empty()) && (p.x + d.width > world.startX * -1 - HLINES(15))) {
- BREAKPOINT;
ui::toggleBlack();
ui::waitForCover();
auto file = world.toRight;