📄 brutalfighting.h
字号:
/*-------------------------------------------------------------------
Applet structure. All variables in here are reference via "pMe->"
-------------------------------------------------------------------*/
// create an applet structure that's passed around. All variables in
// here will be able to be referenced as static.
typedef struct _BrutalFighting {
AEEApplet a ; // First element of this structure must be AEEApplet
AEEDeviceInfo DeviceInfo; // always have access to the hardware device information
IDisplay *pIDisplay; // give a standard way to access the Display interface
IShell *pIShell; // give a standard way to access the Shell interface
IGraphics *pIGraphics; // give a standard way to access the Graphics interface
AEECallback m_cbMainTimer; // main calculagraph
MainMenuWindow m_stMainMenu; // main menu
IImage* m_pImageMenu[2]; // menu image
IImage* m_pImageNext[2]; // next image
IImage* m_pImagePrevious[2]; // previous image
IImage* m_pImageZero; // zero image
IImage* m_pImageDodge[3]; // dodge image
IImage* m_pImageG1; // normal body image
IImage* m_pImageGuardl; // left fist image
IImage* m_pImageGuardr; // right fist image
IImage* m_pImageNormal[3]; // enemy noraml head image
IImage* m_pImagePUL; // enemy left fist body image
IImage* m_pImagePUNCHL; // left boxing image
IImage* m_pImagePUNCHR; // right boxing image
IImage* m_pImagePUNCHU; // uppercut image
IImage* m_pImagePUR; // enemy right fist body image
IImage* m_pImageUL[3]; // enemy left head image
IImage* m_pImageUR[3]; // enemy right head image
IImage* m_pImageSetupBG; // setup BG
AEEImageInfo m_stImageNextInfo; // next image info
AEEImageInfo m_stImageG1Info; // enemy normal body image info
AEEImageInfo m_stImageGuardrInfo; // right fist image info
AEEImageInfo m_stImagePunchlInfo; // left boxing image info
AEEImageInfo m_stImagePunchuInfo; // uppercut image info
AEEImageInfo m_stImagePunchrInfo; // right boxing image info
AEEImageInfo m_stImageMeunInfo; // menu image info
AECHAR* m_strSoundON; // Sound on string
AECHAR* m_strSoundOFF; // Sound off string
AECHAR* m_strVibractionON; // Vibration on string
AECHAR* m_strVibractionOFF; // Vibration off string
AECHAR* m_strStrength; // strength string
AECHAR* m_strFlee; // flee string
AECHAR* m_strRecord; // record string
AECHAR* m_strLevel; // level string
AECHAR* m_strCoustom; // coustom string
AECHAR* m_strYouLost; // you lost string
AECHAR* m_strYouWin; // you win string
AECHAR* m_strHighScore; // highsocre string
AECHAR* m_strColon; // colon string
AECHAR* m_strZero; // zero string
AECHAR* m_strTryAgain; // tryagain string
AECHAR* m_strDiagonal; // diagonal string
AECHAR* m_strC; // press C Key string
AECHAR* m_strBuy; // buy string
AECHAR* m_strBuy0;
uint32 m_iSystemTime; // Systemtime string
int m_icountGameOver; // count gameover
int m_iscreenOffsetX; // screen offset x
int m_iscreenOffsetY; // screen offset y
int m_ienemyNumber; // enemy number
int m_ienemyNextNumber; // enemy next number
int m_ienemyPictureX; // enemy picture x
int m_ienemyPictureY; // enemy picture y
int m_iselectEnemyFootworkDisplacementY;// select enemy footwork displacement y
int m_iselectEnemyFootworkDirectionY; // select enemy footwork direction y
int m_iSetupStatus; // setup status
int m_iRedColor; // red color
int m_iGreenColor; // green color
int m_iBlueColor; // blue color
int m_iFontHeight; // font height
int m_emGameState; // game state
int m_iEnemyStr[7]; // enemy str
int m_iEnemyFlee[7]; // enemy flee
int m_iEnemyScore[7]; // enemy score
int m_iCustomStr; // custom str
int m_iCustomFlee; // custom flee
int m_iCustomScore; // custom score
int m_iCustomFlag; // custom flag
//play
int m_iplayerFPS; // player FPS
int m_iplayerStage; // player stage
int m_iplayerFootworkLeftX; // player footwork left x
int m_iplayerFootworkLeftY ; // player footwork left y
int m_iplayerFootworkRightX ; // player footwork right x
int m_iplayerFootworkRightY ; // player footwork right y
int m_iplayerFootworkDisplacementX ; // player footwork displactment x
int m_iplayerFootworkDisplacementY ; // player footwork displacement y
int m_iplayerFootworkDirectionX; // player footwork direction x
int m_iplayerFootworkDirectionY; // player footwork direction y
int m_ilastPlayerHP; // last player HP
int m_iplayerHP; // player HP
int m_ilastPlayerSP; // last player SP
int m_iplayerSP; // player SP
int m_iplayerMaxHP ; // player Max HP
int m_iplayerMaxSP ; // player Max Sp
int m_iplayerMaxStr; // player Max Str
int m_iplayerStr; // player str
int m_iplayerIdle; // player Idle
//enemy
int m_ienemyHead ; // enemy head
int m_ienemyBody ; // enemy body
int m_icounterPunchType ; // counter punch type
int m_ienemyStage ; // enemy stage
int m_ienemyFPS; // enemy FPS
int m_iheadFootworkX; // head footwork x
int m_iheadFootworkY; // head footwork y
int m_ibodyFootworkX; // body footwork x
int m_ibodyFootworkY; // body footwork y
int m_ienemyFootworkDisplacementX; // enemy footwork displacemen x
int m_ienemyFootworkDisplacementY; // enemy footwork displacemen y
int m_ienemyFootworkDirectionX; //enemy footwork direction x
int m_ienemyFootworkDirectionY; //enemy footwork direction y
int m_ienemyFrame; // enemy frame
int m_ienemyActionStay; // enemy action stay
int m_ienemyMaxHP; // enemy max hp
int m_ienemyHP; // enemy hp
int m_ilastEnemyHP; // last enemy hp
int m_ioffsetEnemyFallDown; // offset enemy fall down
int m_ishakeScreen;
int m_ishakeScreenStep; //shake screen step
int m_idodgeStep; //dodge step
int m_ishakeX; //shake x
int m_ishakeY; //shake y
int m_ienemyDeadStage; //enemy dead stage
int m_iSoundCount;
int m_iHighrecordNum;
IHtmlViewer *m_pHtml; //htmlview object
IHtmlViewer *m_pabout; //htmlview object
AECHAR szText[10]; //confirm
char *m_buff; //document data buffer文件数据缓冲区
char *m_buff2; //document data buffer文件数据缓冲区
boolean bisNotify;
boolean m_bGameSound;
boolean m_bGamePause; // game pause
boolean m_bCompare; // compare
boolean m_bNewGame; //newgame
boolean m_bPause; //pause
boolean m_bGameover; //game over
boolean m_bSelectCoustom; //select coustom
boolean m_bSound; //sound
boolean m_bplayerUppercut; // player uppercut
boolean m_benemyStartAction;//enemy start action
boolean m_bisFallingDown; // is falling down
boolean m_bSaveGamePause; // save game pause
// boolean m_bcomparefinished;
boolean m_bhtml;
IFileMgr* m_pfmFileMgr; // give a standard way to access the FileMgr interface
IFile* m_pfFile; // give a standard way to access the file interface
IFileMgr* m_pfhtmlFileMgr; // give a standard way to access the FileMgr interface
IFile* m_pfhFile; // give a standard way to access the File interface
IFileMgr* m_pfaboutFileMgr; // give a standard way to access the FileMgr interface
IFile* m_pfaFile; // give a standard way to access the File interface
// ISound* m_pISound; // give a standard way to access the ISound interface
IMedia* m_pIMedia; // give a standard way to access the IMedia interface
History istruHistory; // structure History
ILicense* m_pILicense; // give a standard way to access the ILicense interface
// add your own variables here...
} BrutalFighting;
/*-------------------------------------------------------------------
Function Prototypes
-------------------------------------------------------------------*/
static boolean BrutalFighting_HandleEvent(BrutalFighting* pMe, AEEEvent eCode,
uint16 wParam, uint32 dwParam);
static boolean Menu_HandleEvent(BrutalFighting* pMe, AEEEvent eCode,
uint16 wParam, uint32 dwParam);
static boolean SetUp_HandleEvent(BrutalFighting* pMe, AEEEvent eCode,
uint16 wParam, uint32 dwParam);
static boolean Select_HandleEvent(BrutalFighting* pMe, AEEEvent eCode,
uint16 wParam, uint32 dwParam);
static boolean Game_HandleEvent(BrutalFighting* pMe, AEEEvent eCode,
uint16 wParam, uint32 dwParam);
static boolean AppHighScore_HandleEvent(BrutalFighting* pMe, AEEEvent eCode,
uint16 wParam, uint32 dwParam);
static boolean Adout_HandleEvent(BrutalFighting* pMe, AEEEvent eCode,
uint16 wParam, uint32 dwParam);
static boolean HELP_HandleEvent(BrutalFighting* pMe, AEEEvent eCode,
uint16 wParam, uint32 dwParam);
static boolean Stop_HandleEvent(BrutalFighting* pMe, AEEEvent eCode,
uint16 wParam, uint32 dwParam);
static boolean NoSpace_HandleEvent(BrutalFighting* pMe, AEEEvent eCode,
uint16 wParam, uint32 dwParam);
static boolean Demo_HandleEvent(BrutalFighting* pMe, AEEEvent eCode,
uint16 wParam, uint32 dwParam);
static int GetRand_Int(void);
static void BrutalFighting_Main_Start(BrutalFighting* pMe);
boolean BrutalFighting_InitAppData(BrutalFighting* pMe);
void BrutalFighting_FreeAppData(BrutalFighting* pMe);
void Main_Loop(BrutalFighting* pMe);
void BrutalFighting_InitResData(BrutalFighting* pMe);
void BrutalFighting_MenuRender(BrutalFighting* pMe);
void BrutalFighting_initRecord(BrutalFighting* pMe);
void BrutalFighting_SetUpRender(BrutalFighting* pMe);
void BrutalFighting_SelectRender(BrutalFighting* pMe);
void RandomBackground(BrutalFighting* pMe);
void NextEnemy(BrutalFighting* pMe);
void PreviousEnemy(BrutalFighting* pMe);
void Select_Enemy(BrutalFighting* pMe);
void ClearUp(BrutalFighting * pMe);
void BrutalFighting_GameRender(BrutalFighting * pMe);
void DrawHUD(BrutalFighting * pMe);
void BrutalFighting_InitGame(BrutalFighting* pMe);
void InitPlay(BrutalFighting* pMe);
void initEnemy(BrutalFighting* pMe,int head, int body);
boolean enemyFootwork(BrutalFighting* pMe);
void setEnemyHP(BrutalFighting* pMe,int hpToSet);
void setPlayerSP(BrutalFighting* pMe,int hpToSet);
void setPlayerHP(BrutalFighting* pMe,int hpToSet);
boolean newEnemy(boolean enemy,BrutalFighting* pMe);
int getHead(BrutalFighting* pMe);
int getBody(BrutalFighting* pMe);
void setPlayerMaxSP(BrutalFighting* pMe,int spToSet);
boolean setEnemyStage(BrutalFighting* pMe,int stage);
void leftPunch(BrutalFighting* pMe);
boolean setPlayerStage(BrutalFighting* pMe,int stage);
void uppercut(BrutalFighting* pMe);
void rightPunch(BrutalFighting* pMe);
void InitRecord(BrutalFighting* pMe);
void PlayGame_Footwork(BrutalFighting* pMe);
void backDodge(BrutalFighting* pMe);
void BrutalFighting_RecordRender(BrutalFighting* pMe);
void RecordCompare(BrutalFighting* pMe);
void setTime(BrutalFighting* pMe);
void BrutalFighting_StopRender(BrutalFighting* pMe);
boolean BruatlFighting_Paly_Music(BrutalFighting* pMe);
void BruatlFighting_stop_Music(BrutalFighting* pMe);
void MediaCallBack(void* pUser,AEEMediaCmdNotify* pp);
void DrawTime(BrutalFighting* pMe,uint32 itime,int x, int y);
void NoSpaceRender(BrutalFighting* pMe);
void About_DisplayHtmlData(BrutalFighting* pMe);
void Help_DisplayHtmlData(BrutalFighting* pMe);
boolean Help_LoadHtmlData(BrutalFighting* pMe);
boolean Adout_LoadHtmlData(BrutalFighting* pMe);
static void BrutalFighting_ResumeGame(BrutalFighting* pMe);
void BrutalFighting_DemoRender(BrutalFighting* pMe);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -