aboutsummaryrefslogtreecommitdiffstats
path: root/yage/core
diff options
context:
space:
mode:
Diffstat (limited to 'yage/core')
-rw-r--r--yage/core/camera.cpp1
-rw-r--r--yage/core/camera.h1
-rw-r--r--yage/core/core.cpp1
-rw-r--r--yage/core/core.h1
-rw-r--r--yage/core/exception.cpp12
-rw-r--r--yage/core/exception.h11
-rw-r--r--yage/core/imageloader.cpp1
-rw-r--r--yage/core/imageloader.h1
-rw-r--r--yage/core/iomanager.cpp10
-rw-r--r--yage/core/iomanager.h2
-rw-r--r--yage/core/logger.cpp1
-rw-r--r--yage/core/logger.h1
-rw-r--r--yage/core/resourcemanager.cpp1
-rw-r--r--yage/core/resourcemanager.h1
-rw-r--r--yage/core/stb_image.cpp9
-rw-r--r--yage/core/stb_image.h130
-rw-r--r--yage/core/texturecache.cpp1
-rw-r--r--yage/core/texturecache.h1
-rw-r--r--yage/core/window.cpp1
-rw-r--r--yage/core/window.h3
20 files changed, 117 insertions, 73 deletions
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 <ymherklotz@gmail.com>
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 <ymherklotz@gmail.com>
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 <ymherklotz@gmail.com>
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 <ymherklotz@gmail.com>
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 <ymherklotz@gmail.com>
+ * 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 <ymherklotz@gmail.com>
+ * MIT License, see LICENSE file for more details.
+ * ----------------------------------------------------------------------------
+ */
+
#pragma once
-#include <stdexcept>
#include <sstream>
+#include <stdexcept>
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 <ymherklotz@gmail.com>
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 <ymherklotz@gmail.com>
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 <ymherklotz@gmail.com>
@@ -9,16 +10,17 @@
#include <yage/core/iomanager.h>
#include <fstream>
-#include <stdexcept>
#include <regex>
+#include <stdexcept>
namespace yage
{
-namespace IoManager {
+namespace IoManager
+{
bool readFileToBuffer(const std::string &file_path,
- std::vector<unsigned char> &buffer)
+ std::vector<unsigned char> &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 <ymherklotz@gmail.com>
@@ -19,7 +20,6 @@ namespace IoManager
extern bool readFileToBuffer(const std::string &file_path,
std::vector<unsigned char> &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 <ymherklotz@gmail.com>
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 <ymherklotz@gmail.com>
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 <ymherklotz@gmail.com>
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 <ymherklotz@gmail.com>
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 <ymherklotz@gmail.com>
+ * 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 <ymherklotz@gmail.com>
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 <ymherklotz@gmail.com>
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 <ymherklotz@gmail.com>
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 <ymherklotz@gmail.com>
@@ -33,7 +34,7 @@ private:
GLFWwindow *window_ = nullptr;
public:
- Window() = default;
+ Window() = default;
Window(const Window &) = delete;
Window(Window &&) = delete;
/// destroys the window handle