mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2024-09-27 21:58:13 +00:00
all hr functions/variables used in rogueviz now listed in hyper.h
This commit is contained in:
parent
887deae03f
commit
ef182b225e
12
cell.cpp
12
cell.cpp
@ -236,15 +236,6 @@ namespace torusconfig {
|
|||||||
int newqty, newdy, newsdx, newsdy;
|
int newqty, newdy, newsdx, newsdy;
|
||||||
int torus_cx, torus_cy;
|
int torus_cx, torus_cy;
|
||||||
|
|
||||||
static const flagtype TF_SINGLE = 1;
|
|
||||||
static const flagtype TF_SIMPLE = 2;
|
|
||||||
static const flagtype TF_WEIRD = 4;
|
|
||||||
|
|
||||||
static const flagtype TF_HEX = 16;
|
|
||||||
static const flagtype TF_SQUARE = 32;
|
|
||||||
|
|
||||||
static const flagtype TF_KLEIN = 256;
|
|
||||||
|
|
||||||
vector<torusmode_info> tmodes = {
|
vector<torusmode_info> tmodes = {
|
||||||
{"single row (hex)", TF_SINGLE | TF_HEX},
|
{"single row (hex)", TF_SINGLE | TF_HEX},
|
||||||
{"single row (squares)", TF_SINGLE | TF_SQUARE},
|
{"single row (squares)", TF_SINGLE | TF_SQUARE},
|
||||||
@ -790,9 +781,6 @@ cellwalker& operator += (cellwalker& cw, wmirror_t) {
|
|||||||
return cw;
|
return cw;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class T> cellwalker operator + (cellwalker h, T t) { return h += t; }
|
|
||||||
template <class T> cellwalker operator - (cellwalker h, T t) { return h += (-t); }
|
|
||||||
|
|
||||||
cellwalker& operator ++ (cellwalker& h, int) { return h += 1; }
|
cellwalker& operator ++ (cellwalker& h, int) { return h += 1; }
|
||||||
cellwalker& operator -- (cellwalker& h, int) { return h -= 1; }
|
cellwalker& operator -- (cellwalker& h, int) { return h -= 1; }
|
||||||
|
|
||||||
|
5
help.cpp
5
help.cpp
@ -7,11 +7,6 @@ string help;
|
|||||||
|
|
||||||
function<void()> help_delegate;
|
function<void()> help_delegate;
|
||||||
|
|
||||||
struct help_extension {
|
|
||||||
char key;
|
|
||||||
string text;
|
|
||||||
reaction_t action;
|
|
||||||
};
|
|
||||||
vector<help_extension> help_extensions;
|
vector<help_extension> help_extensions;
|
||||||
|
|
||||||
vector<string> extra_keys = {
|
vector<string> extra_keys = {
|
||||||
|
55
hyper.h
55
hyper.h
@ -720,6 +720,9 @@ namespace shmup {
|
|||||||
extern hookset<bool(const transmatrix&, cell*, shmup::monster*)> *hooks_draw;
|
extern hookset<bool(const transmatrix&, cell*, shmup::monster*)> *hooks_draw;
|
||||||
extern hookset<bool(shmup::monster*)> *hooks_kill;
|
extern hookset<bool(shmup::monster*)> *hooks_kill;
|
||||||
extern hookset<bool(shmup::monster*, string&)> *hooks_describe;
|
extern hookset<bool(shmup::monster*, string&)> *hooks_describe;
|
||||||
|
|
||||||
|
void turn(int);
|
||||||
|
extern monster *lmousetarget;
|
||||||
}
|
}
|
||||||
|
|
||||||
static const int NOHINT = -1;
|
static const int NOHINT = -1;
|
||||||
@ -1552,6 +1555,7 @@ namespace dialog {
|
|||||||
|
|
||||||
void addHelp();
|
void addHelp();
|
||||||
void addBack();
|
void addBack();
|
||||||
|
void add_action(reaction_t action);
|
||||||
}
|
}
|
||||||
|
|
||||||
void checkStunKill(cell *dest);
|
void checkStunKill(cell *dest);
|
||||||
@ -1589,6 +1593,7 @@ extern bool ivoryz;
|
|||||||
#define SHADOW_MON 0x30
|
#define SHADOW_MON 0x30
|
||||||
|
|
||||||
bool drawMonsterType(eMonster m, cell *where, const transmatrix& V, int col, double footphase);
|
bool drawMonsterType(eMonster m, cell *where, const transmatrix& V, int col, double footphase);
|
||||||
|
|
||||||
void drawPlayerEffects(const transmatrix& V, cell *c, bool onPlayer);
|
void drawPlayerEffects(const transmatrix& V, cell *c, bool onPlayer);
|
||||||
|
|
||||||
// monster movement animations
|
// monster movement animations
|
||||||
@ -1948,6 +1953,7 @@ namespace linepatterns {
|
|||||||
void setColor(ePattern id, int col);
|
void setColor(ePattern id, int col);
|
||||||
void drawAll();
|
void drawAll();
|
||||||
void showMenu();
|
void showMenu();
|
||||||
|
void switchAlpha(ePattern id, int col);
|
||||||
};
|
};
|
||||||
|
|
||||||
transmatrix ddspin(cell *c, int d, int bonus = 0);
|
transmatrix ddspin(cell *c, int d, int bonus = 0);
|
||||||
@ -3436,6 +3442,17 @@ namespace torusconfig {
|
|||||||
};
|
};
|
||||||
|
|
||||||
extern vector<torusmode_info> tmodes;
|
extern vector<torusmode_info> tmodes;
|
||||||
|
|
||||||
|
enum : flagtype {
|
||||||
|
TF_SINGLE = 1,
|
||||||
|
TF_SIMPLE = 2,
|
||||||
|
TF_WEIRD = 4,
|
||||||
|
TF_HEX = 16,
|
||||||
|
TF_SQUARE = 32,
|
||||||
|
TF_KLEIN = 256
|
||||||
|
};
|
||||||
|
|
||||||
|
flagtype tmflags();
|
||||||
}
|
}
|
||||||
|
|
||||||
namespace fieldpattern {
|
namespace fieldpattern {
|
||||||
@ -3598,4 +3615,42 @@ struct pathdata {
|
|||||||
|
|
||||||
extern int timetowait;
|
extern int timetowait;
|
||||||
|
|
||||||
|
extern vector<pair<cell*, int> > airmap;
|
||||||
|
extern void compute_graphical_distance();
|
||||||
|
extern ld scalef;
|
||||||
|
|
||||||
|
struct help_extension {
|
||||||
|
char key;
|
||||||
|
string text;
|
||||||
|
reaction_t action;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern vector<help_extension> help_extensions;
|
||||||
|
|
||||||
|
namespace gamestack {
|
||||||
|
bool pushed();
|
||||||
|
}
|
||||||
|
|
||||||
|
namespace geom3 {
|
||||||
|
extern ld BODY;
|
||||||
|
}
|
||||||
|
|
||||||
|
void queuestr(const transmatrix& V, double size, const string& chr, int col, int frame = 0, int align = 8);
|
||||||
|
void queuestr(int x, int y, int shift, int size, string str, int col, int frame = 0, int align = 8);
|
||||||
|
|
||||||
|
ld frac(ld x);
|
||||||
|
|
||||||
|
cellwalker& operator += (cellwalker& cw, wstep_t);
|
||||||
|
cellwalker& operator += (cellwalker& cw, int spin);
|
||||||
|
|
||||||
|
template <class T> cellwalker operator + (cellwalker h, T t) { return h += t; }
|
||||||
|
template <class T> cellwalker operator - (cellwalker h, T t) { return h += (-t); }
|
||||||
|
|
||||||
|
bool cwstepcreates(cellwalker& cw);
|
||||||
|
extern int poly_outline;
|
||||||
|
|
||||||
|
extern hpcshape shDisk, shTriangle, shHeptaMarker, shSnowball, shDiskT, shDiskS, shDiskSq, shDiskM;
|
||||||
|
|
||||||
|
extern std::mt19937 hrngen;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2356,7 +2356,7 @@ void queueline(const hyperpoint& H1, const hyperpoint& H2, int col, int prf, int
|
|||||||
ptd.prio = prio << PSHIFT;
|
ptd.prio = prio << PSHIFT;
|
||||||
}
|
}
|
||||||
|
|
||||||
void queuestr(int x, int y, int shift, int size, string str, int col, int frame = 0, int align = 8) {
|
void queuestr(int x, int y, int shift, int size, string str, int col, int frame, int align) {
|
||||||
polytodraw& ptd = nextptd();
|
polytodraw& ptd = nextptd();
|
||||||
ptd.kind = pkString;
|
ptd.kind = pkString;
|
||||||
ptd.u.chr.x = x;
|
ptd.u.chr.x = x;
|
||||||
@ -2618,7 +2618,7 @@ void queuestr(const hyperpoint& h, int size, const string& chr, int col, int fra
|
|||||||
queuestr(xc, yc, sc, size, chr, col, frame);
|
queuestr(xc, yc, sc, size, chr, col, frame);
|
||||||
}
|
}
|
||||||
|
|
||||||
void queuestr(const transmatrix& V, double size, const string& chr, int col, int frame = 0, int align = 8) {
|
void queuestr(const transmatrix& V, double size, const string& chr, int col, int frame, int align) {
|
||||||
int xc, yc, sc; getcoord0(tC0(V), xc, yc, sc);
|
int xc, yc, sc; getcoord0(tC0(V), xc, yc, sc);
|
||||||
int xs, ys, ss; getcoord0(V * xpush0(.5), xs, ys, ss);
|
int xs, ys, ss; getcoord0(V * xpush0(.5), xs, ys, ss);
|
||||||
queuestr(xc, yc, sc, int(sqrt(squar(xc-xs)+squar(yc-ys)) * size), chr, col, frame, align);
|
queuestr(xc, yc, sc, int(sqrt(squar(xc-xs)+squar(yc-ys)) * size), chr, col, frame, align);
|
||||||
|
Loading…
Reference in New Issue
Block a user