-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcube.h
64 lines (52 loc) · 1.12 KB
/
cube.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
/************************************************************************************
* cube.h
*
* descp : Defines game cube
*
* auth : javery
*
* path : C:\Program Files\Microsoft Visual Studio\MyProjects\PrimaryCubes3D\cube.h
*
* iDate : 09/17/06
* version:
************************************************************************************/
#ifndef __CUBES_H__
#define __CUBES_H__
#include "common.h"
#include "gfx_sprite.h"
#define CUBE_FRONT 0
#define CUBE_BACK 1
typedef enum
{
PRI_RED,
PRI_YELLOW,
PRI_BLUE,
SEC_ORANGE,
SEC_PURPLE,
SEC_GREEN,
ALT_STONE
}CubeColor_t;
// cube
#define G_CUBE_GREEN 0
#define G_CUBE_BLUE 1
#define G_CUBE_RED 2
#define G_CUBE_YELLOW 3
#define G_CUBE_ORANGE 4
#define G_CUBE_PURPLE 5
#define G_CUBE_STONE 6
#define CUBE_COUNT 7
typedef struct Cell_t
{
int yRow,xCol,xMax,yMax;
}pCell_t;
typedef struct Cube_t
{
Vect3_t position;
Cell_t gridPosition;
CubeColor_t frontFace,rearFace;
c_boolean processed,twoSided,active,alive;
c_boolean directions[3];
c_boolean frontFlagged,rearFlagged;
Sprite_t cubeSprite[2];
}*pCube_t;
#endif