aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docs/Doxyfile2
-rw-r--r--include/YAGE/camera2d.hpp4
-rw-r--r--include/YAGE/picopng.hpp9
-rw-r--r--include/YAGE/spritebatch.hpp10
-rwxr-xr-xscripts/add_version_headers41
-rw-r--r--test/windowtest.cpp4
6 files changed, 39 insertions, 31 deletions
diff --git a/docs/Doxyfile b/docs/Doxyfile
index dfc94dcd..a7caa23f 100644
--- a/docs/Doxyfile
+++ b/docs/Doxyfile
@@ -890,7 +890,7 @@ EXCLUDE_SYMLINKS = NO
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/*
-EXCLUDE_PATTERNS =
+EXCLUDE_PATTERNS = */googletest/*
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
diff --git a/include/YAGE/camera2d.hpp b/include/YAGE/camera2d.hpp
index 077d0544..e5e4e651 100644
--- a/include/YAGE/camera2d.hpp
+++ b/include/YAGE/camera2d.hpp
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------------
* camera2d.hpp
*
- * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> -- MIT License
- * See file LICENSE for more details
+ * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
+ * MIT License, see LICENSE file for more details.
* ----------------------------------------------------------------------------
*/
diff --git a/include/YAGE/picopng.hpp b/include/YAGE/picopng.hpp
index 0aa6c6d4..b1318da0 100644
--- a/include/YAGE/picopng.hpp
+++ b/include/YAGE/picopng.hpp
@@ -12,6 +12,11 @@
namespace yage
{
-extern int decodePNG(std::vector<unsigned char> &out_image, unsigned long &image_width, unsigned long &image_height, const unsigned char *in_png, size_t in_size, bool convert_to_rgba32 = true);
-
+extern int decodePNG(std::vector<unsigned char> &out_image,
+ unsigned long &image_width,
+ unsigned long &image_height,
+ const unsigned char *in_png,
+ size_t in_size,
+ bool convert_to_rgba32 = true);
+
} // yage
diff --git a/include/YAGE/spritebatch.hpp b/include/YAGE/spritebatch.hpp
index 9446c40f..1b1c8bb8 100644
--- a/include/YAGE/spritebatch.hpp
+++ b/include/YAGE/spritebatch.hpp
@@ -6,8 +6,8 @@
* ----------------------------------------------------------------------------
*/
-#ifndef SPRITE_BATCH_HPP
-#define SPRITE_BATCH_HPP
+#ifndef YAGE_SPRITE_BATCH_HPP
+#define YAGE_SPRITE_BATCH_HPP
#include "vertex.hpp"
@@ -20,6 +20,8 @@ namespace yage {
class SpriteBatch;
+/** Glyph with information of the texture.
+ */
class Glyph {
// member variables
private:
@@ -46,24 +48,20 @@ public:
class RenderBatch {
friend SpriteBatch;
- // member variables
private:
GLsizei num_vertices_;
GLint offset_;
GLuint texture_;
- // member functions
public:
RenderBatch(GLint offset, GLsizei num_vertices, GLuint texture);
- // getters
GLint offset() const { return offset_; }
GLsizei num_vertices() const { return num_vertices_; }
GLuint texture() const { return texture_; }
};
class SpriteBatch {
- // member variables
public:
static const int NUM_VERTICES = 6;
diff --git a/scripts/add_version_headers b/scripts/add_version_headers
index 0949fb86..d41f5a08 100755
--- a/scripts/add_version_headers
+++ b/scripts/add_version_headers
@@ -28,12 +28,13 @@ import re
import sys
-header = """/* -----------------------------------------------------------------------------
+header = """/* ---------------------------------------------------------------\
+-------------
* {0}
*
- * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> -- MIT License,
- * See LICENSE file for more details.
- * -----------------------------------------------------------------------------
+ * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
+ * MIT License, see LICENSE file for more details.
+ * ----------------------------------------------------------------------------
*/
"""
@@ -43,26 +44,27 @@ class HeaderUpdate(object):
"""Updates the header in all the source and header files in the code"""
def __init__(self, **kwargs):
self.match_re = ".*[.]cpp$|.*[.]hpp$"
- if "match_re" in kwargs:
- self.match_re = kwargs["match_re"]
- self.exclude_re = ""
- if "exlude_re" in kwargs:
- self.exclude_re = kwargs["exclude_re"]
+ self.exclude_re = "^$"
self.exclude_build = True
- if "exclude_build" in kwargs:
- self.exclude_build = kwargs["exclude_build"]
+ self.exclude_dir = ".*build.*"
+ self.match_dir = ""
+ for key, value in kwargs.items():
+ setattr(self, key, value)
def writeHeader(self):
for subdir, dirs, files in os.walk(os.getcwd()):
- if (not re.match(".*build.*", subdir) or (not self.exclude_build)):
+ if (not re.match(self.exclude_dir, subdir)) and \
+ (re.match(self.match_dir, subdir)):
for file_ in files:
- if (re.match(self.match_re, file_)) and (not re.match(self.exclude_re, file_)):
-
- with open(os.path.join(subdir, file_), 'r') as src_file:
+ if (re.match(self.match_re, file_)) and \
+ (not re.match(self.exclude_re, file_)):
+ with open(os.path.join(subdir, file_), 'r') \
+ as src_file:
src = src_file.read()
- if not re.match("^/[*] -*$"):
+ if not re.match("^\/[*] -+", src):
print(os.path.join(subdir, file_), end=" ")
- with open(os.path.join(subdir, file_), 'w') as src_file_lic:
+ with open(os.path.join(subdir, file_),
+ 'w') as src_file_lic:
src_file_lic.write(header.format(file_))
src_file_lic.write(src)
print("-- done")
@@ -75,7 +77,10 @@ class HeaderUpdate(object):
def main(argv):
- udpate = HeaderUpdate(exclude_re="^picopng[.]cpp")
+ update = HeaderUpdate(exclude_re="^picopng[.]cpp",
+ exclude_dir=".*build.*|.*google.*",
+ match_dir=".*src.*|.*include.*|.*test.*")
+ update.writeHeader()
if __name__ == "__main__":
diff --git a/test/windowtest.cpp b/test/windowtest.cpp
index d252f28f..6fb4e462 100644
--- a/test/windowtest.cpp
+++ b/test/windowtest.cpp
@@ -1,8 +1,8 @@
/* ----------------------------------------------------------------------------
* windowtest.cpp
*
- * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com> -- MIT License
- * See file LICENSE for more details
+ * Copyright (c) 2017 Yann Herklotz Grave <ymherklotz@gmail.com>
+ * MIT License, see LICENSE file for more details.
* ----------------------------------------------------------------------------
*/