2006-05-10

Mu Torere, the rest of the story

Step 17.
Not much else to do at this point.

Just add the event handlers for the AI menu items, and code the relevant values into them. The only vit that I would recommend is to use some sort of variance value when coding the OnUpdateXXX() handlers. This way when the user pick a custom AI level-of-effort that is in the neighbourhood of the program's idea of the level, the right menu item is checked. For example;

pCmdUI->SetCheck(abs(((CMuTorereApp*)AfxGetApp())->getAI() - CAILevel::LOW) < CAILevel::EPSILON ? 1 : 0);

I used CAILevel::EPSILON with the value of 3 to determine how close user chosen values had to be.

Step 18.
The registry stuff was much the same as that for the Poggle project. So go to this page to review.

No comments: