[Scummvm-git-logs] scummvm master -> 16f1dfcda14751db7b25ec2b519d71c1c150c123
bluegr
noreply at scummvm.org
Sun Jul 3 14:34:04 UTC 2022
This automated email contains information about 5 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
2c60a9badd CHEWY: Use enums in some cases of set_ats_str()
abc0538214 CHEWY: Remove useless check
4d7695cd70 CHEWY: Start reworking dynamic hotspot string changes
17d61a9528 CHEWY: Implement extra music check for the harbor scene - bug #13652
16f1dfcda1 CHEWY: Fix for vanishing items - bug #13653
Commit: 2c60a9baddb5ca3832d34dafe6e2b3ed1c438740
https://github.com/scummvm/scummvm/commit/2c60a9baddb5ca3832d34dafe6e2b3ed1c438740
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-03T17:33:13+03:00
Commit Message:
CHEWY: Use enums in some cases of set_ats_str()
Changed paths:
engines/chewy/rooms/room03.cpp
engines/chewy/rooms/room77.cpp
engines/chewy/t_event.cpp
diff --git a/engines/chewy/rooms/room03.cpp b/engines/chewy/rooms/room03.cpp
index b3bfe4e9107..3ad7539e1db 100644
--- a/engines/chewy/rooms/room03.cpp
+++ b/engines/chewy/rooms/room03.cpp
@@ -395,7 +395,7 @@ void Room3::probeTransfer() {
case 1:
g_engine->_sound->waitForSpeechToFinish();
- _G(atds)->set_ats_str(24, 0, 1);
+ _G(atds)->set_ats_str(24, 0, ATS_DATA);
_G(mov_phasen)[0].AtsText = 544;
switchRoom(1);
break;
diff --git a/engines/chewy/rooms/room77.cpp b/engines/chewy/rooms/room77.cpp
index ff1c0969920..8a47badca69 100644
--- a/engines/chewy/rooms/room77.cpp
+++ b/engines/chewy/rooms/room77.cpp
@@ -108,7 +108,7 @@ int Room77::proc2() {
if (_G(gameState).flags29_8) {
start_spz_wait(14, 1, false, P_CHEWY);
delInventory(_G(cur)->getInventoryCursor());
- _G(atds)->set_ats_str(464, 1, 1);
+ _G(atds)->set_ats_str(464, 1, ATS_DATA);
_G(gameState).flags29_20 = true;
_G(gameState).flags29_40 = true;
diaNr = 442;
diff --git a/engines/chewy/t_event.cpp b/engines/chewy/t_event.cpp
index ad7ef1ca3d8..0a82e7d8bb4 100644
--- a/engines/chewy/t_event.cpp
+++ b/engines/chewy/t_event.cpp
@@ -2280,14 +2280,14 @@ void calc_inv_use_txt(int16 test_nr) {
case 105:
delInventory(_G(cur)->getInventoryCursor());
- _G(atds)->set_ats_str(105, 0, 1, 6);
+ _G(atds)->set_ats_str(105, 0, 1, INV_ATS_DATA);
_G(menu_item) = CUR_USE;
cursorChoice(CUR_USE);
break;
case 106:
del_invent_slot(106);
- _G(atds)->set_ats_str(105, 0, 1, 6);
+ _G(atds)->set_ats_str(105, 0, 1, INV_ATS_DATA);
break;
default:
Commit: abc05382148e0f623105927a597d80cd5343dcad
https://github.com/scummvm/scummvm/commit/abc05382148e0f623105927a597d80cd5343dcad
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-03T17:33:13+03:00
Commit Message:
CHEWY: Remove useless check
Changed paths:
engines/chewy/rooms/room21.cpp
diff --git a/engines/chewy/rooms/room21.cpp b/engines/chewy/rooms/room21.cpp
index b017872d91a..48516727b9a 100644
--- a/engines/chewy/rooms/room21.cpp
+++ b/engines/chewy/rooms/room21.cpp
@@ -206,8 +206,7 @@ void Room21::chewy_kolli() {
}
void Room21::salto() {
- if (!_G(cur)->usingInventoryCursor() && _G(atds)->get_ats_str(134, TXT_MARK_USE, ATS_DATA) == 8
- && !_G(gameState).R21Salto && !_G(flags).AutoAniPlay) {
+ if (!_G(cur)->usingInventoryCursor() && !_G(gameState).R21Salto && !_G(flags).AutoAniPlay) {
_G(gameState).R21Salto = true;
_G(flags).AutoAniPlay = true;
_G(gameState)._personHide[P_CHEWY] = true;
Commit: 4d7695cd70c61d2e71a2fcf7a9113cd43cf02778
https://github.com/scummvm/scummvm/commit/4d7695cd70c61d2e71a2fcf7a9113cd43cf02778
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-03T17:33:14+03:00
Commit Message:
CHEWY: Start reworking dynamic hotspot string changes
This was not implemented in the refactoring done in 8eadac5eeda.
It's still incomplete, and doesn't work yet
Changed paths:
engines/chewy/atds.cpp
engines/chewy/atds.h
engines/chewy/defines.h
engines/chewy/inits.cpp
engines/chewy/text.cpp
engines/chewy/text.h
engines/chewy/types.cpp
engines/chewy/types.h
diff --git a/engines/chewy/atds.cpp b/engines/chewy/atds.cpp
index 2bce9f8b457..1320832259b 100644
--- a/engines/chewy/atds.cpp
+++ b/engines/chewy/atds.cpp
@@ -352,39 +352,11 @@ void Atdsys::load_atds(int16 chunkNr, int16 mode) {
}
}
-void Atdsys::set_ats_mem(int16 mode) {
- switch (mode) {
- case ATS_DATA:
- _ats_sheader = _G(gameState).Ats;
- _atsMem = _atdsMem[mode];
- break;
-
- case INV_USE_DATA:
- _ats_sheader = _G(gameState).InvUse;
- _atsMem = _atdsMem[mode];
- break;
-
- case INV_USE_DEF:
- error("set_ats_mem() called with mode INV_USE_DEF");
-
- case INV_ATS_DATA:
- _ats_sheader = _G(gameState).InvAts;
- _atsMem = _atdsMem[mode];
- break;
-
- default:
- break;
- }
-}
-
bool Atdsys::start_ats(int16 txtNr, int16 txtMode, int16 color, int16 mode, int16 *vocNr) {
assert(mode == ATS_DATA || mode == INV_USE_DATA || mode == INV_USE_DEF);
*vocNr = -1;
- if (mode != INV_USE_DEF)
- set_ats_mem(mode);
-
_atsv.shown = false;
Common::StringArray textArray;
@@ -501,19 +473,7 @@ void Atdsys::print_ats(int16 x, int16 y, int16 scrX, int16 scrY) {
}
void Atdsys::set_ats_str(int16 txtNr, int16 txtMode, int16 strNr, int16 mode) {
- set_ats_mem(mode);
- uint8 status = _ats_sheader[(txtNr * MAX_ATS_STATUS) + (txtMode + 1) / 2];
- int16 ak_nybble = (txtMode + 1) % 2;
-
- uint8 lo_hi[2];
- lo_hi[1] = status >> 4;
- lo_hi[0] = status &= 15;
- lo_hi[ak_nybble] = strNr;
- status = 0;
- lo_hi[1] <<= 4;
- status |= lo_hi[0];
- status |= lo_hi[1];
- _ats_sheader[(txtNr * MAX_ATS_STATUS) + (txtMode + 1) / 2] = status;
+ _text->setTextId(txtNr, txtMode, strNr, mode);
}
void Atdsys::set_ats_str(int16 txtNr, int16 strNr, int16 mode) {
@@ -521,31 +481,16 @@ void Atdsys::set_ats_str(int16 txtNr, int16 strNr, int16 mode) {
set_ats_str(txtNr, i, strNr, mode);
}
-int16 Atdsys::get_ats_str(int16 txtNr, int16 txtMode, int16 mode) {
- set_ats_mem(mode);
- uint8 status = _ats_sheader[(txtNr * MAX_ATS_STATUS) + (txtMode + 1) / 2];
- int16 ak_nybble = (txtMode + 1) % 2;
-
- uint8 lo_hi[2];
- lo_hi[1] = status >> 4;
- lo_hi[0] = status &= 15;
-
- return (int16)lo_hi[ak_nybble];
-}
-
int16 Atdsys::getControlBit(int16 txtNr, int16 bitIdx) {
- set_ats_mem(ATS_DATA);
- return (_ats_sheader[txtNr * MAX_ATS_STATUS] & bitIdx) != 0;
+ return _text->getControlBit(txtNr, bitIdx);
}
void Atdsys::setControlBit(int16 txtNr, int16 bitIdx) {
- set_ats_mem(ATS_DATA);
- _ats_sheader[txtNr * MAX_ATS_STATUS] |= bitIdx;
+ _text->setControlBit(txtNr, bitIdx);
}
void Atdsys::delControlBit(int16 txtNr, int16 bitIdx) {
- set_ats_mem(ATS_DATA);
- _ats_sheader[txtNr * MAX_ATS_STATUS] &= ~bitIdx;
+ _text->delControlBit(txtNr, bitIdx);
}
int16 Atdsys::start_aad(int16 diaNr) {
@@ -1025,4 +970,8 @@ Common::String Atdsys::getTextEntry(uint dialogNum, uint entryNum, int type, int
return Common::String();
}
+int16 Atdsys::getLastSpeechId() {
+ return _text->getLastSpeechId();
+}
+
} // namespace Chewy
diff --git a/engines/chewy/atds.h b/engines/chewy/atds.h
index 74dadb6e945..76508377ad9 100644
--- a/engines/chewy/atds.h
+++ b/engines/chewy/atds.h
@@ -228,8 +228,6 @@ public:
void delControlBit(int16 txtNr, int16 bitIdx);
void set_ats_str(int16 txtNr, int16 txtMode, int16 strNr, int16 mode);
void set_ats_str(int16 txtNr, int16 strNr, int16 mode);
- int16 get_ats_str(int16 txtNr, int16 txtMode, int16 mode);
- void set_ats_mem(int16 mode);
int16 start_aad(int16 diaNr);
void stopAad();
void print_aad(int16 scrX, int16 scrY);
@@ -263,7 +261,7 @@ public:
Common::StringArray getTextArray(uint dialogNum, uint entryNum, int type, int subEntry = -1);
Common::String getTextEntry(uint dialogNum, uint entryNum, int type, int subEntry = -1);
- int16 getLastSpeechId() { return _text->getLastSpeechId(); }
+ int16 getLastSpeechId();
private:
void init();
@@ -273,8 +271,6 @@ private:
Common::File *_atdsHandle = nullptr;
char *_atdsMem[MAX_HANDLE] = { nullptr };
int16 _atdsPoolOff[MAX_HANDLE] = { 0 };
- char *_atsMem = nullptr;
- uint8 *_ats_sheader = nullptr;
AadVar _aadv;
AtsVar _atsv;
DialogCloseupVariables _dialogCloseup;
diff --git a/engines/chewy/defines.h b/engines/chewy/defines.h
index 9ec3aa92972..aa502b054a3 100644
--- a/engines/chewy/defines.h
+++ b/engines/chewy/defines.h
@@ -404,7 +404,6 @@ enum SetupScreenMode {
#define AUTO_OBJ4 4
#define MAX_OBJ_MOV 3
-#define ROOM_ATS_MAX 1000
#define INV_USE_ATS_MAX 500
#define ATS_ACTION_VOR 0
#define ATS_ACTION_NACH 1
diff --git a/engines/chewy/inits.cpp b/engines/chewy/inits.cpp
index 9a2a3abc621..c94270feba1 100644
--- a/engines/chewy/inits.cpp
+++ b/engines/chewy/inits.cpp
@@ -164,24 +164,6 @@ void new_game() {
_G(obj)->load(INVENTORY_SIB, &_G(gameState).room_s_obj[0]);
_G(obj)->load(EXIT_EIB, &_G(gameState).room_e_obj[0]);
- Common::File f;
-
- if (!f.open(ROOM_ATS_STEUER))
- error("Error reading file: %s", ROOM_ATS_STEUER);
- for (int16 i = 0; i < ROOM_ATS_MAX; i++)
- _G(gameState).Ats[i * MAX_ATS_STATUS] = f.readByte();
- f.close();
-
- // WORKAROUND: For English version, taxi hotspot in
- // room 45 (Big City) isn't turned on by default
- _G(gameState).Ats[295 * MAX_ATS_STATUS] = ATS_ACTION_BIT;
-
- if (!f.open(INV_ATS_STEUER))
- error("Error reading file: %s", INV_ATS_STEUER);
- for (int16 i = 0; i < MAX_MOV_OBJ; i++)
- _G(gameState).InvAts[i * MAX_ATS_STATUS] = f.readByte();
- f.close();
-
_G(obj)->sort();
for (int16 i = 0; i < _G(obj)->spieler_invnr[0]; i++)
_G(gameState).InventSlot[i] = _G(obj)->spieler_invnr[i + 1];
diff --git a/engines/chewy/text.cpp b/engines/chewy/text.cpp
index 0a920246453..17c7d22026d 100644
--- a/engines/chewy/text.cpp
+++ b/engines/chewy/text.cpp
@@ -22,12 +22,35 @@
#include "common/system.h"
#include "chewy/resource.h"
#include "chewy/text.h"
+
+#include "types.h"
#include "chewy/atds.h"
#include "chewy/defines.h"
namespace Chewy {
Text::Text() : Resource("atds.tap") {
+ memset(_hotspotStrings, sizeof(_hotspotStrings), 0);
+
+ Common::File f;
+
+ if (!f.open(ROOM_ATS_STEUER))
+ error("Error reading file: %s", ROOM_ATS_STEUER);
+ for (int16 i = 0; i < ROOM_ATS_MAX; i++)
+ _hotspotStrings[i * MAX_ATS_STATUS] = f.readByte();
+
+ f.close();
+
+ if (!f.open(INV_ATS_STEUER))
+ error("Error reading file: %s", INV_ATS_STEUER);
+ for (int16 i = 0; i < MAX_MOV_OBJ; i++)
+ _inventoryStrings[i * MAX_ATS_STATUS] = f.readByte();
+
+ f.close();
+
+ // WORKAROUND: For English version, taxi hotspot in
+ // room 45 (Big City) isn't turned on by default
+ _hotspotStrings[295] = ATS_ACTION_BIT;
}
Text::~Text() {
@@ -86,6 +109,11 @@ TextEntry *Text::getText(uint chunk, uint entry, int type, int subEntry) {
bool isAutoDialog = false;
bool isInvDesc = false;
+ //int subEntryNew = -1;
+
+ //if (subEntry >= 0)
+ // subEntryNew = getTextId(entry, subEntry, type);
+
switch (type) {
case AAD_DATA:
chunk += kADSTextMax + kATSTextMax;
@@ -232,4 +260,85 @@ const char *Text::strPos(const char *txtAdr, int16 pos) {
return ptr;
}
+void Text::syncHotspotStrings(Common::Serializer &s) {
+ for (size_t i = 0; i < sizeof(_hotspotStrings); ++i)
+ s.syncAsByte(_hotspotStrings[i]);
+}
+
+void Text::syncInventoryStrings(Common::Serializer &s) {
+ for (size_t i = 0; i < sizeof(_inventoryStrings); ++i)
+ s.syncAsByte(_inventoryStrings[i]);
+}
+
+void Text::syncInventoryUseStrings(Common::Serializer &s) {
+ for (size_t i = 0; i < sizeof(_inventoryUseStrings); ++i)
+ s.syncAsByte(_inventoryUseStrings[i]);
+}
+
+bool Text::getControlBit(int16 txtNr, int16 bitIdx) {
+ return (_hotspotStrings[txtNr * MAX_ATS_STATUS] & bitIdx) != 0;
+}
+
+void Text::setControlBit(int16 txtNr, int16 bitIdx) {
+ _hotspotStrings[txtNr * MAX_ATS_STATUS] |= bitIdx;
+}
+
+void Text::delControlBit(int16 txtNr, int16 bitIdx) {
+ _hotspotStrings[txtNr * MAX_ATS_STATUS] &= ~bitIdx;
+}
+
+/*uint8 Text::getTextStatus(uint8 status, int16 subEntry, int16 strNr) {
+ const int16 hotspotActionStr = (subEntry + 1) % 2;
+ uint8 lo_hi[2];
+ lo_hi[0] = status &= 15;
+ lo_hi[1] = status >> 4;
+ lo_hi[hotspotActionStr] = strNr;
+ status = 0;
+ lo_hi[1] <<= 4;
+ status |= lo_hi[0];
+ status |= lo_hi[1];
+
+ return status;
+}*/
+
+uint8 Text::updateTextStatus(int16 entry, int16 subEntry, int16 strNr, int16 type) {
+ byte *buffer;
+
+ switch (type) {
+ case ATS_DATA:
+ buffer = _hotspotStrings;
+ break;
+ case INV_USE_DATA:
+ buffer = _inventoryUseStrings;
+ break;
+ case INV_ATS_DATA:
+ buffer = _inventoryStrings;
+ break;
+ default:
+ error("setTextId called for type %d", type);
+ }
+
+ const uint8 status = buffer[(entry * MAX_ATS_STATUS) + (subEntry + 1) / 2];
+ if (strNr >= 0) {
+ buffer[(entry * MAX_ATS_STATUS) + (subEntry + 1) / 2] = strNr; // getTextStatus(status, subEntry, strNr);
+ return strNr;
+ }
+
+ return status;
+}
+
+uint8 Text::getTextId(uint entry, uint subEntry, int type) {
+ uint8 status = updateTextStatus(entry, subEntry, -1, type);
+
+ const int16 hotspotActionStr = (subEntry + 1) % 2;
+ uint8 lo_hi[2];
+ lo_hi[0] = status &= 15;
+ lo_hi[1] = status >> 4;
+ return lo_hi[hotspotActionStr];
+}
+
+void Text::setTextId(int16 entry, int16 subEntry, int16 strNr, int16 type) {
+ updateTextStatus(entry, subEntry, strNr, type);
+}
+
} // namespace Chewy
diff --git a/engines/chewy/text.h b/engines/chewy/text.h
index ae8f6363f72..e5b14978222 100644
--- a/engines/chewy/text.h
+++ b/engines/chewy/text.h
@@ -23,7 +23,10 @@
#define CHEWY_TEXT_H
#include "common/list.h"
+#include "common/serializer.h"
+#include "chewy/atds.h"
#include "chewy/chewy.h"
+#include "chewy/defines.h"
#include "chewy/resource.h"
namespace Chewy {
@@ -65,6 +68,8 @@ struct TextEntry {
typedef Common::List<TextEntry> TextEntryList;
+#define ROOM_ATS_MAX 1000
+
class Text : public Resource {
public:
Text();
@@ -93,8 +98,25 @@ public:
const char *strPos(const char *txtAdr, int16 pos);
+ void syncHotspotStrings(Common::Serializer &s);
+ void syncInventoryStrings(Common::Serializer &s);
+ void syncInventoryUseStrings(Common::Serializer &s);
+
+ bool getControlBit(int16 txtNr, int16 bitIdx);
+ void setControlBit(int16 txtNr, int16 bitIdx);
+ void delControlBit(int16 txtNr, int16 bitIdx);
+
+ void setTextId(int16 entry, int16 subEntry, int16 strNr, int16 type);
+
private:
int16 _lastSpeechId = -1;
+ byte _hotspotStrings[ROOM_ATS_MAX * 3] = { 0 };
+ uint8 _inventoryStrings[MAX_MOV_OBJ * 3] = {0};
+ uint8 _inventoryUseStrings[INV_USE_ATS_MAX * 3] = {0};
+
+ //uint8 getTextStatus(uint8 status, int16 subEntry, int16 strNr);
+ uint8 getTextId(uint entry, uint subEntry, int type);
+ uint8 updateTextStatus(int16 entry, int16 subEntry, int16 strNr, int16 type);
};
} // namespace Chewy
diff --git a/engines/chewy/types.cpp b/engines/chewy/types.cpp
index ed1953218c7..35bbb906a51 100644
--- a/engines/chewy/types.cpp
+++ b/engines/chewy/types.cpp
@@ -42,6 +42,7 @@ static void syncArray(Common::Serializer &s, uint8 *arr, size_t count) {
for (size_t i = 0; i < count; ++i)
s.syncAsByte(arr[i]);
}
+
static void syncArray(Common::Serializer &s, int16 *arr, size_t count) {
for (size_t i = 0; i < count; ++i)
s.syncAsSint16LE(arr[i]);
@@ -55,14 +56,15 @@ bool GameState::synchronize(Common::Serializer &s) {
byte dummy = 0;
int16 dummy16 = 0;
+ uint8 InvUseDef[40 * 3] = {0}; // dummy
int inventoryCursor = _G(cur)->getInventoryCursor();
// Sync the structure's bitflags
s.syncBytes((byte *)_flags, SPIELER_FLAGS_SIZE);
- syncArray(s, Ats, ROOM_ATS_MAX * 3);
- syncArray(s, InvAts, MAX_MOV_OBJ * 3);
- syncArray(s, InvUse, INV_USE_ATS_MAX * 3);
+ _G(txt)->syncHotspotStrings(s);
+ _G(txt)->syncInventoryStrings(s);
+ _G(txt)->syncInventoryUseStrings(s);
syncArray(s, InvUseDef, 40 * 3);
s.syncAsSint16LE(MainMenuY);
diff --git a/engines/chewy/types.h b/engines/chewy/types.h
index 81662512ed6..c9be166323d 100644
--- a/engines/chewy/types.h
+++ b/engines/chewy/types.h
@@ -391,10 +391,6 @@ struct GameState : public GameFlags {
bool synchronize(Common::Serializer &s);
GameFlags *_flags = nullptr;
- uint8 Ats[ROOM_ATS_MAX * 3] = { 0 };
- uint8 InvAts[MAX_MOV_OBJ * 3] = { 0 };
- uint8 InvUse[INV_USE_ATS_MAX * 3] = { 0 };
- uint8 InvUseDef[40 * 3] = { 0 };
int16 MainMenuY = 0;
int16 InvDisp = 0;
Commit: 17d61a95282c5bdb4726545c261369f8c6142db6
https://github.com/scummvm/scummvm/commit/17d61a95282c5bdb4726545c261369f8c6142db6
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-03T17:33:14+03:00
Commit Message:
CHEWY: Implement extra music check for the harbor scene - bug #13652
Changed paths:
engines/chewy/sound.cpp
diff --git a/engines/chewy/sound.cpp b/engines/chewy/sound.cpp
index 937cb98e260..1cfa1a2de68 100644
--- a/engines/chewy/sound.cpp
+++ b/engines/chewy/sound.cpp
@@ -314,7 +314,7 @@ const RoomMusic roomMusic[] = {
{ 89, 38 }, { 92, 38 }, { 33, 35 }, { 37, 8 }, { 39, 9 },
{ 42, 41 }, { 45, 44 }, { 46, 21 }, { 50, 21 }, { 73, 21 },
{ 74, 21 }, { 48, 22 }, { 49, 3 }, { 51, 27 }, { 52, 27 },
- { 53, 26 }, { 55, 23 }, { 57, 23 }, { 56, 52 }, { 62, 25 },
+ { 53, 26 }, { 55, 23 }, { 57, 23 }, { 56, 7 }, { 62, 25 },
{ 64, 51 }, { 66, 34 }, { 68, 34 }, { 67, 28 }, { 69, 28 },
{ 70, 28 }, { 75, 28 }, { 72, 31 }, { 76, 46 }, { 79, 6 },
{ 80, 29 }, { 81, 45 }, { 82, 50 }, { 84, 24 }, { 85, 32 },
@@ -335,11 +335,9 @@ void Sound::playRoomMusic(int16 roomNum) {
}
}
- // TODO: Extra checks for two flags in room 56
- //if ((spieler.flags32 & SpielerFlags32_10) != 0 && spieler.flags33 >= 0)
- // musicIndex = 52;
- //else
- // musicIndex = 7;
+ // Room 56 music (first vs second visit)
+ if (roomNum == 56 && _G(gameState).flags32_10 && _G(gameState).flags33_80)
+ musicIndex = 52;
if (musicIndex != _curMusic) {
stopMusic();
Commit: 16f1dfcda14751db7b25ec2b519d71c1c150c123
https://github.com/scummvm/scummvm/commit/16f1dfcda14751db7b25ec2b519d71c1c150c123
Author: Filippos Karapetis (bluegr at gmail.com)
Date: 2022-07-03T17:33:15+03:00
Commit Message:
CHEWY: Fix for vanishing items - bug #13653
This was introduced after the cursor code refactoring
Changed paths:
engines/chewy/main.cpp
diff --git a/engines/chewy/main.cpp b/engines/chewy/main.cpp
index 629165779c3..b16ef394a17 100644
--- a/engines/chewy/main.cpp
+++ b/engines/chewy/main.cpp
@@ -347,6 +347,8 @@ bool mainLoop(int16 mode) {
_G(cur)->move(_G(maus_old_x), _G(maus_old_y));
g_events->_mousePos.x = _G(maus_old_x);
g_events->_mousePos.y = _G(maus_old_y);
+ if (_G(cur)->usingInventoryCursor())
+ invent_2_slot(_G(cur)->getInventoryCursor());
_G(cur)->setInventoryCursor(-1);
cursorChoice(_G(menu_item));
}
More information about the Scummvm-git-logs
mailing list