PageRenderTime 177ms CodeModel.GetById 72ms app.highlight 13ms RepoModel.GetById 47ms app.codeStats 1ms

/TheElements/jni/collisions.h

http://thelements.googlecode.com/
C++ Header | 70 lines | 32 code | 4 blank | 34 comment | 0 complexity | 9fc0fa4e755c7cb9958d9e8983c10fcd MD5 | raw file
 1/*
 2 * collisions.h
 3 * -------------------------------
 4 * Contains all the collision data in a table. At some
 5 * point hopefully we can make some code that will load
 6 * this collision data from a file. When adding an element,
 7 * it must be added here.
 8 */
 9
10#ifndef COLLISIONS_H_INCLUDED
11#define COLLISIONS_H_INCLUDED
12
13//Include the global macros
14#include "macros.h"
15
16int collision[TElements][TElements] =
17{
18		//Sand 0
19		{0, 28, 0, -1, 0, 27, 0, 10, 0, 1, 27, 0, 0, 0, 0, 0, -1, 18, 22, 0, 1, 0, 0, 0, 0},
20		//Water 1
21		{28, 3, 1, -1, 4, 23, 8, 10, 1, 3, 12, 1, 1, 1, 1, 1, -1, 19, 20, 24, 3, 1, 1, 1, 1},
22		//Wall 2
23		{0, 1, 0, -1, 0, 5, 0, 10, 0, 1, 0, 0, 0, 0, 0, 0, -1, 1, 22, 0, 1, 0, 0, 0, 0},
24		//Eraser 3
25		{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
26		//Plant 4
27		{0, 1, 0, -1, 0, 6, 0, 10, 0, 1, 6, 0, 0, 0, 0, 0, -1, 18, 22, 0, 26, 0, 0, 0, 0},
28		//Fire 5
29		{5, 23, 5, -1, 6, 7, 9, 10, 5, 11, 5, 13, 15, 16, 6, 5, -1, 5, 22, 5, 23, 5, 5, 29, 5},
30		//Ice 6
31		{0, 8, 0, -1, 0, 9, 0, 10, 0, 1, 9, 0, 0, 0, 0, 0, -1, 18, 20, 25, 25, 0, 0, 0, 0},
32		//Generator 7
33		{10, 10, 10, -1, 10, 10, 10, 0, 0, 10, 10, 10, 10, 10, 10, 10, -1, 10, 10, 10, 10, 10, 10, 10, 10},
34		//Spawn 8
35		{0, 1, 0, -1, 0, 5, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, -1, 1, 22, 0, 1, 0, 0, 0, 0},
36		//Oil 9
37		{1, 3, 1, -1, 1, 11, 1, 10, 1, 3, 11, 1, 1, 1, 1, 1, -1, 18, 22, 1, 3, 1, 1, 1, 1},
38		//Magma 10
39		{27, 12, 1, -1, 6, 5, 9, 10, 1, 11, 3, 13, 15, 16, 6, 17, -1, 18, 22, 1, 12, 1, 1, 30, 1},
40		//Stone 11
41		{0, 1, 0, -1, 0, 13, 0, 10, 0, 1, 13, 14, 0, 0, 0, 0, -1, 18, 22, 0, 1, 0, 0, 0, 0},
42		//C4 12
43		{0, 1, 0, -1, 0, 15, 0, 10, 0, 1, 15, 0, 0, 0, 0, -1, 18, 22, 0, 1, 0, 0, 0, 0},
44		//C4++ 13
45		{0, 1, 0, -1, 0, 16, 0, 10, 0, 1, 16, 0, 0, 0, 0, -1, 18, 22, 0, 1, 0, 0, 0, 0},
46		//Fuse 14
47		{0, 1, 0, -1, 0, 6, 0, 10, 0, 1, 6, 0, 0, 0, 0, 0, -1, 18, 22, 0, 1, 0, 0, 0, 0},
48		//Destructable Wall 15
49		{0, 1, 0, -1, 0, 5, 0, 10, 0, 1, 17, 0, 0, 0, 0, 0, -1, 18, 22, 0, 1, 0, 0, 0, 0},
50		//Wind 16
51		{-1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1},
52		//Acid 17
53		{18, 19, 1, -1, 18, 5, 18, 10, 1, 18, 18, 18, 18, 18, 18, 18, -1, 3, 22, 18, 18, 1, 18, 18, 18},
54		//Steam 18
55		{22, 20, 22, -1, 22, 5, 20, 10, 22, 22, 22, 22, 22, 22, 22, 22, -1, 22, 21, 22, 20, 22, 22, 22, 22},
56		//Salt 19
57		{0, 24, 0, -1, 0, 5, 25, 10, 0, 1, 1, 0, 0, 0, 0, 0, -1, 18, 22, 0, 1, 0, 0, 0, 0},
58		//Salt-water 20
59		{1, 3, 1, -1, 26, 23, 25, 10, 1, 3, 12, 1, 1, 1, 1, 1, -1, 18, 20, 1, 3, 0, 1, 1, 1},
60		//Glass 21
61		{0, 1, 0, -1, 0, 5, 0, 10, 0, 1, 1, 0, 0, 0, 0, 0, -1, 1, 22, 0, 1, 0, 0, 0, 0},
62		//Custom 1 22
63		{0, 1, 0, -1, 0, 27, 0, 10, 0, 1, 27, 0, 0, 0, 0, 0, -1, 18, 22, 0, 1, 0, 0, 0, 0},
64		//Mud 2 23
65		{0, 1, 0, -1, 0, 29, 0, 10, 0, 1, 30, 0, 0, 0, 0, 0, -1, 18, 22, 0, 1, 0, 0, 0, 0},
66		//Custom 3 24
67		{0, 1, 0, -1, 0, 27, 0, 10, 0, 1, 27, 0, 0, 0, 0, 0, -1, 18, 22, 0, 1, 0, 0, 0, 0}
68};
69
70#endif