1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-08-29 00:42:19 +00:00

use find_file in nonisotropic and netgen

This commit is contained in:
Zeno Rogue 2025-08-17 23:03:11 +02:00
parent 6bc9139b2f
commit 2c92a781da
2 changed files with 2 additions and 3 deletions

View File

@ -140,7 +140,7 @@ EX namespace netgen {
void loadData() {
fhstream f("papermodeldata.txt", "rt");
fhstream f(find_file("papermodeldata.txt"), "rt");
if(!f.f) return;
if(!scan(f, CELLS, SX, SY, PX, PY, nscale, BASE, el, created)) return;

View File

@ -84,8 +84,7 @@ EX namespace sn {
void tabled_inverses::load() {
if(loaded) return;
FILE *f = fopen(fname.c_str(), "rb");
if(!f) f = fopen((rsrcdir + fname).c_str(), "rb");
FILE *f = fopen(find_file(fname).c_str(), "rb");
if(!f) { addMessage(XLAT("geodesic table missing")); pmodel = mdPerspective; return; }
hr::ignore(fread(&PRECX, 4, 1, f));
hr::ignore(fread(&PRECY, 4, 1, f));