TSAGE: Fix CID 1002385, 1002386, 1002388. Move some code from header to source file

This commit is contained in:
Strangerke 2013-10-27 12:56:19 +01:00
parent 56cf25f9d6
commit d596f4670b
4 changed files with 18 additions and 5 deletions

View File

@ -2033,6 +2033,12 @@ void Scene5300::Hotspot8::doAction(int action) {
Scene5300::Scene5300() :
_hotspot3(0, CURSOR_LOOK, 5300, 3, CURSOR_USE, 5300, 16, LIST_END) {
_field1B0A = 1;
}
void Scene5300::synchronize(Serializer &s) {
Scene::synchronize(s);
s.syncAsSint16LE(_field1B0A);
}
void Scene5300::postInit(SceneObjectList *OwnerList) {

View File

@ -318,15 +318,14 @@ public:
Hotspot6 _hotspot6;
Hotspot7 _hotspot7;
Hotspot8 _hotspot8;
// Useless variable, but removing it would break the savegames.
int _field1B0A;
Scene5300();
virtual void postInit(SceneObjectList *OwnerList = NULL);
virtual void signal();
virtual void synchronize(Serializer &s) {
Scene::synchronize(s);
s.syncAsSint16LE(_field1B0A);
}
virtual void synchronize(Serializer &s);
};
} // End of namespace Ringworld

View File

@ -30,6 +30,10 @@ namespace TsAGE {
namespace Ringworld {
NamedHotspotMult::NamedHotspotMult() : SceneHotspot() {
_useLineNum = _lookLineNum = 0;
}
void NamedHotspotMult::synchronize(Serializer &s) {
SceneHotspot::synchronize(s);
s.syncAsSint16LE(_useLineNum);
@ -2533,6 +2537,10 @@ Scene7700::Scene7700() {
_object5._state = 0;
_object6._state = 0;
_prof._state = 0;
_seatCountLeft1 = 0;
_seatCountLeft2 = 0;
_seatCountRight = 0;
}
void Scene7700::synchronize(Serializer &s) {

View File

@ -40,7 +40,7 @@ using namespace TsAGE;
class NamedHotspotMult : public SceneHotspot {
public:
int _useLineNum, _lookLineNum;
NamedHotspotMult() : SceneHotspot() {}
NamedHotspotMult();
virtual Common::String getClassName() { return "NamedHotspotMult"; }
virtual void synchronize(Serializer &s);