mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
SHERLOCK: RT: Stop windows from going off-screen to the right
This commit is contained in:
parent
20a067a662
commit
c2d1369546
@ -246,11 +246,6 @@ public:
|
||||
*/
|
||||
void selectScene();
|
||||
|
||||
/**
|
||||
* Fres all the graphics and other dynamically allocated data for the scene
|
||||
*/
|
||||
void freeScene();
|
||||
|
||||
/**
|
||||
* Check the scene's objects against the game flags. If false is passed,
|
||||
* it means the scene has just been loaded. A value of true means that the scene
|
||||
@ -280,6 +275,11 @@ public:
|
||||
*/
|
||||
int whichZone(const Common::Point &pt);
|
||||
|
||||
/**
|
||||
* Fres all the graphics and other dynamically allocated data for the scene
|
||||
*/
|
||||
virtual void freeScene();
|
||||
|
||||
/**
|
||||
* Returns the index of the closest zone to a given point.
|
||||
*/
|
||||
|
@ -292,6 +292,15 @@ void TattooScene::checkBgShapes() {
|
||||
}
|
||||
}
|
||||
|
||||
void TattooScene::freeScene() {
|
||||
TattooUserInterface &ui = *(TattooUserInterface *)_vm->_ui;
|
||||
Scene::freeScene();
|
||||
|
||||
delete ui._mask;
|
||||
delete ui._mask1;
|
||||
ui._mask = ui._mask1 = nullptr;
|
||||
}
|
||||
|
||||
void TattooScene::doBgAnimCheckCursor() {
|
||||
Events &events = *_vm->_events;
|
||||
TattooUserInterface &ui = *(TattooUserInterface *)_vm->_ui;
|
||||
|
@ -117,6 +117,11 @@ public:
|
||||
*/
|
||||
int getScaleVal(const Point32 &pt);
|
||||
|
||||
/**
|
||||
* Fres all the graphics and other dynamically allocated data for the scene
|
||||
*/
|
||||
virtual void freeScene();
|
||||
|
||||
/**
|
||||
* Draw all objects and characters.
|
||||
*/
|
||||
|
@ -65,6 +65,8 @@ TattooUserInterface::TattooUserInterface(SherlockEngine *vm): UserInterface(vm),
|
||||
|
||||
TattooUserInterface::~TattooUserInterface() {
|
||||
delete _interfaceImages;
|
||||
delete _mask;
|
||||
delete _mask1;
|
||||
}
|
||||
|
||||
void TattooUserInterface::initScrollVars() {
|
||||
|
@ -177,8 +177,8 @@ void WidgetBase::restrictToScreen() {
|
||||
_bounds.moveTo(screen._currentScroll.x, _bounds.top);
|
||||
if (_bounds.top < 0)
|
||||
_bounds.moveTo(_bounds.left, 0);
|
||||
if (_bounds.right > screen._backBuffer1.w())
|
||||
_bounds.moveTo(screen._backBuffer1.w() - _bounds.width(), _bounds.top);
|
||||
if (_bounds.right > (screen._currentScroll.x + SHERLOCK_SCREEN_WIDTH))
|
||||
_bounds.moveTo(screen._currentScroll.x + SHERLOCK_SCREEN_WIDTH - _bounds.width(), _bounds.top);
|
||||
if (_bounds.bottom > screen._backBuffer1.h())
|
||||
_bounds.moveTo(_bounds.left, screen._backBuffer1.h() - _bounds.height());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user