ZDoom 1.23b30.

This commit is contained in:
Randy Heit 2002-01-22 00:00:00 +00:00
parent d1f68cd724
commit 973fa8d7e1
17 changed files with 5224 additions and 57 deletions

View file

@ -20,7 +20,7 @@ GZIP = gzip
basename = zdoom-1.23
# the OS type we are building for; should match a directory in src_dir
SYSTEM = linux
SYSTEM = $(shell uname -s)
# distribution names
BINTAR = $(basename)-i586.tar.gz
@ -162,8 +162,10 @@ srctar: $(ALLSOURCES) Makefile $(SRCDOC) docs/* other/*
$(basename)/Makefile \
$(basename)/docs/* \
$(basename)/other/* \
$(basename)/util/*.c \
$(basename)/util/*dos \
$(basename)/$(src_dir)/* \
$(basename)/$(src_dir)/linux/* \
$(basename)/$(src_dir)/Linux/* \
$(basename)/$(src_dir)/win32/* \
$(basename)/$(src_dir)/fmodsound/* \
$(basename)/$(src_dir)/g_heretic/* \

View file

@ -1,3 +1,16 @@
January 22, 2002
- Fixed palette translation through Dehacked again. While I was at it, I
decided to remove translation control from the actor's flags member
entirely and just rely on the Translation member.
- Added "Ammo use" field for dehacked weapon modifications.
- Fixed: Bouncing a missile off a floor/ceiling near a wall could crash if
no missiles had already bounced off a wall.
- Fixed: PIT_RadiusAttack() only pushed things in directions with positive
x and y.
- Gave names to the anonymous structs in p_setup.cpp/sidei_t so that it
compiles with GCC 2.95.3.
- Rearranged FBaseCVar::ToInt() to try and compile it with GCC 2.95.3.
January 20, 2002
- Fixed: Picking items up when item respawn is enabled would mess up collision
detection because the items would move themselves back to their original

1306
src/Copy of c_cvars.cpp Normal file

File diff suppressed because it is too large Load diff

3838
src/Copy of p_map.cpp Normal file

File diff suppressed because it is too large Load diff

View file

@ -151,9 +151,6 @@ enum
MF_SKULLFLY = 0x01000000, // skull in flight
MF_NOTDMATCH = 0x02000000, // don't spawn in death match (key cards)
MF_TRANSLATION = 0x0c000000, // if 0x4 0x8 or 0xc, use a translation
MF_TRANSSHIFT = 26, // table for player colormaps
MF_UNMORPHED = 0x10000000, // [RH] Actor is the unmorphed version of something else
MF_FALLING = 0x20000000,
MF_STEALTH = 0x40000000, // [RH] Andy Baker's stealth monsters

View file

@ -202,23 +202,17 @@ bool FBaseCVar::ToBool (UCVarValue value, ECVarType type)
int FBaseCVar::ToInt (UCVarValue value, ECVarType type)
{
int res;
switch (type)
{
case CVAR_Bool:
return (int)value.Bool;
case CVAR_Int:
return value.Int;
case CVAR_Float:
return (int)value.Float;
case CVAR_String:
return strtol (value.String, NULL, 0);
default:
return 0;
case CVAR_Bool: res = (int)value.Bool; break;
case CVAR_Int: res = value.Int; break;
case CVAR_Float: res = (int)value.Float; break;
default: res = 0; break;
case CVAR_String: res = strtol (value.String, NULL, 0); break;
}
return res;
}
float FBaseCVar::ToFloat (UCVarValue value, ECVarType type)

View file

@ -40,7 +40,6 @@
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#include <stddef.h>
@ -62,6 +61,7 @@
#include "c_dispatch.h"
#include "decallib.h"
#include "z_zone.h"
#include "r_draw.h"
extern int clipammo[NUMAMMO];
@ -726,6 +726,12 @@ static int GetLine (void)
static int PatchThing (int thingy)
{
enum
{
MF_TRANSLATION = 0x0c000000, // if 0x4 0x8 or 0xc, use a translation
MF_TRANSSHIFT = 26, // table for player colormaps
};
static const struct Key keys[] = {
{ "Hit points", myoffsetof(AActor,health) },
{ "Reaction time", myoffsetof(AActor,reactiontime) },
@ -945,6 +951,12 @@ static int PatchThing (int thingy)
}
if (vchanged[0])
{
if (value[0] & MF_TRANSLATION)
{
info->Translation = TRANSLATION (TRANSLATION_Standard,
((value[0] & MF_TRANSLATION) >> (MF_TRANSSHIFT))-1);
value[0] &= ~MF_TRANSLATION;
}
info->flags = value[0];
}
if (vchanged[1])
@ -1337,6 +1349,10 @@ static int PatchWeapon (int weapNum)
}
info->ammogive = clipammo[val];
}
else if (stricmp (Line1, "Ammo use") == 0)
{
info->ammouse = val;
}
else
{
Printf (unknown_str, Line1, "Weapon", weapNum);

View file

@ -998,6 +998,10 @@ void I_InitSound ()
}
FSOUND_GetDriverCaps (FSOUND_GetDriver(), &DriverCaps);
Printf (" Initialization");
if (snd_samplerate == 0)
{
snd_samplerate = 11025;
}
if (!FModLog (FSOUND_Init (snd_samplerate, 64,
FSOUND_INIT_USEDEFAULTMIDISYNTH)))
{

View file

View file

View file

View file

@ -1936,8 +1936,11 @@ void P_BounceWall (AActor *mo)
leady = mo->y-mo->radius;
}
bestslidefrac = FRACUNIT+1;
P_PathTraverse(leadx, leady, leadx+mo->momx, leady+mo->momy,
PT_ADDLINES, PTR_BounceTraverse);
if (P_PathTraverse(leadx, leady, leadx+mo->momx, leady+mo->momy,
PT_ADDLINES, PTR_BounceTraverse))
{ // Could not find a wall, so don't bounce.
return;
}
side = P_PointOnLineSide(mo->x, mo->y, bestslideline);
lineangle = R_PointToAngle2(0, 0, bestslideline->dx,
@ -2848,8 +2851,8 @@ BOOL PIT_RadiusAttack (AActor *thing)
{
momz *= 0.8f;
}
thing->momx = momx + (fixed_t)(dx * thrust);
thing->momy = momy + (fixed_t)(dy * thrust);
thing->momx = momx + (fixed_t)((thing->x - bombspot->x) * thrust);
thing->momy = momy + (fixed_t)((thing->y - bombspot->y) * thrust);
thing->momz += (fixed_t)momz;
}
}

View file

@ -2220,8 +2220,7 @@ void P_SpawnPlayer (mapthing2_t *mthing)
G_PlayerReborn (playernum);
}
// set color translations for player sprites
// [RH] Different now: MF_TRANSLATION is not used.
// [RH] set color translations for player sprites
mobj->Translation = TRANSLATION(TRANSLATION_Players,playernum);
mobj->angle = ANG45 * (mthing->angle/45);

View file

@ -91,14 +91,14 @@ struct sidei_t // [RH] Only keep BOOM sidedef init stuff around for init
struct
{
short tag, special, map;
};
} a;
// Used when grouping sidedefs into loops.
struct
{
short first, next;
char lineside;
};
} b;
};
} *sidetemp;
@ -643,12 +643,12 @@ void P_AdjustLine (line_t *ld)
// [RH] Save Static_Init only if it's interested in the textures
(ld->special != Static_Init || ld->args[1] == Init_Color))
{
sidetemp[*ld->sidenum].special = ld->special;
sidetemp[*ld->sidenum].tag = ld->args[0];
sidetemp[*ld->sidenum].a.special = ld->special;
sidetemp[*ld->sidenum].a.tag = ld->args[0];
}
else
{
sidetemp[*ld->sidenum].special = 0;
sidetemp[*ld->sidenum].a.special = 0;
}
}
@ -825,8 +825,8 @@ static void P_AllocateSideDefs (int count)
*sizeof(sidei_t), PU_LEVEL, 0);
for (i = 0; i < count; i++)
{
sidetemp[i].special = sidetemp[i].tag = 0;
sidetemp[i].map = -1;
sidetemp[i].a.special = sidetemp[i].a.tag = 0;
sidetemp[i].a.map = -1;
}
if (count < numsides)
{
@ -845,7 +845,7 @@ static void P_SetSideNum (short *sidenum_p, short sidenum)
}
else if (sidecount < numsides)
{
sidetemp[sidecount].map = sidenum;
sidetemp[sidecount].a.map = sidenum;
*sidenum_p = sidecount++;
}
else
@ -863,12 +863,12 @@ static void P_LoopSidedefs ()
for (i = 0; i < numvertexes; ++i)
{
sidetemp[i].first = -1;
sidetemp[i].next = -1;
sidetemp[i].b.first = -1;
sidetemp[i].b.next = -1;
}
for (; i < numsides; ++i)
{
sidetemp[i].next = -1;
sidetemp[i].b.next = -1;
}
for (i = 0; i < numsides; ++i)
@ -879,9 +879,9 @@ static void P_LoopSidedefs ()
int lineside = (line->sidenum[0] != i);
int vert = (lineside ? line->v2 : line->v1) - vertexes;
sidetemp[i].lineside = lineside;
sidetemp[i].next = sidetemp[vert].first;
sidetemp[vert].first = i;
sidetemp[i].b.lineside = lineside;
sidetemp[i].b.next = sidetemp[vert].b.first;
sidetemp[vert].b.first = i;
// Set each side so that it is the only member of its loop
sides[i].LeftSide = -1;
@ -901,11 +901,11 @@ static void P_LoopSidedefs ()
// instead of as part of another loop
if (line->frontsector == line->backsector)
{
right = line->sidenum[!sidetemp[i].lineside];
right = line->sidenum[!sidetemp[i].b.lineside];
}
else
{
if (sidetemp[i].lineside)
if (sidetemp[i].b.lineside)
{
right = line->v1 - vertexes;
}
@ -914,7 +914,7 @@ static void P_LoopSidedefs ()
right = line->v2 - vertexes;
}
right = sidetemp[right].first;
right = sidetemp[right].b.first;
if (right == -1)
{ // There is no right side!
@ -922,7 +922,7 @@ static void P_LoopSidedefs ()
continue;
}
if (sidetemp[right].next != -1)
if (sidetemp[right].b.next != -1)
{
int bestright = right; // Shut up, GCC
angle_t bestang = ANGLE_MAX;
@ -931,7 +931,7 @@ static void P_LoopSidedefs ()
leftline = &lines[sides[i].linenum];
ang1 = R_PointToAngle (leftline->dx, leftline->dy);
if (!sidetemp[i].lineside)
if (!sidetemp[i].b.lineside)
{
ang1 += ANGLE_180;
}
@ -944,7 +944,7 @@ static void P_LoopSidedefs ()
if (rightline->frontsector != rightline->backsector)
{
ang2 = R_PointToAngle (rightline->dx, rightline->dy);
if (sidetemp[right].lineside)
if (sidetemp[right].b.lineside)
{
ang2 += ANGLE_180;
}
@ -958,7 +958,7 @@ static void P_LoopSidedefs ()
}
}
}
right = sidetemp[right].next;
right = sidetemp[right].b.next;
}
right = bestright;
}
@ -983,7 +983,7 @@ void P_LoadSideDefs2 (int lump)
for (i = 0; i < numsides; i++)
{
register mapsidedef_t *msd = (mapsidedef_t *)data + sidetemp[i].map;
register mapsidedef_t *msd = (mapsidedef_t *)data + sidetemp[i].a.map;
register side_t *sd = sides + i;
register sector_t *sec;
@ -1004,7 +1004,7 @@ void P_LoadSideDefs2 (int lump)
{
sd->sector = sec = &sectors[SHORT(msd->sector)];
}
switch (sidetemp[i].special)
switch (sidetemp[i].a.special)
{
case Transfer_Heights: // variable colormap via 242 linedef
// [RH] The colormap num we get here isn't really a colormap,
@ -1037,7 +1037,7 @@ void P_LoadSideDefs2 (int lump)
for (s = 0; s < numsectors; s++)
{
if (sectors[s].tag == sidetemp[i].tag)
if (sectors[s].tag == sidetemp[i].a.tag)
{
sectors[s].ceilingcolormap =
sectors[s].floorcolormap = colormap;

View file

@ -1080,11 +1080,6 @@ void R_ProjectSprite (AActor *thing, int fakeside)
vis->x2 = x2 > WindowRight ? WindowRight : x2;
vis->Translation = thing->Translation; // [RH] thing translation table
vis->FakeFlatStat = fakeside;
if (vis->Translation == 0 && (thing->flags & MF_TRANSLATION))
{
vis->Translation = TRANSLATION (TRANSLATION_Players,
((thing->flags & MF_TRANSLATION) >> (MF_TRANSSHIFT))-1);
}
vis->alpha = thing->alpha;
vis->picnum = lump;
iscale = DivScale32 (1, xscale);

View file

@ -37,7 +37,7 @@
// Lots of different representations for the version number
enum { VERSION = 123 };
#define STRVERSION "123"
#define DOTVERSIONSTR "1.23 beta 29"
#define DOTVERSIONSTR "1.23 beta 30"
#define GAMEVER (1*256+23)
// SAVESIG is the save game signature. It should be the minimum version

View file

@ -58,7 +58,7 @@
#define true TRUE
#define false FALSE
#if 1
#if 0
#define STARTLOG do { if (!dbg) dbg = fopen ("c:/vid.log", "w"); } while(0)
#define STOPLOG do { if (dbg) { fclose (dbg); dbg=NULL; } } while(0)
#define LOG(x) do { if (dbg) { fprintf (dbg, x); fflush (dbg); } } while(0)