SqAtx / SuperMarioWorld

An amazing 2D Mario game made with C++ and SFML
GNU General Public License v2.0
18 stars 11 forks source link

Notes for refactoring #4

Closed SqAtx closed 9 years ago

SqAtx commented 9 years ago

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.

SqAtx commented 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.

SqAtx commented 9 years ago

All refactored !