MADS: Fix loading of V2 hotspots
This commit is contained in:
parent
c5878e401c
commit
d88e165e00
4 changed files with 13 additions and 27 deletions
|
@ -182,13 +182,13 @@ Hotspot::Hotspot(Common::SeekableReadStream &f, bool isV2) {
|
|||
_articleNumber = f.readByte();
|
||||
_active = f.readByte() != 0;
|
||||
_cursor = (CursorType)f.readByte();
|
||||
_vocabId = f.readUint16LE();
|
||||
_verbId = f.readUint16LE();
|
||||
if (isV2) {
|
||||
// This looks to be some sort of bitmask. Perhaps it signifies
|
||||
// the valid verbs for this hotspot
|
||||
f.skip(2); // unknown
|
||||
}
|
||||
_vocabId = f.readUint16LE();
|
||||
_verbId = f.readUint16LE();
|
||||
}
|
||||
|
||||
/*------------------------------------------------------------------------*/
|
||||
|
|
|
@ -477,25 +477,14 @@ void Scene::drawElements(ScreenTransition transitionType, bool surfaceFlag) {
|
|||
// Copy background for the dirty areas to the screen
|
||||
_dirtyAreas.copy(&_backgroundSurface, &_vm->_screen, _posAdjust);
|
||||
|
||||
// TODO: Remove this HACK when sprites are implemented for V2 games
|
||||
if (_vm->getGameID() != GType_RexNebular) {
|
||||
if (transitionType) {
|
||||
// Fading in the screen
|
||||
_vm->_screen.transition(transitionType, surfaceFlag);
|
||||
_vm->_sound->startQueuedCommands();
|
||||
} else {
|
||||
// Copy dirty areas to the screen
|
||||
_dirtyAreas.copyToScreen(_vm->_screen._offset);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
// Handle dirty areas for foreground objects
|
||||
if (_vm->getGameID() == GType_RexNebular) // TODO: Implement for V2 games
|
||||
_spriteSlots.setDirtyAreas();
|
||||
_textDisplay.setDirtyAreas2();
|
||||
_dirtyAreas.merge(1, DIRTY_AREAS_SIZE);
|
||||
|
||||
// Draw sprites that have changed
|
||||
if (_vm->getGameID() == GType_RexNebular) // TODO: Implement for V2 games
|
||||
_spriteSlots.drawSprites(&_vm->_screen);
|
||||
|
||||
// Draw text elements onto the view
|
||||
|
|
|
@ -259,7 +259,7 @@ ScreenObjects::ScreenObjects(MADSEngine *vm) : _vm(vm) {
|
|||
}
|
||||
|
||||
void ScreenObjects::add(const Common::Rect &bounds, Layer layer, ScrCategory category, int descId) {
|
||||
assert(size() < 100);
|
||||
//assert(size() < 100);
|
||||
|
||||
ScreenObject so;
|
||||
so._bounds = bounds;
|
||||
|
|
|
@ -704,8 +704,6 @@ void UserInterface::loadElements() {
|
|||
CAT_INV_ANIM, 0);
|
||||
}
|
||||
|
||||
// TODO: Implement for V2 games
|
||||
if (_vm->getGameID() == GType_RexNebular) {
|
||||
if (_vm->_game->_screenObjects._inputMode == kInputBuildingSentences ||
|
||||
_vm->_game->_screenObjects._inputMode == kInputLimitedSentences) {
|
||||
_categoryIndexes[CAT_HOTSPOT - 1] = _vm->_game->_screenObjects.size() + 1;
|
||||
|
@ -714,7 +712,6 @@ void UserInterface::loadElements() {
|
|||
_vm->_game->_screenObjects.add(hs._bounds, LAYER_GUI, CAT_HOTSPOT, hotspotIdx);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (_vm->_game->_screenObjects._inputMode == kInputConversation) {
|
||||
// setup areas for talk entries
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue