Merge branch 'master' into next

This commit is contained in:
Alam Ed Arias 2018-11-14 10:52:49 -05:00
commit 938bf1605c
11 changed files with 54 additions and 17 deletions

View file

@ -1069,7 +1069,7 @@ static float HWR_ClipViewSegment(INT32 x, polyvertex_t *v1, polyvertex_t *v2)
// //
// HWR_SplitWall // HWR_SplitWall
// //
static void HWR_SplitWall(sector_t *sector, wallVert3D *wallVerts, INT32 texnum, FSurfaceInfo* Surf, UINT32 cutflag, ffloor_t *pfloor) static void HWR_SplitWall(sector_t *sector, wallVert3D *wallVerts, INT32 texnum, FSurfaceInfo* Surf, INT32 cutflag, ffloor_t *pfloor)
{ {
/* SoM: split up and light walls according to the /* SoM: split up and light walls according to the
lightlist. This may also include leaving out parts lightlist. This may also include leaving out parts

View file

@ -646,11 +646,11 @@ static void M_PNGhdr(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png_
static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png_byte movie) static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png_byte movie)
{ {
#ifdef PNG_TEXT_SUPPORTED #ifdef PNG_TEXT_SUPPORTED
#define SRB2PNGTXT 10 //PNG_KEYWORD_MAX_LENGTH(79) is the max #define SRB2PNGTXT 11 //PNG_KEYWORD_MAX_LENGTH(79) is the max
png_text png_infotext[SRB2PNGTXT]; png_text png_infotext[SRB2PNGTXT];
char keytxt[SRB2PNGTXT][12] = { char keytxt[SRB2PNGTXT][12] = {
"Title", "Description", "Playername", "Mapnum", "Mapname", "Title", "Description", "Playername", "Mapnum", "Mapname",
"Location", "Interface", "Revision", "Build Date", "Build Time"}; "Location", "Interface", "Render Mode", "Revision", "Build Date", "Build Time"};
char titletxt[] = "Sonic Robo Blast 2 " VERSIONSTRING; char titletxt[] = "Sonic Robo Blast 2 " VERSIONSTRING;
png_charp playertxt = cv_playername.zstring; png_charp playertxt = cv_playername.zstring;
char desctxt[] = "SRB2 Screenshot"; char desctxt[] = "SRB2 Screenshot";
@ -666,6 +666,7 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png
#else #else
"Unknown"; "Unknown";
#endif #endif
char rendermodetxt[9];
char maptext[8]; char maptext[8];
char lvlttltext[48]; char lvlttltext[48];
char locationtxt[40]; char locationtxt[40];
@ -673,6 +674,19 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png
char ctdate[40]; char ctdate[40];
char cttime[40]; char cttime[40];
switch (rendermode)
{
case render_soft:
strcpy(rendermodetxt, "Software");
break;
case render_opengl:
strcpy(rendermodetxt, "OpenGL");
break;
default: // Just in case
strcpy(rendermodetxt, "None");
break;
}
if (gamestate == GS_LEVEL) if (gamestate == GS_LEVEL)
snprintf(maptext, 8, "%s", G_BuildMapName(gamemap)); snprintf(maptext, 8, "%s", G_BuildMapName(gamemap));
else else
@ -710,9 +724,10 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png
png_infotext[4].text = lvlttltext; png_infotext[4].text = lvlttltext;
png_infotext[5].text = locationtxt; png_infotext[5].text = locationtxt;
png_infotext[6].text = interfacetxt; png_infotext[6].text = interfacetxt;
png_infotext[7].text = strncpy(ctrevision, comprevision, sizeof(ctrevision)-1); png_infotext[7].text = rendermodetxt;
png_infotext[8].text = strncpy(ctdate, compdate, sizeof(ctdate)-1); png_infotext[8].text = strncpy(ctrevision, comprevision, sizeof(ctrevision)-1);
png_infotext[9].text = strncpy(cttime, comptime, sizeof(cttime)-1); png_infotext[9].text = strncpy(ctdate, compdate, sizeof(ctdate)-1);
png_infotext[10].text = strncpy(cttime, comptime, sizeof(cttime)-1);
png_set_text(png_ptr, png_info_ptr, png_infotext, SRB2PNGTXT); png_set_text(png_ptr, png_info_ptr, png_infotext, SRB2PNGTXT);
#undef SRB2PNGTXT #undef SRB2PNGTXT

View file

@ -141,6 +141,7 @@
<ClInclude Include="..\hardware\hw3dsdrv.h" /> <ClInclude Include="..\hardware\hw3dsdrv.h" />
<ClInclude Include="..\hardware\hw3sound.h" /> <ClInclude Include="..\hardware\hw3sound.h" />
<ClInclude Include="..\hardware\hws_data.h" /> <ClInclude Include="..\hardware\hws_data.h" />
<ClInclude Include="..\hardware\hw_clip.h" />
<ClInclude Include="..\hardware\hw_data.h" /> <ClInclude Include="..\hardware\hw_data.h" />
<ClInclude Include="..\hardware\hw_defs.h" /> <ClInclude Include="..\hardware\hw_defs.h" />
<ClInclude Include="..\hardware\hw_dll.h" /> <ClInclude Include="..\hardware\hw_dll.h" />
@ -282,6 +283,7 @@
<ClCompile Include="..\hardware\hw3sound.c" /> <ClCompile Include="..\hardware\hw3sound.c" />
<ClCompile Include="..\hardware\hw_bsp.c" /> <ClCompile Include="..\hardware\hw_bsp.c" />
<ClCompile Include="..\hardware\hw_cache.c" /> <ClCompile Include="..\hardware\hw_cache.c" />
<ClCompile Include="..\hardware\hw_clip.c" />
<ClCompile Include="..\hardware\hw_draw.c" /> <ClCompile Include="..\hardware\hw_draw.c" />
<ClCompile Include="..\hardware\hw_light.c" /> <ClCompile Include="..\hardware\hw_light.c" />
<ClCompile Include="..\hardware\hw_main.c" /> <ClCompile Include="..\hardware\hw_main.c" />

View file

@ -216,6 +216,9 @@
<ClInclude Include="..\hardware\hws_data.h"> <ClInclude Include="..\hardware\hws_data.h">
<Filter>Hw_Hardware</Filter> <Filter>Hw_Hardware</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\hardware\hw_clip.h">
<Filter>Hw_Hardware</Filter>
</ClInclude>
<ClInclude Include="..\hardware\hw_data.h"> <ClInclude Include="..\hardware\hw_data.h">
<Filter>Hw_Hardware</Filter> <Filter>Hw_Hardware</Filter>
</ClInclude> </ClInclude>
@ -603,6 +606,9 @@
<ClCompile Include="..\hardware\hw_cache.c"> <ClCompile Include="..\hardware\hw_cache.c">
<Filter>Hw_Hardware</Filter> <Filter>Hw_Hardware</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\hardware\hw_clip.c">
<Filter>Hw_Hardware</Filter>
</ClCompile>
<ClCompile Include="..\hardware\hw_draw.c"> <ClCompile Include="..\hardware\hw_draw.c">
<Filter>Hw_Hardware</Filter> <Filter>Hw_Hardware</Filter>
</ClCompile> </ClCompile>

View file

@ -550,7 +550,7 @@ boolean I_SongPlaying(void)
#ifdef HAVE_LIBGME #ifdef HAVE_LIBGME
(I_SongType() == MU_GME && gme) || (I_SongType() == MU_GME && gme) ||
#endif #endif
(boolean)music music != NULL
); );
} }

View file

@ -119,6 +119,7 @@
<ClCompile Include="..\hardware\hw3sound.c" /> <ClCompile Include="..\hardware\hw3sound.c" />
<ClCompile Include="..\hardware\hw_bsp.c" /> <ClCompile Include="..\hardware\hw_bsp.c" />
<ClCompile Include="..\hardware\hw_cache.c" /> <ClCompile Include="..\hardware\hw_cache.c" />
<ClCompile Include="..\hardware\hw_clip.c" />
<ClCompile Include="..\hardware\hw_draw.c" /> <ClCompile Include="..\hardware\hw_draw.c" />
<ClCompile Include="..\hardware\hw_light.c" /> <ClCompile Include="..\hardware\hw_light.c" />
<ClCompile Include="..\hardware\hw_main.c" /> <ClCompile Include="..\hardware\hw_main.c" />
@ -275,6 +276,7 @@
<ClInclude Include="..\hardware\hw3dsdrv.h" /> <ClInclude Include="..\hardware\hw3dsdrv.h" />
<ClInclude Include="..\hardware\hw3sound.h" /> <ClInclude Include="..\hardware\hw3sound.h" />
<ClInclude Include="..\hardware\hws_data.h" /> <ClInclude Include="..\hardware\hws_data.h" />
<ClInclude Include="..\hardware\hw_clip.h" />
<ClInclude Include="..\hardware\hw_data.h" /> <ClInclude Include="..\hardware\hw_data.h" />
<ClInclude Include="..\hardware\hw_defs.h" /> <ClInclude Include="..\hardware\hw_defs.h" />
<ClInclude Include="..\hardware\hw_dll.h" /> <ClInclude Include="..\hardware\hw_dll.h" />

View file

@ -93,6 +93,9 @@
<ClCompile Include="..\hardware\hw_cache.c"> <ClCompile Include="..\hardware\hw_cache.c">
<Filter>Hw_Hardware</Filter> <Filter>Hw_Hardware</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\hardware\hw_clip.c">
<Filter>Hw_Hardware</Filter>
</ClCompile>
<ClCompile Include="..\hardware\hw_draw.c"> <ClCompile Include="..\hardware\hw_draw.c">
<Filter>Hw_Hardware</Filter> <Filter>Hw_Hardware</Filter>
</ClCompile> </ClCompile>
@ -470,6 +473,9 @@
<ClInclude Include="win_main.h"> <ClInclude Include="win_main.h">
<Filter>Win32app</Filter> <Filter>Win32app</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="..\hardware\hw_clip.h">
<Filter>Hw_Hardware</Filter>
</ClInclude>
<ClInclude Include="..\hardware\hw_data.h"> <ClInclude Include="..\hardware\hw_data.h">
<Filter>Hw_Hardware</Filter> <Filter>Hw_Hardware</Filter>
</ClInclude> </ClInclude>

View file

@ -148,7 +148,7 @@ static loadfunc_t hwdFuncTable[] = {
#ifdef SHUFFLE #ifdef SHUFFLE
{"PostImgRedraw", &hwdriver.pfnPostImgRedraw}, {"PostImgRedraw", &hwdriver.pfnPostImgRedraw},
#endif #endif
{"FlushScreenTextures"},&hwdriver.pfnFlushScreenTextures}, {"FlushScreenTextures", &hwdriver.pfnFlushScreenTextures},
{"StartScreenWipe", &hwdriver.pfnStartScreenWipe}, {"StartScreenWipe", &hwdriver.pfnStartScreenWipe},
{"EndScreenWipe", &hwdriver.pfnEndScreenWipe}, {"EndScreenWipe", &hwdriver.pfnEndScreenWipe},
{"DoScreenWipe", &hwdriver.pfnDoScreenWipe}, {"DoScreenWipe", &hwdriver.pfnDoScreenWipe},

View file

@ -457,6 +457,8 @@ void I_ShutdownMusic(void)
musictype_t I_SongType(void) musictype_t I_SongType(void)
{ {
FMOD_SOUND_TYPE type;
#ifdef HAVE_LIBGME #ifdef HAVE_LIBGME
if (gme) if (gme)
return MU_GME; return MU_GME;
@ -465,7 +467,6 @@ musictype_t I_SongType(void)
if (!music_stream) if (!music_stream)
return MU_NONE; return MU_NONE;
FMOD_SOUND_TYPE type;
if (FMOD_Sound_GetFormat(music_stream, &type, NULL, NULL, NULL) == FMOD_OK) if (FMOD_Sound_GetFormat(music_stream, &type, NULL, NULL, NULL) == FMOD_OK)
{ {
switch(type) switch(type)
@ -492,15 +493,15 @@ musictype_t I_SongType(void)
boolean I_SongPlaying(void) boolean I_SongPlaying(void)
{ {
return (boolean)music_stream; return (music_stream != NULL);
} }
boolean I_SongPaused(void) boolean I_SongPaused(void)
{ {
boolean fmpaused = false; FMOD_BOOL fmpaused = false;
if (music_stream) if (music_stream)
FMOD_Channel_GetPaused(music_channel, &fmpaused); FMOD_Channel_GetPaused(music_channel, &fmpaused);
return fmpaused; return (boolean)fmpaused;
} }
/// ------------------------ /// ------------------------
@ -551,7 +552,12 @@ boolean I_LoadSong(char *data, size_t len)
FMOD_TAG tag; FMOD_TAG tag;
unsigned int loopstart, loopend; unsigned int loopstart, loopend;
if (gme || music_stream) if (
#ifdef HAVE_LIBGME
gme ||
#endif
music_stream
)
I_UnloadSong(); I_UnloadSong();
memset(&fmt, 0, sizeof(FMOD_CREATESOUNDEXINFO)); memset(&fmt, 0, sizeof(FMOD_CREATESOUNDEXINFO));