Closed SqAtx closed 9 years ago
A std::vector of characters is not the perfect solution: memory needs to be freed when a character dies.
Also, do something with m_listForegroundItems when a character dies: it looks like when Mario dies he's still here, just below the level.
All refactored !
Remove m_listFloorTileNames in GraphicsEngine Adapt foreground import in GameEngine: the name of a floor sprite will be "floor_foo" and the name of a foreground sprite will be "item_foo"
Remove m_mario and m_initMarioPos in GameEngine, and replace that by a std::vector<usigned int, MovingObject> m_listCharacters Fill this list when importing XML Change g accordingly, replacing UpdateMarioPosition by UpdateCharPosition and so on.