-
Notifications
You must be signed in to change notification settings - Fork 1
/
ofApp.h
111 lines (90 loc) · 2.46 KB
/
ofApp.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#pragma once
#include "ofMain.h"
#include "ofxGui.h"
//#include <math.h>
class ofApp : public ofBaseApp{
public:
void setup();
void update();
void draw();
void keyPressed(int key);
void keyReleased(int key);
void mouseMoved(int x, int y );
void mouseDragged(int x, int y, int button);
void mousePressed(int x, int y, int button);
void mouseReleased(int x, int y, int button);
void mouseEntered(int x, int y);
void mouseExited(int x, int y);
void windowResized(int w, int h);
void dragEvent(ofDragInfo dragInfo);
void gotMessage(ofMessage msg);
//Clicking generation
string label;
int startX,startY,otherX,otherY;
int maxDrag;
float tempX, tempY, ratio; //for planet generation velocity
int frameCount;
bool mouseDown, maxLength;
int gameState;
//GameState 0
void setupGameState0();
void drawGameState0();
int opacity = 150;
string updown = "up";
ofTrueTypeFont mofoFont, mofoFontSmall;
string gameTitle = "Solar System Game";
string gameAuthors = "By MitDanCal";
string gameStart = "Click Anywhere to Start";
//GameState 1
void setupGameState1();
void drawGameState1();
int i = 0;
//UI elements
ofxPanel planetGeneration;
//ofxFloatField massInput;
ofxButton button;
ofxButton scaleButton;
ofRectangle startBox;
ofRectangle target;
//Level loading things
double scale;
int timeScale;
bool passed;
void loadNextLevel();
int tempA[4] = {0,0,0,0};
string line;
string sunFlag[2] = {"*","!"};
int lineCount;
std::string token;
vector<long long>objectDump;
int levelCount;
bool sunTrigger = false;//bool trigger, use the same thing for other types
int type;
//textures
ofImage planetOne;
ofImage planetOne2;
ofImage UFO1;
ofImage UFOCrop;
ofImage teleporter;
ofImage teleporterCrop;
ofImage motherShipSheet;
ofImage motherShipSHeetCrop;
ofImage stars;
int UFOCookieCutter;
int UFOXCut;
int UFO1Radius;
int frameCounter = 0;
int frameCounter2 = 0;
int planetXCut;
int tempCut;
int planetOneRadius;
int teleporterCookieCutter;
int teleporterXCUT;
int teleporterRadius;
int motherShipCookieCutter;
int motherShipXCut;
int starCookieCutter;
int starXCut;
//Dynamic camera
int cameraX = -400, cameraY = 400;
};