As I will try to pull via git what I have done so far with the code, let me summarize what's done ; I don't understand every inch of OD code so far so some help and discussion welcome
I try switching from typedef std::map<std::pair<int, int> , Tile*> TileMap_t; --> Tile** , when it would become C -style 2d array allocated dynamiclly .
Basicly we have something like @@GameEntity.h
//! \brief Function that implements code for the removal from the map
virtual void deleteYourself ();
Now as the Tiles are no longer keep in the stl::map container ; we need to rethink the lifecycle of the Tile.
I don't understand why is there need for Tile delete in the Gameplay , nor why it is not Update of and object ( like say , Tile might be reclaimed , lost it's Room on top of it , have removed the Ground etc. ) . So far the method looks like :
case RenderRequest::deleteTile:
{
Tile* curTile = static_cast<Tile*> (renderRequest.p);
delete curTile;
break;
}
Which of course does not suite new code , it might be something like :
case RenderRequest::deleteTile:
{
Tile* curTile = static_cast<Tile*> (renderRequest.p);
~curTile();
break;
}
and destructor might set to something ... yeah , what ? Is there a need of some subtype of Tile, say NULL_TILE ?
How does the Render in the old code handles the cases where are no apropriate Tile in stl::map for x, y positon ? Is it some Rock Tile or some other default one ?
That;s all for now ....