HyperRogue 13.1o: fixes for the web build (mymake -web), which no longer compiled. - basegraph.cpp: debug_init_font was defined only with SDL_ttf, but init_glfont uses it with the built-in font too (CAP_TABFONT, the web build); the TTF_GlyphIsProvided check needs SDL_ttf and now stays inside the #if that already excluded the rest of the TTF code; - legacy.cpp: the music debug flags only exist with audio (CAP_SDLAUDIO), which the web build has not; - geom-exp.cpp: showQuotientConfig3 only exists with CAP_THREAD && MAXMDIM >= 4 (not on the web); "-d:quotient" falls back to the 2D dialog there. Part of the source of the build served at fredygames.com (GPL-2.0-or-later, like HyperRogue). --- a/basegraph.cpp +++ b/basegraph.cpp @@ -218,6 +218,8 @@ #endif +EX debugflag debug_init_font = {"init_font", true}; + #if CAP_SDLTTF EX vector font_filenames = { @@ -243,8 +245,6 @@ EX int last_font_id = 0; EX int font_id = 0; -EX debugflag debug_init_font = {"init_font", true}; - #ifdef FONTCONFIG TTF_Font* findfont(int siz) { @@ -623,7 +623,6 @@ #endif sdltogl(txt, f, ch); SDL_DestroySurface(txt); -#endif if(ch >= 128 && !TTF_GlyphIsProvided(cfont->font[siz], unicode_value(natchars[ch-128], 0).first)) { string s = natchars[ch - 128]; @@ -639,6 +638,7 @@ if(s[0] == dialog::foreign_letters[2*j] && s[1] == dialog::foreign_letters[2*j+1]) f.reps[ch] = strdup((string("") + char(dialog::latin_letters[j])).c_str()); } +#endif } --- a/legacy.cpp +++ b/legacy.cpp @@ -438,7 +438,9 @@ vector legacy_flags = { // INIT legacy_flag{'i', 1, &debug_init}, +#if CAP_SDLAUDIO legacy_flag{'i', 1, &debug_init_music}, +#endif legacy_flag{'i', 1, &debug_init_graph}, legacy_flag{'i', 1, &debug_init_joy}, legacy_flag{'i', 1, &debug_init_cells}, @@ -451,7 +453,9 @@ legacy_flag{'w', 1, &debug_map_warnings}, // ERROR legacy_flag{'e', 1, &debug_errors}, +#if CAP_SDLAUDIO legacy_flag{'e', 1, &debug_music_error}, +#endif legacy_flag{'e', 1, &debug_joy_error}, // STEAM legacy_flag{'s', 3, &debug_achievements}, --- a/geom-exp.cpp +++ b/geom-exp.cpp @@ -1435,8 +1435,13 @@ shift(); reg3::ultra_mirror_on = argi(); } #endif + #if CAP_THREAD && MAXMDIM >= 4 else if(argis("-d:quotient")) launch_dialog(WDIM == 2 ? showQuotientConfig : showQuotientConfig3); + #else + else if(argis("-d:quotient")) + launch_dialog(showQuotientConfig); + #endif else if(argis("-uqf")) fieldpattern::use_quotient_fp = true; #endif