1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-14 01:14:48 +00:00

ads-game:: new shapes, shape_ship written like other things

This commit is contained in:
Zeno Rogue 2022-09-12 11:48:02 +02:00
parent 2522b16e55
commit 9545796a1d

View File

@ -6,24 +6,26 @@ hpcshape shShip;
bool made; bool made;
vector<ld> shape_rock = { -0.0176894, 0.0952504, 0.0278998, 0.0966286, 0.0686721, 0.0455547, 0.110983, 0.0122558, 0.0994024, -0.0483395, 0.0517039, -0.0802772, -0.00271848, -0.0706804, -0.0564861, -0.08575, -0.100087, -0.0483411, -0.100031, -0.0102072, -0.0761486, 0.0292356, -0.0639653, 0.077575 }; vector<ld> shape_rock = { -0.0176894, 0.0952504, 0.0278998, 0.0966286, 0.0686721, 0.0455547, 0.110983, 0.0122558, 0.0994024, -0.0483395, 0.0517039, -0.0802772, -0.00271848, -0.0706804, -0.0564861, -0.08575, -0.100087, -0.0483411, -0.100031, -0.0102072, -0.0761486, 0.0292356, -0.0639653, 0.077575 };
vector<ld> shape_missile = { vector<ld> shape_rock2 = {-0.00204264, 0.111665, 0.0374777, 0.119247, 0.0797168, 0.0940249, 0.106214, 0.0326813, 0.121954, -0.0109009, 0.0837905, -0.0865154, 0.0517718, -0.108312, 0.00135972, -0.0802237, -0.0632991, -0.0837181, -0.0980407, -0.0510629, -0.122639, 0.00885725, -0.0817448, 0.0878757, };
vector<ld> shape_missile = { 0.04, 0, 0.01, 0.02, -0.02, 0.02, -0.02, -0.02, 0.01, -0.02, };
vector<ld> shape_particle = { 0.01, 0.01, -0.01, 0.01, -0.01, -0.01, 0.01, -0.01, };
vector<ld> shape_gold = {0.100344, 0.00161845, 0.0484642, -0.0177702, 0.0720984, -0.0698096, 0.0217039, -0.0468348, 0.00161845, -0.100344, -0.0177702, -0.0484642, -0.0698096, -0.0720984, -0.0468348, -0.0217039, -0.100344, -0.00161845, -0.0484642, 0.0177702, -0.0720984, 0.0698096, -0.0217039, 0.0468348, -0.00161845, 0.100344, 0.0177702, 0.0484642, 0.0698096, 0.0720984, 0.0468348, 0.0217039, };
vector<ld> shape_heart = {-0.102016, 3.74802e-17, -0.0451579, 0.0403539, 0.00865751, 0.0913848, 0.0500387, 0.0856432, 0.0769946, 0.0673703, 0.0817517, 0.0327007, 0.0537951, 0.00480313, 0.0537951, -0.00480313, 0.0817517, -0.0327007, 0.0769946, -0.0673703, 0.0500387, -0.0856432, 0.00865751, -0.0913848, -0.0451579, -0.0403539, -0.102016, -3.74802e-17, };
vector<ld> shape_weapon = {-0.0731165, 0.0596477, -0.047071, 0.0268977, 0.0807759, 0.0230788, 0.098148, 0.00288671, 0.098148, -0.00288671, 0.0807759, -0.0230788, -0.047071, -0.0268977, -0.0731165, -0.0596477, };
vector<ld> shape_fuel = {0.0802337, 0.0224383, 0.0802337, -0.0224383, 0.0224383, -0.0802337, -0.0224383, -0.0802337, -0.0802337, -0.0224383, -0.0802337, 0.0224383, -0.0224383, 0.0802337, 0.0224383, 0.0802337, };
vector<ld> shape_airtank = {-0.101054, 0.0134738, -0.0904219, 0.014429, -0.0779099, 0.0442451, 0.078873, 0.043284, 0.0894665, 0.0259742, 0.0894665, -0.0259742, 0.078873, -0.043284, -0.0779099, -0.0442451, -0.0904219, -0.014429, -0.101054, -0.0134738, };
vector<ld> shape_ship = { 0.0699706, 0, 0.0509304, 0.019032, 0.0056909, 0.023788, 0.0318813, 0.0309258, 0.0330715, 0.0368693, 0.00331668, 0.0380512, -0.0630665, 0.0699568, -0.0619577, 0.041535, -0.0678691, 0.0415233, -0.0678946, 0.0261072, -0.0572505, 0.0237463, -0.0572505, -0.0237463, -0.0678946, -0.0261072, -0.0678691, -0.0415233, -0.0619577, -0.041535, -0.0630665, -0.0699568, 0.00331668, -0.0380512, 0.0330715, -0.0368693, 0.0318813, -0.0309258, 0.0056909, -0.023788, 0.0509304, -0.019032 };
/* 0.201073, 0.00513228, 0.161595, 0.0253201, -0.135796, 0.0245209, -0.194281, 0.0372705,
-0.194281, -0.0372705, -0.135796, -0.0245209, 0.161595, -0.0253201, 0.201073, -0.00513228 */
0.04, 0, 0.01, 0.02, -0.02, 0.02, -0.02, -0.02, 0.01, -0.02,
};
void make_shape() { void make_shape() {
if(made) return; if(made) return;
made = true; made = true;
vector<ld> ship = {
0.100145, 0.00834541, 0.0810058, 0.0190602, 0.0356926, 0.0237951, 0.0619128, 0.0309564, 0.0631121, 0.0369146, 0.0333191, 0.038079, -0.0333481, 0.0702692, -0.0321308, 0.041651, -0.0380849, 0.0416554, -0.0380749, 0.0261765, -0.0273608, 0.023792
};
cgi.bshape(shShip, PPR::MONSTER_BODY); cgi.bshape(shShip, PPR::MONSTER_BODY);
int N = isize(ship); int N = isize(shape_ship);
for(int i=0; i<N; i += 2) cgi.hpcpush(hpxy(ship[i] - .03, ship[i+1]));
for(int i=N-2; i>=0; i-=2) cgi.hpcpush(hpxy(ship[i] - .03, -ship[i+1])); vector<hyperpoint> lst;
cgi.hpcpush(hpxy(ship[0] - .03, ship[1])); for(int i=0; i<N; i += 2) lst.push_back(normalize(hpxyz(shape_ship[i] - .03, shape_ship[i+1], 1)));
for(auto h: lst) cgi.hpcpush(h);
cgi.hpcpush(lst[0]);
cgi.finishshape(); cgi.finishshape();
cgi.extra_vertices(); cgi.extra_vertices();
} }