diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 20e9f30c..db16a26d 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -28,10 +28,12 @@ target_sources(${DAWN_TARGET_NAME} # Subdirs add_subdirectory(assert) +add_subdirectory(asset) add_subdirectory(console) add_subdirectory(display) add_subdirectory(engine) add_subdirectory(input) +add_subdirectory(rpg) add_subdirectory(time) # Platform-specific settings diff --git a/src/asset/Asset.cpp b/src/asset/Asset.cpp new file mode 100644 index 00000000..ee9acc57 --- /dev/null +++ b/src/asset/Asset.cpp @@ -0,0 +1,16 @@ +// Copyright (c) 2025 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#include "Asset.hpp" + +using namespace Dawn; + +Asset::Asset(const std::string &filename) : + filename(filename) +{ +} + +Asset::~Asset() { +} \ No newline at end of file diff --git a/src/asset/Asset.hpp b/src/asset/Asset.hpp new file mode 100644 index 00000000..fc4709cd --- /dev/null +++ b/src/asset/Asset.hpp @@ -0,0 +1,19 @@ +// Copyright (c) 2025 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#pragma once +#include "dawn.hpp" +#include + +namespace Dawn { + struct Asset { + private: + std::string filename; + + public: + Asset(const std::string &filename); + ~Asset(); + }; +} \ No newline at end of file diff --git a/src/asset/AssetManager.cpp b/src/asset/AssetManager.cpp new file mode 100644 index 00000000..212418f8 --- /dev/null +++ b/src/asset/AssetManager.cpp @@ -0,0 +1,21 @@ +// Copyright (c) 2025 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#include "AssetManager.hpp" + +using namespace Dawn; + +AssetManager::AssetManager() : + zip(nullptr) +{ + // Find the zip file. +} + +AssetManager::~AssetManager() { + if(zip) { + zip_close(zip); + zip = nullptr; + } +} \ No newline at end of file diff --git a/src/asset/AssetManager.hpp b/src/asset/AssetManager.hpp new file mode 100644 index 00000000..25a8d91f --- /dev/null +++ b/src/asset/AssetManager.hpp @@ -0,0 +1,25 @@ +// Copyright (c) 2025 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#pragma once +#include "Asset.hpp" + +namespace Dawn { + struct AssetManager { + private: + zip_t *zip; + + public: + /** + * Constructor for the Asset manager. + */ + AssetManager(); + + /** + * Destructor for the Asset manager. + */ + ~AssetManager(); + }; +} \ No newline at end of file diff --git a/src/asset/CMakeLists.txt b/src/asset/CMakeLists.txt new file mode 100644 index 00000000..a4d4c280 --- /dev/null +++ b/src/asset/CMakeLists.txt @@ -0,0 +1,11 @@ +# Copyright (c) 2025 Dominic Masters +# +# This software is released under the MIT License. +# https://opensource.org/licenses/MIT + +# Sources +target_sources(${DAWN_TARGET_NAME} + PRIVATE + Asset.cpp + AssetManager.cpp +) \ No newline at end of file diff --git a/src/dawn.hpp b/src/dawn.hpp index d11645b5..b0670daa 100644 --- a/src/dawn.hpp +++ b/src/dawn.hpp @@ -19,9 +19,15 @@ extern "C" { #include #include - // #include - // #include - // #include + // #include + // #include + // #include + // #include + // #include + // #include + // #include + // #include + // #include #if PSP #include @@ -53,4 +59,6 @@ extern "C" { #include #include #include -#include \ No newline at end of file +#include + +#include \ No newline at end of file diff --git a/src/display/CMakeLists.txt b/src/display/CMakeLists.txt index 90611b3a..6a348fd6 100644 --- a/src/display/CMakeLists.txt +++ b/src/display/CMakeLists.txt @@ -7,4 +7,8 @@ target_sources(${DAWN_TARGET_NAME} PRIVATE Display.cpp -) \ No newline at end of file +) + +# Subdirs +add_subdirectory(color) +add_subdirectory(mesh) \ No newline at end of file diff --git a/src/display/Display.cpp b/src/display/Display.cpp index 978b1aa7..b8b9dbda 100644 --- a/src/display/Display.cpp +++ b/src/display/Display.cpp @@ -8,12 +8,19 @@ using namespace Dawn; +MeshVertex vertices[3] = { + { Color4B::RED, glm::vec2(0.0f, 0.0f), glm::vec3(-0.5f, -0.5f, 0.0f) }, + { Color4B::GREEN, glm::vec2(1.0f, 0.0f), glm::vec3(0.5f, -0.5f, 0.0f) }, + { Color4B::BLUE, glm::vec2(0.5f, 1.0f), glm::vec3(0.0f, 0.5f, 0.0f) } +}; + Display::Display(Engine &engine) : #if DAWN_SDL2 glContext(nullptr), window(nullptr), #endif - engine(engine) + engine(engine), + mesh(3, PrimitiveType::Triangles, vertices) { #if DAWN_SDL2 uint32_t flags = SDL_INIT_VIDEO; @@ -99,7 +106,17 @@ void Display::update(void) { SDL_GL_MakeCurrent(this->window, this->glContext); - glViewport(0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glClearColor( + Color4F::CORNFLOWER_BLUE.r, + Color4F::CORNFLOWER_BLUE.g, + Color4F::CORNFLOWER_BLUE.b, + Color4F::CORNFLOWER_BLUE.a + ); + + mesh.draw(0, -1); + + // glViewport(0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT); SDL_GL_SwapWindow(this->window); #endif diff --git a/src/display/Display.hpp b/src/display/Display.hpp index acf78b2c..5ccfac88 100644 --- a/src/display/Display.hpp +++ b/src/display/Display.hpp @@ -6,6 +6,8 @@ #pragma once #include "dawn.hpp" +#include "display/mesh/Mesh.hpp" + namespace Dawn { struct Engine; @@ -20,6 +22,8 @@ namespace Dawn { public: static constexpr uint32_t DEFAULT_WIDTH = 800; static constexpr uint32_t DEFAULT_HEIGHT = 600; + + Mesh mesh; /** * Display constructor diff --git a/src/display/color/CMakeLists.txt b/src/display/color/CMakeLists.txt new file mode 100644 index 00000000..c53871a5 --- /dev/null +++ b/src/display/color/CMakeLists.txt @@ -0,0 +1,13 @@ +# Copyright (c) 2025 Dominic Masters +# +# This software is released under the MIT License. +# https://opensource.org/licenses/MIT + +# Sources +target_sources(${DAWN_TARGET_NAME} + PRIVATE + Color3B.cpp + Color4B.cpp + Color3F.cpp + Color4F.cpp +) \ No newline at end of file diff --git a/src/display/color/Color.hpp b/src/display/color/Color.hpp new file mode 100644 index 00000000..58d641f4 --- /dev/null +++ b/src/display/color/Color.hpp @@ -0,0 +1,11 @@ +// Copyright (c) 2025 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#pragma once +#include "IColor.hpp" +#include "Color3B.hpp" +#include "Color3F.hpp" +#include "Color4B.hpp" +#include "Color4F.hpp" \ No newline at end of file diff --git a/src/display/color/Color3B.cpp b/src/display/color/Color3B.cpp new file mode 100644 index 00000000..45018ccd --- /dev/null +++ b/src/display/color/Color3B.cpp @@ -0,0 +1,32 @@ +// Copyright (c) 2025 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#include "Color.hpp" + +using namespace Dawn; + +Color3B::Color3B( + const uint8_t r, + const uint8_t g, + const uint8_t b +) : r(r), g(g), b(b) { + // Constructor body (if needed) +} + +Color3B Color3B::toColor3B(void) const { + return Color3B(r, g, b); +} + +Color4B Color3B::toColor4B(void) const { + return Color4B(r, g, b, 255); +} + +Color3F Color3B::toColor3F(void) const { + return Color3F(r / 255.0f, g / 255.0f, b / 255.0f); +} + +Color4F Color3B::toColor4F(void) const { + return Color4F(r / 255.0f, g / 255.0f, b / 255.0f, 1.0f); +} \ No newline at end of file diff --git a/src/display/color/Color3B.hpp b/src/display/color/Color3B.hpp new file mode 100644 index 00000000..1094e825 --- /dev/null +++ b/src/display/color/Color3B.hpp @@ -0,0 +1,46 @@ +// Copyright (c) 2025 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#pragma once +#include "IColor.hpp" + +namespace Dawn { + struct Color3B : public Color { + public: + const uint8_t r; + const uint8_t g; + const uint8_t b; + + /** + * Color (RGB, byte) constructor + * + * @param r Red channel (0-255) + * @param g Green channel (0-255) + * @param b Blue channel (0-255) + */ + Color3B(const uint8_t r, const uint8_t g, const uint8_t b); + + /** + * Gets this color as a 3-channel byte color. + */ + Color3B toColor3B(void) const override; + + /** + * Gets this color as a 4-channel byte color. Alpha is set to 255. + */ + Color4B toColor4B(void) const override; + + /** + * Gets this color as a 3-channel float color. (0-1 range) + */ + Color3F toColor3F(void) const override; + + /** + * Gets this color as a 4-channel float color. (0-1 range), Alpha is set + * to 1.0f + */ + Color4F toColor4F(void) const override; + }; +} \ No newline at end of file diff --git a/src/display/color/Color3F.cpp b/src/display/color/Color3F.cpp new file mode 100644 index 00000000..28cf4338 --- /dev/null +++ b/src/display/color/Color3F.cpp @@ -0,0 +1,41 @@ +// Copyright (c) 2025 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#include "Color.hpp" + +using namespace Dawn; + +Color3F::Color3F( + const float_t r, + const float_t g, + const float_t b +) : r(r), g(g), b(b) { +} + +Color3B Color3F::toColor3B(void) const { + return Color3B( + static_cast(r * 255.0f), + static_cast(g * 255.0f), + static_cast(b * 255.0f) + ); +} + +Color4B Color3F::toColor4B(void) const { + return Color4B( + static_cast(r * 255.0f), + static_cast(g * 255.0f), + static_cast(b * 255.0f), + 255 + ); +} + +Color3F Color3F::toColor3F(void) const { + return Color3F(r, g, b); +} + +Color4F Color3F::toColor4F(void) const { + return Color4F(r, g, b, 1.0f); +} + diff --git a/src/display/color/Color3F.hpp b/src/display/color/Color3F.hpp new file mode 100644 index 00000000..11d18a19 --- /dev/null +++ b/src/display/color/Color3F.hpp @@ -0,0 +1,45 @@ +// Copyright (c) 2025 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#pragma once +#include "IColor.hpp" + +namespace Dawn { + struct Color3F : public Color { + public: + const float_t r; + const float_t g; + const float_t b; + + /** + * Color (RGB, float) constructor + * + * @param r Red channel (0.0-1.0) + * @param g Green channel (0.0-1.0) + * @param b Blue channel (0.0-1.0) + */ + Color3F(const float_t r, const float_t g, const float_t b); + + /** + * Gets this color as a 3-channel byte color. + */ + Color3B toColor3B(void) const override; + + /** + * Gets this color as a 4-channel byte color. Alpha is set to 255. + */ + Color4B toColor4B(void) const override; + + /** + * Gets this color as a 3-channel float_t color. + */ + Color3F toColor3F(void) const override; + + /** + * Gets this color as a 4-channel float_t color. Alpha is set to 1.0f + */ + Color4F toColor4F(void) const override; + }; +} \ No newline at end of file diff --git a/src/display/color/Color4B.cpp b/src/display/color/Color4B.cpp new file mode 100644 index 00000000..8f179b48 --- /dev/null +++ b/src/display/color/Color4B.cpp @@ -0,0 +1,36 @@ +// Copyright (c) 2025 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#include "Color.hpp" + +using namespace Dawn; + +const Color4B Color4B::WHITE = Color4B(255, 255, 255, 255); +const Color4B Color4B::BLACK = Color4B(0, 0, 0, 255); +const Color4B Color4B::RED = Color4B(255, 0, 0, 255); +const Color4B Color4B::GREEN = Color4B(0, 255, 0, 255); +const Color4B Color4B::BLUE = Color4B(0, 0, 255, 255); +const Color4B Color4B::YELLOW = Color4B(255, 255, 0, 255); +const Color4B Color4B::CYAN = Color4B(0, 255, 255, 255); +const Color4B Color4B::MAGENTA = Color4B(255, 0, 255, 255); +const Color4B Color4B::TRANSPARENT = Color4B(0, 0, 0, 0); +const Color4B Color4B::CORNFLOWER_BLUE = Color4B(100, 149, 237, 255); + +Color4B::Color4B( + const uint8_t r, + const uint8_t g, + const uint8_t b, + const uint8_t a +) : Color3B(r, g, b), a(a) { + // Constructor body (if needed) +} + +Color4B Color4B::toColor4B(void) const { + return Color4B(r, g, b, a); +} + +Color4F Color4B::toColor4F(void) const { + return Color4F(r / 255.0f, g / 255.0f, b / 255.0f, a / 255.0f); +} \ No newline at end of file diff --git a/src/display/color/Color4B.hpp b/src/display/color/Color4B.hpp new file mode 100644 index 00000000..a69bb166 --- /dev/null +++ b/src/display/color/Color4B.hpp @@ -0,0 +1,50 @@ +// Copyright (c) 2025 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#pragma once +#include "Color3B.hpp" + +namespace Dawn { + struct Color4B : public Color3B { + public: + static const Color4B WHITE; + static const Color4B BLACK; + static const Color4B RED; + static const Color4B GREEN; + static const Color4B BLUE; + static const Color4B YELLOW; + static const Color4B CYAN; + static const Color4B MAGENTA; + static const Color4B TRANSPARENT; + static const Color4B CORNFLOWER_BLUE; + + const uint8_t a; + + /** + * Color (RGBA, byte) constructor + * + * @param r Red channel (0-255) + * @param g Green channel (0-255) + * @param b Blue channel (0-255) + * @param a Alpha channel (0-255) + */ + Color4B( + const uint8_t r, + const uint8_t g, + const uint8_t b, + const uint8_t a + ); + + /** + * Gets this color as a 4-channel byte color. + */ + Color4B toColor4B(void) const override; + + /** + * Gets this color as a 4-channel float color. (0-1 range) + */ + Color4F toColor4F(void) const override; + }; +} \ No newline at end of file diff --git a/src/display/color/Color4F.cpp b/src/display/color/Color4F.cpp new file mode 100644 index 00000000..8b5b61bd --- /dev/null +++ b/src/display/color/Color4F.cpp @@ -0,0 +1,40 @@ +// Copyright (c) 2025 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#include "Color.hpp" + +using namespace Dawn; + +const Color4F Color4F::WHITE = Color4F(1.0f, 1.0f, 1.0f, 1.0f); +const Color4F Color4F::BLACK = Color4F(0.0f, 0.0f, 0.0f, 1.0f); +const Color4F Color4F::RED = Color4F(1.0f, 0.0f, 0.0f, 1.0f); +const Color4F Color4F::GREEN = Color4F(0.0f, 1.0f, 0.0f, 1.0f); +const Color4F Color4F::BLUE = Color4F(0.0f, 0.0f, 1.0f, 1.0f); +const Color4F Color4F::YELLOW = Color4F(1.0f, 1.0f, 0.0f, 1.0f); +const Color4F Color4F::CYAN = Color4F(0.0f, 1.0f, 1.0f, 1.0f); +const Color4F Color4F::MAGENTA = Color4F(1.0f, 0.0f, 1.0f, 1.0f); +const Color4F Color4F::TRANSPARENT = Color4F(0.0f, 0.0f, 0.0f, 0.0f); +const Color4F Color4F::CORNFLOWER_BLUE = Color4F(0.39f, 0.58f, 0.93f, 1.0f); + +Color4F::Color4F( + const float_t r, + const float_t g, + const float_t b, + const float_t a +) : Color3F(r, g, b), a(a) { +} + +Color4B Color4F::toColor4B(void) const { + return Color4B( + static_cast(r * 255.0f), + static_cast(g * 255.0f), + static_cast(b * 255.0f), + static_cast(a * 255.0f) + ); +} + +Color4F Color4F::toColor4F(void) const { + return Color4F(r, g, b, a); +} \ No newline at end of file diff --git a/src/display/color/Color4F.hpp b/src/display/color/Color4F.hpp new file mode 100644 index 00000000..bb566cf1 --- /dev/null +++ b/src/display/color/Color4F.hpp @@ -0,0 +1,50 @@ +// Copyright (c) 2025 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#pragma once +#include "Color3F.hpp" + +namespace Dawn { + struct Color4F : public Color3F { + public: + static const Color4F WHITE; + static const Color4F BLACK; + static const Color4F RED; + static const Color4F GREEN; + static const Color4F BLUE; + static const Color4F YELLOW; + static const Color4F CYAN; + static const Color4F MAGENTA; + static const Color4F TRANSPARENT; + static const Color4F CORNFLOWER_BLUE; + + const float_t a; + + /** + * Color (RGBA, float) constructor + * + * @param r Red channel (0.0-1.0) + * @param g Green channel (0.0-1.0) + * @param b Blue channel (0.0-1.0) + * @param a Alpha channel (0.0-1.0) + */ + Color4F( + const float_t r, + const float_t g, + const float_t b, + const float_t a + ); + + /** + * Gets this color as a 4-channel byte color. + */ + Color4B toColor4B(void) const override; + + /** + * Gets this color as a 4-channel float_t color. + */ + Color4F toColor4F(void) const override; + }; +} \ No newline at end of file diff --git a/src/display/color/IColor.hpp b/src/display/color/IColor.hpp new file mode 100644 index 00000000..946f5b8b --- /dev/null +++ b/src/display/color/IColor.hpp @@ -0,0 +1,37 @@ +// Copyright (c) 2025 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#pragma once +#include "dawn.hpp" + +namespace Dawn { + struct Color3B; + struct Color4B; + struct Color3F; + struct Color4F; + + struct Color { + public: + /** + * Gets this color as a 3-channel byte color. + */ + virtual Color3B toColor3B(void) const = 0; + + /** + * Gets this color as a 4-channel byte color. + */ + virtual Color4B toColor4B(void) const = 0; + + /** + * Gets this color as a 3-channel float color. (0-1 range) + */ + virtual Color3F toColor3F(void) const = 0; + + /** + * Gets this color as a 4-channel float color. (0-1 range) + */ + virtual Color4F toColor4F(void) const = 0; + }; +} \ No newline at end of file diff --git a/src/display/mesh/CMakeLists.txt b/src/display/mesh/CMakeLists.txt new file mode 100644 index 00000000..3f9afc8f --- /dev/null +++ b/src/display/mesh/CMakeLists.txt @@ -0,0 +1,10 @@ +# Copyright (c) 2025 Dominic Masters +# +# This software is released under the MIT License. +# https://opensource.org/licenses/MIT + +# Sources +target_sources(${DAWN_TARGET_NAME} + PRIVATE + Mesh.cpp +) \ No newline at end of file diff --git a/src/display/mesh/Mesh.cpp b/src/display/mesh/Mesh.cpp new file mode 100644 index 00000000..cfee3d79 --- /dev/null +++ b/src/display/mesh/Mesh.cpp @@ -0,0 +1,73 @@ +// Copyright (c) 2025 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#include "Mesh.hpp" +#include "assert/Assert.hpp" + +using namespace Dawn; + +Mesh::Mesh( + const int32_t vertexCount, + const PrimitiveType primitiveType, + const MeshVertex *vertices +) : + vertexCount(vertexCount), + primitiveType(primitiveType), + vertices(vertices) +{ + +} + +void Mesh::draw( + int32_t vertexOffset, + int32_t vertexCount +) const { + const int32_t offset = vertexOffset == -1 ? 0 : vertexOffset; + const int32_t count = vertexCount == -1 ? this->vertexCount : vertexCount; + + assertNotNull(this->vertices, "Mesh cannot be NULL"); + assertTrue(offset >= 0, "Vertex offset must be non-negative"); + assertTrue(count >= 0, "Vertex count must be non-negative"); + assertTrue( + offset + count <= this->vertexCount, + "Vertex offset + count must not exceed vertex count" + ); + + #if DISPLAY_SDL2 + // PSP style pointer legacy OpenGL + const GLsizei stride = sizeof(MeshVertex); + + glColorPointer( + MESH_VERTEX_COLOR_SIZE, + GL_UNSIGNED_BYTE, + stride, + (const GLvoid*)&this->vertices[offset].color[0] + ); + + glTexCoordPointer( + MESH_VERTEX_UV_SIZE, + GL_FLOAT, + stride, + (const GLvoid*)&this->vertices[offset].uv[0] + ); + + glVertexPointer( + MESH_VERTEX_POS_SIZE, + GL_FLOAT, + stride, + (const GLvoid*)&this->vertices[offset].pos[0] + ); + + glDrawArrays( + this->primitiveType, + 0, + count + ); + #endif +} + +Mesh::~Mesh() { + +} \ No newline at end of file diff --git a/src/display/mesh/Mesh.hpp b/src/display/mesh/Mesh.hpp new file mode 100644 index 00000000..6af7f719 --- /dev/null +++ b/src/display/mesh/Mesh.hpp @@ -0,0 +1,56 @@ +// Copyright (c) 2025 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#pragma once +#include "PrimitiveType.hpp" +#include "display/color/Color.hpp" + +namespace Dawn { + struct MeshVertex { + public: + #if DAWN_SDL2 + Color4B color; + glm::vec2 uv; + glm::vec3 position; + #endif + }; + + struct Mesh { + private: + const int32_t vertexCount; + const PrimitiveType primitiveType; + const MeshVertex *vertices; + + public: + /** + * Mesh constructor + * + * @param vertexCount The number of vertices in the mesh + * @param primitiveType The type of primitive to render + * @param vertices The vertex data + */ + Mesh( + const int32_t vertexCount, + const PrimitiveType primitiveType, + const MeshVertex *vertices + ); + + /** + * Draw this mesh. + * + * @param vertexOffset The offset to start drawing from (default: 0) + * @param vertexCount The number of vertices to draw (default: all) + */ + void draw( + int32_t vertexOffset = 0, + int32_t vertexCount = -1 + ) const; + + /** + * Destructs the mesh. + */ + ~Mesh(); + }; +} \ No newline at end of file diff --git a/src/display/mesh/PrimitiveType.hpp b/src/display/mesh/PrimitiveType.hpp new file mode 100644 index 00000000..6f701048 --- /dev/null +++ b/src/display/mesh/PrimitiveType.hpp @@ -0,0 +1,17 @@ +// Copyright (c) 2025 Dominic Masters +// +// This software is released under the MIT License. +// https://opensource.org/licenses/MIT + +#pragma once +#include "dawn.hpp" + +namespace Dawn { + enum class PrimitiveType { + #if DAWN_SDL2 + Triangles = GL_TRIANGLES, + Lines = GL_LINES, + Points = GL_POINTS, + #endif + }; +} \ No newline at end of file diff --git a/src/engine/Engine.hpp b/src/engine/Engine.hpp index c07a9a88..47ae1b36 100644 --- a/src/engine/Engine.hpp +++ b/src/engine/Engine.hpp @@ -8,6 +8,7 @@ #include "console/Console.hpp" #include "display/Display.hpp" #include "input/Input.hpp" +#include "asset/AssetManager.hpp" namespace Dawn { struct Engine { @@ -21,6 +22,7 @@ namespace Dawn { Console console; Display display; Input input; + AssetManager assetManager; /** * Constructor for the Dawn engine. diff --git a/src/rpg/CMakeLists.txt b/src/rpg/CMakeLists.txt new file mode 100644 index 00000000..a1bc6ebe --- /dev/null +++ b/src/rpg/CMakeLists.txt @@ -0,0 +1,11 @@ +# Copyright (c) 2025 Dominic Masters +# +# This software is released under the MIT License. +# https://opensource.org/licenses/MIT + +# Sources +target_sources(${DAWN_TARGET_NAME} + PRIVATE +) + +# Subdirs \ No newline at end of file