diff --git a/demos/tutorial/01_triangle.cpp b/demos/tutorial/01_triangle.cpp index 364821e0..baef34e6 100644 --- a/demos/tutorial/01_triangle.cpp +++ b/demos/tutorial/01_triangle.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "loldebug.h" using namespace std; diff --git a/demos/tutorial/02_cube.cpp b/demos/tutorial/02_cube.cpp index 2b4c44e8..b1c6a666 100644 --- a/demos/tutorial/02_cube.cpp +++ b/demos/tutorial/02_cube.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "loldebug.h" using namespace std; diff --git a/demos/tutorial/03_noise.cpp b/demos/tutorial/03_noise.cpp index 8e2035f2..3334119f 100644 --- a/demos/tutorial/03_noise.cpp +++ b/demos/tutorial/03_noise.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "loldebug.h" using namespace std; diff --git a/demos/tutorial/04_texture.cpp b/demos/tutorial/04_texture.cpp index e7d2f3cf..bc9bb268 100644 --- a/demos/tutorial/04_texture.cpp +++ b/demos/tutorial/04_texture.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "loldebug.h" using namespace std; diff --git a/demos/tutorial/05_easymesh.cpp b/demos/tutorial/05_easymesh.cpp index 5196d795..9e1787f5 100644 --- a/demos/tutorial/05_easymesh.cpp +++ b/demos/tutorial/05_easymesh.cpp @@ -13,7 +13,7 @@ # include "config.h" #endif -#include "core.h" +#include using namespace std; using namespace lol; diff --git a/demos/tutorial/06_sprite.cpp b/demos/tutorial/06_sprite.cpp index fa715a50..0cf1beb4 100644 --- a/demos/tutorial/06_sprite.cpp +++ b/demos/tutorial/06_sprite.cpp @@ -13,7 +13,7 @@ # include "config.h" #endif -#include "core.h" +#include using namespace std; using namespace lol; diff --git a/demos/tutorial/07_input.cpp b/demos/tutorial/07_input.cpp index 677bf2c9..e09b79a7 100644 --- a/demos/tutorial/07_input.cpp +++ b/demos/tutorial/07_input.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "loldebug.h" using namespace std; diff --git a/demos/tutorial/08_fbo.cpp b/demos/tutorial/08_fbo.cpp index a77f687d..283075f4 100644 --- a/demos/tutorial/08_fbo.cpp +++ b/demos/tutorial/08_fbo.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "loldebug.h" using namespace std; diff --git a/demos/tutorial/11_fractal.cpp b/demos/tutorial/11_fractal.cpp index 8db5a711..f3ceb53b 100644 --- a/demos/tutorial/11_fractal.cpp +++ b/demos/tutorial/11_fractal.cpp @@ -15,7 +15,7 @@ #include #include -#include "core.h" +#include #include "loldebug.h" using namespace lol; diff --git a/demos/tutorial/12_voronoi.cpp b/demos/tutorial/12_voronoi.cpp index 4cb5b8e6..3e1193aa 100644 --- a/demos/tutorial/12_voronoi.cpp +++ b/demos/tutorial/12_voronoi.cpp @@ -13,7 +13,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "loldebug.h" using namespace std; diff --git a/src/Makefile.am b/src/Makefile.am index 4bfc9ff8..749e1904 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -6,7 +6,7 @@ SUBDIRS = bullet lua data noinst_LIBRARIES = liblolcore.a liblolcore_a_SOURCES = \ - core.h tiler.cpp tiler.h dict.cpp dict.h \ + tiler.cpp tiler.h dict.cpp dict.h \ audio.cpp audio.h scene.cpp scene.h font.cpp font.h \ entity.cpp entity.h ticker.cpp ticker.h lolgl.h \ tileset.cpp tileset.h forge.cpp forge.h video.cpp video.h \ @@ -32,10 +32,13 @@ EXTRA_DIST += easymesh/easymesh-scanner.l easymesh/easymesh-parser.y \ gpu/lolfx-scanner.l gpu/lolfx-parser.y liblolcore_headers = \ + lol/main.h lol/engine.h lol/extras.h \ + lol/unit.h \ + \ lol/base/all.h \ - lol/base/log.h lol/base/array.h lol/base/types.h lol/base/array.h \ + lol/base/features.h lol/base/array.h lol/base/types.h lol/base/array.h \ lol/base/assert.h lol/base/string.h lol/base/hash.h lol/base/map.h \ - lol/base/enum.h \ + lol/base/enum.h lol/base/log.h \ \ lol/math/all.h \ lol/math/functions.h lol/math/vector.h lol/math/half.h lol/math/real.h \ @@ -57,9 +60,7 @@ liblolcore_headers = \ lol/gpu/renderer.h lol/gpu/rendercontext.h \ \ lol/debug/all.h \ - lol/debug/lines.h \ - \ - lol/unit.h + lol/debug/lines.h liblolcore_sources = \ generated/location.hh generated/position.hh generated/stack.hh \ diff --git a/src/application/application.cpp b/src/application/application.cpp index 7dc904a6..231857df 100644 --- a/src/application/application.cpp +++ b/src/application/application.cpp @@ -16,7 +16,7 @@ # include #endif -#include "core.h" +#include #include "lolgl.h" diff --git a/src/audio.cpp b/src/audio.cpp index 5ea07481..07acd10f 100644 --- a/src/audio.cpp +++ b/src/audio.cpp @@ -25,7 +25,7 @@ # endif #endif -#include "core.h" +#include namespace lol { diff --git a/src/base/assert.cpp b/src/base/assert.cpp index 27827b45..aad0c0da 100644 --- a/src/base/assert.cpp +++ b/src/base/assert.cpp @@ -23,7 +23,7 @@ # include #endif -#include "core.h" +#include namespace lol { diff --git a/src/base/enum.cpp b/src/base/enum.cpp index 2d6ac658..f47d3d87 100644 --- a/src/base/enum.cpp +++ b/src/base/enum.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include namespace lol { diff --git a/src/base/hash.cpp b/src/base/hash.cpp index 0ca51f14..e6809278 100644 --- a/src/base/hash.cpp +++ b/src/base/hash.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include namespace lol { diff --git a/src/base/log.cpp b/src/base/log.cpp index ae6d7723..2eecb2f8 100644 --- a/src/base/log.cpp +++ b/src/base/log.cpp @@ -26,7 +26,7 @@ # include #endif -#include "core.h" +#include namespace lol { diff --git a/src/base/string.cpp b/src/base/string.cpp index d00a9396..f0bc6625 100644 --- a/src/base/string.cpp +++ b/src/base/string.cpp @@ -21,7 +21,7 @@ #include -#include "core.h" +#include namespace lol { diff --git a/src/camera.cpp b/src/camera.cpp index c09ae5c2..8d895fe8 100644 --- a/src/camera.cpp +++ b/src/camera.cpp @@ -16,7 +16,7 @@ #include #include -#include "core.h" +#include #if defined _WIN32 || defined _XBOX # define strcasecmp _stricmp diff --git a/src/core.h b/src/core.h deleted file mode 100644 index 84b29958..00000000 --- a/src/core.h +++ /dev/null @@ -1,211 +0,0 @@ -// -// Lol Engine -// -// Copyright: (c) 2010-2013 Sam Hocevar -// This program is free software; you can redistribute it and/or -// modify it under the terms of the Do What The Fuck You Want To -// Public License, Version 2, as published by Sam Hocevar. See -// http://www.wtfpl.net/ for more details. -// - -// -// The main header -// --------------- -// - -#if !defined __LOL_CORE_H__ -#define __LOL_CORE_H__ - -/* - * System and CPU features. - */ -#undef LOL_FEATURE_THREADS -#undef LOL_FEATURE_CHEAP_BRANCHES -#undef LOL_FEATURE_VERY_CHEAP_BRANCHES - -#if !defined EMSCRIPTEN -# define LOL_FEATURE_THREADS 1 -#endif - -#if !defined __CELLOS_LV2__ -# define LOL_FEATURE_CHEAP_BRANCHES 1 -#endif - - -/* - * Check for C++11 features. - */ -#undef LOL_FEATURE_CXX11_CONSTEXPR -#undef LOL_FEATURE_CXX11_ISNAN - -#if defined __GNUC__ /* GCC */ -# if defined(__GXX_EXPERIMENTAL_CXX0X) || __cplusplus >= 201103L -# define LOL_FEATURE_CXX11_CONSTEXPR 1 -# define LOL_FEATURE_CXX11_ISNAN 1 -# endif - -#elif defined _MSC_VER /* Visual Studio */ - /* Even Visual Studio 2012 doesn't support constexpr. Idiots. */ - -#elif defined __has_feature /* Clang */ -# if __has_feature(cxx_constexpr) -# define LOL_FEATURE_CXX11_CONSTEXPR 1 -# endif -#endif - -#if LOL_FEATURE_CXX11_CONSTEXPR -# define LOL_CONSTEXPR constexpr -#else -# define LOL_CONSTEXPR /* Nothing */ -#endif - - -// Optimisation helpers -#if defined __GNUC__ -# define __likely(x) __builtin_expect(!!(x), 1) -# define __unlikely(x) __builtin_expect(!!(x), 0) -# define INLINEATTR __attribute__((always_inline)) -# if defined __CELLOS_LV2__ && !defined __SNC__ -# define FP_USE(x) __asm__("" : "+f" (x)) -# elif defined __x86_64__ -# define FP_USE(x) __asm__("" : "+x" (x)) -# elif defined __i386__ /* FIXME: this isn't good */ -# define FP_USE(x) __asm__("" : "+m" (x)) -# else -# define FP_USE(x) (void)(x) -# endif -#else -# define __likely(x) x -# define __unlikely(x) x -# define INLINEATTR -# define FP_USE(x) (void)(x) -#endif - - -/* Ensure we have nullptr */ -#if defined nullptr - /* do nothing */ -#elif defined __GNUC__ -# define nullptr __null -#else -# include -# define nullptr NULL -#endif - - -/* Ensure we have ssize_t */ -#if defined ssize_t - /* Do nothing, someone knows better than us it seems */ -#elif HAVE_SYS_TYPES_H -# include -#elif _MSC_VER /* Visual Studio compiler */ -# include -# define _MSC_STDINT_H_ -typedef SSIZE_T ssize_t; -#endif - - -/* Ensure isnan() is present even on systems that don't define it, or - * when -ffast-math is being used. */ -#include -#if defined __FAST_MATH__ -# undef isnan -#endif -#if !defined isnan && !defined LOL_FEATURE_CXX11_ISNAN -# define isnan isnan -# include -static inline int isnan(float f) -{ - union { float f; uint32_t x; } u = { f }; - return (u.x << 1) > 0xff000000u; -} -#endif - - -/* XXX: workaround for a compilation bug in NaCl headers */ -#if defined __native_client__ -# define typeid(x) (*(type_info*)nullptr) -#endif - - -/* XXX: workaround for X11 headers that try to #define these */ -#undef Always -#define Always Always -#undef None -#define None None - - -/* External declaration for LolFx files. */ -#define LOLFX_RESOURCE_DECLARE(name) \ - extern "C" char const *lolfx_resource_##name -#define LOLFX_RESOURCE_HELPER(name) #name ".lolfx" -#define LOLFX_RESOURCE_NAME(name) \ - LOLFX_RESOURCE_HELPER(name), lolfx_resource_##name - -/* If using NaCl or Android, override main() with our version */ -#if defined __native_client__ -# define main lol_nacl_main -#elif defined __ANDROID__ -# define main lol_android_main -#endif - -/* If using SDL on Windows or OS X, let it override main() */ -#if defined USE_SDL && (defined _WIN32 || defined __APPLE__) -# include -#endif - -// Base types -#include -#include -#include -#include -#include -#include -#include - -#include "utils.h" -#include "numeric.h" - -// Static classes -#include "platform.h" -#include "video.h" -#include "audio.h" -#include "scene.h" -#include "profiler.h" -#include "messageservice.h" - -// Input -#include "input/input.h" -#include "input/controller.h" - -// Entities -#include "entity.h" -#include "worldentity.h" - -#include "camera.h" -#include "light.h" -#include "emitter.h" -#include "font.h" -#include "gradient.h" -#include "sample.h" -#include "sprite.h" -#include "text.h" -#include "tileset.h" -#include "world.h" - -// Other objects -#include "dict.h" -#include "mesh/mesh.h" -#include "mesh/primitive.h" -#include "application/application.h" -#include "easymesh/csgbsp.h" -#include "easymesh/easymesh.h" - -// Managers -#include "ticker.h" -#include "forge.h" -#include "tiler.h" -#include "sampler.h" - -#endif // __LOL_CORE_H__ - diff --git a/src/debug/fps.cpp b/src/debug/fps.cpp index 3c71c1dc..86755eef 100644 --- a/src/debug/fps.cpp +++ b/src/debug/fps.cpp @@ -14,7 +14,7 @@ #include -#include "core.h" +#include #include "loldebug.h" using namespace std; diff --git a/src/debug/lines.cpp b/src/debug/lines.cpp index 9fed2409..958def94 100644 --- a/src/debug/lines.cpp +++ b/src/debug/lines.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include namespace lol { diff --git a/src/debug/record.cpp b/src/debug/record.cpp index 1a31e42b..5dd6b7ff 100644 --- a/src/debug/record.cpp +++ b/src/debug/record.cpp @@ -18,7 +18,7 @@ # include #endif -#include "core.h" +#include #include "loldebug.h" using namespace std; diff --git a/src/debug/stats.cpp b/src/debug/stats.cpp index dcf35889..6d5a4d58 100644 --- a/src/debug/stats.cpp +++ b/src/debug/stats.cpp @@ -14,7 +14,7 @@ #include -#include "core.h" +#include #include "loldebug.h" using namespace std; diff --git a/src/dict.cpp b/src/dict.cpp index 3e83c547..7c3474b1 100644 --- a/src/dict.cpp +++ b/src/dict.cpp @@ -15,7 +15,7 @@ #include #include -#include "core.h" +#include #if defined _WIN32 || defined _XBOX # define strcasecmp _stricmp diff --git a/src/easymesh/csgbsp.cpp b/src/easymesh/csgbsp.cpp index 334833a2..1ef14f17 100644 --- a/src/easymesh/csgbsp.cpp +++ b/src/easymesh/csgbsp.cpp @@ -18,7 +18,7 @@ # include "config.h" #endif -#include "core.h" +#include #include namespace lol diff --git a/src/easymesh/easymesh-compiler.cpp b/src/easymesh/easymesh-compiler.cpp index d4f5df79..5eff8549 100644 --- a/src/easymesh/easymesh-compiler.cpp +++ b/src/easymesh/easymesh-compiler.cpp @@ -16,7 +16,7 @@ #include -#include "core.h" +#include #include "easymesh/easymesh-compiler.h" namespace lol diff --git a/src/easymesh/easymesh.cpp b/src/easymesh/easymesh.cpp index 963d0855..d85bace7 100644 --- a/src/easymesh/easymesh.cpp +++ b/src/easymesh/easymesh.cpp @@ -19,7 +19,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "easymesh/easymesh-compiler.h" LOLFX_RESOURCE_DECLARE(shiny); diff --git a/src/easymesh/easymeshbuild.cpp b/src/easymesh/easymeshbuild.cpp index e41465ad..8056a112 100644 --- a/src/easymesh/easymeshbuild.cpp +++ b/src/easymesh/easymeshbuild.cpp @@ -19,7 +19,7 @@ # include "config.h" #endif -#include "core.h" +#include namespace lol { diff --git a/src/easymesh/easymeshrender.cpp b/src/easymesh/easymeshrender.cpp index 993d4b0e..8b330c46 100644 --- a/src/easymesh/easymeshrender.cpp +++ b/src/easymesh/easymeshrender.cpp @@ -19,7 +19,7 @@ # include "config.h" #endif -#include "core.h" +#include namespace lol { diff --git a/src/eglapp.cpp b/src/eglapp.cpp index 7a1b0751..78dcc189 100644 --- a/src/eglapp.cpp +++ b/src/eglapp.cpp @@ -32,7 +32,7 @@ # endif #endif -#include "core.h" +#include #include "lolgl.h" #include "eglapp.h" #if defined USE_SDL diff --git a/src/emitter.cpp b/src/emitter.cpp index b5b92ab5..2b3a8ab0 100644 --- a/src/emitter.cpp +++ b/src/emitter.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include namespace lol { diff --git a/src/entity.cpp b/src/entity.cpp index 18a8d534..714220c6 100644 --- a/src/entity.cpp +++ b/src/entity.cpp @@ -14,7 +14,7 @@ #include -#include "core.h" +#include namespace lol { diff --git a/src/font.cpp b/src/font.cpp index 62c6d00b..9a3454f5 100644 --- a/src/font.cpp +++ b/src/font.cpp @@ -16,7 +16,7 @@ #include #include -#include "core.h" +#include using namespace std; diff --git a/src/forge.cpp b/src/forge.cpp index be409f85..023e1b61 100644 --- a/src/forge.cpp +++ b/src/forge.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include namespace lol { diff --git a/src/generated/easymesh-parser.cpp b/src/generated/easymesh-parser.cpp index 0e7c0d58..c8147853 100644 --- a/src/generated/easymesh-parser.cpp +++ b/src/generated/easymesh-parser.cpp @@ -54,7 +54,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "easymesh/easymesh.h" #include diff --git a/src/generated/easymesh-scanner.cpp b/src/generated/easymesh-scanner.cpp index 0045c98f..1955469b 100644 --- a/src/generated/easymesh-scanner.cpp +++ b/src/generated/easymesh-scanner.cpp @@ -668,7 +668,7 @@ using std::malloc; using std::realloc; using std::free; -#include "core.h" +#include #include "easymesh/easymesh-compiler.h" typedef lol::EasyMeshParser::token token; diff --git a/src/generated/lolfx-parser.cpp b/src/generated/lolfx-parser.cpp index 20a5ce8c..942a30c7 100644 --- a/src/generated/lolfx-parser.cpp +++ b/src/generated/lolfx-parser.cpp @@ -52,7 +52,7 @@ # include "config.h" #endif -#include "core.h" +#include #include diff --git a/src/generated/lolfx-scanner.cpp b/src/generated/lolfx-scanner.cpp index f1bae3f2..35938cc8 100644 --- a/src/generated/lolfx-scanner.cpp +++ b/src/generated/lolfx-scanner.cpp @@ -1672,7 +1672,7 @@ using std::realloc; using std::free; #include -#include "core.h" +#include #include "gpu/lolfx-compiler.h" typedef lol::LolFxParser::token token; diff --git a/src/gpu/framebuffer.cpp b/src/gpu/framebuffer.cpp index f96163ad..7748e463 100644 --- a/src/gpu/framebuffer.cpp +++ b/src/gpu/framebuffer.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lolgl.h" #if defined _WIN32 && defined USE_D3D9 diff --git a/src/gpu/indexbuffer.cpp b/src/gpu/indexbuffer.cpp index fa039ffd..0c7f0b79 100644 --- a/src/gpu/indexbuffer.cpp +++ b/src/gpu/indexbuffer.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lolgl.h" #if defined _WIN32 && defined USE_D3D9 diff --git a/src/gpu/lolfx-compiler.cpp b/src/gpu/lolfx-compiler.cpp index 045d376b..57c2ab28 100644 --- a/src/gpu/lolfx-compiler.cpp +++ b/src/gpu/lolfx-compiler.cpp @@ -14,7 +14,7 @@ #include -#include "core.h" +#include #include "gpu/lolfx-compiler.h" namespace lol diff --git a/src/gpu/lolfx.cpp b/src/gpu/lolfx.cpp index 8298c55d..881369a8 100644 --- a/src/gpu/lolfx.cpp +++ b/src/gpu/lolfx.cpp @@ -17,7 +17,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "gpu/lolfx-compiler.h" namespace lol diff --git a/src/gpu/rendercontext.cpp b/src/gpu/rendercontext.cpp index 50483709..8ecf2fc7 100644 --- a/src/gpu/rendercontext.cpp +++ b/src/gpu/rendercontext.cpp @@ -14,7 +14,7 @@ #include -#include "core.h" +#include namespace lol { diff --git a/src/gpu/renderer.cpp b/src/gpu/renderer.cpp index 915762e3..37de0229 100755 --- a/src/gpu/renderer.cpp +++ b/src/gpu/renderer.cpp @@ -28,7 +28,7 @@ # undef far /* Fuck Microsoft again */ #endif -#include "core.h" +#include #include "lolgl.h" /* FIXME: find a way to pass g_hwnd from the windowing system */ diff --git a/src/gpu/shader.cpp b/src/gpu/shader.cpp index 2353e869..cc014269 100644 --- a/src/gpu/shader.cpp +++ b/src/gpu/shader.cpp @@ -31,7 +31,7 @@ # undef far /* Fuck Microsoft again */ #endif -#include "core.h" +#include #include "lolgl.h" using namespace std; diff --git a/src/gpu/texture.cpp b/src/gpu/texture.cpp index 08307126..1ba1a3de 100644 --- a/src/gpu/texture.cpp +++ b/src/gpu/texture.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lolgl.h" #if defined _WIN32 && defined USE_D3D9 diff --git a/src/gpu/vertexbuffer.cpp b/src/gpu/vertexbuffer.cpp index c4778445..e41d42f8 100644 --- a/src/gpu/vertexbuffer.cpp +++ b/src/gpu/vertexbuffer.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lolgl.h" #if defined _WIN32 && defined USE_D3D9 diff --git a/src/gradient.cpp b/src/gradient.cpp index 5d7ad99a..a7d3878a 100644 --- a/src/gradient.cpp +++ b/src/gradient.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include using namespace std; diff --git a/src/image/codec/android-image.cpp b/src/image/codec/android-image.cpp index 564a5b3c..cdbbdfb1 100644 --- a/src/image/codec/android-image.cpp +++ b/src/image/codec/android-image.cpp @@ -21,7 +21,7 @@ extern "C" { #include } -#include "core.h" +#include #include "../../image/image-private.h" using namespace std; diff --git a/src/image/codec/dummy-image.cpp b/src/image/codec/dummy-image.cpp index fc971dfd..48bbbeb5 100644 --- a/src/image/codec/dummy-image.cpp +++ b/src/image/codec/dummy-image.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "../../image/image-private.h" using namespace std; diff --git a/src/image/codec/gdiplus-image.cpp b/src/image/codec/gdiplus-image.cpp index 95d5bca4..4454a665 100644 --- a/src/image/codec/gdiplus-image.cpp +++ b/src/image/codec/gdiplus-image.cpp @@ -21,7 +21,7 @@ using namespace std; #include #include -#include "core.h" +#include #include "../../image/image-private.h" namespace lol diff --git a/src/image/codec/imlib2-image.cpp b/src/image/codec/imlib2-image.cpp index 0cb7ebcf..b3cc533a 100644 --- a/src/image/codec/imlib2-image.cpp +++ b/src/image/codec/imlib2-image.cpp @@ -16,7 +16,7 @@ #include -#include "core.h" +#include #include "../../image/image-private.h" using namespace std; diff --git a/src/image/codec/ios-image.cpp b/src/image/codec/ios-image.cpp index 98ff26fd..cbadd6be 100644 --- a/src/image/codec/ios-image.cpp +++ b/src/image/codec/ios-image.cpp @@ -16,7 +16,7 @@ #import -#include "core.h" +#include #include "../../image/image-private.h" using namespace std; diff --git a/src/image/codec/oric-image.cpp b/src/image/codec/oric-image.cpp index 2e25b340..cd1644f9 100644 --- a/src/image/codec/oric-image.cpp +++ b/src/image/codec/oric-image.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "../../image/image-private.h" using namespace std; diff --git a/src/image/codec/ps3-image.cpp b/src/image/codec/ps3-image.cpp index afa6444e..42efaeb4 100644 --- a/src/image/codec/ps3-image.cpp +++ b/src/image/codec/ps3-image.cpp @@ -18,7 +18,7 @@ #include #include -#include "core.h" +#include #include "../../image/image-private.h" using namespace std; diff --git a/src/image/codec/sdl-image.cpp b/src/image/codec/sdl-image.cpp index a92083f7..915695fa 100644 --- a/src/image/codec/sdl-image.cpp +++ b/src/image/codec/sdl-image.cpp @@ -25,7 +25,7 @@ # include #endif -#include "core.h" +#include #include "../../image/image-private.h" using namespace std; diff --git a/src/image/codec/zed-image.cpp b/src/image/codec/zed-image.cpp index 3ecc3c96..3539a20b 100644 --- a/src/image/codec/zed-image.cpp +++ b/src/image/codec/zed-image.cpp @@ -13,7 +13,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "../../image/image-private.h" using namespace std; diff --git a/src/image/codec/zed-palette-image.cpp b/src/image/codec/zed-palette-image.cpp index ec800291..016169e3 100644 --- a/src/image/codec/zed-palette-image.cpp +++ b/src/image/codec/zed-palette-image.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "../../image/image-private.h" using namespace std; diff --git a/src/image/color/cie1931.cpp b/src/image/color/cie1931.cpp index 345a077f..dbc6e5ab 100644 --- a/src/image/color/cie1931.cpp +++ b/src/image/color/cie1931.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include /* * This file contains code and data related to various CIE standards. diff --git a/src/image/color/color.cpp b/src/image/color/color.cpp index 1c0bbf1d..2c2c4e21 100644 --- a/src/image/color/color.cpp +++ b/src/image/color/color.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include namespace lol { diff --git a/src/image/combine.cpp b/src/image/combine.cpp index 3c3fc73c..f6e7bffd 100644 --- a/src/image/combine.cpp +++ b/src/image/combine.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include /* * Image merge operations: merge, min/max, overlay, screen, multiply, diff --git a/src/image/crop.cpp b/src/image/crop.cpp index 4334102f..312ff71f 100644 --- a/src/image/crop.cpp +++ b/src/image/crop.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "image-private.h" /* diff --git a/src/image/dither/dbs.cpp b/src/image/dither/dbs.cpp index a25a0ff8..6125b338 100644 --- a/src/image/dither/dbs.cpp +++ b/src/image/dither/dbs.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include /* * Direct Binary Search dithering diff --git a/src/image/dither/ediff.cpp b/src/image/dither/ediff.cpp index 58ec2d77..3deb7b8a 100644 --- a/src/image/dither/ediff.cpp +++ b/src/image/dither/ediff.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include /* * Generic error diffusion functions diff --git a/src/image/dither/ordered.cpp b/src/image/dither/ordered.cpp index 73d954ee..7a7d1850 100644 --- a/src/image/dither/ordered.cpp +++ b/src/image/dither/ordered.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include /* * Bayer ordered dithering functions diff --git a/src/image/dither/ostromoukhov.cpp b/src/image/dither/ostromoukhov.cpp index 4a3c8652..9f886e7d 100644 --- a/src/image/dither/ostromoukhov.cpp +++ b/src/image/dither/ostromoukhov.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include /* * Ostromoukhov dithering functions diff --git a/src/image/dither/random.cpp b/src/image/dither/random.cpp index 4e5106f6..3d6e7be4 100644 --- a/src/image/dither/random.cpp +++ b/src/image/dither/random.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include /* * Random dithering diff --git a/src/image/filter/color.cpp b/src/image/filter/color.cpp index 60c23452..0f36cbbf 100644 --- a/src/image/filter/color.cpp +++ b/src/image/filter/color.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include /* * Colour manipulation functions diff --git a/src/image/filter/convolution.cpp b/src/image/filter/convolution.cpp index 6746f6fc..bf53b8dc 100644 --- a/src/image/filter/convolution.cpp +++ b/src/image/filter/convolution.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include /* * Generic convolution functions diff --git a/src/image/filter/dilate.cpp b/src/image/filter/dilate.cpp index 64447551..2991bd1a 100644 --- a/src/image/filter/dilate.cpp +++ b/src/image/filter/dilate.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include /* * Dilate and erode functions diff --git a/src/image/filter/median.cpp b/src/image/filter/median.cpp index 5310f9bf..205882b9 100644 --- a/src/image/filter/median.cpp +++ b/src/image/filter/median.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include /* * Median filter functions diff --git a/src/image/filter/yuv.cpp b/src/image/filter/yuv.cpp index 812bff03..0df2a56f 100644 --- a/src/image/filter/yuv.cpp +++ b/src/image/filter/yuv.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include /* * YUV conversion functions diff --git a/src/image/image.cpp b/src/image/image.cpp index 2fb07fc6..821f2f0a 100644 --- a/src/image/image.cpp +++ b/src/image/image.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "image-private.h" #include /* for std::swap */ diff --git a/src/image/kernel.cpp b/src/image/kernel.cpp index d2000dc2..db4f7093 100644 --- a/src/image/kernel.cpp +++ b/src/image/kernel.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include /* * Stock kernels diff --git a/src/image/noise.cpp b/src/image/noise.cpp index ca79cea7..d2572feb 100644 --- a/src/image/noise.cpp +++ b/src/image/noise.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include /* * Noise rendering functions diff --git a/src/image/pixel.cpp b/src/image/pixel.cpp index 9a1113fe..7eb3cf0c 100644 --- a/src/image/pixel.cpp +++ b/src/image/pixel.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "image-private.h" namespace lol diff --git a/src/image/resample.cpp b/src/image/resample.cpp index 69cb0788..6b594ad2 100644 --- a/src/image/resample.cpp +++ b/src/image/resample.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include /* * Image resizing functions diff --git a/src/input/controller.cpp b/src/input/controller.cpp index 6b8e8515..ef0ec821 100644 --- a/src/input/controller.cpp +++ b/src/input/controller.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include namespace lol { diff --git a/src/input/controller.h b/src/input/controller.h index fc08316a..79b9faef 100644 --- a/src/input/controller.h +++ b/src/input/controller.h @@ -11,7 +11,7 @@ #if !defined __LOL_INPUT_CONTROLLER_H__ #define __LOL_INPUT_CONTROLLER_H__ -#include "core.h" +#include namespace lol { diff --git a/src/input/input.cpp b/src/input/input.cpp index c1ad54df..c34fe9f3 100644 --- a/src/input/input.cpp +++ b/src/input/input.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "input/input_internal.h" diff --git a/src/input/input.h b/src/input/input.h index ca146ba8..2a189338 100644 --- a/src/input/input.h +++ b/src/input/input.h @@ -11,7 +11,7 @@ #if !defined __LOL_INPUT_H__ #define __LOL_INPUT_H__ -#include "core.h" +#include namespace lol { diff --git a/src/input/input_internal.h b/src/input/input_internal.h index 0d554052..4a32cd3d 100644 --- a/src/input/input_internal.h +++ b/src/input/input_internal.h @@ -11,7 +11,7 @@ #if !defined __LOL_INPUT_DEVICE_INTERNAL_H__ #define __LOL_INPUT_DEVICE_H__ -#include "core.h" +#include namespace lol { diff --git a/src/light.cpp b/src/light.cpp index b24b401a..003c2389 100644 --- a/src/light.cpp +++ b/src/light.cpp @@ -15,7 +15,7 @@ #include #include -#include "core.h" +#include namespace lol { diff --git a/src/lol/base/all.h b/src/lol/base/all.h index dd851359..029b37cd 100644 --- a/src/lol/base/all.h +++ b/src/lol/base/all.h @@ -11,6 +11,7 @@ #if !defined __LOL_BASE_ALL_H__ #define __LOL_BASE_ALL_H__ +#include #include #include #include diff --git a/src/lol/base/array.h b/src/lol/base/array.h index 5b03b419..b455664b 100644 --- a/src/lol/base/array.h +++ b/src/lol/base/array.h @@ -29,9 +29,6 @@ namespace lol { -/* Set this to 1 when Visual Studio finally understands the feature */ -#define INHERIT_CONSTRUCTORS 0 - #define INDEX_NONE -1 /* @@ -551,7 +548,7 @@ template, array> { -#if INHERIT_CONSTRUCTORS +#if LOL_FEATURE_CXX11_INHERIT_CONSTRUCTORS using array_base, array>::array_base; #else @@ -606,7 +603,7 @@ class array : public array_base, array> { -#if INHERIT_CONSTRUCTORS +#if LOL_FEATURE_CXX11_INHERIT_CONSTRUCTORS using array_base, array>::array_base; #else @@ -659,7 +656,7 @@ class array : public array_base, array> { -#if INHERIT_CONSTRUCTORS +#if LOL_FEATURE_CXX11_INHERIT_CONSTRUCTORS using array_base, array>::array_base; #else @@ -709,7 +706,7 @@ class array : public array_base, array> { -#if INHERIT_CONSTRUCTORS +#if LOL_FEATURE_CXX11_INHERIT_CONSTRUCTORS using array_base, array>::array_base; #else @@ -757,7 +754,7 @@ class array : public array_base, array> { -#if INHERIT_CONSTRUCTORS +#if LOL_FEATURE_CXX11_INHERIT_CONSTRUCTORS using array_base, array>::array_base; #else @@ -801,7 +798,7 @@ class array : public array_base, array> { -#if INHERIT_CONSTRUCTORS +#if LOL_FEATURE_CXX11_INHERIT_CONSTRUCTORS using array_base, array>::array_base; #else @@ -843,7 +840,7 @@ class array : public array_base, array> { -#if INHERIT_CONSTRUCTORS +#if LOL_FEATURE_CXX11_INHERIT_CONSTRUCTORS using array_base, array>::array_base; #else @@ -883,7 +880,7 @@ class array : public array_base> { -#if INHERIT_CONSTRUCTORS +#if LOL_FEATURE_CXX11_INHERIT_CONSTRUCTORS using array_base>::array_base; #else diff --git a/src/lol/base/features.h b/src/lol/base/features.h new file mode 100644 index 00000000..4289ee86 --- /dev/null +++ b/src/lol/base/features.h @@ -0,0 +1,132 @@ +// +// Lol Engine +// +// Copyright: (c) 2010-2014 Sam Hocevar +// This program is free software; you can redistribute it and/or +// modify it under the terms of the Do What The Fuck You Want To +// Public License, Version 2, as published by Sam Hocevar. See +// http://www.wtfpl.net/ for more details. +// + +// +// The build-time features +// ----------------------- +// + +#if !defined __LOL_BASE_FEATURES_H__ +#define __LOL_BASE_FEATURES_H__ + +/* + * System and CPU features. + */ +#define LOL_FEATURE_THREADS 1 +#define LOL_FEATURE_CHEAP_BRANCHES 1 +#define LOL_FEATURE_VERY_CHEAP_BRANCHES 0 + +#if defined EMSCRIPTEN +# undef LOL_FEATURE_THREADS +# define LOL_FEATURE_THREADS 0 +#endif + +#if defined __CELLOS_LV2__ +# undef LOL_FEATURE_CHEAP_BRANCHES +# define LOL_FEATURE_CHEAP_BRANCHES 0 +#endif + + +/* + * Check for C++11 features. + */ + +/* Set these to 1 when Visual Studio finally understands the features + * (planned for Visual Studion 14) */ +#define LOL_FEATURE_CXX11_RELAXED_UNIONS 0 +#define LOL_FEATURE_CXX11_INHERIT_CONSTRUCTORS 0 +#define LOL_FEATURE_CXX11_CONSTEXPR 0 +#define LOL_FEATURE_CXX11_ISNAN 0 + +#if defined __GNUC__ /* GCC */ +# if defined(__GXX_EXPERIMENTAL_CXX0X) || __cplusplus >= 201103L +# undef LOL_FEATURE_CXX11_CONSTEXPR +# define LOL_FEATURE_CXX11_CONSTEXPR 1 +# undef LOL_FEATURE_CXX11_ISNAN +# define LOL_FEATURE_CXX11_ISNAN 1 +# endif +#elif defined __has_feature /* Clang */ +# if __has_feature(cxx_constexpr) +# undef LOL_FEATURE_CXX11_CONSTEXPR +# define LOL_FEATURE_CXX11_CONSTEXPR 1 +# endif +#endif + +#if LOL_FEATURE_CXX11_CONSTEXPR +# define LOL_CONSTEXPR constexpr +#else +# define LOL_CONSTEXPR /* Nothing */ +#endif + + +/* + * Ensure we have nullptr. + */ + +#if defined nullptr + /* do nothing */ +#elif defined __GNUC__ +# define nullptr __null +#else +# include +# define nullptr NULL +#endif + + +/* + * Ensure we have ssize_t. + */ + +#if defined ssize_t + /* Do nothing, someone knows better than us it seems */ +#elif HAVE_SYS_TYPES_H +# include +#elif _MSC_VER /* Visual Studio compiler */ +# include +# define _MSC_STDINT_H_ +typedef SSIZE_T ssize_t; +#endif + + +/* + * Ensure isnan() is present even on systems that don't define it, or + * when -ffast-math is being used. + */ + +#include +#if defined __FAST_MATH__ +# undef isnan +#endif +#if !defined isnan && !LOL_FEATURE_CXX11_ISNAN +# define isnan isnan +# include +static inline int isnan(float f) +{ + union { float f; uint32_t x; } u = { f }; + return (u.x << 1) > 0xff000000u; +} +#endif + + +/* XXX: workaround for a compilation bug in NaCl headers */ +#if defined __native_client__ +# define typeid(x) (*(type_info*)nullptr) +#endif + + +/* XXX: workaround for X11 headers that try to #define these */ +#undef Always +#define Always Always +#undef None +#define None None + + +#endif // __LOL_BASE_FEATURES_H__ + diff --git a/src/lol/engine.h b/src/lol/engine.h new file mode 100644 index 00000000..2c12bb37 --- /dev/null +++ b/src/lol/engine.h @@ -0,0 +1,28 @@ +// +// Lol Engine +// +// Copyright: (c) 2010-2014 Sam Hocevar +// This program is free software; you can redistribute it and/or +// modify it under the terms of the Do What The Fuck You Want To +// Public License, Version 2, as published by Sam Hocevar. See +// http://www.wtfpl.net/ for more details. +// + +// +// The main header +// --------------- +// + +#if !defined __LOL_ENGINE_H__ +#define __LOL_ENGINE_H__ + +#include +#include +#include +#include +#include +#include +#include + +#endif // __LOL_ENGINE_H__ + diff --git a/src/lol/extras.h b/src/lol/extras.h new file mode 100644 index 00000000..7f6f9bad --- /dev/null +++ b/src/lol/extras.h @@ -0,0 +1,64 @@ +// +// Lol Engine +// +// Copyright: (c) 2010-2014 Sam Hocevar +// This program is free software; you can redistribute it and/or +// modify it under the terms of the Do What The Fuck You Want To +// Public License, Version 2, as published by Sam Hocevar. See +// http://www.wtfpl.net/ for more details. +// + +// +// Extra includes that aren't proper part of the engine yet +// -------------------------------------------------------- +// + +#if !defined __LOL_EXTRAS_H__ +#define __LOL_EXTRAS_H__ + +#include +#include + +// Static classes +#include +#include +#include +#include +#include +#include + +// Input +#include +#include + +// Entities +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +// Other objects +#include +#include +#include +#include +#include +#include + +// Managers +#include +#include +#include +#include + +#endif // __LOL_EXTRAS_H__ + diff --git a/src/lol/gpu/shader.h b/src/lol/gpu/shader.h index 02184092..57003a2d 100644 --- a/src/lol/gpu/shader.h +++ b/src/lol/gpu/shader.h @@ -18,6 +18,13 @@ #include +/* External declaration for LolFx files. */ +#define LOLFX_RESOURCE_DECLARE(name) \ + extern "C" char const *lolfx_resource_##name +#define LOLFX_RESOURCE_HELPER(name) #name ".lolfx" +#define LOLFX_RESOURCE_NAME(name) \ + LOLFX_RESOURCE_HELPER(name), lolfx_resource_##name + namespace lol { diff --git a/src/lol/main.h b/src/lol/main.h new file mode 100644 index 00000000..b8dd22a9 --- /dev/null +++ b/src/lol/main.h @@ -0,0 +1,35 @@ +// +// Lol Engine +// +// Copyright: (c) 2010-2014 Sam Hocevar +// This program is free software; you can redistribute it and/or +// modify it under the terms of the Do What The Fuck You Want To +// Public License, Version 2, as published by Sam Hocevar. See +// http://www.wtfpl.net/ for more details. +// + +// +// The main header +// --------------- +// + +#if !defined __LOL_MAIN_H__ +#define __LOL_MAIN_H__ + +/* If using NaCl or Android, override main() with our version */ +#if defined __native_client__ +# define main lol_nacl_main +#elif defined __ANDROID__ +# define main lol_android_main +#endif + +/* If using SDL on Windows or OS X, let it override main() */ +#if defined USE_SDL && (defined _WIN32 || defined __APPLE__) +# include +#endif + +#include +#include + +#endif // __LOL_MAIN_H__ + diff --git a/src/lol/math/vector.h b/src/lol/math/vector.h index ca59b8fd..08220ea5 100644 --- a/src/lol/math/vector.h +++ b/src/lol/math/vector.h @@ -25,6 +25,20 @@ namespace lol { +#if !LOL_FEATURE_CXX11_RELAXED_UNIONS +# define _____ const +#else +# define _____ /* */ +#endif + +/* The generic "vec" type, which is a fixed-size vector */ +template +struct vec +{ +private: + T m_data[N]; +}; + #define LOL_VECTOR_TYPEDEFS(tname, suffix) \ template struct tname; \ typedef tname f16##suffix; \ @@ -88,7 +102,7 @@ template struct XVec2 { inline XVec2& operator =(Vec2 that); -#if 0 +#if LOL_FEATURE_CXX11_RELAXED_UNIONS inline XVec2& operator =(XVec2 const &that) { return *this = (Vec2)that; @@ -111,7 +125,7 @@ template struct XVec3 { inline XVec3& operator =(Vec3 that); -#if 0 +#if LOL_FEATURE_CXX11_RELAXED_UNIONS inline XVec3& operator =(XVec3 const &that) { return *this = (Vec3)that; @@ -134,7 +148,7 @@ template struct XVec4 { inline XVec4& operator =(Vec4 that); -#if 0 +#if LOL_FEATURE_CXX11_RELAXED_UNIONS inline XVec4& operator =(XVec4 const &that) { return *this = (Vec4)that; @@ -197,7 +211,6 @@ template struct BVec2 struct { T s, t; }; #if !_DOXYGEN_SKIP_ME -#define _____ const /* We’ll get rid of this with Visual Studio 14 */ XVec2 const xx, rr, ss; XVec2 _____ xy, rg, st; XVec2 _____ yx, gr, ts; @@ -228,7 +241,6 @@ template struct BVec2 XVec4 const yyxy, ggrg, ttst; XVec4 const yyyx, gggr, ttts; XVec4 const yyyy, gggg, tttt; -#undef _____ #endif }; }; @@ -360,7 +372,6 @@ template struct BVec3 struct { T s, t, p; }; #if !_DOXYGEN_SKIP_ME -#define _____ const /* We’ll get rid of this with Visual Studio 14 */ XVec2 const xx, rr, ss; XVec2 _____ xy, rg, st; XVec2 _____ xz, rb, sp; @@ -480,7 +491,6 @@ template struct BVec3 XVec4 const zzzx, bbbr, ppps; XVec4 const zzzy, bbbg, pppt; XVec4 const zzzz, bbbb, pppp; -#undef _____ #endif }; }; @@ -561,7 +571,6 @@ template struct BVec4 struct { T s, t, p, q; }; #if !_DOXYGEN_SKIP_ME -#define _____ const /* We’ll get rid of this with Visual Studio 14 */ XVec2 const xx, rr, ss; XVec2 _____ xy, rg, st; XVec2 _____ xz, rb, sp; @@ -900,7 +909,6 @@ template struct BVec4 XVec4 const wwwy, aaag, qqqt; XVec4 const wwwz, aaab, qqqp; XVec4 const wwww, aaaa, qqqq; -#undef _____ #endif }; }; diff --git a/src/lolcore.vcxproj b/src/lolcore.vcxproj index c32e38ae..da0ea4e6 100644 --- a/src/lolcore.vcxproj +++ b/src/lolcore.vcxproj @@ -257,7 +257,6 @@ - @@ -295,6 +294,7 @@ + @@ -302,6 +302,8 @@ + + @@ -315,6 +317,7 @@ + diff --git a/src/lolcore.vcxproj.filters b/src/lolcore.vcxproj.filters index ef17e4a0..988ca612 100644 --- a/src/lolcore.vcxproj.filters +++ b/src/lolcore.vcxproj.filters @@ -450,6 +450,15 @@ lol\math + + lol + + + lol + + + lol + lol @@ -483,9 +492,6 @@ ... - - ... - ... @@ -603,6 +609,9 @@ lol\base + + lol\base + lol\base diff --git a/src/math/constants.cpp b/src/math/constants.cpp index a8a03849..de130023 100644 --- a/src/math/constants.cpp +++ b/src/math/constants.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include namespace lol { diff --git a/src/math/geometry.cpp b/src/math/geometry.cpp index b4617b67..cb273017 100644 --- a/src/math/geometry.cpp +++ b/src/math/geometry.cpp @@ -18,7 +18,7 @@ #include /* std::ostream */ -#include "core.h" +#include using namespace std; diff --git a/src/math/half.cpp b/src/math/half.cpp index 26844b25..3e313314 100644 --- a/src/math/half.cpp +++ b/src/math/half.cpp @@ -20,7 +20,7 @@ # endif #endif -#include "core.h" +#include using namespace std; diff --git a/src/math/real.cpp b/src/math/real.cpp index 52753a70..2dfe76ca 100644 --- a/src/math/real.cpp +++ b/src/math/real.cpp @@ -17,7 +17,7 @@ #include #include -#include "core.h" +#include using namespace std; diff --git a/src/math/trig.cpp b/src/math/trig.cpp index 0b4cba02..4d814018 100644 --- a/src/math/trig.cpp +++ b/src/math/trig.cpp @@ -16,10 +16,31 @@ # include #endif -#include "core.h" +#include using namespace std; +// Optimisation helpers +#if defined __GNUC__ +# define __likely(x) __builtin_expect(!!(x), 1) +# define __unlikely(x) __builtin_expect(!!(x), 0) +# define INLINEATTR __attribute__((always_inline)) +# if defined __CELLOS_LV2__ && !defined __SNC__ +# define FP_USE(x) __asm__("" : "+f" (x)) +# elif defined __x86_64__ +# define FP_USE(x) __asm__("" : "+x" (x)) +# elif defined __i386__ /* FIXME: this isn't good */ +# define FP_USE(x) __asm__("" : "+m" (x)) +# else +# define FP_USE(x) (void)(x) +# endif +#else +# define __likely(x) x +# define __unlikely(x) x +# define INLINEATTR +# define FP_USE(x) (void)(x) +#endif + namespace lol { @@ -235,7 +256,7 @@ double lol_sin(double x) /* If branches are cheap, skip the cycle count when |x| < π/4, * and only do the Taylor series up to the required precision. */ -#if defined LOL_FEATURE_CHEAP_BRANCHES +#if LOL_FEATURE_CHEAP_BRANCHES if (absx < QUARTER) { /* Computing x^4 is one multiplication too many we do, but it helps @@ -272,7 +293,7 @@ double lol_sin(double x) /* If branches are very cheap, we have the option to do the Taylor * series at a much lower degree by splitting. */ -#if defined LOL_FEATURE_VERY_CHEAP_BRANCHES +#if LOL_FEATURE_VERY_CHEAP_BRANCHES if (lol_fabs(absx) > QUARTER) { sign = (x * absx >= 0.0) ? sign : -sign; @@ -295,7 +316,7 @@ double lol_sin(double x) /* Compute a Tailor series for sin() and combine sign information. */ double x2 = absx * absx; double x4 = x2 * x2; -#if defined LOL_FEATURE_VERY_CHEAP_BRANCHES +#if LOL_FEATURE_VERY_CHEAP_BRANCHES double sub1 = (SC[3] * x4 + SC[1]) * x4 + ONE; double sub2 = (SC[4] * x4 + SC[2]) * x4 + SC[0]; #else @@ -311,7 +332,7 @@ double lol_cos(double x) { double absx = lol_fabs(x * INV_PI); -#if defined LOL_FEATURE_CHEAP_BRANCHES +#if LOL_FEATURE_CHEAP_BRANCHES if (absx < QUARTER) { double x2 = absx * absx; @@ -340,7 +361,7 @@ double lol_cos(double x) #endif absx -= num_cycles; -#if defined LOL_FEATURE_VERY_CHEAP_BRANCHES +#if LOL_FEATURE_VERY_CHEAP_BRANCHES if (lol_fabs(absx) > QUARTER) { double x1 = HALF - lol_fabs(absx); @@ -356,7 +377,7 @@ double lol_cos(double x) double x2 = absx * absx; double x4 = x2 * x2; -#if defined LOL_FEATURE_VERY_CHEAP_BRANCHES +#if LOL_FEATURE_VERY_CHEAP_BRANCHES double sub1 = ((CC[5] * x4 + CC[3]) * x4 + CC[1]) * x4 + ONE; double sub2 = (CC[4] * x4 + CC[2]) * x4 + CC[0]; #else @@ -372,7 +393,7 @@ void lol_sincos(double x, double *sinx, double *cosx) { double absx = lol_fabs(x * INV_PI); -#if defined LOL_FEATURE_CHEAP_BRANCHES +#if LOL_FEATURE_CHEAP_BRANCHES if (absx < QUARTER) { double x2 = absx * absx; @@ -416,7 +437,7 @@ void lol_sincos(double x, double *sinx, double *cosx) #endif absx -= num_cycles; -#if defined LOL_FEATURE_VERY_CHEAP_BRANCHES +#if LOL_FEATURE_VERY_CHEAP_BRANCHES if (lol_fabs(absx) > QUARTER) { cos_sign = sin_sign; @@ -446,7 +467,7 @@ void lol_sincos(double x, double *sinx, double *cosx) double x2 = absx * absx; double x4 = x2 * x2; -#if defined LOL_FEATURE_VERY_CHEAP_BRANCHES +#if LOL_FEATURE_VERY_CHEAP_BRANCHES double subs1 = ((SC[5] * x4 + SC[3]) * x4 + SC[1]) * x4 + ONE; double subs2 = (SC[4] * x4 + SC[2]) * x4 + SC[0]; double subc1 = ((CC[5] * x4 + CC[3]) * x4 + CC[1]) * x4 + ONE; @@ -476,7 +497,7 @@ void lol_sincos(float x, float *sinx, float *cosx) double lol_tan(double x) { -#if defined LOL_FEATURE_CHEAP_BRANCHES +#if LOL_FEATURE_CHEAP_BRANCHES double absx = lol_fabs(x * INV_PI); /* This value was determined empirically to ensure an error of no diff --git a/src/math/vector.cpp b/src/math/vector.cpp index b59256fa..c73e55f9 100644 --- a/src/math/vector.cpp +++ b/src/math/vector.cpp @@ -17,7 +17,7 @@ #include /* std::ostream */ -#include "core.h" +#include using namespace std; diff --git a/src/mesh/mesh.cpp b/src/mesh/mesh.cpp index 0332f88a..7e1e8707 100644 --- a/src/mesh/mesh.cpp +++ b/src/mesh/mesh.cpp @@ -15,7 +15,7 @@ #include #include -#include "core.h" +#include namespace lol { diff --git a/src/mesh/primitive.cpp b/src/mesh/primitive.cpp index e2c662fe..2162e196 100644 --- a/src/mesh/primitive.cpp +++ b/src/mesh/primitive.cpp @@ -15,7 +15,7 @@ #include #include -#include "core.h" +#include namespace lol { diff --git a/src/messageservice.cpp b/src/messageservice.cpp index 6eb41e4d..f1f0328f 100644 --- a/src/messageservice.cpp +++ b/src/messageservice.cpp @@ -17,7 +17,7 @@ #include #include -#include "core.h" +#include namespace lol { diff --git a/src/platform.cpp b/src/platform.cpp index e68b9626..62e36cb7 100644 --- a/src/platform.cpp +++ b/src/platform.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include namespace lol { diff --git a/src/platform/android/androidapp.cpp b/src/platform/android/androidapp.cpp index 2ff70520..68af5a72 100644 --- a/src/platform/android/androidapp.cpp +++ b/src/platform/android/androidapp.cpp @@ -27,7 +27,7 @@ extern "C" { #include } -#include "core.h" +#include #include "androidapp.h" #include "input/input_internal.h" diff --git a/src/platform/d3d9/d3d9input.cpp b/src/platform/d3d9/d3d9input.cpp index 5c9889d1..c4ac2e63 100644 --- a/src/platform/d3d9/d3d9input.cpp +++ b/src/platform/d3d9/d3d9input.cpp @@ -17,7 +17,7 @@ # include #endif -#include "core.h" +#include #include "d3d9input.h" #include "input/input_internal.h" diff --git a/src/platform/nacl/nacl-app.cpp b/src/platform/nacl/nacl-app.cpp index 9c4d08f1..2c5451b7 100644 --- a/src/platform/nacl/nacl-app.cpp +++ b/src/platform/nacl/nacl-app.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "nacl-app.h" #include "nacl-instance.h" diff --git a/src/platform/nacl/nacl-instance.cpp b/src/platform/nacl/nacl-instance.cpp index 22c8fddb..93b526af 100644 --- a/src/platform/nacl/nacl-instance.cpp +++ b/src/platform/nacl/nacl-instance.cpp @@ -17,7 +17,7 @@ #include #include -#include "core.h" +#include #include "platform/nacl/nacl-instance.h" #include "platform/nacl/opengl_context.h" diff --git a/src/platform/nacl/nacl-module.cpp b/src/platform/nacl/nacl-module.cpp index b2102b35..fab8a63b 100644 --- a/src/platform/nacl/nacl-module.cpp +++ b/src/platform/nacl/nacl-module.cpp @@ -10,7 +10,7 @@ #include #include -#include "core.h" +#include #include "lolgl.h" /* needed for GL_TRUE */ #include "platform/nacl/nacl-instance.h" diff --git a/src/platform/nacl/opengl_context.cpp b/src/platform/nacl/opengl_context.cpp index ae9829c4..ac347e0b 100644 --- a/src/platform/nacl/opengl_context.cpp +++ b/src/platform/nacl/opengl_context.cpp @@ -10,7 +10,7 @@ #include #include -#include "core.h" +#include #include "platform/nacl/opengl_context.h" diff --git a/src/platform/ps3/ps3app.cpp b/src/platform/ps3/ps3app.cpp index 1e40a820..a472fa1b 100644 --- a/src/platform/ps3/ps3app.cpp +++ b/src/platform/ps3/ps3app.cpp @@ -26,7 +26,7 @@ # include #endif -#include "core.h" +#include #include "lolgl.h" #include "ps3app.h" #include "ps3input.h" diff --git a/src/platform/ps3/ps3input.cpp b/src/platform/ps3/ps3input.cpp index 6c7c8a54..fff3fe86 100644 --- a/src/platform/ps3/ps3input.cpp +++ b/src/platform/ps3/ps3input.cpp @@ -20,7 +20,7 @@ # include #endif -#include "core.h" +#include #include "ps3input.h" using namespace std; diff --git a/src/platform/sdl/sdlapp.cpp b/src/platform/sdl/sdlapp.cpp index 30295b55..3fde1acf 100644 --- a/src/platform/sdl/sdlapp.cpp +++ b/src/platform/sdl/sdlapp.cpp @@ -24,7 +24,7 @@ # endif #endif -#include "core.h" +#include #include "lolgl.h" #include "platform/sdl/sdlapp.h" #include "platform/sdl/sdlinput.h" diff --git a/src/platform/sdl/sdlinput.cpp b/src/platform/sdl/sdlinput.cpp index 27ac38c5..b3b51c7e 100644 --- a/src/platform/sdl/sdlinput.cpp +++ b/src/platform/sdl/sdlinput.cpp @@ -20,7 +20,7 @@ # endif #endif -#include "core.h" +#include #include "sdlinput.h" #include "input/input_internal.h" diff --git a/src/platform/xbox/xboxapp.cpp b/src/platform/xbox/xboxapp.cpp index 05c8baa7..3f9afe5f 100644 --- a/src/platform/xbox/xboxapp.cpp +++ b/src/platform/xbox/xboxapp.cpp @@ -16,7 +16,7 @@ # include #endif -#include "core.h" +#include #include "xboxapp.h" #include "xboxinput.h" diff --git a/src/platform/xbox/xboxinput.cpp b/src/platform/xbox/xboxinput.cpp index 2f902f39..3e2aafff 100644 --- a/src/platform/xbox/xboxinput.cpp +++ b/src/platform/xbox/xboxinput.cpp @@ -17,7 +17,7 @@ # include #endif -#include "core.h" +#include #include "xboxinput.h" namespace lol diff --git a/src/profiler.cpp b/src/profiler.cpp index a2a9ec2c..2d419b61 100644 --- a/src/profiler.cpp +++ b/src/profiler.cpp @@ -15,7 +15,7 @@ #include #include -#include "core.h" +#include namespace lol { diff --git a/src/sample.cpp b/src/sample.cpp index c9570c66..40c53b96 100644 --- a/src/sample.cpp +++ b/src/sample.cpp @@ -31,7 +31,7 @@ # endif #endif -#include "core.h" +#include using namespace std; diff --git a/src/sampler.cpp b/src/sampler.cpp index 01777252..b98ae66b 100644 --- a/src/sampler.cpp +++ b/src/sampler.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include namespace lol { diff --git a/src/scene.cpp b/src/scene.cpp index cec92794..6d712111 100644 --- a/src/scene.cpp +++ b/src/scene.cpp @@ -19,7 +19,7 @@ # include #endif -#include "core.h" +#include #include "lolgl.h" LOLFX_RESOURCE_DECLARE(tile); diff --git a/src/sprite.cpp b/src/sprite.cpp index 3a9373e3..6f24d750 100644 --- a/src/sprite.cpp +++ b/src/sprite.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include namespace lol { diff --git a/src/sys/file.cpp b/src/sys/file.cpp index ac9892e9..c97b9f96 100644 --- a/src/sys/file.cpp +++ b/src/sys/file.cpp @@ -30,7 +30,7 @@ #include #include -#include "core.h" +#include namespace lol { diff --git a/src/sys/init.cpp b/src/sys/init.cpp index 98869122..374d7027 100644 --- a/src/sys/init.cpp +++ b/src/sys/init.cpp @@ -23,7 +23,7 @@ # include #endif -#include "core.h" +#include namespace lol { diff --git a/src/sys/thread.cpp b/src/sys/thread.cpp index 69c5f4ab..525652a4 100644 --- a/src/sys/thread.cpp +++ b/src/sys/thread.cpp @@ -13,7 +13,7 @@ # include "config.h" #endif -#include "core.h" +#include namespace lol { diff --git a/src/sys/timer.cpp b/src/sys/timer.cpp index a4ff08d3..f9eb9f66 100644 --- a/src/sys/timer.cpp +++ b/src/sys/timer.cpp @@ -37,7 +37,7 @@ # include #endif -#include "core.h" +#include namespace lol { diff --git a/src/text.cpp b/src/text.cpp index 02627c40..1fffa84e 100644 --- a/src/text.cpp +++ b/src/text.cpp @@ -16,7 +16,7 @@ #include /* free() */ #include /* strdup() */ -#include "core.h" +#include using namespace std; diff --git a/src/ticker.cpp b/src/ticker.cpp index 272b1565..84d080d9 100644 --- a/src/ticker.cpp +++ b/src/ticker.cpp @@ -15,7 +15,7 @@ #include #include -#include "core.h" +#include namespace lol { diff --git a/src/tiler.cpp b/src/tiler.cpp index 3edaa639..9273414a 100644 --- a/src/tiler.cpp +++ b/src/tiler.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include namespace lol { diff --git a/src/tileset.cpp b/src/tileset.cpp index 3f4ddb0f..34e72a65 100644 --- a/src/tileset.cpp +++ b/src/tileset.cpp @@ -26,7 +26,7 @@ # endif #endif -#include "core.h" +#include using namespace std; diff --git a/src/video.cpp b/src/video.cpp index a2d57fc6..c213838a 100755 --- a/src/video.cpp +++ b/src/video.cpp @@ -26,7 +26,7 @@ # undef far /* Fuck Microsoft again */ #endif -#include "core.h" +#include #include "lolgl.h" using namespace std; diff --git a/src/world.cpp b/src/world.cpp index 57040a51..65380dc0 100644 --- a/src/world.cpp +++ b/src/world.cpp @@ -16,7 +16,7 @@ #include #include -#include "core.h" +#include #include "lua/lua.hpp" diff --git a/src/worldentity.cpp b/src/worldentity.cpp index 6ee1f175..51290df7 100644 --- a/src/worldentity.cpp +++ b/src/worldentity.cpp @@ -14,7 +14,7 @@ #include -#include "core.h" +#include namespace lol { diff --git a/test/benchmark/half.cpp b/test/benchmark/half.cpp index d52cb6e2..699a2c3e 100644 --- a/test/benchmark/half.cpp +++ b/test/benchmark/half.cpp @@ -14,7 +14,7 @@ #include -#include "core.h" +#include using namespace std; using namespace lol; diff --git a/test/benchmark/real.cpp b/test/benchmark/real.cpp index 2685993c..d75927c3 100644 --- a/test/benchmark/real.cpp +++ b/test/benchmark/real.cpp @@ -14,7 +14,7 @@ #include -#include "core.h" +#include using namespace std; using namespace lol; diff --git a/test/benchmark/trig.cpp b/test/benchmark/trig.cpp index 45271e9a..e9786e53 100644 --- a/test/benchmark/trig.cpp +++ b/test/benchmark/trig.cpp @@ -18,7 +18,7 @@ # include #endif -#include "core.h" +#include using namespace std; using namespace lol; diff --git a/test/benchmark/vector.cpp b/test/benchmark/vector.cpp index 84d128db..4582cadf 100644 --- a/test/benchmark/vector.cpp +++ b/test/benchmark/vector.cpp @@ -14,7 +14,7 @@ #include -#include "core.h" +#include using namespace std; using namespace lol; diff --git a/test/benchsuite.cpp b/test/benchsuite.cpp index 755b9781..10ff5d21 100644 --- a/test/benchsuite.cpp +++ b/test/benchsuite.cpp @@ -14,7 +14,7 @@ #include -#include "core.h" +#include using namespace std; using namespace lol; diff --git a/test/btphystest.cpp b/test/btphystest.cpp index cb83c6b2..38842cd5 100644 --- a/test/btphystest.cpp +++ b/test/btphystest.cpp @@ -9,7 +9,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "loldebug.h" using namespace lol; diff --git a/test/generated/scenesetup-parser.cpp b/test/generated/scenesetup-parser.cpp index 5ff395d6..e301e0fc 100644 --- a/test/generated/scenesetup-parser.cpp +++ b/test/generated/scenesetup-parser.cpp @@ -53,7 +53,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "../scenesetup.h" diff --git a/test/generated/scenesetup-scanner.cpp b/test/generated/scenesetup-scanner.cpp index ed87b03f..991d79fc 100644 --- a/test/generated/scenesetup-scanner.cpp +++ b/test/generated/scenesetup-scanner.cpp @@ -504,7 +504,7 @@ using std::malloc; using std::realloc; using std::free; -#include "core.h" +#include #include "../scenesetup.h" #include "../scenesetup-compiler.h" diff --git a/test/math/pi.cpp b/test/math/pi.cpp index 771bd2a5..49e5df0c 100644 --- a/test/math/pi.cpp +++ b/test/math/pi.cpp @@ -14,7 +14,7 @@ #include -#include "core.h" +#include using std::printf; using std::sqrt; diff --git a/test/math/poly.cpp b/test/math/poly.cpp index 2174264c..6f92050a 100644 --- a/test/math/poly.cpp +++ b/test/math/poly.cpp @@ -14,7 +14,7 @@ #include -#include "core.h" +#include using namespace lol; using namespace std; diff --git a/test/meshviewer.cpp b/test/meshviewer.cpp index 46e6a141..f428ba2f 100644 --- a/test/meshviewer.cpp +++ b/test/meshviewer.cpp @@ -16,7 +16,7 @@ #include /* for FLT_MAX */ -#include "core.h" +#include #include "scenesetup.h" using namespace std; diff --git a/test/nacl_phystest.cpp b/test/nacl_phystest.cpp index ca1430c8..b9f77d9a 100644 --- a/test/nacl_phystest.cpp +++ b/test/nacl_phystest.cpp @@ -9,7 +9,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "loldebug.h" using namespace lol; diff --git a/test/physicobject.h b/test/physicobject.h index b3956f06..99c2c926 100644 --- a/test/physicobject.h +++ b/test/physicobject.h @@ -11,7 +11,7 @@ #if !defined __PHYSICOBJECT_H__ #define __PHYSICOBJECT_H__ -#include "core.h" +#include #include "easymesh/easymesh.h" #include "physics/easyphysics.h" #include "physics/easycharactercontroller.h" diff --git a/test/physics/bulletcharactercontroller.cpp b/test/physics/bulletcharactercontroller.cpp index cfbd1f0b..5fa978dd 100644 --- a/test/physics/bulletcharactercontroller.cpp +++ b/test/physics/bulletcharactercontroller.cpp @@ -16,7 +16,7 @@ #define USE_LOL_CTRLR_CHARAC -#include "core.h" +#include #include #include "lolbtphysicsintegration.h" #include "lolphysics.h" diff --git a/test/physics/bulletcharactercontroller.h b/test/physics/bulletcharactercontroller.h index 18df9ca5..8b89c5a3 100644 --- a/test/physics/bulletcharactercontroller.h +++ b/test/physics/bulletcharactercontroller.h @@ -18,7 +18,7 @@ #if !defined __BULLETCHARACTERCONTROLLER_BULLETCHARACTERCONTROLLER_H__ #define __BULLETCHARACTERCONTROLLER_BULLETCHARACTERCONTROLLER_H__ -#include "core.h" +#include #include "easyphysics.h" //#include "BulletDynamics\Character\btCharacterControllerInterface.h" diff --git a/test/physics/easycharactercontroller.h b/test/physics/easycharactercontroller.h index d1fcd5ce..bb080e7c 100644 --- a/test/physics/easycharactercontroller.h +++ b/test/physics/easycharactercontroller.h @@ -20,7 +20,7 @@ #if !defined __EASYCHARACTERCONTROLLER_EASYCHARACTERCONTROLLER_H__ #define __EASYCHARACTERCONTROLLER_EASYCHARACTERCONTROLLER_H__ -#include "core.h" +#include #include "easyphysics.h" #include "bulletcharactercontroller.h" #include diff --git a/test/physics/easyconstraint.h b/test/physics/easyconstraint.h index 8969f62d..a4de819c 100644 --- a/test/physics/easyconstraint.h +++ b/test/physics/easyconstraint.h @@ -17,7 +17,7 @@ #if !defined __EASYCONSTRAINT_EASYCONSTRAINT_H__ #define __EASYCONSTRAINT_EASYCONSTRAINT_H__ -#include "core.h" +#include #include "easyphysics.h" namespace lol diff --git a/test/physics/easyphysics.h b/test/physics/easyphysics.h index 15216414..7099df2f 100644 --- a/test/physics/easyphysics.h +++ b/test/physics/easyphysics.h @@ -17,7 +17,7 @@ #if !defined __EASYPHYSICS_EASYPHYSICS_H__ #define __EASYPHYSICS_EASYPHYSICS_H__ -#include "core.h" +#include #include #include #include diff --git a/test/sandbox/sample.cpp b/test/sandbox/sample.cpp index d8fb6caa..b6925cbe 100644 --- a/test/sandbox/sample.cpp +++ b/test/sandbox/sample.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include using namespace std; using namespace lol; diff --git a/test/scenesetup-compiler.cpp b/test/scenesetup-compiler.cpp index 4c460cc2..3232d0f0 100644 --- a/test/scenesetup-compiler.cpp +++ b/test/scenesetup-compiler.cpp @@ -15,7 +15,7 @@ #include -#include "core.h" +#include #include "scenesetup.h" #include "scenesetup-compiler.h" diff --git a/test/scenesetup.cpp b/test/scenesetup.cpp index 6ae82ce7..33562793 100644 --- a/test/scenesetup.cpp +++ b/test/scenesetup.cpp @@ -13,7 +13,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "scenesetup.h" #include "scenesetup-compiler.h" diff --git a/test/testsuite.cpp b/test/testsuite.cpp index b4498055..78cef8bc 100644 --- a/test/testsuite.cpp +++ b/test/testsuite.cpp @@ -15,7 +15,7 @@ #include #include -#include "core.h" +#include #include diff --git a/test/unit/array.cpp b/test/unit/array.cpp index 2c50877e..20a52852 100644 --- a/test/unit/array.cpp +++ b/test/unit/array.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/array2d.cpp b/test/unit/array2d.cpp index 227432c9..c89a8dd8 100644 --- a/test/unit/array2d.cpp +++ b/test/unit/array2d.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/array3d.cpp b/test/unit/array3d.cpp index 82679bd9..9888d085 100644 --- a/test/unit/array3d.cpp +++ b/test/unit/array3d.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/box.cpp b/test/unit/box.cpp index 4d6e646e..cd15b892 100644 --- a/test/unit/box.cpp +++ b/test/unit/box.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/build.cpp b/test/unit/build.cpp index e907b2a1..3ed97f74 100644 --- a/test/unit/build.cpp +++ b/test/unit/build.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol @@ -140,19 +140,6 @@ LOLUNIT_FIXTURE(BuildTest) LOLUNIT_ASSERT_EQUAL(x, y); } #endif - - LOLUNIT_TEST(FastMathOverride) - { - double x, y; - - y = x = 1.0 + rand(0.1f, 0.2f); - y += 4503599627370496.0; - FP_USE(y); - /* The compiler should not optimise this away */ - y -= 4503599627370496.0; - - LOLUNIT_ASSERT_EQUAL(1.0, y); - } }; } /* namespace lol */ diff --git a/test/unit/camera.cpp b/test/unit/camera.cpp index 858a1e15..df056a56 100644 --- a/test/unit/camera.cpp +++ b/test/unit/camera.cpp @@ -13,7 +13,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/cmplx.cpp b/test/unit/cmplx.cpp index 97f064c6..ddadf9df 100644 --- a/test/unit/cmplx.cpp +++ b/test/unit/cmplx.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/color.cpp b/test/unit/color.cpp index 4bf01c43..0b932934 100644 --- a/test/unit/color.cpp +++ b/test/unit/color.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/enum.cpp b/test/unit/enum.cpp index 3602b6ac..1c2cdf03 100644 --- a/test/unit/enum.cpp +++ b/test/unit/enum.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/half.cpp b/test/unit/half.cpp index 511a7fc3..423779ff 100644 --- a/test/unit/half.cpp +++ b/test/unit/half.cpp @@ -14,7 +14,7 @@ #include -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/image.cpp b/test/unit/image.cpp index 1bb8134f..9790cbf0 100644 --- a/test/unit/image.cpp +++ b/test/unit/image.cpp @@ -14,7 +14,7 @@ #include -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/interp.cpp b/test/unit/interp.cpp index d3842e80..948ad11c 100644 --- a/test/unit/interp.cpp +++ b/test/unit/interp.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/map.cpp b/test/unit/map.cpp index a3bd5775..816bf530 100644 --- a/test/unit/map.cpp +++ b/test/unit/map.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/matrix.cpp b/test/unit/matrix.cpp index cfb337a5..021ff6a2 100644 --- a/test/unit/matrix.cpp +++ b/test/unit/matrix.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/quat.cpp b/test/unit/quat.cpp index 2f81cf7f..7e283e23 100644 --- a/test/unit/quat.cpp +++ b/test/unit/quat.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/rand.cpp b/test/unit/rand.cpp index d7508846..b013496d 100644 --- a/test/unit/rand.cpp +++ b/test/unit/rand.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/real.cpp b/test/unit/real.cpp index 6f26a77b..ee936e95 100644 --- a/test/unit/real.cpp +++ b/test/unit/real.cpp @@ -14,7 +14,7 @@ #include -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/rotation.cpp b/test/unit/rotation.cpp index 09e2a78e..ef564891 100644 --- a/test/unit/rotation.cpp +++ b/test/unit/rotation.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/string.cpp b/test/unit/string.cpp index 059893ad..73071e39 100644 --- a/test/unit/string.cpp +++ b/test/unit/string.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/thread.cpp b/test/unit/thread.cpp index fad7fa5e..946e9668 100644 --- a/test/unit/thread.cpp +++ b/test/unit/thread.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/trig.cpp b/test/unit/trig.cpp index b00121c2..d76dbb12 100644 --- a/test/unit/trig.cpp +++ b/test/unit/trig.cpp @@ -14,7 +14,7 @@ #include -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/unit/vector.cpp b/test/unit/vector.cpp index 049de88c..722352ce 100644 --- a/test/unit/vector.cpp +++ b/test/unit/vector.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "lol/unit.h" namespace lol diff --git a/test/xolotl/xolotl.cpp b/test/xolotl/xolotl.cpp index 3d633816..64bd0dfa 100644 --- a/test/xolotl/xolotl.cpp +++ b/test/xolotl/xolotl.cpp @@ -13,7 +13,7 @@ # include "config.h" #endif -#include "core.h" +#include #include "loldebug.h" using namespace lol; diff --git a/tools/lolremez/lolremez.cpp b/tools/lolremez/lolremez.cpp index 51eff0ef..d841caf6 100644 --- a/tools/lolremez/lolremez.cpp +++ b/tools/lolremez/lolremez.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include diff --git a/tools/lolremez/solver.cpp b/tools/lolremez/solver.cpp index 3a4d73c9..025cc4e9 100644 --- a/tools/lolremez/solver.cpp +++ b/tools/lolremez/solver.cpp @@ -12,7 +12,7 @@ # include "config.h" #endif -#include "core.h" +#include #include