Skip to content

Commit 121c2a5

Browse files
committed
Initial commit
1 parent 1f4329f commit 121c2a5

File tree

443 files changed

+316173
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

443 files changed

+316173
-0
lines changed

README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Zombie Annihilator
2+
3+
Zombie Annihilator is a 3D top-down survival shooter game made in OpenGL. Inspired by [Crimsonland](http://www.10tons.com/Game/crimsonland.html).
4+
5+
![Zombie Annihilator](https://user-images.githubusercontent.com/12998256/96028817-19f0f780-0e5a-11eb-9112-0833f5175ee0.gif)

bin/Assimp32.dll

6.75 MB
Binary file not shown.

bin/FreeImage.dll

2.66 MB
Binary file not shown.

bin/glew32.dll

330 KB
Binary file not shown.

bin/glfw3.dll

42.5 KB
Binary file not shown.

glgame4.sln

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 11.00
3+
# Visual Studio 2010
4+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "oglApplication", "oglApplication\oglApplication.vcxproj", "{CAC17CC1-76D0-4603-9B0B-4FA35E909051}"
5+
EndProject
6+
Global
7+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
8+
Debug|Win32 = Debug|Win32
9+
Release|Win32 = Release|Win32
10+
EndGlobalSection
11+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
12+
{CAC17CC1-76D0-4603-9B0B-4FA35E909051}.Debug|Win32.ActiveCfg = Debug|Win32
13+
{CAC17CC1-76D0-4603-9B0B-4FA35E909051}.Debug|Win32.Build.0 = Debug|Win32
14+
{CAC17CC1-76D0-4603-9B0B-4FA35E909051}.Release|Win32.ActiveCfg = Release|Win32
15+
{CAC17CC1-76D0-4603-9B0B-4FA35E909051}.Release|Win32.Build.0 = Release|Win32
16+
EndGlobalSection
17+
GlobalSection(SolutionProperties) = preSolution
18+
HideSolutionNode = FALSE
19+
EndGlobalSection
20+
EndGlobal
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
2+
// ===============================================================================
3+
// May be included multiple times - resets structure packing to the defaults
4+
// for all supported compilers. Reverts the changes made by #include <pushpack1.h>
5+
//
6+
// Currently this works on the following compilers:
7+
// MSVC 7,8,9
8+
// GCC
9+
// BORLAND (complains about 'pack state changed but not reverted', but works)
10+
// ===============================================================================
11+
12+
#ifndef AI_PUSHPACK_IS_DEFINED
13+
# error pushpack1.h must be included after poppack1.h
14+
#endif
15+
16+
// reset packing to the original value
17+
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
18+
# pragma pack( pop )
19+
#endif
20+
#undef PACK_STRUCT
21+
22+
#undef AI_PUSHPACK_IS_DEFINED
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
3+
// ===============================================================================
4+
// May be included multiple times - sets structure packing to 1
5+
// for all supported compilers. #include <poppack1.h> reverts the changes.
6+
//
7+
// Currently this works on the following compilers:
8+
// MSVC 7,8,9
9+
// GCC
10+
// BORLAND (complains about 'pack state changed but not reverted', but works)
11+
//
12+
//
13+
// USAGE:
14+
//
15+
// struct StructToBePacked {
16+
// } PACK_STRUCT;
17+
//
18+
// ===============================================================================
19+
20+
#ifdef AI_PUSHPACK_IS_DEFINED
21+
# error poppack1.h must be included after pushpack1.h
22+
#endif
23+
24+
#if defined(_MSC_VER) || defined(__BORLANDC__) || defined (__BCPLUSPLUS__)
25+
# pragma pack(push,1)
26+
# define PACK_STRUCT
27+
#elif defined( __GNUC__ )
28+
# define PACK_STRUCT __attribute__((packed))
29+
#else
30+
# error Compiler not supported
31+
#endif
32+
33+
#if defined(_MSC_VER)
34+
35+
// C4103: Packing was changed after the inclusion of the header, propably missing #pragma pop
36+
# pragma warning (disable : 4103)
37+
#endif
38+
39+
#define AI_PUSHPACK_IS_DEFINED
40+
41+
Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
/*
2+
Open Asset Import Library (assimp)
3+
----------------------------------------------------------------------
4+
5+
Copyright (c) 2006-2012, assimp team
6+
All rights reserved.
7+
8+
Redistribution and use of this software in source and binary forms,
9+
with or without modification, are permitted provided that the
10+
following conditions are met:
11+
12+
* Redistributions of source code must retain the above
13+
copyright notice, this list of conditions and the
14+
following disclaimer.
15+
16+
* Redistributions in binary form must reproduce the above
17+
copyright notice, this list of conditions and the
18+
following disclaimer in the documentation and/or other
19+
materials provided with the distribution.
20+
21+
* Neither the name of the assimp team, nor the names of its
22+
contributors may be used to endorse or promote products
23+
derived from this software without specific prior
24+
written permission of the assimp team.
25+
26+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
27+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
28+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
29+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
30+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
31+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
32+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
33+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
34+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
35+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
36+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
37+
38+
----------------------------------------------------------------------
39+
*/
40+
/** @file DefaultLogger.h
41+
*/
42+
43+
#ifndef INCLUDED_AI_DEFAULTLOGGER
44+
#define INCLUDED_AI_DEFAULTLOGGER
45+
46+
#include "Logger.hpp"
47+
#include "LogStream.hpp"
48+
#include "NullLogger.hpp"
49+
#include <vector>
50+
51+
namespace Assimp {
52+
// ------------------------------------------------------------------------------------
53+
class IOStream;
54+
struct LogStreamInfo;
55+
56+
/** default name of logfile */
57+
#define ASSIMP_DEFAULT_LOG_NAME "AssimpLog.txt"
58+
59+
// ------------------------------------------------------------------------------------
60+
/** @brief CPP-API: Primary logging facility of Assimp.
61+
*
62+
* The library stores its primary #Logger as a static member of this class.
63+
* #get() returns this primary logger. By default the underlying implementation is
64+
* just a #NullLogger which rejects all log messages. By calling #create(), logging
65+
* is turned on. To capture the log output multiple log streams (#LogStream) can be
66+
* attach to the logger. Some default streams for common streaming locations (such as
67+
* a file, std::cout, OutputDebugString()) are also provided.
68+
*
69+
* If you wish to customize the logging at an even deeper level supply your own
70+
* implementation of #Logger to #set().
71+
* @note The whole logging stuff causes a small extra overhead for all imports. */
72+
class ASSIMP_API DefaultLogger :
73+
public Logger {
74+
75+
public:
76+
77+
// ----------------------------------------------------------------------
78+
/** @brief Creates a logging instance.
79+
* @param name Name for log file. Only valid in combination
80+
* with the aiDefaultLogStream_FILE flag.
81+
* @param severity Log severity, VERBOSE turns on debug messages
82+
* @param defStreams Default log streams to be attached. Any bitwise
83+
* combination of the aiDefaultLogStream enumerated values.
84+
* If #aiDefaultLogStream_FILE is specified but an empty string is
85+
* passed for 'name', no log file is created at all.
86+
* @param io IOSystem to be used to open external files (such as the
87+
* log file). Pass NULL to rely on the default implementation.
88+
* This replaces the default #NullLogger with a #DefaultLogger instance. */
89+
static Logger *create(const char* name = ASSIMP_DEFAULT_LOG_NAME,
90+
LogSeverity severity = NORMAL,
91+
unsigned int defStreams = aiDefaultLogStream_DEBUGGER | aiDefaultLogStream_FILE,
92+
IOSystem* io = NULL);
93+
94+
// ----------------------------------------------------------------------
95+
/** @brief Setup a custom #Logger implementation.
96+
*
97+
* Use this if the provided #DefaultLogger class doesn't fit into
98+
* your needs. If the provided message formatting is OK for you,
99+
* it's much easier to use #create() and to attach your own custom
100+
* output streams to it.
101+
* @param logger Pass NULL to setup a default NullLogger*/
102+
static void set (Logger *logger);
103+
104+
// ----------------------------------------------------------------------
105+
/** @brief Getter for singleton instance
106+
* @return Only instance. This is never null, but it could be a
107+
* NullLogger. Use isNullLogger to check this.*/
108+
static Logger *get();
109+
110+
// ----------------------------------------------------------------------
111+
/** @brief Return whether a #NullLogger is currently active
112+
* @return true if the current logger is a #NullLogger.
113+
* Use create() or set() to setup a logger that does actually do
114+
* something else than just rejecting all log messages. */
115+
static bool isNullLogger();
116+
117+
// ----------------------------------------------------------------------
118+
/** @brief Kills the current singleton logger and replaces it with a
119+
* #NullLogger instance. */
120+
static void kill();
121+
122+
// ----------------------------------------------------------------------
123+
/** @copydoc Logger::attachStream */
124+
bool attachStream(LogStream *pStream,
125+
unsigned int severity);
126+
127+
// ----------------------------------------------------------------------
128+
/** @copydoc Logger::detatchStream */
129+
bool detatchStream(LogStream *pStream,
130+
unsigned int severity);
131+
132+
133+
private:
134+
135+
// ----------------------------------------------------------------------
136+
/** @briefPrivate construction for internal use by create().
137+
* @param severity Logging granularity */
138+
DefaultLogger(LogSeverity severity);
139+
140+
// ----------------------------------------------------------------------
141+
/** @briefDestructor */
142+
~DefaultLogger();
143+
144+
private:
145+
146+
/** @brief Logs debug infos, only been written when severity level VERBOSE is set */
147+
void OnDebug(const char* message);
148+
149+
/** @brief Logs an info message */
150+
void OnInfo(const char* message);
151+
152+
/** @brief Logs a warning message */
153+
void OnWarn(const char* message);
154+
155+
/** @brief Logs an error message */
156+
void OnError(const char* message);
157+
158+
// ----------------------------------------------------------------------
159+
/** @brief Writes a message to all streams */
160+
void WriteToStreams(const char* message, ErrorSeverity ErrorSev );
161+
162+
// ----------------------------------------------------------------------
163+
/** @brief Returns the thread id.
164+
* @note This is an OS specific feature, if not supported, a
165+
* zero will be returned.
166+
*/
167+
unsigned int GetThreadID();
168+
169+
private:
170+
// Aliases for stream container
171+
typedef std::vector<LogStreamInfo*> StreamArray;
172+
typedef std::vector<LogStreamInfo*>::iterator StreamIt;
173+
typedef std::vector<LogStreamInfo*>::const_iterator ConstStreamIt;
174+
175+
//! only logging instance
176+
static Logger *m_pLogger;
177+
static NullLogger s_pNullLogger;
178+
179+
//! Attached streams
180+
StreamArray m_StreamArray;
181+
182+
bool noRepeatMsg;
183+
char lastMsg[MAX_LOG_MESSAGE_LENGTH*2];
184+
size_t lastLen;
185+
};
186+
// ------------------------------------------------------------------------------------
187+
188+
} // Namespace Assimp
189+
190+
#endif // !! INCLUDED_AI_DEFAULTLOGGER

0 commit comments

Comments
 (0)