#define KEY_DOWN(vk_code) ((GetAsyncKeyState(vk_code) & 0x8000) ? 1 : 0)
#define _RGB16BIT565(r,g,b) ((b & 31) + ((g & 63) << 5) + ((r & 31) << 11))
#define _RGB32BIT(a,r,g,b) ((b) + ((g) << 8) + ((r) << 16) + ((a) << 24))
#define DDRAW_INIT_STRUCT(ddstruct) { memset(&ddstruct,0,sizeof(ddstruct)); ddstruct.dwSize=sizeof(ddstruct); }
#define GetWindowStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_STYLE))
#define GetWindowExStyle(hwnd) ((DWORD)GetWindowLong(hwnd, GWL_EXSTYLE))
//BOB struct
typedef struct BOB_TYP
{
int state; // the state of the object (general)
float x,y; // position bitmap will be displayed at
float vx,vy; // velocity of object
int width, height; // the width and height of the bob
int nBubble; //the player's bubble number
int nShoes; // the player's shoes number
int nPower; // the player's power number
int curr_frame; // current animation frame
int num_frames; // total number of animation frames
int curr_animation; // Player directions
LPDIRECTDRAWSURFACE7 images[12]; // the bitmap images DD surfaces
} BOB, *BOB_PTR;
// Object struct
typedef struct BOB_TYP
{
STATE_e state; // the state of the object (general) 存在
float x,y; // position bitmap will be displayed at 位置//减少计算时间
int width, height; //大小 //减少计算时间
OBJECT_e object; //实际物体
PRIZE_e pstate ; // 战利品
MOVE_e mstate; // 是否可以移动
LPDIRECTDRAWSURFACE7 boxSuf; // 盒子画面
LPDIRECTDRAWSURFACE7 prizeSuf; //奖品画面
} OBJ, *OBJ_PTR;
typedef enum
{
e_null = 0;
e_spower = 1;
e_bpower = 2;
e_sshoes = 3;
e_bshoes = 4;
e_sbubble = 5;
e_bbubble = 6;
} PRIZE_e;
typedef enum
{
e_exist = 0;
e_die= 1;
e_active = 2;
} STATE_e;
typedef enum
{
e_move = 0;
e_nomove= 1;
e_adom = 2; // 无法炸掉
} MOVE_e;
typedef enum
{
e_commonBox;
e_superbBox;
} OBJECT_e;


被折叠的 条评论
为什么被折叠?



