#i n c l u d e"s t d a f x.h"
#include
#include
#include
#include
#include
using namespace std;
void drawwalls(void);
void drawtop(void);
void drawball(void);
#define IDM_APPLICATION_EXIT (101)
#define IDM_APPLICATION_TEXTURE (102)
#define IDM_APPLICATION_BANK (103)
#define MAZE_HEIGHT (16)
#define MAZE_WIDTH (16)
#define STARTING_POINT_X (13.5f);
#define STARTING_POINT_Y (1.5f);
#define STARTING_HEADING (90.0f);
float player_x = STARTING_POINT_X ;
float player_y = STARTING_POINT_Y ;
float player_h = STARTING_HEADING ; // player's heading
float player_s = 0.0f; // forward speed of the player
float player_m = 1.0f; // speed multiplier of the player
float player_t = 0.0f; // player's turning (change in heading)
float player_b = 0.0f; // viewpoint bank (roll)
static float texcoordX=0.0f;
int walllist=0;
int mazelist=0;
int balllist=0;
int status=1;
bool searchroute=false;
bool keystate[4]={false,false,false,false};
char mazedata[MAZE_HEIGHT][MAZE_WIDTH] = {
{'H','H','H','H','H','H','H','H','H','H','H','H','H','H','H','H '},
{'H',' ',' ',' ',' ',' ',' ',' ','H',' ',' ',' ',' ',' ',' ','H'}, {'H',' ','H',' ','H','H','H',' ','H',' ','H',' ',' ',' ',' ','H'}, {'H',' ','H','H',' ',' ','H',' ','H','H',' ','H',' ','H',' ','H'}, {'H',' ',' ',' ',' ',' ','H',' ',' ',' ',' ',' ',' ','H',' ','H'}, {'H',' ','H','H','H','H','H','H','H','H',' ','H','H','H',' ','H'},
{'H',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ',' ','H',' ',' ','H'}, {'H',' ','H','H','H','H','H',' ','H','H','H','