forked from Mystereon/M5ELite
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathships.h
72 lines (61 loc) · 1.78 KB
/
ships.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
68
69
70
71
72
// up to 2048 vertices / faces !!
float scale; //focal length
int16_t wireframe[2048][3];
uint8_t wireframecolors[2048];
unsigned int ship_vertices_cnt, ship_faces_cnt;
int8_t ship_vertices[2048][3];
uint16_t ship_faces[2048][9];
// syntax sugar for easy ship addition
typedef void (*ShipAnimation_cb)();
enum RenderingMethod {
R_SINGLE_COLOR = 0,
R_LINE_COLOR = 1,
R_LINE_GRADIENT = 2
};
RenderingMethod renderingMethod = R_SINGLE_COLOR;
struct ShipAnimation {
const char* name;
ShipAnimation_cb cb;
RenderingMethod renderingMethod;
};
// include your own ships starting from here,
// then add them to ShipAnimation and increase
// the SHIPS_ARRAY_SIZE
#include "models/OriginalShips.h" // 9 ships here, from the original sketch ( http://www.elitehomepage.org/index.htm )
// generated ships
#include "models/Xwing.stl.h"
#include "models/Firefly.stl.h"
#include "models/Rocket.stl.h"
#include "models/MilleniumFalcon.stl.h"
#include "models/PlanetExpress.stl.h"
#include "models/Narcissus.stl.h"
#include "models/TronRecognizer.stl.h"
#include "models/ImperialCruiser.stl.h"
#include "models/ImperialDestroyer.stl.h"
#include "models/Liberator.stl.h"
#include "models/Pirhana.stl.h"
#include "models/TieFighter.stl.h"
#define SHIPS_ARRAY_SIZE 21 // adjust this value to the number of ships
ShipAnimation ShipAnimations[SHIPS_ARRAY_SIZE] = {
PirhanaAnimation,
thargoidAnimation,
TieFighterAnimation,
coriolisAnimation,
dodoAnimation,
sidewinderAnimation,
viperAnimation,
anacondaAnimation,
aspAnimation,
adderAnimation,
cobraAnimation,
LiberatorAnimation,
MilleniumFalconAnimation,
ImperialDestroyerAnimation,
ImperialCruiserAnimation,
PlanetExpressAnimation,
NarcissusAnimation,
FireflyAnimation,
TronRecognizerAnimation,
XwingAnimation,
RocketAnimation,
};