lightcycles.h

来自「游戏编程源码」· C头文件 代码 · 共 40 行

H
40
字号
//-----------------------------------------------------------------
// Light Cycles Application
// C++ Header - LightCycles.h
//-----------------------------------------------------------------

#ifndef LIGHTCYCLES_H
#define LIGHTCYCLES_H

//-----------------------------------------------------------------
// Include Files
//-----------------------------------------------------------------
#include <windows.h>
#include "Resource.h"
#include "GameEngine.h"
#include "Bitmap.h"

//-----------------------------------------------------------------
// Global Variables
//-----------------------------------------------------------------
HINSTANCE   g_hInstance;
GameEngine* g_pGame;
Bitmap*     g_pBackground;
Bitmap*     g_pCycle[2][4];
POINT       g_ptCyclePos[2];
POINT       g_ptCycleSpeed[2];
POINT       g_ptCycleTrail[2][100];
int         g_iTrailLen[2];
const int   g_iSPEED = 4;
BOOL        g_bGameOver;

//-----------------------------------------------------------------
// Function Declarations
//-----------------------------------------------------------------
void NewGame();
void UpdateCycles();
void SteerCycle(int iCycle, int iDirection);
void EndGame(int iCycle);

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?