-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pulls #1
- Loading branch information
Showing
27 changed files
with
533 additions
and
503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
BasedOnStyle: LLVM | ||
|
||
IndentWidth: 3 | ||
TabWidth: 3 | ||
AccessModifierOffset: -2 | ||
ConstructorInitializerIndentWidth: 3 | ||
ContinuationIndentWidth: 3 | ||
ObjCBlockIndentWidth: 3 | ||
UseTab: ForContinuationAndIndentation | ||
IndentCaseLabels: true | ||
IndentPPDirectives: BeforeHash | ||
NamespaceIndentation: All | ||
|
||
DerivePointerAlignment: false | ||
PointerAlignment: Left | ||
|
||
BreakBeforeBraces: Attach | ||
BreakAfterJavaFieldAnnotations: true | ||
BreakBeforeBinaryOperators: None | ||
|
||
AllowShortBlocksOnASingleLine: Never | ||
AllowShortCaseLabelsOnASingleLine: false | ||
#AllowShortEnumsOnASingleLine: true # this breaks things? | ||
AllowShortFunctionsOnASingleLine: Inline | ||
AllowShortIfStatementsOnASingleLine: Never | ||
AllowShortLambdasOnASingleLine: Empty | ||
AllowShortLoopsOnASingleLine: false | ||
|
||
AlignAfterOpenBracket: DontAlign | ||
FixNamespaceComments: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,11 @@ | ||
|
||
#ifndef _CE_EVENT_HANDLER_H_ | ||
#define _CE_EVENT_HANDLER_H_ | ||
#pragma once | ||
|
||
#include <SDL_events.h> | ||
|
||
namespace ce { | ||
class IEventHandler { | ||
private: | ||
public: | ||
virtual void onEvent(SDL_Event& event)=0; | ||
private: | ||
public: | ||
virtual void onEvent(SDL_Event& event) = 0; | ||
}; | ||
} | ||
|
||
#endif // _CE_EVENT_HANDLER_H_ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,5 @@ | ||
#ifndef _CE_MATH_H_ | ||
#define _CE_MATH_H_ | ||
#pragma once | ||
|
||
#include <glm/glm.hpp> | ||
#include <glm/gtc/matrix_transform.hpp> | ||
#include <glm/gtc/type_ptr.hpp> | ||
|
||
#endif // _CE_MATH_H_ | ||
#include <glm/gtc/type_ptr.hpp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
//#include <memory> | ||
// #include <memory> | ||
|
||
#include "rendering/mesh.h" | ||
#include "rendering/shader.h" | ||
#include "rendering/texture.h" | ||
#include "rendering/vertex.h" | ||
#include "rendering/mesh.h" | ||
/* | ||
#define PTR std::shared_ptr | ||
#define PTR_CAST = dynamic_pointer_cast | ||
#define OBJMAP(x) std::map<std::string,PTR<x>> | ||
*/ | ||
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
#ifndef _CE_GL_H_ | ||
#define _CE_RENDERING_H_ | ||
#pragma once | ||
|
||
#include <GL/glew.h> | ||
#include <SDL.h> | ||
|
||
#endif // !_CE_GL_H_ | ||
#include <SDL.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,19 @@ | ||
#ifndef _CE_TIME_H_ | ||
#define _CE_TIME_H_ | ||
#pragma once | ||
|
||
namespace ce { | ||
class Time | ||
{ | ||
private: | ||
float | ||
m_now, | ||
m_last, | ||
m_dt, | ||
m_fps; | ||
class Time { | ||
private: | ||
float m_now, m_last, m_dt, m_fps; | ||
|
||
float getTime(); | ||
public: | ||
Time(); | ||
~Time(); | ||
float getTime(); | ||
|
||
void update(); | ||
public: | ||
Time(); | ||
~Time(); | ||
|
||
float getDeltaTime() {return m_dt;} | ||
float getFPS() {return m_fps;}; | ||
}; | ||
} | ||
void update(); | ||
|
||
#endif // !_CE_TIME_H_ | ||
float getDeltaTime() { return m_dt; } | ||
float getFPS() { return m_fps; }; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,38 +2,35 @@ | |
* Tumpnt Logger | ||
* Author: Cameron Trow <[email protected]> | ||
* Source: https://github.com/Tumpnt/TumpntAudio/blob/master/src/core/ta_log.h | ||
* | ||
* | ||
* Example Usage | ||
* | ||
* | ||
* int main() { | ||
* LOG_INFO("Hello World"); | ||
* return 0; | ||
* } | ||
* | ||
* | ||
* Output: | ||
* [INFO][main.cpp:3|main]: Hello World | ||
* | ||
* | ||
*/ | ||
#ifndef _TPNT_LOG_H_ | ||
#define _TPNT_LOG_H_ | ||
#pragma once | ||
|
||
#include <stdio.h> | ||
#include <cstring> | ||
#include <stdio.h> | ||
#include <string> | ||
|
||
#define TPNT_LOGGER_STR(X) (std::string("")+X).c_str() | ||
#define TPNT_LOGGER_STR(X) (std::string("") + X).c_str() | ||
#define TPNT_LOGGER_FORMAT "[%s][%s:%d|%s]: %s\n" | ||
#define TPNT_LOGGER_FILE strrchr(__FILE__, '/') ? strrchr(__FILE__, '/') + 1 : __FILE__ | ||
#define TPNT_LOGGER_CONTEXT TPNT_LOGGER_FILE,__LINE__,__FUNCTION__ | ||
#define TPNT_LOG(L,X) printf(TPNT_LOGGER_FORMAT,TPNT_LOGGER_STR(L),TPNT_LOGGER_CONTEXT,TPNT_LOGGER_STR(X)) | ||
#define TPNT_LOGGER_CONTEXT TPNT_LOGGER_FILE, __LINE__, __FUNCTION__ | ||
#define TPNT_LOG(L, X) printf(TPNT_LOGGER_FORMAT, TPNT_LOGGER_STR(L), TPNT_LOGGER_CONTEXT,TPNT_LOGGER_STR(X)) | ||
#define TPNT_LOG_RESET "\033[0m" | ||
#define TPNT_LOG_SUCCESS "\033[1;32m" | ||
#define TPNT_LOG_WARN "\033[1;33m" | ||
#define TPNT_LOG_ERROR "\033[1;31m" | ||
|
||
#define LOG_INFO(X) TPNT_LOG("INFO",X) | ||
#define LOG_WARN(X) TPNT_LOG(TPNT_LOG_WARN+"WARN"+TPNT_LOG_RESET,X) | ||
#define LOG_ERROR(X) TPNT_LOG(TPNT_LOG_ERROR+"ERROR"+TPNT_LOG_RESET,X) | ||
#define LOG_SUCCESS(X) TPNT_LOG(TPNT_LOG_SUCCESS+"SUCCESS"+TPNT_LOG_RESET,X) | ||
|
||
#endif // _TPNT_LOG_H_ | ||
#define LOG_INFO(X) TPNT_LOG("INFO", X) | ||
#define LOG_WARN(X) TPNT_LOG(TPNT_LOG_WARN + "WARN" + TPNT_LOG_RESET, X) | ||
#define LOG_ERROR(X) TPNT_LOG(TPNT_LOG_ERROR + "ERROR" + TPNT_LOG_RESET, X) | ||
#define LOG_SUCCESS(X) TPNT_LOG(TPNT_LOG_SUCCESS + "SUCCESS" + TPNT_LOG_RESET, X) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.