?? game.c
字號(hào):
/* Code Body */
/*----------------------------------------------------------------*/
switch (index)
{
#ifdef IS_F1RACE_BASE_GAME
/* under construction !*/
#endif
#ifdef IS_HANOI_BASE_GAME
/* under construction !*/
#endif
#ifdef IS_RICHES_BASE_GAME
GAME_SWITCH(game_riches, Riches_Enter_GFX);
#endif
#ifdef IS_COLORBALL_BASE_GAME
/* under construction !*/
#endif
#ifdef IS_SNAKE_BASE_GAME
/* under construction !*/
#endif
#ifdef IS_SMASH_BASE_GAME
/* under construction !*/
#endif
#ifdef IS_DOLL_BASE_GAME
/* under construction !*/
#endif
#ifdef IS_MAJUNG_BASE_GAME
GAME_SWITCH(game_majung, Majung_Enter_GFX);
#endif
#ifdef IS_COPTER_BASE_GAME
/* under construction !*/
#endif
#ifdef IS_PUZZLE_BASE_GAME
GAME_SWITCH(game_puzzle, mmi_gx_puzzle_enter_gfx);
#endif
#ifdef IS_BLOCK_BASE_GAME
GAME_SWITCH(game_block, mmi_gx_block_enter_gfx);
#endif
#ifdef IS_PANDA_BASE_GAME
/* under construction !*/
#endif
#ifdef IS_STAIR_BASE_GAME
/* under construction !*/
#endif
#ifdef IS_UFO_BASE_GAME
/* under construction !*/
#endif
#ifdef IS_DANCE_BASE_GAME
/* under construction !*/
#endif
#ifdef IS_MAGICSUSHI_BASE_GAME
GAME_SWITCH(game_magicsushi, mmi_gx_magicsushi_enter_gfx);
#endif
#ifdef IS_FRUIT_BASE_GAME
GAME_SWITCH(game_fruit, mmi_gx_fruit_enter_gfx);
#endif
#ifdef IS_VSMJ_BASE_GAME
GAME_SWITCH(game_vsmj, mmi_gx_vsmj_enter_gfx);
#endif
default:
SetLeftSoftkeyFunction(mmi_game_entry_setting_screen, KEY_EVENT_UP);
SetKeyHandler(mmi_game_entry_setting_screen, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
break;
}
}
/*****************************************************************************
* FUNCTION
* mmi_game_highlight_app
* DESCRIPTION
* highlight game app menitem
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
#if defined(__MMI_GAME__)
void mmi_game_highlight_app(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
SetLeftSoftkeyFunction(mmi_game_entry_app_screen, KEY_EVENT_UP);
SetKeyHandler(mmi_game_entry_app_screen, KEY_RIGHT_ARROW, KEY_EVENT_DOWN);
}
#endif /* defined(__MMI_GAME__) */
/*****************************************************************************
* FUNCTION
* mmi_game_entry_app_screen
* DESCRIPTION
* entry game app screen
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
static void mmi_game_entry_app_screen(void)
{
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U8 *guiBuffer;
UI_time t;
U16 menu_str[game_list_count + 1];
U16 menu_img[game_list_count + 1];
U16 index = 0;
/*----------------------------------------------------------------*/
/* Code Body */
/*----------------------------------------------------------------*/
/* str and img +1 for setting */
#ifdef IS_F1RACE_BASE_GAME
/* under construction !*/
/* under construction !*/
#endif /* IS_F1RACE_BASE_GAME */
#ifdef IS_HANOI_BASE_GAME
/* under construction !*/
/* under construction !*/
#endif /* IS_HANOI_BASE_GAME */
#ifdef IS_RICHES_BASE_GAME
menu_str[index] = STR_GX_RICHES_GAME_NAME;
menu_img[index++] = IMG_GX_RICHES_GAME_ICON;
#endif /* IS_RICHES_BASE_GAME */
#ifdef IS_COLORBALL_BASE_GAME
/* under construction !*/
/* under construction !*/
#endif /* IS_COLORBALL_BASE_GAME */
#ifdef IS_SNAKE_BASE_GAME
/* under construction !*/
/* under construction !*/
#endif /* IS_SNAKE_BASE_GAME */
#ifdef IS_SMASH_BASE_GAME
/* under construction !*/
/* under construction !*/
#endif /* IS_SMASH_BASE_GAME */
#ifdef IS_DOLL_BASE_GAME
/* under construction !*/
/* under construction !*/
#endif /* IS_DOLL_BASE_GAME */
#ifdef IS_MAJUNG_BASE_GAME
menu_str[index] = STR_GX_MAJUNG_GAME_NAME;
menu_img[index++] = IMG_GX_MAJUNG_GAME_ICON;
#endif /* IS_MAJUNG_BASE_GAME */
#ifdef IS_COPTER_BASE_GAME
/* under construction !*/
#if defined(__MMI_GAME_COPTER_128x128__) || defined(__MMI_GAME_COPTER_128x160__) || defined(__MMI_GAME_COPTER_176x220__)
/* under construction !*/
/* under construction !*/
/* under construction !*/
#elif defined(__MMI_GAME_SUBMARINE_128x128__) || defined(__MMI_GAME_SUBMARINE_128x160__) || defined(__MMI_GAME_SUBMARINE_176x220__)
/* under construction !*/
/* under construction !*/
/* under construction !*/
#elif defined(__MMI_GAME_JET_128x128__) || defined(__MMI_GAME_JET_128x160__) || defined(__MMI_GAME_JET_176x220__)
/* under construction !*/
#endif
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif /* IS_COPTER_BASE_GAME */
#ifdef IS_PUZZLE_BASE_GAME
menu_str[index] = STR_ID_GX_PUZZLE_GAME_NAME;
menu_img[index++] = IMG_ID_GX_PUZZLE_GAME_ICON;
#endif /* IS_PUZZLE_BASE_GAME */
#ifdef IS_BLOCK_BASE_GAME
menu_str[index] = STR_ID_GX_BLOCK_GAME_NAME;
menu_img[index++] = IMG_ID_GX_BLOCK_GAME_ICON;
#endif /* IS_BLOCK_BASE_GAME */
#ifdef IS_PANDA_BASE_GAME
/* under construction !*/
#if defined(__MMI_GAME_PANDA_128x128__) || defined(__MMI_GAME_PANDA_128x160__) || defined(__MMI_GAME_PANDA_176x220__)
/* under construction !*/
/* under construction !*/
/* under construction !*/
#elif defined(__MMI_GAME_MONKEY_128x128__) || defined(__MMI_GAME_MONKEY_128x160__) || defined(__MMI_GAME_MONKEY_176x220__)
/* under construction !*/
#endif
/* under construction !*/
/* under construction !*/
/* under construction !*/
#endif /* IS_PANDA_BASE_GAME */
#ifdef IS_STAIR_BASE_GAME
/* under construction !*/
/* under construction !*/
#if defined(__MMI_GAME_CHICKEN_128x160__) || defined(__MMI_GAME_CHICKEN_128x128__)
/* under construction !*/
/* under construction !*/
/* under construction !*/
#elif defined(__MMI_GAME_ROBOT_176x220__) || defined(__MMI_GAME_ROBOT_128x160__)
/* under construction !*/
/* under construction !*/
#endif
/* under construction !*/
/* under construction !*/
#endif /* IS_STAIR_BASE_GAME */
#ifdef IS_UFO_BASE_GAME
/* under construction !*/
/* under construction !*/
#if defined(__MMI_GAME_UFO_128x160__) || defined(__MMI_GAME_UFO_128x128__) || defined(__MMI_GAME_UFO_176x220__)
/* under construction !*/
/* under construction !*/
/* under construction !*/
/* under construction !*/
#elif defined(__MMI_GAME_AIRFORCE_128x160__) || defined(__MMI_GAME_AIRFORCE_128x128__)
/* under construction !*/
/* under construction !*/
#endif
/* under construction !*/
#endif /* IS_UFO_BASE_GAME */
#ifdef IS_DANCE_BASE_GAME
/* under construction !*/
/* under construction !*/
#endif /* IS_DANCE_BASE_GAME */
#ifdef IS_MAGICSUSHI_BASE_GAME
menu_str[index] = STR_ID_GX_MAGICSUSHI_GAME_NAME;
menu_img[index++] = IMG_ID_GX_MAGICSUSHI_GAME_ICON;
#endif /* IS_MAGICSUSHI_BASE_GAME */
#ifdef IS_FRUIT_BASE_GAME
menu_str[index] = STR_ID_GX_FRUIT_GAME_NAME;
menu_img[index++] = IMG_ID_GX_FRUIT_GAME_ICON;
#endif /* IS_FRUIT_BASE_GAME */
#ifdef IS_VSMJ_BASE_GAME
menu_str[index] = STR_ID_GX_VSMJ_GAME_NAME;
menu_img[index++] = IMG_ID_GX_VSMJ_GAME_ICON;
#endif /* IS_VSMJ_BASE_GAME */
menu_str[index] = STR_ID_GAME_SETTING;
menu_img[index++] = IMG_ID_GAME_SETTING;
/* Set random seed */
GetDateTime(&t);
srand(t.nMin);
//get current language , used for multi-language
#ifdef __MMI_GAME_MULTI_LANGUAGE_SUPPORT__
g_mmi_game_current_language_index = mmi_gfx_get_current_language_index();
#endif
EntryNewScreen(SCR_ID_GAME, NULL, mmi_game_entry_app_screen, NULL);
guiBuffer = GetCurrGuiBuffer(SCR_ID_GAME);
RegisterHighlightHandler(mmi_game_highlight_hdlr);
ShowCategory15Screen(
STR_GAME_CAPTION,
GetRootTitleIcon(MENU3105_GAMES),
STR_GLOBAL_OK,
IMG_GLOBAL_OK,
STR_GLOBAL_BACK,
IMG_GLOBAL_BACK,
index,
menu_str,
menu_img,
1,
0,
guiBuffer);
SetRightSoftkeyFunction(GoBackHistory, KEY_EVENT_UP);
SetKeyHandler(GoBackHistory, KEY_LEFT_ARROW,KEY_EVENT_DOWN);
/* load game settings */
mmi_gfx_load_setting();
}
/*****************************************************************************
* FUNCTION
* mmi_game_entry_setting_screen
* DESCRIPTION
* entry point for game setting screen
* PARAMETERS
* void
* RETURNS
* void
*****************************************************************************/
static void mmi_game_entry_setting_screen(void)
{
#if defined(__MMI_GAME__)
/*----------------------------------------------------------------*/
/* Local Variables */
/*----------------------------------------------------------------*/
U8 *guiBuffer;
U8 *inputBuffer;
U16 inputBufferSize;
S32 item_offset = 0;
MMI_ID_TYPE item_icons[] =
{
#if defined(__MMI_GAME__)
#ifdef __MMI_GAME_MULTICHANNEL_SOUND__
IMG_ID_GAME_SETTING_BACK_AUD,
0,
IMG_ID_GAME_SETTING_AUD,
0,
#else /* __MMI_GAME_MULTICHANNEL_SOUND__ */
IMG_ID_GAME_SETTING_AUD,
0,
#endif /* __MMI_GAME_MULTICHANNEL_SOUND__ */
IMG_ID_GAME_SETTING_VIB,
0,
#endif /* defined(__MMI_GAME__) */
};
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -