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

added some exports to hyper.h and rogueviz.h

This commit is contained in:
Zeno Rogue 2019-03-15 12:45:57 +01:00
parent 1e27888f7d
commit 0e10dec9e2
4 changed files with 44 additions and 2 deletions

View File

@ -7020,7 +7020,7 @@ bool collectItem(cell *c2, bool telekinesis) {
babymap.erase(c2);
int bold = seekbits;
seekbits = bnew;
last = seekbits;
tortoise::last = seekbits;
if(seek()) {
cell *c = passable(cwt.at, NULL, 0) ? cwt.at : c2;
c->item = itBabyTortoise;

21
hyper.h
View File

@ -2536,6 +2536,7 @@ extern hookset<bool(cell*)> *hooks_mark;
extern hookset<eLand(eLand)> *hooks_nextland;
extern hookset<bool()> *hooks_welcome_message, *hooks_default_help;
extern hookset<void(cell*)> *hooks_mouseover;
extern hookset<struct hrmap*()> *hooks_newmap;
extern ld shiftmul;
void initcs(charstyle &cs);
@ -3587,6 +3588,12 @@ inline hyperpoint ypush0(ld x) { return cpush0(1, x); }
transmatrix xspinpush(ld alpha, ld x);
hyperpoint xspinpush0(ld alpha, ld x);
transmatrix cspin(int a, int b, ld alpha);
transmatrix cpush(int cid, ld alpha);
bool eqmatrix(transmatrix A, transmatrix B, ld eps = 1e-6);
void set_column(transmatrix& T, int i, const hyperpoint& H);
#define DF_INIT 0 // always display these
#define DF_MSG 0 // always display these
#define DF_STEAM 1
@ -3957,6 +3964,16 @@ struct hpcshape {
};
extern hpcshape shFullCross[2];
void bshape(hpcshape& sh, PPR prio);
void hpcpush(hyperpoint h);
void finishshape();
void extra_vertices();
extern vector<hyperpoint> hpc;
extern hpcshape *last;
extern vector<hpcshape> shPlainWall3D, shWireframe3D, shWall3D, shMiniWall3D;
#endif
int fix6(int a);
@ -4319,6 +4336,10 @@ namespace reg3 {
int celldistance(cell *c1, cell *c2);
bool pseudohept(cell *c);
inline short& altdist(heptagon *h) { return h->emeraldval; }
extern transmatrix spins[12], adjmoves[12];
int bucketer(hyperpoint h);
extern bool dirs_adjacent[16][16];
cellwalker strafe(cellwalker cw, int j);
}
#endif

View File

@ -295,6 +295,14 @@ inline hyperpoint xspinpush0(ld alpha, ld x) {
return h;
}
bool eqmatrix(transmatrix A, transmatrix B, ld eps) {
for(int i=0; i<MDIM; i++)
for(int j=0; j<MDIM; j++)
if(std::abs(A[i][j] - B[i][j]) > 1e-2)
return false;
return true;
}
// push alpha units vertically
transmatrix ypush(ld alpha) { return cpush(1, alpha); }

View File

@ -103,5 +103,18 @@ namespace rogueviz {
namespace pentagonal {
void run_snub(int v, int w);
}
}
extern int dftcolor;
namespace collatz { extern double s2, s3, p2, p3; void start(); }
namespace tree { void read(string fn); }
namespace sag { extern ld edgepower, edgemul;
void read(string fn);
void loadsnake(const string& fn);
}
void readcolor(const string& cfname);
extern bool on;
void close();
extern bool showlabels;
}