diff options
174 files changed, 10952 insertions, 0 deletions
diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..94b8e6e --- /dev/null +++ b/.gitignore | |||
@@ -0,0 +1,6 @@ | |||
1 | **~ | ||
2 | **.o | ||
3 | old releases | ||
4 | save/** | ||
5 | Game | ||
6 | .depend | ||
@@ -0,0 +1,1316 @@ | |||
1 | #include "GUI.h" | ||
2 | |||
3 | #if SDL_BYTEORDER == SDL_BIG_ENDIAN | ||
4 | Uint32 rmask = 0xff000000; | ||
5 | Uint32 gmask = 0x00ff0000; | ||
6 | Uint32 bmask = 0x0000ff00; | ||
7 | Uint32 amask = 0x000000ff; | ||
8 | #else | ||
9 | Uint32 rmask = 0x000000ff; | ||
10 | Uint32 gmask = 0x0000ff00; | ||
11 | Uint32 bmask = 0x00ff0000; | ||
12 | Uint32 amask = 0xff000000; | ||
13 | #endif | ||
14 | |||
15 | |||
16 | Label::Label() | ||
17 | { | ||
18 | pos.x = 0; | ||
19 | pos.y = 0; | ||
20 | pos.w = 0; | ||
21 | pos.h = 14; | ||
22 | caption = ""; | ||
23 | textColor.r = 255; | ||
24 | textColor.g = 255; | ||
25 | textColor.b = 255; | ||
26 | render(); | ||
27 | } | ||
28 | |||
29 | Label::Label(string ncaption, SDL_Rect& npos) | ||
30 | { | ||
31 | pos = npos; | ||
32 | textColor.r = 255; | ||
33 | textColor.g = 255; | ||
34 | textColor.b = 255; | ||
35 | caption = ncaption; | ||
36 | npos.w = render(); | ||
37 | } | ||
38 | |||
39 | int Label::setTextSize(int ntextSize) | ||
40 | { | ||
41 | pos.h = ntextSize; | ||
42 | SDL_FreeSurface(image); | ||
43 | return render(); | ||
44 | } | ||
45 | |||
46 | void Label::setTextColor(SDL_Color ntextColor) | ||
47 | { | ||
48 | textColor = ntextColor; | ||
49 | SDL_FreeSurface(image); | ||
50 | render(); | ||
51 | } | ||
52 | |||
53 | int Label::setCaption(string ncaption) | ||
54 | { | ||
55 | if(caption == ncaption) | ||
56 | return pos.w; | ||
57 | caption = ncaption; | ||
58 | SDL_FreeSurface(image); | ||
59 | return render(); | ||
60 | } | ||
61 | |||
62 | int Label::render() | ||
63 | { | ||
64 | TTF_Font *font = TTF_OpenFont("data/fonts/OpenSans-Semibold.ttf",pos.h); | ||
65 | image = NULL; | ||
66 | image = TTF_RenderText_Solid(font, caption.c_str(),textColor); | ||
67 | if(caption.size() == 0) | ||
68 | cout << "empty caption!!!" << endl; | ||
69 | if(image == NULL) | ||
70 | { | ||
71 | cout << "Error rendering Label with caption " << caption << endl; | ||
72 | return 0; | ||
73 | } | ||
74 | TTF_CloseFont(font); | ||
75 | pos.w = image->w; | ||
76 | return image->w; | ||
77 | } | ||
78 | |||
79 | |||
80 | void Label::draw(SDL_Surface* screen) | ||
81 | { | ||
82 | SDL_Rect temp = pos; | ||
83 | SDL_BlitSurface(image, NULL, screen, &temp); | ||
84 | } | ||
85 | |||
86 | Label::~Label() | ||
87 | { | ||
88 | SDL_FreeSurface(image); | ||
89 | } | ||
90 | |||
91 | vector<Label*> textField(string s, SDL_Rect& r, int textSize) | ||
92 | { | ||
93 | vector<Label*> result; | ||
94 | vector<vector<string> > splitted = splitString(s); | ||
95 | bool done = false; | ||
96 | int currentLine = 0; | ||
97 | int currentWord = 0; | ||
98 | int currentPos = 0; | ||
99 | while(!done) | ||
100 | { | ||
101 | bool done2 = false; | ||
102 | int splitAt = splitted[currentLine].size(); | ||
103 | while(!done2) | ||
104 | { | ||
105 | string temp; | ||
106 | for(int i = currentWord; i < splitAt; ++i) | ||
107 | { | ||
108 | temp += splitted[currentLine][i]; | ||
109 | if(i != (int) splitAt-1) | ||
110 | temp += " "; | ||
111 | } | ||
112 | SDL_Rect npos = r; | ||
113 | npos.y += currentPos; | ||
114 | npos.h = textSize; | ||
115 | if(temp != "") | ||
116 | { | ||
117 | Label* l = new Label(temp, npos); | ||
118 | if(npos.w < r.w) | ||
119 | { | ||
120 | done2 = true; | ||
121 | result.push_back(l); | ||
122 | currentWord = splitAt; | ||
123 | currentPos += textSize*1.1; | ||
124 | |||
125 | } | ||
126 | else | ||
127 | { | ||
128 | delete l; | ||
129 | splitAt--; | ||
130 | if(splitAt == currentWord) | ||
131 | { | ||
132 | cout << "failed rendering Textbox. Word too long?" << endl; | ||
133 | return result; | ||
134 | } | ||
135 | } | ||
136 | } | ||
137 | else | ||
138 | { | ||
139 | done2 = true; | ||
140 | currentWord = splitAt; | ||
141 | currentPos += textSize*1.1; | ||
142 | } | ||
143 | } | ||
144 | while(currentWord == (int)splitted[currentLine].size()) | ||
145 | { | ||
146 | currentWord = 0; | ||
147 | currentLine++; | ||
148 | if((int) splitted.size() == currentLine) | ||
149 | { | ||
150 | done = true; | ||
151 | break; | ||
152 | } | ||
153 | } | ||
154 | } | ||
155 | r.h = currentPos + textSize; | ||
156 | return result; | ||
157 | } | ||
158 | |||
159 | SlidingBackground::SlidingBackground(SDL_Surface *nbackground, double nxSpeed, double nySpeed) | ||
160 | { | ||
161 | randm = true; | ||
162 | background = nbackground; | ||
163 | xSpeed = nxSpeed; | ||
164 | ySpeed = nySpeed; | ||
165 | if(background->w > 0) | ||
166 | { | ||
167 | x1 = rand()%background->w; | ||
168 | x2 = rand()%background->w; | ||
169 | } | ||
170 | if(background->h > 0) | ||
171 | y = rand()%background->h; | ||
172 | } | ||
173 | |||
174 | SlidingBackground::~SlidingBackground() | ||
175 | { | ||
176 | SDL_FreeSurface(background); | ||
177 | } | ||
178 | |||
179 | |||
180 | void SlidingBackground::draw(SDL_Surface *screen) | ||
181 | { | ||
182 | SDL_Rect pos; | ||
183 | pos.x = x1; | ||
184 | pos.y = y; | ||
185 | SDL_BlitSurface(background,NULL,screen,&pos); | ||
186 | pos.x = x1-background->w; | ||
187 | pos.y = y; | ||
188 | SDL_BlitSurface(background,NULL,screen,&pos); | ||
189 | pos.x = x2; | ||
190 | pos.y = y - background->h; | ||
191 | SDL_BlitSurface(background,NULL,screen,&pos); | ||
192 | pos.x = x2 - background->w; | ||
193 | pos.y = y - background->h; | ||
194 | SDL_BlitSurface(background,NULL,screen,&pos); | ||
195 | } | ||
196 | void SlidingBackground::frame(double time) | ||
197 | { | ||
198 | y += ySpeed*time; | ||
199 | if(y >= background->h) | ||
200 | { | ||
201 | y -= background->h; | ||
202 | x1 = x2; | ||
203 | x2 = 0; | ||
204 | if(randm) | ||
205 | x2 = rand()%background->w; | ||
206 | } | ||
207 | if(y < 0) | ||
208 | { | ||
209 | y += background->h; | ||
210 | x2 = x1; | ||
211 | x1 = 0; | ||
212 | if(randm) | ||
213 | x1 = rand()%background->w; | ||
214 | } | ||
215 | x1 += xSpeed*time; | ||
216 | if(x1 < 0) | ||
217 | x1 += background->w; | ||
218 | if(x1 >= background->w) | ||
219 | x1 -= background->w; | ||
220 | x2 += xSpeed*time; | ||
221 | if(x2 < 0) | ||
222 | x2 += background->w; | ||
223 | if(x2 >= background->w) | ||
224 | x2 -= background->h; | ||
225 | } | ||
226 | |||
227 | void SlidingBackground::setRandom(bool r) | ||
228 | { | ||
229 | randm = r; | ||
230 | if(r) | ||
231 | { | ||
232 | x1 = rand()%background->w; | ||
233 | x2 = rand()%background->w; | ||
234 | } | ||
235 | else | ||
236 | { | ||
237 | x1 = 0; | ||
238 | x2 = 0; | ||
239 | } | ||
240 | } | ||
241 | |||
242 | |||
243 | TextBox::TextBox(vector<Label*> nlabels) | ||
244 | { | ||
245 | labels = nlabels; | ||
246 | } | ||
247 | |||
248 | TextBox::~TextBox() | ||
249 | { | ||
250 | for(int i = 0; i < (int) labels.size(); ++i) | ||
251 | delete labels[i]; | ||
252 | } | ||
253 | |||
254 | void TextBox::draw(SDL_Surface *screen) | ||
255 | { | ||
256 | for(int i = 0; i < (int) labels.size(); ++i) | ||
257 | labels[i]->draw(screen); | ||
258 | } | ||
259 | int TextBox::handleEvents(SDL_Event event){return 0;} | ||
260 | void TextBox::frame(double time){} | ||
261 | void TextBox::refresh(){} | ||
262 | |||
263 | Button::Button(SDL_Rect npos, SDL_Surface *nnormal, SDL_Surface *nmouseOver, SDL_Surface *npressed, SDL_Surface *ninactive) | ||
264 | { | ||
265 | clicked = false; | ||
266 | over = false; | ||
267 | deactivated = false; | ||
268 | selected = false; | ||
269 | isDblClckButton = false; | ||
270 | timer = 0; | ||
271 | pos = npos; | ||
272 | normal = nnormal; | ||
273 | mouseOver = nmouseOver; | ||
274 | pressed = npressed; | ||
275 | inactive = ninactive; | ||
276 | cout << "This constructor is never called!" << endl; | ||
277 | } | ||
278 | |||
279 | Button::Button(SDL_Rect npos, string message, int& shouldbeTextSize) | ||
280 | { | ||
281 | int textSize; | ||
282 | if(shouldbeTextSize == 0) | ||
283 | textSize = (npos.h*2)/3; | ||
284 | else | ||
285 | textSize = shouldbeTextSize; | ||
286 | |||
287 | clicked = false; | ||
288 | over = false; | ||
289 | deactivated = false; | ||
290 | selected = false; | ||
291 | isDblClckButton = false; | ||
292 | timer = 0; | ||
293 | pos = npos; | ||
294 | SDL_Color textColor; | ||
295 | textColor.r = 255; | ||
296 | textColor.g = 255; | ||
297 | textColor.b = 255; | ||
298 | |||
299 | bool done = false; | ||
300 | while(!done && textSize) | ||
301 | { | ||
302 | TTF_Font *font = TTF_OpenFont("data/fonts/OpenSans-Semibold.ttf",textSize); | ||
303 | normal = NULL; | ||
304 | normal = TTF_RenderText_Solid(font, message.c_str(),textColor); | ||
305 | if(normal == NULL) | ||
306 | { | ||
307 | cout << "Error rendering button with message " << message << endl; | ||
308 | return; | ||
309 | } | ||
310 | done = normal->w <= pos.w; | ||
311 | if(!done) | ||
312 | { | ||
313 | SDL_FreeSurface(normal); | ||
314 | textSize--; | ||
315 | } | ||
316 | TTF_CloseFont(font); | ||
317 | } | ||
318 | if(textSize == 0) | ||
319 | { | ||
320 | cout << "textSize error. failbutton is fail!" << endl; | ||
321 | return ; | ||
322 | } | ||
323 | done = false; | ||
324 | while(!done && textSize) | ||
325 | { | ||
326 | TTF_Font *font = TTF_OpenFont("data/fonts/OpenSans-Bold.ttf",textSize); | ||
327 | mouseOver = NULL; | ||
328 | mouseOver = TTF_RenderText_Solid(font, message.c_str(),textColor); | ||
329 | if(mouseOver == NULL) | ||
330 | { | ||
331 | cout << "Error rendering button with message " << message << endl; | ||
332 | return; | ||
333 | } | ||
334 | TTF_CloseFont(font); | ||
335 | done = mouseOver->w <= pos.w; | ||
336 | if(!done) | ||
337 | { | ||
338 | SDL_FreeSurface(mouseOver); | ||
339 | textSize--; | ||
340 | } | ||
341 | } | ||
342 | if(textSize == 0) | ||
343 | { | ||
344 | cout << "textSize error. failbutton is fail!" << endl; | ||
345 | return ; | ||
346 | } | ||
347 | |||
348 | textColor.b = 17; | ||
349 | textColor.g = 200; | ||
350 | textColor.r = 250; | ||
351 | TTF_Font *font = TTF_OpenFont("data/fonts/OpenSans-Semibold.ttf",textSize); | ||
352 | pressed = NULL; | ||
353 | pressed = TTF_RenderText_Solid(font, message.c_str(),textColor); | ||
354 | if(pressed == NULL) | ||
355 | { | ||
356 | cout << "Error rendering button with message " << message << endl; | ||
357 | return; | ||
358 | } | ||
359 | |||
360 | textColor.b = 155; | ||
361 | textColor.g = 155; | ||
362 | textColor.r = 155; | ||
363 | inactive = NULL; | ||
364 | inactive = TTF_RenderText_Solid(font, message.c_str(),textColor); | ||
365 | if(inactive == NULL) | ||
366 | { | ||
367 | cout << "Error rendering button with message " << message << endl; | ||
368 | return; | ||
369 | } | ||
370 | TTF_CloseFont(font); | ||
371 | shouldbeTextSize = textSize; | ||
372 | } | ||
373 | |||
374 | void Button::draw(SDL_Surface *screen) | ||
375 | { | ||
376 | SDL_Rect drawPos; | ||
377 | if(deactivated) | ||
378 | { | ||
379 | drawPos.x = pos.x + (pos.w - inactive->w)/2; | ||
380 | drawPos.y = pos.y + (pos.h - inactive->h)/2; | ||
381 | SDL_BlitSurface(inactive,NULL,screen,&drawPos); | ||
382 | return; | ||
383 | } | ||
384 | if(clicked && !isDblClckButton) | ||
385 | { | ||
386 | drawPos.x = pos.x + (pos.w-pressed->w)/2; | ||
387 | drawPos.y = pos.y + (pos.h-pressed->h)/2; | ||
388 | SDL_BlitSurface(pressed,NULL,screen,&drawPos); | ||
389 | return; | ||
390 | } | ||
391 | if((over && !isDblClckButton) || selected) | ||
392 | { | ||
393 | drawPos.x = pos.x + (pos.w-mouseOver->w)/2; | ||
394 | drawPos.y = pos.y + (pos.h-mouseOver->h)/2; | ||
395 | SDL_BlitSurface(mouseOver,NULL,screen,&drawPos); | ||
396 | return; | ||
397 | } | ||
398 | drawPos.x = pos.x + (pos.w-normal->w)/2; | ||
399 | drawPos.y = pos.y + (pos.h-normal->h)/2; | ||
400 | SDL_BlitSurface(normal,NULL,screen,&drawPos); | ||
401 | } | ||
402 | |||
403 | int Button::handleEvents(const SDL_Event& event) | ||
404 | { | ||
405 | int x,y; | ||
406 | SDL_Surface *current; | ||
407 | if(deactivated) | ||
408 | current = inactive; | ||
409 | else if(clicked) | ||
410 | current = pressed; | ||
411 | else if(over) | ||
412 | current = mouseOver; | ||
413 | else | ||
414 | current = normal; | ||
415 | int xmin = pos.x + (pos.w-current->w)/2; | ||
416 | int xmax = pos.x + (current->w + pos.w)/2; | ||
417 | int ymin = pos.y + (pos.h-current->h)/2; | ||
418 | int ymax = pos.y + (current->h + pos.h)/2; | ||
419 | if(event.type == SDL_MOUSEMOTION) | ||
420 | { | ||
421 | x = event.motion.x; | ||
422 | y = event.motion.y; | ||
423 | if(x < xmin || y < ymin || x >= xmax || y >= ymax) | ||
424 | over = false; | ||
425 | else | ||
426 | over = true; | ||
427 | } | ||
428 | if(event.type == SDL_MOUSEBUTTONDOWN) | ||
429 | { | ||
430 | if(event.button.button == SDL_BUTTON_LEFT) | ||
431 | { | ||
432 | x = event.button.x; | ||
433 | y = event.button.y; | ||
434 | if(x < xmin || y < ymin || x >= xmax || y >= ymax) | ||
435 | over = false; | ||
436 | else | ||
437 | { | ||
438 | if(isDblClckButton) | ||
439 | { | ||
440 | if(clicked && selected) | ||
441 | { | ||
442 | clicked = false; | ||
443 | selected = true; | ||
444 | return BUTTON_CLICKED; | ||
445 | } | ||
446 | else | ||
447 | { | ||
448 | timer = 0.2; | ||
449 | over = true; | ||
450 | clicked = true; | ||
451 | selected = true; | ||
452 | return BUTTON_SELECTED; | ||
453 | } | ||
454 | } | ||
455 | over = true; | ||
456 | clicked = true; | ||
457 | } | ||
458 | } | ||
459 | } | ||
460 | if(event.type == SDL_MOUSEBUTTONUP) | ||
461 | { | ||
462 | if(event.button.button == SDL_BUTTON_LEFT) | ||
463 | { | ||
464 | x = event.button.x; | ||
465 | y = event.button.y; | ||
466 | if(x < xmin || y < ymin || x >= xmax || y >= ymax) | ||
467 | over = false; | ||
468 | else | ||
469 | { | ||
470 | over = true; | ||
471 | if(clicked && !isDblClckButton) | ||
472 | { | ||
473 | clicked = false; | ||
474 | if(deactivated) | ||
475 | return BUTTON_NORMAL; | ||
476 | if(!isDblClckButton) | ||
477 | return BUTTON_CLICKED; | ||
478 | } | ||
479 | } | ||
480 | if(!isDblClckButton) | ||
481 | clicked = false; | ||
482 | } | ||
483 | } | ||
484 | if(over) | ||
485 | { | ||
486 | if(pressed) | ||
487 | return BUTTON_PRESSEDOVER; | ||
488 | return BUTTON_PRESSEDOUT; | ||
489 | } | ||
490 | return BUTTON_NORMAL; | ||
491 | } | ||
492 | |||
493 | void Button::frame(double time) | ||
494 | { | ||
495 | timer -= time; | ||
496 | if(timer < 0 && isDblClckButton) | ||
497 | clicked = false; | ||
498 | } | ||
499 | |||
500 | void Button::refresh() | ||
501 | { | ||
502 | clicked = false; | ||
503 | over = false; | ||
504 | } | ||
505 | |||
506 | Button::~Button() | ||
507 | { | ||
508 | SDL_FreeSurface(pressed); | ||
509 | SDL_FreeSurface(mouseOver); | ||
510 | SDL_FreeSurface(normal); | ||
511 | //sometimes crashes the game on exit | ||
512 | SDL_FreeSurface(inactive); | ||
513 | } | ||
514 | |||
515 | //fancy Button | ||
516 | Button::Button(SDL_Rect npos, SDL_Surface* content, bool fancy) | ||
517 | { | ||
518 | if(content->h < 21) | ||
519 | { | ||
520 | SDL_Surface* temp = content; | ||
521 | content = rotozoomSurface(content,0,2,0); | ||
522 | SDL_FreeSurface(temp); | ||
523 | } | ||
524 | if(content->h > 42) | ||
525 | { | ||
526 | SDL_Surface* temp = content; | ||
527 | content = rotozoomSurface(content,0,0.5,0); | ||
528 | SDL_FreeSurface(temp); | ||
529 | } | ||
530 | deactivated = false; | ||
531 | over = false; | ||
532 | clicked = false; | ||
533 | selected = false; | ||
534 | isDblClckButton = false; | ||
535 | timer = 0; | ||
536 | pos = npos; | ||
537 | int size = 48; | ||
538 | |||
539 | SDL_Surface* norm = NULL; | ||
540 | norm = IMG_Load("data/images/fancy_button.bmp"); | ||
541 | if(norm == NULL) | ||
542 | { | ||
543 | cout << "Error loading bmp while creating fancy button!" << endl; | ||
544 | } | ||
545 | SDL_Surface* inac = NULL; | ||
546 | inac = IMG_Load("data/images/fancy_button_unavailable.bmp"); | ||
547 | if(inac == NULL) | ||
548 | { | ||
549 | cout << "Error loading bmp while creating fancy button!" << endl; | ||
550 | } | ||
551 | SDL_Surface* pres = NULL; | ||
552 | pres = IMG_Load("data/images/fancy_button_clicked.bmp"); | ||
553 | if(pres == NULL) | ||
554 | { | ||
555 | cout << "Error loading bmp while creating fancy button!" << endl; | ||
556 | } | ||
557 | SDL_Surface* mous = NULL; | ||
558 | mous = IMG_Load("data/images/fancy_button_selected.bmp"); | ||
559 | if(mous == NULL) | ||
560 | { | ||
561 | cout << "Error loading bmp while creating fancy button!" << endl; | ||
562 | } | ||
563 | |||
564 | pressed = IMG_Load("data/images/fancy_button_clicked.bmp"); | ||
565 | inactive = IMG_Load("data/images/fancy_button_unavailable.bmp"); | ||
566 | mouseOver = IMG_Load("data/images/fancy_button_selected.bmp"); | ||
567 | normal = IMG_Load("data/images/fancy_button.bmp"); | ||
568 | SDL_Rect dest; | ||
569 | dest.x = size/2 - content->w/2; | ||
570 | dest.y = size/2 - content->h/2; | ||
571 | SDL_Rect temp = dest; | ||
572 | SDL_BlitSurface(content,NULL,normal,&temp); | ||
573 | temp = dest; | ||
574 | if(fancy) | ||
575 | { | ||
576 | SDL_BlitSurface(content,NULL,pressed,&temp); | ||
577 | temp = dest; | ||
578 | } | ||
579 | SDL_BlitSurface(content,NULL,inactive,&temp); | ||
580 | temp = dest; | ||
581 | SDL_BlitSurface(content,NULL,mouseOver,&temp); | ||
582 | SDL_FreeSurface(content); | ||
583 | SDL_BlitSurface(norm,NULL,normal,NULL); | ||
584 | SDL_FreeSurface(norm); | ||
585 | SDL_BlitSurface(pres,NULL,pressed,NULL); | ||
586 | SDL_FreeSurface(pres); | ||
587 | SDL_BlitSurface(mous,NULL,mouseOver,NULL); | ||
588 | SDL_FreeSurface(mous); | ||
589 | SDL_BlitSurface(inac,NULL,inactive,NULL); | ||
590 | SDL_FreeSurface(inac); | ||
591 | } | ||
592 | |||
593 | //makes direction according to h/w of the Rect | ||
594 | Scrollbar::Scrollbar(SDL_Rect npos) | ||
595 | { | ||
596 | state = 0; | ||
597 | stateGoal = state; | ||
598 | sensitivity = 0.005; | ||
599 | clicked = false; | ||
600 | pos = npos; | ||
601 | if(pos.w > pos.h) | ||
602 | horizontal = true; | ||
603 | else | ||
604 | horizontal = false; | ||
605 | dot = NULL; | ||
606 | dot = IMG_Load("data/images/glowing_dot.png"); | ||
607 | if(!dot) | ||
608 | { | ||
609 | cout << "Error loading dot for scrollbar!" << endl; | ||
610 | return; | ||
611 | } | ||
612 | bar = NULL; | ||
613 | bar = SDL_CreateRGBSurface(0,pos.w,pos.h,32,rmask,gmask,bmask,amask); | ||
614 | SDL_FillRect(bar,NULL,0xFF000102); | ||
615 | SDL_SetAlpha(bar,0,255); | ||
616 | SDL_SetColorKey(bar,SDL_SRCCOLORKEY, 0xFF000102); | ||
617 | if(!bar) | ||
618 | { | ||
619 | cout << "Error loading creating scrollbarsurface" << endl; | ||
620 | return; | ||
621 | } | ||
622 | SDL_Surface* barEnd1 = NULL; | ||
623 | SDL_Surface* barEnd2 = NULL; | ||
624 | if(horizontal) | ||
625 | { | ||
626 | barEnd1 = IMG_Load("data/images/scrollbar_end_h1.png"); | ||
627 | barEnd2 = IMG_Load("data/images/scrollbar_end_h2.png"); | ||
628 | } | ||
629 | else | ||
630 | { | ||
631 | barEnd1 = IMG_Load("data/images/scrollbar_end_v1.png"); | ||
632 | barEnd2 = IMG_Load("data/images/scrollbar_end_v2.png"); | ||
633 | } | ||
634 | if(!barEnd1 || !barEnd2) | ||
635 | { | ||
636 | cout << "Error loading end of scrollbar" << endl; | ||
637 | return; | ||
638 | } | ||
639 | if(horizontal) | ||
640 | { | ||
641 | SDL_BlitSurface(barEnd1,NULL,bar,NULL); | ||
642 | SDL_Rect r; | ||
643 | r.x = pos.w - barEnd1->w; | ||
644 | r.y = 0; | ||
645 | SDL_BlitSurface(barEnd2,NULL,bar,&r); | ||
646 | } | ||
647 | else | ||
648 | { | ||
649 | SDL_BlitSurface(barEnd1,NULL,bar,NULL); | ||
650 | SDL_Rect r; | ||
651 | r.x = 0; | ||
652 | r.y = pos.h - barEnd1->h; | ||
653 | SDL_BlitSurface(barEnd2,NULL,bar,&r); | ||
654 | } | ||
655 | SDL_Surface* barMiddle = NULL; | ||
656 | if(horizontal) | ||
657 | barMiddle = IMG_Load("data/images/scrollbar_h.png"); | ||
658 | else | ||
659 | barMiddle = IMG_Load("data/images/scrollbar_v.png"); | ||
660 | if(!barMiddle) | ||
661 | { | ||
662 | cout << "Error in middle of bar!" << endl; | ||
663 | return; | ||
664 | } | ||
665 | int current = barEnd1->h; | ||
666 | int maxcurrent = max(pos.w,pos.h) - barEnd1->h - barMiddle->w; | ||
667 | while(true) | ||
668 | { | ||
669 | if(horizontal) | ||
670 | { | ||
671 | SDL_Rect r2; | ||
672 | r2.x = current; | ||
673 | r2.y = 0; | ||
674 | if(current >= maxcurrent) | ||
675 | { | ||
676 | SDL_Rect r1; | ||
677 | r1.x = 0; | ||
678 | r1.y = 0; | ||
679 | r1.h = barMiddle->h; | ||
680 | r1.w = barMiddle->h - current + maxcurrent; | ||
681 | SDL_BlitSurface(barMiddle,&r1,bar,&r2); | ||
682 | break; | ||
683 | } | ||
684 | else | ||
685 | SDL_BlitSurface(barMiddle, NULL, bar, &r2); | ||
686 | current += barMiddle->w; | ||
687 | } | ||
688 | else | ||
689 | { | ||
690 | SDL_Rect r2; | ||
691 | r2.x = 0; | ||
692 | r2.y = current; | ||
693 | if(current >= maxcurrent) | ||
694 | { | ||
695 | SDL_Rect r1; | ||
696 | r1.x = 0; | ||
697 | r1.y = 0; | ||
698 | r1.h = barMiddle->h - current + maxcurrent; | ||
699 | r1.w = barMiddle->h; | ||
700 | SDL_BlitSurface(barMiddle,&r1,bar,&r2); | ||
701 | break; | ||
702 | } | ||
703 | else | ||
704 | SDL_BlitSurface(barMiddle, NULL, bar, &r2); | ||
705 | current += barMiddle->h; | ||
706 | } | ||
707 | } | ||
708 | |||
709 | SDL_FreeSurface(barMiddle); | ||
710 | SDL_FreeSurface(barEnd1); | ||
711 | SDL_FreeSurface(barEnd2); | ||
712 | } | ||
713 | |||
714 | Scrollbar::~Scrollbar() | ||
715 | { | ||
716 | SDL_FreeSurface(bar); | ||
717 | SDL_FreeSurface(dot); | ||
718 | } | ||
719 | |||
720 | void Scrollbar::draw(SDL_Surface *screen) | ||
721 | { | ||
722 | SDL_Rect r = pos; | ||
723 | SDL_BlitSurface(bar,NULL,screen,&r); | ||
724 | if(horizontal) | ||
725 | { | ||
726 | r.x = pos.x + state * (pos.w-dot->w); | ||
727 | r.y = pos.y; | ||
728 | } | ||
729 | else | ||
730 | { | ||
731 | r.x = pos.x; | ||
732 | r.y = pos.y + state * (pos.h-dot->h); | ||
733 | } | ||
734 | SDL_BlitSurface(dot,NULL,screen,&r); | ||
735 | } | ||
736 | |||
737 | double Scrollbar::handleEvents(const SDL_Event& event) | ||
738 | { | ||
739 | double x,y; | ||
740 | if(event.type == SDL_MOUSEMOTION && clicked) | ||
741 | { | ||
742 | x = event.motion.x; | ||
743 | y = event.motion.y; | ||
744 | if(x > 50000) | ||
745 | x = -10; | ||
746 | if(y > 50000) | ||
747 | y = -10; | ||
748 | if(horizontal) | ||
749 | { | ||
750 | //state = (x - dot->w/2 - pos.x)/(pos.w-dot->w/2); | ||
751 | stateGoal = (x - dot->w/2 - pos.x)/(pos.w-dot->w); | ||
752 | } | ||
753 | else | ||
754 | { | ||
755 | //state = (y - dot->h/2 - pos.y)/(pos.h-dot->h/2); | ||
756 | stateGoal = (y - dot->h/2 - pos.y)/(pos.h-dot->h); | ||
757 | } | ||
758 | if(stateGoal < 0) | ||
759 | stateGoal = 0; | ||
760 | if(stateGoal > 1) | ||
761 | stateGoal = 1; | ||
762 | // stateGoal = state; | ||
763 | } | ||
764 | if(event.type == SDL_MOUSEBUTTONDOWN) | ||
765 | { | ||
766 | if(event.button.button == SDL_BUTTON_LEFT) | ||
767 | { | ||
768 | x = event.button.x; | ||
769 | y = event.button.y; | ||
770 | if(x >= pos.x && y >= pos.y && x < pos.x + pos.w && y < pos.y + pos.h) | ||
771 | { | ||
772 | clicked = true; | ||
773 | if(horizontal) | ||
774 | { | ||
775 | stateGoal = (x - dot->w/2 - pos.x)/(pos.w-dot->w); | ||
776 | } | ||
777 | else | ||
778 | { | ||
779 | stateGoal = (y - dot->h/2 - pos.y)/(pos.h-dot->h); | ||
780 | } | ||
781 | if(stateGoal < 0) | ||
782 | stateGoal = 0; | ||
783 | if(stateGoal > 1) | ||
784 | stateGoal = 1; | ||
785 | // stateGoal = state; | ||
786 | } | ||
787 | } | ||
788 | if(event.button.button == SDL_BUTTON_WHEELDOWN) | ||
789 | { | ||
790 | stateGoal += max(sensitivity,sqrt(fabs(stateGoal-state))*sqrt(sensitivity)*3); | ||
791 | if(stateGoal > 1) | ||
792 | stateGoal = 1; | ||
793 | } | ||
794 | if(event.button.button == SDL_BUTTON_WHEELUP) | ||
795 | { | ||
796 | stateGoal -= max(sensitivity,sqrt(fabs(stateGoal-state))*sqrt(sensitivity)*3); | ||
797 | if(stateGoal < 0) | ||
798 | stateGoal = 0; | ||
799 | } | ||
800 | } | ||
801 | if(event.type == SDL_MOUSEBUTTONUP) | ||
802 | { | ||
803 | if(event.button.button == SDL_BUTTON_LEFT) | ||
804 | clicked = false; | ||
805 | } | ||
806 | return state; | ||
807 | } | ||
808 | |||
809 | double Scrollbar::frame(double time) | ||
810 | { | ||
811 | state = stateGoal - (stateGoal - state) * pow(M_E,-15*time); | ||
812 | if(fabs(state - stateGoal) < 0.5 / max(pos.w,pos.h)) | ||
813 | state = stateGoal; | ||
814 | return state; | ||
815 | } | ||
816 | |||
817 | void Scrollbar::refresh() | ||
818 | { | ||
819 | } | ||
820 | |||
821 | Scrollable::Scrollable(SDL_Rect npos, AbstractInteractive* nsubInteractive, SDL_Rect subRect, bool nhorizontal, bool nscrollbarSide) | ||
822 | { | ||
823 | wholeMenu = npos; | ||
824 | currentSubPos = 0; | ||
825 | pos = npos; | ||
826 | subInteractive = nsubInteractive; | ||
827 | horizontal = nhorizontal; | ||
828 | fakeScreen = SDL_CreateRGBSurface(0,subRect.w,subRect.h,32,rmask,gmask,bmask,0); | ||
829 | Uint32 colorkey = SDL_MapRGB(fakeScreen->format, 0, 1, 2); | ||
830 | SDL_FillRect(fakeScreen,NULL,colorkey); | ||
831 | SDL_SetColorKey(fakeScreen, SDL_SRCCOLORKEY, colorkey); | ||
832 | SDL_Rect barRect; | ||
833 | if(horizontal) | ||
834 | { | ||
835 | barRect.x = pos.x; | ||
836 | barRect.w = pos.w; | ||
837 | barRect.y = pos.y + nscrollbarSide*(pos.h-10); | ||
838 | barRect.h = 10; | ||
839 | pos.h -= 10; | ||
840 | pos.y += !nscrollbarSide * 10; | ||
841 | } | ||
842 | else | ||
843 | { | ||
844 | barRect.x = pos.x + nscrollbarSide*(pos.w - 10); | ||
845 | barRect.w = 10; | ||
846 | barRect.y = pos.y; | ||
847 | barRect.h = pos.h; | ||
848 | pos.w -= 10; | ||
849 | pos.x += !nscrollbarSide * 10; | ||
850 | } | ||
851 | bar = new Scrollbar(barRect); | ||
852 | } | ||
853 | |||
854 | Scrollable::~Scrollable() | ||
855 | { | ||
856 | delete subInteractive; | ||
857 | SDL_FreeSurface(fakeScreen); | ||
858 | } | ||
859 | |||
860 | void Scrollable::draw(SDL_Surface* screen) | ||
861 | { | ||
862 | Uint32 colorkey = SDL_MapRGB(fakeScreen->format, 0, 1, 2); | ||
863 | SDL_FillRect(fakeScreen,NULL,colorkey); | ||
864 | subInteractive->draw(fakeScreen); | ||
865 | SDL_Rect src; | ||
866 | SDL_Rect dst; | ||
867 | if(horizontal) | ||
868 | { | ||
869 | src.x = currentSubPos; | ||
870 | src.y = 0; | ||
871 | src.w = pos.w; | ||
872 | src.h = fakeScreen->h; | ||
873 | dst.x = pos.x; | ||
874 | dst.y = pos.y + (pos.h - fakeScreen->h)/2; | ||
875 | } | ||
876 | else | ||
877 | { | ||
878 | src.x = 0; | ||
879 | src.y = currentSubPos; | ||
880 | src.w = fakeScreen->w; | ||
881 | src.h = pos.h; | ||
882 | dst.x = pos.x + (pos.w - fakeScreen->w)/2; | ||
883 | dst.y = pos.y; | ||
884 | } | ||
885 | SDL_BlitSurface(fakeScreen,&src,screen,&dst); | ||
886 | bool b = true; | ||
887 | if(horizontal && fakeScreen->w < pos.w) | ||
888 | b = false; | ||
889 | if(!horizontal && fakeScreen->h < pos.h) | ||
890 | b = false; | ||
891 | if(b) | ||
892 | bar->draw(screen); | ||
893 | } | ||
894 | |||
895 | int Scrollable::handleEvents(SDL_Event nevent) | ||
896 | { | ||
897 | bool b = true; | ||
898 | if(horizontal && fakeScreen->w < pos.w) | ||
899 | b = false; | ||
900 | if(!horizontal && fakeScreen->h < pos.h) | ||
901 | b = false; | ||
902 | int result = 0; | ||
903 | SDL_Rect r; | ||
904 | if(horizontal) | ||
905 | { | ||
906 | r.x = pos.x - currentSubPos; | ||
907 | r.y = pos.y + (pos.h - fakeScreen->h)/2; | ||
908 | } | ||
909 | else | ||
910 | { | ||
911 | r.y = pos.y - currentSubPos; | ||
912 | r.x = pos.x + (pos.w - fakeScreen->w)/2; | ||
913 | } | ||
914 | SDL_Event event = relativate(nevent,r); | ||
915 | if(event.type == SDL_MOUSEMOTION) | ||
916 | { | ||
917 | if(b) | ||
918 | bar->handleEvents(nevent); | ||
919 | MousePos.x = nevent.motion.x; | ||
920 | MousePos.y = nevent.motion.y; | ||
921 | //if(inRect(pos, nevent.motion.x, nevent.motion.y)) | ||
922 | result = subInteractive->handleEvents(event); | ||
923 | } | ||
924 | if(event.type == SDL_MOUSEBUTTONDOWN) | ||
925 | { | ||
926 | // cout << "got an event at " << nevent.button.x << " " << nevent.button.y << endl; | ||
927 | // cout << "send an event at " << event.button.x << " " << event.button.y << endl; | ||
928 | if(b && inRect(wholeMenu, nevent.button.x, nevent.button.y)) | ||
929 | bar->handleEvents(nevent); | ||
930 | //if(inRect(pos, nevent.button.x, nevent.button.y)) | ||
931 | result = subInteractive->handleEvents(event); | ||
932 | } | ||
933 | if(event.type == SDL_MOUSEBUTTONUP) | ||
934 | { | ||
935 | if(b && event.button.button == SDL_BUTTON_LEFT) | ||
936 | bar->handleEvents(nevent); | ||
937 | //if(inRect(pos, nevent.button.x, nevent.button.y)) | ||
938 | result = subInteractive->handleEvents(event); | ||
939 | } | ||
940 | return result; | ||
941 | } | ||
942 | |||
943 | void Scrollable::frame(double time) | ||
944 | { | ||
945 | subInteractive->frame(time); | ||
946 | setSubPosition(bar->frame(time)); | ||
947 | } | ||
948 | |||
949 | void Scrollable::setSubPosition(double d) | ||
950 | { | ||
951 | int last = currentSubPos; | ||
952 | if(horizontal) | ||
953 | currentSubPos = d * (fakeScreen->w - pos.w); | ||
954 | else | ||
955 | currentSubPos = d * (fakeScreen->h - pos.h); | ||
956 | if(last != currentSubPos && inRect(pos,MousePos.x,MousePos.y)) | ||
957 | { | ||
958 | SDL_Event event; | ||
959 | event.type = SDL_MOUSEMOTION; | ||
960 | event.motion.x = MousePos.x; | ||
961 | event.motion.y = MousePos.y; | ||
962 | event.motion.x -= pos.x; | ||
963 | event.motion.y -= pos.y; | ||
964 | if(horizontal) | ||
965 | { | ||
966 | event.motion.x += currentSubPos; | ||
967 | event.motion.y -= (pos.h - fakeScreen->h)/2; | ||
968 | } | ||
969 | else | ||
970 | { | ||
971 | event.motion.y += currentSubPos; | ||
972 | event.motion.x -= (pos.w - fakeScreen->w)/2; | ||
973 | } | ||
974 | subInteractive->handleEvents(event); | ||
975 | } | ||
976 | } | ||
977 | |||
978 | void Scrollable::refresh() | ||
979 | { | ||
980 | subInteractive->refresh(); | ||
981 | } | ||
982 | |||
983 | Menu::Menu(vector<Button*> nbuttons, vector<int> neffects, SDL_Surface *background, bool rBG) | ||
984 | { | ||
985 | isSelectMenu = false; | ||
986 | onMouseDown = false; | ||
987 | buttons = nbuttons; | ||
988 | effects = neffects; | ||
989 | BG = new SlidingBackground(background, 0, 100); | ||
990 | BG->setRandom(rBG); | ||
991 | } | ||
992 | |||
993 | Menu::Menu(vector<string> choices, vector<int> neffects, SDL_Surface *background, bool rBG, SDL_Surface *screen) | ||
994 | { | ||
995 | isSelectMenu = false; | ||
996 | onMouseDown = false; | ||
997 | effects = neffects; | ||
998 | BG = new SlidingBackground(background, 0, 100); | ||
999 | BG->setRandom(rBG); | ||
1000 | int minTextSize; | ||
1001 | bool done = true; | ||
1002 | for(int i = 0; i < (int) choices.size(); ++i) | ||
1003 | { | ||
1004 | int curTextSize = 0; | ||
1005 | SDL_Rect r; | ||
1006 | r.y = screen->h*0.2 + i / ((double) choices.size()) * screen->h * 0.6; | ||
1007 | r.x = screen->w/5.0; | ||
1008 | r.w = screen->w*3.0/5.0; | ||
1009 | r.h = screen->h*0.6/((double) choices.size()); | ||
1010 | Button *b = new Button(r, choices[i], curTextSize); | ||
1011 | if(effects[i] == 0) | ||
1012 | { | ||
1013 | b->deactivated = true; | ||
1014 | } | ||
1015 | buttons.push_back(b); | ||
1016 | if(i == 0) | ||
1017 | minTextSize = curTextSize; | ||
1018 | if(minTextSize != curTextSize) | ||
1019 | { | ||
1020 | minTextSize = min(curTextSize, minTextSize); | ||
1021 | done = false; | ||
1022 | } | ||
1023 | } | ||
1024 | if(done == true) | ||
1025 | return; | ||
1026 | for(int i = 0; i < (int) choices.size(); ++i) | ||
1027 | delete buttons[i]; | ||
1028 | for(int i = 0; i < (int) choices.size(); ++i) | ||
1029 | { | ||
1030 | SDL_Rect r; | ||
1031 | r.y = screen->h*0.2 + i / ((double) choices.size()) * screen->h * 0.6; | ||
1032 | r.x = screen->w/5.0; | ||
1033 | r.w = screen->w*3.0/5.0; | ||
1034 | r.h = screen->h*0.6/((double) choices.size()); | ||
1035 | Button *b = new Button(r, choices[i], minTextSize); | ||
1036 | if(effects[i] == 0) | ||
1037 | b->deactivated = true; | ||
1038 | buttons[i] = b; | ||
1039 | } | ||
1040 | } | ||
1041 | |||
1042 | Menu::~Menu() | ||
1043 | { | ||
1044 | delete BG; | ||
1045 | for(int i = 0; i < (int) buttons.size(); ++i) | ||
1046 | delete buttons[i]; | ||
1047 | } | ||
1048 | |||
1049 | void Menu::draw(SDL_Surface *screen) | ||
1050 | { | ||
1051 | BG->draw(screen); | ||
1052 | for(int i = 0; i < (int) buttons.size(); ++i) | ||
1053 | buttons[i]->draw(screen); | ||
1054 | } | ||
1055 | |||
1056 | int Menu::handleEvents(SDL_Event event) | ||
1057 | { | ||
1058 | for(int i = 0; i < (int) buttons.size(); ++i) | ||
1059 | { | ||
1060 | int temp = buttons[i]->handleEvents(event); | ||
1061 | if(((temp == BUTTON_PRESSEDOVER) || (false)) && onMouseDown) | ||
1062 | return effects[i]; | ||
1063 | if(temp == BUTTON_CLICKED && !isSelectMenu) | ||
1064 | return effects[i]; | ||
1065 | if(temp == BUTTON_CLICKED && isSelectMenu) | ||
1066 | { | ||
1067 | //cout << "Click on " << i << endl; | ||
1068 | return effects[i] | MENU_CLICK; | ||
1069 | } | ||
1070 | if(temp == BUTTON_SELECTED && isSelectMenu) | ||
1071 | { | ||
1072 | for(int j = 0; j < (int) buttons.size(); ++j) | ||
1073 | if(j != i) | ||
1074 | buttons[j]->selected = false; | ||
1075 | return effects[i] | MENU_SELECT; | ||
1076 | } | ||
1077 | } | ||
1078 | return 0; | ||
1079 | } | ||
1080 | |||
1081 | void Menu::frame(double time) | ||
1082 | { | ||
1083 | BG->frame(time); | ||
1084 | for(int i = 0; i < (int) buttons.size(); ++i) | ||
1085 | buttons[i]->frame(time); | ||
1086 | } | ||
1087 | |||
1088 | void Menu::refresh() | ||
1089 | { | ||
1090 | for(int i = 0; i < (int) buttons.size(); ++i) | ||
1091 | buttons[i]->refresh(); | ||
1092 | } | ||
1093 | |||
1094 | //matrixMenu | ||
1095 | Menu::Menu(vector<SDL_Surface*> pics, int width, int& height, bool nisSelectMenu, bool nonMouseDown) | ||
1096 | { | ||
1097 | isSelectMenu = nisSelectMenu; | ||
1098 | onMouseDown = nonMouseDown; | ||
1099 | SDL_Rect r; | ||
1100 | r.x = 0; | ||
1101 | r.y = 0; | ||
1102 | r.w = 48; | ||
1103 | r.h = 48; | ||
1104 | for(int i = 0; i < (int) pics.size(); ++i) | ||
1105 | { | ||
1106 | if(isSelectMenu) | ||
1107 | effects.push_back(i); | ||
1108 | else | ||
1109 | effects.push_back(i | MENU_SELECT); | ||
1110 | Button *b = new Button(r, pics[i], !onMouseDown); | ||
1111 | if(isSelectMenu) | ||
1112 | b->isDblClckButton = true; | ||
1113 | buttons.push_back(b); | ||
1114 | r.x += 48; | ||
1115 | if(r.x +48 > width) | ||
1116 | { | ||
1117 | r.x = 0; | ||
1118 | r.y += 48; | ||
1119 | } | ||
1120 | } | ||
1121 | if(isSelectMenu) | ||
1122 | buttons[0]->selected = true; | ||
1123 | height = r.y; | ||
1124 | SDL_Surface* back = SDL_CreateRGBSurface(0,width,height,32,0,0,0,0); | ||
1125 | SDL_SetColorKey(back,SDL_SRCCOLORKEY,0x000102); | ||
1126 | SDL_FillRect(back,NULL,0x000102); | ||
1127 | BG = new SlidingBackground(back, 0, 0); | ||
1128 | BG->setRandom(0); | ||
1129 | } | ||
1130 | |||
1131 | CompositMenu::CompositMenu(vector<AbstractInteractive*> nsubmenues, SDL_Surface* nBG, SDL_Rect nsubPos, vector<Button*> ntabs) | ||
1132 | { | ||
1133 | submenues = nsubmenues; | ||
1134 | subPos = nsubPos; | ||
1135 | tabs = ntabs; | ||
1136 | BG = new SlidingBackground(nBG, 0, 100); | ||
1137 | fakeScreen = SDL_CreateRGBSurface(0,subPos.w,subPos.h,32,0,0,0,0); | ||
1138 | SDL_SetColorKey(fakeScreen,SDL_SRCCOLORKEY,0x000102); | ||
1139 | state = 0; | ||
1140 | tabs[0]->selected = true; | ||
1141 | } | ||
1142 | |||
1143 | CompositMenu::~CompositMenu() | ||
1144 | { | ||
1145 | for(int i = 0; i < (int) submenues.size(); ++i) | ||
1146 | delete submenues[i]; | ||
1147 | for(int i = 0; i < (int) tabs.size(); ++i) | ||
1148 | delete tabs[i]; | ||
1149 | delete BG; | ||
1150 | SDL_FreeSurface(fakeScreen); | ||
1151 | } | ||
1152 | |||
1153 | void CompositMenu::draw(SDL_Surface *screen) | ||
1154 | { | ||
1155 | BG->draw(screen); | ||
1156 | SDL_FillRect(fakeScreen,NULL,0x000102); | ||
1157 | submenues[state]->draw(fakeScreen); | ||
1158 | SDL_BlitSurface(fakeScreen,NULL,screen,&subPos); | ||
1159 | for(int i = 0; i < (int) tabs.size(); ++i) | ||
1160 | tabs[i]->draw(screen); | ||
1161 | } | ||
1162 | |||
1163 | int CompositMenu::handleEvents(SDL_Event event) | ||
1164 | { | ||
1165 | |||
1166 | for(int i = 0; i < (int) tabs.size(); ++i) | ||
1167 | { | ||
1168 | int temp = tabs[i]->handleEvents(event); | ||
1169 | if(temp == BUTTON_SELECTED) | ||
1170 | { | ||
1171 | state = i; | ||
1172 | for(int j = 0; j < (int) tabs.size(); ++j) | ||
1173 | if(i != j) | ||
1174 | tabs[j]->selected = false; | ||
1175 | submenues[state]->refresh(); | ||
1176 | } | ||
1177 | } | ||
1178 | SDL_Event nevent = relativate(event, subPos); | ||
1179 | // if(nevent.type == SDL_MOUSEBUTTONDOWN) | ||
1180 | // { | ||
1181 | // cout << "CMenu got an event at " << event.button.x << " " << event.button.y << endl; | ||
1182 | // cout << "CMenu sent an event at " << nevent.button.x << " " << nevent.button.y << ". state is " << state << endl; | ||
1183 | // } | ||
1184 | return submenues[state]->handleEvents(nevent); | ||
1185 | } | ||
1186 | |||
1187 | void CompositMenu::frame(double time) | ||
1188 | { | ||
1189 | BG->frame(time); | ||
1190 | submenues[state]->frame(time); | ||
1191 | for(int i = 0; i < (int) tabs.size(); ++i) | ||
1192 | tabs[i]->frame(time); | ||
1193 | } | ||
1194 | |||
1195 | void CompositMenu::refresh() | ||
1196 | { | ||
1197 | for(int i = 0; i < (int) submenues.size(); ++i) | ||
1198 | submenues[i]->refresh(); | ||
1199 | for(int i = 0; i < (int) tabs.size(); ++i) | ||
1200 | tabs[i]->refresh(); | ||
1201 | } | ||
1202 | |||
1203 | int CompositMenu::getState() | ||
1204 | { | ||
1205 | return state; | ||
1206 | } | ||
1207 | |||
1208 | GetStringMenu::GetStringMenu(string headline, int niBack, int niOK, SDL_Surface* nBG, SDL_Surface* screen) | ||
1209 | { | ||
1210 | screenw = screen->w; | ||
1211 | maxLength = 22; | ||
1212 | SDL_EnableUNICODE( SDL_ENABLE ); | ||
1213 | iBack = niBack; | ||
1214 | iOK = niOK; | ||
1215 | SDL_Rect tRect; | ||
1216 | tRect.x = 0; | ||
1217 | tRect.y = screen->h/3; | ||
1218 | tRect.w = screen->w; | ||
1219 | tRect.h = 30; | ||
1220 | title = new Label(headline, tRect); | ||
1221 | tRect.x = (screen->w - title->pos.w)/2; | ||
1222 | title->pos = tRect; | ||
1223 | BG = new SlidingBackground(nBG, 0, 100); | ||
1224 | tRect.y += 40; | ||
1225 | tRect.h = 30; | ||
1226 | input = new Label("nicht leer", tRect); | ||
1227 | tRect.x = (screen->w - input->pos.w)/2; | ||
1228 | input->pos = tRect; | ||
1229 | int textSize = 0; | ||
1230 | SDL_Rect backPos = tRect; | ||
1231 | backPos.y += 40; | ||
1232 | backPos.x = screen->w/6; | ||
1233 | backPos.w = (2*screen->w)/6; | ||
1234 | backPos.h = 50; | ||
1235 | back = new Button(backPos,"back",textSize); | ||
1236 | backPos.x = screen->w/2; | ||
1237 | oK = new Button(backPos,"OK",textSize); | ||
1238 | } | ||
1239 | |||
1240 | GetStringMenu::~GetStringMenu() | ||
1241 | { | ||
1242 | SDL_EnableUNICODE( SDL_DISABLE ); | ||
1243 | delete title; | ||
1244 | delete input; | ||
1245 | delete back; | ||
1246 | delete oK; | ||
1247 | } | ||
1248 | |||
1249 | void GetStringMenu::draw(SDL_Surface* screen) | ||
1250 | { | ||
1251 | BG->draw(screen); | ||
1252 | title->draw(screen); | ||
1253 | if(s != "") | ||
1254 | input->draw(screen); | ||
1255 | back->draw(screen); | ||
1256 | oK->draw(screen); | ||
1257 | } | ||
1258 | |||
1259 | int GetStringMenu::handleEvents(SDL_Event event) | ||
1260 | { | ||
1261 | if(back->handleEvents(event) == BUTTON_CLICKED) | ||
1262 | return iBack; | ||
1263 | if(oK->handleEvents(event) == BUTTON_CLICKED) | ||
1264 | return iOK; | ||
1265 | |||
1266 | //If a key was pressed | ||
1267 | if( event.type == SDL_KEYDOWN ) | ||
1268 | { | ||
1269 | //If the string less than maximum size | ||
1270 | if((int) s.length() <= maxLength ) | ||
1271 | { | ||
1272 | if(event.key.keysym.unicode == (Uint16) ' ') | ||
1273 | { | ||
1274 | s += (char)event.key.keysym.unicode; | ||
1275 | } | ||
1276 | else if((event.key.keysym.unicode >= (Uint16) '0' ) && ( event.key.keysym.unicode <= (Uint16) '9')) | ||
1277 | { | ||
1278 | s += (char)event.key.keysym.unicode; | ||
1279 | } | ||
1280 | else if((event.key.keysym.unicode >= (Uint16) 'A') && (event.key.keysym.unicode <= (Uint16) 'Z')) | ||
1281 | { | ||
1282 | s += (char)event.key.keysym.unicode; | ||
1283 | } | ||
1284 | else if((event.key.keysym.unicode >= (Uint16) 'a') && (event.key.keysym.unicode <= (Uint16) 'z')) | ||
1285 | { | ||
1286 | s += (char)event.key.keysym.unicode; | ||
1287 | } | ||
1288 | } | ||
1289 | } | ||
1290 | //If backspace was pressed and the string isn't blank | ||
1291 | if((event.key.keysym.sym == SDLK_BACKSPACE) && (s.length() != 0)) | ||
1292 | { | ||
1293 | //Remove a character from the end | ||
1294 | s.erase(s.length() - 1); | ||
1295 | } | ||
1296 | if((event.key.keysym.sym == SDLK_RETURN) && oK->deactivated == false) | ||
1297 | { | ||
1298 | return iOK; | ||
1299 | } | ||
1300 | if(s != "") | ||
1301 | input->setCaption(s); | ||
1302 | input->pos.x = (screenw - input->pos.w)/2; | ||
1303 | return 0; | ||
1304 | } | ||
1305 | |||
1306 | void GetStringMenu::frame(double time) | ||
1307 | { | ||
1308 | BG->frame(time); | ||
1309 | } | ||
1310 | |||
1311 | void GetStringMenu::refresh() | ||
1312 | { | ||
1313 | s = ""; | ||
1314 | } | ||
1315 | |||
1316 | |||
@@ -0,0 +1,225 @@ | |||
1 | #ifndef GUI_H | ||
2 | #define GUI_H | ||
3 | |||
4 | #include <SDL/SDL_rotozoom.h> | ||
5 | #include "util.h" | ||
6 | |||
7 | #define BUTTON_CLICKED 0 | ||
8 | #define BUTTON_NORMAL 1 | ||
9 | #define BUTTON_HOVER 2 | ||
10 | #define BUTTON_PRESSEDOVER 3 | ||
11 | #define BUTTON_PRESSEDOUT 4 | ||
12 | #define BUTTON_SELECTED 5 | ||
13 | #define MENU_SELECT 1<<27 | ||
14 | #define MENU_CLICK 1<<26 | ||
15 | |||
16 | |||
17 | using namespace std; | ||
18 | |||
19 | |||
20 | class Label | ||
21 | { | ||
22 | protected: | ||
23 | string caption; | ||
24 | SDL_Surface* image; | ||
25 | // int textSize; | ||
26 | SDL_Color textColor; | ||
27 | int render(); | ||
28 | public: | ||
29 | SDL_Rect pos; | ||
30 | Label(); | ||
31 | Label(string ncaption, SDL_Rect& npos); | ||
32 | ~Label(); | ||
33 | void draw(SDL_Surface* screen); | ||
34 | int setTextSize(int ntextSize); | ||
35 | void setTextColor(SDL_Color textColor); | ||
36 | int setCaption(string ncaption); | ||
37 | }; | ||
38 | |||
39 | vector<Label*> textField(string s, SDL_Rect& r, int textSize); | ||
40 | |||
41 | |||
42 | class SlidingBackground | ||
43 | { | ||
44 | protected: | ||
45 | SDL_Surface *background; | ||
46 | double x1; | ||
47 | double x2; | ||
48 | double y; | ||
49 | public: | ||
50 | double xSpeed; | ||
51 | double ySpeed; | ||
52 | bool randm; | ||
53 | |||
54 | SlidingBackground(SDL_Surface *nbackground, double nxSpeed, double nySpeed); | ||
55 | ~SlidingBackground(); | ||
56 | |||
57 | void setRandom(bool r); | ||
58 | void draw(SDL_Surface *screen); | ||
59 | void frame(double time); | ||
60 | }; | ||
61 | |||
62 | class AbstractInteractive | ||
63 | { | ||
64 | public: | ||
65 | virtual ~AbstractInteractive(){} | ||
66 | virtual void draw(SDL_Surface *screen) {} | ||
67 | virtual int handleEvents(SDL_Event event){return 0;} | ||
68 | virtual void frame(double time){} | ||
69 | virtual void refresh(){} | ||
70 | }; | ||
71 | |||
72 | class TextBox: public AbstractInteractive | ||
73 | { | ||
74 | protected: | ||
75 | vector<Label*> labels; | ||
76 | public: | ||
77 | TextBox(vector<Label*> nlabels); | ||
78 | ~TextBox(); | ||
79 | |||
80 | virtual void draw(SDL_Surface *screen); | ||
81 | virtual int handleEvents(SDL_Event event); | ||
82 | virtual void frame(double time); | ||
83 | virtual void refresh(); | ||
84 | }; | ||
85 | |||
86 | class Button: AbstractInteractive | ||
87 | { | ||
88 | protected: | ||
89 | SDL_Surface *normal; | ||
90 | SDL_Surface *mouseOver; | ||
91 | SDL_Surface *pressed; | ||
92 | SDL_Surface *inactive; | ||
93 | bool clicked; | ||
94 | bool over; | ||
95 | public: | ||
96 | bool deactivated; | ||
97 | bool isDblClckButton; | ||
98 | double timer; | ||
99 | bool selected; | ||
100 | SDL_Rect pos; | ||
101 | |||
102 | Button(SDL_Rect nPos, SDL_Surface *nnormal, SDL_Surface *nmouseOver, SDL_Surface *npressed, SDL_Surface *ninactive); | ||
103 | Button(SDL_Rect npos, string message, int& shouldbeTextSize); | ||
104 | //fancybutton & draggable button | ||
105 | Button(SDL_Rect npos, SDL_Surface* content, bool fancy); | ||
106 | ~Button(); | ||
107 | void draw(SDL_Surface *screen); | ||
108 | int handleEvents(const SDL_Event& event); | ||
109 | void frame(double time); | ||
110 | void refresh(); | ||
111 | }; | ||
112 | |||
113 | class Scrollbar | ||
114 | { | ||
115 | protected: | ||
116 | SDL_Surface *bar; | ||
117 | SDL_Surface *dot; | ||
118 | bool horizontal; | ||
119 | bool clicked; | ||
120 | double stateGoal; | ||
121 | public: | ||
122 | double state; | ||
123 | double sensitivity; | ||
124 | SDL_Rect pos; | ||
125 | |||
126 | //makes direction according to h/w of the Rect | ||
127 | Scrollbar(SDL_Rect npos); | ||
128 | ~Scrollbar(); | ||
129 | |||
130 | void draw(SDL_Surface *screen); | ||
131 | double handleEvents(const SDL_Event& event); | ||
132 | double frame(double time); | ||
133 | void refresh(); | ||
134 | }; | ||
135 | |||
136 | class Scrollable : public AbstractInteractive | ||
137 | { | ||
138 | protected: | ||
139 | int currentSubPos; | ||
140 | SDL_Surface* fakeScreen; | ||
141 | AbstractInteractive* subInteractive; | ||
142 | SDL_Rect pos; | ||
143 | SDL_Rect wholeMenu; | ||
144 | Scrollbar* bar; | ||
145 | bool horizontal; | ||
146 | void setSubPosition(double d); | ||
147 | SDL_Rect MousePos; | ||
148 | public: | ||
149 | Scrollable(SDL_Rect npos, AbstractInteractive* nsubInteractive, SDL_Rect subRect, bool nhorizontal, bool nscrollbarSide); | ||
150 | ~Scrollable(); | ||
151 | void draw(SDL_Surface* screen); | ||
152 | int handleEvents(SDL_Event event); | ||
153 | void frame(double time); | ||
154 | void refresh(); | ||
155 | }; | ||
156 | |||
157 | class Menu : public AbstractInteractive | ||
158 | { | ||
159 | public: | ||
160 | vector<Button*> buttons; | ||
161 | vector<int> effects; | ||
162 | SlidingBackground *BG; | ||
163 | bool isSelectMenu; | ||
164 | //wether to send signal on Mouse up or down | ||
165 | bool onMouseDown; | ||
166 | |||
167 | Menu(){ | ||
168 | } | ||
169 | Menu(vector<Button*> nbuttons, vector<int> neffects, SDL_Surface *background, bool rBG); | ||
170 | Menu(vector<string> choices, vector<int> neffects, SDL_Surface *background, bool rBG, SDL_Surface *screen); | ||
171 | Menu(vector<SDL_Surface*> pics, int width, int& height, bool nisSelectMenu, bool nonMouseDown); | ||
172 | virtual ~Menu(); | ||
173 | |||
174 | virtual void draw(SDL_Surface *screen); | ||
175 | virtual int handleEvents(SDL_Event event); | ||
176 | virtual void frame(double time); | ||
177 | virtual void refresh(); | ||
178 | }; | ||
179 | |||
180 | |||
181 | |||
182 | class CompositMenu: public AbstractInteractive | ||
183 | { | ||
184 | protected: | ||
185 | vector<Button*> tabs; | ||
186 | int state; | ||
187 | SDL_Surface* fakeScreen; | ||
188 | SDL_Rect subPos; | ||
189 | public: | ||
190 | vector<AbstractInteractive*> submenues; | ||
191 | SlidingBackground* BG; | ||
192 | CompositMenu(vector<AbstractInteractive*> nsubmenues, SDL_Surface* nBG, SDL_Rect nsubPos, vector<Button*> ntabs); | ||
193 | ~CompositMenu(); | ||
194 | |||
195 | virtual void draw(SDL_Surface *screen); | ||
196 | virtual int handleEvents(SDL_Event event); | ||
197 | virtual void frame(double time); | ||
198 | virtual void refresh(); | ||
199 | int getState(); | ||
200 | }; | ||
201 | |||
202 | class GetStringMenu: public AbstractInteractive | ||
203 | { | ||
204 | protected: | ||
205 | Label* title; | ||
206 | Label* input; | ||
207 | Button* back; | ||
208 | Button* oK; | ||
209 | int iBack; | ||
210 | int iOK; | ||
211 | int screenw; | ||
212 | public: | ||
213 | SlidingBackground* BG; | ||
214 | string s; | ||
215 | int maxLength; | ||
216 | GetStringMenu(string headline, int back, int ok, SDL_Surface* nBG, SDL_Surface* screen); | ||
217 | ~GetStringMenu(); | ||
218 | |||
219 | virtual void draw(SDL_Surface* screen); | ||
220 | virtual int handleEvents(SDL_Event event); | ||
221 | virtual void frame(double time); | ||
222 | virtual void refresh(); | ||
223 | }; | ||
224 | |||
225 | #endif | ||
diff --git a/changelog.txt b/changelog.txt new file mode 100644 index 0000000..20dd820 --- /dev/null +++ b/changelog.txt | |||
@@ -0,0 +1,33 @@ | |||
1 | v0.02 release notes | ||
2 | bugfixes: | ||
3 | - fixed a bug where menus would have options still highlighted if reloaded | ||
4 | structure: | ||
5 | - cleaned up code (especially main) | ||
6 | - added a menus with | ||
7 | - interactive buttons that all have the same textsize | ||
8 | - starbackground | ||
9 | - added a few new attributes to weapon and ships | ||
10 | - added a shop with upgrades available for purchase | ||
11 | content added: | ||
12 | - 1 weapon | ||
13 | - 3 enemies | ||
14 | - 2 levels | ||
15 | - mainmenu, levelmenu and startmenu | ||
16 | |||
17 | v0.01b release notes | ||
18 | stucture: | ||
19 | - arcade game engine featuring | ||
20 | - collision detection | ||
21 | - sounds | ||
22 | - ship with difficult handling | ||
23 | - load from file levels, enemies weapons and ships | ||
24 | - level generator | ||
25 | - requires only minimal information | ||
26 | - enemies will come in one of 5 beautiful wavetypes | ||
27 | - HUD with Energy-bar, HP-bar, gold-, exp- and highscoredisplay | ||
28 | content: | ||
29 | - 5 weapons | ||
30 | - 3 enemies | ||
31 | - 1 Usership | ||
32 | - 1 HUD artworks | ||
33 | - 1 level | ||
diff --git a/data/EnemyShip_template.txt~ b/data/EnemyShip_template.txt~ new file mode 100644 index 0000000..2fdb348 --- /dev/null +++ b/data/EnemyShip_template.txt~ | |||
@@ -0,0 +1,12 @@ | |||
1 | Tork Spacerocket #name | ||
2 | data/images/tork_spacerocket.bmp #path of imagefile | ||
3 | 7 #maxhp | ||
4 | 5 #armor | ||
5 | 50 #moveSpeed | ||
6 | 4 #collisionSize | ||
7 | 3 #Gold | ||
8 | 3 #exp | ||
9 | 3 #score | ||
10 | 1 #number of weapons | ||
11 | 0 -1 #relative Position of weapon | ||
12 | data/fireball.txt #path of weapon | ||
diff --git a/data/Level_template.txt~ b/data/Level_template.txt~ new file mode 100644 index 0000000..5f56909 --- /dev/null +++ b/data/Level_template.txt~ | |||
@@ -0,0 +1,14 @@ | |||
1 | IntroLevel #name | ||
2 | data/images/bg_stars.bmp #path of background | ||
3 | 30 #speed of background | ||
4 | 1 #wether to randomize background position | ||
5 | 60 #duration [s] | ||
6 | 12346543 #seed | ||
7 | 2 #number of Shiptypes | ||
8 | data/tork_capsule.txt #path of Ship | ||
9 | 50 #how many of them should spawn | ||
10 | data/tork_spacerocket.txt #path of Ship | ||
11 | 12 #how many | ||
12 | 1 #how many events shall happen | ||
13 | 0.5 #percentage of completion the event happens | ||
14 | ****event***** #an event | ||
diff --git a/data/UserShip_template.txt~ b/data/UserShip_template.txt~ new file mode 100644 index 0000000..e526124 --- /dev/null +++ b/data/UserShip_template.txt~ | |||
@@ -0,0 +1,15 @@ | |||
1 | small Fighter #name | ||
2 | data/images/small_fighter.bmp #path of imagefile | ||
3 | 7 #maxhp | ||
4 | 50 #armor | ||
5 | 200 #moveSpeed | ||
6 | 100 #handling | ||
7 | 10 #maxEnergy | ||
8 | 2 #energyProduction | ||
9 | 7 #collisionSize | ||
10 | 2 #number of weapons | ||
11 | 4 4 #relative Position of weapon | ||
12 | data/fireball.txt #path of weapon | ||
13 | 4 4 #relative Position of weapon | ||
14 | data/fireball.txt #path of weapon | ||
15 | |||
diff --git a/data/beam.txt~ b/data/beam.txt~ new file mode 100644 index 0000000..99001f3 --- /dev/null +++ b/data/beam.txt~ | |||
@@ -0,0 +1,5 @@ | |||
1 | data/images/spit.bmp | ||
2 | data/sounds/piu | ||
3 | 0.4 | ||
4 | 10 | ||
5 | 1 | ||
diff --git a/data/beamer1.txt~ b/data/beamer1.txt~ new file mode 100644 index 0000000..31ffd79 --- /dev/null +++ b/data/beamer1.txt~ | |||
@@ -0,0 +1,9 @@ | |||
1 | Beamer 1 | ||
2 | data/images/beamer1.bmp | ||
3 | 3 | ||
4 | 1 | ||
5 | 0.1 | ||
6 | 0 | ||
7 | data/beam.txt | ||
8 | 0 | ||
9 | 1000 | ||
diff --git a/data/bigspit.txt~ b/data/bigspit.txt~ new file mode 100644 index 0000000..00d3e4e --- /dev/null +++ b/data/bigspit.txt~ | |||
@@ -0,0 +1,4 @@ | |||
1 | data/images/bigspit.bmp | ||
2 | 8 | ||
3 | 0 | ||
4 | 4 | ||
diff --git a/data/creator.cpp~ b/data/creator.cpp~ new file mode 100644 index 0000000..9abcdcf --- /dev/null +++ b/data/creator.cpp~ | |||
@@ -0,0 +1,32 @@ | |||
1 | #include <iostream> | ||
2 | #include <fstream> | ||
3 | #include <math.h> | ||
4 | |||
5 | using namespace std; | ||
6 | |||
7 | int main() | ||
8 | { | ||
9 | ofstream o; | ||
10 | o.open("nnova1.txt"); | ||
11 | o << "Nova 1\n"; | ||
12 | o << "data/images/empty.bmp\n"; | ||
13 | o << 2 << '\n'; | ||
14 | int shots = 300; | ||
15 | double T = 10; | ||
16 | double duration = 0.6; | ||
17 | double start = 3; | ||
18 | double speed = 320; | ||
19 | int Ncircles = 4; | ||
20 | o << shots << endl; | ||
21 | for(int i = 0; i < shots; ++i) | ||
22 | { | ||
23 | o << T << '\n'; | ||
24 | o << T - start - ((double) i)/((double) shots)*duration-0.0001 << '\n'; | ||
25 | o << "data/psi.txt\n"; | ||
26 | o << cos(Ncircles*2*M_PI*i/((double) shots))*speed << '\n'; | ||
27 | o << sin(Ncircles*2*M_PI*i/((double) shots))*speed; | ||
28 | if(i != shots-1) | ||
29 | o << endl; | ||
30 | } | ||
31 | o.close(); | ||
32 | } | ||
diff --git a/data/fire1.txt~ b/data/fire1.txt~ new file mode 100644 index 0000000..031e2c3 --- /dev/null +++ b/data/fire1.txt~ | |||
@@ -0,0 +1,4 @@ | |||
1 | data/images/fire1.bmp | ||
2 | 2 | ||
3 | 10 | ||
4 | 3.5 | ||
diff --git a/data/fireball1.txt~ b/data/fireball1.txt~ new file mode 100644 index 0000000..1400896 --- /dev/null +++ b/data/fireball1.txt~ | |||
@@ -0,0 +1,9 @@ | |||
1 | Fireball 1 | ||
2 | data/images/fire1.bmp | ||
3 | 1.5 | ||
4 | 1 | ||
5 | 3 | ||
6 | 2 | ||
7 | data/fire1.txt | ||
8 | 0 | ||
9 | 150 | ||
diff --git a/data/fonts/Apache License Version 2.txt b/data/fonts/Apache License Version 2.txt new file mode 100644 index 0000000..4df74b8 --- /dev/null +++ b/data/fonts/Apache License Version 2.txt | |||
@@ -0,0 +1,53 @@ | |||
1 | Apache License | ||
2 | |||
3 | Version 2.0, January 2004 | ||
4 | |||
5 | http://www.apache.org/licenses/ | ||
6 | |||
7 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION | ||
8 | |||
9 | 1. Definitions. | ||
10 | |||
11 | "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. | ||
12 | |||
13 | "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. | ||
14 | |||
15 | "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. | ||
16 | |||
17 | "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. | ||
18 | |||
19 | "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. | ||
20 | |||
21 | "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. | ||
22 | |||
23 | "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). | ||
24 | |||
25 | "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. | ||
26 | |||
27 | "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." | ||
28 | |||
29 | "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. | ||
30 | |||
31 | 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. | ||
32 | |||
33 | 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. | ||
34 | |||
35 | 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: | ||
36 | |||
37 | You must give any other recipients of the Work or Derivative Works a copy of this License; and | ||
38 | |||
39 | You must cause any modified files to carry prominent notices stating that You changed the files; and | ||
40 | |||
41 | You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and | ||
42 | |||
43 | If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. | ||
44 | |||
45 | 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. | ||
46 | |||
47 | 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. | ||
48 | |||
49 | 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. | ||
50 | |||
51 | 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. | ||
52 | |||
53 | 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. \ No newline at end of file | ||
diff --git a/data/fonts/OpenSans-Bold.ttf b/data/fonts/OpenSans-Bold.ttf new file mode 100644 index 0000000..fd79d43 --- /dev/null +++ b/data/fonts/OpenSans-Bold.ttf | |||
Binary files differ | |||
diff --git a/data/fonts/OpenSans-BoldItalic.ttf b/data/fonts/OpenSans-BoldItalic.ttf new file mode 100644 index 0000000..9bc8009 --- /dev/null +++ b/data/fonts/OpenSans-BoldItalic.ttf | |||
Binary files differ | |||
diff --git a/data/fonts/OpenSans-ExtraBold.ttf b/data/fonts/OpenSans-ExtraBold.ttf new file mode 100644 index 0000000..21f6f84 --- /dev/null +++ b/data/fonts/OpenSans-ExtraBold.ttf | |||
Binary files differ | |||
diff --git a/data/fonts/OpenSans-ExtraBoldItalic.ttf b/data/fonts/OpenSans-ExtraBoldItalic.ttf new file mode 100644 index 0000000..31cb688 --- /dev/null +++ b/data/fonts/OpenSans-ExtraBoldItalic.ttf | |||
Binary files differ | |||
diff --git a/data/fonts/OpenSans-Italic.ttf b/data/fonts/OpenSans-Italic.ttf new file mode 100644 index 0000000..c90da48 --- /dev/null +++ b/data/fonts/OpenSans-Italic.ttf | |||
Binary files differ | |||
diff --git a/data/fonts/OpenSans-Light.ttf b/data/fonts/OpenSans-Light.ttf new file mode 100644 index 0000000..0d38189 --- /dev/null +++ b/data/fonts/OpenSans-Light.ttf | |||
Binary files differ | |||
diff --git a/data/fonts/OpenSans-LightItalic.ttf b/data/fonts/OpenSans-LightItalic.ttf new file mode 100644 index 0000000..68299c4 --- /dev/null +++ b/data/fonts/OpenSans-LightItalic.ttf | |||
Binary files differ | |||
diff --git a/data/fonts/OpenSans-Regular.ttf b/data/fonts/OpenSans-Regular.ttf new file mode 100644 index 0000000..db43334 --- /dev/null +++ b/data/fonts/OpenSans-Regular.ttf | |||
Binary files differ | |||
diff --git a/data/fonts/OpenSans-Semibold.ttf b/data/fonts/OpenSans-Semibold.ttf new file mode 100644 index 0000000..1a7679e --- /dev/null +++ b/data/fonts/OpenSans-Semibold.ttf | |||
Binary files differ | |||
diff --git a/data/fonts/OpenSans-SemiboldItalic.ttf b/data/fonts/OpenSans-SemiboldItalic.ttf new file mode 100644 index 0000000..59b6d16 --- /dev/null +++ b/data/fonts/OpenSans-SemiboldItalic.ttf | |||
Binary files differ | |||
diff --git a/data/images/background.bmp b/data/images/background.bmp new file mode 100644 index 0000000..0f481c6 --- /dev/null +++ b/data/images/background.bmp | |||
Binary files differ | |||
diff --git a/data/images/beamer1.bmp b/data/images/beamer1.bmp new file mode 100644 index 0000000..5eabbc4 --- /dev/null +++ b/data/images/beamer1.bmp | |||
Binary files differ | |||
diff --git a/data/images/bg_stars.bmp b/data/images/bg_stars.bmp new file mode 100644 index 0000000..0f481c6 --- /dev/null +++ b/data/images/bg_stars.bmp | |||
Binary files differ | |||
diff --git a/data/images/bigspit.bmp b/data/images/bigspit.bmp new file mode 100644 index 0000000..950b08c --- /dev/null +++ b/data/images/bigspit.bmp | |||
Binary files differ | |||
diff --git a/data/images/empty.bmp b/data/images/empty.bmp new file mode 100644 index 0000000..4af26a7 --- /dev/null +++ b/data/images/empty.bmp | |||
Binary files differ | |||
diff --git a/data/images/energy_bubbles.bmp b/data/images/energy_bubbles.bmp new file mode 100644 index 0000000..4a32973 --- /dev/null +++ b/data/images/energy_bubbles.bmp | |||
Binary files differ | |||
diff --git a/data/images/energy_bubbles2.bmp b/data/images/energy_bubbles2.bmp new file mode 100644 index 0000000..8fc0d05 --- /dev/null +++ b/data/images/energy_bubbles2.bmp | |||
Binary files differ | |||
diff --git a/data/images/energy_bubbles3.bmp b/data/images/energy_bubbles3.bmp new file mode 100644 index 0000000..7b7922c --- /dev/null +++ b/data/images/energy_bubbles3.bmp | |||
Binary files differ | |||
diff --git a/data/images/energy_masc.bmp b/data/images/energy_masc.bmp new file mode 100644 index 0000000..7d746d9 --- /dev/null +++ b/data/images/energy_masc.bmp | |||
Binary files differ | |||
diff --git a/data/images/energy_masc2.bmp b/data/images/energy_masc2.bmp new file mode 100644 index 0000000..2414caa --- /dev/null +++ b/data/images/energy_masc2.bmp | |||
Binary files differ | |||
diff --git a/data/images/energy_raw.bmp b/data/images/energy_raw.bmp new file mode 100644 index 0000000..de4d8ae --- /dev/null +++ b/data/images/energy_raw.bmp | |||
Binary files differ | |||
diff --git a/data/images/energy_raw2.bmp b/data/images/energy_raw2.bmp new file mode 100644 index 0000000..5b9a7cb --- /dev/null +++ b/data/images/energy_raw2.bmp | |||
Binary files differ | |||
diff --git a/data/images/fancy_button.bmp b/data/images/fancy_button.bmp new file mode 100644 index 0000000..8f9f7d9 --- /dev/null +++ b/data/images/fancy_button.bmp | |||
Binary files differ | |||
diff --git a/data/images/fancy_button_clicked.bmp b/data/images/fancy_button_clicked.bmp new file mode 100644 index 0000000..d990a8f --- /dev/null +++ b/data/images/fancy_button_clicked.bmp | |||
Binary files differ | |||
diff --git a/data/images/fancy_button_selected.bmp b/data/images/fancy_button_selected.bmp new file mode 100644 index 0000000..225162e --- /dev/null +++ b/data/images/fancy_button_selected.bmp | |||
Binary files differ | |||
diff --git a/data/images/fancy_button_unavailable.bmp b/data/images/fancy_button_unavailable.bmp new file mode 100644 index 0000000..eeb4695 --- /dev/null +++ b/data/images/fancy_button_unavailable.bmp | |||
Binary files differ | |||
diff --git a/data/images/fire1.bmp b/data/images/fire1.bmp new file mode 100644 index 0000000..1c93d5a --- /dev/null +++ b/data/images/fire1.bmp | |||
Binary files differ | |||
diff --git a/data/images/game_screen.bmp b/data/images/game_screen.bmp new file mode 100644 index 0000000..28fa1e4 --- /dev/null +++ b/data/images/game_screen.bmp | |||
Binary files differ | |||
diff --git a/data/images/glowing_dot.png b/data/images/glowing_dot.png new file mode 100644 index 0000000..8823b2a --- /dev/null +++ b/data/images/glowing_dot.png | |||
Binary files differ | |||
diff --git a/data/images/hornet.bmp b/data/images/hornet.bmp new file mode 100644 index 0000000..d9f64d5 --- /dev/null +++ b/data/images/hornet.bmp | |||
Binary files differ | |||
diff --git a/data/images/hp_masc.bmp b/data/images/hp_masc.bmp new file mode 100644 index 0000000..e657ba2 --- /dev/null +++ b/data/images/hp_masc.bmp | |||
Binary files differ | |||
diff --git a/data/images/hp_masc2.bmp b/data/images/hp_masc2.bmp new file mode 100644 index 0000000..3ec95b9 --- /dev/null +++ b/data/images/hp_masc2.bmp | |||
Binary files differ | |||
diff --git a/data/images/hp_raw.bmp b/data/images/hp_raw.bmp new file mode 100644 index 0000000..22b00bf --- /dev/null +++ b/data/images/hp_raw.bmp | |||
Binary files differ | |||
diff --git a/data/images/hud_background.bmp b/data/images/hud_background.bmp new file mode 100644 index 0000000..64ec3b3 --- /dev/null +++ b/data/images/hud_background.bmp | |||
Binary files differ | |||
diff --git a/data/images/psi.bmp b/data/images/psi.bmp new file mode 100644 index 0000000..862bdcd --- /dev/null +++ b/data/images/psi.bmp | |||
Binary files differ | |||
diff --git a/data/images/scrollbar_end_h1.png b/data/images/scrollbar_end_h1.png new file mode 100644 index 0000000..80fe890 --- /dev/null +++ b/data/images/scrollbar_end_h1.png | |||
Binary files differ | |||
diff --git a/data/images/scrollbar_end_h2.png b/data/images/scrollbar_end_h2.png new file mode 100644 index 0000000..587038c --- /dev/null +++ b/data/images/scrollbar_end_h2.png | |||
Binary files differ | |||
diff --git a/data/images/scrollbar_end_v1.png b/data/images/scrollbar_end_v1.png new file mode 100644 index 0000000..a29e114 --- /dev/null +++ b/data/images/scrollbar_end_v1.png | |||
Binary files differ | |||
diff --git a/data/images/scrollbar_end_v2.png b/data/images/scrollbar_end_v2.png new file mode 100644 index 0000000..561c1f1 --- /dev/null +++ b/data/images/scrollbar_end_v2.png | |||
Binary files differ | |||
diff --git a/data/images/scrollbar_h.png b/data/images/scrollbar_h.png new file mode 100644 index 0000000..548ee40 --- /dev/null +++ b/data/images/scrollbar_h.png | |||
Binary files differ | |||
diff --git a/data/images/scrollbar_v.png b/data/images/scrollbar_v.png new file mode 100644 index 0000000..362911b --- /dev/null +++ b/data/images/scrollbar_v.png | |||
Binary files differ | |||
diff --git a/data/images/ship1.bmp b/data/images/ship1.bmp new file mode 100644 index 0000000..8abfd92 --- /dev/null +++ b/data/images/ship1.bmp | |||
Binary files differ | |||
diff --git a/data/images/ship2.bmp b/data/images/ship2.bmp new file mode 100644 index 0000000..765c8b3 --- /dev/null +++ b/data/images/ship2.bmp | |||
Binary files differ | |||
diff --git a/data/images/small_fighter.bmp b/data/images/small_fighter.bmp new file mode 100644 index 0000000..7f506db --- /dev/null +++ b/data/images/small_fighter.bmp | |||
Binary files differ | |||
diff --git a/data/images/spit.bmp b/data/images/spit.bmp new file mode 100644 index 0000000..c37b452 --- /dev/null +++ b/data/images/spit.bmp | |||
Binary files differ | |||
diff --git a/data/images/spitter1.bmp b/data/images/spitter1.bmp new file mode 100644 index 0000000..fe93bcd --- /dev/null +++ b/data/images/spitter1.bmp | |||
Binary files differ | |||
diff --git a/data/images/spitter3.bmp b/data/images/spitter3.bmp new file mode 100644 index 0000000..d7dfe3e --- /dev/null +++ b/data/images/spitter3.bmp | |||
Binary files differ | |||
diff --git a/data/images/tork_cruiser.bmp b/data/images/tork_cruiser.bmp new file mode 100644 index 0000000..4a67d0c --- /dev/null +++ b/data/images/tork_cruiser.bmp | |||
Binary files differ | |||
diff --git a/data/images/tork_interceptor.bmp b/data/images/tork_interceptor.bmp new file mode 100644 index 0000000..b4b080d --- /dev/null +++ b/data/images/tork_interceptor.bmp | |||
Binary files differ | |||
diff --git a/data/images/tork_sting.bmp b/data/images/tork_sting.bmp new file mode 100644 index 0000000..f4fdce4 --- /dev/null +++ b/data/images/tork_sting.bmp | |||
Binary files differ | |||
diff --git a/data/images/tork_tanker.bmp b/data/images/tork_tanker.bmp new file mode 100644 index 0000000..3b4e056 --- /dev/null +++ b/data/images/tork_tanker.bmp | |||
Binary files differ | |||
diff --git a/data/introlevel.txt~ b/data/introlevel.txt~ new file mode 100644 index 0000000..9f40e40 --- /dev/null +++ b/data/introlevel.txt~ | |||
@@ -0,0 +1,14 @@ | |||
1 | Introlevel | ||
2 | data/images/bg_stars.bmp | ||
3 | 60 | ||
4 | 1 | ||
5 | 90 | ||
6 | 1246435 | ||
7 | 3 | ||
8 | data/tork_capsule.txt | ||
9 | 25 | ||
10 | data/tork_spacerocket.txt | ||
11 | 5 | ||
12 | data/tork_interceptor.txt | ||
13 | 2 | ||
14 | 0 | ||
diff --git a/data/levels/Level_template.txt b/data/levels/Level_template.txt new file mode 100644 index 0000000..fe3ce3d --- /dev/null +++ b/data/levels/Level_template.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | IntroLevel #name | ||
2 | data/images/bg_stars.bmp #path of background | ||
3 | 30 #speed of background | ||
4 | 1 #wether to randomize background position | ||
5 | 60 #duration [s] | ||
6 | 12346543 #seed | ||
7 | 2 #number of Shiptypes | ||
8 | data/tork_capsule.txt #path of Ship | ||
9 | 40 #how many of them should spawn | ||
10 | data/tork_spacerocket.txt #path of Ship | ||
11 | 8 #how many | ||
12 | 1 #how many events shall happen | ||
13 | 0.5 #percentage of completion the event happens | ||
14 | ****event***** #an event | ||
diff --git a/data/levels/Levels.txt~ b/data/levels/Levels.txt~ new file mode 100644 index 0000000..561a6d1 --- /dev/null +++ b/data/levels/Levels.txt~ | |||
@@ -0,0 +1 @@ | |||
intro_level.txt | |||
diff --git a/data/levels/insanelevel.txt b/data/levels/insanelevel.txt new file mode 100644 index 0000000..6fa5f2e --- /dev/null +++ b/data/levels/insanelevel.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | Insane Level | ||
2 | data/images/bg_stars.bmp | ||
3 | 60 | ||
4 | 1 | ||
5 | 40 | ||
6 | 11374431 | ||
7 | 6 | ||
8 | data/ships/tork/capsule.txt | ||
9 | 20 | ||
10 | data/ships/tork/spacerocket.txt | ||
11 | 25 | ||
12 | data/ships/tork/interceptor.txt | ||
13 | 6 | ||
14 | data/ships/tork/cruiser.txt | ||
15 | 10 | ||
16 | data/ships/tork/tanker.txt | ||
17 | 16 | ||
18 | data/ships/tork/sting.txt | ||
19 | 45 | ||
20 | 0 | ||
diff --git a/data/levels/insanelevel.txt~ b/data/levels/insanelevel.txt~ new file mode 100644 index 0000000..eec3ac6 --- /dev/null +++ b/data/levels/insanelevel.txt~ | |||
@@ -0,0 +1,20 @@ | |||
1 | Insane Level | ||
2 | data/images/bg_stars.bmp | ||
3 | 60 | ||
4 | 1 | ||
5 | 40 | ||
6 | 11374431 | ||
7 | 6 | ||
8 | data/ships/tork/capsule.txt | ||
9 | 20 | ||
10 | data/ships/tork/spacerocket.txt | ||
11 | 25 | ||
12 | data/ships/tork/interceptor.txt | ||
13 | 6 | ||
14 | data/ships/tork/cruiser.txt | ||
15 | 10 | ||
16 | data/ships/tork/tanker.txt | ||
17 | 8 | ||
18 | data/ships/tork/sting.txt | ||
19 | 45 | ||
20 | 0 | ||
diff --git a/data/levels/introlevel.txt b/data/levels/introlevel.txt new file mode 100644 index 0000000..94d26df --- /dev/null +++ b/data/levels/introlevel.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | Introlevel | ||
2 | data/images/bg_stars.bmp | ||
3 | 60 | ||
4 | 1 | ||
5 | 50 | ||
6 | 1246436 | ||
7 | 3 | ||
8 | data/ships/tork/capsule.txt | ||
9 | 140 | ||
10 | data/ships/tork/spacerocket.txt | ||
11 | 10 | ||
12 | data/ships/tork/interceptor.txt | ||
13 | 4 | ||
14 | 0 | ||
diff --git a/data/levels/introlevel.txt~ b/data/levels/introlevel.txt~ new file mode 100644 index 0000000..a4731c7 --- /dev/null +++ b/data/levels/introlevel.txt~ | |||
@@ -0,0 +1,14 @@ | |||
1 | Introlevel | ||
2 | data/images/bg_stars.bmp | ||
3 | 60 | ||
4 | 1 | ||
5 | 50 | ||
6 | 1246436 | ||
7 | 3 | ||
8 | data/ships/tork/capsule.txt | ||
9 | 35 | ||
10 | data/ships/tork/spacerocket.txt | ||
11 | 5 | ||
12 | data/ships/tork/interceptor.txt | ||
13 | 2 | ||
14 | 0 | ||
diff --git a/data/levels/level2.txt b/data/levels/level2.txt new file mode 100644 index 0000000..1a31fcb --- /dev/null +++ b/data/levels/level2.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | Level 2 | ||
2 | data/images/bg_stars.bmp | ||
3 | 60 | ||
4 | 1 | ||
5 | 105 | ||
6 | 11654436 | ||
7 | 4 | ||
8 | data/ships/tork/capsule.txt | ||
9 | 160 | ||
10 | data/ships/tork/spacerocket.txt | ||
11 | 20 | ||
12 | data/ships/tork/interceptor.txt | ||
13 | 12 | ||
14 | data/ships/tork/cruiser.txt | ||
15 | 4 | ||
16 | 0 | ||
diff --git a/data/levels/level2.txt~ b/data/levels/level2.txt~ new file mode 100644 index 0000000..e50a515 --- /dev/null +++ b/data/levels/level2.txt~ | |||
@@ -0,0 +1,16 @@ | |||
1 | Level 2 | ||
2 | data/images/bg_stars.bmp | ||
3 | 60 | ||
4 | 1 | ||
5 | 105 | ||
6 | 11654436 | ||
7 | 4 | ||
8 | data/ships/tork/capsule.txt | ||
9 | 40 | ||
10 | data/ships/tork/spacerocket.txt | ||
11 | 10 | ||
12 | data/ships/tork/interceptor.txt | ||
13 | 6 | ||
14 | data/ships/tork/cruiser.txt | ||
15 | 2 | ||
16 | 0 | ||
diff --git a/data/levels/level3.txt b/data/levels/level3.txt new file mode 100644 index 0000000..212a241 --- /dev/null +++ b/data/levels/level3.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | Level 3 | ||
2 | data/images/bg_stars.bmp | ||
3 | 60 | ||
4 | 1 | ||
5 | 65 | ||
6 | 11374331 | ||
7 | 6 | ||
8 | data/ships/tork/capsule.txt | ||
9 | 120 | ||
10 | data/ships/tork/spacerocket.txt | ||
11 | 20 | ||
12 | data/ships/tork/interceptor.txt | ||
13 | 8 | ||
14 | data/ships/tork/cruiser.txt | ||
15 | 8 | ||
16 | data/ships/tork/tanker.txt | ||
17 | 80 | ||
18 | data/ships/tork/sting.txt | ||
19 | 80 | ||
20 | 0 | ||
diff --git a/data/levels/level3.txt~ b/data/levels/level3.txt~ new file mode 100644 index 0000000..8c103eb --- /dev/null +++ b/data/levels/level3.txt~ | |||
@@ -0,0 +1,20 @@ | |||
1 | Level 3 | ||
2 | data/images/bg_stars.bmp | ||
3 | 60 | ||
4 | 1 | ||
5 | 65 | ||
6 | 11374331 | ||
7 | 6 | ||
8 | data/ships/tork/capsule.txt | ||
9 | 120 | ||
10 | data/ships/tork/spacerocket.txt | ||
11 | 20 | ||
12 | data/ships/tork/interceptor.txt | ||
13 | 8 | ||
14 | data/ships/tork/cruiser.txt | ||
15 | 8 | ||
16 | data/ships/tork/tanker.txt | ||
17 | 40 | ||
18 | data/ships/tork/sting.txt | ||
19 | 80 | ||
20 | 0 | ||
diff --git a/data/levels/level4.txt b/data/levels/level4.txt new file mode 100644 index 0000000..7652e9d --- /dev/null +++ b/data/levels/level4.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | Level 4 | ||
2 | data/images/bg_stars.bmp | ||
3 | 60 | ||
4 | 1 | ||
5 | 50 | ||
6 | 1246436 | ||
7 | 3 | ||
8 | data/ships/tork/sting.txt | ||
9 | 140 | ||
10 | data/ships/tork/interceptor.txt | ||
11 | 10 | ||
12 | data/ships/tork/cruiser.txt | ||
13 | 4 | ||
14 | 0 | ||
diff --git a/data/levels/level4.txt~ b/data/levels/level4.txt~ new file mode 100644 index 0000000..aba3a6f --- /dev/null +++ b/data/levels/level4.txt~ | |||
@@ -0,0 +1,14 @@ | |||
1 | Level 4 | ||
2 | data/images/bg_stars.bmp | ||
3 | 60 | ||
4 | 1 | ||
5 | 50 | ||
6 | 1246436 | ||
7 | 3 | ||
8 | data/ships/tork/sting.txt | ||
9 | 35 | ||
10 | data/ships/tork/interceptor.txt | ||
11 | 5 | ||
12 | data/ships/tork/cruiser.txt | ||
13 | 2 | ||
14 | 0 | ||
diff --git a/data/levels/levels.txt b/data/levels/levels.txt new file mode 100644 index 0000000..788f050 --- /dev/null +++ b/data/levels/levels.txt | |||
@@ -0,0 +1,5 @@ | |||
1 | introlevel.txt | ||
2 | level2.txt | ||
3 | level3.txt | ||
4 | level4.txt | ||
5 | insanelevel.txt | ||
diff --git a/data/levels/levels.txt~ b/data/levels/levels.txt~ new file mode 100644 index 0000000..acc839a --- /dev/null +++ b/data/levels/levels.txt~ | |||
@@ -0,0 +1,4 @@ | |||
1 | introlevel.txt | ||
2 | level2.txt | ||
3 | level3.txt | ||
4 | insanelevel.txt | ||
diff --git a/data/nnova.txt~ b/data/nnova.txt~ new file mode 100644 index 0000000..b15b226 --- /dev/null +++ b/data/nnova.txt~ | |||
@@ -0,0 +1,254 @@ | |||
1 | Nova 1 | ||
2 | data/images/empty.bmp | ||
3 | 20 | ||
4 | 50 | ||
5 | 10 | ||
6 | 3 | ||
7 | data/psi.txt | ||
8 | 350 | ||
9 | 0 | ||
10 | 10 | ||
11 | 3.5 | ||
12 | data/psi.txt | ||
13 | 347.24 | ||
14 | 43.8666 | ||
15 | 10 | ||
16 | 4 | ||
17 | data/psi.txt | ||
18 | 339.004 | ||
19 | 87.0415 | ||
20 | 10 | ||
21 | 4.5 | ||
22 | data/psi.txt | ||
23 | 325.422 | ||
24 | 128.844 | ||
25 | 10 | ||
26 | 5 | ||
27 | data/psi.txt | ||
28 | 306.707 | ||
29 | 168.614 | ||
30 | 10 | ||
31 | 5.5 | ||
32 | data/psi.txt | ||
33 | 283.156 | ||
34 | 205.725 | ||
35 | 10 | ||
36 | 6 | ||
37 | data/psi.txt | ||
38 | 255.139 | ||
39 | 239.591 | ||
40 | 10 | ||
41 | 6.5 | ||
42 | data/psi.txt | ||
43 | 223.098 | ||
44 | 269.68 | ||
45 | 10 | ||
46 | 7 | ||
47 | data/psi.txt | ||
48 | 187.539 | ||
49 | 295.515 | ||
50 | 10 | ||
51 | 7.5 | ||
52 | data/psi.txt | ||
53 | 149.023 | ||
54 | 316.689 | ||
55 | 10 | ||
56 | 8 | ||
57 | data/psi.txt | ||
58 | 108.156 | ||
59 | 332.87 | ||
60 | 10 | ||
61 | 8.5 | ||
62 | data/psi.txt | ||
63 | 65.5835 | ||
64 | 343.801 | ||
65 | 10 | ||
66 | 9 | ||
67 | data/psi.txt | ||
68 | 21.9767 | ||
69 | 349.309 | ||
70 | 10 | ||
71 | 9.5 | ||
72 | data/psi.txt | ||
73 | -21.9767 | ||
74 | 349.309 | ||
75 | 10 | ||
76 | 10 | ||
77 | data/psi.txt | ||
78 | -65.5835 | ||
79 | 343.801 | ||
80 | 10 | ||
81 | 10.5 | ||
82 | data/psi.txt | ||
83 | -108.156 | ||
84 | 332.87 | ||
85 | 10 | ||
86 | 11 | ||
87 | data/psi.txt | ||
88 | -149.023 | ||
89 | 316.689 | ||
90 | 10 | ||
91 | 11.5 | ||
92 | data/psi.txt | ||
93 | -187.539 | ||
94 | 295.515 | ||
95 | 10 | ||
96 | 12 | ||
97 | data/psi.txt | ||
98 | -223.098 | ||
99 | 269.68 | ||
100 | 10 | ||
101 | 12.5 | ||
102 | data/psi.txt | ||
103 | -255.139 | ||
104 | 239.591 | ||
105 | 10 | ||
106 | 13 | ||
107 | data/psi.txt | ||
108 | -283.156 | ||
109 | 205.725 | ||
110 | 10 | ||
111 | 13.5 | ||
112 | data/psi.txt | ||
113 | -306.707 | ||
114 | 168.614 | ||
115 | 10 | ||
116 | 14 | ||
117 | data/psi.txt | ||
118 | -325.422 | ||
119 | 128.844 | ||
120 | 10 | ||
121 | 14.5 | ||
122 | data/psi.txt | ||
123 | -339.004 | ||
124 | 87.0415 | ||
125 | 10 | ||
126 | 15 | ||
127 | data/psi.txt | ||
128 | -347.24 | ||
129 | 43.8666 | ||
130 | 10 | ||
131 | 15.5 | ||
132 | data/psi.txt | ||
133 | -350 | ||
134 | 4.28626e-14 | ||
135 | 10 | ||
136 | 16 | ||
137 | data/psi.txt | ||
138 | -347.24 | ||
139 | -43.8666 | ||
140 | 10 | ||
141 | 16.5 | ||
142 | data/psi.txt | ||
143 | -339.004 | ||
144 | -87.0415 | ||
145 | 10 | ||
146 | 17 | ||
147 | data/psi.txt | ||
148 | -325.422 | ||
149 | -128.844 | ||
150 | 10 | ||
151 | 17.5 | ||
152 | data/psi.txt | ||
153 | -306.707 | ||
154 | -168.614 | ||
155 | 10 | ||
156 | 18 | ||
157 | data/psi.txt | ||
158 | -283.156 | ||
159 | -205.725 | ||
160 | 10 | ||
161 | 18.5 | ||
162 | data/psi.txt | ||
163 | -255.139 | ||
164 | -239.591 | ||
165 | 10 | ||
166 | 19 | ||
167 | data/psi.txt | ||
168 | -223.098 | ||
169 | -269.68 | ||
170 | 10 | ||
171 | 19.5 | ||
172 | data/psi.txt | ||
173 | -187.539 | ||
174 | -295.515 | ||
175 | 10 | ||
176 | 20 | ||
177 | data/psi.txt | ||
178 | -149.023 | ||
179 | -316.689 | ||
180 | 10 | ||
181 | 20.5 | ||
182 | data/psi.txt | ||
183 | -108.156 | ||
184 | -332.87 | ||
185 | 10 | ||
186 | 21 | ||
187 | data/psi.txt | ||
188 | -65.5835 | ||
189 | -343.801 | ||
190 | 10 | ||
191 | 21.5 | ||
192 | data/psi.txt | ||
193 | -21.9767 | ||
194 | -349.309 | ||
195 | 10 | ||
196 | 22 | ||
197 | data/psi.txt | ||
198 | 21.9767 | ||
199 | -349.309 | ||
200 | 10 | ||
201 | 22.5 | ||
202 | data/psi.txt | ||
203 | 65.5835 | ||
204 | -343.801 | ||
205 | 10 | ||
206 | 23 | ||
207 | data/psi.txt | ||
208 | 108.156 | ||
209 | -332.87 | ||
210 | 10 | ||
211 | 23.5 | ||
212 | data/psi.txt | ||
213 | 149.023 | ||
214 | -316.689 | ||
215 | 10 | ||
216 | 24 | ||
217 | data/psi.txt | ||
218 | 187.539 | ||
219 | -295.515 | ||
220 | 10 | ||
221 | 24.5 | ||
222 | data/psi.txt | ||
223 | 223.098 | ||
224 | -269.68 | ||
225 | 10 | ||
226 | 25 | ||
227 | data/psi.txt | ||
228 | 255.139 | ||
229 | -239.591 | ||
230 | 10 | ||
231 | 25.5 | ||
232 | data/psi.txt | ||
233 | 283.156 | ||
234 | -205.725 | ||
235 | 10 | ||
236 | 26 | ||
237 | data/psi.txt | ||
238 | 306.707 | ||
239 | -168.614 | ||
240 | 10 | ||
241 | 26.5 | ||
242 | data/psi.txt | ||
243 | 325.422 | ||
244 | -128.844 | ||
245 | 10 | ||
246 | 27 | ||
247 | data/psi.txt | ||
248 | 339.004 | ||
249 | -87.0415 | ||
250 | 10 | ||
251 | 27.5 | ||
252 | data/psi.txt | ||
253 | 347.24 | ||
254 | -43.8666 | ||
diff --git a/data/nova1.txt~ b/data/nova1.txt~ new file mode 100644 index 0000000..2fe20c5 --- /dev/null +++ b/data/nova1.txt~ | |||
@@ -0,0 +1,1504 @@ | |||
1 | Nova 1 | ||
2 | data/images/empty.bmp | ||
3 | 2 | ||
4 | 300 | ||
5 | 10 | ||
6 | 6.9999 | ||
7 | data/psi.txt | ||
8 | 320 | ||
9 | 0 | ||
10 | 10 | ||
11 | 6.9979 | ||
12 | data/psi.txt | ||
13 | 318.878 | ||
14 | 26.7769 | ||
15 | 10 | ||
16 | 6.9959 | ||
17 | data/psi.txt | ||
18 | 315.519 | ||
19 | 53.366 | ||
20 | 10 | ||
21 | 6.9939 | ||
22 | data/psi.txt | ||
23 | 309.947 | ||
24 | 79.5808 | ||
25 | 10 | ||
26 | 6.9919 | ||
27 | data/psi.txt | ||
28 | 302.2 | ||
29 | 105.237 | ||
30 | 10 | ||
31 | 6.9899 | ||
32 | data/psi.txt | ||
33 | 292.335 | ||
34 | 130.156 | ||
35 | 10 | ||
36 | 6.9879 | ||
37 | data/psi.txt | ||
38 | 280.418 | ||
39 | 154.161 | ||
40 | 10 | ||
41 | 6.9859 | ||
42 | data/psi.txt | ||
43 | 266.535 | ||
44 | 177.085 | ||
45 | 10 | ||
46 | 6.9839 | ||
47 | data/psi.txt | ||
48 | 250.782 | ||
49 | 198.767 | ||
50 | 10 | ||
51 | 6.9819 | ||
52 | data/psi.txt | ||
53 | 233.27 | ||
54 | 219.055 | ||
55 | 10 | ||
56 | 6.9799 | ||
57 | data/psi.txt | ||
58 | 214.122 | ||
59 | 237.806 | ||
60 | 10 | ||
61 | 6.9779 | ||
62 | data/psi.txt | ||
63 | 193.472 | ||
64 | 254.89 | ||
65 | 10 | ||
66 | 6.9759 | ||
67 | data/psi.txt | ||
68 | 171.465 | ||
69 | 270.185 | ||
70 | 10 | ||
71 | 6.9739 | ||
72 | data/psi.txt | ||
73 | 148.255 | ||
74 | 283.585 | ||
75 | 10 | ||
76 | 6.9719 | ||
77 | data/psi.txt | ||
78 | 124.005 | ||
79 | 294.996 | ||
80 | 10 | ||
81 | 6.9699 | ||
82 | data/psi.txt | ||
83 | 98.8854 | ||
84 | 304.338 | ||
85 | 10 | ||
86 | 6.9679 | ||
87 | data/psi.txt | ||
88 | 73.0723 | ||
89 | 311.545 | ||
90 | 10 | ||
91 | 6.9659 | ||
92 | data/psi.txt | ||
93 | 46.7466 | ||
94 | 316.567 | ||
95 | 10 | ||
96 | 6.9639 | ||
97 | data/psi.txt | ||
98 | 20.093 | ||
99 | 319.369 | ||
100 | 10 | ||
101 | 6.9619 | ||
102 | data/psi.txt | ||
103 | -6.70157 | ||
104 | 319.93 | ||
105 | 10 | ||
106 | 6.9599 | ||
107 | data/psi.txt | ||
108 | -33.4491 | ||
109 | 318.247 | ||
110 | 10 | ||
111 | 6.9579 | ||
112 | data/psi.txt | ||
113 | -59.962 | ||
114 | 314.332 | ||
115 | 10 | ||
116 | 6.9559 | ||
117 | data/psi.txt | ||
118 | -86.0543 | ||
119 | 308.212 | ||
120 | 10 | ||
121 | 6.9539 | ||
122 | data/psi.txt | ||
123 | -111.543 | ||
124 | 299.93 | ||
125 | 10 | ||
126 | 6.9519 | ||
127 | data/psi.txt | ||
128 | -136.249 | ||
129 | 289.545 | ||
130 | 10 | ||
131 | 6.9499 | ||
132 | data/psi.txt | ||
133 | -160 | ||
134 | 277.128 | ||
135 | 10 | ||
136 | 6.9479 | ||
137 | data/psi.txt | ||
138 | -182.628 | ||
139 | 262.768 | ||
140 | 10 | ||
141 | 6.9459 | ||
142 | data/psi.txt | ||
143 | -203.976 | ||
144 | 246.564 | ||
145 | 10 | ||
146 | 6.9439 | ||
147 | data/psi.txt | ||
148 | -223.892 | ||
149 | 228.631 | ||
150 | 10 | ||
151 | 6.9419 | ||
152 | data/psi.txt | ||
153 | -242.238 | ||
154 | 209.095 | ||
155 | 10 | ||
156 | 6.9399 | ||
157 | data/psi.txt | ||
158 | -258.885 | ||
159 | 188.091 | ||
160 | 10 | ||
161 | 6.9379 | ||
162 | data/psi.txt | ||
163 | -273.717 | ||
164 | 165.769 | ||
165 | 10 | ||
166 | 6.9359 | ||
167 | data/psi.txt | ||
168 | -286.628 | ||
169 | 142.283 | ||
170 | 10 | ||
171 | 6.9339 | ||
172 | data/psi.txt | ||
173 | -297.528 | ||
174 | 117.8 | ||
175 | 10 | ||
176 | 6.9319 | ||
177 | data/psi.txt | ||
178 | -306.342 | ||
179 | 92.4902 | ||
180 | 10 | ||
181 | 6.9299 | ||
182 | data/psi.txt | ||
183 | -313.007 | ||
184 | 66.5317 | ||
185 | 10 | ||
186 | 6.9279 | ||
187 | data/psi.txt | ||
188 | -317.477 | ||
189 | 40.1066 | ||
190 | 10 | ||
191 | 6.9259 | ||
192 | data/psi.txt | ||
193 | -319.719 | ||
194 | 13.4002 | ||
195 | 10 | ||
196 | 6.9239 | ||
197 | data/psi.txt | ||
198 | -319.719 | ||
199 | -13.4002 | ||
200 | 10 | ||
201 | 6.9219 | ||
202 | data/psi.txt | ||
203 | -317.477 | ||
204 | -40.1066 | ||
205 | 10 | ||
206 | 6.9199 | ||
207 | data/psi.txt | ||
208 | -313.007 | ||
209 | -66.5317 | ||
210 | 10 | ||
211 | 6.9179 | ||
212 | data/psi.txt | ||
213 | -306.342 | ||
214 | -92.4902 | ||
215 | 10 | ||
216 | 6.9159 | ||
217 | data/psi.txt | ||
218 | -297.528 | ||
219 | -117.8 | ||
220 | 10 | ||
221 | 6.9139 | ||
222 | data/psi.txt | ||
223 | -286.628 | ||
224 | -142.283 | ||
225 | 10 | ||
226 | 6.9119 | ||
227 | data/psi.txt | ||
228 | -273.717 | ||
229 | -165.769 | ||
230 | 10 | ||
231 | 6.9099 | ||
232 | data/psi.txt | ||
233 | -258.885 | ||
234 | -188.091 | ||
235 | 10 | ||
236 | 6.9079 | ||
237 | data/psi.txt | ||
238 | -242.238 | ||
239 | -209.095 | ||
240 | 10 | ||
241 | 6.9059 | ||
242 | data/psi.txt | ||
243 | -223.892 | ||
244 | -228.631 | ||
245 | 10 | ||
246 | 6.9039 | ||
247 | data/psi.txt | ||
248 | -203.976 | ||
249 | -246.564 | ||
250 | 10 | ||
251 | 6.9019 | ||
252 | data/psi.txt | ||
253 | -182.628 | ||
254 | -262.768 | ||
255 | 10 | ||
256 | 6.8999 | ||
257 | data/psi.txt | ||
258 | -160 | ||
259 | -277.128 | ||
260 | 10 | ||
261 | 6.8979 | ||
262 | data/psi.txt | ||
263 | -136.249 | ||
264 | -289.545 | ||
265 | 10 | ||
266 | 6.8959 | ||
267 | data/psi.txt | ||
268 | -111.543 | ||
269 | -299.93 | ||
270 | 10 | ||
271 | 6.8939 | ||
272 | data/psi.txt | ||
273 | -86.0543 | ||
274 | -308.212 | ||
275 | 10 | ||
276 | 6.8919 | ||
277 | data/psi.txt | ||
278 | -59.962 | ||
279 | -314.332 | ||
280 | 10 | ||
281 | 6.8899 | ||
282 | data/psi.txt | ||
283 | -33.4491 | ||
284 | -318.247 | ||
285 | 10 | ||
286 | 6.8879 | ||
287 | data/psi.txt | ||
288 | -6.70157 | ||
289 | -319.93 | ||
290 | 10 | ||
291 | 6.8859 | ||
292 | data/psi.txt | ||
293 | 20.093 | ||
294 | -319.369 | ||
295 | 10 | ||
296 | 6.8839 | ||
297 | data/psi.txt | ||
298 | 46.7466 | ||
299 | -316.567 | ||
300 | 10 | ||
301 | 6.8819 | ||
302 | data/psi.txt | ||
303 | 73.0723 | ||
304 | -311.545 | ||
305 | 10 | ||
306 | 6.8799 | ||
307 | data/psi.txt | ||
308 | 98.8854 | ||
309 | -304.338 | ||
310 | 10 | ||
311 | 6.8779 | ||
312 | data/psi.txt | ||
313 | 124.005 | ||
314 | -294.996 | ||
315 | 10 | ||
316 | 6.8759 | ||
317 | data/psi.txt | ||
318 | 148.255 | ||
319 | -283.585 | ||
320 | 10 | ||
321 | 6.8739 | ||
322 | data/psi.txt | ||
323 | 171.465 | ||
324 | -270.185 | ||
325 | 10 | ||
326 | 6.8719 | ||
327 | data/psi.txt | ||
328 | 193.472 | ||
329 | -254.89 | ||
330 | 10 | ||
331 | 6.8699 | ||
332 | data/psi.txt | ||
333 | 214.122 | ||
334 | -237.806 | ||
335 | 10 | ||
336 | 6.8679 | ||
337 | data/psi.txt | ||
338 | 233.27 | ||
339 | -219.055 | ||
340 | 10 | ||
341 | 6.8659 | ||
342 | data/psi.txt | ||
343 | 250.782 | ||
344 | -198.767 | ||
345 | 10 | ||
346 | 6.8639 | ||
347 | data/psi.txt | ||
348 | 266.535 | ||
349 | -177.085 | ||
350 | 10 | ||
351 | 6.8619 | ||
352 | data/psi.txt | ||
353 | 280.418 | ||
354 | -154.161 | ||
355 | 10 | ||
356 | 6.8599 | ||
357 | data/psi.txt | ||
358 | 292.335 | ||
359 | -130.156 | ||
360 | 10 | ||
361 | 6.8579 | ||
362 | data/psi.txt | ||
363 | 302.2 | ||
364 | -105.237 | ||
365 | 10 | ||
366 | 6.8559 | ||
367 | data/psi.txt | ||
368 | 309.947 | ||
369 | -79.5808 | ||
370 | 10 | ||
371 | 6.8539 | ||
372 | data/psi.txt | ||
373 | 315.519 | ||
374 | -53.366 | ||
375 | 10 | ||
376 | 6.8519 | ||
377 | data/psi.txt | ||
378 | 318.878 | ||
379 | -26.7769 | ||
380 | 10 | ||
381 | 6.8499 | ||
382 | data/psi.txt | ||
383 | 320 | ||
384 | -7.83774e-14 | ||
385 | 10 | ||
386 | 6.8479 | ||
387 | data/psi.txt | ||
388 | 318.878 | ||
389 | 26.7769 | ||
390 | 10 | ||
391 | 6.8459 | ||
392 | data/psi.txt | ||
393 | 315.519 | ||
394 | 53.366 | ||
395 | 10 | ||
396 | 6.8439 | ||
397 | data/psi.txt | ||
398 | 309.947 | ||
399 | 79.5808 | ||
400 | 10 | ||
401 | 6.8419 | ||
402 | data/psi.txt | ||
403 | 302.2 | ||
404 | 105.237 | ||
405 | 10 | ||
406 | 6.8399 | ||
407 | data/psi.txt | ||
408 | 292.335 | ||
409 | 130.156 | ||
410 | 10 | ||
411 | 6.8379 | ||
412 | data/psi.txt | ||
413 | 280.418 | ||
414 | 154.161 | ||
415 | 10 | ||
416 | 6.8359 | ||
417 | data/psi.txt | ||
418 | 266.535 | ||
419 | 177.085 | ||
420 | 10 | ||
421 | 6.8339 | ||
422 | data/psi.txt | ||
423 | 250.782 | ||
424 | 198.767 | ||
425 | 10 | ||
426 | 6.8319 | ||
427 | data/psi.txt | ||
428 | 233.27 | ||
429 | 219.055 | ||
430 | 10 | ||
431 | 6.8299 | ||
432 | data/psi.txt | ||
433 | 214.122 | ||
434 | 237.806 | ||
435 | 10 | ||
436 | 6.8279 | ||
437 | data/psi.txt | ||
438 | 193.472 | ||
439 | 254.89 | ||
440 | 10 | ||
441 | 6.8259 | ||
442 | data/psi.txt | ||
443 | 171.465 | ||
444 | 270.185 | ||
445 | 10 | ||
446 | 6.8239 | ||
447 | data/psi.txt | ||
448 | 148.255 | ||
449 | 283.585 | ||
450 | 10 | ||
451 | 6.8219 | ||
452 | data/psi.txt | ||
453 | 124.005 | ||
454 | 294.996 | ||
455 | 10 | ||
456 | 6.8199 | ||
457 | data/psi.txt | ||
458 | 98.8854 | ||
459 | 304.338 | ||
460 | 10 | ||
461 | 6.8179 | ||
462 | data/psi.txt | ||
463 | 73.0723 | ||
464 | 311.545 | ||
465 | 10 | ||
466 | 6.8159 | ||
467 | data/psi.txt | ||
468 | 46.7466 | ||
469 | 316.567 | ||
470 | 10 | ||
471 | 6.8139 | ||
472 | data/psi.txt | ||
473 | 20.093 | ||
474 | 319.369 | ||
475 | 10 | ||
476 | 6.8119 | ||
477 | data/psi.txt | ||
478 | -6.70157 | ||
479 | 319.93 | ||
480 | 10 | ||
481 | 6.8099 | ||
482 | data/psi.txt | ||
483 | -33.4491 | ||
484 | 318.247 | ||
485 | 10 | ||
486 | 6.8079 | ||
487 | data/psi.txt | ||
488 | -59.962 | ||
489 | 314.332 | ||
490 | 10 | ||
491 | 6.8059 | ||
492 | data/psi.txt | ||
493 | -86.0543 | ||
494 | 308.212 | ||
495 | 10 | ||
496 | 6.8039 | ||
497 | data/psi.txt | ||
498 | -111.543 | ||
499 | 299.93 | ||
500 | 10 | ||
501 | 6.8019 | ||
502 | data/psi.txt | ||
503 | -136.249 | ||
504 | 289.545 | ||
505 | 10 | ||
506 | 6.7999 | ||
507 | data/psi.txt | ||
508 | -160 | ||
509 | 277.128 | ||
510 | 10 | ||
511 | 6.7979 | ||
512 | data/psi.txt | ||
513 | -182.628 | ||
514 | 262.768 | ||
515 | 10 | ||
516 | 6.7959 | ||
517 | data/psi.txt | ||
518 | -203.976 | ||
519 | 246.564 | ||
520 | 10 | ||
521 | 6.7939 | ||
522 | data/psi.txt | ||
523 | -223.892 | ||
524 | 228.631 | ||
525 | 10 | ||
526 | 6.7919 | ||
527 | data/psi.txt | ||
528 | -242.238 | ||
529 | 209.095 | ||
530 | 10 | ||
531 | 6.7899 | ||
532 | data/psi.txt | ||
533 | -258.885 | ||
534 | 188.091 | ||
535 | 10 | ||
536 | 6.7879 | ||
537 | data/psi.txt | ||
538 | -273.717 | ||
539 | 165.769 | ||
540 | 10 | ||
541 | 6.7859 | ||
542 | data/psi.txt | ||
543 | -286.628 | ||
544 | 142.283 | ||
545 | 10 | ||
546 | 6.7839 | ||
547 | data/psi.txt | ||
548 | -297.528 | ||
549 | 117.8 | ||
550 | 10 | ||
551 | 6.7819 | ||
552 | data/psi.txt | ||
553 | -306.342 | ||
554 | 92.4902 | ||
555 | 10 | ||
556 | 6.7799 | ||
557 | data/psi.txt | ||
558 | -313.007 | ||
559 | 66.5317 | ||
560 | 10 | ||
561 | 6.7779 | ||
562 | data/psi.txt | ||
563 | -317.477 | ||
564 | 40.1066 | ||
565 | 10 | ||
566 | 6.7759 | ||
567 | data/psi.txt | ||
568 | -319.719 | ||
569 | 13.4002 | ||
570 | 10 | ||
571 | 6.7739 | ||
572 | data/psi.txt | ||
573 | -319.719 | ||
574 | -13.4002 | ||
575 | 10 | ||
576 | 6.7719 | ||
577 | data/psi.txt | ||
578 | -317.477 | ||
579 | -40.1066 | ||
580 | 10 | ||
581 | 6.7699 | ||
582 | data/psi.txt | ||
583 | -313.007 | ||
584 | -66.5317 | ||
585 | 10 | ||
586 | 6.7679 | ||
587 | data/psi.txt | ||
588 | -306.342 | ||
589 | -92.4902 | ||
590 | 10 | ||
591 | 6.7659 | ||
592 | data/psi.txt | ||
593 | -297.528 | ||
594 | -117.8 | ||
595 | 10 | ||
596 | 6.7639 | ||
597 | data/psi.txt | ||
598 | -286.628 | ||
599 | -142.283 | ||
600 | 10 | ||
601 | 6.7619 | ||
602 | data/psi.txt | ||
603 | -273.717 | ||
604 | -165.769 | ||
605 | 10 | ||
606 | 6.7599 | ||
607 | data/psi.txt | ||
608 | -258.885 | ||
609 | -188.091 | ||
610 | 10 | ||
611 | 6.7579 | ||
612 | data/psi.txt | ||
613 | -242.238 | ||
614 | -209.095 | ||
615 | 10 | ||
616 | 6.7559 | ||
617 | data/psi.txt | ||
618 | -223.892 | ||
619 | -228.631 | ||
620 | 10 | ||
621 | 6.7539 | ||
622 | data/psi.txt | ||
623 | -203.976 | ||
624 | -246.564 | ||
625 | 10 | ||
626 | 6.7519 | ||
627 | data/psi.txt | ||
628 | -182.628 | ||
629 | -262.768 | ||
630 | 10 | ||
631 | 6.7499 | ||
632 | data/psi.txt | ||
633 | -160 | ||
634 | -277.128 | ||
635 | 10 | ||
636 | 6.7479 | ||
637 | data/psi.txt | ||
638 | -136.249 | ||
639 | -289.545 | ||
640 | 10 | ||
641 | 6.7459 | ||
642 | data/psi.txt | ||
643 | -111.543 | ||
644 | -299.93 | ||
645 | 10 | ||
646 | 6.7439 | ||
647 | data/psi.txt | ||
648 | -86.0543 | ||
649 | -308.212 | ||
650 | 10 | ||
651 | 6.7419 | ||
652 | data/psi.txt | ||
653 | -59.962 | ||
654 | -314.332 | ||
655 | 10 | ||
656 | 6.7399 | ||
657 | data/psi.txt | ||
658 | -33.4491 | ||
659 | -318.247 | ||
660 | 10 | ||
661 | 6.7379 | ||
662 | data/psi.txt | ||
663 | -6.70157 | ||
664 | -319.93 | ||
665 | 10 | ||
666 | 6.7359 | ||
667 | data/psi.txt | ||
668 | 20.093 | ||
669 | -319.369 | ||
670 | 10 | ||
671 | 6.7339 | ||
672 | data/psi.txt | ||
673 | 46.7466 | ||
674 | -316.567 | ||
675 | 10 | ||
676 | 6.7319 | ||
677 | data/psi.txt | ||
678 | 73.0723 | ||
679 | -311.545 | ||
680 | 10 | ||
681 | 6.7299 | ||
682 | data/psi.txt | ||
683 | 98.8854 | ||
684 | -304.338 | ||
685 | 10 | ||
686 | 6.7279 | ||
687 | data/psi.txt | ||
688 | 124.005 | ||
689 | -294.996 | ||
690 | 10 | ||
691 | 6.7259 | ||
692 | data/psi.txt | ||
693 | 148.255 | ||
694 | -283.585 | ||
695 | 10 | ||
696 | 6.7239 | ||
697 | data/psi.txt | ||
698 | 171.465 | ||
699 | -270.185 | ||
700 | 10 | ||
701 | 6.7219 | ||
702 | data/psi.txt | ||
703 | 193.472 | ||
704 | -254.89 | ||
705 | 10 | ||
706 | 6.7199 | ||
707 | data/psi.txt | ||
708 | 214.122 | ||
709 | -237.806 | ||
710 | 10 | ||
711 | 6.7179 | ||
712 | data/psi.txt | ||
713 | 233.27 | ||
714 | -219.055 | ||
715 | 10 | ||
716 | 6.7159 | ||
717 | data/psi.txt | ||
718 | 250.782 | ||
719 | -198.767 | ||
720 | 10 | ||
721 | 6.7139 | ||
722 | data/psi.txt | ||
723 | 266.535 | ||
724 | -177.085 | ||
725 | 10 | ||
726 | 6.7119 | ||
727 | data/psi.txt | ||
728 | 280.418 | ||
729 | -154.161 | ||
730 | 10 | ||
731 | 6.7099 | ||
732 | data/psi.txt | ||
733 | 292.335 | ||
734 | -130.156 | ||
735 | 10 | ||
736 | 6.7079 | ||
737 | data/psi.txt | ||
738 | 302.2 | ||
739 | -105.237 | ||
740 | 10 | ||
741 | 6.7059 | ||
742 | data/psi.txt | ||
743 | 309.947 | ||
744 | -79.5808 | ||
745 | 10 | ||
746 | 6.7039 | ||
747 | data/psi.txt | ||
748 | 315.519 | ||
749 | -53.366 | ||
750 | 10 | ||
751 | 6.7019 | ||
752 | data/psi.txt | ||
753 | 318.878 | ||
754 | -26.7769 | ||
755 | 10 | ||
756 | 6.6999 | ||
757 | data/psi.txt | ||
758 | 320 | ||
759 | -1.56755e-13 | ||
760 | 10 | ||
761 | 6.6979 | ||
762 | data/psi.txt | ||
763 | 318.878 | ||
764 | 26.7769 | ||
765 | 10 | ||
766 | 6.6959 | ||
767 | data/psi.txt | ||
768 | 315.519 | ||
769 | 53.366 | ||
770 | 10 | ||
771 | 6.6939 | ||
772 | data/psi.txt | ||
773 | 309.947 | ||
774 | 79.5808 | ||
775 | 10 | ||
776 | 6.6919 | ||
777 | data/psi.txt | ||
778 | 302.2 | ||
779 | 105.237 | ||
780 | 10 | ||
781 | 6.6899 | ||
782 | data/psi.txt | ||
783 | 292.335 | ||
784 | 130.156 | ||
785 | 10 | ||
786 | 6.6879 | ||
787 | data/psi.txt | ||
788 | 280.418 | ||
789 | 154.161 | ||
790 | 10 | ||
791 | 6.6859 | ||
792 | data/psi.txt | ||
793 | 266.535 | ||
794 | 177.085 | ||
795 | 10 | ||
796 | 6.6839 | ||
797 | data/psi.txt | ||
798 | 250.782 | ||
799 | 198.767 | ||
800 | 10 | ||
801 | 6.6819 | ||
802 | data/psi.txt | ||
803 | 233.27 | ||
804 | 219.055 | ||
805 | 10 | ||
806 | 6.6799 | ||
807 | data/psi.txt | ||
808 | 214.122 | ||
809 | 237.806 | ||
810 | 10 | ||
811 | 6.6779 | ||
812 | data/psi.txt | ||
813 | 193.472 | ||
814 | 254.89 | ||
815 | 10 | ||
816 | 6.6759 | ||
817 | data/psi.txt | ||
818 | 171.465 | ||
819 | 270.185 | ||
820 | 10 | ||
821 | 6.6739 | ||
822 | data/psi.txt | ||
823 | 148.255 | ||
824 | 283.585 | ||
825 | 10 | ||
826 | 6.6719 | ||
827 | data/psi.txt | ||
828 | 124.005 | ||
829 | 294.996 | ||
830 | 10 | ||
831 | 6.6699 | ||
832 | data/psi.txt | ||
833 | 98.8854 | ||
834 | 304.338 | ||
835 | 10 | ||
836 | 6.6679 | ||
837 | data/psi.txt | ||
838 | 73.0723 | ||
839 | 311.545 | ||
840 | 10 | ||
841 | 6.6659 | ||
842 | data/psi.txt | ||
843 | 46.7466 | ||
844 | 316.567 | ||
845 | 10 | ||
846 | 6.6639 | ||
847 | data/psi.txt | ||
848 | 20.093 | ||
849 | 319.369 | ||
850 | 10 | ||
851 | 6.6619 | ||
852 | data/psi.txt | ||
853 | -6.70157 | ||
854 | 319.93 | ||
855 | 10 | ||
856 | 6.6599 | ||
857 | data/psi.txt | ||
858 | -33.4491 | ||
859 | 318.247 | ||
860 | 10 | ||
861 | 6.6579 | ||
862 | data/psi.txt | ||
863 | -59.962 | ||
864 | 314.332 | ||
865 | 10 | ||
866 | 6.6559 | ||
867 | data/psi.txt | ||
868 | -86.0543 | ||
869 | 308.212 | ||
870 | 10 | ||
871 | 6.6539 | ||
872 | data/psi.txt | ||
873 | -111.543 | ||
874 | 299.93 | ||
875 | 10 | ||
876 | 6.6519 | ||
877 | data/psi.txt | ||
878 | -136.249 | ||
879 | 289.545 | ||
880 | 10 | ||
881 | 6.6499 | ||
882 | data/psi.txt | ||
883 | -160 | ||
884 | 277.128 | ||
885 | 10 | ||
886 | 6.6479 | ||
887 | data/psi.txt | ||
888 | -182.628 | ||
889 | 262.768 | ||
890 | 10 | ||
891 | 6.6459 | ||
892 | data/psi.txt | ||
893 | -203.976 | ||
894 | 246.564 | ||
895 | 10 | ||
896 | 6.6439 | ||
897 | data/psi.txt | ||
898 | -223.892 | ||
899 | 228.631 | ||
900 | 10 | ||
901 | 6.6419 | ||
902 | data/psi.txt | ||
903 | -242.238 | ||
904 | 209.095 | ||
905 | 10 | ||
906 | 6.6399 | ||
907 | data/psi.txt | ||
908 | -258.885 | ||
909 | 188.091 | ||
910 | 10 | ||
911 | 6.6379 | ||
912 | data/psi.txt | ||
913 | -273.717 | ||
914 | 165.769 | ||
915 | 10 | ||
916 | 6.6359 | ||
917 | data/psi.txt | ||
918 | -286.628 | ||
919 | 142.283 | ||
920 | 10 | ||
921 | 6.6339 | ||
922 | data/psi.txt | ||
923 | -297.528 | ||
924 | 117.8 | ||
925 | 10 | ||
926 | 6.6319 | ||
927 | data/psi.txt | ||
928 | -306.342 | ||
929 | 92.4902 | ||
930 | 10 | ||
931 | 6.6299 | ||
932 | data/psi.txt | ||
933 | -313.007 | ||
934 | 66.5317 | ||
935 | 10 | ||
936 | 6.6279 | ||
937 | data/psi.txt | ||
938 | -317.477 | ||
939 | 40.1066 | ||
940 | 10 | ||
941 | 6.6259 | ||
942 | data/psi.txt | ||
943 | -319.719 | ||
944 | 13.4002 | ||
945 | 10 | ||
946 | 6.6239 | ||
947 | data/psi.txt | ||
948 | -319.719 | ||
949 | -13.4002 | ||
950 | 10 | ||
951 | 6.6219 | ||
952 | data/psi.txt | ||
953 | -317.477 | ||
954 | -40.1066 | ||
955 | 10 | ||
956 | 6.6199 | ||
957 | data/psi.txt | ||
958 | -313.007 | ||
959 | -66.5317 | ||
960 | 10 | ||
961 | 6.6179 | ||
962 | data/psi.txt | ||
963 | -306.342 | ||
964 | -92.4902 | ||
965 | 10 | ||
966 | 6.6159 | ||
967 | data/psi.txt | ||
968 | -297.528 | ||
969 | -117.8 | ||
970 | 10 | ||
971 | 6.6139 | ||
972 | data/psi.txt | ||
973 | -286.628 | ||
974 | -142.283 | ||
975 | 10 | ||
976 | 6.6119 | ||
977 | data/psi.txt | ||
978 | -273.717 | ||
979 | -165.769 | ||
980 | 10 | ||
981 | 6.6099 | ||
982 | data/psi.txt | ||
983 | -258.885 | ||
984 | -188.091 | ||
985 | 10 | ||
986 | 6.6079 | ||
987 | data/psi.txt | ||
988 | -242.238 | ||
989 | -209.095 | ||
990 | 10 | ||
991 | 6.6059 | ||
992 | data/psi.txt | ||
993 | -223.892 | ||
994 | -228.631 | ||
995 | 10 | ||
996 | 6.6039 | ||
997 | data/psi.txt | ||
998 | -203.976 | ||
999 | -246.564 | ||
1000 | 10 | ||
1001 | 6.6019 | ||
1002 | data/psi.txt | ||
1003 | -182.628 | ||
1004 | -262.768 | ||
1005 | 10 | ||
1006 | 6.5999 | ||
1007 | data/psi.txt | ||
1008 | -160 | ||
1009 | -277.128 | ||
1010 | 10 | ||
1011 | 6.5979 | ||
1012 | data/psi.txt | ||
1013 | -136.249 | ||
1014 | -289.545 | ||
1015 | 10 | ||
1016 | 6.5959 | ||
1017 | data/psi.txt | ||
1018 | -111.543 | ||
1019 | -299.93 | ||
1020 | 10 | ||
1021 | 6.5939 | ||
1022 | data/psi.txt | ||
1023 | -86.0543 | ||
1024 | -308.212 | ||
1025 | 10 | ||
1026 | 6.5919 | ||
1027 | data/psi.txt | ||
1028 | -59.962 | ||
1029 | -314.332 | ||
1030 | 10 | ||
1031 | 6.5899 | ||
1032 | data/psi.txt | ||
1033 | -33.4491 | ||
1034 | -318.247 | ||
1035 | 10 | ||
1036 | 6.5879 | ||
1037 | data/psi.txt | ||
1038 | -6.70157 | ||
1039 | -319.93 | ||
1040 | 10 | ||
1041 | 6.5859 | ||
1042 | data/psi.txt | ||
1043 | 20.093 | ||
1044 | -319.369 | ||
1045 | 10 | ||
1046 | 6.5839 | ||
1047 | data/psi.txt | ||
1048 | 46.7466 | ||
1049 | -316.567 | ||
1050 | 10 | ||
1051 | 6.5819 | ||
1052 | data/psi.txt | ||
1053 | 73.0723 | ||
1054 | -311.545 | ||
1055 | 10 | ||
1056 | 6.5799 | ||
1057 | data/psi.txt | ||
1058 | 98.8854 | ||
1059 | -304.338 | ||
1060 | 10 | ||
1061 | 6.5779 | ||
1062 | data/psi.txt | ||
1063 | 124.005 | ||
1064 | -294.996 | ||
1065 | 10 | ||
1066 | 6.5759 | ||
1067 | data/psi.txt | ||
1068 | 148.255 | ||
1069 | -283.585 | ||
1070 | 10 | ||
1071 | 6.5739 | ||
1072 | data/psi.txt | ||
1073 | 171.465 | ||
1074 | -270.185 | ||
1075 | 10 | ||
1076 | 6.5719 | ||
1077 | data/psi.txt | ||
1078 | 193.472 | ||
1079 | -254.89 | ||
1080 | 10 | ||
1081 | 6.5699 | ||
1082 | data/psi.txt | ||
1083 | 214.122 | ||
1084 | -237.806 | ||
1085 | 10 | ||
1086 | 6.5679 | ||
1087 | data/psi.txt | ||
1088 | 233.27 | ||
1089 | -219.055 | ||
1090 | 10 | ||
1091 | 6.5659 | ||
1092 | data/psi.txt | ||
1093 | 250.782 | ||
1094 | -198.767 | ||
1095 | 10 | ||
1096 | 6.5639 | ||
1097 | data/psi.txt | ||
1098 | 266.535 | ||
1099 | -177.085 | ||
1100 | 10 | ||
1101 | 6.5619 | ||
1102 | data/psi.txt | ||
1103 | 280.418 | ||
1104 | -154.161 | ||
1105 | 10 | ||
1106 | 6.5599 | ||
1107 | data/psi.txt | ||
1108 | 292.335 | ||
1109 | -130.156 | ||
1110 | 10 | ||
1111 | 6.5579 | ||
1112 | data/psi.txt | ||
1113 | 302.2 | ||
1114 | -105.237 | ||
1115 | 10 | ||
1116 | 6.5559 | ||
1117 | data/psi.txt | ||
1118 | 309.947 | ||
1119 | -79.5808 | ||
1120 | 10 | ||
1121 | 6.5539 | ||
1122 | data/psi.txt | ||
1123 | 315.519 | ||
1124 | -53.366 | ||
1125 | 10 | ||
1126 | 6.5519 | ||
1127 | data/psi.txt | ||
1128 | 318.878 | ||
1129 | -26.7769 | ||
1130 | 10 | ||
1131 | 6.5499 | ||
1132 | data/psi.txt | ||
1133 | 320 | ||
1134 | -2.35132e-13 | ||
1135 | 10 | ||
1136 | 6.5479 | ||
1137 | data/psi.txt | ||
1138 | 318.878 | ||
1139 | 26.7769 | ||
1140 | 10 | ||
1141 | 6.5459 | ||
1142 | data/psi.txt | ||
1143 | 315.519 | ||
1144 | 53.366 | ||
1145 | 10 | ||
1146 | 6.5439 | ||
1147 | data/psi.txt | ||
1148 | 309.947 | ||
1149 | 79.5808 | ||
1150 | 10 | ||
1151 | 6.5419 | ||
1152 | data/psi.txt | ||
1153 | 302.2 | ||
1154 | 105.237 | ||
1155 | 10 | ||
1156 | 6.5399 | ||
1157 | data/psi.txt | ||
1158 | 292.335 | ||
1159 | 130.156 | ||
1160 | 10 | ||
1161 | 6.5379 | ||
1162 | data/psi.txt | ||
1163 | 280.418 | ||
1164 | 154.161 | ||
1165 | 10 | ||
1166 | 6.5359 | ||
1167 | data/psi.txt | ||
1168 | 266.535 | ||
1169 | 177.085 | ||
1170 | 10 | ||
1171 | 6.5339 | ||
1172 | data/psi.txt | ||
1173 | 250.782 | ||
1174 | 198.767 | ||
1175 | 10 | ||
1176 | 6.5319 | ||
1177 | data/psi.txt | ||
1178 | 233.27 | ||
1179 | 219.055 | ||
1180 | 10 | ||
1181 | 6.5299 | ||
1182 | data/psi.txt | ||
1183 | 214.122 | ||
1184 | 237.806 | ||
1185 | 10 | ||
1186 | 6.5279 | ||
1187 | data/psi.txt | ||
1188 | 193.472 | ||
1189 | 254.89 | ||
1190 | 10 | ||
1191 | 6.5259 | ||
1192 | data/psi.txt | ||
1193 | 171.465 | ||
1194 | 270.185 | ||
1195 | 10 | ||
1196 | 6.5239 | ||
1197 | data/psi.txt | ||
1198 | 148.255 | ||
1199 | 283.585 | ||
1200 | 10 | ||
1201 | 6.5219 | ||
1202 | data/psi.txt | ||
1203 | 124.005 | ||
1204 | 294.996 | ||
1205 | 10 | ||
1206 | 6.5199 | ||
1207 | data/psi.txt | ||
1208 | 98.8854 | ||
1209 | 304.338 | ||
1210 | 10 | ||
1211 | 6.5179 | ||
1212 | data/psi.txt | ||
1213 | 73.0723 | ||
1214 | 311.545 | ||
1215 | 10 | ||
1216 | 6.5159 | ||
1217 | data/psi.txt | ||
1218 | 46.7466 | ||
1219 | 316.567 | ||
1220 | 10 | ||
1221 | 6.5139 | ||
1222 | data/psi.txt | ||
1223 | 20.093 | ||
1224 | 319.369 | ||
1225 | 10 | ||
1226 | 6.5119 | ||
1227 | data/psi.txt | ||
1228 | -6.70157 | ||
1229 | 319.93 | ||
1230 | 10 | ||
1231 | 6.5099 | ||
1232 | data/psi.txt | ||
1233 | -33.4491 | ||
1234 | 318.247 | ||
1235 | 10 | ||
1236 | 6.5079 | ||
1237 | data/psi.txt | ||
1238 | -59.962 | ||
1239 | 314.332 | ||
1240 | 10 | ||
1241 | 6.5059 | ||
1242 | data/psi.txt | ||
1243 | -86.0543 | ||
1244 | 308.212 | ||
1245 | 10 | ||
1246 | 6.5039 | ||
1247 | data/psi.txt | ||
1248 | -111.543 | ||
1249 | 299.93 | ||
1250 | 10 | ||
1251 | 6.5019 | ||
1252 | data/psi.txt | ||
1253 | -136.249 | ||
1254 | 289.545 | ||
1255 | 10 | ||
1256 | 6.4999 | ||
1257 | data/psi.txt | ||
1258 | -160 | ||
1259 | 277.128 | ||
1260 | 10 | ||
1261 | 6.4979 | ||
1262 | data/psi.txt | ||
1263 | -182.628 | ||
1264 | 262.768 | ||
1265 | 10 | ||
1266 | 6.4959 | ||
1267 | data/psi.txt | ||
1268 | -203.976 | ||
1269 | 246.564 | ||
1270 | 10 | ||
1271 | 6.4939 | ||
1272 | data/psi.txt | ||
1273 | -223.892 | ||
1274 | 228.631 | ||
1275 | 10 | ||
1276 | 6.4919 | ||
1277 | data/psi.txt | ||
1278 | -242.238 | ||
1279 | 209.095 | ||
1280 | 10 | ||
1281 | 6.4899 | ||
1282 | data/psi.txt | ||
1283 | -258.885 | ||
1284 | 188.091 | ||
1285 | 10 | ||
1286 | 6.4879 | ||
1287 | data/psi.txt | ||
1288 | -273.717 | ||
1289 | 165.769 | ||
1290 | 10 | ||
1291 | 6.4859 | ||
1292 | data/psi.txt | ||
1293 | -286.628 | ||
1294 | 142.283 | ||
1295 | 10 | ||
1296 | 6.4839 | ||
1297 | data/psi.txt | ||
1298 | -297.528 | ||
1299 | 117.8 | ||
1300 | 10 | ||
1301 | 6.4819 | ||
1302 | data/psi.txt | ||
1303 | -306.342 | ||
1304 | 92.4902 | ||
1305 | 10 | ||
1306 | 6.4799 | ||
1307 | data/psi.txt | ||
1308 | -313.007 | ||
1309 | 66.5317 | ||
1310 | 10 | ||
1311 | 6.4779 | ||
1312 | data/psi.txt | ||
1313 | -317.477 | ||
1314 | 40.1066 | ||
1315 | 10 | ||
1316 | 6.4759 | ||
1317 | data/psi.txt | ||
1318 | -319.719 | ||
1319 | 13.4002 | ||
1320 | 10 | ||
1321 | 6.4739 | ||
1322 | data/psi.txt | ||
1323 | -319.719 | ||
1324 | -13.4002 | ||
1325 | 10 | ||
1326 | 6.4719 | ||
1327 | data/psi.txt | ||
1328 | -317.477 | ||
1329 | -40.1066 | ||
1330 | 10 | ||
1331 | 6.4699 | ||
1332 | data/psi.txt | ||
1333 | -313.007 | ||
1334 | -66.5317 | ||
1335 | 10 | ||
1336 | 6.4679 | ||
1337 | data/psi.txt | ||
1338 | -306.342 | ||
1339 | -92.4902 | ||
1340 | 10 | ||
1341 | 6.4659 | ||
1342 | data/psi.txt | ||
1343 | -297.528 | ||
1344 | -117.8 | ||
1345 | 10 | ||
1346 | 6.4639 | ||
1347 | data/psi.txt | ||
1348 | -286.628 | ||
1349 | -142.283 | ||
1350 | 10 | ||
1351 | 6.4619 | ||
1352 | data/psi.txt | ||
1353 | -273.717 | ||
1354 | -165.769 | ||
1355 | 10 | ||
1356 | 6.4599 | ||
1357 | data/psi.txt | ||
1358 | -258.885 | ||
1359 | -188.091 | ||
1360 | 10 | ||
1361 | 6.4579 | ||
1362 | data/psi.txt | ||
1363 | -242.238 | ||
1364 | -209.095 | ||
1365 | 10 | ||
1366 | 6.4559 | ||
1367 | data/psi.txt | ||
1368 | -223.892 | ||
1369 | -228.631 | ||
1370 | 10 | ||
1371 | 6.4539 | ||
1372 | data/psi.txt | ||
1373 | -203.976 | ||
1374 | -246.564 | ||
1375 | 10 | ||
1376 | 6.4519 | ||
1377 | data/psi.txt | ||
1378 | -182.628 | ||
1379 | -262.768 | ||
1380 | 10 | ||
1381 | 6.4499 | ||
1382 | data/psi.txt | ||
1383 | -160 | ||
1384 | -277.128 | ||
1385 | 10 | ||
1386 | 6.4479 | ||
1387 | data/psi.txt | ||
1388 | -136.249 | ||
1389 | -289.545 | ||
1390 | 10 | ||
1391 | 6.4459 | ||
1392 | data/psi.txt | ||
1393 | -111.543 | ||
1394 | -299.93 | ||
1395 | 10 | ||
1396 | 6.4439 | ||
1397 | data/psi.txt | ||
1398 | -86.0543 | ||
1399 | -308.212 | ||
1400 | 10 | ||
1401 | 6.4419 | ||
1402 | data/psi.txt | ||
1403 | -59.962 | ||
1404 | -314.332 | ||
1405 | 10 | ||
1406 | 6.4399 | ||
1407 | data/psi.txt | ||
1408 | -33.4491 | ||
1409 | -318.247 | ||
1410 | 10 | ||
1411 | 6.4379 | ||
1412 | data/psi.txt | ||
1413 | -6.70157 | ||
1414 | -319.93 | ||
1415 | 10 | ||
1416 | 6.4359 | ||
1417 | data/psi.txt | ||
1418 | 20.093 | ||
1419 | -319.369 | ||
1420 | 10 | ||
1421 | 6.4339 | ||
1422 | data/psi.txt | ||
1423 | 46.7466 | ||
1424 | -316.567 | ||
1425 | 10 | ||
1426 | 6.4319 | ||
1427 | data/psi.txt | ||
1428 | 73.0723 | ||
1429 | -311.545 | ||
1430 | 10 | ||
1431 | 6.4299 | ||
1432 | data/psi.txt | ||
1433 | 98.8854 | ||
1434 | -304.338 | ||
1435 | 10 | ||
1436 | 6.4279 | ||
1437 | data/psi.txt | ||
1438 | 124.005 | ||
1439 | -294.996 | ||
1440 | 10 | ||
1441 | 6.4259 | ||
1442 | data/psi.txt | ||
1443 | 148.255 | ||
1444 | -283.585 | ||
1445 | 10 | ||
1446 | 6.4239 | ||
1447 | data/psi.txt | ||
1448 | 171.465 | ||
1449 | -270.185 | ||
1450 | 10 | ||
1451 | 6.4219 | ||
1452 | data/psi.txt | ||
1453 | 193.472 | ||
1454 | -254.89 | ||
1455 | 10 | ||
1456 | 6.4199 | ||
1457 | data/psi.txt | ||
1458 | 214.122 | ||
1459 | -237.806 | ||
1460 | 10 | ||
1461 | 6.4179 | ||
1462 | data/psi.txt | ||
1463 | 233.27 | ||
1464 | -219.055 | ||
1465 | 10 | ||
1466 | 6.4159 | ||
1467 | data/psi.txt | ||
1468 | 250.782 | ||
1469 | -198.767 | ||
1470 | 10 | ||
1471 | 6.4139 | ||
1472 | data/psi.txt | ||
1473 | 266.535 | ||
1474 | -177.085 | ||
1475 | 10 | ||
1476 | 6.4119 | ||
1477 | data/psi.txt | ||
1478 | 280.418 | ||
1479 | -154.161 | ||
1480 | 10 | ||
1481 | 6.4099 | ||
1482 | data/psi.txt | ||
1483 | 292.335 | ||
1484 | -130.156 | ||
1485 | 10 | ||
1486 | 6.4079 | ||
1487 | data/psi.txt | ||
1488 | 302.2 | ||
1489 | -105.237 | ||
1490 | 10 | ||
1491 | 6.4059 | ||
1492 | data/psi.txt | ||
1493 | 309.947 | ||
1494 | -79.5808 | ||
1495 | 10 | ||
1496 | 6.4039 | ||
1497 | data/psi.txt | ||
1498 | 315.519 | ||
1499 | -53.366 | ||
1500 | 10 | ||
1501 | 6.4019 | ||
1502 | data/psi.txt | ||
1503 | 318.878 | ||
1504 | -26.7769 \ No newline at end of file | ||
diff --git a/data/projectile_template.txt~ b/data/projectile_template.txt~ new file mode 100644 index 0000000..e660251 --- /dev/null +++ b/data/projectile_template.txt~ | |||
@@ -0,0 +1,4 @@ | |||
1 | data/images/psi.bmp | ||
2 | 1.5 | ||
3 | 10000 | ||
4 | 2.2 | ||
diff --git a/data/projectiles/beam.txt b/data/projectiles/beam.txt new file mode 100644 index 0000000..35b6c18 --- /dev/null +++ b/data/projectiles/beam.txt | |||
@@ -0,0 +1,5 @@ | |||
1 | data/images/spit.bmp | ||
2 | data/sounds/piu | ||
3 | 0.3 | ||
4 | 10 | ||
5 | 1 | ||
diff --git a/data/projectiles/bigspit.txt b/data/projectiles/bigspit.txt new file mode 100644 index 0000000..3da95e6 --- /dev/null +++ b/data/projectiles/bigspit.txt | |||
@@ -0,0 +1,5 @@ | |||
1 | data/images/bigspit.bmp | ||
2 | data/sounds/bigspit | ||
3 | 8 | ||
4 | 0 | ||
5 | 4 | ||
diff --git a/data/projectiles/fire1.txt b/data/projectiles/fire1.txt new file mode 100644 index 0000000..316f367 --- /dev/null +++ b/data/projectiles/fire1.txt | |||
@@ -0,0 +1,5 @@ | |||
1 | data/images/fire1.bmp | ||
2 | data/sounds/fire | ||
3 | 2 | ||
4 | 10 | ||
5 | 3.5 | ||
diff --git a/data/projectiles/projectile_template.txt b/data/projectiles/projectile_template.txt new file mode 100644 index 0000000..66bd2de --- /dev/null +++ b/data/projectiles/projectile_template.txt | |||
@@ -0,0 +1,5 @@ | |||
1 | data/projectile2.bmp #path of the imagefile | ||
2 | data/sounds/spit #path of the soundfile without n.wav for int n | ||
3 | 10 #damage | ||
4 | 2 #armorPiercing | ||
5 | 1.4142 #collisionSize | ||
diff --git a/data/projectiles/projectile_template.txt~ b/data/projectiles/projectile_template.txt~ new file mode 100644 index 0000000..9ae6fa9 --- /dev/null +++ b/data/projectiles/projectile_template.txt~ | |||
@@ -0,0 +1,4 @@ | |||
1 | data/projectile2.bmp #path of the imagefile | ||
2 | 10 #damage | ||
3 | 2 #armorPiercing | ||
4 | 1.4142 #collisionSize | ||
diff --git a/data/projectiles/psi.txt b/data/projectiles/psi.txt new file mode 100644 index 0000000..ed05829 --- /dev/null +++ b/data/projectiles/psi.txt | |||
@@ -0,0 +1,5 @@ | |||
1 | data/images/psi.bmp | ||
2 | data/sounds/piu | ||
3 | 1.5 | ||
4 | 10000 | ||
5 | 2.2 | ||
diff --git a/data/projectiles/psi.txt~ b/data/projectiles/psi.txt~ new file mode 100644 index 0000000..ed05829 --- /dev/null +++ b/data/projectiles/psi.txt~ | |||
@@ -0,0 +1,5 @@ | |||
1 | data/images/psi.bmp | ||
2 | data/sounds/piu | ||
3 | 1.5 | ||
4 | 10000 | ||
5 | 2.2 | ||
diff --git a/data/projectiles/spit.txt b/data/projectiles/spit.txt new file mode 100644 index 0000000..90d0147 --- /dev/null +++ b/data/projectiles/spit.txt | |||
@@ -0,0 +1,5 @@ | |||
1 | data/images/spit.bmp | ||
2 | data/sounds/spit | ||
3 | 1 | ||
4 | 0 | ||
5 | 1.4142 | ||
diff --git a/data/psi.txt~ b/data/psi.txt~ new file mode 100644 index 0000000..d2a5be5 --- /dev/null +++ b/data/psi.txt~ | |||
@@ -0,0 +1,4 @@ | |||
1 | data/images/psi.bmp | ||
2 | 1 | ||
3 | 10000 | ||
4 | 2.2 | ||
diff --git a/data/ships/EnemyShip_template.txt b/data/ships/EnemyShip_template.txt new file mode 100644 index 0000000..2fdb348 --- /dev/null +++ b/data/ships/EnemyShip_template.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | Tork Spacerocket #name | ||
2 | data/images/tork_spacerocket.bmp #path of imagefile | ||
3 | 7 #maxhp | ||
4 | 5 #armor | ||
5 | 50 #moveSpeed | ||
6 | 4 #collisionSize | ||
7 | 3 #Gold | ||
8 | 3 #exp | ||
9 | 3 #score | ||
10 | 1 #number of weapons | ||
11 | 0 -1 #relative Position of weapon | ||
12 | data/fireball.txt #path of weapon | ||
diff --git a/data/ships/tork/capsule.txt b/data/ships/tork/capsule.txt new file mode 100644 index 0000000..ae60c7f --- /dev/null +++ b/data/ships/tork/capsule.txt | |||
@@ -0,0 +1,10 @@ | |||
1 | Tork Capsule | ||
2 | data/images/ship1.bmp | ||
3 | 0.6 | ||
4 | 10 | ||
5 | 140 | ||
6 | 5.5 | ||
7 | 0 | ||
8 | 0 | ||
9 | 0 | ||
10 | 0 | ||
diff --git a/data/ships/tork/capsule.txt~ b/data/ships/tork/capsule.txt~ new file mode 100644 index 0000000..eeb2813 --- /dev/null +++ b/data/ships/tork/capsule.txt~ | |||
@@ -0,0 +1,10 @@ | |||
1 | Tork Capsule | ||
2 | data/images/ship1.bmp | ||
3 | 0.6 | ||
4 | 10 | ||
5 | 140 | ||
6 | 5.5 | ||
7 | 1 | ||
8 | 1 | ||
9 | 1 | ||
10 | 0 | ||
diff --git a/data/ships/tork/cruiser.txt b/data/ships/tork/cruiser.txt new file mode 100644 index 0000000..11772da --- /dev/null +++ b/data/ships/tork/cruiser.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | Tork Cruiser | ||
2 | data/images/tork_cruiser.bmp | ||
3 | 9 | ||
4 | 25 | ||
5 | 30 | ||
6 | 11.5 | ||
7 | 0 | ||
8 | 0 | ||
9 | 0 | ||
10 | 2 | ||
11 | 0 3 | ||
12 | data/weapons/spitter1.txt | ||
13 | 0 0 | ||
14 | data/weapons/novaspitter1.txt | ||
diff --git a/data/ships/tork/cruiser.txt~ b/data/ships/tork/cruiser.txt~ new file mode 100644 index 0000000..15e8459 --- /dev/null +++ b/data/ships/tork/cruiser.txt~ | |||
@@ -0,0 +1,14 @@ | |||
1 | Tork Cruiser | ||
2 | data/images/tork_cruiser.bmp | ||
3 | 9 | ||
4 | 25 | ||
5 | 30 | ||
6 | 11.5 | ||
7 | 9 | ||
8 | 20 | ||
9 | 14 | ||
10 | 2 | ||
11 | 0 3 | ||
12 | data/weapons/spitter1.txt | ||
13 | 0 0 | ||
14 | data/weapons/novaspitter1.txt | ||
diff --git a/data/ships/tork/interceptor.txt b/data/ships/tork/interceptor.txt new file mode 100644 index 0000000..40e3651 --- /dev/null +++ b/data/ships/tork/interceptor.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | Tork Interceptor | ||
2 | data/images/tork_interceptor.bmp | ||
3 | 8 | ||
4 | 15 | ||
5 | 55 | ||
6 | 9 | ||
7 | 0 | ||
8 | 0 | ||
9 | 0 | ||
10 | 3 | ||
11 | 5 6 | ||
12 | data/weapons/fireball1.txt | ||
13 | -5 6 | ||
14 | data/weapons/fireball1.txt | ||
15 | 0 2 | ||
16 | data/weapons/spitter2.txt | ||
diff --git a/data/ships/tork/interceptor.txt~ b/data/ships/tork/interceptor.txt~ new file mode 100644 index 0000000..b28ea59 --- /dev/null +++ b/data/ships/tork/interceptor.txt~ | |||
@@ -0,0 +1,16 @@ | |||
1 | Tork Interceptor | ||
2 | data/images/tork_interceptor.bmp | ||
3 | 8 | ||
4 | 15 | ||
5 | 55 | ||
6 | 9 | ||
7 | 7 | ||
8 | 15 | ||
9 | 8 | ||
10 | 3 | ||
11 | 5 6 | ||
12 | data/weapons/fireball1.txt | ||
13 | -5 6 | ||
14 | data/weapons/fireball1.txt | ||
15 | 0 2 | ||
16 | data/weapons/spitter2.txt | ||
diff --git a/data/ships/tork/spacerocket.txt b/data/ships/tork/spacerocket.txt new file mode 100644 index 0000000..6d0a929 --- /dev/null +++ b/data/ships/tork/spacerocket.txt | |||
@@ -0,0 +1,14 @@ | |||
1 | Tork Spacerocket | ||
2 | data/images/ship2.bmp | ||
3 | 3 | ||
4 | 10 | ||
5 | 30 | ||
6 | 8 | ||
7 | 0 | ||
8 | 0 | ||
9 | 0 | ||
10 | 2 | ||
11 | 4 4 | ||
12 | data/weapons/fireball1.txt | ||
13 | -4 4 | ||
14 | data/weapons/fireball1.txt | ||
diff --git a/data/ships/tork/spacerocket.txt~ b/data/ships/tork/spacerocket.txt~ new file mode 100644 index 0000000..ba1d457 --- /dev/null +++ b/data/ships/tork/spacerocket.txt~ | |||
@@ -0,0 +1,14 @@ | |||
1 | Tork Spacerocket | ||
2 | data/images/ship2.bmp | ||
3 | 3 | ||
4 | 10 | ||
5 | 30 | ||
6 | 8 | ||
7 | 3 | ||
8 | 4 | ||
9 | 3 | ||
10 | 2 | ||
11 | 4 4 | ||
12 | data/weapons/fireball1.txt | ||
13 | -4 4 | ||
14 | data/weapons/fireball1.txt | ||
diff --git a/data/ships/tork/sting.txt b/data/ships/tork/sting.txt new file mode 100644 index 0000000..4cd73b1 --- /dev/null +++ b/data/ships/tork/sting.txt | |||
@@ -0,0 +1,12 @@ | |||
1 | Tork Sting | ||
2 | data/images/tork_sting.bmp | ||
3 | 4 | ||
4 | 8 | ||
5 | 65 | ||
6 | 9 | ||
7 | 0 | ||
8 | 0 | ||
9 | 0 | ||
10 | 1 | ||
11 | 0 0 | ||
12 | data/weapons/fireball1.txt | ||
diff --git a/data/ships/tork/sting.txt~ b/data/ships/tork/sting.txt~ new file mode 100644 index 0000000..b17b4a6 --- /dev/null +++ b/data/ships/tork/sting.txt~ | |||
@@ -0,0 +1,12 @@ | |||
1 | Tork Sting | ||
2 | data/images/tork_sting.bmp | ||
3 | 4 | ||
4 | 8 | ||
5 | 65 | ||
6 | 9 | ||
7 | 4 | ||
8 | 4 | ||
9 | 5 | ||
10 | 1 | ||
11 | 0 0 | ||
12 | data/weapons/fireball1.txt | ||
diff --git a/data/ships/tork/stinger.txt~ b/data/ships/tork/stinger.txt~ new file mode 100644 index 0000000..ee04032 --- /dev/null +++ b/data/ships/tork/stinger.txt~ | |||
@@ -0,0 +1,12 @@ | |||
1 | Tork Stinger | ||
2 | data/images/tork_stinger.bmp | ||
3 | 4 | ||
4 | 8 | ||
5 | 65 | ||
6 | 9 | ||
7 | 4 | ||
8 | 4 | ||
9 | 4 | ||
10 | 1 | ||
11 | 0 0 | ||
12 | data/weapons/fireball1.txt | ||
diff --git a/data/ships/tork/tanker.txt b/data/ships/tork/tanker.txt new file mode 100644 index 0000000..04fd19a --- /dev/null +++ b/data/ships/tork/tanker.txt | |||
@@ -0,0 +1,10 @@ | |||
1 | Tork Tanker | ||
2 | data/images/tork_tanker.bmp | ||
3 | 10 | ||
4 | 40 | ||
5 | 15 | ||
6 | 11 | ||
7 | 0 | ||
8 | 0 | ||
9 | 0 | ||
10 | 0 | ||
diff --git a/data/ships/tork/tanker.txt~ b/data/ships/tork/tanker.txt~ new file mode 100644 index 0000000..e7d8cba --- /dev/null +++ b/data/ships/tork/tanker.txt~ | |||
@@ -0,0 +1,10 @@ | |||
1 | Tork Tanker | ||
2 | data/images/tork_tanker.bmp | ||
3 | 10 | ||
4 | 40 | ||
5 | 15 | ||
6 | 11 | ||
7 | 30 | ||
8 | 6 | ||
9 | 15 | ||
10 | 0 | ||
diff --git a/data/ships/tork/tork_interceptor.txt~ b/data/ships/tork/tork_interceptor.txt~ new file mode 100644 index 0000000..129b903 --- /dev/null +++ b/data/ships/tork/tork_interceptor.txt~ | |||
@@ -0,0 +1,16 @@ | |||
1 | Tork Interceptor | ||
2 | data/images/tork_interceptor.bmp | ||
3 | 8 | ||
4 | 15 | ||
5 | 55 | ||
6 | 7 | ||
7 | 12 | ||
8 | 6 | ||
9 | 6 | ||
10 | 3 | ||
11 | 5 6 | ||
12 | data/fireball1.txt | ||
13 | -5 6 | ||
14 | data/fireball1.txt | ||
15 | 0 2 | ||
16 | data/spitter2.txt | ||
diff --git a/data/ships/tork/tork_spacerocket.txt~ b/data/ships/tork/tork_spacerocket.txt~ new file mode 100644 index 0000000..22bcada --- /dev/null +++ b/data/ships/tork/tork_spacerocket.txt~ | |||
@@ -0,0 +1,14 @@ | |||
1 | Tork Spacerocket | ||
2 | data/images/ship2.bmp | ||
3 | 3 | ||
4 | 10 | ||
5 | 30 | ||
6 | 8 | ||
7 | 5 | ||
8 | 2 | ||
9 | 3 | ||
10 | 2 | ||
11 | 4 4 | ||
12 | data/fireball1.txt | ||
13 | -4 4 | ||
14 | data/fireball1.txt | ||
diff --git a/data/ships/user/UserShip_template.txt b/data/ships/user/UserShip_template.txt new file mode 100644 index 0000000..ed29661 --- /dev/null +++ b/data/ships/user/UserShip_template.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | small Fighter #name | ||
2 | data/images/small_fighter.bmp #path of imagefile | ||
3 | 300 #cost | ||
4 | 10 #maxhp | ||
5 | 50 #armor | ||
6 | 200 #moveSpeed | ||
7 | 200 #handling | ||
8 | 10 #maxEnergy | ||
9 | 2 #energyProduction | ||
10 | 5 #collisionSize | ||
11 | 2 #number of weapons | ||
12 | 4 4 #relative Position of weapon | ||
13 | 3 #maxSize of attached weapon | ||
14 | data/fireball.txt #path of weapon | ||
15 | 4 4 #relative Position of weapon | ||
16 | 3 #maxSize of attached weapon | ||
17 | data/fireball.txt #path of weapon | ||
diff --git a/data/ships/user/UserShip_template.txt~ b/data/ships/user/UserShip_template.txt~ new file mode 100644 index 0000000..8512129 --- /dev/null +++ b/data/ships/user/UserShip_template.txt~ | |||
@@ -0,0 +1,16 @@ | |||
1 | small Fighter #name | ||
2 | data/images/small_fighter.bmp #path of imagefile | ||
3 | 10 #maxhp | ||
4 | 50 #armor | ||
5 | 200 #moveSpeed | ||
6 | 200 #handling | ||
7 | 10 #maxEnergy | ||
8 | 2 #energyProduction | ||
9 | 5 #collisionSize | ||
10 | 2 #number of weapons | ||
11 | 4 4 #relative Position of weapon | ||
12 | 3 #maxSize of attached weapon | ||
13 | data/fireball.txt #path of weapon | ||
14 | 4 4 #relative Position of weapon | ||
15 | 3 #maxSize of attached weapon | ||
16 | data/fireball.txt #path of weapon | ||
diff --git a/data/ships/user/hornet.txt b/data/ships/user/hornet.txt new file mode 100644 index 0000000..d33c78c --- /dev/null +++ b/data/ships/user/hornet.txt | |||
@@ -0,0 +1,20 @@ | |||
1 | Hornet | ||
2 | data/images/hornet.bmp | ||
3 | 750 | ||
4 | 23 | ||
5 | 25 | ||
6 | 270 | ||
7 | 250 | ||
8 | 40 | ||
9 | 4.5 | ||
10 | 6 | ||
11 | 3 | ||
12 | 6 -6 | ||
13 | 3 | ||
14 | data/weapons/empty.txt | ||
15 | -6 -6 | ||
16 | 3 | ||
17 | data/weapons/empty.txt | ||
18 | 0 -3 | ||
19 | 3 | ||
20 | data/weapons/empty.txt | ||
diff --git a/data/ships/user/hornet.txt~ b/data/ships/user/hornet.txt~ new file mode 100644 index 0000000..c427bb2 --- /dev/null +++ b/data/ships/user/hornet.txt~ | |||
@@ -0,0 +1,20 @@ | |||
1 | Hornet | ||
2 | data/images/hornet.bmp | ||
3 | 0 | ||
4 | 23 | ||
5 | 25 | ||
6 | 270 | ||
7 | 250 | ||
8 | 40 | ||
9 | 4.5 | ||
10 | 6 | ||
11 | 3 | ||
12 | 6 -6 | ||
13 | 3 | ||
14 | data/weapons/empty.txt | ||
15 | -6 -6 | ||
16 | 3 | ||
17 | data/weapons/empty.txt | ||
18 | 0 -3 | ||
19 | 3 | ||
20 | data/weapons/empty.txt | ||
diff --git a/data/ships/user/small_fighter.txt b/data/ships/user/small_fighter.txt new file mode 100644 index 0000000..0501c22 --- /dev/null +++ b/data/ships/user/small_fighter.txt | |||
@@ -0,0 +1,17 @@ | |||
1 | Small Fighter | ||
2 | data/images/small_fighter.bmp | ||
3 | 0 | ||
4 | 15 | ||
5 | 10 | ||
6 | 190 | ||
7 | 300 | ||
8 | 10 | ||
9 | 3 | ||
10 | 5 | ||
11 | 2 | ||
12 | 4 -2 | ||
13 | 3 | ||
14 | data/weapons/beamer2.txt | ||
15 | -4 -2 | ||
16 | 3 | ||
17 | data/weapons/empty.txt | ||
diff --git a/data/ships/user/small_fighter.txt~ b/data/ships/user/small_fighter.txt~ new file mode 100644 index 0000000..0501c22 --- /dev/null +++ b/data/ships/user/small_fighter.txt~ | |||
@@ -0,0 +1,17 @@ | |||
1 | Small Fighter | ||
2 | data/images/small_fighter.bmp | ||
3 | 0 | ||
4 | 15 | ||
5 | 10 | ||
6 | 190 | ||
7 | 300 | ||
8 | 10 | ||
9 | 3 | ||
10 | 5 | ||
11 | 2 | ||
12 | 4 -2 | ||
13 | 3 | ||
14 | data/weapons/beamer2.txt | ||
15 | -4 -2 | ||
16 | 3 | ||
17 | data/weapons/empty.txt | ||
diff --git a/data/ships/user/userships.txt b/data/ships/user/userships.txt new file mode 100644 index 0000000..d3e1633 --- /dev/null +++ b/data/ships/user/userships.txt | |||
@@ -0,0 +1,2 @@ | |||
1 | small_fighter.txt | ||
2 | hornet.txt | ||
diff --git a/data/ships/user/userships.txt~ b/data/ships/user/userships.txt~ new file mode 100644 index 0000000..d44c218 --- /dev/null +++ b/data/ships/user/userships.txt~ | |||
@@ -0,0 +1 @@ | |||
small_fighter.txt | |||
diff --git a/data/small_fighter.txt~ b/data/small_fighter.txt~ new file mode 100644 index 0000000..f464e1a --- /dev/null +++ b/data/small_fighter.txt~ | |||
@@ -0,0 +1,14 @@ | |||
1 | Small Fighter | ||
2 | data/images/small_fighter.bmp | ||
3 | 10 | ||
4 | 50 | ||
5 | 200 | ||
6 | 200 | ||
7 | 10 | ||
8 | 2 | ||
9 | 5 | ||
10 | 2 | ||
11 | 4 -2 | ||
12 | data/spitter1.txt | ||
13 | -4 -2 | ||
14 | data/spitter1.txt | ||
diff --git a/data/sounds/bigspit1.wav b/data/sounds/bigspit1.wav new file mode 100644 index 0000000..907004e --- /dev/null +++ b/data/sounds/bigspit1.wav | |||
Binary files differ | |||
diff --git a/data/sounds/fire1.wav b/data/sounds/fire1.wav new file mode 100644 index 0000000..c3df1c9 --- /dev/null +++ b/data/sounds/fire1.wav | |||
Binary files differ | |||
diff --git a/data/sounds/piu1.wav b/data/sounds/piu1.wav new file mode 100644 index 0000000..2414058 --- /dev/null +++ b/data/sounds/piu1.wav | |||
Binary files differ | |||
diff --git a/data/sounds/piu2.wav b/data/sounds/piu2.wav new file mode 100644 index 0000000..f225096 --- /dev/null +++ b/data/sounds/piu2.wav | |||
Binary files differ | |||
diff --git a/data/sounds/piu3.wav b/data/sounds/piu3.wav new file mode 100644 index 0000000..6608e6a --- /dev/null +++ b/data/sounds/piu3.wav | |||
Binary files differ | |||
diff --git a/data/sounds/piu4.wav b/data/sounds/piu4.wav new file mode 100644 index 0000000..f4649bc --- /dev/null +++ b/data/sounds/piu4.wav | |||
Binary files differ | |||
diff --git a/data/sounds/spit1.wav b/data/sounds/spit1.wav new file mode 100644 index 0000000..242fca6 --- /dev/null +++ b/data/sounds/spit1.wav | |||
Binary files differ | |||
diff --git a/data/sounds/spit2.wav b/data/sounds/spit2.wav new file mode 100644 index 0000000..8efc70a --- /dev/null +++ b/data/sounds/spit2.wav | |||
Binary files differ | |||
diff --git a/data/sounds/spit3.wav b/data/sounds/spit3.wav new file mode 100644 index 0000000..a7f3733 --- /dev/null +++ b/data/sounds/spit3.wav | |||
Binary files differ | |||
diff --git a/data/sounds/spit4.wav b/data/sounds/spit4.wav new file mode 100644 index 0000000..d9df0f0 --- /dev/null +++ b/data/sounds/spit4.wav | |||
Binary files differ | |||
diff --git a/data/spit.txt~ b/data/spit.txt~ new file mode 100644 index 0000000..cf073dc --- /dev/null +++ b/data/spit.txt~ | |||
@@ -0,0 +1,4 @@ | |||
1 | data/images/spit.bmp | ||
2 | 1 | ||
3 | 0 | ||
4 | 1.4142 | ||
diff --git a/data/spitter1.txt~ b/data/spitter1.txt~ new file mode 100644 index 0000000..9715239 --- /dev/null +++ b/data/spitter1.txt~ | |||
@@ -0,0 +1,9 @@ | |||
1 | Spitter 1 | ||
2 | data/images/spitter1.bmp | ||
3 | 2 | ||
4 | 1 | ||
5 | 0.6 | ||
6 | 0.5 | ||
7 | data/spit.txt | ||
8 | 0 | ||
9 | 250 | ||
diff --git a/data/spitter2.txt~ b/data/spitter2.txt~ new file mode 100644 index 0000000..777b944 --- /dev/null +++ b/data/spitter2.txt~ | |||
@@ -0,0 +1,19 @@ | |||
1 | Spitter 2 | ||
2 | data/images/spitter2.bmp | ||
3 | 7 | ||
4 | 3 | ||
5 | 0.6 | ||
6 | 0 | ||
7 | data/spit.txt | ||
8 | 0 | ||
9 | 250 | ||
10 | 0.6 | ||
11 | 0.2 | ||
12 | data/spit.txt | ||
13 | 40 | ||
14 | 240 | ||
15 | 0.6 | ||
16 | 0.4 | ||
17 | data/spit.txt | ||
18 | -40 | ||
19 | 240 | ||
diff --git a/data/spitter3.txt~ b/data/spitter3.txt~ new file mode 100644 index 0000000..06a1d35 --- /dev/null +++ b/data/spitter3.txt~ | |||
@@ -0,0 +1,39 @@ | |||
1 | Spitter 3 | ||
2 | data/images/spitter3.bmp | ||
3 | 15 | ||
4 | 7 | ||
5 | 2 | ||
6 | 0 | ||
7 | data/bigspit.txt | ||
8 | 0 | ||
9 | 250 | ||
10 | 0.8 | ||
11 | 0 | ||
12 | data/spit.txt | ||
13 | 10 | ||
14 | 247 | ||
15 | 0.8 | ||
16 | 0 | ||
17 | data/spit.txt | ||
18 | -10 | ||
19 | 247 | ||
20 | 0.8 | ||
21 | 0.16 | ||
22 | data/spit.txt | ||
23 | 176.78 | ||
24 | 176.78 | ||
25 | 0.8 | ||
26 | 0.32 | ||
27 | data/spit.txt | ||
28 | -176.78 | ||
29 | 176.78 | ||
30 | 0.8 | ||
31 | 0.48 | ||
32 | data/spit.txt | ||
33 | 176.78 | ||
34 | -176.78 | ||
35 | 0.8 | ||
36 | 0.64 | ||
37 | data/spit.txt | ||
38 | -176.78 | ||
39 | -176.78 | ||
diff --git a/data/tork_capsule.txt~ b/data/tork_capsule.txt~ new file mode 100644 index 0000000..467320d --- /dev/null +++ b/data/tork_capsule.txt~ | |||
@@ -0,0 +1,10 @@ | |||
1 | Tork Capsule | ||
2 | data/images/ship1.bmp | ||
3 | 2 | ||
4 | 5 | ||
5 | 40 | ||
6 | 6 | ||
7 | 1 | ||
8 | 1 | ||
9 | 1 | ||
10 | 0 | ||
diff --git a/data/tork_interceptor.txt~ b/data/tork_interceptor.txt~ new file mode 100644 index 0000000..129b903 --- /dev/null +++ b/data/tork_interceptor.txt~ | |||
@@ -0,0 +1,16 @@ | |||
1 | Tork Interceptor | ||
2 | data/images/tork_interceptor.bmp | ||
3 | 8 | ||
4 | 15 | ||
5 | 55 | ||
6 | 7 | ||
7 | 12 | ||
8 | 6 | ||
9 | 6 | ||
10 | 3 | ||
11 | 5 6 | ||
12 | data/fireball1.txt | ||
13 | -5 6 | ||
14 | data/fireball1.txt | ||
15 | 0 2 | ||
16 | data/spitter2.txt | ||
diff --git a/data/tork_spacerocket.txt~ b/data/tork_spacerocket.txt~ new file mode 100644 index 0000000..c4840ce --- /dev/null +++ b/data/tork_spacerocket.txt~ | |||
@@ -0,0 +1,14 @@ | |||
1 | Tork Spacerocket | ||
2 | data/images/ship2.bmp | ||
3 | 5 | ||
4 | 10 | ||
5 | 30 | ||
6 | 8 | ||
7 | 5 | ||
8 | 2 | ||
9 | 3 | ||
10 | 2 | ||
11 | 4 4 | ||
12 | data/fireball1.txt | ||
13 | -4 4 | ||
14 | data/fireball1.txt | ||
diff --git a/data/weapon_template.txt~ b/data/weapon_template.txt~ new file mode 100644 index 0000000..cf073dc --- /dev/null +++ b/data/weapon_template.txt~ | |||
@@ -0,0 +1,4 @@ | |||
1 | data/images/spit.bmp | ||
2 | 1 | ||
3 | 0 | ||
4 | 1.4142 | ||
diff --git a/data/weapons.txt~ b/data/weapons.txt~ new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/data/weapons.txt~ | |||
diff --git a/data/weapons/beamer1.txt b/data/weapons/beamer1.txt new file mode 100644 index 0000000..0538fbc --- /dev/null +++ b/data/weapons/beamer1.txt | |||
@@ -0,0 +1,11 @@ | |||
1 | Beamer 1 | ||
2 | data/images/beamer1.bmp | ||
3 | 4 | ||
4 | 1 | ||
5 | 0 | ||
6 | 1 | ||
7 | 0.08 | ||
8 | 0 | ||
9 | data/projectiles/beam.txt | ||
10 | 0 | ||
11 | 1000 | ||
diff --git a/data/weapons/beamer1.txt~ b/data/weapons/beamer1.txt~ new file mode 100644 index 0000000..1f031fd --- /dev/null +++ b/data/weapons/beamer1.txt~ | |||
@@ -0,0 +1,11 @@ | |||
1 | Beamer 1 | ||
2 | data/images/beamer1.bmp | ||
3 | 4 | ||
4 | 1 | ||
5 | 12 | ||
6 | 1 | ||
7 | 0.08 | ||
8 | 0 | ||
9 | data/projectiles/beam.txt | ||
10 | 0 | ||
11 | 1000 | ||
diff --git a/data/weapons/beamer2.txt b/data/weapons/beamer2.txt new file mode 100644 index 0000000..a28d8d6 --- /dev/null +++ b/data/weapons/beamer2.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | Beamer 2 | ||
2 | data/images/beamer1.bmp | ||
3 | 6 | ||
4 | 1 | ||
5 | 0 | ||
6 | 3 | ||
7 | 0.15 | ||
8 | 0 | ||
9 | data/projectiles/beam.txt | ||
10 | 0 | ||
11 | 1000 | ||
12 | 0.2 | ||
13 | 0.02 | ||
14 | data/projectiles/beam.txt | ||
15 | -50 | ||
16 | 990 | ||
17 | 0.2 | ||
18 | 0.04 | ||
19 | data/projectiles/beam.txt | ||
20 | 50 | ||
21 | 990 | ||
diff --git a/data/weapons/beamer2.txt~ b/data/weapons/beamer2.txt~ new file mode 100644 index 0000000..1b5ae42 --- /dev/null +++ b/data/weapons/beamer2.txt~ | |||
@@ -0,0 +1,21 @@ | |||
1 | Beamer 2 | ||
2 | data/images/beamer1.bmp | ||
3 | 6 | ||
4 | 1 | ||
5 | 35 | ||
6 | 3 | ||
7 | 0.15 | ||
8 | 0 | ||
9 | data/projectiles/beam.txt | ||
10 | 0 | ||
11 | 1000 | ||
12 | 0.2 | ||
13 | 0.02 | ||
14 | data/projectiles/beam.txt | ||
15 | -50 | ||
16 | 990 | ||
17 | 0.2 | ||
18 | 0.04 | ||
19 | data/projectiles/beam.txt | ||
20 | 50 | ||
21 | 990 | ||
diff --git a/data/weapons/creat b/data/weapons/creat new file mode 100644 index 0000000..558da6c --- /dev/null +++ b/data/weapons/creat | |||
Binary files differ | |||
diff --git a/data/weapons/creator.cpp b/data/weapons/creator.cpp new file mode 100644 index 0000000..c5393eb --- /dev/null +++ b/data/weapons/creator.cpp | |||
@@ -0,0 +1,34 @@ | |||
1 | #include <iostream> | ||
2 | #include <fstream> | ||
3 | #include <math.h> | ||
4 | |||
5 | using namespace std; | ||
6 | |||
7 | int main() | ||
8 | { | ||
9 | ofstream o; | ||
10 | o.open("novaspitter1.txt"); | ||
11 | o << "Novaspitter 1\n"; | ||
12 | o << "data/images/empty.bmp\n"; | ||
13 | o << 8 << '\n'; | ||
14 | o << 1 << '\n'; | ||
15 | o << 30 << '\n'; | ||
16 | int shots = 6; | ||
17 | double T = 0.8; | ||
18 | double duration = 0.0; | ||
19 | double start = 0.7; | ||
20 | double speed = 250; | ||
21 | int Ncircles = 1; | ||
22 | o << shots << endl; | ||
23 | for(int i = 0; i < shots; ++i) | ||
24 | { | ||
25 | o << T << '\n'; | ||
26 | o << T - start - ((double) i)/((double) shots)*duration-0.0001 << '\n'; | ||
27 | o << "data/projectiles/spit.txt\n"; | ||
28 | o << cos(Ncircles*2*M_PI*i/((double) shots))*speed << '\n'; | ||
29 | o << sin(Ncircles*2*M_PI*i/((double) shots))*speed; | ||
30 | if(i != shots-1) | ||
31 | o << endl; | ||
32 | } | ||
33 | o.close(); | ||
34 | } | ||
diff --git a/data/weapons/creator.cpp~ b/data/weapons/creator.cpp~ new file mode 100644 index 0000000..796d095 --- /dev/null +++ b/data/weapons/creator.cpp~ | |||
@@ -0,0 +1,34 @@ | |||
1 | #include <iostream> | ||
2 | #include <fstream> | ||
3 | #include <math.h> | ||
4 | |||
5 | using namespace std; | ||
6 | |||
7 | int main() | ||
8 | { | ||
9 | ofstream o; | ||
10 | o.open("novaspitter1.txt"); | ||
11 | o << "Novaspitter 1\n"; | ||
12 | o << "data/images/empty.bmp\n"; | ||
13 | o << 8 << '\n'; | ||
14 | o << 1 << '\n'; | ||
15 | o << 30 << '\n'; | ||
16 | int shots = 6; | ||
17 | double T = 0.8; | ||
18 | double duration = 0.0; | ||
19 | double start = 0.7; | ||
20 | double speed = 250; | ||
21 | int Ncircles = 1; | ||
22 | o << shots << endl; | ||
23 | for(int i = 0; i < shots; ++i) | ||
24 | { | ||
25 | o << T << '\n'; | ||
26 | o << T - start - ((double) i)/((double) shots)*duration-0.0001 << '\n'; | ||
27 | o << "data/projectiles/psi.txt\n"; | ||
28 | o << cos(Ncircles*2*M_PI*i/((double) shots))*speed << '\n'; | ||
29 | o << sin(Ncircles*2*M_PI*i/((double) shots))*speed; | ||
30 | if(i != shots-1) | ||
31 | o << endl; | ||
32 | } | ||
33 | o.close(); | ||
34 | } | ||
diff --git a/data/weapons/empty.txt b/data/weapons/empty.txt new file mode 100644 index 0000000..6536e97 --- /dev/null +++ b/data/weapons/empty.txt | |||
@@ -0,0 +1,6 @@ | |||
1 | empty Slot | ||
2 | data/images/empty.bmp | ||
3 | 0 | ||
4 | 0 | ||
5 | 0 | ||
6 | 0 | ||
diff --git a/data/weapons/empty.txt~ b/data/weapons/empty.txt~ new file mode 100644 index 0000000..7b5e1a8 --- /dev/null +++ b/data/weapons/empty.txt~ | |||
@@ -0,0 +1,11 @@ | |||
1 | empty Slot | ||
2 | data/images/empty.bmp | ||
3 | 2 | ||
4 | 1 | ||
5 | 5 | ||
6 | 1 | ||
7 | 0.6 | ||
8 | 0.55 | ||
9 | data/projectiles/spit.txt | ||
10 | 0 | ||
11 | 250 | ||
diff --git a/data/weapons/fireball1.txt b/data/weapons/fireball1.txt new file mode 100644 index 0000000..78d6f41 --- /dev/null +++ b/data/weapons/fireball1.txt | |||
@@ -0,0 +1,11 @@ | |||
1 | Fireball 1 | ||
2 | data/images/fire1.bmp | ||
3 | 1 | ||
4 | 1 | ||
5 | 0 | ||
6 | 1 | ||
7 | 1.4 | ||
8 | 0.6 | ||
9 | data/projectiles/fire1.txt | ||
10 | 0 | ||
11 | 135 | ||
diff --git a/data/weapons/fireball1.txt~ b/data/weapons/fireball1.txt~ new file mode 100644 index 0000000..56eb516 --- /dev/null +++ b/data/weapons/fireball1.txt~ | |||
@@ -0,0 +1,11 @@ | |||
1 | Fireball 1 | ||
2 | data/images/fire1.bmp | ||
3 | 1 | ||
4 | 1 | ||
5 | 5 | ||
6 | 1 | ||
7 | 1.4 | ||
8 | 0.6 | ||
9 | data/projectiles/fire1.txt | ||
10 | 0 | ||
11 | 135 | ||
diff --git a/data/weapons/inawaffe.txt b/data/weapons/inawaffe.txt new file mode 100644 index 0000000..46c65ab --- /dev/null +++ b/data/weapons/inawaffe.txt | |||
@@ -0,0 +1,31 @@ | |||
1 | Ina's OP-Waffe | ||
2 | data/images/beamer1.bmp | ||
3 | 1.25 | ||
4 | 1 | ||
5 | 0 | ||
6 | 5 | ||
7 | 0.3 | ||
8 | 0 | ||
9 | data/projectiles/beam.txt | ||
10 | 0 | ||
11 | 700 | ||
12 | 0.3 | ||
13 | 0.06 | ||
14 | data/projectiles/beam.txt | ||
15 | 200 | ||
16 | 600 | ||
17 | 0.3 | ||
18 | 0.12 | ||
19 | data/projectiles/beam.txt | ||
20 | -200 | ||
21 | 600 | ||
22 | 0.3 | ||
23 | 0.18 | ||
24 | data/projectiles/beam.txt | ||
25 | 50 | ||
26 | 675 | ||
27 | 0.3 | ||
28 | 0.24 | ||
29 | data/projectiles/beam.txt | ||
30 | -50 | ||
31 | 675 | ||
diff --git a/data/weapons/inawaffe.txt~ b/data/weapons/inawaffe.txt~ new file mode 100644 index 0000000..ae3eef7 --- /dev/null +++ b/data/weapons/inawaffe.txt~ | |||
@@ -0,0 +1,31 @@ | |||
1 | Ina's OP-Waffe | ||
2 | data/images/beamer1.bmp | ||
3 | 1.25 | ||
4 | 1 | ||
5 | 100 | ||
6 | 5 | ||
7 | 0.3 | ||
8 | 0 | ||
9 | data/projectiles/beam.txt | ||
10 | 0 | ||
11 | 700 | ||
12 | 0.3 | ||
13 | 0.06 | ||
14 | data/projectiles/beam.txt | ||
15 | 200 | ||
16 | 600 | ||
17 | 0.3 | ||
18 | 0.12 | ||
19 | data/projectiles/beam.txt | ||
20 | -200 | ||
21 | 600 | ||
22 | 0.3 | ||
23 | 0.18 | ||
24 | data/projectiles/beam.txt | ||
25 | 50 | ||
26 | 675 | ||
27 | 0.3 | ||
28 | 0.24 | ||
29 | data/projectiles/beam.txt | ||
30 | -50 | ||
31 | 675 | ||
diff --git a/data/weapons/nova1.txt b/data/weapons/nova1.txt new file mode 100644 index 0000000..4dc8898 --- /dev/null +++ b/data/weapons/nova1.txt | |||
@@ -0,0 +1,1506 @@ | |||
1 | Nova 1 | ||
2 | data/images/empty.bmp | ||
3 | 25 | ||
4 | 1 | ||
5 | 0 | ||
6 | 300 | ||
7 | 10 | ||
8 | 6.9999 | ||
9 | data/projectiles/psi.txt | ||
10 | 320 | ||
11 | 0 | ||
12 | 10 | ||
13 | 6.9979 | ||
14 | data/projectiles/psi.txt | ||
15 | 318.878 | ||
16 | 26.7769 | ||
17 | 10 | ||
18 | 6.9959 | ||
19 | data/projectiles/psi.txt | ||
20 | 315.519 | ||
21 | 53.366 | ||
22 | 10 | ||
23 | 6.9939 | ||
24 | data/projectiles/psi.txt | ||
25 | 309.947 | ||
26 | 79.5808 | ||
27 | 10 | ||
28 | 6.9919 | ||
29 | data/projectiles/psi.txt | ||
30 | 302.2 | ||
31 | 105.237 | ||
32 | 10 | ||
33 | 6.9899 | ||
34 | data/projectiles/psi.txt | ||
35 | 292.335 | ||
36 | 130.156 | ||
37 | 10 | ||
38 | 6.9879 | ||
39 | data/projectiles/psi.txt | ||
40 | 280.418 | ||
41 | 154.161 | ||
42 | 10 | ||
43 | 6.9859 | ||
44 | data/projectiles/psi.txt | ||
45 | 266.535 | ||
46 | 177.085 | ||
47 | 10 | ||
48 | 6.9839 | ||
49 | data/projectiles/psi.txt | ||
50 | 250.782 | ||
51 | 198.767 | ||
52 | 10 | ||
53 | 6.9819 | ||
54 | data/projectiles/psi.txt | ||
55 | 233.27 | ||
56 | 219.055 | ||
57 | 10 | ||
58 | 6.9799 | ||
59 | data/projectiles/psi.txt | ||
60 | 214.122 | ||
61 | 237.806 | ||
62 | 10 | ||
63 | 6.9779 | ||
64 | data/projectiles/psi.txt | ||
65 | 193.472 | ||
66 | 254.89 | ||
67 | 10 | ||
68 | 6.9759 | ||
69 | data/projectiles/psi.txt | ||
70 | 171.465 | ||
71 | 270.185 | ||
72 | 10 | ||
73 | 6.9739 | ||
74 | data/projectiles/psi.txt | ||
75 | 148.255 | ||
76 | 283.585 | ||
77 | 10 | ||
78 | 6.9719 | ||
79 | data/projectiles/psi.txt | ||
80 | 124.005 | ||
81 | 294.996 | ||
82 | 10 | ||
83 | 6.9699 | ||
84 | data/projectiles/psi.txt | ||
85 | 98.8854 | ||
86 | 304.338 | ||
87 | 10 | ||
88 | 6.9679 | ||
89 | data/projectiles/psi.txt | ||
90 | 73.0723 | ||
91 | 311.545 | ||
92 | 10 | ||
93 | 6.9659 | ||
94 | data/projectiles/psi.txt | ||
95 | 46.7466 | ||
96 | 316.567 | ||
97 | 10 | ||
98 | 6.9639 | ||
99 | data/projectiles/psi.txt | ||
100 | 20.093 | ||
101 | 319.369 | ||
102 | 10 | ||
103 | 6.9619 | ||
104 | data/projectiles/psi.txt | ||
105 | -6.70157 | ||
106 | 319.93 | ||
107 | 10 | ||
108 | 6.9599 | ||
109 | data/projectiles/psi.txt | ||
110 | -33.4491 | ||
111 | 318.247 | ||
112 | 10 | ||
113 | 6.9579 | ||
114 | data/projectiles/psi.txt | ||
115 | -59.962 | ||
116 | 314.332 | ||
117 | 10 | ||
118 | 6.9559 | ||
119 | data/projectiles/psi.txt | ||
120 | -86.0543 | ||
121 | 308.212 | ||
122 | 10 | ||
123 | 6.9539 | ||
124 | data/projectiles/psi.txt | ||
125 | -111.543 | ||
126 | 299.93 | ||
127 | 10 | ||
128 | 6.9519 | ||
129 | data/projectiles/psi.txt | ||
130 | -136.249 | ||
131 | 289.545 | ||
132 | 10 | ||
133 | 6.9499 | ||
134 | data/projectiles/psi.txt | ||
135 | -160 | ||
136 | 277.128 | ||
137 | 10 | ||
138 | 6.9479 | ||
139 | data/projectiles/psi.txt | ||
140 | -182.628 | ||
141 | 262.768 | ||
142 | 10 | ||
143 | 6.9459 | ||
144 | data/projectiles/psi.txt | ||
145 | -203.976 | ||
146 | 246.564 | ||
147 | 10 | ||
148 | 6.9439 | ||
149 | data/projectiles/psi.txt | ||
150 | -223.892 | ||
151 | 228.631 | ||
152 | 10 | ||
153 | 6.9419 | ||
154 | data/projectiles/psi.txt | ||
155 | -242.238 | ||
156 | 209.095 | ||
157 | 10 | ||
158 | 6.9399 | ||
159 | data/projectiles/psi.txt | ||
160 | -258.885 | ||
161 | 188.091 | ||
162 | 10 | ||
163 | 6.9379 | ||
164 | data/projectiles/psi.txt | ||
165 | -273.717 | ||
166 | 165.769 | ||
167 | 10 | ||
168 | 6.9359 | ||
169 | data/projectiles/psi.txt | ||
170 | -286.628 | ||
171 | 142.283 | ||
172 | 10 | ||
173 | 6.9339 | ||
174 | data/projectiles/psi.txt | ||
175 | -297.528 | ||
176 | 117.8 | ||
177 | 10 | ||
178 | 6.9319 | ||
179 | data/projectiles/psi.txt | ||
180 | -306.342 | ||
181 | 92.4902 | ||
182 | 10 | ||
183 | 6.9299 | ||
184 | data/projectiles/psi.txt | ||
185 | -313.007 | ||
186 | 66.5317 | ||
187 | 10 | ||
188 | 6.9279 | ||
189 | data/projectiles/psi.txt | ||
190 | -317.477 | ||
191 | 40.1066 | ||
192 | 10 | ||
193 | 6.9259 | ||
194 | data/projectiles/psi.txt | ||
195 | -319.719 | ||
196 | 13.4002 | ||
197 | 10 | ||
198 | 6.9239 | ||
199 | data/projectiles/psi.txt | ||
200 | -319.719 | ||
201 | -13.4002 | ||
202 | 10 | ||
203 | 6.9219 | ||
204 | data/projectiles/psi.txt | ||
205 | -317.477 | ||
206 | -40.1066 | ||
207 | 10 | ||
208 | 6.9199 | ||
209 | data/projectiles/psi.txt | ||
210 | -313.007 | ||
211 | -66.5317 | ||
212 | 10 | ||
213 | 6.9179 | ||
214 | data/projectiles/psi.txt | ||
215 | -306.342 | ||
216 | -92.4902 | ||
217 | 10 | ||
218 | 6.9159 | ||
219 | data/projectiles/psi.txt | ||
220 | -297.528 | ||
221 | -117.8 | ||
222 | 10 | ||
223 | 6.9139 | ||
224 | data/projectiles/psi.txt | ||
225 | -286.628 | ||
226 | -142.283 | ||
227 | 10 | ||
228 | 6.9119 | ||
229 | data/projectiles/psi.txt | ||
230 | -273.717 | ||
231 | -165.769 | ||
232 | 10 | ||
233 | 6.9099 | ||
234 | data/projectiles/psi.txt | ||
235 | -258.885 | ||
236 | -188.091 | ||
237 | 10 | ||
238 | 6.9079 | ||
239 | data/projectiles/psi.txt | ||
240 | -242.238 | ||
241 | -209.095 | ||
242 | 10 | ||
243 | 6.9059 | ||
244 | data/projectiles/psi.txt | ||
245 | -223.892 | ||
246 | -228.631 | ||
247 | 10 | ||
248 | 6.9039 | ||
249 | data/projectiles/psi.txt | ||
250 | -203.976 | ||
251 | -246.564 | ||
252 | 10 | ||
253 | 6.9019 | ||
254 | data/projectiles/psi.txt | ||
255 | -182.628 | ||
256 | -262.768 | ||
257 | 10 | ||
258 | 6.8999 | ||
259 | data/projectiles/psi.txt | ||
260 | -160 | ||
261 | -277.128 | ||
262 | 10 | ||
263 | 6.8979 | ||
264 | data/projectiles/psi.txt | ||
265 | -136.249 | ||
266 | -289.545 | ||
267 | 10 | ||
268 | 6.8959 | ||
269 | data/projectiles/psi.txt | ||
270 | -111.543 | ||
271 | -299.93 | ||
272 | 10 | ||
273 | 6.8939 | ||
274 | data/projectiles/psi.txt | ||
275 | -86.0543 | ||
276 | -308.212 | ||
277 | 10 | ||
278 | 6.8919 | ||
279 | data/projectiles/psi.txt | ||
280 | -59.962 | ||
281 | -314.332 | ||
282 | 10 | ||
283 | 6.8899 | ||
284 | data/projectiles/psi.txt | ||
285 | -33.4491 | ||
286 | -318.247 | ||
287 | 10 | ||
288 | 6.8879 | ||
289 | data/projectiles/psi.txt | ||
290 | -6.70157 | ||
291 | -319.93 | ||
292 | 10 | ||
293 | 6.8859 | ||
294 | data/projectiles/psi.txt | ||
295 | 20.093 | ||
296 | -319.369 | ||
297 | 10 | ||
298 | 6.8839 | ||
299 | data/projectiles/psi.txt | ||
300 | 46.7466 | ||
301 | -316.567 | ||
302 | 10 | ||
303 | 6.8819 | ||
304 | data/projectiles/psi.txt | ||
305 | 73.0723 | ||
306 | -311.545 | ||
307 | 10 | ||
308 | 6.8799 | ||
309 | data/projectiles/psi.txt | ||
310 | 98.8854 | ||
311 | -304.338 | ||
312 | 10 | ||
313 | 6.8779 | ||
314 | data/projectiles/psi.txt | ||
315 | 124.005 | ||
316 | -294.996 | ||
317 | 10 | ||
318 | 6.8759 | ||
319 | data/projectiles/psi.txt | ||
320 | 148.255 | ||
321 | -283.585 | ||
322 | 10 | ||
323 | 6.8739 | ||
324 | data/projectiles/psi.txt | ||
325 | 171.465 | ||
326 | -270.185 | ||
327 | 10 | ||
328 | 6.8719 | ||
329 | data/projectiles/psi.txt | ||
330 | 193.472 | ||
331 | -254.89 | ||
332 | 10 | ||
333 | 6.8699 | ||
334 | data/projectiles/psi.txt | ||
335 | 214.122 | ||
336 | -237.806 | ||
337 | 10 | ||
338 | 6.8679 | ||
339 | data/projectiles/psi.txt | ||
340 | 233.27 | ||
341 | -219.055 | ||
342 | 10 | ||
343 | 6.8659 | ||
344 | data/projectiles/psi.txt | ||
345 | 250.782 | ||
346 | -198.767 | ||
347 | 10 | ||
348 | 6.8639 | ||
349 | data/projectiles/psi.txt | ||
350 | 266.535 | ||
351 | -177.085 | ||
352 | 10 | ||
353 | 6.8619 | ||
354 | data/projectiles/psi.txt | ||
355 | 280.418 | ||
356 | -154.161 | ||
357 | 10 | ||
358 | 6.8599 | ||
359 | data/projectiles/psi.txt | ||
360 | 292.335 | ||
361 | -130.156 | ||
362 | 10 | ||
363 | 6.8579 | ||
364 | data/projectiles/psi.txt | ||
365 | 302.2 | ||
366 | -105.237 | ||
367 | 10 | ||
368 | 6.8559 | ||
369 | data/projectiles/psi.txt | ||
370 | 309.947 | ||
371 | -79.5808 | ||
372 | 10 | ||
373 | 6.8539 | ||
374 | data/projectiles/psi.txt | ||
375 | 315.519 | ||
376 | -53.366 | ||
377 | 10 | ||
378 | 6.8519 | ||
379 | data/projectiles/psi.txt | ||
380 | 318.878 | ||
381 | -26.7769 | ||
382 | 10 | ||
383 | 6.8499 | ||
384 | data/projectiles/psi.txt | ||
385 | 320 | ||
386 | -7.83774e-14 | ||
387 | 10 | ||
388 | 6.8479 | ||
389 | data/projectiles/psi.txt | ||
390 | 318.878 | ||
391 | 26.7769 | ||
392 | 10 | ||
393 | 6.8459 | ||
394 | data/projectiles/psi.txt | ||
395 | 315.519 | ||
396 | 53.366 | ||
397 | 10 | ||
398 | 6.8439 | ||
399 | data/projectiles/psi.txt | ||
400 | 309.947 | ||
401 | 79.5808 | ||
402 | 10 | ||
403 | 6.8419 | ||
404 | data/projectiles/psi.txt | ||
405 | 302.2 | ||
406 | 105.237 | ||
407 | 10 | ||
408 | 6.8399 | ||
409 | data/projectiles/psi.txt | ||
410 | 292.335 | ||
411 | 130.156 | ||
412 | 10 | ||
413 | 6.8379 | ||
414 | data/projectiles/psi.txt | ||
415 | 280.418 | ||
416 | 154.161 | ||
417 | 10 | ||
418 | 6.8359 | ||
419 | data/projectiles/psi.txt | ||
420 | 266.535 | ||
421 | 177.085 | ||
422 | 10 | ||
423 | 6.8339 | ||
424 | data/projectiles/psi.txt | ||
425 | 250.782 | ||
426 | 198.767 | ||
427 | 10 | ||
428 | 6.8319 | ||
429 | data/projectiles/psi.txt | ||
430 | 233.27 | ||
431 | 219.055 | ||
432 | 10 | ||
433 | 6.8299 | ||
434 | data/projectiles/psi.txt | ||
435 | 214.122 | ||
436 | 237.806 | ||
437 | 10 | ||
438 | 6.8279 | ||
439 | data/projectiles/psi.txt | ||
440 | 193.472 | ||
441 | 254.89 | ||
442 | 10 | ||
443 | 6.8259 | ||
444 | data/projectiles/psi.txt | ||
445 | 171.465 | ||
446 | 270.185 | ||
447 | 10 | ||
448 | 6.8239 | ||
449 | data/projectiles/psi.txt | ||
450 | 148.255 | ||
451 | 283.585 | ||
452 | 10 | ||
453 | 6.8219 | ||
454 | data/projectiles/psi.txt | ||
455 | 124.005 | ||
456 | 294.996 | ||
457 | 10 | ||
458 | 6.8199 | ||
459 | data/projectiles/psi.txt | ||
460 | 98.8854 | ||
461 | 304.338 | ||
462 | 10 | ||
463 | 6.8179 | ||
464 | data/projectiles/psi.txt | ||
465 | 73.0723 | ||
466 | 311.545 | ||
467 | 10 | ||
468 | 6.8159 | ||
469 | data/projectiles/psi.txt | ||
470 | 46.7466 | ||
471 | 316.567 | ||
472 | 10 | ||
473 | 6.8139 | ||
474 | data/projectiles/psi.txt | ||
475 | 20.093 | ||
476 | 319.369 | ||
477 | 10 | ||
478 | 6.8119 | ||
479 | data/projectiles/psi.txt | ||
480 | -6.70157 | ||
481 | 319.93 | ||
482 | 10 | ||
483 | 6.8099 | ||
484 | data/projectiles/psi.txt | ||
485 | -33.4491 | ||
486 | 318.247 | ||
487 | 10 | ||
488 | 6.8079 | ||
489 | data/projectiles/psi.txt | ||
490 | -59.962 | ||
491 | 314.332 | ||
492 | 10 | ||
493 | 6.8059 | ||
494 | data/projectiles/psi.txt | ||
495 | -86.0543 | ||
496 | 308.212 | ||
497 | 10 | ||
498 | 6.8039 | ||
499 | data/projectiles/psi.txt | ||
500 | -111.543 | ||
501 | 299.93 | ||
502 | 10 | ||
503 | 6.8019 | ||
504 | data/projectiles/psi.txt | ||
505 | -136.249 | ||
506 | 289.545 | ||
507 | 10 | ||
508 | 6.7999 | ||
509 | data/projectiles/psi.txt | ||
510 | -160 | ||
511 | 277.128 | ||
512 | 10 | ||
513 | 6.7979 | ||
514 | data/projectiles/psi.txt | ||
515 | -182.628 | ||
516 | 262.768 | ||
517 | 10 | ||
518 | 6.7959 | ||
519 | data/projectiles/psi.txt | ||
520 | -203.976 | ||
521 | 246.564 | ||
522 | 10 | ||
523 | 6.7939 | ||
524 | data/projectiles/psi.txt | ||
525 | -223.892 | ||
526 | 228.631 | ||
527 | 10 | ||
528 | 6.7919 | ||
529 | data/projectiles/psi.txt | ||
530 | -242.238 | ||
531 | 209.095 | ||
532 | 10 | ||
533 | 6.7899 | ||
534 | data/projectiles/psi.txt | ||
535 | -258.885 | ||
536 | 188.091 | ||
537 | 10 | ||
538 | 6.7879 | ||
539 | data/projectiles/psi.txt | ||
540 | -273.717 | ||
541 | 165.769 | ||
542 | 10 | ||
543 | 6.7859 | ||
544 | data/projectiles/psi.txt | ||
545 | -286.628 | ||
546 | 142.283 | ||
547 | 10 | ||
548 | 6.7839 | ||
549 | data/projectiles/psi.txt | ||
550 | -297.528 | ||
551 | 117.8 | ||
552 | 10 | ||
553 | 6.7819 | ||
554 | data/projectiles/psi.txt | ||
555 | -306.342 | ||
556 | 92.4902 | ||
557 | 10 | ||
558 | 6.7799 | ||
559 | data/projectiles/psi.txt | ||
560 | -313.007 | ||
561 | 66.5317 | ||
562 | 10 | ||
563 | 6.7779 | ||
564 | data/projectiles/psi.txt | ||
565 | -317.477 | ||
566 | 40.1066 | ||
567 | 10 | ||
568 | 6.7759 | ||
569 | data/projectiles/psi.txt | ||
570 | -319.719 | ||
571 | 13.4002 | ||
572 | 10 | ||
573 | 6.7739 | ||
574 | data/projectiles/psi.txt | ||
575 | -319.719 | ||
576 | -13.4002 | ||
577 | 10 | ||
578 | 6.7719 | ||
579 | data/projectiles/psi.txt | ||
580 | -317.477 | ||
581 | -40.1066 | ||
582 | 10 | ||
583 | 6.7699 | ||
584 | data/projectiles/psi.txt | ||
585 | -313.007 | ||
586 | -66.5317 | ||
587 | 10 | ||
588 | 6.7679 | ||
589 | data/projectiles/psi.txt | ||
590 | -306.342 | ||
591 | -92.4902 | ||
592 | 10 | ||
593 | 6.7659 | ||
594 | data/projectiles/psi.txt | ||
595 | -297.528 | ||
596 | -117.8 | ||
597 | 10 | ||
598 | 6.7639 | ||
599 | data/projectiles/psi.txt | ||
600 | -286.628 | ||
601 | -142.283 | ||
602 | 10 | ||
603 | 6.7619 | ||
604 | data/projectiles/psi.txt | ||
605 | -273.717 | ||
606 | -165.769 | ||
607 | 10 | ||
608 | 6.7599 | ||
609 | data/projectiles/psi.txt | ||
610 | -258.885 | ||
611 | -188.091 | ||
612 | 10 | ||
613 | 6.7579 | ||
614 | data/projectiles/psi.txt | ||
615 | -242.238 | ||
616 | -209.095 | ||
617 | 10 | ||
618 | 6.7559 | ||
619 | data/projectiles/psi.txt | ||
620 | -223.892 | ||
621 | -228.631 | ||
622 | 10 | ||
623 | 6.7539 | ||
624 | data/projectiles/psi.txt | ||
625 | -203.976 | ||
626 | -246.564 | ||
627 | 10 | ||
628 | 6.7519 | ||
629 | data/projectiles/psi.txt | ||
630 | -182.628 | ||
631 | -262.768 | ||
632 | 10 | ||
633 | 6.7499 | ||
634 | data/projectiles/psi.txt | ||
635 | -160 | ||
636 | -277.128 | ||
637 | 10 | ||
638 | 6.7479 | ||
639 | data/projectiles/psi.txt | ||
640 | -136.249 | ||
641 | -289.545 | ||
642 | 10 | ||
643 | 6.7459 | ||
644 | data/projectiles/psi.txt | ||
645 | -111.543 | ||
646 | -299.93 | ||
647 | 10 | ||
648 | 6.7439 | ||
649 | data/projectiles/psi.txt | ||
650 | -86.0543 | ||
651 | -308.212 | ||
652 | 10 | ||
653 | 6.7419 | ||
654 | data/projectiles/psi.txt | ||
655 | -59.962 | ||
656 | -314.332 | ||
657 | 10 | ||
658 | 6.7399 | ||
659 | data/projectiles/psi.txt | ||
660 | -33.4491 | ||
661 | -318.247 | ||
662 | 10 | ||
663 | 6.7379 | ||
664 | data/projectiles/psi.txt | ||
665 | -6.70157 | ||
666 | -319.93 | ||
667 | 10 | ||
668 | 6.7359 | ||
669 | data/projectiles/psi.txt | ||
670 | 20.093 | ||
671 | -319.369 | ||
672 | 10 | ||
673 | 6.7339 | ||
674 | data/projectiles/psi.txt | ||
675 | 46.7466 | ||
676 | -316.567 | ||
677 | 10 | ||
678 | 6.7319 | ||
679 | data/projectiles/psi.txt | ||
680 | 73.0723 | ||
681 | -311.545 | ||
682 | 10 | ||
683 | 6.7299 | ||
684 | data/projectiles/psi.txt | ||
685 | 98.8854 | ||
686 | -304.338 | ||
687 | 10 | ||
688 | 6.7279 | ||
689 | data/projectiles/psi.txt | ||
690 | 124.005 | ||
691 | -294.996 | ||
692 | 10 | ||
693 | 6.7259 | ||
694 | data/projectiles/psi.txt | ||
695 | 148.255 | ||
696 | -283.585 | ||
697 | 10 | ||
698 | 6.7239 | ||
699 | data/projectiles/psi.txt | ||
700 | 171.465 | ||
701 | -270.185 | ||
702 | 10 | ||
703 | 6.7219 | ||
704 | data/projectiles/psi.txt | ||
705 | 193.472 | ||
706 | -254.89 | ||
707 | 10 | ||
708 | 6.7199 | ||
709 | data/projectiles/psi.txt | ||
710 | 214.122 | ||
711 | -237.806 | ||
712 | 10 | ||
713 | 6.7179 | ||
714 | data/projectiles/psi.txt | ||
715 | 233.27 | ||
716 | -219.055 | ||
717 | 10 | ||
718 | 6.7159 | ||
719 | data/projectiles/psi.txt | ||
720 | 250.782 | ||
721 | -198.767 | ||
722 | 10 | ||
723 | 6.7139 | ||
724 | data/projectiles/psi.txt | ||
725 | 266.535 | ||
726 | -177.085 | ||
727 | 10 | ||
728 | 6.7119 | ||
729 | data/projectiles/psi.txt | ||
730 | 280.418 | ||
731 | -154.161 | ||
732 | 10 | ||
733 | 6.7099 | ||
734 | data/projectiles/psi.txt | ||
735 | 292.335 | ||
736 | -130.156 | ||
737 | 10 | ||
738 | 6.7079 | ||
739 | data/projectiles/psi.txt | ||
740 | 302.2 | ||
741 | -105.237 | ||
742 | 10 | ||
743 | 6.7059 | ||
744 | data/projectiles/psi.txt | ||
745 | 309.947 | ||
746 | -79.5808 | ||
747 | 10 | ||
748 | 6.7039 | ||
749 | data/projectiles/psi.txt | ||
750 | 315.519 | ||
751 | -53.366 | ||
752 | 10 | ||
753 | 6.7019 | ||
754 | data/projectiles/psi.txt | ||
755 | 318.878 | ||
756 | -26.7769 | ||
757 | 10 | ||
758 | 6.6999 | ||
759 | data/projectiles/psi.txt | ||
760 | 320 | ||
761 | -1.56755e-13 | ||
762 | 10 | ||
763 | 6.6979 | ||
764 | data/projectiles/psi.txt | ||
765 | 318.878 | ||
766 | 26.7769 | ||
767 | 10 | ||
768 | 6.6959 | ||
769 | data/projectiles/psi.txt | ||
770 | 315.519 | ||
771 | 53.366 | ||
772 | 10 | ||
773 | 6.6939 | ||
774 | data/projectiles/psi.txt | ||
775 | 309.947 | ||
776 | 79.5808 | ||
777 | 10 | ||
778 | 6.6919 | ||
779 | data/projectiles/psi.txt | ||
780 | 302.2 | ||
781 | 105.237 | ||
782 | 10 | ||
783 | 6.6899 | ||
784 | data/projectiles/psi.txt | ||
785 | 292.335 | ||
786 | 130.156 | ||
787 | 10 | ||
788 | 6.6879 | ||
789 | data/projectiles/psi.txt | ||
790 | 280.418 | ||
791 | 154.161 | ||
792 | 10 | ||
793 | 6.6859 | ||
794 | data/projectiles/psi.txt | ||
795 | 266.535 | ||
796 | 177.085 | ||
797 | 10 | ||
798 | 6.6839 | ||
799 | data/projectiles/psi.txt | ||
800 | 250.782 | ||
801 | 198.767 | ||
802 | 10 | ||
803 | 6.6819 | ||
804 | data/projectiles/psi.txt | ||
805 | 233.27 | ||
806 | 219.055 | ||
807 | 10 | ||
808 | 6.6799 | ||
809 | data/projectiles/psi.txt | ||
810 | 214.122 | ||
811 | 237.806 | ||
812 | 10 | ||
813 | 6.6779 | ||
814 | data/projectiles/psi.txt | ||
815 | 193.472 | ||
816 | 254.89 | ||
817 | 10 | ||
818 | 6.6759 | ||
819 | data/projectiles/psi.txt | ||
820 | 171.465 | ||
821 | 270.185 | ||
822 | 10 | ||
823 | 6.6739 | ||
824 | data/projectiles/psi.txt | ||
825 | 148.255 | ||
826 | 283.585 | ||
827 | 10 | ||
828 | 6.6719 | ||
829 | data/projectiles/psi.txt | ||
830 | 124.005 | ||
831 | 294.996 | ||
832 | 10 | ||
833 | 6.6699 | ||
834 | data/projectiles/psi.txt | ||
835 | 98.8854 | ||
836 | 304.338 | ||
837 | 10 | ||
838 | 6.6679 | ||
839 | data/projectiles/psi.txt | ||
840 | 73.0723 | ||
841 | 311.545 | ||
842 | 10 | ||
843 | 6.6659 | ||
844 | data/projectiles/psi.txt | ||
845 | 46.7466 | ||
846 | 316.567 | ||
847 | 10 | ||
848 | 6.6639 | ||
849 | data/projectiles/psi.txt | ||
850 | 20.093 | ||
851 | 319.369 | ||
852 | 10 | ||
853 | 6.6619 | ||
854 | data/projectiles/psi.txt | ||
855 | -6.70157 | ||
856 | 319.93 | ||
857 | 10 | ||
858 | 6.6599 | ||
859 | data/projectiles/psi.txt | ||
860 | -33.4491 | ||
861 | 318.247 | ||
862 | 10 | ||
863 | 6.6579 | ||
864 | data/projectiles/psi.txt | ||
865 | -59.962 | ||
866 | 314.332 | ||
867 | 10 | ||
868 | 6.6559 | ||
869 | data/projectiles/psi.txt | ||
870 | -86.0543 | ||
871 | 308.212 | ||
872 | 10 | ||
873 | 6.6539 | ||
874 | data/projectiles/psi.txt | ||
875 | -111.543 | ||
876 | 299.93 | ||
877 | 10 | ||
878 | 6.6519 | ||
879 | data/projectiles/psi.txt | ||
880 | -136.249 | ||
881 | 289.545 | ||
882 | 10 | ||
883 | 6.6499 | ||
884 | data/projectiles/psi.txt | ||
885 | -160 | ||
886 | 277.128 | ||
887 | 10 | ||
888 | 6.6479 | ||
889 | data/projectiles/psi.txt | ||
890 | -182.628 | ||
891 | 262.768 | ||
892 | 10 | ||
893 | 6.6459 | ||
894 | data/projectiles/psi.txt | ||
895 | -203.976 | ||
896 | 246.564 | ||
897 | 10 | ||
898 | 6.6439 | ||
899 | data/projectiles/psi.txt | ||
900 | -223.892 | ||
901 | 228.631 | ||
902 | 10 | ||
903 | 6.6419 | ||
904 | data/projectiles/psi.txt | ||
905 | -242.238 | ||
906 | 209.095 | ||
907 | 10 | ||
908 | 6.6399 | ||
909 | data/projectiles/psi.txt | ||
910 | -258.885 | ||
911 | 188.091 | ||
912 | 10 | ||
913 | 6.6379 | ||
914 | data/projectiles/psi.txt | ||
915 | -273.717 | ||
916 | 165.769 | ||
917 | 10 | ||
918 | 6.6359 | ||
919 | data/projectiles/psi.txt | ||
920 | -286.628 | ||
921 | 142.283 | ||
922 | 10 | ||
923 | 6.6339 | ||
924 | data/projectiles/psi.txt | ||
925 | -297.528 | ||
926 | 117.8 | ||
927 | 10 | ||
928 | 6.6319 | ||
929 | data/projectiles/psi.txt | ||
930 | -306.342 | ||
931 | 92.4902 | ||
932 | 10 | ||
933 | 6.6299 | ||
934 | data/projectiles/psi.txt | ||
935 | -313.007 | ||
936 | 66.5317 | ||
937 | 10 | ||
938 | 6.6279 | ||
939 | data/projectiles/psi.txt | ||
940 | -317.477 | ||
941 | 40.1066 | ||
942 | 10 | ||
943 | 6.6259 | ||
944 | data/projectiles/psi.txt | ||
945 | -319.719 | ||
946 | 13.4002 | ||
947 | 10 | ||
948 | 6.6239 | ||
949 | data/projectiles/psi.txt | ||
950 | -319.719 | ||
951 | -13.4002 | ||
952 | 10 | ||
953 | 6.6219 | ||
954 | data/projectiles/psi.txt | ||
955 | -317.477 | ||
956 | -40.1066 | ||
957 | 10 | ||
958 | 6.6199 | ||
959 | data/projectiles/psi.txt | ||
960 | -313.007 | ||
961 | -66.5317 | ||
962 | 10 | ||
963 | 6.6179 | ||
964 | data/projectiles/psi.txt | ||
965 | -306.342 | ||
966 | -92.4902 | ||
967 | 10 | ||
968 | 6.6159 | ||
969 | data/projectiles/psi.txt | ||
970 | -297.528 | ||
971 | -117.8 | ||
972 | 10 | ||
973 | 6.6139 | ||
974 | data/projectiles/psi.txt | ||
975 | -286.628 | ||
976 | -142.283 | ||
977 | 10 | ||
978 | 6.6119 | ||
979 | data/projectiles/psi.txt | ||
980 | -273.717 | ||
981 | -165.769 | ||
982 | 10 | ||
983 | 6.6099 | ||
984 | data/projectiles/psi.txt | ||
985 | -258.885 | ||
986 | -188.091 | ||
987 | 10 | ||
988 | 6.6079 | ||
989 | data/projectiles/psi.txt | ||
990 | -242.238 | ||
991 | -209.095 | ||
992 | 10 | ||
993 | 6.6059 | ||
994 | data/projectiles/psi.txt | ||
995 | -223.892 | ||
996 | -228.631 | ||
997 | 10 | ||
998 | 6.6039 | ||
999 | data/projectiles/psi.txt | ||
1000 | -203.976 | ||
1001 | -246.564 | ||
1002 | 10 | ||
1003 | 6.6019 | ||
1004 | data/projectiles/psi.txt | ||
1005 | -182.628 | ||
1006 | -262.768 | ||
1007 | 10 | ||
1008 | 6.5999 | ||
1009 | data/projectiles/psi.txt | ||
1010 | -160 | ||
1011 | -277.128 | ||
1012 | 10 | ||
1013 | 6.5979 | ||
1014 | data/projectiles/psi.txt | ||
1015 | -136.249 | ||
1016 | -289.545 | ||
1017 | 10 | ||
1018 | 6.5959 | ||
1019 | data/projectiles/psi.txt | ||
1020 | -111.543 | ||
1021 | -299.93 | ||
1022 | 10 | ||
1023 | 6.5939 | ||
1024 | data/projectiles/psi.txt | ||
1025 | -86.0543 | ||
1026 | -308.212 | ||
1027 | 10 | ||
1028 | 6.5919 | ||
1029 | data/projectiles/psi.txt | ||
1030 | -59.962 | ||
1031 | -314.332 | ||
1032 | 10 | ||
1033 | 6.5899 | ||
1034 | data/projectiles/psi.txt | ||
1035 | -33.4491 | ||
1036 | -318.247 | ||
1037 | 10 | ||
1038 | 6.5879 | ||
1039 | data/projectiles/psi.txt | ||
1040 | -6.70157 | ||
1041 | -319.93 | ||
1042 | 10 | ||
1043 | 6.5859 | ||
1044 | data/projectiles/psi.txt | ||
1045 | 20.093 | ||
1046 | -319.369 | ||
1047 | 10 | ||
1048 | 6.5839 | ||
1049 | data/projectiles/psi.txt | ||
1050 | 46.7466 | ||
1051 | -316.567 | ||
1052 | 10 | ||
1053 | 6.5819 | ||
1054 | data/projectiles/psi.txt | ||
1055 | 73.0723 | ||
1056 | -311.545 | ||
1057 | 10 | ||
1058 | 6.5799 | ||
1059 | data/projectiles/psi.txt | ||
1060 | 98.8854 | ||
1061 | -304.338 | ||
1062 | 10 | ||
1063 | 6.5779 | ||
1064 | data/projectiles/psi.txt | ||
1065 | 124.005 | ||
1066 | -294.996 | ||
1067 | 10 | ||
1068 | 6.5759 | ||
1069 | data/projectiles/psi.txt | ||
1070 | 148.255 | ||
1071 | -283.585 | ||
1072 | 10 | ||
1073 | 6.5739 | ||
1074 | data/projectiles/psi.txt | ||
1075 | 171.465 | ||
1076 | -270.185 | ||
1077 | 10 | ||
1078 | 6.5719 | ||
1079 | data/projectiles/psi.txt | ||
1080 | 193.472 | ||
1081 | -254.89 | ||
1082 | 10 | ||
1083 | 6.5699 | ||
1084 | data/projectiles/psi.txt | ||
1085 | 214.122 | ||
1086 | -237.806 | ||
1087 | 10 | ||
1088 | 6.5679 | ||
1089 | data/projectiles/psi.txt | ||
1090 | 233.27 | ||
1091 | -219.055 | ||
1092 | 10 | ||
1093 | 6.5659 | ||
1094 | data/projectiles/psi.txt | ||
1095 | 250.782 | ||
1096 | -198.767 | ||
1097 | 10 | ||
1098 | 6.5639 | ||
1099 | data/projectiles/psi.txt | ||
1100 | 266.535 | ||
1101 | -177.085 | ||
1102 | 10 | ||
1103 | 6.5619 | ||
1104 | data/projectiles/psi.txt | ||
1105 | 280.418 | ||
1106 | -154.161 | ||
1107 | 10 | ||
1108 | 6.5599 | ||
1109 | data/projectiles/psi.txt | ||
1110 | 292.335 | ||
1111 | -130.156 | ||
1112 | 10 | ||
1113 | 6.5579 | ||
1114 | data/projectiles/psi.txt | ||
1115 | 302.2 | ||
1116 | -105.237 | ||
1117 | 10 | ||
1118 | 6.5559 | ||
1119 | data/projectiles/psi.txt | ||
1120 | 309.947 | ||
1121 | -79.5808 | ||
1122 | 10 | ||
1123 | 6.5539 | ||
1124 | data/projectiles/psi.txt | ||
1125 | 315.519 | ||
1126 | -53.366 | ||
1127 | 10 | ||
1128 | 6.5519 | ||
1129 | data/projectiles/psi.txt | ||
1130 | 318.878 | ||
1131 | -26.7769 | ||
1132 | 10 | ||
1133 | 6.5499 | ||
1134 | data/projectiles/psi.txt | ||
1135 | 320 | ||
1136 | -2.35132e-13 | ||
1137 | 10 | ||
1138 | 6.5479 | ||
1139 | data/projectiles/psi.txt | ||
1140 | 318.878 | ||
1141 | 26.7769 | ||
1142 | 10 | ||
1143 | 6.5459 | ||
1144 | data/projectiles/psi.txt | ||
1145 | 315.519 | ||
1146 | 53.366 | ||
1147 | 10 | ||
1148 | 6.5439 | ||
1149 | data/projectiles/psi.txt | ||
1150 | 309.947 | ||
1151 | 79.5808 | ||
1152 | 10 | ||
1153 | 6.5419 | ||
1154 | data/projectiles/psi.txt | ||
1155 | 302.2 | ||
1156 | 105.237 | ||
1157 | 10 | ||
1158 | 6.5399 | ||
1159 | data/projectiles/psi.txt | ||
1160 | 292.335 | ||
1161 | 130.156 | ||
1162 | 10 | ||
1163 | 6.5379 | ||
1164 | data/projectiles/psi.txt | ||
1165 | 280.418 | ||
1166 | 154.161 | ||
1167 | 10 | ||
1168 | 6.5359 | ||
1169 | data/projectiles/psi.txt | ||
1170 | 266.535 | ||
1171 | 177.085 | ||
1172 | 10 | ||
1173 | 6.5339 | ||
1174 | data/projectiles/psi.txt | ||
1175 | 250.782 | ||
1176 | 198.767 | ||
1177 | 10 | ||
1178 | 6.5319 | ||
1179 | data/projectiles/psi.txt | ||
1180 | 233.27 | ||
1181 | 219.055 | ||
1182 | 10 | ||
1183 | 6.5299 | ||
1184 | data/projectiles/psi.txt | ||
1185 | 214.122 | ||
1186 | 237.806 | ||
1187 | 10 | ||
1188 | 6.5279 | ||
1189 | data/projectiles/psi.txt | ||
1190 | 193.472 | ||
1191 | 254.89 | ||
1192 | 10 | ||
1193 | 6.5259 | ||
1194 | data/projectiles/psi.txt | ||
1195 | 171.465 | ||
1196 | 270.185 | ||
1197 | 10 | ||
1198 | 6.5239 | ||
1199 | data/projectiles/psi.txt | ||
1200 | 148.255 | ||
1201 | 283.585 | ||
1202 | 10 | ||
1203 | 6.5219 | ||
1204 | data/projectiles/psi.txt | ||
1205 | 124.005 | ||
1206 | 294.996 | ||
1207 | 10 | ||
1208 | 6.5199 | ||
1209 | data/projectiles/psi.txt | ||
1210 | 98.8854 | ||
1211 | 304.338 | ||
1212 | 10 | ||
1213 | 6.5179 | ||
1214 | data/projectiles/psi.txt | ||
1215 | 73.0723 | ||
1216 | 311.545 | ||
1217 | 10 | ||
1218 | 6.5159 | ||
1219 | data/projectiles/psi.txt | ||
1220 | 46.7466 | ||
1221 | 316.567 | ||
1222 | 10 | ||
1223 | 6.5139 | ||
1224 | data/projectiles/psi.txt | ||
1225 | 20.093 | ||
1226 | 319.369 | ||
1227 | 10 | ||
1228 | 6.5119 | ||
1229 | data/projectiles/psi.txt | ||
1230 | -6.70157 | ||
1231 | 319.93 | ||
1232 | 10 | ||
1233 | 6.5099 | ||
1234 | data/projectiles/psi.txt | ||
1235 | -33.4491 | ||
1236 | 318.247 | ||
1237 | 10 | ||
1238 | 6.5079 | ||
1239 | data/projectiles/psi.txt | ||
1240 | -59.962 | ||
1241 | 314.332 | ||
1242 | 10 | ||
1243 | 6.5059 | ||
1244 | data/projectiles/psi.txt | ||
1245 | -86.0543 | ||
1246 | 308.212 | ||
1247 | 10 | ||
1248 | 6.5039 | ||
1249 | data/projectiles/psi.txt | ||
1250 | -111.543 | ||
1251 | 299.93 | ||
1252 | 10 | ||
1253 | 6.5019 | ||
1254 | data/projectiles/psi.txt | ||
1255 | -136.249 | ||
1256 | 289.545 | ||
1257 | 10 | ||
1258 | 6.4999 | ||
1259 | data/projectiles/psi.txt | ||
1260 | -160 | ||
1261 | 277.128 | ||
1262 | 10 | ||
1263 | 6.4979 | ||
1264 | data/projectiles/psi.txt | ||
1265 | -182.628 | ||
1266 | 262.768 | ||
1267 | 10 | ||
1268 | 6.4959 | ||
1269 | data/projectiles/psi.txt | ||
1270 | -203.976 | ||
1271 | 246.564 | ||
1272 | 10 | ||
1273 | 6.4939 | ||
1274 | data/projectiles/psi.txt | ||
1275 | -223.892 | ||
1276 | 228.631 | ||
1277 | 10 | ||
1278 | 6.4919 | ||
1279 | data/projectiles/psi.txt | ||
1280 | -242.238 | ||
1281 | 209.095 | ||
1282 | 10 | ||
1283 | 6.4899 | ||
1284 | data/projectiles/psi.txt | ||
1285 | -258.885 | ||
1286 | 188.091 | ||
1287 | 10 | ||
1288 | 6.4879 | ||
1289 | data/projectiles/psi.txt | ||
1290 | -273.717 | ||
1291 | 165.769 | ||
1292 | 10 | ||
1293 | 6.4859 | ||
1294 | data/projectiles/psi.txt | ||
1295 | -286.628 | ||
1296 | 142.283 | ||
1297 | 10 | ||
1298 | 6.4839 | ||
1299 | data/projectiles/psi.txt | ||
1300 | -297.528 | ||
1301 | 117.8 | ||
1302 | 10 | ||
1303 | 6.4819 | ||
1304 | data/projectiles/psi.txt | ||
1305 | -306.342 | ||
1306 | 92.4902 | ||
1307 | 10 | ||
1308 | 6.4799 | ||
1309 | data/projectiles/psi.txt | ||
1310 | -313.007 | ||
1311 | 66.5317 | ||
1312 | 10 | ||
1313 | 6.4779 | ||
1314 | data/projectiles/psi.txt | ||
1315 | -317.477 | ||
1316 | 40.1066 | ||
1317 | 10 | ||
1318 | 6.4759 | ||
1319 | data/projectiles/psi.txt | ||
1320 | -319.719 | ||
1321 | 13.4002 | ||
1322 | 10 | ||
1323 | 6.4739 | ||
1324 | data/projectiles/psi.txt | ||
1325 | -319.719 | ||
1326 | -13.4002 | ||
1327 | 10 | ||
1328 | 6.4719 | ||
1329 | data/projectiles/psi.txt | ||
1330 | -317.477 | ||
1331 | -40.1066 | ||
1332 | 10 | ||
1333 | 6.4699 | ||
1334 | data/projectiles/psi.txt | ||
1335 | -313.007 | ||
1336 | -66.5317 | ||
1337 | 10 | ||
1338 | 6.4679 | ||
1339 | data/projectiles/psi.txt | ||
1340 | -306.342 | ||
1341 | -92.4902 | ||
1342 | 10 | ||
1343 | 6.4659 | ||
1344 | data/projectiles/psi.txt | ||
1345 | -297.528 | ||
1346 | -117.8 | ||
1347 | 10 | ||
1348 | 6.4639 | ||
1349 | data/projectiles/psi.txt | ||
1350 | -286.628 | ||
1351 | -142.283 | ||
1352 | 10 | ||
1353 | 6.4619 | ||
1354 | data/projectiles/psi.txt | ||
1355 | -273.717 | ||
1356 | -165.769 | ||
1357 | 10 | ||
1358 | 6.4599 | ||
1359 | data/projectiles/psi.txt | ||
1360 | -258.885 | ||
1361 | -188.091 | ||
1362 | 10 | ||
1363 | 6.4579 | ||
1364 | data/projectiles/psi.txt | ||
1365 | -242.238 | ||
1366 | -209.095 | ||
1367 | 10 | ||
1368 | 6.4559 | ||
1369 | data/projectiles/psi.txt | ||
1370 | -223.892 | ||
1371 | -228.631 | ||
1372 | 10 | ||
1373 | 6.4539 | ||
1374 | data/projectiles/psi.txt | ||
1375 | -203.976 | ||
1376 | -246.564 | ||
1377 | 10 | ||
1378 | 6.4519 | ||
1379 | data/projectiles/psi.txt | ||
1380 | -182.628 | ||
1381 | -262.768 | ||
1382 | 10 | ||
1383 | 6.4499 | ||
1384 | data/projectiles/psi.txt | ||
1385 | -160 | ||
1386 | -277.128 | ||
1387 | 10 | ||
1388 | 6.4479 | ||
1389 | data/projectiles/psi.txt | ||
1390 | -136.249 | ||
1391 | -289.545 | ||
1392 | 10 | ||
1393 | 6.4459 | ||
1394 | data/projectiles/psi.txt | ||
1395 | -111.543 | ||
1396 | -299.93 | ||
1397 | 10 | ||
1398 | 6.4439 | ||
1399 | data/projectiles/psi.txt | ||
1400 | -86.0543 | ||
1401 | -308.212 | ||
1402 | 10 | ||
1403 | 6.4419 | ||
1404 | data/projectiles/psi.txt | ||
1405 | -59.962 | ||
1406 | -314.332 | ||
1407 | 10 | ||
1408 | 6.4399 | ||
1409 | data/projectiles/psi.txt | ||
1410 | -33.4491 | ||
1411 | -318.247 | ||
1412 | 10 | ||
1413 | 6.4379 | ||
1414 | data/projectiles/psi.txt | ||
1415 | -6.70157 | ||
1416 | -319.93 | ||
1417 | 10 | ||
1418 | 6.4359 | ||
1419 | data/projectiles/psi.txt | ||
1420 | 20.093 | ||
1421 | -319.369 | ||
1422 | 10 | ||
1423 | 6.4339 | ||
1424 | data/projectiles/psi.txt | ||
1425 | 46.7466 | ||
1426 | -316.567 | ||
1427 | 10 | ||
1428 | 6.4319 | ||
1429 | data/projectiles/psi.txt | ||
1430 | 73.0723 | ||
1431 | -311.545 | ||
1432 | 10 | ||
1433 | 6.4299 | ||
1434 | data/projectiles/psi.txt | ||
1435 | 98.8854 | ||
1436 | -304.338 | ||
1437 | 10 | ||
1438 | 6.4279 | ||
1439 | data/projectiles/psi.txt | ||
1440 | 124.005 | ||
1441 | -294.996 | ||
1442 | 10 | ||
1443 | 6.4259 | ||
1444 | data/projectiles/psi.txt | ||
1445 | 148.255 | ||
1446 | -283.585 | ||
1447 | 10 | ||
1448 | 6.4239 | ||
1449 | data/projectiles/psi.txt | ||
1450 | 171.465 | ||
1451 | -270.185 | ||
1452 | 10 | ||
1453 | 6.4219 | ||
1454 | data/projectiles/psi.txt | ||
1455 | 193.472 | ||
1456 | -254.89 | ||
1457 | 10 | ||
1458 | 6.4199 | ||
1459 | data/projectiles/psi.txt | ||
1460 | 214.122 | ||
1461 | -237.806 | ||
1462 | 10 | ||
1463 | 6.4179 | ||
1464 | data/projectiles/psi.txt | ||
1465 | 233.27 | ||
1466 | -219.055 | ||
1467 | 10 | ||
1468 | 6.4159 | ||
1469 | data/projectiles/psi.txt | ||
1470 | 250.782 | ||
1471 | -198.767 | ||
1472 | 10 | ||
1473 | 6.4139 | ||
1474 | data/projectiles/psi.txt | ||
1475 | 266.535 | ||
1476 | -177.085 | ||
1477 | 10 | ||
1478 | 6.4119 | ||
1479 | data/projectiles/psi.txt | ||
1480 | 280.418 | ||
1481 | -154.161 | ||
1482 | 10 | ||
1483 | 6.4099 | ||
1484 | data/projectiles/psi.txt | ||
1485 | 292.335 | ||
1486 | -130.156 | ||
1487 | 10 | ||
1488 | 6.4079 | ||
1489 | data/projectiles/psi.txt | ||
1490 | 302.2 | ||
1491 | -105.237 | ||
1492 | 10 | ||
1493 | 6.4059 | ||
1494 | data/projectiles/psi.txt | ||
1495 | 309.947 | ||
1496 | -79.5808 | ||
1497 | 10 | ||
1498 | 6.4039 | ||
1499 | data/projectiles/psi.txt | ||
1500 | 315.519 | ||
1501 | -53.366 | ||
1502 | 10 | ||
1503 | 6.4019 | ||
1504 | data/projectiles/psi.txt | ||
1505 | 318.878 | ||
1506 | -26.7769 | ||
diff --git a/data/weapons/nova1.txt~ b/data/weapons/nova1.txt~ new file mode 100644 index 0000000..66fe28d --- /dev/null +++ b/data/weapons/nova1.txt~ | |||
@@ -0,0 +1,1506 @@ | |||
1 | Nova 1 | ||
2 | data/images/empty.bmp | ||
3 | 25 | ||
4 | 0 | ||
5 | 5000 | ||
6 | 300 | ||
7 | 10 | ||
8 | 6.9999 | ||
9 | data/projectiles/psi.txt | ||
10 | 320 | ||
11 | 0 | ||
12 | 10 | ||
13 | 6.9979 | ||
14 | data/projectiles/psi.txt | ||
15 | 318.878 | ||
16 | 26.7769 | ||
17 | 10 | ||
18 | 6.9959 | ||
19 | data/projectiles/psi.txt | ||
20 | 315.519 | ||
21 | 53.366 | ||
22 | 10 | ||
23 | 6.9939 | ||
24 | data/projectiles/psi.txt | ||
25 | 309.947 | ||
26 | 79.5808 | ||
27 | 10 | ||
28 | 6.9919 | ||
29 | data/projectiles/psi.txt | ||
30 | 302.2 | ||
31 | 105.237 | ||
32 | 10 | ||
33 | 6.9899 | ||
34 | data/projectiles/psi.txt | ||
35 | 292.335 | ||
36 | 130.156 | ||
37 | 10 | ||
38 | 6.9879 | ||
39 | data/projectiles/psi.txt | ||
40 | 280.418 | ||
41 | 154.161 | ||
42 | 10 | ||
43 | 6.9859 | ||
44 | data/projectiles/psi.txt | ||
45 | 266.535 | ||
46 | 177.085 | ||
47 | 10 | ||
48 | 6.9839 | ||
49 | data/projectiles/psi.txt | ||
50 | 250.782 | ||
51 | 198.767 | ||
52 | 10 | ||
53 | 6.9819 | ||
54 | data/projectiles/psi.txt | ||
55 | 233.27 | ||
56 | 219.055 | ||
57 | 10 | ||
58 | 6.9799 | ||
59 | data/projectiles/psi.txt | ||
60 | 214.122 | ||
61 | 237.806 | ||
62 | 10 | ||
63 | 6.9779 | ||
64 | data/projectiles/psi.txt | ||
65 | 193.472 | ||
66 | 254.89 | ||
67 | 10 | ||
68 | 6.9759 | ||
69 | data/projectiles/psi.txt | ||
70 | 171.465 | ||
71 | 270.185 | ||
72 | 10 | ||
73 | 6.9739 | ||
74 | data/projectiles/psi.txt | ||
75 | 148.255 | ||
76 | 283.585 | ||
77 | 10 | ||
78 | 6.9719 | ||
79 | data/projectiles/psi.txt | ||
80 | 124.005 | ||
81 | 294.996 | ||
82 | 10 | ||
83 | 6.9699 | ||
84 | data/projectiles/psi.txt | ||
85 | 98.8854 | ||
86 | 304.338 | ||
87 | 10 | ||
88 | 6.9679 | ||
89 | data/projectiles/psi.txt | ||
90 | 73.0723 | ||
91 | 311.545 | ||
92 | 10 | ||
93 | 6.9659 | ||
94 | data/projectiles/psi.txt | ||
95 | 46.7466 | ||
96 | 316.567 | ||
97 | 10 | ||
98 | 6.9639 | ||
99 | data/projectiles/psi.txt | ||
100 | 20.093 | ||
101 | 319.369 | ||
102 | 10 | ||
103 | 6.9619 | ||
104 | data/projectiles/psi.txt | ||
105 | -6.70157 | ||
106 | 319.93 | ||
107 | 10 | ||
108 | 6.9599 | ||
109 | data/projectiles/psi.txt | ||
110 | -33.4491 | ||
111 | 318.247 | ||
112 | 10 | ||
113 | 6.9579 | ||
114 | data/projectiles/psi.txt | ||
115 | -59.962 | ||
116 | 314.332 | ||
117 | 10 | ||
118 | 6.9559 | ||
119 | data/projectiles/psi.txt | ||
120 | -86.0543 | ||
121 | 308.212 | ||
122 | 10 | ||
123 | 6.9539 | ||
124 | data/projectiles/psi.txt | ||
125 | -111.543 | ||
126 | 299.93 | ||
127 | 10 | ||
128 | 6.9519 | ||
129 | data/projectiles/psi.txt | ||
130 | -136.249 | ||
131 | 289.545 | ||
132 | 10 | ||
133 | 6.9499 | ||
134 | data/projectiles/psi.txt | ||
135 | -160 | ||
136 | 277.128 | ||
137 | 10 | ||
138 | 6.9479 | ||
139 | data/projectiles/psi.txt | ||
140 | -182.628 | ||
141 | 262.768 | ||
142 | 10 | ||
143 | 6.9459 | ||
144 | data/projectiles/psi.txt | ||
145 | -203.976 | ||
146 | 246.564 | ||
147 | 10 | ||
148 | 6.9439 | ||
149 | data/projectiles/psi.txt | ||
150 | -223.892 | ||
151 | 228.631 | ||
152 | 10 | ||
153 | 6.9419 | ||
154 | data/projectiles/psi.txt | ||
155 | -242.238 | ||
156 | 209.095 | ||
157 | 10 | ||
158 | 6.9399 | ||
159 | data/projectiles/psi.txt | ||
160 | -258.885 | ||
161 | 188.091 | ||
162 | 10 | ||
163 | 6.9379 | ||
164 | data/projectiles/psi.txt | ||
165 | -273.717 | ||
166 | 165.769 | ||
167 | 10 | ||
168 | 6.9359 | ||
169 | data/projectiles/psi.txt | ||
170 | -286.628 | ||
171 | 142.283 | ||
172 | 10 | ||
173 | 6.9339 | ||
174 | data/projectiles/psi.txt | ||
175 | -297.528 | ||
176 | 117.8 | ||
177 | 10 | ||
178 | 6.9319 | ||
179 | data/projectiles/psi.txt | ||
180 | -306.342 | ||
181 | 92.4902 | ||
182 | 10 | ||
183 | 6.9299 | ||
184 | data/projectiles/psi.txt | ||
185 | -313.007 | ||
186 | 66.5317 | ||
187 | 10 | ||
188 | 6.9279 | ||
189 | data/projectiles/psi.txt | ||
190 | -317.477 | ||
191 | 40.1066 | ||
192 | 10 | ||
193 | 6.9259 | ||
194 | data/projectiles/psi.txt | ||
195 | -319.719 | ||
196 | 13.4002 | ||
197 | 10 | ||
198 | 6.9239 | ||
199 | data/projectiles/psi.txt | ||
200 | -319.719 | ||
201 | -13.4002 | ||
202 | 10 | ||
203 | 6.9219 | ||
204 | data/projectiles/psi.txt | ||
205 | -317.477 | ||
206 | -40.1066 | ||
207 | 10 | ||
208 | 6.9199 | ||
209 | data/projectiles/psi.txt | ||
210 | -313.007 | ||
211 | -66.5317 | ||
212 | 10 | ||
213 | 6.9179 | ||
214 | data/projectiles/psi.txt | ||
215 | -306.342 | ||
216 | -92.4902 | ||
217 | 10 | ||
218 | 6.9159 | ||
219 | data/projectiles/psi.txt | ||
220 | -297.528 | ||
221 | -117.8 | ||
222 | 10 | ||
223 | 6.9139 | ||
224 | data/projectiles/psi.txt | ||
225 | -286.628 | ||
226 | -142.283 | ||
227 | 10 | ||
228 | 6.9119 | ||
229 | data/projectiles/psi.txt | ||
230 | -273.717 | ||
231 | -165.769 | ||
232 | 10 | ||
233 | 6.9099 | ||
234 | data/projectiles/psi.txt | ||
235 | -258.885 | ||
236 | -188.091 | ||
237 | 10 | ||
238 | 6.9079 | ||
239 | data/projectiles/psi.txt | ||
240 | -242.238 | ||
241 | -209.095 | ||
242 | 10 | ||
243 | 6.9059 | ||
244 | data/projectiles/psi.txt | ||
245 | -223.892 | ||
246 | -228.631 | ||
247 | 10 | ||
248 | 6.9039 | ||
249 | data/projectiles/psi.txt | ||
250 | -203.976 | ||
251 | -246.564 | ||
252 | 10 | ||
253 | 6.9019 | ||
254 | data/projectiles/psi.txt | ||
255 | -182.628 | ||
256 | -262.768 | ||
257 | 10 | ||
258 | 6.8999 | ||
259 | data/projectiles/psi.txt | ||
260 | -160 | ||
261 | -277.128 | ||
262 | 10 | ||
263 | 6.8979 | ||
264 | data/projectiles/psi.txt | ||
265 | -136.249 | ||
266 | -289.545 | ||
267 | 10 | ||
268 | 6.8959 | ||
269 | data/projectiles/psi.txt | ||
270 | -111.543 | ||
271 | -299.93 | ||
272 | 10 | ||
273 | 6.8939 | ||
274 | data/projectiles/psi.txt | ||
275 | -86.0543 | ||
276 | -308.212 | ||
277 | 10 | ||
278 | 6.8919 | ||
279 | data/projectiles/psi.txt | ||
280 | -59.962 | ||
281 | -314.332 | ||
282 | 10 | ||
283 | 6.8899 | ||
284 | data/projectiles/psi.txt | ||
285 | -33.4491 | ||
286 | -318.247 | ||
287 | 10 | ||
288 | 6.8879 | ||
289 | data/projectiles/psi.txt | ||
290 | -6.70157 | ||
291 | -319.93 | ||
292 | 10 | ||
293 | 6.8859 | ||
294 | data/projectiles/psi.txt | ||
295 | 20.093 | ||
296 | -319.369 | ||
297 | 10 | ||
298 | 6.8839 | ||
299 | data/projectiles/psi.txt | ||
300 | 46.7466 | ||
301 | -316.567 | ||
302 | 10 | ||
303 | 6.8819 | ||
304 | data/projectiles/psi.txt | ||
305 | 73.0723 | ||
306 | -311.545 | ||
307 | 10 | ||
308 | 6.8799 | ||
309 | data/projectiles/psi.txt | ||
310 | 98.8854 | ||
311 | -304.338 | ||
312 | 10 | ||
313 | 6.8779 | ||
314 | data/projectiles/psi.txt | ||
315 | 124.005 | ||
316 | -294.996 | ||
317 | 10 | ||
318 | 6.8759 | ||
319 | data/projectiles/psi.txt | ||
320 | 148.255 | ||
321 | -283.585 | ||
322 | 10 | ||
323 | 6.8739 | ||
324 | data/projectiles/psi.txt | ||
325 | 171.465 | ||
326 | -270.185 | ||
327 | 10 | ||
328 | 6.8719 | ||
329 | data/projectiles/psi.txt | ||
330 | 193.472 | ||
331 | -254.89 | ||
332 | 10 | ||
333 | 6.8699 | ||
334 | data/projectiles/psi.txt | ||
335 | 214.122 | ||
336 | -237.806 | ||
337 | 10 | ||
338 | 6.8679 | ||
339 | data/projectiles/psi.txt | ||
340 | 233.27 | ||
341 | -219.055 | ||
342 | 10 | ||
343 | 6.8659 | ||
344 | data/projectiles/psi.txt | ||
345 | 250.782 | ||
346 | -198.767 | ||
347 | 10 | ||
348 | 6.8639 | ||
349 | data/projectiles/psi.txt | ||
350 | 266.535 | ||
351 | -177.085 | ||
352 | 10 | ||
353 | 6.8619 | ||
354 | data/projectiles/psi.txt | ||
355 | 280.418 | ||
356 | -154.161 | ||
357 | 10 | ||
358 | 6.8599 | ||
359 | data/projectiles/psi.txt | ||
360 | 292.335 | ||
361 | -130.156 | ||
362 | 10 | ||
363 | 6.8579 | ||
364 | data/projectiles/psi.txt | ||
365 | 302.2 | ||
366 | -105.237 | ||
367 | 10 | ||
368 | 6.8559 | ||
369 | data/projectiles/psi.txt | ||
370 | 309.947 | ||
371 | -79.5808 | ||
372 | 10 | ||
373 | 6.8539 | ||
374 | data/projectiles/psi.txt | ||
375 | 315.519 | ||
376 | -53.366 | ||
377 | 10 | ||
378 | 6.8519 | ||
379 | data/projectiles/psi.txt | ||
380 | 318.878 | ||
381 | -26.7769 | ||
382 | 10 | ||
383 | 6.8499 | ||
384 | data/projectiles/psi.txt | ||
385 | 320 | ||
386 | -7.83774e-14 | ||
387 | 10 | ||
388 | 6.8479 | ||
389 | data/projectiles/psi.txt | ||
390 | 318.878 | ||
391 | 26.7769 | ||
392 | 10 | ||
393 | 6.8459 | ||
394 | data/projectiles/psi.txt | ||
395 | 315.519 | ||
396 | 53.366 | ||
397 | 10 | ||
398 | 6.8439 | ||
399 | data/projectiles/psi.txt | ||
400 | 309.947 | ||
401 | 79.5808 | ||
402 | 10 | ||
403 | 6.8419 | ||
404 | data/projectiles/psi.txt | ||
405 | 302.2 | ||
406 | 105.237 | ||
407 | 10 | ||
408 | 6.8399 | ||
409 | data/projectiles/psi.txt | ||
410 | 292.335 | ||
411 | 130.156 | ||
412 | 10 | ||
413 | 6.8379 | ||
414 | data/projectiles/psi.txt | ||
415 | 280.418 | ||
416 | 154.161 | ||
417 | 10 | ||
418 | 6.8359 | ||
419 | data/projectiles/psi.txt | ||
420 | 266.535 | ||
421 | 177.085 | ||
422 | 10 | ||
423 | 6.8339 | ||
424 | data/projectiles/psi.txt | ||
425 | 250.782 | ||
426 | 198.767 | ||
427 | 10 | ||
428 | 6.8319 | ||
429 | data/projectiles/psi.txt | ||
430 | 233.27 | ||
431 | 219.055 | ||
432 | 10 | ||
433 | 6.8299 | ||
434 | data/projectiles/psi.txt | ||
435 | 214.122 | ||
436 | 237.806 | ||
437 | 10 | ||
438 | 6.8279 | ||
439 | data/projectiles/psi.txt | ||
440 | 193.472 | ||
441 | 254.89 | ||
442 | 10 | ||
443 | 6.8259 | ||
444 | data/projectiles/psi.txt | ||
445 | 171.465 | ||
446 | 270.185 | ||
447 | 10 | ||
448 | 6.8239 | ||
449 | data/projectiles/psi.txt | ||
450 | 148.255 | ||
451 | 283.585 | ||
452 | 10 | ||
453 | 6.8219 | ||
454 | data/projectiles/psi.txt | ||
455 | 124.005 | ||
456 | 294.996 | ||
457 | 10 | ||
458 | 6.8199 | ||
459 | data/projectiles/psi.txt | ||
460 | 98.8854 | ||
461 | 304.338 | ||
462 | 10 | ||
463 | 6.8179 | ||
464 | data/projectiles/psi.txt | ||
465 | 73.0723 | ||
466 | 311.545 | ||
467 | 10 | ||
468 | 6.8159 | ||
469 | data/projectiles/psi.txt | ||
470 | 46.7466 | ||
471 | 316.567 | ||
472 | 10 | ||
473 | 6.8139 | ||
474 | data/projectiles/psi.txt | ||
475 | 20.093 | ||
476 | 319.369 | ||
477 | 10 | ||
478 | 6.8119 | ||
479 | data/projectiles/psi.txt | ||
480 | -6.70157 | ||
481 | 319.93 | ||
482 | 10 | ||
483 | 6.8099 | ||
484 | data/projectiles/psi.txt | ||
485 | -33.4491 | ||
486 | 318.247 | ||
487 | 10 | ||
488 | 6.8079 | ||
489 | data/projectiles/psi.txt | ||
490 | -59.962 | ||
491 | 314.332 | ||
492 | 10 | ||
493 | 6.8059 | ||
494 | data/projectiles/psi.txt | ||
495 | -86.0543 | ||
496 | 308.212 | ||
497 | 10 | ||
498 | 6.8039 | ||
499 | data/projectiles/psi.txt | ||
500 | -111.543 | ||
501 | 299.93 | ||
502 | 10 | ||
503 | 6.8019 | ||
504 | data/projectiles/psi.txt | ||
505 | -136.249 | ||
506 | 289.545 | ||
507 | 10 | ||
508 | 6.7999 | ||
509 | data/projectiles/psi.txt | ||
510 | -160 | ||
511 | 277.128 | ||
512 | 10 | ||
513 | 6.7979 | ||
514 | data/projectiles/psi.txt | ||
515 | -182.628 | ||
516 | 262.768 | ||
517 | 10 | ||
518 | 6.7959 | ||
519 | data/projectiles/psi.txt | ||
520 | -203.976 | ||
521 | 246.564 | ||
522 | 10 | ||
523 | 6.7939 | ||
524 | data/projectiles/psi.txt | ||
525 | -223.892 | ||
526 | 228.631 | ||
527 | 10 | ||
528 | 6.7919 | ||
529 | data/projectiles/psi.txt | ||
530 | -242.238 | ||
531 | 209.095 | ||
532 | 10 | ||
533 | 6.7899 | ||
534 | data/projectiles/psi.txt | ||
535 | -258.885 | ||
536 | 188.091 | ||
537 | 10 | ||
538 | 6.7879 | ||
539 | data/projectiles/psi.txt | ||
540 | -273.717 | ||
541 | 165.769 | ||
542 | 10 | ||
543 | 6.7859 | ||
544 | data/projectiles/psi.txt | ||
545 | -286.628 | ||
546 | 142.283 | ||
547 | 10 | ||
548 | 6.7839 | ||
549 | data/projectiles/psi.txt | ||
550 | -297.528 | ||
551 | 117.8 | ||
552 | 10 | ||
553 | 6.7819 | ||
554 | data/projectiles/psi.txt | ||
555 | -306.342 | ||
556 | 92.4902 | ||
557 | 10 | ||
558 | 6.7799 | ||
559 | data/projectiles/psi.txt | ||
560 | -313.007 | ||
561 | 66.5317 | ||
562 | 10 | ||
563 | 6.7779 | ||
564 | data/projectiles/psi.txt | ||
565 | -317.477 | ||
566 | 40.1066 | ||
567 | 10 | ||
568 | 6.7759 | ||
569 | data/projectiles/psi.txt | ||
570 | -319.719 | ||
571 | 13.4002 | ||
572 | 10 | ||
573 | 6.7739 | ||
574 | data/projectiles/psi.txt | ||
575 | -319.719 | ||
576 | -13.4002 | ||
577 | 10 | ||
578 | 6.7719 | ||
579 | data/projectiles/psi.txt | ||
580 | -317.477 | ||
581 | -40.1066 | ||
582 | 10 | ||
583 | 6.7699 | ||
584 | data/projectiles/psi.txt | ||
585 | -313.007 | ||
586 | -66.5317 | ||
587 | 10 | ||
588 | 6.7679 | ||
589 | data/projectiles/psi.txt | ||
590 | -306.342 | ||
591 | -92.4902 | ||
592 | 10 | ||
593 | 6.7659 | ||
594 | data/projectiles/psi.txt | ||
595 | -297.528 | ||
596 | -117.8 | ||
597 | 10 | ||
598 | 6.7639 | ||
599 | data/projectiles/psi.txt | ||
600 | -286.628 | ||
601 | -142.283 | ||
602 | 10 | ||
603 | 6.7619 | ||
604 | data/projectiles/psi.txt | ||
605 | -273.717 | ||
606 | -165.769 | ||
607 | 10 | ||
608 | 6.7599 | ||
609 | data/projectiles/psi.txt | ||
610 | -258.885 | ||
611 | -188.091 | ||
612 | 10 | ||
613 | 6.7579 | ||
614 | data/projectiles/psi.txt | ||
615 | -242.238 | ||
616 | -209.095 | ||
617 | 10 | ||
618 | 6.7559 | ||
619 | data/projectiles/psi.txt | ||
620 | -223.892 | ||
621 | -228.631 | ||
622 | 10 | ||
623 | 6.7539 | ||
624 | data/projectiles/psi.txt | ||
625 | -203.976 | ||
626 | -246.564 | ||
627 | 10 | ||
628 | 6.7519 | ||
629 | data/projectiles/psi.txt | ||
630 | -182.628 | ||
631 | -262.768 | ||
632 | 10 | ||
633 | 6.7499 | ||
634 | data/projectiles/psi.txt | ||
635 | -160 | ||
636 | -277.128 | ||
637 | 10 | ||
638 | 6.7479 | ||
639 | data/projectiles/psi.txt | ||
640 | -136.249 | ||
641 | -289.545 | ||
642 | 10 | ||
643 | 6.7459 | ||
644 | data/projectiles/psi.txt | ||
645 | -111.543 | ||
646 | -299.93 | ||
647 | 10 | ||
648 | 6.7439 | ||
649 | data/projectiles/psi.txt | ||
650 | -86.0543 | ||
651 | -308.212 | ||
652 | 10 | ||
653 | 6.7419 | ||
654 | data/projectiles/psi.txt | ||
655 | -59.962 | ||
656 | -314.332 | ||
657 | 10 | ||
658 | 6.7399 | ||
659 | data/projectiles/psi.txt | ||
660 | -33.4491 | ||
661 | -318.247 | ||
662 | 10 | ||
663 | 6.7379 | ||
664 | data/projectiles/psi.txt | ||
665 | -6.70157 | ||
666 | -319.93 | ||
667 | 10 | ||
668 | 6.7359 | ||
669 | data/projectiles/psi.txt | ||
670 | 20.093 | ||
671 | -319.369 | ||
672 | 10 | ||
673 | 6.7339 | ||
674 | data/projectiles/psi.txt | ||
675 | 46.7466 | ||
676 | -316.567 | ||
677 | 10 | ||
678 | 6.7319 | ||
679 | data/projectiles/psi.txt | ||
680 | 73.0723 | ||
681 | -311.545 | ||
682 | 10 | ||
683 | 6.7299 | ||
684 | data/projectiles/psi.txt | ||
685 | 98.8854 | ||
686 | -304.338 | ||
687 | 10 | ||
688 | 6.7279 | ||
689 | data/projectiles/psi.txt | ||
690 | 124.005 | ||
691 | -294.996 | ||
692 | 10 | ||
693 | 6.7259 | ||
694 | data/projectiles/psi.txt | ||
695 | 148.255 | ||
696 | -283.585 | ||
697 | 10 | ||
698 | 6.7239 | ||
699 | data/projectiles/psi.txt | ||
700 | 171.465 | ||
701 | -270.185 | ||
702 | 10 | ||
703 | 6.7219 | ||
704 | data/projectiles/psi.txt | ||
705 | 193.472 | ||
706 | -254.89 | ||
707 | 10 | ||
708 | 6.7199 | ||
709 | data/projectiles/psi.txt | ||
710 | 214.122 | ||
711 | -237.806 | ||
712 | 10 | ||
713 | 6.7179 | ||
714 | data/projectiles/psi.txt | ||
715 | 233.27 | ||
716 | -219.055 | ||
717 | 10 | ||
718 | 6.7159 | ||
719 | data/projectiles/psi.txt | ||
720 | 250.782 | ||
721 | -198.767 | ||
722 | 10 | ||
723 | 6.7139 | ||
724 | data/projectiles/psi.txt | ||
725 | 266.535 | ||
726 | -177.085 | ||
727 | 10 | ||
728 | 6.7119 | ||
729 | data/projectiles/psi.txt | ||
730 | 280.418 | ||
731 | -154.161 | ||
732 | 10 | ||
733 | 6.7099 | ||
734 | data/projectiles/psi.txt | ||
735 | 292.335 | ||
736 | -130.156 | ||
737 | 10 | ||
738 | 6.7079 | ||
739 | data/projectiles/psi.txt | ||
740 | 302.2 | ||
741 | -105.237 | ||
742 | 10 | ||
743 | 6.7059 | ||
744 | data/projectiles/psi.txt | ||
745 | 309.947 | ||
746 | -79.5808 | ||
747 | 10 | ||
748 | 6.7039 | ||
749 | data/projectiles/psi.txt | ||
750 | 315.519 | ||
751 | -53.366 | ||
752 | 10 | ||
753 | 6.7019 | ||
754 | data/projectiles/psi.txt | ||
755 | 318.878 | ||
756 | -26.7769 | ||
757 | 10 | ||
758 | 6.6999 | ||
759 | data/projectiles/psi.txt | ||
760 | 320 | ||
761 | -1.56755e-13 | ||
762 | 10 | ||
763 | 6.6979 | ||
764 | data/projectiles/psi.txt | ||
765 | 318.878 | ||
766 | 26.7769 | ||
767 | 10 | ||
768 | 6.6959 | ||
769 | data/projectiles/psi.txt | ||
770 | 315.519 | ||
771 | 53.366 | ||
772 | 10 | ||
773 | 6.6939 | ||
774 | data/projectiles/psi.txt | ||
775 | 309.947 | ||
776 | 79.5808 | ||
777 | 10 | ||
778 | 6.6919 | ||
779 | data/projectiles/psi.txt | ||
780 | 302.2 | ||
781 | 105.237 | ||
782 | 10 | ||
783 | 6.6899 | ||
784 | data/projectiles/psi.txt | ||
785 | 292.335 | ||
786 | 130.156 | ||
787 | 10 | ||
788 | 6.6879 | ||
789 | data/projectiles/psi.txt | ||
790 | 280.418 | ||
791 | 154.161 | ||
792 | 10 | ||
793 | 6.6859 | ||
794 | data/projectiles/psi.txt | ||
795 | 266.535 | ||
796 | 177.085 | ||
797 | 10 | ||
798 | 6.6839 | ||
799 | data/projectiles/psi.txt | ||
800 | 250.782 | ||
801 | 198.767 | ||
802 | 10 | ||
803 | 6.6819 | ||
804 | data/projectiles/psi.txt | ||
805 | 233.27 | ||
806 | 219.055 | ||
807 | 10 | ||
808 | 6.6799 | ||
809 | data/projectiles/psi.txt | ||
810 | 214.122 | ||
811 | 237.806 | ||
812 | 10 | ||
813 | 6.6779 | ||
814 | data/projectiles/psi.txt | ||
815 | 193.472 | ||
816 | 254.89 | ||
817 | 10 | ||
818 | 6.6759 | ||
819 | data/projectiles/psi.txt | ||
820 | 171.465 | ||
821 | 270.185 | ||
822 | 10 | ||
823 | 6.6739 | ||
824 | data/projectiles/psi.txt | ||
825 | 148.255 | ||
826 | 283.585 | ||
827 | 10 | ||
828 | 6.6719 | ||
829 | data/projectiles/psi.txt | ||
830 | 124.005 | ||
831 | 294.996 | ||
832 | 10 | ||
833 | 6.6699 | ||
834 | data/projectiles/psi.txt | ||
835 | 98.8854 | ||
836 | 304.338 | ||
837 | 10 | ||
838 | 6.6679 | ||
839 | data/projectiles/psi.txt | ||
840 | 73.0723 | ||
841 | 311.545 | ||
842 | 10 | ||
843 | 6.6659 | ||
844 | data/projectiles/psi.txt | ||
845 | 46.7466 | ||
846 | 316.567 | ||
847 | 10 | ||
848 | 6.6639 | ||
849 | data/projectiles/psi.txt | ||
850 | 20.093 | ||
851 | 319.369 | ||
852 | 10 | ||
853 | 6.6619 | ||
854 | data/projectiles/psi.txt | ||
855 | -6.70157 | ||
856 | 319.93 | ||
857 | 10 | ||
858 | 6.6599 | ||
859 | data/projectiles/psi.txt | ||
860 | -33.4491 | ||
861 | 318.247 | ||
862 | 10 | ||
863 | 6.6579 | ||
864 | data/projectiles/psi.txt | ||
865 | -59.962 | ||
866 | 314.332 | ||
867 | 10 | ||
868 | 6.6559 | ||
869 | data/projectiles/psi.txt | ||
870 | -86.0543 | ||
871 | 308.212 | ||
872 | 10 | ||
873 | 6.6539 | ||
874 | data/projectiles/psi.txt | ||
875 | -111.543 | ||
876 | 299.93 | ||
877 | 10 | ||
878 | 6.6519 | ||
879 | data/projectiles/psi.txt | ||
880 | -136.249 | ||
881 | 289.545 | ||
882 | 10 | ||
883 | 6.6499 | ||
884 | data/projectiles/psi.txt | ||
885 | -160 | ||
886 | 277.128 | ||
887 | 10 | ||
888 | 6.6479 | ||
889 | data/projectiles/psi.txt | ||
890 | -182.628 | ||
891 | 262.768 | ||
892 | 10 | ||
893 | 6.6459 | ||
894 | data/projectiles/psi.txt | ||
895 | -203.976 | ||
896 | 246.564 | ||
897 | 10 | ||
898 | 6.6439 | ||
899 | data/projectiles/psi.txt | ||
900 | -223.892 | ||
901 | 228.631 | ||
902 | 10 | ||
903 | 6.6419 | ||
904 | data/projectiles/psi.txt | ||
905 | -242.238 | ||
906 | 209.095 | ||
907 | 10 | ||
908 | 6.6399 | ||
909 | data/projectiles/psi.txt | ||
910 | -258.885 | ||
911 | 188.091 | ||
912 | 10 | ||
913 | 6.6379 | ||
914 | data/projectiles/psi.txt | ||
915 | -273.717 | ||
916 | 165.769 | ||
917 | 10 | ||
918 | 6.6359 | ||
919 | data/projectiles/psi.txt | ||
920 | -286.628 | ||
921 | 142.283 | ||
922 | 10 | ||
923 | 6.6339 | ||
924 | data/projectiles/psi.txt | ||
925 | -297.528 | ||
926 | 117.8 | ||
927 | 10 | ||
928 | 6.6319 | ||
929 | data/projectiles/psi.txt | ||
930 | -306.342 | ||
931 | 92.4902 | ||
932 | 10 | ||
933 | 6.6299 | ||
934 | data/projectiles/psi.txt | ||
935 | -313.007 | ||
936 | 66.5317 | ||
937 | 10 | ||
938 | 6.6279 | ||
939 | data/projectiles/psi.txt | ||
940 | -317.477 | ||
941 | 40.1066 | ||
942 | 10 | ||
943 | 6.6259 | ||
944 | data/projectiles/psi.txt | ||
945 | -319.719 | ||
946 | 13.4002 | ||
947 | 10 | ||
948 | 6.6239 | ||
949 | data/projectiles/psi.txt | ||
950 | -319.719 | ||
951 | -13.4002 | ||
952 | 10 | ||
953 | 6.6219 | ||
954 | data/projectiles/psi.txt | ||
955 | -317.477 | ||
956 | -40.1066 | ||
957 | 10 | ||
958 | 6.6199 | ||
959 | data/projectiles/psi.txt | ||
960 | -313.007 | ||
961 | -66.5317 | ||
962 | 10 | ||
963 | 6.6179 | ||
964 | data/projectiles/psi.txt | ||
965 | -306.342 | ||
966 | -92.4902 | ||
967 | 10 | ||
968 | 6.6159 | ||
969 | data/projectiles/psi.txt | ||
970 | -297.528 | ||
971 | -117.8 | ||
972 | 10 | ||
973 | 6.6139 | ||
974 | data/projectiles/psi.txt | ||
975 | -286.628 | ||
976 | -142.283 | ||
977 | 10 | ||
978 | 6.6119 | ||
979 | data/projectiles/psi.txt | ||
980 | -273.717 | ||
981 | -165.769 | ||
982 | 10 | ||
983 | 6.6099 | ||
984 | data/projectiles/psi.txt | ||
985 | -258.885 | ||
986 | -188.091 | ||
987 | 10 | ||
988 | 6.6079 | ||
989 | data/projectiles/psi.txt | ||
990 | -242.238 | ||
991 | -209.095 | ||
992 | 10 | ||
993 | 6.6059 | ||
994 | data/projectiles/psi.txt | ||
995 | -223.892 | ||
996 | -228.631 | ||
997 | 10 | ||
998 | 6.6039 | ||
999 | data/projectiles/psi.txt | ||
1000 | -203.976 | ||
1001 | -246.564 | ||
1002 | 10 | ||
1003 | 6.6019 | ||
1004 | data/projectiles/psi.txt | ||
1005 | -182.628 | ||
1006 | -262.768 | ||
1007 | 10 | ||
1008 | 6.5999 | ||
1009 | data/projectiles/psi.txt | ||
1010 | -160 | ||
1011 | -277.128 | ||
1012 | 10 | ||
1013 | 6.5979 | ||
1014 | data/projectiles/psi.txt | ||
1015 | -136.249 | ||
1016 | -289.545 | ||
1017 | 10 | ||
1018 | 6.5959 | ||
1019 | data/projectiles/psi.txt | ||
1020 | -111.543 | ||
1021 | -299.93 | ||
1022 | 10 | ||
1023 | 6.5939 | ||
1024 | data/projectiles/psi.txt | ||
1025 | -86.0543 | ||
1026 | -308.212 | ||
1027 | 10 | ||
1028 | 6.5919 | ||
1029 | data/projectiles/psi.txt | ||
1030 | -59.962 | ||
1031 | -314.332 | ||
1032 | 10 | ||
1033 | 6.5899 | ||
1034 | data/projectiles/psi.txt | ||
1035 | -33.4491 | ||
1036 | -318.247 | ||
1037 | 10 | ||
1038 | 6.5879 | ||
1039 | data/projectiles/psi.txt | ||
1040 | -6.70157 | ||
1041 | -319.93 | ||
1042 | 10 | ||
1043 | 6.5859 | ||
1044 | data/projectiles/psi.txt | ||
1045 | 20.093 | ||
1046 | -319.369 | ||
1047 | 10 | ||
1048 | 6.5839 | ||
1049 | data/projectiles/psi.txt | ||
1050 | 46.7466 | ||
1051 | -316.567 | ||
1052 | 10 | ||
1053 | 6.5819 | ||
1054 | data/projectiles/psi.txt | ||
1055 | 73.0723 | ||
1056 | -311.545 | ||
1057 | 10 | ||
1058 | 6.5799 | ||
1059 | data/projectiles/psi.txt | ||
1060 | 98.8854 | ||
1061 | -304.338 | ||
1062 | 10 | ||
1063 | 6.5779 | ||
1064 | data/projectiles/psi.txt | ||
1065 | 124.005 | ||
1066 | -294.996 | ||
1067 | 10 | ||
1068 | 6.5759 | ||
1069 | data/projectiles/psi.txt | ||
1070 | 148.255 | ||
1071 | -283.585 | ||
1072 | 10 | ||
1073 | 6.5739 | ||
1074 | data/projectiles/psi.txt | ||
1075 | 171.465 | ||
1076 | -270.185 | ||
1077 | 10 | ||
1078 | 6.5719 | ||
1079 | data/projectiles/psi.txt | ||
1080 | 193.472 | ||
1081 | -254.89 | ||
1082 | 10 | ||
1083 | 6.5699 | ||
1084 | data/projectiles/psi.txt | ||
1085 | 214.122 | ||
1086 | -237.806 | ||
1087 | 10 | ||
1088 | 6.5679 | ||
1089 | data/projectiles/psi.txt | ||
1090 | 233.27 | ||
1091 | -219.055 | ||
1092 | 10 | ||
1093 | 6.5659 | ||
1094 | data/projectiles/psi.txt | ||
1095 | 250.782 | ||
1096 | -198.767 | ||
1097 | 10 | ||
1098 | 6.5639 | ||
1099 | data/projectiles/psi.txt | ||
1100 | 266.535 | ||
1101 | -177.085 | ||
1102 | 10 | ||
1103 | 6.5619 | ||
1104 | data/projectiles/psi.txt | ||
1105 | 280.418 | ||
1106 | -154.161 | ||
1107 | 10 | ||
1108 | 6.5599 | ||
1109 | data/projectiles/psi.txt | ||
1110 | 292.335 | ||
1111 | -130.156 | ||
1112 | 10 | ||
1113 | 6.5579 | ||
1114 | data/projectiles/psi.txt | ||
1115 | 302.2 | ||
1116 | -105.237 | ||
1117 | 10 | ||
1118 | 6.5559 | ||
1119 | data/projectiles/psi.txt | ||
1120 | 309.947 | ||
1121 | -79.5808 | ||
1122 | 10 | ||
1123 | 6.5539 | ||
1124 | data/projectiles/psi.txt | ||
1125 | 315.519 | ||
1126 | -53.366 | ||
1127 | 10 | ||
1128 | 6.5519 | ||
1129 | data/projectiles/psi.txt | ||
1130 | 318.878 | ||
1131 | -26.7769 | ||
1132 | 10 | ||
1133 | 6.5499 | ||
1134 | data/projectiles/psi.txt | ||
1135 | 320 | ||
1136 | -2.35132e-13 | ||
1137 | 10 | ||
1138 | 6.5479 | ||
1139 | data/projectiles/psi.txt | ||
1140 | 318.878 | ||
1141 | 26.7769 | ||
1142 | 10 | ||
1143 | 6.5459 | ||
1144 | data/projectiles/psi.txt | ||
1145 | 315.519 | ||
1146 | 53.366 | ||
1147 | 10 | ||
1148 | 6.5439 | ||
1149 | data/projectiles/psi.txt | ||
1150 | 309.947 | ||
1151 | 79.5808 | ||
1152 | 10 | ||
1153 | 6.5419 | ||
1154 | data/projectiles/psi.txt | ||
1155 | 302.2 | ||
1156 | 105.237 | ||
1157 | 10 | ||
1158 | 6.5399 | ||
1159 | data/projectiles/psi.txt | ||
1160 | 292.335 | ||
1161 | 130.156 | ||
1162 | 10 | ||
1163 | 6.5379 | ||
1164 | data/projectiles/psi.txt | ||
1165 | 280.418 | ||
1166 | 154.161 | ||
1167 | 10 | ||
1168 | 6.5359 | ||
1169 | data/projectiles/psi.txt | ||
1170 | 266.535 | ||
1171 | 177.085 | ||
1172 | 10 | ||
1173 | 6.5339 | ||
1174 | data/projectiles/psi.txt | ||
1175 | 250.782 | ||
1176 | 198.767 | ||
1177 | 10 | ||
1178 | 6.5319 | ||
1179 | data/projectiles/psi.txt | ||
1180 | 233.27 | ||
1181 | 219.055 | ||
1182 | 10 | ||
1183 | 6.5299 | ||
1184 | data/projectiles/psi.txt | ||
1185 | 214.122 | ||
1186 | 237.806 | ||
1187 | 10 | ||
1188 | 6.5279 | ||
1189 | data/projectiles/psi.txt | ||
1190 | 193.472 | ||
1191 | 254.89 | ||
1192 | 10 | ||
1193 | 6.5259 | ||
1194 | data/projectiles/psi.txt | ||
1195 | 171.465 | ||
1196 | 270.185 | ||
1197 | 10 | ||
1198 | 6.5239 | ||
1199 | data/projectiles/psi.txt | ||
1200 | 148.255 | ||
1201 | 283.585 | ||
1202 | 10 | ||
1203 | 6.5219 | ||
1204 | data/projectiles/psi.txt | ||
1205 | 124.005 | ||
1206 | 294.996 | ||
1207 | 10 | ||
1208 | 6.5199 | ||
1209 | data/projectiles/psi.txt | ||
1210 | 98.8854 | ||
1211 | 304.338 | ||
1212 | 10 | ||
1213 | 6.5179 | ||
1214 | data/projectiles/psi.txt | ||
1215 | 73.0723 | ||
1216 | 311.545 | ||
1217 | 10 | ||
1218 | 6.5159 | ||
1219 | data/projectiles/psi.txt | ||
1220 | 46.7466 | ||
1221 | 316.567 | ||
1222 | 10 | ||
1223 | 6.5139 | ||
1224 | data/projectiles/psi.txt | ||
1225 | 20.093 | ||
1226 | 319.369 | ||
1227 | 10 | ||
1228 | 6.5119 | ||
1229 | data/projectiles/psi.txt | ||
1230 | -6.70157 | ||
1231 | 319.93 | ||
1232 | 10 | ||
1233 | 6.5099 | ||
1234 | data/projectiles/psi.txt | ||
1235 | -33.4491 | ||
1236 | 318.247 | ||
1237 | 10 | ||
1238 | 6.5079 | ||
1239 | data/projectiles/psi.txt | ||
1240 | -59.962 | ||
1241 | 314.332 | ||
1242 | 10 | ||
1243 | 6.5059 | ||
1244 | data/projectiles/psi.txt | ||
1245 | -86.0543 | ||
1246 | 308.212 | ||
1247 | 10 | ||
1248 | 6.5039 | ||
1249 | data/projectiles/psi.txt | ||
1250 | -111.543 | ||
1251 | 299.93 | ||
1252 | 10 | ||
1253 | 6.5019 | ||
1254 | data/projectiles/psi.txt | ||
1255 | -136.249 | ||
1256 | 289.545 | ||
1257 | 10 | ||
1258 | 6.4999 | ||
1259 | data/projectiles/psi.txt | ||
1260 | -160 | ||
1261 | 277.128 | ||
1262 | 10 | ||
1263 | 6.4979 | ||
1264 | data/projectiles/psi.txt | ||
1265 | -182.628 | ||
1266 | 262.768 | ||
1267 | 10 | ||
1268 | 6.4959 | ||
1269 | data/projectiles/psi.txt | ||
1270 | -203.976 | ||
1271 | 246.564 | ||
1272 | 10 | ||
1273 | 6.4939 | ||
1274 | data/projectiles/psi.txt | ||
1275 | -223.892 | ||
1276 | 228.631 | ||
1277 | 10 | ||
1278 | 6.4919 | ||
1279 | data/projectiles/psi.txt | ||
1280 | -242.238 | ||
1281 | 209.095 | ||
1282 | 10 | ||
1283 | 6.4899 | ||
1284 | data/projectiles/psi.txt | ||
1285 | -258.885 | ||
1286 | 188.091 | ||
1287 | 10 | ||
1288 | 6.4879 | ||
1289 | data/projectiles/psi.txt | ||
1290 | -273.717 | ||
1291 | 165.769 | ||
1292 | 10 | ||
1293 | 6.4859 | ||
1294 | data/projectiles/psi.txt | ||
1295 | -286.628 | ||
1296 | 142.283 | ||
1297 | 10 | ||
1298 | 6.4839 | ||
1299 | data/projectiles/psi.txt | ||
1300 | -297.528 | ||
1301 | 117.8 | ||
1302 | 10 | ||
1303 | 6.4819 | ||
1304 | data/projectiles/psi.txt | ||
1305 | -306.342 | ||
1306 | 92.4902 | ||
1307 | 10 | ||
1308 | 6.4799 | ||
1309 | data/projectiles/psi.txt | ||
1310 | -313.007 | ||
1311 | 66.5317 | ||
1312 | 10 | ||
1313 | 6.4779 | ||
1314 | data/projectiles/psi.txt | ||
1315 | -317.477 | ||
1316 | 40.1066 | ||
1317 | 10 | ||
1318 | 6.4759 | ||
1319 | data/projectiles/psi.txt | ||
1320 | -319.719 | ||
1321 | 13.4002 | ||
1322 | 10 | ||
1323 | 6.4739 | ||
1324 | data/projectiles/psi.txt | ||
1325 | -319.719 | ||
1326 | -13.4002 | ||
1327 | 10 | ||
1328 | 6.4719 | ||
1329 | data/projectiles/psi.txt | ||
1330 | -317.477 | ||
1331 | -40.1066 | ||
1332 | 10 | ||
1333 | 6.4699 | ||
1334 | data/projectiles/psi.txt | ||
1335 | -313.007 | ||
1336 | -66.5317 | ||
1337 | 10 | ||
1338 | 6.4679 | ||
1339 | data/projectiles/psi.txt | ||
1340 | -306.342 | ||
1341 | -92.4902 | ||
1342 | 10 | ||
1343 | 6.4659 | ||
1344 | data/projectiles/psi.txt | ||
1345 | -297.528 | ||
1346 | -117.8 | ||
1347 | 10 | ||
1348 | 6.4639 | ||
1349 | data/projectiles/psi.txt | ||
1350 | -286.628 | ||
1351 | -142.283 | ||
1352 | 10 | ||
1353 | 6.4619 | ||
1354 | data/projectiles/psi.txt | ||
1355 | -273.717 | ||
1356 | -165.769 | ||
1357 | 10 | ||
1358 | 6.4599 | ||
1359 | data/projectiles/psi.txt | ||
1360 | -258.885 | ||
1361 | -188.091 | ||
1362 | 10 | ||
1363 | 6.4579 | ||
1364 | data/projectiles/psi.txt | ||
1365 | -242.238 | ||
1366 | -209.095 | ||
1367 | 10 | ||
1368 | 6.4559 | ||
1369 | data/projectiles/psi.txt | ||
1370 | -223.892 | ||
1371 | -228.631 | ||
1372 | 10 | ||
1373 | 6.4539 | ||
1374 | data/projectiles/psi.txt | ||
1375 | -203.976 | ||
1376 | -246.564 | ||
1377 | 10 | ||
1378 | 6.4519 | ||
1379 | data/projectiles/psi.txt | ||
1380 | -182.628 | ||
1381 | -262.768 | ||
1382 | 10 | ||
1383 | 6.4499 | ||
1384 | data/projectiles/psi.txt | ||
1385 | -160 | ||
1386 | -277.128 | ||
1387 | 10 | ||
1388 | 6.4479 | ||
1389 | data/projectiles/psi.txt | ||
1390 | -136.249 | ||
1391 | -289.545 | ||
1392 | 10 | ||
1393 | 6.4459 | ||
1394 | data/projectiles/psi.txt | ||
1395 | -111.543 | ||
1396 | -299.93 | ||
1397 | 10 | ||
1398 | 6.4439 | ||
1399 | data/projectiles/psi.txt | ||
1400 | -86.0543 | ||
1401 | -308.212 | ||
1402 | 10 | ||
1403 | 6.4419 | ||
1404 | data/projectiles/psi.txt | ||
1405 | -59.962 | ||
1406 | -314.332 | ||
1407 | 10 | ||
1408 | 6.4399 | ||
1409 | data/projectiles/psi.txt | ||
1410 | -33.4491 | ||
1411 | -318.247 | ||
1412 | 10 | ||
1413 | 6.4379 | ||
1414 | data/projectiles/psi.txt | ||
1415 | -6.70157 | ||
1416 | -319.93 | ||
1417 | 10 | ||
1418 | 6.4359 | ||
1419 | data/projectiles/psi.txt | ||
1420 | 20.093 | ||
1421 | -319.369 | ||
1422 | 10 | ||
1423 | 6.4339 | ||
1424 | data/projectiles/psi.txt | ||
1425 | 46.7466 | ||
1426 | -316.567 | ||
1427 | 10 | ||
1428 | 6.4319 | ||
1429 | data/projectiles/psi.txt | ||
1430 | 73.0723 | ||
1431 | -311.545 | ||
1432 | 10 | ||
1433 | 6.4299 | ||
1434 | data/projectiles/psi.txt | ||
1435 | 98.8854 | ||
1436 | -304.338 | ||
1437 | 10 | ||
1438 | 6.4279 | ||
1439 | data/projectiles/psi.txt | ||
1440 | 124.005 | ||
1441 | -294.996 | ||
1442 | 10 | ||
1443 | 6.4259 | ||
1444 | data/projectiles/psi.txt | ||
1445 | 148.255 | ||
1446 | -283.585 | ||
1447 | 10 | ||
1448 | 6.4239 | ||
1449 | data/projectiles/psi.txt | ||
1450 | 171.465 | ||
1451 | -270.185 | ||
1452 | 10 | ||
1453 | 6.4219 | ||
1454 | data/projectiles/psi.txt | ||
1455 | 193.472 | ||
1456 | -254.89 | ||
1457 | 10 | ||
1458 | 6.4199 | ||
1459 | data/projectiles/psi.txt | ||
1460 | 214.122 | ||
1461 | -237.806 | ||
1462 | 10 | ||
1463 | 6.4179 | ||
1464 | data/projectiles/psi.txt | ||
1465 | 233.27 | ||
1466 | -219.055 | ||
1467 | 10 | ||
1468 | 6.4159 | ||
1469 | data/projectiles/psi.txt | ||
1470 | 250.782 | ||
1471 | -198.767 | ||
1472 | 10 | ||
1473 | 6.4139 | ||
1474 | data/projectiles/psi.txt | ||
1475 | 266.535 | ||
1476 | -177.085 | ||
1477 | 10 | ||
1478 | 6.4119 | ||
1479 | data/projectiles/psi.txt | ||
1480 | 280.418 | ||
1481 | -154.161 | ||
1482 | 10 | ||
1483 | 6.4099 | ||
1484 | data/projectiles/psi.txt | ||
1485 | 292.335 | ||
1486 | -130.156 | ||
1487 | 10 | ||
1488 | 6.4079 | ||
1489 | data/projectiles/psi.txt | ||
1490 | 302.2 | ||
1491 | -105.237 | ||
1492 | 10 | ||
1493 | 6.4059 | ||
1494 | data/projectiles/psi.txt | ||
1495 | 309.947 | ||
1496 | -79.5808 | ||
1497 | 10 | ||
1498 | 6.4039 | ||
1499 | data/projectiles/psi.txt | ||
1500 | 315.519 | ||
1501 | -53.366 | ||
1502 | 10 | ||
1503 | 6.4019 | ||
1504 | data/projectiles/psi.txt | ||
1505 | 318.878 | ||
1506 | -26.7769 \ No newline at end of file | ||
diff --git a/data/weapons/novaspitter1.txt b/data/weapons/novaspitter1.txt new file mode 100644 index 0000000..a9adbfa --- /dev/null +++ b/data/weapons/novaspitter1.txt | |||
@@ -0,0 +1,36 @@ | |||
1 | Novaspitter 1 | ||
2 | data/images/empty.bmp | ||
3 | 8 | ||
4 | 1 | ||
5 | 0 | ||
6 | 6 | ||
7 | 0.8 | ||
8 | 0.0999 | ||
9 | data/projectiles/spit.txt | ||
10 | 250 | ||
11 | 0 | ||
12 | 0.8 | ||
13 | 0.0999 | ||
14 | data/projectiles/spit.txt | ||
15 | 125 | ||
16 | 216.506 | ||
17 | 0.8 | ||
18 | 0.0999 | ||
19 | data/projectiles/spit.txt | ||
20 | -125 | ||
21 | 216.506 | ||
22 | 0.8 | ||
23 | 0.0999 | ||
24 | data/projectiles/spit.txt | ||
25 | -250 | ||
26 | 3.06162e-14 | ||
27 | 0.8 | ||
28 | 0.0999 | ||
29 | data/projectiles/spit.txt | ||
30 | -125 | ||
31 | -216.506 | ||
32 | 0.8 | ||
33 | 0.0999 | ||
34 | data/projectiles/spit.txt | ||
35 | 125 | ||
36 | -216.506 | ||
diff --git a/data/weapons/novaspitter1.txt~ b/data/weapons/novaspitter1.txt~ new file mode 100644 index 0000000..99c3869 --- /dev/null +++ b/data/weapons/novaspitter1.txt~ | |||
@@ -0,0 +1,36 @@ | |||
1 | Novaspitter 1 | ||
2 | data/images/empty.bmp | ||
3 | 8 | ||
4 | 1 | ||
5 | 30 | ||
6 | 6 | ||
7 | 0.8 | ||
8 | 0.0999 | ||
9 | data/projectiles/spit.txt | ||
10 | 250 | ||
11 | 0 | ||
12 | 0.8 | ||
13 | 0.0999 | ||
14 | data/projectiles/spit.txt | ||
15 | 125 | ||
16 | 216.506 | ||
17 | 0.8 | ||
18 | 0.0999 | ||
19 | data/projectiles/spit.txt | ||
20 | -125 | ||
21 | 216.506 | ||
22 | 0.8 | ||
23 | 0.0999 | ||
24 | data/projectiles/spit.txt | ||
25 | -250 | ||
26 | 3.06162e-14 | ||
27 | 0.8 | ||
28 | 0.0999 | ||
29 | data/projectiles/spit.txt | ||
30 | -125 | ||
31 | -216.506 | ||
32 | 0.8 | ||
33 | 0.0999 | ||
34 | data/projectiles/spit.txt | ||
35 | 125 | ||
36 | -216.506 \ No newline at end of file | ||
diff --git a/data/weapons/spitter1.txt b/data/weapons/spitter1.txt new file mode 100644 index 0000000..8866663 --- /dev/null +++ b/data/weapons/spitter1.txt | |||
@@ -0,0 +1,11 @@ | |||
1 | Spitter 1 | ||
2 | data/images/spitter1.bmp | ||
3 | 2 | ||
4 | 1 | ||
5 | 0 | ||
6 | 1 | ||
7 | 0.6 | ||
8 | 0.55 | ||
9 | data/projectiles/spit.txt | ||
10 | 0 | ||
11 | 250 | ||
diff --git a/data/weapons/spitter1.txt~ b/data/weapons/spitter1.txt~ new file mode 100644 index 0000000..4089011 --- /dev/null +++ b/data/weapons/spitter1.txt~ | |||
@@ -0,0 +1,11 @@ | |||
1 | Spitter 1 | ||
2 | data/images/spitter1.bmp | ||
3 | 2 | ||
4 | 1 | ||
5 | 5 | ||
6 | 1 | ||
7 | 0.6 | ||
8 | 0.55 | ||
9 | data/projectiles/spit.txt | ||
10 | 0 | ||
11 | 250 | ||
diff --git a/data/weapons/spitter2.txt b/data/weapons/spitter2.txt new file mode 100644 index 0000000..be15295 --- /dev/null +++ b/data/weapons/spitter2.txt | |||
@@ -0,0 +1,21 @@ | |||
1 | Spitter 2 | ||
2 | data/images/spitter1.bmp | ||
3 | 7 | ||
4 | 1 | ||
5 | 0 | ||
6 | 3 | ||
7 | 0.6 | ||
8 | 0 | ||
9 | data/projectiles/spit.txt | ||
10 | 0 | ||
11 | 250 | ||
12 | 0.6 | ||
13 | 0.2 | ||
14 | data/projectiles/spit.txt | ||
15 | 40 | ||
16 | 240 | ||
17 | 0.6 | ||
18 | 0.4 | ||
19 | data/projectiles/spit.txt | ||
20 | -40 | ||
21 | 240 | ||
diff --git a/data/weapons/spitter2.txt~ b/data/weapons/spitter2.txt~ new file mode 100644 index 0000000..ab3cf1a --- /dev/null +++ b/data/weapons/spitter2.txt~ | |||
@@ -0,0 +1,21 @@ | |||
1 | Spitter 2 | ||
2 | data/images/spitter1.bmp | ||
3 | 7 | ||
4 | 1 | ||
5 | 25 | ||
6 | 3 | ||
7 | 0.6 | ||
8 | 0 | ||
9 | data/projectiles/spit.txt | ||
10 | 0 | ||
11 | 250 | ||
12 | 0.6 | ||
13 | 0.2 | ||
14 | data/projectiles/spit.txt | ||
15 | 40 | ||
16 | 240 | ||
17 | 0.6 | ||
18 | 0.4 | ||
19 | data/projectiles/spit.txt | ||
20 | -40 | ||
21 | 240 | ||
diff --git a/data/weapons/spitter3.txt b/data/weapons/spitter3.txt new file mode 100644 index 0000000..cf7ee3c --- /dev/null +++ b/data/weapons/spitter3.txt | |||
@@ -0,0 +1,41 @@ | |||
1 | Spitter 3 | ||
2 | data/images/spitter3.bmp | ||
3 | 15 | ||
4 | 1 | ||
5 | 0 | ||
6 | 7 | ||
7 | 2 | ||
8 | 0 | ||
9 | data/projectiles/bigspit.txt | ||
10 | 0 | ||
11 | 250 | ||
12 | 0.8 | ||
13 | 0 | ||
14 | data/projectiles/spit.txt | ||
15 | 10 | ||
16 | 247 | ||
17 | 0.8 | ||
18 | 0 | ||
19 | data/projectiles/spit.txt | ||
20 | -10 | ||
21 | 247 | ||
22 | 0.8 | ||
23 | 0.16 | ||
24 | data/projectiles/spit.txt | ||
25 | 176.78 | ||
26 | 176.78 | ||
27 | 0.8 | ||
28 | 0.32 | ||
29 | data/projectiles/spit.txt | ||
30 | -176.78 | ||
31 | 176.78 | ||
32 | 0.8 | ||
33 | 0.48 | ||
34 | data/projectiles/spit.txt | ||
35 | 176.78 | ||
36 | -176.78 | ||
37 | 0.8 | ||
38 | 0.64 | ||
39 | data/projectiles/spit.txt | ||
40 | -176.78 | ||
41 | -176.78 | ||
diff --git a/data/weapons/spitter3.txt~ b/data/weapons/spitter3.txt~ new file mode 100644 index 0000000..ae9ad73 --- /dev/null +++ b/data/weapons/spitter3.txt~ | |||
@@ -0,0 +1,41 @@ | |||
1 | Spitter 3 | ||
2 | data/images/spitter3.bmp | ||
3 | 15 | ||
4 | 1 | ||
5 | 75 | ||
6 | 7 | ||
7 | 2 | ||
8 | 0 | ||
9 | data/projectiles/bigspit.txt | ||
10 | 0 | ||
11 | 250 | ||
12 | 0.8 | ||
13 | 0 | ||
14 | data/projectiles/spit.txt | ||
15 | 10 | ||
16 | 247 | ||
17 | 0.8 | ||
18 | 0 | ||
19 | data/projectiles/spit.txt | ||
20 | -10 | ||
21 | 247 | ||
22 | 0.8 | ||
23 | 0.16 | ||
24 | data/projectiles/spit.txt | ||
25 | 176.78 | ||
26 | 176.78 | ||
27 | 0.8 | ||
28 | 0.32 | ||
29 | data/projectiles/spit.txt | ||
30 | -176.78 | ||
31 | 176.78 | ||
32 | 0.8 | ||
33 | 0.48 | ||
34 | data/projectiles/spit.txt | ||
35 | 176.78 | ||
36 | -176.78 | ||
37 | 0.8 | ||
38 | 0.64 | ||
39 | data/projectiles/spit.txt | ||
40 | -176.78 | ||
41 | -176.78 | ||
diff --git a/data/weapons/weapon_template.txt b/data/weapons/weapon_template.txt new file mode 100644 index 0000000..b900b0c --- /dev/null +++ b/data/weapons/weapon_template.txt | |||
@@ -0,0 +1,16 @@ | |||
1 | epic imbaweapon of massdestruction #name | ||
2 | data/weapon89.bmp #filename of image of weapon | ||
3 | 0.5 #energyusage | ||
4 | 1 #sellable | ||
5 | 10000 #cost (0 for auto (recommended)) | ||
6 | 2 #number of distinguished Projectiles | ||
7 | 1 #cooldown | ||
8 | 0.5 #startTimer | ||
9 | data/projectile11.txt #path | ||
10 | 0 #xSpeed | ||
11 | 700 #-ySpeed | ||
12 | 5 #cooldown | ||
13 | 0 #startTimer | ||
14 | data/projectile14.txt #path | ||
15 | 0 #xSpeed | ||
16 | 500 #-ySpeed | ||
diff --git a/data/weapons/weapon_template.txt~ b/data/weapons/weapon_template.txt~ new file mode 100644 index 0000000..4c8a787 --- /dev/null +++ b/data/weapons/weapon_template.txt~ | |||
@@ -0,0 +1,16 @@ | |||
1 | epic imbaweapon of massdestruction #name | ||
2 | data/weapon89.bmp #filename of image of weapon | ||
3 | 0.5 #energyusage | ||
4 | 1 #sellable | ||
5 | 10000 #value (0 for auto (recommended)) | ||
6 | 2 #number of distinguished Projectiles | ||
7 | 1 #cooldown | ||
8 | 0.5 #startTimer | ||
9 | data/projectile11.txt #path | ||
10 | 0 #xSpeed | ||
11 | 700 #-ySpeed | ||
12 | 5 #cooldown | ||
13 | 0 #startTimer | ||
14 | data/projectile14.txt #path | ||
15 | 0 #xSpeed | ||
16 | 500 #-ySpeed | ||
diff --git a/data/weapons/weapons.txt b/data/weapons/weapons.txt new file mode 100644 index 0000000..5c08b65 --- /dev/null +++ b/data/weapons/weapons.txt | |||
@@ -0,0 +1,10 @@ | |||
1 | empty.txt | ||
2 | spitter1.txt | ||
3 | spitter2.txt | ||
4 | spitter3.txt | ||
5 | novaspitter1.txt | ||
6 | beamer1.txt | ||
7 | beamer2.txt | ||
8 | fireball1.txt | ||
9 | inawaffe.txt | ||
10 | nova1.txt | ||
diff --git a/data/weapons/weapons.txt~ b/data/weapons/weapons.txt~ new file mode 100644 index 0000000..5c08b65 --- /dev/null +++ b/data/weapons/weapons.txt~ | |||
@@ -0,0 +1,10 @@ | |||
1 | empty.txt | ||
2 | spitter1.txt | ||
3 | spitter2.txt | ||
4 | spitter3.txt | ||
5 | novaspitter1.txt | ||
6 | beamer1.txt | ||
7 | beamer2.txt | ||
8 | fireball1.txt | ||
9 | inawaffe.txt | ||
10 | nova1.txt | ||
diff --git a/engine.cpp b/engine.cpp new file mode 100644 index 0000000..50b39ee --- /dev/null +++ b/engine.cpp | |||
@@ -0,0 +1,929 @@ | |||
1 | #include "engine.h" | ||
2 | |||
3 | UserShip* getShipWithName(string shipname) | ||
4 | { | ||
5 | string path = "data/ships/user/"; | ||
6 | ifstream ships; | ||
7 | ships.open((path + "userships.txt").c_str()); | ||
8 | char workaround; | ||
9 | ships >> workaround; | ||
10 | while(ships.good()) | ||
11 | { | ||
12 | string shipPath; | ||
13 | getline(ships, shipPath); | ||
14 | ifstream ins; | ||
15 | ins.open((path + workaround + shipPath).c_str()); | ||
16 | // cout << path + workaround + shipPath << endl; | ||
17 | char workaround2; | ||
18 | ins >> workaround2; | ||
19 | string thisShipname; | ||
20 | getline(ins, thisShipname); | ||
21 | thisShipname = workaround2 + thisShipname; | ||
22 | ins.close(); | ||
23 | if(thisShipname == shipname) | ||
24 | { | ||
25 | ships.close(); | ||
26 | return new UserShip(path + workaround + shipPath); | ||
27 | } | ||
28 | ships >> workaround; | ||
29 | } | ||
30 | ships.close(); | ||
31 | cout << "Save File corrupted: unable to find Ship with name " << shipname << endl; | ||
32 | return NULL; | ||
33 | } | ||
34 | |||
35 | Weapon* getWeaponWithName(string weaponname) | ||
36 | { | ||
37 | string path = "data/weapons/"; | ||
38 | ifstream weapons; | ||
39 | weapons.open((path + "weapons.txt").c_str()); | ||
40 | char workaround; | ||
41 | weapons >> workaround; | ||
42 | while(weapons.good()) | ||
43 | { | ||
44 | string weaponPath; | ||
45 | getline(weapons, weaponPath); | ||
46 | ifstream ins; | ||
47 | ins.open((path + workaround + weaponPath).c_str()); | ||
48 | char workaround2; | ||
49 | ins >> workaround2; | ||
50 | string thisWeaponname; | ||
51 | getline(ins, thisWeaponname); | ||
52 | thisWeaponname = workaround2 + thisWeaponname; | ||
53 | ins.close(); | ||
54 | if(thisWeaponname == weaponname) | ||
55 | { | ||
56 | weapons.close(); | ||
57 | return new Weapon(path + workaround + weaponPath); | ||
58 | } | ||
59 | weapons >> workaround; | ||
60 | } | ||
61 | weapons.close(); | ||
62 | cout << "Save File corrupted: unable to find Weapon with name " << weaponname << endl; | ||
63 | return NULL; | ||
64 | } | ||
65 | |||
66 | Account::Account() | ||
67 | { | ||
68 | gold = 0; | ||
69 | highscore = 0; | ||
70 | ifstream ins; | ||
71 | string path = "data/ships/user/"; | ||
72 | ins.open((path + "userships.txt").c_str()); | ||
73 | current = 0; | ||
74 | string shippath; | ||
75 | getline(ins, shippath); | ||
76 | UserShip *startShip = new UserShip(path + shippath); | ||
77 | ships.push_back(startShip); | ||
78 | } | ||
79 | |||
80 | Account::~Account() | ||
81 | { | ||
82 | for(int i = 0; i < (int) ships.size(); i++) | ||
83 | delete ships[i]; | ||
84 | for(int i = 0; i < (int) weapons.size(); i++) | ||
85 | delete weapons[i]; | ||
86 | } | ||
87 | |||
88 | void Account::resetShips() | ||
89 | { | ||
90 | for(int i = 0; i < (int) ships.size(); ++i) | ||
91 | { | ||
92 | ships[i]->reset(); | ||
93 | // ships[i]->hp = ships[i]->maxhp; | ||
94 | // ships[i]->energy = ships[i]->maxEnergy; | ||
95 | // ships[i]->xSpeed = 0; | ||
96 | // ships[i]->ySpeed = 0; | ||
97 | } | ||
98 | } | ||
99 | |||
100 | |||
101 | |||
102 | Account::Account(string filename) | ||
103 | { | ||
104 | ifstream ins; | ||
105 | ins.open((filename).c_str()); | ||
106 | getline(ins, name); | ||
107 | ins >> gold; | ||
108 | ins >> highscore; | ||
109 | int Nships; | ||
110 | ins >> Nships; | ||
111 | for(int i = 0; i < (int) Nships; ++i) | ||
112 | { | ||
113 | string shipname; | ||
114 | char workaround; | ||
115 | ins >> workaround; | ||
116 | getline(ins, shipname); | ||
117 | shipname = workaround + shipname; | ||
118 | UserShip* s = getShipWithName(shipname); | ||
119 | vector<Upgradeable*> tu = s->getUpgradeables(); | ||
120 | for(int j = 0; j < (int) tu.size(); ++j) | ||
121 | tu[j]->load(ins); | ||
122 | int Nweapons; | ||
123 | ins >> Nweapons; | ||
124 | for(int j = 0; j < Nweapons; ++j) | ||
125 | { | ||
126 | ins >> workaround; | ||
127 | string weaponname; | ||
128 | getline(ins, weaponname); | ||
129 | weaponname = workaround + weaponname; | ||
130 | delete s->weapons[j]; | ||
131 | s->weapons[j] = getWeaponWithName(weaponname); | ||
132 | } | ||
133 | ships.push_back(s); | ||
134 | } | ||
135 | ins >> current; | ||
136 | int Nlevels; | ||
137 | ins >> Nlevels; | ||
138 | for(int i = 0; i < Nlevels; ++i) | ||
139 | { | ||
140 | int level; | ||
141 | ins >> level; | ||
142 | levels.push_back(level); | ||
143 | } | ||
144 | double nexp; | ||
145 | ins >> nexp; | ||
146 | addExp(nexp); | ||
147 | ins.close(); | ||
148 | } | ||
149 | |||
150 | void Account::save() | ||
151 | { | ||
152 | spaceto_(name); | ||
153 | bool was_saved = false; | ||
154 | ifstream ins; | ||
155 | ins.open("save/saves.txt"); | ||
156 | string line; | ||
157 | getline(ins, line); | ||
158 | if(line == name) | ||
159 | was_saved = true; | ||
160 | string allSaves = line; | ||
161 | while(ins.good()) | ||
162 | { | ||
163 | string line; | ||
164 | getline(ins, line); | ||
165 | if(line == name) | ||
166 | was_saved = true; | ||
167 | allSaves += "\n" + line; | ||
168 | } | ||
169 | ins.close(); | ||
170 | if(!was_saved) | ||
171 | { | ||
172 | ofstream makeEntry; | ||
173 | makeEntry.open("save/saves.txt"); | ||
174 | makeEntry << allSaves << '\n' << name; | ||
175 | } | ||
176 | ofstream ofs; | ||
177 | ofs.open(("save/" + name + ".txt").c_str()); | ||
178 | _tospace(name); | ||
179 | ofs << name << endl; | ||
180 | ofs << gold << endl; | ||
181 | ofs << highscore << endl; | ||
182 | ofs << ships.size() << endl; | ||
183 | for(int i = 0; i < (int) ships.size(); ++i) | ||
184 | { | ||
185 | ofs << ships[i]->name << endl; | ||
186 | vector<Upgradeable*> tu = ships[i]->getUpgradeables(); | ||
187 | for(int j = 0; j < (int) tu.size(); ++j) | ||
188 | tu[j]->save(ofs); | ||
189 | ofs << ships[i]->weapons.size() << endl; | ||
190 | for(int j = 0; j < (int) ships[i]->weapons.size(); ++j) | ||
191 | ofs << ships[i]->weapons[j]->name << endl; | ||
192 | } | ||
193 | ofs << current << endl; | ||
194 | ofs << levels.size() << endl; | ||
195 | for(int i = 0; i < (int) levels.size(); ++i) | ||
196 | ofs << levels[i] << endl; | ||
197 | |||
198 | ofs << exp; | ||
199 | ofs.close(); | ||
200 | } | ||
201 | |||
202 | ObjectHandler::ObjectHandler(Account* newuser, SDL_Surface* newscreen, SDL_Surface* background) | ||
203 | { | ||
204 | user = newuser; | ||
205 | screen = newscreen; | ||
206 | BG = new SlidingBackground(background,0,50); | ||
207 | highscore = 0; | ||
208 | gold = 0; | ||
209 | } | ||
210 | |||
211 | void ObjectHandler::spawnEnemy(EnemyShip* enemy,double nx, double ny) | ||
212 | { | ||
213 | enemy->x = nx; | ||
214 | enemy->y = ny; | ||
215 | enemies.push_back(enemy); | ||
216 | } | ||
217 | |||
218 | ObjectHandler::~ObjectHandler() | ||
219 | { | ||
220 | for(list<Projectile*>::iterator i = friendlyProjectiles.begin(); i!= friendlyProjectiles.end();++i) | ||
221 | delete *i; | ||
222 | for(list<Projectile*>::iterator i = enemyProjectiles.begin(); i!= enemyProjectiles.end();++i) | ||
223 | delete *i; | ||
224 | for(list<EnemyShip*>::iterator i = enemies.begin(); i!= enemies.end();++i) | ||
225 | delete *i; | ||
226 | delete BG; | ||
227 | } | ||
228 | |||
229 | void ObjectHandler::frameEnemy(EnemyShip* s, double time) | ||
230 | { | ||
231 | vector<Projectile*> moreProjectiles = s->frame(time); | ||
232 | for(int i = 0; i < (int) moreProjectiles.size(); ++i) | ||
233 | enemyProjectiles.push_back(moreProjectiles[i]); | ||
234 | } | ||
235 | |||
236 | int ObjectHandler::frame(double time) | ||
237 | { | ||
238 | UserShip *s = user->ships[user->current]; | ||
239 | //applies controles | ||
240 | Uint8 *keyState = SDL_GetKeyState(NULL); | ||
241 | s->down = -keyState[SDLK_UP]+keyState[SDLK_DOWN]; | ||
242 | s->right = -keyState[SDLK_LEFT]+keyState[SDLK_RIGHT]; | ||
243 | s->shooting = keyState[SDLK_SPACE]; | ||
244 | //frames the content | ||
245 | list<Projectile*>::iterator l1; | ||
246 | list<EnemyShip*>::iterator l2; | ||
247 | l1 = friendlyProjectiles.begin(); | ||
248 | while(l1 != friendlyProjectiles.end()) | ||
249 | { | ||
250 | //looking for collisions with enemies | ||
251 | double startx,starty; | ||
252 | startx = (*l1)->x; | ||
253 | starty = (*l1)->y; | ||
254 | (*l1)->frame(time); | ||
255 | bool hit = false; | ||
256 | for(l2 = enemies.begin(); l2!= enemies.end(); ++l2) | ||
257 | { | ||
258 | if((*l2)->hp > 0 && intersects((*l1)->collisionSize + (*l2)->collisionSize, startx-(*l2)->x, starty-(*l2)->y, (*l1)->x-(*l2)->x, (*l1)->y-(*l2)->y)) | ||
259 | { | ||
260 | (*l2)->hit(**l1); | ||
261 | // cout << (*l2)-> hp << endl; | ||
262 | hit = true; | ||
263 | break; | ||
264 | } | ||
265 | } | ||
266 | if(ooB(*l1,screen) || hit) | ||
267 | { | ||
268 | delete *l1; | ||
269 | l1 = friendlyProjectiles.erase(l1); | ||
270 | } | ||
271 | else | ||
272 | l1++; | ||
273 | } | ||
274 | l1 = enemyProjectiles.begin(); | ||
275 | while(l1 != enemyProjectiles.end()) | ||
276 | { | ||
277 | double startx = (*l1)->x; | ||
278 | double starty = (*l1)->y; | ||
279 | (*l1)->frame(time); | ||
280 | bool hit = false; | ||
281 | if(intersects((*l1)->collisionSize + s->collisionSize, startx-s->x, starty-s->y, (*l1)->x-s->x, (*l1)->y-s->y)) | ||
282 | { | ||
283 | s->hit(**l1); | ||
284 | hit = true; | ||
285 | } | ||
286 | if(ooB(*l1,screen) || hit) | ||
287 | { | ||
288 | delete *l1; | ||
289 | l1 = enemyProjectiles.erase(l1); | ||
290 | //return 1; | ||
291 | } | ||
292 | else | ||
293 | l1++; | ||
294 | } | ||
295 | //cout << enemyProjectiles.size() << endl; | ||
296 | l2 = enemies.begin(); | ||
297 | while(l2 != enemies.end()) | ||
298 | { | ||
299 | frameEnemy(*l2,time); | ||
300 | if((*l2)->hp <= 0) | ||
301 | { | ||
302 | highscore += (*l2)->score; | ||
303 | gold += (*l2)->gold; | ||
304 | if(user->addExp((*l2)->exp)) | ||
305 | { | ||
306 | cout << "Level Up!" << endl; | ||
307 | user->gold += user->getLevel() * 15; | ||
308 | cout << "Got " << user->getLevel() * 15 << "gold to compromise for the missing Skillsystem!" << endl; | ||
309 | } | ||
310 | delete *l2; | ||
311 | l2 = enemies.erase(l2); | ||
312 | } | ||
313 | else if(ooB(*l2,screen) && (*l2)->current == (*l2)->path.size()-1 && (*l2)->path[(*l2)->current] == make_pair((*l2)->x,(*l2)->y)) | ||
314 | { | ||
315 | delete *l2; | ||
316 | l2 = enemies.erase(l2); | ||
317 | } | ||
318 | else | ||
319 | l2++; | ||
320 | } | ||
321 | // cout << s->energy << endl; | ||
322 | if(s->hp <= 0) | ||
323 | return LEVEL_FAILED; | ||
324 | vector<Projectile*> moreProjectiles = s->frame(time,screen); | ||
325 | for(int i = 0; i < (int) moreProjectiles.size(); ++i) | ||
326 | friendlyProjectiles.push_back(moreProjectiles[i]); | ||
327 | |||
328 | //apply background | ||
329 | BG->frame(1/60.0); | ||
330 | BG->draw(screen); | ||
331 | |||
332 | //draws all Objects | ||
333 | for(list<EnemyShip*>::iterator i = enemies.begin(); i!= enemies.end();++i) | ||
334 | { | ||
335 | (*i)->draw(screen); | ||
336 | } | ||
337 | for(list<Projectile*>::iterator i = friendlyProjectiles.begin(); i!= friendlyProjectiles.end();++i) | ||
338 | { | ||
339 | (*i)->draw(screen); | ||
340 | } | ||
341 | for(list<Projectile*>::iterator i = enemyProjectiles.begin(); i!= enemyProjectiles.end();++i) | ||
342 | { | ||
343 | (*i)->draw(screen); | ||
344 | } | ||
345 | s->draw(screen); | ||
346 | return 0; | ||
347 | } | ||
348 | |||
349 | |||
350 | |||
351 | HUD::HUD(long long *nhighscore, double *nhp, double nhpmax, double *nenergy, double nmaxEnergy, double* ngold, double* nexp) | ||
352 | { | ||
353 | font = NULL; | ||
354 | textColor.r = 255; | ||
355 | textColor.g = 255; | ||
356 | textColor.b = 255; | ||
357 | highscore = nhighscore; | ||
358 | hp = nhp; | ||
359 | hpmax = nhpmax; | ||
360 | energy = nenergy; | ||
361 | maxEnergy = nmaxEnergy; | ||
362 | gold = ngold; | ||
363 | exp = nexp; | ||
364 | energyRaw = loadBMP("data/images/energy_raw2.bmp"); | ||
365 | SDL_Surface *bubbles = loadBMP("data/images/energy_bubbles3.bmp"); | ||
366 | energyBubbles = new SlidingBackground(bubbles,0,-200); | ||
367 | energyMasc = loadBMP("data/images/energy_masc2.bmp"); | ||
368 | hpRaw = loadBMP("data/images/hp_raw.bmp"); | ||
369 | hpMasc = loadBMP("data/images/hp_masc2.bmp"); | ||
370 | background = loadBMP("data/images/hud_background.bmp"); | ||
371 | font = TTF_OpenFont("data/fonts/OpenSans-Semibold.ttf",12); | ||
372 | if(font == NULL) | ||
373 | { | ||
374 | cout << "Error loading font in HUD" << endl; | ||
375 | } | ||
376 | Uint32 colorkey = SDL_MapRGB(energyMasc->format,255 , 255, 255); | ||
377 | SDL_SetColorKey(energyMasc, 0, colorkey); | ||
378 | SDL_SetColorKey(energyMasc, SDL_SRCCOLORKEY, colorkey); | ||
379 | SDL_SetColorKey(hpMasc, 0, colorkey); | ||
380 | SDL_SetColorKey(hpMasc, SDL_SRCCOLORKEY, colorkey); | ||
381 | } | ||
382 | |||
383 | HUD::~HUD() | ||
384 | { | ||
385 | SDL_FreeSurface(energyRaw); | ||
386 | delete energyBubbles; | ||
387 | SDL_FreeSurface(energyMasc); | ||
388 | SDL_FreeSurface(hpRaw); | ||
389 | SDL_FreeSurface(hpMasc); | ||
390 | TTF_CloseFont(font); | ||
391 | } | ||
392 | |||
393 | void HUD::draw(SDL_Surface* screen) | ||
394 | { | ||
395 | |||
396 | //applying HUD-background | ||
397 | SDL_Rect dest,src; | ||
398 | dest.x = 300; | ||
399 | dest.y = 0; | ||
400 | SDL_BlitSurface(background,NULL,screen,&dest); | ||
401 | //making a SDL_Surface to hold the bar as it is being painted | ||
402 | SDL_Surface *energyBar = copyImage(energyRaw); | ||
403 | dest.x = 0; | ||
404 | dest.y = 0; | ||
405 | dest.w = energyBar->w; | ||
406 | dest.h = energyBar->h; | ||
407 | SDL_FillRect(energyBar,&dest,0); | ||
408 | //drawing Raw energy | ||
409 | int energyPixel = (energyRaw->h * *energy / maxEnergy); | ||
410 | dest.x = 0; | ||
411 | dest.y = energyBar->h - energyPixel; | ||
412 | src.w = energyRaw->w; | ||
413 | src.h = energyPixel; | ||
414 | src.x = 0; | ||
415 | src.y = energyRaw->h - src.h; | ||
416 | SDL_BlitSurface(energyRaw,&src,energyBar,&dest); | ||
417 | |||
418 | //apply bubbles | ||
419 | energyBubbles->ySpeed = -60* (3.0-1.5 * *energy/ maxEnergy); | ||
420 | energyBubbles->frame(1/60.0); | ||
421 | SDL_Surface *bubbles = copyImage(energyRaw); | ||
422 | dest.x = 0; | ||
423 | dest.y = 0; | ||
424 | dest.w = energyBar->w; | ||
425 | dest.h = energyBar->h; | ||
426 | SDL_FillRect(bubbles,&dest,0x00000102); | ||
427 | energyBubbles->draw(bubbles); | ||
428 | //amount by wich the bubbles extend further than the raw energy | ||
429 | int surplus = 6 - 5* *energy/ maxEnergy; | ||
430 | src.w = energyBar->w; | ||
431 | src.h = min(energyPixel+surplus,energyBar->h); | ||
432 | src.x = 0; | ||
433 | src.y = energyRaw->h - src.h; | ||
434 | dest.x = 0; | ||
435 | dest.y = energyBar->h - min(energyPixel+surplus,energyBar->h); | ||
436 | SDL_BlitSurface(bubbles,&src,energyBar,&dest); | ||
437 | SDL_FreeSurface(bubbles); | ||
438 | //lay masc over everything | ||
439 | dest.y = energyBar->h - energyMasc->h; | ||
440 | src.w = energyMasc->w; | ||
441 | src.h = energyMasc->h; | ||
442 | src.x = 0; | ||
443 | src.y = 0; | ||
444 | SDL_BlitSurface(energyMasc,&src,energyBar,&dest); | ||
445 | dest.x = 320; | ||
446 | dest.y = 480 - energyBar->h; | ||
447 | SDL_BlitSurface(energyBar,NULL,screen,&dest); | ||
448 | SDL_FreeSurface(energyBar); | ||
449 | |||
450 | //drawing Raw hp | ||
451 | SDL_Surface *hpBar = copyImage(hpRaw); | ||
452 | dest.x = 0; | ||
453 | dest.y = 0; | ||
454 | dest.w = hpRaw->w; | ||
455 | dest.h = hpRaw->h; | ||
456 | SDL_FillRect(hpBar,&dest,0); | ||
457 | int hpPixel = (hpRaw->h * *hp / hpmax); | ||
458 | dest.x = 0; | ||
459 | dest.y = hpBar->h - hpPixel; | ||
460 | src.w = hpBar->w; | ||
461 | src.h = hpPixel; | ||
462 | src.x = 0; | ||
463 | src.y = hpRaw->h - src.h; | ||
464 | SDL_BlitSurface(hpRaw,&src,hpBar,&dest); | ||
465 | |||
466 | //lay masc over everything | ||
467 | dest.x = 0; | ||
468 | dest.y = hpBar->h - hpMasc->h; | ||
469 | src.w = hpMasc->w; | ||
470 | src.h = hpMasc->h; | ||
471 | src.x = 0; | ||
472 | src.y = 0; | ||
473 | SDL_BlitSurface(hpMasc,&src,hpBar,&dest); | ||
474 | dest.x = 360; | ||
475 | dest.y = 480-hpBar->h; | ||
476 | SDL_BlitSurface(hpBar,NULL,screen,&dest); | ||
477 | SDL_FreeSurface(hpBar); | ||
478 | |||
479 | string mtemp; | ||
480 | SDL_Surface *message = NULL; | ||
481 | //display highscore | ||
482 | mtemp = "highscore: " + lltostr(*highscore); | ||
483 | message = TTF_RenderText_Solid(font, mtemp.c_str(),textColor); | ||
484 | if(message == NULL) | ||
485 | { | ||
486 | cout << "error rendering text in HUD" << endl; | ||
487 | } | ||
488 | dest.x = 316; | ||
489 | dest.y = 14; | ||
490 | SDL_BlitSurface(message,NULL,screen,&dest); | ||
491 | SDL_FreeSurface(message); | ||
492 | //display gold | ||
493 | mtemp = "gold: " + lltostr(*gold); | ||
494 | message = TTF_RenderText_Solid(font, mtemp.c_str(),textColor); | ||
495 | if(message == NULL) | ||
496 | { | ||
497 | cout << "error rendering text in HUD" << endl; | ||
498 | } | ||
499 | dest.x = 316; | ||
500 | dest.y = 30; | ||
501 | SDL_BlitSurface(message,NULL,screen,&dest); | ||
502 | SDL_FreeSurface(message); | ||
503 | //display exp | ||
504 | mtemp = "exp: " + lltostr(*exp); | ||
505 | message = TTF_RenderText_Solid(font, mtemp.c_str(),textColor); | ||
506 | if(message == NULL) | ||
507 | { | ||
508 | cout << "error rendering text in HUD" << endl; | ||
509 | } | ||
510 | dest.x = 316; | ||
511 | dest.y = 46; | ||
512 | SDL_BlitSurface(message,NULL,screen,&dest); | ||
513 | SDL_FreeSurface(message); | ||
514 | } | ||
515 | |||
516 | |||
517 | LevelEvent* createEvent(ifstream& ins) | ||
518 | { | ||
519 | cout << "this Event is not yet implemented!" << endl; | ||
520 | return NULL; | ||
521 | } | ||
522 | |||
523 | |||
524 | |||
525 | //generates a Wave of enemies | ||
526 | //[t-t0,path] | ||
527 | vector<pair<double,vector<pair<double,double> > > > generateWave(int number, int Nweapons,SDL_Surface* screen) | ||
528 | { | ||
529 | double margin = 20; | ||
530 | double spawnLength = screen->w - 80; | ||
531 | vector<pair<double,vector<pair<double,double> > > > result; | ||
532 | bool symmetric = true; | ||
533 | if(number % 2 || rand()%2) | ||
534 | symmetric = false; | ||
535 | if(symmetric) | ||
536 | number /= 2; | ||
537 | bool done = false; | ||
538 | int mirror = rand()%2; | ||
539 | int attemps = 0; | ||
540 | while(!done && attemps < 1000) | ||
541 | { | ||
542 | attemps++; | ||
543 | int type = rand()%5; | ||
544 | switch(type) | ||
545 | { | ||
546 | case 0:{ | ||
547 | //diagonal line | ||
548 | if(number > 2) | ||
549 | { | ||
550 | done = true; | ||
551 | double dur = (rand()%500)/50.0; | ||
552 | for(int i = 0; i < number; ++i) | ||
553 | { | ||
554 | vector<pair<double, double> > path; | ||
555 | double spawnx; | ||
556 | spawnx = margin + spawnLength*i/((double) number); | ||
557 | if(mirror) | ||
558 | spawnx = screen->w - spawnx; | ||
559 | path.push_back(make_pair(spawnx,screen->h+margin)); | ||
560 | path.push_back(make_pair(spawnx,-margin)); | ||
561 | result.push_back(make_pair(dur - dur/number*i,path)); | ||
562 | } | ||
563 | } | ||
564 | break; | ||
565 | } | ||
566 | case 1:{ | ||
567 | //chaotic | ||
568 | if(!symmetric && number > 7) | ||
569 | { | ||
570 | done = true; | ||
571 | double dur = sqrt(number) * (rand()%1000)/500.0; | ||
572 | for(int i = 0; i < number; ++i) | ||
573 | { | ||
574 | vector<pair<double, double> > path; | ||
575 | double spawnx = margin + rand()%10000/10000.0*spawnLength; | ||
576 | path.push_back(make_pair(spawnx,screen->h+margin)); | ||
577 | path.push_back(make_pair(spawnx,-margin)); | ||
578 | result.push_back(make_pair(dur*((rand()%1000)/1000.0),path)); | ||
579 | } | ||
580 | } | ||
581 | break; | ||
582 | } | ||
583 | case 2:{ | ||
584 | if(number > 2) | ||
585 | { | ||
586 | //down diagonalup down | ||
587 | done = true; | ||
588 | double dur = (rand()%500)/50.0; | ||
589 | for(int i = 0; i < number; ++i) | ||
590 | { | ||
591 | vector<pair<double, double> > path; | ||
592 | double spawnx; | ||
593 | spawnx = margin + spawnLength*i/((double) number); | ||
594 | if(mirror) | ||
595 | spawnx = screen->w - spawnx; | ||
596 | path.push_back(make_pair(spawnx,screen->h-3*margin)); | ||
597 | path.push_back(make_pair(screen->w-spawnx,2*margin)); | ||
598 | path.push_back(make_pair(screen->w-spawnx,screen->h+margin)); | ||
599 | path.push_back(make_pair(spawnx,-margin)); | ||
600 | result.push_back(make_pair(dur/((double) number)*i,path)); | ||
601 | |||
602 | } | ||
603 | } | ||
604 | break; | ||
605 | } | ||
606 | case 3:{ | ||
607 | //back and forth at top | ||
608 | if(number < 5 && Nweapons > 0) | ||
609 | { | ||
610 | done = true; | ||
611 | int baf = min(rand()%6+1,rand()%6+1); | ||
612 | int right = rand()%2; | ||
613 | double spawnx; | ||
614 | if(right) | ||
615 | spawnx = screen->w - margin; | ||
616 | else | ||
617 | spawnx = margin; | ||
618 | for(int j = 0; j < number; ++j) | ||
619 | { | ||
620 | vector<pair<double, double> > path; | ||
621 | for(int i = 0; i < baf; ++i) | ||
622 | { | ||
623 | if(right) | ||
624 | path.push_back(make_pair(screen->w-spawnx,2*margin)); | ||
625 | else | ||
626 | path.push_back(make_pair(margin,2*margin)); | ||
627 | right = !right; | ||
628 | } | ||
629 | if(right) | ||
630 | path.push_back(make_pair(margin,screen->h+margin)); | ||
631 | else | ||
632 | path.push_back(make_pair(screen->w-spawnx,screen->h + margin)); | ||
633 | path.push_back(make_pair(spawnx,-margin)); | ||
634 | result.push_back(make_pair(j/(rand()%3+2),path)); | ||
635 | } | ||
636 | } | ||
637 | break; | ||
638 | } | ||
639 | case 4:{ | ||
640 | //circles | ||
641 | done = true; | ||
642 | int rounds = min(rand()%2+1,rand()%2+1); | ||
643 | double spawnx = margin; | ||
644 | if(mirror) | ||
645 | spawnx = screen->w - margin; | ||
646 | for(int j = 0; j < number; ++j) | ||
647 | { | ||
648 | vector<pair<double, double> > path; | ||
649 | for(int i = 0; i < rounds*20; ++i) | ||
650 | { | ||
651 | if(mirror) | ||
652 | path.push_back(make_pair(screen->w*0.2*cos(2*M_PI*i/20.0)+screen->w/2.0,screen->w*0.2*sin(2*M_PI*i/20.0)+screen->h/2.0)); | ||
653 | else | ||
654 | path.push_back(make_pair(screen->w*0.2*cos(2*M_PI*i/20.0)+screen->w/2.0,-screen->w*0.2*sin(2*M_PI*i/20.0)+screen->h/2.0)); | ||
655 | } | ||
656 | if(right) | ||
657 | path.push_back(make_pair(margin,screen->h+margin)); | ||
658 | else | ||
659 | path.push_back(make_pair(screen->w-spawnx,screen->h + margin)); | ||
660 | path.push_back(make_pair(spawnx,-margin)); | ||
661 | result.push_back(make_pair(j/sqrt(number)*1.5,path)); | ||
662 | } | ||
663 | break; | ||
664 | } | ||
665 | default:{} | ||
666 | } | ||
667 | } | ||
668 | int oldsize = result.size(); | ||
669 | if(symmetric) | ||
670 | for(int i = 0; i < oldsize; ++i) | ||
671 | { | ||
672 | vector<pair<double, double> > path; | ||
673 | for(int j = 0; j < (int) result[i].second.size(); ++j) | ||
674 | { | ||
675 | path.push_back(make_pair(screen->w-result[i].second[j].first,result[i].second[j].second)); | ||
676 | } | ||
677 | result.push_back(make_pair(result[i].first,path)); | ||
678 | } | ||
679 | if(attemps == 1000) | ||
680 | cout << "failed to generate wave with " << number << " units!" << endl; | ||
681 | return result; | ||
682 | } | ||
683 | |||
684 | /*structure of a LevelFile | ||
685 | IntroLevel #name | ||
686 | data/images/bg_stars.bmp #path of background | ||
687 | 30 #speed of background | ||
688 | 1 #wether to randomize background position | ||
689 | 60 #duration [s] | ||
690 | 12346543 #seed | ||
691 | 2 #number of Shiptypes | ||
692 | data/tork_capsule.txt #path of Ship | ||
693 | 50 #how many of them should spawn | ||
694 | data/tork_spacerocket.txt #path of Ship | ||
695 | 12 #how many | ||
696 | 1 #how many events shall happen | ||
697 | 0.5 #percentage of completion the event happens | ||
698 | ****event***** #an event as specified in createEvent | ||
699 | */ | ||
700 | LevelGenerator::LevelGenerator(string filename, Account* user, SDL_Surface* nscreen) | ||
701 | { | ||
702 | vector<int> shouldSpawn; | ||
703 | screen = nscreen; | ||
704 | SDL_Surface* fakeScreen = loadBMP("data/images/game_screen.bmp"); | ||
705 | current = 0; | ||
706 | completed = 0; | ||
707 | event = false; | ||
708 | |||
709 | ifstream ins; | ||
710 | ins.open(filename.c_str()); | ||
711 | if(!ins.is_open()) | ||
712 | { | ||
713 | cout << "Error: Could not open Level file " << filename << endl; | ||
714 | return; | ||
715 | } | ||
716 | getline(ins, name); | ||
717 | string backgroundPath; | ||
718 | getline(ins, backgroundPath); | ||
719 | SDL_Surface* background = loadBMP(backgroundPath); | ||
720 | OH = new ObjectHandler(user, fakeScreen,background); | ||
721 | UserShip *s = user->ships[user->current]; | ||
722 | hud = new HUD(&OH->highscore, &s->hp, s->maxhp, &s->energy, s->maxEnergy, &OH->gold, user->getExpPointer()); | ||
723 | ins >> OH->BG->ySpeed; | ||
724 | bool rdbg; | ||
725 | ins >> rdbg; | ||
726 | OH->BG->setRandom(rdbg); | ||
727 | ins >> duration; | ||
728 | ins >> seed; | ||
729 | int NShipTypes; | ||
730 | ins >> NShipTypes; | ||
731 | for(;NShipTypes;NShipTypes--) | ||
732 | { | ||
733 | char workaround; | ||
734 | //discards \n | ||
735 | ins >> workaround; | ||
736 | string shipFilename; | ||
737 | getline(ins, shipFilename); | ||
738 | EnemyShip* enemy = new EnemyShip(workaround + shipFilename); | ||
739 | prototypes.push_back(enemy); | ||
740 | for(int l = 0; l < (int) enemy->weapons.size(); ++l) | ||
741 | for(int i = 0; i < (int) enemy->weapons[l]->sounds.size(); ++i) | ||
742 | for(int j = 0; j < (int) enemy->weapons[l]->sounds[i].size(); ++j) | ||
743 | toDelete.push_back(enemy->weapons[l]->sounds[i][j]); | ||
744 | int number; | ||
745 | ins >> number; | ||
746 | shouldSpawn.push_back(number); | ||
747 | } | ||
748 | int NEvents; | ||
749 | ins >> NEvents; | ||
750 | for(;NEvents;NEvents--) | ||
751 | { | ||
752 | double eventtime = 0; | ||
753 | ins >> eventtime; | ||
754 | events.push_back(make_pair(eventtime,createEvent(ins))); | ||
755 | } | ||
756 | s->x = OH->screen->w/2; | ||
757 | s->y = OH->screen->h - 30; | ||
758 | srand(seed); | ||
759 | //Fill up the Queue | ||
760 | double spawnTotal = 0; | ||
761 | int spawnMax = 0; | ||
762 | for(int i = 0; i < (int) shouldSpawn.size(); ++i) | ||
763 | { | ||
764 | spawnTotal += shouldSpawn[i]; | ||
765 | spawnMax = max(spawnMax,shouldSpawn[i]); | ||
766 | } | ||
767 | for(int i = 0; i < (int) prototypes.size(); ++i) | ||
768 | { | ||
769 | int rest = shouldSpawn[i]; | ||
770 | int Nwaves = shouldSpawn[i]*duration/spawnTotal/(rand()%8+2.5); | ||
771 | if(Nwaves == 0) | ||
772 | Nwaves = 1; | ||
773 | vector<int> willSpawn; | ||
774 | for(int j = 0; j < Nwaves; ++j) | ||
775 | { | ||
776 | willSpawn.push_back(rest/(Nwaves-j)); | ||
777 | rest -= willSpawn[j]; | ||
778 | } | ||
779 | //random the evenly distributed wavesizes a bit | ||
780 | if(Nwaves > 1) | ||
781 | for(int j = 0; j < Nwaves; ++j) | ||
782 | { | ||
783 | int temp = 1; | ||
784 | if(shouldSpawn[i]/Nwaves >= 2) | ||
785 | { | ||
786 | temp = rand()%((int) shouldSpawn[i]/Nwaves); | ||
787 | temp = min(temp,rand()%((int) shouldSpawn[i]/Nwaves)); | ||
788 | temp = min(temp,rand()%((int) shouldSpawn[i]/Nwaves)); | ||
789 | temp = min(temp,rand()%((int) shouldSpawn[i]/Nwaves)); | ||
790 | } | ||
791 | if(temp == 0) | ||
792 | temp = 1; | ||
793 | int index = rand()%Nwaves; | ||
794 | if(willSpawn[j] < temp) | ||
795 | temp = willSpawn[j]; | ||
796 | if(willSpawn[j] - temp < sqrt(shouldSpawn[i])/3) | ||
797 | temp = willSpawn[j]; | ||
798 | |||
799 | willSpawn[j] -= temp; | ||
800 | willSpawn[index] += temp; | ||
801 | } | ||
802 | // cout << "Waves randomed a bit!" << endl; | ||
803 | // cout << "Generated for " << i << endl; | ||
804 | // cout << Nwaves << " waves" << endl; | ||
805 | // for(int l = 0; l < Nwaves; ++l) | ||
806 | // { | ||
807 | // cout << willSpawn[l] << " "; | ||
808 | // } | ||
809 | // cout << endl; | ||
810 | double currentTime = 1; | ||
811 | //generate the waves | ||
812 | for(int j = 0; j < (int) willSpawn.size(); ++j) | ||
813 | { | ||
814 | if(willSpawn[j] > 0) | ||
815 | { | ||
816 | //determine the time of the wave | ||
817 | if((j != 0 || shouldSpawn[i] != spawnMax) && ((int) (duration - currentTime)/(Nwaves-j)*2) > 1) | ||
818 | { | ||
819 | currentTime += min(duration- currentTime - 15, (double) (rand()%((int) (duration - currentTime)/(Nwaves-j)*2))); | ||
820 | } | ||
821 | vector<pair<double, vector<pair<double,double> > > > temp = generateWave(willSpawn[j],prototypes[i]->weapons.size(),OH->screen); | ||
822 | int realSpawn = 0; | ||
823 | for(int k = 0; k < (int) temp.size(); ++k) | ||
824 | { | ||
825 | spawnQueue.push_back(make_pair((temp[k].first+currentTime)/duration,make_pair(i,temp[k].second))); | ||
826 | realSpawn++; | ||
827 | } | ||
828 | } | ||
829 | } | ||
830 | |||
831 | // int attemps = 0; | ||
832 | // while(rest && attemps < 1000) | ||
833 | // { | ||
834 | // double waveTime = rand()%10000/10000.0*(duration-15)/duration; | ||
835 | // if(!(rand()%3)) | ||
836 | // waveTime = max(waveTime,rand()%1000/1000.0-15/duration); | ||
837 | // int NperWave = 0; | ||
838 | // if(rest < 3) | ||
839 | // NperWave = rand()%2 + 1; | ||
840 | // else | ||
841 | // { | ||
842 | // NperWave = rand()%((int) (shouldSpawn[i]/1.8 - shouldSpawn[i]/10.0))+1; | ||
843 | // NperWave = min(NperWave, (int) rand()%((int) (shouldSpawn[i]/1.8 - shouldSpawn[i]/10.0)))+1; | ||
844 | // NperWave = min(NperWave, (int) rand()%((int) (shouldSpawn[i]/1.8 - shouldSpawn[i]/10.0)))+1; | ||
845 | // } | ||
846 | //// cout << waveTime << " " << rest << " " << NperWave << endl; | ||
847 | // if(NperWave > rest) | ||
848 | // NperWave = rest; | ||
849 | // vector<pair<double, vector<pair<double,double> > > > temp = generateWave(NperWave,OH->screen); | ||
850 | // for(int j = 0; j < (int) temp.size(); ++j) | ||
851 | // { | ||
852 | // spawnQueue.push_back(make_pair(temp[j].first/duration+waveTime,make_pair(i,temp[j].second))); | ||
853 | // } | ||
854 | // rest-= NperWave; | ||
855 | // attemps++; | ||
856 | // } | ||
857 | // if(attemps == 1000) | ||
858 | // cout << "failed to generate level at unit " << i << endl; | ||
859 | } | ||
860 | sort(spawnQueue.begin(),spawnQueue.end()); | ||
861 | // for(int i = 0; i < spawnQueue.size(); ++i) | ||
862 | // { | ||
863 | // cout << spawnQueue[i].first | ||
864 | // } | ||
865 | srand(time(0)); | ||
866 | |||
867 | } | ||
868 | |||
869 | LevelGenerator::~LevelGenerator() | ||
870 | { | ||
871 | SDL_FreeSurface(OH->screen); | ||
872 | delete OH; | ||
873 | for(int i = 0; i < (int) prototypes.size(); ++i) | ||
874 | delete prototypes[i]; | ||
875 | for(int i = 0; i < (int) events.size(); ++i) | ||
876 | delete events[i].second; | ||
877 | delete hud; | ||
878 | for(int i = 0; i < (int) toDelete.size(); ++i) | ||
879 | delete toDelete[i]; | ||
880 | } | ||
881 | |||
882 | int LevelGenerator::frame(double time) | ||
883 | { | ||
884 | // double oldcompleted = completed; | ||
885 | completed += time / duration; | ||
886 | if(!event) | ||
887 | { | ||
888 | //cout << current << " " << completed << endl; | ||
889 | //spawn enemies | ||
890 | while(current != (int) spawnQueue.size() && spawnQueue[current].first < completed) | ||
891 | { | ||
892 | EnemyShip* enemy = new EnemyShip(*prototypes[spawnQueue[current].second.first]); | ||
893 | enemy->x = spawnQueue[current].second.second[spawnQueue[current].second.second.size()-1].first; | ||
894 | enemy->y = spawnQueue[current].second.second[spawnQueue[current].second.second.size()-1].second; | ||
895 | spawnQueue[current].second.second.pop_back(); | ||
896 | enemy->path = spawnQueue[current].second.second; | ||
897 | OH->spawnEnemy(enemy, enemy->x,enemy->y); | ||
898 | OH->frameEnemy(enemy, (completed - spawnQueue[current].first) * duration); | ||
899 | current++; | ||
900 | } | ||
901 | if(completed > 1) | ||
902 | { | ||
903 | return LEVEL_COMPLETED; | ||
904 | } | ||
905 | } | ||
906 | |||
907 | |||
908 | int result = OH->frame(time); | ||
909 | SDL_Rect r; | ||
910 | r.w = screen->w; | ||
911 | r.h = screen->h; | ||
912 | r.x = 0; | ||
913 | r.y = 0; | ||
914 | SDL_FillRect(screen,&r,0); | ||
915 | r.w = OH->screen->w; | ||
916 | r.h = OH->screen->h; | ||
917 | r.x = 0; | ||
918 | r.y = 0; | ||
919 | r.w+=2; | ||
920 | r.h+=2; | ||
921 | SDL_FillRect(screen,&r,0xFFFFFFFF); | ||
922 | r.x = 1; | ||
923 | r.y = 1; | ||
924 | r.w--; | ||
925 | r.h--; | ||
926 | SDL_BlitSurface(OH->screen,NULL,screen,&r); | ||
927 | hud->draw(screen); | ||
928 | return result; | ||
929 | } | ||
diff --git a/engine.h b/engine.h new file mode 100644 index 0000000..fad0642 --- /dev/null +++ b/engine.h | |||
@@ -0,0 +1,119 @@ | |||
1 | #ifndef ENGINE_H | ||
2 | #define ENGINE_H | ||
3 | |||
4 | #include "enginecore.h" | ||
5 | #include "GUI.h" | ||
6 | |||
7 | #define LEVEL_COMPLETED 2 | ||
8 | #define LEVEL_FAILED 1 | ||
9 | |||
10 | using namespace std; | ||
11 | |||
12 | |||
13 | class Account: public Levelable | ||
14 | { | ||
15 | public: | ||
16 | string name; | ||
17 | double gold; | ||
18 | long long highscore; | ||
19 | //owned ships | ||
20 | vector<UserShip*> ships; | ||
21 | //the ship currently used | ||
22 | int current; | ||
23 | //owned weapons that are not in ships | ||
24 | vector<Weapon*> weapons; | ||
25 | //list of succesfully played levels | ||
26 | vector<int> levels; | ||
27 | |||
28 | Account(); | ||
29 | Account(string filename); | ||
30 | ~Account(); | ||
31 | void save(); | ||
32 | |||
33 | void resetShips(); | ||
34 | }; | ||
35 | |||
36 | //game engine. deletes everything it gets besides account and screen | ||
37 | class ObjectHandler | ||
38 | { | ||
39 | protected: | ||
40 | list<Projectile*> friendlyProjectiles; | ||
41 | list<Projectile*> enemyProjectiles; | ||
42 | list<EnemyShip*> enemies; | ||
43 | public: | ||
44 | SlidingBackground* BG; | ||
45 | long long highscore; | ||
46 | double gold; | ||
47 | Account* user; | ||
48 | SDL_Surface* screen; | ||
49 | ObjectHandler(Account* newuser,SDL_Surface* newscreen, SDL_Surface *background); | ||
50 | ~ObjectHandler(); | ||
51 | int frame(double time); | ||
52 | void frameEnemy(EnemyShip* s, double time); | ||
53 | void spawnEnemy(EnemyShip* enemy,double nx, double ny); | ||
54 | }; | ||
55 | |||
56 | class HUD | ||
57 | { | ||
58 | SDL_Surface* energyRaw; | ||
59 | SlidingBackground* energyBubbles; | ||
60 | SDL_Surface* energyMasc; | ||
61 | double Bubblesypos; | ||
62 | SDL_Surface* hpRaw; | ||
63 | SDL_Surface* hpMasc; | ||
64 | SDL_Surface *background; | ||
65 | TTF_Font *font; | ||
66 | public: | ||
67 | long long* highscore; | ||
68 | double* hp; | ||
69 | double hpmax; | ||
70 | double* energy; | ||
71 | double maxEnergy; | ||
72 | double *gold; | ||
73 | double *exp; | ||
74 | SDL_Color textColor; | ||
75 | HUD(long long *nhighscore, double *nhp, double nhpmax, double *nenergy, double nmaxEnergy, double* ngold, double* nexp); | ||
76 | ~HUD(); | ||
77 | void draw(SDL_Surface *screen); | ||
78 | }; | ||
79 | |||
80 | class LevelEvent | ||
81 | { | ||
82 | }; | ||
83 | |||
84 | LevelEvent* createEvent(ifstream& ins); | ||
85 | |||
86 | class LevelGenerator | ||
87 | { | ||
88 | Uint32 seed; | ||
89 | HUD *hud; | ||
90 | //collects the soundfiles that have been loaded and cleans them | ||
91 | vector<Mix_Chunk*> toDelete; | ||
92 | public: | ||
93 | //what ships will come in the Level -bosses | ||
94 | vector<EnemyShip*> prototypes; | ||
95 | vector<pair<double,LevelEvent*> > events; | ||
96 | //duration of the level -bosses | ||
97 | double duration; | ||
98 | //[(spawn%,(enemytype,path))] of each enemy | ||
99 | vector<pair<double,pair<int,vector<pair<double,double> > > > > spawnQueue; | ||
100 | int current; | ||
101 | //if there is currently an event happening | ||
102 | bool event; | ||
103 | //% of level completed | ||
104 | double completed; | ||
105 | ObjectHandler* OH; | ||
106 | string name; | ||
107 | SDL_Surface* screen; | ||
108 | |||
109 | LevelGenerator(string filename, Account* user, SDL_Surface* screen); | ||
110 | ~LevelGenerator(); | ||
111 | int frame(double time); | ||
112 | }; | ||
113 | |||
114 | vector<pair<double,vector<pair<double,double> > > > generateWave(int number, int Nweapons,SDL_Surface* screen); | ||
115 | |||
116 | |||
117 | |||
118 | |||
119 | #endif | ||
diff --git a/enginecore.cpp b/enginecore.cpp new file mode 100644 index 0000000..047511e --- /dev/null +++ b/enginecore.cpp | |||
@@ -0,0 +1,835 @@ | |||
1 | #include "enginecore.h" | ||
2 | |||
3 | DObject::DObject(){}; | ||
4 | |||
5 | DObject::DObject(string filename, double newx, double newy) | ||
6 | { | ||
7 | image = NULL; | ||
8 | image = loadBMP(filename); | ||
9 | if(!image) | ||
10 | cout << "Problem loading file!" << endl; | ||
11 | x = newx; | ||
12 | y = newy; | ||
13 | } | ||
14 | |||
15 | DObject::DObject(SDL_Surface* newImage, double newx, double newy) | ||
16 | { | ||
17 | image = NULL; | ||
18 | image = copyImage(newImage); | ||
19 | if(!image) | ||
20 | cout << "Problem loading file!" << endl; | ||
21 | x = newx; | ||
22 | y = newy; | ||
23 | } | ||
24 | |||
25 | DObject::DObject(const DObject &o) | ||
26 | { | ||
27 | image = NULL; | ||
28 | image = copyImage(o.image); | ||
29 | if(!image) | ||
30 | cout << "Problem copying file!" << endl; | ||
31 | x = o.x; | ||
32 | y = o.y; | ||
33 | } | ||
34 | |||
35 | DObject::~DObject() | ||
36 | { | ||
37 | SDL_FreeSurface(image); | ||
38 | } | ||
39 | |||
40 | void DObject::draw(SDL_Surface* screen) | ||
41 | { | ||
42 | SDL_Rect position; | ||
43 | position.x = x - image->w / 2.0; | ||
44 | position.y = y - image->h / 2.0; | ||
45 | SDL_BlitSurface(image,NULL,screen,&position); | ||
46 | } | ||
47 | |||
48 | //checks if DObject is out of Bounds | ||
49 | bool ooB(const DObject* o, SDL_Surface* screen) | ||
50 | { | ||
51 | if(o->x < 0) | ||
52 | return true; | ||
53 | if(o->y < 0) | ||
54 | return true; | ||
55 | if(o->x > screen->w) | ||
56 | return true; | ||
57 | if(o->y > screen->h) | ||
58 | return true; | ||
59 | return false; | ||
60 | } | ||
61 | |||
62 | double armorF(double damage, double armor) | ||
63 | { | ||
64 | if(armor > 0) | ||
65 | armor *= armor/(armor+damage); | ||
66 | damage *= pow(0.5,armor/50); | ||
67 | return damage; | ||
68 | } | ||
69 | |||
70 | |||
71 | Levelable::Levelable() | ||
72 | { | ||
73 | exp = 0; | ||
74 | level = 1; | ||
75 | lin = 30; | ||
76 | quad = 10; | ||
77 | cube = 2; | ||
78 | next = lin; | ||
79 | } | ||
80 | |||
81 | int Levelable::addExp(double moreExp) | ||
82 | { | ||
83 | int levelups = 0; | ||
84 | exp += moreExp; | ||
85 | while(exp > next) | ||
86 | { | ||
87 | levelups++; | ||
88 | level++; | ||
89 | next += lin; | ||
90 | lin += quad; | ||
91 | quad += cube; | ||
92 | } | ||
93 | return levelups; | ||
94 | } | ||
95 | |||
96 | int Levelable::getLevel() | ||
97 | { | ||
98 | return level; | ||
99 | } | ||
100 | |||
101 | double Levelable::getExp() | ||
102 | { | ||
103 | return exp; | ||
104 | } | ||
105 | |||
106 | double* Levelable::getExpPointer() | ||
107 | { | ||
108 | return &exp; | ||
109 | } | ||
110 | |||
111 | |||
112 | Projectile::Projectile(SDL_Surface* newimage, double newx, double newy, double newdamage, double newcollisionSize, double newxSpeed, double newySpeed) : DObject(newimage, newx, newy) | ||
113 | { | ||
114 | damage = newdamage; | ||
115 | collisionSize = newcollisionSize; | ||
116 | xSpeed = newxSpeed; | ||
117 | ySpeed = newySpeed; | ||
118 | armorPiercing = 0; | ||
119 | } | ||
120 | |||
121 | Projectile::Projectile(const Projectile& P) : DObject((DObject) P) | ||
122 | { | ||
123 | damage = P.damage; | ||
124 | armorPiercing = P.armorPiercing; | ||
125 | collisionSize = P.collisionSize; | ||
126 | xSpeed = P.xSpeed; | ||
127 | ySpeed = P.ySpeed; | ||
128 | } | ||
129 | |||
130 | /*structure of a ProjectileFile | ||
131 | data/projectile2.bmp #path of the imagefile | ||
132 | data/sounds/spit #path of the soundfile without n.wav for int n | ||
133 | 10 #damage | ||
134 | 2 #armorPiercing | ||
135 | 1.4142 #collisionSize | ||
136 | */ | ||
137 | Projectile::Projectile(string filename, vector<Mix_Chunk*>& sounds) | ||
138 | { | ||
139 | ifstream ins; | ||
140 | ins.open(filename.c_str()); | ||
141 | if(!ins.is_open()) | ||
142 | { | ||
143 | cout << "Error: Could not load from file " << filename << endl; | ||
144 | } | ||
145 | string imageFilename; | ||
146 | getline(ins, imageFilename); | ||
147 | image = loadBMP(imageFilename); | ||
148 | string soundPath; | ||
149 | getline(ins, soundPath); | ||
150 | bool good = true; | ||
151 | long long files = 1; | ||
152 | while(good) | ||
153 | { | ||
154 | string actualPath = soundPath + lltostr(files) + ".wav"; | ||
155 | Mix_Chunk* temp = NULL; | ||
156 | temp = Mix_LoadWAV(actualPath.c_str()); | ||
157 | if(temp == NULL) | ||
158 | good = false; | ||
159 | else | ||
160 | sounds.push_back(temp); | ||
161 | ++files; | ||
162 | } | ||
163 | ins >> damage; | ||
164 | ins >> armorPiercing; | ||
165 | ins >> collisionSize; | ||
166 | } | ||
167 | |||
168 | void Projectile::frame(double time) | ||
169 | { | ||
170 | x += xSpeed*time; | ||
171 | y += ySpeed*time; | ||
172 | } | ||
173 | |||
174 | void Projectile::rotateAccordingly() | ||
175 | { | ||
176 | double norm = sqrt(xSpeed*xSpeed + ySpeed*ySpeed); | ||
177 | if(norm != 0) | ||
178 | { | ||
179 | double angle = asin(xSpeed / norm); | ||
180 | if(ySpeed < 0) | ||
181 | { | ||
182 | angle = M_PI-angle; | ||
183 | } | ||
184 | SDL_Surface* temp = image; | ||
185 | image = rotozoomSurface(image,angle/M_PI*180,1,0); | ||
186 | SDL_FreeSurface(temp); | ||
187 | } | ||
188 | } | ||
189 | |||
190 | |||
191 | |||
192 | Item::Item(const Item& item):DObject((DObject) item) | ||
193 | { | ||
194 | cost = item.cost; | ||
195 | sellable = item.sellable; | ||
196 | } | ||
197 | |||
198 | Item::Item(const DObject& dObject):DObject(dObject) | ||
199 | { | ||
200 | } | ||
201 | |||
202 | SDL_Surface* Item::getImage() | ||
203 | { | ||
204 | return image; | ||
205 | } | ||
206 | |||
207 | Weapon::Weapon(const Weapon& w):Item((Item) w) | ||
208 | { | ||
209 | playSound = true; | ||
210 | for(int i = 0; i < (int) w.prototypes.size(); ++i) | ||
211 | { | ||
212 | prototypes.push_back(new Projectile(*w.prototypes[i])); | ||
213 | } | ||
214 | for(int i = 0; i < (int) w.sounds.size(); ++i) | ||
215 | { | ||
216 | vector<Mix_Chunk*> temp; | ||
217 | for(int j = 0; j < (int) w.sounds[i].size(); ++j) | ||
218 | { | ||
219 | temp.push_back(w.sounds[i][j]); | ||
220 | } | ||
221 | sounds.push_back(temp); | ||
222 | } | ||
223 | sellable = w.sellable; | ||
224 | cost = w.cost; | ||
225 | active = true; | ||
226 | energyUsage = w.energyUsage; | ||
227 | name = w.name; | ||
228 | cooldown = w.cooldown; | ||
229 | startTimer = w.startTimer; | ||
230 | currentTimer = startTimer; | ||
231 | } | ||
232 | |||
233 | /* structure of a Weaponfile: | ||
234 | epic imbaweapon of massdestruction #name | ||
235 | data/weapon89.bmp #filename of image of weapon | ||
236 | 0.5 #energyusage | ||
237 | 0 #sellable | ||
238 | 10000000 #cost | ||
239 | 2 #number of distinguished Projectiles | ||
240 | 1 #cooldown | ||
241 | 0.5 #startTimer | ||
242 | data/projectile11.txt #path | ||
243 | 0 #xSpeed | ||
244 | 700 #-ySpeed | ||
245 | 5 #cooldown | ||
246 | 0 #startTimer | ||
247 | data/projectile14.txt #path | ||
248 | 0 #xSpeed | ||
249 | 500 #-ySpeed | ||
250 | */ | ||
251 | Weapon::Weapon(string filename) | ||
252 | { | ||
253 | playSound = true; | ||
254 | ifstream ins; | ||
255 | ins.open(filename.c_str()); | ||
256 | if(!ins.is_open()) | ||
257 | { | ||
258 | cout << "Error: Could not open file " << filename << endl; | ||
259 | } | ||
260 | getline(ins,name); | ||
261 | string imageFilename; | ||
262 | getline(ins, imageFilename); | ||
263 | // cout << imageFilename << endl; | ||
264 | image = loadBMP(imageFilename); | ||
265 | active = true; | ||
266 | ins >> energyUsage; | ||
267 | ins >> sellable; | ||
268 | ins >> cost; | ||
269 | int Nprojectiles; | ||
270 | ins >> Nprojectiles; | ||
271 | for(;Nprojectiles;Nprojectiles--) | ||
272 | { | ||
273 | double temp; | ||
274 | ins >> temp; | ||
275 | cooldown.push_back(temp); | ||
276 | ins >> temp; | ||
277 | startTimer.push_back(temp); | ||
278 | string projectileFilename; | ||
279 | //this workaround discards all \n | ||
280 | char workaround; | ||
281 | ins >> workaround; | ||
282 | getline(ins,projectileFilename); | ||
283 | vector<Mix_Chunk*> projectileSounds; | ||
284 | prototypes.push_back(new Projectile(workaround + projectileFilename, projectileSounds)); | ||
285 | ins >> prototypes[prototypes.size()-1]->xSpeed; | ||
286 | ins >> prototypes[prototypes.size()-1]->ySpeed; | ||
287 | prototypes[prototypes.size()-1]->ySpeed *= -1; | ||
288 | sounds.push_back(projectileSounds); | ||
289 | } | ||
290 | currentTimer = startTimer; | ||
291 | ins.close(); | ||
292 | if(cost == 0) | ||
293 | cost = round_beautiful(estimateValue(*this)); | ||
294 | } | ||
295 | |||
296 | Weapon::~Weapon() | ||
297 | { | ||
298 | for(int i = 0; i < (int) prototypes.size(); ++i) | ||
299 | delete prototypes[i]; | ||
300 | } | ||
301 | |||
302 | vector<Projectile*> Weapon::frame(double time) | ||
303 | { | ||
304 | vector<Projectile*> result; | ||
305 | for(int i = 0; i < (int) prototypes.size(); ++i) | ||
306 | { | ||
307 | currentTimer[i] += time; | ||
308 | while(currentTimer[i] > cooldown[i]) | ||
309 | { | ||
310 | Projectile* tempP = new Projectile(*prototypes[i]); | ||
311 | if(sounds[i].size() && playSound) | ||
312 | { | ||
313 | int temp = Mix_PlayChannel(-1,sounds[i][rand()%sounds[i].size()],0); | ||
314 | if(temp == -1) | ||
315 | { | ||
316 | cout << "there was an error playing sound of projectile" << " from weapon " << name << endl; | ||
317 | } | ||
318 | } | ||
319 | tempP->x = x; | ||
320 | tempP->y = y; | ||
321 | tempP->rotateAccordingly(); | ||
322 | currentTimer[i] -= cooldown[i]; | ||
323 | tempP->frame(currentTimer[i]); | ||
324 | result.push_back(tempP); | ||
325 | } | ||
326 | } | ||
327 | return result; | ||
328 | } | ||
329 | |||
330 | void Weapon::mirror() | ||
331 | { | ||
332 | for(int i = 0; i < (int) prototypes.size(); ++i) | ||
333 | prototypes[i]->ySpeed *= -1; | ||
334 | } | ||
335 | |||
336 | double Weapon::getDPS() const | ||
337 | { | ||
338 | double result = 0; | ||
339 | for(int i = 0; i < (int) prototypes.size(); ++i) | ||
340 | result += prototypes[i]->damage/cooldown[i]; | ||
341 | return result; | ||
342 | } | ||
343 | |||
344 | double Weapon::getDPE() const | ||
345 | { | ||
346 | if(energyUsage == 0) | ||
347 | return 0; | ||
348 | return getDPS()/energyUsage; | ||
349 | } | ||
350 | |||
351 | double estimateValue(const Weapon& w) | ||
352 | { | ||
353 | double result = w.getDPS()*w.getDPS()*5; | ||
354 | if(w.getDPE() != 0) | ||
355 | result /= 0.3 + 1 / w.getDPE(); | ||
356 | else | ||
357 | result /= 0.3; | ||
358 | return result; | ||
359 | } | ||
360 | |||
361 | void Upgradeable::setValue(double nvalue) | ||
362 | { | ||
363 | value = nvalue; | ||
364 | } | ||
365 | |||
366 | double Upgradeable::getValue() const | ||
367 | { | ||
368 | return value; | ||
369 | } | ||
370 | |||
371 | Upgradeable::Upgradeable() | ||
372 | { | ||
373 | level = 1; | ||
374 | cost = 0; | ||
375 | maxLevel = 0; | ||
376 | } | ||
377 | |||
378 | Upgradeable::operator double() const | ||
379 | { | ||
380 | return value; | ||
381 | } | ||
382 | |||
383 | Upgradeable& Upgradeable::operator=(const double& d) | ||
384 | { | ||
385 | value = d; | ||
386 | return *this; | ||
387 | } | ||
388 | |||
389 | Upgradeable::Upgradeable(double nvalue) | ||
390 | { | ||
391 | level = 1; | ||
392 | cost = 0; | ||
393 | maxLevel = 0; | ||
394 | value = nvalue; | ||
395 | } | ||
396 | |||
397 | void Upgradeable::upgrade() | ||
398 | { | ||
399 | if(level == maxLevel) | ||
400 | { | ||
401 | cout << "Can't Upgrade! Already at max Level." << endl; | ||
402 | } | ||
403 | level++; | ||
404 | cost += cost * (3+level)/10.0; | ||
405 | value += 0.3*value; | ||
406 | } | ||
407 | |||
408 | |||
409 | void Upgradeable::save(ofstream& o) | ||
410 | { | ||
411 | o << name << endl; | ||
412 | o << value << endl; | ||
413 | o << cost << endl; | ||
414 | o << level << endl; | ||
415 | o << maxLevel << endl; | ||
416 | } | ||
417 | |||
418 | void Upgradeable::load(ifstream& i) | ||
419 | { | ||
420 | char workaround; | ||
421 | i >> workaround; | ||
422 | getline(i,name); | ||
423 | name = workaround + name; | ||
424 | i >> value; | ||
425 | i >> cost; | ||
426 | i >> level; | ||
427 | i >> maxLevel; | ||
428 | } | ||
429 | |||
430 | ifstream& operator>>(ifstream& ins, Upgradeable& u) | ||
431 | { | ||
432 | double d; | ||
433 | ins >> d; | ||
434 | u = d; | ||
435 | return ins; | ||
436 | } | ||
437 | |||
438 | Ship::Ship(string filename,int x, int y):DObject(filename,x,y) | ||
439 | { | ||
440 | collisionSize = image->w; | ||
441 | } | ||
442 | |||
443 | Ship::~Ship() | ||
444 | { | ||
445 | for(int i = 0; i < (int) weapons.size();++i) | ||
446 | delete weapons[i]; | ||
447 | } | ||
448 | |||
449 | vector<Projectile*> Ship::frame(double time) | ||
450 | { | ||
451 | vector<Projectile*> result; | ||
452 | return result; | ||
453 | } | ||
454 | |||
455 | int Ship::hit(const Projectile& P) | ||
456 | { | ||
457 | double tempArmor = 0; | ||
458 | if(armor > 0) | ||
459 | tempArmor = max(tempArmor,armor-P.armorPiercing); | ||
460 | hp -= armorF(P.damage,tempArmor); | ||
461 | if(hp < 0) | ||
462 | return 1; | ||
463 | return 0; | ||
464 | } | ||
465 | |||
466 | Ship::Ship(const Ship& s):DObject((DObject) s) | ||
467 | { | ||
468 | name = s.name; | ||
469 | maxhp = s.maxhp; | ||
470 | hp = maxhp; | ||
471 | moveSpeed = s.moveSpeed; | ||
472 | collisionSize = s.collisionSize; | ||
473 | armor = s.armor; | ||
474 | for(int i = 0; i < (int) s.weapons.size(); ++i) | ||
475 | { | ||
476 | weapons.push_back(new Weapon(*s.weapons[i])); | ||
477 | slotPositions.push_back(s.slotPositions[i]); | ||
478 | } | ||
479 | } | ||
480 | |||
481 | |||
482 | EnemyShip::EnemyShip(const EnemyShip& s): Ship((Ship) s) | ||
483 | { | ||
484 | path = s.path; | ||
485 | gold = s.gold; | ||
486 | exp = s.exp; | ||
487 | score = s.score; | ||
488 | current = 0; | ||
489 | if(!path.size()) | ||
490 | { | ||
491 | path.push_back(make_pair(s.x,s.y)); | ||
492 | } | ||
493 | x = path[0].first; | ||
494 | y = path[0].second; | ||
495 | |||
496 | } | ||
497 | |||
498 | /*structure of an EnemShipfile | ||
499 | Tork Spacerocket #name | ||
500 | data/images/tork_spacerocket.bmp #path of imagefile | ||
501 | 7 #maxhp | ||
502 | 5 #armor | ||
503 | 50 #moveSpeed | ||
504 | 4 #collisionSize | ||
505 | 3 #Gold | ||
506 | 3 #exp | ||
507 | 3 #score | ||
508 | 1 #number of weapons | ||
509 | 0 -1 #relative Position of weapon | ||
510 | data/fireball.txt #path of weapon | ||
511 | */ | ||
512 | EnemyShip::EnemyShip(string filename) | ||
513 | { | ||
514 | current = 0; | ||
515 | path.push_back(make_pair(0,0)); | ||
516 | ifstream ins; | ||
517 | ins.open(filename.c_str()); | ||
518 | if(!ins.is_open()) | ||
519 | cout << "Error: Could not open enemyfile " << filename << endl; | ||
520 | getline(ins, name); | ||
521 | string imagePath; | ||
522 | getline(ins, imagePath); | ||
523 | image = loadBMP(imagePath); | ||
524 | ins >> maxhp; | ||
525 | hp = maxhp; | ||
526 | ins >> armor; | ||
527 | ins >> moveSpeed; | ||
528 | ins >> collisionSize; | ||
529 | ins >> gold; | ||
530 | ins >> exp; | ||
531 | ins >> score; | ||
532 | int Nweapons = 0; | ||
533 | ins >> Nweapons; | ||
534 | for(;Nweapons;Nweapons--) | ||
535 | { | ||
536 | double temp1, temp2; | ||
537 | ins >> temp1; | ||
538 | ins >> temp2; | ||
539 | slotPositions.push_back(make_pair(temp1,temp2)); | ||
540 | //A workaround that helps discarting \n | ||
541 | char workaround; | ||
542 | ins >> workaround; | ||
543 | string weaponpath; | ||
544 | getline(ins, weaponpath); | ||
545 | weapons.push_back(new Weapon(workaround + weaponpath)); | ||
546 | weapons[weapons.size()-1]->mirror(); | ||
547 | } | ||
548 | if(!(exp || gold || score)) | ||
549 | assignValue(); | ||
550 | } | ||
551 | |||
552 | vector<Projectile*> EnemyShip::frame(double time) | ||
553 | { | ||
554 | //adjusting position | ||
555 | while(current != path.size()-1 && path[current] == make_pair(x,y)) | ||
556 | current++; | ||
557 | if(path[current] != make_pair(x,y)) | ||
558 | { | ||
559 | double dirx = path[current].first - x; | ||
560 | double diry = path[current].second - y; | ||
561 | double norm = sqrt(dirx*dirx + diry*diry); | ||
562 | dirx /= norm; | ||
563 | diry /= norm; | ||
564 | if(norm < moveSpeed*time) | ||
565 | { | ||
566 | x = path[current].first; | ||
567 | y = path[current].second; | ||
568 | } | ||
569 | else | ||
570 | { | ||
571 | x += dirx * moveSpeed * time; | ||
572 | y += diry * moveSpeed * time; | ||
573 | } | ||
574 | } | ||
575 | for(int i = 0; i < (int) weapons.size(); ++i) | ||
576 | { | ||
577 | weapons[i]->x = x + slotPositions[i].first; | ||
578 | weapons[i]->y = y + slotPositions[i].second; | ||
579 | // cout << weapons[i]->x << " " << weapons[i]->y << " weapon " << i << endl; | ||
580 | } | ||
581 | |||
582 | |||
583 | vector<Projectile*> result; | ||
584 | for(int i = 0; i < (int) weapons.size(); ++i) | ||
585 | { | ||
586 | vector<Projectile*> temp; | ||
587 | temp = weapons[i]->frame(time); | ||
588 | for(int j = 0; j < (int) temp.size(); ++j) | ||
589 | result.push_back(temp[j]); | ||
590 | } | ||
591 | return result; | ||
592 | } | ||
593 | |||
594 | void EnemyShip::assignValue() | ||
595 | { | ||
596 | exp = 0; | ||
597 | for(int i = 0; i < (int) weapons.size(); ++i) | ||
598 | exp += weapons[i]->getDPS(); | ||
599 | // exp *= 4; | ||
600 | gold = maxhp * pow(2,armor/(50.0+maxhp/10))*2.5; | ||
601 | score = gold * moveSpeed / 140; | ||
602 | double sum = (gold + score + exp)/9; | ||
603 | exp = (int)(sqrt(exp+sum)+0.5); | ||
604 | gold = (int)(sqrt(gold+sum) +0.5); | ||
605 | score = (int)(sqrt(score+sum)+0.5); | ||
606 | // cout << s.name << '\n'; | ||
607 | // cout << "gold: " << s.gold << " -> " << gold << '\n'; | ||
608 | // cout << "high: " << s.score << " -> " << high << '\n'; | ||
609 | // cout << "exp: " << s.exp << " -> " << exp << '\n'; | ||
610 | // cout << "sum: " << sum << '\n'; | ||
611 | } | ||
612 | |||
613 | |||
614 | vector<Upgradeable*> UserShip::getUpgradeables() | ||
615 | { | ||
616 | vector<Upgradeable*> result; | ||
617 | result.push_back(&maxhp); | ||
618 | result.push_back(&armor); | ||
619 | result.push_back(&maxEnergy); | ||
620 | result.push_back(&energyProduction); | ||
621 | result.push_back(&handling); | ||
622 | result.push_back(&moveSpeed); | ||
623 | return result; | ||
624 | } | ||
625 | |||
626 | vector<Projectile*> UserShip::frame(double time, SDL_Surface* screen) | ||
627 | { | ||
628 | vector<Projectile*> result; | ||
629 | //adjust energy | ||
630 | energy += energyProduction*time; | ||
631 | if(energy > maxEnergy) | ||
632 | energy = maxEnergy; | ||
633 | if(shooting) | ||
634 | { | ||
635 | double energyNeed = 0; | ||
636 | for(int i = 0; i < (int) weapons.size(); ++i) | ||
637 | energyNeed += weapons[i]->energyUsage*time; | ||
638 | if(energyNeed < energy) | ||
639 | { | ||
640 | energy -= energyNeed; | ||
641 | for(int i = 0; i < (int) weapons.size(); ++i) | ||
642 | { | ||
643 | vector<Projectile*> temp; | ||
644 | temp = weapons[i]->frame(time); | ||
645 | for(int j = 0; j < (int) temp.size(); ++j) | ||
646 | result.push_back(temp[j]); | ||
647 | } | ||
648 | } | ||
649 | } | ||
650 | |||
651 | //adjust speed and position of the ship | ||
652 | double norm1 = sqrt(right*right + down*down); | ||
653 | double norm2 = sqrt(xSpeed*xSpeed + ySpeed*ySpeed); | ||
654 | double handconst = time*handling; | ||
655 | double speedconst = norm2/moveSpeed; | ||
656 | if(handconst * speedconst > norm2 || norm2 == 0) | ||
657 | { | ||
658 | xSpeed = 0; | ||
659 | ySpeed = 0; | ||
660 | } | ||
661 | else | ||
662 | { | ||
663 | xSpeed *= 1 - speedconst * handconst / norm2; | ||
664 | ySpeed *= 1 - speedconst * handconst / norm2 ; | ||
665 | } | ||
666 | norm2 = sqrt(xSpeed*xSpeed + ySpeed*ySpeed); | ||
667 | if(norm1 != 0) | ||
668 | { | ||
669 | xSpeed += handconst*right / norm1; | ||
670 | ySpeed += handconst*down / norm1; | ||
671 | } | ||
672 | else | ||
673 | { | ||
674 | if(handconst > norm2) | ||
675 | { | ||
676 | xSpeed = 0; | ||
677 | ySpeed = 0; | ||
678 | } | ||
679 | else | ||
680 | { | ||
681 | xSpeed -= handconst * xSpeed / norm2; | ||
682 | ySpeed -= handconst * ySpeed / norm2; | ||
683 | } | ||
684 | } | ||
685 | // cout << xSpeed << " " << ySpeed << endl; | ||
686 | x += xSpeed*time; | ||
687 | y += ySpeed*time; | ||
688 | if(x - image->w/2.0 < 0) | ||
689 | { | ||
690 | x = image->w/2.0; | ||
691 | xSpeed = 0; | ||
692 | } | ||
693 | if(y - image->h/2.0 < 0) | ||
694 | { | ||
695 | y = image->h/2.0; | ||
696 | ySpeed = 0; | ||
697 | } | ||
698 | if(x + image->w/2.0 > screen->w) | ||
699 | { | ||
700 | x = screen->w - image->w/2.0; | ||
701 | xSpeed = 0; | ||
702 | } | ||
703 | if(y + image->h/2.0 > screen->h) | ||
704 | { | ||
705 | y = screen->h - image->h/2.0; | ||
706 | ySpeed = 0; | ||
707 | } | ||
708 | for(int i = 0; i < (int) weapons.size(); ++i) | ||
709 | { | ||
710 | weapons[i]->x = slotPositions[i].first + x; | ||
711 | weapons[i]->y = slotPositions[i].second + y; | ||
712 | } | ||
713 | return result; | ||
714 | } | ||
715 | |||
716 | /*structure of an UserShipfile | ||
717 | small Fighter #name | ||
718 | data/images/small_fighter.bmp #path of imagefile | ||
719 | 200 #cost | ||
720 | 7 #maxhp | ||
721 | 50 #armor | ||
722 | 200 #moveSpeed | ||
723 | 100 #handling | ||
724 | 10 #maxEnergy | ||
725 | 2 #energyProduction | ||
726 | 7 #collisionSize | ||
727 | 2 #number of weapons | ||
728 | 4 4 #relative Position of weapon | ||
729 | 3 #maxSize of attached weapon | ||
730 | data/fireball.txt #path of weapon | ||
731 | 4 4 #relative Position of weapon | ||
732 | 3 #maxSize of attached weapon | ||
733 | data/fireball.txt #path of weapon | ||
734 | */ | ||
735 | UserShip::UserShip(string filename) | ||
736 | { | ||
737 | xSpeed = 0; | ||
738 | ySpeed = 0; | ||
739 | down = 0; | ||
740 | right = 0; | ||
741 | shooting = 0; | ||
742 | ifstream ins; | ||
743 | ins.open(filename.c_str()); | ||
744 | if(!ins.is_open()) | ||
745 | cout << "Error: Could not open userShip " << filename << endl; | ||
746 | getline(ins, name); | ||
747 | string imagePath; | ||
748 | getline(ins, imagePath); | ||
749 | image = loadBMP(imagePath); | ||
750 | ins >> cost; | ||
751 | ins >> maxhp; | ||
752 | maxhp.name = "Hitpoints"; | ||
753 | maxhp.cost = cost/10; | ||
754 | hp = maxhp; | ||
755 | ins >> armor; | ||
756 | armor.name = "Armor"; | ||
757 | armor.cost = cost/10; | ||
758 | ins >> moveSpeed; | ||
759 | moveSpeed.name = "Max Speed"; | ||
760 | moveSpeed.cost = cost/10; | ||
761 | ins >> handling; | ||
762 | handling.name = "Acceleration"; | ||
763 | handling.cost = cost/10; | ||
764 | ins >> maxEnergy; | ||
765 | maxEnergy.name = "Battery"; | ||
766 | maxEnergy.cost = cost/10; | ||
767 | energy = maxEnergy; | ||
768 | ins >> energyProduction; | ||
769 | energyProduction.name = "Generator"; | ||
770 | energyProduction.cost = cost/10; | ||
771 | ins >> collisionSize; | ||
772 | ins >> weaponSlots; | ||
773 | for(int i = 0; i < weaponSlots;i++) | ||
774 | { | ||
775 | double temp1, temp2; | ||
776 | ins >> temp1; | ||
777 | ins >> temp2; | ||
778 | slotPositions.push_back(make_pair(temp1,temp2)); | ||
779 | ins >> temp1; | ||
780 | maxSize.push_back(temp1); | ||
781 | //A workaround that helps discarting \n | ||
782 | char workaround; | ||
783 | ins >> workaround; | ||
784 | string weaponpath; | ||
785 | getline(ins, weaponpath); | ||
786 | weapons.push_back(new Weapon(workaround + weaponpath)); | ||
787 | } | ||
788 | if(cost == 0) | ||
789 | cost = round_beautiful(estimateValue(*this)); | ||
790 | ins.close(); | ||
791 | } | ||
792 | |||
793 | void UserShip::reset() | ||
794 | { | ||
795 | hp = maxhp; | ||
796 | energy = maxEnergy; | ||
797 | xSpeed = 0; | ||
798 | ySpeed = 0; | ||
799 | for(int i = 0; i < (int) weapons.size(); ++i) | ||
800 | { | ||
801 | weapons[i]->playSound = false; | ||
802 | vector<Projectile*> dump = weapons[i]->frame((rand()%2000)/1000.0); | ||
803 | weapons[i]->playSound = true; | ||
804 | for(int j = 0; j < (int) dump.size(); ++j) | ||
805 | delete dump[j]; | ||
806 | } | ||
807 | } | ||
808 | |||
809 | void UserShip::draw(SDL_Surface* screen) | ||
810 | { | ||
811 | DObject::draw(screen); | ||
812 | for(int i = 0; i < (int) weapons.size(); ++i) | ||
813 | weapons[i]->draw(screen); | ||
814 | } | ||
815 | |||
816 | SDL_Surface* UserShip::getImage() | ||
817 | { | ||
818 | return image; | ||
819 | } | ||
820 | |||
821 | double estimateValue(const UserShip& s) | ||
822 | { | ||
823 | double result; | ||
824 | result = s.maxhp * pow(2,s.armor/(50.0+s.maxhp/10)); | ||
825 | result *= result; | ||
826 | result += s.maxEnergy*s.maxEnergy + s.energyProduction * s.energyProduction * 50; | ||
827 | result *= s.weapons.size(); | ||
828 | result *= s.moveSpeed / 300 * s.handling / 300; | ||
829 | |||
830 | return result/11; | ||
831 | } | ||
832 | |||
833 | |||
834 | |||
835 | |||
diff --git a/enginecore.h b/enginecore.h new file mode 100644 index 0000000..5ea49ae --- /dev/null +++ b/enginecore.h | |||
@@ -0,0 +1,190 @@ | |||
1 | #ifndef ENGINECORE_H | ||
2 | #define ENGINECORE_H | ||
3 | |||
4 | #include "util.h" | ||
5 | #include <SDL/SDL_rotozoom.h> | ||
6 | #include <SDL/SDL_mixer.h> | ||
7 | #include <fstream> | ||
8 | #include <list> | ||
9 | #include <algorithm> | ||
10 | |||
11 | using namespace std; | ||
12 | |||
13 | //a drawable object featering an image and a position | ||
14 | class DObject | ||
15 | { | ||
16 | protected: | ||
17 | SDL_Surface* image; | ||
18 | public: | ||
19 | double x; | ||
20 | double y; | ||
21 | |||
22 | DObject(); | ||
23 | DObject(string filename, double newx, double newy); | ||
24 | DObject(SDL_Surface* newImage, double newx, double newy); | ||
25 | DObject(const DObject &o); | ||
26 | virtual ~DObject(); | ||
27 | virtual void draw(SDL_Surface* screen); | ||
28 | }; | ||
29 | |||
30 | bool ooB(const DObject* o, SDL_Surface* screen); | ||
31 | |||
32 | double armorF(double damage, double armor); | ||
33 | |||
34 | class Levelable | ||
35 | { | ||
36 | protected: | ||
37 | double exp; | ||
38 | int level; | ||
39 | public: | ||
40 | double next; | ||
41 | double lin; | ||
42 | double quad; | ||
43 | double cube; | ||
44 | |||
45 | Levelable(); | ||
46 | |||
47 | int addExp(double moreExp); | ||
48 | int getLevel(); | ||
49 | double getExp(); | ||
50 | double* getExpPointer(); | ||
51 | }; | ||
52 | |||
53 | class Projectile: public DObject | ||
54 | { | ||
55 | public: | ||
56 | Projectile(SDL_Surface* newimage, double newx, double newy, double newdamage, double newcollisionsize, double newxSpeed, double newySpeed); | ||
57 | Projectile(const Projectile& P); | ||
58 | Projectile(string filename,vector<Mix_Chunk*>& sounds); | ||
59 | virtual ~Projectile(){}; | ||
60 | double damage; | ||
61 | double armorPiercing; | ||
62 | double collisionSize; | ||
63 | double xSpeed; | ||
64 | double ySpeed; | ||
65 | |||
66 | void frame(double time); | ||
67 | void rotateAccordingly(); | ||
68 | }; | ||
69 | |||
70 | class Item: public DObject | ||
71 | { | ||
72 | public: | ||
73 | double cost; | ||
74 | bool sellable; | ||
75 | Item(const Item& item); | ||
76 | Item(const DObject& dObject); | ||
77 | Item(){}; | ||
78 | SDL_Surface* getImage(); | ||
79 | }; | ||
80 | |||
81 | class Weapon: public Item | ||
82 | { | ||
83 | protected: | ||
84 | vector<double> startTimer; | ||
85 | vector<Projectile*> prototypes; | ||
86 | public: | ||
87 | bool playSound; | ||
88 | vector<vector<Mix_Chunk*> > sounds; | ||
89 | bool active; | ||
90 | string name; | ||
91 | double energyUsage; | ||
92 | vector<double> cooldown; | ||
93 | vector<double> currentTimer; | ||
94 | Weapon(const Weapon& w); | ||
95 | Weapon(string filename); | ||
96 | ~Weapon(); | ||
97 | vector<Projectile*> frame(double time); | ||
98 | void mirror(); | ||
99 | double getDPS() const; | ||
100 | double getDPE() const; | ||
101 | }; | ||
102 | |||
103 | |||
104 | class Upgradeable | ||
105 | { | ||
106 | protected: | ||
107 | double value; | ||
108 | public: | ||
109 | string name; | ||
110 | double cost; | ||
111 | int level; | ||
112 | int maxLevel; | ||
113 | void setValue(double nvalue); | ||
114 | double getValue() const; | ||
115 | Upgradeable(); | ||
116 | Upgradeable(double d); | ||
117 | operator double() const; | ||
118 | Upgradeable& operator=(const double& d); | ||
119 | void upgrade(); | ||
120 | void save(ofstream& o); | ||
121 | void load(ifstream& i); | ||
122 | }; | ||
123 | |||
124 | ifstream& operator>>(ifstream& ins, Upgradeable& u); | ||
125 | |||
126 | class Ship: public DObject | ||
127 | { | ||
128 | public: | ||
129 | Ship(string filename,int x, int y); | ||
130 | Ship(){}; | ||
131 | Ship(const Ship& s); | ||
132 | virtual ~Ship(); | ||
133 | string name; | ||
134 | double hp; | ||
135 | Upgradeable maxhp; | ||
136 | Upgradeable armor; | ||
137 | Upgradeable moveSpeed; | ||
138 | double collisionSize; | ||
139 | vector<Weapon*> weapons; | ||
140 | vector<pair<int, int> > slotPositions; | ||
141 | int hit(const Projectile& P); | ||
142 | // void draw(SDL_Surface* screen); | ||
143 | virtual vector<Projectile*> frame(double time); | ||
144 | }; | ||
145 | |||
146 | class EnemyShip: public Ship | ||
147 | { | ||
148 | public: | ||
149 | vector<pair<double, double> > path; | ||
150 | double gold; | ||
151 | double exp; | ||
152 | double score; | ||
153 | unsigned int current; | ||
154 | EnemyShip(const EnemyShip& s); | ||
155 | EnemyShip(string filename); | ||
156 | vector<Projectile*> frame(double time); | ||
157 | void assignValue(); | ||
158 | }; | ||
159 | |||
160 | class UserShip: public Ship | ||
161 | { | ||
162 | public: | ||
163 | SDL_Surface* getImage(); | ||
164 | double cost; | ||
165 | double energy; | ||
166 | Upgradeable maxEnergy; | ||
167 | Upgradeable energyProduction; | ||
168 | Upgradeable handling; | ||
169 | double xSpeed; | ||
170 | double ySpeed; | ||
171 | int weaponSlots; | ||
172 | vector<double> maxSize; | ||
173 | int right; | ||
174 | int down; | ||
175 | int shooting; | ||
176 | |||
177 | UserShip(string filename); | ||
178 | |||
179 | void draw(SDL_Surface* screen); | ||
180 | vector<Upgradeable*> getUpgradeables(); | ||
181 | void reset(); | ||
182 | |||
183 | vector<Projectile*> frame(double time, SDL_Surface* screen); | ||
184 | }; | ||
185 | |||
186 | double estimateValue(const Weapon& w); | ||
187 | double estimateValue(const UserShip& s); | ||
188 | |||
189 | |||
190 | #endif | ||
diff --git a/knownbugs.txt b/knownbugs.txt new file mode 100644 index 0000000..84ebdc4 --- /dev/null +++ b/knownbugs.txt | |||
@@ -0,0 +1 @@ | |||
randomly segfaults on exit (debuggeroutput was unreliable, probably mistake in makefile and thereby fixed) | |||
diff --git a/main.cpp b/main.cpp new file mode 100644 index 0000000..9cf73d4 --- /dev/null +++ b/main.cpp | |||
@@ -0,0 +1,817 @@ | |||
1 | #include "main.h" | ||
2 | AbstractInteractive* getWeaponInfo(Weapon* w, SDL_Rect target, int textSize) | ||
3 | { | ||
4 | SDL_Rect tRect = target; | ||
5 | tRect.w -= 10; | ||
6 | tRect.x = 0; | ||
7 | tRect.y = 0; | ||
8 | string info; | ||
9 | info += w->name + "\n"; | ||
10 | info += "Cost: " + lltostr(w->cost) + "\n"; | ||
11 | info += "DPS: " + dbltostr(w->getDPS(),1) + "\n"; | ||
12 | info += "DPE: " + dbltostr(w->getDPE(),1) + "\n"; | ||
13 | info += "Energyusage: " + dbltostr(w->energyUsage,1); | ||
14 | TextBox* tb = new TextBox(textField(info, tRect, textSize)); | ||
15 | return new Scrollable(target, tb, tRect, 0, 0); | ||
16 | } | ||
17 | |||
18 | AbstractInteractive* getShipInfo(UserShip* s, SDL_Rect target, int textSize) | ||
19 | { | ||
20 | SDL_Rect tRect = target; | ||
21 | tRect.w -= 10; | ||
22 | tRect.x = 0; | ||
23 | tRect.y = 0; | ||
24 | string info; | ||
25 | info += s->name + "\n"; | ||
26 | info += "Cost: " + lltostr(s->cost) + "\n"; | ||
27 | info += "HP: " + lltostr(s->hp) + "\n"; | ||
28 | info += "Armor: " + lltostr(s->armor) + "\n"; | ||
29 | info += "Energy Storage: " + lltostr(s->maxEnergy) + "\n"; | ||
30 | info += "Energy Production: " + lltostr(s->energyProduction) + "\n"; | ||
31 | info += "Acceleration: " + lltostr(s->handling) + "\n"; | ||
32 | info += "Top Speed: " + lltostr(s->moveSpeed) + "\n"; | ||
33 | info += "Slots: " + lltostr(s->weapons.size()) + "\n"; | ||
34 | TextBox* tb = new TextBox(textField(info, tRect, textSize)); | ||
35 | return new Scrollable(target, tb, tRect, 0, 0); | ||
36 | } | ||
37 | |||
38 | Shop::~Shop() | ||
39 | { | ||
40 | for(int i = 0; i < (int) weapons.size(); ++i) | ||
41 | delete weapons[i]; | ||
42 | for(int i = 0; i < (int) ships.size(); ++i) | ||
43 | delete ships[i]; | ||
44 | delete menu; | ||
45 | delete back; | ||
46 | delete goldLabel; | ||
47 | } | ||
48 | |||
49 | Shop::Shop(Account** nuser, int ngameMenu) | ||
50 | { | ||
51 | user = nuser; | ||
52 | SDL_Rect labelPos; | ||
53 | labelPos.x = 350; | ||
54 | labelPos.y = 18; | ||
55 | labelPos.h = 16; | ||
56 | goldLabel = new Label("gold: " + lltostr((*user)->gold),labelPos); | ||
57 | SDL_Rect subScreen; | ||
58 | subScreen.w = 400; | ||
59 | subScreen.h = 400; | ||
60 | subScreen.x = 50; | ||
61 | subScreen.y = 70; | ||
62 | gameMenu = ngameMenu; | ||
63 | currentWeapon = 0; | ||
64 | currentShip = 0; | ||
65 | SDL_Surface* BG = loadBMP("data/images/bg_stars.bmp"); | ||
66 | SDL_Surface* mbg = SDL_CreateRGBSurface(0,400,400,32,0,0,0,0); | ||
67 | SDL_FillRect(mbg,NULL,0x000102); | ||
68 | SDL_SetColorKey(mbg,SDL_SRCCOLORKEY,0x000102); | ||
69 | vector<string> ts1; | ||
70 | vector<int> ti1; | ||
71 | tu = (*user)->ships[(*user)->current]->getUpgradeables(); | ||
72 | for(int i = 0; i < (int) tu.size(); ++i) | ||
73 | { | ||
74 | ts1.push_back("Upgrade " + tu[i]->name); | ||
75 | // if(tu[i]->cost <= user->gold) | ||
76 | ti1.push_back(i+(1<<7)); | ||
77 | // else | ||
78 | // ti1.push_back(0); | ||
79 | // cout << tu[i]->cost << " " << user->gold << endl; | ||
80 | } | ||
81 | |||
82 | vector<AbstractInteractive*> submenues; | ||
83 | Menu* upgradeMenu = new Menu(ts1, ti1, mbg, false, mbg); | ||
84 | for(int i = 0; i < (int) upgradeMenu->buttons.size(); ++i) | ||
85 | disabledUpgrades.push_back(&upgradeMenu->buttons[i]->deactivated); | ||
86 | submenues.push_back(upgradeMenu); | ||
87 | int height; | ||
88 | |||
89 | //reading available weapons | ||
90 | ifstream ins; | ||
91 | string path = "data/weapons/"; | ||
92 | ins.open((path+"weapons.txt").c_str()); | ||
93 | char workaround; | ||
94 | ins >> workaround; | ||
95 | vector<SDL_Surface*> weaponPics; | ||
96 | SDL_Rect targetRect; | ||
97 | targetRect.x = 400 -58; | ||
98 | targetRect.y = 0; | ||
99 | targetRect.w = 58; | ||
100 | targetRect.h = 400; | ||
101 | SDL_Rect infoRect; | ||
102 | infoRect.x = 50; | ||
103 | infoRect.y = 75; | ||
104 | infoRect.w = 400 - 68; | ||
105 | infoRect.h = 390; | ||
106 | while(ins.good()) | ||
107 | { | ||
108 | string filepath; | ||
109 | getline(ins,filepath); | ||
110 | Weapon* w = new Weapon(path+workaround+filepath); | ||
111 | if(w->sellable) | ||
112 | { | ||
113 | weaponInfos.push_back(getWeaponInfo(w, infoRect, 15)); | ||
114 | weaponPics.push_back(copyImage(w->getImage())); | ||
115 | weapons.push_back(w); | ||
116 | //cout << w->name << ": " << estimateValue(*w) << endl; | ||
117 | } | ||
118 | else | ||
119 | delete w; | ||
120 | ins >> workaround; | ||
121 | } | ||
122 | ins.close(); | ||
123 | SDL_Rect subRect; | ||
124 | subRect.w = 48; | ||
125 | Menu* tempm = new Menu(weaponPics, subRect.w,height, true, false); | ||
126 | subRect.h = height; | ||
127 | Scrollable* temps = new Scrollable(targetRect, tempm, subRect, false, true); | ||
128 | submenues.push_back(temps); | ||
129 | path = "data/ships/user/"; | ||
130 | ins.open((path+"userships.txt").c_str()); | ||
131 | ins >> workaround; | ||
132 | vector<SDL_Surface*> shipPics; | ||
133 | Weapon empty = Weapon("data/weapons/empty.txt"); | ||
134 | while(ins.good()) | ||
135 | { | ||
136 | string filepath; | ||
137 | getline(ins,filepath); | ||
138 | UserShip* s = new UserShip(path+workaround+filepath); | ||
139 | for(int i = 0; i < (int) s->weapons.size(); ++i) | ||
140 | { | ||
141 | delete s->weapons[i]; | ||
142 | s->weapons[i] = new Weapon(empty); | ||
143 | } | ||
144 | if(true)//s->sellable) | ||
145 | { | ||
146 | shipPics.push_back(copyImage(s->getImage())); | ||
147 | shipInfos.push_back(getShipInfo(s, infoRect, 16)); | ||
148 | // cout << s->name << " " << estimateValue(*s) << endl; | ||
149 | ships.push_back(s); | ||
150 | } | ||
151 | else | ||
152 | delete s; | ||
153 | ins >> workaround; | ||
154 | } | ||
155 | ins.close(); | ||
156 | targetRect.x = 400 -58; | ||
157 | targetRect.y = 0; | ||
158 | targetRect.w = 58; | ||
159 | targetRect.h = 400; | ||
160 | subRect.w = 48; | ||
161 | tempm = new Menu(shipPics, subRect.w,height, true, false); | ||
162 | subRect.h = height; | ||
163 | temps = new Scrollable(targetRect, tempm, subRect, false, true); | ||
164 | submenues.push_back(temps); | ||
165 | SDL_Rect backPos; | ||
166 | backPos.x = 0; | ||
167 | backPos.y = subScreen.h + subScreen.y; | ||
168 | backPos.w = 500; | ||
169 | backPos.h = 500 - backPos.y; | ||
170 | int tsize = 0; | ||
171 | back = new Button(backPos, "back", tsize); | ||
172 | int NStates = 3; | ||
173 | int topmargin2 = 45; | ||
174 | backPos.x = 0; | ||
175 | backPos.y = topmargin2; | ||
176 | backPos.w = 500/NStates; | ||
177 | backPos.h = subScreen.y-topmargin2; | ||
178 | tsize = 0; | ||
179 | vector<Button*> choices; | ||
180 | choices.push_back(new Button(backPos, "Upgrades", tsize)); | ||
181 | backPos.x = 500 / NStates; | ||
182 | backPos.y = topmargin2; | ||
183 | backPos.w = 500/NStates; | ||
184 | backPos.h = subScreen.y-topmargin2; | ||
185 | choices.push_back(new Button(backPos, "Weapons", tsize)); | ||
186 | backPos.x = 2* 500 / NStates; | ||
187 | backPos.y = topmargin2; | ||
188 | backPos.w = 500/NStates; | ||
189 | backPos.h = subScreen.y - topmargin2; | ||
190 | choices.push_back(new Button(backPos, "Ships", tsize)); | ||
191 | for(int i = 0; i < (int) choices.size(); ++i) | ||
192 | choices[i]->isDblClckButton = true; | ||
193 | menu = new CompositMenu(submenues, BG, subScreen, choices); | ||
194 | } | ||
195 | |||
196 | int Shop::handleEvents(SDL_Event event){ | ||
197 | int result = 0; | ||
198 | if(back->handleEvents(event) == BUTTON_CLICKED) | ||
199 | result = gameMenu; | ||
200 | int bought = menu->handleEvents(event); | ||
201 | if(menu->getState() == 0 && (bought & 1<<7)) | ||
202 | { | ||
203 | bought -= 1 << 7; | ||
204 | // cout << "tried to buy something!" << endl; | ||
205 | if(tu[bought]->cost <= (*user)->gold) | ||
206 | { | ||
207 | (*user)->gold -= tu[bought]->cost; | ||
208 | double oldvalue = *tu[bought]; | ||
209 | tu[bought]->upgrade(); | ||
210 | double newvalue = *tu[bought]; | ||
211 | cout << "Bought Upgrade from " << oldvalue << " to " << newvalue << endl; | ||
212 | refresh(); | ||
213 | cout << "nextcost: " << tu[bought]->cost << endl; | ||
214 | } | ||
215 | } | ||
216 | if(menu->getState() == 1 && (bought & MENU_CLICK)) | ||
217 | { | ||
218 | bought -= MENU_CLICK; | ||
219 | if(weapons[bought]->cost <= (*user)->gold) | ||
220 | { | ||
221 | (*user)->gold -= weapons[bought]->cost; | ||
222 | bool hasEmptySlot = false; | ||
223 | int EmptySlot; | ||
224 | for(int i = 0; i < (int) (*user)->ships[(*user)->current]->weapons.size(); ++i) | ||
225 | if((*user)->ships[(*user)->current]->weapons[i]->name == "empty Slot") | ||
226 | { | ||
227 | hasEmptySlot = true; | ||
228 | EmptySlot = i; | ||
229 | } | ||
230 | if(hasEmptySlot) | ||
231 | (*user)->ships[(*user)->current]->weapons[EmptySlot] = new Weapon(*weapons[bought]); | ||
232 | else | ||
233 | (*user)->weapons.push_back(new Weapon(*weapons[bought])); | ||
234 | cout << "Bought " << weapons[bought]->name << endl; | ||
235 | refresh(); | ||
236 | } | ||
237 | } | ||
238 | if(menu->getState() == 1 && (bought & MENU_SELECT)) | ||
239 | { | ||
240 | bought -= MENU_SELECT; | ||
241 | currentWeapon = bought; | ||
242 | } | ||
243 | if(menu->getState() == 2 && (bought & MENU_CLICK)) | ||
244 | { | ||
245 | bought -= MENU_CLICK; | ||
246 | if(ships[bought]->cost <= (*user)->gold) | ||
247 | { | ||
248 | (*user)->gold -= ships[bought]->cost; | ||
249 | (*user)->current = (*user)->ships.size(); | ||
250 | (*user)->ships.push_back(new UserShip(*ships[bought])); | ||
251 | cout << "Bought " << ships[bought]->name << endl; | ||
252 | refresh(); | ||
253 | } | ||
254 | } | ||
255 | if(menu->getState() == 2 && (bought & MENU_SELECT)) | ||
256 | { | ||
257 | bought -= MENU_SELECT; | ||
258 | currentShip = bought; | ||
259 | } | ||
260 | return result; | ||
261 | } | ||
262 | void Shop::frame(double time) | ||
263 | { | ||
264 | menu->frame(time); | ||
265 | } | ||
266 | void Shop::draw(SDL_Surface* screen) | ||
267 | { | ||
268 | menu->draw(screen); | ||
269 | SDL_Color textColor; | ||
270 | textColor.r = 255; | ||
271 | textColor.g = 255; | ||
272 | textColor.b = 255; | ||
273 | TTF_Font *font = TTF_OpenFont("data/fonts/OpenSans-Semibold.ttf", 30); | ||
274 | SDL_Surface* headline = NULL; | ||
275 | headline = TTF_RenderText_Solid(font, "Shop",textColor); | ||
276 | if(headline == NULL) | ||
277 | { | ||
278 | cout << "Error rendering headline of shop" << endl; | ||
279 | return; | ||
280 | } | ||
281 | TTF_CloseFont(font); | ||
282 | SDL_Rect headpos; | ||
283 | headpos.x = screen->w/2 - headline->w/2; | ||
284 | headpos.y = 5; | ||
285 | SDL_BlitSurface(headline, NULL, screen, &headpos); | ||
286 | SDL_FreeSurface(headline); | ||
287 | back->draw(screen); | ||
288 | goldLabel->draw(screen); | ||
289 | if(menu->getState() == 1) | ||
290 | weaponInfos[currentWeapon]->draw(screen); | ||
291 | if(menu->getState() == 2) | ||
292 | shipInfos[currentShip]->draw(screen); | ||
293 | } | ||
294 | |||
295 | void Shop::refresh() | ||
296 | { | ||
297 | goldLabel->setCaption("gold: " + lltostr((*user)->gold)); | ||
298 | menu->refresh(); | ||
299 | tu = (*user)->ships[(*user)->current]->getUpgradeables(); | ||
300 | for(int i = 0; i < (int) tu.size(); ++i) | ||
301 | *disabledUpgrades[i] = (*user)->gold < tu[i]->cost; | ||
302 | } | ||
303 | |||
304 | |||
305 | InventoryMenu::~InventoryMenu() | ||
306 | { | ||
307 | delete BG; | ||
308 | delete back; | ||
309 | delete shipMenu; | ||
310 | delete weaponMenu; | ||
311 | for(int i = 0; i < slots.size(); ++i) | ||
312 | delete slots[i]; | ||
313 | SDL_FreeSurface(ship); | ||
314 | delete title; | ||
315 | } | ||
316 | |||
317 | InventoryMenu::InventoryMenu(Account** nuser, int ngameMenu) | ||
318 | { | ||
319 | MX = 0; | ||
320 | MY = 0; | ||
321 | user = nuser; | ||
322 | gameMenu = ngameMenu; | ||
323 | BG = new SlidingBackground(loadBMP("data/images/bg_stars.bmp"), 0, 100); | ||
324 | SDL_Rect backPos; | ||
325 | backPos.x = 0; | ||
326 | backPos.y = 460; | ||
327 | backPos.w = 500; | ||
328 | backPos.h = 500 - backPos.y; | ||
329 | int tsize = 0; | ||
330 | back = new Button(backPos, "back", tsize); | ||
331 | cursor = NULL; | ||
332 | sellDropzone.x = 100; | ||
333 | sellDropzone.h = 40; | ||
334 | sellDropzone.y = 460; | ||
335 | sellDropzone.w = 150; | ||
336 | sellLabel = new Label("SELL",sellDropzone); | ||
337 | SDL_Rect titlePos; | ||
338 | titlePos.x = 0; | ||
339 | titlePos.h = 50; | ||
340 | titlePos.y = 0; | ||
341 | titlePos.w = 500; | ||
342 | title = new Label("Inventory",titlePos); | ||
343 | vector<SDL_Surface*> tships; | ||
344 | for(int i = 0; i < (*user)->ships.size(); ++i) | ||
345 | { | ||
346 | ships.push_back(copyImage((*user)->ships[i]->getImage())); | ||
347 | tships.push_back(copyImage((*user)->ships[i]->getImage())); | ||
348 | } | ||
349 | int height = 0; | ||
350 | Menu* temp = new Menu(tships, 48, height, true, false); | ||
351 | SDL_Rect shipMenuPos; | ||
352 | shipMenuPos.x = 10; | ||
353 | shipMenuPos.y = 50; | ||
354 | shipMenuPos.h = 410; | ||
355 | shipMenuPos.w = 58; | ||
356 | SDL_Rect subRect; | ||
357 | subRect.h = height; | ||
358 | subRect.w = 48; | ||
359 | shipMenu = new Scrollable(shipMenuPos, temp, subRect, 0, 1); | ||
360 | vector<SDL_Surface*> tweapons; | ||
361 | for(int i = 0; i < (*user)->weapons.size(); ++i) | ||
362 | { | ||
363 | weapons.push_back(copyImage((*user)->weapons[i]->getImage())); | ||
364 | tweapons.push_back(copyImage((*user)->weapons[i]->getImage())); | ||
365 | } | ||
366 | height = 0; | ||
367 | temp = new Menu(tweapons, 48, height, false, true); | ||
368 | SDL_Rect weaponMenuPos; | ||
369 | weaponMenuPos.x = 500-68; | ||
370 | weaponMenuPos.y = 50; | ||
371 | weaponMenuPos.h = 410; | ||
372 | weaponMenuPos.w = 58; | ||
373 | subRect.h = height; | ||
374 | subRect.w = 48; | ||
375 | weaponMenu = new Scrollable(weaponMenuPos, temp, subRect, 0, 1); | ||
376 | ship = copyImage((*user)->ships[(*user)->current]->getImage()); | ||
377 | int factor = 1; | ||
378 | while(ship->w < 190 && ship->h < 190) | ||
379 | { | ||
380 | SDL_Surface* temp = ship; | ||
381 | ship = rotozoomSurface(temp, 0, 2, 0); | ||
382 | SDL_FreeSurface(temp); | ||
383 | factor *= 2; | ||
384 | } | ||
385 | for(int i = 0; i < (*user)->ships[(*user)->current]->weapons.size(); ++i) | ||
386 | { | ||
387 | UserShip* s = (*user)->ships[(*user)->current]; | ||
388 | SDL_Rect slotPos; | ||
389 | slotPos.x = 250 - 24 + factor * s->slotPositions[i].first; | ||
390 | slotPos.y = 250 - 24 + factor * s->slotPositions[i].second; | ||
391 | slotPos.w = 48; | ||
392 | slotPos.h = 48; | ||
393 | slots.push_back(new Button(slotPos, copyImage(s->weapons[i]->getImage()), 0)); | ||
394 | } | ||
395 | } | ||
396 | |||
397 | void InventoryMenu::draw(SDL_Surface *screen) | ||
398 | { | ||
399 | BG->draw(screen); | ||
400 | SDL_Rect shipPos; | ||
401 | shipPos.x = 250 - ship->w/2; | ||
402 | shipPos.y = 250 - ship->h/2; | ||
403 | SDL_BlitSurface(ship, NULL, screen, &shipPos); | ||
404 | title->draw(screen); | ||
405 | back->draw(screen); | ||
406 | sellLabel->draw(screen); | ||
407 | shipMenu->draw(screen); | ||
408 | weaponMenu->draw(screen); | ||
409 | for(int i = 0; i < slots.size(); ++i) | ||
410 | slots[i]->draw(screen); | ||
411 | if(cursor != NULL) | ||
412 | { | ||
413 | SDL_Rect cursorPos; | ||
414 | cursorPos.x = MX - cursor->w/2; | ||
415 | cursorPos.y = MY - cursor->h/2; | ||
416 | SDL_BlitSurface(ship,NULL,screen,&cursorPos); | ||
417 | } | ||
418 | } | ||
419 | |||
420 | /*SlidingBackground* BG; | ||
421 | Label* title; | ||
422 | Account** user; | ||
423 | int gameMenu; | ||
424 | Button* back; | ||
425 | Label* sellLabel; | ||
426 | SDL_Rect sellDropzone; | ||
427 | AbstractInteractive* shipMenu; | ||
428 | vector<SDL_Surface*> ships; | ||
429 | AbstractInteractive* weaponMenu; | ||
430 | vector<SDL_Surface*> weapons; | ||
431 | SDL_Rect weaponDropzone; | ||
432 | vector<Button*> slots; | ||
433 | SDL_Surface* ship; | ||
434 | SDL_Surface* cursor;*/ | ||
435 | int InventoryMenu::handleEvents(SDL_Event event) | ||
436 | { | ||
437 | if(event.type == SDL_MOUSEMOTION) | ||
438 | { | ||
439 | MX = event.motion.x; | ||
440 | MY = event.motion.y; | ||
441 | } | ||
442 | int tempShip = shipMenu->handleEvents(event); | ||
443 | if(tempShip & MENU_SELECT) | ||
444 | { | ||
445 | tempShip -= MENU_SELECT; | ||
446 | cout << tempShip << endl; | ||
447 | (*user)->current = tempShip; | ||
448 | refresh(); | ||
449 | } | ||
450 | int tempweapon = weaponMenu->handleEvents(event); | ||
451 | if(tempweapon & MENU_SELECT) | ||
452 | { | ||
453 | tempweapon -= MENU_SELECT; | ||
454 | cout << tempweapon << endl; | ||
455 | cursor = copyImage(weapons[tempweapon]); | ||
456 | dragged = tempweapon; | ||
457 | } | ||
458 | |||
459 | if(event.type == SDL_MOUSEBUTTONUP) | ||
460 | { | ||
461 | if(event.button.button == SDL_BUTTON_LEFT) | ||
462 | { | ||
463 | SDL_FreeSurface(cursor); | ||
464 | cursor = NULL; | ||
465 | int x = event.button.x; | ||
466 | int y = event.button.y; | ||
467 | } | ||
468 | } | ||
469 | |||
470 | |||
471 | |||
472 | |||
473 | int backb = back->handleEvents(event); | ||
474 | if(backb == BUTTON_CLICKED) | ||
475 | return gameMenu; | ||
476 | return 0; | ||
477 | } | ||
478 | |||
479 | void InventoryMenu::frame(double time) | ||
480 | { | ||
481 | BG->frame(time); | ||
482 | } | ||
483 | |||
484 | void InventoryMenu::refresh() | ||
485 | { | ||
486 | if(cursor != NULL) | ||
487 | { | ||
488 | SDL_FreeSurface(cursor); | ||
489 | cursor = NULL; | ||
490 | } | ||
491 | } | ||
492 | |||
493 | bool init(SDL_Surface*& screen) | ||
494 | { | ||
495 | srand(time(0)); | ||
496 | |||
497 | if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) == -1) | ||
498 | { | ||
499 | cout << "Error: Could not initialize SDL" << endl; | ||
500 | return 0; | ||
501 | } | ||
502 | screen = SDL_SetVideoMode(SCREEN_WIDTH,SCREEN_HEIGHT,SCREEN_BPP,SDL_SWSURFACE); | ||
503 | if(!screen) | ||
504 | { | ||
505 | cout << "could not initialize screen" << endl; | ||
506 | return 0; | ||
507 | } | ||
508 | if(TTF_Init() == -1) | ||
509 | { | ||
510 | cout << "could not initialize True Fonts" << endl; | ||
511 | return 0; | ||
512 | } | ||
513 | if(Mix_OpenAudio(22050, MIX_DEFAULT_FORMAT, 2, 4096) == -1) | ||
514 | { | ||
515 | return 0; | ||
516 | } | ||
517 | |||
518 | SDL_WM_SetCaption("RCade - v0.03", NULL); | ||
519 | |||
520 | |||
521 | return 1; | ||
522 | } | ||
523 | |||
524 | Menu* makeLoadGameMenu(SDL_Surface *screen) | ||
525 | { | ||
526 | string bfile = "data/images/bg_stars.bmp"; | ||
527 | SDL_Surface *bg = loadBMP(bfile); | ||
528 | vector<string> ts; | ||
529 | vector<int> ti; | ||
530 | ifstream ins; | ||
531 | ins.open("save/saves.txt"); | ||
532 | char workaround; | ||
533 | ins >> workaround; | ||
534 | int counter = 0; | ||
535 | while(ins.good()) | ||
536 | { | ||
537 | string account; | ||
538 | getline(ins, account); | ||
539 | account = workaround + account; | ||
540 | _tospace(account); | ||
541 | ts.push_back(account); | ||
542 | ti.push_back(counter | LOAD); | ||
543 | counter++; | ||
544 | ins >> workaround; | ||
545 | } | ||
546 | ins.close(); | ||
547 | ts.push_back("back"); | ||
548 | ti.push_back(MENU | 0); | ||
549 | return new Menu(ts,ti,bg,true,screen); | ||
550 | } | ||
551 | |||
552 | Menu* makeMainMenu(SDL_Surface *screen) | ||
553 | { | ||
554 | string bfile = "data/images/bg_stars.bmp"; | ||
555 | SDL_Surface *bg = loadBMP(bfile); | ||
556 | vector<string> ts; | ||
557 | ts.push_back("New Game"); | ||
558 | ts.push_back("Load Game"); | ||
559 | ts.push_back("Settings"); | ||
560 | ts.push_back("Quit"); | ||
561 | vector<int> ti; | ||
562 | ti.push_back(MENU | 5); | ||
563 | ti.push_back(MENU | 4); | ||
564 | ti.push_back(0); | ||
565 | ti.push_back(GAME_QUIT); | ||
566 | return new Menu(ts,ti,bg,true,screen); | ||
567 | } | ||
568 | |||
569 | Menu* makeGameMenu(SDL_Surface *screen) | ||
570 | { | ||
571 | string bfile = "data/images/bg_stars.bmp"; | ||
572 | SDL_Surface *bg = loadBMP(bfile); | ||
573 | vector<string> ts; | ||
574 | ts.push_back("Missions"); | ||
575 | ts.push_back("Shop"); | ||
576 | ts.push_back("Inventory"); | ||
577 | ts.push_back("Skills"); | ||
578 | ts.push_back("Settings"); | ||
579 | ts.push_back("Save Game"); | ||
580 | ts.push_back("Main Menu"); | ||
581 | vector<int> ti; | ||
582 | ti.push_back(MENU | 2); | ||
583 | ti.push_back(MENU | 3); | ||
584 | ti.push_back(MENU | 6); | ||
585 | ti.push_back(0); | ||
586 | ti.push_back(0); | ||
587 | ti.push_back(SAVE); | ||
588 | ti.push_back(MENU | 0); | ||
589 | return new Menu(ts,ti,bg,true,screen); | ||
590 | } | ||
591 | |||
592 | Menu* makeLevelMenu(vector<string> levels, SDL_Surface *screen) | ||
593 | { | ||
594 | string bfile = "data/images/bg_stars.bmp"; | ||
595 | SDL_Surface *bg = loadBMP(bfile); | ||
596 | vector<string> ts; | ||
597 | vector<int> ti; | ||
598 | ifstream ins; | ||
599 | for(int i = 0; i < (int) levels.size(); ++i) | ||
600 | { | ||
601 | ins.open(levels[i].c_str()); | ||
602 | string levelname; | ||
603 | getline(ins,levelname); | ||
604 | ins.close(); | ||
605 | ts.push_back(levelname); | ||
606 | ti.push_back(LEVEL | i); | ||
607 | } | ||
608 | ts.push_back("back"); | ||
609 | ti.push_back(MENU | 1); | ||
610 | return new Menu(ts,ti,bg,true,screen); | ||
611 | } | ||
612 | |||
613 | |||
614 | GameHandler::GameHandler() | ||
615 | { | ||
616 | isGood = true; | ||
617 | screen = NULL; | ||
618 | if(!init(screen)) | ||
619 | isGood = false; | ||
620 | //reading available levels | ||
621 | ifstream ins; | ||
622 | string path = "data/levels/"; | ||
623 | ins.open((path+"levels.txt").c_str()); | ||
624 | char workaround; | ||
625 | ins >> workaround; | ||
626 | while(ins.good()) | ||
627 | { | ||
628 | string filepath; | ||
629 | getline(ins,filepath); | ||
630 | levelpaths.push_back(path+workaround+filepath); | ||
631 | ins >> workaround; | ||
632 | } | ||
633 | ins.close(); | ||
634 | state = MENU | 0; | ||
635 | user = new Account(); | ||
636 | menus.push_back(makeMainMenu(screen)); | ||
637 | menus.push_back(makeGameMenu(screen)); | ||
638 | menus.push_back(makeLevelMenu(levelpaths,screen)); | ||
639 | menus.push_back(new Shop(&user, MENU | 1)); | ||
640 | menus.push_back(makeLoadGameMenu(screen)); | ||
641 | SDL_Surface* bg = loadBMP("data/images/bg_stars.bmp"); | ||
642 | GetStringMenu* mt = new GetStringMenu("Enter your Nickname:", MENU | 0, LEVEL | 0, bg, screen); | ||
643 | acname = &mt->s; | ||
644 | menus.push_back(mt); | ||
645 | user->resetShips(); | ||
646 | menus.push_back(new InventoryMenu(&user, MENU | 1)); | ||
647 | } | ||
648 | |||
649 | GameHandler::~GameHandler() | ||
650 | { | ||
651 | delete user; | ||
652 | if(state &LEVEL) | ||
653 | delete LG; | ||
654 | for(int i = 0; i < (int) menus.size(); ++i) | ||
655 | delete menus[i]; | ||
656 | |||
657 | |||
658 | Mix_CloseAudio(); | ||
659 | TTF_Quit(); | ||
660 | SDL_Quit(); | ||
661 | IMG_Quit(); | ||
662 | } | ||
663 | |||
664 | int GameHandler::game() | ||
665 | { | ||
666 | // SDL_Rect nPos; | ||
667 | // nPos.x = 10; | ||
668 | // nPos.y = 10; | ||
669 | // nPos.w = 200; | ||
670 | // nPos.h = 400; | ||
671 | // TextBox* blub = new TextBox(textField("Dies ist ein doofer Tesptsatzg.\nBBBBBBBBesser nicht allzu sehr beachten, denn der Inhalt ist unwichtig!",nPos,24)); | ||
672 | // cout << nPos.h << endl; | ||
673 | |||
674 | SDL_Event event; | ||
675 | if(!isGood) | ||
676 | return 1; | ||
677 | while(state != GAME_QUIT) | ||
678 | { | ||
679 | Uint32 start = SDL_GetTicks(); | ||
680 | while(SDL_PollEvent(&event)) | ||
681 | { | ||
682 | if(state & MENU) | ||
683 | { | ||
684 | // blub->handleEvents(event); | ||
685 | int newstate = menus[state - MENU]->handleEvents(event); | ||
686 | if(newstate) | ||
687 | { | ||
688 | state = newstate; | ||
689 | if(state & LEVEL) | ||
690 | { | ||
691 | if(*acname != "") | ||
692 | { | ||
693 | delete user; | ||
694 | user = new Account("save/default account.txt"); | ||
695 | user->name = *acname; | ||
696 | menus[5]->refresh(); | ||
697 | menus[3]->refresh(); | ||
698 | user->resetShips(); | ||
699 | } | ||
700 | if(state - LEVEL < 0 || state - LEVEL > (int) levelpaths.size()) | ||
701 | { | ||
702 | cout << "levellinking failed!" << endl; | ||
703 | return 1; | ||
704 | } | ||
705 | user->resetShips(); | ||
706 | LG = new LevelGenerator(levelpaths[state - LEVEL], user, screen); | ||
707 | } | ||
708 | if(state & MENU) | ||
709 | menus[state - MENU]->refresh(); | ||
710 | if(state & LOAD) | ||
711 | { | ||
712 | ifstream ins; | ||
713 | ins.open("save/saves.txt"); | ||
714 | char workaround; | ||
715 | ins >> workaround; | ||
716 | int counter = 0; | ||
717 | while(ins.good()) | ||
718 | { | ||
719 | string account; | ||
720 | getline(ins, account); | ||
721 | if(counter == state - LOAD) | ||
722 | { | ||
723 | account = workaround + account; | ||
724 | delete user; | ||
725 | user = new Account("save/" + account + ".txt"); | ||
726 | menus[3]->refresh(); | ||
727 | menus[6]->refresh(); | ||
728 | user->resetShips(); | ||
729 | state = MENU | 1; | ||
730 | } | ||
731 | counter++; | ||
732 | ins >> workaround; | ||
733 | } | ||
734 | ins.close(); | ||
735 | } | ||
736 | if(state & SAVE) | ||
737 | { | ||
738 | user->save(); | ||
739 | delete menus[4]; | ||
740 | menus[4] = makeLoadGameMenu(screen); | ||
741 | state = MENU | 1; | ||
742 | cout << "Saved!" << endl; | ||
743 | } | ||
744 | } | ||
745 | } | ||
746 | if(event.type == SDL_QUIT) | ||
747 | state = GAME_QUIT; | ||
748 | else if(event.type == SDL_MOUSEBUTTONDOWN) | ||
749 | { | ||
750 | // if(event.button.button == SDL_BUTTON_WHEELUP) | ||
751 | // cout << "Wheel up!" << endl; | ||
752 | // else | ||
753 | // cout << "wheel down..." << endl; | ||
754 | } | ||
755 | } | ||
756 | Uint32 time = SDL_GetTicks()-start; | ||
757 | if(1000/60.0 - time > 0) | ||
758 | SDL_Delay(1000/60.0 - time); | ||
759 | else | ||
760 | cout << "Warning: Frame missed" << endl; | ||
761 | if(state & LEVEL) | ||
762 | { | ||
763 | int status = LG->frame(1/60.0); | ||
764 | if(status == LEVEL_FAILED) | ||
765 | { | ||
766 | state = 1 | MENU; | ||
767 | cout << "You lost the game!\n"; | ||
768 | cout << "highscore: " << LG->OH->highscore << endl; | ||
769 | cout << "Level: " << user->getLevel() << endl; | ||
770 | user->highscore += LG->OH->highscore; | ||
771 | delete LG; | ||
772 | user->resetShips(); | ||
773 | } | ||
774 | else if(status == LEVEL_COMPLETED) | ||
775 | { | ||
776 | state = 1 | MENU; | ||
777 | cout << "You have completed the level!\n"; | ||
778 | cout << "highscore: " << LG->OH->highscore << endl; | ||
779 | cout << "gold: " << LG->OH->gold << endl; | ||
780 | cout << "exp: " << user->getExp() << endl; | ||
781 | cout << "Level: " << user->getLevel() << endl; | ||
782 | user->highscore += LG->OH->highscore; | ||
783 | user->gold += LG->OH->gold; | ||
784 | delete LG; | ||
785 | user->resetShips(); | ||
786 | } | ||
787 | } | ||
788 | if(state & MENU) | ||
789 | { | ||
790 | menus[state - MENU]->frame(1/60.0); | ||
791 | menus[state - MENU]->draw(screen); | ||
792 | // blub->frame(1/60.0); | ||
793 | // blub->draw(screen); | ||
794 | } | ||
795 | SDL_Flip(screen); | ||
796 | } | ||
797 | |||
798 | // delete blub; | ||
799 | |||
800 | return 0; | ||
801 | } | ||
802 | |||
803 | int main(int argc, char* args[]) | ||
804 | { | ||
805 | GameHandler* GH = new GameHandler(); | ||
806 | |||
807 | // Account a = Account(); | ||
808 | // a.name = "Start-Account"; | ||
809 | // a.save(); | ||
810 | // Account b = Account("save/Start-Account.txt"); | ||
811 | // b.save(); | ||
812 | // return 0; | ||
813 | if(GH->game()) | ||
814 | return 1; | ||
815 | delete GH; | ||
816 | return 0; | ||
817 | } | ||
@@ -0,0 +1,114 @@ | |||
1 | /* | ||
2 | THIS PROJECT IS USING OPEN SANS TRUE TYPE FONTS | ||
3 | see: www.google.com/fonts/specimen/Open+Sans | ||
4 | You find a copy ofthe license under /data/fonts/ | ||
5 | */ | ||
6 | |||
7 | #include "engine.h" | ||
8 | |||
9 | using namespace std; | ||
10 | |||
11 | #define LEVEL (1 << 30) | ||
12 | #define MENU (1 << 29) | ||
13 | #define LOAD (1 << 27) | ||
14 | #define SAVE (1 << 26) | ||
15 | #define GAME_QUIT (1 << 28) | ||
16 | |||
17 | |||
18 | const int SCREEN_WIDTH = 500; | ||
19 | const int SCREEN_HEIGHT = 500; | ||
20 | const int SCREEN_BPP = 32; | ||
21 | |||
22 | //class UpgradesMenu: public Menu | ||
23 | //{ | ||
24 | //public: | ||
25 | // vector<string> labels; | ||
26 | // | ||
27 | //}; | ||
28 | |||
29 | class Shop: public AbstractInteractive | ||
30 | { | ||
31 | protected: | ||
32 | Account** user; | ||
33 | vector<Upgradeable*> tu; | ||
34 | vector<Weapon*> weapons; | ||
35 | vector<AbstractInteractive*> weaponInfos; | ||
36 | int currentWeapon; | ||
37 | vector<UserShip*> ships; | ||
38 | vector<AbstractInteractive*> shipInfos; | ||
39 | int currentShip; | ||
40 | vector<bool*> disabledUpgrades; | ||
41 | int gameMenu; | ||
42 | Button* back; | ||
43 | CompositMenu* menu; | ||
44 | Label* goldLabel; | ||
45 | public: | ||
46 | Shop(){} | ||
47 | ~Shop(); | ||
48 | Shop(Account** user, int GameMenu); | ||
49 | void draw(SDL_Surface *screen); | ||
50 | int handleEvents(SDL_Event event); | ||
51 | void frame(double time); | ||
52 | void updateUpgradeMenu(); | ||
53 | virtual void refresh(); | ||
54 | }; | ||
55 | |||
56 | class InventoryMenu: public AbstractInteractive | ||
57 | { | ||
58 | public: | ||
59 | Label* title; | ||
60 | SlidingBackground* BG; | ||
61 | Account** user; | ||
62 | int gameMenu; | ||
63 | Button* back; | ||
64 | Label* sellLabel; | ||
65 | SDL_Rect sellDropzone; | ||
66 | AbstractInteractive* shipMenu; | ||
67 | vector<SDL_Surface*> ships; | ||
68 | AbstractInteractive* weaponMenu; | ||
69 | vector<SDL_Surface*> weapons; | ||
70 | SDL_Rect weaponDropzone; | ||
71 | vector<Button*> slots; | ||
72 | //always NULL if nothing is dragged | ||
73 | SDL_Surface* cursor; | ||
74 | //wich item is currently dragged | ||
75 | int dragged; | ||
76 | int MX; | ||
77 | int MY; | ||
78 | SDL_Surface* ship; | ||
79 | |||
80 | |||
81 | ~InventoryMenu(); | ||
82 | InventoryMenu(Account** user, int ngamMenu); | ||
83 | void draw(SDL_Surface *screen); | ||
84 | int handleEvents(SDL_Event event); | ||
85 | void frame(double time); | ||
86 | void refresh(); | ||
87 | }; | ||
88 | |||
89 | bool init(SDL_Surface*& screen); | ||
90 | |||
91 | Menu* makeMainMenu(SDL_Surface *screen); | ||
92 | Menu* makeGameMenu(SDL_Surface *screen); | ||
93 | Menu* makeLevelMenu(vector<string> levels, SDL_Surface *screen); | ||
94 | |||
95 | class GameHandler | ||
96 | { | ||
97 | private: | ||
98 | Account *user; | ||
99 | SDL_Surface *screen; | ||
100 | LevelGenerator *LG; | ||
101 | vector<AbstractInteractive*> menus; | ||
102 | vector<string> levelpaths; | ||
103 | bool isGood; | ||
104 | int state; | ||
105 | string* acname; | ||
106 | public: | ||
107 | GameHandler(); | ||
108 | ~GameHandler(); | ||
109 | // returns 0 if succesfully quits, 1 otherwise | ||
110 | int game(); | ||
111 | }; | ||
112 | |||
113 | int main(int argc, char* args[]); | ||
114 | |||
diff --git a/makefile b/makefile new file mode 100644 index 0000000..b5fdb2a --- /dev/null +++ b/makefile | |||
@@ -0,0 +1,27 @@ | |||
1 | RM = rm -f | ||
2 | SRCS = main.cpp GUI.cpp util.cpp engine.cpp enginecore.cpp | ||
3 | OBJS = $(subst .cpp,.o,$(SRCS)) | ||
4 | HEADS = $(subst .cpp,.h,$(SRCS)) | ||
5 | CFLAGS = -Wall -ggdb -O2 -c -Wno-sign-compare | ||
6 | LFLAGS = -Wall -ggdb -O2 -lSDL -lSDL_gfx -lSDL_image -lSDL_ttf -lSDL_mixer -Wno-sign-compare | ||
7 | |||
8 | Game: $(OBJS) | ||
9 | g++ $(OBJS) $(LFLAGS) -o Game | ||
10 | |||
11 | main.o: main.cpp $(HEADS) | ||
12 | g++ main.cpp $(CFLAGS) -o main.o | ||
13 | |||
14 | GUI.o: GUI.cpp GUI.h util.h | ||
15 | g++ GUI.cpp $(CFLAGS) -o GUI.o | ||
16 | |||
17 | util.o: util.cpp util.h | ||
18 | g++ util.cpp $(CFLAGS) -o util.o | ||
19 | |||
20 | engine.o: engine.cpp GUI.h util.h engine.h enginecore.h | ||
21 | g++ engine.cpp $(CFLAGS) -o engine.o | ||
22 | |||
23 | enginecore.o: enginecore.cpp util.h enginecore.h | ||
24 | g++ enginecore.cpp $(CFLAGS) -o enginecore.o | ||
25 | |||
26 | clean: | ||
27 | $(RM) $(OBJS) | ||
diff --git a/save/.keep b/save/.keep new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/save/.keep | |||
diff --git a/util.cpp b/util.cpp new file mode 100644 index 0000000..a1cf8e9 --- /dev/null +++ b/util.cpp | |||
@@ -0,0 +1,173 @@ | |||
1 | #include "util.h" | ||
2 | |||
3 | |||
4 | vector<vector<string> > splitString(string s) | ||
5 | { | ||
6 | vector<vector<string> > result; | ||
7 | vector<string> line; | ||
8 | string word; | ||
9 | for(int i = 0; i < (int) s.size(); ++i) | ||
10 | { | ||
11 | if(s[i] == ' ') | ||
12 | { | ||
13 | line.push_back(word); | ||
14 | word = ""; | ||
15 | } | ||
16 | else if(s[i] == '\n') | ||
17 | { | ||
18 | line.push_back(word); | ||
19 | word = ""; | ||
20 | result.push_back(line); | ||
21 | line = vector<string>(); | ||
22 | } | ||
23 | else | ||
24 | word += s[i]; | ||
25 | } | ||
26 | line.push_back(word); | ||
27 | result.push_back(line); | ||
28 | return result; | ||
29 | } | ||
30 | |||
31 | void _tospace(string &s) | ||
32 | { | ||
33 | for(int i = 0; i < (int) s.size(); ++i) | ||
34 | if(s[i] == '_') | ||
35 | s[i] = ' '; | ||
36 | } | ||
37 | |||
38 | void spaceto_(string &s) | ||
39 | { | ||
40 | for(int i = 0; i < (int) s.size(); ++i) | ||
41 | if(s[i] == ' ') | ||
42 | s[i] = '_'; | ||
43 | } | ||
44 | |||
45 | double round_beautiful(double d) | ||
46 | { | ||
47 | if(d == 0) | ||
48 | return d; | ||
49 | double ten = 1; | ||
50 | while(d >= 10) | ||
51 | { | ||
52 | d/= 10; | ||
53 | ten *= 10; | ||
54 | } | ||
55 | while(d < 1) | ||
56 | { | ||
57 | d*= 10; | ||
58 | ten /= 10; | ||
59 | } | ||
60 | vector<double> candidates; | ||
61 | candidates.push_back((int)d); | ||
62 | candidates.push_back(((int)d) + 0.5); | ||
63 | if(ten > 1) | ||
64 | { | ||
65 | candidates.push_back(((int)d)/9.0*10); | ||
66 | } | ||
67 | int closest = 0; | ||
68 | double mindist = 10; | ||
69 | for(int i = 0; i < (int)candidates.size(); ++i) | ||
70 | { | ||
71 | if(mindist > fabs(candidates[i]-d)) | ||
72 | { | ||
73 | mindist = fabs(candidates[i]-d); | ||
74 | closest = i; | ||
75 | } | ||
76 | } | ||
77 | double result = candidates[closest] * ten; | ||
78 | if(closest == 2) | ||
79 | result = (int) result; | ||
80 | return result; | ||
81 | } | ||
82 | |||
83 | SDL_Event relativate(const SDL_Event &e, SDL_Rect p) | ||
84 | { | ||
85 | SDL_Event result = e; | ||
86 | if(e.type == SDL_MOUSEMOTION) | ||
87 | { | ||
88 | result.motion.x -= p.x; | ||
89 | result.motion.y -= p.y; | ||
90 | } | ||
91 | if(e.type == SDL_MOUSEBUTTONDOWN || e.type == SDL_MOUSEBUTTONUP) | ||
92 | { | ||
93 | result.button.x -= p.x; | ||
94 | result.button.y -= p.y; | ||
95 | } | ||
96 | return result; | ||
97 | } | ||
98 | |||
99 | bool inRect(SDL_Rect r, double x, double y) | ||
100 | { | ||
101 | if(x < r.x || x >= r.x + r.w || y < r.y || y >= r.y + r.h) | ||
102 | return false; | ||
103 | return true; | ||
104 | } | ||
105 | |||
106 | SDL_Surface* copyImage(SDL_Surface* s) | ||
107 | { | ||
108 | return SDL_ConvertSurface(s,s->format,SDL_SWSURFACE); | ||
109 | } | ||
110 | |||
111 | |||
112 | //loads a bitmap from file and converts it to screen properties | ||
113 | SDL_Surface* loadBMP(std::string filename) | ||
114 | { | ||
115 | SDL_Surface* loadedImage = NULL; | ||
116 | |||
117 | SDL_Surface* convertedImage = NULL; | ||
118 | |||
119 | loadedImage = IMG_Load(filename.c_str()); | ||
120 | if(loadedImage != NULL) | ||
121 | { | ||
122 | convertedImage = SDL_DisplayFormat(loadedImage); | ||
123 | if(convertedImage) | ||
124 | { | ||
125 | Uint32 colorkey = SDL_MapRGB(convertedImage->format, 0, 1, 2); | ||
126 | SDL_SetColorKey(convertedImage, SDL_SRCCOLORKEY, colorkey); | ||
127 | SDL_FreeSurface(loadedImage); | ||
128 | return convertedImage; | ||
129 | } | ||
130 | cout << "Error: Could not convert Image" << filename << '.' << endl; | ||
131 | } | ||
132 | cout << "Error: Could not load bitmap from file " << filename << endl; | ||
133 | return NULL; | ||
134 | } | ||
135 | |||
136 | |||
137 | string lltostr(const long long& l) | ||
138 | { | ||
139 | stringstream str; | ||
140 | str << l; | ||
141 | return str.str(); | ||
142 | } | ||
143 | |||
144 | string dbltostr(const double& d, int dec) | ||
145 | { | ||
146 | stringstream str; | ||
147 | long long bla = pow(10,dec); | ||
148 | str << ((long long) (bla*d))/((double) bla); | ||
149 | return str.str(); | ||
150 | } | ||
151 | |||
152 | //returns true if the line intersects with the circle (or lies in it) | ||
153 | bool intersects(double radius, double startx, double starty, double endx, double endy) | ||
154 | { | ||
155 | double xdir = endx - startx; | ||
156 | double ydir = endy - starty; | ||
157 | //|dir*lambda+start|<radius | ||
158 | //(xdir^2+ydir^2)*lamda^2 + (xdir*startx + ydir*starty)*lamda + startx^2 + starty^2 - radius^2 = 0; | ||
159 | double a = xdir*xdir + ydir*ydir; | ||
160 | double b = xdir*startx + ydir*starty; | ||
161 | double c = startx*startx + starty*starty - radius*radius; | ||
162 | double dis = b*b - 4 * a * c; | ||
163 | if(dis < 0) | ||
164 | return false; | ||
165 | double sol1 = (-b + sqrt(dis))/(2*a); | ||
166 | if(sol1 < 0) | ||
167 | return false; | ||
168 | double sol2 = (-b - sqrt(dis))/(2*a); | ||
169 | if(sol2 > 1) | ||
170 | return false; | ||
171 | return true; | ||
172 | |||
173 | } | ||
@@ -0,0 +1,39 @@ | |||
1 | #ifndef UTIL_H | ||
2 | #define UTIL_H | ||
3 | |||
4 | #include <vector> | ||
5 | #include <iostream> | ||
6 | #include <math.h> | ||
7 | #include <sstream> | ||
8 | #include <SDL/SDL.h> | ||
9 | #include <SDL/SDL_ttf.h> | ||
10 | #include <SDL/SDL_image.h> | ||
11 | |||
12 | using namespace std; | ||
13 | |||
14 | //splits at '\n' and ' ' | ||
15 | vector<vector<string> > splitString(string s); | ||
16 | |||
17 | //rounds too a beatiful number | ||
18 | double round_beautiful(double d); | ||
19 | |||
20 | void _tospace(string& s); | ||
21 | void spaceto_(string& s); | ||
22 | |||
23 | SDL_Event relativate(const SDL_Event &e, SDL_Rect p); | ||
24 | |||
25 | SDL_Surface* copyImage(SDL_Surface* s); | ||
26 | |||
27 | |||
28 | //loads a bitmap from file and converts it to screen properties | ||
29 | SDL_Surface* loadBMP(std::string filename); | ||
30 | |||
31 | bool inRect(SDL_Rect r, double x, double y); | ||
32 | |||
33 | string lltostr(const long long& l); | ||
34 | string dbltostr(const double& d, int dec); | ||
35 | |||
36 | //returns true if the line intersects with the circle (or lies in it) | ||
37 | bool intersects(double radius, double startx, double starty, double endx, double endy); | ||
38 | |||
39 | #endif | ||