mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 06:08:35 +00:00
CGE2: Hopefully fix compilation for GCC
This commit is contained in:
parent
00c867f8ea
commit
014d6bd9f0
engines/cge2
@ -619,7 +619,7 @@ void CGE2Engine::tick() {
|
||||
void CGE2Engine::openPocket() {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
for (int j = 0; j < kPocketMax + 1; j++) {
|
||||
int ref = (int)_heroTab[i]->_pocket[j];
|
||||
int ref = (int)_heroTab[i]->_downPocketId[j];
|
||||
_heroTab[i]->_pocket[j] = (ref == -1) ? nullptr : _vga->_showQ->locate(ref);
|
||||
}
|
||||
}
|
||||
@ -629,7 +629,7 @@ void CGE2Engine::closePocket() {
|
||||
for (int i = 0; i < 2; i++) {
|
||||
for (int j = 0; j < kPocketMax + 1; j++) {
|
||||
Sprite *spr = _heroTab[i]->_pocket[j];
|
||||
_heroTab[i]->_pocket[j] = (Sprite*)((spr) ? spr->_ref : -1);
|
||||
_heroTab[i]->_downPocketId[j] = (spr) ? spr->_ref : -1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -41,13 +41,16 @@ struct HeroTab {
|
||||
Hero *_ptr;
|
||||
Sprite *_face;
|
||||
Sprite *_pocket[kPocketMax + 1];
|
||||
int _downPocketId[kPocketMax + 1];
|
||||
int _pocPtr;
|
||||
V2D *_posTab[kSceneMax];
|
||||
HeroTab(CGE2Engine *vm) {
|
||||
_ptr = nullptr;
|
||||
_face = nullptr;
|
||||
for (int i = 0; i < kPocketMax + 1; i++)
|
||||
for (int i = 0; i < kPocketMax + 1; i++) {
|
||||
_pocket[i] = nullptr;
|
||||
_downPocketId[i] = -1;
|
||||
}
|
||||
_pocPtr = 0;
|
||||
for (int i = 0; i < kSceneMax; i++)
|
||||
_posTab[i] = nullptr;
|
||||
|
Loading…
Reference in New Issue
Block a user