Añadida la clase asset

This commit is contained in:
2021-09-08 13:59:39 +02:00
parent 994f4187e4
commit a0b14f5071
5 changed files with 70 additions and 2 deletions

42
source/asset.h Normal file
View File

@@ -0,0 +1,42 @@
#pragma once
#include "ifdefs.h"
#include <string>
#include <vector>
#ifndef ASSET_H
#define ASSET_H
enum assetType {bitmap, music, sound, data, font, lang};
#define ASSET_TYPE_BITMAP 0
#define ASSET_TYPE_MUSIC 1
#define ASSET_TYPE_SOUND 2
#define ASSET_TYPE_DATA 3
#define ASSET_TYPE_FONT 4
#define ASSET_TYPE_LANG 5
// Clase Asset
class Asset
{
private:
// Estructura para definir un item
struct item_t
{
std::string file;
enum assetType type;
};
std::vector<item_t> mFileList;
public:
// Constructor
Asset(std::string path);
// Destructor
~Asset();
// Añade un elemento a la lista
void add(std::string file, enum assetType type);
};
#endif