From e3a66514d57ff4acf2f02df7d86bd2cf8be0e730 Mon Sep 17 00:00:00 2001 From: Reimar Date: Tue, 8 Dec 2015 11:31:35 +0100 Subject: initial commit --- data/weapons/creator.cpp~ | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 data/weapons/creator.cpp~ (limited to 'data/weapons/creator.cpp~') 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 @@ +#include +#include +#include + +using namespace std; + +int main() +{ + ofstream o; + o.open("novaspitter1.txt"); + o << "Novaspitter 1\n"; + o << "data/images/empty.bmp\n"; + o << 8 << '\n'; + o << 1 << '\n'; + o << 30 << '\n'; + int shots = 6; + double T = 0.8; + double duration = 0.0; + double start = 0.7; + double speed = 250; + int Ncircles = 1; + o << shots << endl; + for(int i = 0; i < shots; ++i) + { + o << T << '\n'; + o << T - start - ((double) i)/((double) shots)*duration-0.0001 << '\n'; + o << "data/projectiles/psi.txt\n"; + o << cos(Ncircles*2*M_PI*i/((double) shots))*speed << '\n'; + o << sin(Ncircles*2*M_PI*i/((double) shots))*speed; + if(i != shots-1) + o << endl; + } + o.close(); +} -- cgit v1.2.3