Added >, <, >=, <= operators to Coordinate. Implemented RectHardpoint.
[asgard.git] / MapObjectFactory.cpp
blob6be6e2d7618d6bddf86a5b080522a2d53ca9a3a3
1 #include "MapObjectFactory.h"
2 #include "GameEngine.h"
3 #include "Tile.h"
4 //#include "Container.h"
5 #include "StaticMapObject.h"
6 #include "NonPlayerCharacter.h"
8 void MapObjectFactory::processRow(void *resultType, int columnCount, char **columnValue, char **columnName)
10 // TODO: Switch on type of result as passed into call back function
11 // TODO: Case for each type of database row result that calls a MapObjectFactory private function
14 void MapObjectFactory::createTile(char **columnValue)
16 // Create new tile
17 Tile *tile;
19 // TODO: Switch on tile type
20 // TODO: Create approprate tile subclass
22 if(tile != NULL)
24 // Get reference to GameEngine
25 GameEngine *gameEngine = GameEngine::getInstance();
27 // Add tile to gameEngine
28 gameEngine->addMapObject((MapObject*)tile);
33 void MapObjectFactory::createContainer(char **columnValue)
35 //Container *container = new Container();
37 // TODO: Add all columnValue data to Container object
39 // Get reference to GameEngine
40 GameEngine *gameEngine = GameEngine::getInstance();
42 // Add container to gameEngine
43 //gameEngine->addMapObject((MapObject*)container);
46 void MapObjectFactory::createNonPlayerCharacter(char **columnValue)
48 //NonPlayerCharacter *npc = new NonPlayerCharacter();
50 // TODO: Add all columnValue data to NonPlayerCharacter object
52 // Get reference to GameEngine
53 GameEngine *gameEngine = GameEngine::getInstance();
55 // Add container to gameEngine
56 //gameEngine->addMapObject((MapObject*)npc);
59 void MapObjectFactory::createStaticMapObject(char **columnValue)
61 //StaticMapObject staticMapObject = new StaticMapObject();
63 // TODO: Add all columnValue data to NonPlayerCharacter object
65 // Get reference to GameEngine
66 GameEngine *gameEngine = GameEngine::getInstance();
68 // Add container to gameEngine
69 //gameEngine->addMapObject((MapObject*)staticMapObject);