1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-10-20 16:37:40 +00:00

header cleanup (conformal/polygonal)

This commit is contained in:
Zeno Rogue
2019-08-10 00:35:23 +02:00
parent a9ff4e64f8
commit 6ed530c50c
2 changed files with 80 additions and 141 deletions

78
hyper.h
View File

@@ -1064,84 +1064,6 @@ extern ld ruggo;
#define HASLINEVIEW
namespace shmup { struct monster; }
namespace conformal {
extern bool on;
extern vector<pair<cell*, eMonster> > killhistory;
extern vector<pair<cell*, eItem> > findhistory;
extern vector<cell*> movehistory;
extern set<cell*> inmovehistory, inkillhistory, infindhistory;
extern bool includeHistory;
extern bool use_atan;
extern ld rotation;
extern ld rotation_xz, rotation_xy2;
transmatrix rotmatrix();
extern int do_rotate;
extern ld model_orientation, model_orientation_yz;
extern ld halfplane_scale;
extern ld ocos, osin, ocos_yz, osin_yz;
extern ld cos_ball, sin_ball;
extern bool model_straight, model_straight_yz;
extern ld model_transition;
extern ld top_z;
extern ld spiral_angle, spiral_x, spiral_y;
extern ld spiral_cone;
extern ld clip_min, clip_max;
// screen coordinates to logical coordinates: apply_orientation(x,y)
// logical coordinates back to screen coordinates: apply_orientation(y,x)
template<class A>
void apply_orientation(A& x, A& y) { if(!model_straight) tie(x,y) = make_pair(x*ocos + y*osin, y*ocos - x*osin); }
template<class A>
void apply_orientation_yz(A& x, A& y) { if(!model_straight_yz) tie(x,y) = make_pair(x*ocos_yz + y*osin_yz, y*ocos_yz - x*osin_yz); }
template<class A>
void apply_ball(A& x, A& y) { tie(x,y) = make_pair(x*cos_ball + y*sin_ball, y*cos_ball - x*sin_ball); }
void configure();
extern bool autoband;
extern bool autobandhistory;
extern bool dospiral;
extern ld lvspeed;
extern int bandsegment;
extern int bandhalf;
extern ld extra_line_steps;
void create(cell *start, cell *target);
void create_playerpath();
void create_recenter_to_view(bool precise);
void clear();
void model_menu();
void history_menu();
string get_model_name(eModel);
void apply();
void movetophase();
void renderAutoband();
extern vector<shmup::monster*> v;
extern double phase;
void applyIB();
void progress_screen();
void progress(string str);
bool model_has_orientation();
extern string formula;
extern eModel basic_model;
}
namespace polygonal {
static const int MSI = 120;
extern int SI;
extern ld STAR;
extern int deg;
extern ld coefr[MSI], coefi[MSI];
extern int maxcoef, coefid;
void solve();
pair<ld, ld> compute(ld x, ld y);
}
// passable flags
#define SAGEMELT .1