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:
@@ -632,7 +632,7 @@ void cPict::recalcRect() {
|
||||
setBounds(bounds);
|
||||
}
|
||||
|
||||
const sf::Texture* cPict::getSheet(eSheetType type, size_t n) {
|
||||
std::shared_ptr<const sf::Texture> cPict::getSheet(eSheetType type, size_t n) {
|
||||
std::ostringstream sout;
|
||||
switch(type) {
|
||||
case NUM_SHEET_TYPES:
|
||||
@@ -734,7 +734,7 @@ void cPict::draw(){
|
||||
}
|
||||
|
||||
void cPict::drawPresetTer(short num, rectangle to_rect){
|
||||
const sf::Texture* from_gw = getSheet(SHEET_TER, num / 50);
|
||||
auto from_gw = getSheet(SHEET_TER, num / 50);
|
||||
if(!from_gw) return;
|
||||
num = num % 50;
|
||||
rectangle from_rect = calc_rect(num % 10, num / 10);
|
||||
@@ -745,7 +745,7 @@ void cPict::drawPresetTer(short num, rectangle to_rect){
|
||||
|
||||
void cPict::drawPresetTerAnim(short num, rectangle to_rect){
|
||||
rectangle from_rect = calc_rect(4 * (num / 5) + animFrame % 4, num % 5);
|
||||
const sf::Texture* from_gw = getSheet(SHEET_TER_ANIM);
|
||||
auto from_gw = getSheet(SHEET_TER_ANIM);
|
||||
if(to_rect.right - to_rect.left > 28) {
|
||||
to_rect.inset(4,0);
|
||||
to_rect.right = to_rect.left + 28;
|
||||
@@ -771,7 +771,7 @@ static rectangle calcDefMonstRect(short i, short animFrame){
|
||||
|
||||
void cPict::drawPresetMonstSm(short num, rectangle to_rect){
|
||||
short m_start_pic = m_pic_index[num].i;
|
||||
const sf::Texture* from_gw = getSheet(SHEET_MONST, m_start_pic / 20);
|
||||
auto from_gw = getSheet(SHEET_MONST, m_start_pic / 20);
|
||||
if(!from_gw) return;
|
||||
m_start_pic = m_start_pic % 20;
|
||||
rectangle from_rect = calcDefMonstRect(m_start_pic, animFrame);
|
||||
@@ -787,7 +787,7 @@ void cPict::drawPresetMonstWide(short num, rectangle to_rect){
|
||||
fill_rect(*inWindow, to_rect, sf::Color::Black);
|
||||
|
||||
short m_start_pic = m_pic_index[num].i;
|
||||
const sf::Texture* from_gw = getSheet(SHEET_MONST, m_start_pic / 20);
|
||||
auto from_gw = getSheet(SHEET_MONST, m_start_pic / 20);
|
||||
if(!from_gw) return;
|
||||
rectangle from_rect = calcDefMonstRect(m_start_pic % 20, animFrame);
|
||||
small_monst_rect.offset(to_rect.left,to_rect.top + 7);
|
||||
@@ -808,7 +808,7 @@ void cPict::drawPresetMonstTall(short num, rectangle to_rect){
|
||||
fill_rect(*inWindow, to_rect, sf::Color::Black);
|
||||
|
||||
short m_start_pic = m_pic_index[num].i;
|
||||
const sf::Texture* from_gw = getSheet(SHEET_MONST, m_start_pic / 20);
|
||||
auto from_gw = getSheet(SHEET_MONST, m_start_pic / 20);
|
||||
if(!from_gw) return;
|
||||
rectangle from_rect = calcDefMonstRect(m_start_pic % 20, animFrame);
|
||||
small_monst_rect.offset(to_rect.left + 7,to_rect.top);
|
||||
@@ -829,7 +829,7 @@ void cPict::drawPresetMonstLg(short num, rectangle to_rect){
|
||||
fill_rect(*inWindow, to_rect, sf::Color::Black);
|
||||
|
||||
short m_start_pic = m_pic_index[num].i;
|
||||
const sf::Texture* from_gw = getSheet(SHEET_MONST, m_start_pic / 20);
|
||||
auto from_gw = getSheet(SHEET_MONST, m_start_pic / 20);
|
||||
if(!from_gw) return;
|
||||
rectangle from_rect = calcDefMonstRect(m_start_pic % 20, animFrame);
|
||||
small_monst_rect.offset(to_rect.left,to_rect.top);
|
||||
@@ -860,7 +860,7 @@ void cPict::drawPresetMonstLg(short num, rectangle to_rect){
|
||||
void cPict::drawPresetDlog(short num, rectangle to_rect){
|
||||
to_rect.right = to_rect.left + 36;
|
||||
to_rect.bottom = to_rect.top + 36;
|
||||
const sf::Texture* from_gw = getSheet(SHEET_DLOG);
|
||||
auto from_gw = getSheet(SHEET_DLOG);
|
||||
rectangle from_rect = {0,0,36,36};
|
||||
from_rect.offset(36 * (num % 4),36 * (num / 4));
|
||||
rect_draw_some_item(*from_gw, from_rect, *inWindow, to_rect);
|
||||
@@ -869,7 +869,7 @@ void cPict::drawPresetDlog(short num, rectangle to_rect){
|
||||
void cPict::drawPresetDlogLg(short num, rectangle to_rect){
|
||||
to_rect.right = to_rect.left + (drawScaled ? getBounds().width() : 72);
|
||||
to_rect.bottom = to_rect.top + (drawScaled ? getBounds().height() : 72);
|
||||
const sf::Texture* from_gw = getSheet(SHEET_DLOG);
|
||||
auto from_gw = getSheet(SHEET_DLOG);
|
||||
rectangle from_rect = {0,0,72,72};
|
||||
from_rect.offset(36 * (num % 4),36 * (num / 4));
|
||||
rect_draw_some_item(*from_gw, from_rect, *inWindow, to_rect);
|
||||
@@ -878,14 +878,14 @@ void cPict::drawPresetDlogLg(short num, rectangle to_rect){
|
||||
void cPict::drawPresetTalk(short num, rectangle to_rect){
|
||||
to_rect.right = to_rect.left + 32;
|
||||
to_rect.bottom = to_rect.top + 32;
|
||||
const sf::Texture* from_gw = getSheet(SHEET_TALK);
|
||||
auto from_gw = getSheet(SHEET_TALK);
|
||||
rectangle from_rect = {0,0,32,32};
|
||||
from_rect.offset(32 * (num % 10),32 * (num / 10));
|
||||
rect_draw_some_item(*from_gw, from_rect, *inWindow, to_rect);
|
||||
}
|
||||
|
||||
void cPict::drawPresetScen(short num, rectangle to_rect){
|
||||
const sf::Texture* from_gw = getSheet(SHEET_SCEN);
|
||||
auto from_gw = getSheet(SHEET_SCEN);
|
||||
rectangle from_rect = {0,0,32,32};
|
||||
from_rect.offset(32 * (num % 5),32 * (num / 5));
|
||||
to_rect.right = to_rect.left + 32;
|
||||
@@ -894,7 +894,7 @@ void cPict::drawPresetScen(short num, rectangle to_rect){
|
||||
}
|
||||
|
||||
void cPict::drawPresetScenLg(short num, rectangle to_rect){
|
||||
const sf::Texture* from_gw = getSheet(SHEET_SCEN_LG);
|
||||
auto from_gw = getSheet(SHEET_SCEN_LG);
|
||||
to_rect.right = to_rect.left + (drawScaled ? getBounds().width() : 64);
|
||||
to_rect.bottom = to_rect.top + (drawScaled ? getBounds().height() : 64);
|
||||
rectangle from_rect = {0,0,64,64};
|
||||
@@ -906,7 +906,7 @@ void cPict::drawPresetItem(short num, rectangle to_rect){
|
||||
to_rect.right = to_rect.left + 28;
|
||||
to_rect.bottom = to_rect.top + 36;
|
||||
fill_rect(*inWindow, to_rect, sf::Color::Black);
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
rectangle from_rect = {0,0,18,18};
|
||||
if(num < 55) {
|
||||
from_gw = getSheet(SHEET_ITEM);
|
||||
@@ -923,15 +923,14 @@ void cPict::drawPresetTinyItem(short num, rectangle to_rect){
|
||||
to_rect.right = to_rect.left + 18;
|
||||
to_rect.bottom = to_rect.top + 18;
|
||||
fill_rect(*inWindow, to_rect, sf::Color::Black);
|
||||
const sf::Texture* from_gw;
|
||||
rectangle from_rect = {0,0,18,18};
|
||||
from_gw = getSheet(SHEET_TINY_ITEM);
|
||||
auto from_gw = getSheet(SHEET_TINY_ITEM);
|
||||
from_rect.offset(18 * (num % 10), 18 * (num / 10));
|
||||
rect_draw_some_item(*from_gw, from_rect, *inWindow, to_rect, sf::BlendAlpha);
|
||||
}
|
||||
|
||||
void cPict::drawPresetPc(short num, rectangle to_rect){
|
||||
const sf::Texture* from_gw = getSheet(SHEET_PC);
|
||||
auto from_gw = getSheet(SHEET_PC);
|
||||
rectangle from_rect = calc_rect(2 * (num / 8), num % 8);
|
||||
to_rect.right = to_rect.left + 28;
|
||||
to_rect.bottom = to_rect.top + 36;
|
||||
@@ -940,7 +939,7 @@ void cPict::drawPresetPc(short num, rectangle to_rect){
|
||||
}
|
||||
|
||||
void cPict::drawPresetField(short num, rectangle to_rect){
|
||||
const sf::Texture* from_gw = getSheet(SHEET_FIELD);
|
||||
auto from_gw = getSheet(SHEET_FIELD);
|
||||
rectangle from_rect = calc_rect(num % 8, num / 8);
|
||||
to_rect.right = to_rect.left + 28;
|
||||
to_rect.bottom = to_rect.top + 36;
|
||||
@@ -949,7 +948,7 @@ void cPict::drawPresetField(short num, rectangle to_rect){
|
||||
}
|
||||
|
||||
void cPict::drawPresetBoom(short num, rectangle to_rect){
|
||||
const sf::Texture* from_gw = getSheet(SHEET_BOOM);
|
||||
auto from_gw = getSheet(SHEET_BOOM);
|
||||
if(num >= 8)
|
||||
num = 8 * (num - 7) + animFrame % 8;
|
||||
rectangle from_rect = calc_rect(num % 8, num / 8);
|
||||
@@ -962,7 +961,7 @@ void cPict::drawPresetBoom(short num, rectangle to_rect){
|
||||
|
||||
void cPict::drawFullSheet(short num, rectangle to_rect){
|
||||
rectangle from_rect;
|
||||
const sf::Texture* from_gw = getSheet(SHEET_FULL, num);
|
||||
auto from_gw = getSheet(SHEET_FULL, num);
|
||||
from_rect = rectangle(*from_gw);
|
||||
if(!drawScaled) {
|
||||
to_rect.right = to_rect.left + (from_rect.right - from_rect.left);
|
||||
@@ -973,7 +972,7 @@ void cPict::drawFullSheet(short num, rectangle to_rect){
|
||||
|
||||
void cPict::drawPresetMissile(short num, rectangle to_rect){
|
||||
rectangle from_rect = {0,0,18,18};
|
||||
const sf::Texture* from_gw = getSheet(SHEET_MISSILE);
|
||||
auto from_gw = getSheet(SHEET_MISSILE);
|
||||
to_rect.right = to_rect.left + 18;
|
||||
to_rect.bottom = to_rect.top + 18;
|
||||
fill_rect(*inWindow, to_rect, sf::Color::Black);
|
||||
@@ -984,7 +983,7 @@ void cPict::drawPresetMissile(short num, rectangle to_rect){
|
||||
|
||||
void cPict::drawPresetTerMap(short num, rectangle to_rect){
|
||||
rectangle from_rect = {0,0,12,12};
|
||||
const sf::Texture* from_gw = getSheet(SHEET_TER_MAP);
|
||||
auto from_gw = getSheet(SHEET_TER_MAP);
|
||||
// TODO: Should probably fill black somewhere in here...?
|
||||
to_rect.right = to_rect.left + 24;
|
||||
to_rect.bottom = to_rect.top + 24;
|
||||
@@ -996,7 +995,7 @@ void cPict::drawPresetTerMap(short num, rectangle to_rect){
|
||||
|
||||
void cPict::drawStatusIcon(short num, rectangle to_rect){
|
||||
rectangle from_rect = {0,0,12,12};
|
||||
const sf::Texture* from_gw = getSheet(SHEET_STATUS);
|
||||
auto from_gw = getSheet(SHEET_STATUS);
|
||||
to_rect.right = to_rect.left + 12;
|
||||
to_rect.bottom = to_rect.top + 12;
|
||||
from_rect.offset(12 * (num % 3), 12 * (num / 3));
|
||||
@@ -1012,7 +1011,7 @@ void cPict::drawCustomTer(short num, rectangle to_rect){
|
||||
to_rect.right = to_rect.left + 28;
|
||||
to_rect.bottom = to_rect.top + 36;
|
||||
rectangle from_rect;
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num);
|
||||
rect_draw_some_item(*from_gw, from_rect, *inWindow, to_rect);
|
||||
}
|
||||
@@ -1022,7 +1021,7 @@ void cPict::drawCustomTerAnim(short num, rectangle to_rect){
|
||||
to_rect.bottom = to_rect.top + 36;
|
||||
num += animFrame % 4;
|
||||
rectangle from_rect;
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num);
|
||||
rect_draw_some_item(*from_gw, from_rect, *inWindow, to_rect);
|
||||
}
|
||||
@@ -1035,7 +1034,7 @@ void cPict::drawCustomMonstSm(short num, rectangle to_rect){
|
||||
fill_rect(*inWindow, to_rect, sf::Color::Black);
|
||||
|
||||
rectangle from_rect;
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num);
|
||||
rect_draw_some_item(*from_gw, from_rect, *inWindow, to_rect, sf::BlendAlpha);
|
||||
}
|
||||
@@ -1049,7 +1048,7 @@ void cPict::drawCustomMonstWide(short num, rectangle to_rect){
|
||||
fill_rect(*inWindow, to_rect, sf::Color::Black);
|
||||
|
||||
rectangle from_rect;
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num);
|
||||
small_monst_rect.offset(to_rect.left,to_rect.top + 7);
|
||||
rect_draw_some_item(*from_gw, from_rect, *inWindow, small_monst_rect, sf::BlendAlpha);
|
||||
@@ -1068,7 +1067,7 @@ void cPict::drawCustomMonstTall(short num, rectangle to_rect){
|
||||
fill_rect(*inWindow, to_rect, sf::Color::Black);
|
||||
|
||||
rectangle from_rect;
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num);
|
||||
small_monst_rect.offset(to_rect.left + 7,to_rect.top);
|
||||
rect_draw_some_item(*from_gw, from_rect, *inWindow, small_monst_rect, sf::BlendAlpha);
|
||||
@@ -1087,7 +1086,7 @@ void cPict::drawCustomMonstLg(short num, rectangle to_rect){
|
||||
fill_rect(*inWindow, to_rect, sf::Color::Black);
|
||||
|
||||
rectangle from_rect;
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num);
|
||||
small_monst_rect.offset(to_rect.left,to_rect.top);
|
||||
rect_draw_some_item(*from_gw, from_rect, *inWindow, small_monst_rect, sf::BlendAlpha);
|
||||
@@ -1110,7 +1109,7 @@ static int dlog_to_w = 18, dlog_to_h = 36;
|
||||
|
||||
void cPict::drawCustomDlog(short num, rectangle to_rect){
|
||||
rectangle from_rect;
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num);
|
||||
to_rect.right = to_rect.left + dlog_to_w;
|
||||
to_rect.bottom = to_rect.top + dlog_to_h;
|
||||
@@ -1145,7 +1144,7 @@ void cPict::drawCustomDlogLg(short num, rectangle to_rect){
|
||||
|
||||
void cPict::drawCustomTalk(short num, rectangle to_rect){
|
||||
rectangle from_rect;
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num);
|
||||
to_rect.right = to_rect.left + 16;
|
||||
to_rect.bottom = to_rect.top + 32;
|
||||
@@ -1164,7 +1163,7 @@ void cPict::drawCustomItem(short num, rectangle to_rect){
|
||||
to_rect.right = to_rect.left + 28;
|
||||
to_rect.bottom = to_rect.top + 36;
|
||||
rectangle from_rect;
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num);
|
||||
fill_rect(*inWindow, to_rect, sf::Color::Black);
|
||||
rect_draw_some_item(*from_gw, from_rect, *inWindow, to_rect, sf::BlendAlpha);
|
||||
@@ -1174,7 +1173,7 @@ void cPict::drawCustomTinyItem(short num, rectangle to_rect){
|
||||
to_rect.right = to_rect.left + 18;
|
||||
to_rect.bottom = to_rect.top + 18;
|
||||
rectangle from_rect;
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num);
|
||||
fill_rect(*inWindow, to_rect, sf::Color::Black);
|
||||
rect_draw_some_item(*from_gw, from_rect, *inWindow, to_rect, sf::BlendAlpha);
|
||||
@@ -1184,7 +1183,7 @@ void cPict::drawCustomBoom(short num, rectangle to_rect){
|
||||
to_rect.right = to_rect.left + 28;
|
||||
to_rect.bottom = to_rect.top + 36;
|
||||
rectangle from_rect;
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num + animFrame % 8);
|
||||
fill_rect(*inWindow, to_rect, sf::Color::Black);
|
||||
rect_draw_some_item(*from_gw, from_rect, *inWindow, to_rect, sf::BlendAlpha);
|
||||
@@ -1193,7 +1192,7 @@ void cPict::drawCustomBoom(short num, rectangle to_rect){
|
||||
void cPict::drawCustomMissile(short num, rectangle to_rect){
|
||||
num += animFrame % 8;
|
||||
rectangle from_rect;
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num);
|
||||
from_rect.right = from_rect.left + 18;
|
||||
from_rect.bottom = from_rect.top + 18;
|
||||
@@ -1205,7 +1204,7 @@ void cPict::drawCustomMissile(short num, rectangle to_rect){
|
||||
|
||||
void cPict::drawCustomTerMap(short num, rectangle to_rect){
|
||||
rectangle from_rect;
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num % 1000);
|
||||
from_rect.right = from_rect.left + 12;
|
||||
from_rect.bottom = from_rect.top + 12;
|
||||
@@ -1219,7 +1218,7 @@ void cPict::drawCustomTerMap(short num, rectangle to_rect){
|
||||
void cPict::drawPartyMonstSm(short num, rectangle to_rect){
|
||||
to_rect.right = to_rect.left + 28;
|
||||
to_rect.bottom = to_rect.top + 36;
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
rectangle from_rect;
|
||||
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num, true);
|
||||
@@ -1232,7 +1231,7 @@ void cPict::drawPartyMonstWide(short num, rectangle to_rect){
|
||||
to_rect.right = to_rect.left + 28;
|
||||
to_rect.bottom = to_rect.top + 36;
|
||||
fill_rect(*inWindow, to_rect, sf::Color::Black);
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
rectangle from_rect;
|
||||
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num, true);
|
||||
@@ -1249,7 +1248,7 @@ void cPict::drawPartyMonstTall(short num, rectangle to_rect){
|
||||
to_rect.right = to_rect.left + 28;
|
||||
to_rect.bottom = to_rect.top + 36;
|
||||
fill_rect(*inWindow, to_rect, sf::Color::Black);
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
rectangle from_rect;
|
||||
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num, true);
|
||||
@@ -1266,7 +1265,7 @@ void cPict::drawPartyMonstLg(short num, rectangle to_rect){
|
||||
to_rect.right = to_rect.left + 28;
|
||||
to_rect.bottom = to_rect.top + 36;
|
||||
fill_rect(*inWindow, to_rect, sf::Color::Black);
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
rectangle from_rect;
|
||||
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num, true);
|
||||
@@ -1287,7 +1286,7 @@ void cPict::drawPartyMonstLg(short num, rectangle to_rect){
|
||||
}
|
||||
|
||||
void cPict::drawPartyScen(short num, rectangle to_rect){
|
||||
const sf::Texture* from_gw = getSheet(SHEET_HEADER);
|
||||
auto from_gw = getSheet(SHEET_HEADER);
|
||||
rectangle from_rect = {0,0,32,32};
|
||||
from_rect.offset(32 * (num % 5),32 * (num / 5));
|
||||
to_rect.right = to_rect.left + 32;
|
||||
@@ -1298,7 +1297,7 @@ void cPict::drawPartyScen(short num, rectangle to_rect){
|
||||
void cPict::drawPartyItem(short num, rectangle to_rect){
|
||||
to_rect.right = to_rect.left + 28;
|
||||
to_rect.bottom = to_rect.top + 36;
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
rectangle from_rect;
|
||||
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num, true);
|
||||
@@ -1309,7 +1308,7 @@ void cPict::drawPartyItem(short num, rectangle to_rect){
|
||||
void cPict::drawPartyPc(short num, rectangle to_rect){
|
||||
to_rect.right = to_rect.left + 28;
|
||||
to_rect.bottom = to_rect.top + 36;
|
||||
const sf::Texture* from_gw;
|
||||
std::shared_ptr<const sf::Texture> from_gw;
|
||||
rectangle from_rect;
|
||||
|
||||
graf_pos_ref(from_gw, from_rect) = spec_scen_g.find_graphic(num, true);
|
||||
|
@@ -89,7 +89,7 @@ public:
|
||||
cPict& operator=(cPict& other) = delete;
|
||||
cPict(cPict& other) = delete;
|
||||
private:
|
||||
static const sf::Texture* getSheet(eSheetType type, size_t n = 0);
|
||||
static std::shared_ptr<const sf::Texture> getSheet(eSheetType type, size_t n = 0);
|
||||
static short animFrame;
|
||||
pic_num_t picNum;
|
||||
ePicType picType;
|
||||
|
Reference in New Issue
Block a user