mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-21 19:51:49 +00:00
PETKA: renamed unk field in QSystem
This commit is contained in:
parent
e75ee3f5f2
commit
7e41be4877
@ -137,7 +137,7 @@ void QObjectBG::setEntrance(const Common::String &name) {
|
||||
sys->getChapay()->setPos(Common::Point(entrance->_walkX, entrance->_walkY - 2), false);
|
||||
|
||||
sys->_xOffset = CLIP<int32>(entrance->_walkX - 320, 0, sys->_sceneWidth - 640);
|
||||
sys->_field6C = sys->_xOffset;
|
||||
sys->_reqOffset = sys->_xOffset;
|
||||
}
|
||||
g_vm->videoSystem()->makeAllDirty();
|
||||
}
|
||||
|
@ -43,7 +43,7 @@ namespace Petka {
|
||||
|
||||
QSystem::QSystem(PetkaEngine &vm)
|
||||
: _vm(vm), _mainInterface(nullptr), _currInterface(nullptr), _prevInterface(nullptr),
|
||||
_totalInit(false), _sceneWidth(640), _room(nullptr) {}
|
||||
_totalInit(false), _sceneWidth(640), _room(nullptr), _xOffset(0), _reqOffset(0) {}
|
||||
|
||||
QSystem::~QSystem() {
|
||||
for (uint i = 0; i < _allObjects.size(); ++i) {
|
||||
|
@ -104,8 +104,7 @@ public:
|
||||
|
||||
int _sceneWidth;
|
||||
int _xOffset;
|
||||
|
||||
int _field6C;
|
||||
int _reqOffset;
|
||||
|
||||
QObjectBG *_room;
|
||||
};
|
||||
|
@ -52,14 +52,14 @@ void VideoSystem::update() {
|
||||
if (interface) {
|
||||
if (sys->_currInterface == sys->_mainInterface.get()) {
|
||||
int xOff = sys->_xOffset;
|
||||
int field6C = sys->_field6C;
|
||||
if (xOff != field6C && ((xOff != sys->_sceneWidth - 640 && xOff < field6C ) || (xOff > 0 && xOff > field6C))) {
|
||||
if (xOff <= field6C) {
|
||||
int reqOffset = sys->_reqOffset;
|
||||
if (xOff != reqOffset && ((xOff != sys->_sceneWidth - 640 && xOff < reqOffset) || (xOff > 0 && xOff > reqOffset))) {
|
||||
if (xOff <= reqOffset) {
|
||||
xOff += 8;
|
||||
xOff = MIN<int>(xOff, field6C);
|
||||
xOff = MIN<int>(xOff, reqOffset);
|
||||
} else {
|
||||
xOff -= 8;
|
||||
xOff = MAX<int>(xOff, field6C);
|
||||
xOff = MAX<int>(xOff, reqOffset);
|
||||
}
|
||||
sys->_xOffset = CLIP(xOff, 0, sys->_sceneWidth - 640);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user