if (bloodtoggle == 0) setText(2, "Blood: Off");
if (bloodtoggle == 1) setText(2, "Blood: On, low detail");
if (bloodtoggle == 2) setText(2, "Blood: On, high detail (slower)");
if (bloodtoggle == 0) setText(2, "Blood: Off");
if (bloodtoggle == 1) setText(2, "Blood: On, low detail");
if (bloodtoggle == 2) setText(2, "Blood: On, high detail (slower)");
- if (difficulty == 0) setText(3, "Difficulty: Easier");
- if (difficulty == 1) setText(3, "Difficulty: Difficult");
- if (difficulty == 2) setText(3, "Difficulty: Insane");
setText(4, ismotionblur ? "Blur Effects: Enabled (less compatible)" : "Blur Effects: Disabled (more compatible)");
setText(5, decals ? "Decals: Enabled (slower)" : "Decals: Disabled");
setText(6, musictoggle ? "Music: Enabled" : "Music: Disabled");
setText(4, ismotionblur ? "Blur Effects: Enabled (less compatible)" : "Blur Effects: Disabled (more compatible)");
setText(5, decals ? "Decals: Enabled (slower)" : "Decals: Disabled");
setText(6, musictoggle ? "Music: Enabled" : "Music: Disabled");
setText(6, (string)"Draw: " + (keyselect == 6 ? "_" : Input::keyToChar(drawkey)));
setText(7, (string)"Throw: " + (keyselect == 7 ? "_" : Input::keyToChar(throwkey)));
setText(8, (string)"Attack: " + (keyselect == 8 ? "_" : Input::keyToChar(attackkey)));
setText(6, (string)"Draw: " + (keyselect == 6 ? "_" : Input::keyToChar(drawkey)));
setText(7, (string)"Throw: " + (keyselect == 7 ? "_" : Input::keyToChar(throwkey)));
setText(8, (string)"Attack: " + (keyselect == 8 ? "_" : Input::keyToChar(attackkey)));
addButton(14, "", 10 + 400, 440);
addButton( 1, "", 10 + 60, 405);
addButton( 2, "", 10 + 70, 370);
addButton(14, "", 10 + 400, 440);
addButton( 1, "", 10 + 60, 405);
addButton( 2, "", 10 + 70, 370);
addButton( 4, "", 10 , 335);
addButton( 5, "", 10 + 60, 300);
addButton( 6, "", 10 + 70, 265);
addButton( 4, "", 10 , 335);
addButton( 5, "", 10 + 60, 300);
addButton( 6, "", 10 + 70, 265);
addButton(6, "", 10 + 40, 160);
addButton(7, "", 10 + 30, 120);
addButton(8, "", 10 + 20, 80);
addButton(6, "", 10 + 40, 160);
addButton(7, "", 10 + 30, 120);
addButton(8, "", 10 + 20, 80);
addButton(9, "", 10 + 10, 40);
}
addButton(9, "", 10 + 10, 40);
}
- addButton(debugmode ? 10 : 9, "Back", 10, 10);
+ addButton(devtools ? 10 : 9, "Back", 10, 10);
- addLabel(-1, accountactive->getName(), 5, 400);
+ addLabel(-1, Account::active().getName(), 5, 400);
addButton(1, "Tutorial", 5, 300);
addButton(2, "Challenge", 5, 240);
addButton(3, "Delete User", 400, 10);
addButton(4, "Main Menu", 5, 10);
addButton(5, "Change User", 5, 180);
addButton(1, "Tutorial", 5, 300);
addButton(2, "Challenge", 5, 240);
addButton(3, "Delete User", 400, 10);
addButton(4, "Main Menu", 5, 10);
addButton(5, "Change User", 5, 180);
- addButton(6, "Campaign : " + accountactive->getCurrentCampaign(), 200, 420);
+ addButton(6, "Campaign : " + Account::active().getCurrentCampaign(), 200, 420);
//show campaign map
//with (2,-5) offset from old code
addImage(-1, Mainmenuitems[7], 150 + 2, 60 - 5, 400, 400);
//show levels
//show campaign map
//with (2,-5) offset from old code
addImage(-1, Mainmenuitems[7], 150 + 2, 60 - 5, 400, 400);
//show levels
numlevels += numlevels > 0 ? campaignlevels[numlevels - 1].nextlevel.size() : 1;
for (int i = 0; i < numlevels; i++) {
XYZ midpoint = campaignlevels[i].getCenter();
float itemsize = campaignlevels[i].getWidth();
numlevels += numlevels > 0 ? campaignlevels[numlevels - 1].nextlevel.size() : 1;
for (int i = 0; i < numlevels; i++) {
XYZ midpoint = campaignlevels[i].getCenter();
float itemsize = campaignlevels[i].getWidth();
addLabel(0, "No More Users", 10, 400);
addLabel(-2, "", 20, 400);
addButton(Account::getNbAccounts() + 1, "Back", 10, 10);
addLabel(0, "No More Users", 10, 400);
addLabel(-2, "", 20, 400);
addButton(Account::getNbAccounts() + 1, "Back", 10, 10);
- for (int i = 0; i < Account::getNbAccounts(); i++)
- addButton(i + 1, Account::get(i)->getName(), 10, 340 - 20 * (i + 1));
+ for (int i = 0; i < Account::getNbAccounts(); i++) {
+ addButton(i + 1, Account::get(i).getName(), 10, 340 - 20 * (i + 1));
+ }
break;
case 8:
addButton(0, "Easier", 10, 400);
break;
case 8:
addButton(0, "Easier", 10, 400);
- addButton(i, name, 10, 400 - i * 25, i > accountactive->getProgress() ? 0.5 : 1, 0, 0);
+ addButton(i, name, 10, 400 - i * 25, i > Account::active().getProgress() ? 0.5 : 1, 0, 0);
}
addButton(-1, " High Score Best Time", 10, 440);
}
addButton(-1, " High Score Best Time", 10, 440);
addLabel(1, "You have avenged your family and", 140, 300);
addLabel(2, "restored peace to the island of Lugaru.", 110, 270);
addButton(3, "Back", 10, 10);
addLabel(1, "You have avenged your family and", 140, 300);
addLabel(2, "restored peace to the island of Lugaru.", 110, 270);
addButton(3, "Back", 10, 10);
- addLabel(4, string("Your score: ") + to_string((int)accountactive->getCampaignScore()), 190, 200);
- addLabel(5, string("Highest score: ") + to_string((int)accountactive->getCampaignHighScore()), 190, 180);
+ addLabel(4, string("Your score: ") + to_string((int)Account::active().getCampaignScore()), 190, 200);
+ addLabel(5, string("Highest score: ") + to_string((int)Account::active().getCampaignHighScore()), 190, 180);
// some specific case where we do something even if the left mouse button is not pressed.
if ((mainmenu == 5) && (endgame == 2)) {
// some specific case where we do something even if the left mouse button is not pressed.
if ((mainmenu == 5) && (endgame == 2)) {
- whichchoice = selected - NB_CAMPAIGN_MENU_ITEM - accountactive->getCampaignChoicesMade();
- actuallevel = (accountactive->getCampaignChoicesMade() > 0 ? campaignlevels[accountactive->getCampaignChoicesMade() - 1].nextlevel[whichchoice] : 0);
+ whichchoice = selected - NB_CAMPAIGN_MENU_ITEM - Account::active().getCampaignChoicesMade();
+ actuallevel = (Account::active().getCampaignChoicesMade() > 0 ? campaignlevels[Account::active().getCampaignChoicesMade() - 1].nextlevel[whichchoice] : 0);
- if ((c = find(campaigns.begin(), campaigns.end(), accountactive->getCurrentCampaign())) == campaigns.end()) {
+ if ((c = find(campaigns.begin(), campaigns.end(), Account::active().getCurrentCampaign())) == campaigns.end()) {
inputText(displaytext[0], &displayselected);
if (!waiting) { // the input as finished
if (!displaytext[0].empty()) { // with enter
inputText(displaytext[0], &displayselected);
if (!waiting) { // the input as finished
if (!displaytext[0].empty()) { // with enter