repo_name stringlengths 5 122 | path stringlengths 3 232 | text stringlengths 6 1.05M |
|---|---|---|
npruehs/block-burst | Source/BlockBurst/BlockBurst/BlockBurst.Shared/Block.h | <gh_stars>0
#pragma once
using namespace DirectX;
namespace BlockBurst
{
enum BlockType
{
Good,
Bad,
Dead
};
struct Block
{
XMFLOAT3 position;
XMFLOAT3 velocity;
float rotation;
VertexPositionColor vertices[8];
int indexOffset;
BlockType blockType;
float size;
};
} |
npruehs/block-burst | Source/BlockBurst/BlockBurst/BlockBurst.Shared/BlockBurstMain.h | #pragma once
#include "Common\StepTimer.h"
#include "Common\DeviceResources.h"
#include "Content\Sample3DSceneRenderer.h"
#include "Content\ScoreTextRenderer.h"
#include "Block.h"
// Renders Direct2D and 3D content on the screen.
namespace BlockBurst
{
class BlockBurstMain : public DX::IDeviceNotify
{
public:
... |
npruehs/block-burst | Source/BlockBurst/BlockBurst/BlockBurst.Shared/Content/Sample3DSceneRenderer.h | #pragma once
#include "..\Common\DeviceResources.h"
#include "ShaderStructures.h"
#include "..\Common\StepTimer.h"
#include "../Block.h"
namespace BlockBurst
{
// This sample renderer instantiates a basic rendering pipeline.
class Sample3DSceneRenderer
{
public:
Sample3DSceneRenderer(const std::shared_ptr<DX:... |
lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051- | code/clock.c | #include "pins.h"
#include "LCD1602.h"
#include "DS1302.h"
#include "DS18B20.h"
#include "EEPROM.h"
//Sytem variable, time, state, flag.
//---------------------------
enum system_state {DEFAULT, SETTING}; //Define the system state.
enum system_state present_state;
unsigned char cursor_index; //Define th... |
lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051- | code/SONG.c | #define _SONG_C
#include "pins.h"
#include "SONG.h"
//Using timer1 to play song.
void song_delay(unsigned char t) {
unsigned char i,j;
for(i=0;i<t;i++)
for(j=0;j<8200;j++);
TR1 = 1;
}
void song_begin(void){
unsigned char song_time = 1;
unsigned char i,k = 0;
TMOD = 0x10;
TH1 = 0x00;
... |
lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051- | code/LCD1602.h | #ifndef _LCD1602_H
#define _LCD1602_H
#ifndef _LCD1602_C //External varaible defined at here.
#endif
//External function defined at here.
void lcd_write_cmd(unsigned char command);
void lcd_write_data(unsigned char dat);
void lcd_set_cursor(unsigned char x, unsigned char y);
void lcd_show_string(unsigned char... |
lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051- | code/DS18B20.c | <reponame>lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051-
#define _DS18B20_C
#include "pins.h"
#include "DS18B20.h"
//Delay 10us, input is how many times of 10us for instance x=5, delay 50us.
void delay10us(unsigned char x) {
unsigned char i = 0;
for(i=0;i<x;i++) {
_nop_();
_nop_();
... |
lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051- | code/LCD1602.c | <gh_stars>0
#define _LCD1602_C
#include "pins.h"
#include "LCD1602.h"
void Delay(unsigned char x)
{
unsigned int i,j;
for(i=x;i>0;i--)
{
for(j=120;j>0;j--)
{}
}
}
//Check if LCD is ready, assistant function.
void lcd_ready(void){
unsigned char a;
P0 = 0xff; //To read the busy pin, set 1 ... |
lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051- | code/DS1302.h | <reponame>lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051-<gh_stars>0
#ifndef _DS1302_H
#define _DS1302_H
//Struct to store the time of date of the whole program.
struct time_and_date {
unsigned int year;
unsigned char month;
unsigned char day;
unsigned char hour;
unsigned char minute;
... |
lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051- | code/IR.h | #ifndef _IR_H
#define _IR_H
#ifndef _IR_C
#endif
//Define the IR function at here.Using the timer0 to calculate the time.
void ir_init(void);
#endif |
lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051- | code/IR.c | #define _IR_C
#include "pins.h"
#include "IR.h"
struct time_and_date SetTime;
bit ir_finish = 0; //Ir flag if recieved data, set to 1, else set to 0.
unsigned char ir_data[4]; //Data buffer since there are 4 bytes need to be recieved.
const uint8 code ir_map[][2] = { //???????PC??????
{0x45,0x00}, {0x46,0... |
lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051- | code/SONG.h | <reponame>lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051-
#ifndef _SONG_H
#define _SONG_H
#ifndef _SONG_C
#endif
code unsigned char FH[] = {0xF2,0xF3,0xF5,0xF5,0xF6,0xF7,0xF8,
0xF9,0xF9,0xFA,0xFA,0xFB,0xFB,0xFC,
0xFC,0xFC,0xFD,0xFD,0xFD,0xFD,0xFE,
0xFE,0xFE,0xFE,0xFE,0xFE,0xFE,0xFF};
c... |
lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051- | code/pins.h | <reponame>lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051-
#ifndef _PINS_H
#define _PINS_H
#include <reg52.h>
#include <intrins.h>
#include <ctype.h>
#include <stdio.h>
//Define pins, used in this clock project.
typedef signed char int8;
typedef signed int int16;
ty... |
lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051- | code/EEPROM.h | #ifndef _EEPROM_H
#define _EEPROM_H
#ifndef _EEPROM_C
#endif
//I2C and EEPROM Operate function.
unsigned char eeprom_read_byte(unsigned char addr);
void eeprom_write_byte(unsigned char addr, unsigned char dat);
void eeprom_read_multi(unsigned char *buffer, unsigned char addr, unsigned char len);
void eeprom_w... |
lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051- | code/DS1302.c | <filename>code/DS1302.c
#define _DS1302_C
#include "pins.h"
#include "DS1302.h"
//Write one byte to DS1302.
void ds1302_write_byte(unsigned char reg, unsigned char dat){
unsigned char i, addr; //Temp value.
DS_CE = 0;
_nop_();
DS_CK = 0;
_nop_();
DS_CE = 1; //Select the DS1302
_nop_();
addr... |
lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051- | code/EEPROM.c | #define _EEPROM_C
#include "pins.h"
#include "EEPROM.h"
//The delay function.
#define I2Cdelay() {_nop_();_nop_();_nop_();_nop_();}
//Procedure to initialize I2C
void startConfig(){
SDA = 1;
SCL = 1;
I2Cdelay();
SDA = 0;
I2Cdelay();
SCL = 0;
}
//Procedure to stop I2C
void stopConfig(){
SCL ... |
lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051- | code/main.c | #include "pins.h"
#include "LCD1602.h"
#include "DS1302.h"
#include "DS18B20.h"
#include "EEPROM.h"
struct time_and_date SetTime;
//Infrared.
//--------------------------------------------------------------------------------------
bit ir_finish = 0; //Ir flag if recieved data, set to 1, else set to 0.
unsi... |
lirui-shanghaitech/A-multi-functions-digital-clock-based-on-8051- | code/DS18B20.h | #ifndef _DS18B20_H
#define _DS18B20_H
#ifndef _DS18B20_C
#endif
//Function define.(API)
bit ds18b20_get_temp(int *temperature);
bit ds18b20_start_transition();
void ds18b20_write_byte(unsigned char dat);
unsigned char ds18b20_read_byte();
#endif |
BryceStandley/TNAH | core/src/TNAH/Physics/PhysicsEvents.h | <gh_stars>1-10
#pragma once
#pragma warning(push, 0)
#include <reactphysics3d/reactphysics3d.h>
#include <entt/entt.hpp>
#pragma warning(pop)
namespace tnah {
namespace Physics {
/**
* @class PhysicsEvents
*
* @brief The physics event class that inherits from the react physics 3d eventListener class
*
... |
BryceStandley/TNAH | core/src/TNAH/Physics/PhysicsEngine.h | #pragma once
#pragma warning(push, 0)
#include <reactphysics3d/reactphysics3d.h>
#pragma warning(pop)
#include <entt/entt.hpp>
#include "CollisionDetectionEngine.h"
#include "PhysicsStructures.h"
#include "Rigidbody.h"
#include "TNAH/Physics/PhysicsTimestep.h"
#include "TNAH/Scene/Components/Components.h"
#include ... |
BryceStandley/TNAH | core/src/TNAH/Physics/Collider.h | #pragma once
#include "PhysicsStructures.h"
#include "TNAH/Core/Math.h"
#pragma warning(push, 0)
#include <reactphysics3d/reactphysics3d.h>
#pragma warning(pop)
namespace tnah::Physics {
/**
* @class Collider
* @brief Class to contain the required information about Colliders
* @author <NAME>
* @date ... |
BryceStandley/TNAH | core/src/TNAH/Scene/SceneCamera.h | #pragma once
#include "TNAH/Renderer/Camera.h"
namespace tnah {
class TransformComponent;
class SceneCamera : public Camera
{
public:
enum class ProjectionType { Perspective = 0, Orthographic = 1 };
public:
/**
*
* \fn void SetPerspective
*
* \brief Sets the perspective of the camera
*
*... |
BryceStandley/TNAH | core/src/TNAH/Events/Event.h | #pragma once
#include <tnahpch.h>
namespace tnah {
/**
* @enum EventType
*
* @brief Values that represent event types
*/
enum class EventType
{
None = 0,
WindowClose, WindowResize, WindowFocus, WindowLostFocus, WindowMoved,
AppTick, AppUpdate, AppRender,
KeyPressed, KeyReleased, KeyTyped,
MouseB... |
BryceStandley/TNAH | core/src/TNAH/Physics/PhysicsTimestep.h | #pragma once
namespace tnah
{
/**
* @class PhysicsTimestep
*
* @brief The physics timestep class is designed to make sure the frame rate of the physics is 60 frames per second
*
* @author <NAME>
* @date 11/09/2021
*/
class PhysicsTimestep
{
public:
PhysicsTi... |
BryceStandley/TNAH | core/src/TNAH/Core/Ref.h | #pragma once
#include <stdint.h>
#include <atomic>
namespace tnah {
/**
* @class RefCounted
*
* @brief A wrapper for shared pointers
*
* @author <NAME>
* @date 7/09/2021
*/
class RefCounted
{
public:
/**
*
* \fn void IncRefCount
*
* \brief Increase the ref count
*
* \author... |
BryceStandley/TNAH | core/src/TNAH/Core/Buffer.h | #pragma once
#include "TNAH/Core/Core.h"
namespace tnah {
/**
* @struct Buffer
*
* @brief A buffer struct
*
* @author <NAME>
* @date 7/09/2021
*/
struct Buffer
{
/** @brief A pointer to the data */
void* Data;
/** @brief The size */
uint32_t Size;
/**
* @fn Buffer()
*
* @brief ... |
BryceStandley/TNAH | core/src/Platform/Windows/WinWindow.h | <reponame>BryceStandley/TNAH
#pragma once
#include "TNAH/Core/Window.h"
#include "TNAH/Events/ApplicationEvent.h"
#include "TNAH/Events/MouseEvent.h"
#include "TNAH/Events/KeyEvent.h"
#include "Platform/OpenGL/OpenGLGraphicsContext.h"
#include <GLFW/glfw3.h>
namespace tnah {
/**
* @class WinWindow
*
* @bri... |
BryceStandley/TNAH | core/src/TNAH/Core/FileStructures.h | #pragma once
#include <unordered_map>
#include "Utility.h"
#include <filesystem>
namespace tnah {
/**
* @struct File
*
* @brief Structure of a file, contains a name and a extension.
*
* @author <NAME>
* @date 7/09/2021
*/
struct File
{
std::string FileName;
std::string Extension;
std::string... |
BryceStandley/TNAH | core/src/TNAH/Core/Input.h | #pragma once
#include "TNAH/Core/Core.h"
namespace tnah {
/**
* @class Input
*
* @brief An Input
*
* @author <NAME>
* @date 7/09/2021
*/
class Input
{
public:
/**
* @fn inline static bool Input::IsKeyPressed(int keycode)
*
* @brief Query if 'keycode' is key pressed
*
* @author <N... |
BryceStandley/TNAH | core/src/TNAH/Physics/Rigidbody.h | #pragma once
#include "PhysicsStructures.h"
#include "Collider.h"
#include "TNAH/Scene/Components/Components.h"
namespace tnah::Physics {
/**
* @class RigidBody
*
* @brief A class that defines all rigidbody physics body properties.
*
* @author <NAME>
* @date 20/10/2021
*
... |
BryceStandley/TNAH | core/src/TNAH/Scene/Components/AnimatorComponent.h | #pragma once
#include "TNAH/Renderer/Animation.h"
namespace tnah
{
/**********************************************************************************************//**
* @class AnimatorComponent
*
* @brief An animator component.
*
* @author Chris
* @date 10/09/2021
*************************************... |
BryceStandley/TNAH | core/src/TNAH/Scene/Components/AI/Emotion.h | <filename>core/src/TNAH/Scene/Components/AI/Emotion.h
#pragma once
namespace tnah
{
/**
* @brief each emotional state is represented in this enum class
*/
enum class Emotion
{
Neutral = 0,
Excited, Delighted, Happy, // High Arousal - Positive Valence
Content, Relaxed, Calm, // Low Arousal - Positive Val... |
BryceStandley/TNAH | core/src/TNAH/Core/Singleton.h | <gh_stars>1-10
#pragma once
namespace tnah
{
/**
* @class singleton
* @brief A templated class that uses the singleton design pattern to provide one instance of any specified class.
*
* @author <NAME>
* @version 01
* @date 30/03/2021 <NAME>, Started
*
*
**/
template<class T... |
BryceStandley/TNAH | core/src/TNAH/Core/Log.h | #pragma once
#include "Core.h"
#pragma warning(push, 0)
#include <memory>
#define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_TRACE
//#define SPDLOG_FUNCTION
#include <spdlog/spdlog.h>
#include <spdlog/sinks/stdout_color_sinks.h>
#include "spdlog/fmt/ostr.h"
#pragma warning(pop)
namespace tnah
{
/**
* @class Log
*
* @bri... |
BryceStandley/TNAH | core/src/TNAH/Scene/Components/SkyboxComponent.h | #pragma once
#include "TNAH/Core/Core.h"
#include <glm/glm.hpp>
#include "ComponentIdentification.h"
#include "TNAH/Renderer/RenderingBuffers.h"
#include "TNAH/Renderer/Material.h"
#include "TNAH/Renderer/VertexArray.h"
#include "TNAH/Renderer/Texture.h"
namespace tnah {
/******************************************... |
BryceStandley/TNAH | core/src/Platform/OpenGL/OpenGLGraphicsContext.h | #pragma once
#include "TNAH/Renderer/GraphicsContext.h"
/**
* @struct GLFWwindow
*
* @brief Form for viewing the glfw.
*
* @author <NAME>
* @date 7/09/2021
*/
struct GLFWwindow;
namespace tnah {
/**
* @class OpenGLGraphicsContext
*
* @brief An OpenGlGraphicsContext class that inherbits from a bas... |
BryceStandley/TNAH | core/src/TNAH/Scene/Components/PhysicsComponents.h | <gh_stars>1-10
#pragma once
#include "TNAH/Physics/PhysicsEngine.h"
#include "TNAH/Renderer/Mesh.h"
#include "ComponentIdentification.h"
namespace tnah{
class GameObject;
/**********************************************************************************************//**
* @class RigidBodyComponent
*
* @brief ... |
BryceStandley/TNAH | core/src/TNAH/Core/Math.h | <filename>core/src/TNAH/Core/Math.h
#pragma once
#define USE_MATH_DEFINES
#include "TNAH/Core/Core.h"
#pragma warning(push, 0)
#define GLM_ENABLE_EXPERIMENTAL
#include <glm/gtx/matrix_decompose.hpp>
#include <glm/gtx/norm.hpp>
#include <glm/gtx/quaternion.hpp>
#include <corecrt_math_defines.h>
#include <IrrKlang/irrK... |
BryceStandley/TNAH | core/src/TNAH/Events/ApplicationEvent.h | #pragma once
#include <sstream>
#include "TNAH/Events/Event.h"
namespace tnah {
/**
* @class WindowResizeEvent
*
* @brief A window resize event class that inherits from the base event class
*
* @author <NAME>
* @date 10/09/2021
*/
class WindowResizeEvent : public Event
{
public:
/**
* @fn Wi... |
BryceStandley/TNAH | core/src/TNAH/Renderer/RenderCommand.h | <reponame>BryceStandley/TNAH
#pragma once
#include "RendererAPI.h"
namespace tnah {
/**
* @class RenderCommand
*
* @brief A render command class that makes use of the renderer API to perform openGL renderer actions
*
* @author <NAME>
* @date 12/09/2021
*/
class RenderCommand
{
public:
/**
* @... |
BryceStandley/TNAH | core/src/TNAH/Scene/Components/AI/Actions.h | /*****************************************************************//**
* \file Actions.h
* \brief
*
* \author chris
* \date November 2021
*********************************************************************/
#pragma once
namespace tnah
{
/** \enum Actions The actions the objects can affo... |
BryceStandley/TNAH | core/src/TNAH/Audio/Audio.h | <filename>core/src/TNAH/Audio/Audio.h
#pragma once
#include "TNAH/Core/Core.h"
#include "TNAH/Scene/Components/AudioComponents.h"
#include "Platform/MiniAudio/MiniAudio.h"
namespace tnah
{
/**
* @class Audio
*
* @brief An audio class responisble for handling the audio engine
*
* @author ... |
BryceStandley/TNAH | core/src/TNAH/Layers/Widgets.h | <reponame>BryceStandley/TNAH
#pragma once
#include "imgui.h"
#include "imgui_internal.h"
//----------------------------------------------------------------------------------
// Custom Functions added to ImGui
// Incorporated by <NAME>
// Any functions within this file are licenced under the MIT licence
//-------------... |
BryceStandley/TNAH | core/src/TNAH/Scene/Components/AI/AStar.h | <reponame>BryceStandley/TNAH
/*****************************************************************//**
* @file AStar.h
* @brief Astar algorithm
*
* @author chris
* @date November 2021
*********************************************************************/
#pragma once
#include <stack>
namespace tnah
{
/**... |
BryceStandley/TNAH | core/src/TNAH/Renderer/Renderer.h | #pragma once
#include "TNAH/Renderer/RenderCommand.h"
#include "TNAH/Scene/SceneCamera.h"
#include "TNAH/Scene/Components/Components.h"
#include "TNAH/Renderer/Material.h"
#include "Light.h"
#include "Mesh.h"
#include "Texture.h"
namespace tnah {
/**
* @class Renderer
*
* @brief A renderer class responsible ... |
BryceStandley/TNAH | core/src/TNAH/Renderer/RenderingBuffers.h | <filename>core/src/TNAH/Renderer/RenderingBuffers.h
#pragma once
#include <glm/glm.hpp>
#include <glm/gtc/type_ptr.hpp>
#include "TNAH/Core/Ref.h"
namespace tnah {
/**
* @enum ShaderDataType
*
* @brief Values that represent shader data types
*/
enum class ShaderDataType
{
None = 0, Float, Float2, Float... |
BryceStandley/TNAH | core/src/TNAH/Scene/Components/AI/EmotionComponent.h | <filename>core/src/TNAH/Scene/Components/AI/EmotionComponent.h
#pragma once
#include "Emotion.h"
namespace tnah
{
/**
* @class EmotionComponent
*
* @brief The EmotionComponent class repsonsible for the managing of emotions, mood and personality. Can be attached as a component to give a gameobject the ability... |
BryceStandley/TNAH | core/src/TNAH/Scene/Light/DirectionalLight.h | #pragma once
#include "TNAH/Renderer/Light.h"
namespace tnah {
class DirectionLight : public Light
{
public:
/**
*
* \fn void DirectionLight
*
* \brief Default constructor
*
* \author <NAME>
* \date 13/9/2021
*
... |
BryceStandley/TNAH | core/src/Platform/OpenGL/OpenGLVertexArray.h | <filename>core/src/Platform/OpenGL/OpenGLVertexArray.h
#pragma once
#include "TNAH/Core/Ref.h"
#include "TNAH/Renderer/VertexArray.h"
namespace tnah {
/**
* @class OpenGLVertexArray
*
* @brief An OpenGLVertexArray class that inherits from base class VertexArray.
*
* @author <NAME>
* @date 7/09/2021
*... |
BryceStandley/TNAH | core/src/TNAH/Events/DebugEvent.h | <reponame>BryceStandley/TNAH<gh_stars>1-10
#pragma once
#include "TNAH/Core/Core.h"
#include "TNAH/Events/Event.h"
namespace tnah {
/**
* @class DebugEvent
*
* @brief A debug event class that inherits from the base event class
*
* @author <NAME>
* @date 10/09/2021
*/
class DebugEvent : public Event
... |
BryceStandley/TNAH | core/src/TNAH/Renderer/RendererAPI.h | <gh_stars>1-10
#pragma once
#include <TNAH/Core/Core.h>
#include "TNAH/Renderer/VertexArray.h"
namespace tnah {
/**
* @enum CullMode
*
* @brief Values that represent cull modes
*/
enum class CullMode
{
Front = 0,
Back = 1,
Front_And_Back = 2,
Disabled = 3
};
/**
* @enum DepthFunc
*
* @bri... |
BryceStandley/TNAH | core/src/TNAH/Scene/Components/Components.h | <filename>core/src/TNAH/Scene/Components/Components.h
#pragma once
#include <TNAH/Core/Core.h>
#include "TNAH/Core/KeyCodes.h"
#include "TNAH/Core/UUID.h"
#include "ComponentIdentification.h"
#include "TNAH/Scene/SceneCamera.h"
#include "SkyboxComponent.h"
#include "TerrainComponent.h"
#include "PhysicsComponents.h"
#... |
BryceStandley/TNAH | core/src/Platform/Windows/WinInput.h | <filename>core/src/Platform/Windows/WinInput.h
#pragma once
#include "TNAH/Core/Core.h"
#include "TNAH/Core/Input.h"
#include <GLFW/glfw3.h>
namespace tnah {
/**
* @class WinInput
*
* @brief A Window Input class that inherits from the base Input class
*
* @author <NAME>
* @date 7/09/2021
*/
class Wi... |
BryceStandley/TNAH | core/src/TNAH/Renderer/Camera.h | #pragma once
#include <glm/glm.hpp>
namespace tnah {
/**
* @class Camera
*
* @brief A camera class responsible for setting up the application camera
*
* @author <NAME>
* @date 12/09/2021
*/
class Camera
{
public:
/**
* @fn Camera::Camera() = default;
*
* @brief Defaulted constructor
... |
BryceStandley/TNAH | core/src/TNAH/Renderer/Shader.h | <reponame>BryceStandley/TNAH
#pragma once
#include <string>
#include <glm/glm.hpp>
#include "TNAH/Core/Ref.h"
namespace tnah {
/**
* @enum ShaderUniformType
*
* @brief Values that represent shader uniform types
*/
enum class ShaderUniformType
{
None = 0, Bool, Int, UInt, Float, Vec2, Vec3, Vec4, Mat3... |
BryceStandley/TNAH | core/src/TNAH/Scene/Components/AI/CharacterComponent.h | <gh_stars>1-10
#pragma once
namespace tnah {
/**
* @brief enums that represent the three NPC types
*/
enum class CharacterNames
{
None = 0, Rubbish = 1, StudentAi = 2, DogAi = 3
};
struct CharacterComponent
{
/**
* @fn CharacterComponent
*
... |
BryceStandley/TNAH | core/src/TNAH/Renderer/Bone.h | #pragma once
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtx/quaternion.hpp>
#include <vector>
#include <string>
#include <Assimp/anim.h>
namespace tnah {
/**
* @struct KeyPosition
*
* @brief A key position.
*
* @author <NAME>
* @date 12/09/2021
*/
struct KeyPosition... |
BryceStandley/TNAH | core/src/TNAH/Layers/Layer.h | <filename>core/src/TNAH/Layers/Layer.h
#pragma once
#include "TNAH/Core/Core.h"
#include "TNAH/Events/Event.h"
#include "TNAH/Core/Timestep.h"
#include "TNAH/Physics/PhysicsTimestep.h"
namespace tnah {
/**
* @class Layer
*
* @brief The layer class is used to allow for the creation of layers, which allow for th... |
BryceStandley/TNAH | core/src/TNAH/Renderer/Material.h | #pragma once
#include "TNAH/core/Core.h"
#include "TNAH/Renderer/Shader.h"
#include "TNAH/Renderer/Texture.h"
namespace tnah
{
/**
* @struct MaterialProperties
*
* @brief A material properties struct.
*
* @author <NAME>
* @date 12/09/2021
*/
struct MaterialProperties
{
/** @brief The shininess ... |
BryceStandley/TNAH | core/src/TNAH/Audio/AudioAPI.h | #pragma
#include "TNAH/Scene/Components/AudioComponents.h"
#include "TNAH/Scene/Components/Components.h"
namespace tnah
{
/**
* @class AudioAPI
*
* @brief An abstract audioAPI class that contains virtual functions that the audio class will inherit
*
* @author <NAME>
* @date 7/09/2021... |
BryceStandley/TNAH | core/src/TNAH/Events/MouseEvent.h | #pragma once
#include "TNAH/Events/Event.h"
#include "TNAH/Core/MouseCodes.h"
namespace tnah {
/**
* @class MouseMovedEvent
*
* @brief A mouse moved event class that inherits from the base event class
*
* @author <NAME>
* @date 10/09/2021
*/
class MouseMovedEvent : public Event
{
public:
/**
... |
BryceStandley/TNAH | core/src/TNAH/Layers/UI.h | <reponame>BryceStandley/TNAH<filename>core/src/TNAH/Layers/UI.h
#pragma once
#include "TNAH/Renderer/Texture.h"
namespace tnah {
/**
* @class UI
*
* @brief UI elements based on ImGui. Predefined wrappers to make creating UI faster and more
* consistent this class is designed to wrap as many ... |
BryceStandley/TNAH | core/src/TNAH/Scene/Components/AI/AIComponent.h | /*****************************************************************//**
* @file AIComponent.h
* @brief Holds the AI information
*
* @author chris
* @date November 2021
*********************************************************************/
#pragma once
# define PI 3.14159265358979323846
#include "A... |
BryceStandley/TNAH | core/src/TNAH/Core/UUID.h | <gh_stars>1-10
#pragma once
#include "Core.h"
#include <xhash>
namespace tnah {
/**
* @class UUID
*
* @brief An unique identifer class used for gameobjects
*
* @author <NAME>
* @date 7/09/2021
*/
class UUID
{
public:
/**
* @fn UUID::UUID();
*
* @brief Default constructor
... |
BryceStandley/TNAH | core/src/TNAH/Renderer/VertexArray.h | #pragma once
#include <memory>
#include "TNAH/Renderer/RenderingBuffers.h"
namespace tnah {
/**
* @class VertexArray
*
* @brief VertexArray class that allows for the setup of a VAO
*
* @author <NAME>
* @date 12/09/2021
*/
class VertexArray : public RefCounted
{
public:
/**
* @fn virtual Vert... |
BryceStandley/TNAH | core/src/TNAH/Core/Timestep.h | <filename>core/src/TNAH/Core/Timestep.h
#pragma once
namespace tnah {
/**
* @class Timestep
*
* @brief A timestep class that handles the time
*
* @author <NAME>
* @date 7/09/2021
*/
class Timestep
{
public:
/**
* @fn Timestep::Timestep(float time = 0.0f)
*
* @brief Constructor
*
*... |
BryceStandley/TNAH | core/src/TNAH/Scene/Components/ComponentIdentification.h | <filename>core/src/TNAH/Scene/Components/ComponentIdentification.h
#pragma once
namespace tnah {
/**********************************************************************************************//**
* @enum ComponentVariations
*
* @brief Values that represent component types
**************************************... |
BryceStandley/TNAH | core/src/TNAH/Scene/Components/AI/Affordance.h | /*****************************************************************//**
* @file Affordance.h
* @brief Affordances
*
* @author chris
* @date November 2021
*********************************************************************/
#pragma once
#include "Actions.h"
#include <unordered_map>
namespace tnah
{
class Aff... |
BryceStandley/TNAH | core/src/TNAH/Core/AABB.h | <filename>core/src/TNAH/Core/AABB.h
#pragma once
#include <glm/glm.hpp>
namespace tnah
{
/**
* @struct AABB
*
* @brief An aabb bounding box
*
* @author <NAME>
* @date 7/09/2021
*/
struct AABB
{
/** @brief The minimum value and maximum value */
... |
BryceStandley/TNAH | core/src/Platform/OpenGL/OpenGLTexture.h | <filename>core/src/Platform/OpenGL/OpenGLTexture.h
#pragma once
#include "TNAH/Renderer/Texture.h"
#include <glad/glad.h>
namespace tnah {
/**
* @class OpenGLTexture2D
*
* @brief An OpenGLTexture2D class that inherits from the Texture2D class
*
* @author <NAME>
* @date 7/09/2021
*/
class OpenGLTex... |
BryceStandley/TNAH | core/src/TNAH/Scene/Components/AI/PlayerInteractions.h | /*****************************************************************//**
* @file PlayerInteractions.h
* @brief
*
* @author chris
* @date November 2021
*********************************************************************/
#pragma once
namespace tnah
{
struct PlayerInteractions
{
PlayerIntera... |
BryceStandley/TNAH | core/src/TNAH/Renderer/Texture.h | #pragma once
#pragma warning(push, 0)
#include <string>
#include <ktx.h>
#pragma warning(pop)
#include "TNAH/Core/Core.h"
#include "TNAH/Core/FileStructures.h"
#include "TNAH/Core/Ref.h"
namespace tnah {
#pragma region Enums
using uchar8_t = unsigned char;
/**
* @enum ImageLoadFormat
*
* @brief Values t... |
BryceStandley/TNAH | core/src/TNAH/Core/Timer.h | <reponame>BryceStandley/TNAH
#pragma once
#include <chrono>
namespace tnah {
/**
* @class Timer
*
* @brief A timer class used to manage aspects of time
*
* @author <NAME>
* @date 7/09/2021
*/
class Timer
{
public:
/**
* @fn Timer::Timer()
*
* @brief Default constructor
*
* @autho... |
BryceStandley/TNAH | core/src/Platform/OpenGL/OpenGLShader.h | <filename>core/src/Platform/OpenGL/OpenGLShader.h
#pragma once
#include "TNAH/Renderer/Shader.h"
#include <glm/glm.hpp>
// TODO: REMOVE!
typedef unsigned int GLenum;
namespace tnah {
class OpenGLShader : public Shader
{
public:
/**
* @fn OpenGLShader::OpenGLShader(const std::string& shaderFilePath);
*
... |
BryceStandley/TNAH | core/src/TNAH/Scene/Components/AI/Character.h | #pragma once
#include "Actions.h"
#include "EmotionComponent.h"
#include "StateMachine.h"
namespace tnah
{
/**
* @class Character
*
* @brief
*
* @author <NAME>
* @date 2/11/2021
*/
class Character : public RefCounted
{
public:
/**
* @fn OnUpdat... |
BryceStandley/TNAH | core/src/TNAH/Scene/Serializer.h | #pragma once
#include "Scene.h"
#include "Components/AI/Affordance.h"
#include "Components/AI/AIComponent.h"
#include "Components/AI/CharacterComponent.h"
#include "TNAH/Physics/Collider.h"
namespace tnah
{
class Serializer
{
public:
/**
* @brief Public serializer save scene function
... |
BryceStandley/TNAH | core/src/TNAH/Core/EntryPoint.h | #pragma once
#include "TNAH/Core/Core.h"
#ifdef TNAH_PLATFORM_WINDOWS
/**
* @fn extern tnah::Application* tnah::CreateApplication();
*
* @brief Creates the application
*
* @author <NAME>
* @date 7/09/2021
*
* @returns Null if it fails, else the new application.
*/
extern tnah::Application* tnah:... |
BryceStandley/TNAH | core/src/TNAH/Debug/Debug.h | #pragma once
/**
* @namespace tnah::Debug {}
*
* @brief Debug Sub-namespace
*/
namespace tnah::Debug{
/**
* @brief Debugs info as core info of a vec3 with a message
* @author <NAME>
* @date 07-11-2021
*/
static void CoreInfo(const glm::vec3& value, const std::string& message = "")
{
TNAH_C... |
BryceStandley/TNAH | core/src/TNAH/Scene/Components/AI/StateMachine.h | <gh_stars>1-10
#pragma once
namespace tnah
{
/**
* @class state
* @brief An abstract class that provides a common interface to all state classes. It is templated so that class can be reused in any state machine.
*
* @author <NAME>
* @version 01
* @date 25/04/2021 <NAME>, Started
*
*
**/
template<class enti... |
BryceStandley/TNAH | core/src/TNAH/Renderer/Light.h | #pragma once
#include <TNAH/Core/Core.h>
#include <glm/glm.hpp>
#include "Shader.h"
namespace tnah {
/**
* @class Light
*
* @brief A light class that inherits from the refCounted class to allow the use of ref pointers. Responsible for lighting in applications
*
* @author <NAME>
* @... |
BryceStandley/TNAH | core/src/TNAH/Core/Application.h | #pragma once
#include <queue>
#include "TNAH/Core/Core.h"
#include "TNAH/Core/Window.h"
#include "TNAH/Events/ApplicationEvent.h"
#include "TNAH/Layers/LayerStack.h"
#include "TNAH/Layers/UI.h"
#include "Timestep.h"
#include "TNAH/Layers/ImGuiLayer.h"
#include "TNAH/Renderer/Shader.h"
#include "TNAH/Renderer/Rend... |
BryceStandley/TNAH | core/src/TNAH/Renderer/GraphicsContext.h | #pragma once
namespace tnah {
/**
* @class GraphicsContext
*
* @brief The graphics context
*
* @author <NAME>
* @date 12/09/2021
*/
class GraphicsContext
{
public:
/**
* @fn virtual GraphicsContext::~GraphicsContext() = default;
*
* @brief Defaulted destructor
*
* @author <NAME>
... |
BryceStandley/TNAH | core/src/TNAH/Physics/PhysicsCollision.h | <gh_stars>1-10
#pragma once
#include <queue>
#pragma warning(push, 0)
#include <reactphysics3d/reactphysics3d.h>
#pragma warning(pop)
#include "Rigidbody.h"
namespace tnah {
class GameObject;
namespace Physics {
/**
* @class PhysicsCollision
* @brief Class to hold information about a collision
* @a... |
BryceStandley/TNAH | core/src/TNAH/Editor/EditorUI.h | #pragma once
#include "TNAH/Scene/GameObject.h"
namespace tnah {
/**
* @class EditorUI
*
* @brief An editor user interface.
*
* @author <NAME>
* @date 7/09/2021
*/
class EditorUI
{
public:
/**
* @fn static void DrawComponentProperties(GameObject... |
BryceStandley/TNAH | core/src/TNAH/Renderer/Image.h | <reponame>BryceStandley/TNAH
#pragma once
#include "Texture.h"
namespace tnah {
/**
* @class Image
*
* @brief An image class that inherits from the texture2D class
*
* @author <NAME>
* @date 12/09/2021
*/
class Image : public Texture2D
{
public:
/**
... |
BryceStandley/TNAH | core/src/TNAH/Scene/GameObject.h | <gh_stars>1-10
#pragma once
#include <TNAH/Core/Core.h>
#include "Components/Components.h"
#include "Scene.h"
#pragma warning(push, 0)
#include <entt/entt.hpp>
#pragma warning(pop)
namespace tnah {
/**
* @class GameObject
*
* @brief The GameObject class is used for creating gameobjects
*
* @author <NAME>
... |
BryceStandley/TNAH | core/src/TNAH/Core/Core.h | #pragma once
#include <memory>
#ifdef TNAH_PLATFORM_WINDOWS
#if TNAH_DYNAMIC_LINK
#ifdef TNAH_BUILD_DLL
#define TNAH_API _declspec(dllexport)
#else
#define TNAH_API _declspec(dllimport)
#endif
#else
#define TNAH_API
#endif
#else
#error TNAH-Engine only supports Windows x64!
#endif
#define TNAH_EXPA... |
BryceStandley/TNAH | core/src/TNAH/Scene/Light/PointLight.h | <gh_stars>1-10
#pragma once
#include "TNAH/Renderer/Light.h"
namespace tnah {
/**********************************************************************************************//**
* @class PointLight
*
* @brief A point light
*
* @author <NAME>
* @date 10/09/2021
*
************************************... |
BryceStandley/TNAH | core/src/Platform/OpenGL/OpenGLBuffer.h | #pragma once
#include "TNAH/Renderer/RenderingBuffers.h"
namespace tnah {
/**
* @class OpenGLVertexBuffer
*
* @brief OpenGLVertexBuffer class that inherits from the VertexBuffer class
*
* @author <NAME>
* @date 7/09/2021
*/
class OpenGLVertexBuffer : public VertexBuffer
{
public:
/**
* @fn Ope... |
BryceStandley/TNAH | core/src/TNAH/Layers/ImGuiLayer.h | <reponame>BryceStandley/TNAH<filename>core/src/TNAH/Layers/ImGuiLayer.h
#pragma once
#include "Layer.h"
#include "TNAH/Events/ApplicationEvent.h"
#include "TNAH/Events/KeyEvent.h"
#include "TNAH/Events/MouseEvent.h"
namespace tnah {
class TNAH_API ImGuiLayer : public Layer
{
public:
/**
* @fn ImGuiLayer::ImG... |
BryceStandley/TNAH | core/src/TNAH/Layers/LayerStack.h | <gh_stars>1-10
#pragma once
#include "TNAH/Core/Core.h"
#include "Layer.h"
#include <vector>
namespace tnah {
/**
* @class LayerStack
*
* @brief The LayerStack class is used to store multiple layers, while allowing for them to be added and removed
*
* @author <NAME>
* @date 10/09/2021
*/
class Lay... |
BryceStandley/TNAH | core/src/TNAH/Scene/Light/SpotLight.h | #pragma once
#include "TNAH/Renderer/Light.h"
namespace tnah {
/**
*
*
* \brief Spot light type
*
* \author <NAME>
* \date 13/9/2021
*/
class SpotLight : public Light
{
public:
/**
*
* \fn void SpotLight
*
* \brief Con... |
BryceStandley/TNAH | core/src/TNAH/Core/Window.h | <filename>core/src/TNAH/Core/Window.h
#pragma once
#include <tnahpch.h>
#include "TNAH/Events/Event.h"
namespace tnah
{
struct WindowProps
{
/** @brief The title */
std::string Title;
/** @brief The width */
unsigned int Width;
/** @brief The height */
unsigned int Height;
/**
* @fn WindowProps... |
BryceStandley/TNAH | core/src/Platform/IrrKlang/Klang.h | #pragma once
#include "TNAH/Audio/AudioAPI.h"
#pragma warning(push, 0)
#include <IrrKlang/irrKlang.h>
#include <vector>
#include <unordered_map>
#include <string>
#pragma warning(pop)
typedef std::pair<u_int, irrklang::ISoundSource*> AudioSourcePair;
typedef std::unordered_map<std::string, irrklang::ISoundSource*> Au... |
BryceStandley/TNAH | core/src/TNAH/Physics/CollisionDetectionEngine.h | <filename>core/src/TNAH/Physics/CollisionDetectionEngine.h
#pragma once
#include "PhysicsCollision.h"
#include "TNAH/Physics/PhysicsTimestep.h"
#include <queue>
namespace tnah {
namespace Physics {
/**
* @class CollisionDetectionEngine
* @brief Class to wrap and construct collision information
* @aut... |
BryceStandley/TNAH | core/src/TNAH.h | #pragma once
//This Header MUST be included within the same file as applications derived tnah::Application class is defined
#include "TNAH-App.h"
// --- Entry Point --- //
#include "TNAH/Core/EntryPoint.h"
|
BryceStandley/TNAH | core/src/TNAH-App.h | #pragma once
//This header is a combined header of all components of the engine
// Use this header in any applications that require access to structures and classes
// within the engine
// NOTE any application needs to #include <TNAH.h> in their main Application cpp file
// to enable the entry point of the applicat... |
BryceStandley/TNAH | core/src/tnahpch.h | #pragma once
#define _CRT_SECURE_NO_WARNINGS
#pragma warning(push, 0) // Disable warnings for all files within the push/pop
#ifdef TNAH_PLATFORM_WINDOWS
#include <Windows.h>
#endif
// --- TNAH Precompiled Header File --- //
#include <memory>
#include <vector>
#include <string>
#include <array>
#include <unordered_ma... |
BryceStandley/TNAH | core/src/TNAH/Scene/Components/AudioComponents.h | #pragma once
#include "TNAH/Core/Core.h"
#include "TNAH/Core/FileStructures.h"
#include "ComponentIdentification.h"
namespace tnah {
/**********************************************************************************************//**
* @class AudioSourceComponent
*
* @brief An audio source component.
*
* @a... |
BryceStandley/TNAH | core/src/TNAH/Scene/Components/LightComponents.h | #pragma once
#include "TNAH/Core/Core.h"
#include "TNAH/Renderer/Light.h"
#include "TNAH/Scene/Light/DirectionalLight.h"
#include "TNAH/Scene/Light/PointLight.h"
#include "TNAH/Scene/Light/SpotLight.h"
#include "ComponentIdentification.h"
namespace tnah {
/************************************************************... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.