This list is closed, nobody may subscribe to it.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(16) |
Nov
(30) |
Dec
(17) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(35) |
Feb
(35) |
Mar
(5) |
Apr
(1) |
May
(6) |
Jun
(24) |
Jul
(48) |
Aug
(122) |
Sep
(19) |
Oct
(10) |
Nov
(98) |
Dec
(16) |
2003 |
Jan
(24) |
Feb
(31) |
Mar
(35) |
Apr
(44) |
May
(27) |
Jun
(26) |
Jul
(104) |
Aug
(139) |
Sep
(92) |
Oct
(88) |
Nov
(10) |
Dec
(8) |
2004 |
Jan
(129) |
Feb
(19) |
Mar
(7) |
Apr
(11) |
May
(14) |
Jun
(8) |
Jul
(2) |
Aug
(90) |
Sep
(25) |
Oct
(16) |
Nov
(7) |
Dec
(8) |
2005 |
Jan
(4) |
Feb
(1) |
Mar
(3) |
Apr
(6) |
May
(10) |
Jun
(4) |
Jul
(11) |
Aug
(1) |
Sep
|
Oct
|
Nov
(18) |
Dec
(5) |
2006 |
Jan
(9) |
Feb
(5) |
Mar
(12) |
Apr
(41) |
May
|
Jun
(1) |
Jul
(286) |
Aug
(341) |
Sep
(94) |
Oct
(96) |
Nov
(50) |
Dec
(61) |
2007 |
Jan
(47) |
Feb
(27) |
Mar
(25) |
Apr
(60) |
May
(22) |
Jun
(11) |
Jul
(20) |
Aug
(16) |
Sep
(13) |
Oct
(32) |
Nov
(30) |
Dec
(12) |
2008 |
Jan
(24) |
Feb
(14) |
Mar
(44) |
Apr
(34) |
May
(6) |
Jun
(10) |
Jul
(17) |
Aug
(27) |
Sep
(39) |
Oct
(86) |
Nov
(92) |
Dec
(59) |
2009 |
Jan
(92) |
Feb
(56) |
Mar
(28) |
Apr
(50) |
May
(82) |
Jun
(24) |
Jul
(60) |
Aug
(38) |
Sep
(57) |
Oct
(28) |
Nov
(40) |
Dec
(63) |
2010 |
Jan
(37) |
Feb
(10) |
Mar
(12) |
Apr
(22) |
May
(44) |
Jun
(44) |
Jul
(3) |
Aug
(18) |
Sep
(20) |
Oct
(26) |
Nov
(49) |
Dec
(51) |
2011 |
Jan
(14) |
Feb
(28) |
Mar
(3) |
Apr
(35) |
May
(99) |
Jun
(117) |
Jul
(44) |
Aug
(16) |
Sep
(20) |
Oct
(20) |
Nov
(33) |
Dec
(22) |
2012 |
Jan
(21) |
Feb
(5) |
Mar
(46) |
Apr
(10) |
May
(7) |
Jun
(2) |
Jul
(8) |
Aug
(5) |
Sep
(1) |
Oct
|
Nov
|
Dec
(16) |
2013 |
Jan
(7) |
Feb
(9) |
Mar
|
Apr
(9) |
May
(1) |
Jun
(21) |
Jul
(8) |
Aug
(6) |
Sep
(8) |
Oct
(8) |
Nov
|
Dec
(3) |
2014 |
Jan
(21) |
Feb
(2) |
Mar
(2) |
Apr
(1) |
May
|
Jun
(2) |
Jul
(4) |
Aug
|
Sep
(13) |
Oct
|
Nov
(1) |
Dec
(4) |
2015 |
Jan
(2) |
Feb
(11) |
Mar
(4) |
Apr
|
May
(3) |
Jun
(1) |
Jul
|
Aug
|
Sep
(15) |
Oct
(11) |
Nov
(2) |
Dec
|
2016 |
Jan
(5) |
Feb
(28) |
Mar
(3) |
Apr
|
May
|
Jun
(2) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
(2) |
2017 |
Jan
(6) |
Feb
(10) |
Mar
(4) |
Apr
|
May
(7) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
(3) |
Dec
|
2018 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(7) |
2019 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
(2) |
Oct
|
Nov
|
Dec
|
From: <web...@pr...> - 2019-09-27 07:42:16
|
Author: entryway Date: Fri Sep 27 07:42:00 2019 New Revision: 4542 Log: #10 Fix macOS build with OpenGL https://sourceforge.net/p/prboom-plus/patches/10/ Modified: branches/prboom-plus-24/prboom2/configure.ac Modified: branches/prboom-plus-24/prboom2/configure.ac ============================================================================== --- branches/prboom-plus-24/prboom2/configure.ac Mon Sep 23 11:28:02 2019 (r4541) +++ branches/prboom-plus-24/prboom2/configure.ac Fri Sep 27 07:42:00 2019 (r4542) @@ -86,6 +86,7 @@ AC_CHECK_LIB(m,pow) dnl - system specific stuff dnl - winmm for the midi volume hack +GL_DIR="GL" case "$target" in *-*-cygwin* | *-*-mingw32*) SYS_GL_LIBS="-lopengl32 -lglu32 -lgdi32" @@ -99,6 +100,10 @@ CFLAGS="$CFLAGS -mthreads" fi ;; + *-*-darwin*) + GL_DIR="OpenGL" + SYS_GL_LIBS="-framework OpenGL" + ;; *) SYS_GL_LIBS="-lGL -lGLU" ;; @@ -111,7 +116,7 @@ AC_MSG_CHECKING(for OpenGL support) have_opengl=no AC_TRY_COMPILE([ - #include <GL/gl.h> + #include <$GL_DIR/gl.h> ],[ ],[ have_opengl=yes |
From: <web...@pr...> - 2019-09-23 12:09:29
|
Author: entryway Date: Mon Sep 23 11:28:02 2019 New Revision: 4541 Log: [bugs:#254] Global buffer overflow in macro handling Modified: branches/prboom-plus-24/prboom2/src/hu_stuff.c Modified: branches/prboom-plus-24/prboom2/src/hu_stuff.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/hu_stuff.c Wed May 22 07:29:04 2019 (r4540) +++ branches/prboom-plus-24/prboom2/src/hu_stuff.c Mon Sep 23 11:28:02 2019 (r4541) @@ -2834,7 +2834,7 @@ // leave chat mode and notify that it was sent chat_on = false; - strcpy(lastmessage, chat_macros[c]); + strncpy(lastmessage, chat_macros[c], HU_MAXLINELENGTH); plr->message = lastmessage; eatkey = true; } |
From: <web...@pr...> - 2019-05-22 07:45:59
|
Author: entryway Date: Wed May 22 07:29:04 2019 New Revision: 4540 Log: Debian package fails to build on GNU/Hurd. This is because this system does not have the PATH_MAX macro defined. On the other hand, this macro is undefined and then redefined on MSVC. I have fixed the code to undefine the macro on MSVC and then define it whenever it is undefined later. Fabian Greffrath Modified: branches/prboom-plus-24/prboom2/src/doomtype.h Modified: branches/prboom-plus-24/prboom2/src/doomtype.h ============================================================================== --- branches/prboom-plus-24/prboom2/src/doomtype.h Mon Dec 24 09:44:24 2018 (r4539) +++ branches/prboom-plus-24/prboom2/src/doomtype.h Wed May 22 07:29:04 2019 (r4540) @@ -84,10 +84,13 @@ // define compiled-specific long-long contstant notation here #define LONGLONG(num) (uint_64_t)num #undef PATH_MAX -#define PATH_MAX 1024 #define strcasecmp _stricmp #define strncasecmp _strnicmp #define S_ISDIR(x) (((sbuf.st_mode & S_IFDIR)==S_IFDIR)?1:0) +#endif + +#ifndef PATH_MAX +#define PATH_MAX 1024 #endif #ifdef __GNUC__ |
From: <web...@pr...> - 2018-12-24 09:44:37
|
Author: entryway Date: Mon Dec 24 09:44:24 2018 New Revision: 4539 Log: occured -> occurred (Fabian Greffrath) Modified: branches/prboom-plus-24/prboom2/src/p_pspr.c Modified: branches/prboom-plus-24/prboom2/src/p_pspr.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_pspr.c Sun Dec 23 12:11:28 2018 (r4538) +++ branches/prboom-plus-24/prboom2/src/p_pspr.c Mon Dec 24 09:44:24 2018 (r4539) @@ -144,7 +144,7 @@ S_StartSound (player->mo, sfx_sawup); if (player->pendingweapon >= NUMWEAPONS) - lprintf(LO_WARN, "P_BringUpWeapon: weaponinfo overrun has occured.\n"); + lprintf(LO_WARN, "P_BringUpWeapon: weaponinfo overrun has occurred.\n"); newstate = weaponinfo[player->pendingweapon].upstate; |
From: <web...@pr...> - 2018-12-23 12:11:38
|
Author: entryway Date: Sun Dec 23 12:11:28 2018 New Revision: 4538 Log: warnings (Fabian Greffrath) Modified: branches/prboom-plus-24/prboom2/src/MUSIC/oplplayer.c branches/prboom-plus-24/prboom2/src/d_deh.c branches/prboom-plus-24/prboom2/src/doomtype.h branches/prboom-plus-24/prboom2/src/e6y.c branches/prboom-plus-24/prboom2/src/g_overflow.c branches/prboom-plus-24/prboom2/src/gl_preprocess.c branches/prboom-plus-24/prboom2/src/p_saveg.c branches/prboom-plus-24/prboom2/src/r_demo.c branches/prboom-plus-24/prboom2/src/r_drawflush.inl Modified: branches/prboom-plus-24/prboom2/src/MUSIC/oplplayer.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/MUSIC/oplplayer.c Sun Dec 23 11:56:19 2018 (r4537) +++ branches/prboom-plus-24/prboom2/src/MUSIC/oplplayer.c Sun Dec 23 12:11:28 2018 (r4538) @@ -1356,7 +1356,7 @@ // time numbers we have to traverse the tracks and everything if (mf.len < 100) { - lprintf (LO_WARN, "I_OPL_RegisterSong: Very short MIDI (%i bytes)\n", mf.len); + lprintf (LO_WARN, "I_OPL_RegisterSong: Very short MIDI (%li bytes)\n", mf.len); return NULL; } Modified: branches/prboom-plus-24/prboom2/src/d_deh.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/d_deh.c Sun Dec 23 11:56:19 2018 (r4537) +++ branches/prboom-plus-24/prboom2/src/d_deh.c Sun Dec 23 12:11:28 2018 (r4538) @@ -1662,7 +1662,7 @@ dboolean found; // know if we found this one during lookup or not // Ty 05/16/98 - initialize it to something, dummy! - strncpy(inbuffer,line,DEH_BUFFERMAX); + strncpy(inbuffer,line,DEH_BUFFERMAX-1); // for this one, we just read 'em until we hit a blank line while (!dehfeof(fpin) && *inbuffer && (*inbuffer != ' ')) @@ -1840,7 +1840,7 @@ int ix; char *strval; - strncpy(inbuffer,line,DEH_BUFFERMAX); + strncpy(inbuffer,line,DEH_BUFFERMAX-1); if (fpout) fprintf(fpout,"Thing line: '%s'\n",inbuffer); // killough 8/98: allow hex numbers in input: @@ -1969,7 +1969,7 @@ uint_64_t value; // All deh values are ints or longs int indexnum; - strncpy(inbuffer,line,DEH_BUFFERMAX); + strncpy(inbuffer,line,DEH_BUFFERMAX-1); // killough 8/98: allow hex numbers in input: sscanf(inbuffer,"%s %i",key, &indexnum); @@ -2050,7 +2050,7 @@ int indexnum; size_t i; // looper - strncpy(inbuffer,line,DEH_BUFFERMAX); + strncpy(inbuffer,line,DEH_BUFFERMAX-1); // NOTE: different format from normal // killough 8/98: allow hex numbers in input, fix error case: @@ -2127,7 +2127,7 @@ uint_64_t value; // All deh values are ints or longs int indexnum; - strncpy(inbuffer,line,DEH_BUFFERMAX); + strncpy(inbuffer,line,DEH_BUFFERMAX-1); // killough 8/98: allow hex numbers in input: sscanf(inbuffer,"%s %i",key, &indexnum); @@ -2197,7 +2197,7 @@ uint_64_t value; // All deh values are ints or longs int indexnum; - strncpy(inbuffer,line,DEH_BUFFERMAX); + strncpy(inbuffer,line,DEH_BUFFERMAX-1); // killough 8/98: allow hex numbers in input: sscanf(inbuffer,"%s %i",key, &indexnum); @@ -2243,7 +2243,7 @@ uint_64_t value; // All deh values are ints or longs int indexnum; - strncpy(inbuffer,line,DEH_BUFFERMAX); + strncpy(inbuffer,line,DEH_BUFFERMAX-1); // killough 8/98: allow hex numbers in input: sscanf(inbuffer,"%s %i",key, &indexnum); @@ -2303,7 +2303,7 @@ // Too little is known about what this is supposed to do, and // there are better ways of handling sprite renaming. Not supported. - strncpy(inbuffer,line,DEH_BUFFERMAX); + strncpy(inbuffer,line,DEH_BUFFERMAX-1); // killough 8/98: allow hex numbers in input: sscanf(inbuffer,"%s %i",key, &indexnum); @@ -2346,7 +2346,7 @@ // is being changed. Error checking is done based on current fixed // array sizes of[4][10] and [32] - strncpy(inbuffer,line,DEH_BUFFERMAX); + strncpy(inbuffer,line,DEH_BUFFERMAX-1); // killough 8/98: allow hex numbers in input: sscanf(inbuffer,"%s %i",key, &indexnum); @@ -2426,7 +2426,7 @@ if (fpout) fprintf(fpout,"Processing Cheat: %s\n",line); - strncpy(inbuffer,line,DEH_BUFFERMAX); + strncpy(inbuffer,line,DEH_BUFFERMAX-1); while (!dehfeof(fpin) && *inbuffer && (*inbuffer != ' ')) { if (!dehfgets(inbuffer, sizeof(inbuffer), fpin)) break; @@ -2502,7 +2502,7 @@ char inbuffer[DEH_BUFFERMAX]; uint_64_t value; // All deh values are ints or longs - strncpy(inbuffer,line,DEH_BUFFERMAX); + strncpy(inbuffer,line,DEH_BUFFERMAX-1); while (!dehfeof(fpin) && *inbuffer && (*inbuffer != ' ')) { if (!dehfgets(inbuffer, sizeof(inbuffer), fpin)) break; @@ -2740,7 +2740,7 @@ { char inbuffer[DEH_BUFFERMAX]; - strncpy(inbuffer,line,DEH_BUFFERMAX); + strncpy(inbuffer,line,DEH_BUFFERMAX-1); if (fpout) fprintf(fpout,"Unmatched Block: '%s'\n",inbuffer); return; } @@ -2770,7 +2770,7 @@ if (!holdstring) holdstring = malloc(maxstrlen*sizeof(*holdstring)); *holdstring = '\0'; // empty string to start with - strncpy(inbuffer,line,DEH_BUFFERMAX); + strncpy(inbuffer,line,DEH_BUFFERMAX-1); // Ty 04/24/98 - have to allow inbuffer to start with a blank for // the continuations of C1TEXT etc. while (!dehfeof(fpin) && *inbuffer) /* && (*inbuffer != ' ') */ @@ -2910,7 +2910,7 @@ char inbuffer[DEH_BUFFERMAX]; uint_64_t value; // All deh values are ints or longs - strncpy(inbuffer,line,DEH_BUFFERMAX); + strncpy(inbuffer,line,DEH_BUFFERMAX-1); while (!dehfeof(fpin) && *inbuffer && (*inbuffer != ' ')) { if (!dehfgets(inbuffer, sizeof(inbuffer), fpin)) break; @@ -2951,7 +2951,7 @@ if(fpout) fprintf(fpout,"Processing sprite name substitution\n"); - strncpy(inbuffer,line,DEH_BUFFERMAX); + strncpy(inbuffer,line,DEH_BUFFERMAX-1); while(!dehfeof(fpin) && *inbuffer && (*inbuffer != ' ')) { @@ -3010,7 +3010,7 @@ if(fpout) fprintf(fpout,"Processing sound name substitution\n"); - strncpy(inbuffer,line,DEH_BUFFERMAX); + strncpy(inbuffer,line,DEH_BUFFERMAX-1); while(!dehfeof(fpin) && *inbuffer && (*inbuffer != ' ')) { @@ -3070,7 +3070,7 @@ if(fpout) fprintf(fpout,"Processing music name substitution\n"); - strncpy(inbuffer,line,DEH_BUFFERMAX); + strncpy(inbuffer,line,DEH_BUFFERMAX-1); while(!dehfeof(fpin) && *inbuffer && (*inbuffer != ' ')) { Modified: branches/prboom-plus-24/prboom2/src/doomtype.h ============================================================================== --- branches/prboom-plus-24/prboom2/src/doomtype.h Sun Dec 23 11:56:19 2018 (r4537) +++ branches/prboom-plus-24/prboom2/src/doomtype.h Sun Dec 23 12:11:28 2018 (r4538) @@ -50,6 +50,14 @@ typedef unsigned char byte; #endif +#ifdef _MSC_VER + #if _MSC_VER < 1300 + #include <BaseTsd.h> + typedef INT_PTR intptr_t; + #endif +#endif + + //e6y #ifndef MAX #define MAX(a,b) ((a)>(b)?(a):(b)) Modified: branches/prboom-plus-24/prboom2/src/e6y.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/e6y.c Sun Dec 23 11:56:19 2018 (r4537) +++ branches/prboom-plus-24/prboom2/src/e6y.c Sun Dec 23 12:11:28 2018 (r4538) @@ -942,7 +942,7 @@ for (level=0;level<numlevels;level++) { sprintf(str, - "%%s - %%%dd:%%05.2f (%%%dd:%%02d) K: %%%dd/%%-%dd%%%ds I: %%%dd/%%-%dd%%%ds S: %%%dd/%%-%dd %%%ds\r\n", + "%%s - %%%dd:%%05.2f (%%%dd:%%02d) K: %%%dd/%%-%dd%%%lds I: %%%dd/%%-%dd%%%lds S: %%%dd/%%-%dd %%%lds\r\n", max.stat[TT_TIME], max.stat[TT_TOTALTIME], max.stat[TT_ALLKILL], max.stat[TT_TOTALKILL], allkills_len, max.stat[TT_ALLITEM], max.stat[TT_TOTALITEM], allitems_len, Modified: branches/prboom-plus-24/prboom2/src/g_overflow.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/g_overflow.c Sun Dec 23 11:56:19 2018 (r4537) +++ branches/prboom-plus-24/prboom2/src/g_overflow.c Sun Dec 23 12:11:28 2018 (r4538) @@ -172,7 +172,7 @@ InterceptsMemoryOverrun(location, intercept->frac); InterceptsMemoryOverrun(location + 4, intercept->isaline); - InterceptsMemoryOverrun(location + 8, (int) intercept->d.thing); + InterceptsMemoryOverrun(location + 8, (int)(intptr_t) intercept->d.thing); } } } Modified: branches/prboom-plus-24/prboom2/src/gl_preprocess.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/gl_preprocess.c Sun Dec 23 11:56:19 2018 (r4537) +++ branches/prboom-plus-24/prboom2/src/gl_preprocess.c Sun Dec 23 12:11:28 2018 (r4538) @@ -233,7 +233,7 @@ if(!numedgepoints) { - if (levelinfo) fprintf(levelinfo, "All carved away: subsector %i - sector %i\n", ssec-subsectors, ssec->sector->iSectorID); + if (levelinfo) fprintf(levelinfo, "All carved away: subsector %li - sector %i\n", ssec-subsectors, ssec->sector->iSectorID); } else { @@ -928,8 +928,8 @@ memset(vertexcheck2,0,numvertexes*sizeof(vertexcheck2[0])); for (j=0; j<sectors[i].linecount; j++) { - v1num=((int)sectors[i].lines[j]->v1-(int)vertexes)/sizeof(vertex_t); - v2num=((int)sectors[i].lines[j]->v2-(int)vertexes)/sizeof(vertex_t); + v1num=((intptr_t)sectors[i].lines[j]->v1-(intptr_t)vertexes)/sizeof(vertex_t); + v2num=((intptr_t)sectors[i].lines[j]->v2-(intptr_t)vertexes)/sizeof(vertex_t); if ((v1num>=numvertexes) || (v2num>=numvertexes)) continue; @@ -978,8 +978,8 @@ // e6y: marking all the isolated lines for (j=0; j<sectors[i].linecount; j++) { - v1num=((int)sectors[i].lines[j]->v1-(int)vertexes)/sizeof(vertex_t); - v2num=((int)sectors[i].lines[j]->v2-(int)vertexes)/sizeof(vertex_t); + v1num=((intptr_t)sectors[i].lines[j]->v1-(intptr_t)vertexes)/sizeof(vertex_t); + v2num=((intptr_t)sectors[i].lines[j]->v2-(intptr_t)vertexes)/sizeof(vertex_t); if (vertexcheck2[v1num] < 2 && vertexcheck2[v2num] < 2) { sectors[i].lines[j]->r_flags |= RF_ISOLATED; Modified: branches/prboom-plus-24/prboom2/src/p_saveg.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_saveg.c Sun Dec 23 11:56:19 2018 (r4537) +++ branches/prboom-plus-24/prboom2/src/p_saveg.c Sun Dec 23 12:11:28 2018 (r4538) @@ -48,7 +48,7 @@ // Pads save_p to a 4-byte boundary // so that the load/save works on SGI&Gecko. -#define PADSAVEP() do { save_p += (4 - ((int) save_p & 3)) & 3; } while (0) +#define PADSAVEP() do { save_p += (4 - ((intptr_t) save_p & 3)) & 3; } while (0) // // P_ArchivePlayers // @@ -99,7 +99,7 @@ for (j=0 ; j<NUMPSPRITES ; j++) if (players[i]. psprites[j].state) players[i]. psprites[j].state = - &states[ (int)players[i].psprites[j].state ]; + &states[ (size_t)players[i].psprites[j].state ]; } } @@ -279,7 +279,7 @@ number_of_thinkers = 0; for (th = thinkercap.next ; th != &thinkercap ; th=th->next) if (th->function == P_MobjThinker) - th->prev = (thinker_t *) ++number_of_thinkers; + th->prev = (thinker_t *)(intptr_t) ++number_of_thinkers; } // phares 9/13/98: Moved this code outside of P_ArchiveThinkers so the @@ -474,10 +474,10 @@ memcpy (mobj, save_p, sizeof(mobj_t)); save_p += sizeof(mobj_t); - mobj->state = states + (int) mobj->state; + mobj->state = states + (intptr_t) mobj->state; if (mobj->player) - (mobj->player = &players[(int) mobj->player - 1]) -> mo = mobj; + (mobj->player = &players[(size_t) mobj->player - 1]) -> mo = mobj; P_SetThingPosition (mobj); mobj->info = &mobjinfo[mobj->type]; @@ -652,7 +652,7 @@ ceiling = (ceiling_t *)save_p; memcpy (ceiling, th, sizeof(*ceiling)); save_p += sizeof(*ceiling); - ceiling->sector = (sector_t *)(ceiling->sector->iSectorID); + ceiling->sector = (sector_t *)(intptr_t)(ceiling->sector->iSectorID); continue; } @@ -664,7 +664,7 @@ door = (vldoor_t *) save_p; memcpy (door, th, sizeof *door); save_p += sizeof(*door); - door->sector = (sector_t *)(door->sector->iSectorID); + door->sector = (sector_t *)(intptr_t)(door->sector->iSectorID); //jff 1/31/98 archive line remembered by door as well door->line = (line_t *) (door->line ? door->line-lines : -1); continue; @@ -678,7 +678,7 @@ floor = (floormove_t *)save_p; memcpy (floor, th, sizeof(*floor)); save_p += sizeof(*floor); - floor->sector = (sector_t *)(floor->sector->iSectorID); + floor->sector = (sector_t *)(intptr_t)(floor->sector->iSectorID); continue; } @@ -691,7 +691,7 @@ plat = (plat_t *)save_p; memcpy (plat, th, sizeof(*plat)); save_p += sizeof(*plat); - plat->sector = (sector_t *)(plat->sector->iSectorID); + plat->sector = (sector_t *)(intptr_t)(plat->sector->iSectorID); continue; } @@ -703,7 +703,7 @@ flash = (lightflash_t *)save_p; memcpy (flash, th, sizeof(*flash)); save_p += sizeof(*flash); - flash->sector = (sector_t *)(flash->sector->iSectorID); + flash->sector = (sector_t *)(intptr_t)(flash->sector->iSectorID); continue; } @@ -715,7 +715,7 @@ strobe = (strobe_t *)save_p; memcpy (strobe, th, sizeof(*strobe)); save_p += sizeof(*strobe); - strobe->sector = (sector_t *)(strobe->sector->iSectorID); + strobe->sector = (sector_t *)(intptr_t)(strobe->sector->iSectorID); continue; } @@ -727,7 +727,7 @@ glow = (glow_t *)save_p; memcpy (glow, th, sizeof(*glow)); save_p += sizeof(*glow); - glow->sector = (sector_t *)(glow->sector->iSectorID); + glow->sector = (sector_t *)(intptr_t)(glow->sector->iSectorID); continue; } @@ -740,7 +740,7 @@ flicker = (fireflicker_t *)save_p; memcpy (flicker, th, sizeof(*flicker)); save_p += sizeof(*flicker); - flicker->sector = (sector_t *)(flicker->sector->iSectorID); + flicker->sector = (sector_t *)(intptr_t)(flicker->sector->iSectorID); continue; } @@ -753,7 +753,7 @@ elevator = (elevator_t *)save_p; memcpy (elevator, th, sizeof(*elevator)); save_p += sizeof(*elevator); - elevator->sector = (sector_t *)(elevator->sector->iSectorID); + elevator->sector = (sector_t *)(intptr_t)(elevator->sector->iSectorID); continue; } @@ -799,7 +799,7 @@ ceiling_t *ceiling = Z_Malloc (sizeof(*ceiling), PU_LEVEL, NULL); memcpy (ceiling, save_p, sizeof(*ceiling)); save_p += sizeof(*ceiling); - ceiling->sector = §ors[(int)ceiling->sector]; + ceiling->sector = §ors[(size_t)ceiling->sector]; ceiling->sector->ceilingdata = ceiling; //jff 2/22/98 if (ceiling->thinker.function) @@ -816,10 +816,10 @@ vldoor_t *door = Z_Malloc (sizeof(*door), PU_LEVEL, NULL); memcpy (door, save_p, sizeof(*door)); save_p += sizeof(*door); - door->sector = §ors[(int)door->sector]; + door->sector = §ors[(size_t)door->sector]; //jff 1/31/98 unarchive line remembered by door as well - door->line = (int)door->line!=-1? &lines[(int)door->line] : NULL; + door->line = (intptr_t)door->line!=-1? &lines[(size_t)door->line] : NULL; door->sector->ceilingdata = door; //jff 2/22/98 door->thinker.function = T_VerticalDoor; @@ -833,7 +833,7 @@ floormove_t *floor = Z_Malloc (sizeof(*floor), PU_LEVEL, NULL); memcpy (floor, save_p, sizeof(*floor)); save_p += sizeof(*floor); - floor->sector = §ors[(int)floor->sector]; + floor->sector = §ors[(size_t)floor->sector]; floor->sector->floordata = floor; //jff 2/22/98 floor->thinker.function = T_MoveFloor; P_AddThinker (&floor->thinker); @@ -846,7 +846,7 @@ plat_t *plat = Z_Malloc (sizeof(*plat), PU_LEVEL, NULL); memcpy (plat, save_p, sizeof(*plat)); save_p += sizeof(*plat); - plat->sector = §ors[(int)plat->sector]; + plat->sector = §ors[(size_t)plat->sector]; plat->sector->floordata = plat; //jff 2/22/98 if (plat->thinker.function) @@ -863,7 +863,7 @@ lightflash_t *flash = Z_Malloc (sizeof(*flash), PU_LEVEL, NULL); memcpy (flash, save_p, sizeof(*flash)); save_p += sizeof(*flash); - flash->sector = §ors[(int)flash->sector]; + flash->sector = §ors[(size_t)flash->sector]; flash->thinker.function = T_LightFlash; P_AddThinker (&flash->thinker); break; @@ -875,7 +875,7 @@ strobe_t *strobe = Z_Malloc (sizeof(*strobe), PU_LEVEL, NULL); memcpy (strobe, save_p, sizeof(*strobe)); save_p += sizeof(*strobe); - strobe->sector = §ors[(int)strobe->sector]; + strobe->sector = §ors[(size_t)strobe->sector]; strobe->thinker.function = T_StrobeFlash; P_AddThinker (&strobe->thinker); break; @@ -887,7 +887,7 @@ glow_t *glow = Z_Malloc (sizeof(*glow), PU_LEVEL, NULL); memcpy (glow, save_p, sizeof(*glow)); save_p += sizeof(*glow); - glow->sector = §ors[(int)glow->sector]; + glow->sector = §ors[(size_t)glow->sector]; glow->thinker.function = T_Glow; P_AddThinker (&glow->thinker); break; @@ -899,7 +899,7 @@ fireflicker_t *flicker = Z_Malloc (sizeof(*flicker), PU_LEVEL, NULL); memcpy (flicker, save_p, sizeof(*flicker)); save_p += sizeof(*flicker); - flicker->sector = §ors[(int)flicker->sector]; + flicker->sector = §ors[(size_t)flicker->sector]; flicker->thinker.function = T_FireFlicker; P_AddThinker (&flicker->thinker); break; @@ -912,7 +912,7 @@ elevator_t *elevator = Z_Malloc (sizeof(*elevator), PU_LEVEL, NULL); memcpy (elevator, save_p, sizeof(*elevator)); save_p += sizeof(*elevator); - elevator->sector = §ors[(int)elevator->sector]; + elevator->sector = §ors[(size_t)elevator->sector]; elevator->sector->floordata = elevator; //jff 2/22/98 elevator->sector->ceilingdata = elevator; //jff 2/22/98 elevator->thinker.function = T_MoveElevator; Modified: branches/prboom-plus-24/prboom2/src/r_demo.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/r_demo.c Sun Dec 23 11:56:19 2018 (r4537) +++ branches/prboom-plus-24/prboom2/src/r_demo.c Sun Dec 23 12:11:28 2018 (r4538) @@ -298,7 +298,7 @@ void W_InitPWADTable(wadtbl_t *wadtbl) { //init header signature and lookup table offset and size - strncpy(wadtbl->header.identification, PWAD_SIGNATURE, 4); + memcpy(wadtbl->header.identification, PWAD_SIGNATURE, 4); wadtbl->header.infotableofs = sizeof(wadtbl->header); wadtbl->header.numlumps = 0; @@ -1056,7 +1056,7 @@ if (demo_demoex_filename && *demo_demoex_filename) { - strncpy(demoex_filename, demo_demoex_filename, PATH_MAX); + strncpy(demoex_filename, demo_demoex_filename, PATH_MAX-1); } else { Modified: branches/prboom-plus-24/prboom2/src/r_drawflush.inl ============================================================================== --- branches/prboom-plus-24/prboom2/src/r_drawflush.inl Sun Dec 23 11:56:19 2018 (r4537) +++ branches/prboom-plus-24/prboom2/src/r_drawflush.inl Sun Dec 23 12:11:28 2018 (r4538) @@ -250,7 +250,7 @@ } #else #if (R_DRAWCOLUMN_PIPELINE_BITS == 8) - if ((sizeof(int) == 4) && (((int)source % 4) == 0) && (((int)dest % 4) == 0)) { + if ((sizeof(int) == 4) && (((intptr_t)source % 4) == 0) && (((intptr_t)dest % 4) == 0)) { while(--count >= 0) { *(int *)dest = *(int *)source; |
From: <web...@pr...> - 2018-12-23 11:56:32
|
Author: entryway Date: Sun Dec 23 11:56:19 2018 New Revision: 4537 Log: warnings (Fabian Greffrath) Modified: branches/prboom-plus-24/prboom2/src/d_deh.c Modified: branches/prboom-plus-24/prboom2/src/d_deh.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/d_deh.c Tue Dec 18 20:42:07 2018 (r4536) +++ branches/prboom-plus-24/prboom2/src/d_deh.c Sun Dec 23 11:56:19 2018 (r4537) @@ -1989,25 +1989,25 @@ } if (!deh_strcasecmp(key,deh_state[0])) // Sprite number { - if (fpout) fprintf(fpout," - sprite = %I64d\n",value); + if (fpout) fprintf(fpout," - sprite = %ld\n",(long)value); states[indexnum].sprite = (spritenum_t)value; } else if (!deh_strcasecmp(key,deh_state[1])) // Sprite subnumber { - if (fpout) fprintf(fpout," - frame = %I64d\n",value); + if (fpout) fprintf(fpout," - frame = %ld\n",(long)value); states[indexnum].frame = (long)value; // long } else if (!deh_strcasecmp(key,deh_state[2])) // Duration { - if (fpout) fprintf(fpout," - tics = %I64d\n",value); + if (fpout) fprintf(fpout," - tics = %ld\n",(long)value); states[indexnum].tics = (long)value; // long } else if (!deh_strcasecmp(key,deh_state[3])) // Next frame { - if (fpout) fprintf(fpout," - nextstate = %I64d\n",value); + if (fpout) fprintf(fpout," - nextstate = %ld\n",(long)value); states[indexnum].nextstate = (statenum_t)value; } else @@ -2019,13 +2019,13 @@ else if (!deh_strcasecmp(key,deh_state[5])) // Unknown 1 { - if (fpout) fprintf(fpout," - misc1 = %I64d\n",value); + if (fpout) fprintf(fpout," - misc1 = %ld\n",(long)value); states[indexnum].misc1 = (long)value; // long } else if (!deh_strcasecmp(key,deh_state[6])) // Unknown 2 { - if (fpout) fprintf(fpout," - misc2 = %I64d\n",value); + if (fpout) fprintf(fpout," - misc2 = %ld\n",(long)value); states[indexnum].misc2 = (long)value; // long } else @@ -2082,15 +2082,15 @@ if (value >= NUMSTATES) { if (fpout) - fprintf(fpout,"Bad pointer number %I64d of %d\n",value, NUMSTATES); + fprintf(fpout,"Bad pointer number %ld of %d\n",(long)value, NUMSTATES); return; } if (!deh_strcasecmp(key,deh_state[4])) // Codep frame (not set in Frame deh block) { states[indexnum].action = deh_codeptr[value]; - if (fpout) fprintf(fpout," - applied from codeptr[%I64d] to states[%d]\n", - value,indexnum); + if (fpout) fprintf(fpout," - applied from codeptr[%ld] to states[%d]\n", + (long)value,indexnum); // Write BEX-oriented line to match: // for (i=0;i<NUMSTATES;i++) could go past the end of the array for (i=0;i<sizeof(deh_bexptrs)/sizeof(*deh_bexptrs);i++) @@ -2106,8 +2106,8 @@ } } else - if (fpout) fprintf(fpout,"Invalid frame pointer index for '%s' at %I64d\n", - key, value); + if (fpout) fprintf(fpout,"Invalid frame pointer index for '%s' at %ld\n", + key, (long)value); } return; } @@ -2792,7 +2792,7 @@ // killough 11/98: allocate enough the first time maxstrlen = strlen(holdstring) + strlen(inbuffer); if (fpout) fprintf(fpout, - "* increased buffer from to %d for buffer size %d\n", + "* increased buffer from to %ld for buffer size %d\n", maxstrlen,(int)strlen(inbuffer)); holdstring = realloc(holdstring,maxstrlen*sizeof(*holdstring)); } |
From: <web...@pr...> - 2018-12-18 20:42:22
|
Author: entryway Date: Tue Dec 18 20:42:07 2018 New Revision: 4536 Log: gcc warnings (Fabian Greffrath) Modified: branches/prboom-plus-24/prboom2/src/MUSIC/dbopl.c branches/prboom-plus-24/prboom2/src/MUSIC/flplayer.c branches/prboom-plus-24/prboom2/src/d_deh.c branches/prboom-plus-24/prboom2/src/d_main.c branches/prboom-plus-24/prboom2/src/d_server.c branches/prboom-plus-24/prboom2/src/e6y.c branches/prboom-plus-24/prboom2/src/g_game.c branches/prboom-plus-24/prboom2/src/m_menu.c branches/prboom-plus-24/prboom2/src/p_ceilng.c branches/prboom-plus-24/prboom2/src/p_doors.c branches/prboom-plus-24/prboom2/src/p_floor.c branches/prboom-plus-24/prboom2/src/p_inter.c branches/prboom-plus-24/prboom2/src/p_lights.c branches/prboom-plus-24/prboom2/src/p_map.c branches/prboom-plus-24/prboom2/src/p_pspr.c branches/prboom-plus-24/prboom2/src/p_setup.c branches/prboom-plus-24/prboom2/src/p_sight.c branches/prboom-plus-24/prboom2/src/p_spec.c branches/prboom-plus-24/prboom2/src/st_stuff.c branches/prboom-plus-24/prboom2/src/wi_stuff.c Modified: branches/prboom-plus-24/prboom2/src/MUSIC/dbopl.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/MUSIC/dbopl.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/MUSIC/dbopl.c Tue Dec 18 20:42:07 2018 (r4536) @@ -457,6 +457,7 @@ if ( self->reg20 & MASK_SUSTAIN ) { return vol; } + // fallthrough //In sustain phase, but not sustaining, do regular release case RELEASE: vol += Operator__RateForward( self, self->releaseAdd );; Modified: branches/prboom-plus-24/prboom2/src/MUSIC/flplayer.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/MUSIC/flplayer.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/MUSIC/flplayer.c Tue Dec 18 20:42:07 2018 (r4536) @@ -109,10 +109,6 @@ { const char *filename; #ifdef _WIN32 - #ifndef _MSC_VER - DWORD WINAPI GetVersion (void); - #endif // _MSC_VER - if ((int)GetVersion() < 0) // win9x { lprintf (LO_INFO, "Fluidplayer: Win9x is not supported\n"); Modified: branches/prboom-plus-24/prboom2/src/d_deh.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/d_deh.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/d_deh.c Tue Dec 18 20:42:07 2018 (r4536) @@ -1989,25 +1989,25 @@ } if (!deh_strcasecmp(key,deh_state[0])) // Sprite number { - if (fpout) fprintf(fpout," - sprite = %lld\n",value); + if (fpout) fprintf(fpout," - sprite = %I64d\n",value); states[indexnum].sprite = (spritenum_t)value; } else if (!deh_strcasecmp(key,deh_state[1])) // Sprite subnumber { - if (fpout) fprintf(fpout," - frame = %lld\n",value); + if (fpout) fprintf(fpout," - frame = %I64d\n",value); states[indexnum].frame = (long)value; // long } else if (!deh_strcasecmp(key,deh_state[2])) // Duration { - if (fpout) fprintf(fpout," - tics = %lld\n",value); + if (fpout) fprintf(fpout," - tics = %I64d\n",value); states[indexnum].tics = (long)value; // long } else if (!deh_strcasecmp(key,deh_state[3])) // Next frame { - if (fpout) fprintf(fpout," - nextstate = %lld\n",value); + if (fpout) fprintf(fpout," - nextstate = %I64d\n",value); states[indexnum].nextstate = (statenum_t)value; } else @@ -2019,13 +2019,13 @@ else if (!deh_strcasecmp(key,deh_state[5])) // Unknown 1 { - if (fpout) fprintf(fpout," - misc1 = %lld\n",value); + if (fpout) fprintf(fpout," - misc1 = %I64d\n",value); states[indexnum].misc1 = (long)value; // long } else if (!deh_strcasecmp(key,deh_state[6])) // Unknown 2 { - if (fpout) fprintf(fpout," - misc2 = %lld\n",value); + if (fpout) fprintf(fpout," - misc2 = %I64d\n",value); states[indexnum].misc2 = (long)value; // long } else @@ -2082,14 +2082,14 @@ if (value >= NUMSTATES) { if (fpout) - fprintf(fpout,"Bad pointer number %lld of %d\n",value, NUMSTATES); + fprintf(fpout,"Bad pointer number %I64d of %d\n",value, NUMSTATES); return; } if (!deh_strcasecmp(key,deh_state[4])) // Codep frame (not set in Frame deh block) { states[indexnum].action = deh_codeptr[value]; - if (fpout) fprintf(fpout," - applied from codeptr[%lld] to states[%d]\n", + if (fpout) fprintf(fpout," - applied from codeptr[%I64d] to states[%d]\n", value,indexnum); // Write BEX-oriented line to match: // for (i=0;i<NUMSTATES;i++) could go past the end of the array @@ -2106,7 +2106,7 @@ } } else - if (fpout) fprintf(fpout,"Invalid frame pointer index for '%s' at %lld\n", + if (fpout) fprintf(fpout,"Invalid frame pointer index for '%s' at %I64d\n", key, value); } return; Modified: branches/prboom-plus-24/prboom2/src/d_main.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/d_main.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/d_main.c Tue Dec 18 20:42:07 2018 (r4536) @@ -2003,7 +2003,7 @@ { for (i=1;!done && i<33;i++) // Ty 09/13/98 - add use of !done { - sprintf(test,"MAP%02d",i); + snprintf(test,sizeof(test),"MAP%02d",i); ix = W_CheckNumForName(test); if (ix != -1) // Ty 10/04/98 avoid -1 subscript { @@ -2029,7 +2029,7 @@ { for (j=1;!done && j<10;j++) // Ty 09/13/98 - add use of !done { - sprintf(test,"E%dM%d",i,j); + snprintf(test,sizeof(test),"E%dM%d",i,j); ix = W_CheckNumForName(test); if (ix != -1) // Ty 10/04/98 avoid -1 subscript { Modified: branches/prboom-plus-24/prboom2/src/d_server.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/d_server.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/d_server.c Tue Dec 18 20:42:07 2018 (r4536) @@ -583,7 +583,8 @@ if (ingame && !curplayers) exit(0); // All players have exited } } - // Fall through and broadcast it + // fallthrough + // and broadcast it case PKT_EXTRA: BroadcastPacket(packet, len); if (packet->type == PKT_EXTRA) { Modified: branches/prboom-plus-24/prboom2/src/e6y.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/e6y.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/e6y.c Tue Dec 18 20:42:07 2018 (r4536) @@ -1265,7 +1265,9 @@ #ifdef _WIN32 #include <Mmsystem.h> +#ifndef __GNUC__ #pragma comment( lib, "winmm.lib" ) +#endif int mus_extend_volume; void I_midiOutSetVolumes(int volume) { Modified: branches/prboom-plus-24/prboom2/src/g_game.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/g_game.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/g_game.c Tue Dec 18 20:42:07 2018 (r4536) @@ -1612,11 +1612,12 @@ wminfo.next = 2; break; } + // fallthrough default: wminfo.next = gamemap; } - if (gamemission == pack_nerve && singleplayer && gamemap == 9) - wminfo.next = 4; + if (gamemission == pack_nerve && singleplayer && gamemap == 9) + wminfo.next = 4; } else { @@ -1718,6 +1719,7 @@ case 31: if (!secretexit) break; + // fallthrough case 6: case 11: case 20: @@ -3504,7 +3506,7 @@ compatibility_level = boom_201_compatibility; else compatibility_level = boom_compatibility_compatibility; - break; + break; case 202: //e6y: check for overrun if (CheckForOverrun(header_p, demo_p, size, 1, failonerror)) @@ -3514,7 +3516,7 @@ compatibility_level = boom_202_compatibility; else compatibility_level = boom_compatibility_compatibility; - break; + break; case 203: /* LxDoom or MBF - determine from signature * cph - load compatibility level */ Modified: branches/prboom-plus-24/prboom2/src/m_menu.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/m_menu.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/m_menu.c Tue Dec 18 20:42:07 2018 (r4536) @@ -6071,6 +6071,7 @@ // killough 2/21/98: Fix registered Doom help screen // killough 10/98: moved to second screen, moved up to the top ReadDef2.y = 15; + // fallthrough case shareware: // We need to remove the fourth episode. Modified: branches/prboom-plus-24/prboom2/src/p_ceilng.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_ceilng.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/p_ceilng.c Tue Dec 18 20:42:07 2018 (r4536) @@ -112,6 +112,7 @@ ceiling->sector->special = ceiling->newspecial; //jff 3/14/98 transfer old special field as well ceiling->sector->oldspecial = ceiling->oldspecial; + // fallthrough case genCeilingChg: ceiling->sector->ceilingpic = ceiling->texture; P_RemoveActiveCeiling(ceiling); @@ -120,6 +121,7 @@ // crushers reverse direction at the top case silentCrushAndRaise: S_StartSound((mobj_t *)&ceiling->sector->soundorg,sfx_pstop); + // fallthrough case genSilentCrusher: case genCrusher: case fastCrushAndRaise: @@ -176,8 +178,10 @@ // except generalized ones, reset speed, start back up case silentCrushAndRaise: S_StartSound((mobj_t *)&ceiling->sector->soundorg,sfx_pstop); + // fallthrough case crushAndRaise: ceiling->speed = CEILSPEED; + // fallthrough case fastCrushAndRaise: ceiling->direction = 1; break; @@ -189,6 +193,7 @@ ceiling->sector->special = ceiling->newspecial; //jff add to fix bug in special transfers from changes ceiling->sector->oldspecial = ceiling->oldspecial; + // fallthrough case genCeilingChg: ceiling->sector->ceilingpic = ceiling->texture; P_RemoveActiveCeiling(ceiling); @@ -305,6 +310,7 @@ case crushAndRaise: ceiling->crush = true; ceiling->topheight = sec->ceilingheight; + // fallthrough case lowerAndCrush: case lowerToFloor: ceiling->bottomheight = sec->floorheight; Modified: branches/prboom-plus-24/prboom2/src/p_doors.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_doors.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/p_doors.c Tue Dec 18 20:42:07 2018 (r4536) @@ -206,6 +206,7 @@ S_StartSound((mobj_t *)&door->sector->soundorg,sfx_bdopn); break; } + // fallthrough default: // other types bounce off the obstruction door->direction = 1; Modified: branches/prboom-plus-24/prboom2/src/p_floor.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_floor.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/p_floor.c Tue Dec 18 20:42:07 2018 (r4536) @@ -530,6 +530,7 @@ case raiseFloorCrush: floor->crush = true; + // fallthrough case raiseFloor: floor->direction = 1; floor->sector = sec; Modified: branches/prboom-plus-24/prboom2/src/p_inter.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_inter.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/p_inter.c Tue Dec 18 20:42:07 2018 (r4536) @@ -148,7 +148,7 @@ if (player->readyweapon == wp_fist || player->readyweapon == wp_pistol) if (player->weaponowned[wp_shotgun]) player->pendingweapon = wp_shotgun; - break; + break; case am_cell: if (player->readyweapon == wp_fist || player->readyweapon == wp_pistol) Modified: branches/prboom-plus-24/prboom2/src/p_lights.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_lights.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/p_lights.c Tue Dec 18 20:42:07 2018 (r4536) @@ -388,7 +388,7 @@ temp->lightlevel > tbright) tbright = temp->lightlevel; - sector->lightlevel = tbright; + sector->lightlevel = tbright; //jff 5/17/98 unless compatibility optioned //then maximum near ANY tagged sector Modified: branches/prboom-plus-24/prboom2/src/p_map.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_map.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/p_map.c Tue Dec 18 20:42:07 2018 (r4536) @@ -1587,7 +1587,7 @@ if (li->special) P_ShootSpecialLine (shootthing, li); - if (li->flags & ML_TWOSIDED) + if (li->flags & ML_TWOSIDED) { // crosses a two sided (really 2s) line P_LineOpening (li); dist = FixedMul(attackrange, in->frac); Modified: branches/prboom-plus-24/prboom2/src/p_pspr.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_pspr.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/p_pspr.c Tue Dec 18 20:42:07 2018 (r4536) @@ -190,6 +190,7 @@ case 1: if (!player->powers[pw_strength]) // allow chainsaw override break; + // fallthrough case 0: newweapon = wp_fist; break; Modified: branches/prboom-plus-24/prboom2/src/p_setup.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_setup.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/p_setup.c Tue Dec 18 20:42:07 2018 (r4536) @@ -1573,6 +1573,7 @@ { sd->skybox_index = R_BoxSkyboxNumForName(msd->toptexture); } + // fallthrough #endif default: // normal cases Modified: branches/prboom-plus-24/prboom2/src/p_sight.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_sight.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/p_sight.c Tue Dec 18 20:42:07 2018 (r4536) @@ -196,7 +196,7 @@ in = scan; } - if (!PTR_SightTraverse(in)) + if (!PTR_SightTraverse(in)) return false; // don't bother going farther in->frac = INT_MAX; } Modified: branches/prboom-plus-24/prboom2/src/p_spec.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_spec.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/p_spec.c Tue Dec 18 20:42:07 2018 (r4536) @@ -2949,6 +2949,7 @@ Add_Scroller(sc_floor, -dx, dy, control, s, accel); if (special != 253) break; + // fallthrough case 252: // carry objects on floor dx = FixedMul(dx,CARRYFACTOR); Modified: branches/prboom-plus-24/prboom2/src/st_stuff.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/st_stuff.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/st_stuff.c Tue Dec 18 20:42:07 2018 (r4536) @@ -928,7 +928,7 @@ { sprintf(namebuf, "STTNUM%d", i); R_SetPatchNum(&tallnum[i],namebuf); - sprintf(namebuf, "STYSNUM%d", i); + snprintf(namebuf, sizeof(namebuf), "STYSNUM%d", i); R_SetPatchNum(&shortnum[i],namebuf); } Modified: branches/prboom-plus-24/prboom2/src/wi_stuff.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/wi_stuff.c Mon Dec 17 19:47:41 2018 (r4535) +++ branches/prboom-plus-24/prboom2/src/wi_stuff.c Tue Dec 18 20:42:07 2018 (r4536) @@ -1897,7 +1897,7 @@ if (wbs->epsd != 1 || j != 8) { // animations - sprintf(name, "WIA%d%.2d%.2d", wbs->epsd, j, i); + snprintf(name, sizeof(name), "WIA%d%.2d%.2d", wbs->epsd, j, i); R_SetPatchNum(&a->p[i], name); } else |
From: <web...@pr...> - 2018-12-17 19:59:04
|
Author: entryway Date: Mon Dec 17 19:41:12 2018 New Revision: 4534 Log: fix some warnigs (Fabian Greffrath) Modified: branches/prboom-plus-24/prboom2/src/TEXTSCREEN/txt_sdl.c branches/prboom-plus-24/prboom2/src/am_map.c branches/prboom-plus-24/prboom2/src/p_pspr.h branches/prboom-plus-24/prboom2/src/p_setup.c Modified: branches/prboom-plus-24/prboom2/src/TEXTSCREEN/txt_sdl.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/TEXTSCREEN/txt_sdl.c Mon Dec 17 19:29:34 2018 (r4533) +++ branches/prboom-plus-24/prboom2/src/TEXTSCREEN/txt_sdl.c Mon Dec 17 19:41:12 2018 (r4534) @@ -900,7 +900,7 @@ } // On Windows, vsnprintf() is _vsnprintf(). -#ifdef _WIN32 +#ifdef _MSC_VER #if _MSC_VER < 1400 /* not needed for Visual Studio 2008 */ #define vsnprintf _vsnprintf #endif Modified: branches/prboom-plus-24/prboom2/src/am_map.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/am_map.c Mon Dec 17 19:29:34 2018 (r4533) +++ branches/prboom-plus-24/prboom2/src/am_map.c Mon Dec 17 19:41:12 2018 (r4534) @@ -2238,7 +2238,7 @@ { float dx = (float)(m_x2 - am_frame.centerx); float dy = (float)(m_y2 - am_frame.centery); - fixed_t r = (fixed_t)sqrt(dx * dx + dy * dy); + fixed_t r = M_DoubleToInt(sqrt(dx * dx + dy * dy)); am_frame.bbox[BOXLEFT] = am_frame.centerx - r; am_frame.bbox[BOXRIGHT] = am_frame.centerx + r; Modified: branches/prboom-plus-24/prboom2/src/p_pspr.h ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_pspr.h Mon Dec 17 19:29:34 2018 (r4533) +++ branches/prboom-plus-24/prboom2/src/p_pspr.h Mon Dec 17 19:41:12 2018 (r4534) @@ -82,7 +82,7 @@ fixed_t sy; } pspdef_t; -typedef enum +enum { CENTERWEAPON_OFF, CENTERWEAPON_HOR, Modified: branches/prboom-plus-24/prboom2/src/p_setup.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_setup.c Mon Dec 17 19:29:34 2018 (r4533) +++ branches/prboom-plus-24/prboom2/src/p_setup.c Mon Dec 17 19:41:12 2018 (r4534) @@ -2293,10 +2293,12 @@ int i; for (i=0; i<numsegs; i++) { + double length; seg_t *li = segs+i; int_64_t dx = (int_64_t)li->v2->px - li->v1->px; int_64_t dy = (int_64_t)li->v2->py - li->v1->py; - li->length = (int_64_t)sqrt((double)dx*dx + (double)dy*dy); + length = sqrt((double)dx*dx + (double)dy*dy); + li->length = (int_64_t)length; // [crispy] re-calculate angle used for rendering li->pangle = R_PointToAngleEx2(li->v1->px, li->v1->py, li->v2->px, li->v2->py); } |
From: <web...@pr...> - 2018-12-17 19:58:56
|
Author: entryway Date: Mon Dec 17 19:29:34 2018 New Revision: 4533 Log: TCP/IP -> UDP Modified: branches/prboom-plus-24/prboom2/doc/README.command-line branches/prboom-plus-24/prboom2/doc/prboom-plus-game-server.6 branches/prboom-plus-24/prboom2/doc/prboom-plus.6 Modified: branches/prboom-plus-24/prboom2/doc/README.command-line ============================================================================== --- branches/prboom-plus-24/prboom2/doc/README.command-line Mon Jan 15 09:49:48 2018 (r4532) +++ branches/prboom-plus-24/prboom2/doc/README.command-line Mon Dec 17 19:29:34 2018 (r4533) @@ -385,7 +385,7 @@ DESCRIPTION PrBoom is a version of the 3D shoot'em'up Doom, originally by id soft- ware. It includes, amongst other things, the ability to play with sev- - eral players connected by a tcp/ip network. prboom-game-server is the + eral players connected by a udp network. prboom-game-server is the `server', that is the program that passes data between the different players in the game. @@ -586,7 +586,7 @@ Multiplayer Options -net hostname[:port] - Specifies that a TCP/IP network game is to be started. hostname + Specifies that a UDP network game is to be started. hostname is the name of the machine on which the network game server is running (prboom-game-server). For more information about this, see prboom-game-server(6) and the README that came with prboom. Modified: branches/prboom-plus-24/prboom2/doc/prboom-plus-game-server.6 ============================================================================== --- branches/prboom-plus-24/prboom2/doc/prboom-plus-game-server.6 Mon Jan 15 09:49:48 2018 (r4532) +++ branches/prboom-plus-24/prboom2/doc/prboom-plus-game-server.6 Mon Dec 17 19:29:34 2018 (r4533) @@ -18,7 +18,7 @@ .B PrBoom+ is a Doom source port developed from the original PrBoom project. It includes, amongst other things, the ability to play with several players -connected by a TCP/IP network. +connected by a UDP network. .PP To start a network game (often abbreviated to `netgame'), first the server is started. \fBprboom-plus-game-server\fP accepts various parameters to control Modified: branches/prboom-plus-24/prboom2/doc/prboom-plus.6 ============================================================================== --- branches/prboom-plus-24/prboom2/doc/prboom-plus.6 Mon Jan 15 09:49:48 2018 (r4532) +++ branches/prboom-plus-24/prboom2/doc/prboom-plus.6 Mon Dec 17 19:29:34 2018 (r4533) @@ -185,7 +185,7 @@ .SH MULTIPLAYER OPTIONS .TP \fB\-net\fP \fIhostname\fR[:\fIport\fR] -Specifies that a TCP/IP network game is to be started. \fIhostname\fR is +Specifies that a UDP network game is to be started. \fIhostname\fR is the name of the machine on which the network game server is running (\fBprboom-plus-game-server\fP). For more information about this, see .BR prboom-plus-game-server (6) |
From: <web...@pr...> - 2018-12-17 19:47:51
|
Author: entryway Date: Mon Dec 17 19:47:41 2018 New Revision: 4535 Log: support for building against recent libdumb releases (Fabian Greffrath) Modified: branches/prboom-plus-24/prboom2/src/MUSIC/dumbplayer.c Modified: branches/prboom-plus-24/prboom2/src/MUSIC/dumbplayer.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/MUSIC/dumbplayer.c Mon Dec 17 19:41:12 2018 (r4534) +++ branches/prboom-plus-24/prboom2/src/MUSIC/dumbplayer.c Mon Dec 17 19:47:41 2018 (r4535) @@ -65,6 +65,10 @@ #else // HAVE_DUMB +#if !defined(_FILE_OFFSET_BITS) || (_FILE_OFFSET_BITS < 64) +#define DUMB_OFF_T_CUSTOM off64_t +#endif + #include <dumb.h> #include <string.h> #include "lprintf.h" @@ -135,7 +139,11 @@ { dumbfile_close (dfil); dfil = dumbfile_open_memory (data, len); +#if (DUMB_MAJOR_VERSION >= 1) + duh = dumb_read_mod_quick (dfil, DUMB_MOD_RESTRICT_OLD_PATTERN_COUNT); +#else duh = dumb_read_mod_quick (dfil); +#endif // No way to get the filename, so we can't check for a .mod extension, and // therefore, trying to load an old 15-instrument SoundTracker module is not // safe. We'll restrict MOD loading to 31-instrument modules with known |
From: <web...@pr...> - 2018-01-15 10:31:33
|
Author: entryway Date: Mon Jan 15 09:49:48 2018 New Revision: 4532 Log: - MUSINFO: add support for music numbers 1-64 inclusive - MUSINFO: music number 0 plays the map's default music Fabian Greffrath Modified: branches/prboom-plus-24/prboom2/src/p_mobj.c branches/prboom-plus-24/prboom2/src/s_advsound.c branches/prboom-plus-24/prboom2/src/s_advsound.h branches/prboom-plus-24/prboom2/src/s_sound.c Modified: branches/prboom-plus-24/prboom2/src/p_mobj.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_mobj.c Sun Nov 19 21:06:20 2017 (r4531) +++ branches/prboom-plus-24/prboom2/src/p_mobj.c Mon Jan 15 09:49:48 2018 (r4532) @@ -1381,7 +1381,7 @@ !(options & MTF_HARD) : !(options & MTF_NORMAL)) return NULL; - if (thingtype >= 14101 && thingtype <= 14164) + if (thingtype >= 14100 && thingtype <= 14164) { // Use the ambient number iden_num = thingtype - 14100; // Mus change Modified: branches/prboom-plus-24/prboom2/src/s_advsound.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/s_advsound.c Sun Nov 19 21:06:20 2017 (r4531) +++ branches/prboom-plus-24/prboom2/src/s_advsound.c Mon Jan 15 09:49:48 2018 (r4532) @@ -59,11 +59,6 @@ // void S_ParseMusInfo(const char *mapid) { - memset(&musinfo, 0, sizeof(musinfo)); - musinfo.current_item = -1; - - S_music[NUMMUSIC].lumpnum = -1; - if (W_CheckNumForName("MUSINFO") != -1) { int num, lumpnum; @@ -106,7 +101,7 @@ } else { - lprintf(LO_ERROR, "S_ParseMusInfo: Number not in range 1 to %d", MAX_MUS_ENTRIES); + lprintf(LO_ERROR, "S_ParseMusInfo: Number not in range 1 to %d", MAX_MUS_ENTRIES - 1); } } } Modified: branches/prboom-plus-24/prboom2/src/s_advsound.h ============================================================================== --- branches/prboom-plus-24/prboom2/src/s_advsound.h Sun Nov 19 21:06:20 2017 (r4531) +++ branches/prboom-plus-24/prboom2/src/s_advsound.h Mon Jan 15 09:49:48 2018 (r4532) @@ -44,7 +44,7 @@ //MUSINFO lump // -#define MAX_MUS_ENTRIES 64 +#define MAX_MUS_ENTRIES 65 typedef struct musinfo_s { Modified: branches/prboom-plus-24/prboom2/src/s_sound.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/s_sound.c Sun Nov 19 21:06:20 2017 (r4531) +++ branches/prboom-plus-24/prboom2/src/s_sound.c Mon Jan 15 09:49:48 2018 (r4532) @@ -215,6 +215,10 @@ else mnum = spmus[gamemap-1]; } + + memset(&musinfo, 0, sizeof(musinfo)); + musinfo.items[0] = -1; + S_ChangeMusic(mnum, true); } @@ -532,6 +536,13 @@ mus_playing = music; musinfo.current_item = -1; + + // [crispy] MUSINFO value 0 is reserved for the map's default music + if (musinfo.items[0] == -1) + { + musinfo.items[0] = music->lumpnum; + S_music[NUMMUSIC].lumpnum = -1; + } } void S_RestartMusic(void) |
From: <web...@pr...> - 2017-11-19 21:06:28
|
Author: rjy Date: Sun Nov 19 21:06:17 2017 New Revision: 4530 Log: src/Makefile.am: sort file lists, one per line The original tabular layout had become eroded over the years as files were added/removed/renamed. Also it is easier to make changes this way. Modified: branches/prboom-plus-24/prboom2/src/Makefile.am Modified: branches/prboom-plus-24/prboom2/src/Makefile.am ============================================================================== --- branches/prboom-plus-24/prboom2/src/Makefile.am Sat Nov 18 19:13:28 2017 (r4529) +++ branches/prboom-plus-24/prboom2/src/Makefile.am Sun Nov 19 21:06:17 2017 (r4530) @@ -18,58 +18,189 @@ CFLAGS = @CFLAGS@ @SDL_CFLAGS@ -prboom_plus_game_server_SOURCES = d_server.c protocol.h -prboom_plus_game_server_LDADD = POSIX/libposixdoom.a SDL/i_network.o @NET_LIBS@ @SDL_LIBS@ COMMON_SRC = \ - am_map.c g_game.c p_maputl.h r_plane.h \ - am_map.h g_game.h p_mobj.c r_demo.c r_segs.c \ - hu_lib.c lprintf.c p_mobj.h r_demo.h r_segs.h \ - hu_lib.h lprintf.h p_plats.c r_sky.c \ - d_deh.c hu_stuff.c m_argv.c p_pspr.c r_sky.h \ - d_deh.h hu_stuff.h m_argv.h p_pspr.h r_state.h \ - d_englsh.h i_joy.h m_bbox.c p_saveg.c r_things.c \ - d_event.h m_bbox.h p_saveg.h r_things.h \ - d_items.c i_network.h m_cheat.c p_setup.c s_sound.c \ - d_items.h i_sound.h m_cheat.h p_setup.h s_sound.h \ - d_main.c i_system.h m_fixed.h p_sight.c sounds.c \ - d_main.h i_video.h m_menu.c p_spec.c sounds.h \ - info.c m_menu.h p_spec.h st_lib.c \ - d_net.h info.h m_misc.c p_switch.c st_lib.h \ - d_player.h m_misc.h p_telept.c st_stuff.c \ - m_random.c p_tick.c st_stuff.h i_main.h \ - d_think.h m_random.h p_tick.h tables.c \ - d_ticcmd.h m_swap.h p_user.c tables.h \ - doomdata.h p_ceilng.c p_user.h v_video.c \ - doomdef.c p_doors.c protocol.h v_video.h \ - doomdef.h p_enemy.c r_bsp.c version.c \ - doomstat.c p_enemy.h r_bsp.h version.h \ - doomstat.h p_floor.c r_data.c w_wad.c \ - doomtype.h p_genlin.c r_data.h w_wad.h \ - dstrings.c p_inter.c r_defs.h wi_stuff.c \ - dstrings.h p_inter.h r_draw.c wi_stuff.h \ - f_finale.c p_lights.c r_draw.h z_bmalloc.c \ - f_finale.h p_map.c r_main.c z_bmalloc.h \ - f_wipe.c p_map.h r_main.h z_zone.c \ - f_wipe.h p_maputl.c r_plane.c z_zone.h \ - md5.c md5.h p_checksum.h p_checksum.c \ - r_patch.c r_patch.h r_fps.c r_fps.h \ - r_filter.c r_filter.h \ - e6y.c e6y.h \ - i_pcsound.c i_pcsound.h \ - g_overflow.c g_overflow.h hu_tracers.c hu_tracers.h \ - s_advsound.c s_advsound.h i_capture.c i_capture.h \ - sc_man.c sc_man.h + am_map.c \ + am_map.h \ + d_deh.c \ + d_deh.h \ + d_englsh.h \ + d_event.h \ + d_items.c \ + d_items.h \ + d_main.c \ + d_main.h \ + d_net.h \ + d_player.h \ + d_think.h \ + d_ticcmd.h \ + doomdata.h \ + doomdef.c \ + doomdef.h \ + doomstat.c \ + doomstat.h \ + doomtype.h \ + dstrings.c \ + dstrings.h \ + e6y.c \ + e6y.h \ + f_finale.c \ + f_finale.h \ + f_wipe.c \ + f_wipe.h \ + g_game.c \ + g_game.h \ + g_overflow.c \ + g_overflow.h \ + hu_lib.c \ + hu_lib.h \ + hu_stuff.c \ + hu_stuff.h \ + hu_tracers.c \ + hu_tracers.h \ + i_capture.c \ + i_capture.h \ + i_joy.h \ + i_main.h \ + i_network.h \ + i_pcsound.c \ + i_pcsound.h \ + i_sound.h \ + i_system.h \ + i_video.h \ + info.c \ + info.h \ + lprintf.c \ + lprintf.h \ + m_argv.c \ + m_argv.h \ + m_bbox.c \ + m_bbox.h \ + m_cheat.c \ + m_cheat.h \ + m_fixed.h \ + m_menu.c \ + m_menu.h \ + m_misc.c \ + m_misc.h \ + m_random.c \ + m_random.h \ + m_swap.h \ + md5.c \ + md5.h \ + p_ceilng.c \ + p_checksum.c \ + p_checksum.h \ + p_doors.c \ + p_enemy.c \ + p_enemy.h \ + p_floor.c \ + p_genlin.c \ + p_inter.c \ + p_inter.h \ + p_lights.c \ + p_map.c \ + p_map.h \ + p_maputl.c \ + p_maputl.h \ + p_mobj.c \ + p_mobj.h \ + p_plats.c \ + p_pspr.c \ + p_pspr.h \ + p_saveg.c \ + p_saveg.h \ + p_setup.c \ + p_setup.h \ + p_sight.c \ + p_spec.c \ + p_spec.h \ + p_switch.c \ + p_telept.c \ + p_tick.c \ + p_tick.h \ + p_user.c \ + p_user.h \ + protocol.h \ + r_bsp.c \ + r_bsp.h \ + r_data.c \ + r_data.h \ + r_defs.h \ + r_demo.c \ + r_demo.h \ + r_draw.c \ + r_draw.h \ + r_filter.c \ + r_filter.h \ + r_fps.c \ + r_fps.h \ + r_main.c \ + r_main.h \ + r_patch.c \ + r_patch.h \ + r_plane.c \ + r_plane.h \ + r_segs.c \ + r_segs.h \ + r_sky.c \ + r_sky.h \ + r_state.h \ + r_things.c \ + r_things.h \ + s_advsound.c \ + s_advsound.h \ + s_sound.c \ + s_sound.h \ + sc_man.c \ + sc_man.h \ + sounds.c \ + sounds.h \ + st_lib.c \ + st_lib.h \ + st_stuff.c \ + st_stuff.h \ + tables.c \ + tables.h \ + v_video.c \ + v_video.h \ + version.c \ + version.h \ + w_wad.c \ + w_wad.h \ + wi_stuff.c \ + wi_stuff.h \ + z_bmalloc.c \ + z_bmalloc.h \ + z_zone.c \ + z_zone.h NET_CLIENT_SRC = d_client.c if BUILD_GL USE_GL_SRC = \ - gl_opengl.c gl_opengl.h \ - gl_detail.c gl_intern.h gl_main.c gl_struct.h gl_texture.c gl_vertex.c \ - gl_wipe.c gl_hires.c gl_clipper.c gl_gamma.c gl_missingtexture.c gl_light.c \ - gl_hqresize.c gl_sky.c gl_fbo.c gl_shadow.c gl_map.c \ - gl_preprocess.c gl_drawinfo.c gl_shader.c + gl_clipper.c \ + gl_detail.c \ + gl_drawinfo.c \ + gl_fbo.c \ + gl_gamma.c \ + gl_hires.c \ + gl_hqresize.c \ + gl_intern.h \ + gl_light.c \ + gl_main.c \ + gl_map.c \ + gl_missingtexture.c \ + gl_opengl.c \ + gl_opengl.h \ + gl_preprocess.c \ + gl_shader.c \ + gl_shadow.c \ + gl_sky.c \ + gl_struct.h \ + gl_texture.c \ + gl_vertex.c \ + gl_wipe.c else USE_GL_SRC = endif @@ -80,10 +211,43 @@ WAD_SRC = w_memcache.c endif -MUS2MID_SRC = memio.c memio.h mus2mid.c mus2mid.h - -prboom_plus_SOURCES = $(COMMON_SRC) $(NET_CLIENT_SRC) $(USE_GL_SRC) $(WAD_SRC) $(MUS2MID_SRC) -prboom_plus_LDADD = SDL/libsdldoom.a PCSOUND/libpcsound.a TEXTSCREEN/libtextscreen.a MUSIC/libdoommusic.a @MIXER_LIBS@ @NET_LIBS@ @SDL_LIBS@ @GL_LIBS@ @MATH_LIB@ +MUS2MID_SRC = \ + memio.c \ + memio.h \ + mus2mid.c \ + mus2mid.h + +prboom_plus_SOURCES = \ + $(COMMON_SRC) \ + $(NET_CLIENT_SRC) \ + $(USE_GL_SRC) \ + $(WAD_SRC) \ + $(MUS2MID_SRC) + +prboom_plus_LDADD = \ + SDL/libsdldoom.a \ + PCSOUND/libpcsound.a \ + TEXTSCREEN/libtextscreen.a \ + MUSIC/libdoommusic.a \ + @MIXER_LIBS@ \ + @NET_LIBS@ \ + @SDL_LIBS@ \ + @GL_LIBS@ \ + @MATH_LIB@ + +prboom_plus_game_server_SOURCES = \ + d_server.c \ + protocol.h + +prboom_plus_game_server_LDADD = \ + POSIX/libposixdoom.a \ + SDL/i_network.o \ + @NET_LIBS@ \ + @SDL_LIBS@ EXTRA_DIST = \ - r_drawcolumn.inl r_drawflush.inl r_drawspan.inl r_drawcolpipeline.inl icon.c + r_drawcolpipeline.inl \ + r_drawcolumn.inl \ + r_drawflush.inl \ + r_drawspan.inl \ + icon.c |
From: <web...@pr...> - 2017-11-19 21:06:27
|
Author: rjy Date: Sun Nov 19 21:06:20 2017 New Revision: 4531 Log: src/Makefile.am: compile r_draw.c first, speed up parallel build r_draw.c takes considerably longer to compile than all other modules, due to all the macro expansion. Thus starting it as early as possible significantly reduces the time to complete a full rebuild in parallel. (I observed a reduction from 10.3 to 7.9 seconds on my current machine.) Modified: branches/prboom-plus-24/prboom2/src/Makefile.am Modified: branches/prboom-plus-24/prboom2/src/Makefile.am ============================================================================== --- branches/prboom-plus-24/prboom2/src/Makefile.am Sun Nov 19 21:06:17 2017 (r4530) +++ branches/prboom-plus-24/prboom2/src/Makefile.am Sun Nov 19 21:06:20 2017 (r4531) @@ -18,8 +18,13 @@ CFLAGS = @CFLAGS@ @SDL_CFLAGS@ +# r_draw.c takes considerably longer to compile than all other modules, +# due to all the macro expansion. Thus starting it as early as possible +# significantly reduces the time to complete a full rebuild in parallel. COMMON_SRC = \ + r_draw.c \ + r_draw.h \ am_map.c \ am_map.h \ d_deh.c \ @@ -129,8 +134,6 @@ r_defs.h \ r_demo.c \ r_demo.h \ - r_draw.c \ - r_draw.h \ r_filter.c \ r_filter.h \ r_fps.c \ |
From: <web...@pr...> - 2017-11-18 19:54:22
|
Author: rjy Date: Sat Nov 18 19:13:28 2017 New Revision: 4529 Log: comperr_freeaim: override autoaim With this turning on the "Allow Vertical Aiming" option disables autoaim for bullet and missile player weapons. I think this is what most players will expect, that with vertical aiming they have full control over where to put their shots without Doom's autoaim interfering at all. Requested by OldManRage on Doomworld: https://www.doomworld.com/vb/post/1817858 Note this does not apply to BFG tracers or melee attacks (fist/chainsaw) Modified: branches/prboom-plus-24/prboom2/src/p_mobj.c branches/prboom-plus-24/prboom2/src/p_pspr.c Modified: branches/prboom-plus-24/prboom2/src/p_mobj.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_mobj.c Mon Sep 18 07:40:58 2017 (r4528) +++ branches/prboom-plus-24/prboom2/src/p_mobj.c Sat Nov 18 19:13:28 2017 (r4529) @@ -1611,6 +1611,9 @@ angle_t an = source->angle; // killough 7/19/98: autoaiming was not in original beta + if (comperr(comperr_freeaim)) + slope = finetangent[(ANG90 - source->pitch) >> ANGLETOFINESHIFT]; + else { // killough 8/2/98: prefer autoaiming at enemies uint_64_t mask = mbf_features ? MF_FRIEND : 0; @@ -1626,9 +1629,6 @@ an = source->angle, slope = 0; } while (mask && (mask=0, !linetarget)); // killough 8/2/98 - - if (!linetarget && comperr(comperr_freeaim)) - slope = finetangent[(ANG90 - source->pitch) >> ANGLETOFINESHIFT]; } x = source->x; Modified: branches/prboom-plus-24/prboom2/src/p_pspr.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_pspr.c Mon Sep 18 07:40:58 2017 (r4528) +++ branches/prboom-plus-24/prboom2/src/p_pspr.c Sat Nov 18 19:13:28 2017 (r4529) @@ -729,6 +729,10 @@ { angle_t an = mo->angle; // see which target is to be aimed at + if (comperr(comperr_freeaim)) + bulletslope = finetangent[(ANG90 - mo->pitch) >> ANGLETOFINESHIFT]; + else + { /* killough 8/2/98: make autoaiming prefer enemies */ uint_64_t mask = mbf_features ? MF_FRIEND : 0; @@ -741,9 +745,7 @@ bulletslope = P_AimLineAttack(mo, an -= 2<<26, 16*64*FRACUNIT, mask); } while (mask && (mask=0, !linetarget)); /* killough 8/2/98 */ - - if (!linetarget && comperr(comperr_freeaim)) - bulletslope = finetangent[(ANG90 - mo->pitch) >> ANGLETOFINESHIFT]; + } } // |
From: <web...@pr...> - 2017-09-18 07:41:16
|
Author: entryway Date: Mon Sep 18 07:40:58 2017 New Revision: 4528 Log: Allow for reproducible builds https://reproducible-builds.org/ Fabian Greffrath Modified: branches/prboom-plus-24/prboom2/configure.ac branches/prboom-plus-24/prboom2/src/version.c Modified: branches/prboom-plus-24/prboom2/configure.ac ============================================================================== --- branches/prboom-plus-24/prboom2/configure.ac Sun Sep 10 11:58:52 2017 (r4527) +++ branches/prboom-plus-24/prboom2/configure.ac Mon Sep 18 07:40:58 2017 (r4528) @@ -263,5 +263,14 @@ AC_SUBST(CFLAGS) AC_SUBST(DOOMWADDIR) +dnl --- https://reproducible-builds.org/specs/source-date-epoch/ +SOURCE_DATE_EPOCH="${SOURCE_DATE_EPOCH:-$(date +%s)}" +DATE_FMT="%Y-%m-%d" +BUILD_DATE=$(date -u -d "@$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$DATE_FMT" 2>/dev/null || date -u "+$DATE_FMT") +AC_DEFINE_UNQUOTED(BUILD_DATE,"$BUILD_DATE",[Define the build date for reproducible builds]) +TIME_FMT="%H:%M:%S" +BUILD_TIME=$(date -u -d "@$SOURCE_DATE_EPOCH" "+$TIME_FMT" 2>/dev/null || date -u -r "$SOURCE_DATE_EPOCH" "+$TIME_FMT" 2>/dev/null || date -u "+$TIME_FMT") +AC_DEFINE_UNQUOTED(BUILD_TIME,"$BUILD_TIME",[Define the build time for reproducible builds]) + dnl --- output AC_OUTPUT(Makefile src/Makefile src/POSIX/Makefile src/SDL/Makefile src/MAC/Makefile src/PCSOUND/Makefile src/TEXTSCREEN/Makefile src/MUSIC/Makefile doc/Makefile data/Makefile ICONS/Makefile VisualC6/Makefile VisualC8/Makefile prboom.spec) Modified: branches/prboom-plus-24/prboom2/src/version.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/version.c Sun Sep 10 11:58:52 2017 (r4527) +++ branches/prboom-plus-24/prboom2/src/version.c Mon Sep 18 07:40:58 2017 (r4528) @@ -33,6 +33,15 @@ */ +#include "doomdef.h" #include "version.h" -const char version_date[] = __DATE__ " " __TIME__; +#ifndef BUILD_DATE +#define BUILD_DATE __DATE__ +#endif + +#ifndef BUILD_TIME +#define BUILD_TIME __TIME__ +#endif + +const char version_date[] = BUILD_DATE " " BUILD_TIME; |
From: <web...@pr...> - 2017-09-10 12:24:19
|
Author: entryway Date: Sun Sep 10 11:58:52 2017 New Revision: 4527 Log: changing resolution on the fly does not destroy current window Modified: branches/prboom-plus-24/prboom2/src/SDL/i_video.c Modified: branches/prboom-plus-24/prboom2/src/SDL/i_video.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/SDL/i_video.c Thu May 18 16:46:31 2017 (r4526) +++ branches/prboom-plus-24/prboom2/src/SDL/i_video.c Sun Sep 10 11:58:52 2017 (r4527) @@ -1130,7 +1130,7 @@ { int init_flags = 0; - if(screen) + if(sdl_window) { // video capturing cannot be continued with new screen settings I_CaptureFinish(); |
From: <web...@pr...> - 2017-05-18 16:46:38
|
Author: entryway Date: Thu May 18 16:46:31 2017 New Revision: 4526 Log: removed "Two-key strafe50: StrafeOn + MoveLR = strafe50" feature Modified: branches/prboom-plus-24/prboom2/src/g_game.c Modified: branches/prboom-plus-24/prboom2/src/g_game.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/g_game.c Thu May 18 16:44:37 2017 (r4525) +++ branches/prboom-plus-24/prboom2/src/g_game.c Thu May 18 16:46:31 2017 (r4526) @@ -530,17 +530,9 @@ if (joyymove > 0) forward -= forwardmove[speed]; if (gamekeydown[key_straferight] || joybuttons[joybstraferight]) - { side += sidemove[speed]; - if (strafe) // Two-key strafe50 - side += sidemove[speed]; - } if (gamekeydown[key_strafeleft] || joybuttons[joybstrafeleft]) - { side -= sidemove[speed]; - if (strafe) // Two-key strafe50 - side -= sidemove[speed]; - } // buttons cmd->chatchar = HU_dequeueChatChar(); |
From: <web...@pr...> - 2017-05-18 16:44:47
|
Author: entryway Date: Thu May 18 16:44:37 2017 New Revision: 4525 Log: removed "strafe 50 on turns" feature Modified: branches/prboom-plus-24/prboom2/src/e6y.c branches/prboom-plus-24/prboom2/src/e6y.h branches/prboom-plus-24/prboom2/src/g_game.c branches/prboom-plus-24/prboom2/src/m_menu.c branches/prboom-plus-24/prboom2/src/m_misc.c Modified: branches/prboom-plus-24/prboom2/src/e6y.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/e6y.c Wed May 10 07:28:30 2017 (r4524) +++ branches/prboom-plus-24/prboom2/src/e6y.c Thu May 18 16:44:37 2017 (r4525) @@ -132,7 +132,6 @@ int hudadd_crosshair_lock_target; int movement_strafe50; int movement_shorttics; -int movement_strafe50onturns; int movement_mouselook; int movement_mouseinvert; int movement_maxviewpitch; Modified: branches/prboom-plus-24/prboom2/src/e6y.h ============================================================================== --- branches/prboom-plus-24/prboom2/src/e6y.h Wed May 10 07:28:30 2017 (r4524) +++ branches/prboom-plus-24/prboom2/src/e6y.h Thu May 18 16:44:37 2017 (r4525) @@ -120,7 +120,6 @@ extern int hudadd_crosshair_lock_target; extern int movement_strafe50; extern int movement_shorttics; -extern int movement_strafe50onturns; extern int movement_mouselook; extern int movement_mouseinvert; extern int movement_maxviewpitch; Modified: branches/prboom-plus-24/prboom2/src/g_game.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/g_game.c Wed May 10 07:28:30 2017 (r4524) +++ branches/prboom-plus-24/prboom2/src/g_game.c Thu May 18 16:44:37 2017 (r4525) @@ -371,7 +371,6 @@ } else { - movement_strafe50onturns = false; sidemove[0] = sidemove_normal[0]; sidemove[1] = sidemove_normal[1]; } @@ -722,21 +721,13 @@ //e6y if (movement_strafe50) { - if (!speed) + if(!strafe && cmd->angleturn) { - if (side > sidemove_strafe50[0]) - side = sidemove_strafe50[0]; - else if (side < -sidemove_strafe50[0]) - side = -sidemove_strafe50[0]; - } - else if(!movement_strafe50onturns && !strafe && cmd->angleturn) - { - if (side > sidemove_normal[1]) - side = sidemove_normal[1]; - else if (side < -sidemove_normal[1]) - side = -sidemove_normal[1]; + if (side > sidemove_normal[speed]) + side = sidemove_normal[speed]; + else if (side < -sidemove_normal[speed]) + side = -sidemove_normal[speed]; } - } cmd->forwardmove += fudgef((signed char)forward); Modified: branches/prboom-plus-24/prboom2/src/m_menu.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/m_menu.c Wed May 10 07:28:30 2017 (r4524) +++ branches/prboom-plus-24/prboom2/src/m_menu.c Thu May 18 16:44:37 2017 (r4525) @@ -3158,7 +3158,6 @@ {"Movements", S_SKIP|S_TITLE,m_null,G_X, G_Y+7*8}, {"Permanent Strafe50", S_YESNO, m_null, G_X, G_Y+ 8*8, {"movement_strafe50"}, 0, 0, M_ChangeSpeed}, - {"Strafe50 On Turns", S_YESNO, m_null, G_X, G_Y+ 9*8, {"movement_strafe50onturns"}, 0, 0, M_ChangeSpeed}, {"Mouse", S_SKIP|S_TITLE,m_null, G_X, G_Y+11*8}, {"Dbl-Click As Use", S_YESNO, m_null, G_X, G_Y+12*8, {"mouse_doubleclick_as_use"}}, Modified: branches/prboom-plus-24/prboom2/src/m_misc.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/m_misc.c Wed May 10 07:28:30 2017 (r4524) +++ branches/prboom-plus-24/prboom2/src/m_misc.c Thu May 18 16:44:37 2017 (r4525) @@ -947,8 +947,6 @@ {"Prboom-plus game settings",{NULL},{0},UL,UL,def_none,ss_none}, {"movement_strafe50", {&movement_strafe50}, {0},0,1, def_bool,ss_stat}, - {"movement_strafe50onturns", {&movement_strafe50onturns}, {0},0,1, - def_bool,ss_stat}, {"movement_shorttics", {&movement_shorttics}, {0},0,1, def_bool,ss_stat}, {"interpolation_maxobjects", {&interpolation_maxobjects}, {0},0,UL, |
From: <web...@pr...> - 2017-05-10 07:28:40
|
Author: entryway Date: Wed May 10 07:28:30 2017 New Revision: 4524 Log: menu items not highlighted in chex/hacx mode (Fabian Greffrath) Modified: branches/prboom-plus-24/prboom2/src/v_video.c Modified: branches/prboom-plus-24/prboom2/src/v_video.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/v_video.c Fri May 5 05:29:17 2017 (r4523) +++ branches/prboom-plus-24/prboom2/src/v_video.c Wed May 10 07:28:30 2017 (r4524) @@ -41,6 +41,7 @@ #include "SDL.h" #include "doomdef.h" +#include "doomstat.h" #include "r_main.h" #include "r_draw.h" #include "m_bbox.h" @@ -185,7 +186,21 @@ { register const crdef_t *p; for (p=crdefs; p->name; p++) + { *p->map = W_CacheLumpName(p->name); + if (p - crdefs == CR_DEFAULT) + continue; + if (gamemission == chex || gamemission == hacx) + { + byte *temp = malloc(256); + memcpy (temp, *p->map, 256); + if (gamemission == chex) + memcpy (temp+112, *p->map+176, 16); // green range + else if (gamemission == hacx) + memcpy (temp+192, *p->map+176, 16); // blue range + *p->map = temp; + } + } } // |
From: <web...@pr...> - 2017-05-05 05:29:26
|
Author: entryway Date: Fri May 5 05:29:17 2017 New Revision: 4523 Log: removed "smoothen Chainsaw idle animation" part of r4521 Modified: branches/prboom-plus-24/prboom2/src/r_things.c Modified: branches/prboom-plus-24/prboom2/src/r_things.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/r_things.c Thu May 4 20:12:49 2017 (r4522) +++ branches/prboom-plus-24/prboom2/src/r_things.c Fri May 5 05:29:17 2017 (r4523) @@ -938,7 +938,6 @@ fixed_t topoffset; fixed_t psp_sx = psp->sx; fixed_t psp_sy = psp->sy; - const int state = viewplayer->psprites[ps_weapon].state - states; // decide which patch to use @@ -960,27 +959,20 @@ lump = sprframe->lump[0]; flip = (dboolean)(sprframe->flip & 1); - // [crispy] smoothen Chainsaw idle animation - if (state == S_SAW || state == S_SAWB) + // [crispy] center the weapon sprite horizontally and vertically + if (weapon_attack_alignment && viewplayer->attackdown && !psp->state->misc1) { - R_ApplyWeaponBob(&psp_sx, true, &psp_sy, true); - } - else - { - // [crispy] center the weapon sprite horizontally and vertically - if (weapon_attack_alignment && viewplayer->attackdown && !psp->state->misc1) - { - const weaponinfo_t *const winfo = &weaponinfo[viewplayer->readyweapon]; + const weaponinfo_t *const winfo = &weaponinfo[viewplayer->readyweapon]; + const int state = viewplayer->psprites[ps_weapon].state - states; - R_ApplyWeaponBob(&psp_sx, weapon_attack_alignment == CENTERWEAPON_BOB, NULL, false); + R_ApplyWeaponBob(&psp_sx, weapon_attack_alignment == CENTERWEAPON_BOB, NULL, false); - // [crispy] don't center vertically during lowering and raising states - if (weapon_attack_alignment >= CENTERWEAPON_HORVER && - state != winfo->downstate && state != winfo->upstate) - { - R_ApplyWeaponBob(NULL, false, &psp_sy, weapon_attack_alignment == CENTERWEAPON_BOB); - } - } + // [crispy] don't center vertically during lowering and raising states + if (weapon_attack_alignment >= CENTERWEAPON_HORVER && + state != winfo->downstate && state != winfo->upstate) + { + R_ApplyWeaponBob(NULL, false, &psp_sy, weapon_attack_alignment == CENTERWEAPON_BOB); + } } { |
From: <web...@pr...> - 2017-05-04 20:12:57
|
Author: entryway Date: Thu May 4 20:12:49 2017 New Revision: 4522 Log: wrong type of weapon_attack_alignment entry (previous commit) Modified: branches/prboom-plus-24/prboom2/src/m_misc.c Modified: branches/prboom-plus-24/prboom2/src/m_misc.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/m_misc.c Thu May 4 19:57:03 2017 (r4521) +++ branches/prboom-plus-24/prboom2/src/m_misc.c Thu May 4 20:12:49 2017 (r4522) @@ -280,7 +280,7 @@ {"player_bobbing",{&default_player_bobbing},{1},0,1, // phares 2/25/98 def_bool,ss_weap, &player_bobbing}, {"weapon_attack_alignment",{&weapon_attack_alignment},{0},0,3, // phares 2/25/98 - def_bool,ss_weap, &weapon_attack_alignment}, + def_int,ss_weap, &weapon_attack_alignment}, {"monsters_remember",{&default_monsters_remember},{1},0,1, // killough 3/1/98 def_bool,ss_enem, &monsters_remember}, /* MBF AI enhancement options */ |
From: <web...@pr...> - 2017-05-04 19:57:12
|
Author: entryway Date: Thu May 4 19:57:03 2017 New Revision: 4521 Log: weapon_attack_alignment config variable and gui entry on setup/weapons page possible values: off - doom behavior (default) horizontal - align horisontally centered - align horisontally and vertically bobbing - bobbinf during fire ported from crispy-doom Modified: branches/prboom-plus-24/prboom2/src/m_menu.c branches/prboom-plus-24/prboom2/src/m_misc.c branches/prboom-plus-24/prboom2/src/p_pspr.c branches/prboom-plus-24/prboom2/src/p_pspr.h branches/prboom-plus-24/prboom2/src/r_things.c Modified: branches/prboom-plus-24/prboom2/src/m_menu.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/m_menu.c Thu May 4 18:30:28 2017 (r4520) +++ branches/prboom-plus-24/prboom2/src/m_menu.c Thu May 4 19:57:03 2017 (r4521) @@ -2488,6 +2488,10 @@ #define WP_X 203 #define WP_Y 33 +static const char *weapon_attack_alignment_strings[] = { + "OFF", "HORIZONTAL", "CENTERED", "BOBBING", NULL +}; + // There's only one weapon settings screen (for now). But since we're // trying to fit a common description for screens, it gets a setup_menu_t, // which only has one screen definition in it. @@ -2498,7 +2502,7 @@ enum { // killough 10/98: enum for y-offset info weap_recoil, weap_bobbing, - weap_bfg, + weap_attack_alignment, weap_stub1, weap_pref1, weap_pref2, @@ -2526,6 +2530,7 @@ { {"ENABLE RECOIL", S_YESNO,m_null,WP_X, WP_Y+ weap_recoil*8, {"weapon_recoil"}}, {"ENABLE BOBBING",S_YESNO,m_null,WP_X, WP_Y+weap_bobbing*8, {"player_bobbing"}}, + {"WEAPON ATTACK ALIGNMENT",S_CHOICE,m_null,WP_X, WP_Y+weap_attack_alignment*8, {"weapon_attack_alignment"}, 0, 0, NULL, weapon_attack_alignment_strings}, {"1ST CHOICE WEAPON",S_WEAP,m_null,WP_X,WP_Y+weap_pref1*8, {"weapon_choice_1"}}, {"2nd CHOICE WEAPON",S_WEAP,m_null,WP_X,WP_Y+weap_pref2*8, {"weapon_choice_2"}}, Modified: branches/prboom-plus-24/prboom2/src/m_misc.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/m_misc.c Thu May 4 18:30:28 2017 (r4520) +++ branches/prboom-plus-24/prboom2/src/m_misc.c Thu May 4 19:57:03 2017 (r4521) @@ -279,6 +279,8 @@ def_bool, ss_weap }, {"player_bobbing",{&default_player_bobbing},{1},0,1, // phares 2/25/98 def_bool,ss_weap, &player_bobbing}, + {"weapon_attack_alignment",{&weapon_attack_alignment},{0},0,3, // phares 2/25/98 + def_bool,ss_weap, &weapon_attack_alignment}, {"monsters_remember",{&default_monsters_remember},{1},0,1, // killough 3/1/98 def_bool,ss_enem, &monsters_remember}, /* MBF AI enhancement options */ Modified: branches/prboom-plus-24/prboom2/src/p_pspr.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_pspr.c Thu May 4 18:30:28 2017 (r4520) +++ branches/prboom-plus-24/prboom2/src/p_pspr.c Thu May 4 19:57:03 2017 (r4521) @@ -166,6 +166,9 @@ {6, 9, 4, 3, 2, 8, 5, 7, 1, 0}, // compatibility preferences }; +// Center Weapon when Firing. +int weapon_attack_alignment=0; + // P_SwitchWeapon checks current ammo levels and gives you the // most preferred weapon with ammo. It will not pick the currently // raised weapon. When called from P_CheckAmmo this won't matter, Modified: branches/prboom-plus-24/prboom2/src/p_pspr.h ============================================================================== --- branches/prboom-plus-24/prboom2/src/p_pspr.h Thu May 4 18:30:28 2017 (r4520) +++ branches/prboom-plus-24/prboom2/src/p_pspr.h Thu May 4 19:57:03 2017 (r4521) @@ -82,7 +82,17 @@ fixed_t sy; } pspdef_t; +typedef enum +{ + CENTERWEAPON_OFF, + CENTERWEAPON_HOR, + CENTERWEAPON_HORVER, + CENTERWEAPON_BOB, + NUM_CENTERWEAPON, +}; + extern int weapon_preferences[2][NUMWEAPONS+1]; /* killough 5/2/98 */ +extern int weapon_attack_alignment; int P_WeaponPreferred(int w1, int w2); struct player_s; Modified: branches/prboom-plus-24/prboom2/src/r_things.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/r_things.c Thu May 4 18:30:28 2017 (r4520) +++ branches/prboom-plus-24/prboom2/src/r_things.c Thu May 4 19:57:03 2017 (r4521) @@ -40,6 +40,7 @@ #include "r_things.h" #include "r_fps.h" #include "v_video.h" +#include "p_pspr.h" #include "lprintf.h" #include "e6y.h"//e6y @@ -894,6 +895,32 @@ } } +// [crispy] apply bobbing (or centering) to the player's weapon sprite +static void R_ApplyWeaponBob (fixed_t *sx, dboolean bobx, fixed_t *sy, dboolean boby) +{ + const angle_t angle = (128 * leveltime) & FINEMASK; + + if (sx) + { + *sx = FRACUNIT; + + if (bobx) + { + *sx += FixedMul(viewplayer->bob, finecosine[angle]); + } + } + + if (sy) + { + *sy = 32 * FRACUNIT; // [crispy] WEAPONTOP + + if (boby) + { + *sy += FixedMul(viewplayer->bob, finesine[angle & (FINEANGLES / 2 - 1)]); + } + } +} + // // R_DrawPSprite // @@ -909,6 +936,9 @@ vissprite_t avis; int width; fixed_t topoffset; + fixed_t psp_sx = psp->sx; + fixed_t psp_sy = psp->sy; + const int state = viewplayer->psprites[ps_weapon].state - states; // decide which patch to use @@ -930,11 +960,34 @@ lump = sprframe->lump[0]; flip = (dboolean)(sprframe->flip & 1); + // [crispy] smoothen Chainsaw idle animation + if (state == S_SAW || state == S_SAWB) + { + R_ApplyWeaponBob(&psp_sx, true, &psp_sy, true); + } + else + { + // [crispy] center the weapon sprite horizontally and vertically + if (weapon_attack_alignment && viewplayer->attackdown && !psp->state->misc1) + { + const weaponinfo_t *const winfo = &weaponinfo[viewplayer->readyweapon]; + + R_ApplyWeaponBob(&psp_sx, weapon_attack_alignment == CENTERWEAPON_BOB, NULL, false); + + // [crispy] don't center vertically during lowering and raising states + if (weapon_attack_alignment >= CENTERWEAPON_HORVER && + state != winfo->downstate && state != winfo->upstate) + { + R_ApplyWeaponBob(NULL, false, &psp_sy, weapon_attack_alignment == CENTERWEAPON_BOB); + } + } + } + { const rpatch_t* patch = R_CachePatchNum(lump+firstspritelump); // calculate edges of the shape fixed_t tx; - tx = psp->sx-160*FRACUNIT; + tx = psp_sx-160*FRACUNIT; tx -= patch->leftoffset<<FRACBITS; x1 = (centerxfrac + FixedMul (tx,pspritexscale))>>FRACBITS; @@ -956,7 +1009,7 @@ vis->mobjflags = MF_PLAYERSPRITE; // killough 12/98: fix psprite positioning problem vis->texturemid = (BASEYCENTER<<FRACBITS) /* + FRACUNIT/2 */ - - (psp->sy-topoffset); + (psp_sy-topoffset); // Move the weapon down for 1280x1024. vis->texturemid -= psprite_offset; |
From: <web...@pr...> - 2017-05-04 18:54:05
|
Author: entryway Date: Thu May 4 18:30:28 2017 New Revision: 4520 Log: default value for mouse_sensitivity_vert changed to 1 from 10 Modified: branches/prboom-plus-24/prboom2/src/m_misc.c Modified: branches/prboom-plus-24/prboom2/src/m_misc.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/m_misc.c Sun Mar 12 18:52:46 2017 (r4519) +++ branches/prboom-plus-24/prboom2/src/m_misc.c Thu May 4 18:30:28 2017 (r4520) @@ -506,7 +506,7 @@ {"mouse_sensitivity_horiz",{&mouseSensitivity_horiz},{10},0,UL, def_int,ss_none}, /* adjust horizontal (x) mouse sensitivity killough/mead */ //jff 4/3/98 allow unlimited sensitivity - {"mouse_sensitivity_vert",{&mouseSensitivity_vert},{10},0,UL, + {"mouse_sensitivity_vert",{&mouseSensitivity_vert},{1},0,UL, def_int,ss_none}, /* adjust vertical (y) mouse sensitivity killough/mead */ //jff 3/8/98 allow -1 in mouse bindings to disable mouse function {"mouseb_fire",{&mousebfire},{0},-1,MAX_MOUSEB, |
From: <web...@pr...> - 2017-03-12 18:52:57
|
Author: entryway Date: Sun Mar 12 18:52:46 2017 New Revision: 4519 Log: move findstate_t to e6y_launcher.c (Fabian Greffrath) The problem is that this struct references the PATH_MAX macro, which is not available on certain Unix flavors, i.e. Hurd. But on Unix systems, the launcher isn't built anyway. Modified: branches/prboom-plus-24/prboom2/src/e6y.h branches/prboom-plus-24/prboom2/src/e6y_launcher.c Modified: branches/prboom-plus-24/prboom2/src/e6y.h ============================================================================== --- branches/prboom-plus-24/prboom2/src/e6y.h Sat Mar 4 18:44:16 2017 (r4518) +++ branches/prboom-plus-24/prboom2/src/e6y.h Sun Mar 12 18:52:46 2017 (r4519) @@ -309,19 +309,6 @@ dboolean ProcessNoTagLines(line_t* line, sector_t **sec, int *secnum); -#define I_FindName(a) ((a)->Name) -#define I_FindAttr(a) ((a)->Attribs) - -typedef struct -{ - unsigned int Attribs; - unsigned int Times[3*2]; - unsigned int Size[2]; - unsigned int Reserved[2]; - char Name[PATH_MAX]; - char AltName[14]; -} findstate_t; - char* PathFindFileName(const char* pPath); void NormalizeSlashes2(char *str); unsigned int AfxGetFileName(const char* lpszPathName, char* lpszTitle, unsigned int nMax); Modified: branches/prboom-plus-24/prboom2/src/e6y_launcher.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/e6y_launcher.c Sat Mar 4 18:44:16 2017 (r4518) +++ branches/prboom-plus-24/prboom2/src/e6y_launcher.c Sun Mar 12 18:52:46 2017 (r4519) @@ -65,6 +65,19 @@ #define LAUNCHER_CAPTION PACKAGE_NAME" Launcher" +#define I_FindName(a) ((a)->Name) +#define I_FindAttr(a) ((a)->Attribs) + +typedef struct +{ + unsigned int Attribs; + unsigned int Times[3*2]; + unsigned int Size[2]; + unsigned int Reserved[2]; + char Name[PATH_MAX]; + char AltName[14]; +} findstate_t; + typedef struct { char name[PATH_MAX]; |
From: <web...@pr...> - 2017-03-04 18:44:25
|
Author: entryway Date: Sat Mar 4 18:44:16 2017 New Revision: 4518 Log: Another try to fix sprites dissapearing on ludicrm.wad map03 in software mode. r4516 failed at non 4x3 aspects Also I noticed that old code don't draw many tall red firesticks on start position on sunder.wad map10 (240 sprites instead of 400+) Modified: branches/prboom-plus-24/prboom2/src/r_main.c branches/prboom-plus-24/prboom2/src/r_main.h branches/prboom-plus-24/prboom2/src/r_things.c Modified: branches/prboom-plus-24/prboom2/src/r_main.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/r_main.c Sat Mar 4 16:33:12 2017 (r4517) +++ branches/prboom-plus-24/prboom2/src/r_main.c Sat Mar 4 18:44:16 2017 (r4518) @@ -92,6 +92,7 @@ fixed_t focallength; fixed_t focallengthy; +fixed_t globaluclip, globaldclip; fixed_t centerxfrac, centeryfrac; fixed_t yaspectmul; fixed_t viewheightfrac; //e6y: for correct cliping of things @@ -102,6 +103,7 @@ fixed_t viewx, viewy, viewz; angle_t viewangle; fixed_t viewcos, viewsin; +fixed_t viewtancos, viewtansin; player_t *viewplayer; // e6y: Added for more precise flats drawing fixed_t viewfocratio; @@ -904,6 +906,7 @@ { if (V_GetMode() != VID_MODEGL) { + fixed_t InvZtoScale; fixed_t dy; int i; @@ -914,6 +917,10 @@ centery += dy >> FRACBITS; } centeryfrac = centery<<FRACBITS; + + InvZtoScale = yaspectmul * centerx; + globaluclip = FixedDiv (-centeryfrac, InvZtoScale); + globaldclip = FixedDiv ((viewheight<<FRACBITS)-centeryfrac, InvZtoScale); for (i=0; i<viewheight; i++) { @@ -957,6 +964,8 @@ static void R_SetupFrame (player_t *player) { int i, cm; + + int FocalTangent = finetangent[FINEANGLES/4 + FieldOfView/2]; viewplayer = player; @@ -965,6 +974,9 @@ viewsin = finesine[viewangle>>ANGLETOFINESHIFT]; viewcos = finecosine[viewangle>>ANGLETOFINESHIFT]; + viewtansin = FixedMul(FocalTangent, viewsin); + viewtancos = FixedMul(FocalTangent, viewcos); + R_SetupFreelook(); // killough 3/20/98, 4/4/98: select colormap based on player status Modified: branches/prboom-plus-24/prboom2/src/r_main.h ============================================================================== --- branches/prboom-plus-24/prboom2/src/r_main.h Sat Mar 4 16:33:12 2017 (r4517) +++ branches/prboom-plus-24/prboom2/src/r_main.h Sat Mar 4 18:44:16 2017 (r4518) @@ -49,12 +49,16 @@ extern fixed_t viewcos; extern fixed_t viewsin; +extern fixed_t viewtancos; +extern fixed_t viewtansin; extern int viewwidth; extern int viewheight; extern int viewwindowx; extern int viewwindowy; extern int centerx; extern int centery; +extern fixed_t globaluclip; +extern fixed_t globaldclip; extern fixed_t centerxfrac; extern fixed_t centeryfrac; extern fixed_t yaspectmul; Modified: branches/prboom-plus-24/prboom2/src/r_things.c ============================================================================== --- branches/prboom-plus-24/prboom2/src/r_things.c Sat Mar 4 16:33:12 2017 (r4517) +++ branches/prboom-plus-24/prboom2/src/r_things.c Sat Mar 4 18:44:16 2017 (r4518) @@ -610,7 +610,7 @@ static void R_ProjectSprite (mobj_t* thing, int lightlevel) { - fixed_t gzt; // killough 3/27/98 + fixed_t gzt, gzb; // killough 3/27/98 fixed_t tx; fixed_t xscale; int x1; @@ -628,7 +628,7 @@ fixed_t tr_x, tr_y; fixed_t fx, fy, fz; fixed_t gxt, gyt; - fixed_t tz; + fixed_t tz, tz2; int width; #ifdef GL_DOOM @@ -736,6 +736,7 @@ x2 = ((centerxfrac + FixedMul (tx,xscale) - FRACUNIT/2) >> FRACBITS); gzt = fz + (patch->topoffset << FRACBITS); + gzb = gzt - (patch->height << FRACBITS); width = patch->width; R_UnlockPatchNum(lump+firstspritelump); } @@ -744,13 +745,13 @@ if (x1 > viewwidth || x2 < 0) return; - // killough 4/9/98: clip things which are out of view due to height - // e6y: fix of hanging decoration disappearing in Batman Doom MAP02 - // centeryfrac -> viewheightfrac - // [kb] add +1 so sprites are shown even with the extended freelook - if (thing->z > viewz + FixedDiv(viewheight << (FRACBITS + 1), xscale) || - gzt < viewz - FixedDiv((viewheight << (FRACBITS + 1)) - viewheight, xscale)) + // [RH] Reject sprites that are off the top or bottom of the screen + tz2 = FixedMul(tr_x, viewtancos) + FixedMul(tr_y, viewtansin); + if (FixedMul(globaluclip, tz2) > viewz - gzb || + FixedMul(globaldclip, tz2) < viewz - gzt) + { return; + } // killough 3/27/98: exclude things totally separated // from the viewer, by either water or fake ceilings |