资源描述:
《MTK上开发的游戏源代码》由会员上传分享,免费在线阅读,更多相关内容在教育资源-天天文库。
1、MTK上开发的游戏源代码-------推箱子去掉了数据部分和内核。,留下了框架供大家学习MTK平台开发。--------------#include"GlobalDefs.h"#include"HistoryGprot.h"#include"GlobalConstants.h"#include"MMI_features.h"#include"PixtelDataTypes.h"#include"Unicodexdcl.h"#include"gui.h"#include"Calculator.h"#include"SettingProfile.h"#include"
2、ProfileGprots.h"#include"Globaldefs.h"#include"CustDataRes.h"#include"gui_themes.h"#include"wgui_categories.h"#include"wgui_softkeys.h"#include"HistoryGprot.h"#include"OrganizerDef.h"#include"GameDefs.h"#defineMTK_GUANSHU40#definePUSH_LCD_WIDTH 176#definePUSH_LCD_HEIGHT220staticconst
3、charMTK_DATA[MTK_GUANSHU][80]={{1,1,1,1,1,1,1,1,1,1, 1,0,0,0,1,3,0,1,1,1, 1,3,0,0,2,0,0,1,1,1, 1,1,2,1,1,0,0,1,1,1, 1,0,0,1,1,2,1,1,1,1, 1,0,0,4,0,0,0,1,1,1, 1,0,3,1,0,0,0,1,1,1, 1,1,1,1,1,1,1,1,1,1}};typedefstruct{ INT16X; INT16Y; }MTK_POS;typedefstruct{ UINT8Data1;
4、 UINT8Data2; } MTK_sg_PUSHBOXSTRUCT;staticMTK_sg_PUSHBOXSTRUCTg_Pushbox;staticcharConfig_Passs=1;enum{ PushSharp_Blank,PushSharp_Bar,PushSharp_Box ,PushSharp_Goal,PushSharp_Boxer,PushSharp_Ok}e_PushSharp;voidGame_Push_Null(void){return;}/*Name:Calculate Desc:Calculatethecurrent
5、positionoftheblock Return:noreturnvalue Author:helloworld*/staticvoidGame_Push_Calculate(UINT8val){UINT8row;UINT8col;//kal_prompt_trace(MOD_MMI,"[Push-->Game_Push_Calculate,val=%d]",val);row=val/10;col=val-row*10;kal_prompt_trace(MOD_MMI,"[Push-->Game_Push_Calculate,row=%d,col
6、=%d ]",row,col);g_Pushbox.BoxPos.X=15*col+14;g_Pushbox.BoxPos.Y=15*row+24;}staticvoidUIFDrawBitmap(S32offset_x,S32offset_y,U16image_id){//kal_prompt_trace(MOD_MMI,"[Push-->UIFDrawBitmap,image_id=%d]",image_id);pixtel_UI_lock_double_buffer();//pixtel_UI_reset_clip();pixtel_UI_sh
7、ow_image(offset_x,(offset_y+20),(UI_image_type)GetImage(image_id));pixtel_UI_unlock_double_buffer();pixtel_UI_BLT_double_buffer(0,0,PUSH_LCD_WIDTH,PUSH_LCD_HEIGHT); }staticshortGame_Push_Itou(short*pOutStr,longInNum){//0:ox0030charNumString[10];shorti,j;shortNumLen;//位数memset(NumStri
8、ng,'