📄 our_p_main.h
字号:
/**************************************************************************
Copyright (C) jianbo miao Corporation. All Rights Released.
this is a 3d engin named our_3d_engin.
our_3d_engin feature:
1:there is no float.
2:it do the 3d things all by softwear.
3:base on 1 and 2 , it can execution on arm which have no 3d hardwear accelerate.
if you have any suggestion or question,pls contact with me
mail:miaojb@126.com
msn:miaojianbo@hotmail.com
qq:30209027
2008/01/01
***************************************************************************/
#ifndef OUR_MAIN_H
#define OUR_MAIN_H
/*
#include "our_lib\our_math.h"
#include "our_lib\our_3d.h"
#include "our_lib\our_cpu.h"
#include "our_lib\our_physics.h"
*/
#include "our_math.h"
#include "our_3d.h"
#include "our_cpu.h"
#include "our_physics.h"
//#define OUR_3D_ 1
//==========================
//#define ITEM_PAGES 6
#define ITEM_PAGES_max 10
//==========================
//=======功能删除表=========
#define PTVR_NEED 1
#define FETION_NEED 1
#if FETION_NEED==0
#define num_Fetion -1
#endif
//=======================================================
//=======================================================
#define SCREEN_240_320 1
#define SCREEN_240_400 2
#define SCREEN_320_480 3
#define SCREEN_480_320 4
#ifdef OUR_3D_
#define SCREEN SCREEN_320_480
#else
#define SCREEN SCREEN_320_480
//#define SCREEN SCREEN_480_320
//#define SCREEN SCREEN_240_320
#endif
#if SCREEN==SCREEN_320_480
#define LCD_W (320)
#define LCD_H (480)
#elif SCREEN==SCREEN_480_320
#if 0
#define LCD_W (800)
#define LCD_H (600)
#else
#define LCD_W (480)
#define LCD_H (320)
#endif
#elif SCREEN==SCREEN_240_320
#define LCD_W (240)
#define LCD_H (320)
#elif SCREEN==SCREEN_240_400
#define LCD_W (240)
#define LCD_H (400)
#endif
//----------------------
#define SLEEP_MS 60
//==========================
//evry project have those ===========================
#define OUR_KEY_LEFT (37)
#define OUR_KEY_RIGHT (39)
#define OUR_KEY_UP (38)
#define OUR_KEY_DOWN (40)
#define OUR_KEY_OK (46)
#define OUR_KEY_BACK (34)//page down
#define OUR_KEY_OUT (35)//delete
#define OUR_KEY_FIRST (13)//enter
#define OUR_KEY_POWER OUR_KEY_FIRST
#define OUR_KEY_LOCK (83) //s
#define OUR_KEY_UNLOCK (65) // a
#define OUR_MOUSE_BASE (1000)
#define OUR_MOUSE_UP (OUR_MOUSE_BASE+1)
#define OUR_MOUSE_DOWN (OUR_MOUSE_BASE+2)
#define OUR_MOUSE_MOVE (OUR_MOUSE_BASE+3)
#define OUR_MMI_IDLE (0)
#define OUR_MMI_POWEROFF (1)
#define OUR_MMI_WALL (2)//page down
#define OUR_MMI_IPOD (3)//delete
#define OUR_MMI_IPOD_list (4)//delete
#define OUR_MMI_demo (7)//delete
#define OUR_MMI_extern (8)//delete
#define ID_DI_BASE 500
#define BEISHU 9
#define BEI_SHIFT 3
enum //for the 3 status of MMI_STATU.statu
{
OUR_MMI_TOP,
OUR_MMI_SUB,
// OUR_MMI_OPT,
};
enum //for the 3 status of MMI_STATU.opt_dir
{
OUR_MMI_LEFT,
OUR_MMI_RIGHT,
OUR_MMI_STATIC,
};
enum //for the 3 status of MMI_STATU.opt_dir
{
num_sms,///
num_calendar,//
num_photo,///
num_camera,///
num_player,//mp4///
num_smartstock,///
num_qq,///
num_msn,///
num_clock,///
num_calculator,///
//num_contacts,
num_settings,///
num_file,///
num_writesms,///
#if PTVR_NEED
num_ptvr,
#endif
num_dictionary,
//num_fun_game,
num_ebook,//----
num_recorder,
num_vrecorder,
num_game,
num_msgbox,
num_bluetooth,
num_shortcut,//---23
//num_map,
num_note,
num_stopwatch,
num_ucweb,
num_extra,
num_recents,//----
num_java,
num_profiles,
num_fm,
num_poker,
num_block,
num_timetable,//----
num_chess,
//num_call_log,
num_currencies,
num_fathom,//----
num_health,
num_maund,
num_missed_c,
num_search,
//num_weather,
num_reader,//45
num_wallpaper,
#if FETION_NEED
num_Fetion,
#endif
num_call,
num_contacts,
num_web,
num_ipod,
num_datatime,
num_end,
};
typedef struct
{
int key;
int x,y;
int time;
}OUR_EVENT;
//==========================
//==========================
#define BMP_START 5
//==========================
#define THREE_NUM 5
#define CLR_BC 0x0A
//48*12=576
#define X_STEP_MO 5
#define Y_STEP_MO 5
#define P_NUM_IPOD ((X_STEP_MO+1)*(Y_STEP_MO+2))
//100*40=4K
#define T_NUM_IPOD (X_STEP_MO*Y_STEP_MO*4)
#define P_NUM 1500
//100*40=4K
#define T_NUM 1500
//48*12=576
#define P_NUM2 (6)
//100*40=4K
#define T_NUM2 (6)
/*
enum
{
KEY_UP,
KEY_DOWN,
KEY_LEFT,
KEY_RIGHT,
};*/
//---------------------------------------------------//8K
typedef struct
{
UINT FrameTH;
UINT point_changed_num;
UINT triangle_drawed_num;
UINT point_do1[P_NUM]; //48*4=192
UINT Triangle_do1[T_NUM]; //400
FIX_POINT3D point_org1[P_NUM]; //576
FIX_POINT3D point_nor1[P_NUM]; //576
FIX_POINT3D point_work1[P_NUM]; //576
CLR clr_work1[P_NUM*3]; //576
OUR_3D_TRAG triangle_work1[T_NUM]; //4K
OUR_3D_CAM cam_work; //96
OUR_3D_OBJ obj;
//OUR_3D_OBJ obj_P[5]; //180*5=900
FIX_POINT3D point_obj_pos; //12
OUR_3D_LIT point_lit; //36
OUR_3D_LIT c_lit; //36
///=============================================
#if 0
UINT point_do2[P_NUM2]; //48*4=192
UINT Triangle_do2[T_NUM2]; //400
FIX_POINT3D point_org2[P_NUM2]; //576
FIX_POINT3D point_nor2[P_NUM2]; //576
FIX_POINT3D point_work2[P_NUM2]; //576
CLR clr_work2[P_NUM2*3]; //576
OUR_3D_TRAG triangle_work2[T_NUM2]; //4K
OUR_3D_CAM cam_work2; //96
OUR_3D_OBJ obj2;
#endif
//LARGE_INTEGER TIME;
}OUR_GLOBAL,*OUR_GLOBAL_PTR;
extern OUR_GLOBAL global;/**/
typedef struct
{
UINT T;
UINT T2;
UINT T3;
}OUR_INFO,*OUR_INFO_PTR;
typedef struct
{
OUR_FIZIK_X_STAT dile_fizik;
int moving; //action status
int moving_count; //for the 4 degree
int pageth;
int statu;
int dir;
int dir_step;
int open;
int open_step;
int mouse_statu;
int mouse_statu_old;
int mouse_x;
int mouse_y;
int mouse_x_old;
int mouse_y_old;
int mouse_time_old;
int mouse_time;
int picked_up_id;
int kick_id;
int next_id;
int picked_up_x;
int picked_up_y;
int chage_page_en;
int next_level;
int language;
int text_scrol;
}MMI_STATU;
extern MMI_STATU mmi_statu;
typedef void (*OUR_3D_HILIT_funptr)(void);
typedef struct
{
int id;
//int x,y;
OUR_BMP_INFO_PTR bmp[4];
OUR_BMP_INFO_PTR bmp_txt[2];
OUR_BMP_INFO_PTR bmp_next;
OUR_3D_HILIT_funptr hili_fun;
}MMI_ELE;
//============================================
extern UCHAR *video_buffer;
typedef int (*MAIN_FUN)(UCHAR *video_buffer2, OUR_EVENT* our_event, int* INFO);
int OUR_3D_Init(void);
int OUR_3D_Main(UCHAR *video_buffer2, OUR_EVENT* our_event, int* INFO);
void OUR_3D_windowid_set(int win_id);
void OUR_debug(int x,int y);
void OUR_set_text_clip(int x0,int y0,int x1,int y1);
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -