From 354cd9ff21e878c9a34866b0c3916e42e226d105 Mon Sep 17 00:00:00 2001 From: Reimar Date: Sat, 12 Dec 2015 16:20:42 +0100 Subject: Now taking env variable RCADE_DATA and RCADE_SAVE. Default: data/ and save/ . also old saves are not compatible --- GUI.cpp | 38 +- GUI.h | 2 +- data/levels/Level_template.txt | 6 +- data/levels/insanelevel.txt | 14 +- data/levels/introlevel.txt | 8 +- data/levels/level2.txt | 10 +- data/levels/level3.txt | 14 +- data/levels/level4.txt | 8 +- data/projectiles/beam.txt | 4 +- data/projectiles/bigspit.txt | 4 +- data/projectiles/fire1.txt | 4 +- data/projectiles/projectile_template.txt | 4 +- data/projectiles/psi.txt | 4 +- data/projectiles/spit.txt | 4 +- data/ships/EnemyShip_template.txt | 4 +- data/ships/tork/capsule.txt | 2 +- data/ships/tork/cruiser.txt | 6 +- data/ships/tork/interceptor.txt | 8 +- data/ships/tork/spacerocket.txt | 6 +- data/ships/tork/sting.txt | 4 +- data/ships/tork/tanker.txt | 2 +- data/ships/user/UserShip_template.txt | 6 +- data/ships/user/hornet.txt | 8 +- data/ships/user/small_fighter.txt | 6 +- data/weapons/Ubeamer.txt | 31 ++ data/weapons/beamer1.txt | 4 +- data/weapons/beamer2.txt | 8 +- data/weapons/empty.txt | 2 +- data/weapons/fireball1.txt | 4 +- data/weapons/inawaffe.txt | 31 -- data/weapons/nova1.txt | 602 +++++++++++++++---------------- data/weapons/novaspitter1.txt | 14 +- data/weapons/spitter1.txt | 4 +- data/weapons/spitter2.txt | 8 +- data/weapons/spitter3.txt | 16 +- data/weapons/weapon_template.txt | 6 +- data/weapons/weapons.txt | 2 +- engine.cpp | 32 +- enginecore.cpp | 36 +- enginecore.h | 1 + main.cpp | 48 ++- main.h | 2 + save/default account.txt | 40 -- util.h | 1 + 44 files changed, 522 insertions(+), 546 deletions(-) create mode 100644 data/weapons/Ubeamer.txt delete mode 100644 data/weapons/inawaffe.txt delete mode 100644 save/default account.txt diff --git a/GUI.cpp b/GUI.cpp index 7dabac9..45a5d5d 100644 --- a/GUI.cpp +++ b/GUI.cpp @@ -61,7 +61,7 @@ int Label::setCaption(string ncaption) int Label::render() { - TTF_Font *font = TTF_OpenFont("data/fonts/OpenSans-Semibold.ttf",pos.h); + TTF_Font *font = TTF_OpenFont((get_data_path() + "fonts/OpenSans-Semibold.ttf").c_str(),pos.h); image = NULL; image = TTF_RenderText_Solid(font, caption.c_str(),textColor); if(caption.size() == 0) @@ -299,7 +299,7 @@ Button::Button(SDL_Rect npos, string message, int& shouldbeTextSize) bool done = false; while(!done && textSize) { - TTF_Font *font = TTF_OpenFont("data/fonts/OpenSans-Semibold.ttf",textSize); + TTF_Font *font = TTF_OpenFont((get_data_path() + "fonts/OpenSans-Semibold.ttf").c_str(),textSize); normal = NULL; normal = TTF_RenderText_Solid(font, message.c_str(),textColor); if(normal == NULL) @@ -323,7 +323,7 @@ Button::Button(SDL_Rect npos, string message, int& shouldbeTextSize) done = false; while(!done && textSize) { - TTF_Font *font = TTF_OpenFont("data/fonts/OpenSans-Bold.ttf",textSize); + TTF_Font *font = TTF_OpenFont((get_data_path() + "fonts/OpenSans-Bold.ttf").c_str(),textSize); mouseOver = NULL; mouseOver = TTF_RenderText_Solid(font, message.c_str(),textColor); if(mouseOver == NULL) @@ -348,7 +348,7 @@ Button::Button(SDL_Rect npos, string message, int& shouldbeTextSize) textColor.b = 17; textColor.g = 200; textColor.r = 250; - TTF_Font *font = TTF_OpenFont("data/fonts/OpenSans-Semibold.ttf",textSize); + TTF_Font *font = TTF_OpenFont((get_data_path() + "fonts/OpenSans-Semibold.ttf").c_str(),textSize); pressed = NULL; pressed = TTF_RenderText_Solid(font, message.c_str(),textColor); if(pressed == NULL) @@ -537,34 +537,34 @@ Button::Button(SDL_Rect npos, SDL_Surface* content, bool fancy) int size = 48; SDL_Surface* norm = NULL; - norm = IMG_Load("data/images/fancy_button.bmp"); + norm = IMG_Load((get_data_path() + "images/fancy_button.bmp").c_str()); if(norm == NULL) { cout << "Error loading bmp while creating fancy button!" << endl; } SDL_Surface* inac = NULL; - inac = IMG_Load("data/images/fancy_button_unavailable.bmp"); + inac = IMG_Load((get_data_path() + "images/fancy_button_unavailable.bmp").c_str()); if(inac == NULL) { cout << "Error loading bmp while creating fancy button!" << endl; } SDL_Surface* pres = NULL; - pres = IMG_Load("data/images/fancy_button_clicked.bmp"); + pres = IMG_Load((get_data_path() + "images/fancy_button_clicked.bmp").c_str()); if(pres == NULL) { cout << "Error loading bmp while creating fancy button!" << endl; } SDL_Surface* mous = NULL; - mous = IMG_Load("data/images/fancy_button_selected.bmp"); + mous = IMG_Load((get_data_path() + "images/fancy_button_selected.bmp").c_str()); if(mous == NULL) { cout << "Error loading bmp while creating fancy button!" << endl; } - pressed = IMG_Load("data/images/fancy_button_clicked.bmp"); - inactive = IMG_Load("data/images/fancy_button_unavailable.bmp"); - mouseOver = IMG_Load("data/images/fancy_button_selected.bmp"); - normal = IMG_Load("data/images/fancy_button.bmp"); + pressed = IMG_Load((get_data_path() + "images/fancy_button_clicked.bmp").c_str()); + inactive = IMG_Load((get_data_path() + "images/fancy_button_unavailable.bmp").c_str()); + mouseOver = IMG_Load((get_data_path() + "images/fancy_button_selected.bmp").c_str()); + normal = IMG_Load((get_data_path() + "images/fancy_button.bmp").c_str()); SDL_Rect dest; dest.x = size/2 - content->w/2; dest.y = size/2 - content->h/2; @@ -603,7 +603,7 @@ Scrollbar::Scrollbar(SDL_Rect npos) else horizontal = false; dot = NULL; - dot = IMG_Load("data/images/glowing_dot.png"); + dot = IMG_Load((get_data_path() + "images/glowing_dot.png").c_str()); if(!dot) { cout << "Error loading dot for scrollbar!" << endl; @@ -623,13 +623,13 @@ Scrollbar::Scrollbar(SDL_Rect npos) SDL_Surface* barEnd2 = NULL; if(horizontal) { - barEnd1 = IMG_Load("data/images/scrollbar_end_h1.png"); - barEnd2 = IMG_Load("data/images/scrollbar_end_h2.png"); + barEnd1 = IMG_Load((get_data_path() + "images/scrollbar_end_h1.png").c_str()); + barEnd2 = IMG_Load((get_data_path() + "images/scrollbar_end_h2.png").c_str()); } else { - barEnd1 = IMG_Load("data/images/scrollbar_end_v1.png"); - barEnd2 = IMG_Load("data/images/scrollbar_end_v2.png"); + barEnd1 = IMG_Load((get_data_path() + "images/scrollbar_end_v1.png").c_str()); + barEnd2 = IMG_Load((get_data_path() + "images/scrollbar_end_v2.png").c_str()); } if(!barEnd1 || !barEnd2) { @@ -654,9 +654,9 @@ Scrollbar::Scrollbar(SDL_Rect npos) } SDL_Surface* barMiddle = NULL; if(horizontal) - barMiddle = IMG_Load("data/images/scrollbar_h.png"); + barMiddle = IMG_Load((get_data_path() + "images/scrollbar_h.png").c_str()); else - barMiddle = IMG_Load("data/images/scrollbar_v.png"); + barMiddle = IMG_Load((get_data_path() + "images/scrollbar_v.png").c_str()); if(!barMiddle) { cout << "Error in middle of bar!" << endl; diff --git a/GUI.h b/GUI.h index c60e524..180c5b5 100644 --- a/GUI.h +++ b/GUI.h @@ -14,8 +14,8 @@ #define MENU_CLICK 1<<26 -using namespace std; +using namespace std; class Label { diff --git a/data/levels/Level_template.txt b/data/levels/Level_template.txt index fe3ce3d..bb4ba42 100644 --- a/data/levels/Level_template.txt +++ b/data/levels/Level_template.txt @@ -1,13 +1,13 @@ IntroLevel #name -data/images/bg_stars.bmp #path of background +images/bg_stars.bmp #path of background 30 #speed of background 1 #wether to randomize background position 60 #duration [s] 12346543 #seed 2 #number of Shiptypes -data/tork_capsule.txt #path of Ship +tork_capsule.txt #path of Ship 40 #how many of them should spawn -data/tork_spacerocket.txt #path of Ship +tork_spacerocket.txt #path of Ship 8 #how many 1 #how many events shall happen 0.5 #percentage of completion the event happens diff --git a/data/levels/insanelevel.txt b/data/levels/insanelevel.txt index 6fa5f2e..cd9ffe2 100644 --- a/data/levels/insanelevel.txt +++ b/data/levels/insanelevel.txt @@ -1,20 +1,20 @@ Insane Level -data/images/bg_stars.bmp +images/bg_stars.bmp 60 1 40 11374431 6 -data/ships/tork/capsule.txt +ships/tork/capsule.txt 20 -data/ships/tork/spacerocket.txt +ships/tork/spacerocket.txt 25 -data/ships/tork/interceptor.txt +ships/tork/interceptor.txt 6 -data/ships/tork/cruiser.txt +ships/tork/cruiser.txt 10 -data/ships/tork/tanker.txt +ships/tork/tanker.txt 16 -data/ships/tork/sting.txt +ships/tork/sting.txt 45 0 diff --git a/data/levels/introlevel.txt b/data/levels/introlevel.txt index 94d26df..4ad286e 100644 --- a/data/levels/introlevel.txt +++ b/data/levels/introlevel.txt @@ -1,14 +1,14 @@ Introlevel -data/images/bg_stars.bmp +images/bg_stars.bmp 60 1 50 1246436 3 -data/ships/tork/capsule.txt +ships/tork/capsule.txt 140 -data/ships/tork/spacerocket.txt +ships/tork/spacerocket.txt 10 -data/ships/tork/interceptor.txt +ships/tork/interceptor.txt 4 0 diff --git a/data/levels/level2.txt b/data/levels/level2.txt index 1a31fcb..2bbe43b 100644 --- a/data/levels/level2.txt +++ b/data/levels/level2.txt @@ -1,16 +1,16 @@ Level 2 -data/images/bg_stars.bmp +images/bg_stars.bmp 60 1 105 11654436 4 -data/ships/tork/capsule.txt +ships/tork/capsule.txt 160 -data/ships/tork/spacerocket.txt +ships/tork/spacerocket.txt 20 -data/ships/tork/interceptor.txt +ships/tork/interceptor.txt 12 -data/ships/tork/cruiser.txt +ships/tork/cruiser.txt 4 0 diff --git a/data/levels/level3.txt b/data/levels/level3.txt index 212a241..8641772 100644 --- a/data/levels/level3.txt +++ b/data/levels/level3.txt @@ -1,20 +1,20 @@ Level 3 -data/images/bg_stars.bmp +images/bg_stars.bmp 60 1 65 11374331 6 -data/ships/tork/capsule.txt +ships/tork/capsule.txt 120 -data/ships/tork/spacerocket.txt +ships/tork/spacerocket.txt 20 -data/ships/tork/interceptor.txt +ships/tork/interceptor.txt 8 -data/ships/tork/cruiser.txt +ships/tork/cruiser.txt 8 -data/ships/tork/tanker.txt +ships/tork/tanker.txt 80 -data/ships/tork/sting.txt +ships/tork/sting.txt 80 0 diff --git a/data/levels/level4.txt b/data/levels/level4.txt index 7652e9d..bb9629a 100644 --- a/data/levels/level4.txt +++ b/data/levels/level4.txt @@ -1,14 +1,14 @@ Level 4 -data/images/bg_stars.bmp +images/bg_stars.bmp 60 1 50 1246436 3 -data/ships/tork/sting.txt +ships/tork/sting.txt 140 -data/ships/tork/interceptor.txt +ships/tork/interceptor.txt 10 -data/ships/tork/cruiser.txt +ships/tork/cruiser.txt 4 0 diff --git a/data/projectiles/beam.txt b/data/projectiles/beam.txt index 35b6c18..3458633 100644 --- a/data/projectiles/beam.txt +++ b/data/projectiles/beam.txt @@ -1,5 +1,5 @@ -data/images/spit.bmp -data/sounds/piu +images/spit.bmp +sounds/piu 0.3 10 1 diff --git a/data/projectiles/bigspit.txt b/data/projectiles/bigspit.txt index 3da95e6..bdc5254 100644 --- a/data/projectiles/bigspit.txt +++ b/data/projectiles/bigspit.txt @@ -1,5 +1,5 @@ -data/images/bigspit.bmp -data/sounds/bigspit +images/bigspit.bmp +sounds/bigspit 8 0 4 diff --git a/data/projectiles/fire1.txt b/data/projectiles/fire1.txt index 316f367..83217f9 100644 --- a/data/projectiles/fire1.txt +++ b/data/projectiles/fire1.txt @@ -1,5 +1,5 @@ -data/images/fire1.bmp -data/sounds/fire +images/fire1.bmp +sounds/fire 2 10 3.5 diff --git a/data/projectiles/projectile_template.txt b/data/projectiles/projectile_template.txt index 66bd2de..8fd229f 100644 --- a/data/projectiles/projectile_template.txt +++ b/data/projectiles/projectile_template.txt @@ -1,5 +1,5 @@ -data/projectile2.bmp #path of the imagefile -data/sounds/spit #path of the soundfile without n.wav for int n +images/projectile2.bmp #path of the imagefile +sounds/spit #path of the soundfile without n.wav for int n 10 #damage 2 #armorPiercing 1.4142 #collisionSize diff --git a/data/projectiles/psi.txt b/data/projectiles/psi.txt index ed05829..c0f99ac 100644 --- a/data/projectiles/psi.txt +++ b/data/projectiles/psi.txt @@ -1,5 +1,5 @@ -data/images/psi.bmp -data/sounds/piu +images/psi.bmp +sounds/piu 1.5 10000 2.2 diff --git a/data/projectiles/spit.txt b/data/projectiles/spit.txt index 90d0147..9d3c9f0 100644 --- a/data/projectiles/spit.txt +++ b/data/projectiles/spit.txt @@ -1,5 +1,5 @@ -data/images/spit.bmp -data/sounds/spit +images/spit.bmp +sounds/spit 1 0 1.4142 diff --git a/data/ships/EnemyShip_template.txt b/data/ships/EnemyShip_template.txt index 2fdb348..949fc14 100644 --- a/data/ships/EnemyShip_template.txt +++ b/data/ships/EnemyShip_template.txt @@ -1,5 +1,5 @@ Tork Spacerocket #name -data/images/tork_spacerocket.bmp #path of imagefile +images/tork_spacerocket.bmp #path of imagefile 7 #maxhp 5 #armor 50 #moveSpeed @@ -9,4 +9,4 @@ data/images/tork_spacerocket.bmp #path of imagefile 3 #score 1 #number of weapons 0 -1 #relative Position of weapon -data/fireball.txt #path of weapon +fireball.txt #path of weapon diff --git a/data/ships/tork/capsule.txt b/data/ships/tork/capsule.txt index ae60c7f..94986a3 100644 --- a/data/ships/tork/capsule.txt +++ b/data/ships/tork/capsule.txt @@ -1,5 +1,5 @@ Tork Capsule -data/images/ship1.bmp +images/ship1.bmp 0.6 10 140 diff --git a/data/ships/tork/cruiser.txt b/data/ships/tork/cruiser.txt index 11772da..5979ec0 100644 --- a/data/ships/tork/cruiser.txt +++ b/data/ships/tork/cruiser.txt @@ -1,5 +1,5 @@ Tork Cruiser -data/images/tork_cruiser.bmp +images/tork_cruiser.bmp 9 25 30 @@ -9,6 +9,6 @@ data/images/tork_cruiser.bmp 0 2 0 3 -data/weapons/spitter1.txt +weapons/spitter1.txt 0 0 -data/weapons/novaspitter1.txt +weapons/novaspitter1.txt diff --git a/data/ships/tork/interceptor.txt b/data/ships/tork/interceptor.txt index 40e3651..70d9b8b 100644 --- a/data/ships/tork/interceptor.txt +++ b/data/ships/tork/interceptor.txt @@ -1,5 +1,5 @@ Tork Interceptor -data/images/tork_interceptor.bmp +images/tork_interceptor.bmp 8 15 55 @@ -9,8 +9,8 @@ data/images/tork_interceptor.bmp 0 3 5 6 -data/weapons/fireball1.txt +weapons/fireball1.txt -5 6 -data/weapons/fireball1.txt +weapons/fireball1.txt 0 2 -data/weapons/spitter2.txt +weapons/spitter2.txt diff --git a/data/ships/tork/spacerocket.txt b/data/ships/tork/spacerocket.txt index 6d0a929..5f39e43 100644 --- a/data/ships/tork/spacerocket.txt +++ b/data/ships/tork/spacerocket.txt @@ -1,5 +1,5 @@ Tork Spacerocket -data/images/ship2.bmp +images/ship2.bmp 3 10 30 @@ -9,6 +9,6 @@ data/images/ship2.bmp 0 2 4 4 -data/weapons/fireball1.txt +weapons/fireball1.txt -4 4 -data/weapons/fireball1.txt +weapons/fireball1.txt diff --git a/data/ships/tork/sting.txt b/data/ships/tork/sting.txt index 4cd73b1..c29b3d0 100644 --- a/data/ships/tork/sting.txt +++ b/data/ships/tork/sting.txt @@ -1,5 +1,5 @@ Tork Sting -data/images/tork_sting.bmp +images/tork_sting.bmp 4 8 65 @@ -9,4 +9,4 @@ data/images/tork_sting.bmp 0 1 0 0 -data/weapons/fireball1.txt +weapons/fireball1.txt diff --git a/data/ships/tork/tanker.txt b/data/ships/tork/tanker.txt index 04fd19a..9ede361 100644 --- a/data/ships/tork/tanker.txt +++ b/data/ships/tork/tanker.txt @@ -1,5 +1,5 @@ Tork Tanker -data/images/tork_tanker.bmp +images/tork_tanker.bmp 10 40 15 diff --git a/data/ships/user/UserShip_template.txt b/data/ships/user/UserShip_template.txt index ed29661..d26b4bf 100644 --- a/data/ships/user/UserShip_template.txt +++ b/data/ships/user/UserShip_template.txt @@ -1,5 +1,5 @@ small Fighter #name -data/images/small_fighter.bmp #path of imagefile +images/small_fighter.bmp #path of imagefile 300 #cost 10 #maxhp 50 #armor @@ -11,7 +11,7 @@ data/images/small_fighter.bmp #path of imagefile 2 #number of weapons 4 4 #relative Position of weapon 3 #maxSize of attached weapon -data/fireball.txt #path of weapon +fireball.txt #path of weapon 4 4 #relative Position of weapon 3 #maxSize of attached weapon -data/fireball.txt #path of weapon +fireball.txt #path of weapon diff --git a/data/ships/user/hornet.txt b/data/ships/user/hornet.txt index d33c78c..e4e4535 100644 --- a/data/ships/user/hornet.txt +++ b/data/ships/user/hornet.txt @@ -1,5 +1,5 @@ Hornet -data/images/hornet.bmp +images/hornet.bmp 750 23 25 @@ -11,10 +11,10 @@ data/images/hornet.bmp 3 6 -6 3 -data/weapons/empty.txt +weapons/empty.txt -6 -6 3 -data/weapons/empty.txt +weapons/empty.txt 0 -3 3 -data/weapons/empty.txt +weapons/empty.txt diff --git a/data/ships/user/small_fighter.txt b/data/ships/user/small_fighter.txt index 0501c22..46fc7e5 100644 --- a/data/ships/user/small_fighter.txt +++ b/data/ships/user/small_fighter.txt @@ -1,5 +1,5 @@ Small Fighter -data/images/small_fighter.bmp +images/small_fighter.bmp 0 15 10 @@ -11,7 +11,7 @@ data/images/small_fighter.bmp 2 4 -2 3 -data/weapons/beamer2.txt +weapons/beamer2.txt -4 -2 3 -data/weapons/empty.txt +weapons/empty.txt diff --git a/data/weapons/Ubeamer.txt b/data/weapons/Ubeamer.txt new file mode 100644 index 0000000..dc89ba6 --- /dev/null +++ b/data/weapons/Ubeamer.txt @@ -0,0 +1,31 @@ +Ultimate Beamer +images/beamer1.bmp +1.25 +1 +0 +5 +0.3 +0 +projectiles/beam.txt +0 +700 +0.3 +0.06 +projectiles/beam.txt +200 +600 +0.3 +0.12 +projectiles/beam.txt +-200 +600 +0.3 +0.18 +projectiles/beam.txt +50 +675 +0.3 +0.24 +projectiles/beam.txt +-50 +675 diff --git a/data/weapons/beamer1.txt b/data/weapons/beamer1.txt index 0538fbc..5996b2e 100644 --- a/data/weapons/beamer1.txt +++ b/data/weapons/beamer1.txt @@ -1,11 +1,11 @@ Beamer 1 -data/images/beamer1.bmp +images/beamer1.bmp 4 1 0 1 0.08 0 -data/projectiles/beam.txt +projectiles/beam.txt 0 1000 diff --git a/data/weapons/beamer2.txt b/data/weapons/beamer2.txt index a28d8d6..da9bfbc 100644 --- a/data/weapons/beamer2.txt +++ b/data/weapons/beamer2.txt @@ -1,21 +1,21 @@ Beamer 2 -data/images/beamer1.bmp +images/beamer1.bmp 6 1 0 3 0.15 0 -data/projectiles/beam.txt +projectiles/beam.txt 0 1000 0.2 0.02 -data/projectiles/beam.txt +projectiles/beam.txt -50 990 0.2 0.04 -data/projectiles/beam.txt +projectiles/beam.txt 50 990 diff --git a/data/weapons/empty.txt b/data/weapons/empty.txt index 6536e97..fbac9f8 100644 --- a/data/weapons/empty.txt +++ b/data/weapons/empty.txt @@ -1,5 +1,5 @@ empty Slot -data/images/empty.bmp +images/empty.bmp 0 0 0 diff --git a/data/weapons/fireball1.txt b/data/weapons/fireball1.txt index 78d6f41..60ebfc4 100644 --- a/data/weapons/fireball1.txt +++ b/data/weapons/fireball1.txt @@ -1,11 +1,11 @@ Fireball 1 -data/images/fire1.bmp +images/fire1.bmp 1 1 0 1 1.4 0.6 -data/projectiles/fire1.txt +projectiles/fire1.txt 0 135 diff --git a/data/weapons/inawaffe.txt b/data/weapons/inawaffe.txt deleted file mode 100644 index 46c65ab..0000000 --- a/data/weapons/inawaffe.txt +++ /dev/null @@ -1,31 +0,0 @@ -Ina's OP-Waffe -data/images/beamer1.bmp -1.25 -1 -0 -5 -0.3 -0 -data/projectiles/beam.txt -0 -700 -0.3 -0.06 -data/projectiles/beam.txt -200 -600 -0.3 -0.12 -data/projectiles/beam.txt --200 -600 -0.3 -0.18 -data/projectiles/beam.txt -50 -675 -0.3 -0.24 -data/projectiles/beam.txt --50 -675 diff --git a/data/weapons/nova1.txt b/data/weapons/nova1.txt index 4dc8898..74f5a2f 100644 --- a/data/weapons/nova1.txt +++ b/data/weapons/nova1.txt @@ -1,1506 +1,1506 @@ Nova 1 -data/images/empty.bmp +images/empty.bmp 25 1 0 300 10 6.9999 -data/projectiles/psi.txt +projectiles/psi.txt 320 0 10 6.9979 -data/projectiles/psi.txt +projectiles/psi.txt 318.878 26.7769 10 6.9959 -data/projectiles/psi.txt +projectiles/psi.txt 315.519 53.366 10 6.9939 -data/projectiles/psi.txt +projectiles/psi.txt 309.947 79.5808 10 6.9919 -data/projectiles/psi.txt +projectiles/psi.txt 302.2 105.237 10 6.9899 -data/projectiles/psi.txt +projectiles/psi.txt 292.335 130.156 10 6.9879 -data/projectiles/psi.txt +projectiles/psi.txt 280.418 154.161 10 6.9859 -data/projectiles/psi.txt +projectiles/psi.txt 266.535 177.085 10 6.9839 -data/projectiles/psi.txt +projectiles/psi.txt 250.782 198.767 10 6.9819 -data/projectiles/psi.txt +projectiles/psi.txt 233.27 219.055 10 6.9799 -data/projectiles/psi.txt +projectiles/psi.txt 214.122 237.806 10 6.9779 -data/projectiles/psi.txt +projectiles/psi.txt 193.472 254.89 10 6.9759 -data/projectiles/psi.txt +projectiles/psi.txt 171.465 270.185 10 6.9739 -data/projectiles/psi.txt +projectiles/psi.txt 148.255 283.585 10 6.9719 -data/projectiles/psi.txt +projectiles/psi.txt 124.005 294.996 10 6.9699 -data/projectiles/psi.txt +projectiles/psi.txt 98.8854 304.338 10 6.9679 -data/projectiles/psi.txt +projectiles/psi.txt 73.0723 311.545 10 6.9659 -data/projectiles/psi.txt +projectiles/psi.txt 46.7466 316.567 10 6.9639 -data/projectiles/psi.txt +projectiles/psi.txt 20.093 319.369 10 6.9619 -data/projectiles/psi.txt +projectiles/psi.txt -6.70157 319.93 10 6.9599 -data/projectiles/psi.txt +projectiles/psi.txt -33.4491 318.247 10 6.9579 -data/projectiles/psi.txt +projectiles/psi.txt -59.962 314.332 10 6.9559 -data/projectiles/psi.txt +projectiles/psi.txt -86.0543 308.212 10 6.9539 -data/projectiles/psi.txt +projectiles/psi.txt -111.543 299.93 10 6.9519 -data/projectiles/psi.txt +projectiles/psi.txt -136.249 289.545 10 6.9499 -data/projectiles/psi.txt +projectiles/psi.txt -160 277.128 10 6.9479 -data/projectiles/psi.txt +projectiles/psi.txt -182.628 262.768 10 6.9459 -data/projectiles/psi.txt +projectiles/psi.txt -203.976 246.564 10 6.9439 -data/projectiles/psi.txt +projectiles/psi.txt -223.892 228.631 10 6.9419 -data/projectiles/psi.txt +projectiles/psi.txt -242.238 209.095 10 6.9399 -data/projectiles/psi.txt +projectiles/psi.txt -258.885 188.091 10 6.9379 -data/projectiles/psi.txt +projectiles/psi.txt -273.717 165.769 10 6.9359 -data/projectiles/psi.txt +projectiles/psi.txt -286.628 142.283 10 6.9339 -data/projectiles/psi.txt +projectiles/psi.txt -297.528 117.8 10 6.9319 -data/projectiles/psi.txt +projectiles/psi.txt -306.342 92.4902 10 6.9299 -data/projectiles/psi.txt +projectiles/psi.txt -313.007 66.5317 10 6.9279 -data/projectiles/psi.txt +projectiles/psi.txt -317.477 40.1066 10 6.9259 -data/projectiles/psi.txt +projectiles/psi.txt -319.719 13.4002 10 6.9239 -data/projectiles/psi.txt +projectiles/psi.txt -319.719 -13.4002 10 6.9219 -data/projectiles/psi.txt +projectiles/psi.txt -317.477 -40.1066 10 6.9199 -data/projectiles/psi.txt +projectiles/psi.txt -313.007 -66.5317 10 6.9179 -data/projectiles/psi.txt +projectiles/psi.txt -306.342 -92.4902 10 6.9159 -data/projectiles/psi.txt +projectiles/psi.txt -297.528 -117.8 10 6.9139 -data/projectiles/psi.txt +projectiles/psi.txt -286.628 -142.283 10 6.9119 -data/projectiles/psi.txt +projectiles/psi.txt -273.717 -165.769 10 6.9099 -data/projectiles/psi.txt +projectiles/psi.txt -258.885 -188.091 10 6.9079 -data/projectiles/psi.txt +projectiles/psi.txt -242.238 -209.095 10 6.9059 -data/projectiles/psi.txt +projectiles/psi.txt -223.892 -228.631 10 6.9039 -data/projectiles/psi.txt +projectiles/psi.txt -203.976 -246.564 10 6.9019 -data/projectiles/psi.txt +projectiles/psi.txt -182.628 -262.768 10 6.8999 -data/projectiles/psi.txt +projectiles/psi.txt -160 -277.128 10 6.8979 -data/projectiles/psi.txt +projectiles/psi.txt -136.249 -289.545 10 6.8959 -data/projectiles/psi.txt +projectiles/psi.txt -111.543 -299.93 10 6.8939 -data/projectiles/psi.txt +projectiles/psi.txt -86.0543 -308.212 10 6.8919 -data/projectiles/psi.txt +projectiles/psi.txt -59.962 -314.332 10 6.8899 -data/projectiles/psi.txt +projectiles/psi.txt -33.4491 -318.247 10 6.8879 -data/projectiles/psi.txt +projectiles/psi.txt -6.70157 -319.93 10 6.8859 -data/projectiles/psi.txt +projectiles/psi.txt 20.093 -319.369 10 6.8839 -data/projectiles/psi.txt +projectiles/psi.txt 46.7466 -316.567 10 6.8819 -data/projectiles/psi.txt +projectiles/psi.txt 73.0723 -311.545 10 6.8799 -data/projectiles/psi.txt +projectiles/psi.txt 98.8854 -304.338 10 6.8779 -data/projectiles/psi.txt +projectiles/psi.txt 124.005 -294.996 10 6.8759 -data/projectiles/psi.txt +projectiles/psi.txt 148.255 -283.585 10 6.8739 -data/projectiles/psi.txt +projectiles/psi.txt 171.465 -270.185 10 6.8719 -data/projectiles/psi.txt +projectiles/psi.txt 193.472 -254.89 10 6.8699 -data/projectiles/psi.txt +projectiles/psi.txt 214.122 -237.806 10 6.8679 -data/projectiles/psi.txt +projectiles/psi.txt 233.27 -219.055 10 6.8659 -data/projectiles/psi.txt +projectiles/psi.txt 250.782 -198.767 10 6.8639 -data/projectiles/psi.txt +projectiles/psi.txt 266.535 -177.085 10 6.8619 -data/projectiles/psi.txt +projectiles/psi.txt 280.418 -154.161 10 6.8599 -data/projectiles/psi.txt +projectiles/psi.txt 292.335 -130.156 10 6.8579 -data/projectiles/psi.txt +projectiles/psi.txt 302.2 -105.237 10 6.8559 -data/projectiles/psi.txt +projectiles/psi.txt 309.947 -79.5808 10 6.8539 -data/projectiles/psi.txt +projectiles/psi.txt 315.519 -53.366 10 6.8519 -data/projectiles/psi.txt +projectiles/psi.txt 318.878 -26.7769 10 6.8499 -data/projectiles/psi.txt +projectiles/psi.txt 320 -7.83774e-14 10 6.8479 -data/projectiles/psi.txt +projectiles/psi.txt 318.878 26.7769 10 6.8459 -data/projectiles/psi.txt +projectiles/psi.txt 315.519 53.366 10 6.8439 -data/projectiles/psi.txt +projectiles/psi.txt 309.947 79.5808 10 6.8419 -data/projectiles/psi.txt +projectiles/psi.txt 302.2 105.237 10 6.8399 -data/projectiles/psi.txt +projectiles/psi.txt 292.335 130.156 10 6.8379 -data/projectiles/psi.txt +projectiles/psi.txt 280.418 154.161 10 6.8359 -data/projectiles/psi.txt +projectiles/psi.txt 266.535 177.085 10 6.8339 -data/projectiles/psi.txt +projectiles/psi.txt 250.782 198.767 10 6.8319 -data/projectiles/psi.txt +projectiles/psi.txt 233.27 219.055 10 6.8299 -data/projectiles/psi.txt +projectiles/psi.txt 214.122 237.806 10 6.8279 -data/projectiles/psi.txt +projectiles/psi.txt 193.472 254.89 10 6.8259 -data/projectiles/psi.txt +projectiles/psi.txt 171.465 270.185 10 6.8239 -data/projectiles/psi.txt +projectiles/psi.txt 148.255 283.585 10 6.8219 -data/projectiles/psi.txt +projectiles/psi.txt 124.005 294.996 10 6.8199 -data/projectiles/psi.txt +projectiles/psi.txt 98.8854 304.338 10 6.8179 -data/projectiles/psi.txt +projectiles/psi.txt 73.0723 311.545 10 6.8159 -data/projectiles/psi.txt +projectiles/psi.txt 46.7466 316.567 10 6.8139 -data/projectiles/psi.txt +projectiles/psi.txt 20.093 319.369 10 6.8119 -data/projectiles/psi.txt +projectiles/psi.txt -6.70157 319.93 10 6.8099 -data/projectiles/psi.txt +projectiles/psi.txt -33.4491 318.247 10 6.8079 -data/projectiles/psi.txt +projectiles/psi.txt -59.962 314.332 10 6.8059 -data/projectiles/psi.txt +projectiles/psi.txt -86.0543 308.212 10 6.8039 -data/projectiles/psi.txt +projectiles/psi.txt -111.543 299.93 10 6.8019 -data/projectiles/psi.txt +projectiles/psi.txt -136.249 289.545 10 6.7999 -data/projectiles/psi.txt +projectiles/psi.txt -160 277.128 10 6.7979 -data/projectiles/psi.txt +projectiles/psi.txt -182.628 262.768 10 6.7959 -data/projectiles/psi.txt +projectiles/psi.txt -203.976 246.564 10 6.7939 -data/projectiles/psi.txt +projectiles/psi.txt -223.892 228.631 10 6.7919 -data/projectiles/psi.txt +projectiles/psi.txt -242.238 209.095 10 6.7899 -data/projectiles/psi.txt +projectiles/psi.txt -258.885 188.091 10 6.7879 -data/projectiles/psi.txt +projectiles/psi.txt -273.717 165.769 10 6.7859 -data/projectiles/psi.txt +projectiles/psi.txt -286.628 142.283 10 6.7839 -data/projectiles/psi.txt +projectiles/psi.txt -297.528 117.8 10 6.7819 -data/projectiles/psi.txt +projectiles/psi.txt -306.342 92.4902 10 6.7799 -data/projectiles/psi.txt +projectiles/psi.txt -313.007 66.5317 10 6.7779 -data/projectiles/psi.txt +projectiles/psi.txt -317.477 40.1066 10 6.7759 -data/projectiles/psi.txt +projectiles/psi.txt -319.719 13.4002 10 6.7739 -data/projectiles/psi.txt +projectiles/psi.txt -319.719 -13.4002 10 6.7719 -data/projectiles/psi.txt +projectiles/psi.txt -317.477 -40.1066 10 6.7699 -data/projectiles/psi.txt +projectiles/psi.txt -313.007 -66.5317 10 6.7679 -data/projectiles/psi.txt +projectiles/psi.txt -306.342 -92.4902 10 6.7659 -data/projectiles/psi.txt +projectiles/psi.txt -297.528 -117.8 10 6.7639 -data/projectiles/psi.txt +projectiles/psi.txt -286.628 -142.283 10 6.7619 -data/projectiles/psi.txt +projectiles/psi.txt -273.717 -165.769 10 6.7599 -data/projectiles/psi.txt +projectiles/psi.txt -258.885 -188.091 10 6.7579 -data/projectiles/psi.txt +projectiles/psi.txt -242.238 -209.095 10 6.7559 -data/projectiles/psi.txt +projectiles/psi.txt -223.892 -228.631 10 6.7539 -data/projectiles/psi.txt +projectiles/psi.txt -203.976 -246.564 10 6.7519 -data/projectiles/psi.txt +projectiles/psi.txt -182.628 -262.768 10 6.7499 -data/projectiles/psi.txt +projectiles/psi.txt -160 -277.128 10 6.7479 -data/projectiles/psi.txt +projectiles/psi.txt -136.249 -289.545 10 6.7459 -data/projectiles/psi.txt +projectiles/psi.txt -111.543 -299.93 10 6.7439 -data/projectiles/psi.txt +projectiles/psi.txt -86.0543 -308.212 10 6.7419 -data/projectiles/psi.txt +projectiles/psi.txt -59.962 -314.332 10 6.7399 -data/projectiles/psi.txt +projectiles/psi.txt -33.4491 -318.247 10 6.7379 -data/projectiles/psi.txt +projectiles/psi.txt -6.70157 -319.93 10 6.7359 -data/projectiles/psi.txt +projectiles/psi.txt 20.093 -319.369 10 6.7339 -data/projectiles/psi.txt +projectiles/psi.txt 46.7466 -316.567 10 6.7319 -data/projectiles/psi.txt +projectiles/psi.txt 73.0723 -311.545 10 6.7299 -data/projectiles/psi.txt +projectiles/psi.txt 98.8854 -304.338 10 6.7279 -data/projectiles/psi.txt +projectiles/psi.txt 124.005 -294.996 10 6.7259 -data/projectiles/psi.txt +projectiles/psi.txt 148.255 -283.585 10 6.7239 -data/projectiles/psi.txt +projectiles/psi.txt 171.465 -270.185 10 6.7219 -data/projectiles/psi.txt +projectiles/psi.txt 193.472 -254.89 10 6.7199 -data/projectiles/psi.txt +projectiles/psi.txt 214.122 -237.806 10 6.7179 -data/projectiles/psi.txt +projectiles/psi.txt 233.27 -219.055 10 6.7159 -data/projectiles/psi.txt +projectiles/psi.txt 250.782 -198.767 10 6.7139 -data/projectiles/psi.txt +projectiles/psi.txt 266.535 -177.085 10 6.7119 -data/projectiles/psi.txt +projectiles/psi.txt 280.418 -154.161 10 6.7099 -data/projectiles/psi.txt +projectiles/psi.txt 292.335 -130.156 10 6.7079 -data/projectiles/psi.txt +projectiles/psi.txt 302.2 -105.237 10 6.7059 -data/projectiles/psi.txt +projectiles/psi.txt 309.947 -79.5808 10 6.7039 -data/projectiles/psi.txt +projectiles/psi.txt 315.519 -53.366 10 6.7019 -data/projectiles/psi.txt +projectiles/psi.txt 318.878 -26.7769 10 6.6999 -data/projectiles/psi.txt +projectiles/psi.txt 320 -1.56755e-13 10 6.6979 -data/projectiles/psi.txt +projectiles/psi.txt 318.878 26.7769 10 6.6959 -data/projectiles/psi.txt +projectiles/psi.txt 315.519 53.366 10 6.6939 -data/projectiles/psi.txt +projectiles/psi.txt 309.947 79.5808 10 6.6919 -data/projectiles/psi.txt +projectiles/psi.txt 302.2 105.237 10 6.6899 -data/projectiles/psi.txt +projectiles/psi.txt 292.335 130.156 10 6.6879 -data/projectiles/psi.txt +projectiles/psi.txt 280.418 154.161 10 6.6859 -data/projectiles/psi.txt +projectiles/psi.txt 266.535 177.085 10 6.6839 -data/projectiles/psi.txt +projectiles/psi.txt 250.782 198.767 10 6.6819 -data/projectiles/psi.txt +projectiles/psi.txt 233.27 219.055 10 6.6799 -data/projectiles/psi.txt +projectiles/psi.txt 214.122 237.806 10 6.6779 -data/projectiles/psi.txt +projectiles/psi.txt 193.472 254.89 10 6.6759 -data/projectiles/psi.txt +projectiles/psi.txt 171.465 270.185 10 6.6739 -data/projectiles/psi.txt +projectiles/psi.txt 148.255 283.585 10 6.6719 -data/projectiles/psi.txt +projectiles/psi.txt 124.005 294.996 10 6.6699 -data/projectiles/psi.txt +projectiles/psi.txt 98.8854 304.338 10 6.6679 -data/projectiles/psi.txt +projectiles/psi.txt 73.0723 311.545 10 6.6659 -data/projectiles/psi.txt +projectiles/psi.txt 46.7466 316.567 10 6.6639 -data/projectiles/psi.txt +projectiles/psi.txt 20.093 319.369 10 6.6619 -data/projectiles/psi.txt +projectiles/psi.txt -6.70157 319.93 10 6.6599 -data/projectiles/psi.txt +projectiles/psi.txt -33.4491 318.247 10 6.6579 -data/projectiles/psi.txt +projectiles/psi.txt -59.962 314.332 10 6.6559 -data/projectiles/psi.txt +projectiles/psi.txt -86.0543 308.212 10 6.6539 -data/projectiles/psi.txt +projectiles/psi.txt -111.543 299.93 10 6.6519 -data/projectiles/psi.txt +projectiles/psi.txt -136.249 289.545 10 6.6499 -data/projectiles/psi.txt +projectiles/psi.txt -160 277.128 10 6.6479 -data/projectiles/psi.txt +projectiles/psi.txt -182.628 262.768 10 6.6459 -data/projectiles/psi.txt +projectiles/psi.txt -203.976 246.564 10 6.6439 -data/projectiles/psi.txt +projectiles/psi.txt -223.892 228.631 10 6.6419 -data/projectiles/psi.txt +projectiles/psi.txt -242.238 209.095 10 6.6399 -data/projectiles/psi.txt +projectiles/psi.txt -258.885 188.091 10 6.6379 -data/projectiles/psi.txt +projectiles/psi.txt -273.717 165.769 10 6.6359 -data/projectiles/psi.txt +projectiles/psi.txt -286.628 142.283 10 6.6339 -data/projectiles/psi.txt +projectiles/psi.txt -297.528 117.8 10 6.6319 -data/projectiles/psi.txt +projectiles/psi.txt -306.342 92.4902 10 6.6299 -data/projectiles/psi.txt +projectiles/psi.txt -313.007 66.5317 10 6.6279 -data/projectiles/psi.txt +projectiles/psi.txt -317.477 40.1066 10 6.6259 -data/projectiles/psi.txt +projectiles/psi.txt -319.719 13.4002 10 6.6239 -data/projectiles/psi.txt +projectiles/psi.txt -319.719 -13.4002 10 6.6219 -data/projectiles/psi.txt +projectiles/psi.txt -317.477 -40.1066 10 6.6199 -data/projectiles/psi.txt +projectiles/psi.txt -313.007 -66.5317 10 6.6179 -data/projectiles/psi.txt +projectiles/psi.txt -306.342 -92.4902 10 6.6159 -data/projectiles/psi.txt +projectiles/psi.txt -297.528 -117.8 10 6.6139 -data/projectiles/psi.txt +projectiles/psi.txt -286.628 -142.283 10 6.6119 -data/projectiles/psi.txt +projectiles/psi.txt -273.717 -165.769 10 6.6099 -data/projectiles/psi.txt +projectiles/psi.txt -258.885 -188.091 10 6.6079 -data/projectiles/psi.txt +projectiles/psi.txt -242.238 -209.095 10 6.6059 -data/projectiles/psi.txt +projectiles/psi.txt -223.892 -228.631 10 6.6039 -data/projectiles/psi.txt +projectiles/psi.txt -203.976 -246.564 10 6.6019 -data/projectiles/psi.txt +projectiles/psi.txt -182.628 -262.768 10 6.5999 -data/projectiles/psi.txt +projectiles/psi.txt -160 -277.128 10 6.5979 -data/projectiles/psi.txt +projectiles/psi.txt -136.249 -289.545 10 6.5959 -data/projectiles/psi.txt +projectiles/psi.txt -111.543 -299.93 10 6.5939 -data/projectiles/psi.txt +projectiles/psi.txt -86.0543 -308.212 10 6.5919 -data/projectiles/psi.txt +projectiles/psi.txt -59.962 -314.332 10 6.5899 -data/projectiles/psi.txt +projectiles/psi.txt -33.4491 -318.247 10 6.5879 -data/projectiles/psi.txt +projectiles/psi.txt -6.70157 -319.93 10 6.5859 -data/projectiles/psi.txt +projectiles/psi.txt 20.093 -319.369 10 6.5839 -data/projectiles/psi.txt +projectiles/psi.txt 46.7466 -316.567 10 6.5819 -data/projectiles/psi.txt +projectiles/psi.txt 73.0723 -311.545 10 6.5799 -data/projectiles/psi.txt +projectiles/psi.txt 98.8854 -304.338 10 6.5779 -data/projectiles/psi.txt +projectiles/psi.txt 124.005 -294.996 10 6.5759 -data/projectiles/psi.txt +projectiles/psi.txt 148.255 -283.585 10 6.5739 -data/projectiles/psi.txt +projectiles/psi.txt 171.465 -270.185 10 6.5719 -data/projectiles/psi.txt +projectiles/psi.txt 193.472 -254.89 10 6.5699 -data/projectiles/psi.txt +projectiles/psi.txt 214.122 -237.806 10 6.5679 -data/projectiles/psi.txt +projectiles/psi.txt 233.27 -219.055 10 6.5659 -data/projectiles/psi.txt +projectiles/psi.txt 250.782 -198.767 10 6.5639 -data/projectiles/psi.txt +projectiles/psi.txt 266.535 -177.085 10 6.5619 -data/projectiles/psi.txt +projectiles/psi.txt 280.418 -154.161 10 6.5599 -data/projectiles/psi.txt +projectiles/psi.txt 292.335 -130.156 10 6.5579 -data/projectiles/psi.txt +projectiles/psi.txt 302.2 -105.237 10 6.5559 -data/projectiles/psi.txt +projectiles/psi.txt 309.947 -79.5808 10 6.5539 -data/projectiles/psi.txt +projectiles/psi.txt 315.519 -53.366 10 6.5519 -data/projectiles/psi.txt +projectiles/psi.txt 318.878 -26.7769 10 6.5499 -data/projectiles/psi.txt +projectiles/psi.txt 320 -2.35132e-13 10 6.5479 -data/projectiles/psi.txt +projectiles/psi.txt 318.878 26.7769 10 6.5459 -data/projectiles/psi.txt +projectiles/psi.txt 315.519 53.366 10 6.5439 -data/projectiles/psi.txt +projectiles/psi.txt 309.947 79.5808 10 6.5419 -data/projectiles/psi.txt +projectiles/psi.txt 302.2 105.237 10 6.5399 -data/projectiles/psi.txt +projectiles/psi.txt 292.335 130.156 10 6.5379 -data/projectiles/psi.txt +projectiles/psi.txt 280.418 154.161 10 6.5359 -data/projectiles/psi.txt +projectiles/psi.txt 266.535 177.085 10 6.5339 -data/projectiles/psi.txt +projectiles/psi.txt 250.782 198.767 10 6.5319 -data/projectiles/psi.txt +projectiles/psi.txt 233.27 219.055 10 6.5299 -data/projectiles/psi.txt +projectiles/psi.txt 214.122 237.806 10 6.5279 -data/projectiles/psi.txt +projectiles/psi.txt 193.472 254.89 10 6.5259 -data/projectiles/psi.txt +projectiles/psi.txt 171.465 270.185 10 6.5239 -data/projectiles/psi.txt +projectiles/psi.txt 148.255 283.585 10 6.5219 -data/projectiles/psi.txt +projectiles/psi.txt 124.005 294.996 10 6.5199 -data/projectiles/psi.txt +projectiles/psi.txt 98.8854 304.338 10 6.5179 -data/projectiles/psi.txt +projectiles/psi.txt 73.0723 311.545 10 6.5159 -data/projectiles/psi.txt +projectiles/psi.txt 46.7466 316.567 10 6.5139 -data/projectiles/psi.txt +projectiles/psi.txt 20.093 319.369 10 6.5119 -data/projectiles/psi.txt +projectiles/psi.txt -6.70157 319.93 10 6.5099 -data/projectiles/psi.txt +projectiles/psi.txt -33.4491 318.247 10 6.5079 -data/projectiles/psi.txt +projectiles/psi.txt -59.962 314.332 10 6.5059 -data/projectiles/psi.txt +projectiles/psi.txt -86.0543 308.212 10 6.5039 -data/projectiles/psi.txt +projectiles/psi.txt -111.543 299.93 10 6.5019 -data/projectiles/psi.txt +projectiles/psi.txt -136.249 289.545 10 6.4999 -data/projectiles/psi.txt +projectiles/psi.txt -160 277.128 10 6.4979 -data/projectiles/psi.txt +projectiles/psi.txt -182.628 262.768 10 6.4959 -data/projectiles/psi.txt +projectiles/psi.txt -203.976 246.564 10 6.4939 -data/projectiles/psi.txt +projectiles/psi.txt -223.892 228.631 10 6.4919 -data/projectiles/psi.txt +projectiles/psi.txt -242.238 209.095 10 6.4899 -data/projectiles/psi.txt +projectiles/psi.txt -258.885 188.091 10 6.4879 -data/projectiles/psi.txt +projectiles/psi.txt -273.717 165.769 10 6.4859 -data/projectiles/psi.txt +projectiles/psi.txt -286.628 142.283 10 6.4839 -data/projectiles/psi.txt +projectiles/psi.txt -297.528 117.8 10 6.4819 -data/projectiles/psi.txt +projectiles/psi.txt -306.342 92.4902 10 6.4799 -data/projectiles/psi.txt +projectiles/psi.txt -313.007 66.5317 10 6.4779 -data/projectiles/psi.txt +projectiles/psi.txt -317.477 40.1066 10 6.4759 -data/projectiles/psi.txt +projectiles/psi.txt -319.719 13.4002 10 6.4739 -data/projectiles/psi.txt +projectiles/psi.txt -319.719 -13.4002 10 6.4719 -data/projectiles/psi.txt +projectiles/psi.txt -317.477 -40.1066 10 6.4699 -data/projectiles/psi.txt +projectiles/psi.txt -313.007 -66.5317 10 6.4679 -data/projectiles/psi.txt +projectiles/psi.txt -306.342 -92.4902 10 6.4659 -data/projectiles/psi.txt +projectiles/psi.txt -297.528 -117.8 10 6.4639 -data/projectiles/psi.txt +projectiles/psi.txt -286.628 -142.283 10 6.4619 -data/projectiles/psi.txt +projectiles/psi.txt -273.717 -165.769 10 6.4599 -data/projectiles/psi.txt +projectiles/psi.txt -258.885 -188.091 10 6.4579 -data/projectiles/psi.txt +projectiles/psi.txt -242.238 -209.095 10 6.4559 -data/projectiles/psi.txt +projectiles/psi.txt -223.892 -228.631 10 6.4539 -data/projectiles/psi.txt +projectiles/psi.txt -203.976 -246.564 10 6.4519 -data/projectiles/psi.txt +projectiles/psi.txt -182.628 -262.768 10 6.4499 -data/projectiles/psi.txt +projectiles/psi.txt -160 -277.128 10 6.4479 -data/projectiles/psi.txt +projectiles/psi.txt -136.249 -289.545 10 6.4459 -data/projectiles/psi.txt +projectiles/psi.txt -111.543 -299.93 10 6.4439 -data/projectiles/psi.txt +projectiles/psi.txt -86.0543 -308.212 10 6.4419 -data/projectiles/psi.txt +projectiles/psi.txt -59.962 -314.332 10 6.4399 -data/projectiles/psi.txt +projectiles/psi.txt -33.4491 -318.247 10 6.4379 -data/projectiles/psi.txt +projectiles/psi.txt -6.70157 -319.93 10 6.4359 -data/projectiles/psi.txt +projectiles/psi.txt 20.093 -319.369 10 6.4339 -data/projectiles/psi.txt +projectiles/psi.txt 46.7466 -316.567 10 6.4319 -data/projectiles/psi.txt +projectiles/psi.txt 73.0723 -311.545 10 6.4299 -data/projectiles/psi.txt +projectiles/psi.txt 98.8854 -304.338 10 6.4279 -data/projectiles/psi.txt +projectiles/psi.txt 124.005 -294.996 10 6.4259 -data/projectiles/psi.txt +projectiles/psi.txt 148.255 -283.585 10 6.4239 -data/projectiles/psi.txt +projectiles/psi.txt 171.465 -270.185 10 6.4219 -data/projectiles/psi.txt +projectiles/psi.txt 193.472 -254.89 10 6.4199 -data/projectiles/psi.txt +projectiles/psi.txt 214.122 -237.806 10 6.4179 -data/projectiles/psi.txt +projectiles/psi.txt 233.27 -219.055 10 6.4159 -data/projectiles/psi.txt +projectiles/psi.txt 250.782 -198.767 10 6.4139 -data/projectiles/psi.txt +projectiles/psi.txt 266.535 -177.085 10 6.4119 -data/projectiles/psi.txt +projectiles/psi.txt 280.418 -154.161 10 6.4099 -data/projectiles/psi.txt +projectiles/psi.txt 292.335 -130.156 10 6.4079 -data/projectiles/psi.txt +projectiles/psi.txt 302.2 -105.237 10 6.4059 -data/projectiles/psi.txt +projectiles/psi.txt 309.947 -79.5808 10 6.4039 -data/projectiles/psi.txt +projectiles/psi.txt 315.519 -53.366 10 6.4019 -data/projectiles/psi.txt +projectiles/psi.txt 318.878 -26.7769 diff --git a/data/weapons/novaspitter1.txt b/data/weapons/novaspitter1.txt index a9adbfa..4b71143 100644 --- a/data/weapons/novaspitter1.txt +++ b/data/weapons/novaspitter1.txt @@ -1,36 +1,36 @@ Novaspitter 1 -data/images/empty.bmp +images/empty.bmp 8 1 0 6 0.8 0.0999 -data/projectiles/spit.txt +projectiles/spit.txt 250 0 0.8 0.0999 -data/projectiles/spit.txt +projectiles/spit.txt 125 216.506 0.8 0.0999 -data/projectiles/spit.txt +projectiles/spit.txt -125 216.506 0.8 0.0999 -data/projectiles/spit.txt +projectiles/spit.txt -250 3.06162e-14 0.8 0.0999 -data/projectiles/spit.txt +projectiles/spit.txt -125 -216.506 0.8 0.0999 -data/projectiles/spit.txt +projectiles/spit.txt 125 -216.506 diff --git a/data/weapons/spitter1.txt b/data/weapons/spitter1.txt index 8866663..a73c3d2 100644 --- a/data/weapons/spitter1.txt +++ b/data/weapons/spitter1.txt @@ -1,11 +1,11 @@ Spitter 1 -data/images/spitter1.bmp +images/spitter1.bmp 2 1 0 1 0.6 0.55 -data/projectiles/spit.txt +projectiles/spit.txt 0 250 diff --git a/data/weapons/spitter2.txt b/data/weapons/spitter2.txt index be15295..7019a95 100644 --- a/data/weapons/spitter2.txt +++ b/data/weapons/spitter2.txt @@ -1,21 +1,21 @@ Spitter 2 -data/images/spitter1.bmp +images/spitter1.bmp 7 1 0 3 0.6 0 -data/projectiles/spit.txt +projectiles/spit.txt 0 250 0.6 0.2 -data/projectiles/spit.txt +projectiles/spit.txt 40 240 0.6 0.4 -data/projectiles/spit.txt +projectiles/spit.txt -40 240 diff --git a/data/weapons/spitter3.txt b/data/weapons/spitter3.txt index cf7ee3c..54c7630 100644 --- a/data/weapons/spitter3.txt +++ b/data/weapons/spitter3.txt @@ -1,41 +1,41 @@ Spitter 3 -data/images/spitter3.bmp +images/spitter3.bmp 15 1 0 7 2 0 -data/projectiles/bigspit.txt +projectiles/bigspit.txt 0 250 0.8 0 -data/projectiles/spit.txt +projectiles/spit.txt 10 247 0.8 0 -data/projectiles/spit.txt +projectiles/spit.txt -10 247 0.8 0.16 -data/projectiles/spit.txt +projectiles/spit.txt 176.78 176.78 0.8 0.32 -data/projectiles/spit.txt +projectiles/spit.txt -176.78 176.78 0.8 0.48 -data/projectiles/spit.txt +projectiles/spit.txt 176.78 -176.78 0.8 0.64 -data/projectiles/spit.txt +projectiles/spit.txt -176.78 -176.78 diff --git a/data/weapons/weapon_template.txt b/data/weapons/weapon_template.txt index b900b0c..c02b37a 100644 --- a/data/weapons/weapon_template.txt +++ b/data/weapons/weapon_template.txt @@ -1,16 +1,16 @@ epic imbaweapon of massdestruction #name -data/weapon89.bmp #filename of image of weapon +images/weapon89.bmp #filename of image of weapon 0.5 #energyusage 1 #sellable 10000 #cost (0 for auto (recommended)) 2 #number of distinguished Projectiles 1 #cooldown 0.5 #startTimer -data/projectile11.txt #path +projectiles/projectile11.txt #path 0 #xSpeed 700 #-ySpeed 5 #cooldown 0 #startTimer -data/projectile14.txt #path +projectiles/projectile14.txt #path 0 #xSpeed 500 #-ySpeed diff --git a/data/weapons/weapons.txt b/data/weapons/weapons.txt index 5c08b65..15f1cc6 100644 --- a/data/weapons/weapons.txt +++ b/data/weapons/weapons.txt @@ -6,5 +6,5 @@ novaspitter1.txt beamer1.txt beamer2.txt fireball1.txt -inawaffe.txt +Ubeamer.txt nova1.txt diff --git a/engine.cpp b/engine.cpp index 50b39ee..41d6a95 100644 --- a/engine.cpp +++ b/engine.cpp @@ -2,7 +2,7 @@ UserShip* getShipWithName(string shipname) { - string path = "data/ships/user/"; + string path = get_data_path() + "ships/user/"; ifstream ships; ships.open((path + "userships.txt").c_str()); char workaround; @@ -34,7 +34,7 @@ UserShip* getShipWithName(string shipname) Weapon* getWeaponWithName(string weaponname) { - string path = "data/weapons/"; + string path = get_data_path() + "weapons/"; ifstream weapons; weapons.open((path + "weapons.txt").c_str()); char workaround; @@ -68,7 +68,7 @@ Account::Account() gold = 0; highscore = 0; ifstream ins; - string path = "data/ships/user/"; + string path = get_data_path() + "ships/user/"; ins.open((path + "userships.txt").c_str()); current = 0; string shippath; @@ -361,14 +361,14 @@ HUD::HUD(long long *nhighscore, double *nhp, double nhpmax, double *nenergy, dou maxEnergy = nmaxEnergy; gold = ngold; exp = nexp; - energyRaw = loadBMP("data/images/energy_raw2.bmp"); - SDL_Surface *bubbles = loadBMP("data/images/energy_bubbles3.bmp"); + energyRaw = loadBMP(get_data_path() + "images/energy_raw2.bmp"); + SDL_Surface *bubbles = loadBMP(get_data_path() + "images/energy_bubbles3.bmp"); energyBubbles = new SlidingBackground(bubbles,0,-200); - energyMasc = loadBMP("data/images/energy_masc2.bmp"); - hpRaw = loadBMP("data/images/hp_raw.bmp"); - hpMasc = loadBMP("data/images/hp_masc2.bmp"); - background = loadBMP("data/images/hud_background.bmp"); - font = TTF_OpenFont("data/fonts/OpenSans-Semibold.ttf",12); + energyMasc = loadBMP(get_data_path() + "images/energy_masc2.bmp"); + hpRaw = loadBMP(get_data_path() + "images/hp_raw.bmp"); + hpMasc = loadBMP(get_data_path() + "images/hp_masc2.bmp"); + background = loadBMP(get_data_path() + "images/hud_background.bmp"); + font = TTF_OpenFont((get_data_path() + "fonts/OpenSans-Semibold.ttf").c_str(),12); if(font == NULL) { cout << "Error loading font in HUD" << endl; @@ -683,15 +683,15 @@ vector > > > generateWave(int number, int /*structure of a LevelFile IntroLevel #name -data/images/bg_stars.bmp #path of background +images/bg_stars.bmp #path of background 30 #speed of background 1 #wether to randomize background position 60 #duration [s] 12346543 #seed 2 #number of Shiptypes -data/tork_capsule.txt #path of Ship +tork_capsule.txt #path of Ship 50 #how many of them should spawn -data/tork_spacerocket.txt #path of Ship +tork_spacerocket.txt #path of Ship 12 #how many 1 #how many events shall happen 0.5 #percentage of completion the event happens @@ -701,7 +701,7 @@ LevelGenerator::LevelGenerator(string filename, Account* user, SDL_Surface* nscr { vector shouldSpawn; screen = nscreen; - SDL_Surface* fakeScreen = loadBMP("data/images/game_screen.bmp"); + SDL_Surface* fakeScreen = loadBMP(get_data_path() + "images/game_screen.bmp"); current = 0; completed = 0; event = false; @@ -716,7 +716,7 @@ LevelGenerator::LevelGenerator(string filename, Account* user, SDL_Surface* nscr getline(ins, name); string backgroundPath; getline(ins, backgroundPath); - SDL_Surface* background = loadBMP(backgroundPath); + SDL_Surface* background = loadBMP(get_data_path() + backgroundPath); OH = new ObjectHandler(user, fakeScreen,background); UserShip *s = user->ships[user->current]; hud = new HUD(&OH->highscore, &s->hp, s->maxhp, &s->energy, s->maxEnergy, &OH->gold, user->getExpPointer()); @@ -735,7 +735,7 @@ LevelGenerator::LevelGenerator(string filename, Account* user, SDL_Surface* nscr ins >> workaround; string shipFilename; getline(ins, shipFilename); - EnemyShip* enemy = new EnemyShip(workaround + shipFilename); + EnemyShip* enemy = new EnemyShip(get_data_path() + workaround + shipFilename); prototypes.push_back(enemy); for(int l = 0; l < (int) enemy->weapons.size(); ++l) for(int i = 0; i < (int) enemy->weapons[l]->sounds.size(); ++i) diff --git a/enginecore.cpp b/enginecore.cpp index 047511e..69bd0b7 100644 --- a/enginecore.cpp +++ b/enginecore.cpp @@ -128,8 +128,8 @@ Projectile::Projectile(const Projectile& P) : DObject((DObject) P) } /*structure of a ProjectileFile -data/projectile2.bmp #path of the imagefile -data/sounds/spit #path of the soundfile without n.wav for int n +projectile2.bmp #path of the imagefile +sounds/spit #path of the soundfile without n.wav for int n 10 #damage 2 #armorPiercing 1.4142 #collisionSize @@ -144,14 +144,14 @@ Projectile::Projectile(string filename, vector& sounds) } string imageFilename; getline(ins, imageFilename); - image = loadBMP(imageFilename); + image = loadBMP(get_data_path() + imageFilename); string soundPath; getline(ins, soundPath); bool good = true; long long files = 1; while(good) { - string actualPath = soundPath + lltostr(files) + ".wav"; + string actualPath = get_data_path() + soundPath + lltostr(files) + ".wav"; Mix_Chunk* temp = NULL; temp = Mix_LoadWAV(actualPath.c_str()); if(temp == NULL) @@ -232,19 +232,19 @@ Weapon::Weapon(const Weapon& w):Item((Item) w) /* structure of a Weaponfile: epic imbaweapon of massdestruction #name -data/weapon89.bmp #filename of image of weapon +weapon89.bmp #filename of image of weapon 0.5 #energyusage 0 #sellable 10000000 #cost 2 #number of distinguished Projectiles 1 #cooldown 0.5 #startTimer -data/projectile11.txt #path +projectiles/projectile11.txt #path 0 #xSpeed 700 #-ySpeed 5 #cooldown 0 #startTimer -data/projectile14.txt #path +projectiles/projectile14.txt #path 0 #xSpeed 500 #-ySpeed */ @@ -261,7 +261,7 @@ Weapon::Weapon(string filename) string imageFilename; getline(ins, imageFilename); // cout << imageFilename << endl; - image = loadBMP(imageFilename); + image = loadBMP(get_data_path() + imageFilename); active = true; ins >> energyUsage; ins >> sellable; @@ -281,7 +281,7 @@ Weapon::Weapon(string filename) ins >> workaround; getline(ins,projectileFilename); vector projectileSounds; - prototypes.push_back(new Projectile(workaround + projectileFilename, projectileSounds)); + prototypes.push_back(new Projectile(get_data_path() + workaround + projectileFilename, projectileSounds)); ins >> prototypes[prototypes.size()-1]->xSpeed; ins >> prototypes[prototypes.size()-1]->ySpeed; prototypes[prototypes.size()-1]->ySpeed *= -1; @@ -497,7 +497,7 @@ EnemyShip::EnemyShip(const EnemyShip& s): Ship((Ship) s) /*structure of an EnemShipfile Tork Spacerocket #name -data/images/tork_spacerocket.bmp #path of imagefile +images/tork_spacerocket.bmp #path of imagefile 7 #maxhp 5 #armor 50 #moveSpeed @@ -507,7 +507,7 @@ data/images/tork_spacerocket.bmp #path of imagefile 3 #score 1 #number of weapons 0 -1 #relative Position of weapon -data/fireball.txt #path of weapon +weapons/fireball.txt #path of weapon */ EnemyShip::EnemyShip(string filename) { @@ -520,7 +520,7 @@ EnemyShip::EnemyShip(string filename) getline(ins, name); string imagePath; getline(ins, imagePath); - image = loadBMP(imagePath); + image = loadBMP(get_data_path() + imagePath); ins >> maxhp; hp = maxhp; ins >> armor; @@ -542,7 +542,7 @@ EnemyShip::EnemyShip(string filename) ins >> workaround; string weaponpath; getline(ins, weaponpath); - weapons.push_back(new Weapon(workaround + weaponpath)); + weapons.push_back(new Weapon(get_data_path() + workaround + weaponpath)); weapons[weapons.size()-1]->mirror(); } if(!(exp || gold || score)) @@ -715,7 +715,7 @@ vector UserShip::frame(double time, SDL_Surface* screen) /*structure of an UserShipfile small Fighter #name -data/images/small_fighter.bmp #path of imagefile +images/small_fighter.bmp #path of imagefile 200 #cost 7 #maxhp 50 #armor @@ -727,10 +727,10 @@ data/images/small_fighter.bmp #path of imagefile 2 #number of weapons 4 4 #relative Position of weapon 3 #maxSize of attached weapon -data/fireball.txt #path of weapon +fireball.txt #path of weapon 4 4 #relative Position of weapon 3 #maxSize of attached weapon -data/fireball.txt #path of weapon +fireball.txt #path of weapon */ UserShip::UserShip(string filename) { @@ -746,7 +746,7 @@ UserShip::UserShip(string filename) getline(ins, name); string imagePath; getline(ins, imagePath); - image = loadBMP(imagePath); + image = loadBMP(get_data_path() + imagePath); ins >> cost; ins >> maxhp; maxhp.name = "Hitpoints"; @@ -783,7 +783,7 @@ UserShip::UserShip(string filename) ins >> workaround; string weaponpath; getline(ins, weaponpath); - weapons.push_back(new Weapon(workaround + weaponpath)); + weapons.push_back(new Weapon(get_data_path() + workaround + weaponpath)); } if(cost == 0) cost = round_beautiful(estimateValue(*this)); diff --git a/enginecore.h b/enginecore.h index 5ea49ae..00cc47a 100644 --- a/enginecore.h +++ b/enginecore.h @@ -10,6 +10,7 @@ using namespace std; + //a drawable object featering an image and a position class DObject { diff --git a/main.cpp b/main.cpp index 738743d..305c67f 100644 --- a/main.cpp +++ b/main.cpp @@ -1,4 +1,11 @@ #include "main.h" + + +string get_data_path() +{ + return DATA_PATH; +} + AbstractInteractive* getWeaponInfo(Weapon* w, SDL_Rect target, int textSize) { SDL_Rect tRect = target; @@ -62,7 +69,7 @@ Shop::Shop(Account** nuser, int ngameMenu) gameMenu = ngameMenu; currentWeapon = 0; currentShip = 0; - SDL_Surface* BG = loadBMP("data/images/bg_stars.bmp"); + SDL_Surface* BG = loadBMP(get_data_path() + "images/bg_stars.bmp"); SDL_Surface* mbg = SDL_CreateRGBSurface(0,400,400,32,0,0,0,0); SDL_FillRect(mbg,NULL,0x000102); SDL_SetColorKey(mbg,SDL_SRCCOLORKEY,0x000102); @@ -88,7 +95,7 @@ Shop::Shop(Account** nuser, int ngameMenu) //reading available weapons ifstream ins; - string path = "data/weapons/"; + string path = get_data_path() + "weapons/"; ins.open((path+"weapons.txt").c_str()); char workaround; ins >> workaround; @@ -126,11 +133,11 @@ Shop::Shop(Account** nuser, int ngameMenu) subRect.h = height; Scrollable* temps = new Scrollable(targetRect, tempm, subRect, false, true); submenues.push_back(temps); - path = "data/ships/user/"; + path = get_data_path() + "ships/user/"; ins.open((path+"userships.txt").c_str()); ins >> workaround; vector shipPics; - Weapon empty = Weapon("data/weapons/empty.txt"); + Weapon empty = Weapon(get_data_path() + "weapons/empty.txt"); while(ins.good()) { string filepath; @@ -270,7 +277,7 @@ void Shop::draw(SDL_Surface* screen) textColor.r = 255; textColor.g = 255; textColor.b = 255; - TTF_Font *font = TTF_OpenFont("data/fonts/OpenSans-Semibold.ttf", 30); + TTF_Font *font = TTF_OpenFont((get_data_path() + "fonts/OpenSans-Semibold.ttf").c_str(), 30); SDL_Surface* headline = NULL; headline = TTF_RenderText_Solid(font, "Shop",textColor); if(headline == NULL) @@ -320,7 +327,7 @@ InventoryMenu::InventoryMenu(Account** nuser, int ngameMenu) MY = 0; user = nuser; gameMenu = ngameMenu; - BG = new SlidingBackground(loadBMP("data/images/bg_stars.bmp"), 0, 100); + BG = new SlidingBackground(loadBMP(get_data_path() + "images/bg_stars.bmp"), 0, 100); SDL_Rect backPos; backPos.x = 0; backPos.y = 460; @@ -462,8 +469,8 @@ int InventoryMenu::handleEvents(SDL_Event event) { SDL_FreeSurface(cursor); cursor = NULL; - int x = event.button.x; - int y = event.button.y; +// int x = event.button.x; +// int y = event.button.y; } } @@ -523,12 +530,12 @@ bool init(SDL_Surface*& screen) Menu* makeLoadGameMenu(SDL_Surface *screen) { - string bfile = "data/images/bg_stars.bmp"; + string bfile = get_data_path() + "images/bg_stars.bmp"; SDL_Surface *bg = loadBMP(bfile); vector ts; vector ti; ifstream ins; - ins.open("save/saves.txt"); + ins.open((SAVE_PATH + "saves.txt").c_str()); char workaround; ins >> workaround; int counter = 0; @@ -551,7 +558,7 @@ Menu* makeLoadGameMenu(SDL_Surface *screen) Menu* makeMainMenu(SDL_Surface *screen) { - string bfile = "data/images/bg_stars.bmp"; + string bfile = get_data_path() + "images/bg_stars.bmp"; SDL_Surface *bg = loadBMP(bfile); vector ts; ts.push_back("New Game"); @@ -568,7 +575,7 @@ Menu* makeMainMenu(SDL_Surface *screen) Menu* makeGameMenu(SDL_Surface *screen) { - string bfile = "data/images/bg_stars.bmp"; + string bfile = get_data_path() + "images/bg_stars.bmp"; SDL_Surface *bg = loadBMP(bfile); vector ts; ts.push_back("Missions"); @@ -591,7 +598,7 @@ Menu* makeGameMenu(SDL_Surface *screen) Menu* makeLevelMenu(vector levels, SDL_Surface *screen) { - string bfile = "data/images/bg_stars.bmp"; + string bfile = get_data_path() + "images/bg_stars.bmp"; SDL_Surface *bg = loadBMP(bfile); vector ts; vector ti; @@ -619,7 +626,7 @@ GameHandler::GameHandler() isGood = false; //reading available levels ifstream ins; - string path = "data/levels/"; + string path = get_data_path() + "levels/"; ins.open((path+"levels.txt").c_str()); char workaround; ins >> workaround; @@ -638,7 +645,7 @@ GameHandler::GameHandler() menus.push_back(makeLevelMenu(levelpaths,screen)); menus.push_back(new Shop(&user, MENU | 1)); menus.push_back(makeLoadGameMenu(screen)); - SDL_Surface* bg = loadBMP("data/images/bg_stars.bmp"); + SDL_Surface* bg = loadBMP(get_data_path() + "images/bg_stars.bmp"); GetStringMenu* mt = new GetStringMenu("Enter your Nickname:", MENU | 0, LEVEL | 0, bg, screen); acname = &mt->s; menus.push_back(mt); @@ -691,7 +698,7 @@ int GameHandler::game() if(*acname != "") { delete user; - user = new Account("data/default/account.txt"); + user = new Account(get_data_path() + "default/account.txt"); user->name = *acname; menus[5]->refresh(); menus[3]->refresh(); @@ -710,7 +717,7 @@ int GameHandler::game() if(state & LOAD) { ifstream ins; - ins.open("save/saves.txt"); + ins.open((SAVE_PATH + "saves.txt").c_str()); char workaround; ins >> workaround; int counter = 0; @@ -722,7 +729,7 @@ int GameHandler::game() { account = workaround + account; delete user; - user = new Account("save/" + account + ".txt"); + user = new Account(SAVE_PATH + account + ".txt"); menus[3]->refresh(); menus[6]->refresh(); user->resetShips(); @@ -802,6 +809,11 @@ int GameHandler::game() int main(int argc, char* args[]) { + if(getenv("RCADE_DATA") != NULL) + DATA_PATH = getenv("RCADE_DATA"); + + if(getenv("RCADE_SAVE") != NULL) + SAVE_PATH = getenv("RCADE_DATA"); GameHandler* GH = new GameHandler(); // Account a = Account(); diff --git a/main.h b/main.h index 17c0e3c..207e05e 100644 --- a/main.h +++ b/main.h @@ -15,6 +15,8 @@ using namespace std; #define GAME_QUIT (1 << 28) +string SAVE_PATH = "save/"; +string DATA_PATH = "data/"; const int SCREEN_WIDTH = 500; const int SCREEN_HEIGHT = 500; const int SCREEN_BPP = 32; diff --git a/save/default account.txt b/save/default account.txt deleted file mode 100644 index d5eda86..0000000 --- a/save/default account.txt +++ /dev/null @@ -1,40 +0,0 @@ -Start-Account -0 -0 -1 -Small Fighter -Hitpoints -10 -20 -1 -0 -Armor -50 -20 -1 -0 -Battery -10 -20 -1 -0 -Generator -2 -20 -1 -0 -Acceleration -300 -20 -1 -0 -Max Speed -200 -20 -1 -0 -2 -Beamer 2 -empty Slot -0 -0 diff --git a/util.h b/util.h index acabdcb..4d33ba2 100644 --- a/util.h +++ b/util.h @@ -11,6 +11,7 @@ using namespace std; +string get_data_path(); //splits at '\n' and ' ' vector > splitString(string s); -- cgit v1.2.3