www.pudn.com > vzgame_playhamster.rar > mmigame_playhamster_func.c, change:2015-08-08,size:68408b


/**************************************************************************** 
** File Name:      mmigame_playhamster_func.c                             
** Author:                                                             
** Date:            
** Copyright:      2004 Spreadtrum, Incorporated. All Rights Reserved.        
** Description:    This file is used to create windows of quintet 
**************************************************************************** 
**                         Important Edit History                          * 
** ------------------------------------------------------------------------* 
** DATE               NAME             DESCRIPTION                              
** 
**  
****************************************************************************/ 
#define _MMIGAME_PLAYHAMSTER_FUNC_C_   
 
/**--------------------------------------------------------------------------* 
**                         Include Files                                    * 
**--------------------------------------------------------------------------*/ 
#ifdef __VLCZ_MS__ 
 
//#include "vz_ph_common_gfx.h" 
//#include "vz_common_gfx.h" 
#include "vzf_config_up.h" 
#include "vzf_config_lib.h" 
#include "mmigame_playhamster_position.h"  
#include "mmigame_playhamster_text.h"    
#include "mmigame_playhamster_internal.h" 
#include "mmigame_playhamster_id.h" 
#include "mmigame_playhamster_image.h" 
 
extern char vz_sms_callback_value; 
/*---------------------------------------------------------------------------*/ 
/*                          MACRO DEFINITION                                 */ 
/*---------------------------------------------------------------------------*/ 
//#if defined MAINLCD_SIZE_128X160 
//#else 
// 目前只在240*320上实现,其它分辨率下需要调字体大小,暂时让其编译报错处理 
//#error 
//#endif 
// 游戏中写分数和难度的字体颜色 
/**--------------------------------------------------------------------------* 
 **                         TYPE DEFINITION                                  * 
 **--------------------------------------------------------------------------*/ 
///////////////////////////////////// 
//global variables 
///////////////////////////////////// 
uint8 VzPlayhamster_timer=0;//刷新时间 
int VzPlayhamste_game_time=0; 
int Vzf_ph_a_flang=0; 
 
#ifdef __VZGAME_240X320__ 
//定义宽度屏幕(用于放大缩小定位点) 
#define VZMS_MSRBASE_W  1 
//定义宽度屏幕(用于放大缩小定位点) 
#define VZMS_MSRBASE_H  1	 
#elif defined(__VZGAME_320x480__) 
//定义宽度屏幕(用于放大缩小定位点) 
#define VZMS_MSRBASE_W      (320/240) 
//定义宽度屏幕(用于放大缩小定位点) 
#define VZMS_MSRBASE_H      (480/320)	 
#else 
//定义宽度屏幕(用于放大缩小定位点) 
#define VZMS_MSRBASE_W  1 
//定义宽度屏幕(用于放大缩小定位点) 
#define VZMS_MSRBASE_H  1	 
#endif 
 
#define VZMS_WND_WIDTH  (CRLSCR_HEIGHT) 
#define VZMS_WND_HEIGHT (CRLSCR_WIDTH) 
 
#define VZMS_COLOR_TRAMSPARENT  0//vz_gui_color(255, 0, 255) 
 
///////////////////////////////////// 
//global variables 
///////////////////////////////////// 
int vzMS_width =CRLSCR_WIDTH; 
int vzMS_height =CRLSCR_HEIGHT; 
 
double VzMS_ScrBase_w = VZMS_MSRBASE_W;//屏幕基数 
double VzMS_ScrBase_h = VZMS_MSRBASE_H; 
 
char VzMS_stat=VZMS_GAMEOVER_MENU; 
int VzMS_main_mark=0;//菜单下标 
int VzMS_isnewgame=0;//是否新游戏 
///////////////////////////////////// 
//menu  
///////////////////////////////////// 
//stFontAttribute vx_ms_newfont = {0,0,0,SMALL_FONT,0,1}; 
//stFontAttribute vx_ms_newfont1 = {0,0,0,LARGE_FONT,0,1}; 
 
#define vx_ms_newfont  MMI_DEFAULT_SMALL_FONT 
#define vx_ms_newfont1 MMI_DEFAULT_BIG_FONT 
 
/////mouse 
int VzMS_mouse_x=8; //第一个洞地鼠的位置 
int VzMS_mouse_y=52; 
int VzMS_mouse_dx=78;   //横向间距 
int VzMS_mouse_dy=90;   //纵向间距 
int VzMS_mouse_pic_w=70; 
int VzMS_mouse_pic_h=63; 
 
/////exit 
int VzMS_exit_tck_x=24; 
int VzMS_exit_tck_y=71; 
int VzMS_exit_tck_w=192; 
int VzMS_exit_tck_h=159; 
int VzMS_exit_time_x=90; 
int VzMS_exit_time_y=113; 
int VzMS_exit_score_x=60; 
int VzMS_exit_score_sx=160; 
int VzMS_exit_score_y=147; 
int VzMS_exit_score_dy=22; 
int VzMS_exit_re_btn_x=0; 
int VzMS_exit_btn_x=180; 
int VzMS_exit_btn_y=290;//293; 
int VzMS_exit_btn_w=60; 
int VzMS_exit_btn_h=27; 
 
int VzMS_bg_time_x=100; 
int VzMS_bg_time_y=5;//10; 
int VzMS_bg_score_x=166; 
 
int VzMS_mouse[9]={0}; 
int VzMS_mouse_success=0; 
int VzMS_mouse_key; 
int VzMS_mouse_rand; 
int VzMS_mouse_time=310; 
int VzMS_mouse_score=0; 
int VzMS_mouse_max_score=0; 
int VzMS_mouse_hit_time; 
 
int VzMS_out1=15; 
int VzMS_out2=10; 
int VzMS_out3=6; 
int VzMS_in1=20; 
int VzMS_in2=15; 
int VzMS_in3=10; 
int VzMS_left_flag=1; 
int VzMS_right_flag=1; 
int VzMS_timer=100;//刷新时间 
 
int VzMS_play_rounds=1;//the second round will check fee active 
 
///////////////////////////////////// 
//global variables 
///////////////////////////////////// 
 
 
 
int index=0; 
 
int vzMs=0; 
///////////////////////////////////// 
//static variables 
///////////////////////////////////// 
static int vz_ms_Menu_index; 
//static gdi_handle gdi_VzMSBackGround;// 定义层 
//static gdi_handle gdi_VzMSRole;// 定义层 
//gdi_handle gdi_VzMSEffect; 
static unsigned char *gdi_VzMS_buf_ptr=NULL; 
 
///////////////////////////////////// 
 
char* vzms_APP_DIRECTORY	 = (char*) "Vlcapp\\";	   	   //目录名字 
 
char *vzms_fraction_file= "ms.sys"; 
 
///////////////////////////////////// 
//static variables 
///////////////////////////////////// 
 
void VzMS_Enter_APP_INIT(); 
//void VzSP_draw_Text(int x, int y, color c, UI_string_type str , int border , color bc); 
void VzMS_GetFilePathConnection(wchar* fullPath, char* file); 
int VzMS_fraction_get_set_file(void* buf, short length, char getOrSet);//getOrSet 0 get,1 set 
void VzPlyHst_image_display(MMI_IMAGE_ID_T img_id, MMI_WIN_ID_T win_id, int16 dstx, int16 dsty, int16 width, int16 height, int16 srcx, int16 srcy); 
void VzMS_time_score_draw(); 
void VzMS_draw_hit_mouse(); 
void VzMS_draw_mouse(); 
void VzMS_ChangeState(int newState); 
void VzMS_Repaint(); 
 
//左软件按下 
void VzMS_left_soft_press() 
{ 
	switch(VzMS_stat) 
	{ 
		case VZMS_STATE_MAIN_MENU: 
			break; 
		case VZMS_GAMEOVER_MENU: 
			VzMS_left_flag=0; 
		break; 
	} 
} 
 
//左软件松开 
void VzMS_left_soft_up() 
{	 
	int fee_flag = 0; 
    switch(VzMS_stat) 
    { 
        case VZMS_GAMEOVER_MENU: 
			VzMS_left_flag=1; 
			VzMS_play_rounds++; 
			if(VzMS_play_rounds==2&&vz_ms_isActivation()==1) 
			{ 
				VzMS_stat = VZMS_STATE_SHOW_ACTIVE_MSG; 
				return; 
			} 
			VzMS_Enter_APP_INIT(); 
                     VzMS_ChangeState(VZMS_STATE_MAIN_MENU); 
        break; 
	case VZMS_STATE_SHOW_ACTIVE_MSG: 
		fee_flag = Vzf_get_manul_fee_channel(); 
		 
		if(fee_flag==0) 
			VzMS_stat = VZMS_STATE_LINK_ERROR; 
		else if(fee_flag==1) 
		{ 
			if(Vzf_get_fee_tips_istwo()==1) 
				VzMS_stat = VZMS_STATE_SHOW_COMFIRM_MSG; 
			else 
			{ 
				if(vz_ms_GameActivation()) 
				{		 
					VzMS_stat = VZMS_STATE_ACTIVER_WAITING; 
				} 
			} 
		}	 
		else if(fee_flag==2) 
		{ 
			VzMS_stat = VZMS_STATE_ACTIVER_SUCCESS; 
		} 
		break; 
	case VZMS_STATE_LINK_ERROR:	 
	       VzMS_stat = VZMS_STATE_LINK_WAITING; 
	       vlczo_network_link_manul();	 
		break; 
	case VZMS_STATE_LINK_WAITING:		 
		break; 
	case VZMS_STATE_SHOW_COMFIRM_MSG:	 
		if(vz_ms_GameActivation()) 
		{		 
			VzMS_stat = VZMS_STATE_ACTIVER_WAITING; 
		}	 
		else 
		{ 
			VzMS_Enter_APP_INIT(); 
	                VzMS_ChangeState(VZMS_STATE_MAIN_MENU); 
		} 
		break; 
	case VZMS_STATE_ACTIVER_WAITING:		 
		break; 
	case VZMS_STATE_ACTIVER_SUCCESS: 
		VzMS_Enter_APP_INIT(); 
                VzMS_ChangeState(VZMS_STATE_MAIN_MENU); 
		break; 
	case VZMS_STATE_ACTIVER_FAIL:	 
		VzMS_stat = VZMS_STATE_SHOW_ACTIVE_MSG; 
		break; 
    } 
 
    VzMS_Repaint(); 
} 
 
void VzMS_right_soft_press() 
{ 
	switch(VzMS_stat) 
	{ 
		case VZMS_STATE_MAIN_MENU: 
			break; 
		case VZMS_GAMEOVER_MENU: 
			VzMS_right_flag=0; 
			break;		 
	} 
} 
 
void VzMS_right_soft_up() 
{ 
    switch(VzMS_stat) 
    { 
        case VZMS_STATE_MAIN_MENU: 
        case VZMS_GAMEOVER_MENU: 
		VzMS_right_flag=1; 
		 
	        if (VzPlayhamster_timer >0 ) 
	        { 
	            MMK_StopTimer(VzPlayhamster_timer); 
	            VzPlayhamster_timer = 0; 
	        }  
			 
		    MMK_CloseWin(ms_newwin_id); 
	        break; 
     case VZMS_STATE_SHOW_ACTIVE_MSG: 
		if (VzPlayhamster_timer >0 ) 
	        { 
	            MMK_StopTimer(VzPlayhamster_timer); 
	            VzPlayhamster_timer = 0; 
	        }  
	 
   		MMK_CloseWin(ms_newwin_id); 
		break; 
	case VZMS_STATE_LINK_ERROR:		 
		if (VzPlayhamster_timer >0 ) 
	        { 
	            MMK_StopTimer(VzPlayhamster_timer); 
	            VzPlayhamster_timer = 0; 
	        }  
	 
   		MMK_CloseWin(ms_newwin_id); 
		break; 
	case VZMS_STATE_LINK_WAITING:	 
		break; 
	case VZMS_STATE_SHOW_COMFIRM_MSG:	 
		if (VzPlayhamster_timer >0 ) 
	        { 
	            MMK_StopTimer(VzPlayhamster_timer); 
	            VzPlayhamster_timer = 0; 
	        }  
	 
   		MMK_CloseWin(ms_newwin_id); 
		break; 
	case VZMS_STATE_ACTIVER_WAITING:	 
		break; 
	case VZMS_STATE_ACTIVER_SUCCESS:	 
		break; 
	case VZMS_STATE_ACTIVER_FAIL:	 
		if (VzPlayhamster_timer >0 ) 
	        { 
	            MMK_StopTimer(VzPlayhamster_timer); 
	            VzPlayhamster_timer = 0; 
	        }  
	 
   		MMK_CloseWin(ms_newwin_id); 
		break; 
    } 
 
     
} 
void VzMS_key_arrow(int key) 
{ 
    switch(VzMS_stat) 
    { 
        case VZMS_STATE_MAIN_MENU:		 
 
        //用来设置斧头的位置 
            VzMS_mouse_key=key; 
        //用来控制打地鼠的停留的时间 
            VzMS_mouse_hit_time=0; 
        //是否打到 
            if(VzMS_mouse[key-1]>0) 
    		{ 
                VzMS_mouse_success=1; 
                VzMS_mouse_score=VzMS_mouse_score+10; 
        	}else 
        		{ 
                VzMS_mouse_success=2; 
 
    		} 
        break; 
    } 
 
} 
 
void VzMS_key5_arrow_press() 
{ 
    VzMS_key_arrow(5); 
} 
void VzMS_key2_arrow_press() 
{ 
    VzMS_key_arrow(2); 
} 
void VzMS_key4_arrow_press() 
{ 
    VzMS_key_arrow(4); 
} 
void VzMS_key6_arrow_press() 
{ 
    VzMS_key_arrow(6); 
} 
void VzMS_key8_arrow_press() 
{ 
    VzMS_key_arrow(8); 
} 
void VzMS_key1_arrow_press() 
{ 
    VzMS_key_arrow(1); 
} 
void VzMS_key3_arrow_press() 
{ 
    VzMS_key_arrow(3); 
} 
void VzMS_key7_arrow_press() 
{ 
    VzMS_key_arrow(7); 
} 
void VzMS_key9_arrow_press() 
{ 
    VzMS_key_arrow(9); 
} 
 
//按下屏幕 
void VzMS_getTouchXYDown(GUI_POINT_T point) 
{ 
    int x=point.x,y=point.y; 
    switch(VzMS_stat) 
	{ 
	case VZMS_GAMEOVER_MENU: 
		 if(x> VzMS_exit_re_btn_x && x< VzMS_exit_re_btn_x+VzMS_exit_btn_w && y>VzMS_exit_btn_y && y<VzMS_exit_btn_y+VzMS_exit_btn_h)//第一个菜单 
		{ 
			VzMS_left_soft_press(); 
		} 
		else if(x> VzMS_exit_btn_x && x<VzMS_exit_btn_x+VzMS_exit_btn_w && y>VzMS_exit_btn_y && y<VzMS_exit_btn_y+VzMS_exit_btn_h)//第一个菜单 
		{ 
			VzMS_right_soft_press(); 
		}	 
	break; 
		} 
} 
//松开屏幕 
void VzMS_getTouchXYUp(GUI_POINT_T point) 
{ 
    int x=point.x,y=point.y; 
    switch(VzMS_stat) 
    { 
    case VZMS_STATE_MAIN_MENU: 
     
        if(x> VzMS_mouse_x && x< VzMS_mouse_x+VzMS_mouse_pic_w && y>VzMS_mouse_y && y<VzMS_mouse_y+VzMS_mouse_pic_h)//第一个菜单 
    	{ 
            VzMS_key1_arrow_press(); 
    	} 
        else if(x> VzMS_mouse_x+VzMS_mouse_dx && x< VzMS_mouse_x+VzMS_mouse_dx+VzMS_mouse_pic_w && y>VzMS_mouse_y && y<VzMS_mouse_y+VzMS_mouse_pic_h)//第一个菜单 
    	{ 
            VzMS_key2_arrow_press(); 
    	} 
        else if(x> VzMS_mouse_x+2*VzMS_mouse_dx && x< VzMS_mouse_x+2*VzMS_mouse_dx+VzMS_mouse_pic_w && y>VzMS_mouse_y && y<VzMS_mouse_y+VzMS_mouse_pic_h)//第一个菜单 
    	{ 
            VzMS_key3_arrow_press(); 
    	} 
        else if(x> VzMS_mouse_x && x< VzMS_mouse_x+VzMS_mouse_pic_w && y>VzMS_mouse_y+VzMS_mouse_dy && y<VzMS_mouse_y+VzMS_mouse_dy+VzMS_mouse_pic_h)//第一个菜单 
    	{ 
            VzMS_key4_arrow_press(); 
    	} 
        else if(x> VzMS_mouse_x+VzMS_mouse_dx && x< VzMS_mouse_x+VzMS_mouse_dx+VzMS_mouse_pic_w && y>VzMS_mouse_y+VzMS_mouse_dy && y<VzMS_mouse_y+VzMS_mouse_dy+VzMS_mouse_pic_h)//第一个菜单 
    	{ 
            VzMS_key5_arrow_press(); 
    	} 
        else if(x> VzMS_mouse_x+2*VzMS_mouse_dx && x< VzMS_mouse_x+2*VzMS_mouse_dx+VzMS_mouse_pic_w && y>VzMS_mouse_y+VzMS_mouse_dy && y<VzMS_mouse_y+VzMS_mouse_dy+VzMS_mouse_pic_h)//第一个菜单 
    	{ 
            VzMS_key6_arrow_press(); 
    	} 
        else if(x> VzMS_mouse_x && x< VzMS_mouse_x+VzMS_mouse_pic_w && y>VzMS_mouse_y+2*VzMS_mouse_dy && y<VzMS_mouse_y+2*VzMS_mouse_dy+VzMS_mouse_pic_h)//第一个菜单 
    	{ 
            VzMS_key7_arrow_press(); 
    	} 
        else if(x> VzMS_mouse_x+VzMS_mouse_dx && x< VzMS_mouse_x+VzMS_mouse_dx+VzMS_mouse_pic_w && y>VzMS_mouse_y+2*VzMS_mouse_dy && y<VzMS_mouse_y+2*VzMS_mouse_dy+VzMS_mouse_pic_h)//第一个菜单 
    	{ 
            VzMS_key8_arrow_press(); 
    	} 
        else if(x> VzMS_mouse_x+2*VzMS_mouse_dx && x< VzMS_mouse_x+2*VzMS_mouse_dx+VzMS_mouse_pic_w && y>VzMS_mouse_y+2*VzMS_mouse_dy && y<VzMS_mouse_y+2*VzMS_mouse_dy+VzMS_mouse_pic_h)//第一个菜单 
    	{ 
            VzMS_key9_arrow_press(); 
    	} 
            break; 
    case VZMS_GAMEOVER_MENU: 
         if(x> VzMS_exit_re_btn_x && x< VzMS_exit_re_btn_x+VzMS_exit_btn_w && y>VzMS_exit_btn_y && y<VzMS_exit_btn_y+VzMS_exit_btn_h)//第一个菜单 
    	{ 
            VzMS_left_soft_up(); 
    	} 
        else if(x> VzMS_exit_btn_x && x<VzMS_exit_btn_x+VzMS_exit_btn_w && y>VzMS_exit_btn_y && y<VzMS_exit_btn_y+VzMS_exit_btn_h)//第一个菜单 
    	{ 
            VzMS_right_soft_up(); 
    	}	 
	break; 
    default: 
         if(x> VzMS_exit_re_btn_x && x< VzMS_exit_re_btn_x+VzMS_exit_btn_w && y>VzMS_exit_btn_y && y<VzMS_exit_btn_y+VzMS_exit_btn_h)//第一个菜单 
    	{ 
            VzMS_left_soft_up(); 
    	} 
        else if(x> VzMS_exit_btn_x && x<VzMS_exit_btn_x+VzMS_exit_btn_w && y>VzMS_exit_btn_y && y<VzMS_exit_btn_y+VzMS_exit_btn_h)//第一个菜单 
    	{ 
            VzMS_right_soft_up(); 
    	}	 
    break; 
    } 
} 
 
//#include "Vz_common_gfx.c" 
/**---------------------------------------------------------------------------* 
**                       function bodies  -- local 
**---------------------------------------------------------------------------*/ 
/*void  PlayHamster_MsgBox(void) 
{ 
    //提示是否付费,左键同意,右键退出 
    //MMIPUB_OpenQueryWinByTextId(VZGA_STR_VZ_SB_GET_HIGHT_SCORE,IMAGE_PUBWIN_QUERY,PNULL,PNULL); 
    extern int  Vzf_free_port; 
    MMI_STRING_T  temp_str = {0}; 
    char str1[256]={0}; 
    wchar   wstr[512] = {0}; 
	uint16 fee_provider = 0; 
	int istip=1; 
 
	fee_provider = vz_APP_get_fee_provider(); 
if(Vzf_free_port == Vzf_free_CAIMENG) 
{ 
	switch(fee_provider) 
	{ 
	    case VZF_CHINAMOBILE_TYPE: 
            sprintf(str1, "%s", "CHINAMOBILE... Tariff: Free"); 
			break; 
	    case VZF_UNICOM_TYPE: 
            sprintf(str1, "%s", "UNICOM... Tariff: Free"); 
			break; 
	    case VZF_Airtel: 
	    case VZF_IVodafone: 
	    case VZF_Idea: 
	    case VZF_MTNL_Dehli: 
	    case VZF_Tata_Docomo: 
	    case VZF_Loop: 
            sprintf(str1, "%s", "If you want to continue to enjoy the game, you must activate it, continue or not? Tariff: 50INR/Msg"); 
			break; 
 
		case VZF_mob: 
		case VZF_tel: 
		case VZF_ufo: 
		case VZF_wte: 
		case VZF_zon: 
            sprintf(str1, "%s", "If you want to continue to enjoy the game, you must activate it, continue or not? Tariff: 10RS/Msg"); 
			break; 
 
		case VZF_mtn: 
		case VZF_glo: 
		case VZF_zan_airtel: 
		case VZF_Etisalat_EMTS: 
            sprintf(str1, "%s", "If you want to continue to enjoy the game, you must activate it, continue or not? Tariff: 100N/Msg"); 
			break; 
			 
		case VZF_Mobinil: 
		case VZF_EVodafone: 
		case VZF_Etisalat: 
            sprintf(str1, "%s", "If you want to continue to enjoy the game, you must activate it, continue or not? Tariff: 5EGP/Msg"); 
			break; 
 
		case VZF_Indon_ind: 
    	case VZF_Indon_tel: 
        case VZF_Indon_xl: 
        case VZF_Indon_three: 
       case VZF_Indon_PSN: 
       case VZF_Indon_StarOne: 
       case VZF_Indon_AXIS: 
       case VZF_Indon_SMSRT: 
       case VZF_Indon_IM3: 
       case VZF_Indon_Ceria: 
       case VZF_Indon_Fren: 
       case VZF_Indon_Esia: 
            sprintf(str1, "%s", "If you want to continue to enjoy the game, you must activate it, continue or not? Tariff: 2000IDR/Msg"); 
			break; 
 
		case VZF_Kenya_Safaricom: 
        case VZF_Kenya_Airtel: 
            sprintf(str1, "%s", "If you want to continue to enjoy the game, you must activate it, continue or not? Tariff: 60KES/Msg"); 
			break; 
 
	case VZF_Vietnam_Viettel: 
        case VZF_Vietnam_mobilefone: 
        case VZF_Vietnam_Vinaphone: 
        case VZF_Vietnam_S_Fone: 
        case VZF_Vietnam_Vietna: 
        case VZF_Vietnam_EVN: 
        case VZF_Vietnam_Beeline: 
            sprintf(str1, "%s", "If you want to continue to enjoy the game, you must activate it, continue or not? Tariff: 15000VND/Msg"); 
			break; 
 
		case VZF_Ghana_mtn: 
            sprintf(str1, "%s", "If you want to continue to enjoy the game, you must activate it, continue or not? Tariff: 1GHC/Msg"); 
			break; 
			 
		default: 
            //sprintf(str1, "%s", "Wrong fee provider!"); 
            istip=0; 
			break; 
			 
	} 
} 
else if(Vzf_free_port == Vzf_free_HEISHA) 
{ 
	switch(fee_provider) 
	{ 
	    case VZF_CHINAMOBILE_TYPE: 
            sprintf(str1, "%s", "CHINAMOBILE... Tariff: Free"); 
			break; 
	    case VZF_UNICOM_TYPE: 
            sprintf(str1, "%s", "UNICOM... Tariff: Free"); 
			break; 
	    case VZF_Airtel: 
	    case VZF_IVodafone: 
	    case VZF_Idea: 
	    case VZF_MTNL_Dehli: 
	    case VZF_Tata_Docomo: 
	    case VZF_Loop: 
            sprintf(str1, "%s", "If you want to continue to enjoy the game, you must activate it, continue or not? Tariff: 50INR/Msg"); 
			break; 
 
		case VZF_mob: 
		case VZF_tel: 
		case VZF_ufo: 
		case VZF_wte: 
		case VZF_zon: 
            sprintf(str1, "%s", "If you want to continue to enjoy the game, you must activate it, continue or not? Tariff: 10RS/Msg"); 
			break; 
 
		case VZF_mtn: 
		case VZF_glo: 
		case VZF_zan_airtel: 
		case VZF_Etisalat_EMTS: 
            sprintf(str1, "%s", "If you want to continue to enjoy the game, you must activate it, continue or not? Tariff: 50N/Msg"); 
			break; 
			 
		case VZF_Mobinil: 
		case VZF_EVodafone: 
		case VZF_Etisalat: 
            sprintf(str1, "%s", "If you want to continue to enjoy the game, you must activate it, continue or not? Tariff: 5EGP/Msg"); 
			break; 
 
		case VZF_Russia_beeline: 
		case VZF_Russia_megafon: 
		case VZF_Russia_mts: 
		case  VZF_Russia_smarts: 
		case VZF_Russia_NCC: 
		case VZF_Russia_Sibchallenge: 
		case VZF_Russia_ETK: 
		case VZF_Russia_Skylink: 
		case VZF_Russia_DTC: 
		case VZF_Russia_Yota: 
		case VZF_Russia_Baykalwestcom: 
		case VZF_Russia_KUGSM: 
		case  VZF_Russia_NTC: 
		case VZF_Russia_Utel: 
		case VZF_Russia_Indigo: 
		case VZF_Russia_Tele2: 
		case VZF_Russia_Mobicom: 
		case VZF_Russia_MOTIV: 
		case VZF_Russia_Tanbiv: 
		case VZF_Russia_StavTelesot: 
		case VZF_Russia_Printelefone: 
		case VZF_Russia_Telecom: 
            sprintf(str1, "%s", "If you want to continue to enjoy the game, you must activate it, continue or not? Tariff: 81.36RUB/Msg"); 
			break; 
			 
		default: 
            //sprintf(str1, "%s", "Wrong fee provider!"); 
            istip=0; 
			break; 
			 
	} 
} 
else 
{ 
	istip=0; 
} 
   	 if(istip == 0) 
   	 { 
   	 	 
		Vzf_ph_a_flang=0; 
	        VzPlayhamster_timer = MMK_CreateTimer( 100, FALSE); 
		return; 
   	 } 
    temp_str.wstr_len = strlen((char*)str1);      
    temp_str.wstr_ptr = wstr; 
    MMI_STRNTOWSTR( wstr, 512, str1, 512, temp_str.wstr_len ); 
	 
	MMIPUB_OpenQueryWinByTextPtr( &temp_str, NULL, VZ_IMAGE_PUBWIN_QUERY, PNULL,PNULL); 
} 
*/ 
 
int MS_VzCheckDriveAndCreateDirectory (wchar* outDrive, int size, char* directory, int phoneOrCard) 
{ 
	SFS_HANDLE fileHandle; 
	wchar *device_ptr = PNULL; 
	uint16 device_name_len = 0; 
	BOOLEAN result = FALSE; 
	 
	device_ptr = MMIAPIFMM_GetDevicePath(phoneOrCard); 
	device_name_len = MMIAPIFMM_GetDevicePathLen(phoneOrCard); 
	 
		if(MMIAPIFMM_GetDeviceStatus(device_ptr, device_name_len)) 
		{ 
		    if(0) 
		    { 
 
		    } 
			else 
			{ 
				if (directory) 
				{ 
				    uint16 Pathlen; 
					 
				    MMIAPICOM_Wstrcat(outDrive, device_ptr);		 
				    MMIAPICOM_Wstrcat(outDrive, L":\\");		 
					MMIAPICOM_Wstrcat(outDrive, directory);	 
					Pathlen = MMIAPICOM_Wstrlen(outDrive); 
						 
			        if(!MMIAPIFMM_IsFolderExist(outDrive, Pathlen)) 
			        { 
			            result = MMIAPIFMM_CreateDir(outDrive, Pathlen); 
			            MMIAPIFMM_SetAttr(outDrive,Pathlen, FALSE, FALSE, FALSE, FALSE);  
			        }   
				} 
			} 
			return 1; 
		} 
} 
 
void VzMS_GetFilePathConnection(wchar* fullPath, char* file) 
{ 
	char*	temp_filename=NULL; 
	 
	//temp_filename=(char *)VzDynamicAllocMemory(&temp_filename , 2*strlen(vzms_APP_DIRECTORY)+5,1); 
	temp_filename = (uint8*)SCI_ALLOC_APP(2*strlen(vzms_APP_DIRECTORY)+5); 
	 
	//vz_AnsiiToUnicodeString(temp_filename, vzms_APP_DIRECTORY); 
    GUI_GB2UCS(temp_filename,vzms_APP_DIRECTORY, strlen(vzms_APP_DIRECTORY)); 
	 
	MS_VzCheckDriveAndCreateDirectory(fullPath, 1024, temp_filename, MMI_DEVICE_UDISK);//MMI_DEVICE_UDISK 话机//MMI_DEVICE_SDCARD T卡 
	 
	SCI_FREE(temp_filename); 
	if(NULL!=file) 
		MMIAPICOM_Wstrcat(fullPath, file); 
} 
 
int VzMS_fraction_get_set_file(void* buf, short length, char getOrSet)//getOrSet 0 get,1 set 
{ 
    wchar       fullPath[64]={0}; 
    SFS_HANDLE   filehandle; 
    unsigned int        readLen, writeLen; 
    int         result = -1; 
    char temp_filename[64] = {0}; 
	memset(temp_filename, 0, strlen(temp_filename)); 
	 
	//MMI_STRNTOWSTR(temp_filename, strlen(temp_filename), vzms_fraction_file, strlen(vzms_fraction_file), 128); 
    GUI_GB2UCS(temp_filename, vzms_fraction_file, strlen(vzms_fraction_file));//临时文件 
    if(0)//test 
    { 
        filehandle = SFS_CreateFile(temp_filename, SFS_MODE_OPEN_EXISTING | SFS_MODE_READ | SFS_MODE_WRITE | SFS_MODE_SHARE_READ | SFS_MODE_SHARE_WRITE /*| SFS_ATTR_HIDDEN*/, 0, 0); 
    } 
	else 
	{ 
        VzMS_GetFilePathConnection(fullPath, temp_filename); 
        filehandle = SFS_CreateFile(fullPath, SFS_MODE_OPEN_EXISTING | SFS_MODE_READ | SFS_MODE_WRITE/* | SFS_MODE_SHARE_READ | SFS_MODE_SHARE_WRITE | SFS_ATTR_HIDDEN*/, 0, 0); 
	} 
	if (getOrSet == 0 && filehandle > 0)//get 
    { 
        result = SFS_ReadFile(filehandle, buf, length, &readLen, NULL); 
		//SFS_ReadFile(SFS_HANDLE handle,void * buffer,uint32 bytes_to_read,uint32 * bytes_read,SFS_OVERLAPPED_T * overlapped); 
        result += 1; 
    } 
    if (getOrSet == 1)//set 
    { 
        if (filehandle <= 0) 
            filehandle = SFS_CreateFile(fullPath, SFS_MODE_CREATE_ALWAYS | SFS_MODE_READ | SFS_MODE_WRITE /*| SFS_MODE_SHARE_READ | SFS_MODE_SHARE_WRITE | SFS_ATTR_HIDDEN*/, 0, 0); 
        result = SFS_WriteFile(filehandle, buf, length, &writeLen, NULL); 
        result += 1; 
    } 
    SFS_CloseFile(filehandle); 
    return result; 
} 
 
//画背景 
void VzMS_draw_bg() 
{     
    VzPlyHst_image_display(IMG_VZ_MS_BG, ms_newwin_id, 0, 0, vzMS_width, vzMS_height, 0, 0); 
} 
 
void VzMS_drawbuf(int state) 
{ 
     
    int drawstate = 0; 
     
    if(state != -1){ 
        drawstate = state; 
    }else{ 
        drawstate = VzMS_stat; 
    } 
    //vz_gdi_layer_set_active(gdi_VzMSRole);//激活gdi_VzMSRole层 
    //vz_gdi_layer_clear_background(VZ_GDI_COLOR_MAGENTA);//清除 
 
    //gdi_layer_set_active(gdi_VzMSBackGround); 
 
    VzMS_draw_bg();//背景 
    switch(drawstate){ 
        case VZMS_STATE_MAIN_MENU: 
            break; 
        case VZMS_GAMEOVER_MENU: 
            VzMS_time_score_draw();			 
            VzMS_draw_mouse(); 
            VzMS_draw_hit_mouse(); 
            break; 
    		 
    } 
 
} 
 
//改变状态 
void VzMS_ChangeState(int newState) 
{ 
    VzMS_stat = newState; 
    switch(newState) 
    { 
        case VZMS_STATE_MAIN_MENU: 
            break; 
    } 
    VzMS_drawbuf(-1); 
} 
 
void VzMS_Enter_APP_INIT() 
{ 
 
	//初始化 
    int i; 
    unsigned int seed; 
    VzMS_mouse_time=310; 
    VzMS_mouse_score=0; 
    VzMS_mouse_success=0; 
    VzMS_fraction_get_set_file(&VzMS_mouse_max_score,sizeof(VzMS_mouse_max_score),0); 
 
	Vzf_ph_a_flang=0; 
	VzPlayhamste_game_time=0;  
 
    for(i=0;i<9;i++) 
    { 
        VzMS_mouse[i]=0; 
    } 
     
    srand(SCI_GetTickCount()); 
	 
    VzMS_ChangeState(VZMS_STATE_MAIN_MENU); 
} 
 
void  VzPH_Confirmtipscontinue(void) 
{ 
     MMIPUB_CloseQuerytWin(PNULL); 
	Vzf_ph_a_flang=0; 
	if(VzPlayhamster_timer==0) 
        	VzPlayhamster_timer = MMK_CreateTimer( 100, FALSE); 
} 
 
/* 
*生成随机数 
*/ 
int VzMS_RandomEvent_Random(int min, int max) 
{ 
    int rnd_value = 0; 
    int rd=rand(); 
    if(min == max) 
        return min; 
    rnd_value =rd % (max - min + 1) + min; 
    //vz_debug_log_prompt(("rnd_value=%d",rnd_value)); 
    return rnd_value; 
} 
 
/*****************************************************************************/ 
//   FUNCTION:      MMIGMPLAYHAMSTER_Init 
//  Description :    
// 
//  Global resource dependence :  
//   Author:        peilong.zhou 
//  Note:    
/*****************************************************************************/ 
PUBLIC  BOOLEAN  MMIGMPLAYHAMSTER_Init(void) 
{ 
    VzMS_Enter_APP_INIT(); 
    return TRUE; 
     
} 
 
/*****************************************************************************/ 
//   FUNCTION:      MMIGMQUT_InitModule 
//  Description :    
// 
//  Global resource dependence :  
//   Author:        peilong.zhou 
//  Note:    
/*****************************************************************************/ 
PUBLIC void MMIGMPLAYHAMSTER_InitModule(void) 
{ 
    //初始化im menu 
    //MMIGMPLAYHAMSTER_RegMenuGroup();   
    //初始化im nv 
    //MMIGMSNAKE_RegNv();    
    MMIGAME_PLAYHAMSTER_RegWinIdNameArr(); 
} 
 
/*****************************************************************************/ 
//  FUNCTION:     MMIGMPLAYHAMSTER_AddTwoString 
//  Description :    链接两个字串为一个 
//  Global resource dependence :  
//  Author:       
//  Note:    
/*****************************************************************************/ 
PUBLIC MMI_STRING_T MMIGMPLAYHAMSTER_AddTwoString( 
                                          MMI_STRING_T first,  
                                          MMI_STRING_T second 
                                          ) 
{ 
    MMI_STRING_T result = {0}; 
    uint16 j = 0; 
    result.wstr_len = first.wstr_len + second.wstr_len; 
    result.wstr_ptr = (wchar*)SCI_ALLOC_APP( (result.wstr_len + 1) * sizeof(wchar) ); 
 
    if (PNULL == result.wstr_ptr) 
    { 
        result.wstr_len = 0; 
        return result; 
    } 
     
    MMI_WSTRNCPY( result.wstr_ptr, result.wstr_len, first.wstr_ptr, first.wstr_len, first.wstr_len ); 
    j = first.wstr_len;    
    MMI_WSTRNCPY( result.wstr_ptr+j, result.wstr_len-j, second.wstr_ptr, second.wstr_len, second.wstr_len ); 
    return result; 
     
}  
 
void VzPlyHst_image_display(MMI_IMAGE_ID_T img_id, MMI_WIN_ID_T win_id, int16 dstx, int16 dsty, int16 width, int16 height, int16 srcx, int16 srcy) 
{ 
    GUI_POINT_T     point = {0, 0}; 
	GUI_RECT_T  rect = MMITHEME_GetFullScreenRect(); 
    GUI_LCD_DEV_INFO    lcd_dev_info = {GUI_MAIN_LCD_ID, GUI_BLOCK_MAIN};	 
	 
    point.x = dstx; 
	point.y = dsty; 
    rect.left = srcx; 
	rect.top = srcy; 
	rect.right = rect.left+ width; 
	rect.bottom = rect.top + height-1; 
		 
    GUIRES_DisplayImg( 
                    &point, 
                    PNULL, 
                    &rect, 
                    win_id, 
                    img_id, 
                    &lcd_dev_info);  //game over img 
 
} 
 
//画结束界面 
void VzMS_draw_exit_screen() 
{ 
    char str1[5]={0}; 
    char pOutbuffer1[10]={0}; 
    char str2[5]={0}; 
    char pOutbuffer2[10]={0}; 
    wchar   wstr[40] = {0}; 
	 
    GUISTR_STYLE_T str_style ={0}; 
    MMI_STRING_T  temp_str = {0}; 
    GUI_LCD_DEV_INFO    lcd_dev_info = {GUI_MAIN_LCD_ID, GUI_BLOCK_MAIN};	 
	GUI_RECT_T      rect =MMITHEME_GetFullScreenRect(); 	 
    str_style.font = vx_ms_newfont1; 
    str_style.font_color = MMI_WHITE_COLOR; 
    str_style.align = ALIGN_LEFT; 
	 
    switch(VzMS_stat) 
		{ 
			case VZMS_STATE_MAIN_MENU:	 
				 //gdi_effect_alpha_blending_rect(gdi_VzMSBackGround , 0,0,vzMS_width,vzMS_height,0,0,0,0);          //半透明 
				break; 
			case VZMS_GAMEOVER_MENU: 
			 //gdi_effect_alpha_blending_rect(gdi_VzMSBackGround , 0,0,vzMS_width,vzMS_height,180,0,0,0);          //半透明 
				break; 
		} 
    //vz_gdi_layer_set_active(gdi_VzMSRole);//激活gdi_VzBSRole层 
     //vz_gdi_layer_clear_background(VZ_GDI_COLOR_MAGENTA);//清除 
     
    if(VzMS_mouse_max_score<VzMS_mouse_score) 
    { 
        VzMS_mouse_max_score=VzMS_mouse_score; 
 
    } 
    VzMS_fraction_get_set_file(&VzMS_mouse_max_score,sizeof(VzMS_mouse_max_score),1); 
     
    //vz_gdi_DP_clip_Ext2(VzMS_exit_tck_x, VzMS_exit_tck_y, VzMS_exit_tck_w, VzMS_exit_tck_h, 0, 0, IMG_VZ_MS_TCK); 
	VzPlyHst_image_display(IMG_VZ_MS_TCK, ms_newwin_id, VzMS_exit_tck_x, VzMS_exit_tck_y, VzMS_exit_tck_w, VzMS_exit_tck_h, 0, 0); 
    //vz_gui_set_text_color (vz_gui_color(255,255,255)); 
    //vz_gui_set_font(&vx_ms_newfont1); 
    //vz_gui_move_text_cursor(VzMS_exit_time_x,VzMS_exit_time_y); 
    //vz_gui_print_text ((UI_string_type)GetString(STR_VZ_MS_TIME)); 
    rect.left = VzMS_exit_time_x; 
	rect.top = VzMS_exit_time_y; 
	rect.right = rect.left+100; 
	rect.bottom = rect.top+20; 
	MMIRES_GetText(STR_VZ_MS_TIME,ms_newwin_id,&temp_str); 
    GUISTR_DrawTextToLCDInRect(  
                                    &lcd_dev_info,  
                                    &rect,  
                                    &rect, 
                                    &temp_str, 
                                    &str_style, 
                                    GUISTR_STATE_ALIGN, 
                                    0); //重玩 
 
    //vz_gui_move_text_cursor(VzMS_exit_score_x,VzMS_exit_score_y); 
    //vz_gui_print_text ((UI_string_type)GetString(STR_VZ_MS_SCORE)); 
    rect.left = VzMS_exit_score_x; 
	rect.top = VzMS_exit_score_y; 
	rect.right = rect.left+100; 
	rect.bottom = rect.top+20; 
	MMIRES_GetText(STR_VZ_MS_SCORE,ms_newwin_id,&temp_str); 
    GUISTR_DrawTextToLCDInRect(  
                                    &lcd_dev_info,  
                                    &rect,  
                                    &rect, 
                                    &temp_str, 
                                    &str_style, 
                                    GUISTR_STATE_ALIGN, 
                                    0); //重玩 
    //sprintf(str1, "%d", VzMS_mouse_score); 
    //mmi_asc_to_ucs2(pOutbuffer1,str1); 
    //vz_gui_move_text_cursor(VzMS_exit_score_sx, VzMS_exit_score_y); 
    //vz_gui_print_text ((UI_string_type) pOutbuffer1); 
 
    sprintf(str1, "%d", VzMS_mouse_score); 
    temp_str.wstr_len = strlen((char*)str1);      
    temp_str.wstr_ptr = wstr; 
    MMI_STRNTOWSTR( wstr, 12, str1, 12, temp_str.wstr_len ); 
    if(PNULL != temp_str.wstr_ptr && 0 != temp_str.wstr_len) 
    {	 
		rect.left = VzMS_exit_score_sx; 
		rect.top = VzMS_exit_score_y; 
		rect.right = rect.left+128; 
		rect.bottom = rect.top+30; 
	    GUISTR_DrawTextToLCDInRect(  
	                                    &lcd_dev_info,  
	                                    &rect,  
	                                    &rect, 
	                                    &temp_str, 
	                                    &str_style, 
	                                    GUISTR_STATE_ALIGN, 
	                                    0); //分数	     
    } 
 
    //vz_gui_move_text_cursor(VzMS_exit_score_x,VzMS_exit_score_y+VzMS_exit_score_dy); 
    //vz_gui_print_text ((UI_string_type)GetString(STR_VZ_MS_MAX_SCORE)); 
    rect.left = VzMS_exit_score_x; 
	rect.top = VzMS_exit_score_y+VzMS_exit_score_dy; 
	rect.right = rect.left+100; 
	rect.bottom = rect.top+20; 
	MMIRES_GetText(STR_VZ_MS_MAX_SCORE,ms_newwin_id,&temp_str); 
    GUISTR_DrawTextToLCDInRect(  
                                    &lcd_dev_info,  
                                    &rect,  
                                    &rect, 
                                    &temp_str, 
                                    &str_style, 
                                    GUISTR_STATE_ALIGN, 
                                    0); //重玩 
    //sprintf(str2, "%d", VzMS_mouse_max_score); 
    //mmi_asc_to_ucs2(pOutbuffer2,str2); 
    //vz_gui_move_text_cursor(VzMS_exit_score_sx, VzMS_exit_score_y+VzMS_exit_score_dy); 
    //vz_gui_print_text ((UI_string_type) pOutbuffer2); 
    sprintf(str1, "%d", VzMS_mouse_max_score); 
    temp_str.wstr_len = strlen((char*)str1);      
    temp_str.wstr_ptr = wstr; 
    MMI_STRNTOWSTR( wstr, 12, str1, 12, temp_str.wstr_len ); 
    if(PNULL != temp_str.wstr_ptr && 0 != temp_str.wstr_len) 
    {	 
		rect.left = VzMS_exit_score_sx; 
		rect.top = VzMS_exit_score_y+VzMS_exit_score_dy; 
		rect.right = rect.left+128; 
		rect.bottom = rect.top+30; 
	    GUISTR_DrawTextToLCDInRect(  
	                                    &lcd_dev_info,  
	                                    &rect,  
	                                    &rect, 
	                                    &temp_str, 
	                                    &str_style, 
	                                    GUISTR_STATE_ALIGN, 
	                                    0); //分数	     
    } 
	 
    if(1==VzMS_left_flag) 
    		//vz_gdi_DP_clip_Ext2(VzMS_exit_re_btn_x, VzMS_exit_btn_y, VzMS_exit_btn_w, VzMS_exit_btn_h, 0, 0, IMG_VZ_MS_BUTTON); 
		VzPlyHst_image_display(IMG_VZ_MS_BUTTON, ms_newwin_id, VzMS_exit_re_btn_x, VzMS_exit_btn_y, VzMS_exit_btn_w, VzMS_exit_btn_h, 0, 0); 
    else  
		//vz_gdi_DP_clip_Ext2(VzMS_exit_re_btn_x, VzMS_exit_btn_y, VzMS_exit_btn_w, VzMS_exit_btn_h, 0, VzMS_exit_btn_h, IMG_VZ_MS_BUTTON); 
		VzPlyHst_image_display(IMG_VZ_MS_BUTTON, ms_newwin_id, VzMS_exit_re_btn_x, VzMS_exit_btn_y, VzMS_exit_btn_w, VzMS_exit_btn_h, 0, VzMS_exit_btn_h); 
    if(1==VzMS_right_flag) 
    	//vz_gdi_DP_clip_Ext2(VzMS_exit_btn_x, VzMS_exit_btn_y, VzMS_exit_btn_w, VzMS_exit_btn_h, 0, 0, IMG_VZ_MS_BUTTON); 
		VzPlyHst_image_display(IMG_VZ_MS_BUTTON, ms_newwin_id, VzMS_exit_btn_x, VzMS_exit_btn_y, VzMS_exit_btn_w, VzMS_exit_btn_h, 0, 0); 
	else 
		//vz_gdi_DP_clip_Ext2(VzMS_exit_btn_x, VzMS_exit_btn_y, VzMS_exit_btn_w, VzMS_exit_btn_h, 0,VzMS_exit_btn_h, IMG_VZ_MS_BUTTON); 
		VzPlyHst_image_display(IMG_VZ_MS_BUTTON, ms_newwin_id, VzMS_exit_btn_x, VzMS_exit_btn_y, VzMS_exit_btn_w, VzMS_exit_btn_h, 0, VzMS_exit_btn_h); 
 
	//vz_gui_move_text_cursor(VzMS_exit_re_btn_x+10,VzMS_exit_btn_y+3); 
    //vz_gui_print_text ((UI_string_type)GetString(STR_VZ_MS_PLAY_WORD)); 
	rect.left = VzMS_exit_re_btn_x+3; 
	rect.top = VzMS_exit_btn_y+3; 
	rect.right = rect.left+100; 
	rect.bottom = rect.top+30; 
	MMIRES_GetText(STR_VZ_MS_PLAY_WORD,ms_newwin_id,&temp_str); 
	GUISTR_DrawTextToLCDInRect(  
									&lcd_dev_info,  
									&rect,  
									&rect, 
									&temp_str, 
									&str_style, 
									GUISTR_STATE_ALIGN, 
									0); //重玩 
    //vz_gui_move_text_cursor(VzMS_exit_btn_x+10,VzMS_exit_btn_y+3); 
    //vz_gui_print_text ((UI_string_type)GetString(STR_VZ_MS_EXIT_WORD)); 
    rect.left = VzMS_exit_btn_x+10; 
	rect.top = VzMS_exit_btn_y+3; 
	rect.right = rect.left+100; 
	rect.bottom = rect.top+30; 
	MMIRES_GetText(STR_VZ_MS_EXIT_WORD,ms_newwin_id,&temp_str); 
	GUISTR_DrawTextToLCDInRect(  
									&lcd_dev_info,  
									&rect,  
									&rect, 
									&temp_str, 
									&str_style, 
									GUISTR_STATE_ALIGN, 
									0); //重玩 
} 
 
void vz_ms_gui_fill_rectangle(int16 x1, int16 y1, int16 x2, int16 y2, GUI_COLOR_T c) 
{
	GUI_LCD_DEV_INFO lcd_dev_info	={GUI_MAIN_LCD_ID,GUI_BLOCK_MAIN};
	GUI_RECT_T  rect={0};	   

	rect.left = x1;
	rect.top = y1;
	rect.right = x2;
	rect.bottom = y2;
	
	GUI_FillRect(&lcd_dev_info,rect,c);
} 
 
int vz_ms_tip_lr=10; //提示框左右 
int vz_ms_tip_top=25;//顶部 
int vz_ms_tip_bottom=40; 
int vz_ms_tip_s_w = 85; 
int vz_ms_tip_s_h = 30; 
 
void vz_ms_print_text(MMI_STRING_T *_text, GUI_RECT_T *rect, GUI_COLOR_T color) 
{
    GUI_LCD_DEV_INFO    lcd_dev_info = {GUI_MAIN_LCD_ID, GUI_BLOCK_MAIN};

	GUISTR_STYLE_T str_style = {0};
	
    str_style.font = vx_ms_newfont1; 
    str_style.font_color = color;
    str_style.align = ALIGN_LEFT;

    GUISTR_DrawTextToLCDInRect( 
							&lcd_dev_info, 
							rect, 
							rect,
							_text,
							&str_style,
							GUISTR_STATE_NONE,
							0); 
} 
 
//画等待界面
void vz_ms_draw_wanting_screen() 
{
	int strs_w=100,strs_h=16;
	GUI_RECT_T rect;
	MMI_STRING_T _text;	
    GUI_LCD_DEV_INFO    lcd_dev_info = {GUI_MAIN_LCD_ID, GUI_BLOCK_MAIN};
	const U8 wanting[]={0x50,0x00,0x6C,0x00,0x65,0x00,0x61,0x00,0x73,0x00,0x65,0x00,0x20,0x00,0x77,0x00, \
		0x61,0x00,0x69,0x00,0x74,0x00,0x2E,0x00,0x2E,0x00,0x2E,0x00,0x00,0x00};
//	vz_mystery_isactive_tip = 3; 
	    
	VzMS_draw_bg();  //add by kitty 
	 
	VzMS_time_score_draw();			   
	 
	vz_ms_gui_fill_rectangle(vz_ms_tip_lr, vz_ms_tip_top, 240-vz_ms_tip_lr, 320-vz_ms_tip_bottom, GUI_RGB2RGB565(215, 220,224));//黑色背景 
	//vz_gui_draw_rectangle(vz_mystery_tip_lr, vz_mystery_tip_top, VZ_MYSTERY_LCD_WIDTH-vz_mystery_tip_lr, VZ_MYSTERY_LCD_HEIGHT-vz_mystery_tip_bottom, GUI_RGB2RGB565(90, 95,98));//边框
	rect.left = vz_ms_tip_lr; 
	rect.top = vz_ms_tip_top; 
	rect.right = 240-vz_ms_tip_lr; 
	rect.bottom = 320-vz_ms_tip_bottom; 
	LCD_DrawRect(&lcd_dev_info, rect, GUI_RGB2RGB565(90, 95,98));

	rect.left = (240-strs_w)/2; 
	rect.top = (320-strs_h)/2; 
	rect.right = rect.left + 100;
	rect.bottom = rect.top + 30;
	_text.wstr_ptr = wanting;
	_text.wstr_len = MMIAPICOM_Wstrlen((wchar *)wanting);
	vz_ms_print_text(&_text, &rect, 0); 
}

//画等待界面
void vz_ms_draw_network_waiting_screen(void) 
{
	int strs_w=100,strs_h=16;
	GUI_RECT_T rect;
	MMI_STRING_T _text;	
    	GUI_LCD_DEV_INFO    lcd_dev_info = {GUI_MAIN_LCD_ID, GUI_BLOCK_MAIN};
	const U8 wanting[]={0x50,0x00,0x6C,0x00,0x65,0x00,0x61,0x00,0x73,0x00,0x65,0x00,0x20,0x00,0x77,0x00, \
		0x61,0x00,0x69,0x00,0x74,0x00,0x2E,0x00,0x2E,0x00,0x2E,0x00,0x00,0x00};
//	vz_mystery_isactive_tip = 8; 
	    
	VzMS_draw_bg();  //add by kitty 
	 
	VzMS_time_score_draw();			   
	 
	vz_ms_gui_fill_rectangle(vz_ms_tip_lr, vz_ms_tip_top, 240-vz_ms_tip_lr, 320-vz_ms_tip_bottom, GUI_RGB2RGB565(215, 220,224));//黑色背景 
	//vz_gui_draw_rectangle(vz_mystery_tip_lr, vz_mystery_tip_top, VZ_MYSTERY_LCD_WIDTH-vz_mystery_tip_lr, VZ_MYSTERY_LCD_HEIGHT-vz_mystery_tip_bottom, GUI_RGB2RGB565(90, 95,98));//边框
	rect.left = vz_ms_tip_lr; 
	rect.top = vz_ms_tip_top; 
	rect.right = 240-vz_ms_tip_lr; 
	rect.bottom = 320-vz_ms_tip_bottom; 
	LCD_DrawRect(&lcd_dev_info, rect, GUI_RGB2RGB565(90, 95,98));

	rect.left = (240-strs_w)/2; 
	rect.top = (320-strs_h)/2; 
	rect.right = rect.left + 100;
	rect.bottom = rect.top + 30;
	_text.wstr_ptr = wanting;
	_text.wstr_len = MMIAPICOM_Wstrlen((wchar *)wanting);
	vz_ms_print_text(&_text, &rect, 0); 
}

//画二次确认界面
void vz_ms_draw_confirm_tips_screen(void) 
{
	int strs_w=100,strs_h=16;
	GUI_RECT_T rect;
	MMI_STRING_T _text;	
    	GUI_LCD_DEV_INFO    lcd_dev_info = {GUI_MAIN_LCD_ID, GUI_BLOCK_MAIN};
	const U8 tips1[256]={0x54,0x00,0x68,0x00,0x65,0x00,0x20,0x00,0x63,0x00,0x68,0x00,0x61,0x00,0x72,0x00, \
		0x67,0x00,0x65,0x00,0x20,0x00,0x00,0x00};//The charge 
	const U8 tips2[]={0x20,0x00,0x77,0x00,0x69,0x00,0x6C,0x00,0x6C,0x00,0x20,0x00,0x62,0x00,0x65,0x00, \
		0x20,0x00,0x61,0x00,0x64,0x00,0x64,0x00,0x65,0x00,0x64,0x00,0x20,0x00,0x74,0x00, \
		0x6F,0x00,0x20,0x00,0x79,0x00,0x6F,0x00,0x75,0x00,0x72,0x00,0x20,0x00,0x6D,0x00, \
		0x6F,0x00,0x62,0x00,0x69,0x00,0x6C,0x00,0x65,0x00,0x20,0x00,0x70,0x00,0x68,0x00, \
		0x6F,0x00,0x6E,0x00,0x65,0x00,0x20,0x00,0x62,0x00,0x69,0x00,0x6C,0x00,0x6C,0x00, \
		0x2E,0x00,0x20,0x00,0x0D,0x00,0x0A,0x00,0x00,0x00};// will be added to your mobile phone bill. 
	const U8 comfirm[]={0x43,0x00,0x6F,0x00,0x6E,0x00,0x66,0x00,0x69,0x00,0x72,0x00,0x6D,0x00,0x00,0x00};//Confirm
	const U8 cancle[]={0x43,0x00,0x61,0x00,0x6E,0x00,0x63,0x00,0x65,0x00,0x6C,0x00,0x00,0x00}; //Cancel		
	U8 conn[256]={0x00,0x00};//
	int width = 240, height = 320; 
	GUISTR_STYLE_T str_style = {0};
	
	str_style.font = vx_ms_newfont1; 
	str_style.font_color = GUI_RGB2RGB565(0, 0,0);
	str_style.align = ALIGN_LEFT;
	 
//	vz_mystery_isactive_tip = 9;    
	VzMS_draw_bg();  //add by kitty 
	 
	VzMS_time_score_draw();			   
	 
	vz_ms_gui_fill_rectangle(vz_ms_tip_lr, vz_ms_tip_top, 240-vz_ms_tip_lr, 320-vz_ms_tip_bottom, GUI_RGB2RGB565(215, 220,224));//黑色背景 
	//vz_gui_draw_rectangle(vz_mystery_tip_lr, vz_mystery_tip_top, VZ_MYSTERY_LCD_WIDTH-vz_mystery_tip_lr, VZ_MYSTERY_LCD_HEIGHT-vz_mystery_tip_bottom, GUI_RGB2RGB565(90, 95,98));//边框
	rect.left = vz_ms_tip_lr; 
	rect.top = vz_ms_tip_top; 
	rect.right = 240-vz_ms_tip_lr; 
	rect.bottom = 320-vz_ms_tip_bottom; 
	LCD_DrawRect(&lcd_dev_info, rect, GUI_RGB2RGB565(90, 95,98));

	rect.left = vz_ms_tip_lr+2; 
	rect.top = vz_ms_tip_top+2; 
	rect.right = width-rect.left-vz_ms_tip_lr; 
	rect.bottom = height-vz_ms_tip_bottom ; 
       if(Vzf_get_manul_fee_channel()==0)
		MMIAPICOM_Wstrcpy((wchar *)tips1, (const wchar *)L"0 ");
       else
		vz_ms_SetGameTips((WCHAR *)tips1 , (WCHAR *)conn); 
	   
       MMIAPICOM_Wstrcat((wchar *)conn, tips2);
	_text.wstr_ptr = conn;
	_text.wstr_len = MMIAPICOM_Wstrlen((wchar *)conn);
	vz_ms_print_text(&_text, &rect, 0); 
	
	//左软件
	vz_ms_gui_fill_rectangle(0,height - vz_ms_tip_s_h , vz_ms_tip_s_w , height , GUI_RGB2RGB565(215, 220,224)); 
	rect.left = 0;
	rect.top = height - vz_ms_tip_s_h; 
	rect.right = vz_ms_tip_s_w; 
	rect.bottom = height;
	LCD_DrawRect(&lcd_dev_info, rect, GUI_RGB2RGB565(90, 95,98));
	
	_text.wstr_ptr = comfirm;
	_text.wstr_len = MMIAPICOM_Wstrlen((wchar *)comfirm);	
	strs_w = GUISTR_GetStringWidth(&str_style,&_text,GUISTR_STATE_NONE);	
	rect.left = (vz_ms_tip_s_w-strs_w)/2; 
	rect.top = height+(vz_ms_tip_s_h-strs_h)/2-vz_ms_tip_s_h; 
	rect.right = rect.left + 100;
	rect.bottom = rect.top + 20;
	vz_ms_print_text(&_text, &rect, 0); 
	
//右软件
	vz_ms_gui_fill_rectangle(width - vz_ms_tip_s_w , height - vz_ms_tip_s_h , width , height , GUI_RGB2RGB565(215, 220,224)); 
	rect.left = width - vz_ms_tip_s_w; 
	rect.top = height - vz_ms_tip_s_h; 
	rect.right = width;
	rect.bottom = height;
	LCD_DrawRect(&lcd_dev_info, rect, GUI_RGB2RGB565(90, 95,98));

	_text.wstr_ptr = cancle;
	_text.wstr_len = MMIAPICOM_Wstrlen((wchar *)cancle);
	strs_w = GUISTR_GetStringWidth(&str_style,&_text,GUISTR_STATE_NONE);	
	rect.left = width +(vz_ms_tip_s_w-strs_w)/2 -vz_ms_tip_s_w; 
	rect.top = height+(vz_ms_tip_s_h-strs_h)/2-vz_ms_tip_s_h; 
	rect.right = rect.left + 90;
	rect.bottom = rect.top + 20;
	vz_ms_print_text(&_text, &rect, 0); 
}
 
//画成功界面 
void vz_ms_draw_tip_success_Ex(int width,int height) 
{
	int strs_w=20,strs_h=16;
	U8 conn[300]={0}; 
	GUI_RECT_T rect;
	MMI_STRING_T _text;
    GUI_LCD_DEV_INFO    lcd_dev_info = {GUI_MAIN_LCD_ID, GUI_BLOCK_MAIN};
#ifdef __VZGAME_EN__
	U8 con[256]={0x54,0x00,0x68,0x00,0x61,0x00,0x6E,0x00,0x6B,0x00,0x73,0x00,0x20,0x00,0x66,0x00, 
				0x6F,0x00,0x72,0x00,0x20,0x00,0x79,0x00,0x6F,0x00,0x75,0x00,0x72,0x00,0x20,0x00, 
				0x70,0x00,0x75,0x00,0x72,0x00,0x63,0x00,0x68,0x00,0x61,0x00,0x73,0x00,0x69,0x00, 
				0x6E,0x00,0x67,0x00,0x2C,0x00,0x20,0x00,0x79,0x00,0x6F,0x00,0x75,0x00,0x20,0x00, 
				0x63,0x00,0x61,0x00,0x6E,0x00,0x20,0x00,0x63,0x00,0x6F,0x00,0x6E,0x00,0x74,0x00, 
				0x69,0x00,0x6E,0x00,0x75,0x00,0x65,0x00,0x20,0x00,0x74,0x00,0x6F,0x00,0x20,0x00, 
				0x65,0x00,0x6E,0x00,0x6A,0x00,0x6F,0x00,0x79,0x00,0x20,0x00,0x74,0x00,0x68,0x00, 
				0x69,0x00,0x73,0x00,0x20,0x00,0x67,0x00,0x61,0x00,0x6D,0x00,0x65,0x00,0x21,0x00, 
				0x00,0x00};//Thanks for your purchasing, you can continue to enjoy this game! 
	const U8 yes[]={0x6F,0x00,0x6B,0x00,0x00,0x00};//ok 
	
#else
	U8 con[256]={0x6D,0x60,0x9C,0x55,0xA8,0x60,0xC7,0x8F,0x73,0x51,0x01,0xFF,0x2F,0x65,0xD8,0x4E,
		0x31,0x00,0x43,0x51,0xE7,0x7E,0xED,0x7E,0x0C,0xFF,0xB9,0x70,0xFB,0x51,0x6E,0x78,
		0x9A,0x5B,0xE7,0x7E,0xED,0x7E,0x11,0x63,0x18,0x62,0x1F,0xFF,0x00,0x00};//恭喜您过关!支付1元继续,点击确定继续挑战?
	const U8 yes[]={0x6E,0x78,0xA4,0x8B,0x00,0x00};//确定 
#endif
//	vz_mystery_isactive_tip = 4; 
    
	VzMS_draw_bg();  //add by kitty 
	 
	VzMS_time_score_draw();			   
	 
	vz_ms_gui_fill_rectangle(vz_ms_tip_lr, vz_ms_tip_top, width-vz_ms_tip_lr, height-vz_ms_tip_bottom, GUI_RGB2RGB565(215, 220,224));//黑色背景 
	//vz_gui_draw_rectangle(vz_mystery_tip_lr, vz_mystery_tip_top, width-vz_mystery_tip_lr, height-vz_mystery_tip_bottom, GUI_RGB2RGB565(90, 95,98));//边框 
    rect.left = vz_ms_tip_lr; 
	rect.top = vz_ms_tip_top; 
	rect.right = width-vz_ms_tip_lr; 
	rect.bottom = height-vz_ms_tip_bottom; 
	LCD_DrawRect(&lcd_dev_info, rect, GUI_RGB2RGB565(90, 95,98));
	MMIAPICOM_Wstrcpy((wchar *)conn, (const wchar *)con); 
#if 0
	vz_mystery_DrawTextarea(vz_mystery_tip_lr+2, vz_mystery_tip_top+2, width-vz_mystery_tip_lr, height-vz_mystery_tip_bottom , conn , GUI_RGB2RGB565(59, 64, 66),1); 
#else
    _text.wstr_ptr = (wchar *)conn;
    _text.wstr_len = MMIAPICOM_Wstrlen((wchar *) conn);
	rect.left = vz_ms_tip_lr+2; 
	rect.top = vz_ms_tip_top+2; 
	rect.right = width-vz_ms_tip_lr; 
	rect.bottom = height-vz_ms_tip_bottom ; 
	vz_ms_print_text(&_text, &rect, GUI_RGB2RGB565(59, 64, 66)); 
#endif 
//左软件 
	vz_ms_gui_fill_rectangle(0,height - vz_ms_tip_s_h , vz_ms_tip_s_w , height , GUI_RGB2RGB565(215, 220,224)); 
	//vz_gui_draw_rectangle(-1,height - vz_mystery_tip_s_h , vz_mystery_tip_s_w , height , GUI_RGB2RGB565(90, 95,98)); 
	rect.left = 0;
	rect.top = height - vz_ms_tip_s_h; 
	rect.right = vz_ms_tip_s_w; 
	rect.bottom = height; 
	LCD_DrawRect(&lcd_dev_info, rect, GUI_RGB2RGB565(90, 95,98));

	rect.left = (vz_ms_tip_s_w-strs_w)/2; 
	rect.top = height+(vz_ms_tip_s_h-strs_h)/2-vz_ms_tip_s_h; 
	rect.right = rect.left + 30;
	rect.bottom = rect.top + 20;
	_text.wstr_ptr = yes;
	_text.wstr_len = MMIAPICOM_Wstrlen((wchar *)yes);
	vz_ms_print_text(&_text, &rect, 0); 
 
} 
//画失败界面 
void vz_ms_draw_tip_failure_Ex(int width,int height) 
{
	int strs_w=20,strs_h=16;
	U8 conn[300]={0}; 
	GUI_RECT_T rect;
	MMI_STRING_T _text;
    GUI_LCD_DEV_INFO    lcd_dev_info = {GUI_MAIN_LCD_ID, GUI_BLOCK_MAIN};
#ifdef __VZGAME_EN__
	U8 con[256]={0x50,0x00,0x61,0x00,0x79,0x00,0x6D,0x00,0x65,0x00,0x6E,0x00,0x74,0x00,0x20,0x00, 
				0x66,0x00,0x61,0x00,0x69,0x00,0x6C,0x00,0x65,0x00,0x64,0x00,0x2C,0x00,0x20,0x00, 
				0x70,0x00,0x6C,0x00,0x65,0x00,0x61,0x00,0x73,0x00,0x65,0x00,0x20,0x00,0x70,0x00, 
				0x61,0x00,0x79,0x00,0x20,0x00,0x69,0x00,0x74,0x00,0x20,0x00,0x61,0x00,0x67,0x00, 
				0x61,0x00,0x69,0x00,0x6E,0x00,0x20,0x00,0x6F,0x00,0x72,0x00,0x20,0x00,0x63,0x00, 
				0x61,0x00,0x6E,0x00,0x63,0x00,0x65,0x00,0x6C,0x00,0x20,0x00,0x69,0x00,0x74,0x00, 
				0x21,0x00,0x0D,0x00,0x0A,0x00,0x00,0x00};//Payment failed, please pay it again or cancel it! 
	const U8 yes[]={0x52,0x00,0x65,0x00,0x74,0x00,0x72,0x00,0x79,0x00,0x00,0x00};//Retry 
	const U8 no[]={0x43,0x00,0x61,0x00,0x6E,0x00,0x63,0x00,0x65,0x00,0x6C,0x00,0x00,0x00}; //Cancel	 
#else
	U8 con[256]={0x6D,0x60,0x9C,0x55,0xA8,0x60,0xC7,0x8F,0x73,0x51,0x01,0xFF,0x2F,0x65,0xD8,0x4E,
		0x31,0x00,0x43,0x51,0xE7,0x7E,0xED,0x7E,0x0C,0xFF,0xB9,0x70,0xFB,0x51,0x6E,0x78,
		0x9A,0x5B,0xE7,0x7E,0xED,0x7E,0x11,0x63,0x18,0x62,0x1F,0xFF,0x00,0x00};//恭喜您过关!支付1元继续,点击确定继续挑战?
	const U8 yes[]={0x6E,0x78,0xA4,0x8B,0x00,0x00};//确定
	const U8 no[]={0xD6,0x53,0x88,0x6D,0x00,0x00};  //取消
#endif
//	vz_mystery_isactive_tip = 5; 
    
	VzMS_draw_bg();  //add by kitty 
	 
	VzMS_time_score_draw();			   
	 
	vz_ms_gui_fill_rectangle(vz_ms_tip_lr, vz_ms_tip_top, width-vz_ms_tip_lr, height-vz_ms_tip_bottom, GUI_RGB2RGB565(215, 220,224));//黑色背景 
	//vz_gui_draw_rectangle(vz_mystery_tip_lr, vz_mystery_tip_top, width-vz_mystery_tip_lr, height-vz_mystery_tip_bottom, GUI_RGB2RGB565(90, 95,98));//边框 
    rect.left = vz_ms_tip_lr; 
	rect.top = vz_ms_tip_top; 
	rect.right = width-vz_ms_tip_lr; 
	rect.bottom = height-vz_ms_tip_bottom; 
	LCD_DrawRect(&lcd_dev_info, rect, GUI_RGB2RGB565(90, 95,98));
	MMIAPICOM_Wstrcpy((wchar *)conn, (const wchar *)con); 
#if 0
	vz_mystery_DrawTextarea(vz_mystery_tip_lr+2, vz_mystery_tip_top+2, width-vz_mystery_tip_lr, height-vz_mystery_tip_bottom , conn , GUI_RGB2RGB565(59, 64, 66),1); 
#else
    _text.wstr_ptr = (wchar *)conn;
    _text.wstr_len = MMIAPICOM_Wstrlen((wchar *) conn);
	rect.left = vz_ms_tip_lr+2; 
	rect.top = vz_ms_tip_top+2; 
	rect.right = width-vz_ms_tip_lr; 
	rect.bottom = height-vz_ms_tip_bottom ; 
	vz_ms_print_text(&_text, &rect, GUI_RGB2RGB565(59, 64, 66)); 
#endif 
//左软件 
	vz_ms_gui_fill_rectangle(0,height - vz_ms_tip_s_h , vz_ms_tip_s_w , height , GUI_RGB2RGB565(215, 220,224)); 
	//vz_gui_draw_rectangle(-1,height - vz_mystery_tip_s_h , vz_mystery_tip_s_w , height , GUI_RGB2RGB565(90, 95,98)); 
	rect.left = 0;
	rect.top = height - vz_ms_tip_s_h; 
	rect.right = vz_ms_tip_s_w; 
	rect.bottom = height; 
	LCD_DrawRect(&lcd_dev_info, rect, GUI_RGB2RGB565(90, 95,98)); 
	 
	strs_w = 6*5; 
	rect.left = (vz_ms_tip_s_w-strs_w)/2; 
	rect.top = height+(vz_ms_tip_s_h-strs_h)/2-vz_ms_tip_s_h; 
	rect.right = rect.left + 50; 
	rect.bottom = rect.top + 30; 
	_text.wstr_ptr = yes;
	_text.wstr_len = MMIAPICOM_Wstrlen((wchar *)yes);
	vz_ms_print_text(&_text, &rect, 0); 
//右软件 
	vz_ms_gui_fill_rectangle(width - vz_ms_tip_s_w , height - vz_ms_tip_s_h , width , height , GUI_RGB2RGB565(215, 220,224)); 
	//vz_gui_draw_rectangle(width - vz_mystery_tip_s_w,height - vz_mystery_tip_s_h , width , height , GUI_RGB2RGB565(90, 95,98)); 
	rect.left = width - vz_ms_tip_s_w; 
	rect.top = height - vz_ms_tip_s_h; 
	rect.right = width; 
	rect.bottom = height; 
	LCD_DrawRect(&lcd_dev_info, rect, GUI_RGB2RGB565(90, 95,98));
 
	strs_w = 6*6; 
	rect.left = width +(vz_ms_tip_s_w-strs_w)/2 -vz_ms_tip_s_w; 
	rect.top = height+(vz_ms_tip_s_h-strs_h)/2-vz_ms_tip_s_h; 
	rect.right = rect.left + 80; 
	rect.bottom = rect.top + 30; 
	_text.wstr_ptr = no;
	_text.wstr_len = MMIAPICOM_Wstrlen((wchar *)no);
	vz_ms_print_text(&_text, &rect, 0); 
} 
 
//画失败界面 
void vz_ms_draw_tip_network_error_Ex(int width,int height) 
{ 
	int strs_w=20,strs_h=16; 
	U8 conn[300]={0};  
	GUI_RECT_T rect; 
	MMI_STRING_T _text; 
    GUI_LCD_DEV_INFO    lcd_dev_info = {GUI_MAIN_LCD_ID, GUI_BLOCK_MAIN}; 
#ifdef __VZGAME_EN__ 
	U8 con[256]={0x4E,0x00,0x65,0x00,0x74,0x00,0x77,0x00,0x6F,0x00,0x72,0x00,0x6B,0x00,0x20,0x00, 
0x74,0x00,0x69,0x00,0x6D,0x00,0x65,0x00,0x6F,0x00,0x75,0x00,0x74,0x00,0x2C,0x00, 
0x20,0x00,0x70,0x00,0x6C,0x00,0x65,0x00,0x61,0x00,0x73,0x00,0x65,0x00,0x20,0x00, 
0x72,0x00,0x65,0x00,0x74,0x00,0x72,0x00,0x79,0x00,0x21,0x00,};//Network timeout, please retry! 
	const U8 yes[]={0x52,0x00,0x65,0x00,0x74,0x00,0x72,0x00,0x79,0x00,0x00,0x00};//Retry 
	const U8 no[]={0x43,0x00,0x61,0x00,0x6E,0x00,0x63,0x00,0x65,0x00,0x6C,0x00,0x00,0x00}; //Cancel	 
#else 
	U8 con[256]={0x6D,0x60,0x9C,0x55,0xA8,0x60,0xC7,0x8F,0x73,0x51,0x01,0xFF,0x2F,0x65,0xD8,0x4E, 
		0x31,0x00,0x43,0x51,0xE7,0x7E,0xED,0x7E,0x0C,0xFF,0xB9,0x70,0xFB,0x51,0x6E,0x78, 
		0x9A,0x5B,0xE7,0x7E,0xED,0x7E,0x11,0x63,0x18,0x62,0x1F,0xFF,0x00,0x00};//恭喜您过关!支付1元继续,点击确定继续挑战? 
	const U8 yes[]={0x6E,0x78,0xA4,0x8B,0x00,0x00};//确定 
	const U8 no[]={0xD6,0x53,0x88,0x6D,0x00,0x00};  //取消 
#endif 
//	vz_mystery_isactive_tip = 7; 
    
	VzMS_draw_bg();  //add by kitty 
	 
	VzMS_time_score_draw();			   
	 
	vz_ms_gui_fill_rectangle(vz_ms_tip_lr, vz_ms_tip_top, width-vz_ms_tip_lr, height-vz_ms_tip_bottom, GUI_RGB2RGB565(215, 220,224));//黑色背景 
	//vz_gui_draw_rectangle(vz_mystery_tip_lr, vz_mystery_tip_top, width-vz_mystery_tip_lr, height-vz_mystery_tip_bottom, GUI_RGB2RGB565(90, 95,98));//边框 
    rect.left = vz_ms_tip_lr; 
	rect.top = vz_ms_tip_top; 
	rect.right = width-vz_ms_tip_lr; 
	rect.bottom = height-vz_ms_tip_bottom; 
	LCD_DrawRect(&lcd_dev_info, rect, GUI_RGB2RGB565(90, 95,98)); 
	MMIAPICOM_Wstrcpy((wchar *)conn, (const wchar *)con); 
#if 0 
	vz_mystery_DrawTextarea(vz_mystery_tip_lr+2, vz_mystery_tip_top+2, width-vz_mystery_tip_lr, height-vz_mystery_tip_bottom , conn , GUI_RGB2RGB565(59, 64, 66),1); 
#else 
    _text.wstr_ptr = (wchar *)conn; 
    _text.wstr_len = MMIAPICOM_Wstrlen((wchar *) conn); 
	rect.left = vz_ms_tip_lr+2; 
	rect.top = vz_ms_tip_top+2; 
	rect.right = width-vz_ms_tip_lr; 
	rect.bottom = height-vz_ms_tip_bottom ; 
	vz_ms_print_text(&_text, &rect, GUI_RGB2RGB565(59, 64, 66)); 
#endif 
//左软件 
#if 1 
	vz_ms_gui_fill_rectangle(0,height - vz_ms_tip_s_h , vz_ms_tip_s_w , height , GUI_RGB2RGB565(215, 220,224)); 
	//vz_gui_draw_rectangle(-1,height - vz_mystery_tip_s_h , vz_mystery_tip_s_w , height , GUI_RGB2RGB565(90, 95,98)); 
	rect.left = 0; 
	rect.top = height - vz_ms_tip_s_h; 
	rect.right = vz_ms_tip_s_w; 
	rect.bottom = height; 
	LCD_DrawRect(&lcd_dev_info, rect, GUI_RGB2RGB565(90, 95,98)); 
	 
	strs_w = 6*5; 
	rect.left = (vz_ms_tip_s_w-strs_w)/2; 
	rect.top = height+(vz_ms_tip_s_h-strs_h)/2-vz_ms_tip_s_h; 
	rect.right = rect.left + 50; 
	rect.bottom = rect.top + 30; 
	_text.wstr_ptr = yes; 
	_text.wstr_len = MMIAPICOM_Wstrlen((wchar *)yes); 
	vz_ms_print_text(&_text, &rect, 0); 
#endif 
//右软件 
	vz_ms_gui_fill_rectangle(width - vz_ms_tip_s_w , height - vz_ms_tip_s_h , width , height , GUI_RGB2RGB565(215, 220,224)); 
	//vz_gui_draw_rectangle(width - vz_mystery_tip_s_w,height - vz_mystery_tip_s_h , width , height , GUI_RGB2RGB565(90, 95,98)); 
	rect.left = width - vz_ms_tip_s_w; 
	rect.top = height - vz_ms_tip_s_h; 
	rect.right = width; 
	rect.bottom = height; 
	LCD_DrawRect(&lcd_dev_info, rect, GUI_RGB2RGB565(90, 95,98)); 
 
	strs_w = 6*6; 
	rect.left = width +(vz_ms_tip_s_w-strs_w)/2 -vz_ms_tip_s_w; 
	rect.top = height+(vz_ms_tip_s_h-strs_h)/2-vz_ms_tip_s_h; 
	rect.right = rect.left + 80; 
	rect.bottom = rect.top + 30; 
	_text.wstr_ptr = no; 
	_text.wstr_len = MMIAPICOM_Wstrlen((wchar *)no); 
	vz_ms_print_text(&_text, &rect, 0); 
} 
 
//画提示界面
void vz_ms_draw_tip_screen_Ex(int width,int height) 
{
	int strs_w=20,strs_h=16;
	U8 conn[300]={0}; 
	GUI_RECT_T rect;
	MMI_STRING_T _text;
    GUI_LCD_DEV_INFO    lcd_dev_info = {GUI_MAIN_LCD_ID, GUI_BLOCK_MAIN};
#ifdef __VZGAME_EN__
	U8 con[256]={0x49,0x00,0x66,0x00,0x20,0x00,0x79,0x00,0x6F,0x00,0x75,0x00,0x20,0x00,0x77,0x00,
			0x61,0x00,0x6E,0x00,0x74,0x00,0x20,0x00,0x74,0x00,0x6F,0x00,0x20,0x00,0x63,0x00,
			0x6F,0x00,0x6E,0x00,0x74,0x00,0x69,0x00,0x6E,0x00,0x75,0x00,0x65,0x00,0x20,0x00,
			0x74,0x00,0x6F,0x00,0x20,0x00,0x65,0x00,0x6E,0x00,0x6A,0x00,0x6F,0x00,0x79,0x00,
			0x20,0x00,0x74,0x00,0x68,0x00,0x65,0x00,0x20,0x00,0x67,0x00,0x61,0x00,0x6D,0x00,
			0x65,0x00,0x2C,0x00,0x20,0x00,0x79,0x00,0x6F,0x00,0x75,0x00,0x20,0x00,0x6D,0x00,
			0x75,0x00,0x73,0x00,0x74,0x00,0x20,0x00,0x61,0x00,0x63,0x00,0x74,0x00,0x69,0x00,
			0x76,0x00,0x61,0x00,0x74,0x00,0x65,0x00,0x20,0x00,0x69,0x00,0x74,0x00,0x2C,0x00,
			0x20,0x00,0x63,0x00,0x6F,0x00,0x6E,0x00,0x74,0x00,0x69,0x00,0x6E,0x00,0x75,0x00,
			0x65,0x00,0x20,0x00,0x6F,0x00,0x72,0x00,0x20,0x00,0x6E,0x00,0x6F,0x00,0x74,0x00,
			0x3F,0x00,0x20,0x00,0x54,0x00,0x61,0x00,0x72,0x00,0x69,0x00,0x66,0x00,0x66,0x00,
			0x3A,0x00,0x20,0x00,0x00,0x00};//If you want to continue to enjoy the game, you must activate it, continue or not? Tariff:  
	U8 con_suffix[64]={0x2E,0x00,0x20,0x00,0x48,0x00,0x65,0x00,0x6C,0x00,0x70,0x00,0x6C,0x00,0x69,0x00, 
			0x6E,0x00,0x65,0x00,0x3A,0x00,0x20,0x00,0x31,0x00,0x38,0x00,0x30,0x00,0x30,0x00, 
			0x31,0x00,0x38,0x00,0x35,0x00,0x35,0x00,0x30,0x00,0x31,0x00,0x38,0x00,0x30,0x00, 
			0x00,0x00};//. Helpline: 180018550180    
			 
	U8 con_notariff[256]={0x49,0x00,0x66,0x00,0x20,0x00,0x79,0x00,0x6F,0x00,0x75,0x00,0x20,0x00,0x77,0x00, 
	0x61,0x00,0x6E,0x00,0x74,0x00,0x20,0x00,0x74,0x00,0x6F,0x00,0x20,0x00,0x63,0x00, 
	0x6F,0x00,0x6E,0x00,0x74,0x00,0x69,0x00,0x6E,0x00,0x75,0x00,0x65,0x00,0x20,0x00, 
	0x74,0x00,0x6F,0x00,0x20,0x00,0x65,0x00,0x6E,0x00,0x6A,0x00,0x6F,0x00,0x79,0x00, 
	0x20,0x00,0x74,0x00,0x68,0x00,0x65,0x00,0x20,0x00,0x67,0x00,0x61,0x00,0x6D,0x00, 
	0x65,0x00,0x2C,0x00,0x20,0x00,0x79,0x00,0x6F,0x00,0x75,0x00,0x20,0x00,0x6D,0x00, 
	0x75,0x00,0x73,0x00,0x74,0x00,0x20,0x00,0x61,0x00,0x63,0x00,0x74,0x00,0x69,0x00, 
	0x76,0x00,0x61,0x00,0x74,0x00,0x65,0x00,0x20,0x00,0x69,0x00,0x74,0x00,0x2C,0x00, 
	0x20,0x00,0x63,0x00,0x6F,0x00,0x6E,0x00,0x74,0x00,0x69,0x00,0x6E,0x00,0x75,0x00, 
	0x65,0x00,0x20,0x00,0x6F,0x00,0x72,0x00,0x20,0x00,0x6E,0x00,0x6F,0x00,0x74,0x00, 
	0x3F,0x00,0x00,0x00};//If you want to continue to enjoy the game, you must activate it, continue or not?  
	const U8 yes[]={0x59,0x00,0x45,0x00,0x53,0x00,0x00,0x00};
	const U8 no[]={0x4E,0x00,0x4F,0x00,0x00,0x00}; 
	
#else
	U8 con[256]={0x6D,0x60,0x9C,0x55,0xA8,0x60,0xC7,0x8F,0x73,0x51,0x01,0xFF,0x2F,0x65,0xD8,0x4E,
		0x31,0x00,0x43,0x51,0xE7,0x7E,0xED,0x7E,0x0C,0xFF,0xB9,0x70,0xFB,0x51,0x6E,0x78,
		0x9A,0x5B,0xE7,0x7E,0xED,0x7E,0x11,0x63,0x18,0x62,0x1F,0xFF,0x00,0x00};//恭喜您过关!支付1元继续,点击确定继续挑战?
	const U8 yes[]={0x6E,0x78,0xA4,0x8B,0x00,0x00};//确定
	const U8 no[]={0xD6,0x53,0x88,0x6D,0x00,0x00};  //取消
#endif
//	vz_mystery_isactive_tip = 1; 
    
	VzMS_draw_bg();  //add by kitty 
	 
	VzMS_time_score_draw();			   
	 
	vz_ms_gui_fill_rectangle(vz_ms_tip_lr, vz_ms_tip_top, width-vz_ms_tip_lr, height-vz_ms_tip_bottom, GUI_RGB2RGB565(215, 220,224));//黑色背景 
	//vz_gui_draw_rectangle(vz_mystery_tip_lr, vz_mystery_tip_top, width-vz_mystery_tip_lr, height-vz_mystery_tip_bottom, GUI_RGB2RGB565(90, 95,98));//边框 
    rect.left = vz_ms_tip_lr; 
	rect.top = vz_ms_tip_top; 
	rect.right = width-vz_ms_tip_lr; 
	rect.bottom = height-vz_ms_tip_bottom; 
	LCD_DrawRect(&lcd_dev_info, rect, GUI_RGB2RGB565(90, 95,98));
#ifdef __VZGAME_EN__ 
       if(Vzf_get_manul_fee_channel()==0) 
		MMIAPICOM_Wstrcpy((wchar *)conn, (const wchar *)con_notariff); 
       else 
		vz_ms_SetGameTips((WCHAR *)con , (WCHAR *)conn); 
       //MMIAPICOM_Wstrcat((wchar *)conn, (const wchar *)con_suffix);//泰国申请通道需要增加的提示 
#else
	MMIAPICOM_Wstrcpy((wchar *)conn, (const wchar *)con);
#endif
#if 0
	vz_mystery_DrawTextarea(vz_mystery_tip_lr+2, vz_mystery_tip_top+2, width-vz_mystery_tip_lr, height-vz_mystery_tip_bottom , conn , GUI_RGB2RGB565(59, 64, 66),1); 
#else
    _text.wstr_ptr = (wchar *)conn;
    _text.wstr_len = MMIAPICOM_Wstrlen((wchar *) conn);
	rect.left = vz_ms_tip_lr+2; 
	rect.top = vz_ms_tip_top+2; 
	rect.right = width-vz_ms_tip_lr; 
	rect.bottom = height-vz_ms_tip_bottom ; 
	vz_ms_print_text(&_text, &rect, GUI_RGB2RGB565(59, 64, 66)); 
#endif 
//左软件 
	vz_ms_gui_fill_rectangle(0,height - vz_ms_tip_s_h , vz_ms_tip_s_w , height , GUI_RGB2RGB565(215, 220,224)); 
	//vz_gui_draw_rectangle(-1,height - vz_mystery_tip_s_h , vz_mystery_tip_s_w , height , GUI_RGB2RGB565(90, 95,98)); 
	rect.left = 0;
	rect.top = height - vz_ms_tip_s_h; 
	rect.right = vz_ms_tip_s_w; 
	rect.bottom = height; 
	LCD_DrawRect(&lcd_dev_info, rect, GUI_RGB2RGB565(90, 95,98));

	rect.left = (vz_ms_tip_s_w-strs_w)/2; 
	rect.top = height+(vz_ms_tip_s_h-strs_h)/2-vz_ms_tip_s_h; 
	rect.right = rect.left + 50; 
	rect.bottom = rect.top + 30; 
	_text.wstr_ptr = yes;
	_text.wstr_len = MMIAPICOM_Wstrlen((wchar *)yes);
	vz_ms_print_text(&_text, &rect, 0); 
//右软件 
	vz_ms_gui_fill_rectangle(width - vz_ms_tip_s_w , height - vz_ms_tip_s_h , width , height , GUI_RGB2RGB565(215, 220,224)); 
	//vz_gui_draw_rectangle(width - vz_mystery_tip_s_w,height - vz_mystery_tip_s_h , width , height , GUI_RGB2RGB565(90, 95,98)); 
	rect.left = width - vz_ms_tip_s_w; 
	rect.top = height - vz_ms_tip_s_h; 
	rect.right = width; 
	rect.bottom = height; 
	LCD_DrawRect(&lcd_dev_info, rect, GUI_RGB2RGB565(90, 95,98));

	rect.left = width +(vz_ms_tip_s_w-strs_w)/2 -vz_ms_tip_s_w; 
	rect.top = height+(vz_ms_tip_s_h-strs_h)/2-vz_ms_tip_s_h; 
	rect.right = rect.left + 30;
	rect.bottom = rect.top + 20;
	_text.wstr_ptr = no;
	_text.wstr_len = MMIAPICOM_Wstrlen((wchar *)no);
	vz_ms_print_text(&_text, &rect, 0); 
 
} 
void vz_ms_link_ok(void) 
{ 
	VzMS_stat=VZMS_STATE_SHOW_ACTIVE_MSG; 
} 
 
void vz_ms_link_error(void) 
{ 
	VzMS_stat=VZMS_STATE_LINK_ERROR; 
} 
 
void VzMS_time_score_draw() 
{ 
    char VzMS_str1[10]={0}; 
    char VzMS_str2[10]={0}; 
    char VzMS_buffer1[10]={0}; 
    char VzMS_buffer2[10]={0}; 
    int i=0; 
    wchar   wstr[40] = {0}; 
	 
    GUISTR_STYLE_T str_style ={0}; 
    MMI_STRING_T  temp_str = {0}; 
    GUI_LCD_DEV_INFO    lcd_dev_info = {GUI_MAIN_LCD_ID, GUI_BLOCK_MAIN};	 
	GUI_RECT_T      rect =MMITHEME_GetFullScreenRect(); 	 
	 
    str_style.font = vx_ms_newfont; 
    str_style.font_color = MMI_WHITE_COLOR; 
    str_style.align = ALIGN_LEFT; 
	 
    //vz_gui_set_font(&vx_ms_newfont); 
 
//显示游戏时间和分数 
    //sprintf(VzMS_str1, "%d",VzMS_mouse_time/10); 
    //vz_mmi_asc_to_ucs2(VzMS_buffer1, VzMS_str1); 
	 
    sprintf(VzMS_str1, "%d", VzMS_mouse_time/10); 
    temp_str.wstr_len = strlen((char*)VzMS_str1);      
    temp_str.wstr_ptr = wstr; 
    MMI_STRNTOWSTR( wstr, 12, VzMS_str1, 12, temp_str.wstr_len ); 
	 
 //VzMS_draw_Text(VzMS_bg_time_x, VzMS_bg_time_y , MMI_WHITE_COLOR ,(GUISTR_STYLE_T)temp_str , 0 ,MMI_WHITE_COLOR);     
    if(PNULL != temp_str.wstr_ptr && 0 != temp_str.wstr_len) 
    {	 
		rect.left = VzMS_bg_time_x; 
		rect.top = VzMS_bg_time_y; 
		rect.right = rect.left+128; 
		rect.bottom = rect.top+30; 
	    GUISTR_DrawTextToLCDInRect(  
	                                    &lcd_dev_info,  
	                                    &rect,  
	                                    &rect, 
	                                    &temp_str, 
	                                    &str_style, 
	                                    GUISTR_STATE_ALIGN, 
	                                    0); //分数	     
    } 
     
 
    //sprintf(VzMS_str2, "%d", VzMS_mouse_score); 
    //vz_mmi_asc_to_ucs2(VzMS_buffer2, VzMS_str2); 
     
    sprintf(VzMS_str2, "%d", VzMS_mouse_score); 
    temp_str.wstr_len = strlen((char*)VzMS_str2);      
    temp_str.wstr_ptr = wstr; 
    MMI_STRNTOWSTR( wstr, 12, VzMS_str2, 12, temp_str.wstr_len ); 
 // VzMS_draw_Text(VzMS_bg_score_x, VzMS_bg_time_y , MMI_WHITE_COLOR ,(GUISTR_STYLE_T)temp_str , 0 ,MMI_WHITE_COLOR); 
    if(PNULL != temp_str.wstr_ptr && 0 != temp_str.wstr_len) 
    {	 
		rect.left = VzMS_bg_score_x; 
		rect.top = VzMS_bg_time_y; 
		rect.right = rect.left+128; 
		rect.bottom = rect.top+30; 
	    GUISTR_DrawTextToLCDInRect(  
	                                    &lcd_dev_info,  
	                                    &rect,  
	                                    &rect, 
	                                    &temp_str, 
	                                    &str_style, 
	                                    GUISTR_STATE_ALIGN, 
	                                    0); //分数	     
    } 
} 
 
//画地鼠出现的位置VzMS_mouse_rand 
void VzMS_draw_mouse() 
{ 
     
        //vz_gdi_layer_clear_background(VZ_GDI_COLOR_MAGENTA);//清除 
    int i = 0; 
    for(i=0; i<9; i++) 
    { 
        if(VzMS_mouse[i]>0)//第i个位置出现老鼠 
    	{ 
            //vz_gdi_DP_clip_Ext2(VzMS_mouse_x+i%3*VzMS_mouse_dx, VzMS_mouse_y+i/3*VzMS_mouse_dy, VzMS_mouse_pic_w, VzMS_mouse_pic_h, 0, 0, IMG_VZ_MS_SUSLIKS); 
			VzPlyHst_image_display(IMG_VZ_MS_SUSLIKS, ms_newwin_id, VzMS_mouse_x+i%3*VzMS_mouse_dx, VzMS_mouse_y+i/3*VzMS_mouse_dy, VzMS_mouse_pic_w, VzMS_mouse_pic_h, 0, 0); 
		} 
    } 
 
} 
 
//画打中和没打中地鼠 
void VzMS_draw_hit_mouse() 
{ 
    //vz_gdi_layer_set_active(gdi_VzMSRole);//激活gdi_VzBSRole层 
     
//时间停留5秒 
if(VzMS_mouse_hit_time<5) 
{//成功打中 
    if(VzMS_mouse_success==1) 
    	{ 
        //vz_gdi_DP_clip_Ext2(VzMS_mouse_x+(VzMS_mouse_key-1)%3*VzMS_mouse_dx, VzMS_mouse_y+(VzMS_mouse_key-1)/3*VzMS_mouse_dy, VzMS_mouse_pic_w, VzMS_mouse_pic_h, 0, VzMS_mouse_pic_h, IMG_VZ_MS_SUSLIKS); 
		VzPlyHst_image_display(IMG_VZ_MS_SUSLIKS, ms_newwin_id, VzMS_mouse_x+(VzMS_mouse_key-1)%3*VzMS_mouse_dx, VzMS_mouse_y+(VzMS_mouse_key-1)/3*VzMS_mouse_dy, VzMS_mouse_pic_w, VzMS_mouse_pic_h, 0, VzMS_mouse_pic_h); 
		VzMS_mouse[VzMS_mouse_key-1]=0; 
		}//没有打中 
    else if(VzMS_mouse_success==2) 
        //vz_gdi_DP_clip_Ext2(VzMS_mouse_x+(VzMS_mouse_key-1)%3*VzMS_mouse_dx, VzMS_mouse_y+(VzMS_mouse_key-1)/3*VzMS_mouse_dy, VzMS_mouse_pic_w, VzMS_mouse_pic_h, 0, VzMS_mouse_pic_h*2, IMG_VZ_MS_SUSLIKS); 
		VzPlyHst_image_display(IMG_VZ_MS_SUSLIKS, ms_newwin_id, VzMS_mouse_x+(VzMS_mouse_key-1)%3*VzMS_mouse_dx, VzMS_mouse_y+(VzMS_mouse_key-1)/3*VzMS_mouse_dy, VzMS_mouse_pic_w, VzMS_mouse_pic_h, 0, VzMS_mouse_pic_h*2); 
 
	VzMS_mouse_hit_time++; 
}else 
{ 
    VzMS_mouse_success=0; 
} 
} 
 
void VzMS_game_screen() 
{ 
	//vz_gdi_layer_set_active(gdi_VzMSRole);//激活gdi_VzBSRole层 
	//vz_gdi_layer_clear_background(VZ_GDI_COLOR_MAGENTA);//清除 
		//显示游戏时间和分数    
	VzMS_draw_bg();  //add by kitty 
	 
	VzMS_time_score_draw();			    
	VzMS_draw_mouse(); 
	VzMS_draw_hit_mouse(); 
 
} 
 
void VzMS_Repaint() 
{ 
	switch(VzMS_stat) 
		{ 
			case VZMS_STATE_MAIN_MENU:	 
				//VzMS_draw_exit_screen();  //delete by kitty 
				VzMS_game_screen(); 
				break; 
			case VZMS_GAMEOVER_MENU: 
			VzMS_draw_exit_screen(); 
			//VzMS_game_screen(); 
				break; 
			case VZMS_STATE_SHOW_ACTIVE_MSG: 
				vz_ms_draw_tip_screen_Ex(240, 320); 
				break; 
			case VZMS_STATE_LINK_ERROR: 
				vz_ms_draw_tip_network_error_Ex(240, 320); 
				break; 
			case VZMS_STATE_LINK_WAITING: 
				vz_ms_draw_network_waiting_screen(); 
				break; 
			case VZMS_STATE_SHOW_COMFIRM_MSG: 
				vz_ms_draw_confirm_tips_screen(); 
				break; 
			case VZMS_STATE_ACTIVER_WAITING: 
				vz_ms_draw_wanting_screen(); 
				break; 
			case VZMS_STATE_ACTIVER_SUCCESS: 
				vz_ms_draw_tip_success_Ex(240, 320); 
				break; 
			case VZMS_STATE_ACTIVER_FAIL: 
				vz_ms_draw_tip_failure_Ex(240, 320); 
				break; 
		} 
} 
 
void VzMS_out_in_mouse(int time_out, int time_in) 
{ 
    int i=0; 
    if((VzMS_mouse_time+2)%time_out==0)//间隔1.5秒出现地鼠 
    	{ 
 
                VzMS_mouse_rand=VzMS_RandomEvent_Random(0,8); 
                while((VzMS_mouse_key-1)==VzMS_mouse_rand) 
 
    		{ 
                VzMS_mouse_rand=VzMS_RandomEvent_Random(0,8); 
    		} 
                VzMS_mouse[VzMS_mouse_rand]=time_in; 
    	} 
        for(i=0; i<9; i++) 
    	{ 
            if(VzMS_mouse[i]>0) 
    		{ 
            VzMS_mouse[i]--; 
    		} 
    	} 
} 
 
//产生地鼠和消失的处理 
void VzMS_logic() 
{ 
	  
    VzMS_mouse_time--; 
    if(VzMS_mouse_time>=200)//游戏时间1-10秒 
    { 
        VzMS_out_in_mouse(VzMS_out1, VzMS_in1); 
		 
    } 
    else if(VzMS_mouse_time>=100)//游戏时间11-20秒 
    { 
        VzMS_out_in_mouse(VzMS_out2, VzMS_in2); 
 
    } 
    else if(VzMS_mouse_time>=0)//游戏时间21-30秒 
    { 
        VzMS_out_in_mouse(VzMS_out3, VzMS_in3); 
		 
    	 
    }else 
    	{ 
		   VzMS_ChangeState(VZMS_GAMEOVER_MENU); 
 
		} 
 
 
	 
} 
 
/*****************************************************************************/ 
//  FUNCTION:     Playhamster_GameGoing 
//  Description :    
//  Global resource dependence : s_snake_timer 
//  Author:       peilong.zhou 
//  Note:    
/*****************************************************************************/ 
PUBLIC void  Playhamster_GameGoing(MMI_WIN_ID_T win_id) 
{ 
    if (0 != VzPlayhamster_timer)   
    { 
        MMK_StopTimer(VzPlayhamster_timer); 
        VzPlayhamster_timer = 0; 
    }     
	 
    #ifdef __VZGAME_EN__ 
	if(VzMS_stat ==VZMS_STATE_ACTIVER_WAITING) 
	{ 
		if(vz_sms_callback_value == 1) 
			VzMS_stat = VZMS_STATE_ACTIVER_SUCCESS;//成功 
		else if(vz_sms_callback_value == 0) 
			VzMS_stat = VZMS_STATE_ACTIVER_FAIL;//失败 
		else if(vz_sms_callback_value == 2) 
			VzMS_stat = VZMS_STATE_LINK_ERROR;//失败 
	} 
   #endif 
    
    switch(VzMS_stat) 
	{ 
		case VZMS_STATE_MAIN_MENU:		 
       		VzMS_logic(); 
			break; 
		case VZMS_GAMEOVER_MENU: 
			//VzMS_logic(); 
			break; 
	} 
	VzMS_Repaint(); 
 
		 
	//if(VzPlayhamste_game_time == 150 && (vz_APP_fee_ready()==1))//激活提示 
#if 0 
	if(0 && (vz_APP_fee_ready()==1))//激活提示 
	{ 
		MMK_StopTimer(VzPlayhamster_timer); 
	        Vzf_ph_a_flang = 1; 
		Plane_Sublocks_MsgBox(); 
		return; 
	} 
#endif 
 
	if(Vzf_ph_a_flang == 0) 
	{ 
		if(VzPlayhamster_timer==0) 
			VzPlayhamster_timer = MMK_CreateTimer( 100, FALSE); 
	} 
} 
 
#endif