Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tasks for volunteers
#2
(09-18-2015, 05:46 PM)piotrdz Wrote: 2. Split level loading code from CRobotMain (easy):
  - CRobotMain::CreateScene() should go into dedicated class, for example CLevelLoader
  - each if (line->GetCommand() == "...") should be implemented as lookup in a dictionary containing mapping of: command -> pointer to member function handling this command
This might not be as easy as it sounds because it references loading of saved scenes in a really dirty way (in BeginObject command).
Also, the code for loading saved scenes in split all over the place (some in the UI classes for loading the title for display in the list, some in CPlayerProfile for finding correct level file to load and finally a BeginObject hook in CRobotMain while the level is being loaded)

@EDIT: Actually, I think I already moved it out of UI classes. I'm not sure though.


Messages In This Thread
Tasks for volunteers - by piotrdz - 09-18-2015, 05:46 PM
RE: Tasks for volunteers - by krzys_h - 09-18-2015, 09:04 PM
RE: Tasks for volunteers - by piotrdz - 09-18-2015, 09:29 PM
RE: Tasks for volunteers - by Grunaka - 11-01-2015, 10:46 PM
RE: Tasks for volunteers - by krzys_h - 03-26-2016, 07:24 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)