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

@ -202,4 +202,15 @@ void Settings::setLeaderboard(std::string leaderboard, enum ELeaderboardSortMeth
leader.display_type = display_type;
leaderboards[leaderboard] = leader;
}
}
int Settings::add_image(std::string data, uint32 width, uint32 height)
{
int last = images.size() + 1;
struct Image_Data dt;
dt.width = width;
dt.height = height;
dt.data = data;
images[last] = dt;
return last;
}