exporting more in hyper.h

This commit is contained in:
Zeno Rogue 2018-03-30 00:20:50 +02:00
parent eafd5a1eab
commit 6399ef8180
5 changed files with 38 additions and 23 deletions

View File

@ -80,15 +80,15 @@ bool inv::activating;
#include "sound.cpp"
#include "achievement.cpp"
#include "barriers.cpp"
#include "bigstuff.cpp"
#include "surface.cpp"
#if CAP_TOUR
#include "tour.cpp"
#endif
#include "surface.cpp"
#if ISMOBILE==0
#include <unistd.h>
#endif
#include "commandline.cpp"
#include "bigstuff.cpp"
#endif
#if IN_CU(1)

View File

@ -530,16 +530,7 @@ namespace dialog {
reaction = reaction_t();
}
struct numberEditor {
ld *editwhat;
string s;
ld vmin, vmax, step, dft;
string title, help;
ld (*scale) (ld);
ld (*inverse_scale) (ld);
int *intval; ld intbuf;
bool positive;
} ne;
numberEditor ne;
bool editingDetail() {
return ne.editwhat == &geom3::highdetail || ne.editwhat == &geom3::middetail;

34
hyper.h
View File

@ -881,6 +881,10 @@ namespace rug {
bool handlekeys(int sym, int uni);
#endif
void addTriangle(rugpoint *t1, rugpoint *t2, rugpoint *t3, ld len = 1);
rugpoint *addRugpoint(hyperpoint h, double dist);
void buildRug();
}
#define HASLINEVIEW
@ -1314,6 +1318,19 @@ namespace dialog {
double param;
int position;
};
struct numberEditor {
ld *editwhat;
string s;
ld vmin, vmax, step, dft;
string title, help;
ld (*scale) (ld);
ld (*inverse_scale) (ld);
int *intval; ld intbuf;
bool positive;
};
extern numberEditor ne;
extern vector<item> items;
@ -2905,3 +2922,20 @@ namespace surface {
}
#endif
struct stringpar {
string v;
stringpar(string s) : v(s) { }
stringpar(const char* s) : v(s) { }
stringpar(eMonster m) { v= minf[m].name; }
stringpar(eLand l) { v= linf[l].name; }
stringpar(eWall w) { v= winf[w].name; }
stringpar(eItem i) { v= iinf[i].name; }
};
string XLAT(string x);
string XLAT(string x, stringpar p1);
string XLAT(string x, stringpar p1, stringpar p2);
string XLAT(string x, stringpar p1, stringpar p2, stringpar p3);
string XLAT(string x, stringpar p1, stringpar p2, stringpar p3, stringpar p4);
string XLAT(string x, stringpar p1, stringpar p2, stringpar p3, stringpar p4, stringpar p5);

View File

@ -5,16 +5,6 @@
#define NUMLAN 7
struct stringpar {
string v;
stringpar(string s) : v(s) { }
stringpar(const char* s) : v(s) { }
stringpar(eMonster m) { v= minf[m].name; }
stringpar(eLand l) { v= linf[l].name; }
stringpar(eWall w) { v= winf[w].name; }
stringpar(eItem i) { v= iinf[i].name; }
};
const char *dnameof(eMonster m) { return minf[m].name; }
const char *dnameof(eLand l) { return linf[l].name; }
const char *dnameof(eWall w) { return winf[w].name; }

View File

@ -304,7 +304,7 @@ void add_anticusp_edge(rugpoint *e1, rugpoint *e2, ld len = 1) {
e.target = e1; e2->anticusp_edges.push_back(e);
}
void addTriangle(rugpoint *t1, rugpoint *t2, rugpoint *t3, ld len = 1) {
void addTriangle(rugpoint *t1, rugpoint *t2, rugpoint *t3, ld len) {
addEdge(t1->getglue(), t2->getglue(), len);
addEdge(t2->getglue(), t3->getglue(), len);
addEdge(t3->getglue(), t1->getglue(), len);