- Version bump to 1.5.0.

- Update to ZDoom r2509:
    * Set explicit positioning for the gameplay options menu instead of relying on the automatic positioning.
    * Fix compilation with MinGW + w32api and clean up warnings.
    * Clean up vid_listadapters code.


git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@880 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
Christoph Oelckers 2010-08-11 06:40:06 +00:00
parent 6f4410f6de
commit f474931ea8
14 changed files with 62 additions and 33 deletions

View file

@ -185,7 +185,7 @@ void ParseCompatibility()
} while (!sc.Compare("{")); } while (!sc.Compare("{"));
flags.CompatFlags = 0; flags.CompatFlags = 0;
flags.BCompatFlags = 0; flags.BCompatFlags = 0;
flags.ExtCommandIndex = -1; flags.ExtCommandIndex = ~0u;
while (sc.GetString()) while (sc.GetString())
{ {
if ((i = sc.MatchString(&Options[0].Name, sizeof(*Options))) >= 0) if ((i = sc.MatchString(&Options[0].Name, sizeof(*Options))) >= 0)
@ -195,7 +195,7 @@ void ParseCompatibility()
} }
else if (sc.Compare("clearlineflags")) else if (sc.Compare("clearlineflags"))
{ {
if (flags.ExtCommandIndex == -1) flags.ExtCommandIndex = CompatParams.Size(); if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size();
CompatParams.Push(CP_CLEARFLAGS); CompatParams.Push(CP_CLEARFLAGS);
sc.MustGetNumber(); sc.MustGetNumber();
CompatParams.Push(sc.Number); CompatParams.Push(sc.Number);
@ -204,7 +204,7 @@ void ParseCompatibility()
} }
else if (sc.Compare("setlineflags")) else if (sc.Compare("setlineflags"))
{ {
if (flags.ExtCommandIndex == -1) flags.ExtCommandIndex = CompatParams.Size(); if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size();
CompatParams.Push(CP_SETFLAGS); CompatParams.Push(CP_SETFLAGS);
sc.MustGetNumber(); sc.MustGetNumber();
CompatParams.Push(sc.Number); CompatParams.Push(sc.Number);
@ -213,7 +213,7 @@ void ParseCompatibility()
} }
else if (sc.Compare("setlinespecial")) else if (sc.Compare("setlinespecial"))
{ {
if (flags.ExtCommandIndex == -1) flags.ExtCommandIndex = CompatParams.Size(); if (flags.ExtCommandIndex == ~0u) flags.ExtCommandIndex = CompatParams.Size();
CompatParams.Push(CP_SETSPECIAL); CompatParams.Push(CP_SETSPECIAL);
sc.MustGetNumber(); sc.MustGetNumber();
CompatParams.Push(sc.Number); CompatParams.Push(sc.Number);
@ -232,7 +232,7 @@ void ParseCompatibility()
break; break;
} }
} }
if (flags.ExtCommandIndex != -1) if (flags.ExtCommandIndex != ~0u)
{ {
CompatParams.Push(CP_END); CompatParams.Push(CP_END);
} }

View file

@ -190,7 +190,7 @@ const char *FMetaTable::GetMetaString (DWORD id) const
CCMD (dumpactors) CCMD (dumpactors)
{ {
char * filters[32] = const char *const filters[32] =
{ {
"0:All", "1:Doom", "2:Heretic", "3:DoomHeretic", "4:Hexen", "5:DoomHexen", "6:Raven", "7:IdRaven", "0:All", "1:Doom", "2:Heretic", "3:DoomHeretic", "4:Hexen", "5:DoomHexen", "6:Raven", "7:IdRaven",
"8:Strife", "9:DoomStrife", "10:HereticStrife", "11:DoomHereticStrife", "12:HexenStrife", "8:Strife", "9:DoomStrife", "10:HereticStrife", "11:DoomHereticStrife", "12:HexenStrife",

View file

@ -167,7 +167,7 @@ void M_FindResponseFile (void)
int argc = 0; int argc = 0;
FILE *handle; FILE *handle;
int size; int size;
long argsize; long argsize = 0;
int index; int index;
// Any more response files after the limit will be removed from the // Any more response files after the limit will be removed from the

View file

@ -1103,7 +1103,7 @@ static menu_t DMFlagsMenu =
"GAMEPLAY OPTIONS", "GAMEPLAY OPTIONS",
0, 0,
countof(DMFlagsItems), countof(DMFlagsItems),
0, 222,
DMFlagsItems, DMFlagsItems,
}; };

View file

@ -2688,7 +2688,7 @@ void A_FaceTarget (AActor *self, angle_t max_turn)
// 0 means no limit. Also, if we turn in a single step anyways, no need to go through the algorithms. // 0 means no limit. Also, if we turn in a single step anyways, no need to go through the algorithms.
// It also means that there is no need to check for going past the target. // It also means that there is no need to check for going past the target.
if (max_turn && (max_turn < abs(self->angle - target_angle))) if (max_turn && (max_turn < (angle_t)abs(self->angle - target_angle)))
{ {
if (self->angle > target_angle) if (self->angle > target_angle)
{ {

View file

@ -1566,7 +1566,7 @@ bool P_SeekerMissile (AActor *actor, angle_t thresh, angle_t turnMax, bool preci
} }
else else
{ {
angle_t pitch; angle_t pitch = 0;
if (!(actor->flags3 & (MF3_FLOORHUGGER|MF3_CEILINGHUGGER))) if (!(actor->flags3 & (MF3_FLOORHUGGER|MF3_CEILINGHUGGER)))
{ // Need to seek vertically { // Need to seek vertically
double dist = MAX(1.0, FVector2(target->x - actor->x, target->y - actor->y).Length()); double dist = MAX(1.0, FVector2(target->x - actor->x, target->y - actor->y).Length());

View file

@ -1781,6 +1781,7 @@ int OWallMost (short *mostbuf, fixed_t z)
s3 = MulScale16 (globaldclip, WallSZ1); s4 = MulScale16 (globaldclip, WallSZ2); s3 = MulScale16 (globaldclip, WallSZ1); s4 = MulScale16 (globaldclip, WallSZ2);
bad = (z<s1)+((z<s2)<<1)+((z>s3)<<2)+((z>s4)<<3); bad = (z<s1)+((z<s2)<<1)+((z>s3)<<2)+((z>s4)<<3);
#if 1
if ((bad&3) == 3) if ((bad&3) == 3)
{ {
memset (&mostbuf[WallSX1], 0, (WallSX2 - WallSX1)*sizeof(mostbuf[0])); memset (&mostbuf[WallSX1], 0, (WallSX2 - WallSX1)*sizeof(mostbuf[0]));
@ -1792,10 +1793,10 @@ int OWallMost (short *mostbuf, fixed_t z)
clearbufshort (&mostbuf[WallSX1], WallSX2 - WallSX1, viewheight); clearbufshort (&mostbuf[WallSX1], WallSX2 - WallSX1, viewheight);
return bad; return bad;
} }
#endif
ix1 = WallSX1; iy1 = WallSZ1; ix1 = WallSX1; iy1 = WallSZ1;
ix2 = WallSX2; iy2 = WallSZ2; ix2 = WallSX2; iy2 = WallSZ2;
#if 1
if (bad & 3) if (bad & 3)
{ {
int t = DivScale30 (z-s1, s2-s1); int t = DivScale30 (z-s1, s2-s1);
@ -1842,7 +1843,38 @@ int OWallMost (short *mostbuf, fixed_t z)
fixed_t yinc = (Scale (z, InvZtoScale, iy2) - y) / (ix2 - ix1); fixed_t yinc = (Scale (z, InvZtoScale, iy2) - y) / (ix2 - ix1);
qinterpolatedown16short (&mostbuf[ix1], ix2-ix1, y + centeryfrac, yinc); qinterpolatedown16short (&mostbuf[ix1], ix2-ix1, y + centeryfrac, yinc);
} }
#else
double max = viewheight;
double zz = z / 65536.0;
#if 0
double z1 = zz * InvZtoScale / WallSZ1;
double z2 = zz * InvZtoScale / WallSZ2 - z1;
z2 /= (WallSX2 - WallSX1);
z1 += centeryfrac / 65536.0;
for (int x = WallSX1; x < WallSX2; ++x)
{
mostbuf[x] = xs_RoundToInt(clamp(z1, 0.0, max));
z1 += z2;
}
#else
double top, bot, i;
i = WallSX1 - centerx;
top = WallUoverZorg + WallUoverZstep * i;
bot = WallInvZorg + WallInvZstep * i;
double cy = centeryfrac / 65536.0;
for (int x = WallSX1; x < WallSX2; x++)
{
double frac = top / bot;
double scale = frac * WallDepthScale + WallDepthOrg;
mostbuf[x] = xs_RoundToInt(clamp(zz / scale + cy, 0.0, max));
top += WallUoverZstep;
bot += WallInvZstep;
}
#endif
#endif
if (mostbuf[ix1] < 0) mostbuf[ix1] = 0; if (mostbuf[ix1] < 0) mostbuf[ix1] = 0;
else if (mostbuf[ix1] > viewheight) mostbuf[ix1] = (short)viewheight; else if (mostbuf[ix1] > viewheight) mostbuf[ix1] = (short)viewheight;
if (mostbuf[ix2] < 0) mostbuf[ix2] = 0; if (mostbuf[ix2] < 0) mostbuf[ix2] = 0;
@ -2046,13 +2078,10 @@ void PrepWall (fixed_t *swall, fixed_t *lwall, fixed_t walxrepeat)
{ // swall = scale, lwall = texturecolumn { // swall = scale, lwall = texturecolumn
double top, bot, i; double top, bot, i;
double xrepeat = walxrepeat; double xrepeat = walxrepeat;
double topinc, botinc;
i = WallSX1 - centerx; i = WallSX1 - centerx;
top = WallUoverZorg + WallUoverZstep * i; top = WallUoverZorg + WallUoverZstep * i;
bot = WallInvZorg + WallInvZstep * i; bot = WallInvZorg + WallInvZstep * i;
topinc = WallUoverZstep * 4.f;
botinc = WallInvZstep * 4.f;
for (int x = WallSX1; x < WallSX2; x++) for (int x = WallSX1; x < WallSX2; x++)
{ {
@ -2069,14 +2098,11 @@ void PrepLWall (fixed_t *lwall, fixed_t walxrepeat)
{ // lwall = texturecolumn { // lwall = texturecolumn
double top, bot, i; double top, bot, i;
double xrepeat = walxrepeat; double xrepeat = walxrepeat;
double topinc, botinc;
double topstep; double topstep;
i = WallSX1 - centerx; i = WallSX1 - centerx;
top = WallUoverZorg + WallUoverZstep * i; top = WallUoverZorg + WallUoverZstep * i;
bot = WallInvZorg + WallInvZstep * i; bot = WallInvZorg + WallInvZstep * i;
topinc = WallUoverZstep * 4.f;
botinc = WallInvZstep * 4.f;
top *= xrepeat; top *= xrepeat;
topstep = WallUoverZstep * xrepeat; topstep = WallUoverZstep * xrepeat;

View file

@ -52,6 +52,7 @@ class IVideo
virtual bool SetResolution (int width, int height, int bits); virtual bool SetResolution (int width, int height, int bits);
virtual void DumpAdapters();
}; };
void I_InitGraphics (); void I_InitGraphics ();

View file

@ -3,5 +3,5 @@
// This file was automatically generated by the // This file was automatically generated by the
// updaterevision tool. Do not edit by hand. // updaterevision tool. Do not edit by hand.
#define ZD_SVN_REVISION_STRING "2504" #define ZD_SVN_REVISION_STRING "2509"
#define ZD_SVN_REVISION_NUMBER 2504 #define ZD_SVN_REVISION_NUMBER 2509

View file

@ -1769,7 +1769,6 @@ const int BaseRatioSizes[5][4] =
{ 960, 640, (int)(6.5*FRACUNIT), 48*15/16 } // 5:4 320, 213.3333, multiplied by three { 960, 640, (int)(6.5*FRACUNIT), 48*15/16 } // 5:4 320, 213.3333, multiplied by three
}; };
#ifndef unix
void IVideo::DumpAdapters () void IVideo::DumpAdapters ()
{ {
Printf("Multi-monitor support unavailable.\n"); Printf("Multi-monitor support unavailable.\n");
@ -1780,4 +1779,3 @@ CCMD(vid_listadapters)
if (Video != NULL) if (Video != NULL)
Video->DumpAdapters(); Video->DumpAdapters();
} }
#endif

View file

@ -41,17 +41,17 @@
/** Lots of different version numbers **/ /** Lots of different version numbers **/
#define DOTVERSIONSTR_NOREV "1.4.8" #define DOTVERSIONSTR_NOREV "1.5.0"
#define ZDVER_STRING "2.4.1" #define ZDVER_STRING "2.5.0"
// The version string the user actually sees. // The version string the user actually sees.
#define DOTVERSIONSTR DOTVERSIONSTR_NOREV " (r" SVN_REVISION_STRING ") / ZDoom " ZDVER_STRING " (r" ZD_SVN_REVISION_STRING ")" #define DOTVERSIONSTR DOTVERSIONSTR_NOREV " (r" SVN_REVISION_STRING ") / ZDoom " ZDVER_STRING " (r" ZD_SVN_REVISION_STRING ")"
// The version as seen in the Windows resource // The version as seen in the Windows resource
#define RC_FILEVERSION 1,4,8,SVN_REVISION_NUMBER #define RC_FILEVERSION 1,5,0,SVN_REVISION_NUMBER
#define RC_PRODUCTVERSION 1,4,8,0 #define RC_PRODUCTVERSION 1,5,0,0
#define RC_FILEVERSION2 DOTVERSIONSTR #define RC_FILEVERSION2 DOTVERSIONSTR
#define RC_PRODUCTVERSION2 "1.4" #define RC_PRODUCTVERSION2 "1.5"
// Version identifier for network games. // Version identifier for network games.
// Bump it every time you do a release unless you're certain you // Bump it every time you do a release unless you're certain you

View file

@ -52,11 +52,7 @@ class IVideo
virtual bool SetResolution (int width, int height, int bits); virtual bool SetResolution (int width, int height, int bits);
#ifndef unix
// Base class implementation does something sensible.
virtual void DumpAdapters(); virtual void DumpAdapters();
#endif
}; };
void I_InitGraphics (); void I_InitGraphics ();

View file

@ -58,7 +58,6 @@ class D3DPal;
class Win32Video : public IVideo class Win32Video : public IVideo
{ {
public: public:
Win32Video (int parm); Win32Video (int parm);
~Win32Video (); ~Win32Video ();

View file

@ -38,6 +38,7 @@
#define DIRECTDRAW_VERSION 0x0300 #define DIRECTDRAW_VERSION 0x0300
#define DIRECT3D_VERSION 0x0900 #define DIRECT3D_VERSION 0x0900
#define _WIN32_WINNT 0x0501
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#include <ddraw.h> #include <ddraw.h>
@ -51,6 +52,7 @@
#include <ddraw.h> #include <ddraw.h>
#include <d3d9.h> #include <d3d9.h>
#include <stdio.h> #include <stdio.h>
#include <ctype.h>
#define USE_WINDOWS_DWORD #define USE_WINDOWS_DWORD
#include "doomtype.h" #include "doomtype.h"
@ -351,12 +353,19 @@ void Win32Video::BlankForGDI ()
// //
// Win32Video :: DumpAdapters // Win32Video :: DumpAdapters
// //
// Dumps the list of display adapters to the console. // Dumps the list of display adapters to the console. Only meaningful for
// Direct3D.
// //
//========================================================================== //==========================================================================
void Win32Video::DumpAdapters() void Win32Video::DumpAdapters()
{ {
if (D3D == NULL)
{
Printf("Multi-monitor support requires Direct3D.\n");
return;
}
UINT num_adapters = D3D->GetAdapterCount(); UINT num_adapters = D3D->GetAdapterCount();
for (UINT i = 0; i < num_adapters; ++i) for (UINT i = 0; i < num_adapters; ++i)