Merge branch 'master' into sdl2

Conflicts:
	comptime.sh
This commit is contained in:
Alam Ed Arias 2014-04-09 14:54:06 -04:00
commit c59df51d19
10 changed files with 84 additions and 52 deletions

View file

@ -41,7 +41,6 @@ HW3SOUND for 3D hardware sound support
<Add option="-DHAVE_BLUA" /> <Add option="-DHAVE_BLUA" />
</Compiler> </Compiler>
<Linker> <Linker>
<Add option="-g" />
<Add option="`sdl-config --libs`" /> <Add option="`sdl-config --libs`" />
<Add library="SDL_mixer" /> <Add library="SDL_mixer" />
</Linker> </Linker>
@ -63,7 +62,6 @@ HW3SOUND for 3D hardware sound support
<Add option="-DHAVE_BLUA" /> <Add option="-DHAVE_BLUA" />
</Compiler> </Compiler>
<Linker> <Linker>
<Add option="-g" />
<Add option="`sdl-config --libs`" /> <Add option="`sdl-config --libs`" />
<Add library="SDL_mixer" /> <Add library="SDL_mixer" />
</Linker> </Linker>
@ -91,7 +89,6 @@ HW3SOUND for 3D hardware sound support
<Add option="-DHAVE_BLUA" /> <Add option="-DHAVE_BLUA" />
</Compiler> </Compiler>
<Linker> <Linker>
<Add option="-g" />
<Add option="`sdl-config --libs`" /> <Add option="`sdl-config --libs`" />
<Add option="`libpng-config --libs`" /> <Add option="`libpng-config --libs`" />
<Add library="SDL_mixer" /> <Add library="SDL_mixer" />
@ -120,7 +117,6 @@ HW3SOUND for 3D hardware sound support
<Add option="-DHAVE_BLUA" /> <Add option="-DHAVE_BLUA" />
</Compiler> </Compiler>
<Linker> <Linker>
<Add option="-g" />
<Add option="`sdl-config --libs`" /> <Add option="`sdl-config --libs`" />
<Add option="`libpng-config --libs`" /> <Add option="`libpng-config --libs`" />
<Add library="SDL_mixer" /> <Add library="SDL_mixer" />
@ -136,6 +132,7 @@ HW3SOUND for 3D hardware sound support
<Compiler> <Compiler>
<Add option="-march=i586" /> <Add option="-march=i586" />
<Add option="-g" /> <Add option="-g" />
<Add option="-gdwarf-2" />
<Add option="-D_GNU_SOURCE=1" /> <Add option="-D_GNU_SOURCE=1" />
<Add option="-DSTDC_HEADERS" /> <Add option="-DSTDC_HEADERS" />
<Add option="-D__USE_MINGW_ANSI_STDIO=0" /> <Add option="-D__USE_MINGW_ANSI_STDIO=0" />
@ -157,7 +154,6 @@ HW3SOUND for 3D hardware sound support
<Add directory="libs/gme/include" /> <Add directory="libs/gme/include" />
</Compiler> </Compiler>
<Linker> <Linker>
<Add option="-g" />
<Add library="SDL" /> <Add library="SDL" />
<Add library="SDL_mixer" /> <Add library="SDL_mixer" />
<Add library="advapi32" /> <Add library="advapi32" />
@ -183,6 +179,7 @@ HW3SOUND for 3D hardware sound support
<Add option="-march=i586" /> <Add option="-march=i586" />
<Add option="-O2" /> <Add option="-O2" />
<Add option="-g" /> <Add option="-g" />
<Add option="-gdwarf-2" />
<Add option="-D_GNU_SOURCE=1" /> <Add option="-D_GNU_SOURCE=1" />
<Add option="-DSTDC_HEADERS" /> <Add option="-DSTDC_HEADERS" />
<Add option="-D__USE_MINGW_ANSI_STDIO=0" /> <Add option="-D__USE_MINGW_ANSI_STDIO=0" />
@ -203,7 +200,6 @@ HW3SOUND for 3D hardware sound support
<Add directory="libs/gme/include" /> <Add directory="libs/gme/include" />
</Compiler> </Compiler>
<Linker> <Linker>
<Add option="-g" />
<Add library="SDL" /> <Add library="SDL" />
<Add library="SDL_mixer" /> <Add library="SDL_mixer" />
<Add library="advapi32" /> <Add library="advapi32" />
@ -229,6 +225,7 @@ HW3SOUND for 3D hardware sound support
<Add option="-march=i586" /> <Add option="-march=i586" />
<Add option="-O2" /> <Add option="-O2" />
<Add option="-g" /> <Add option="-g" />
<Add option="-gdwarf-2" />
<Add option="-DSTDC_HEADERS" /> <Add option="-DSTDC_HEADERS" />
<Add option="-D_WINDOWS" /> <Add option="-D_WINDOWS" />
<Add option="-DHWRENDER" /> <Add option="-DHWRENDER" />
@ -248,7 +245,6 @@ HW3SOUND for 3D hardware sound support
<Add directory="src/win32" /> <Add directory="src/win32" />
</ResourceCompiler> </ResourceCompiler>
<Linker> <Linker>
<Add option="-g" />
<Add library="advapi32" /> <Add library="advapi32" />
<Add library="dinput" /> <Add library="dinput" />
<Add library="dxguid" /> <Add library="dxguid" />
@ -278,6 +274,7 @@ HW3SOUND for 3D hardware sound support
<Add option="-march=i586" /> <Add option="-march=i586" />
<Add option="-O2" /> <Add option="-O2" />
<Add option="-g" /> <Add option="-g" />
<Add option="-gdwarf-2" />
<Add option="-DSTDC_HEADERS" /> <Add option="-DSTDC_HEADERS" />
<Add option="-D_WINDOWS" /> <Add option="-D_WINDOWS" />
<Add option="-DHWRENDER" /> <Add option="-DHWRENDER" />
@ -296,7 +293,6 @@ HW3SOUND for 3D hardware sound support
<Add directory="src/win32" /> <Add directory="src/win32" />
</ResourceCompiler> </ResourceCompiler>
<Linker> <Linker>
<Add option="-g" />
<Add library="advapi32" /> <Add library="advapi32" />
<Add library="dinput" /> <Add library="dinput" />
<Add library="dxguid" /> <Add library="dxguid" />
@ -877,14 +873,15 @@ HW3SOUND for 3D hardware sound support
<Add directory="src/win32" /> <Add directory="src/win32" />
<Add directory="src/hardware/r_opengl" /> <Add directory="src/hardware/r_opengl" />
</Compiler> </Compiler>
<Linker>
<Add option="-g" />
</Linker>
<ExtraCommands> <ExtraCommands>
<Add before="make -f comptime.mk all-before" /> <Add before="make -f comptime.mk all-before" />
<Add after="make -f cpdebug.mk all-after BIN=$(TARGET_OUTPUT_FILE)" /> <Add after="make -f cpdebug.mk all-after BIN=$(TARGET_OUTPUT_FILE)" />
<Mode after="always" /> <Mode after="always" />
</ExtraCommands> </ExtraCommands>
<Unit filename="comptime.bat" />
<Unit filename="comptime.mk" />
<Unit filename="comptime.sh" />
<Unit filename="cpdebug.mk" />
<Unit filename="src/am_map.c"> <Unit filename="src/am_map.c">
<Option compilerVar="CC" /> <Option compilerVar="CC" />
<Option target="Debug Native/SDL" /> <Option target="Debug Native/SDL" />

View file

@ -1501,7 +1501,7 @@ CompileCpp=0
Link=1 Link=1
Priority=1000 Priority=1000
OverrideBuildCmd=1 OverrideBuildCmd=1
BuildCmd=$(CC) -g $(CFLAGS) -x assembler-with-cpp -c src/vid_copy.s -o $@ BuildCmd=$(CC) $(CFLAGS) -x assembler-with-cpp -c src/vid_copy.s -o $@
[Unit152] [Unit152]
FileName=src\y_inter.h FileName=src\y_inter.h
@ -2024,8 +2024,8 @@ Includes=libs/libpng-src;libs/zlib;libs/gme/include;libs/fmodex/inc;libs
Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32;libs/gme/win32;libs/gme/win32;libs/fmodex/lib Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32;libs/gme/win32;libs/gme/win32;libs/fmodex/lib
ResourceIncludes=src/win32 ResourceIncludes=src/win32
MakeIncludes=comptime.mk;cpdebug.mk MakeIncludes=comptime.mk;cpdebug.mk
Compiler=-DNDEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-Os_@@_-g_@@_-D_WINDOWS_@@_-DHAVE_PNG_@@_-DNOROPENGL_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_-DHAVE_LIBGME_@@_ Compiler=-DNDEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-Os_@@_-g_@@_-gdwarf-2_@@_-D_WINDOWS_@@_-DHAVE_PNG_@@_-DNOROPENGL_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_-DHAVE_LIBGME_@@_
CppCompiler=-Os_@@_-g_@@_ CppCompiler=-Os_@@_-g_@@_-gdwarf-2_@@_
Linker=-lgdi32_@@_-ldinput_@@_-ldxguid_@@_-lwinmm_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mwindows_@@_-lgme.dll_@@_-lfmodex_@@_ Linker=-lgdi32_@@_-ldinput_@@_-ldxguid_@@_-lwinmm_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mwindows_@@_-lgme.dll_@@_-lfmodex_@@_
PreprocDefines=NORMALSRB2_@@_ PreprocDefines=NORMALSRB2_@@_
CompilerSettings=00000000001000000110e1 CompilerSettings=00000000001000000110e1
@ -2051,8 +2051,8 @@ Includes=libs/libpng-src;libs/zlib;libs/gme/include;libs/fmodex/inc;libs
Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32;libs/gme/win32;libs/fmodex/lib Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32;libs/gme/win32;libs/fmodex/lib
ResourceIncludes=src/win32 ResourceIncludes=src/win32
MakeIncludes=comptime.mk;cpdebug.mk MakeIncludes=comptime.mk;cpdebug.mk
Compiler=-D_DEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-O0_@@_-g_@@_-D_WINDOWS_@@_-DHAVE_PNG_@@_-DNOROPENGL_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_-DHAVE_LIBGME_@@_ Compiler=-D_DEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-O0_@@_-g_@@_-gdwarf-2_@@_-D_WINDOWS_@@_-DHAVE_PNG_@@_-DNOROPENGL_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_-DHAVE_LIBGME_@@_
CppCompiler=-O0_@@_-g_@@_ CppCompiler=-O0_@@_-g_@@_-gdwarf-2_@@_
Linker=-lgdi32_@@_-ldinput_@@_-ldxguid_@@_-lwinmm_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_-lgme.dll_@@_-lfmodex_@@_ Linker=-lgdi32_@@_-ldinput_@@_-ldxguid_@@_-lwinmm_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_-lgme.dll_@@_-lfmodex_@@_
PreprocDefines=NORMALSRB2_@@_ PreprocDefines=NORMALSRB2_@@_
CompilerSettings=00000000000000100110e1 CompilerSettings=00000000000000100110e1
@ -2228,8 +2228,8 @@ Includes=libs/libpng-src;libs/zlib;libs
Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32 Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32
ResourceIncludes=src/win32 ResourceIncludes=src/win32
MakeIncludes=comptime.mk;cpdebug.mk MakeIncludes=comptime.mk;cpdebug.mk
Compiler=-DNDEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-Os_@@_-g_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DSDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_ Compiler=-DNDEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-Os_@@_-g_@@_-gdwarf-2_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DSDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_
CppCompiler=-Os_@@_-g_@@_ CppCompiler=-Os_@@_-g_@@_-gdwarf-2_@@_
Linker=-lSDL_@@_-lSDL_Mixer_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_ Linker=-lSDL_@@_-lSDL_Mixer_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_
PreprocDefines=NORMALSRB2_@@_ PreprocDefines=NORMALSRB2_@@_
CompilerSettings=00000000001000000110e1 CompilerSettings=00000000001000000110e1
@ -2305,8 +2305,8 @@ Includes=libs/libpng-src;libs/zlib;libs
Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32 Libs=libs/libpng-src/projects;libs/zlib/win32;libs/miniupnpc/mingw32
ResourceIncludes=src/win32 ResourceIncludes=src/win32
MakeIncludes=comptime.mk;cpdebug.mk MakeIncludes=comptime.mk;cpdebug.mk
Compiler=-D_DEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-O0_@@_-g_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DSDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_ Compiler=-D_DEBUG_@@_-fno-exceptions_@@_-DSTDC_HEADERS_@@_-Wall_@@_-O0_@@_-g_@@_-gdwarf-2_@@_-DUSE_WGL_SWAP_@@_-DDIRECTFULLSCREEN_@@_-DSDL_@@_-DHWRENDER_@@_-DHW3SOUND_@@_-DHAVE_MIXER_@@_-DHAVE_PNG_@@_-D__USE_MINGW_ANSI_STDIO=0_@@_-DHAVE_MINIUPNPC_@@_-DSTATIC_MINIUPNPC_@@_-DHAVE_BLUA_@@_
CppCompiler=-O0_@@_-g_@@_ CppCompiler=-O0_@@_-g_@@_-gdwarf-2_@@_
Linker=-lSDL_@@_-lSDL_Mixer_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_ Linker=-lSDL_@@_-lSDL_Mixer_@@_-lpng32_@@_-lz32_@@_-lminiupnpc_@@_-lws2_32_@@_-liphlpapi_@@_-mconsole_@@_
PreprocDefines=NORMALSRB2_@@_ PreprocDefines=NORMALSRB2_@@_
CompilerSettings=00000000000000100110e1 CompilerSettings=00000000000000100110e1

View file

@ -5,8 +5,7 @@ if [ x"$1" != x ]; then
fi fi
versiongit() { versiongit() {
#gitversion=`git svn log HEAD --limit=1 --oneline | cut -f 1 -d " "` gitversion=`git describe`
gitversion=`git log HEAD -n1 --oneline | cut -f 1 -d " "`
cat <<EOF > $path/comptime.h cat <<EOF > $path/comptime.h
// Do not edit! This file was autogenerated // Do not edit! This file was autogenerated

View file

@ -24,9 +24,9 @@ all-after:
$(OBJCOPY) $(BIN) $(DBGNAME) $(OBJCOPY) $(BIN) $(DBGNAME)
$(OBJCOPY) --strip-debug $(BIN) $(OBJCOPY) --strip-debug $(BIN)
-$(OBJCOPY) --add-gnu-debuglink=$(DBGNAME) $(BIN) -$(OBJCOPY) --add-gnu-debuglink=$(DBGNAME) $(BIN)
-$(GZIP) $(GZIP_OPTS) $(DBGNAME).txt -$(GZIP) $(GZIP_OPTS) "$(DBGNAME).txt"
ifndef COMSPEC ifndef COMSPEC
$(GZIP) $(GZIP_OPT2) $(DBGNAME).txt -$(GZIP) $(GZIP_OPT2) "$(DBGNAME).txt"
endif endif
-$(UPX) $(UPX_OPTS) $(BIN) -$(UPX) $(UPX_OPTS) $(BIN)

View file

@ -108,6 +108,7 @@ typedef struct
FLOAT scalex,scaley,scalez; FLOAT scalex,scaley,scalez;
FLOAT fovxangle, fovyangle; FLOAT fovxangle, fovyangle;
INT32 splitscreen; INT32 splitscreen;
boolean flip; // screenflip
} FTransform; } FTransform;
// Transformed vector, as passed to HWR API // Transformed vector, as passed to HWR API

View file

@ -4475,6 +4475,12 @@ void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player)
// It should replace all other gr_viewxxx when finished // It should replace all other gr_viewxxx when finished
atransform.anglex = (float)(aimingangle>>ANGLETOFINESHIFT)*(360.0f/(float)FINEANGLES); atransform.anglex = (float)(aimingangle>>ANGLETOFINESHIFT)*(360.0f/(float)FINEANGLES);
atransform.angley = (float)(viewangle>>ANGLETOFINESHIFT)*(360.0f/(float)FINEANGLES); atransform.angley = (float)(viewangle>>ANGLETOFINESHIFT)*(360.0f/(float)FINEANGLES);
if (postimgtype == postimg_flip)
atransform.flip = true;
else
atransform.flip = false;
atransform.x = gr_viewx; // FIXED_TO_FLOAT(viewx) atransform.x = gr_viewx; // FIXED_TO_FLOAT(viewx)
atransform.y = gr_viewy; // FIXED_TO_FLOAT(viewy) atransform.y = gr_viewy; // FIXED_TO_FLOAT(viewy)
atransform.z = gr_viewz; // FIXED_TO_FLOAT(viewz) atransform.z = gr_viewz; // FIXED_TO_FLOAT(viewz)
@ -4488,6 +4494,12 @@ void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player)
// Transform for sprites // Transform for sprites
stransform.anglex = 0.0f; stransform.anglex = 0.0f;
stransform.angley = -270.0f; stransform.angley = -270.0f;
if (postimgtype == postimg_flip)
stransform.flip = true;
else
stransform.flip = false;
stransform.x = 0.0f; stransform.x = 0.0f;
stransform.y = 0.0f; stransform.y = 0.0f;
stransform.z = 0.0f; stransform.z = 0.0f;
@ -4687,6 +4699,12 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player)
// It should replace all other gr_viewxxx when finished // It should replace all other gr_viewxxx when finished
atransform.anglex = (float)(aimingangle>>ANGLETOFINESHIFT)*(360.0f/(float)FINEANGLES); atransform.anglex = (float)(aimingangle>>ANGLETOFINESHIFT)*(360.0f/(float)FINEANGLES);
atransform.angley = (float)(viewangle>>ANGLETOFINESHIFT)*(360.0f/(float)FINEANGLES); atransform.angley = (float)(viewangle>>ANGLETOFINESHIFT)*(360.0f/(float)FINEANGLES);
if (postimgtype == postimg_flip)
atransform.flip = true;
else
atransform.flip = false;
atransform.x = gr_viewx; // FIXED_TO_FLOAT(viewx) atransform.x = gr_viewx; // FIXED_TO_FLOAT(viewx)
atransform.y = gr_viewy; // FIXED_TO_FLOAT(viewy) atransform.y = gr_viewy; // FIXED_TO_FLOAT(viewy)
atransform.z = gr_viewz; // FIXED_TO_FLOAT(viewz) atransform.z = gr_viewz; // FIXED_TO_FLOAT(viewz)
@ -4700,6 +4718,12 @@ void HWR_RenderPlayerView(INT32 viewnumber, player_t *player)
// Transform for sprites // Transform for sprites
stransform.anglex = 0.0f; stransform.anglex = 0.0f;
stransform.angley = -270.0f; stransform.angley = -270.0f;
if (postimgtype == postimg_flip)
stransform.flip = true;
else
stransform.flip = false;
stransform.x = 0.0f; stransform.x = 0.0f;
stransform.y = 0.0f; stransform.y = 0.0f;
stransform.z = 0.0f; stransform.z = 0.0f;
@ -5312,25 +5336,12 @@ void HWR_DoPostProcessor(player_t *player)
} }
HWD.pfnPostImgRedraw(v); HWD.pfnPostImgRedraw(v);
disStart += 1; disStart += 1;
}
else if (postimgtype == postimg_flip) //We like our screens inverted.
{
// 10 by 10 grid. 2 coordinates (xy)
float v[SCREENVERTS][SCREENVERTS][2];
UINT8 x, y;
UINT8 flipy;
for (x = 0; x < SCREENVERTS; x++) // Capture the screen again for screen waving on the intermission
{ if(gamestate != GS_INTERMISSION)
for (y = 0, flipy = SCREENVERTS; y < SCREENVERTS; y++, flipy--) HWD.pfnMakeScreenTexture();
{
// Flip the screen.
v[x][y][0] = (x/((float)(SCREENVERTS-1.0f)/9.0f))-4.5f;
v[x][y][1] = (flipy/((float)(SCREENVERTS-1.0f)/9.0f))-5.5f;
}
}
HWD.pfnPostImgRedraw(v);
} }
// Flipping of the screen isn't done here anymore
#endif // SHUFFLE #endif // SHUFFLE
} }

View file

@ -1132,6 +1132,9 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
spriteframe_t *sprframe; spriteframe_t *sprframe;
float finalscale; float finalscale;
if (tics > durs)
durs = tics;
if (spr->mobj->flags2 & MF2_SHADOW) if (spr->mobj->flags2 & MF2_SHADOW)
{ {
Surf.FlatColor.s.alpha = 0x40; Surf.FlatColor.s.alpha = 0x40;
@ -1241,6 +1244,11 @@ void HWR_DrawMD2(gr_vissprite_t *spr)
// SRB2CBTODO: MD2 scaling support // SRB2CBTODO: MD2 scaling support
finalscale *= FIXED_TO_FLOAT(spr->mobj->scale); finalscale *= FIXED_TO_FLOAT(spr->mobj->scale);
if (postimgtype == postimg_flip)
p.flip = true;
else
p.flip = false;
HWD.pfnDrawMD2i(buff, curr, durs, tics, next, &p, finalscale, flip, color); HWD.pfnDrawMD2i(buff, curr, durs, tics, next, &p, finalscale, flip, color);

View file

@ -628,9 +628,6 @@ void SetStates(void)
#ifdef GL_LIGHT_MODEL_AMBIENT #ifdef GL_LIGHT_MODEL_AMBIENT
GLfloat LightDiffuse[] = {1.0f, 1.0f, 1.0f, 1.0f}; GLfloat LightDiffuse[] = {1.0f, 1.0f, 1.0f, 1.0f};
#endif #endif
#ifndef KOS_GL_COMPATIBILITY
GLfloat LightPos[] = {0.0f, 1.0f, 0.0f, 0.0f};
#endif
DBG_Printf("SetStates()\n"); DBG_Printf("SetStates()\n");
@ -693,9 +690,6 @@ void SetStates(void)
pglLightModelfv(GL_LIGHT_MODEL_AMBIENT, LightDiffuse); pglLightModelfv(GL_LIGHT_MODEL_AMBIENT, LightDiffuse);
pglEnable(GL_LIGHT0); pglEnable(GL_LIGHT0);
#endif #endif
#ifndef KOS_GL_COMPATIBILITY
pglLightfv(GL_LIGHT0, GL_POSITION, LightPos);
#endif
// bp : when no t&l :) // bp : when no t&l :)
pglLoadIdentity(); pglLoadIdentity();
@ -1717,8 +1711,12 @@ EXPORT void HWRAPI(DrawMD2i) (INT32 *gl_cmd_buffer, md2_frame_t *frame, UINT32 d
float pol; float pol;
UINT32 newtime; UINT32 newtime;
float scalex, scaley, scalez; float scalex = scale, scaley = scale, scalez = scale;
scalex = scaley = scalez = scale;
// Because Otherwise, scaling the screen negatively vertically breaks the lighting
#ifndef KOS_GL_COMPATIBILITY
GLfloat LightPos[] = {0.0f, 1.0f, 0.0f, 0.0f};
#endif
if (duration == 0) if (duration == 0)
duration = 1; duration = 1;
@ -1760,10 +1758,19 @@ EXPORT void HWRAPI(DrawMD2i) (INT32 *gl_cmd_buffer, md2_frame_t *frame, UINT32 d
pglEnable(GL_CULL_FACE); pglEnable(GL_CULL_FACE);
if (flipped) // pos->flip is if the screen is flipped too
if (flipped != pos->flip) // If either are active, but not both, invert the model's culling
{
pglCullFace(GL_FRONT); pglCullFace(GL_FRONT);
}
else else
{
pglCullFace(GL_BACK); pglCullFace(GL_BACK);
}
#ifndef KOS_GL_COMPATIBILITY
pglLightfv(GL_LIGHT0, GL_POSITION, LightPos);
#endif
pglShadeModel(GL_SMOOTH); pglShadeModel(GL_SMOOTH);
if (color) if (color)
@ -1872,7 +1879,12 @@ EXPORT void HWRAPI(SetTransform) (FTransform *stransform)
{ {
// keep a trace of the transformation for md2 // keep a trace of the transformation for md2
memcpy(&md2_transform, stransform, sizeof (md2_transform)); memcpy(&md2_transform, stransform, sizeof (md2_transform));
pglScalef(stransform->scalex, stransform->scaley, -stransform->scalez);
if (stransform->flip)
pglScalef(stransform->scalex, -stransform->scaley, -stransform->scalez);
else
pglScalef(stransform->scalex, stransform->scaley, -stransform->scalez);
pglRotatef(stransform->anglex , 1.0f, 0.0f, 0.0f); pglRotatef(stransform->anglex , 1.0f, 0.0f, 0.0f);
pglRotatef(stransform->angley+270.0f, 0.0f, 1.0f, 0.0f); pglRotatef(stransform->angley+270.0f, 0.0f, 1.0f, 0.0f);
pglTranslatef(-stransform->x, -stransform->z, -stransform->y); pglTranslatef(-stransform->x, -stransform->z, -stransform->y);

View file

@ -39,7 +39,6 @@ UINT8 *screens[5];
// screens[4] = fade screen end, postimage tempoarary buffer // screens[4] = fade screen end, postimage tempoarary buffer
static CV_PossibleValue_t gamma_cons_t[] = {{0, "MIN"}, {4, "MAX"}, {0, NULL}}; static CV_PossibleValue_t gamma_cons_t[] = {{0, "MIN"}, {4, "MAX"}, {0, NULL}};
static CV_PossibleValue_t grsoftwarefog_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "LightPlanes"}, {0, NULL}};
static void CV_usegamma_OnChange(void); static void CV_usegamma_OnChange(void);
consvar_t cv_ticrate = {"showfps", "No", 0, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_ticrate = {"showfps", "No", 0, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
@ -59,6 +58,7 @@ static void CV_Gammaxxx_ONChange(void);
// - You can change them in software, // - You can change them in software,
// but they won't do anything. // but they won't do anything.
static CV_PossibleValue_t grgamma_cons_t[] = {{1, "MIN"}, {255, "MAX"}, {0, NULL}}; static CV_PossibleValue_t grgamma_cons_t[] = {{1, "MIN"}, {255, "MAX"}, {0, NULL}};
static CV_PossibleValue_t grsoftwarefog_cons_t[] = {{0, "Off"}, {1, "On"}, {2, "LightPlanes"}, {0, NULL}};
consvar_t cv_voodoocompatibility = {"gr_voodoocompatibility", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_voodoocompatibility = {"gr_voodoocompatibility", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_grfovchange = {"gr_fovchange", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_grfovchange = {"gr_fovchange", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};

View file

@ -27,6 +27,10 @@ ifndef GCC44
#OPTS+=-mms-bitfields #OPTS+=-mms-bitfields
endif endif
ifndef MINGW64
OPTS+=-gdwarf-2
endif
ifndef SDL ifndef SDL
OPTS+=-D_WINDOWS OPTS+=-D_WINDOWS
endif endif