DRAGONS: Fix cursor when selecting bag in non-english versions. Trac#11612

This commit is contained in:
Eric Fry 2020-09-01 23:46:01 +10:00
parent 913546593d
commit e005e03089
4 changed files with 15 additions and 8 deletions

View File

@ -41,6 +41,7 @@ Cursor::Cursor(DragonsEngine *vm): _vm(vm), _actor(0), _x(0), _y(0) {
_objectInHandSequenceID = 0;
_cursorActivationSeqOffset = 0;
_iniItemInHand = 0;
_handPointerSequenceID = _vm->getCursorHandPointerSequenceID();
}
void Cursor::init(ActorManager *actorManager, DragonINIResource *dragonINIResource) {
@ -84,22 +85,22 @@ void Cursor::update() {
if (_iniUnderCursor != 0
&& ((_iniUnderCursor & 0x8000 && _vm->_inventory->isOpen())
||(!(_iniUnderCursor & 0x8000) && _vm->getINI(_iniUnderCursor - 1)->flags & 0x80))) {
if (_actor->_sequenceID != 0x84) {
_actor->updateSequence(0x84);
if (_actor->_sequenceID != _handPointerSequenceID) {
_actor->updateSequence(_handPointerSequenceID);
}
return;
}
int32 inventorySequenceID = _vm->_inventory->getSequenceId();
if ((_iniUnderCursor == 0x8001) && (inventorySequenceID == 1)) {
if (_actor->_sequenceID != 0x84) {
_actor->updateSequence(0x84);
if (_actor->_sequenceID != _handPointerSequenceID) {
_actor->updateSequence(_handPointerSequenceID);
}
return;
}
if (_iniUnderCursor == 0x8002 && inventorySequenceID == 4) {//goto LAB_80028204;
if (_actor->_sequenceID != 0x84) {
_actor->updateSequence(0x84);
if (_actor->_sequenceID != _handPointerSequenceID) {
_actor->updateSequence(_handPointerSequenceID);
}
return;
}
@ -125,8 +126,8 @@ void Cursor::update() {
}
if (_iniItemInHand == 0) {
if (_actor->_sequenceID != 0x84) {
_actor->updateSequence(0x84);
if (_actor->_sequenceID != _handPointerSequenceID) {
_actor->updateSequence(_handPointerSequenceID);
}
return;
} else {

View File

@ -43,6 +43,7 @@ public:
int16 _objectInHandSequenceID;
int16 _cursorActivationSeqOffset;
uint16 _iniItemInHand;
uint16 _handPointerSequenceID;
private:
DragonsEngine *_vm;

View File

@ -1805,6 +1805,10 @@ void DragonsEngine::syncSoundSettings() {
_sound->syncSoundSettings();
}
uint16 DragonsEngine::getCursorHandPointerSequenceID() {
return _language == Common::DE_DEU || _language == Common::FR_FRA ? 0x86 : 0x84;
}
void (*DragonsEngine::getSceneUpdateFunction())() {
return _sceneUpdateFunction;
}

View File

@ -358,6 +358,7 @@ public:
uint32 getSpeechTblOffsetFromDragonEXE();
uint32 getCutscenePaletteOffsetFromDragonEXE();
uint32 defaultResponseOffsetFromDragonEXE();
uint16 getCursorHandPointerSequenceID();
private:
bool savegame(const char *filename, const char *description);
bool loadgame(const char *filename);