Expose the shared pointer instead of the raw pointer in the resource manager and rewrite the custom sheets list to use a vector instead of manual memory management

In particular, this should fix a segmentation fault in the sound system caused by the resource manager pulling a resource that's in use.
This commit is contained in:
2020-01-26 15:10:57 -05:00
parent 2d1ee24473
commit 14e2597108
17 changed files with 142 additions and 139 deletions

View File

@@ -392,7 +392,7 @@ void display_party() {
if(univ.party[i].main_status != eMainStatus::ABSENT) { // PC exists?
// draw PC graphic
pic_num_t pic = univ.party[i].which_graphic;
const sf::Texture* from_gw;
std::shared_ptr<const sf::Texture> from_gw;
if(pic >= 1000) {
bool isParty = pic >= 10000;
pic_num_t need_pic = pic % 1000;