From 72ec04ff883811c1906e565cfcbef7d795269180 Mon Sep 17 00:00:00 2001 From: terminx Date: Tue, 30 Jan 2007 09:03:51 +0000 Subject: [PATCH] Allow use of grp files which exist outside of the game directory git-svn-id: https://svn.eduke32.com/eduke32@481 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/astub.c | 4 ++-- polymer/eduke32/source/game.c | 27 ++++++++++++++++----------- polymer/eduke32/source/sector.c | 5 +++-- 3 files changed, 21 insertions(+), 15 deletions(-) diff --git a/polymer/eduke32/source/astub.c b/polymer/eduke32/source/astub.c index 5cd083be8..2bb6ee1bc 100644 --- a/polymer/eduke32/source/astub.c +++ b/polymer/eduke32/source/astub.c @@ -4644,8 +4644,8 @@ int ExtInit(void) int i; #if 1 i=wm_ynbox("Texture Caching", - "Would you like to enable the on-disk texture cache? This feature may use around 140 megabytes of disk " - "space if you have a great deal of high resolution textures and skins, but textures will load dramatically " + "Would you like to enable the on-disk texture cache? This feature will use an undetermined amount of space " + "on your hard disk to store textures in your video card's native format, enabling them to load dramatically " "faster after the first time they are loaded.\n\n" "You will generally want to say 'yes' here, especially if using the HRP."); #else diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index fd51cb43f..d90d4ecb5 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -1576,7 +1576,7 @@ static void weaponnum(short ind,long x,long y,long num1, long num2,char ha) if (VOLUMEONE && (ind > HANDBOMB_WEAPON || ind < 0)) { - minitextshade(x+1,y-4,"ORDER",20,11,2+8+16); + minitextshade(x+1,y-4,"ORDER",20,11,2+8+16+256); return; } @@ -8340,6 +8340,8 @@ static int loadgroupfiles(char *fn) case T_LOADGRP: { char *fn; + + pathsearchmode = 1; if (!scriptfile_getstring(script,&fn)) { int j = initgroupfile(fn); @@ -8349,6 +8351,7 @@ static int loadgroupfiles(char *fn) else initprintf("Using group file %s.\n",fn); } + pathsearchmode = 0; } break; case T_CACHESIZE: @@ -9701,8 +9704,8 @@ void app_main(int argc,char **argv) if (glusetexcache == -1 || glusetexcachecompression == -1) { i=wm_ynbox("Texture Caching", - "Would you like to enable the on-disk texture cache? This feature may use around 140 megabytes of disk " - "space if you have a great deal of high resolution textures and skins, but textures will load dramatically " + "Would you like to enable the on-disk texture cache? This feature will use an undetermined amount of space " + "on your hard disk to store textures in your video card's native format, enabling them to load dramatically " "faster after the first time they are loaded.\n\n" "You will generally want to say 'yes' here, especially if using the HRP."); if (i) useprecache = glusetexcompr = glusetexcache = glusetexcachecompression = 1; @@ -9826,18 +9829,12 @@ void app_main(int argc,char **argv) initprintf("Main GRP file: %s.\n", duke3dgrp); initgroupfile(duke3dgrp); - - i = kopen4load("DUKESW.BIN",1); // JBF 20030810 - if (i!=-1) - { - shareware = 1; - kclose(i); - } - loadgroupfiles(duke3ddef); { struct strllist *s; + + pathsearchmode = 1; while (CommandGrps) { s = CommandGrps->next; @@ -9853,6 +9850,14 @@ void app_main(int argc,char **argv) free(CommandGrps); CommandGrps = s; } + pathsearchmode = 0; + } + + i = kopen4load("DUKESW.BIN",1); // JBF 20030810 + if (i!=-1) + { + shareware = 1; + kclose(i); } #if 0 diff --git a/polymer/eduke32/source/sector.c b/polymer/eduke32/source/sector.c index f93deb02e..4860543d8 100644 --- a/polymer/eduke32/source/sector.c +++ b/polymer/eduke32/source/sector.c @@ -25,7 +25,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // PRIMITIVE -char haltsoundhack; +static int haltsoundhack; + int callsound(int sn,int whatsprite) { int i; @@ -376,7 +377,7 @@ int setanimation(short animsect,long *animptr, long thegoal, long thevel) void animatecamsprite(void) { - short i; + int i; if (camsprite <= 0) return;