This commit is contained in:
2025-09-20 20:57:29 -05:00
parent 90c3b6149e
commit bdf18fffd3
27 changed files with 704 additions and 7 deletions

16
src/asset/Asset.cpp Normal file
View File

@@ -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() {
}

19
src/asset/Asset.hpp Normal file
View File

@@ -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 <zip.h>
namespace Dawn {
struct Asset {
private:
std::string filename;
public:
Asset(const std::string &filename);
~Asset();
};
}

View File

@@ -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;
}
}

View File

@@ -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();
};
}

11
src/asset/CMakeLists.txt Normal file
View File

@@ -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
)