mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
Restored fullbrights, improved depth peeling, tweaked MSVC support for JFAud.
git-svn-id: https://svn.eduke32.com/eduke32@454 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
197cf82051
commit
8a5a966cd0
12 changed files with 289 additions and 81 deletions
|
@ -56,6 +56,8 @@ extern void (APIENTRY * bglPopAttrib)( void );
|
|||
extern GLenum (APIENTRY * bglGetError)( void );
|
||||
extern const GLubyte* (APIENTRY * bglGetString)( GLenum name );
|
||||
extern void (APIENTRY * bglHint)( GLenum target, GLenum mode );
|
||||
extern void (APIENTRY * bglDrawBuffer)(GLenum mode);
|
||||
extern void (APIENTRY * bglReadBuffer)(GLenum mode);
|
||||
|
||||
// Depth
|
||||
extern void (APIENTRY * bglDepthFunc)( GLenum func );
|
||||
|
|
|
@ -3151,9 +3151,9 @@ static void drawsprite(long snum)
|
|||
#ifdef POLYMOST
|
||||
if (rendmode == 3) {
|
||||
polymost_drawsprite(snum);
|
||||
#ifdef USE_OPENGL
|
||||
//bglDepthMask(1);
|
||||
#endif
|
||||
# ifdef USE_OPENGL
|
||||
bglDisable(GL_POLYGON_OFFSET_FILL);
|
||||
# endif
|
||||
return;
|
||||
}
|
||||
if (rendmode == 4) { polymer_drawsprite(snum); return; }
|
||||
|
@ -6120,7 +6120,6 @@ if ((!r_depthpeeling) || (rendmode < 3))
|
|||
|
||||
if ((sameside(&maskeq, &spr, &pos) == 0) && sameside(&p1eq, &middle, &spr) && sameside(&p2eq, &middle, &spr))
|
||||
{
|
||||
bglDisable(GL_POLYGON_OFFSET_FILL);
|
||||
drawsprite(i);
|
||||
tspriteptr[i] = NULL;
|
||||
}
|
||||
|
@ -6133,48 +6132,66 @@ if ((!r_depthpeeling) || (rendmode < 3))
|
|||
{
|
||||
spritesortcnt--;
|
||||
if (tspriteptr[spritesortcnt] != NULL)
|
||||
{
|
||||
bglDisable(GL_POLYGON_OFFSET_FILL);
|
||||
drawsprite(spritesortcnt);
|
||||
}
|
||||
}
|
||||
bglDisable(GL_POLYGON_OFFSET_FILL);
|
||||
|
||||
} /* depthpeeling */
|
||||
#ifdef USE_OPENGL
|
||||
else
|
||||
{
|
||||
curpolygonoffset = 0;
|
||||
while (spritesortcnt > 0)
|
||||
{
|
||||
bglDisable(GL_POLYGON_OFFSET_FILL);
|
||||
drawsprite(--spritesortcnt);
|
||||
}
|
||||
bglDisable(GL_POLYGON_OFFSET_FILL);
|
||||
while (maskwallcnt > 0) drawmaskwall(--maskwallcnt);
|
||||
j = spritesortcnt;
|
||||
k = maskwallcnt;
|
||||
|
||||
while (j > 0) drawsprite(--j);
|
||||
while (k > 0) drawmaskwall(--k);
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
if ((r_depthpeeling) && (rendmode >= 3))
|
||||
{
|
||||
bglEndList();
|
||||
bglPopAttrib();
|
||||
bglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
|
||||
|
||||
bglNewList(1, GL_COMPILE);
|
||||
|
||||
peelcompiling = 1;
|
||||
curpolygonoffset = 0;
|
||||
|
||||
while (spritesortcnt > 0) drawsprite(--spritesortcnt);
|
||||
while (maskwallcnt > 0) drawmaskwall(--maskwallcnt);
|
||||
|
||||
peelcompiling = 0;
|
||||
|
||||
bglEndList();
|
||||
|
||||
bglDisable(GL_BLEND);
|
||||
bglEnable(GL_ALPHA_TEST);
|
||||
bglAlphaFunc(GL_GREATER, 0.0f);
|
||||
bglEnable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
|
||||
i = 0;
|
||||
while (i < r_peelscount)
|
||||
{
|
||||
|
||||
if (i > 0)
|
||||
{
|
||||
bglEnable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
bglBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, peelprogram[1]);
|
||||
bglActiveTextureARB(GL_TEXTURE1_ARB);
|
||||
bglBindTexture(GL_TEXTURE_RECTANGLE, ztexture[(i - 1) % 2]);
|
||||
bglActiveTextureARB(GL_TEXTURE2_ARB);
|
||||
bglBindTexture(GL_TEXTURE_RECTANGLE, ztexture[2]);
|
||||
bglActiveTextureARB(GL_TEXTURE0_ARB);
|
||||
}
|
||||
else
|
||||
{
|
||||
bglBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, peelprogram[0]);
|
||||
bglActiveTextureARB(GL_TEXTURE1_ARB);
|
||||
bglBindTexture(GL_TEXTURE_RECTANGLE, ztexture[2]);
|
||||
bglActiveTextureARB(GL_TEXTURE0_ARB);
|
||||
}
|
||||
|
||||
if (i == (r_peelscount - 1))
|
||||
bglEnable(GL_BLEND);
|
||||
|
||||
|
@ -6188,14 +6205,10 @@ else
|
|||
bglPopAttrib();
|
||||
bglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
|
||||
|
||||
if (i > 0)
|
||||
bglDisable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
bglClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
|
||||
|
||||
bglDisable(GL_FRAGMENT_PROGRAM_ARB);
|
||||
bglEnable(GL_BLEND);
|
||||
bglDisable(GL_DEPTH_TEST);
|
||||
|
||||
|
@ -6211,6 +6224,9 @@ else
|
|||
|
||||
bglEnable(GL_TEXTURE_RECTANGLE);
|
||||
|
||||
// backbuffer
|
||||
drawpeel(r_peelscount);
|
||||
|
||||
if (r_curpeel == -1)
|
||||
{
|
||||
i = r_peelscount - 1;
|
||||
|
|
|
@ -33,6 +33,8 @@ void (APIENTRY * bglPopAttrib)( void );
|
|||
GLenum (APIENTRY * bglGetError)( void );
|
||||
const GLubyte* (APIENTRY * bglGetString)( GLenum name );
|
||||
void (APIENTRY * bglHint)( GLenum target, GLenum mode );
|
||||
void (APIENTRY * bglDrawBuffer)(GLenum mode);
|
||||
void (APIENTRY * bglReadBuffer)(GLenum mode);
|
||||
|
||||
// Depth
|
||||
void (APIENTRY * bglDepthFunc)( GLenum func );
|
||||
|
@ -213,23 +215,25 @@ int loadgldriver(const char *driver)
|
|||
#endif
|
||||
|
||||
bglClearColor = GETPROC("glClearColor");
|
||||
bglClear = GETPROC("glClear");
|
||||
bglClear = GETPROC("glClear");
|
||||
bglColorMask = GETPROC("glColorMask");
|
||||
bglAlphaFunc = GETPROC("glAlphaFunc");
|
||||
bglBlendFunc = GETPROC("glBlendFunc");
|
||||
bglCullFace = GETPROC("glCullFace");
|
||||
bglCullFace = GETPROC("glCullFace");
|
||||
bglFrontFace = GETPROC("glFrontFace");
|
||||
bglPolygonOffset = GETPROC("glPolygonOffset");
|
||||
bglPolygonMode = GETPROC("glPolygonMode");
|
||||
bglEnable = GETPROC("glEnable");
|
||||
bglDisable = GETPROC("glDisable");
|
||||
bglEnable = GETPROC("glEnable");
|
||||
bglDisable = GETPROC("glDisable");
|
||||
bglGetFloatv = GETPROC("glGetFloatv");
|
||||
bglGetIntegerv = GETPROC("glGetIntegerv");
|
||||
bglPushAttrib = GETPROC("glPushAttrib");
|
||||
bglPopAttrib = GETPROC("glPopAttrib");
|
||||
bglGetError = GETPROC("glGetError");
|
||||
bglGetError = GETPROC("glGetError");
|
||||
bglGetString = GETPROC("glGetString");
|
||||
bglHint = GETPROC("glHint");
|
||||
bglHint = GETPROC("glHint");
|
||||
bglDrawBuffer = GETPROC("glDrawBuffer");
|
||||
bglReadBuffer = GETPROC("glDrawBuffer");
|
||||
|
||||
// Depth
|
||||
bglDepthFunc = GETPROC("glDepthFunc");
|
||||
|
@ -375,6 +379,8 @@ int unloadgldriver(void)
|
|||
bglGetError = NULL;
|
||||
bglGetString = NULL;
|
||||
bglHint = NULL;
|
||||
bglDrawBuffer = NULL;
|
||||
bglReadBuffer = NULL;
|
||||
|
||||
// Depth
|
||||
bglDepthFunc = NULL;
|
||||
|
|
|
@ -144,10 +144,10 @@ long peelcompiling = 0; // internal control var to disable blending when com
|
|||
long newpeelscount = 0; // temporary var for peels count changing during the game
|
||||
|
||||
// Depth peeling data
|
||||
GLuint ztexture[2]; // secondary Z-buffer identifier
|
||||
GLuint *peels; // peels identifiers
|
||||
GLuint *peelfbos; // peels FBOs identifiers
|
||||
GLuint peelprogram; // ARBfp peeling fragment program
|
||||
GLuint ztexture[3]; // secondary Z-buffers identifier
|
||||
GLuint *peels; // peels identifiers
|
||||
GLuint *peelfbos; // peels FBOs identifiers
|
||||
GLuint peelprogram[2]; // ARBfp peeling fragment program
|
||||
|
||||
float fogresult, ofogresult;
|
||||
|
||||
|
@ -610,10 +610,10 @@ void polymost_glreset ()
|
|||
// Depth peeling cleanup
|
||||
if (peels)
|
||||
{
|
||||
bglDeleteProgramsARB(1, &peelprogram);
|
||||
bglDeleteFramebuffersEXT(r_peelscount, peelfbos);
|
||||
bglDeleteTextures(r_peelscount, peels);
|
||||
bglDeleteTextures(2, ztexture);
|
||||
bglDeleteProgramsARB(2, peelprogram);
|
||||
bglDeleteFramebuffersEXT(r_peelscount + 1, peelfbos);
|
||||
bglDeleteTextures(r_peelscount + 1, peels);
|
||||
bglDeleteTextures(3, ztexture);
|
||||
free(peels);
|
||||
free(peelfbos);
|
||||
|
||||
|
@ -626,21 +626,34 @@ void polymost_glinit()
|
|||
{
|
||||
GLfloat col[4];
|
||||
int i;
|
||||
char peelprogramstring[] =
|
||||
char notpeeledprogramstring[] =
|
||||
"!!ARBfp1.0\n"
|
||||
"OPTION ARB_fog_exp2;\n"
|
||||
"OPTION ARB_fragment_program_shadow;\n"
|
||||
"TEMP texsample;\n"
|
||||
"TEMP depthresult;\n"
|
||||
"TEMP tempresult;\n"
|
||||
"TEX depthresult, fragment.position, texture[1], SHADOWRECT;\n"
|
||||
"ADD depthresult.a, depthresult.a, -0.5;\n"
|
||||
"KIL depthresult.a;\n"
|
||||
"TEX texsample, fragment.texcoord[0], texture[0], 2D;\n"
|
||||
"TEX depthresult, fragment.position, texture[1], SHADOWRECT;\n"
|
||||
"MUL tempresult, fragment.color, texsample;\n"
|
||||
"MUL tempresult.a, tempresult.a, depthresult.a;\n"
|
||||
"MOV result.color, tempresult;\n"
|
||||
"MUL result.color, fragment.color, texsample;\n"
|
||||
"END\n";
|
||||
char peeledprogramstring[] =
|
||||
"!!ARBfp1.0\n"
|
||||
"OPTION ARB_fog_exp2;\n"
|
||||
"OPTION ARB_fragment_program_shadow;\n"
|
||||
"TEMP texsample;\n"
|
||||
"TEMP depthresult;\n"
|
||||
"TEX depthresult, fragment.position, texture[2], SHADOWRECT;\n"
|
||||
"ADD depthresult.a, depthresult.a, -0.5;\n"
|
||||
"KIL depthresult.a;\n"
|
||||
"TEX depthresult, fragment.position, texture[1], SHADOWRECT;\n"
|
||||
"ADD depthresult.a, depthresult.a, -0.5;\n"
|
||||
"KIL depthresult.a;\n"
|
||||
"TEX texsample, fragment.texcoord[0], texture[0], 2D;\n"
|
||||
"MUL result.color, fragment.color, texsample;\n"
|
||||
"END\n";
|
||||
|
||||
bglGetIntegerv(GL_ALPHA_BITS, &i);
|
||||
#if 1
|
||||
if (!Bstrcmp(glinfo.vendor, "ATI Technologies Inc."))
|
||||
{
|
||||
|
@ -687,11 +700,11 @@ void polymost_glinit()
|
|||
r_peelscount = newpeelscount;
|
||||
newpeelscount = 0;
|
||||
}
|
||||
// create the secondary Z-buffer
|
||||
bglGenTextures(2, ztexture);
|
||||
// create the secondary Z-buffers and the Z-backbuffer
|
||||
bglGenTextures(3, ztexture);
|
||||
|
||||
i = 0;
|
||||
while (i < 2)
|
||||
while (i < 3)
|
||||
{
|
||||
bglBindTexture(GL_TEXTURE_RECTANGLE, ztexture[i]);
|
||||
bglCopyTexImage2D(GL_TEXTURE_RECTANGLE, 0, GL_DEPTH_COMPONENT, 0, 0, xdim, ydim, 0);
|
||||
|
@ -700,21 +713,24 @@ void polymost_glinit()
|
|||
bglTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_WRAP_S, GL_CLAMP);
|
||||
bglTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_WRAP_T, GL_CLAMP);
|
||||
bglTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_COMPARE_MODE_ARB, GL_COMPARE_R_TO_TEXTURE_ARB);
|
||||
bglTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_COMPARE_FUNC_ARB, GL_GREATER);
|
||||
if (i < 2)
|
||||
bglTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_COMPARE_FUNC_ARB, GL_GREATER);
|
||||
else
|
||||
bglTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_COMPARE_FUNC_ARB, GL_LESS);
|
||||
bglTexParameteri(GL_TEXTURE_RECTANGLE, GL_DEPTH_TEXTURE_MODE_ARB, GL_ALPHA);
|
||||
|
||||
i++;
|
||||
}
|
||||
|
||||
// create the various peeling layers as well as the FBOs to render to them
|
||||
peels = malloc(r_peelscount * sizeof(GLuint));
|
||||
bglGenTextures(r_peelscount, peels);
|
||||
peels = malloc((r_peelscount + 1) * sizeof(GLuint));
|
||||
bglGenTextures(r_peelscount + 1, peels);
|
||||
|
||||
peelfbos = malloc(r_peelscount * sizeof(GLuint));
|
||||
bglGenFramebuffersEXT(r_peelscount, peelfbos);
|
||||
peelfbos = malloc((r_peelscount + 1) * sizeof(GLuint));
|
||||
bglGenFramebuffersEXT(r_peelscount + 1, peelfbos);
|
||||
|
||||
i = 0;
|
||||
while (i < r_peelscount)
|
||||
while (i <= r_peelscount)
|
||||
{
|
||||
bglBindTexture(GL_TEXTURE_RECTANGLE, peels[i]);
|
||||
bglCopyTexImage2D(GL_TEXTURE_RECTANGLE, 0, GL_RGBA, 0, 0, xdim, ydim, 0);
|
||||
|
@ -725,7 +741,9 @@ void polymost_glinit()
|
|||
|
||||
bglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, peelfbos[i]);
|
||||
bglFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE, peels[i], 0);
|
||||
if (i < (r_peelscount - 1))
|
||||
if (i == r_peelscount) // bakcbuffer
|
||||
bglFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_RECTANGLE, ztexture[2], 0);
|
||||
else if (i < (r_peelscount - 1))
|
||||
bglFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_DEPTH_ATTACHMENT_EXT, GL_TEXTURE_RECTANGLE, ztexture[i % 2], 0);
|
||||
|
||||
if (bglCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) != GL_FRAMEBUFFER_COMPLETE_EXT)
|
||||
|
@ -738,10 +756,12 @@ void polymost_glinit()
|
|||
i++;
|
||||
}
|
||||
|
||||
// create the peeling fragment program
|
||||
bglGenProgramsARB(1, &peelprogram);
|
||||
bglBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, peelprogram);
|
||||
bglProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, strlen(peelprogramstring), peelprogramstring);
|
||||
// create the peeling fragment programs
|
||||
bglGenProgramsARB(2, peelprogram);
|
||||
bglBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, peelprogram[0]);
|
||||
bglProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, strlen(notpeeledprogramstring), notpeeledprogramstring);
|
||||
bglBindProgramARB(GL_FRAGMENT_PROGRAM_ARB, peelprogram[1]);
|
||||
bglProgramStringARB(GL_FRAGMENT_PROGRAM_ARB, GL_PROGRAM_FORMAT_ASCII_ARB, strlen(peeledprogramstring), peeledprogramstring);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3567,12 +3587,6 @@ void polymost_drawrooms ()
|
|||
#ifdef USE_OPENGL
|
||||
if (rendmode >= 3)
|
||||
{
|
||||
if (r_depthpeeling)
|
||||
{
|
||||
bglNewList(1, GL_COMPILE);
|
||||
peelcompiling = 1;
|
||||
}
|
||||
|
||||
resizeglcheck();
|
||||
|
||||
//bglClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
|
||||
|
@ -3605,6 +3619,13 @@ void polymost_drawrooms ()
|
|||
globalposy += cosglobalang/1024;
|
||||
}
|
||||
}
|
||||
if (r_depthpeeling)
|
||||
{
|
||||
bglBindFramebufferEXT(GL_FRAMEBUFFER_EXT, peelfbos[r_peelscount]);
|
||||
bglPushAttrib(GL_VIEWPORT_BIT);
|
||||
bglViewport(0, 0, xdim, ydim);
|
||||
//bglClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -3786,7 +3807,7 @@ void polymost_drawrooms ()
|
|||
#ifdef USE_OPENGL
|
||||
if (rendmode >= 3)
|
||||
{
|
||||
bglDepthFunc(GL_LESS); //NEVER,LESS,(,L)EQUAL,GREATER,(NOT,G)EQUAL,ALWAYS
|
||||
bglDepthFunc(GL_LEQUAL); //NEVER,LESS,(,L)EQUAL,GREATER,(NOT,G)EQUAL,ALWAYS
|
||||
|
||||
//bglPolygonOffset(0,0);
|
||||
bglDepthRange(0.0,0.99999); //<- this is more widely supported than glPolygonOffset
|
||||
|
@ -3818,6 +3839,16 @@ void polymost_drawmaskwall (long damaskwallcnt)
|
|||
globalpal = (long)((unsigned char)wal->pal);
|
||||
globalorientation = (long)wal->cstat;
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
if (r_depthpeeling)
|
||||
{
|
||||
if ((((wal->cstat&128) || (gltexmayhavealpha(globalpicnum,globalpal)))) && !peelcompiling)
|
||||
return; // discard translucent sprite if drawing the backbuffer when doing depth peeling
|
||||
if (!(((wal->cstat&128) || (gltexmayhavealpha(globalpicnum,globalpal)))) && peelcompiling)
|
||||
return; // discard opaque sprite when composing the depth peels
|
||||
}
|
||||
#endif
|
||||
|
||||
sx0 = (float)(wal->x-globalposx); sx1 = (float)(wal2->x-globalposx);
|
||||
sy0 = (float)(wal->y-globalposy); sy1 = (float)(wal2->y-globalposy);
|
||||
yp0 = sx0*gcosang2 + sy0*gsinang2;
|
||||
|
@ -3995,7 +4026,15 @@ void polymost_drawsprite (long snum)
|
|||
method = 1+4;
|
||||
if (tspr->cstat&2) { if (!(tspr->cstat&512)) method = 2+4; else method = 3+4; }
|
||||
|
||||
|
||||
#ifdef USE_OPENGL
|
||||
if (r_depthpeeling)
|
||||
{
|
||||
if ((((tspr->cstat&2) || (gltexmayhavealpha(globalpicnum,tspr->pal)))) && !peelcompiling)
|
||||
return; // discard translucent sprite if drawing the backbuffer when doing depth peeling
|
||||
if (!(((tspr->cstat&2) || (gltexmayhavealpha(globalpicnum,tspr->pal)))) && peelcompiling)
|
||||
return; // discard opaque sprite when composing the depth peels
|
||||
}
|
||||
if (!nofog && rendmode >= 3) {
|
||||
float col[4];
|
||||
col[0] = (float)palookupfog[sector[tspr->sectnum].floorpal].r / 63.f;
|
||||
|
@ -4027,7 +4066,6 @@ if (tspr->cstat&2) { if (!(tspr->cstat&512)) method = 2+4; else method = 3+4; }
|
|||
curpolygonoffset += 0.01f;
|
||||
bglEnable(GL_POLYGON_OFFSET_FILL);
|
||||
bglPolygonOffset(-curpolygonoffset, -curpolygonoffset);
|
||||
//bglDepthMask(0);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
|
@ -37,6 +37,11 @@ CFLAGS= /MD /J /nologo $(flags_cl) \
|
|||
/I$(DXROOT)\include /DRENDERTYPEWIN=1
|
||||
LIBS=user32.lib gdi32.lib shell32.lib dxguid.lib winmm.lib wsock32.lib comctl32.lib \
|
||||
/NODEFAULTLIB:libFLAC.lib glu32.lib
|
||||
|
||||
!ifdef JFAUD
|
||||
LIBS=$(LIBS) ../jfaud/jfaud.lib ../jfaud/mpadec/mpadec.lib
|
||||
CFLAGS=$(CFLAGS) /DJFAUD
|
||||
!endif
|
||||
|
||||
ASFLAGS=/nologo /coff
|
||||
ASFLAGS=/nologo /coff
|
||||
|
@ -50,8 +55,8 @@ JMACTOBJ=$(OBJ)\util_lib.$o \
|
|||
$(OBJ)\mathutil.$o \
|
||||
$(OBJ)\scriplib.$o
|
||||
|
||||
#AUDIOLIB_FX=$(OBJ)\jaudiolib_fxstub.$o
|
||||
#AUDIOLIB_MUSIC=$(OBJ)\jaudiolib_musicstub.$o
|
||||
AUDIOLIB_FX_STUB=$(OBJ)\jaudiolib_fxstub.$o
|
||||
AUDIOLIB_MUSIC_STUB=$(OBJ)\jaudiolib_musicstub.$o
|
||||
#AUDIOLIB_FX=$(OBJ)\jaudiolib_fx_fmod.$o
|
||||
AUDIOLIB_JFAUD=$(OBJ)\jfaud_sounds.$o
|
||||
AUDIOLIB_FX=$(OBJ)\mv_mix.$o \
|
||||
|
@ -64,9 +69,13 @@ AUDIOLIB_FX=$(OBJ)\mv_mix.$o \
|
|||
$(OBJ)\dsoundout.$o
|
||||
AUDIOLIB_MUSIC=$(OBJ)\midi.$o \
|
||||
$(OBJ)\mpu401.$o \
|
||||
$(OBJ)\music.$o
|
||||
AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX) $(OBJ)\sounds.$o
|
||||
#AUDIOLIBOBJ=$(AUDIOLIB_JFAUD)
|
||||
$(OBJ)\music.$o
|
||||
|
||||
!ifdef JFAUD
|
||||
AUDIOLIBOBJ=$(AUDIOLIB_JFAUD)
|
||||
!else
|
||||
AUDIOLIBOBJ=$(AUDIOLIB_MUSIC) $(AUDIOLIB_FX) $(OBJ)\sounds.$o
|
||||
!endif
|
||||
|
||||
GAMEOBJS=$(OBJ)\game.$o \
|
||||
$(OBJ)\actors.$o \
|
||||
|
|
|
@ -2,23 +2,78 @@
|
|||
Microsoft Visual Studio Solution File, Format Version 9.00
|
||||
# Visual Studio 2005
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "eduke32", "eduke32.vcproj", "{8E7A6179-0B72-4073-8A4C-E8682D481DAE}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286} = {CD149A75-4507-404D-856C-E9DBC2E0B286}
|
||||
{862365FE-811C-46B8-BB1E-B7189DA8D858} = {862365FE-811C-46B8-BB1E-B7189DA8D858}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "jfaud", "..\jfaud\jfaud.vcproj", "{CD149A75-4507-404D-856C-E9DBC2E0B286}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mpadec", "..\jfaud\mpadec\mpadec.vcproj", "{862365FE-811C-46B8-BB1E-B7189DA8D858}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286} = {CD149A75-4507-404D-856C-E9DBC2E0B286}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Classic JFAud|Win32 = Classic JFAud|Win32
|
||||
Classic Release JFAud|Win32 = Classic Release JFAud|Win32
|
||||
Classic Release|Win32 = Classic Release|Win32
|
||||
Classic|Win32 = Classic|Win32
|
||||
HRP SD JFAud|Win32 = HRP SD JFAud|Win32
|
||||
HRP SD Release JFAud|Win32 = HRP SD Release JFAud|Win32
|
||||
HRP SD Release|Win32 = HRP SD Release|Win32
|
||||
HRP SD|Win32 = HRP SD|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Classic JFAud|Win32.ActiveCfg = Classic JFAud|Win32
|
||||
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Classic JFAud|Win32.Build.0 = Classic JFAud|Win32
|
||||
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Classic Release JFAud|Win32.ActiveCfg = Classic Release JFAud|Win32
|
||||
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Classic Release JFAud|Win32.Build.0 = Classic Release JFAud|Win32
|
||||
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Classic Release|Win32.ActiveCfg = Classic Release|Win32
|
||||
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Classic Release|Win32.Build.0 = Classic Release|Win32
|
||||
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Classic|Win32.ActiveCfg = Classic|Win32
|
||||
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.Classic|Win32.Build.0 = Classic|Win32
|
||||
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.HRP SD JFAud|Win32.ActiveCfg = HRP SD JFAud|Win32
|
||||
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.HRP SD JFAud|Win32.Build.0 = HRP SD JFAud|Win32
|
||||
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.HRP SD Release JFAud|Win32.ActiveCfg = HRP SD Release JFAud|Win32
|
||||
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.HRP SD Release JFAud|Win32.Build.0 = HRP SD Release JFAud|Win32
|
||||
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.HRP SD Release|Win32.ActiveCfg = HRP SD Release|Win32
|
||||
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.HRP SD Release|Win32.Build.0 = HRP SD Release|Win32
|
||||
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.HRP SD|Win32.ActiveCfg = HRP SD|Win32
|
||||
{8E7A6179-0B72-4073-8A4C-E8682D481DAE}.HRP SD|Win32.Build.0 = HRP SD|Win32
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286}.Classic JFAud|Win32.ActiveCfg = Release|Win32
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286}.Classic JFAud|Win32.Build.0 = Release|Win32
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286}.Classic Release JFAud|Win32.ActiveCfg = Release|Win32
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286}.Classic Release JFAud|Win32.Build.0 = Release|Win32
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286}.Classic Release|Win32.ActiveCfg = Release|Win32
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286}.Classic Release|Win32.Build.0 = Release|Win32
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286}.Classic|Win32.ActiveCfg = Release|Win32
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286}.Classic|Win32.Build.0 = Release|Win32
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286}.HRP SD JFAud|Win32.ActiveCfg = Release|Win32
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286}.HRP SD JFAud|Win32.Build.0 = Release|Win32
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286}.HRP SD Release JFAud|Win32.ActiveCfg = Release|Win32
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286}.HRP SD Release JFAud|Win32.Build.0 = Release|Win32
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286}.HRP SD Release|Win32.ActiveCfg = Release|Win32
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286}.HRP SD Release|Win32.Build.0 = Release|Win32
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286}.HRP SD|Win32.ActiveCfg = Release|Win32
|
||||
{CD149A75-4507-404D-856C-E9DBC2E0B286}.HRP SD|Win32.Build.0 = Release|Win32
|
||||
{862365FE-811C-46B8-BB1E-B7189DA8D858}.Classic JFAud|Win32.ActiveCfg = Release|Win32
|
||||
{862365FE-811C-46B8-BB1E-B7189DA8D858}.Classic JFAud|Win32.Build.0 = Release|Win32
|
||||
{862365FE-811C-46B8-BB1E-B7189DA8D858}.Classic Release JFAud|Win32.ActiveCfg = Release|Win32
|
||||
{862365FE-811C-46B8-BB1E-B7189DA8D858}.Classic Release JFAud|Win32.Build.0 = Release|Win32
|
||||
{862365FE-811C-46B8-BB1E-B7189DA8D858}.Classic Release|Win32.ActiveCfg = Release|Win32
|
||||
{862365FE-811C-46B8-BB1E-B7189DA8D858}.Classic Release|Win32.Build.0 = Release|Win32
|
||||
{862365FE-811C-46B8-BB1E-B7189DA8D858}.Classic|Win32.ActiveCfg = Release|Win32
|
||||
{862365FE-811C-46B8-BB1E-B7189DA8D858}.Classic|Win32.Build.0 = Release|Win32
|
||||
{862365FE-811C-46B8-BB1E-B7189DA8D858}.HRP SD JFAud|Win32.ActiveCfg = Release|Win32
|
||||
{862365FE-811C-46B8-BB1E-B7189DA8D858}.HRP SD JFAud|Win32.Build.0 = Release|Win32
|
||||
{862365FE-811C-46B8-BB1E-B7189DA8D858}.HRP SD Release JFAud|Win32.ActiveCfg = Release|Win32
|
||||
{862365FE-811C-46B8-BB1E-B7189DA8D858}.HRP SD Release JFAud|Win32.Build.0 = Release|Win32
|
||||
{862365FE-811C-46B8-BB1E-B7189DA8D858}.HRP SD Release|Win32.ActiveCfg = Release|Win32
|
||||
{862365FE-811C-46B8-BB1E-B7189DA8D858}.HRP SD Release|Win32.Build.0 = Release|Win32
|
||||
{862365FE-811C-46B8-BB1E-B7189DA8D858}.HRP SD|Win32.ActiveCfg = Release|Win32
|
||||
{862365FE-811C-46B8-BB1E-B7189DA8D858}.HRP SD|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -97,6 +97,88 @@
|
|||
CompileAsManaged=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Classic JFAud|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="0"
|
||||
BuildLogFile=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCNMakeTool"
|
||||
BuildCommandLine="nmake /f Makefile.msvc DEBUG=1 JFAUD=1"
|
||||
ReBuildCommandLine="nmake /f Makefile.msvc veryclean all DEBUG=1 JFAUD=1"
|
||||
CleanCommandLine="nmake /f Makefile.msvc veryclean"
|
||||
Output="eduke32.exe"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;SUPERBUILD;POLYMOST;USE_OPENGL;NOCOPYPROTECT;RENDERTYPEWIN"
|
||||
IncludeSearchPath=""
|
||||
ForcedIncludes=""
|
||||
AssemblySearchPath=""
|
||||
ForcedUsingAssemblies=""
|
||||
CompileAsManaged=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="HRP SD JFAud|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCNMakeTool"
|
||||
BuildCommandLine="nmake /f Makefile.msvc DEBUG=1 JFAUD=1"
|
||||
ReBuildCommandLine="nmake /f Makefile.msvc veryclean all DEBUG=1 JFAUD=1"
|
||||
CleanCommandLine="nmake /f Makefile.msvc veryclean"
|
||||
Output="eduke32.exe"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;SUPERBUILD;POLYMOST;USE_OPENGL;NOCOPYPROTECT;RENDERTYPEWIN"
|
||||
IncludeSearchPath=""
|
||||
ForcedIncludes=""
|
||||
AssemblySearchPath=""
|
||||
ForcedUsingAssemblies=""
|
||||
CompileAsManaged=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Classic Release JFAud|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="0"
|
||||
BuildLogFile=""
|
||||
>
|
||||
<Tool
|
||||
Name="VCNMakeTool"
|
||||
BuildCommandLine="nmake /f Makefile.msvc JFAUD=1"
|
||||
ReBuildCommandLine="nmake /f Makefile.msvc veryclean all JFAUD=1"
|
||||
CleanCommandLine="nmake /f Makefile.msvc veryclean"
|
||||
Output="eduke32.exe"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;SUPERBUILD;POLYMOST;USE_OPENGL;NOCOPYPROTECT;RENDERTYPEWIN"
|
||||
IncludeSearchPath=""
|
||||
ForcedIncludes=""
|
||||
AssemblySearchPath=""
|
||||
ForcedUsingAssemblies=""
|
||||
CompileAsManaged=""
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="HRP SD Release JFAud|Win32"
|
||||
OutputDirectory="$(ConfigurationName)"
|
||||
IntermediateDirectory="$(ConfigurationName)"
|
||||
ConfigurationType="0"
|
||||
>
|
||||
<Tool
|
||||
Name="VCNMakeTool"
|
||||
BuildCommandLine="nmake /f Makefile.msvc JFAUD=1"
|
||||
ReBuildCommandLine="nmake /f Makefile.msvc veryclean all JFAUD=1"
|
||||
CleanCommandLine="nmake /f Makefile.msvc veryclean"
|
||||
Output="eduke32.exe"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;SUPERBUILD;POLYMOST;USE_OPENGL;NOCOPYPROTECT;RENDERTYPEWIN"
|
||||
IncludeSearchPath=""
|
||||
ForcedIncludes=""
|
||||
AssemblySearchPath=""
|
||||
ForcedUsingAssemblies=""
|
||||
CompileAsManaged=""
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
|
@ -612,11 +694,11 @@
|
|||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\source\develop.h"
|
||||
RelativePath=".\source\jmact\develop.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\source\jmact\develop.h"
|
||||
RelativePath=".\source\develop.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
|
|
|
@ -311,7 +311,7 @@ void playmusic(const char *fn)
|
|||
if (!MusicToggle) return;
|
||||
if (!jfaud) return;
|
||||
|
||||
dotpos = Bstrrchr(fn,'.');
|
||||
dotpos = Bstrrchr((char *)fn,'.');
|
||||
if (dotpos && Bstrcasecmp(dotpos,".mid")) {
|
||||
// has extension but isn't midi
|
||||
jfaud->PlayMusic(fn, NULL);
|
||||
|
|
|
@ -21,7 +21,7 @@ VORBISDL=vorbisfile.dll
|
|||
|
||||
# FLAC
|
||||
# http://flac.sf.net/
|
||||
USEFLAC=1
|
||||
USEFLAC=0
|
||||
LINKFLAC=0
|
||||
FLACCFLAGS=
|
||||
FLACLIBS=libflac.lib
|
||||
|
@ -30,7 +30,7 @@ FLACDL=libflac.dll
|
|||
# MPEG Audio via mpadec
|
||||
# http://mpadec.sf.net/
|
||||
USEMPADEC=1
|
||||
LINKMPADEC=0
|
||||
LINKMPADEC=1
|
||||
MPADECCFLAGS=/Impadec
|
||||
MPADECLIBS=mpadec\mpadec.lib
|
||||
MPADECDL=mpadec.dll
|
||||
|
@ -42,9 +42,9 @@ SDLLIBS=/LIBPATH:C:\sdks\SDL-msvc\lib SDL.lib
|
|||
|
||||
# Directories for library SDKs on Windows
|
||||
# I keep my third-party libraries each in a directory on their own.
|
||||
SDKDIRECTX=c:\sdks\directx\dx7
|
||||
SDKDIRECTX=c:\sdks\dx6
|
||||
SDKOPENAL=c:\sdks\OpenAL
|
||||
SDKVORBIS=c:\sdks\oggvorbis-win32sdk-1.0.1
|
||||
SDKVORBIS=c:\sdks\oggvorbis
|
||||
SDKFLAC=c:\sdks\flac
|
||||
|
||||
obj=obj
|
||||
|
@ -69,7 +69,7 @@ FLACLIBS=/LIBPATH:$(SDKFLAC)\bin $(FLACLIBS)
|
|||
|
||||
MPADECCFLAGS=$(MPADECCFLAGS) /DMPADECDL=\"$(MPADECDL)\"
|
||||
|
||||
CFLAGS=/G6Fy /Ox /MD /DDEBUG /nologo /I$(inc) $(platformcflags)
|
||||
CFLAGS=/O2 /Ox /MD /DDEBUG /nologo /D "_CRT_SECURE_NO_DEPRECATE" -W0 /I$(inc) $(platformcflags)
|
||||
LIBS=$(platformlibs)
|
||||
dependencies=
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
CFLAGS=/I.. /I..\include /MD /Ox
|
||||
CFLAGS=/I.. /I..\include /MD /Ox /D "_CRT_SECURE_NO_DEPRECATE" -W0
|
||||
|
||||
OBJS=layer1.obj layer2.obj layer3.obj synth.obj tables.obj mpadec.obj mp3dec.obj
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
#endif
|
||||
|
||||
#ifndef SCREWED_UP_CPP
|
||||
using namespace std;
|
||||
//using namespace std;
|
||||
#endif
|
||||
|
||||
DynamicLibrary::DynamicLibrary(const char *name)
|
||||
|
|
|
@ -115,7 +115,7 @@ bool JFAud::InitWave(const char *name, int numvoices, int frequency)
|
|||
if (wavemixer) return false;
|
||||
if (numvoices < 1) numvoices = 1;
|
||||
|
||||
if (name) devid = strchr(name, ':');
|
||||
if (name) devid = strchr((char *)name, ':');
|
||||
if (devid) devid++;
|
||||
|
||||
if (!name) drv = 0;
|
||||
|
|
Loading…
Reference in a new issue