From cdf7ec3c2db385f2beb6e564220e9ade7dec8fba Mon Sep 17 00:00:00 2001 From: Yann Herklotz Date: Sat, 2 Jun 2018 16:10:02 +0100 Subject: Adding modeline --- scripts/add_version_headers | 3 +- tests/active_test.cpp | 3 +- tests/matrix_test.cpp | 3 +- tests/particlebody_test.cpp | 3 +- tests/struct_test.cpp | 3 +- tests/testshared.h | 1 + tests/vector3_test.cpp | 3 +- tests/vector4_test.cpp | 3 +- yage/core/camera.cpp | 1 + yage/core/camera.h | 1 + yage/core/core.cpp | 1 + yage/core/core.h | 1 + yage/core/exception.cpp | 12 +++- yage/core/exception.h | 11 +++- yage/core/imageloader.cpp | 1 + yage/core/imageloader.h | 1 + yage/core/iomanager.cpp | 10 +-- yage/core/iomanager.h | 2 +- yage/core/logger.cpp | 1 + yage/core/logger.h | 1 + yage/core/resourcemanager.cpp | 1 + yage/core/resourcemanager.h | 1 + yage/core/stb_image.cpp | 9 +++ yage/core/stb_image.h | 130 ++++++++++++++++++------------------- yage/core/texturecache.cpp | 1 + yage/core/texturecache.h | 1 + yage/core/window.cpp | 1 + yage/core/window.h | 3 +- yage/data/cube.h | 56 ++++++---------- yage/data/input.h | 3 +- yage/data/texture.h | 1 + yage/data/vertex.h | 1 + yage/entity/engine.cpp | 1 + yage/entity/engine.h | 4 +- yage/entity/entity.cpp | 1 + yage/entity/entity.h | 12 ++-- yage/entity/space.cpp | 1 + yage/entity/space.h | 4 +- yage/entity/system.h | 3 +- yage/math/matrix.h | 1 + yage/physics/body.cpp | 1 + yage/physics/body.h | 1 + yage/physics/collider.h | 1 + yage/physics/collisionbody.h | 3 +- yage/physics/particlebody.cpp | 1 + yage/physics/particlebody.h | 1 + yage/physics/physics.h | 1 + yage/physics/rectanglecollider.cpp | 1 + yage/physics/rectanglecollider.h | 1 + yage/physics/rigidbody.cpp | 1 + yage/physics/rigidbody.h | 1 + yage/render/shader.cpp | 1 + yage/render/shader.h | 1 + yage/render/spritebatch.cpp | 1 + yage/render/spritebatch.h | 1 + yage/util/active.cpp | 1 + yage/util/active.h | 1 + yage/util/noncopyable.h | 9 +++ yage/util/syncqueue.h | 1 + yage/yage.h | 3 +- 60 files changed, 203 insertions(+), 129 deletions(-) diff --git a/scripts/add_version_headers b/scripts/add_version_headers index cf1531b0..25324921 100755 --- a/scripts/add_version_headers +++ b/scripts/add_version_headers @@ -29,6 +29,7 @@ from subprocess import call header = """/** ---------------------------------------------------------------\ ------------ + * -*- c++ -*- * @file: {0} * * Copyright (c) 2017 Yann Herklotz Grave @@ -116,7 +117,7 @@ class HeaderUpdate(object): def main(argv): update = HeaderUpdate(exclude_re="^picopng\.cpp", match_dir=".*yage|.*tests", - exclude_dir=".*lib.*|.*build.*") + exclude_dir=".*lib.*|.*build.*|.*googletest.*") update.updateHeader() update.runClangFormat() diff --git a/tests/active_test.cpp b/tests/active_test.cpp index d907a1cc..5b6a24c9 100644 --- a/tests/active_test.cpp +++ b/tests/active_test.cpp @@ -1,5 +1,6 @@ /** --------------------------------------------------------------------------- - * @file: test.cpp + * -*- c++ -*- + * @file: active_test.cpp * * Copyright (c) 2017 Yann Herklotz Grave * MIT License, see LICENSE file for more details. diff --git a/tests/matrix_test.cpp b/tests/matrix_test.cpp index 022775af..4de75994 100644 --- a/tests/matrix_test.cpp +++ b/tests/matrix_test.cpp @@ -1,5 +1,6 @@ /** --------------------------------------------------------------------------- - * @file: test.cpp + * -*- c++ -*- + * @file: matrix_test.cpp * * Copyright (c) 2017 Yann Herklotz Grave * MIT License, see LICENSE file for more details. diff --git a/tests/particlebody_test.cpp b/tests/particlebody_test.cpp index 5716d3ac..dea96d7d 100644 --- a/tests/particlebody_test.cpp +++ b/tests/particlebody_test.cpp @@ -1,5 +1,6 @@ /** --------------------------------------------------------------------------- - * @file: test.cpp + * -*- c++ -*- + * @file: particlebody_test.cpp * * Copyright (c) 2017 Yann Herklotz Grave * MIT License, see LICENSE file for more details. diff --git a/tests/struct_test.cpp b/tests/struct_test.cpp index 0288f06b..3fcc69c4 100644 --- a/tests/struct_test.cpp +++ b/tests/struct_test.cpp @@ -1,5 +1,6 @@ /** --------------------------------------------------------------------------- - * @file: test.cpp + * -*- c++ -*- + * @file: struct_test.cpp * * Copyright (c) 2017 Yann Herklotz Grave * MIT License, see LICENSE file for more details. diff --git a/tests/testshared.h b/tests/testshared.h index e2d4a8d4..1af950a5 100644 --- a/tests/testshared.h +++ b/tests/testshared.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: testshared.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/tests/vector3_test.cpp b/tests/vector3_test.cpp index 2e4ba18b..40d9fd51 100644 --- a/tests/vector3_test.cpp +++ b/tests/vector3_test.cpp @@ -1,5 +1,6 @@ /** --------------------------------------------------------------------------- - * @file: test.cpp + * -*- c++ -*- + * @file: vector3_test.cpp * * Copyright (c) 2017 Yann Herklotz Grave * MIT License, see LICENSE file for more details. diff --git a/tests/vector4_test.cpp b/tests/vector4_test.cpp index 3705e86f..bbddf112 100644 --- a/tests/vector4_test.cpp +++ b/tests/vector4_test.cpp @@ -1,5 +1,6 @@ /** --------------------------------------------------------------------------- - * @file: test.cpp + * -*- c++ -*- + * @file: vector4_test.cpp * * Copyright (c) 2017 Yann Herklotz Grave * MIT License, see LICENSE file for more details. diff --git a/yage/core/camera.cpp b/yage/core/camera.cpp index 843224dd..00b7c044 100644 --- a/yage/core/camera.cpp +++ b/yage/core/camera.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: camera.cpp * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/core/camera.h b/yage/core/camera.h index ec1a189d..d39c94bd 100644 --- a/yage/core/camera.h +++ b/yage/core/camera.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: camera.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/core/core.cpp b/yage/core/core.cpp index 63051a49..13b5b8a1 100644 --- a/yage/core/core.cpp +++ b/yage/core/core.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: core.cpp * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/core/core.h b/yage/core/core.h index 95da1f7f..1237d9d0 100644 --- a/yage/core/core.h +++ b/yage/core/core.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: core.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/core/exception.cpp b/yage/core/exception.cpp index 5cf525cc..6001213c 100644 --- a/yage/core/exception.cpp +++ b/yage/core/exception.cpp @@ -1,9 +1,19 @@ +/** --------------------------------------------------------------------------- + * -*- c++ -*- + * @file: exception.cpp + * + * Copyright (c) 2017 Yann Herklotz Grave + * MIT License, see LICENSE file for more details. + * ---------------------------------------------------------------------------- + */ + #include "exception.h" namespace yage { -FileLoadException::FileLoadException(std::string err) : std::runtime_error("File Load Exception") +FileLoadException::FileLoadException(std::string err) + : std::runtime_error("File Load Exception") { std::ostringstream msg(""); diff --git a/yage/core/exception.h b/yage/core/exception.h index 843a58a1..70042e02 100644 --- a/yage/core/exception.h +++ b/yage/core/exception.h @@ -1,7 +1,16 @@ +/** --------------------------------------------------------------------------- + * -*- c++ -*- + * @file: exception.h + * + * Copyright (c) 2017 Yann Herklotz Grave + * MIT License, see LICENSE file for more details. + * ---------------------------------------------------------------------------- + */ + #pragma once -#include #include +#include namespace yage { diff --git a/yage/core/imageloader.cpp b/yage/core/imageloader.cpp index 4cd583d1..4905bf5e 100644 --- a/yage/core/imageloader.cpp +++ b/yage/core/imageloader.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: imageloader.cpp * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/core/imageloader.h b/yage/core/imageloader.h index 38980572..f4c0d90d 100644 --- a/yage/core/imageloader.h +++ b/yage/core/imageloader.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: imageloader.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/core/iomanager.cpp b/yage/core/iomanager.cpp index b4e6847e..ff920f97 100644 --- a/yage/core/iomanager.cpp +++ b/yage/core/iomanager.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: iomanager.cpp * * Copyright (c) 2017 Yann Herklotz Grave @@ -9,16 +10,17 @@ #include #include -#include #include +#include namespace yage { -namespace IoManager { +namespace IoManager +{ bool readFileToBuffer(const std::string &file_path, - std::vector &buffer) + std::vector &buffer) { std::ifstream file(file_path, std::ios::binary); if (!file.is_open()) { @@ -42,6 +44,6 @@ bool readFileToBuffer(const std::string &file_path, return true; } -} +} // namespace IoManager } // namespace yage diff --git a/yage/core/iomanager.h b/yage/core/iomanager.h index 9a1bf12d..9d796914 100644 --- a/yage/core/iomanager.h +++ b/yage/core/iomanager.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: iomanager.h * * Copyright (c) 2017 Yann Herklotz Grave @@ -19,7 +20,6 @@ namespace IoManager extern bool readFileToBuffer(const std::string &file_path, std::vector &buffer); - } } // namespace yage diff --git a/yage/core/logger.cpp b/yage/core/logger.cpp index ac103a8b..f420502d 100644 --- a/yage/core/logger.cpp +++ b/yage/core/logger.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: logger.cpp * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/core/logger.h b/yage/core/logger.h index 7f338a8b..3da959c6 100644 --- a/yage/core/logger.h +++ b/yage/core/logger.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: logger.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/core/resourcemanager.cpp b/yage/core/resourcemanager.cpp index 2105f7e0..984b381c 100644 --- a/yage/core/resourcemanager.cpp +++ b/yage/core/resourcemanager.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: resourcemanager.cpp * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/core/resourcemanager.h b/yage/core/resourcemanager.h index 1f7d811c..dcc77ab7 100644 --- a/yage/core/resourcemanager.h +++ b/yage/core/resourcemanager.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: resourcemanager.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/core/stb_image.cpp b/yage/core/stb_image.cpp index 8ddfd1f5..9f352d82 100644 --- a/yage/core/stb_image.cpp +++ b/yage/core/stb_image.cpp @@ -1,2 +1,11 @@ +/** --------------------------------------------------------------------------- + * -*- c++ -*- + * @file: stb_image.cpp + * + * Copyright (c) 2017 Yann Herklotz Grave + * MIT License, see LICENSE file for more details. + * ---------------------------------------------------------------------------- + */ + #define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" diff --git a/yage/core/stb_image.h b/yage/core/stb_image.h index 9ec8b93a..7583ce7f 100644 --- a/yage/core/stb_image.h +++ b/yage/core/stb_image.h @@ -789,7 +789,7 @@ static void stbi__start_file(stbi__context *s, FILE *f) stbi__start_callbacks(s, &stbi__stdio_callbacks, (void *)f); } - // static void stop_file(stbi__context *s) { } +// static void stop_file(stbi__context *s) { } #endif // !STBI_NO_STDIO @@ -972,9 +972,9 @@ static void *stbi__malloc_mad4(int a, int b, int c, int d, int add) return stbi__malloc(a * b * c * d + add); } - // stbi__err - error - // stbi__errpf - error returning pointer to float - // stbi__errpuc - error returning pointer to unsigned char +// stbi__err - error +// stbi__errpf - error returning pointer to float +// stbi__errpuc - error returning pointer to unsigned char #ifdef STBI_NO_FAILURE_STRINGS #define stbi__err(x, y) 0 @@ -1845,27 +1845,27 @@ static stbi_uc *stbi__hdr_to_ldr(float *data, int x, int y, int comp) } #endif - ////////////////////////////////////////////////////////////////////////////// - // - // "baseline" JPEG/JFIF decoder - // - // simple implementation - // - doesn't support delayed output of y-dimension - // - simple interface (only one output format: 8-bit interleaved RGB) - // - doesn't try to recover corrupt jpegs - // - doesn't allow partial loading, loading multiple at once - // - still fast on x86 (copying globals into locals doesn't help x86) - // - allocates lots of intermediate memory (full size of all - // components) - // - non-interleaved case requires this anyway - // - allows good upsampling (see next) - // high-quality - // - upsampled channels are bilinearly interpolated, even across blocks - // - quality integer IDCT derived from IJG's 'slow' - // performance - // - fast huffman; reasonable integer IDCT - // - some SIMD kernels for common paths on targets with SSE2/NEON - // - uses a lot of intermediate memory, could cache poorly +////////////////////////////////////////////////////////////////////////////// +// +// "baseline" JPEG/JFIF decoder +// +// simple implementation +// - doesn't support delayed output of y-dimension +// - simple interface (only one output format: 8-bit interleaved RGB) +// - doesn't try to recover corrupt jpegs +// - doesn't allow partial loading, loading multiple at once +// - still fast on x86 (copying globals into locals doesn't help x86) +// - allocates lots of intermediate memory (full size of all +// components) +// - non-interleaved case requires this anyway +// - allows good upsampling (see next) +// high-quality +// - upsampled channels are bilinearly interpolated, even across blocks +// - quality integer IDCT derived from IJG's 'slow' +// performance +// - fast huffman; reasonable integer IDCT +// - some SIMD kernels for common paths on targets with SSE2/NEON +// - uses a lot of intermediate memory, could cache poorly #ifndef STBI_NO_JPEG @@ -4251,13 +4251,13 @@ static int stbi__jpeg_info(stbi__context *s, int *x, int *y, int *comp) } #endif - // public domain zlib decode v0.2 Sean Barrett 2006-11-18 - // simple implementation - // - all input must be provided in an upfront buffer - // - all output is written to a single output buffer (can - // malloc/realloc) - // performance - // - fast huffman +// public domain zlib decode v0.2 Sean Barrett 2006-11-18 +// simple implementation +// - all input must be provided in an upfront buffer +// - all output is written to a single output buffer (can +// malloc/realloc) +// performance +// - fast huffman #ifndef STBI_NO_ZLIB @@ -4793,15 +4793,15 @@ STBIDEF int stbi_zlib_decode_noheader_buffer(char *obuffer, int olen, } #endif - // public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 - // simple implementation - // - only 8-bit samples - // - no CRC checking - // - allocates lots of intermediate memory - // - avoids problem of streaming data between subsystems - // - avoids explicit window management - // performance - // - uses stb_zlib, a PD zlib implementation with fast huffman decoding +// public domain "baseline" PNG decoder v0.10 Sean Barrett 2006-11-18 +// simple implementation +// - only 8-bit samples +// - no CRC checking +// - allocates lots of intermediate memory +// - avoids problem of streaming data between subsystems +// - avoids explicit window management +// performance +// - uses stb_zlib, a PD zlib implementation with fast huffman decoding #ifndef STBI_NO_PNG typedef struct { @@ -5714,7 +5714,7 @@ static int stbi__png_info(stbi__context *s, int *x, int *y, int *comp) } #endif - // Microsoft/Windows BMP image +// Microsoft/Windows BMP image #ifndef STBI_NO_BMP static int stbi__bmp_test_raw(stbi__context *s) @@ -6434,9 +6434,9 @@ static void *stbi__tga_load(stbi__context *s, int *x, int *y, int *comp, } #endif - // ************************************************************************************************* - // Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas - // Schulz, tweaked by STB +// ************************************************************************************************* +// Photoshop PSD loader -- PD by Thatcher Ulrich, integration by Nicolas +// Schulz, tweaked by STB #ifndef STBI_NO_PSD static int stbi__psd_test(stbi__context *s) @@ -6697,12 +6697,12 @@ static void *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, } #endif - // ************************************************************************************************* - // Softimage PIC loader - // by Tom Seddon - // - // See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format - // See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ +// ************************************************************************************************* +// Softimage PIC loader +// by Tom Seddon +// +// See http://softimage.wiki.softimage.com/index.php/INFO:_PIC_file_format +// See http://ozviz.wasp.uwa.edu.au/~pbourke/dataformats/softimagepic/ #ifndef STBI_NO_PIC static int stbi__pic_is4(stbi__context *s, const char *str) @@ -6927,9 +6927,9 @@ static int stbi__pic_test(stbi__context *s) } #endif - // ************************************************************************************************* - // GIF loader -- public domain by Jean-Marc Lienher -- simplified/shrunk by - // stb +// ************************************************************************************************* +// GIF loader -- public domain by Jean-Marc Lienher -- simplified/shrunk by +// stb #ifndef STBI_NO_GIF typedef struct { @@ -7745,17 +7745,17 @@ static int stbi__pic_info(stbi__context *s, int *x, int *y, int *comp) } #endif - // ************************************************************************************************* - // Portable Gray Map and Portable Pixel Map loader - // by Ken Miller - // - // PGM: http://netpbm.sourceforge.net/doc/pgm.html - // PPM: http://netpbm.sourceforge.net/doc/ppm.html - // - // Known limitations: - // Does not support comments in the header section - // Does not support ASCII image data (formats P2 and P3) - // Does not support 16-bit-per-channel +// ************************************************************************************************* +// Portable Gray Map and Portable Pixel Map loader +// by Ken Miller +// +// PGM: http://netpbm.sourceforge.net/doc/pgm.html +// PPM: http://netpbm.sourceforge.net/doc/ppm.html +// +// Known limitations: +// Does not support comments in the header section +// Does not support ASCII image data (formats P2 and P3) +// Does not support 16-bit-per-channel #ifndef STBI_NO_PNM diff --git a/yage/core/texturecache.cpp b/yage/core/texturecache.cpp index 66251de5..5f78a37e 100644 --- a/yage/core/texturecache.cpp +++ b/yage/core/texturecache.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: texturecache.cpp * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/core/texturecache.h b/yage/core/texturecache.h index 842ffec8..45cc0a9d 100644 --- a/yage/core/texturecache.h +++ b/yage/core/texturecache.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: texturecache.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/core/window.cpp b/yage/core/window.cpp index e899d38a..25f9f834 100644 --- a/yage/core/window.cpp +++ b/yage/core/window.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: window.cpp * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/core/window.h b/yage/core/window.h index 6087fc8d..2ffafba8 100644 --- a/yage/core/window.h +++ b/yage/core/window.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: window.h * * Copyright (c) 2017 Yann Herklotz Grave @@ -33,7 +34,7 @@ private: GLFWwindow *window_ = nullptr; public: - Window() = default; + Window() = default; Window(const Window &) = delete; Window(Window &&) = delete; /// destroys the window handle diff --git a/yage/data/cube.h b/yage/data/cube.h index 070052c8..d39a409a 100644 --- a/yage/data/cube.h +++ b/yage/data/cube.h @@ -1,42 +1,24 @@ +/** --------------------------------------------------------------------------- + * -*- c++ -*- + * @file: cube.h + * + * Copyright (c) 2017 Yann Herklotz Grave + * MIT License, see LICENSE file for more details. + * ---------------------------------------------------------------------------- + */ + #pragma once #include "glad/glad.h" static const GLfloat gl_cube_buffer[] = { - -1.0f,-1.0f,-1.0f, - -1.0f,-1.0f, 1.0f, - -1.0f, 1.0f, 1.0f, - 1.0f, 1.0f,-1.0f, - -1.0f,-1.0f,-1.0f, - -1.0f, 1.0f,-1.0f, - 1.0f,-1.0f, 1.0f, - -1.0f,-1.0f,-1.0f, - 1.0f,-1.0f,-1.0f, - 1.0f, 1.0f,-1.0f, - 1.0f,-1.0f,-1.0f, - -1.0f,-1.0f,-1.0f, - -1.0f,-1.0f,-1.0f, - -1.0f, 1.0f, 1.0f, - -1.0f, 1.0f,-1.0f, - 1.0f,-1.0f, 1.0f, - -1.0f,-1.0f, 1.0f, - -1.0f,-1.0f,-1.0f, - -1.0f, 1.0f, 1.0f, - -1.0f,-1.0f, 1.0f, - 1.0f,-1.0f, 1.0f, - 1.0f, 1.0f, 1.0f, - 1.0f,-1.0f,-1.0f, - 1.0f, 1.0f,-1.0f, - 1.0f,-1.0f,-1.0f, - 1.0f, 1.0f, 1.0f, - 1.0f,-1.0f, 1.0f, - 1.0f, 1.0f, 1.0f, - 1.0f, 1.0f,-1.0f, - -1.0f, 1.0f,-1.0f, - 1.0f, 1.0f, 1.0f, - -1.0f, 1.0f,-1.0f, - -1.0f, 1.0f, 1.0f, - 1.0f, 1.0f, 1.0f, - -1.0f, 1.0f, 1.0f, - 1.0f,-1.0f, 1.0f -}; + -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, + -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, -1.0f, 1.0f, -1.0f, 1.0f, -1.0f, + -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, -1.0f, -1.0f, + -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, + -1.0f, 1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f, -1.0f, -1.0f, -1.0f, -1.0f, + 1.0f, 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, + 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, + 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, 1.0f, -1.0f, -1.0f, + 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f, -1.0f, -1.0f, 1.0f, 1.0f, + 1.0f, 1.0f, 1.0f, -1.0f, 1.0f, 1.0f, 1.0f, -1.0f, 1.0f}; diff --git a/yage/data/input.h b/yage/data/input.h index 7a0898ef..002ef46e 100644 --- a/yage/data/input.h +++ b/yage/data/input.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: input.h * * Copyright (c) 2017 Yann Herklotz Grave @@ -152,7 +153,7 @@ enum class key { LAST = GLFW_KEY_LAST, }; -} // namepsace yage +} // namespace yage #ifdef _WIN32 #ifdef YAGE_DELETE_TMP diff --git a/yage/data/texture.h b/yage/data/texture.h index 0f676df2..29f7feda 100644 --- a/yage/data/texture.h +++ b/yage/data/texture.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: texture.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/data/vertex.h b/yage/data/vertex.h index 072feb9f..13a3bab2 100644 --- a/yage/data/vertex.h +++ b/yage/data/vertex.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: vertex.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/entity/engine.cpp b/yage/entity/engine.cpp index f3a056db..1cef4504 100644 --- a/yage/entity/engine.cpp +++ b/yage/entity/engine.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: engine.cpp * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/entity/engine.h b/yage/entity/engine.h index bac32fe0..9a1f6d2b 100644 --- a/yage/entity/engine.h +++ b/yage/entity/engine.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: engine.h * * Copyright (c) 2017 Yann Herklotz Grave @@ -28,7 +29,6 @@ class Space; class Engine : public NonCopyable { public: - ~Engine(); /// Initialize window and other aspects of the engine. @@ -45,7 +45,7 @@ public: /// Returns the instance of the engine, as there is only one instance of the /// engine. - static Engine& instance(); + static Engine &instance(); private: /// Window diff --git a/yage/entity/entity.cpp b/yage/entity/entity.cpp index c7e8fd50..1a2b16ad 100644 --- a/yage/entity/entity.cpp +++ b/yage/entity/entity.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: entity.cpp * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/entity/entity.h b/yage/entity/entity.h index 2f086bea..a032ad8a 100644 --- a/yage/entity/entity.h +++ b/yage/entity/entity.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: entity.h * * Copyright (c) 2017 Yann Herklotz Grave @@ -8,8 +9,8 @@ #pragma once -#include #include +#include namespace yage { @@ -77,7 +78,8 @@ private: * Should not be inherited from when declaring a new component. Instead, the * Component should be used. */ -class BaseComponent { +class BaseComponent +{ public: /** Group used to register a specific component internally with the entity * manager. @@ -94,7 +96,8 @@ protected: * data itself. */ template -class Component : public BaseComponent { +class Component : public BaseComponent +{ private: friend class EntityManager; @@ -104,7 +107,8 @@ private: /** Contains a list of all components that belong to a sepecific group, these * are then stored in the main entity manager. */ -class ComponentGroup { +class ComponentGroup +{ private: friend class EntityManager; diff --git a/yage/entity/space.cpp b/yage/entity/space.cpp index 24afda72..530f5b49 100644 --- a/yage/entity/space.cpp +++ b/yage/entity/space.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: space.cpp * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/entity/space.h b/yage/entity/space.h index ed867534..0763b189 100644 --- a/yage/entity/space.h +++ b/yage/entity/space.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: space.h * * Copyright (c) 2017 Yann Herklotz Grave @@ -8,14 +9,13 @@ #pragma once -#include #include +#include #include "entity.h" #include "system.h" struct Movement { - }; namespace yage diff --git a/yage/entity/system.h b/yage/entity/system.h index 7c67ac6f..84536cc9 100644 --- a/yage/entity/system.h +++ b/yage/entity/system.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: system.h * * Copyright (c) 2017 Yann Herklotz Grave @@ -18,7 +19,7 @@ namespace yage class System : public NonCopyable { public: - virtual void init() = 0; + virtual void init() = 0; virtual void update() = 0; }; diff --git a/yage/math/matrix.h b/yage/math/matrix.h index cefcd221..a41c522f 100644 --- a/yage/math/matrix.h +++ b/yage/math/matrix.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: matrix.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/physics/body.cpp b/yage/physics/body.cpp index d04eecfd..964a10c4 100644 --- a/yage/physics/body.cpp +++ b/yage/physics/body.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: body.cpp * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/physics/body.h b/yage/physics/body.h index 8e3d5e07..cddac759 100644 --- a/yage/physics/body.h +++ b/yage/physics/body.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: body.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/physics/collider.h b/yage/physics/collider.h index fe59f44b..1b643ee2 100644 --- a/yage/physics/collider.h +++ b/yage/physics/collider.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: collider.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/physics/collisionbody.h b/yage/physics/collisionbody.h index e1d9e6cf..4361b89a 100644 --- a/yage/physics/collisionbody.h +++ b/yage/physics/collisionbody.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: collisionbody.h * * Copyright (c) 2017 Yann Herklotz Grave @@ -22,4 +23,4 @@ public: virtual ~CollisionBody(); }; -} // yage +} // namespace yage diff --git a/yage/physics/particlebody.cpp b/yage/physics/particlebody.cpp index dc950ae6..49520558 100644 --- a/yage/physics/particlebody.cpp +++ b/yage/physics/particlebody.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: particlebody.cpp * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/physics/particlebody.h b/yage/physics/particlebody.h index 865e7f0b..6c7e93a3 100644 --- a/yage/physics/particlebody.h +++ b/yage/physics/particlebody.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: particlebody.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/physics/physics.h b/yage/physics/physics.h index 77823540..38923588 100644 --- a/yage/physics/physics.h +++ b/yage/physics/physics.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: physics.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/physics/rectanglecollider.cpp b/yage/physics/rectanglecollider.cpp index e1b3adff..218609fe 100644 --- a/yage/physics/rectanglecollider.cpp +++ b/yage/physics/rectanglecollider.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: rectanglecollider.cpp * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/physics/rectanglecollider.h b/yage/physics/rectanglecollider.h index c08e553b..f80e798d 100644 --- a/yage/physics/rectanglecollider.h +++ b/yage/physics/rectanglecollider.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: rectanglecollider.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/physics/rigidbody.cpp b/yage/physics/rigidbody.cpp index 1a7ae2ec..4eaf705f 100644 --- a/yage/physics/rigidbody.cpp +++ b/yage/physics/rigidbody.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: rigidbody.cpp * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/physics/rigidbody.h b/yage/physics/rigidbody.h index 686a13a6..a30db781 100644 --- a/yage/physics/rigidbody.h +++ b/yage/physics/rigidbody.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: rigidbody.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/render/shader.cpp b/yage/render/shader.cpp index 156c2aa1..e35c5099 100644 --- a/yage/render/shader.cpp +++ b/yage/render/shader.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: shader.cpp * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/render/shader.h b/yage/render/shader.h index c958a500..d91753cb 100644 --- a/yage/render/shader.h +++ b/yage/render/shader.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: shader.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/render/spritebatch.cpp b/yage/render/spritebatch.cpp index 25ad6da4..fc0103f4 100644 --- a/yage/render/spritebatch.cpp +++ b/yage/render/spritebatch.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: spritebatch.cpp * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/render/spritebatch.h b/yage/render/spritebatch.h index abefa93d..86a73a32 100644 --- a/yage/render/spritebatch.h +++ b/yage/render/spritebatch.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: spritebatch.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/util/active.cpp b/yage/util/active.cpp index 0eaeeb80..def68632 100644 --- a/yage/util/active.cpp +++ b/yage/util/active.cpp @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: active.cpp * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/util/active.h b/yage/util/active.h index 9b5cb4dd..379273ee 100644 --- a/yage/util/active.h +++ b/yage/util/active.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: active.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/util/noncopyable.h b/yage/util/noncopyable.h index a2bf5e75..220bd16b 100644 --- a/yage/util/noncopyable.h +++ b/yage/util/noncopyable.h @@ -1,3 +1,12 @@ +/** --------------------------------------------------------------------------- + * -*- c++ -*- + * @file: noncopyable.h + * + * Copyright (c) 2017 Yann Herklotz Grave + * MIT License, see LICENSE file for more details. + * ---------------------------------------------------------------------------- + */ + #pragma once namespace yage diff --git a/yage/util/syncqueue.h b/yage/util/syncqueue.h index d47d10a0..7f08fcba 100644 --- a/yage/util/syncqueue.h +++ b/yage/util/syncqueue.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: syncqueue.h * * Copyright (c) 2017 Yann Herklotz Grave diff --git a/yage/yage.h b/yage/yage.h index 1a9db400..089c2797 100644 --- a/yage/yage.h +++ b/yage/yage.h @@ -1,4 +1,5 @@ /** --------------------------------------------------------------------------- + * -*- c++ -*- * @file: yage.h * * Copyright (c) 2017 Yann Herklotz Grave @@ -11,8 +12,8 @@ /** * Core includes */ -#include "core/core.h" #include "core/camera.h" +#include "core/core.h" #include "core/iomanager.h" #include "core/logger.h" #include "core/resourcemanager.h" -- cgit