first commit

This commit is contained in:
2021-01-29 21:14:20 -05:00
commit b2acceb4b9
78 changed files with 6774 additions and 0 deletions

View File

@ -0,0 +1,55 @@
/*
* AssetManager.h
*
* Created on: Apr 4, 2020
* Author: ayoungblood
*/
#ifndef SRC_ASSETMANAGER_H_
#define SRC_ASSETMANAGER_H_
#include <map>
#include <string>
#include "TextureManager.h"
#include "../game/Vector2D.h"
#include "../ecs/ECS.h"
#include "../game/Game.hpp"
//#include <SDL2/SDL_mixer.h>
#include "MusicManager.h"
class AssetManager
{
public:
AssetManager(Manager* man);
~AssetManager();
//gameobjects
// void CreateProjectile(Vector2D pos, Vector2D vel, int range, int speed, std::string id);
void CreateText(Vector2D pos, std::string textToDisplay, std::string id);
//texture management
void AddTexture(std::string id, const char* path);
SDL_Texture* GetTexture(std::string id);
//Sound Mixer
//Sound Clips
void AddSoundClip(std::string id, const char* path);
Mix_Chunk* GetSoundClip(std::string id);
//Music
void AddMusicTrack(std::string id, const char* path);
Mix_Music* GetMusicTrack(std::string id);
private:
Manager* manager;
std::map<std::string, SDL_Texture*> textures;
std::map<std::string, Mix_Chunk*> soundClips;
std::map<std::string, Mix_Music*> musicTracks;
};
#endif /* SRC_ASSETMANAGER_H_ */