This repository has been archived by the owner on Jul 3, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathInteractivity.h
67 lines (57 loc) · 2.2 KB
/
Interactivity.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#ifndef INTERACTIVITY_H
#define INTERACTIVITY_H
#ifdef __APPLE__
# include <OpenGL/gl.h>
# include <OpenGL/glu.h>
# include <GLUT/glut.h>
#else
# include <GL/gl.h>
# include <GL/glu.h>
# include <GL/freeglut.h>
#endif
#include "Structure.h"
#include "Enemy.h"
class Interactivity {
public:
static Enemy enemy[2]; // the enemy array, 2 enemies
static void draw(bool step);
static void setSpace(int n);
static void setLevel(int n);
static void incrLevel();
static void checkIntersections(); // Check to see if the player is on the same block as an enemy
static void setLives(int n); // Set the number of lives the player has
static GLubyte* loadPPM(char* file, int* width, int* height, int* maxi); // Load a ppm file
static int getSpace();
static int getLives();
static int getLevel(); // Get the level
static int getLength(); // Get the number of blocks in a row
static int getBeenTo(); // Get amount of blocks visited in the current level
static int getAmountOfBlocks(); // Get amount of blocks in current level.
static float getTheta(); // Get the angle of rotation
static Structure::point3D getEye(); // The first 3 paramters of gluLookAt
static Structure::point3D getCenter(); // The 4-6 parameters of gluLookAt
static Structure::point3D* getPlayerBeen(); // Get what spots the player has been to
/**
Record that the player has landed on a spot
@param x -> The x position of the object
@param y -> The y position of the object
@param z -> The z position of the object
**/
static void pushPosition(int x, int z);
/**
Callback function for glut's keyboard func
@param key -> ASCII character that was press
@param x -> Where the cursor was when the key was pressed
@param y -> Where the cursor was when the key was pressed
**/
static void keyboard(unsigned char key, int x, int y);
/**
Callback function for glut's keyboard func
@param key -> ASCII character that was press
@param x -> Where the cursor was when the key was pressed
@param y -> Where the cursor was when the key was pressed
**/
static void special(int key, int x, int y);
static void printInstructions(); // Prints the instructions to the console
};
#endif