mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2025-12-06 04:04:53 +01:00
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:
parent
734ff89291
commit
58083e0863
4 changed files with 80 additions and 30 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue