1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-11-27 14:37:16 +00:00

added CAP_EXTFONT for when font textures are not available (i.e., mobile devices)

This commit is contained in:
Zeno Rogue 2021-05-29 12:16:32 +02:00
parent 334bf12292
commit 3f7fc5f2b9
3 changed files with 9 additions and 1 deletions

View File

@ -1229,6 +1229,7 @@ EX namespace dice {
queuecurve(V1, 0xFFFFFFFF, color & 0xFFFFFF9F, PPR::WALL);
#if !CAP_EXTFONT
pointfunction pf = [&] (ld x, ld y) {
hyperpoint hs;
dynamicval<eGeometry> g(geometry, gSpace534);
@ -1242,6 +1243,7 @@ EX namespace dice {
else if(fid == 9) s = "9.";
else s = its(fid);
write_in_space(V1, max_glfont_size, dw->faces < 10 ? -1.2 : -.75, s, 0xFFFFFFFF, 0, 8, PPR::WALL, pf);
#endif
}
}

View File

@ -2640,6 +2640,7 @@ EX hyperpoint default_pointfunction(ld x, ld y) {
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)) {
init_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);
}
#endif
#endif
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) {
shiftmatrix V1 ;
if(GDIM == 3)

View File

@ -44,6 +44,10 @@
#define ISANDROID 0
#endif
#ifndef CAP_EXTFONT
#define CAP_EXTFONT (ISIOS || ISANDROID)
#endif
#ifndef ISSTEAM
#define ISSTEAM 0
#endif