TSAGE: Some renaming in Scene250

This commit is contained in:
Strangerke 2013-08-31 18:22:14 +02:00
parent 74cc4aec8a
commit dfeb802602
2 changed files with 22 additions and 22 deletions

View File

@ -2504,7 +2504,7 @@ bool Scene250::Button::startAction(CursorType action, Event &event) {
switch (action) {
case CURSOR_USE:
if (scene->_field414) {
if (scene->_destButtonY) {
SceneItem::display2(250, 15);
} else {
switch (_floorNumber) {
@ -2580,14 +2580,14 @@ void Scene250::Button::setFloor(int floorNumber) {
/*--------------------------------------------------------------------------*/
Scene250::Scene250(): SceneExt() {
_field412 = _field414 = _field416 = _field418 = _field41A = 0;
_currButtonY = _destButtonY = _field416 = _field418 = _field41A = 0;
}
void Scene250::synchronize(Serializer &s) {
SceneExt::synchronize(s);
s.syncAsSint16LE(_field412);
s.syncAsSint16LE(_field414);
s.syncAsSint16LE(_currButtonY);
s.syncAsSint16LE(_destButtonY);
s.syncAsSint16LE(_field416);
s.syncAsSint16LE(_field418);
s.syncAsSint16LE(_field41A);
@ -2632,24 +2632,24 @@ void Scene250::postInit(SceneObjectList *OwnerList) {
switch (R2_GLOBALS._sceneManager._previousScene) {
case 200:
_field412 = 55;
_currButtonY = 55;
break;
case 300:
_field412 = 43;
_currButtonY = 43;
break;
case 700:
_field412 = 139;
_currButtonY = 139;
break;
case 850:
_field412 = 91;
_currButtonY = 91;
break;
default:
R2_GLOBALS._sceneManager._previousScene = 200;
_field412 = 55;
_currButtonY = 55;
break;
}
_currentFloor.setPosition(Common::Point(111, _field412));
_currentFloor.setPosition(Common::Point(111, _currButtonY));
}
void Scene250::signal() {
@ -2668,16 +2668,16 @@ void Scene250::signal() {
_sceneMode = 2;
break;
case 2:
_sceneMode = ((_field414 - 12) == _field412) ? 4 : 3;
_sceneMode = ((_destButtonY - 12) == _currButtonY) ? 4 : 3;
signal();
break;
case 3:
_currentFloor.setPosition(Common::Point(111, _currentFloor._position.y + 12));
_field412 += 12;
_currButtonY += 12;
R2_GLOBALS._player.setPosition(Common::Point(261, 185));
ADD_MOVER(R2_GLOBALS._player, 261, 15);
if ((_field414 - 12) == _field412)
if ((_destButtonY - 12) == _currButtonY)
_sceneMode = 4;
break;
case 4:
@ -2704,7 +2704,7 @@ void Scene250::signal() {
break;
case 7:
_field418 = 1;
if ((_field414 + 12) == _field412)
if ((_destButtonY + 12) == _currButtonY)
_sceneMode = 9;
else
_sceneMode = 8;
@ -2712,11 +2712,11 @@ void Scene250::signal() {
break;
case 8:
_currentFloor.setPosition(Common::Point(111, _currentFloor._position.y - 12));
_field412 -= 12;
_currButtonY -= 12;
R2_GLOBALS._player.setPosition(Common::Point(261, 15));
ADD_MOVER(R2_GLOBALS._player, 261, 185);
if ((_field414 + 12) == _field412)
if ((_destButtonY + 12) == _currButtonY)
_sceneMode = 9;
break;
case 9:
@ -2732,7 +2732,7 @@ void Scene250::signal() {
break;
case 20:
// Handle changing scene
switch (_field414) {
switch (_destButtonY) {
case 55:
R2_GLOBALS._sceneManager.changeScene(200);
break;
@ -2755,12 +2755,12 @@ void Scene250::signal() {
}
void Scene250::changeFloor(int floorNumber) {
_field414 = (floorNumber - 1) * 12 + 43;
_button1.setPosition(Common::Point(111, _field414));
_destButtonY = (floorNumber - 1) * 12 + 43;
_button1.setPosition(Common::Point(111, _destButtonY));
_button1.show();
_sceneMode = (_field412 >= _field414) ? 6 : 1;
if (_field414 == _field412)
_sceneMode = (_currButtonY >= _destButtonY) ? 6 : 1;
if (_destButtonY == _currButtonY)
_sceneMode = 20;
signal();

View File

@ -318,7 +318,7 @@ class Scene250: public SceneExt {
virtual bool startAction(CursorType action, Event &event);
};
public:
int _field412, _field414, _field416, _field418, _field41A;
int _currButtonY, _destButtonY, _field416, _field418, _field41A;
NamedHotspot _background, _item2, _item3, _item4;
Button _button1, _currentFloor;
Button _floor1, _floor2, _floor3, _floor4, _floor5;