mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-02-28 22:21:19 +00:00
Bug fixes
git-svn-id: https://svn.eduke32.com/eduke32@508 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f889e552b2
commit
23dbb55689
8 changed files with 86 additions and 64 deletions
|
@ -578,10 +578,10 @@ void editinput(void)
|
|||
osearchy = searchy;
|
||||
searchx += mousx;
|
||||
searchy += mousy;
|
||||
if (searchx < 8) searchx = 8;
|
||||
if (searchy < 8) searchy = 8;
|
||||
if (searchx > xdim-9) searchx = xdim-9;
|
||||
if (searchy > ydim-9) searchy = ydim-9;
|
||||
if (searchx < 12) searchx = 12;
|
||||
if (searchy < 12) searchy = 12;
|
||||
if (searchx > xdim-13) searchx = xdim-13;
|
||||
if (searchy > ydim-13) searchy = ydim-13;
|
||||
}
|
||||
|
||||
showmouse();
|
||||
|
|
|
@ -2510,7 +2510,7 @@ static void parascan(long dax1, long dax2, long sectnum, char dastat, long bunch
|
|||
x++;
|
||||
}
|
||||
if (j <= x)
|
||||
wallscan(j,x,topptr,botptr,swplc,lplc);
|
||||
wallscan(j,x-1,topptr,botptr,swplc,lplc);
|
||||
}
|
||||
globalpicnum = l;
|
||||
}
|
||||
|
|
|
@ -1574,13 +1574,11 @@ static void message(char message[162])
|
|||
|
||||
static char lockbyte4094;
|
||||
|
||||
long lastupdate, mousecol, mouseadd = 1, bstatus;
|
||||
static long lastupdate, mousecol, mouseadd = 1, bstatus;
|
||||
|
||||
static void m32_showmouse(void)
|
||||
{
|
||||
int i, j, col;
|
||||
|
||||
j = (xdimgame > 640);
|
||||
int i, col;
|
||||
|
||||
if (totalclock > lastupdate)
|
||||
{
|
||||
|
@ -1608,26 +1606,37 @@ static void m32_showmouse(void)
|
|||
|
||||
if (col != whitecol)
|
||||
{
|
||||
for (i=(j?3:2);i<=(j?7:3);i++)
|
||||
for (i=((xdim > 640)?3:2);i<=((xdim > 640)?7:3);i++)
|
||||
{
|
||||
plotpixel(searchx+i,searchy,col);
|
||||
plotpixel(searchx-i,searchy,col);
|
||||
plotpixel(searchx,searchy-i,col);
|
||||
plotpixel(searchx,searchy+i,col);
|
||||
}
|
||||
for (i=1;i<=(j?2:1);i++)
|
||||
for (i=1;i<=((xdim > 640)?2:1);i++)
|
||||
{
|
||||
plotpixel(searchx+i,searchy,whitecol);
|
||||
plotpixel(searchx-i,searchy,whitecol);
|
||||
plotpixel(searchx,searchy-i,whitecol);
|
||||
plotpixel(searchx,searchy+i,whitecol);
|
||||
}
|
||||
i=(j?8:4);
|
||||
i=((xdim > 640)?8:4);
|
||||
plotpixel(searchx+i,searchy,0);
|
||||
plotpixel(searchx-i,searchy,0);
|
||||
plotpixel(searchx,searchy-i,0);
|
||||
plotpixel(searchx,searchy+i,0);
|
||||
}
|
||||
|
||||
if (xdim > 640)
|
||||
{
|
||||
for (i=1;i<=4;i++)
|
||||
{
|
||||
plotpixel(searchx+i,searchy,whitecol);
|
||||
plotpixel(searchx-i,searchy,whitecol);
|
||||
plotpixel(searchx,searchy-i,whitecol);
|
||||
plotpixel(searchx,searchy+i,whitecol);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static int AskIfSure(void)
|
||||
|
@ -4458,14 +4467,18 @@ int loadgroupfiles(char *fn)
|
|||
case T_INCLUDE:
|
||||
{
|
||||
char *fn;
|
||||
if (!scriptfile_getstring(script,&fn)) {
|
||||
if (!scriptfile_getstring(script,&fn))
|
||||
{
|
||||
scriptfile *included;
|
||||
|
||||
included = scriptfile_fromfile(fn);
|
||||
if (!included) {
|
||||
if (!included)
|
||||
{
|
||||
initprintf("Warning: Failed including %s on line %s:%d\n",
|
||||
fn, script->filename,scriptfile_getlinum(script,cmdtokptr));
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
loadgroupfiles((char *)included);
|
||||
scriptfile_close(included);
|
||||
}
|
||||
|
@ -4491,6 +4504,16 @@ int ExtInit(void)
|
|||
long rv = 0;
|
||||
char cwd[BMAX_PATH];
|
||||
|
||||
#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
addsearchpath("/usr/share/games/jfduke3d");
|
||||
addsearchpath("/usr/local/share/games/jfduke3d");
|
||||
addsearchpath("/usr/share/games/eduke32");
|
||||
addsearchpath("/usr/local/share/games/eduke32");
|
||||
#elif defined(__APPLE__)
|
||||
addsearchpath("/Library/Application Support/JFDuke3D");
|
||||
addsearchpath("/Library/Application Support/EDuke32");
|
||||
#endif
|
||||
|
||||
if (getcwd(cwd,BMAX_PATH)) addsearchpath(cwd);
|
||||
|
||||
if (CommandPaths)
|
||||
|
@ -4510,23 +4533,13 @@ int ExtInit(void)
|
|||
#if defined(_WIN32)
|
||||
if (!access("user_profiles_enabled", F_OK))
|
||||
#else
|
||||
if (usecwd == 0)
|
||||
if (usecwd == 0 && access("user_profiles_disabled", F_OK))
|
||||
#endif
|
||||
{
|
||||
char cwd[BMAX_PATH];
|
||||
char *homedir;
|
||||
int asperr;
|
||||
|
||||
#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||
addsearchpath("/usr/share/games/jfduke3d");
|
||||
addsearchpath("/usr/local/share/games/jfduke3d");
|
||||
addsearchpath("/usr/share/games/eduke32");
|
||||
addsearchpath("/usr/local/share/games/eduke32");
|
||||
#elif defined(__APPLE__)
|
||||
addsearchpath("/Library/Application Support/JFDuke3D");
|
||||
addsearchpath("/Library/Application Support/EDuke32");
|
||||
#endif
|
||||
if (getcwd(cwd,BMAX_PATH)) addsearchpath(cwd);
|
||||
if ((homedir = Bgethomedir()))
|
||||
{
|
||||
Bsnprintf(cwd,sizeof(cwd),"%s/"
|
||||
|
@ -4587,7 +4600,7 @@ int ExtInit(void)
|
|||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||
glusetexcache = glusetexcachecompression = -1;
|
||||
|
||||
initprintf("Using config file %s.\n",setupfilename);
|
||||
initprintf("Using config file '%s'.\n",setupfilename);
|
||||
if (loadsetup(setupfilename) < 0) initprintf("Configuration file not found, using defaults.\n"), rv = 1;
|
||||
|
||||
if (glusetexcache == -1 || glusetexcachecompression == -1)
|
||||
|
@ -4889,8 +4902,11 @@ void ExtCheckKeys(void)
|
|||
if (qsetmode == 200) //In 3D mode
|
||||
{
|
||||
Keys3d();
|
||||
if (sidemode != 1)
|
||||
{
|
||||
editinput();
|
||||
m32_showmouse();
|
||||
if (sidemode != 1) editinput();
|
||||
}
|
||||
return;
|
||||
}
|
||||
Keys2d();
|
||||
|
|
|
@ -8159,6 +8159,7 @@ static void comlinehelp(void)
|
|||
"-NUM\t\tLoad and run a game from slot NUM (0-9)\n"
|
||||
"-a\t\tUse fake player AI (fake multiplayer only)\n"
|
||||
"-cNUM\t\tUse MP mode NUM, 1 = DukeMatch(spawn), 2 = Coop, 3 = Dukematch(no spawn)\n"
|
||||
"-cfg FILE\tUse configuration file FILE\n"
|
||||
"-dFILE\t\tStart to play demo FILE\n"
|
||||
/* "-fNUM\t\tSend fewer packets in multiplayer (1, 2, 4) (deprecated)\n" */
|
||||
"-game_dir DIR\tSee -j\n"
|
||||
|
@ -8425,14 +8426,18 @@ static int loadgroupfiles(const char *fn)
|
|||
case T_INCLUDE:
|
||||
{
|
||||
char *fn;
|
||||
if (!scriptfile_getstring(script,&fn)) {
|
||||
if (!scriptfile_getstring(script,&fn))
|
||||
{
|
||||
scriptfile *included;
|
||||
|
||||
included = scriptfile_fromfile(fn);
|
||||
if (!included) {
|
||||
if (!included)
|
||||
{
|
||||
initprintf("Warning: Failed including %s on line %s:%d\n",
|
||||
fn, script->filename,scriptfile_getlinum(script,cmdtokptr));
|
||||
} else {
|
||||
}
|
||||
else
|
||||
{
|
||||
loadgroupfiles((const char *)included);
|
||||
scriptfile_close(included);
|
||||
}
|
||||
|
@ -9762,7 +9767,7 @@ void app_main(int argc,char **argv)
|
|||
#if defined(_WIN32)
|
||||
if (!access("user_profiles_enabled", F_OK))
|
||||
#else
|
||||
if (usecwd == 0)
|
||||
if (usecwd == 0 && access("user_profiles_disabled", F_OK))
|
||||
#endif
|
||||
{
|
||||
char *homedir;
|
||||
|
@ -9936,7 +9941,7 @@ void app_main(int argc,char **argv)
|
|||
|
||||
Bsprintf(tempbuf,"autoload/%s",duke3dgrp);
|
||||
getfilenames(tempbuf,"*.grp");
|
||||
while (findfiles) { Bsprintf(tempbuf,"autoload/%s/%s",duke3dgrp,findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; }
|
||||
while (findfiles) { Bsprintf(tempbuf,"autoload/%s/%s",duke3dgrp,findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; }
|
||||
Bsprintf(tempbuf,"autoload/%s",duke3dgrp);
|
||||
getfilenames(tempbuf,"*.zip");
|
||||
while (findfiles) { Bsprintf(tempbuf,"autoload/%s/%s",duke3dgrp,findfiles->name); initprintf("Using group file '%s'.\n",tempbuf); initgroupfile(tempbuf); findfiles = findfiles->next; }
|
||||
|
|
|
@ -2145,7 +2145,8 @@ void displayweapon(int snum)
|
|||
if (sprite[p->i].xrepeat < 32)
|
||||
gun_pos -= klabs(sintable[(p->weapon_sway<<2)&2047]>>9);
|
||||
else gun_pos -= klabs(sintable[(p->weapon_sway>>1)&2047]>>10);
|
||||
} else gun_pos -= 16;
|
||||
}
|
||||
else gun_pos -= 16;
|
||||
|
||||
weapon_xoffset -= 58 + p->weapon_ang;
|
||||
gun_pos -= (p->hard_landing<<3);
|
||||
|
|
Loading…
Reference in a new issue