mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-11 18:50:46 +00:00
git-svn-id: https://svn.eduke32.com/eduke32@855 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
c660bfb129
commit
5ce5b287fa
12 changed files with 60 additions and 48 deletions
|
@ -49,6 +49,7 @@ struct glinfo glinfo =
|
||||||
static void onvideomodechange(int newmode) { UNREFERENCED_PARAMETER(newmode); }
|
static void onvideomodechange(int newmode) { UNREFERENCED_PARAMETER(newmode); }
|
||||||
void (*baselayer_onvideomodechange)(int) = onvideomodechange;
|
void (*baselayer_onvideomodechange)(int) = onvideomodechange;
|
||||||
|
|
||||||
|
#if defined(POLYMOST)
|
||||||
static int osdfunc_setrendermode(const osdfuncparm_t *parm)
|
static int osdfunc_setrendermode(const osdfuncparm_t *parm)
|
||||||
{
|
{
|
||||||
int m;
|
int m;
|
||||||
|
@ -70,8 +71,7 @@ static int osdfunc_setrendermode(const osdfuncparm_t *parm)
|
||||||
|
|
||||||
return OSDCMD_OK;
|
return OSDCMD_OK;
|
||||||
}
|
}
|
||||||
|
#if defined(USE_OPENGL)
|
||||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
|
||||||
#ifdef DEBUGGINGAIDS
|
#ifdef DEBUGGINGAIDS
|
||||||
static int osdcmd_hicsetpalettetint(const osdfuncparm_t *parm)
|
static int osdcmd_hicsetpalettetint(const osdfuncparm_t *parm)
|
||||||
{
|
{
|
||||||
|
@ -173,6 +173,7 @@ int osdcmd_glinfo(const osdfuncparm_t *parm)
|
||||||
return OSDCMD_OK;
|
return OSDCMD_OK;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
static int osdcmd_vars(const osdfuncparm_t *parm)
|
static int osdcmd_vars(const osdfuncparm_t *parm)
|
||||||
{
|
{
|
||||||
|
|
|
@ -6286,7 +6286,7 @@ killsprite:
|
||||||
while (maskwallcnt)
|
while (maskwallcnt)
|
||||||
{
|
{
|
||||||
maskwallcnt--;
|
maskwallcnt--;
|
||||||
|
#if defined(USE_OPENGL) && defined(POLYMER)
|
||||||
if (rendmode == 4)
|
if (rendmode == 4)
|
||||||
{
|
{
|
||||||
dot.x = wall[maskwall[maskwallcnt]].x;
|
dot.x = wall[maskwall[maskwallcnt]].x;
|
||||||
|
@ -6295,6 +6295,7 @@ killsprite:
|
||||||
dot2.y = wall[wall[maskwall[maskwallcnt]].point2].y;
|
dot2.y = wall[wall[maskwall[maskwallcnt]].point2].y;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
{
|
{
|
||||||
dot.x = wall[thewall[maskwall[maskwallcnt]]].x;
|
dot.x = wall[thewall[maskwall[maskwallcnt]]].x;
|
||||||
dot.y = wall[thewall[maskwall[maskwallcnt]]].y;
|
dot.y = wall[thewall[maskwall[maskwallcnt]]].y;
|
||||||
|
|
|
@ -2663,21 +2663,6 @@ static int OnSelectTile(int iTile)
|
||||||
setpolymost2dview();
|
setpolymost2dview();
|
||||||
clearview(0);
|
clearview(0);
|
||||||
|
|
||||||
//
|
|
||||||
// Display the description strings for each available tile group
|
|
||||||
//
|
|
||||||
|
|
||||||
for (i = 0; (unsigned)i < tile_groups; i++)
|
|
||||||
{
|
|
||||||
if (s_TileGroups[i].szText != NULL)
|
|
||||||
{
|
|
||||||
if ((i+2)*16 > ydimgame) break;
|
|
||||||
Bsprintf(tempbuf,"(%c) %s",s_TileGroups[i].key1,s_TileGroups[i].szText);
|
|
||||||
printext256(10L, (i+1)*16, whitecol, -1, tempbuf, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
showframe(1);
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Await appropriate selection keypress.
|
// Await appropriate selection keypress.
|
||||||
//
|
//
|
||||||
|
@ -2692,6 +2677,21 @@ static int OnSelectTile(int iTile)
|
||||||
}
|
}
|
||||||
idle();
|
idle();
|
||||||
|
|
||||||
|
//
|
||||||
|
// Display the description strings for each available tile group
|
||||||
|
//
|
||||||
|
for (i = 0; (unsigned)i < tile_groups; i++)
|
||||||
|
{
|
||||||
|
if (s_TileGroups[i].szText != NULL)
|
||||||
|
{
|
||||||
|
if ((i+2)*16 > ydimgame) break;
|
||||||
|
Bsprintf(tempbuf,"(%c) %s",s_TileGroups[i].key1,s_TileGroups[i].szText);
|
||||||
|
printext256(10L, (i+1)*16, whitecol, -1, tempbuf, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
showframe(1);
|
||||||
|
|
||||||
|
|
||||||
ch = bgetchar();
|
ch = bgetchar();
|
||||||
|
|
||||||
for (i = 0; (unsigned)i < tile_groups; i++)
|
for (i = 0; (unsigned)i < tile_groups; i++)
|
||||||
|
@ -3016,9 +3016,9 @@ static void Keys3d(void)
|
||||||
height2=sector[nextsect].floorz-sector[nextsect].ceilingz;
|
height2=sector[nextsect].floorz-sector[nextsect].ceilingz;
|
||||||
height3=sector[nextsect].ceilingz-sector[searchsector].ceilingz;
|
height3=sector[nextsect].ceilingz-sector[searchsector].ceilingz;
|
||||||
}
|
}
|
||||||
Bsprintf(lines[num++],"Panning: %3d, %3d",wall[searchwall].xpanning,wall[searchwall].ypanning);
|
Bsprintf(lines[num++],"Panning: %d, %d",wall[searchwall].xpanning,wall[searchwall].ypanning);
|
||||||
Bsprintf(lines[num++],"Repeat: %3d, %3d",wall[searchwall].xrepeat,wall[searchwall].yrepeat);
|
Bsprintf(lines[num++],"Repeat: %d, %d",wall[searchwall].xrepeat,wall[searchwall].yrepeat);
|
||||||
Bsprintf(lines[num++],"Overpic: %3d",wall[searchwall].overpicnum);
|
Bsprintf(lines[num++],"Overpic: %d",wall[searchwall].overpicnum);
|
||||||
lines[num++][0]=0;
|
lines[num++][0]=0;
|
||||||
if (getmessageleng)
|
if (getmessageleng)
|
||||||
break;
|
break;
|
||||||
|
@ -3033,7 +3033,7 @@ static void Keys3d(void)
|
||||||
sector[searchsector].ceilingpal,sector[searchsector].ceilingstat,
|
sector[searchsector].ceilingpal,sector[searchsector].ceilingstat,
|
||||||
sector[searchsector].lotag,sector[searchsector].hitag,sector[searchsector].extra);
|
sector[searchsector].lotag,sector[searchsector].hitag,sector[searchsector].extra);
|
||||||
|
|
||||||
Bsprintf(lines[num++],"Panning: %d,%d",sector[searchsector].ceilingxpanning,sector[searchsector].ceilingypanning);
|
Bsprintf(lines[num++],"Panning: %d, %d",sector[searchsector].ceilingxpanning,sector[searchsector].ceilingypanning);
|
||||||
Bsprintf(lines[num++],"CeilingZ: %d",sector[searchsector].ceilingz);
|
Bsprintf(lines[num++],"CeilingZ: %d",sector[searchsector].ceilingz);
|
||||||
Bsprintf(lines[num++],"Slope: %d",sector[searchsector].ceilingheinum);
|
Bsprintf(lines[num++],"Slope: %d",sector[searchsector].ceilingheinum);
|
||||||
lines[num++][0]=0;
|
lines[num++][0]=0;
|
||||||
|
|
|
@ -552,7 +552,7 @@ typedef struct {
|
||||||
int workslike, extra, cstat, extra_rand, hitradius, range;
|
int workslike, extra, cstat, extra_rand, hitradius, range;
|
||||||
short spawns, sound, isound, vel, decal, trail, tnum, drop, clipdist, offset, bounces, bsound, toffset;
|
short spawns, sound, isound, vel, decal, trail, tnum, drop, clipdist, offset, bounces, bsound, toffset;
|
||||||
signed char sxrepeat, syrepeat, txrepeat, tyrepeat, shade, xrepeat, yrepeat, pal, velmult;
|
signed char sxrepeat, syrepeat, txrepeat, tyrepeat, shade, xrepeat, yrepeat, pal, velmult;
|
||||||
} proj_struct;
|
} projectile_t;
|
||||||
|
|
||||||
// extern char gotz;
|
// extern char gotz;
|
||||||
|
|
||||||
|
@ -573,7 +573,7 @@ typedef struct {
|
||||||
short tempang,actorstayput,dispicnum;
|
short tempang,actorstayput,dispicnum;
|
||||||
short timetosleep;
|
short timetosleep;
|
||||||
char cgg;
|
char cgg;
|
||||||
proj_struct projectile;
|
projectile_t projectile;
|
||||||
} actordata_t;
|
} actordata_t;
|
||||||
|
|
||||||
extern actordata_t hittype[MAXSPRITES];
|
extern actordata_t hittype[MAXSPRITES];
|
||||||
|
@ -963,7 +963,7 @@ enum projectileflags {
|
||||||
PROJECTILE_FLAG_FORCEIMPACT = 262144
|
PROJECTILE_FLAG_FORCEIMPACT = 262144
|
||||||
};
|
};
|
||||||
|
|
||||||
extern proj_struct projectile[MAXTILES], defaultprojectile[MAXTILES];
|
extern projectile_t projectile[MAXTILES], defaultprojectile[MAXTILES];
|
||||||
|
|
||||||
// logo control
|
// logo control
|
||||||
|
|
||||||
|
@ -984,10 +984,10 @@ extern int g_NumPalettes;
|
||||||
extern int g_ScriptDebug;
|
extern int g_ScriptDebug;
|
||||||
|
|
||||||
#define MAXCHEATLEN 20
|
#define MAXCHEATLEN 20
|
||||||
#define NUMCHEATCODES (signed int)(sizeof(cheatquotes)/sizeof(cheatquotes[MAXCHEATLEN]))
|
#define NUMCHEATCODES (signed int)(sizeof(cheatstrings)/sizeof(cheatstrings[0]))
|
||||||
|
|
||||||
extern char cheatkey[2];
|
extern char cheatkey[2];
|
||||||
extern char cheatquotes[][MAXCHEATLEN];
|
extern char cheatstrings[][MAXCHEATLEN];
|
||||||
|
|
||||||
extern short weapon_sprites[MAX_WEAPONS];
|
extern short weapon_sprites[MAX_WEAPONS];
|
||||||
|
|
||||||
|
|
|
@ -4068,7 +4068,11 @@ void displayrooms(int snum,int smoothratio)
|
||||||
#ifdef SE40
|
#ifdef SE40
|
||||||
se40code(ud.camerax,ud.cameray,ud.cameraz,ud.cameraang,ud.camerahoriz,smoothratio);
|
se40code(ud.camerax,ud.cameray,ud.cameraz,ud.cameraang,ud.camerahoriz,smoothratio);
|
||||||
#endif
|
#endif
|
||||||
if (((gotpic[MIRROR>>3]&(1<<(MIRROR&7))) > 0) && (rendmode != 4))
|
if (((gotpic[MIRROR>>3]&(1<<(MIRROR&7))) > 0)
|
||||||
|
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||||
|
&& (rendmode != 4)
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
dst = 0x7fffffff;
|
dst = 0x7fffffff;
|
||||||
i = 0;
|
i = 0;
|
||||||
|
@ -7086,7 +7090,7 @@ PALONLY:
|
||||||
|
|
||||||
static char terminx[64] = { "Undead TC still sucks." };
|
static char terminx[64] = { "Undead TC still sucks." };
|
||||||
|
|
||||||
char cheatquotes[][MAXCHEATLEN] =
|
char cheatstrings[][MAXCHEATLEN] =
|
||||||
{
|
{
|
||||||
"cornholio", // 0
|
"cornholio", // 0
|
||||||
"stuff", // 1
|
"stuff", // 1
|
||||||
|
@ -7236,8 +7240,8 @@ static void cheats(void)
|
||||||
|
|
||||||
if (VOLUMEONE && !z)
|
if (VOLUMEONE && !z)
|
||||||
{
|
{
|
||||||
Bstrcpy(cheatquotes[2],"scotty##");
|
Bstrcpy(cheatstrings[2],"scotty##");
|
||||||
Bstrcpy(cheatquotes[6],"<RESERVED>");
|
Bstrcpy(cheatstrings[6],"<RESERVED>");
|
||||||
z=1;
|
z=1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -7271,9 +7275,9 @@ static void cheats(void)
|
||||||
{
|
{
|
||||||
for (j = 0;j<cheatbuflen;j++)
|
for (j = 0;j<cheatbuflen;j++)
|
||||||
{
|
{
|
||||||
if (cheatbuf[j] == cheatquotes[k][j] || (cheatquotes[k][j] == '#' && ch >= '0' && ch <= '9'))
|
if (cheatbuf[j] == cheatstrings[k][j] || (cheatstrings[k][j] == '#' && ch >= '0' && ch <= '9'))
|
||||||
{
|
{
|
||||||
if (cheatquotes[k][j+1] == 0) goto FOUNDCHEAT;
|
if (cheatstrings[k][j+1] == 0) goto FOUNDCHEAT;
|
||||||
if (j == cheatbuflen-1) return;
|
if (j == cheatbuflen-1) return;
|
||||||
}
|
}
|
||||||
else break;
|
else break;
|
||||||
|
@ -7464,7 +7468,7 @@ FOUNDCHEAT:
|
||||||
case CHEAT_SKILL:
|
case CHEAT_SKILL:
|
||||||
if (k == CHEAT_SCOTTY)
|
if (k == CHEAT_SCOTTY)
|
||||||
{
|
{
|
||||||
i = Bstrlen(cheatquotes[k])-3+VOLUMEONE;
|
i = Bstrlen(cheatstrings[k])-3+VOLUMEONE;
|
||||||
if (!consolecheat)
|
if (!consolecheat)
|
||||||
{
|
{
|
||||||
// JBF 20030914
|
// JBF 20030914
|
||||||
|
@ -7503,7 +7507,7 @@ FOUNDCHEAT:
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
i = Bstrlen(cheatquotes[k])-1;
|
i = Bstrlen(cheatstrings[k])-1;
|
||||||
ud.m_player_skill = ud.player_skill = cheatbuf[i] - '1';
|
ud.m_player_skill = ud.player_skill = cheatbuf[i] - '1';
|
||||||
}
|
}
|
||||||
if (numplayers > 1 && myconnectindex == connecthead)
|
if (numplayers > 1 && myconnectindex == connecthead)
|
||||||
|
|
|
@ -4596,17 +4596,17 @@ repeatcase:
|
||||||
textptr++;
|
textptr++;
|
||||||
while (*textptr != 0x0a && *textptr != 0x0d && *textptr != 0 && *textptr != ' ')
|
while (*textptr != 0x0a && *textptr != 0x0d && *textptr != 0 && *textptr != ' ')
|
||||||
{
|
{
|
||||||
cheatquotes[k][i] = *textptr;
|
cheatstrings[k][i] = *textptr;
|
||||||
textptr++,i++;
|
textptr++,i++;
|
||||||
if (i >= (signed)sizeof(cheatquotes[k])-1)
|
if (i >= (signed)sizeof(cheatstrings[k])-1)
|
||||||
{
|
{
|
||||||
initprintf("%s:%d: error: cheat exceeds limit of %d characters.\n",compilefile,line_number,MAXCHEATLEN,sizeof(cheatquotes[k])-1);
|
initprintf("%s:%d: error: cheat exceeds limit of %d characters.\n",compilefile,line_number,MAXCHEATLEN,sizeof(cheatstrings[k])-1);
|
||||||
error++;
|
error++;
|
||||||
while (*textptr != 0x0a && *textptr != 0x0d && *textptr != 0 && *textptr != ' ') textptr++;
|
while (*textptr != 0x0a && *textptr != 0x0d && *textptr != 0 && *textptr != ' ') textptr++;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
cheatquotes[k][i] = '\0';
|
cheatstrings[k][i] = '\0';
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case CON_DEFINESOUND:
|
case CON_DEFINESOUND:
|
||||||
|
|
|
@ -52,7 +52,7 @@ extern int g_kb;
|
||||||
extern int g_looking_angSR1;
|
extern int g_looking_angSR1;
|
||||||
extern int display_bonus_screen;
|
extern int display_bonus_screen;
|
||||||
extern int lastvisinc;
|
extern int lastvisinc;
|
||||||
extern char cheatquotes[][MAXCHEATLEN];
|
extern char cheatstrings[][MAXCHEATLEN];
|
||||||
extern char compilefile[BMAX_PATH];
|
extern char compilefile[BMAX_PATH];
|
||||||
extern int total_lines,line_number;
|
extern int total_lines,line_number;
|
||||||
extern int error,warning;
|
extern int error,warning;
|
||||||
|
|
|
@ -5748,8 +5748,11 @@ static int parse(void)
|
||||||
#ifdef SE40
|
#ifdef SE40
|
||||||
se40code(x,y,z,a,horiz,smoothratio);
|
se40code(x,y,z,a,horiz,smoothratio);
|
||||||
#endif
|
#endif
|
||||||
|
if (((gotpic[MIRROR>>3]&(1<<(MIRROR&7))) > 0)
|
||||||
if (((gotpic[MIRROR>>3]&(1<<(MIRROR&7))) > 0) && (rendmode != 4))
|
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||||
|
&& (rendmode != 4)
|
||||||
|
#endif
|
||||||
|
)
|
||||||
{
|
{
|
||||||
int j, i = 0, k, dst = 0x7fffffff;
|
int j, i = 0, k, dst = 0x7fffffff;
|
||||||
|
|
||||||
|
|
|
@ -173,7 +173,7 @@ int nextvoxid = 0;
|
||||||
|
|
||||||
int spriteflags[MAXTILES];
|
int spriteflags[MAXTILES];
|
||||||
|
|
||||||
proj_struct projectile[MAXTILES], thisprojectile[MAXSPRITES], defaultprojectile[MAXTILES];
|
projectile_t projectile[MAXTILES], thisprojectile[MAXSPRITES], defaultprojectile[MAXTILES];
|
||||||
|
|
||||||
char cheatkey[2] = { sc_D, sc_N };
|
char cheatkey[2] = { sc_D, sc_N };
|
||||||
char setupfilename[BMAX_PATH]= "duke3d.cfg";
|
char setupfilename[BMAX_PATH]= "duke3d.cfg";
|
||||||
|
|
|
@ -15,6 +15,7 @@
|
||||||
#include "util_lib.h"
|
#include "util_lib.h"
|
||||||
|
|
||||||
#include "baselayer.h"
|
#include "baselayer.h"
|
||||||
|
#include "osd.h"
|
||||||
#include "pragmas.h"
|
#include "pragmas.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -399,7 +399,7 @@ static void dofrontscreens(char *statustext)
|
||||||
|
|
||||||
void cacheit(void)
|
void cacheit(void)
|
||||||
{
|
{
|
||||||
int i,j,k, pc=0;
|
int i,j,pc=0;
|
||||||
int tc;
|
int tc;
|
||||||
unsigned int starttime, endtime;
|
unsigned int starttime, endtime;
|
||||||
|
|
||||||
|
@ -466,6 +466,8 @@ void cacheit(void)
|
||||||
#if defined(POLYMOST) && defined(USE_OPENGL)
|
#if defined(POLYMOST) && defined(USE_OPENGL)
|
||||||
if (ud.config.useprecache)
|
if (ud.config.useprecache)
|
||||||
{
|
{
|
||||||
|
int k;
|
||||||
|
|
||||||
if (precachehightile[0][i>>3] & pow2char[i&7])
|
if (precachehightile[0][i>>3] & pow2char[i&7])
|
||||||
for (k=0; k<MAXPALOOKUPS && !KB_KeyPressed(sc_Space); k++)
|
for (k=0; k<MAXPALOOKUPS && !KB_KeyPressed(sc_Space); k++)
|
||||||
polymost_precache(i,k,0);
|
polymost_precache(i,k,0);
|
||||||
|
|
|
@ -356,8 +356,8 @@ int loadplayer(int spot)
|
||||||
if (kdfread(&global_random,sizeof(global_random),1,fil) != 1) goto corrupt;
|
if (kdfread(&global_random,sizeof(global_random),1,fil) != 1) goto corrupt;
|
||||||
if (kdfread(¶llaxyscale,sizeof(parallaxyscale),1,fil) != 1) goto corrupt;
|
if (kdfread(¶llaxyscale,sizeof(parallaxyscale),1,fil) != 1) goto corrupt;
|
||||||
|
|
||||||
if (kdfread(&projectile[0],sizeof(proj_struct),MAXTILES,fil) != MAXTILES) goto corrupt;
|
if (kdfread(&projectile[0],sizeof(projectile_t),MAXTILES,fil) != MAXTILES) goto corrupt;
|
||||||
if (kdfread(&defaultprojectile[0],sizeof(proj_struct),MAXTILES,fil) != MAXTILES) goto corrupt;
|
if (kdfread(&defaultprojectile[0],sizeof(projectile_t),MAXTILES,fil) != MAXTILES) goto corrupt;
|
||||||
|
|
||||||
if (kdfread(&spriteflags[0],sizeof(spriteflags[0]),MAXTILES,fil) != MAXTILES) goto corrupt;
|
if (kdfread(&spriteflags[0],sizeof(spriteflags[0]),MAXTILES,fil) != MAXTILES) goto corrupt;
|
||||||
|
|
||||||
|
@ -764,8 +764,8 @@ int saveplayer(int spot)
|
||||||
dfwrite(&global_random,sizeof(global_random),1,fil);
|
dfwrite(&global_random,sizeof(global_random),1,fil);
|
||||||
dfwrite(¶llaxyscale,sizeof(parallaxyscale),1,fil);
|
dfwrite(¶llaxyscale,sizeof(parallaxyscale),1,fil);
|
||||||
|
|
||||||
dfwrite(&projectile[0],sizeof(proj_struct),MAXTILES,fil);
|
dfwrite(&projectile[0],sizeof(projectile_t),MAXTILES,fil);
|
||||||
dfwrite(&defaultprojectile[0],sizeof(proj_struct),MAXTILES,fil);
|
dfwrite(&defaultprojectile[0],sizeof(projectile_t),MAXTILES,fil);
|
||||||
|
|
||||||
dfwrite(&spriteflags[0],sizeof(spriteflags[0]),MAXTILES,fil);
|
dfwrite(&spriteflags[0],sizeof(spriteflags[0]),MAXTILES,fil);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue