mirror of
https://github.com/zenorogue/hyperrogue.git
synced 2025-10-13 21:47:38 +00:00
added CAP_EXTFONT for when font textures are not available (i.e., mobile devices)
This commit is contained in:
@@ -1229,6 +1229,7 @@ EX namespace dice {
|
|||||||
|
|
||||||
queuecurve(V1, 0xFFFFFFFF, color & 0xFFFFFF9F, PPR::WALL);
|
queuecurve(V1, 0xFFFFFFFF, color & 0xFFFFFF9F, PPR::WALL);
|
||||||
|
|
||||||
|
#if !CAP_EXTFONT
|
||||||
pointfunction pf = [&] (ld x, ld y) {
|
pointfunction pf = [&] (ld x, ld y) {
|
||||||
hyperpoint hs;
|
hyperpoint hs;
|
||||||
dynamicval<eGeometry> g(geometry, gSpace534);
|
dynamicval<eGeometry> g(geometry, gSpace534);
|
||||||
@@ -1242,6 +1243,7 @@ EX namespace dice {
|
|||||||
else if(fid == 9) s = "9.";
|
else if(fid == 9) s = "9.";
|
||||||
else s = its(fid);
|
else s = its(fid);
|
||||||
write_in_space(V1, max_glfont_size, dw->faces < 10 ? -1.2 : -.75, s, 0xFFFFFFFF, 0, 8, PPR::WALL, pf);
|
write_in_space(V1, max_glfont_size, dw->faces < 10 ? -1.2 : -.75, s, 0xFFFFFFFF, 0, 8, PPR::WALL, pf);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -2640,6 +2640,7 @@ EX hyperpoint default_pointfunction(ld x, ld y) {
|
|||||||
return xpush(x) * ypush(y) * C0;
|
return xpush(x) * ypush(y) * C0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !CAP_EXTFONT
|
||||||
EX void write_in_space(const shiftmatrix& V, int fsize, double size, const string& s, color_t col, int frame IS(0), int align IS(8), PPR prio IS(PPR::TEXT), pointfunction pf IS(default_pointfunction)) {
|
EX void write_in_space(const shiftmatrix& V, int fsize, double size, const string& s, color_t col, int frame IS(0), int align IS(8), PPR prio IS(PPR::TEXT), pointfunction pf IS(default_pointfunction)) {
|
||||||
init_glfont(fsize);
|
init_glfont(fsize);
|
||||||
glfont_t& f(*(glfont[fsize]));
|
glfont_t& f(*(glfont[fsize]));
|
||||||
@@ -2694,9 +2695,10 @@ EX void write_in_space(const shiftmatrix& V, int fsize, double size, const strin
|
|||||||
curvestart = isize(curvedata);
|
curvestart = isize(curvedata);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
EX void queuestr(const shiftmatrix& V, double size, const string& chr, color_t col, int frame IS(0), int align IS(8)) {
|
EX void queuestr(const shiftmatrix& V, double size, const string& chr, color_t col, int frame IS(0), int align IS(8)) {
|
||||||
#if CAP_GL
|
#if CAP_GL && !CAP_EXTFONT
|
||||||
if(vid.usingGL) {
|
if(vid.usingGL) {
|
||||||
shiftmatrix V1 ;
|
shiftmatrix V1 ;
|
||||||
if(GDIM == 3)
|
if(GDIM == 3)
|
||||||
|
@@ -44,6 +44,10 @@
|
|||||||
#define ISANDROID 0
|
#define ISANDROID 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifndef CAP_EXTFONT
|
||||||
|
#define CAP_EXTFONT (ISIOS || ISANDROID)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef ISSTEAM
|
#ifndef ISSTEAM
|
||||||
#define ISSTEAM 0
|
#define ISSTEAM 0
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user