mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-14 08:30:58 +00:00
"noautoload" command for defs to disable autoload & makes the vidmode command work in Mapster32 2d mode
git-svn-id: https://svn.eduke32.com/eduke32@626 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
ee5ff9050e
commit
d6beeac46e
4 changed files with 57 additions and 23 deletions
|
@ -217,8 +217,6 @@ static int osdcmd_vidmode(const osdfuncparm_t *parm)
|
||||||
int newx = xdim, newy = ydim, newbpp = bpp, newfullscreen = fullscreen;
|
int newx = xdim, newy = ydim, newbpp = bpp, newfullscreen = fullscreen;
|
||||||
extern int qsetmode;
|
extern int qsetmode;
|
||||||
|
|
||||||
if (qsetmode != 200) return OSDCMD_OK;
|
|
||||||
|
|
||||||
switch (parm->numparms)
|
switch (parm->numparms)
|
||||||
{
|
{
|
||||||
case 1: // bpp switch
|
case 1: // bpp switch
|
||||||
|
@ -236,6 +234,30 @@ static int osdcmd_vidmode(const osdfuncparm_t *parm)
|
||||||
return OSDCMD_SHOWHELP;
|
return OSDCMD_SHOWHELP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (qsetmode != 200)
|
||||||
|
{
|
||||||
|
qsetmodeany(newx,newy);
|
||||||
|
xdim2d = xdim;
|
||||||
|
ydim2d = ydim;
|
||||||
|
|
||||||
|
begindrawing(); //{{{
|
||||||
|
clearbuf((char *)(frameplace + (ydim16*bytesperline)), (bytesperline*STATUS2DSIZ) >> 2, 0x00000000l);
|
||||||
|
clearbuf((char *)frameplace, (ydim16*bytesperline) >> 2, 0L);
|
||||||
|
|
||||||
|
ydim16 = ydim;
|
||||||
|
drawline16(0,ydim-STATUS2DSIZ,xdim-1,ydim-STATUS2DSIZ,1);
|
||||||
|
drawline16(0,ydim-1,xdim-1,ydim-1,1);
|
||||||
|
drawline16(0,ydim-STATUS2DSIZ,0,ydim-1,1);
|
||||||
|
drawline16(xdim-1,ydim-STATUS2DSIZ,xdim-1,ydim-1,1);
|
||||||
|
drawline16(0,ydim-STATUS2DSIZ+24,xdim-1,ydim-STATUS2DSIZ+24,1);
|
||||||
|
drawline16(192-24,ydim-STATUS2DSIZ,192-24,ydim-STATUS2DSIZ+24,1);
|
||||||
|
drawline16(0,ydim-1-20,xdim-1,ydim-1-20,1);
|
||||||
|
drawline16(256,ydim-1-20,256,ydim-1,1);
|
||||||
|
ydim16 = ydim-STATUS2DSIZ;
|
||||||
|
enddrawing(); //}}}
|
||||||
|
return OSDCMD_OK;
|
||||||
|
}
|
||||||
|
|
||||||
if (setgamemode(newfullscreen,newx,newy,newbpp))
|
if (setgamemode(newfullscreen,newx,newy,newbpp))
|
||||||
OSD_Printf("vidmode: Mode change failed!\n");
|
OSD_Printf("vidmode: Mode change failed!\n");
|
||||||
xdimgame = newx; ydimgame = newy; bppgame = newbpp; fullscreen = newfullscreen;
|
xdimgame = newx; ydimgame = newy; bppgame = newbpp; fullscreen = newfullscreen;
|
||||||
|
@ -2833,7 +2855,8 @@ void overheadeditor(void)
|
||||||
drawline16(xdim-1,ydim-STATUS2DSIZ,xdim-1,ydim-1,1);
|
drawline16(xdim-1,ydim-STATUS2DSIZ,xdim-1,ydim-1,1);
|
||||||
drawline16(0,ydim-STATUS2DSIZ+24,xdim-1,ydim-STATUS2DSIZ+24,1);
|
drawline16(0,ydim-STATUS2DSIZ+24,xdim-1,ydim-STATUS2DSIZ+24,1);
|
||||||
drawline16(192-24,ydim-STATUS2DSIZ,192-24,ydim-STATUS2DSIZ+24,1);
|
drawline16(192-24,ydim-STATUS2DSIZ,192-24,ydim-STATUS2DSIZ+24,1);
|
||||||
if (totalclock < 120*5) printext16(8L,ydim-STATUS2DSIZ+32L,9,-1,kensig,0);
|
if (totalclock < 120*5)
|
||||||
|
printext16(8L,ydim-STATUS2DSIZ+32L,9,-1,kensig,0);
|
||||||
|
|
||||||
// printmessage16("Version: "VERSION);
|
// printmessage16("Version: "VERSION);
|
||||||
if (totalclock < 30) printmessage16("Press F1 for help");
|
if (totalclock < 30) printmessage16("Press F1 for help");
|
||||||
|
@ -5974,8 +5997,6 @@ CANCEL:
|
||||||
uninitinput();
|
uninitinput();
|
||||||
ExtUnInit();
|
ExtUnInit();
|
||||||
uninitengine();
|
uninitengine();
|
||||||
printf("Memory status: %d(%d) bytes\n",cachesize,artsize);
|
|
||||||
printf("%s\n",kensig);
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
else if (ch == 'n' || ch == 'N' || ch == 13 || ch == ' ')
|
else if (ch == 'n' || ch == 'N' || ch == 13 || ch == ' ')
|
||||||
|
@ -6012,9 +6033,9 @@ CANCEL:
|
||||||
ExtUnInit();
|
ExtUnInit();
|
||||||
uninitinput();
|
uninitinput();
|
||||||
uninittimer();
|
uninittimer();
|
||||||
|
initprintf("%d * %d not supported in this graphics mode\n",xdim,ydim);
|
||||||
uninitsystem();
|
uninitsystem();
|
||||||
clearfilenames();
|
clearfilenames();
|
||||||
printf("%d * %d not supported in this graphics mode\n",xdim,ydim);
|
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7067,7 +7088,7 @@ int loadnames(void)
|
||||||
{
|
{
|
||||||
if ((fp = fopenfrompath("names.h","r")) == NULL)
|
if ((fp = fopenfrompath("names.h","r")) == NULL)
|
||||||
{
|
{
|
||||||
printf("Failed to open NAMES.H\n");
|
initprintf("Failed to open NAMES.H\n");
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7075,7 +7096,7 @@ int loadnames(void)
|
||||||
//clearbufbyte(names, sizeof(names), 0);
|
//clearbufbyte(names, sizeof(names), 0);
|
||||||
memset(names,0,sizeof(names));
|
memset(names,0,sizeof(names));
|
||||||
|
|
||||||
printf("Loading NAMES.H\n");
|
initprintf("Loading NAMES.H\n");
|
||||||
|
|
||||||
while (Bfgets(buffer, 1024, fp))
|
while (Bfgets(buffer, 1024, fp))
|
||||||
{
|
{
|
||||||
|
@ -7105,7 +7126,7 @@ int loadnames(void)
|
||||||
while (*p == 32) p++;
|
while (*p == 32) p++;
|
||||||
if (*p == 0)
|
if (*p == 0)
|
||||||
{
|
{
|
||||||
printf("Error: Malformed #define at line %d\n", line-1);
|
initprintf("Error: Malformed #define at line %d\n", line-1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7117,7 +7138,7 @@ int loadnames(void)
|
||||||
while (*p == 32) p++;
|
while (*p == 32) p++;
|
||||||
if (*p == 0) // #define_NAME with no number
|
if (*p == 0) // #define_NAME with no number
|
||||||
{
|
{
|
||||||
printf("Error: No number given for name \"%s\" (line %d)\n", name, line-1);
|
initprintf("Error: No number given for name \"%s\" (line %d)\n", name, line-1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7135,12 +7156,12 @@ int loadnames(void)
|
||||||
//printf("Grokked \"%s\" -> \"%d\"\n", name, num);
|
//printf("Grokked \"%s\" -> \"%d\"\n", name, num);
|
||||||
if (num < 0 || num >= MAXTILES)
|
if (num < 0 || num >= MAXTILES)
|
||||||
{
|
{
|
||||||
printf("Error: Constant %d for name \"%s\" out of range (line %d)\n", num, name, line-1);
|
initprintf("Error: Constant %d for name \"%s\" out of range (line %d)\n", num, name, line-1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Bstrlen(name) > 24)
|
if (Bstrlen(name) > 24)
|
||||||
printf("Warning: Name \"%s\" longer than 24 characters (line %d). Truncating.\n", name, line-1);
|
initprintf("Warning: Name \"%s\" longer than 24 characters (line %d). Truncating.\n", name, line-1);
|
||||||
|
|
||||||
Bstrncpy(names[num], name, 24);
|
Bstrncpy(names[num], name, 24);
|
||||||
names[num][24] = 0;
|
names[num][24] = 0;
|
||||||
|
@ -7152,7 +7173,7 @@ int loadnames(void)
|
||||||
}
|
}
|
||||||
else // #define_NAME with no number
|
else // #define_NAME with no number
|
||||||
{
|
{
|
||||||
printf("Error: No number given for name \"%s\" (line %d)\n", name, line-1);
|
initprintf("Error: No number given for name \"%s\" (line %d)\n", name, line-1);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7163,9 +7184,9 @@ int loadnames(void)
|
||||||
if (*(p+1) == '/') continue; // comment
|
if (*(p+1) == '/') continue; // comment
|
||||||
}
|
}
|
||||||
badline:
|
badline:
|
||||||
printf("Error: Invalid statement found at character %d on line %d\n", (p-buffer), line-1);
|
initprintf("Error: Invalid statement found at character %d on line %d\n", (p-buffer), line-1);
|
||||||
}
|
}
|
||||||
printf("Read %d lines, loaded %d names.\n", line, syms);
|
initprintf("Read %d lines, loaded %d names.\n", line, syms);
|
||||||
|
|
||||||
Bfclose(fp);
|
Bfclose(fp);
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -5210,7 +5210,7 @@ int ExtPreInit(int argc,const char **argv)
|
||||||
OSD_SetLogFile("mapster32.log");
|
OSD_SetLogFile("mapster32.log");
|
||||||
OSD_SetVersionString("Mapster32"VERSION,0,2);
|
OSD_SetVersionString("Mapster32"VERSION,0,2);
|
||||||
initprintf("Mapster32"VERSION" ("__DATE__" "__TIME__")\n");
|
initprintf("Mapster32"VERSION" ("__DATE__" "__TIME__")\n");
|
||||||
initprintf("Copyright (c) 2007 EDuke32 team\n");
|
initprintf("Copyright (c) 2008 EDuke32 team\n");
|
||||||
|
|
||||||
checkcommandline(argc,argv);
|
checkcommandline(argc,argv);
|
||||||
|
|
||||||
|
@ -5533,7 +5533,8 @@ enum
|
||||||
T_TILE,
|
T_TILE,
|
||||||
T_TILERANGE,
|
T_TILERANGE,
|
||||||
T_HOTKEY,
|
T_HOTKEY,
|
||||||
T_TILES
|
T_TILES,
|
||||||
|
T_NOAUTOLOAD
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -5583,6 +5584,7 @@ int parsegroupfiles(scriptfile *script)
|
||||||
{ "include", T_INCLUDE },
|
{ "include", T_INCLUDE },
|
||||||
{ "#include", T_INCLUDE },
|
{ "#include", T_INCLUDE },
|
||||||
{ "loadgrp", T_LOADGRP },
|
{ "loadgrp", T_LOADGRP },
|
||||||
|
{ "noautoload", T_NOAUTOLOAD }
|
||||||
};
|
};
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
|
@ -5635,6 +5637,9 @@ int parsegroupfiles(scriptfile *script)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case T_NOAUTOLOAD:
|
||||||
|
NoAutoLoad = 1;
|
||||||
|
break;
|
||||||
case T_EOF:
|
case T_EOF:
|
||||||
return(0);
|
return(0);
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -255,7 +255,8 @@ enum
|
||||||
T_LOADGRP = 1,
|
T_LOADGRP = 1,
|
||||||
T_MODE = 1,
|
T_MODE = 1,
|
||||||
T_CACHESIZE = 2,
|
T_CACHESIZE = 2,
|
||||||
T_ALLOW = 2
|
T_ALLOW = 2,
|
||||||
|
T_NOAUTOLOAD,
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -8616,6 +8617,7 @@ static int parsegroupfiles(scriptfile *script)
|
||||||
{ "#include", T_INCLUDE },
|
{ "#include", T_INCLUDE },
|
||||||
{ "loadgrp", T_LOADGRP },
|
{ "loadgrp", T_LOADGRP },
|
||||||
{ "cachesize", T_CACHESIZE },
|
{ "cachesize", T_CACHESIZE },
|
||||||
|
{ "noautload", T_NOAUTOLOAD },
|
||||||
};
|
};
|
||||||
|
|
||||||
while (1)
|
while (1)
|
||||||
|
@ -8675,6 +8677,9 @@ static int parsegroupfiles(scriptfile *script)
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case T_NOAUTOLOAD:
|
||||||
|
g_NoAutoLoad = 1;
|
||||||
|
break;
|
||||||
case T_EOF:
|
case T_EOF:
|
||||||
return(0);
|
return(0);
|
||||||
default:
|
default:
|
||||||
|
@ -9976,7 +9981,7 @@ void app_main(int argc,const char **argv)
|
||||||
|
|
||||||
initprintf("%s (%s)\n",apptitle,datetimestring);
|
initprintf("%s (%s)\n",apptitle,datetimestring);
|
||||||
initprintf("Copyright (c) 1996, 2003 3D Realms Entertainment\n");
|
initprintf("Copyright (c) 1996, 2003 3D Realms Entertainment\n");
|
||||||
initprintf("Copyright (c) 2007 EDuke32 team\n");
|
initprintf("Copyright (c) 2008 EDuke32 team\n");
|
||||||
|
|
||||||
#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
#if defined(__linux__) || defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
addsearchpath("/usr/share/games/jfduke3d");
|
addsearchpath("/usr/share/games/jfduke3d");
|
||||||
|
|
|
@ -622,8 +622,8 @@ void menus(void)
|
||||||
|
|
||||||
if (bpp > 8)
|
if (bpp > 8)
|
||||||
{
|
{
|
||||||
int x,y,y1=0,y2=ydim;
|
int x,y=0;
|
||||||
for (y=y1;y<y2;y+=tilesizy[BIGHOLE])
|
for (;y<ydim;y+=tilesizy[BIGHOLE])
|
||||||
for (x=0;x<xdim;x+=tilesizx[BIGHOLE])
|
for (x=0;x<xdim;x+=tilesizx[BIGHOLE])
|
||||||
rotatesprite(x<<16,y<<16,65536L,0,BIGHOLE,80,0,1+8+16,0,0,xdim-1,ydim-1);
|
rotatesprite(x<<16,y<<16,65536L,0,BIGHOLE,80,0,1+8+16,0,0,xdim-1,ydim-1);
|
||||||
}
|
}
|
||||||
|
@ -1856,13 +1856,13 @@ cheat_for_port_credits:
|
||||||
minitext(161-(Bstrlen(p)<<1), 58+10-l, p, 4, 10+16+128);
|
minitext(161-(Bstrlen(p)<<1), 58+10-l, p, 4, 10+16+128);
|
||||||
minitext(160-(Bstrlen(p)<<1), 57+10-l, p, 8, 10+16+128);
|
minitext(160-(Bstrlen(p)<<1), 57+10-l, p, 8, 10+16+128);
|
||||||
|
|
||||||
gametext(160,76-l,"ORIGINAL \"POLYMOST\" RENDERER",0,2+8+16);
|
gametext(160,76-l,"BUILD ENGINE, \"POLYMOST\" RENDERER",0,2+8+16);
|
||||||
gametext(160,76+8-l,"NETWORKING, OTHER CODE",0,2+8+16);
|
gametext(160,76+8-l,"NETWORKING, OTHER CODE",0,2+8+16);
|
||||||
p = "Ken \"Awesoken\" Silverman";
|
p = "Ken \"Awesoken\" Silverman";
|
||||||
minitext(161-(Bstrlen(p)<<1), 77+8+10-l, p, 4, 10+16+128);
|
minitext(161-(Bstrlen(p)<<1), 77+8+10-l, p, 4, 10+16+128);
|
||||||
minitext(160-(Bstrlen(p)<<1), 76+8+10-l, p, 8, 10+16+128);
|
minitext(160-(Bstrlen(p)<<1), 76+8+10-l, p, 8, 10+16+128);
|
||||||
|
|
||||||
gametext(160,103-l,"RENDERING FEATURES",0,2+8+16);
|
gametext(160,103-l,"ADDITIONAL RENDERING FEATURES",0,2+8+16);
|
||||||
p = "Pierre-Loup \"Plagman\" Griffais";
|
p = "Pierre-Loup \"Plagman\" Griffais";
|
||||||
minitext(161-(Bstrlen(p)<<1), 104+10-l, p, 4, 10+16+128);
|
minitext(161-(Bstrlen(p)<<1), 104+10-l, p, 4, 10+16+128);
|
||||||
minitext(160-(Bstrlen(p)<<1), 103+10-l, p, 8, 10+16+128);
|
minitext(160-(Bstrlen(p)<<1), 103+10-l, p, 8, 10+16+128);
|
||||||
|
@ -1912,6 +1912,9 @@ cheat_for_port_credits:
|
||||||
p = "Visit www.eduke32.com for news and updates";
|
p = "Visit www.eduke32.com for news and updates";
|
||||||
minitext(161-(Bstrlen(p)<<1), 136+10+10+10+10+4-l, p, 4, 10+16+128);
|
minitext(161-(Bstrlen(p)<<1), 136+10+10+10+10+4-l, p, 4, 10+16+128);
|
||||||
minitext(160-(Bstrlen(p)<<1), 135+10+10+10+10+4-l, p, 8, 10+16+128);
|
minitext(160-(Bstrlen(p)<<1), 135+10+10+10+10+4-l, p, 8, 10+16+128);
|
||||||
|
p = "See wiki.eduke32.com/stuff for new beta snapshots";
|
||||||
|
minitext(161-(Bstrlen(p)<<1), 143+10+10+10+10+4-l, p, 4, 10+16+128);
|
||||||
|
minitext(160-(Bstrlen(p)<<1), 142+10+10+10+10+4-l, p, 8, 10+16+128);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue