From 0e10dec9e2f255b2af6415f1204e2a21ca11f23c Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Fri, 15 Mar 2019 12:45:57 +0100 Subject: [PATCH] added some exports to hyper.h and rogueviz.h --- game.cpp | 2 +- hyper.h | 21 +++++++++++++++++++++ hyperpoint.cpp | 8 ++++++++ rogueviz.h | 15 ++++++++++++++- 4 files changed, 44 insertions(+), 2 deletions(-) diff --git a/game.cpp b/game.cpp index 30227ec0..ca245448 100644 --- a/game.cpp +++ b/game.cpp @@ -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; diff --git a/hyper.h b/hyper.h index 4246b9e6..910d408c 100644 --- a/hyper.h +++ b/hyper.h @@ -2536,6 +2536,7 @@ extern hookset *hooks_mark; extern hookset *hooks_nextland; extern hookset *hooks_welcome_message, *hooks_default_help; extern hookset *hooks_mouseover; +extern hookset *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 hpc; + +extern hpcshape *last; + +extern vector 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 diff --git a/hyperpoint.cpp b/hyperpoint.cpp index 6358a71d..636d62b0 100644 --- a/hyperpoint.cpp +++ b/hyperpoint.cpp @@ -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 1e-2) + return false; + return true; + } + // push alpha units vertically transmatrix ypush(ld alpha) { return cpush(1, alpha); } diff --git a/rogueviz.h b/rogueviz.h index 83a34a68..4994b784 100644 --- a/rogueviz.h +++ b/rogueviz.h @@ -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; + }