📄 boxman.h
字号:
#ifndef _BOXMAN_H_
#define _BOXMAN_H_
#ifdef _BOXMAN_C_
#define BM_EXTERN
#else
#define BM_EXTERN extern
#endif
#ifdef OSD_GAME_SOKOBAN
// BoxMan Main State
enum
{
BM_MENU_STATE,
BM_PLAY_STATE,
BM_DIALOG_STATE,
BM_STATE_NS,
BM_STATE_MAX = BM_STATE_NS - 1
};
// BoxMan Menu Item
enum
{
BM_MENU_START,
BM_MENU_ANSWER,
BM_MENU_GRADE,
BM_MENU_NS,
BM_MENU_MAX = BM_MENU_NS - 1
};
// BoxMan Dialog Sub-State
enum
{
BM_DIALOG_TRY_STATE,
BM_DIALOG_NEXT_STATE,
BM_DIALOG_STATE_NS,
BM_DIALOG_STATE_MAX = BM_DIALOG_STATE_NS - 1
};
// BoxMan play Sub-State
#define MAN_SHOW_INT 15
#define BAD_POSI_INT 35
#define ANSWER_SHOW_INT 10
#define REBACK_NS 30
typedef struct
{
// 0 byte
BYTE fgManPushBox:1; // user has push the box initial at map change
BYTE fgLastStep:1;
BYTE fgManNextBox:1; // set or not when judge at next to box
BYTE fgCanShift:1; // set or not when judge if can shift
BYTE fgGameOver:1; // game is over when all the box on the destination
BYTE fgBadPosiWarn:1; // show bad position warning
BYTE fgAnswer:1; // flag for answer status
BYTE reserved:1;
// 1 byte
BYTE bNowRebackNo; // the reback steps initial at map change
// 2 byte
BYTE bNowRebackedNo; // the system allow rebacked step number
// 3 byte
BYTE bPushBoxNo; // the push box times iniitial at map change
// 4 byte
BYTE bfgApBox; // flag for every box is on the destination
// 5 byte
BYTE bOren; // the orientation of movement
// 6 Byte
BYTE bNowNextBoxId; // box id of now pushed box
// 7 Byte
BYTE bStartPosBmpId; // when man is shifted the space must be redrawn;
// 8 Byte
BYTE bEndPosBmpId; // when reback the box is shifted the space must be redrawn;
// 9 Byte
BYTE bLastStepStack;
// 10 Byte
BYTE bBMShowTimer;
// 11 Byte
BYTE bBmGameTimer;
// 12 Byte
WORD wAswStep;
}S_SOKOBAN_VAR;
#define _fgManPushBox _uGameVar.sSokobanVar.fgManPushBox
#define _fgLastStep _uGameVar.sSokobanVar.fgLastStep
#define _fgManNextBox _uGameVar.sSokobanVar.fgManNextBox
#define _fgCanShift _uGameVar.sSokobanVar.fgCanShift
#define _fgGameOver _uGameVar.sSokobanVar.fgGameOver
#define _fgBadPosiWarn _uGameVar.sSokobanVar.fgBadPosiWarn
#define _fgAnswer _uGameVar.sSokobanVar.fgAnswer
#define _bNowRebackNo _uGameVar.sSokobanVar.bNowRebackNo
#define _bNowRebackedNo _uGameVar.sSokobanVar.bNowRebackedNo
#define _bPushBoxNo _uGameVar.sSokobanVar.bPushBoxNo
#define _bfgApBox _uGameVar.sSokobanVar.bfgApBox
#define _bOren _uGameVar.sSokobanVar.bOren
#define _bNowNextBoxId _uGameVar.sSokobanVar.bNowNextBoxId
#define _bStartPosBmpId _uGameVar.sSokobanVar.bStartPosBmpId
#define _bEndPosBmpId _uGameVar.sSokobanVar.bEndPosBmpId
#define _bLastStepStack _uGameVar.sSokobanVar.bLastStepStack
#define _bBMShowTimer _uGameVar.sSokobanVar.bBMShowTimer
#define _bBmGameTimer _uGameVar.sSokobanVar.bBmGameTimer
#define _wAswStep _uGameVar.sSokobanVar.wAswStep
void vGameBoxManTimer(void) large;
void vGameBoxManStateInit(void) large;
BOOL fgGameBoxManState(void) large;
void vGameBoxManExit(void) large;
#endif
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -