Skip to content

Commit

Permalink
TSAGE: Changed Ringworld/Blue Force namespaces to be embedded namespa…
Browse files Browse the repository at this point in the history
…ces within tSage
  • Loading branch information
dreammaster committed Aug 15, 2011
1 parent 833c6fd commit 28aef23
Show file tree
Hide file tree
Showing 31 changed files with 178 additions and 66 deletions.
7 changes: 5 additions & 2 deletions engines/tsage/blue_force/blueforce_logic.cpp
Expand Up @@ -27,7 +27,9 @@
#include "tsage/tsage.h"
#include "tsage/staticres.h"

namespace tSage_BlueForce {
namespace tSage {

namespace BlueForce {

void BlueForceGame::start() {
// Start the game
Expand Down Expand Up @@ -246,5 +248,6 @@ void GameScene::remove() {
BF_GLOBALS._scenePalette._field412 = 1;
}

} // End of namespace BlueForce

} // End of namespace tSage_BlueForce
} // End of namespace tSage
7 changes: 5 additions & 2 deletions engines/tsage/blue_force/blueforce_logic.h
Expand Up @@ -31,7 +31,9 @@

#define BF_INTERFACE_Y 168

namespace tSage_BlueForce {
namespace tSage {

namespace BlueForce {

using namespace tSage;

Expand Down Expand Up @@ -88,7 +90,8 @@ class BlueAnimatedSpeaker: public Speaker {
public:
};

} // End of namespace BlueForce

} // End of namespace tSage_BlueForce
} // End of namespace tSage

#endif
7 changes: 5 additions & 2 deletions engines/tsage/blue_force/blueforce_scenes0.cpp
Expand Up @@ -25,7 +25,9 @@
#include "tsage/tsage.h"
#include "tsage/staticres.h"

namespace tSage_BlueForce {
namespace tSage {

namespace BlueForce {

/*--------------------------------------------------------------------------
* Scene 20 - Tsunami Title Screen
Expand Down Expand Up @@ -237,5 +239,6 @@ void Scene50::Tooltip2::dispatch() {

/*--------------------------------------------------------------------------*/

} // End of namespace BlueForce

} // End of namespace tSage_BlueForce
} // End of namespace tSage
8 changes: 6 additions & 2 deletions engines/tsage/blue_force/blueforce_scenes0.h
Expand Up @@ -32,7 +32,9 @@
#include "tsage/globals.h"
#include "tsage/sound.h"

namespace tSage_BlueForce {
namespace tSage {

namespace BlueForce {

using namespace tSage;

Expand Down Expand Up @@ -78,6 +80,8 @@ class Scene50: public SceneExt {

};

} // End of namespace tSage_BlueForce
} // End of namespace BlueForce

} // End of namespace tSage

#endif
8 changes: 6 additions & 2 deletions engines/tsage/blue_force/blueforce_scenes1.cpp
Expand Up @@ -27,7 +27,9 @@
#include "tsage/staticres.h"
#include "tsage/globals.h"

namespace tSage_BlueForce {
namespace tSage {

namespace BlueForce {

/*--------------------------------------------------------------------------
* Scene 100 - Tsunami Title Screen #2
Expand Down Expand Up @@ -416,4 +418,6 @@ void Scene109::signal() {
}
}

} // End of namespace tSage_BlueForce
} // End of namespace BlueForce

} // End of namespace tSage
8 changes: 6 additions & 2 deletions engines/tsage/blue_force/blueforce_scenes1.h
Expand Up @@ -32,7 +32,9 @@
#include "tsage/globals.h"
#include "tsage/sound.h"

namespace tSage_BlueForce {
namespace tSage {

namespace BlueForce {

using namespace tSage;

Expand Down Expand Up @@ -115,6 +117,8 @@ class Scene109: public GameScene {
virtual void signal();
};

} // End of namespace tSage_BlueForce
} // End of namespace BlueForce

} // End of namespace tSage

#endif
16 changes: 8 additions & 8 deletions engines/tsage/globals.cpp
Expand Up @@ -103,15 +103,15 @@ Globals::Globals() : _dialogCenter(160, 140), _gfxManagerInstance(_screenSurface
switch (_vm->getGameID()) {
case GType_Ringworld:
if (!(_vm->getFeatures() & GF_DEMO)) {
_inventory = new tSage_Ringworld::RingworldInvObjectList();
_game = new tSage_Ringworld::RingworldGame();
_inventory = new Ringworld::RingworldInvObjectList();
_game = new Ringworld::RingworldGame();
} else {
_game = new tSage_Ringworld::RingworldDemoGame();
_game = new Ringworld::RingworldDemoGame();
}
break;

case GType_BlueForce:
_game = new tSage_BlueForce::BlueForceGame();
_game = new BlueForce::BlueForceGame();
break;
}
}
Expand Down Expand Up @@ -167,11 +167,9 @@ void Globals::dispatchSounds() {
Common::for_each(_sounds.begin(), _sounds.end(), Globals::dispatchSound);
}

} // end of namespace tSage

/*--------------------------------------------------------------------------*/

namespace tSage_BlueForce {
namespace BlueForce {

BlueForceGlobals::BlueForceGlobals(): Globals() {
_v51C24 = 0;
Expand All @@ -184,4 +182,6 @@ void BlueForceGlobals::synchronize(Serializer &s) {
error("Sync variables");
}

} // end of namespace tSage_BlueForce
} // end of namespace BlueForce

} // end of namespace tSage
7 changes: 4 additions & 3 deletions engines/tsage/globals.h
Expand Up @@ -105,9 +105,8 @@ extern Globals *_globals;
// prior to many of the fields in Globals execute their constructors
extern ResourceManager *_resourceManager;

} // end of namespace tSage

namespace tSage_BlueForce {
namespace BlueForce {

using namespace tSage;

Expand All @@ -127,6 +126,8 @@ class BlueForceGlobals: public Globals {
virtual void synchronize(Serializer &s);
};

} // End of namespace tSage_BlueForce
} // End of namespace BlueForce

} // End of namespace tSage

#endif
8 changes: 6 additions & 2 deletions engines/tsage/ringworld/ringworld_demo.cpp
Expand Up @@ -25,7 +25,9 @@
#include "tsage/tsage.h"
#include "tsage/staticres.h"

namespace tSage_Ringworld {
namespace tSage {

namespace Ringworld {

void RingworldDemoGame::start() {
// Start the demo's single scene
Expand Down Expand Up @@ -117,4 +119,6 @@ void RingworldDemoScene::process(Event &event) {

}

} // End of namespace tSage_Ringworld
} // End of namespace Ringworld

} // End of namespace tSage
8 changes: 6 additions & 2 deletions engines/tsage/ringworld/ringworld_demo.h
Expand Up @@ -30,7 +30,9 @@
#include "tsage/globals.h"
#include "tsage/sound.h"

namespace tSage_Ringworld {
namespace tSage {

namespace Ringworld {

using namespace tSage;

Expand All @@ -56,6 +58,8 @@ class RingworldDemoScene: public Scene {
virtual void signal();
};

} // End of namespace tSage_Ringworld
} // End of namespace Ringworld

} // End of namespace tSage

#endif
8 changes: 6 additions & 2 deletions engines/tsage/ringworld/ringworld_logic.cpp
Expand Up @@ -37,7 +37,9 @@
#include "tsage/ringworld/ringworld_scenes8.h"
#include "tsage/ringworld/ringworld_scenes10.h"

namespace tSage_Ringworld {
namespace tSage {

namespace Ringworld {

Scene *RingworldGame::createScene(int sceneNumber) {
switch (sceneNumber) {
Expand Down Expand Up @@ -1487,4 +1489,6 @@ void RingworldGame::processEvent(Event &event) {
}
}

} // End of namespace tSage_Ringworld
} // End of namespace Ringworld

} // End of namespace tSage
10 changes: 7 additions & 3 deletions engines/tsage/ringworld/ringworld_logic.h
Expand Up @@ -29,7 +29,9 @@
#include "tsage/scenes.h"
#include "tsage/globals.h"

namespace tSage_Ringworld {
namespace tSage {

namespace Ringworld {

using namespace tSage;

Expand Down Expand Up @@ -440,7 +442,7 @@ class RingworldInvObjectList : public InvObjectList {
virtual Common::String getClassName() { return "RingworldInvObjectList"; }
};

#define RING_INVENTORY (*((tSage_Ringworld::RingworldInvObjectList *)_globals->_inventory))
#define RING_INVENTORY (*((::tSage::Ringworld::RingworldInvObjectList *)_globals->_inventory))

class RingworldGame: public Game {
protected:
Expand All @@ -458,6 +460,8 @@ class RingworldGame: public Game {
virtual void processEvent(Event &event);
};

} // End of namespace tSage_Ringworld
} // End of namespace Ringworld

} // End of namespace tSage

#endif
8 changes: 6 additions & 2 deletions engines/tsage/ringworld/ringworld_scenes1.cpp
Expand Up @@ -25,7 +25,9 @@
#include "tsage/tsage.h"
#include "tsage/staticres.h"

namespace tSage_Ringworld {
namespace tSage {

namespace Ringworld {

/*--------------------------------------------------------------------------
* Scene 10 - Kziniti Palace (Introduction)
Expand Down Expand Up @@ -3342,4 +3344,6 @@ void Scene6100::showMessage(const Common::String &msg, int color, Action *action
}
}

} // End of namespace tSage_Ringworld
} // End of namespace Ringworld

} // End of namespace tSage
8 changes: 6 additions & 2 deletions engines/tsage/ringworld/ringworld_scenes1.h
Expand Up @@ -32,7 +32,9 @@
#include "tsage/globals.h"
#include "tsage/sound.h"

namespace tSage_Ringworld {
namespace tSage {

namespace Ringworld {

using namespace tSage;

Expand Down Expand Up @@ -535,6 +537,8 @@ class Scene6100 : public Scene {

};

} // End of namespace tSage_Ringworld
} // End of namespace Ringworld

} // End of namespace tSage

#endif
8 changes: 6 additions & 2 deletions engines/tsage/ringworld/ringworld_scenes10.cpp
Expand Up @@ -26,7 +26,9 @@
#include "tsage/tsage.h"
#include "tsage/staticres.h"

namespace tSage_Ringworld {
namespace tSage {

namespace Ringworld {

Scene2::Scene2() : Scene() {
_sceneState = 0;
Expand Down Expand Up @@ -2086,4 +2088,6 @@ void Scene9999::postInit(SceneObjectList *OwnerList) {

}

} // End of namespace tSage_Ringworld
} // End of namespace Ringworld

} // End of namespace tSage
7 changes: 5 additions & 2 deletions engines/tsage/ringworld/ringworld_scenes10.h
Expand Up @@ -30,7 +30,9 @@
#include "tsage/scenes.h"
#include "tsage/globals.h"

namespace tSage_Ringworld {
namespace tSage {

namespace Ringworld {

using namespace tSage;

Expand Down Expand Up @@ -528,7 +530,8 @@ class Scene9999 : public Scene {
virtual void postInit(SceneObjectList *OwnerList = NULL);
};

} // End of namespace Ringworld

} // End of namespace tSage_Ringworld
} // End of namespace tSage

#endif
8 changes: 6 additions & 2 deletions engines/tsage/ringworld/ringworld_scenes2.cpp
Expand Up @@ -26,7 +26,9 @@
#include "tsage/tsage.h"
#include "tsage/staticres.h"

namespace tSage_Ringworld {
namespace tSage {

namespace Ringworld {

/*--------------------------------------------------------------------------
* Scene 1000 - Title Screen
Expand Down Expand Up @@ -925,4 +927,6 @@ void Scene1500::postInit(SceneObjectList *OwnerList) {
}
}

} // End of namespace tSage_Ringworld
} // End of namespace Ringworld

} // End of namespace tSage
8 changes: 5 additions & 3 deletions engines/tsage/ringworld/ringworld_scenes2.h
Expand Up @@ -30,7 +30,9 @@
#include "tsage/scenes.h"
#include "tsage/globals.h"

namespace tSage_Ringworld {
namespace tSage {

namespace Ringworld {

using namespace tSage;

Expand Down Expand Up @@ -144,8 +146,8 @@ class Scene1500 : public Scene {
virtual void postInit(SceneObjectList *OwnerList = NULL);
};

} // End of namespace Ringworld


} // End of namespace tSage_Ringworld
} // End of namespace tSage

#endif

0 comments on commit 28aef23

Please sign in to comment.