mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-12-29 19:40:35 +00:00
added some exports to hyper.h and rogueviz.h
This commit is contained in:
parent
1e27888f7d
commit
0e10dec9e2
2
game.cpp
2
game.cpp
@ -7020,7 +7020,7 @@ bool collectItem(cell *c2, bool telekinesis) {
|
|||||||
babymap.erase(c2);
|
babymap.erase(c2);
|
||||||
int bold = seekbits;
|
int bold = seekbits;
|
||||||
seekbits = bnew;
|
seekbits = bnew;
|
||||||
last = seekbits;
|
tortoise::last = seekbits;
|
||||||
if(seek()) {
|
if(seek()) {
|
||||||
cell *c = passable(cwt.at, NULL, 0) ? cwt.at : c2;
|
cell *c = passable(cwt.at, NULL, 0) ? cwt.at : c2;
|
||||||
c->item = itBabyTortoise;
|
c->item = itBabyTortoise;
|
||||||
|
21
hyper.h
21
hyper.h
@ -2536,6 +2536,7 @@ extern hookset<bool(cell*)> *hooks_mark;
|
|||||||
extern hookset<eLand(eLand)> *hooks_nextland;
|
extern hookset<eLand(eLand)> *hooks_nextland;
|
||||||
extern hookset<bool()> *hooks_welcome_message, *hooks_default_help;
|
extern hookset<bool()> *hooks_welcome_message, *hooks_default_help;
|
||||||
extern hookset<void(cell*)> *hooks_mouseover;
|
extern hookset<void(cell*)> *hooks_mouseover;
|
||||||
|
extern hookset<struct hrmap*()> *hooks_newmap;
|
||||||
|
|
||||||
extern ld shiftmul;
|
extern ld shiftmul;
|
||||||
void initcs(charstyle &cs);
|
void initcs(charstyle &cs);
|
||||||
@ -3587,6 +3588,12 @@ inline hyperpoint ypush0(ld x) { return cpush0(1, x); }
|
|||||||
transmatrix xspinpush(ld alpha, ld x);
|
transmatrix xspinpush(ld alpha, ld x);
|
||||||
hyperpoint xspinpush0(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_INIT 0 // always display these
|
||||||
#define DF_MSG 0 // always display these
|
#define DF_MSG 0 // always display these
|
||||||
#define DF_STEAM 1
|
#define DF_STEAM 1
|
||||||
@ -3957,6 +3964,16 @@ struct hpcshape {
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern hpcshape shFullCross[2];
|
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
|
#endif
|
||||||
|
|
||||||
int fix6(int a);
|
int fix6(int a);
|
||||||
@ -4319,6 +4336,10 @@ namespace reg3 {
|
|||||||
int celldistance(cell *c1, cell *c2);
|
int celldistance(cell *c1, cell *c2);
|
||||||
bool pseudohept(cell *c);
|
bool pseudohept(cell *c);
|
||||||
inline short& altdist(heptagon *h) { return h->emeraldval; }
|
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
|
#endif
|
||||||
|
|
||||||
|
@ -295,6 +295,14 @@ inline hyperpoint xspinpush0(ld alpha, ld x) {
|
|||||||
return h;
|
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
|
// push alpha units vertically
|
||||||
transmatrix ypush(ld alpha) { return cpush(1, alpha); }
|
transmatrix ypush(ld alpha) { return cpush(1, alpha); }
|
||||||
|
|
||||||
|
15
rogueviz.h
15
rogueviz.h
@ -103,5 +103,18 @@ namespace rogueviz {
|
|||||||
namespace pentagonal {
|
namespace pentagonal {
|
||||||
void run_snub(int v, int w);
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user