Añadida la clase asset
This commit is contained in:
42
source/asset.h
Normal file
42
source/asset.h
Normal 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
|
||||
Reference in New Issue
Block a user