📄 main.h
字号:
#include "engine.h"
#include "model.h"
#include <stdio.h>
enum CHARACTER{JIN,BOBI};
struct Player
{
CModel *ball;
CHARACTER character; //which character?
char Name[100];
float acc; //acceleration units
int Score; //score
};
struct Vertex
{
Vertex(){}
Vertex(
float x, float y, float z,
float nx, float ny, float nz,
float u, float v)
{
_x = x; _y = y; _z = z;
_nx = nx; _ny = ny; _nz = nz;
_u = u; _v = v;
}
float _x, _y, _z;
float _nx, _ny, _nz;
float _u, _v; // texture coordinates
static const DWORD FVF;
};
const DWORD Vertex::FVF = D3DFVF_XYZ | D3DFVF_NORMAL | D3DFVF_TEX1;
CEngine engine;
CModel *arena=0;
CModel *curTriangle=0;
Player p[2];
ID3DXFont* Font = 0;
IDirect3DVertexBuffer9* BG = 0;
IDirect3DTexture9* Tex = 0;
bool MenuSetup(); //setup the menu
bool GameSetup(); //setup the game
bool GameDisplay(float timeDelta);
bool MenuDisplay(float timeDelta);
bool IsPlayerCollide(); //detect if 2 spheres collide
bool IsInArena(int i); //detect if the player[i] is in the arena
void GameCleanup();
void MenuCleanup();
void GetGamePlayKey(float timeDelta);
void ReadSettings();
void ShowStats();
void Reset(); //reset the player's positions
void CheckWin();
int WINAPI WinMain(HINSTANCE hInst,HINSTANCE hPrev, LPSTR cmdLine,int showCmd);
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -