Constants for easy/normal/ultra/mega default multipliers
Multiplier example for scenarios Version number is only shown with build date and so on for dev versions
This commit is contained in:
parent
1ff84eaddb
commit
ebcadc13f0
|
@ -113,6 +113,12 @@ public:
|
||||||
static const char *path_logs_CacheLookupKey;
|
static const char *path_logs_CacheLookupKey;
|
||||||
|
|
||||||
static const char *application_name;
|
static const char *application_name;
|
||||||
|
|
||||||
|
static const float normalMultiplier= 1.0f;
|
||||||
|
static const float easyMultiplier= 0.8f;
|
||||||
|
static const float ultraMultiplier= 3.0f;
|
||||||
|
static const float megaMultiplier= 4.0f;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
enum PathType {
|
enum PathType {
|
||||||
|
|
|
@ -927,26 +927,26 @@ void MenuStateCustomGame::updateAllResourceMultiplier() {
|
||||||
void MenuStateCustomGame::updateResourceMultiplier(const int index) {
|
void MenuStateCustomGame::updateResourceMultiplier(const int index) {
|
||||||
ControlType ct= static_cast<ControlType>(listBoxControls[index].getSelectedItemIndex());
|
ControlType ct= static_cast<ControlType>(listBoxControls[index].getSelectedItemIndex());
|
||||||
if(ct == ctHuman || ct == ctNetwork || ct == ctClosed) {
|
if(ct == ctHuman || ct == ctNetwork || ct == ctClosed) {
|
||||||
listBoxRMultiplier[index].setSelectedItemIndex(5);
|
listBoxRMultiplier[index].setSelectedItemIndex((GameConstants::normalMultiplier-0.5f)*10);
|
||||||
listBoxRMultiplier[index].setEnabled(false);
|
listBoxRMultiplier[index].setEnabled(false);
|
||||||
}
|
}
|
||||||
else if(ct == ctCpuEasy || ct == ctNetworkCpuEasy)
|
else if(ct == ctCpuEasy || ct == ctNetworkCpuEasy)
|
||||||
{
|
{
|
||||||
listBoxRMultiplier[index].setSelectedItemIndex(3);
|
listBoxRMultiplier[index].setSelectedItemIndex((GameConstants::easyMultiplier-0.5f)*10);
|
||||||
listBoxRMultiplier[index].setEnabled(true);
|
listBoxRMultiplier[index].setEnabled(true);
|
||||||
}
|
}
|
||||||
else if(ct == ctCpu || ct == ctNetworkCpu) {
|
else if(ct == ctCpu || ct == ctNetworkCpu) {
|
||||||
listBoxRMultiplier[index].setSelectedItemIndex(5);
|
listBoxRMultiplier[index].setSelectedItemIndex((GameConstants::normalMultiplier-0.5f)*10);
|
||||||
listBoxRMultiplier[index].setEnabled(true);
|
listBoxRMultiplier[index].setEnabled(true);
|
||||||
}
|
}
|
||||||
else if(ct == ctCpuUltra || ct == ctNetworkCpuUltra)
|
else if(ct == ctCpuUltra || ct == ctNetworkCpuUltra)
|
||||||
{
|
{
|
||||||
listBoxRMultiplier[index].setSelectedItemIndex(25);
|
listBoxRMultiplier[index].setSelectedItemIndex((GameConstants::ultraMultiplier-0.5f)*10);
|
||||||
listBoxRMultiplier[index].setEnabled(true);
|
listBoxRMultiplier[index].setEnabled(true);
|
||||||
}
|
}
|
||||||
else if(ct == ctCpuMega || ct == ctNetworkCpuMega)
|
else if(ct == ctCpuMega || ct == ctNetworkCpuMega)
|
||||||
{
|
{
|
||||||
listBoxRMultiplier[index].setSelectedItemIndex(35);
|
listBoxRMultiplier[index].setSelectedItemIndex((GameConstants::megaMultiplier-0.5f)*10);
|
||||||
listBoxRMultiplier[index].setEnabled(true);
|
listBoxRMultiplier[index].setEnabled(true);
|
||||||
}
|
}
|
||||||
listBoxRMultiplier[index].setEditable(listBoxRMultiplier[index].getEnabled());
|
listBoxRMultiplier[index].setEditable(listBoxRMultiplier[index].getEnabled());
|
||||||
|
|
|
@ -58,8 +58,6 @@ MenuStateRoot::MenuStateRoot(Program *program, MainMenu *mainMenu):
|
||||||
i-=40;
|
i-=40;
|
||||||
buttonExit.registerGraphicComponent(containerName,"buttonExit");
|
buttonExit.registerGraphicComponent(containerName,"buttonExit");
|
||||||
buttonExit.init(425, i, 150);
|
buttonExit.init(425, i, 150);
|
||||||
labelVersion.registerGraphicComponent(containerName,"labelVersion");
|
|
||||||
labelVersion.init(405, 420);
|
|
||||||
|
|
||||||
buttonNewGame.setText(lang.get("NewGame"));
|
buttonNewGame.setText(lang.get("NewGame"));
|
||||||
buttonJoinGame.setText(lang.get("JoinGame"));
|
buttonJoinGame.setText(lang.get("JoinGame"));
|
||||||
|
@ -67,8 +65,16 @@ MenuStateRoot::MenuStateRoot(Program *program, MainMenu *mainMenu):
|
||||||
buttonOptions.setText(lang.get("Options"));
|
buttonOptions.setText(lang.get("Options"));
|
||||||
buttonAbout.setText(lang.get("About"));
|
buttonAbout.setText(lang.get("About"));
|
||||||
buttonExit.setText(lang.get("Exit"));
|
buttonExit.setText(lang.get("Exit"));
|
||||||
labelVersion.setText(glestVersionString + " [" + getCompileDateTime() + ", " + getSVNRevisionString() + "]");
|
|
||||||
|
|
||||||
|
labelVersion.registerGraphicComponent(containerName,"labelVersion");
|
||||||
|
if(EndsWith(glestVersionString, "-dev") == false){
|
||||||
|
labelVersion.init(525, 420);
|
||||||
|
labelVersion.setText(glestVersionString);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
labelVersion.init(405, 420);
|
||||||
|
labelVersion.setText(glestVersionString + " [" + getCompileDateTime() + ", " + getSVNRevisionString() + "]");
|
||||||
|
}
|
||||||
//mesage box
|
//mesage box
|
||||||
mainMessageBox.registerGraphicComponent(containerName,"mainMessageBox");
|
mainMessageBox.registerGraphicComponent(containerName,"mainMessageBox");
|
||||||
mainMessageBox.init(lang.get("Yes"), lang.get("No"));
|
mainMessageBox.init(lang.get("Yes"), lang.get("No"));
|
||||||
|
|
|
@ -215,18 +215,18 @@ void MenuStateScenario::loadScenarioInfo(string file, ScenarioInfo *scenarioInfo
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{// if no multiplier exists use defaults
|
{// if no multiplier exists use defaults
|
||||||
scenarioInfo->resourceMultipliers[i]=1.0f;
|
scenarioInfo->resourceMultipliers[i]=GameConstants::normalMultiplier;
|
||||||
if(factionControl==ctCpuEasy)
|
if(factionControl==ctCpuEasy)
|
||||||
{
|
{
|
||||||
scenarioInfo->resourceMultipliers[i]=0.8f;
|
scenarioInfo->resourceMultipliers[i]=GameConstants::easyMultiplier;
|
||||||
}
|
}
|
||||||
if(factionControl==ctCpuUltra)
|
if(factionControl==ctCpuUltra)
|
||||||
{
|
{
|
||||||
scenarioInfo->resourceMultipliers[i]=2.0f;
|
scenarioInfo->resourceMultipliers[i]=GameConstants::ultraMultiplier;
|
||||||
}
|
}
|
||||||
else if(factionControl==ctCpuMega)
|
else if(factionControl==ctCpuMega)
|
||||||
{
|
{
|
||||||
scenarioInfo->resourceMultipliers[i]=3.5f;
|
scenarioInfo->resourceMultipliers[i]=GameConstants::megaMultiplier;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user