添加模式选择开始菜单并修复中文界面乱码
This commit is contained in:
@@ -11,6 +11,9 @@ bool targetFlag = false;
|
||||
int workRegion[20][10] = { 0 };
|
||||
Point point = { 0, 0 };
|
||||
Point target = { 0, 0 };
|
||||
MenuState menuState = { 0, 2 };
|
||||
int currentScreen = SCREEN_MENU;
|
||||
int currentMode = MODE_CLASSIC;
|
||||
|
||||
int bricks[7][4][4][4] =
|
||||
{
|
||||
@@ -516,3 +519,23 @@ void Restart()
|
||||
|
||||
ComputeTarget();
|
||||
}
|
||||
|
||||
void StartGameWithMode(int mode)
|
||||
{
|
||||
currentMode = mode;
|
||||
currentScreen = SCREEN_PLAYING;
|
||||
Restart();
|
||||
}
|
||||
|
||||
void ReturnToMainMenu()
|
||||
{
|
||||
currentScreen = SCREEN_MENU;
|
||||
suspendFlag = false;
|
||||
gameOverFlag = false;
|
||||
menuState.optionCount = 2;
|
||||
|
||||
if (menuState.selectedIndex < 0 || menuState.selectedIndex >= menuState.optionCount)
|
||||
{
|
||||
menuState.selectedIndex = 0;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user