@@ -50,6 +50,7 @@ perf.data* | |||||
# Editor cruft | # Editor cruft | ||||
.*.swp | .*.swp | ||||
*~ | *~ | ||||
.ycm_extra_conf.pyc | |||||
# Visual Studio cruft | # Visual Studio cruft | ||||
*.vcxproj.user | *.vcxproj.user | ||||
*.csproj.user | *.csproj.user | ||||
@@ -0,0 +1,33 @@ | |||||
import os | |||||
import ycm_core | |||||
flags = [ | |||||
'-xc++', | |||||
'-std=c++11', | |||||
# Engine includes | |||||
'-I.', | |||||
'-I..', | |||||
'-Isrc', | |||||
# System includes | |||||
'-I/usr/include/SDL2', | |||||
'-I/usr/include/GL', | |||||
'-I/usr/include/libdrm', | |||||
'-I/usr/include/libpng15', | |||||
# Macros | |||||
'-DHAVE_CONFIG_H', | |||||
'-D_REENTRANT', | |||||
] | |||||
def FlagsForFile(filename, **kwargs): | |||||
extension = os.path.splitext(filename)[1] | |||||
if extension not in [ 'cpp', 'h' ]: | |||||
return None | |||||
final_flags = flags | |||||
return { | |||||
'flags': final_flags, | |||||
'do_cache': True | |||||
} | |||||
@@ -84,10 +84,12 @@ public: | |||||
WrapMode GetWrapY() const; | WrapMode GetWrapY() const; | ||||
void SetWrap(WrapMode wrap_x, WrapMode wrap_y); | void SetWrap(WrapMode wrap_x, WrapMode wrap_y); | ||||
/* Lock continuous arrays of pixels for writing */ | |||||
template<PixelFormat T> typename PixelType<T>::type *Lock(); | template<PixelFormat T> typename PixelType<T>::type *Lock(); | ||||
void *Lock(); | void *Lock(); | ||||
void Unlock(void const *pixels); | void Unlock(void const *pixels); | ||||
/* Lock 2D arrays of pixels for writing */ | |||||
template<PixelFormat T> | template<PixelFormat T> | ||||
inline array2d<typename PixelType<T>::type> &Lock2D() | inline array2d<typename PixelType<T>::type> &Lock2D() | ||||
{ | { | ||||
@@ -96,8 +98,9 @@ public: | |||||
} | } | ||||
template<typename T> | template<typename T> | ||||
void Unlock2D(array2d<T> const &); | |||||
void Unlock2D(array2d<T> const &); | |||||
/* XXX: this does not belong here */ | |||||
bool RetrieveTiles(array<ivec2, ivec2>& tiles) const; | bool RetrieveTiles(array<ivec2, ivec2>& tiles) const; | ||||
/* Image processing kernels */ | /* Image processing kernels */ | ||||
@@ -15,6 +15,9 @@ | |||||
// -------------- | // -------------- | ||||
// | // | ||||
#include <lol/base/types.h> | |||||
#include <cmath> | |||||
#include <cstdio> | #include <cstdio> | ||||
#include <stdint.h> | #include <stdint.h> | ||||
@@ -15,6 +15,8 @@ | |||||
// -------------- | // -------------- | ||||
// | // | ||||
#include <lol/base/types.h> | |||||
#include <stdint.h> | #include <stdint.h> | ||||
namespace lol | namespace lol | ||||
@@ -15,6 +15,8 @@ | |||||
// ------------------ | // ------------------ | ||||
// | // | ||||
#include <lol/base/assert.h> | |||||
#include <lol/math/functions.h> | |||||
#include <lol/math/half.h> | #include <lol/math/half.h> | ||||
#include <lol/math/real.h> | #include <lol/math/real.h> | ||||
#include <lol/math/ops.h> | #include <lol/math/ops.h> | ||||
@@ -199,7 +201,7 @@ private: | |||||
} \ | } \ | ||||
\ | \ | ||||
void printf() const; \ | void printf() const; \ | ||||
String tostring() const; | |||||
class String tostring() const; | |||||
/* | /* | ||||
* 2-element vectors | * 2-element vectors | ||||