Started work on a real avatars implementation.

Fix issue where since the image ids changed for
every get avatar call mudrunner would keep allocating
memory indefinitely.
This commit is contained in:
Mr_Goldberg 2019-09-07 09:39:41 -04:00
parent 734ff89291
commit 58083e0863
No known key found for this signature in database
GPG key ID: 8597D87419DEF278
4 changed files with 80 additions and 30 deletions

View file

@ -52,6 +52,12 @@ struct Stat_config {
};
};
struct Image_Data {
uint32 width;
uint32 height;
std::string data;
};
class Settings {
CSteamID steam_id;
CGameID game_id;
@ -116,6 +122,10 @@ public:
//stats
std::map<std::string, Stat_config> getStats() { return stats; }
void setStatDefiniton(std::string name, struct Stat_config stat_config) {stats[name] = stat_config; }
//images
std::map<int, struct Image_Data> images;
int add_image(std::string data, uint32 width, uint32 height);
};
#endif