PRINCE: LMB outside of inventory - update
This commit is contained in:
parent
11d062f2b2
commit
a319f473f6
3 changed files with 28 additions and 1 deletions
|
@ -1685,8 +1685,11 @@ void PrinceEngine::drawInvItems() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void PrinceEngine::leftMouseButton() {
|
void PrinceEngine::leftMouseButton() {
|
||||||
|
int option = 0;
|
||||||
|
|
||||||
if (_optionsFlag) {
|
if (_optionsFlag) {
|
||||||
if (_optionEnabled < _optionsNumber) {
|
if (_optionEnabled < _optionsNumber) {
|
||||||
|
option = _optionEnabled;
|
||||||
_optionsFlag = 0;
|
_optionsFlag = 0;
|
||||||
// edi = optionsMob
|
// edi = optionsMob
|
||||||
// ebp = optionsMobNumber
|
// ebp = optionsMobNumber
|
||||||
|
@ -1701,12 +1704,31 @@ void PrinceEngine::leftMouseButton() {
|
||||||
// @@walkto - TODO
|
// @@walkto - TODO
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
option = 0;
|
||||||
}
|
}
|
||||||
//do_option
|
//do_option
|
||||||
// selectedMob = optionsMobNumber
|
// selectedMob = optionsMobNumber
|
||||||
if (_currentPointerNumber != 2) {
|
if (_currentPointerNumber != 2) {
|
||||||
//skip_use_code
|
//skip_use_code
|
||||||
|
int optionScriptOffset = _script->getOptionScript(_room->_walkTo, option);
|
||||||
|
int optionEvent;
|
||||||
|
if (optionScriptOffset != 0) {
|
||||||
|
optionEvent = _script->scanMobEvents(_optionsMob, optionScriptOffset);
|
||||||
|
} else {
|
||||||
|
optionEvent = -1;
|
||||||
|
}
|
||||||
|
if (optionEvent == -1) {
|
||||||
|
if (option == 0) {
|
||||||
|
//@@walkto - TODO
|
||||||
|
return;
|
||||||
|
} else {
|
||||||
|
optionEvent = _script->getOptionScript(_script->_scriptInfo.stdExamine, option - 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// eax <- return (int)READ_UINT16(&_data[optionEvent]);
|
||||||
|
// store_new_pc:
|
||||||
|
// storeNewPC();
|
||||||
|
return;
|
||||||
} else if (_selectedMode != 0) {
|
} else if (_selectedMode != 0) {
|
||||||
//give_item
|
//give_item
|
||||||
|
|
||||||
|
|
|
@ -205,6 +205,10 @@ uint8 *Script::getRoomOffset(int locationNr) {
|
||||||
return &_data[_scriptInfo.rooms + locationNr * 64];
|
return &_data[_scriptInfo.rooms + locationNr * 64];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int Script::getOptionScript(int offset, int option) {
|
||||||
|
return (int)READ_UINT16(&_data[offset + option * 4]);
|
||||||
|
}
|
||||||
|
|
||||||
int Script::scanMobEvents(int mobMask, int dataEventOffset) {
|
int Script::scanMobEvents(int mobMask, int dataEventOffset) {
|
||||||
debug("mobMask: %d", mobMask);
|
debug("mobMask: %d", mobMask);
|
||||||
int i = 0;
|
int i = 0;
|
||||||
|
|
|
@ -135,6 +135,7 @@ public:
|
||||||
int16 getLightY(int locationNr);
|
int16 getLightY(int locationNr);
|
||||||
int32 getShadowScale(int locationNr);
|
int32 getShadowScale(int locationNr);
|
||||||
uint8 *getRoomOffset(int locationNr);
|
uint8 *getRoomOffset(int locationNr);
|
||||||
|
int32 getOptionScript(int offset, int option);
|
||||||
void installBackAnims(Common::Array<BackgroundAnim> &_backanimList, int offset);
|
void installBackAnims(Common::Array<BackgroundAnim> &_backanimList, int offset);
|
||||||
void installSingleBackAnim(Common::Array<BackgroundAnim> &_backanimList, int offset);
|
void installSingleBackAnim(Common::Array<BackgroundAnim> &_backanimList, int offset);
|
||||||
bool loadAllMasks(Common::Array<Mask> &maskList, int offset);
|
bool loadAllMasks(Common::Array<Mask> &maskList, int offset);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue