TSAGE: Ringworld - Cleanup: Rename some variables

This commit is contained in:
Strangerke 2011-11-17 01:05:04 +01:00
parent ef2f98953f
commit 7a494ed7cd
6 changed files with 44 additions and 44 deletions

View File

@ -709,7 +709,7 @@ void Scene9360::postInit(SceneObjectList *OwnerList) {
*
*--------------------------------------------------------------------------*/
Scene9400::Scene9400() {
_field1032 = 0;
_hittingAnvil = false;
}
void Scene9400::SceneHotspot7::doAction(int action) {
@ -767,12 +767,12 @@ void Scene9400::signal() {
void Scene9400::dispatch() {
if ((_object1._animateMode == 2) && (_object1._strip == 1) && (_object1._frame == 4)){
if (_field1032 == 0) {
if (_hittingAnvil == false) {
_soundHandler.play(296);
_field1032 = 1;
_hittingAnvil = true;
}
} else {
_field1032 = 0;
_hittingAnvil = false;
}
if (_action == 0) {
if (g_globals->_player._position.y < 120) {
@ -826,7 +826,7 @@ void Scene9400::postInit(SceneObjectList *OwnerList) {
void Scene9400::synchronize(Serializer &s) {
Scene::synchronize(s);
if (s.getVersion() >= 3)
s.syncAsSint16LE(_field1032);
s.syncAsSint16LE(_hittingAnvil);
}
/*--------------------------------------------------------------------------

View File

@ -236,7 +236,7 @@ public:
NamedHotspot _hotspot5;
NamedHotspot _hotspot6;
ASound _soundHandler;
int _field1032;
bool _hittingAnvil;
SceneHotspot7 _hotspot7;
SceneHotspot8 _hotspot8;

View File

@ -1478,7 +1478,7 @@ void Scene4025::Hole::doAction(int action) {
void Scene4025::Peg::synchronize(Serializer &s) {
SceneObject::synchronize(s);
s.syncAsSint16LE(_field88);
s.syncAsSint16LE(_pegId);
s.syncAsSint16LE(_armStrip);
}
@ -1513,35 +1513,35 @@ void Scene4025::postInit(SceneObjectList *OwnerList) {
_pegPtr = _pegPtr2 = NULL;
_peg1.postInit();
_peg1._field88 = 1;
_peg1._pegId = 1;
_peg1.setVisage(4025);
_peg1.setStrip(2);
_peg1.setFrame(1);
_peg1.setPosition(Common::Point(203, 61));
_peg2.postInit();
_peg2._field88 = 4;
_peg2._pegId = 4;
_peg2.setVisage(4025);
_peg2.setStrip(2);
_peg2.setFrame(2);
_peg2.setPosition(Common::Point(195, 57));
_peg3.postInit();
_peg3._field88 = 0;
_peg3._pegId = 0;
_peg3.setVisage(4025);
_peg3.setStrip(2);
_peg3.setFrame(3);
_peg3.setPosition(Common::Point(202, 66));
_peg4.postInit();
_peg4._field88 = 3;
_peg4._pegId = 3;
_peg4.setVisage(4025);
_peg4.setStrip(2);
_peg4.setFrame(4);
_peg4.setPosition(Common::Point(194, 68));
_peg5.postInit();
_peg5._field88 = 2;
_peg5._pegId = 2;
_peg5.setVisage(4025);
_peg5.setStrip(1);
_peg5.setFrame(5);
@ -4311,7 +4311,7 @@ void Scene4301::Action1::signal() {
setDelay(20);
break;
case 21:
scene->_field68E = true;
scene->_puzzleDone = true;
remove();
break;
}
@ -4412,7 +4412,7 @@ void Scene4301::postInit(SceneObjectList *OwnerList) {
Scene::postInit();
setZoomPercents(0, 100, 200, 100);
_field68E = false;
_puzzleDone = false;
RING_INVENTORY._stasisBox2._sceneNumber = 1;
_hotspot4.setDetails(97, 76, 127, 102, 4300, 5, 6);
@ -4432,8 +4432,8 @@ void Scene4301::postInit(SceneObjectList *OwnerList) {
void Scene4301::dispatch() {
if (_action) {
_action->dispatch();
} else if (_field68E) {
_field68E = 0;
} else if (_puzzleDone) {
_puzzleDone = false;
g_globals->clearFlag(50);
g_globals->_sceneManager._fadeMode = FADEMODE_NONE;
g_globals->_sceneManager.setNewScene(4300);

View File

@ -215,10 +215,10 @@ class Scene4025 : public Scene {
};
class Peg : public SceneObject {
public:
int _field88;
int _pegId;
int _armStrip;
Peg() : SceneObject() { _field88 = 0; _armStrip = 3; }
Peg() : SceneObject() { _pegId = 0; _armStrip = 3; }
virtual void synchronize(Serializer &s);
virtual void doAction(int action);
};
@ -682,13 +682,13 @@ public:
SceneObject _hotspot1, _hotspot2, _hotspot3;
Hotspot4 _hotspot4;
Hotspot5 _hotspot5;
bool _field68E;
bool _puzzleDone;
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void dispatch();
virtual void synchronize(Serializer &s) {
Scene::synchronize(s);
s.syncAsSint16LE(_field68E);
s.syncAsSint16LE(_puzzleDone);
}
};

View File

@ -1879,12 +1879,12 @@ void Scene7700::SceneHotspot8::doAction(int action) {
scene->_soundHandler.play(259);
scene->_object15.setFrame(scene->_object15.getFrameCount());
scene->_object15.animate(ANIM_MODE_6, scene);
if ((scene->_field977 == 2) && (scene->_field97B == 0)) {
scene->_field979++;
if ((scene->_seatCountLeft1 == 2) && (scene->_seatCountLeft2 == 0)) {
scene->_seatCountRight++;
} else {
scene->_field97B = 0;
scene->_field979 = 0;
scene->_field977 = 0;
scene->_seatCountLeft2 = 0;
scene->_seatCountRight = 0;
scene->_seatCountLeft1 = 0;
}
break;
default:
@ -1905,26 +1905,26 @@ void Scene7700::SceneHotspot9::doAction(int action) {
scene->_soundHandler.play(259);
scene->_object15.setFrame(1);
scene->_object15.animate(ANIM_MODE_5, scene);
if (scene->_field977 > 2) {
scene->_field97B = 0;
scene->_field979 = 0;
scene->_field977 = 0;
if (scene->_seatCountLeft1 > 2) {
scene->_seatCountLeft2 = 0;
scene->_seatCountRight = 0;
scene->_seatCountLeft1 = 0;
}
if (scene->_field979 != 0) {
if (scene->_field979 != 4) {
scene->_field97B = 0;
scene->_field979 = 0;
scene->_field977 = 0;
if (scene->_seatCountRight != 0) {
if (scene->_seatCountRight != 4) {
scene->_seatCountLeft2 = 0;
scene->_seatCountRight = 0;
scene->_seatCountLeft1 = 0;
} else {
scene->_field97B++;
if (scene->_field97B == 3) {
scene->_seatCountLeft2++;
if (scene->_seatCountLeft2 == 3) {
g_globals->_player.disableControl();
scene->setAction(&scene->_action3);
}
}
} else {
scene->_field977++;
scene->_seatCountLeft1++;
}
break;
default:
@ -2315,9 +2315,9 @@ void Scene7700::postInit(SceneObjectList *OwnerList) {
Scene::postInit();
setZoomPercents(100, 80, 200, 100);
g_globals->setFlag(53);
_field97B = 0;
_field979 = 0;
_field977 = 0;
_seatCountLeft2 = 0;
_seatCountRight = 0;
_seatCountLeft1 = 0;
_stripManager.addSpeaker(&_speakerEText);
_stripManager.addSpeaker(&_speakerQText);
@ -2538,9 +2538,9 @@ Scene7700::Scene7700() {
void Scene7700::synchronize(Serializer &s) {
Scene::synchronize(s);
if (s.getVersion() >= 3) {
s.syncAsSint16LE(_field977);
s.syncAsSint16LE(_field979);
s.syncAsSint16LE(_field97B);
s.syncAsSint16LE(_seatCountLeft1);
s.syncAsSint16LE(_seatCountRight);
s.syncAsSint16LE(_seatCountLeft2);
}
}

View File

@ -480,7 +480,7 @@ public:
SceneHotspot11 _sceneHotspot34;
SceneHotspot11 _sceneHotspot35;
SceneHotspot11 _sceneHotspot36;
int _field977, _field979, _field97B;
int _seatCountLeft1, _seatCountRight, _seatCountLeft2;
Scene7700();
virtual void postInit(SceneObjectList *OwnerList = NULL);