Implemented resource manager which can load textures and levels.

Implemented script to generate Resources.g.h file linking assets to code.
Added assets from old project.
This commit is contained in:
2016-11-12 14:17:00 +02:00
parent 294fd6e2ac
commit 914ae0de0d
74 changed files with 14937 additions and 304 deletions

View File

@ -0,0 +1,46 @@
// WARNING: This file is auto generated by the build/prepareAssets.py script.
#ifndef STORAGE_RESOURCES_G_H_
#define STORAGE_RESOURCES_G_H_
#include <resources/ResourceInfo.h>
namespace farmlands {
namespace resources {
/**
* This namespace contains all the resource IDs, used by the resource manager.
* The IDs are generated at build time by the 'prepareAssets.py' script.
*/
namespace R {
enum Fonts
{
DejaVuSans = 0,
};
enum Tilesets
{
Ground = 1,
};
enum Levels
{
Farm_Background = 2,
Farm = 3,
};
}
const int RInfo_Fonts_Begin = 0;
const int RInfo_Tilesets_Begin = 1;
const int RInfo_Levels_Begin = 2;
/**
* This array contains the names of all the files, and the corresponding file type.
*/
const ResourceInfo RInfo[] = {
{ "fonts/DejaVuSans.ttf", ResourceType::Font },
{ "tilesets/Ground.png", ResourceType::Texture },
{ "levels/Farm_Background.csv", ResourceType::LevelLayer },
{ "levels/Farm.level", ResourceType::Level },
};
}
}
#endif /* STORAGE_RESOURCES_G_H_ */