diff --git a/polymer/eduke32/source/duke3d.h b/polymer/eduke32/source/duke3d.h index 0a0af9304..3abf5dca7 100644 --- a/polymer/eduke32/source/duke3d.h +++ b/polymer/eduke32/source/duke3d.h @@ -1057,6 +1057,9 @@ typedef struct { extern keydef keynames[]; extern char *mousenames[]; +extern char *duke3dgrp, *duke3dgrpstring; +extern char mod_dir[BMAX_PATH]; + #ifdef __cplusplus } #endif diff --git a/polymer/eduke32/source/gamedef.c b/polymer/eduke32/source/gamedef.c index 17ef590c7..5260a7c38 100644 --- a/polymer/eduke32/source/gamedef.c +++ b/polymer/eduke32/source/gamedef.c @@ -4623,7 +4623,6 @@ repeatcase: if (Bstrcmp(setupfilename,"duke3d.cfg") == 0) // not set to something else via -cfg { char temp[BMAX_PATH]; - extern char mod_dir[]; Bstrcpy(temp,tempbuf); CONFIG_WriteSetup(); Bsprintf(setupfilename,"%s/",mod_dir); diff --git a/polymer/eduke32/source/savegame.c b/polymer/eduke32/source/savegame.c index f45691b60..0e5a4e941 100644 --- a/polymer/eduke32/source/savegame.c +++ b/polymer/eduke32/source/savegame.c @@ -83,7 +83,7 @@ int loadpheader(char spot,struct savehead *saveh) strcpy(fn, "egam0.sav"); fn[4] = spot+'0'; - if ((fil = kopen4load(fn,0)) == -1) return(-1); + if ((fil = kopen4loadfrommod(fn,0)) == -1) return(-1); walock[TILE_LOADSHOT] = 255; @@ -161,7 +161,7 @@ int loadplayer(int spot) fn[4] = spot + '0'; } - if ((fil = kopen4load(fnptr,0)) == -1) return(-1); + if ((fil = kopen4loadfrommod(fnptr,0)) == -1) return(-1); ready2send = 0; @@ -566,7 +566,11 @@ int saveplayer(int spot) fn[4] = spot + '0'; } - if ((fil = fopen(fnptr,"wb")) == 0) return(-1); + { + char temp[BMAX_PATH]; + Bsprintf(temp,"%s/%s",mod_dir,fnptr); + if ((fil = fopen(temp,"wb")) == 0) return(-1); + } ready2send = 0; diff --git a/polymer/eduke32/source/startwin.game.c b/polymer/eduke32/source/startwin.game.c index 8bf1902b3..0f907e642 100644 --- a/polymer/eduke32/source/startwin.game.c +++ b/polymer/eduke32/source/startwin.game.c @@ -600,9 +600,6 @@ int startwin_idle(void *v) return 0; } -extern char *duke3dgrp, *duke3dgrpstring; -extern char mod_dir[BMAX_PATH]; - int startwin_run(void) { MSG msg;