commit 5791c4d6cf6bf639083cf29256f673054c4bb345
parent 181908bd2667000b6139f92c8834059b4ec3f98a
Author: ssnf <ssnf@ssnf.xyz>
Date: Thu, 17 Jun 2021 01:37:22 +0000
delete all comments
Diffstat:
M | src/am_map.c | | | 432 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/am_map.h | | | 64 | ++++++++++++++++++++++++++++++++-------------------------------- |
M | src/d_englsh.h | | | 146 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/d_event.h | | | 98 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/d_french.h | | | 128 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/d_items.c | | | 86 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/d_items.h | | | 52 | ++++++++++++++++++++++++++-------------------------- |
M | src/d_main.c | | | 372 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/d_main.h | | | 64 | ++++++++++++++++++++++++++++++++-------------------------------- |
M | src/d_net.c | | | 248 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/d_net.h | | | 134 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/d_player.h | | | 176 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/d_textur.h | | | 60 | ++++++++++++++++++++++++++++++------------------------------ |
M | src/d_think.h | | | 74 | +++++++++++++++++++++++++++++++++++++------------------------------------- |
M | src/d_ticcmd.h | | | 66 | +++++++++++++++++++++++++++++++++--------------------------------- |
M | src/doomdata.h | | | 180 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/doomdef.c | | | 50 | +++++++++++++++++++++++++------------------------- |
M | src/doomdef.h | | | 272 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/doomstat.c | | | 50 | +++++++++++++++++++++++++------------------------- |
M | src/doomstat.h | | | 256 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/doomtype.h | | | 60 | ++++++++++++++++++++++++++++++------------------------------ |
M | src/dstrings.c | | | 52 | ++++++++++++++++++++++++++-------------------------- |
M | src/dstrings.h | | | 78 | +++++++++++++++++++++++++++++++++++++++--------------------------------------- |
M | src/f_finale.c | | | 190 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/f_finale.h | | | 62 | +++++++++++++++++++++++++++++++------------------------------- |
M | src/f_wipe.c | | | 74 | +++++++++++++++++++++++++++++++++++++------------------------------------- |
M | src/f_wipe.h | | | 60 | ++++++++++++++++++++++++++++++------------------------------ |
M | src/g_game.c | | | 472 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/g_game.h | | | 70 | +++++++++++++++++++++++++++++++++++----------------------------------- |
M | src/hu_lib.c | | | 94 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/hu_lib.h | | | 158 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/hu_stuff.c | | | 188 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/hu_stuff.h | | | 70 | +++++++++++++++++++++++++++++++++++----------------------------------- |
M | src/i_main.c | | | 44 | ++++++++++++++++++++++---------------------- |
M | src/i_net.c | | | 122 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/i_net.h | | | 52 | ++++++++++++++++++++++++++-------------------------- |
M | src/i_sound.c | | | 634 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/i_sound.h | | | 108 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/i_system.c | | | 76 | ++++++++++++++++++++++++++++++++++++++-------------------------------------- |
M | src/i_system.h | | | 110 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/i_video.c | | | 260 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/i_video.h | | | 60 | ++++++++++++++++++++++++++++++------------------------------ |
M | src/info.c | | | 9106 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/info.h | | | 58 | +++++++++++++++++++++++++++++----------------------------- |
M | src/m_argv.c | | | 54 | +++++++++++++++++++++++++++--------------------------- |
M | src/m_argv.h | | | 60 | ++++++++++++++++++++++++++++++------------------------------ |
M | src/m_bbox.c | | | 50 | +++++++++++++++++++++++++------------------------- |
M | src/m_bbox.h | | | 56 | ++++++++++++++++++++++++++++---------------------------- |
M | src/m_cheat.c | | | 62 | +++++++++++++++++++++++++++++++------------------------------- |
M | src/m_cheat.h | | | 56 | ++++++++++++++++++++++++++++---------------------------- |
M | src/m_fixed.c | | | 52 | ++++++++++++++++++++++++++-------------------------- |
M | src/m_fixed.h | | | 56 | ++++++++++++++++++++++++++++---------------------------- |
M | src/m_menu.c | | | 508 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/m_menu.h | | | 82 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/m_misc.c | | | 162 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/m_misc.h | | | 56 | ++++++++++++++++++++++++++++---------------------------- |
M | src/m_random.c | | | 54 | +++++++++++++++++++++++++++--------------------------- |
M | src/m_random.h | | | 58 | +++++++++++++++++++++++++++++----------------------------- |
M | src/m_swap.c | | | 52 | ++++++++++++++++++++++++++-------------------------- |
M | src/m_swap.h | | | 54 | +++++++++++++++++++++++++++--------------------------- |
M | src/p_ceilng.c | | | 108 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_doors.c | | | 206 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_enemy.c | | | 514 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_floor.c | | | 118 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_inter.c | | | 254 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_inter.h | | | 50 | +++++++++++++++++++++++++------------------------- |
M | src/p_lights.c | | | 154 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_local.h | | | 148 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_map.c | | | 616 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_maputl.c | | | 334 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_mobj.c | | | 336 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_mobj.h | | | 354 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_plats.c | | | 68 | ++++++++++++++++++++++++++++++++++---------------------------------- |
M | src/p_pspr.c | | | 354 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_pspr.h | | | 90 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_saveg.c | | | 164 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_saveg.h | | | 54 | +++++++++++++++++++++++++++--------------------------- |
M | src/p_setup.c | | | 254 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_setup.h | | | 54 | +++++++++++++++++++++++++++--------------------------- |
M | src/p_sight.c | | | 172 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_spec.c | | | 538 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_spec.h | | | 172 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_switch.c | | | 266 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_telept.c | | | 74 | +++++++++++++++++++++++++++++++++++++------------------------------------- |
M | src/p_tick.c | | | 116 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/p_tick.h | | | 56 | ++++++++++++++++++++++++++++---------------------------- |
M | src/p_user.c | | | 156 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/r_bsp.c | | | 254 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/r_bsp.h | | | 54 | +++++++++++++++++++++++++++--------------------------- |
M | src/r_data.c | | | 326 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/r_data.h | | | 66 | +++++++++++++++++++++++++++++++++--------------------------------- |
M | src/r_defs.h | | | 358 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/r_draw.c | | | 388 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/r_draw.h | | | 82 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/r_local.h | | | 66 | +++++++++++++++++++++++++++++++++--------------------------------- |
M | src/r_main.c | | | 330 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/r_main.h | | | 106 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/r_plane.c | | | 180 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/r_plane.h | | | 52 | ++++++++++++++++++++++++++-------------------------- |
M | src/r_segs.c | | | 218 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/r_segs.h | | | 50 | +++++++++++++++++++++++++------------------------- |
M | src/r_sky.c | | | 72 | ++++++++++++++++++++++++++++++++++++------------------------------------ |
M | src/r_sky.h | | | 56 | ++++++++++++++++++++++++++++---------------------------- |
M | src/r_state.h | | | 88 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/r_things.c | | | 354 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/r_things.h | | | 56 | ++++++++++++++++++++++++++++---------------------------- |
M | src/s_sound.c | | | 326 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/s_sound.h | | | 98 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/sounds.c | | | 60 | ++++++++++++++++++++++++++++++------------------------------ |
M | src/sounds.h | | | 110 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/st_lib.c | | | 80 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/st_lib.h | | | 146 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/st_stuff.c | | | 492 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/st_stuff.h | | | 78 | +++++++++++++++++++++++++++++++++++++++--------------------------------------- |
M | src/tables.c | | | 72 | ++++++++++++++++++++++++++++++++++++------------------------------------ |
M | src/tables.h | | | 96 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/v_video.c | | | 126 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/v_video.h | | | 72 | ++++++++++++++++++++++++++++++++++++------------------------------------ |
M | src/w_wad.c | | | 232 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/w_wad.h | | | 64 | ++++++++++++++++++++++++++++++++-------------------------------- |
M | src/wi_stuff.c | | | 476 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/wi_stuff.h | | | 62 | +++++++++++++++++++++++++++++++------------------------------- |
M | src/z_zone.c | | | 198 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
M | src/z_zone.h | | | 94 | ++++++++++++++++++++++++++++++++++++++++---------------------------------------- |
124 files changed, 14278 insertions(+), 14278 deletions(-)
diff --git a/src/am_map.c b/src/am_map.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-//
-// $Log:$
-//
-// DESCRIPTION: the automap code
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char rcsid[] = "$Id: am_map.c,v 1.4 1997/02/03 21:24:33 b1 Exp $";
@@ -35,20 +35,20 @@ static const char rcsid[] = "$Id: am_map.c,v 1.4 1997/02/03 21:24:33 b1 Exp $";
#include "m_cheat.h"
#include "i_system.h"
-// Needs access to LFB.
+
#include "v_video.h"
-// State.
+
#include "doomstat.h"
#include "r_state.h"
-// Data.
+
#include "dstrings.h"
#include "am_map.h"
-// For use if I do walls with outsides/insides
+
#define REDS (256-5*16)
#define REDRANGE 16
#define BLUES (256-4*16+8)
@@ -64,7 +64,7 @@ static const char rcsid[] = "$Id: am_map.c,v 1.4 1997/02/03 21:24:33 b1 Exp $";
#define BLACK 0
#define WHITE (256-47)
-// Automap colors
+
#define BACKGROUND BLACK
#define YOURCOLORS WHITE
#define YOURRANGE 0
@@ -84,7 +84,7 @@ static const char rcsid[] = "$Id: am_map.c,v 1.4 1997/02/03 21:24:33 b1 Exp $";
#define GRIDRANGE 0
#define XHAIRCOLORS GRAYS
-// drawing stuff
+
#define FB 0
#define AM_PANDOWNKEY KEY_DOWNARROW
@@ -103,26 +103,26 @@ static const char rcsid[] = "$Id: am_map.c,v 1.4 1997/02/03 21:24:33 b1 Exp $";
#define AM_NUMMARKPOINTS 10
-// scale on entry
+
#define INITSCALEMTOF (.2*FRACUNIT)
-// how much the automap moves window per tic in frame-buffer coordinates
-// moves 140 pixels in 1 second
+
+
#define F_PANINC 4
-// how much zoom-in per tic
-// goes to 2x in 1 second
+
+
#define M_ZOOMIN ((int) (1.02*FRACUNIT))
-// how much zoom-out per tic
-// pulls out to 0.5x in 1 second
+
+
#define M_ZOOMOUT ((int) (FRACUNIT/1.02))
-// translates between frame-buffer and map distances
+
#define FTOM(x) FixedMul(((x)<<16),scale_ftom)
#define MTOF(x) (FixedMul((x),scale_mtof)>>16)
-// translates between frame-buffer and map coordinates
+
#define CXMTOF(x) (f_x + MTOF((x)-m_x))
#define CYMTOF(y) (f_y + (f_h - MTOF((y)-m_y)))
-// the following is crap
+
#define LINE_NEVERSEE ML_DONTDRAW
typedef struct
@@ -152,19 +152,19 @@ typedef struct
-//
-// The vector graphics for the automap.
-// A line drawing of the player pointing right,
-// starting from the middle.
-//
+
+
+
+
+
#define R ((8*PLAYERRADIUS)/7)
mline_t player_arrow[] = {
- { { -R+R/8, 0 }, { R, 0 } }, // -----
- { { R, 0 }, { R-R/2, R/4 } }, // ----->
+ { { -R+R/8, 0 }, { R, 0 } },
+ { { R, 0 }, { R-R/2, R/4 } },
{ { R, 0 }, { R-R/2, -R/4 } },
- { { -R+R/8, 0 }, { -R-R/8, R/4 } }, // >---->
+ { { -R+R/8, 0 }, { -R-R/8, R/4 } },
{ { -R+R/8, 0 }, { -R-R/8, -R/4 } },
- { { -R+3*R/8, 0 }, { -R+R/8, R/4 } }, // >>--->
+ { { -R+3*R/8, 0 }, { -R+R/8, R/4 } },
{ { -R+3*R/8, 0 }, { -R+R/8, -R/4 } }
};
#undef R
@@ -172,20 +172,20 @@ mline_t player_arrow[] = {
#define R ((8*PLAYERRADIUS)/7)
mline_t cheat_player_arrow[] = {
- { { -R+R/8, 0 }, { R, 0 } }, // -----
- { { R, 0 }, { R-R/2, R/6 } }, // ----->
+ { { -R+R/8, 0 }, { R, 0 } },
+ { { R, 0 }, { R-R/2, R/6 } },
{ { R, 0 }, { R-R/2, -R/6 } },
- { { -R+R/8, 0 }, { -R-R/8, R/6 } }, // >----->
+ { { -R+R/8, 0 }, { -R-R/8, R/6 } },
{ { -R+R/8, 0 }, { -R-R/8, -R/6 } },
- { { -R+3*R/8, 0 }, { -R+R/8, R/6 } }, // >>----->
+ { { -R+3*R/8, 0 }, { -R+R/8, R/6 } },
{ { -R+3*R/8, 0 }, { -R+R/8, -R/6 } },
- { { -R/2, 0 }, { -R/2, -R/6 } }, // >>-d--->
+ { { -R/2, 0 }, { -R/2, -R/6 } },
{ { -R/2, -R/6 }, { -R/2+R/6, -R/6 } },
{ { -R/2+R/6, -R/6 }, { -R/2+R/6, R/4 } },
- { { -R/6, 0 }, { -R/6, -R/6 } }, // >>-dd-->
+ { { -R/6, 0 }, { -R/6, -R/6 } },
{ { -R/6, -R/6 }, { 0, -R/6 } },
{ { 0, -R/6 }, { 0, R/4 } },
- { { R/6, R/4 }, { R/6, -R/7 } }, // >>-ddt->
+ { { R/6, R/4 }, { R/6, -R/7 } },
{ { R/6, -R/7 }, { R/6+R/32, -R/7-R/32 } },
{ { R/6+R/32, -R/7-R/32 }, { R/6+R/10, -R/7 } }
};
@@ -216,73 +216,73 @@ mline_t thintriangle_guy[] = {
static int cheating = 0;
static int grid = 0;
-static int leveljuststarted = 1; // kluge until AM_LevelInit() is called
+static int leveljuststarted = 1;
boolean automapactive = false;
static int finit_width = SCREENWIDTH;
static int finit_height = SCREENHEIGHT - 32;
-// location of window on screen
+
static int f_x;
static int f_y;
-// size of window on screen
+
static int f_w;
static int f_h;
-static int lightlev; // used for funky strobing effect
-static byte* fb; // pseudo-frame buffer
+static int lightlev;
+static byte* fb;
static int amclock;
-static mpoint_t m_paninc; // how far the window pans each tic (map coords)
-static fixed_t mtof_zoommul; // how far the window zooms in each tic (map coords)
-static fixed_t ftom_zoommul; // how far the window zooms in each tic (fb coords)
+static mpoint_t m_paninc;
+static fixed_t mtof_zoommul;
+static fixed_t ftom_zoommul;
+
+static fixed_t m_x, m_y;
+static fixed_t m_x2, m_y2;
+
+
-static fixed_t m_x, m_y; // LL x,y where the window is on the map (map coords)
-static fixed_t m_x2, m_y2; // UR x,y where the window is on the map (map coords)
-//
-// width/height of window on map (map coords)
-//
static fixed_t m_w;
static fixed_t m_h;
-// based on level size
+
static fixed_t min_x;
static fixed_t min_y;
static fixed_t max_x;
static fixed_t max_y;
-static fixed_t max_w; // max_x-min_x,
-static fixed_t max_h; // max_y-min_y
+static fixed_t max_w;
+static fixed_t max_h;
+
-// based on player size
static fixed_t min_w;
static fixed_t min_h;
-static fixed_t min_scale_mtof; // used to tell when to stop zooming out
-static fixed_t max_scale_mtof; // used to tell when to stop zooming in
+static fixed_t min_scale_mtof;
+static fixed_t max_scale_mtof;
+
-// old stuff for recovery later
static fixed_t old_m_w, old_m_h;
static fixed_t old_m_x, old_m_y;
-// old location used by the Follower routine
+
static mpoint_t f_oldloc;
-// used by MTOF to scale from map-to-frame-buffer coords
+
static fixed_t scale_mtof = INITSCALEMTOF;
-// used by FTOM to scale from frame-buffer-to-map coords (=1/scale_mtof)
+
static fixed_t scale_ftom;
-static player_t *plr; // the player represented by an arrow
+static player_t *plr;
-static patch_t *marknums[10]; // numbers used for marking by the automap
-static mpoint_t markpoints[AM_NUMMARKPOINTS]; // where the points are
-static int markpointnum = 0; // next point to be assigned
+static patch_t *marknums[10];
+static mpoint_t markpoints[AM_NUMMARKPOINTS];
+static int markpointnum = 0;
-static int followplayer = 1; // specifies whether to follow the player around
+static int followplayer = 1;
static unsigned char cheat_amap_seq[] = { 0xb2, 0x26, 0x26, 0x2e, 0xff };
static cheatseq_t cheat_amap = { cheat_amap_seq, 0 };
@@ -290,7 +290,7 @@ static cheatseq_t cheat_amap = { cheat_amap_seq, 0 };
static boolean stopped = true;
extern boolean viewactive;
-//extern byte screens[][SCREENWIDTH*SCREENHEIGHT];
+
@@ -301,9 +301,9 @@ V_MarkRect
int width,
int height );
-// Calculates the slope and slope according to the x-axis of a line
-// segment in map coordinates (with the upright y-axis n' all) so
-// that it can be used with the brain-dead drawing stuff.
+
+
+
void
AM_getIslope
@@ -321,9 +321,9 @@ AM_getIslope
}
-//
-//
-//
+
+
+
void AM_activateNewScale(void)
{
m_x += m_w/2;
@@ -336,9 +336,9 @@ void AM_activateNewScale(void)
m_y2 = m_y + m_h;
}
-//
-//
-//
+
+
+
void AM_saveScaleAndLoc(void)
{
old_m_x = m_x;
@@ -347,9 +347,9 @@ void AM_saveScaleAndLoc(void)
old_m_h = m_h;
}
-//
-//
-//
+
+
+
void AM_restoreScaleAndLoc(void)
{
@@ -366,14 +366,14 @@ void AM_restoreScaleAndLoc(void)
m_x2 = m_x + m_w;
m_y2 = m_y + m_h;
- // Change the scaling multipliers
+
scale_mtof = FixedDiv(f_w<<FRACBITS, m_w);
scale_ftom = FixedDiv(FRACUNIT, scale_mtof);
}
-//
-// adds a marker at the current location
-//
+
+
+
void AM_addMark(void)
{
markpoints[markpointnum].x = m_x + m_w/2;
@@ -382,10 +382,10 @@ void AM_addMark(void)
}
-//
-// Determines bounding box of all vertices,
-// sets global variables controlling zoom range.
-//
+
+
+
+
void AM_findMinMaxBoundaries(void)
{
int i;
@@ -411,7 +411,7 @@ void AM_findMinMaxBoundaries(void)
max_w = max_x - min_x;
max_h = max_y - min_y;
- min_w = 2*PLAYERRADIUS; // const? never changed?
+ min_w = 2*PLAYERRADIUS;
min_h = 2*PLAYERRADIUS;
a = FixedDiv(f_w<<FRACBITS, max_w);
@@ -423,9 +423,9 @@ void AM_findMinMaxBoundaries(void)
}
-//
-//
-//
+
+
+
void AM_changeWindowLoc(void)
{
if (m_paninc.x || m_paninc.y)
@@ -452,9 +452,9 @@ void AM_changeWindowLoc(void)
}
-//
-//
-//
+
+
+
void AM_initVariables(void)
{
int pnum;
@@ -474,7 +474,7 @@ void AM_initVariables(void)
m_w = FTOM(f_w);
m_h = FTOM(f_h);
- // find player to center on initially
+
if (!playeringame[pnum = consoleplayer])
for (pnum=0;pnum<MAXPLAYERS;pnum++)
if (playeringame[pnum])
@@ -485,20 +485,20 @@ void AM_initVariables(void)
m_y = plr->mo->y - m_h/2;
AM_changeWindowLoc();
- // for saving & restoring
+
old_m_x = m_x;
old_m_y = m_y;
old_m_w = m_w;
old_m_h = m_h;
- // inform the status bar of the change
+
ST_Responder(&st_notify);
}
-//
-//
-//
+
+
+
void AM_loadPics(void)
{
int i;
@@ -526,14 +526,14 @@ void AM_clearMarks(void)
int i;
for (i=0;i<AM_NUMMARKPOINTS;i++)
- markpoints[i].x = -1; // means empty
+ markpoints[i].x = -1;
markpointnum = 0;
}
-//
-// should be called at the start of every level
-// right now, i figure it out myself
-//
+
+
+
+
void AM_LevelInit(void)
{
leveljuststarted = 0;
@@ -554,9 +554,9 @@ void AM_LevelInit(void)
-//
-//
-//
+
+
+
void AM_Stop (void)
{
static event_t st_notify = { 0, ev_keyup, AM_MSGEXITED };
@@ -567,9 +567,9 @@ void AM_Stop (void)
stopped = true;
}
-//
-//
-//
+
+
+
void AM_Start (void)
{
static int lastlevel = -1, lastepisode = -1;
@@ -586,9 +586,9 @@ void AM_Start (void)
AM_loadPics();
}
-//
-// set the window scale to the maximum size
-//
+
+
+
void AM_minOutWindowScale(void)
{
scale_mtof = min_scale_mtof;
@@ -596,9 +596,9 @@ void AM_minOutWindowScale(void)
AM_activateNewScale();
}
-//
-// set the window scale to the minimum size
-//
+
+
+
void AM_maxOutWindowScale(void)
{
scale_mtof = max_scale_mtof;
@@ -607,9 +607,9 @@ void AM_maxOutWindowScale(void)
}
-//
-// Handle events (user inputs) in automap mode
-//
+
+
+
boolean
AM_Responder
( event_t* ev )
@@ -638,27 +638,27 @@ AM_Responder
rc = true;
switch(ev->data1)
{
- case AM_PANRIGHTKEY: // pan right
+ case AM_PANRIGHTKEY:
if (!followplayer) m_paninc.x = FTOM(F_PANINC);
else rc = false;
break;
- case AM_PANLEFTKEY: // pan left
+ case AM_PANLEFTKEY:
if (!followplayer) m_paninc.x = -FTOM(F_PANINC);
else rc = false;
break;
- case AM_PANUPKEY: // pan up
+ case AM_PANUPKEY:
if (!followplayer) m_paninc.y = FTOM(F_PANINC);
else rc = false;
break;
- case AM_PANDOWNKEY: // pan down
+ case AM_PANDOWNKEY:
if (!followplayer) m_paninc.y = -FTOM(F_PANINC);
else rc = false;
break;
- case AM_ZOOMOUTKEY: // zoom out
+ case AM_ZOOMOUTKEY:
mtof_zoommul = M_ZOOMOUT;
ftom_zoommul = M_ZOOMIN;
break;
- case AM_ZOOMINKEY: // zoom in
+ case AM_ZOOMINKEY:
mtof_zoommul = M_ZOOMIN;
ftom_zoommul = M_ZOOMOUT;
break;
@@ -735,13 +735,13 @@ AM_Responder
}
-//
-// Zooming
-//
+
+
+
void AM_changeWindowScale(void)
{
- // Change the scaling multipliers
+
scale_mtof = FixedMul(scale_mtof, mtof_zoommul);
scale_ftom = FixedDiv(FRACUNIT, scale_mtof);
@@ -754,9 +754,9 @@ void AM_changeWindowScale(void)
}
-//
-//
-//
+
+
+
void AM_doFollowPlayer(void)
{
@@ -769,26 +769,26 @@ void AM_doFollowPlayer(void)
f_oldloc.x = plr->mo->x;
f_oldloc.y = plr->mo->y;
- // m_x = FTOM(MTOF(plr->mo->x - m_w/2));
- // m_y = FTOM(MTOF(plr->mo->y - m_h/2));
- // m_x = plr->mo->x - m_w/2;
- // m_y = plr->mo->y - m_h/2;
+
+
+
+
}
}
-//
-//
-//
+
+
+
void AM_updateLightLev(void)
{
static nexttic = 0;
- //static int litelevels[] = { 0, 3, 5, 6, 6, 7, 7, 7 };
+
static int litelevels[] = { 0, 4, 7, 10, 12, 14, 15, 15 };
static int litelevelscnt = 0;
- // Change light level
+
if (amclock>nexttic)
{
lightlev = litelevels[litelevelscnt++];
@@ -799,9 +799,9 @@ void AM_updateLightLev(void)
}
-//
-// Updates on Game Tick
-//
+
+
+
void AM_Ticker (void)
{
@@ -813,36 +813,36 @@ void AM_Ticker (void)
if (followplayer)
AM_doFollowPlayer();
- // Change the zoom if necessary
+
if (ftom_zoommul != FRACUNIT)
AM_changeWindowScale();
- // Change x,y location
+
if (m_paninc.x || m_paninc.y)
AM_changeWindowLoc();
- // Update light level
- // AM_updateLightLev();
+
+
}
-//
-// Clear automap frame buffer.
-//
+
+
+
void AM_clearFB(int color)
{
memset(fb, color, f_w*f_h);
}
-//
-// Automap clipping of lines.
-//
-// Based on Cohen-Sutherland clipping algorithm but with a slightly
-// faster reject and precalculated slopes. If the speed is needed,
-// use a hash algorithm to handle the common cases.
-//
+
+
+
+
+
+
+
boolean
AM_clipMline
( mline_t* ml,
@@ -873,7 +873,7 @@ AM_clipMline
else if ((mx) >= f_w) (oc) |= RIGHT;
- // do trivial rejects and outcodes
+
if (ml->a.y > m_y2)
outcode1 = TOP;
else if (ml->a.y < m_y)
@@ -885,7 +885,7 @@ AM_clipMline
outcode2 = BOTTOM;
if (outcode1 & outcode2)
- return false; // trivially outside
+ return false;
if (ml->a.x < m_x)
outcode1 |= LEFT;
@@ -898,9 +898,9 @@ AM_clipMline
outcode2 |= RIGHT;
if (outcode1 & outcode2)
- return false; // trivially outside
+ return false;
- // transform to frame-buffer coordinates.
+
fl->a.x = CXMTOF(ml->a.x);
fl->a.y = CYMTOF(ml->a.y);
fl->b.x = CXMTOF(ml->b.x);
@@ -914,14 +914,14 @@ AM_clipMline
while (outcode1 | outcode2)
{
- // may be partially inside box
- // find an outside point
+
+
if (outcode1)
outside = outcode1;
else
outside = outcode2;
- // clip to each side
+
if (outside & TOP)
{
dy = fl->a.y - fl->b.y;
@@ -963,7 +963,7 @@ AM_clipMline
}
if (outcode1 & outcode2)
- return false; // trivially outside
+ return false;
}
return true;
@@ -971,9 +971,9 @@ AM_clipMline
#undef DOOUTCODE
-//
-// Classic Bresenham w/ whatever optimizations needed for speed
-//
+
+
+
void
AM_drawFline
( fline_t* fl,
@@ -991,7 +991,7 @@ AM_drawFline
static fuck = 0;
- // For debugging only
+
if ( fl->a.x < 0 || fl->a.x >= f_w
|| fl->a.y < 0 || fl->a.y >= f_h
|| fl->b.x < 0 || fl->b.x >= f_w
@@ -1049,9 +1049,9 @@ AM_drawFline
}
-//
-// Clip lines, draw visible part sof lines.
-//
+
+
+
void
AM_drawMline
( mline_t* ml,
@@ -1060,28 +1060,28 @@ AM_drawMline
static fline_t fl;
if (AM_clipMline(ml, &fl))
- AM_drawFline(&fl, color); // draws it on frame buffer using fb coords
+ AM_drawFline(&fl, color);
}
-//
-// Draws flat (floor/ceiling tile) aligned grid lines.
-//
+
+
+
void AM_drawGrid(int color)
{
fixed_t x, y;
fixed_t start, end;
mline_t ml;
- // Figure out start of vertical gridlines
+
start = m_x;
if ((start-bmaporgx)%(MAPBLOCKUNITS<<FRACBITS))
start += (MAPBLOCKUNITS<<FRACBITS)
- ((start-bmaporgx)%(MAPBLOCKUNITS<<FRACBITS));
end = m_x + m_w;
- // draw vertical gridlines
+
ml.a.y = m_y;
ml.b.y = m_y+m_h;
for (x=start; x<end; x+=(MAPBLOCKUNITS<<FRACBITS))
@@ -1091,14 +1091,14 @@ void AM_drawGrid(int color)
AM_drawMline(&ml, color);
}
- // Figure out start of horizontal gridlines
+
start = m_y;
if ((start-bmaporgy)%(MAPBLOCKUNITS<<FRACBITS))
start += (MAPBLOCKUNITS<<FRACBITS)
- ((start-bmaporgy)%(MAPBLOCKUNITS<<FRACBITS));
end = m_y + m_h;
- // draw horizontal gridlines
+
ml.a.x = m_x;
ml.b.x = m_x + m_w;
for (y=start; y<end; y+=(MAPBLOCKUNITS<<FRACBITS))
@@ -1110,10 +1110,10 @@ void AM_drawGrid(int color)
}
-//
-// Determines visible lines, draws them.
-// This is LineDef based, not LineSeg based.
-//
+
+
+
+
void AM_drawWalls(void)
{
int i;
@@ -1136,21 +1136,21 @@ void AM_drawWalls(void)
else
{
if (lines[i].special == 39)
- { // teleporters
+ {
AM_drawMline(&l, WALLCOLORS+WALLRANGE/2);
}
- else if (lines[i].flags & ML_SECRET) // secret door
+ else if (lines[i].flags & ML_SECRET)
{
if (cheating) AM_drawMline(&l, SECRETWALLCOLORS + lightlev);
else AM_drawMline(&l, WALLCOLORS+lightlev);
}
else if (lines[i].backsector->floorheight
!= lines[i].frontsector->floorheight) {
- AM_drawMline(&l, FDWALLCOLORS + lightlev); // floor level change
+ AM_drawMline(&l, FDWALLCOLORS + lightlev);
}
else if (lines[i].backsector->ceilingheight
!= lines[i].frontsector->ceilingheight) {
- AM_drawMline(&l, CDWALLCOLORS+lightlev); // ceiling level change
+ AM_drawMline(&l, CDWALLCOLORS+lightlev);
}
else if (cheating) {
AM_drawMline(&l, TSWALLCOLORS+lightlev);
@@ -1165,10 +1165,10 @@ void AM_drawWalls(void)
}
-//
-// Rotation in 2D.
-// Used to rotate player arrow line character.
-//
+
+
+
+
void
AM_rotate
( fixed_t* x,
@@ -1270,7 +1270,7 @@ void AM_drawPlayers(void)
continue;
if (p->powers[pw_invisibility])
- color = 246; // *close* to black
+ color = 246;
else
color = their_colors[their_color];
@@ -1310,10 +1310,10 @@ void AM_drawMarks(void)
{
if (markpoints[i].x != -1)
{
- // w = SHORT(marknums[i]->width);
- // h = SHORT(marknums[i]->height);
- w = 5; // because something's wrong with the wad, i guess
- h = 6; // because something's wrong with the wad, i guess
+
+
+ w = 5;
+ h = 6;
fx = CXMTOF(markpoints[i].x);
fy = CYMTOF(markpoints[i].y);
if (fx >= f_x && fx <= f_w - w && fy >= f_y && fy <= f_h - h)
@@ -1325,7 +1325,7 @@ void AM_drawMarks(void)
void AM_drawCrosshair(int color)
{
- fb[(f_w*(f_h+1))/2] = color; // single point for now
+ fb[(f_w*(f_h+1))/2] = color;
}
diff --git a/src/am_map.h b/src/am_map.h
@@ -1,52 +1,52 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// AutoMap module.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __AMMAP_H__
#define __AMMAP_H__
-// Used by ST StatusBar stuff.
+
#define AM_MSGHEADER (('a'<<24)+('m'<<16))
#define AM_MSGENTERED (AM_MSGHEADER | ('e'<<8))
#define AM_MSGEXITED (AM_MSGHEADER | ('x'<<8))
-// Called by main loop.
+
boolean AM_Responder (event_t* ev);
-// Called by main loop.
+
void AM_Ticker (void);
-// Called by main loop,
-// called instead of view drawer if automap active.
+
+
void AM_Drawer (void);
-// Called to force the automap to quit
-// if the level is completed while it is up.
+
+
void AM_Stop (void);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/d_englsh.h b/src/d_englsh.h
@@ -1,41 +1,41 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Printed strings for translation.
-// English language support (default).
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __D_ENGLSH__
#define __D_ENGLSH__
-//
-// Printed strings for translation
-//
-//
-// D_Main.C
-//
+
+
+
+
+
+
#define D_DEVSTR "Development mode ON.\n"
#define D_CDROM "CD-ROM Version: default.cfg from c:\\doomdata\n"
-//
-// M_Menu.C
-//
+
+
+
#define PRESSKEY "press a key."
#define PRESSYN "press y or n."
#define QUITMSG "are you sure you want to\nquit this great game?"
@@ -74,9 +74,9 @@
#define GAMMALVL4 "Gamma correction level 4"
#define EMPTYSTRING "empty slot"
-//
-// P_inter.C
-//
+
+
+
#define GOTARMOR "Picked up the armor."
#define GOTMEGA "Picked up the MegaArmor!"
#define GOTHTHBONUS "Picked up a health bonus."
@@ -119,9 +119,9 @@
#define GOTSHOTGUN "You got the shotgun!"
#define GOTSHOTGUN2 "You got the super shotgun!"
-//
-// P_Doors.C
-//
+
+
+
#define PD_BLUEO "You need a blue key to activate this object"
#define PD_REDO "You need a red key to activate this object"
#define PD_YELLOWO "You need a yellow key to activate this object"
@@ -129,14 +129,14 @@
#define PD_REDK "You need a red key to open this door"
#define PD_YELLOWK "You need a yellow key to open this door"
-//
-// G_game.C
-//
+
+
+
#define GGSAVED "game saved."
-//
-// HU_stuff.C
-//
+
+
+
#define HUSTR_MSGU "[Message unsent]"
#define HUSTR_E1M1 "E1M1: Hangar"
@@ -306,8 +306,8 @@
#define HUSTR_MESSAGESENT "[Message Sent]"
-// The following should NOT be changed unless it seems
-// just AWFULLY necessary
+
+
#define HUSTR_PLRGREEN "Green: "
#define HUSTR_PLRINDIGO "Indigo: "
@@ -319,9 +319,9 @@
#define HUSTR_KEYBROWN 'b'
#define HUSTR_KEYRED 'r'
-//
-// AM_map.C
-//
+
+
+
#define AMSTR_FOLLOWON "Follow Mode ON"
#define AMSTR_FOLLOWOFF "Follow Mode OFF"
@@ -332,9 +332,9 @@
#define AMSTR_MARKEDSPOT "Marked Spot"
#define AMSTR_MARKSCLEARED "All Marks Cleared"
-//
-// ST_stuff.C
-//
+
+
+
#define STSTR_MUS "Music Change"
#define STSTR_NOMUS "IMPOSSIBLE SELECTION"
@@ -353,9 +353,9 @@
#define STSTR_CHOPPERS "... doesn't suck - GM"
#define STSTR_CLEV "Changing Level..."
-//
-// F_Finale.C
-//
+
+
+
#define E1TEXT \
"Once you beat the big badasses and\n"\
"clean out the moon base you're supposed\n"\
@@ -433,7 +433,7 @@
"next stop, hell on earth!"
-// after level 6, put this:
+
#define C1TEXT \
"YOU HAVE ENTERED DEEPLY INTO THE INFESTED\n" \
@@ -449,7 +449,7 @@
"SWITCH WHICH HOLDS EARTH'S POPULATION\n" \
"HOSTAGE."
-// After level 11, put this:
+
#define C2TEXT \
"YOU HAVE WON! YOUR VICTORY HAS ENABLED\n" \
@@ -471,7 +471,7 @@
"UP AND RETURN TO THE FRAY."
-// After level 20, put this:
+
#define C3TEXT \
"YOU ARE AT THE CORRUPT HEART OF THE CITY,\n"\
@@ -485,7 +485,7 @@
"GOT TO GO THROUGH HELL TO GET TO IT?"
-// After level 29, put this:
+
#define C4TEXT \
"THE HORRENDOUS VISAGE OF THE BIGGEST\n"\
@@ -506,7 +506,7 @@
-// Before level 31, put this:
+
#define C5TEXT \
"CONGRATULATIONS, YOU'VE FOUND THE SECRET\n"\
@@ -516,7 +516,7 @@
"WILL BE."
-// Before level 32, put this:
+
#define C6TEXT \
"CONGRATULATIONS, YOU'VE FOUND THE\n"\
@@ -524,7 +524,7 @@
"BLAZE THROUGH THIS ONE!\n"
-// after map 06
+
#define P1TEXT \
"You gloat over the steaming carcass of the\n"\
@@ -541,7 +541,7 @@
"Oh yes, keep living, too."
-// after map 11
+
#define P2TEXT \
"Even the deadly Arch-Vile labyrinth could\n"\
@@ -552,7 +552,7 @@
"You're good at that kind of thing."
-// after map 20
+
#define P3TEXT \
"You've bashed and battered your way into\n"\
@@ -566,7 +566,7 @@
"get ready to give the bastard a little Hell\n"\
"of your own making!"
-// after map 30
+
#define P4TEXT \
"The Gatekeeper's evil face is splattered\n"\
@@ -582,7 +582,7 @@
"when you die, you'll need it for some\n"\
"final cleaning-up ..."
-// before map 31
+
#define P5TEXT \
"You've found the second-hardest level we\n"\
@@ -590,7 +590,7 @@
"two previous. If not, be prepared to die\n"\
"aplenty. For master marines only."
-// before map 32
+
#define P6TEXT \
"Betcha wondered just what WAS the hardest\n"\
@@ -671,9 +671,9 @@
-//
-// Character cast strings F_FINALE.C
-//
+
+
+
#define CC_ZOMBIE "ZOMBIEMAN"
#define CC_SHOTGUN "SHOTGUN GUY"
#define CC_HEAVY "HEAVY WEAPON DUDE"
@@ -694,8 +694,8 @@
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/d_event.h b/src/d_event.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-//
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __D_EVENT__
@@ -27,11 +27,11 @@
#include "doomtype.h"
-//
-// Event handling.
-//
-// Input event types.
+
+
+
+
typedef enum
{
ev_keydown,
@@ -40,13 +40,13 @@ typedef enum
ev_joystick
} evtype_t;
-// Event structure.
+
typedef struct
{
evtype_t type;
- int data1; // keys / mouse/joystick buttons
- int data2; // mouse/joystick x move
- int data3; // mouse/joystick y move
+ int data1;
+ int data2;
+ int data3;
} event_t;
@@ -66,34 +66,34 @@ typedef enum
-//
-// Button/action code definitions.
-//
+
+
+
typedef enum
{
- // Press "Fire".
+
BT_ATTACK = 1,
- // Use button, to open doors, activate switches.
+
BT_USE = 2,
- // Flag: game events, not really buttons.
+
BT_SPECIAL = 128,
BT_SPECIALMASK = 3,
- // Flag, weapon change pending.
- // If true, the next 3 bits hold weapon num.
+
+
BT_CHANGE = 4,
- // The 3bit weapon mask and shift, convenience.
+
BT_WEAPONMASK = (8+16+32),
BT_WEAPONSHIFT = 3,
- // Pause the game.
+
BTS_PAUSE = 1,
- // Save the game at each console.
+
BTS_SAVEGAME = 2,
- // Savegame slot numbers
- // occupy the second byte of buttons.
+
+
BTS_SAVEMASK = (4+8+16),
BTS_SAVESHIFT = 2,
@@ -102,9 +102,9 @@ typedef enum
-//
-// GLOBAL VARIABLES
-//
+
+
+
#define MAXEVENTS 64
extern event_t events[MAXEVENTS];
@@ -115,8 +115,8 @@ extern gameaction_t gameaction;
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/d_french.h b/src/d_french.h
@@ -1,37 +1,37 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Printed strings, french translation.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __D_FRENCH__
#define __D_FRENCH__
-//
-// D_Main.C
-//
+
+
+
#define D_DEVSTR "MODE DEVELOPPEMENT ON.\n"
#define D_CDROM "VERSION CD-ROM: DEFAULT.CFG DANS C:\\DOOMDATA\n"
-//
-// M_Menu.C
-//
+
+
+
#define PRESSKEY "APPUYEZ SUR UNE TOUCHE."
#define PRESSYN "APPUYEZ SUR Y OU N"
#define QUITMSG "VOUS VOULEZ VRAIMENT\nQUITTER CE SUPER JEU?"
@@ -66,9 +66,9 @@
#define GAMMALVL4 "CORRECTION GAMMA NIVEAU 4"
#define EMPTYSTRING "EMPLACEMENT VIDE"
-//
-// P_inter.C
-//
+
+
+
#define GOTARMOR "ARMURE RECUPEREE."
#define GOTMEGA "MEGA-ARMURE RECUPEREE!"
#define GOTHTHBONUS "BONUS DE SANTE RECUPERE."
@@ -111,9 +111,9 @@
#define GOTSHOTGUN "VOUS AVEZ UN FUSIL!"
#define GOTSHOTGUN2 "VOUS AVEZ UN SUPER FUSIL!"
-//
-// P_Doors.C
-//
+
+
+
#define PD_BLUEO "IL VOUS FAUT UNE CLEF BLEUE"
#define PD_REDO "IL VOUS FAUT UNE CLEF ROUGE"
#define PD_YELLOWO "IL VOUS FAUT UNE CLEF JAUNE"
@@ -121,14 +121,14 @@
#define PD_REDK PD_REDO
#define PD_YELLOWK PD_YELLOWO
-//
-// G_game.C
-//
+
+
+
#define GGSAVED "JEU SAUVEGARDE."
-//
-// HU_stuff.C
-//
+
+
+
#define HUSTR_MSGU "[MESSAGE NON ENVOYE]"
#define HUSTR_E1M1 "E1M1: HANGAR"
@@ -217,22 +217,22 @@
#define HUSTR_MESSAGESENT "[MESSAGE ENVOYE]"
-// The following should NOT be changed unless it seems
-// just AWFULLY necessary
+
+
#define HUSTR_PLRGREEN "VERT: "
#define HUSTR_PLRINDIGO "INDIGO: "
#define HUSTR_PLRBROWN "BRUN: "
#define HUSTR_PLRRED "ROUGE: "
-#define HUSTR_KEYGREEN 'g' // french key should be "V"
+#define HUSTR_KEYGREEN 'g'
#define HUSTR_KEYINDIGO 'i'
#define HUSTR_KEYBROWN 'b'
#define HUSTR_KEYRED 'r'
-//
-// AM_map.C
-//
+
+
+
#define AMSTR_FOLLOWON "MODE POURSUITE ON"
#define AMSTR_FOLLOWOFF "MODE POURSUITE OFF"
@@ -243,9 +243,9 @@
#define AMSTR_MARKEDSPOT "REPERE MARQUE "
#define AMSTR_MARKSCLEARED "REPERES EFFACES "
-//
-// ST_stuff.C
-//
+
+
+
#define STSTR_MUS "CHANGEMENT DE MUSIQUE "
#define STSTR_NOMUS "IMPOSSIBLE SELECTION"
@@ -264,9 +264,9 @@
#define STSTR_CHOPPERS "... DOESN'T SUCK - GM"
#define STSTR_CLEV "CHANGEMENT DE NIVEAU..."
-//
-// F_Finale.C
-//
+
+
+
#define E1TEXT "APRES AVOIR VAINCU LES GROS MECHANTS\n"\
"ET NETTOYE LA BASE LUNAIRE, VOUS AVEZ\n"\
"GAGNE, NON? PAS VRAI? OU EST DONC VOTRE\n"\
@@ -321,7 +321,7 @@
-// after level 6, put this:
+
#define C1TEXT "VOUS ETES AU PLUS PROFOND DE L'ASTROPORT\n" \
"INFESTE DE MONSTRES, MAIS QUELQUE CHOSE\n" \
@@ -336,7 +336,7 @@
"L'INTERRUPTEUR DE CONTROLE QUI GARDE LA \n" \
"POPULATION DE LA TERRE EN OTAGE."
-// After level 11, put this:
+
#define C2TEXT "VOUS AVEZ GAGNE! VOTRE VICTOIRE A PERMIS\n" \
"A L'HUMANITE D'EVACUER LA TERRE ET \n"\
@@ -356,7 +356,7 @@
"VOUS VOUS RELEVEZ LENTEMENT ET PENIBLEMENT\n"\
"ET VOUS REPARTEZ POUR LE FRONT."
-// After level 20, put this:
+
#define C3TEXT "VOUS ETES AU COEUR DE LA CITE CORROMPUE,\n"\
"ENTOURE PAR LES CADAVRES DE VOS ENNEMIS.\n"\
@@ -368,7 +368,7 @@
"DE L'AUTRE COTE. VOUS ACCEPTEZ DE\n"\
"TRAVERSER L'ENFER POUR LE FAIRE?"
-// After level 29, put this:
+
#define C4TEXT "LE VISAGE HORRIBLE D'UN DEMON D'UNE\n"\
"TAILLE INCROYABLE S'EFFONDRE DEVANT\n"\
@@ -386,7 +386,7 @@
"VERS LA TERRE. SA RECONSTRUCTION SERA\n"\
"BEAUCOUP PLUS DROLE QUE SA DESTRUCTION.\n"
-// Before level 31, put this:
+
#define C5TEXT "FELICITATIONS! VOUS AVEZ TROUVE LE\n"\
"NIVEAU SECRET! IL SEMBLE AVOIR ETE\n"\
@@ -394,15 +394,15 @@
"DEMANDEZ QUELS PEUVENT ETRE LES\n"\
"HABITANTS DE CE COIN PERDU DE L'ENFER."
-// Before level 32, put this:
+
#define C6TEXT "FELICITATIONS! VOUS AVEZ DECOUVERT\n"\
"LE NIVEAU SUPER SECRET! VOUS FERIEZ\n"\
"MIEUX DE FONCER DANS CELUI-LA!\n"
-//
-// Character cast strings F_FINALE.C
-//
+
+
+
#define CC_ZOMBIE "ZOMBIE"
#define CC_SHOTGUN "TYPE AU FUSIL"
#define CC_HEAVY "MEC SUPER-ARME"
@@ -424,10 +424,10 @@
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/d_items.c b/src/d_items.c
@@ -1,29 +1,29 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id:$";
-// We are referring to sprite numbers.
+
#include "info.h"
#ifdef __GNUG__
@@ -32,22 +32,22 @@ rcsid[] = "$Id:$";
#include "d_items.h"
-//
-// PSPRITE ACTIONS for waepons.
-// This struct controls the weapon animations.
-//
-// Each entry is:
-// ammo/amunition type
-// upstate
-// downstate
-// readystate
-// atkstate, i.e. attack/fire/hit frame
-// flashstate, muzzle flash
-//
+
+
+
+
+
+
+
+
+
+
+
+
weaponinfo_t weaponinfo[NUMWEAPONS] =
{
{
- // fist
+
am_noammo,
S_PUNCHUP,
S_PUNCHDOWN,
@@ -56,7 +56,7 @@ weaponinfo_t weaponinfo[NUMWEAPONS] =
S_NULL
},
{
- // pistol
+
am_clip,
S_PISTOLUP,
S_PISTOLDOWN,
@@ -65,7 +65,7 @@ weaponinfo_t weaponinfo[NUMWEAPONS] =
S_PISTOLFLASH
},
{
- // shotgun
+
am_shell,
S_SGUNUP,
S_SGUNDOWN,
@@ -74,7 +74,7 @@ weaponinfo_t weaponinfo[NUMWEAPONS] =
S_SGUNFLASH1
},
{
- // chaingun
+
am_clip,
S_CHAINUP,
S_CHAINDOWN,
@@ -83,7 +83,7 @@ weaponinfo_t weaponinfo[NUMWEAPONS] =
S_CHAINFLASH1
},
{
- // missile launcher
+
am_misl,
S_MISSILEUP,
S_MISSILEDOWN,
@@ -92,7 +92,7 @@ weaponinfo_t weaponinfo[NUMWEAPONS] =
S_MISSILEFLASH1
},
{
- // plasma rifle
+
am_cell,
S_PLASMAUP,
S_PLASMADOWN,
@@ -101,7 +101,7 @@ weaponinfo_t weaponinfo[NUMWEAPONS] =
S_PLASMAFLASH1
},
{
- // bfg 9000
+
am_cell,
S_BFGUP,
S_BFGDOWN,
@@ -110,7 +110,7 @@ weaponinfo_t weaponinfo[NUMWEAPONS] =
S_BFGFLASH1
},
{
- // chainsaw
+
am_noammo,
S_SAWUP,
S_SAWDOWN,
@@ -119,7 +119,7 @@ weaponinfo_t weaponinfo[NUMWEAPONS] =
S_NULL
},
{
- // super shotgun
+
am_shell,
S_DSGUNUP,
S_DSGUNDOWN,
diff --git a/src/d_items.h b/src/d_items.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Items: key cards, artifacts, weapon, ammunition.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __D_ITEMS__
@@ -30,7 +30,7 @@
#endif
-// Weapon info: sprite frames, ammunition use.
+
typedef struct
{
ammotype_t ammo;
@@ -45,8 +45,8 @@ typedef struct
extern weaponinfo_t weaponinfo[NUMWEAPONS];
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/d_main.c b/src/d_main.c
@@ -1,28 +1,28 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// DOOM main program (D_DoomMain) and game loop (D_DoomLoop),
-// plus functions to determine game mode (shareware, registered),
-// parse command line parameters, configure game parameters (turbo),
-// and call the startup functions.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char rcsid[] = "$Id: d_main.c,v 1.8 1997/02/03 22:45:09 b1 Exp $";
@@ -77,35 +77,35 @@ static const char rcsid[] = "$Id: d_main.c,v 1.8 1997/02/03 22:45:09 b1 Exp $";
#include "d_main.h"
-//
-// D-DoomLoop()
-// Not a globally visible function,
-// just included for source reference,
-// called by D_DoomMain, never exits.
-// Manages timing and IO,
-// calls all ?_Responder, ?_Ticker, and ?_Drawer,
-// calls I_GetTime, I_StartFrame, and I_StartTic
-//
+
+
+
+
+
+
+
+
+
void D_DoomLoop (void);
char* wadfiles[MAXWADFILES];
-boolean devparm; // started game with -devparm
-boolean nomonsters; // checkparm of -nomonsters
-boolean respawnparm; // checkparm of -respawn
-boolean fastparm; // checkparm of -fast
+boolean devparm;
+boolean nomonsters;
+boolean respawnparm;
+boolean fastparm;
boolean drone;
-boolean singletics = false; // debug flag to cancel adaptiveness
+boolean singletics = false;
+
+
+
-//extern int soundVolume;
-//extern int sfxVolume;
-//extern int musicVolume;
extern boolean inhelpscreens;
@@ -121,9 +121,9 @@ boolean advancedemo;
-char wadfile[1024]; // primary wad file
-char mapdir[1024]; // directory of development maps
-char basedefault[1024]; // default file
+char wadfile[1024];
+char mapdir[1024];
+char basedefault[1024];
void D_CheckNetGame (void);
@@ -132,21 +132,21 @@ void G_BuildTiccmd (ticcmd_t* cmd);
void D_DoAdvanceDemo (void);
-//
-// EVENT HANDLING
-//
-// Events are asynchronous inputs generally generated by the game user.
-// Events can be discarded if no responder claims them
-//
+
+
+
+
+
+
event_t events[MAXEVENTS];
int eventhead;
int eventtail;
-//
-// D_PostEvent
-// Called by the I/O functions when input is detected
-//
+
+
+
+
void D_PostEvent (event_t* ev)
{
events[eventhead] = *ev;
@@ -154,15 +154,15 @@ void D_PostEvent (event_t* ev)
}
-//
-// D_ProcessEvents
-// Send all the events of the given timestamp down the responder chain
-//
+
+
+
+
void D_ProcessEvents (void)
{
event_t* ev;
- // IF STORE DEMO, DO NOT ACCEPT INPUT
+
if ( ( gamemode == commercial )
&& (W_CheckNumForName("map01")<0) )
return;
@@ -171,7 +171,7 @@ void D_ProcessEvents (void)
{
ev = &events[eventtail];
if (M_Responder (ev))
- continue; // menu ate the event
+ continue;
G_Responder (ev);
}
}
@@ -179,12 +179,12 @@ void D_ProcessEvents (void)
-//
-// D_Display
-// draw current display, possibly wiping it from the previous
-//
-// wipegamestate can be set to -1 to force a wipe on the next draw
+
+
+
+
+
gamestate_t wipegamestate = GS_DEMOSCREEN;
extern boolean setsizeneeded;
extern int showMessages;
@@ -207,19 +207,19 @@ void D_Display (void)
boolean redrawsbar;
if (nodrawers)
- return; // for comparative timing / profiling
+ return;
redrawsbar = false;
- // change the view size if needed
+
if (setsizeneeded)
{
R_ExecuteSetViewSize ();
- oldgamestate = -1; // force background redraw
+ oldgamestate = -1;
borderdrawcount = 3;
}
- // save the current screen if about to wipe
+
if (gamestate != wipegamestate)
{
wipe = true;
@@ -231,7 +231,7 @@ void D_Display (void)
if (gamestate == GS_LEVEL && gametic)
HU_Erase();
- // do buffered drawing
+
switch (gamestate)
{
case GS_LEVEL:
@@ -242,7 +242,7 @@ void D_Display (void)
if (wipe || (viewheight != 200 && fullscreen) )
redrawsbar = true;
if (inhelpscreensstate && !inhelpscreens)
- redrawsbar = true; // just put away the help screen
+ redrawsbar = true;
ST_Drawer (viewheight == 200, redrawsbar );
fullscreen = viewheight == 200;
break;
@@ -260,35 +260,35 @@ void D_Display (void)
break;
}
- // draw buffered stuff to screen
+
I_UpdateNoBlit ();
- // draw the view directly
+
if (gamestate == GS_LEVEL && !automapactive && gametic)
R_RenderPlayerView (&players[displayplayer]);
if (gamestate == GS_LEVEL && gametic)
HU_Drawer ();
- // clean up border stuff
+
if (gamestate != oldgamestate && gamestate != GS_LEVEL)
I_SetPalette (W_CacheLumpName ("PLAYPAL",PU_CACHE));
- // see if the border needs to be initially drawn
+
if (gamestate == GS_LEVEL && oldgamestate != GS_LEVEL)
{
- viewactivestate = false; // view was not active
- R_FillBackScreen (); // draw the pattern into the back screen
+ viewactivestate = false;
+ R_FillBackScreen ();
}
- // see if the border needs to be updated to the screen
+
if (gamestate == GS_LEVEL && !automapactive && scaledviewwidth != 320)
{
if (menuactive || menuactivestate || !viewactivestate)
borderdrawcount = 3;
if (borderdrawcount)
{
- R_DrawViewBorder (); // erase old menu stuff
+ R_DrawViewBorder ();
borderdrawcount--;
}
@@ -299,7 +299,7 @@ void D_Display (void)
inhelpscreensstate = inhelpscreens;
oldgamestate = wipegamestate = gamestate;
- // draw pause pic
+
if (paused)
{
if (automapactive)
@@ -311,19 +311,19 @@ void D_Display (void)
}
- // menus go directly to the screen
- M_Drawer (); // menu is drawn even on top of everything
- NetUpdate (); // send out any new accumulation
+
+ M_Drawer ();
+ NetUpdate ();
- // normal update
+
if (!wipe)
{
- I_FinishUpdate (); // page flip or blit buffer
+ I_FinishUpdate ();
return;
}
- // wipe update
+
wipe_EndScreen(0, 0, SCREENWIDTH, SCREENHEIGHT);
wipestart = I_GetTime () - 1;
@@ -339,16 +339,16 @@ void D_Display (void)
done = wipe_ScreenWipe(wipe_Melt
, 0, 0, SCREENWIDTH, SCREENHEIGHT, tics);
I_UpdateNoBlit ();
- M_Drawer (); // menu is drawn even on top of wipes
- I_FinishUpdate (); // page flip or blit buffer
+ M_Drawer ();
+ I_FinishUpdate ();
} while (!done);
}
-//
-// D_DoomLoop
-//
+
+
+
extern boolean demorecording;
void D_DoomLoop (void)
@@ -368,10 +368,10 @@ void D_DoomLoop (void)
while (1)
{
- // frame syncronous IO operations
+
I_StartFrame ();
- // process one or more tics
+
if (singletics)
{
I_StartTic ();
@@ -386,21 +386,21 @@ void D_DoomLoop (void)
}
else
{
- TryRunTics (); // will run at least one tic
+ TryRunTics ();
}
- S_UpdateSounds (players[consoleplayer].mo);// move positional sounds
+ S_UpdateSounds (players[consoleplayer].mo);
- // Update display, next frame, with current state.
+
D_Display ();
#ifndef SNDSERV
- // Sound mixing for the buffer is snychronous.
+
I_UpdateSound();
#endif
- // Synchronous sound output is explicitly called.
+
#ifndef SNDINTR
- // Update sound output.
+
I_SubmitSound();
#endif
}
@@ -408,18 +408,18 @@ void D_DoomLoop (void)
-//
-// DEMO LOOP
-//
+
+
+
int demosequence;
int pagetic;
char *pagename;
-//
-// D_PageTicker
-// Handles timing for warped projection
-//
+
+
+
+
void D_PageTicker (void)
{
if (--pagetic < 0)
@@ -428,34 +428,34 @@ void D_PageTicker (void)
-//
-// D_PageDrawer
-//
+
+
+
void D_PageDrawer (void)
{
V_DrawPatch (0,0, 0, W_CacheLumpName(pagename, PU_CACHE));
}
-//
-// D_AdvanceDemo
-// Called after each demo or intro demosequence finishes
-//
+
+
+
+
void D_AdvanceDemo (void)
{
advancedemo = true;
}
-//
-// This cycles through the demo sequences.
-// FIXME - version dependend demo numbers?
-//
+
+
+
+
void D_DoAdvanceDemo (void)
{
- players[consoleplayer].playerstate = PST_LIVE; // not reborn
+ players[consoleplayer].playerstate = PST_LIVE;
advancedemo = false;
- usergame = false; // no save / end game here
+ usergame = false;
paused = false;
gameaction = ga_nothing;
@@ -510,7 +510,7 @@ void D_AdvanceDemo (void)
case 5:
G_DeferedPlayDemo ("demo3");
break;
- // THE DEFINITIVE DOOM Special Edition demo
+
case 6:
G_DeferedPlayDemo ("demo4");
break;
@@ -519,9 +519,9 @@ void D_AdvanceDemo (void)
-//
-// D_StartTitle
-//
+
+
+
void D_StartTitle (void)
{
gameaction = ga_nothing;
@@ -532,14 +532,14 @@ void D_StartTitle (void)
-// print title for every printed line
+
char title[128];
-//
-// D_AddFile
-//
+
+
+
void D_AddFile (char *file)
{
int numwadfiles;
@@ -554,12 +554,12 @@ void D_AddFile (char *file)
wadfiles[numwadfiles] = newfile;
}
-//
-// IdentifyVersion
-// Checks availability of IWAD files by name,
-// to determine whether registered/commercial features
-// should be executed (notably loading PWAD's).
-//
+
+
+
+
+
+
void IdentifyVersion (void)
{
@@ -579,24 +579,24 @@ void IdentifyVersion (void)
if (!doomwaddir)
doomwaddir = ".";
- // Commercial.
+
doom2wad = malloc(strlen(doomwaddir)+1+9+1);
sprintf(doom2wad, "%s/doom2.wad", doomwaddir);
- // Retail.
+
doomuwad = malloc(strlen(doomwaddir)+1+8+1);
sprintf(doomuwad, "%s/doomu.wad", doomwaddir);
- // Registered.
+
doomwad = malloc(strlen(doomwaddir)+1+8+1);
sprintf(doomwad, "%s/doom.wad", doomwaddir);
- // Shareware.
+
doom1wad = malloc(strlen(doomwaddir)+1+9+1);
sprintf(doom1wad, "%s/doom1.wad", doomwaddir);
- // Bug, dear Shawn.
- // Insufficient malloc, caused spurious realloc errors.
+
+
plutoniawad = malloc(strlen(doomwaddir)+1+/*9*/12+1);
sprintf(plutoniawad, "%s/plutonia.wad", doomwaddir);
@@ -604,7 +604,7 @@ void IdentifyVersion (void)
sprintf(tntwad, "%s/tnt.wad", doomwaddir);
- // French stuff.
+
doom2fwad = malloc(strlen(doomwaddir)+1+10+1);
sprintf(doom2fwad, "%s/doom2f.wad", doomwaddir);
@@ -658,8 +658,8 @@ void IdentifyVersion (void)
if ( !access (doom2fwad,R_OK) )
{
gamemode = commercial;
- // C'est ridicule!
- // Let's handle languages in config files, okay?
+
+
language = french;
printf("French version\n");
D_AddFile (doom2fwad);
@@ -711,14 +711,14 @@ void IdentifyVersion (void)
printf("Game mode indeterminate.\n");
gamemode = indetermined;
- // We don't abort. Let's see what the PWAD contains.
- //exit(1);
- //I_Error ("Game mode indeterminate\n");
+
+
+
}
-//
-// Find a Response File
-//
+
+
+
void FindResponseFile (void)
{
int i;
@@ -737,7 +737,7 @@ void FindResponseFile (void)
char *moreargs[20];
char *firstargv;
- // READ THE RESPONSE FILE INTO MEMORY
+
handle = fopen (&myargv[i][1],"rb");
if (!handle)
{
@@ -752,7 +752,7 @@ void FindResponseFile (void)
fread (file,size,1,handle);
fclose (handle);
- // KEEP ALL CMDLINE ARGS FOLLOWING @RESPONSEFILE ARG
+
for (index = 0,k = i+1; k < myargc; k++)
moreargs[index++] = myargv[k];
@@ -763,7 +763,7 @@ void FindResponseFile (void)
infile = file;
indexinfile = k = 0;
- indexinfile++; // SKIP PAST ARGV[0] (KEEP IT)
+ indexinfile++;
do
{
myargv[indexinfile++] = infile+k;
@@ -780,7 +780,7 @@ void FindResponseFile (void)
myargv[indexinfile++] = moreargs[k];
myargc = indexinfile;
- // DISPLAY ARGS
+
printf("%d command-line args:\n",myargc);
for (k=1;k<myargc;k++)
printf("%s\n",myargv[k]);
@@ -790,9 +790,9 @@ void FindResponseFile (void)
}
-//
-// D_DoomMain
-//
+
+
+
void D_DoomMain (void)
{
int p;
@@ -881,7 +881,7 @@ void D_DoomMain (void)
strcpy (basedefault,"c:/doomdata/default.cfg");
}
- // turbo option
+
if ( (p=M_CheckParm ("-turbo")) )
{
int scale = 200;
@@ -901,17 +901,17 @@ void D_DoomMain (void)
sidemove[1] = sidemove[1]*scale/100;
}
- // add any files specified on the command line with -file wadfile
- // to the wad list
- //
- // convenience hack to allow -wart e m to add a wad file
- // prepend a tilde to the filename so wadfile will be reloadable
+
+
+
+
+
p = M_CheckParm ("-wart");
if (p)
{
- myargv[p][4] = 'p'; // big hack, change to -warp
+ myargv[p][4] = 'p';
- // Map name handling.
+
switch (gamemode )
{
case shareware:
@@ -938,9 +938,9 @@ void D_DoomMain (void)
p = M_CheckParm ("-file");
if (p)
{
- // the parms after p are wadfile/lump names,
- // until end of parms or another - preceded parm
- modifiedgame = true; // homebrew levels
+
+
+ modifiedgame = true;
while (++p != myargc && myargv[p][0] != '-')
D_AddFile (myargv[p]);
}
@@ -957,7 +957,7 @@ void D_DoomMain (void)
printf("Playing demo %s.lmp.\n",myargv[p+1]);
}
- // get skill / episode / map from parms
+
startskill = sk_medium;
startepisode = 1;
startmap = 1;
@@ -1007,12 +1007,12 @@ void D_DoomMain (void)
autostart = true;
}
- // init subsystems
+
printf ("V_Init: allocate screens.\n");
V_Init ();
printf ("M_LoadDefaults: Load system defaults.\n");
- M_LoadDefaults (); // load before initing other systems
+ M_LoadDefaults ();
printf ("Z_Init: Init zone memory allocation daemon. \n");
Z_Init ();
@@ -1021,11 +1021,11 @@ void D_DoomMain (void)
W_InitMultipleFiles (wadfiles);
- // Check for -file in shareware
+
if (modifiedgame)
{
- // These are the lumps that will be checked in IWAD,
- // if any one is not present, execution will be aborted.
+
+
char name[23][8]=
{
"e2m1","e2m2","e2m3","e2m4","e2m5","e2m6","e2m7","e2m8","e2m9",
@@ -1038,15 +1038,15 @@ void D_DoomMain (void)
I_Error("\nYou cannot -file with the shareware "
"version. Register!");
- // Check for fake IWAD with right name,
- // but w/o all the lumps of the registered version.
+
+
if (gamemode == registered)
for (i = 0;i < 23; i++)
if (W_CheckNumForName(name[i])<0)
I_Error("\nThis is not the registered version.");
}
- // Iff additonal PWAD files are used, print modified banner
+
if (modifiedgame)
{
/*m*/printf (
@@ -1061,7 +1061,7 @@ void D_DoomMain (void)
}
- // Check and print which version is executed.
+
switch ( gamemode )
{
case shareware:
@@ -1084,7 +1084,7 @@ void D_DoomMain (void)
break;
default:
- // Ouch.
+
break;
}
@@ -1112,18 +1112,18 @@ void D_DoomMain (void)
printf ("ST_Init: Init status bar.\n");
ST_Init ();
- // check for a driver that wants intermission stats
+
p = M_CheckParm ("-statcopy");
if (p && p<myargc-1)
{
- // for statistics driver
+
extern void* statcopy;
statcopy = (void*)atoi(myargv[p+1]);
printf ("External statistics registered.\n");
}
- // start the apropriate game based on parms
+
p = M_CheckParm ("-record");
if (p && p < myargc-1)
@@ -1135,16 +1135,16 @@ void D_DoomMain (void)
p = M_CheckParm ("-playdemo");
if (p && p < myargc-1)
{
- singledemo = true; // quit after one demo
+ singledemo = true;
G_DeferedPlayDemo (myargv[p+1]);
- D_DoomLoop (); // never returns
+ D_DoomLoop ();
}
p = M_CheckParm ("-timedemo");
if (p && p < myargc-1)
{
G_TimeDemo (myargv[p+1]);
- D_DoomLoop (); // never returns
+ D_DoomLoop ();
}
p = M_CheckParm ("-loadgame");
@@ -1163,9 +1163,9 @@ void D_DoomMain (void)
if (autostart || netgame)
G_InitNew (startskill, startepisode, startmap);
else
- D_StartTitle (); // start up intro loop
+ D_StartTitle ();
}
- D_DoomLoop (); // never returns
+ D_DoomLoop ();
}
diff --git a/src/d_main.h b/src/d_main.h
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// System specific interface stuff.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __D_MAIN__
@@ -40,22 +40,22 @@ void D_AddFile (char *file);
-//
-// D_DoomMain()
-// Not a globally visible function, just included for source reference,
-// calls all startup code, parses command line options.
-// If not overrided by user input, calls N_AdvanceDemo.
-//
+
+
+
+
+
+
void D_DoomMain (void);
-// Called by IO functions when input is detected.
+
void D_PostEvent (event_t* ev);
-//
-// BASE LEVEL
-//
+
+
+
void D_PageTicker (void);
void D_PageDrawer (void);
void D_AdvanceDemo (void);
diff --git a/src/d_net.c b/src/d_net.c
@@ -1,26 +1,26 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// DOOM Network game communication and protocol,
-// all OS independend parts.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char rcsid[] = "$Id: d_net.c,v 1.3 1997/02/03 22:01:47 b1 Exp $";
@@ -37,33 +37,33 @@ static const char rcsid[] = "$Id: d_net.c,v 1.3 1997/02/03 22:01:47 b1 Exp $";
#define NCMD_EXIT 0x80000000
#define NCMD_RETRANSMIT 0x40000000
#define NCMD_SETUP 0x20000000
-#define NCMD_KILL 0x10000000 // kill game
+#define NCMD_KILL 0x10000000
#define NCMD_CHECKSUM 0x0fffffff
doomcom_t* doomcom;
-doomdata_t* netbuffer; // points inside doomcom
-
-
-//
-// NETWORKING
-//
-// gametic is the tic about to (or currently being) run
-// maketic is the tick that hasn't had control made for it yet
-// nettics[] has the maketics for all players
-//
-// a gametic cannot be run until nettics[] > gametic for all players
-//
+doomdata_t* netbuffer;
+
+
+
+
+
+
+
+
+
+
+
#define RESENDCOUNT 10
-#define PL_DRONE 0x80 // bit flag in doomdata->player
+#define PL_DRONE 0x80
ticcmd_t localcmds[BACKUPTICS];
ticcmd_t netcmds[MAXPLAYERS][BACKUPTICS];
int nettics[MAXNETNODES];
-boolean nodeingame[MAXNETNODES]; // set false as nodes leave game
-boolean remoteresend[MAXNETNODES]; // set when local needs tics
-int resendto[MAXNETNODES]; // set when remote needs tics
+boolean nodeingame[MAXNETNODES];
+boolean remoteresend[MAXNETNODES];
+int resendto[MAXNETNODES];
int resendcount[MAXNETNODES];
int nodeforplayer[MAXPLAYERS];
@@ -72,7 +72,7 @@ int maketic;
int lastnettic;
int skiptics;
int ticdup;
-int maxsend; // BACKUPTICS/(2*ticdup)-1
+int maxsend;
void D_ProcessEvents (void);
@@ -84,17 +84,17 @@ doomdata_t reboundstore;
-//
-//
-//
+
+
+
int NetbufferSize (void)
{
return (int)&(((doomdata_t *)0)->cmds[netbuffer->numtics]);
}
-//
-// Checksum
-//
+
+
+
unsigned NetbufferChecksum (void)
{
unsigned c;
@@ -102,9 +102,9 @@ unsigned NetbufferChecksum (void)
c = 0x1234567;
- // FIXME -endianess?
+
#ifdef NORMALUNIX
- return 0; // byte order problems
+ return 0;
#endif
l = (NetbufferSize () - (int)&(((doomdata_t *)0)->retransmitfrom))/4;
@@ -114,9 +114,9 @@ unsigned NetbufferChecksum (void)
return c & NCMD_CHECKSUM;
}
-//
-//
-//
+
+
+
int ExpandTics (int low)
{
int delta;
@@ -136,9 +136,9 @@ int ExpandTics (int low)
-//
-// HSendPacket
-//
+
+
+
void
HSendPacket
(int node,
@@ -185,10 +185,10 @@ HSendPacket
I_NetCmd ();
}
-//
-// HGetPacket
-// Returns false if no packet is waiting
-//
+
+
+
+
boolean HGetPacket (void)
{
if (reboundpacket)
@@ -253,9 +253,9 @@ boolean HGetPacket (void)
}
-//
-// GetPackets
-//
+
+
+
char exitmsg[80];
void GetPackets (void)
@@ -269,17 +269,17 @@ void GetPackets (void)
while ( HGetPacket() )
{
if (netbuffer->checksum & NCMD_SETUP)
- continue; // extra setup packet
+ continue;
netconsole = netbuffer->player & ~PL_DRONE;
netnode = doomcom->remotenode;
- // to save bytes, only the low byte of tic numbers are sent
- // Figure out what the rest of the bytes are
+
+
realstart = ExpandTics (netbuffer->starttic);
realend = (realstart+netbuffer->numtics);
- // check for exiting the game
+
if (netbuffer->checksum & NCMD_EXIT)
{
if (!nodeingame[netnode])
@@ -294,13 +294,13 @@ void GetPackets (void)
continue;
}
- // check for a remote game kill
+
if (netbuffer->checksum & NCMD_KILL)
I_Error ("Killed by network driver");
nodeforplayer[netconsole] = netnode;
- // check for retransmit request
+
if ( resendcount[netnode] <= 0
&& (netbuffer->checksum & NCMD_RETRANSMIT) )
{
@@ -312,7 +312,7 @@ void GetPackets (void)
else
resendcount[netnode]--;
- // check for out of order / duplicated packet
+
if (realend == nettics[netnode])
continue;
@@ -325,10 +325,10 @@ void GetPackets (void)
continue;
}
- // check for a missed packet
+
if (realstart > nettics[netnode])
{
- // stop processing until the other system resends the missed tics
+
if (debugfile)
fprintf (debugfile,
"missed tics from %i (%i - %i)\n",
@@ -337,7 +337,7 @@ void GetPackets (void)
continue;
}
- // update command store from the packet
+
{
int start;
@@ -358,11 +358,11 @@ void GetPackets (void)
}
-//
-// NetUpdate
-// Builds ticcmds for console player,
-// sends out a packet
-//
+
+
+
+
+
int gametime;
void NetUpdate (void)
@@ -373,12 +373,12 @@ void NetUpdate (void)
int realstart;
int gameticdiv;
- // check time
+
nowtime = I_GetTime ()/ticdup;
newtics = nowtime - gametime;
gametime = nowtime;
- if (newtics <= 0) // nothing new to update
+ if (newtics <= 0)
goto listen;
if (skiptics <= newtics)
@@ -395,25 +395,25 @@ void NetUpdate (void)
netbuffer->player = consoleplayer;
- // build new ticcmds for console player
+
gameticdiv = gametic/ticdup;
for (i=0 ; i<newtics ; i++)
{
I_StartTic ();
D_ProcessEvents ();
if (maketic - gameticdiv >= BACKUPTICS/2-1)
- break; // can't hold any more
+ break;
+
- //printf ("mk:%i ",maketic);
G_BuildTiccmd (&localcmds[maketic%BACKUPTICS]);
maketic++;
}
if (singletics)
- return; // singletic update is syncronous
+ return;
+
- // send the packet to the other nodes
for (i=0 ; i<doomcom->numnodes ; i++)
if (nodeingame[i])
{
@@ -440,16 +440,16 @@ void NetUpdate (void)
}
}
- // listen for other packets
+
listen:
GetPackets ();
}
-//
-// CheckAbort
-//
+
+
+
void CheckAbort (void)
{
event_t *ev;
@@ -470,9 +470,9 @@ void CheckAbort (void)
}
-//
-// D_ArbitrateNetStart
-//
+
+
+
void D_ArbitrateNetStart (void)
{
int i;
@@ -483,7 +483,7 @@ void D_ArbitrateNetStart (void)
if (doomcom->consoleplayer)
{
- // listen for setup info from key player
+
printf ("listening for network start info...\n");
while (1)
{
@@ -506,7 +506,7 @@ void D_ArbitrateNetStart (void)
}
else
{
- // key player, send the setup info
+
printf ("sending network start info...\n");
do
{
@@ -546,10 +546,10 @@ void D_ArbitrateNetStart (void)
}
}
-//
-// D_CheckNetGame
-// Works out player numbers among the net participants
-//
+
+
+
+
extern int viewangleoffset;
void D_CheckNetGame (void)
@@ -560,11 +560,11 @@ void D_CheckNetGame (void)
{
nodeingame[i] = false;
nettics[i] = 0;
- remoteresend[i] = false; // set when local needs tics
- resendto[i] = 0; // which tic to start sending
+ remoteresend[i] = false;
+ resendto[i] = 0;
}
- // I_InitNetwork sets doomcom and netgame
+
I_InitNetwork ();
if (doomcom->id != DOOMCOM_ID)
I_Error ("Doomcom buffer invalid!");
@@ -577,7 +577,7 @@ void D_CheckNetGame (void)
printf ("startskill %i deathmatch: %i startmap: %i startepisode: %i\n",
startskill, deathmatch, startmap, startepisode);
- // read values out of doomcom
+
ticdup = doomcom->ticdup;
maxsend = BACKUPTICS/(2*ticdup)-1;
if (maxsend<1)
@@ -594,11 +594,11 @@ void D_CheckNetGame (void)
}
-//
-// D_QuitNetGame
-// Called before quitting to leave a net game
-// without hanging the other players
-//
+
+
+
+
+
void D_QuitNetGame (void)
{
int i, j;
@@ -609,7 +609,7 @@ void D_QuitNetGame (void)
if (!netgame || !usergame || consoleplayer == -1 || demoplayback)
return;
- // send a bunch of packets for security
+
netbuffer->player = consoleplayer;
netbuffer->numtics = 0;
for (i=0 ; i<4 ; i++)
@@ -623,9 +623,9 @@ void D_QuitNetGame (void)
-//
-// TryRunTics
-//
+
+
+
int frametics[4];
int frameon;
int frameskip[4];
@@ -644,12 +644,12 @@ void TryRunTics (void)
int counts;
int numplaying;
- // get real tics
+
entertic = I_GetTime ()/ticdup;
realtics = entertic - oldentertics;
oldentertics = entertic;
- // get available tics
+
NetUpdate ();
lowtic = MAXINT;
@@ -665,7 +665,7 @@ void TryRunTics (void)
}
availabletics = lowtic - gametic/ticdup;
- // decide how many tics to run
+
if (realtics < availabletics-1)
counts = realtics+1;
else if (realtics < availabletics)
@@ -685,33 +685,33 @@ void TryRunTics (void)
if (!demoplayback)
{
- // ideally nettics[0] should be 1 - 3 tics above lowtic
- // if we are consistantly slower, speed up time
+
+
for (i=0 ; i<MAXPLAYERS ; i++)
if (playeringame[i])
break;
if (consoleplayer == i)
{
- // the key player does not adapt
+
}
else
{
if (nettics[0] <= nettics[nodeforplayer[i]])
{
gametime--;
- // printf ("-");
+
}
frameskip[frameon&3] = (oldnettics > nettics[nodeforplayer[i]]);
oldnettics = nettics[0];
if (frameskip[0] && frameskip[1] && frameskip[2] && frameskip[3])
{
skiptics = 1;
- // printf ("+");
+
}
}
- }// demoplayback
+ }
- // wait for new tics if needed
+
while (lowtic < gametic/ticdup + counts)
{
NetUpdate ();
@@ -724,7 +724,7 @@ void TryRunTics (void)
if (lowtic < gametic/ticdup)
I_Error ("TryRunTics: lowtic < gametic");
- // don't stay in here forever -- give the menu a chance to work
+
if (I_GetTime ()/ticdup - entertic >= 20)
{
M_Ticker ();
@@ -732,7 +732,7 @@ void TryRunTics (void)
}
}
- // run the count * ticdup dics
+
while (counts--)
{
for (i=0 ; i<ticdup ; i++)
@@ -745,7 +745,7 @@ void TryRunTics (void)
G_Ticker ();
gametic++;
- // modify command for duplicated tics
+
if (i != ticdup-1)
{
ticcmd_t *cmd;
@@ -762,6 +762,6 @@ void TryRunTics (void)
}
}
}
- NetUpdate (); // check for new console commands
+ NetUpdate ();
}
}
diff --git a/src/d_net.h b/src/d_net.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Networking stuff.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __D_NET__
@@ -31,21 +31,21 @@
#endif
-//
-// Network play related stuff.
-// There is a data struct that stores network
-// communication related stuff, and another
-// one that defines the actual packets to
-// be transmitted.
-//
+
+
+
+
+
+
+
#define DOOMCOM_ID 0x12345678l
-// Max computers/players in a game.
+
#define MAXNETNODES 8
-// Networking and tick handling related.
+
#define BACKUPTICS 12
typedef enum
@@ -56,14 +56,14 @@ typedef enum
} command_t;
-//
-// Network packet data.
-//
+
+
+
typedef struct
{
- // High bit is retransmit request.
+
unsigned checksum;
- // Only valid if NCMD_RETRANSMIT.
+
byte retransmitfrom;
byte starttic;
@@ -78,72 +78,72 @@ typedef struct
typedef struct
{
- // Supposed to be DOOMCOM_ID?
+
long id;
- // DOOM executes an int to execute commands.
+
short intnum;
- // Communication between DOOM and the driver.
- // Is CMD_SEND or CMD_GET.
+
+
short command;
- // Is dest for send, set by get (-1 = no packet).
+
short remotenode;
- // Number of bytes in doomdata to be sent
+
short datalength;
- // Info common to all nodes.
- // Console is allways node 0.
+
+
short numnodes;
- // Flag: 1 = no duplication, 2-5 = dup for slow nets.
+
short ticdup;
- // Flag: 1 = send a backup tic in every packet.
+
short extratics;
- // Flag: 1 = deathmatch.
+
short deathmatch;
- // Flag: -1 = new game, 0-5 = load savegame
+
short savegame;
- short episode; // 1-3
- short map; // 1-9
- short skill; // 1-5
+ short episode;
+ short map;
+ short skill;
- // Info specific to this node.
+
short consoleplayer;
short numplayers;
- // These are related to the 3-display mode,
- // in which two drones looking left and right
- // were used to render two additional views
- // on two additional computers.
- // Probably not operational anymore.
- // 1 = left, 0 = center, -1 = right
+
+
+
+
+
+
short angleoffset;
- // 1 = drone
+
short drone;
- // The packet data to be sent.
+
doomdata_t data;
} doomcom_t;
-// Create any new ticcmds and broadcast to other players.
+
void NetUpdate (void);
-// Broadcasts special packets to other players
-// to notify of game exit
+
+
void D_QuitNetGame (void);
-//? how many ticks to run?
+
void TryRunTics (void);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/d_player.h b/src/d_player.h
@@ -1,43 +1,43 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-//
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __D_PLAYER__
#define __D_PLAYER__
-// The player data structure depends on a number
-// of other structs: items (internal inventory),
-// animation states (closely tied to the sprites
-// used to represent them, unfortunately).
+
+
+
+
#include "d_items.h"
#include "p_pspr.h"
-// In addition, the player is just a special
-// case of the generic moving object/actor.
+
+
#include "p_mobj.h"
-// Finally, for odd reasons, the player input
-// is buffered within the player data struct,
-// as commands per game tick.
+
+
+
#include "d_ticcmd.h"
#ifdef __GNUG__
@@ -47,151 +47,151 @@
-//
-// Player states.
-//
+
+
+
typedef enum
{
- // Playing or camping.
+
PST_LIVE,
- // Dead on the ground, view follows killer.
+
PST_DEAD,
- // Ready to restart/respawn???
+
PST_REBORN
} playerstate_t;
-//
-// Player internal flags, for cheats and debug.
-//
+
+
+
typedef enum
{
- // No clipping, walk through barriers.
+
CF_NOCLIP = 1,
- // No damage, no health loss.
+
CF_GODMODE = 2,
- // Not really a cheat, just a debug aid.
+
CF_NOMOMENTUM = 4
} cheat_t;
-//
-// Extended player object info: player_t
-//
+
+
+
typedef struct player_s
{
mobj_t* mo;
playerstate_t playerstate;
ticcmd_t cmd;
- // Determine POV,
- // including viewpoint bobbing during movement.
- // Focal origin above r.z
+
+
+
fixed_t viewz;
- // Base height above floor for viewz.
+
fixed_t viewheight;
- // Bob/squat speed.
+
fixed_t deltaviewheight;
- // bounded/scaled total momentum.
+
fixed_t bob;
- // This is only used between levels,
- // mo->health is used during levels.
+
+
int health;
int armorpoints;
- // Armor type is 0-2.
+
int armortype;
- // Power ups. invinc and invis are tic counters.
+
int powers[NUMPOWERS];
boolean cards[NUMCARDS];
boolean backpack;
- // Frags, kills of other players.
+
int frags[MAXPLAYERS];
weapontype_t readyweapon;
- // Is wp_nochange if not changing.
+
weapontype_t pendingweapon;
boolean weaponowned[NUMWEAPONS];
int ammo[NUMAMMO];
int maxammo[NUMAMMO];
- // True if button down last tic.
+
int attackdown;
int usedown;
- // Bit flags, for cheats and debug.
- // See cheat_t, above.
+
+
int cheats;
- // Refired shots are less accurate.
+
int refire;
- // For intermission stats.
+
int killcount;
int itemcount;
int secretcount;
- // Hint messages.
+
char* message;
- // For screen flashing (red or bright).
+
int damagecount;
int bonuscount;
- // Who did damage (NULL for floors/ceilings).
+
mobj_t* attacker;
- // So gun flashes light up areas.
+
int extralight;
- // Current PLAYPAL, ???
- // can be set to REDCOLORMAP for pain, etc.
+
+
int fixedcolormap;
- // Player skin colorshift,
- // 0-3 for which color to draw player.
+
+
int colormap;
- // Overlay view sprites (gun, etc).
+
pspdef_t psprites[NUMPSPRITES];
- // True if secret level has been done.
+
boolean didsecret;
} player_t;
-//
-// INTERMISSION
-// Structure passed e.g. to WI_Start(wb)
-//
+
+
+
+
typedef struct
{
- boolean in; // whether the player is in game
+ boolean in;
+
- // Player stats, kills, collected items etc.
int skills;
int sitems;
int ssecret;
int stime;
int frags[4];
- int score; // current score on entry, modified on return
+ int score;
} wbplayerstruct_t;
typedef struct
{
- int epsd; // episode # (0-2)
+ int epsd;
- // if true, splash the secret level
+
boolean didsecret;
- // previous and next levels, origin 0
+
int last;
int next;
@@ -200,10 +200,10 @@ typedef struct
int maxsecret;
int maxfrags;
- // the par time
+
int partime;
- // index of this player in game
+
int pnum;
wbplayerstruct_t plyr[MAXPLAYERS];
@@ -212,8 +212,8 @@ typedef struct
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/d_textur.h b/src/d_textur.h
@@ -1,24 +1,24 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Typedefs related to to textures etc.,
-// isolated here to make it easier separating modules.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __D_TEXTUR__
@@ -29,10 +29,10 @@
-//
-// Flats?
-//
-// a pic is an unmasked block of pixels
+
+
+
+
typedef struct
{
byte width;
@@ -44,8 +44,8 @@ typedef struct
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/d_think.h b/src/d_think.h
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// MapObj data. Map Objects or mobjs are actors, entities,
-// thinker, take-your-pick... anything that moves, acts, or
-// suffers state changes of more or less violent nature.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __D_THINK__
@@ -32,12 +32,12 @@
-//
-// Experimental stuff.
-// To compile this as "ANSI C with classes"
-// we will need to handle the various
-// action functions cleanly.
-//
+
+
+
+
+
+
typedef void (*actionf_v)();
typedef void (*actionf_p1)( void* );
typedef void (*actionf_p2)( void*, void* );
@@ -54,13 +54,13 @@ typedef union
-// Historically, "think_t" is yet another
-// function pointer to a routine to handle
-// an actor.
+
+
+
typedef actionf_t think_t;
-// Doubly linked list of actors.
+
typedef struct thinker_s
{
struct thinker_s* prev;
@@ -72,8 +72,8 @@ typedef struct thinker_s
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/d_ticcmd.h b/src/d_ticcmd.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// System specific interface stuff.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __D_TICCMD__
@@ -29,16 +29,16 @@
#pragma interface
#endif
-// The data sampled per tick (single player)
-// and transmitted to other peers (multiplayer).
-// Mainly movements/button commands per game tick,
-// plus a checksum for internal state consistency.
+
+
+
+
typedef struct
{
- char forwardmove; // *2048 for move
- char sidemove; // *2048 for move
- short angleturn; // <<16 for angle delta
- short consistancy; // checks for net game
+ char forwardmove;
+ char sidemove;
+ short angleturn;
+ short consistancy;
byte chatchar;
byte buttons;
} ticcmd_t;
@@ -46,8 +46,8 @@ typedef struct
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/doomdata.h b/src/doomdata.h
@@ -1,62 +1,62 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// all external data is defined here
-// most of the data is loaded into different structures at run time
-// some internal structures shared by many modules are here
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __DOOMDATA__
#define __DOOMDATA__
-// The most basic types we use, portability.
+
#include "doomtype.h"
-// Some global defines, that configure the game.
+
#include "doomdef.h"
-//
-// Map level types.
-// The following data structures define the persistent format
-// used in the lumps of the WAD files.
-//
-// Lump order in a map WAD: each map needs a couple of lumps
-// to provide a complete scene geometry description.
+
+
+
+
+
+
+
enum
{
- ML_LABEL, // A separator, name, ExMx or MAPxx
- ML_THINGS, // Monsters, items..
- ML_LINEDEFS, // LineDefs, from editing
- ML_SIDEDEFS, // SideDefs, from editing
- ML_VERTEXES, // Vertices, edited and BSP splits generated
- ML_SEGS, // LineSegs, from LineDefs split by BSP
- ML_SSECTORS, // SubSectors, list of LineSegs
- ML_NODES, // BSP nodes
- ML_SECTORS, // Sectors, from editing
- ML_REJECT, // LUT, sector-sector visibility
- ML_BLOCKMAP // LUT, motion clipping, walls/grid element
+ ML_LABEL,
+ ML_THINGS,
+ ML_LINEDEFS,
+ ML_SIDEDEFS,
+ ML_VERTEXES,
+ ML_SEGS,
+ ML_SSECTORS,
+ ML_NODES,
+ ML_SECTORS,
+ ML_REJECT,
+ ML_BLOCKMAP
};
-// A single Vertex.
+
typedef struct
{
short x;
@@ -64,8 +64,8 @@ typedef struct
} mapvertex_t;
-// A SideDef, defining the visual appearance of a wall,
-// by setting textures and offsets.
+
+
typedef struct
{
short textureoffset;
@@ -73,14 +73,14 @@ typedef struct
char toptexture[8];
char bottomtexture[8];
char midtexture[8];
- // Front sector, towards viewer.
+
short sector;
} mapsidedef_t;
-// A LineDef, as used for editing, and as input
-// to the BSP builder.
+
+
typedef struct
{
short v1;
@@ -88,56 +88,56 @@ typedef struct
short flags;
short special;
short tag;
- // sidenum[1] will be -1 if one sided
+
short sidenum[2];
} maplinedef_t;
-//
-// LineDef attributes.
-//
-// Solid, is an obstacle.
+
+
+
+
#define ML_BLOCKING 1
-// Blocks monsters only.
+
#define ML_BLOCKMONSTERS 2
-// Backside will not be present at all
-// if not two sided.
+
+
#define ML_TWOSIDED 4
-// If a texture is pegged, the texture will have
-// the end exposed to air held constant at the
-// top or bottom of the texture (stairs or pulled
-// down things) and will move with a height change
-// of one of the neighbor sectors.
-// Unpegged textures allways have the first row of
-// the texture at the top pixel of the line for both
-// top and bottom textures (use next to windows).
-// upper texture unpegged
+
+
+
+
+
+
+
+
+
#define ML_DONTPEGTOP 8
-// lower texture unpegged
+
#define ML_DONTPEGBOTTOM 16
-// In AutoMap: don't map as two sided: IT'S A SECRET!
+
#define ML_SECRET 32
-// Sound rendering: don't let sound cross two of these.
+
#define ML_SOUNDBLOCK 64
-// Don't draw on the automap at all.
+
#define ML_DONTDRAW 128
-// Set if already seen, thus drawn in automap.
+
#define ML_MAPPED 256
-// Sector definition, from editing.
+
typedef struct
{
short floorheight;
@@ -149,17 +149,17 @@ typedef struct
short tag;
} mapsector_t;
-// SubSector, as generated by BSP.
+
typedef struct
{
short numsegs;
- // Index of first one, segs are stored sequentially.
+
short firstseg;
} mapsubsector_t;
-// LineSeg, generated by splitting LineDefs
-// using partition lines selected by BSP builder.
+
+
typedef struct
{
short v1;
@@ -172,25 +172,25 @@ typedef struct
-// BSP node structure.
-// Indicate a leaf.
+
+
#define NF_SUBSECTOR 0x8000
typedef struct
{
- // Partition line from (x,y) to x+dx,y+dy)
+
short x;
short y;
short dx;
short dy;
- // Bounding box for each child,
- // clip against view frustum.
+
+
short bbox[2][4];
- // If NF_SUBSECTOR its a subsector,
- // else it's a node of another subtree.
+
+
unsigned short children[2];
} mapnode_t;
@@ -198,8 +198,8 @@ typedef struct
-// Thing definition, position, orientation and type,
-// plus skill/visibility flags and attributes.
+
+
typedef struct
{
short x;
@@ -213,10 +213,10 @@ typedef struct
-#endif // __DOOMDATA__
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+#endif
+
+
+
+
+
diff --git a/src/doomdef.c b/src/doomdef.c
@@ -1,26 +1,26 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// DoomDef - basic defines for DOOM, e.g. Version, game mode
-// and skill level, and display parameters.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
@@ -31,8 +31,8 @@ rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
#endif
#include "doomdef.h"
-// Location for any defines turned variables.
-// None.
+
+
diff --git a/src/doomdef.h b/src/doomdef.h
@@ -1,24 +1,24 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Internally used data structures for virtually everything,
-// key definitions, lots of other stuff.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __DOOMDEF__
#define __DOOMDEF__
@@ -26,40 +26,40 @@
#include <stdio.h>
#include <string.h>
-//
-// Global parameters/defines.
-//
-// DOOM version
+
+
+
+
enum { VERSION = 110 };
-// Game mode handling - identify IWAD version
-// to handle IWAD dependend animations etc.
+
+
typedef enum
{
- shareware, // DOOM 1 shareware, E1, M9
- registered, // DOOM 1 registered, E3, M27
- commercial, // DOOM 2 retail, E1 M34
- // DOOM 2 german edition not handled
- retail, // DOOM 1 retail, E4, M36
- indetermined // Well, no IWAD found.
+ shareware,
+ registered,
+ commercial,
+
+ retail,
+ indetermined
} GameMode_t;
-// Mission packs - might be useful for TC stuff?
+
typedef enum
{
- doom, // DOOM 1
- doom2, // DOOM 2
- pack_tnt, // TNT mission pack
- pack_plut, // Plutonia pack
+ doom,
+ doom2,
+ pack_tnt,
+ pack_plut,
none
} GameMission_t;
-// Identify language to use, software localization.
+
typedef enum
{
english,
@@ -70,60 +70,60 @@ typedef enum
} Language_t;
-// If rangecheck is undefined,
-// most parameter validation debugging code will not be compiled
+
+
#define RANGECHECK
-// Do or do not use external soundserver.
-// The sndserver binary to be run separately
-// has been introduced by Dave Taylor.
-// The integrated sound support is experimental,
-// and unfinished. Default is synchronous.
-// Experimental asynchronous timer based is
-// handled by SNDINTR.
+
+
+
+
+
+
+
#define SNDSERV 1
-//#define SNDINTR 1
-// This one switches between MIT SHM (no proper mouse)
-// and XFree86 DGA (mickey sampling). The original
-// linuxdoom used SHM, which is default.
-//#define X11_DGA 1
-//
-// For resize of screen, at start of game.
-// It will not work dynamically, see visplanes.
-//
+
+
+
+
+
+
+
+
+
#define BASE_WIDTH 320
-// It is educational but futile to change this
-// scaling e.g. to 2. Drawing of status bar,
-// menues etc. is tied to the scale implied
-// by the graphics.
+
+
+
+
#define SCREEN_MUL 1
-#define INV_ASPECT_RATIO 0.625 // 0.75, ideally
+#define INV_ASPECT_RATIO 0.625
+
+
+
-// Defines suck. C sucks.
-// C++ might sucks for OOP, but it sure is a better C.
-// So there.
#define SCREENWIDTH 320
-//SCREEN_MUL*BASE_WIDTH //320
+
#define SCREENHEIGHT 200
-//(int)(SCREEN_MUL*BASE_WIDTH*INV_ASPECT_RATIO) //200
-// The maximum number of players, multiplayer/networking.
+
+
#define MAXPLAYERS 4
-// State updates, number of tics / second.
+
#define TICRATE 35
-// The current state of the game: whether we are
-// playing, gazing at the intermission screen,
-// the game final animation, or a demo.
+
+
+
typedef enum
{
GS_LEVEL,
@@ -132,16 +132,16 @@ typedef enum
GS_DEMOSCREEN
} gamestate_t;
-//
-// Difficulty/skill settings/filters.
-//
-// Skill flags.
+
+
+
+
#define MTF_EASY 1
#define MTF_NORMAL 2
#define MTF_HARD 4
-// Deaf monsters/do not react to sound.
+
#define MTF_AMBUSH 8
typedef enum
@@ -156,9 +156,9 @@ typedef enum
-//
-// Key cards.
-//
+
+
+
typedef enum
{
it_bluecard,
@@ -174,9 +174,9 @@ typedef enum
-// The defined weapons,
-// including a marker indicating
-// user has not changed weapon.
+
+
+
typedef enum
{
wp_fist,
@@ -191,26 +191,26 @@ typedef enum
NUMWEAPONS,
- // No pending weapon change.
+
wp_nochange
} weapontype_t;
-// Ammunition types defined.
+
typedef enum
{
- am_clip, // Pistol / chaingun ammo.
- am_shell, // Shotgun / double barreled shotgun.
- am_cell, // Plasma rifle, BFG.
- am_misl, // Missile launcher.
+ am_clip,
+ am_shell,
+ am_cell,
+ am_misl,
NUMAMMO,
- am_noammo // Unlimited for chainsaw / fist.
+ am_noammo
} ammotype_t;
-// Power up artifacts.
+
typedef enum
{
pw_invulnerability,
@@ -225,11 +225,11 @@ typedef enum
-//
-// Power up durations,
-// how many seconds till expiration,
-// assuming TICRATE is 35 ticks/second.
-//
+
+
+
+
+
typedef enum
{
INVULNTICS = (30*TICRATE),
@@ -242,11 +242,11 @@ typedef enum
-//
-// DOOM keyboard definition.
-// This is the stuff configured by Setup.Exe.
-// Most key data are simple ascii (uppercased).
-//
+
+
+
+
+
#define KEY_RIGHTARROW 0xae
#define KEY_LEFTARROW 0xac
#define KEY_UPARROW 0xad
@@ -281,58 +281,58 @@ typedef enum
-// DOOM basic types (boolean),
-// and max/min values.
-//#include "doomtype.h"
-// Fixed point.
-//#include "m_fixed.h"
-// Endianess handling.
-//#include "m_swap.h"
-// Binary Angles, sine/cosine/atan lookups.
-//#include "tables.h"
-// Event type.
-//#include "d_event.h"
-// Game function, skills.
-//#include "g_game.h"
-// All external data is defined here.
-//#include "doomdata.h"
-// All important printed strings.
-// Language selection (message strings).
-//#include "dstrings.h"
-// Player is a special actor.
-//struct player_s;
-//#include "d_items.h"
-//#include "d_player.h"
-//#include "p_mobj.h"
-//#include "d_net.h"
-// PLAY
-//#include "p_tick.h"
-// Header, generated by sound utility.
-// The utility was written by Dave Taylor.
-//#include "sounds.h"
-#endif // __DOOMDEF__
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#endif
+
+
+
+
+
diff --git a/src/doomstat.c b/src/doomstat.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Put all global tate variables here.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
@@ -31,14 +31,14 @@ rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
#include "doomstat.h"
-// Game Mode - identify IWAD as shareware, retail etc.
+
GameMode_t gamemode = indetermined;
GameMission_t gamemission = doom;
-// Language.
+
Language_t language = english;
-// Set if homebrew PWAD stuff has been added.
+
boolean modifiedgame;
diff --git a/src/doomstat.h b/src/doomstat.h
@@ -1,39 +1,39 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// All the global variables that store the internal state.
-// Theoretically speaking, the internal state of the engine
-// should be found by looking at the variables collected
-// here, and every relevant module will have to include
-// this header file.
-// In practice, things are a bit messy.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __D_STATE__
#define __D_STATE__
-// We need globally shared data structures,
-// for defining the global state variables.
+
+
#include "doomdata.h"
#include "d_net.h"
-// We need the playr data structure as well.
+
#include "d_player.h"
@@ -43,95 +43,95 @@
-// ------------------------
-// Command line parameters.
-//
-extern boolean nomonsters; // checkparm of -nomonsters
-extern boolean respawnparm; // checkparm of -respawn
-extern boolean fastparm; // checkparm of -fast
-extern boolean devparm; // DEBUG: launched with -devparm
+
+
+extern boolean nomonsters;
+extern boolean respawnparm;
+extern boolean fastparm;
+
+extern boolean devparm;
+
+
+
-// -----------------------------------------------------
-// Game Mode - identify IWAD as shareware, retail etc.
-//
extern GameMode_t gamemode;
extern GameMission_t gamemission;
-// Set if homebrew PWAD stuff has been added.
+
extern boolean modifiedgame;
-// -------------------------------------------
-// Language.
+
+
extern Language_t language;
-// -------------------------------------------
-// Selected skill type, map etc.
-//
-// Defaults for menu, methinks.
+
+
+
+
extern skill_t startskill;
extern int startepisode;
extern int startmap;
extern boolean autostart;
-// Selected by user.
+
extern skill_t gameskill;
extern int gameepisode;
extern int gamemap;
-// Nightmare mode flag, single player.
+
extern boolean respawnmonsters;
-// Netgame? Only true if >1 player.
+
extern boolean netgame;
-// Flag: true only if started as net deathmatch.
-// An enum might handle altdeath/cooperative better.
+
+
extern boolean deathmatch;
-// -------------------------
-// Internal parameters for sound rendering.
-// These have been taken from the DOS version,
-// but are not (yet) supported with Linux
-// (e.g. no sound volume adjustment with menu.
-
-// These are not used, but should be (menu).
-// From m_menu.c:
-// Sound FX volume has default, 0 - 15
-// Music volume has default, 0 - 15
-// These are multiplied by 8.
-extern int snd_SfxVolume; // maximum volume for sound
-extern int snd_MusicVolume; // maximum volume for music
-
-// Current music/sfx card - index useless
-// w/o a reference LUT in a sound module.
-// Ideally, this would use indices found
-// in: /usr/include/linux/soundcard.h
+
+
+
+
+
+
+
+
+
+
+
+extern int snd_SfxVolume;
+extern int snd_MusicVolume;
+
+
+
+
+
extern int snd_MusicDevice;
extern int snd_SfxDevice;
-// Config file? Same disclaimer as above.
+
extern int snd_DesiredMusicDevice;
extern int snd_DesiredSfxDevice;
-// -------------------------
-// Status flags for refresh.
-//
-// Depending on view size - no status bar?
-// Note that there is no way to disable the
-// status bar explicitely.
+
+
+
+
+
+
extern boolean statusbaractive;
-extern boolean automapactive; // In AutoMap mode?
-extern boolean menuactive; // Menu overlayed?
-extern boolean paused; // Game Pause?
+extern boolean automapactive;
+extern boolean menuactive;
+extern boolean paused;
extern boolean viewactive;
@@ -150,46 +150,46 @@ extern int scaledviewwidth;
-// This one is related to the 3-screen display mode.
-// ANG90 = left side, ANG270 = right
+
+
extern int viewangleoffset;
-// Player taking events, and displaying.
+
extern int consoleplayer;
extern int displayplayer;
-// -------------------------------------
-// Scores, rating.
-// Statistics on a given map, for intermission.
-//
+
+
+
+
extern int totalkills;
extern int totalitems;
extern int totalsecret;
-// Timer, for scores.
-extern int levelstarttic; // gametic at level start
-extern int leveltime; // tics in game play for par
+
+extern int levelstarttic;
+extern int leveltime;
+
+
+
+
-// --------------------------------------
-// DEMO playback/recording related stuff.
-// No demo, there is a human player in charge?
-// Disable save/end game?
extern boolean usergame;
-//?
+
extern boolean demoplayback;
extern boolean demorecording;
-// Quit after playing a demo from cmdline.
+
extern boolean singledemo;
-//?
+
extern gamestate_t gamestate;
@@ -197,83 +197,83 @@ extern gamestate_t gamestate;
-//-----------------------------
-// Internal parameters, fixed.
-// These are set by the engine, and not changed
-// according to user inputs. Partly load from
-// WAD, partly set at startup time.
+
+
+
+
+
extern int gametic;
-// Bookkeeping on players - state.
+
extern player_t players[MAXPLAYERS];
-// Alive? Disconnected?
+
extern boolean playeringame[MAXPLAYERS];
-// Player spawn spots for deathmatch.
+
#define MAX_DM_STARTS 10
extern mapthing_t deathmatchstarts[MAX_DM_STARTS];
extern mapthing_t* deathmatch_p;
-// Player spawn spots.
+
extern mapthing_t playerstarts[MAXPLAYERS];
-// Intermission stats.
-// Parameters for world map / intermission.
+
+
extern wbstartstruct_t wminfo;
-// LUT of ammunition limits for each kind.
-// This doubles with BackPack powerup item.
+
+
extern int maxammo[NUMAMMO];
-//-----------------------------------------
-// Internal parameters, used for engine.
-//
-// File handling stuff.
+
+
+
+
extern char basedefault[1024];
extern FILE* debugfile;
-// if true, load all graphics at level load
+
extern boolean precache;
-// wipegamestate can be set to -1
-// to force a wipe on the next draw
+
+
extern gamestate_t wipegamestate;
extern int mouseSensitivity;
-//?
-// debug flag to cancel adaptiveness
+
+
extern boolean singletics;
extern int bodyqueslot;
-// Needed to store the number of the dummy sky flat.
-// Used for rendering,
-// as well as tracking projectiles etc.
+
+
+
extern int skyflatnum;
-// Netgame stuff (buffers and pointers, i.e. indices).
-// This is ???
+
+
extern doomcom_t* doomcom;
-// This points inside doomcom.
+
extern doomdata_t* netbuffer;
@@ -289,8 +289,8 @@ extern int ticdup;
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/doomtype.h b/src/doomtype.h
@@ -1,24 +1,24 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Simple basic typedefs, isolated here to make it easier
-// separating modules.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __DOOMTYPE__
@@ -27,7 +27,7 @@
#ifndef __BYTEBOOL__
#define __BYTEBOOL__
-// Fixed to use builtin bool type with C++.
+
#ifdef __cplusplus
typedef bool boolean;
#else
@@ -37,20 +37,20 @@ typedef unsigned char byte;
#endif
-// Predefined with some OS.
+
#ifdef LINUX
#include <values.h>
#else
#define MAXCHAR ((char)0x7f)
#define MAXSHORT ((short)0x7fff)
-// Max pos 32-bit int.
+
#define MAXINT ((int)0x7fffffff)
#define MAXLONG ((long)0x7fffffff)
#define MINCHAR ((char)0x80)
#define MINSHORT ((short)0x8000)
-// Max negative 32-bit integer.
+
#define MININT ((int)0x80000000)
#define MINLONG ((long)0x80000000)
#endif
@@ -59,8 +59,8 @@ typedef unsigned char byte;
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/dstrings.c b/src/dstrings.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Globally defined strings.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
@@ -34,7 +34,7 @@ rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
char* endmsg[NUM_QUITMESSAGES+1]=
{
- // DOOM1
+
QUITMSG,
"please don't leave, there's more\ndemons to toast!",
"let's beat it -- this is turning\ninto a bloodbath!",
@@ -44,7 +44,7 @@ char* endmsg[NUM_QUITMESSAGES+1]=
"ya know, next time you come in here\ni'm gonna toast ya.",
"go ahead and leave. see if i care."
- // QuitDOOM II messages
+
"you want to quit?\nthen, thou hast lost an eighth!",
"don't go now, there's a \ndimensional shambler waiting\nat the dos prompt!",
"get outta here and go back\nto your boring programs.",
@@ -53,7 +53,7 @@ char* endmsg[NUM_QUITMESSAGES+1]=
"just leave. when you come\nback, i'll be waiting with a bat.",
"you're lucky i don't smack\nyou for thinking about leaving."
- // FinalDOOM?
+
"fuck you, pussy!\nget the fuck out!",
"you quit and i'll jizz\nin your cystholes!",
"if you leave, i'll make\nthe lord drink my jizz.",
@@ -62,7 +62,7 @@ char* endmsg[NUM_QUITMESSAGES+1]=
"suck it down, asshole!\nyou're a fucking wimp!",
"don't quit now! we're \nstill spending your money!",
- // Internal debug. Different style, too.
+
"THIS IS NO MESSAGE!\nPage intentionally left blank."
};
diff --git a/src/dstrings.h b/src/dstrings.h
@@ -1,35 +1,35 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-//
-// $Log:$
-//
-// DESCRIPTION:
-// DOOM strings, by language.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __DSTRINGS__
#define __DSTRINGS__
-// All important printed strings.
-// Language selection (message strings).
-// Use -DFRENCH etc.
+
+
+
#ifdef FRENCH
#include "d_french.h"
@@ -37,30 +37,30 @@
#include "d_englsh.h"
#endif
-// Misc. other strings.
+
#define SAVEGAMENAME "doomsav"
-//
-// File locations,
-// relative to current position.
-// Path names are OS-sensitive.
-//
+
+
+
+
+
#define DEVMAPS "devmaps"
#define DEVDATA "devdata"
-// Not done in french?
-// QuitDOOM messages
+
+
#define NUM_QUITMESSAGES 22
extern char* endmsg[];
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/f_finale.c b/src/f_finale.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Game completion, final screen animation.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
@@ -27,7 +27,7 @@ rcsid[] = "$Id: f_finale.c,v 1.5 1997/02/03 21:26:34 b1 Exp $";
#include <ctype.h>
-// Functions.
+
#include "i_system.h"
#include "m_swap.h"
#include "z_zone.h"
@@ -35,20 +35,20 @@ rcsid[] = "$Id: f_finale.c,v 1.5 1997/02/03 21:26:34 b1 Exp $";
#include "w_wad.h"
#include "s_sound.h"
-// Data.
+
#include "dstrings.h"
#include "sounds.h"
#include "doomstat.h"
#include "r_state.h"
-// ?
-//#include "doomstat.h"
-//#include "r_local.h"
-//#include "f_finale.h"
-// Stage of animation:
-// 0 = text, 1 = art screen, 2 = character cast
+
+
+
+
+
+
int finalestage;
int finalecount;
@@ -90,9 +90,9 @@ void F_CastTicker (void);
boolean F_CastResponder (event_t *ev);
void F_CastDrawer (void);
-//
-// F_StartFinale
-//
+
+
+
void F_StartFinale (void)
{
gameaction = ga_nothing;
@@ -100,13 +100,13 @@ void F_StartFinale (void)
viewactive = false;
automapactive = false;
- // Okay - IWAD dependend stuff.
- // This has been changed severly, and
- // some stuff might have changed in the process.
+
+
+
switch ( gamemode )
{
- // DOOM 1 - E1, E3 or E4, but each nine missions
+
case shareware:
case registered:
case retail:
@@ -132,13 +132,13 @@ void F_StartFinale (void)
finaletext = e4text;
break;
default:
- // Ouch.
+
break;
}
break;
}
- // DOOM II and missions packs with E1, M34
+
case commercial:
{
S_ChangeMusic(mus_read_m, true);
@@ -170,18 +170,18 @@ void F_StartFinale (void)
finaletext = c6text;
break;
default:
- // Ouch.
+
break;
}
break;
}
- // Indeterminate.
+
default:
S_ChangeMusic(mus_read_m, true);
- finaleflat = "F_SKY1"; // Not used anywhere else.
- finaletext = c1text; // FIXME - other text, music?
+ finaleflat = "F_SKY1";
+ finaletext = c1text;
break;
}
@@ -201,18 +201,18 @@ boolean F_Responder (event_t *event)
}
-//
-// F_Ticker
-//
+
+
+
void F_Ticker (void)
{
int i;
- // check for skipping
+
if ( (gamemode == commercial)
&& ( finalecount > 50) )
{
- // go on to the next level
+
for (i=0 ; i<MAXPLAYERS ; i++)
if (players[i].cmd.buttons)
break;
@@ -226,7 +226,7 @@ void F_Ticker (void)
}
}
- // advance animation
+
finalecount++;
if (finalestage == 2)
@@ -242,7 +242,7 @@ void F_Ticker (void)
{
finalecount = 0;
finalestage = 1;
- wipegamestate = -1; // force a wipe
+ wipegamestate = -1;
if (gameepisode == 3)
S_StartMusic (mus_bunny);
}
@@ -250,9 +250,9 @@ void F_Ticker (void)
-//
-// F_TextWrite
-//
+
+
+
#include "hu_stuff.h"
extern patch_t *hu_font[HU_FONTSIZE];
@@ -270,7 +270,7 @@ void F_TextWrite (void)
int cx;
int cy;
- // erase the entire screen to a tiled background
+
src = W_CacheLumpName ( finaleflat , PU_CACHE);
dest = screens[0];
@@ -290,7 +290,7 @@ void F_TextWrite (void)
V_MarkRect (0, 0, SCREENWIDTH, SCREENHEIGHT);
- // draw some of the text onto the screen
+
cx = 10;
cy = 10;
ch = finaletext;
@@ -326,11 +326,11 @@ void F_TextWrite (void)
}
-//
-// Final DOOM 2 animation
-// Casting by id Software.
-// in order of appearance
-//
+
+
+
+
+
typedef struct
{
char *name;
@@ -368,15 +368,15 @@ int castonmelee;
boolean castattacking;
-//
-// F_StartCast
-//
+
+
+
extern gamestate_t wipegamestate;
void F_StartCast (void)
{
- wipegamestate = -1; // force a screen wipe
+ wipegamestate = -1;
castnum = 0;
caststate = &states[mobjinfo[castorder[castnum].type].seestate];
casttics = caststate->tics;
@@ -389,20 +389,20 @@ void F_StartCast (void)
}
-//
-// F_CastTicker
-//
+
+
+
void F_CastTicker (void)
{
int st;
int sfx;
if (--casttics > 0)
- return; // not time to change state yet
+ return;
if (caststate->tics == -1 || caststate->nextstate == S_NULL)
{
- // switch from deathstate to next monster
+
castnum++;
castdeath = false;
if (castorder[castnum].name == NULL)
@@ -414,14 +414,14 @@ void F_CastTicker (void)
}
else
{
- // just advance to next state in animation
+
if (caststate == &states[S_PLAY_ATK1])
- goto stopattack; // Oh, gross hack!
+ goto stopattack;
st = caststate->nextstate;
caststate = &states[st];
castframes++;
- // sound hacks....
+
switch (st)
{
case S_PLAY_ATK1: sfx = sfx_dshtgn; break;
@@ -459,7 +459,7 @@ void F_CastTicker (void)
if (castframes == 12)
{
- // go into attack frame
+
castattacking = true;
if (castonmelee)
caststate=&states[mobjinfo[castorder[castnum].type].meleestate];
@@ -495,9 +495,9 @@ void F_CastTicker (void)
}
-//
-// F_CastResponder
-//
+
+
+
boolean F_CastResponder (event_t* ev)
{
@@ -505,9 +505,9 @@ boolean F_CastResponder (event_t* ev)
return false;
if (castdeath)
- return true; // already in dying frames
+ return true;
- // go into death frame
+
castdeath = true;
caststate = &states[mobjinfo[castorder[castnum].type].deathstate];
casttics = caststate->tics;
@@ -528,7 +528,7 @@ void F_CastPrint (char* text)
int w;
int width;
- // find width
+
ch = text;
width = 0;
@@ -548,7 +548,7 @@ void F_CastPrint (char* text)
width += w;
}
- // draw it
+
cx = 160-width/2;
ch = text;
while (ch)
@@ -571,9 +571,9 @@ void F_CastPrint (char* text)
}
-//
-// F_CastDrawer
-//
+
+
+
void V_DrawPatchFlipped (int x, int y, int scrn, patch_t *patch);
void F_CastDrawer (void)
@@ -584,12 +584,12 @@ void F_CastDrawer (void)
boolean flip;
patch_t* patch;
- // erase the entire screen to a background
+
V_DrawPatch (0,0,0, W_CacheLumpName ("BOSSBACK", PU_CACHE));
F_CastPrint (castorder[castnum].name);
- // draw the current frame in the middle of the screen
+
sprdef = &sprites[caststate->sprite];
sprframe = &sprdef->spriteframes[ caststate->frame & FF_FRAMEMASK];
lump = sprframe->lump[0];
@@ -603,9 +603,9 @@ void F_CastDrawer (void)
}
-//
-// F_DrawPatchCol
-//
+
+
+
void
F_DrawPatchCol
( int x,
@@ -621,7 +621,7 @@ F_DrawPatchCol
column = (column_t *)((byte *)patch + LONG(patch->columnofs[col]));
desttop = screens[0]+x;
- // step through the posts in a column
+
while (column->topdelta != 0xff )
{
source = (byte *)column + 3;
@@ -638,9 +638,9 @@ F_DrawPatchCol
}
-//
-// F_BunnyScroll
-//
+
+
+
void F_BunnyScroll (void)
{
int scrolled;
@@ -694,9 +694,9 @@ void F_BunnyScroll (void)
}
-//
-// F_Drawer
-//
+
+
+
void F_Drawer (void)
{
if (finalestage == 2)
diff --git a/src/f_finale.h b/src/f_finale.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-//
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __F_FINALE__
@@ -26,17 +26,17 @@
#include "doomtype.h"
#include "d_event.h"
-//
-// FINALE
-//
-// Called by main loop.
+
+
+
+
boolean F_Responder (event_t* ev);
-// Called by main loop.
+
void F_Ticker (void);
-// Called by main loop.
+
void F_Drawer (void);
@@ -46,8 +46,8 @@ void F_StartFinale (void);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/f_wipe.c b/src/f_wipe.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Mission begin melt/wipe screen special effect.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char rcsid[] = "$Id: f_wipe.c,v 1.2 1997/02/03 22:45:09 b1 Exp $";
@@ -35,11 +35,11 @@ static const char rcsid[] = "$Id: f_wipe.c,v 1.2 1997/02/03 22:45:09 b1 Exp $";
#include "f_wipe.h"
-//
-// SCREEN WIPE PACKAGE
-//
-// when zero, stop the wipe
+
+
+
+
static boolean go = 0;
static byte* wipe_scr_start;
@@ -145,16 +145,16 @@ wipe_initMelt
{
int i, r;
- // copy start screen to main screen
+
memcpy(wipe_scr, wipe_scr_start, width*height);
- // makes this wipe faster (in theory)
- // to have stuff in column-major format
+
+
wipe_shittyColMajorXform((short*)wipe_scr_start, width/2, height);
wipe_shittyColMajorXform((short*)wipe_scr_end, width/2, height);
- // setup initial column positions
- // (y<0 => not ready to scroll yet)
+
+
y = (int *) Z_Malloc(width*sizeof(int), PU_STATIC, 0);
y[0] = -(M_Random()%16);
for (i=1;i<width;i++)
@@ -254,7 +254,7 @@ wipe_EndScreen
{
wipe_scr_end = screens[3];
I_ReadScreen(wipe_scr_end);
- V_DrawBlock(x, y, 0, width, height, wipe_scr_start); // restore start scr.
+ V_DrawBlock(x, y, 0, width, height, wipe_scr_start);
return 0;
}
@@ -276,21 +276,21 @@ wipe_ScreenWipe
void V_MarkRect(int, int, int, int);
- // initial stuff
+
if (!go)
{
go = 1;
- // wipe_scr = (byte *) Z_Malloc(width*height, PU_STATIC, 0); // DEBUG
+
wipe_scr = screens[0];
(*wipes[wipeno*3])(width, height, ticks);
}
- // do a piece of wipe-in
+
V_MarkRect(0, 0, width, height);
rc = (*wipes[wipeno*3+1])(width, height, ticks);
- // V_DrawBlock(x, y, 0, width, height, wipe_scr); // DEBUG
+
- // final stuff
+
if (rc)
{
go = 0;
diff --git a/src/f_wipe.h b/src/f_wipe.h
@@ -1,38 +1,38 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Mission start screen wipe/melt, special effects.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __F_WIPE_H__
#define __F_WIPE_H__
-//
-// SCREEN WIPE PACKAGE
-//
+
+
+
enum
{
- // simple gradual pixel change for 8-bit only
+
wipe_ColorXForm,
- // weird screen melt
+
wipe_Melt,
wipe_NUMWIPES
@@ -64,8 +64,8 @@ wipe_ScreenWipe
int ticks );
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/g_game.c b/src/g_game.c
@@ -1,24 +1,24 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION: none
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
@@ -49,7 +49,7 @@ rcsid[] = "$Id: g_game.c,v 1.8 1997/02/03 22:45:09 b1 Exp $";
#include "st_stuff.h"
#include "am_map.h"
-// Needs access to LFB.
+
#include "v_video.h"
#include "w_wad.h"
@@ -58,11 +58,11 @@ rcsid[] = "$Id: g_game.c,v 1.8 1997/02/03 22:45:09 b1 Exp $";
#include "s_sound.h"
-// Data.
+
#include "dstrings.h"
#include "sounds.h"
-// SKY handling - still the wrong place.
+
#include "r_data.h"
#include "r_sky.h"
@@ -102,27 +102,27 @@ int gameepisode;
int gamemap;
boolean paused;
-boolean sendpause; // send a pause event next tic
-boolean sendsave; // send a save event next tic
-boolean usergame; // ok to save / end game
+boolean sendpause;
+boolean sendsave;
+boolean usergame;
-boolean timingdemo; // if true, exit with report on completion
-boolean nodrawers; // for comparative timing purposes
-boolean noblit; // for comparative timing purposes
-int starttime; // for comparative timing purposes
+boolean timingdemo;
+boolean nodrawers;
+boolean noblit;
+int starttime;
boolean viewactive;
-boolean deathmatch; // only if started as net death
-boolean netgame; // only true if packets are broadcast
+boolean deathmatch;
+boolean netgame;
boolean playeringame[MAXPLAYERS];
player_t players[MAXPLAYERS];
-int consoleplayer; // player taking events and displaying
-int displayplayer; // view being displayed
+int consoleplayer;
+int displayplayer;
int gametic;
-int levelstarttic; // gametic at level start
-int totalkills, totalitems, totalsecret; // for intermission
+int levelstarttic;
+int totalkills, totalitems, totalsecret;
char demoname[32];
boolean demorecording;
@@ -131,20 +131,20 @@ boolean netdemo;
byte* demobuffer;
byte* demo_p;
byte* demoend;
-boolean singledemo; // quit after playing a demo from cmdline
+boolean singledemo;
-boolean precache = true; // if true, load all graphics at start
+boolean precache = true;
-wbstartstruct_t wminfo; // parms for world map / intermission
+wbstartstruct_t wminfo;
short consistancy[MAXPLAYERS][BACKUPTICS];
byte* savebuffer;
-//
-// controls (have defaults)
-//
+
+
+
int key_right;
int key_left;
@@ -174,19 +174,19 @@ int joybspeed;
fixed_t forwardmove[2] = {0x19, 0x32};
fixed_t sidemove[2] = {0x18, 0x28};
-fixed_t angleturn[3] = {640, 1280, 320}; // + slow turn
+fixed_t angleturn[3] = {640, 1280, 320};
#define SLOWTURNTICS 6
#define NUMKEYS 256
boolean gamekeydown[NUMKEYS];
-int turnheld; // for accelerative turning
+int turnheld;
boolean mousearray[4];
-boolean* mousebuttons = &mousearray[1]; // allow [-1]
+boolean* mousebuttons = &mousearray[1];
+
-// mouse values are used once
int mousex;
int mousey;
@@ -197,11 +197,11 @@ int dclicktime2;
int dclickstate2;
int dclicks2;
-// joystick values are repeated
+
int joyxmove;
int joyymove;
boolean joyarray[5];
-boolean* joybuttons = &joyarray[1]; // allow [-1]
+boolean* joybuttons = &joyarray[1];
int savegameslot;
char savedescription[32];
@@ -212,7 +212,7 @@ char savedescription[32];
mobj_t* bodyque[BODYQUESIZE];
int bodyqueslot;
-void* statcopy; // for statistics driver
+void* statcopy;
@@ -228,12 +228,12 @@ int G_CmdChecksum (ticcmd_t* cmd)
}
-//
-// G_BuildTiccmd
-// Builds a ticcmd from all of the available inputs
-// or reads it from the demo buffer.
-// If recording a demo, write it out
-//
+
+
+
+
+
+
void G_BuildTiccmd (ticcmd_t* cmd)
{
int i;
@@ -246,7 +246,7 @@ void G_BuildTiccmd (ticcmd_t* cmd)
ticcmd_t* base;
- base = I_BaseTiccmd (); // empty, or external driver
+ base = I_BaseTiccmd ();
memcpy (cmd,base,sizeof(*cmd));
cmd->consistancy =
@@ -259,8 +259,8 @@ void G_BuildTiccmd (ticcmd_t* cmd)
forward = side = 0;
- // use two stage accelerative turning
- // on the keyboard and joystick
+
+
if (joyxmove < 0
|| joyxmove > 0
|| gamekeydown[key_right]
@@ -270,21 +270,21 @@ void G_BuildTiccmd (ticcmd_t* cmd)
turnheld = 0;
if (turnheld < SLOWTURNTICS)
- tspeed = 2; // slow turn
+ tspeed = 2;
else
tspeed = speed;
- // let movement keys cancel each other out
+
if (strafe)
{
if (gamekeydown[key_right])
{
- // fprintf(stderr, "strafe right\n");
+
side += sidemove[speed];
}
if (gamekeydown[key_left])
{
- // fprintf(stderr, "strafe left\n");
+
side -= sidemove[speed];
}
if (joyxmove > 0)
@@ -307,12 +307,12 @@ void G_BuildTiccmd (ticcmd_t* cmd)
if (gamekeydown[key_up])
{
- // fprintf(stderr, "up\n");
+
forward += forwardmove[speed];
}
if (gamekeydown[key_down])
{
- // fprintf(stderr, "down\n");
+
forward -= forwardmove[speed];
}
if (joyymove < 0)
@@ -324,7 +324,7 @@ void G_BuildTiccmd (ticcmd_t* cmd)
if (gamekeydown[key_strafeleft])
side -= sidemove[speed];
- // buttons
+
cmd->chatchar = HU_dequeueChatChar();
if (gamekeydown[key_fire] || mousebuttons[mousebfire]
@@ -334,11 +334,11 @@ void G_BuildTiccmd (ticcmd_t* cmd)
if (gamekeydown[key_use] || joybuttons[joybuse] )
{
cmd->buttons |= BT_USE;
- // clear double clicks if hit use button
+
dclicks = 0;
}
- // chainsaw overrides
+
for (i=0 ; i<NUMWEAPONS-1 ; i++)
if (gamekeydown['1'+i])
{
@@ -347,11 +347,11 @@ void G_BuildTiccmd (ticcmd_t* cmd)
break;
}
- // mouse
+
if (mousebuttons[mousebforward])
forward += forwardmove[speed];
- // forward double click
+
if (mousebuttons[mousebforward] != dclickstate && dclicktime > 1 )
{
dclickstate = mousebuttons[mousebforward];
@@ -375,7 +375,7 @@ void G_BuildTiccmd (ticcmd_t* cmd)
}
}
- // strafe double click
+
bstrafe =
mousebuttons[mousebstrafe]
|| joybuttons[joybstrafe];
@@ -422,7 +422,7 @@ void G_BuildTiccmd (ticcmd_t* cmd)
cmd->forwardmove += forward;
cmd->sidemove += side;
- // special buttons
+
if (sendpause)
{
sendpause = false;
@@ -437,24 +437,24 @@ void G_BuildTiccmd (ticcmd_t* cmd)
}
-//
-// G_DoLoadLevel
-//
+
+
+
extern gamestate_t wipegamestate;
void G_DoLoadLevel (void)
{
int i;
- // Set the sky map.
- // First thing, we have a dummy sky texture name,
- // a flat. The data is in the WAD only because
- // we look for an actual index, instead of simply
- // setting one.
+
+
+
+
+
skyflatnum = R_FlatNumForName ( SKYFLATNAME );
- // DOOM determines the sky texture to be used
- // depending on the current episode, and the game version.
+
+
if ( (gamemode == commercial)
|| ( gamemode == pack_tnt )
|| ( gamemode == pack_plut ) )
@@ -467,10 +467,10 @@ void G_DoLoadLevel (void)
skytexture = R_TextureNumForName ("SKY2");
}
- levelstarttic = gametic; // for time calculation
+ levelstarttic = gametic;
if (wipegamestate == GS_LEVEL)
- wipegamestate = -1; // force a wipe
+ wipegamestate = -1;
gamestate = GS_LEVEL;
@@ -482,12 +482,12 @@ void G_DoLoadLevel (void)
}
P_SetupLevel (gameepisode, gamemap, 0, gameskill);
- displayplayer = consoleplayer; // view the guy you are playing
+ displayplayer = consoleplayer;
starttime = I_GetTime ();
gameaction = ga_nothing;
Z_CheckHeap ();
- // clear cmd building stuff
+
memset (gamekeydown, 0, sizeof(gamekeydown));
joyxmove = joyymove = 0;
mousex = mousey = 0;
@@ -497,17 +497,17 @@ void G_DoLoadLevel (void)
}
-//
-// G_Responder
-// Get info needed to make ticcmd_ts for the players.
-//
+
+
+
+
boolean G_Responder (event_t* ev)
{
- // allow spy mode changes even during the demo
+
if (gamestate == GS_LEVEL && ev->type == ev_keydown
&& ev->data1 == KEY_F12 && (singledemo || !deathmatch) )
{
- // spy mode
+
do
{
displayplayer++;
@@ -517,7 +517,7 @@ boolean G_Responder (event_t* ev)
return true;
}
- // any other key pops up menu if in demos
+
if (gameaction == ga_nothing && !singledemo &&
(demoplayback || gamestate == GS_DEMOSCREEN)
)
@@ -542,17 +542,17 @@ boolean G_Responder (event_t* ev)
}
#endif
if (HU_Responder (ev))
- return true; // chat ate the event
+ return true;
if (ST_Responder (ev))
- return true; // status window ate it
+ return true;
if (AM_Responder (ev))
- return true; // automap ate it
+ return true;
}
if (gamestate == GS_FINALE)
{
if (F_Responder (ev))
- return true; // finale ate the event
+ return true;
}
switch (ev->type)
@@ -565,12 +565,12 @@ boolean G_Responder (event_t* ev)
}
if (ev->data1 <NUMKEYS)
gamekeydown[ev->data1] = true;
- return true; // eat key down events
+ return true;
case ev_keyup:
if (ev->data1 <NUMKEYS)
gamekeydown[ev->data1] = false;
- return false; // always let key up events filter down
+ return false;
case ev_mouse:
mousebuttons[0] = ev->data1 & 1;
@@ -578,7 +578,7 @@ boolean G_Responder (event_t* ev)
mousebuttons[2] = ev->data1 & 4;
mousex = ev->data2*(mouseSensitivity+5)/10;
mousey = ev->data3*(mouseSensitivity+5)/10;
- return true; // eat events
+ return true;
case ev_joystick:
joybuttons[0] = ev->data1 & 1;
@@ -587,7 +587,7 @@ boolean G_Responder (event_t* ev)
joybuttons[3] = ev->data1 & 8;
joyxmove = ev->data2;
joyymove = ev->data3;
- return true; // eat events
+ return true;
default:
break;
@@ -598,22 +598,22 @@ boolean G_Responder (event_t* ev)
-//
-// G_Ticker
-// Make ticcmd_ts for the players.
-//
+
+
+
+
void G_Ticker (void)
{
int i;
int buf;
ticcmd_t* cmd;
- // do player reborns if needed
+
for (i=0 ; i<MAXPLAYERS ; i++)
if (playeringame[i] && players[i].playerstate == PST_REBORN)
G_DoReborn (i);
- // do things to change the game state
+
while (gameaction != ga_nothing)
{
switch (gameaction)
@@ -651,8 +651,8 @@ void G_Ticker (void)
}
}
- // get commands, check consistancy,
- // and build new consistancy check
+
+
buf = (gametic/ticdup)%BACKUPTICS;
for (i=0 ; i<MAXPLAYERS ; i++)
@@ -668,7 +668,7 @@ void G_Ticker (void)
if (demorecording)
G_WriteDemoTiccmd (cmd);
- // check for turbo cheats
+
if (cmd->forwardmove > TURBOTHRESHOLD
&& !(gametic&31) && ((gametic>>5)&3) == i )
{
@@ -694,7 +694,7 @@ void G_Ticker (void)
}
}
- // check for special buttons
+
for (i=0 ; i<MAXPLAYERS ; i++)
{
if (playeringame[i])
@@ -723,7 +723,7 @@ void G_Ticker (void)
}
}
- // do main actions
+
switch (gamestate)
{
case GS_LEVEL:
@@ -748,34 +748,34 @@ void G_Ticker (void)
}
-//
-// PLAYER STRUCTURE FUNCTIONS
-// also see P_SpawnPlayer in P_Things
-//
-//
-// G_InitPlayer
-// Called at the start.
-// Called by the game initialization functions.
-//
+
+
+
+
+
+
+
+
+
void G_InitPlayer (int player)
{
player_t* p;
- // set up the saved info
+
p = &players[player];
- // clear everything else to defaults
+
G_PlayerReborn (player);
}
-//
-// G_PlayerFinishLevel
-// Can when a player completes a level.
-//
+
+
+
+
void G_PlayerFinishLevel (int player)
{
player_t* p;
@@ -784,19 +784,19 @@ void G_PlayerFinishLevel (int player)
memset (p->powers, 0, sizeof (p->powers));
memset (p->cards, 0, sizeof (p->cards));
- p->mo->flags &= ~MF_SHADOW; // cancel invisibility
- p->extralight = 0; // cancel gun flashes
- p->fixedcolormap = 0; // cancel ir gogles
- p->damagecount = 0; // no palette changes
+ p->mo->flags &= ~MF_SHADOW;
+ p->extralight = 0;
+ p->fixedcolormap = 0;
+ p->damagecount = 0;
p->bonuscount = 0;
}
-//
-// G_PlayerReborn
-// Called after a player dies
-// almost everything is cleared and initialized
-//
+
+
+
+
+
void G_PlayerReborn (int player)
{
player_t* p;
@@ -819,7 +819,7 @@ void G_PlayerReborn (int player)
players[player].itemcount = itemcount;
players[player].secretcount = secretcount;
- p->usedown = p->attackdown = true; // don't do anything immediately
+ p->usedown = p->attackdown = true;
p->playerstate = PST_LIVE;
p->health = MAXHEALTH;
p->readyweapon = p->pendingweapon = wp_pistol;
@@ -832,12 +832,12 @@ void G_PlayerReborn (int player)
}
-//
-// G_CheckSpot
-// Returns false if the player cannot be respawned
-// at the given mapthing_t spot
-// because something is occupying it
-//
+
+
+
+
+
+
void P_SpawnPlayer (mapthing_t* mthing);
boolean
@@ -854,7 +854,7 @@ G_CheckSpot
if (!players[playernum].mo)
{
- // first spawn of level, before corpses
+
for (i=0 ; i<playernum ; i++)
if (players[i].mo->x == mthing->x << FRACBITS
&& players[i].mo->y == mthing->y << FRACBITS)
@@ -868,13 +868,13 @@ G_CheckSpot
if (!P_CheckPosition (players[playernum].mo, x, y) )
return false;
- // flush an old corpse if needed
+
if (bodyqueslot >= BODYQUESIZE)
P_RemoveMobj (bodyque[bodyqueslot%BODYQUESIZE]);
bodyque[bodyqueslot%BODYQUESIZE] = players[playernum].mo;
bodyqueslot++;
- // spawn a teleport fog
+
ss = R_PointInSubsector (x,y);
an = ( ANG45 * (mthing->angle/45) ) >> ANGLETOFINESHIFT;
@@ -883,17 +883,17 @@ G_CheckSpot
, MT_TFOG);
if (players[consoleplayer].viewz != 1)
- S_StartSound (mo, sfx_telept); // don't start sound on first frame
+ S_StartSound (mo, sfx_telept);
return true;
}
-//
-// G_DeathMatchSpawnPlayer
-// Spawns a player at one of the random death match spots
-// called at level load and each death
-//
+
+
+
+
+
void G_DeathMatchSpawnPlayer (int playernum)
{
int i,j;
@@ -914,30 +914,30 @@ void G_DeathMatchSpawnPlayer (int playernum)
}
}
- // no good spot, so the player will probably get stuck
+
P_SpawnPlayer (&playerstarts[playernum]);
}
-//
-// G_DoReborn
-//
+
+
+
void G_DoReborn (int playernum)
{
int i;
if (!netgame)
{
- // reload the level from scratch
+
gameaction = ga_loadlevel;
}
else
{
- // respawn at the start
+
- // first dissasociate the corpse
+
players[playernum].mo->player = NULL;
- // spawn at random spot if in death match
+
if (deathmatch)
{
G_DeathMatchSpawnPlayer (playernum);
@@ -950,17 +950,17 @@ void G_DoReborn (int playernum)
return;
}
- // try to spawn at one of the other players spots
+
for (i=0 ; i<MAXPLAYERS ; i++)
{
if (G_CheckSpot (playernum, &playerstarts[i]) )
{
- playerstarts[i].type = playernum+1; // fake as other player
+ playerstarts[i].type = playernum+1;
P_SpawnPlayer (&playerstarts[i]);
- playerstarts[i].type = i+1; // restore
+ playerstarts[i].type = i+1;
return;
}
- // he's going to be inside something. Too bad.
+
}
P_SpawnPlayer (&playerstarts[playernum]);
}
@@ -974,7 +974,7 @@ void G_ScreenShot (void)
-// DOOM Par Times
+
int pars[4][10] =
{
{0},
@@ -983,19 +983,19 @@ int pars[4][10] =
{0,90,45,90,150,90,90,165,30,135}
};
-// DOOM II Par Times
+
int cpars[32] =
{
- 30,90,120,120,90,150,120,120,270,90, // 1-10
- 210,150,150,150,210,150,420,150,210,150, // 11-20
- 240,150,180,150,150,300,330,420,300,180, // 21-30
- 120,30 // 31-32
+ 30,90,120,120,90,150,120,120,270,90,
+ 210,150,150,150,210,150,420,150,210,150,
+ 240,150,180,150,150,300,330,420,300,180,
+ 120,30
};
-//
-// G_DoCompleted
-//
+
+
+
boolean secretexit;
extern char* pagename;
@@ -1005,10 +1005,10 @@ void G_ExitLevel (void)
gameaction = ga_completed;
}
-// Here's for the german edition.
+
void G_SecretExitLevel (void)
{
- // IF NO WOLF3D LEVELS, NO SECRET EXIT!
+
if ( (gamemode == commercial)
&& (W_CheckNumForName("map31")<0))
secretexit = false;
@@ -1025,7 +1025,7 @@ void G_DoCompleted (void)
for (i=0 ; i<MAXPLAYERS ; i++)
if (playeringame[i])
- G_PlayerFinishLevel (i); // take away cards and stuff
+ G_PlayerFinishLevel (i);
if (automapactive)
AM_Stop ();
@@ -1042,11 +1042,11 @@ void G_DoCompleted (void)
break;
}
-//#if 0 Hmmm - why?
+
if ( (gamemap == 8)
&& (gamemode != commercial) )
{
- // victory
+
gameaction = ga_victory;
return;
}
@@ -1054,18 +1054,18 @@ void G_DoCompleted (void)
if ( (gamemap == 9)
&& (gamemode != commercial) )
{
- // exit secret level
+
for (i=0 ; i<MAXPLAYERS ; i++)
players[i].didsecret = true;
}
-//#endif
+
wminfo.didsecret = players[consoleplayer].didsecret;
wminfo.epsd = gameepisode -1;
wminfo.last = gamemap -1;
- // wminfo.next is 0 biased, unlike gamemap
+
if ( gamemode == commercial)
{
if (secretexit)
@@ -1085,10 +1085,10 @@ void G_DoCompleted (void)
else
{
if (secretexit)
- wminfo.next = 8; // go to secret level
+ wminfo.next = 8;
else if (gamemap == 9)
{
- // returning from secret level
+
switch (gameepisode)
{
case 1:
@@ -1106,7 +1106,7 @@ void G_DoCompleted (void)
}
}
else
- wminfo.next = gamemap; // go to next level
+ wminfo.next = gamemap;
}
wminfo.maxkills = totalkills;
@@ -1141,9 +1141,9 @@ void G_DoCompleted (void)
}
-//
-// G_WorldDone
-//
+
+
+
void G_WorldDone (void)
{
gameaction = ga_worlddone;
@@ -1180,10 +1180,10 @@ void G_DoWorldDone (void)
-//
-// G_InitFromSavegame
-// Can be called by the startup code or the menu task.
-//
+
+
+
+
extern boolean setsizeneeded;
void R_ExecuteSetViewSize (void);
@@ -1210,11 +1210,11 @@ void G_DoLoadGame (void)
length = M_ReadFile (savename, &savebuffer);
save_p = savebuffer + SAVESTRINGSIZE;
- // skip the description field
+
memset (vcheck,0,sizeof(vcheck));
sprintf (vcheck,"version %i",VERSION);
if (strcmp (save_p, vcheck))
- return; // bad version
+ return;
save_p += VERSIONSIZE;
gameskill = *save_p++;
@@ -1223,16 +1223,16 @@ void G_DoLoadGame (void)
for (i=0 ; i<MAXPLAYERS ; i++)
playeringame[i] = *save_p++;
- // load a base level
+
G_InitNew (gameskill, gameepisode, gamemap);
- // get the times
+
a = *save_p++;
b = *save_p++;
c = *save_p++;
leveltime = (a<<16) + (b<<8) + c;
- // dearchive all the modifications
+
P_UnArchivePlayers ();
P_UnArchiveWorld ();
P_UnArchiveThinkers ();
@@ -1241,22 +1241,22 @@ void G_DoLoadGame (void)
if (*save_p != 0x1d)
I_Error ("Bad savegame");
- // done
+
Z_Free (savebuffer);
if (setsizeneeded)
R_ExecuteSetViewSize ();
- // draw the pattern into the back screen
+
R_FillBackScreen ();
}
-//
-// G_SaveGame
-// Called by the menu task.
-// Description is a 24 byte text string
-//
+
+
+
+
+
void
G_SaveGame
( int slot,
@@ -1304,7 +1304,7 @@ void G_DoSaveGame (void)
P_ArchiveThinkers ();
P_ArchiveSpecials ();
- *save_p++ = 0x1d; // consistancy marker
+ *save_p++ = 0x1d;
length = save_p - savebuffer;
if (length > SAVEGAMESIZE)
@@ -1315,16 +1315,16 @@ void G_DoSaveGame (void)
players[consoleplayer].message = GGSAVED;
- // draw the pattern into the back screen
+
R_FillBackScreen ();
}
-//
-// G_InitNew
-// Can be called by the startup code or the menu task,
-// consoleplayer, displayplayer, playeringame[] should be set.
-//
+
+
+
+
+
skill_t d_skill;
int d_episode;
int d_map;
@@ -1357,7 +1357,7 @@ void G_DoNewGame (void)
gameaction = ga_nothing;
}
-// The sky texture to be used instead of the F_SKY1 dummy.
+
extern int skytexture;
@@ -1380,9 +1380,9 @@ G_InitNew
skill = sk_nightmare;
- // This was quite messy with SPECIAL and commented parts.
- // Supposedly hacks to make the latest edition work.
- // It might not work properly.
+
+
+
if (episode < 1)
episode = 1;
@@ -1394,7 +1394,7 @@ G_InitNew
else if ( gamemode == shareware )
{
if (episode > 1)
- episode = 1; // only start episode 1 on shareware
+ episode = 1;
}
else
{
@@ -1436,11 +1436,11 @@ G_InitNew
}
- // force players to be initialized upon first level load
+
for (i=0 ; i<MAXPLAYERS ; i++)
players[i].playerstate = PST_REBORN;
- usergame = true; // will be set false if a demo
+ usergame = true;
paused = false;
demoplayback = false;
automapactive = false;
@@ -1451,7 +1451,7 @@ G_InitNew
viewactive = true;
- // set the sky map for the episode
+
if ( gamemode == commercial)
{
skytexture = R_TextureNumForName ("SKY3");
@@ -1473,7 +1473,7 @@ G_InitNew
case 3:
skytexture = R_TextureNumForName ("SKY3");
break;
- case 4: // Special Edition sky
+ case 4:
skytexture = R_TextureNumForName ("SKY4");
break;
}
@@ -1482,9 +1482,9 @@ G_InitNew
}
-//
-// DEMO RECORDING
-//
+
+
+
#define DEMOMARKER 0x80
@@ -1492,7 +1492,7 @@ void G_ReadDemoTiccmd (ticcmd_t* cmd)
{
if (*demo_p == DEMOMARKER)
{
- // end of demo data stream
+
G_CheckDemoStatus ();
return;
}
@@ -1505,7 +1505,7 @@ void G_ReadDemoTiccmd (ticcmd_t* cmd)
void G_WriteDemoTiccmd (ticcmd_t* cmd)
{
- if (gamekeydown['q']) // press q to end demo recording
+ if (gamekeydown['q'])
G_CheckDemoStatus ();
*demo_p++ = cmd->forwardmove;
*demo_p++ = cmd->sidemove;
@@ -1514,19 +1514,19 @@ void G_WriteDemoTiccmd (ticcmd_t* cmd)
demo_p -= 4;
if (demo_p > demoend - 16)
{
- // no more space
+
G_CheckDemoStatus ();
return;
}
- G_ReadDemoTiccmd (cmd); // make SURE it is exactly the same
+ G_ReadDemoTiccmd (cmd);
}
-//
-// G_RecordDemo
-//
+
+
+
void G_RecordDemo (char* name)
{
int i;
@@ -1567,9 +1567,9 @@ void G_BeginRecording (void)
}
-//
-// G_PlayDemo
-//
+
+
+
char* defdemoname;
@@ -1610,7 +1610,7 @@ void G_DoPlayDemo (void)
netdemo = true;
}
- // don't spend a lot of time in loadlevel
+
precache = false;
G_InitNew (skill, episode, map);
precache = true;
@@ -1619,9 +1619,9 @@ void G_DoPlayDemo (void)
demoplayback = true;
}
-//
-// G_TimeDemo
-//
+
+
+
void G_TimeDemo (char* name)
{
nodrawers = M_CheckParm ("-nodraw");
diff --git a/src/g_game.h b/src/g_game.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Duh.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __G_GAME__
@@ -28,30 +28,30 @@
-//
-// GAME
-//
+
+
+
void G_DeathMatchSpawnPlayer (int playernum);
void G_InitNew (skill_t skill, int episode, int map);
-// Can be called by the startup code or M_Responder.
-// A normal game starts at map 1,
-// but a warp test can start elsewhere
+
+
+
void G_DeferedInitNew (skill_t skill, int episode, int map);
void G_DeferedPlayDemo (char* demo);
-// Can be called by the startup code or M_Responder,
-// calls P_SetupLevel or W_EnterWorld.
+
+
void G_LoadGame (char* name);
void G_DoLoadGame (void);
-// Called by M_Responder.
+
void G_SaveGame (int slot, char* description);
-// Only called by startup code.
+
void G_RecordDemo (char* name);
void G_BeginRecording (void);
@@ -72,8 +72,8 @@ void G_ScreenShot (void);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/hu_lib.c b/src/hu_lib.c
@@ -1,24 +1,24 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION: heads-up text and input code
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: hu_lib.c,v 1.3 1997/01/26 07:44:58 b1 Exp $";
@@ -34,10 +34,10 @@ rcsid[] = "$Id: hu_lib.c,v 1.3 1997/01/26 07:44:58 b1 Exp $";
#include "r_local.h"
#include "r_draw.h"
-// boolean : whether the screen is always erased
+
#define noterased viewwindowx
-extern boolean automapactive; // in AM_map.c
+extern boolean automapactive;
void HUlib_init(void)
{
@@ -107,7 +107,7 @@ HUlib_drawTextLine
int x;
unsigned char c;
- // draw the new stuff
+
x = l->x;
for (i=0;i<l->len;i++)
{
@@ -130,7 +130,7 @@ HUlib_drawTextLine
}
}
- // draw the cursor if requested
+
if (drawcursor
&& x + SHORT(l->f['_' - l->sc]->width) <= SCREENWIDTH)
{
@@ -139,7 +139,7 @@ HUlib_drawTextLine
}
-// sorta called by HU_Erase and just better darn get things straight
+
void HUlib_eraseTextLine(hu_textline_t* l)
{
int lh;
@@ -147,9 +147,9 @@ void HUlib_eraseTextLine(hu_textline_t* l)
int yoffset;
static boolean lastautomapactive = true;
- // Only erases when NOT in automap and the screen is reduced,
- // and the text must either need updating or refreshing
- // (because of a recent change back from the automap)
+
+
+
if (!automapactive &&
viewwindowx && l->needsupdate)
@@ -158,12 +158,12 @@ void HUlib_eraseTextLine(hu_textline_t* l)
for (y=l->y,yoffset=y*SCREENWIDTH ; y<l->y+lh ; y++,yoffset+=SCREENWIDTH)
{
if (y < viewwindowy || y >= viewwindowy + viewheight)
- R_VideoErase(yoffset, SCREENWIDTH); // erase entire line
+ R_VideoErase(yoffset, SCREENWIDTH);
else
{
- R_VideoErase(yoffset, viewwindowx); // erase left border
+ R_VideoErase(yoffset, viewwindowx);
R_VideoErase(yoffset + viewwindowx + viewwidth, viewwindowx);
- // erase right border
+
}
}
}
@@ -202,12 +202,12 @@ void HUlib_addLineToSText(hu_stext_t* s)
int i;
- // add a clear line
+
if (++s->cl == s->h)
s->cl = 0;
HUlib_clearTextLine(&s->l[s->cl]);
- // everything needs updating
+
for (i=0 ; i<s->h ; i++)
s->l[i].needsupdate = 4;
@@ -234,19 +234,19 @@ void HUlib_drawSText(hu_stext_t* s)
hu_textline_t *l;
if (!*s->on)
- return; // if not on, don't draw
+ return;
- // draw everything
+
for (i=0 ; i<s->h ; i++)
{
idx = s->cl - i;
if (idx < 0)
- idx += s->h; // handle queue of lines
+ idx += s->h;
l = &s->l[idx];
- // need a decision made here on whether to skip the draw
- HUlib_drawTextLine(l, false); // no cursor, please
+
+ HUlib_drawTextLine(l, false);
}
}
@@ -275,14 +275,14 @@ HUlib_initIText
int startchar,
boolean* on )
{
- it->lm = 0; // default left margin is start of text
+ it->lm = 0;
it->on = on;
it->laston = true;
HUlib_initTextLine(&it->l, x, y, font, startchar);
}
-// The following deletion routines adhere to the left margin restriction
+
void HUlib_delCharFromIText(hu_itext_t* it)
{
if (it->l.len != it->lm)
@@ -295,7 +295,7 @@ void HUlib_eraseLineFromIText(hu_itext_t* it)
HUlib_delCharFromTextLine(&it->l);
}
-// Resets left margin as well
+
void HUlib_resetIText(hu_itext_t* it)
{
it->lm = 0;
@@ -312,8 +312,8 @@ HUlib_addPrefixToIText
it->lm = it->l.len;
}
-// wrapper function for handling general keyed input.
-// returns true if it ate the key
+
+
boolean
HUlib_keyInIText
( hu_itext_t* it,
@@ -327,9 +327,9 @@ HUlib_keyInIText
HUlib_delCharFromIText(it);
else
if (ch != KEY_ENTER)
- return false; // did not eat key
+ return false;
- return true; // ate the key
+ return true;
}
@@ -340,7 +340,7 @@ void HUlib_drawIText(hu_itext_t* it)
if (!*it->on)
return;
- HUlib_drawTextLine(l, true); // draw the line w/ cursor
+ HUlib_drawTextLine(l, true);
}
diff --git a/src/hu_lib.h b/src/hu_lib.h
@@ -1,131 +1,131 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION: none
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __HULIB__
#define __HULIB__
-// We are referring to patches.
+
#include "r_defs.h"
-// background and foreground screen numbers
-// different from other modules.
+
+
#define BG 1
#define FG 0
-// font stuff
+
#define HU_CHARERASE KEY_BACKSPACE
#define HU_MAXLINES 4
#define HU_MAXLINELENGTH 80
-//
-// Typedefs of widgets
-//
-// Text Line widget
-// (parent of Scrolling Text and Input Text widgets)
+
+
+
+
+
typedef struct
{
- // left-justified position of scrolling text window
+
int x;
int y;
- patch_t** f; // font
- int sc; // start character
- char l[HU_MAXLINELENGTH+1]; // line of text
- int len; // current line length
+ patch_t** f;
+ int sc;
+ char l[HU_MAXLINELENGTH+1];
+ int len;
- // whether this line needs to be udpated
+
int needsupdate;
} hu_textline_t;
-// Scrolling Text window widget
-// (child of Text Line widget)
+
+
typedef struct
{
- hu_textline_t l[HU_MAXLINES]; // text lines to draw
- int h; // height in lines
- int cl; // current line number
+ hu_textline_t l[HU_MAXLINES];
+ int h;
+ int cl;
- // pointer to boolean stating whether to update window
+
boolean* on;
- boolean laston; // last value of *->on.
+ boolean laston;
} hu_stext_t;
-// Input Text Line widget
-// (child of Text Line widget)
+
+
typedef struct
{
- hu_textline_t l; // text line to input on
+ hu_textline_t l;
- // left margin past which I am not to delete characters
+
int lm;
- // pointer to boolean stating whether to update window
+
boolean* on;
- boolean laston; // last value of *->on;
+ boolean laston;
} hu_itext_t;
-//
-// Widget creation, access, and update routines
-//
-// initializes heads-up widget library
+
+
+
+
void HUlib_init(void);
-//
-// textline code
-//
-// clear a line of text
+
+
+
+
void HUlib_clearTextLine(hu_textline_t *t);
void HUlib_initTextLine(hu_textline_t *t, int x, int y, patch_t **f, int sc);
-// returns success
+
boolean HUlib_addCharToTextLine(hu_textline_t *t, char ch);
-// returns success
+
boolean HUlib_delCharFromTextLine(hu_textline_t *t);
-// draws tline
+
void HUlib_drawTextLine(hu_textline_t *l, boolean drawcursor);
-// erases text line
+
void HUlib_eraseTextLine(hu_textline_t *l);
-//
-// Scrolling Text window widget routines
-//
-// ?
+
+
+
+
void
HUlib_initSText
( hu_stext_t* s,
@@ -136,23 +136,23 @@ HUlib_initSText
int startchar,
boolean* on );
-// add a new line
+
void HUlib_addLineToSText(hu_stext_t* s);
-// ?
+
void
HUlib_addMessageToSText
( hu_stext_t* s,
char* prefix,
char* msg );
-// draws stext
+
void HUlib_drawSText(hu_stext_t* s);
-// erases all stext lines
+
void HUlib_eraseSText(hu_stext_t* s);
-// Input Text Line widget routines
+
void
HUlib_initIText
( hu_itext_t* it,
@@ -162,22 +162,22 @@ HUlib_initIText
int startchar,
boolean* on );
-// enforces left margin
+
void HUlib_delCharFromIText(hu_itext_t* it);
-// enforces left margin
+
void HUlib_eraseLineFromIText(hu_itext_t* it);
-// resets line and left margin
+
void HUlib_resetIText(hu_itext_t* it);
-// left of left-margin
+
void
HUlib_addPrefixToIText
( hu_itext_t* it,
char* str );
-// whether eaten
+
boolean
HUlib_keyInIText
( hu_itext_t* it,
@@ -185,12 +185,12 @@ HUlib_keyInIText
void HUlib_drawIText(hu_itext_t* it);
-// erases all itext lines
+
void HUlib_eraseIText(hu_itext_t* it);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/hu_stuff.c b/src/hu_stuff.c
@@ -1,24 +1,24 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION: Heads-up displays
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: hu_stuff.c,v 1.4 1997/02/03 16:47:52 b1 Exp $";
@@ -39,13 +39,13 @@ rcsid[] = "$Id: hu_stuff.c,v 1.4 1997/02/03 16:47:52 b1 Exp $";
#include "doomstat.h"
-// Data.
+
#include "dstrings.h"
#include "sounds.h"
-//
-// Locally used constants, shortcuts.
-//
+
+
+
#define HU_TITLE (mapnames[(gameepisode-1)*9+gamemap-1])
#define HU_TITLE2 (mapnames2[gamemap-1])
#define HU_TITLEP (mapnamesp[gamemap-1])
@@ -85,7 +85,7 @@ char* player_names[] =
};
-char chat_char; // remove later.
+char chat_char;
static player_t* plr;
patch_t* hu_font[HU_FONTSIZE];
static hu_textline_t w_title;
@@ -107,12 +107,12 @@ extern boolean automapactive;
static boolean headsupactive = false;
-//
-// Builtin map names.
-// The actual names can be found in DStrings.h.
-//
-char* mapnames[] = // DOOM shareware/registered/retail (Ultimate) names.
+
+
+
+
+char* mapnames[] =
{
HUSTR_E1M1,
@@ -166,7 +166,7 @@ char* mapnames[] = // DOOM shareware/registered/retail (Ultimate) names.
"NEWLEVEL"
};
-char* mapnames2[] = // DOOM 2 map names.
+char* mapnames2[] =
{
HUSTR_1,
HUSTR_2,
@@ -205,7 +205,7 @@ char* mapnames2[] = // DOOM 2 map names.
};
-char* mapnamesp[] = // Plutonia WAD map names.
+char* mapnamesp[] =
{
PHUSTR_1,
PHUSTR_2,
@@ -244,7 +244,7 @@ char* mapnamesp[] = // Plutonia WAD map names.
};
-char *mapnamest[] = // TNT WAD map names.
+char *mapnamest[] =
{
THUSTR_1,
THUSTR_2,
@@ -293,34 +293,34 @@ const char french_shiftxform[] =
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31,
' ', '!', '"', '#', '$', '%', '&',
- '"', // shift-'
+ '"',
'(', ')', '*', '+',
- '?', // shift-,
- '_', // shift--
- '>', // shift-.
- '?', // shift-/
- '0', // shift-0
- '1', // shift-1
- '2', // shift-2
- '3', // shift-3
- '4', // shift-4
- '5', // shift-5
- '6', // shift-6
- '7', // shift-7
- '8', // shift-8
- '9', // shift-9
+ '?',
+ '_',
+ '>',
+ '?',
+ '0',
+ '1',
+ '2',
+ '3',
+ '4',
+ '5',
+ '6',
+ '7',
+ '8',
+ '9',
'/',
- '.', // shift-;
+ '.',
'<',
- '+', // shift-=
+ '+',
'>', '?', '@',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
- '[', // shift-[
- '!', // shift-backslash - OH MY GOD DOES WATCOM SUCK
- ']', // shift-]
+ '[',
+ '!',
+ ']',
'"', '_',
- '\'', // shift-`
+ '\'',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'{', '|', '}', '~', 127
@@ -336,34 +336,34 @@ const char english_shiftxform[] =
21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
31,
' ', '!', '"', '#', '$', '%', '&',
- '"', // shift-'
+ '"',
'(', ')', '*', '+',
- '<', // shift-,
- '_', // shift--
- '>', // shift-.
- '?', // shift-/
- ')', // shift-0
- '!', // shift-1
- '@', // shift-2
- '#', // shift-3
- '$', // shift-4
- '%', // shift-5
- '^', // shift-6
- '&', // shift-7
- '*', // shift-8
- '(', // shift-9
+ '<',
+ '_',
+ '>',
+ '?',
+ ')',
+ '!',
+ '@',
+ '#',
+ '$',
+ '%',
+ '^',
+ '&',
+ '*',
+ '(',
':',
- ':', // shift-;
+ ':',
'<',
- '+', // shift-=
+ '+',
'>', '?', '@',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
- '[', // shift-[
- '!', // shift-backslash - OH MY GOD DOES WATCOM SUCK
- ']', // shift-]
+ '[',
+ '!',
+ ']',
'"', '_',
- '\'', // shift-`
+ '\'',
'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N',
'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
'{', '|', '}', '~', 127
@@ -401,7 +401,7 @@ void HU_Init(void)
else
shiftxform = english_shiftxform;
- // load the heads-up font
+
j = HU_FONTSTART;
for (i=0;i<HU_FONTSIZE;i++)
{
@@ -431,13 +431,13 @@ void HU_Start(void)
message_nottobefuckedwith = false;
chat_on = false;
- // create the message widget
+
HUlib_initSText(&w_message,
HU_MSGX, HU_MSGY, HU_MSGHEIGHT,
hu_font,
HU_FONTSTART, &message_on);
- // create the map title widget
+
HUlib_initTextLine(&w_title,
HU_TITLEX, HU_TITLEY,
hu_font,
@@ -469,13 +469,13 @@ void HU_Start(void)
while (*s)
HUlib_addCharToTextLine(&w_title, *(s++));
- // create the chat widget
+
HUlib_initIText(&w_chat,
HU_INPUTX, HU_INPUTY,
hu_font,
HU_FONTSTART, &chat_on);
- // create the inputbuffer widgets
+
for (i=0 ; i<MAXPLAYERS ; i++)
HUlib_initIText(&w_inputbuffer[i], 0, 0, 0, 0, &always_off);
@@ -508,7 +508,7 @@ void HU_Ticker(void)
int i, rc;
char c;
- // tick down message counter if message is up
+
if (message_counter && !--message_counter)
{
message_on = false;
@@ -518,7 +518,7 @@ void HU_Ticker(void)
if (showMessages || message_dontfuckwithme)
{
- // display message if necessary
+
if ((plr->message && !message_nottobefuckedwith)
|| (plr->message && message_dontfuckwithme))
{
@@ -530,9 +530,9 @@ void HU_Ticker(void)
message_dontfuckwithme = 0;
}
- } // else message_on = false;
+ }
- // check for incoming chat characters
+
if (netgame)
{
for (i=0 ; i<MAXPLAYERS; i++)
@@ -702,24 +702,24 @@ boolean HU_Responder(event_t *ev)
else
{
c = ev->data1;
- // send a macro
+
if (altdown)
{
c = c - '0';
if (c > 9)
return false;
- // fprintf(stderr, "got here\n");
+
macromessage = chat_macros[c];
- // kill last message with a '\n'
- HU_queueChatChar(KEY_ENTER); // DEBUG!!!
- // send the macro message
+ HU_queueChatChar(KEY_ENTER);
+
+
while (*macromessage)
HU_queueChatChar(*macromessage++);
HU_queueChatChar(KEY_ENTER);
- // leave chat mode and notify that it was sent
+
chat_on = false;
strcpy(lastmessage, chat_macros[c]);
plr->message = lastmessage;
@@ -734,11 +734,11 @@ boolean HU_Responder(event_t *ev)
eatkey = HUlib_keyInIText(&w_chat, c);
if (eatkey)
{
- // static unsigned char buf[20]; // DEBUG
+
HU_queueChatChar(c);
- // sprintf(buf, "KEY: %d => %d", ev->data1, c);
- // plr->message = buf;
+
+
}
if (c == KEY_ENTER)
{
diff --git a/src/hu_stuff.h b/src/hu_stuff.h
@@ -1,22 +1,22 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION: Head up display
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __HU_STUFF_H__
#define __HU_STUFF_H__
@@ -24,13 +24,13 @@
#include "d_event.h"
-//
-// Globally visible constants.
-//
-#define HU_FONTSTART '!' // the first font characters
-#define HU_FONTEND '_' // the last font characters
-// Calculate # of glyphs in font.
+
+
+#define HU_FONTSTART '!'
+#define HU_FONTEND '_'
+
+
#define HU_FONTSIZE (HU_FONTEND - HU_FONTSTART + 1)
#define HU_BROADCAST 5
@@ -38,14 +38,14 @@
#define HU_MSGREFRESH KEY_ENTER
#define HU_MSGX 0
#define HU_MSGY 0
-#define HU_MSGWIDTH 64 // in characters
-#define HU_MSGHEIGHT 1 // in lines
+#define HU_MSGWIDTH 64
+#define HU_MSGHEIGHT 1
#define HU_MSGTIMEOUT (4*TICRATE)
-//
-// HEADS UP TEXT
-//
+
+
+
void HU_Init(void);
void HU_Start(void);
@@ -59,8 +59,8 @@ void HU_Erase(void);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/i_main.c b/src/i_main.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Main program, simply calls D_DoomMain high level loop.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: i_main.c,v 1.4 1997/02/03 22:45:10 b1 Exp $";
diff --git a/src/i_net.c b/src/i_net.c
@@ -1,24 +1,24 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
@@ -51,7 +51,7 @@ rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
-// For some odd reason...
+
#define ntohl(x) \
((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \
(((unsigned long int)(x) & 0x0000ff00U) << 8) | \
@@ -69,9 +69,9 @@ void NetSend (void);
boolean NetListen (void);
-//
-// NETWORKING
-//
+
+
+
int DOOMPORT = (IPPORT_USERRESERVED +0x1d );
@@ -84,14 +84,14 @@ void (*netget) (void);
void (*netsend) (void);
-//
-// UDPsocket
-//
+
+
+
int UDPsocket (void)
{
int s;
- // allocate a socket
+
s = socket (PF_INET, SOCK_DGRAM, IPPROTO_UDP);
if (s<0)
I_Error ("can't create socket: %s",strerror(errno));
@@ -99,9 +99,9 @@ int UDPsocket (void)
return s;
}
-//
-// BindToLocalPort
-//
+
+
+
void
BindToLocalPort
( int s,
@@ -121,15 +121,15 @@ BindToLocalPort
}
-//
-// PacketSend
-//
+
+
+
void PacketSend (void)
{
int c;
doomdata_t sw;
- // byte swap
+
sw.checksum = htonl(netbuffer->checksum);
sw.player = netbuffer->player;
sw.retransmitfrom = netbuffer->retransmitfrom;
@@ -145,19 +145,19 @@ void PacketSend (void)
sw.cmds[c].buttons = netbuffer->cmds[c].buttons;
}
- //printf ("sending %i\n",gametic);
+
c = sendto (sendsocket , &sw, doomcom->datalength
,0,(void *)&sendaddress[doomcom->remotenode]
,sizeof(sendaddress[doomcom->remotenode]));
- // if (c == -1)
- // I_Error ("SendPacket error: %s",strerror(errno));
+
+
}
-//
-// PacketGet
-//
+
+
+
void PacketGet (void)
{
int i;
@@ -173,7 +173,7 @@ void PacketGet (void)
{
if (errno != EWOULDBLOCK)
I_Error ("GetPacket: %s",strerror(errno));
- doomcom->remotenode = -1; // no packet
+ doomcom->remotenode = -1;
return;
}
@@ -184,22 +184,22 @@ void PacketGet (void)
first = 0;
}
- // find remote node number
+
for (i=0 ; i<doomcom->numnodes ; i++)
if ( fromaddress.sin_addr.s_addr == sendaddress[i].sin_addr.s_addr )
break;
if (i == doomcom->numnodes)
{
- // packet is not from one of the players (new game broadcast)
- doomcom->remotenode = -1; // no packet
+
+ doomcom->remotenode = -1;
return;
}
- doomcom->remotenode = i; // good packet from a game player
+ doomcom->remotenode = i;
doomcom->datalength = c;
- // byte swap
+
netbuffer->checksum = ntohl(sw.checksum);
netbuffer->player = sw.player;
netbuffer->retransmitfrom = sw.retransmitfrom;
@@ -222,10 +222,10 @@ void PacketGet (void)
int GetLocalAddress (void)
{
char hostname[1024];
- struct hostent* hostentry; // host information entry
+ struct hostent* hostentry;
int v;
- // get local address
+
v = gethostname (hostname, sizeof(hostname));
if (v == -1)
I_Error ("GetLocalAddress : gethostname: errno %d",errno);
@@ -238,20 +238,20 @@ int GetLocalAddress (void)
}
-//
-// I_InitNetwork
-//
+
+
+
void I_InitNetwork (void)
{
boolean trueval = true;
int i;
int p;
- struct hostent* hostentry; // host information entry
+ struct hostent* hostentry;
doomcom = malloc (sizeof (*doomcom) );
memset (doomcom, 0, sizeof(*doomcom) );
- // set up for network
+
i = M_CheckParm ("-dup");
if (i && i< myargc-1)
{
@@ -276,12 +276,12 @@ void I_InitNetwork (void)
printf ("using alternate port %i\n",DOOMPORT);
}
- // parse network game options,
- // -net <consoleplayer> <host> <host> ...
+
+
i = M_CheckParm ("-net");
if (!i)
{
- // single player game
+
netgame = false;
doomcom->id = DOOMCOM_ID;
doomcom->numplayers = doomcom->numnodes = 1;
@@ -294,10 +294,10 @@ void I_InitNetwork (void)
netget = PacketGet;
netgame = true;
- // parse player number and host list
+
doomcom->consoleplayer = myargv[i+1][0]-'1';
- doomcom->numnodes = 1; // this node for sure
+ doomcom->numnodes = 1;
i++;
while (++i < myargc && myargv[i][0] != '-')
@@ -323,7 +323,7 @@ void I_InitNetwork (void)
doomcom->id = DOOMCOM_ID;
doomcom->numplayers = doomcom->numnodes;
- // build message to receive
+
insocket = UDPsocket ();
BindToLocalPort (insocket,htons(DOOMPORT));
ioctl (insocket, FIONBIO, &trueval);
diff --git a/src/i_net.h b/src/i_net.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// System specific network interface stuff.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __I_NET__
@@ -30,7 +30,7 @@
-// Called by D_DoomMain.
+
void I_InitNetwork (void);
@@ -38,8 +38,8 @@ void I_NetCmd (void);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/i_sound.c b/src/i_sound.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// System interface for sound.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: i_unix.c,v 1.5 1997/02/03 22:45:10 b1 Exp $";
@@ -41,10 +41,10 @@ rcsid[] = "$Id: i_unix.c,v 1.5 1997/02/03 22:45:10 b1 Exp $";
#include <unistd.h>
#include <sys/ioctl.h>
-// Linux voxware output.
+
#include <linux/soundcard.h>
-// Timer stuff. Experimental.
+
#include <time.h>
#include <signal.h>
@@ -58,104 +58,104 @@ rcsid[] = "$Id: i_unix.c,v 1.5 1997/02/03 22:45:10 b1 Exp $";
#include "doomdef.h"
-// UNIX hack, to be removed.
+
#ifdef SNDSERV
-// Separate sound server process.
+
FILE* sndserver=0;
char* sndserver_filename = "./sndserver ";
#elif SNDINTR
-// Update all 30 millisecs, approx. 30fps synchronized.
-// Linux resolution is allegedly 10 millisecs,
-// scale is microseconds.
+
+
+
#define SOUND_INTERVAL 500
-// Get the interrupt. Set duration in millisecs.
+
int I_SoundSetTimer( int duration_of_tick );
void I_SoundDelTimer( void );
#else
-// None?
+
#endif
-// A quick hack to establish a protocol between
-// synchronous mix buffer updates and asynchronous
-// audio writes. Probably redundant with gametic.
+
+
+
static int flag = 0;
-// The number of internal mixing channels,
-// the samples calculated for each mixing step,
-// the size of the 16bit, 2 hardware channel (stereo)
-// mixing buffer, and the samplerate of the raw data.
-// Needed for calling the actual sound output.
+
+
+
+
+
#define SAMPLECOUNT 512
#define NUM_CHANNELS 8
-// It is 2 for 16bit, and 2 for two channels.
+
#define BUFMUL 4
#define MIXBUFFERSIZE (SAMPLECOUNT*BUFMUL)
-#define SAMPLERATE 11025 // Hz
-#define SAMPLESIZE 2 // 16bit
+#define SAMPLERATE 11025
+#define SAMPLESIZE 2
+
-// The actual lengths of all sound effects.
int lengths[NUMSFX];
-// The actual output device.
+
int audio_fd;
-// The global mixing buffer.
-// Basically, samples from all active internal channels
-// are modifed and added, and stored in the buffer
-// that is submitted to the audio device.
+
+
+
+
signed short mixbuffer[MIXBUFFERSIZE];
-// The channel step amount...
+
unsigned int channelstep[NUM_CHANNELS];
-// ... and a 0.16 bit remainder of last step.
+
unsigned int channelstepremainder[NUM_CHANNELS];
-// The channel data pointers, start and end.
+
unsigned char* channels[NUM_CHANNELS];
unsigned char* channelsend[NUM_CHANNELS];
-// Time/gametic that the channel started playing,
-// used to determine oldest, which automatically
-// has lowest priority.
-// In case number of active sounds exceeds
-// available channels.
+
+
+
+
+
int channelstart[NUM_CHANNELS];
-// The sound in channel handles,
-// determined on registration,
-// might be used to unregister/stop/modify,
-// currently unused.
+
+
+
+
int channelhandles[NUM_CHANNELS];
-// SFX id of the playing sound effect.
-// Used to catch duplicates (like chainsaw).
+
+
int channelids[NUM_CHANNELS];
-// Pitch to stepping lookup, unused.
+
int steptable[256];
-// Volume lookups.
+
int vol_lookup[128*256];
-// Hardware left and right channel volume lookup.
+
int* channelleftvol_lookup[NUM_CHANNELS];
int* channelrightvol_lookup[NUM_CHANNELS];
-//
-// Safe ioctl, convenience.
-//
+
+
+
void
myioctl
( int fd,
@@ -177,10 +177,10 @@ myioctl
-//
-// This function loads the sound data from the WAD lump,
-// for single sound.
-//
+
+
+
+
void*
getsfx
( char* sfxname,
@@ -195,20 +195,20 @@ getsfx
int sfxlump;
- // Get the sound data from the WAD, allocate lump
- // in zone memory.
+
+
sprintf(name, "ds%s", sfxname);
- // Now, there is a severe problem with the
- // sound handling, in it is not (yet/anymore)
- // gamemode aware. That means, sounds from
- // DOOM II will be requested even with DOOM
- // shareware.
- // The sound list is wired into sounds.c,
- // which sets the external variable.
- // I do not do runtime patches to that
- // variable. Instead, we will use a
- // default sound for replacement.
+
+
+
+
+
+
+
+
+
+
if ( W_CheckNumForName(name) == -1 )
sfxlump = W_GetNumForName("dspistol");
else
@@ -216,36 +216,36 @@ getsfx
size = W_LumpLength( sfxlump );
- // Debug.
- // fprintf( stderr, "." );
- //fprintf( stderr, " -loading %s (lump %d, %d bytes)\n",
- // sfxname, sfxlump, size );
- //fflush( stderr );
+
+
+
+
+
sfx = (unsigned char*)W_CacheLumpNum( sfxlump, PU_STATIC );
- // Pads the sound effect out to the mixing buffer size.
- // The original realloc would interfere with zone memory.
+
+
paddedsize = ((size-8 + (SAMPLECOUNT-1)) / SAMPLECOUNT) * SAMPLECOUNT;
- // Allocate from zone memory.
+
paddedsfx = (unsigned char*)Z_Malloc( paddedsize+8, PU_STATIC, 0 );
- // ddt: (unsigned char *) realloc(sfx, paddedsize+8);
- // This should interfere with zone memory handling,
- // which does not kick in in the soundserver.
+
+
+
- // Now copy and pad.
+
memcpy( paddedsfx, sfx, size );
for (i=size ; i<paddedsize+8 ; i++)
paddedsfx[i] = 128;
- // Remove the cached lump.
+
Z_Free( sfx );
- // Preserve padded length.
+
*len = paddedsize;
- // Return allocated padded data.
+
return (void *) (paddedsfx + 8);
}
@@ -253,13 +253,13 @@ getsfx
-//
-// This function adds a sound to the
-// list of currently active sounds,
-// which is maintained as a given number
-// (eight, usually) of internal channels.
-// Returns a handle.
-//
+
+
+
+
+
+
+
int
addsfx
( int sfxid,
@@ -279,8 +279,8 @@ addsfx
int rightvol;
int leftvol;
- // Chainsaw troubles.
- // Play these sound effects only one at a time.
+
+
if ( sfxid == sfx_sawup
|| sfxid == sfx_sawidl
|| sfxid == sfx_sawful
@@ -288,23 +288,23 @@ addsfx
|| sfxid == sfx_stnmov
|| sfxid == sfx_pistol )
{
- // Loop all channels, check.
+
for (i=0 ; i<NUM_CHANNELS ; i++)
{
- // Active, and using the same SFX?
+
if ( (channels[i])
&& (channelids[i] == sfxid) )
{
- // Reset.
+
channels[i] = 0;
- // We are sure that iff,
- // there will only be one.
+
+
break;
}
}
}
- // Loop all channels to find oldest SFX.
+
for (i=0; (i<NUM_CHANNELS) && (channels[i]); i++)
{
if (channelstart[i] < oldest)
@@ -314,68 +314,68 @@ addsfx
}
}
- // Tales from the cryptic.
- // If we found a channel, fine.
- // If not, we simply overwrite the first one, 0.
- // Probably only happens at startup.
+
+
+
+
if (i == NUM_CHANNELS)
slot = oldestnum;
else
slot = i;
- // Okay, in the less recent channel,
- // we will handle the new SFX.
- // Set pointer to raw data.
+
+
+
channels[slot] = (unsigned char *) S_sfx[sfxid].data;
- // Set pointer to end of raw data.
+
channelsend[slot] = channels[slot] + lengths[sfxid];
- // Reset current handle number, limited to 0..100.
+
if (!handlenums)
handlenums = 100;
- // Assign current handle number.
- // Preserved so sounds could be stopped (unused).
+
+
channelhandles[slot] = rc = handlenums++;
- // Set stepping???
- // Kinda getting the impression this is never used.
+
+
channelstep[slot] = step;
- // ???
+
channelstepremainder[slot] = 0;
- // Should be gametic, I presume.
+
channelstart[slot] = gametic;
- // Separation, that is, orientation/stereo.
- // range is: 1 - 256
+
+
seperation += 1;
- // Per left/right channel.
- // x^2 seperation,
- // adjust volume properly.
+
+
+
leftvol =
- volume - ((volume*seperation*seperation) >> 16); ///(256*256);
+ volume - ((volume*seperation*seperation) >> 16);
seperation = seperation - 257;
rightvol =
volume - ((volume*seperation*seperation) >> 16);
- // Sanity check, clamp volume.
+
if (rightvol < 0 || rightvol > 127)
I_Error("rightvol out of bounds");
if (leftvol < 0 || leftvol > 127)
I_Error("leftvol out of bounds");
- // Get the proper lookup table piece
- // for this volume level???
+
+
channelleftvol_lookup[slot] = &vol_lookup[leftvol*256];
channelrightvol_lookup[slot] = &vol_lookup[rightvol*256];
- // Preserve sound SFX id,
- // e.g. for avoiding duplicates of chainsaw.
+
+
channelids[slot] = sfxid;
- // You tell me.
+
return rc;
}
@@ -383,40 +383,40 @@ addsfx
-//
-// SFX API
-// Note: this was called by S_Init.
-// However, whatever they did in the
-// old DPMS based DOS version, this
-// were simply dummies in the Linux
-// version.
-// See soundserver initdata().
-//
+
+
+
+
+
+
+
+
+
void I_SetChannels()
{
- // Init internal lookups (raw data, mixing buffer, channels).
- // This function sets up internal lookups used during
- // the mixing process.
+
+
+
int i;
int j;
int* steptablemid = steptable + 128;
- // Okay, reset internal mixing channels to zero.
+
/*for (i=0; i<NUM_CHANNELS; i++)
{
channels[i] = 0;
}*/
- // This table provides step widths for pitch parameters.
- // I fail to see that this is currently used.
+
+
for (i=-128 ; i<128 ; i++)
steptablemid[i] = (int)(pow(2.0, (i/64.0))*65536.0);
- // Generates volume lookup tables
- // which also turn the unsigned samples
- // into signed samples.
+
+
+
for (i=0 ; i<128 ; i++)
for (j=0 ; j<256 ; j++)
vol_lookup[i*256+j] = (i*(j-128)*256)/127;
@@ -425,28 +425,28 @@ void I_SetChannels()
void I_SetSfxVolume(int volume)
{
- // Identical to DOS.
- // Basically, this should propagate
- // the menu/config file setting
- // to the state variable used in
- // the mixing.
+
+
+
+
+
snd_SfxVolume = volume;
}
-// MUSIC API - dummy. Some code from DOS version.
+
void I_SetMusicVolume(int volume)
{
- // Internal state variable.
+
snd_MusicVolume = volume;
- // Now set volume on output device.
- // Whatever( snd_MusciVolume );
+
+
}
-//
-// Retrieve the raw data lump index
-// for a given SFX name.
-//
+
+
+
+
int I_GetSfxLumpNum(sfxinfo_t* sfx)
{
char namebuf[9];
@@ -454,18 +454,18 @@ int I_GetSfxLumpNum(sfxinfo_t* sfx)
return W_GetNumForName(namebuf);
}
-//
-// Starting a sound means adding it
-// to the current list of active sounds
-// in the internal channels.
-// As the SFX info struct contains
-// e.g. a pointer to the raw data,
-// it is ignored.
-// As our sound handling does not handle
-// priority, it is ignored.
-// Pitching (that is, increased speed of playback)
-// is set, but currently not used by mixing.
-//
+
+
+
+
+
+
+
+
+
+
+
+
int
I_StartSound
( int id,
@@ -475,7 +475,7 @@ I_StartSound
int priority )
{
- // UNUSED
+
priority = 0;
#ifdef SNDSERV
@@ -484,16 +484,16 @@ I_StartSound
fprintf(sndserver, "p%2.2x%2.2x%2.2x%2.2x\n", id, pitch, vol, sep);
fflush(sndserver);
}
- // warning: control reaches end of non-void function.
+
return id;
#else
- // Debug.
- //fprintf( stderr, "starting sound %d", id );
- // Returns a handle (not used).
+
+
+
id = addsfx( id, vol, steptable[pitch], sep );
- // fprintf( stderr, "/handle is %d\n", id );
+
return id;
#endif
@@ -503,115 +503,115 @@ I_StartSound
void I_StopSound (int handle)
{
- // You need the handle returned by StartSound.
- // Would be looping all channels,
- // tracking down the handle,
- // an setting the channel to zero.
- // UNUSED.
+
+
+
+
+
handle = 0;
}
int I_SoundIsPlaying(int handle)
{
- // Ouch.
+
return gametic < handle;
}
-//
-// This function loops all active (internal) sound
-// channels, retrieves a given number of samples
-// from the raw sound data, modifies it according
-// to the current (internal) channel parameters,
-// mixes the per channel samples into the global
-// mixbuffer, clamping it to the allowed range,
-// and sets up everything for transferring the
-// contents of the mixbuffer to the (two)
-// hardware channels (left and right, that is).
-//
-// This function currently supports only 16bit.
-//
+
+
+
+
+
+
+
+
+
+
+
+
+
void I_UpdateSound( void )
{
#ifdef SNDINTR
- // Debug. Count buffer misses with interrupt.
+
static int misses = 0;
#endif
- // Mix current sound data.
- // Data, from raw sound, for right and left.
+
+
register unsigned int sample;
register int dl;
register int dr;
- // Pointers in global mixbuffer, left, right, end.
+
signed short* leftout;
signed short* rightout;
signed short* leftend;
- // Step in mixbuffer, left and right, thus two.
+
int step;
- // Mixing channel index.
+
int chan;
- // Left and right channel
- // are in global mixbuffer, alternating.
+
+
leftout = mixbuffer;
rightout = mixbuffer+1;
step = 2;
- // Determine end, for left channel only
- // (right channel is implicit).
+
+
leftend = mixbuffer + SAMPLECOUNT*step;
- // Mix sounds into the mixing buffer.
- // Loop over step*SAMPLECOUNT,
- // that is 512 values for two channels.
+
+
+
while (leftout != leftend)
{
- // Reset left/right value.
+
dl = 0;
dr = 0;
- // Love thy L2 chache - made this a loop.
- // Now more channels could be set at compile time
- // as well. Thus loop those channels.
+
+
+
for ( chan = 0; chan < NUM_CHANNELS; chan++ )
{
- // Check channel, if active.
+
if (channels[ chan ])
{
- // Get the raw data from the channel.
+
sample = *channels[ chan ];
- // Add left and right part
- // for this channel (sound)
- // to the current data.
- // Adjust volume accordingly.
+
+
+
+
dl += channelleftvol_lookup[ chan ][sample];
dr += channelrightvol_lookup[ chan ][sample];
- // Increment index ???
+
channelstepremainder[ chan ] += channelstep[ chan ];
- // MSB is next sample???
+
channels[ chan ] += channelstepremainder[ chan ] >> 16;
- // Limit to LSB???
+
channelstepremainder[ chan ] &= 65536-1;
- // Check whether we are done.
+
if (channels[ chan ] >= channelsend[ chan ])
channels[ chan ] = 0;
}
}
- // Clamp to range. Left hardware channel.
- // Has been char instead of short.
- // if (dl > 127) *leftout = 127;
- // else if (dl < -128) *leftout = -128;
- // else *leftout = dl;
+
+
+
+
+
if (dl > 0x7fff)
*leftout = 0x7fff;
@@ -620,7 +620,7 @@ void I_UpdateSound( void )
else
*leftout = dl;
- // Same for right hardware channel.
+
if (dr > 0x7fff)
*rightout = 0x7fff;
else if (dr < -0x8000)
@@ -628,13 +628,13 @@ void I_UpdateSound( void )
else
*rightout = dr;
- // Increment current pointers in mixbuffer.
+
leftout += step;
rightout += step;
}
#ifdef SNDINTR
- // Debug check.
+
if ( flag )
{
misses += flag;
@@ -647,24 +647,24 @@ void I_UpdateSound( void )
misses = 0;
}
- // Increment flag for update.
+
flag++;
#endif
}
-//
-// This would be used to write out the mixbuffer
-// during each game loop update.
-// Updates sound buffer and audio device at runtime.
-// It is called during Timer interrupt with SNDINTR.
-// Mixing now done synchronous, and
-// only output be done asynchronous?
-//
+
+
+
+
+
+
+
+
void
I_SubmitSound(void)
{
- // Write it to DSP device.
+
write(audio_fd, mixbuffer, SAMPLECOUNT*BUFMUL);
}
@@ -677,12 +677,12 @@ I_UpdateSoundParams
int sep,
int pitch)
{
- // I fail too see that this is used.
- // Would be using the handle to identify
- // on which channel the sound might be active,
- // and resetting the channel parameters.
+
+
+
+
- // UNUSED.
+
handle = vol = sep = pitch = 0;
}
@@ -694,17 +694,17 @@ void I_ShutdownSound(void)
#ifdef SNDSERV
if (sndserver)
{
- // Send a "quit" command.
+
fprintf(sndserver, "q\n");
fflush(sndserver);
}
#else
- // Wait till all pending sounds are finished.
+
int done = 0;
int i;
- // FIXME (below).
+
fprintf( stderr, "I_ShutdownSound: NOT finishing pending sounds\n");
fflush( stderr );
@@ -712,19 +712,19 @@ void I_ShutdownSound(void)
{
for( i=0 ; i<8 && !channels[i] ; i++);
- // FIXME. No proper channel output.
- //if (i==8)
+
+
done=1;
}
#ifdef SNDINTR
I_SoundDelTimer();
#endif
- // Cleaning up -releasing the DSP device.
+
close ( audio_fd );
#endif
- // Done.
+
return;
}
@@ -746,7 +746,7 @@ I_InitSound()
else
sprintf(buffer, "%s", sndserver_filename);
- // start sound process
+
if ( !access(buffer, X_OK) )
{
strcat(buffer, " -quiet");
@@ -763,7 +763,7 @@ I_InitSound()
I_SoundSetTimer( SOUND_INTERVAL );
#endif
- // Secure and configure sound device first.
+
fprintf( stderr, "I_InitSound: ");
audio_fd = open("/dev/dsp", O_WRONLY);
@@ -792,20 +792,20 @@ I_InitSound()
fprintf(stderr, " configured audio device\n" );
- // Initialize external data (all sounds) at start, keep static.
+
fprintf( stderr, "I_InitSound: ");
for (i=1 ; i<NUMSFX ; i++)
{
- // Alias? Example is the chaingun sound linked to pistol.
+
if (!S_sfx[i].link)
{
- // Load data from WAD file.
+
S_sfx[i].data = getsfx( S_sfx[i].name, &lengths[i] );
}
else
{
- // Previously loaded already?
+
S_sfx[i].data = S_sfx[i].link->data;
lengths[i] = lengths[(S_sfx[i].link - S_sfx)/sizeof(sfxinfo_t)];
}
@@ -813,11 +813,11 @@ I_InitSound()
fprintf( stderr, " pre-cached all sound data\n");
- // Now initialize mixbuffer with zero.
+
for ( i = 0; i< MIXBUFFERSIZE; i++ )
mixbuffer[i] = 0;
- // Finished initialization.
+
fprintf(stderr, "I_InitSound: sound module ready\n");
#endif
@@ -826,11 +826,11 @@ I_InitSound()
-//
-// MUSIC API.
-// Still no music done.
-// Remains. Dummies.
-//
+
+
+
+
+
void I_InitMusic(void) { }
void I_ShutdownMusic(void) { }
@@ -839,26 +839,26 @@ static int musicdies=-1;
void I_PlaySong(int handle, int looping)
{
- // UNUSED.
+
handle = looping = 0;
musicdies = gametic + TICRATE*30;
}
void I_PauseSong (int handle)
{
- // UNUSED.
+
handle = 0;
}
void I_ResumeSong (int handle)
{
- // UNUSED.
+
handle = 0;
}
void I_StopSong(int handle)
{
- // UNUSED.
+
handle = 0;
looping = 0;
@@ -867,36 +867,36 @@ void I_StopSong(int handle)
void I_UnRegisterSong(int handle)
{
- // UNUSED.
+
handle = 0;
}
int I_RegisterSong(void* data)
{
- // UNUSED.
+
data = NULL;
return 1;
}
-// Is the song playing?
+
int I_QrySongPlaying(int handle)
{
- // UNUSED.
+
handle = 0;
return looping || musicdies > gametic;
}
-//
-// Experimental stuff.
-// A Linux timer interrupt, for asynchronous
-// sound output.
-// I ripped this out of the Timer class in
-// our Difference Engine, including a few
-// SUN remains...
-//
+
+
+
+
+
+
+
+
#ifdef sun
typedef sigset_t tSigSet;
#else
@@ -904,42 +904,42 @@ int I_QrySongPlaying(int handle)
#endif
-// We might use SIGVTALRM and ITIMER_VIRTUAL, if the process
-// time independend timer happens to get lost due to heavy load.
-// SIGALRM and ITIMER_REAL doesn't really work well.
-// There are issues with profiling as well.
+
+
+
+
static int /*__itimer_which*/ itimer = ITIMER_REAL;
static int sig = SIGALRM;
-// Interrupt handler.
+
void I_HandleSoundTimer( int ignore )
{
- // Debug.
- //fprintf( stderr, "%c", '+' ); fflush( stderr );
- // Feed sound device if necesary.
+
+
+
if ( flag )
{
- // See I_SubmitSound().
- // Write it to DSP device.
+
+
write(audio_fd, mixbuffer, SAMPLECOUNT*BUFMUL);
- // Reset flag counter.
+
flag = 0;
}
else
return;
- // UNUSED, but required.
+
ignore = 0;
return;
}
-// Get the interrupt. Set duration in millisecs.
+
int I_SoundSetTimer( int duration_of_tick )
{
- // Needed for gametick clockwork.
+
struct itimerval value;
struct itimerval ovalue;
struct sigaction act;
@@ -947,13 +947,13 @@ int I_SoundSetTimer( int duration_of_tick )
int res;
- // This sets to SA_ONESHOT and SA_NOMASK, thus we can not use it.
- // signal( _sig, handle_SIG_TICK );
- // Now we have to change this attribute for repeated calls.
+
+
+
act.sa_handler = I_HandleSoundTimer;
#ifndef sun
- //ac t.sa_mask = _sig;
+
#endif
act.sa_flags = SA_RESTART;
@@ -964,10 +964,10 @@ int I_SoundSetTimer( int duration_of_tick )
value.it_value.tv_sec = 0;
value.it_value.tv_usec = duration_of_tick;
- // Error is -1.
+
res = setitimer( itimer, &value, &ovalue );
- // Debug.
+
if ( res == -1 )
fprintf( stderr, "I_SoundSetTimer: interrupt n.a.\n");
@@ -975,10 +975,10 @@ int I_SoundSetTimer( int duration_of_tick )
}
-// Remove the interrupt. Set duration to zero.
+
void I_SoundDelTimer()
{
- // Debug.
+
if ( I_SoundSetTimer( 0 ) == -1)
fprintf( stderr, "I_SoundDelTimer: failed to remove interrupt. Doh!\n");
}
diff --git a/src/i_sound.h b/src/i_sound.h
@@ -1,31 +1,31 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-//
-// DESCRIPTION:
-// System interface, sound.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __I_SOUND__
#define __I_SOUND__
#include "doomdef.h"
-// UNIX hack, to be removed.
+
#ifdef SNDSERV
#include <stdio.h>
extern FILE* sndserver;
@@ -37,29 +37,29 @@ extern char* sndserver_filename;
-// Init at program start...
+
void I_InitSound();
-// ... update sound buffer and audio device at runtime...
+
void I_UpdateSound(void);
void I_SubmitSound(void);
-// ... shut down and relase at program termination.
+
void I_ShutdownSound(void);
-//
-// SFX I/O
-//
-// Initialize channels?
+
+
+
+
void I_SetChannels();
-// Get raw data lump index for sound descriptor.
+
int I_GetSfxLumpNum (sfxinfo_t* sfxinfo );
-// Starts a sound in a particular sound channel.
+
int
I_StartSound
( int id,
@@ -69,16 +69,16 @@ I_StartSound
int priority );
-// Stops a sound channel.
+
void I_StopSound(int handle);
-// Called by S_*() functions
-// to see if a channel is still playing.
-// Returns 0 if no longer playing, 1 if playing.
+
+
+
int I_SoundIsPlaying(int handle);
-// Updates the volume, separation,
-// and pitch of a sound channel.
+
+
void
I_UpdateSoundParams
( int handle,
@@ -87,36 +87,36 @@ I_UpdateSoundParams
int pitch );
-//
-// MUSIC I/O
-//
+
+
+
void I_InitMusic(void);
void I_ShutdownMusic(void);
-// Volume.
+
void I_SetMusicVolume(int volume);
-// PAUSE game handling.
+
void I_PauseSong(int handle);
void I_ResumeSong(int handle);
-// Registers a song handle to song data.
+
int I_RegisterSong(void *data);
-// Called by anything that wishes to start music.
-// plays a song, and when the song is done,
-// starts playing it again in an endless loop.
-// Horrible thing to do, considering.
+
+
+
+
void
I_PlaySong
( int handle,
int looping );
-// Stops a song over 3 seconds.
+
void I_StopSong(int handle);
-// See above (register), then think backwards
+
void I_UnRegisterSong(int handle);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/i_system.c b/src/i_system.c
@@ -1,24 +1,24 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
@@ -57,7 +57,7 @@ I_Tactile
int off,
int total )
{
- // UNUSED.
+
on = off = total = 0;
}
@@ -81,10 +81,10 @@ byte* I_ZoneBase (int* size)
-//
-// I_GetTime
-// returns time in 1/70th second tics
-//
+
+
+
+
int I_GetTime (void)
{
struct timeval tp;
@@ -101,18 +101,18 @@ int I_GetTime (void)
-//
-// I_Init
-//
+
+
+
void I_Init (void)
{
I_InitSound();
- // I_InitGraphics();
+
}
-//
-// I_Quit
-//
+
+
+
void I_Quit (void)
{
D_QuitNetGame ();
@@ -154,16 +154,16 @@ byte* I_AllocLow(int length)
}
-//
-// I_Error
-//
+
+
+
extern boolean demorecording;
void I_Error (char *error, ...)
{
va_list argptr;
- // Message first.
+
va_start (argptr,error);
fprintf (stderr, "Error: ");
vfprintf (stderr,error,argptr);
@@ -172,7 +172,7 @@ void I_Error (char *error, ...)
fflush( stderr );
- // Shutdown. Here might be other errors.
+
if (demorecording)
G_CheckDemoStatus();
diff --git a/src/i_system.h b/src/i_system.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// System specific interface stuff.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __I_SYSTEM__
@@ -31,56 +31,56 @@
#endif
-// Called by DoomMain.
+
void I_Init (void);
-// Called by startup code
-// to get the ammount of memory to malloc
-// for the zone management.
+
+
+
byte* I_ZoneBase (int *size);
-// Called by D_DoomLoop,
-// returns current time in tics.
+
+
int I_GetTime (void);
-//
-// Called by D_DoomLoop,
-// called before processing any tics in a frame
-// (just after displaying a frame).
-// Time consuming syncronous operations
-// are performed here (joystick reading).
-// Can call D_PostEvent.
-//
+
+
+
+
+
+
+
+
void I_StartFrame (void);
-//
-// Called by D_DoomLoop,
-// called before processing each tic in a frame.
-// Quick syncronous operations are performed here.
-// Can call D_PostEvent.
+
+
+
+
+
void I_StartTic (void);
-// Asynchronous interrupt functions should maintain private queues
-// that are read by the synchronous functions
-// to be converted into events.
-// Either returns a null ticcmd,
-// or calls a loadable driver to build it.
-// This ticcmd will then be modified by the gameloop
-// for normal input.
+
+
+
+
+
+
+
ticcmd_t* I_BaseTiccmd (void);
-// Called by M_Responder when quit is selected.
-// Clean exit, displays sell blurb.
+
+
void I_Quit (void);
-// Allocates from low memory under dos,
-// just mallocs under unix
+
+
byte* I_AllocLow (int length);
void I_Tactile (int on, int off, int total);
@@ -90,8 +90,8 @@ void I_Error (char *error, ...);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/i_video.c b/src/i_video.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// DOOM graphics stuff for X11, UNIX.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: i_x.c,v 1.6 1997/02/03 22:45:10 b1 Exp $";
@@ -34,10 +34,10 @@ rcsid[] = "$Id: i_x.c,v 1.6 1997/02/03 22:45:10 b1 Exp $";
#include <X11/keysym.h>
#include <X11/extensions/XShm.h>
-// Had to dig up XShm.c for this one.
-// It is in the libXext, but not in the XFree86 headers.
+
+
#ifdef LINUX
-int XShmGetEventBase( Display* dpy ); // problems with g++?
+int XShmGetEventBase( Display* dpy );
#endif
#include <stdarg.h>
@@ -71,28 +71,28 @@ XImage* image;
int X_width;
int X_height;
-// MIT SHared Memory extension.
+
boolean doShm;
XShmSegmentInfo X_shminfo;
int X_shmeventtype;
-// Fake mouse handling.
-// This cannot work properly w/o DGA.
-// Needs an invisible mouse cursor at least.
+
+
+
boolean grabMouse;
int doPointerWarp = POINTER_WARP_COUNTDOWN;
-// Blocky mode,
-// replace each 320x200 pixel with multiply*multiply pixels.
-// According to Dave Taylor, it still is a bonehead thing
-// to use ....
+
+
+
+
static int multiply=1;
-//
-// Translates the key currently in X_event
-//
+
+
+
int xlatekey(void)
{
@@ -163,26 +163,26 @@ int xlatekey(void)
void I_ShutdownGraphics(void)
{
- // Detach from X server
+
if (!XShmDetach(X_display, &X_shminfo))
I_Error("XShmDetach() failed in I_ShutdownGraphics()");
- // Release shared memory.
+
shmdt(X_shminfo.shmaddr);
shmctl(X_shminfo.shmid, IPC_RMID, 0);
- // Paranoia.
+
image->data = NULL;
}
-//
-// I_StartFrame
-//
+
+
+
void I_StartFrame (void)
{
- // er?
+
}
@@ -196,7 +196,7 @@ void I_GetEvent(void)
event_t event;
- // put event-grabbing stuff in here
+
XNextEvent(X_display, &X_event);
switch (X_event.type)
{
@@ -204,13 +204,13 @@ void I_GetEvent(void)
event.type = ev_keydown;
event.data1 = xlatekey();
D_PostEvent(&event);
- // fprintf(stderr, "k");
+
break;
case KeyRelease:
event.type = ev_keyup;
event.data1 = xlatekey();
D_PostEvent(&event);
- // fprintf(stderr, "ku");
+
break;
case ButtonPress:
event.type = ev_mouse;
@@ -223,7 +223,7 @@ void I_GetEvent(void)
| (X_event.xbutton.button == Button3 ? 4 : 0);
event.data2 = event.data3 = 0;
D_PostEvent(&event);
- // fprintf(stderr, "b");
+
break;
case ButtonRelease:
event.type = ev_mouse;
@@ -231,7 +231,7 @@ void I_GetEvent(void)
(X_event.xbutton.state & Button1Mask)
| (X_event.xbutton.state & Button2Mask ? 2 : 0)
| (X_event.xbutton.state & Button3Mask ? 4 : 0);
- // suggest parentheses around arithmetic in operand of |
+
event.data1 =
event.data1
^ (X_event.xbutton.button == Button1 ? 1 : 0)
@@ -239,7 +239,7 @@ void I_GetEvent(void)
^ (X_event.xbutton.button == Button3 ? 4 : 0);
event.data2 = event.data3 = 0;
D_PostEvent(&event);
- // fprintf(stderr, "bu");
+
break;
case MotionNotify:
event.type = ev_mouse;
@@ -258,7 +258,7 @@ void I_GetEvent(void)
X_event.xmotion.y != X_height/2)
{
D_PostEvent(&event);
- // fprintf(stderr, "m");
+
mousemoved = false;
} else
{
@@ -303,9 +303,9 @@ createnullcursor
return cursor;
}
-//
-// I_StartTic
-//
+
+
+
void I_StartTic (void)
{
@@ -315,9 +315,9 @@ void I_StartTic (void)
while (XPending(X_display))
I_GetEvent();
- // Warp the pointer back to the middle of the window
- // or it will wander off - that is, the game will
- // loose input focus within X11.
+
+
+
if (grabMouse)
{
if (!--doPointerWarp)
@@ -338,26 +338,26 @@ void I_StartTic (void)
}
-//
-// I_UpdateNoBlit
-//
+
+
+
void I_UpdateNoBlit (void)
{
- // what is this?
+
}
-//
-// I_FinishUpdate
-//
+
+
+
void I_FinishUpdate (void)
{
static int lasttic;
int tics;
int i;
- // UNUSED static unsigned char *bigscreen=0;
+
- // draws little dots on the bottom of the screen
+
if (devparm)
{
@@ -373,7 +373,7 @@ void I_FinishUpdate (void)
}
- // scales the screen size before blitting it
+
if (multiply == 2)
{
unsigned int *olineptrs[2];
@@ -475,7 +475,7 @@ void I_FinishUpdate (void)
}
else if (multiply == 4)
{
- // Broken. Gotta fix this some day.
+
void Expand4(unsigned *, double *);
Expand4 ((unsigned *)(screens[0]), (double *) (image->data));
}
@@ -493,7 +493,7 @@ void I_FinishUpdate (void)
True ))
I_Error("XShmPutImage() failed\n");
- // wait for it to finish and processes all input events
+
shmFinished = false;
do
{
@@ -504,7 +504,7 @@ void I_FinishUpdate (void)
else
{
- // draw the image
+
XPutImage( X_display,
X_mainWindow,
X_gc,
@@ -513,7 +513,7 @@ void I_FinishUpdate (void)
0, 0,
X_width, X_height );
- // sync up with server
+
XSync(X_display, False);
}
@@ -521,18 +521,18 @@ void I_FinishUpdate (void)
}
-//
-// I_ReadScreen
-//
+
+
+
void I_ReadScreen (byte* scr)
{
memcpy (scr, screens[0], SCREENWIDTH*SCREENHEIGHT);
}
-//
-// Palette stuff.
-//
+
+
+
static XColor colors[256];
void UploadNewPalette(Colormap cmap, byte *palette)
@@ -548,7 +548,7 @@ void UploadNewPalette(Colormap cmap, byte *palette)
if (X_visualinfo.class == PseudoColor && X_visualinfo.depth == 8)
#endif
{
- // initialize the colormap
+
if (firstcall)
{
firstcall = false;
@@ -559,7 +559,7 @@ void UploadNewPalette(Colormap cmap, byte *palette)
}
}
- // set the X colormap entries
+
for (i=0 ; i<256 ; i++)
{
c = gammatable[usegamma][*palette++];
@@ -570,28 +570,28 @@ void UploadNewPalette(Colormap cmap, byte *palette)
colors[i].blue = (c<<8) + c;
}
- // store the colors to the current colormap
+
XStoreColors(X_display, cmap, colors, 256);
}
}
-//
-// I_SetPalette
-//
+
+
+
void I_SetPalette (byte* palette)
{
UploadNewPalette(X_cmap, palette);
}
-//
-// This function is probably redundant,
-// if XShmDetach works properly.
-// ddt never detached the XShm memory,
-// thus there might have been stale
-// handles accumulating.
-//
+
+
+
+
+
+
+
void grabsharedmemory(int size)
{
@@ -600,16 +600,16 @@ void grabsharedmemory(int size)
int minsize = 320*200;
int id;
int rc;
- // UNUSED int done=0;
+
int pollution=5;
- // try to use what was here before
+
do
{
- id = shmget((key_t) key, minsize, 0777); // just get the id
+ id = shmget((key_t) key, minsize, 0777);
if (id != -1)
{
- rc=shmctl(id, IPC_STAT, &shminfo); // get stats on it
+ rc=shmctl(id, IPC_STAT, &shminfo);
if (!rc)
{
if (shminfo.shm_nattch)
@@ -682,7 +682,7 @@ void grabsharedmemory(int size)
X_shminfo.shmid = id;
- // attach to the shared memory segment
+
image->data = X_shminfo.shmaddr = shmat(id, 0, 0);
fprintf(stderr, "shared memory id=%d, addr=0x%x\n", id,
@@ -699,7 +699,7 @@ void I_InitGraphics(void)
int x=0;
int y=0;
- // warning: char format, different type arg
+
char xsign=' ';
char ysign=' ';
@@ -728,19 +728,19 @@ void I_InitGraphics(void)
X_width = SCREENWIDTH * multiply;
X_height = SCREENHEIGHT * multiply;
- // check for command-line display name
- if ( (pnum=M_CheckParm("-disp")) ) // suggest parentheses around assignment
+
+ if ( (pnum=M_CheckParm("-disp")) )
displayname = myargv[pnum+1];
else
displayname = 0;
- // check if the user wants to grab the mouse (quite unnice)
+
grabMouse = !!M_CheckParm("-grabmouse");
- // check for command-line geometry
- if ( (pnum=M_CheckParm("-geom")) ) // suggest parentheses around assignment
+
+ if ( (pnum=M_CheckParm("-geom")) )
{
- // warning: char format, different type arg 3,5
+
n = sscanf(myargv[pnum+1], "%c%d%c%d", &xsign, &x, &ysign, &y);
if (n==2)
@@ -756,7 +756,7 @@ void I_InitGraphics(void)
I_Error("bad -geom parameter");
}
- // open the display
+
X_display = XOpenDisplay(displayname);
if (!X_display)
{
@@ -766,16 +766,16 @@ void I_InitGraphics(void)
I_Error("Could not open display (DISPLAY=[%s])", getenv("DISPLAY"));
}
- // use the default visual
+
X_screen = DefaultScreen(X_display);
if (!XMatchVisualInfo(X_display, X_screen, 8, PseudoColor, &X_visualinfo))
I_Error("xdoom currently only supports 256-color PseudoColor screens");
X_visual = X_visualinfo.visual;
- // check for the MITSHM extension
+
doShm = XShmQueryExtension(X_display);
- // even if it's available, make sure it's a local connection
+
if (doShm)
{
if (!displayname) displayname = (char *) getenv("DISPLAY");
@@ -790,28 +790,28 @@ void I_InitGraphics(void)
fprintf(stderr, "Using MITSHM extension\n");
- // create the colormap
+
X_cmap = XCreateColormap(X_display, RootWindow(X_display,
X_screen), X_visual, AllocAll);
- // setup attributes for main window
+
attribmask = CWEventMask | CWColormap | CWBorderPixel;
attribs.event_mask =
KeyPressMask
| KeyReleaseMask
- // | PointerMotionMask | ButtonPressMask | ButtonReleaseMask
+
| ExposureMask;
attribs.colormap = X_cmap;
attribs.border_pixel = 0;
- // create the main window
+
X_mainWindow = XCreateWindow( X_display,
RootWindow(X_display, X_screen),
x, y,
X_width, X_height,
- 0, // borderwidth
- 8, // depth
+ 0,
+ 8,
InputOutput,
X_visual,
attribmask,
@@ -820,7 +820,7 @@ void I_InitGraphics(void)
XDefineCursor(X_display, X_mainWindow,
createnullcursor( X_display, X_mainWindow ) );
- // create the GC
+
valuemask = GCGraphicsExposures;
xgcvalues.graphics_exposures = False;
X_gc = XCreateGC( X_display,
@@ -828,10 +828,10 @@ void I_InitGraphics(void)
valuemask,
&xgcvalues );
- // map the window
+
XMapWindow(X_display, X_mainWindow);
- // wait until it is OK to draw
+
oktodraw = 0;
while (!oktodraw)
{
@@ -843,7 +843,7 @@ void I_InitGraphics(void)
}
}
- // grabs the pointer so it is restricted to this window
+
if (grabMouse)
XGrabPointer(X_display, X_mainWindow, True,
ButtonPressMask|ButtonReleaseMask|PointerMotionMask,
@@ -855,7 +855,7 @@ void I_InitGraphics(void)
X_shmeventtype = XShmGetEventBase(X_display) + ShmCompletion;
- // create the image
+
image = XShmCreateImage( X_display,
X_visual,
8,
@@ -868,18 +868,18 @@ void I_InitGraphics(void)
grabsharedmemory(image->bytes_per_line * image->height);
- // UNUSED
- // create the shared memory segment
- // X_shminfo.shmid = shmget (IPC_PRIVATE,
- // image->bytes_per_line * image->height, IPC_CREAT | 0777);
- // if (X_shminfo.shmid < 0)
- // {
- // perror("");
- // I_Error("shmget() failed in InitGraphics()");
- // }
- // fprintf(stderr, "shared memory id=%d\n", X_shminfo.shmid);
- // attach to the shared memory segment
- // image->data = X_shminfo.shmaddr = shmat(X_shminfo.shmid, 0, 0);
+
+
+
+
+
+
+
+
+
+
+
+
if (!image->data)
@@ -888,7 +888,7 @@ void I_InitGraphics(void)
I_Error("shmat() failed in InitGraphics()");
}
- // get the X server to attach to it
+
if (!XShmAttach(X_display, &X_shminfo))
I_Error("XShmAttach() failed in InitGraphics()");
@@ -931,7 +931,7 @@ void InitExpand2 (void)
{
int i;
int j;
- // UNUSED unsigned iexp, jexp;
+
double* exp;
union
{
diff --git a/src/i_video.h b/src/i_video.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// System specific interface stuff.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __I_VIDEO__
@@ -31,21 +31,21 @@
#endif
-// Called by D_DoomMain,
-// determines the hardware configuration
-// and sets up the video mode
+
+
+
void I_InitGraphics (void);
void I_ShutdownGraphics(void);
-// Takes full 8 bit values.
+
void I_SetPalette (byte* palette);
void I_UpdateNoBlit (void);
void I_FinishUpdate (void);
-// Wait for vertical retrace or pause a bit.
+
void I_WaitVBL(int count);
void I_ReadScreen (byte* scr);
@@ -56,8 +56,8 @@ void I_EndRead (void);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/info.c b/src/info.c
@@ -1,32 +1,32 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Thing frame/state LUT,
-// generated by multigen utilitiy.
-// This one is the original DOOM version, preserved.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: info.c,v 1.3 1997/01/26 07:45:00 b1 Exp $";
-// Data.
+
#include "sounds.h"
#include "m_fixed.h"
@@ -55,7 +55,7 @@ char *sprnames[NUMSPRITES] = {
};
-// Doesn't work with g++, needs actionf_p1
+
void A_Light0();
void A_WeaponReady();
void A_Lower();
@@ -133,4538 +133,4538 @@ void A_BrainExplode();
state_t states[NUMSTATES] = {
- {SPR_TROO,0,-1,{NULL},S_NULL,0,0}, // S_NULL
- {SPR_SHTG,4,0,{A_Light0},S_NULL,0,0}, // S_LIGHTDONE
- {SPR_PUNG,0,1,{A_WeaponReady},S_PUNCH,0,0}, // S_PUNCH
- {SPR_PUNG,0,1,{A_Lower},S_PUNCHDOWN,0,0}, // S_PUNCHDOWN
- {SPR_PUNG,0,1,{A_Raise},S_PUNCHUP,0,0}, // S_PUNCHUP
- {SPR_PUNG,1,4,{NULL},S_PUNCH2,0,0}, // S_PUNCH1
- {SPR_PUNG,2,4,{A_Punch},S_PUNCH3,0,0}, // S_PUNCH2
- {SPR_PUNG,3,5,{NULL},S_PUNCH4,0,0}, // S_PUNCH3
- {SPR_PUNG,2,4,{NULL},S_PUNCH5,0,0}, // S_PUNCH4
- {SPR_PUNG,1,5,{A_ReFire},S_PUNCH,0,0}, // S_PUNCH5
- {SPR_PISG,0,1,{A_WeaponReady},S_PISTOL,0,0},// S_PISTOL
- {SPR_PISG,0,1,{A_Lower},S_PISTOLDOWN,0,0}, // S_PISTOLDOWN
- {SPR_PISG,0,1,{A_Raise},S_PISTOLUP,0,0}, // S_PISTOLUP
- {SPR_PISG,0,4,{NULL},S_PISTOL2,0,0}, // S_PISTOL1
- {SPR_PISG,1,6,{A_FirePistol},S_PISTOL3,0,0},// S_PISTOL2
- {SPR_PISG,2,4,{NULL},S_PISTOL4,0,0}, // S_PISTOL3
- {SPR_PISG,1,5,{A_ReFire},S_PISTOL,0,0}, // S_PISTOL4
- {SPR_PISF,32768,7,{A_Light1},S_LIGHTDONE,0,0}, // S_PISTOLFLASH
- {SPR_SHTG,0,1,{A_WeaponReady},S_SGUN,0,0}, // S_SGUN
- {SPR_SHTG,0,1,{A_Lower},S_SGUNDOWN,0,0}, // S_SGUNDOWN
- {SPR_SHTG,0,1,{A_Raise},S_SGUNUP,0,0}, // S_SGUNUP
- {SPR_SHTG,0,3,{NULL},S_SGUN2,0,0}, // S_SGUN1
- {SPR_SHTG,0,7,{A_FireShotgun},S_SGUN3,0,0}, // S_SGUN2
- {SPR_SHTG,1,5,{NULL},S_SGUN4,0,0}, // S_SGUN3
- {SPR_SHTG,2,5,{NULL},S_SGUN5,0,0}, // S_SGUN4
- {SPR_SHTG,3,4,{NULL},S_SGUN6,0,0}, // S_SGUN5
- {SPR_SHTG,2,5,{NULL},S_SGUN7,0,0}, // S_SGUN6
- {SPR_SHTG,1,5,{NULL},S_SGUN8,0,0}, // S_SGUN7
- {SPR_SHTG,0,3,{NULL},S_SGUN9,0,0}, // S_SGUN8
- {SPR_SHTG,0,7,{A_ReFire},S_SGUN,0,0}, // S_SGUN9
- {SPR_SHTF,32768,4,{A_Light1},S_SGUNFLASH2,0,0}, // S_SGUNFLASH1
- {SPR_SHTF,32769,3,{A_Light2},S_LIGHTDONE,0,0}, // S_SGUNFLASH2
- {SPR_SHT2,0,1,{A_WeaponReady},S_DSGUN,0,0}, // S_DSGUN
- {SPR_SHT2,0,1,{A_Lower},S_DSGUNDOWN,0,0}, // S_DSGUNDOWN
- {SPR_SHT2,0,1,{A_Raise},S_DSGUNUP,0,0}, // S_DSGUNUP
- {SPR_SHT2,0,3,{NULL},S_DSGUN2,0,0}, // S_DSGUN1
- {SPR_SHT2,0,7,{A_FireShotgun2},S_DSGUN3,0,0}, // S_DSGUN2
- {SPR_SHT2,1,7,{NULL},S_DSGUN4,0,0}, // S_DSGUN3
- {SPR_SHT2,2,7,{A_CheckReload},S_DSGUN5,0,0}, // S_DSGUN4
- {SPR_SHT2,3,7,{A_OpenShotgun2},S_DSGUN6,0,0}, // S_DSGUN5
- {SPR_SHT2,4,7,{NULL},S_DSGUN7,0,0}, // S_DSGUN6
- {SPR_SHT2,5,7,{A_LoadShotgun2},S_DSGUN8,0,0}, // S_DSGUN7
- {SPR_SHT2,6,6,{NULL},S_DSGUN9,0,0}, // S_DSGUN8
- {SPR_SHT2,7,6,{A_CloseShotgun2},S_DSGUN10,0,0}, // S_DSGUN9
- {SPR_SHT2,0,5,{A_ReFire},S_DSGUN,0,0}, // S_DSGUN10
- {SPR_SHT2,1,7,{NULL},S_DSNR2,0,0}, // S_DSNR1
- {SPR_SHT2,0,3,{NULL},S_DSGUNDOWN,0,0}, // S_DSNR2
- {SPR_SHT2,32776,5,{A_Light1},S_DSGUNFLASH2,0,0}, // S_DSGUNFLASH1
- {SPR_SHT2,32777,4,{A_Light2},S_LIGHTDONE,0,0}, // S_DSGUNFLASH2
- {SPR_CHGG,0,1,{A_WeaponReady},S_CHAIN,0,0}, // S_CHAIN
- {SPR_CHGG,0,1,{A_Lower},S_CHAINDOWN,0,0}, // S_CHAINDOWN
- {SPR_CHGG,0,1,{A_Raise},S_CHAINUP,0,0}, // S_CHAINUP
- {SPR_CHGG,0,4,{A_FireCGun},S_CHAIN2,0,0}, // S_CHAIN1
- {SPR_CHGG,1,4,{A_FireCGun},S_CHAIN3,0,0}, // S_CHAIN2
- {SPR_CHGG,1,0,{A_ReFire},S_CHAIN,0,0}, // S_CHAIN3
- {SPR_CHGF,32768,5,{A_Light1},S_LIGHTDONE,0,0}, // S_CHAINFLASH1
- {SPR_CHGF,32769,5,{A_Light2},S_LIGHTDONE,0,0}, // S_CHAINFLASH2
- {SPR_MISG,0,1,{A_WeaponReady},S_MISSILE,0,0}, // S_MISSILE
- {SPR_MISG,0,1,{A_Lower},S_MISSILEDOWN,0,0}, // S_MISSILEDOWN
- {SPR_MISG,0,1,{A_Raise},S_MISSILEUP,0,0}, // S_MISSILEUP
- {SPR_MISG,1,8,{A_GunFlash},S_MISSILE2,0,0}, // S_MISSILE1
- {SPR_MISG,1,12,{A_FireMissile},S_MISSILE3,0,0}, // S_MISSILE2
- {SPR_MISG,1,0,{A_ReFire},S_MISSILE,0,0}, // S_MISSILE3
- {SPR_MISF,32768,3,{A_Light1},S_MISSILEFLASH2,0,0}, // S_MISSILEFLASH1
- {SPR_MISF,32769,4,{NULL},S_MISSILEFLASH3,0,0}, // S_MISSILEFLASH2
- {SPR_MISF,32770,4,{A_Light2},S_MISSILEFLASH4,0,0}, // S_MISSILEFLASH3
- {SPR_MISF,32771,4,{A_Light2},S_LIGHTDONE,0,0}, // S_MISSILEFLASH4
- {SPR_SAWG,2,4,{A_WeaponReady},S_SAWB,0,0}, // S_SAW
- {SPR_SAWG,3,4,{A_WeaponReady},S_SAW,0,0}, // S_SAWB
- {SPR_SAWG,2,1,{A_Lower},S_SAWDOWN,0,0}, // S_SAWDOWN
- {SPR_SAWG,2,1,{A_Raise},S_SAWUP,0,0}, // S_SAWUP
- {SPR_SAWG,0,4,{A_Saw},S_SAW2,0,0}, // S_SAW1
- {SPR_SAWG,1,4,{A_Saw},S_SAW3,0,0}, // S_SAW2
- {SPR_SAWG,1,0,{A_ReFire},S_SAW,0,0}, // S_SAW3
- {SPR_PLSG,0,1,{A_WeaponReady},S_PLASMA,0,0}, // S_PLASMA
- {SPR_PLSG,0,1,{A_Lower},S_PLASMADOWN,0,0}, // S_PLASMADOWN
- {SPR_PLSG,0,1,{A_Raise},S_PLASMAUP,0,0}, // S_PLASMAUP
- {SPR_PLSG,0,3,{A_FirePlasma},S_PLASMA2,0,0}, // S_PLASMA1
- {SPR_PLSG,1,20,{A_ReFire},S_PLASMA,0,0}, // S_PLASMA2
- {SPR_PLSF,32768,4,{A_Light1},S_LIGHTDONE,0,0}, // S_PLASMAFLASH1
- {SPR_PLSF,32769,4,{A_Light1},S_LIGHTDONE,0,0}, // S_PLASMAFLASH2
- {SPR_BFGG,0,1,{A_WeaponReady},S_BFG,0,0}, // S_BFG
- {SPR_BFGG,0,1,{A_Lower},S_BFGDOWN,0,0}, // S_BFGDOWN
- {SPR_BFGG,0,1,{A_Raise},S_BFGUP,0,0}, // S_BFGUP
- {SPR_BFGG,0,20,{A_BFGsound},S_BFG2,0,0}, // S_BFG1
- {SPR_BFGG,1,10,{A_GunFlash},S_BFG3,0,0}, // S_BFG2
- {SPR_BFGG,1,10,{A_FireBFG},S_BFG4,0,0}, // S_BFG3
- {SPR_BFGG,1,20,{A_ReFire},S_BFG,0,0}, // S_BFG4
- {SPR_BFGF,32768,11,{A_Light1},S_BFGFLASH2,0,0}, // S_BFGFLASH1
- {SPR_BFGF,32769,6,{A_Light2},S_LIGHTDONE,0,0}, // S_BFGFLASH2
- {SPR_BLUD,2,8,{NULL},S_BLOOD2,0,0}, // S_BLOOD1
- {SPR_BLUD,1,8,{NULL},S_BLOOD3,0,0}, // S_BLOOD2
- {SPR_BLUD,0,8,{NULL},S_NULL,0,0}, // S_BLOOD3
- {SPR_PUFF,32768,4,{NULL},S_PUFF2,0,0}, // S_PUFF1
- {SPR_PUFF,1,4,{NULL},S_PUFF3,0,0}, // S_PUFF2
- {SPR_PUFF,2,4,{NULL},S_PUFF4,0,0}, // S_PUFF3
- {SPR_PUFF,3,4,{NULL},S_NULL,0,0}, // S_PUFF4
- {SPR_BAL1,32768,4,{NULL},S_TBALL2,0,0}, // S_TBALL1
- {SPR_BAL1,32769,4,{NULL},S_TBALL1,0,0}, // S_TBALL2
- {SPR_BAL1,32770,6,{NULL},S_TBALLX2,0,0}, // S_TBALLX1
- {SPR_BAL1,32771,6,{NULL},S_TBALLX3,0,0}, // S_TBALLX2
- {SPR_BAL1,32772,6,{NULL},S_NULL,0,0}, // S_TBALLX3
- {SPR_BAL2,32768,4,{NULL},S_RBALL2,0,0}, // S_RBALL1
- {SPR_BAL2,32769,4,{NULL},S_RBALL1,0,0}, // S_RBALL2
- {SPR_BAL2,32770,6,{NULL},S_RBALLX2,0,0}, // S_RBALLX1
- {SPR_BAL2,32771,6,{NULL},S_RBALLX3,0,0}, // S_RBALLX2
- {SPR_BAL2,32772,6,{NULL},S_NULL,0,0}, // S_RBALLX3
- {SPR_PLSS,32768,6,{NULL},S_PLASBALL2,0,0}, // S_PLASBALL
- {SPR_PLSS,32769,6,{NULL},S_PLASBALL,0,0}, // S_PLASBALL2
- {SPR_PLSE,32768,4,{NULL},S_PLASEXP2,0,0}, // S_PLASEXP
- {SPR_PLSE,32769,4,{NULL},S_PLASEXP3,0,0}, // S_PLASEXP2
- {SPR_PLSE,32770,4,{NULL},S_PLASEXP4,0,0}, // S_PLASEXP3
- {SPR_PLSE,32771,4,{NULL},S_PLASEXP5,0,0}, // S_PLASEXP4
- {SPR_PLSE,32772,4,{NULL},S_NULL,0,0}, // S_PLASEXP5
- {SPR_MISL,32768,1,{NULL},S_ROCKET,0,0}, // S_ROCKET
- {SPR_BFS1,32768,4,{NULL},S_BFGSHOT2,0,0}, // S_BFGSHOT
- {SPR_BFS1,32769,4,{NULL},S_BFGSHOT,0,0}, // S_BFGSHOT2
- {SPR_BFE1,32768,8,{NULL},S_BFGLAND2,0,0}, // S_BFGLAND
- {SPR_BFE1,32769,8,{NULL},S_BFGLAND3,0,0}, // S_BFGLAND2
- {SPR_BFE1,32770,8,{A_BFGSpray},S_BFGLAND4,0,0}, // S_BFGLAND3
- {SPR_BFE1,32771,8,{NULL},S_BFGLAND5,0,0}, // S_BFGLAND4
- {SPR_BFE1,32772,8,{NULL},S_BFGLAND6,0,0}, // S_BFGLAND5
- {SPR_BFE1,32773,8,{NULL},S_NULL,0,0}, // S_BFGLAND6
- {SPR_BFE2,32768,8,{NULL},S_BFGEXP2,0,0}, // S_BFGEXP
- {SPR_BFE2,32769,8,{NULL},S_BFGEXP3,0,0}, // S_BFGEXP2
- {SPR_BFE2,32770,8,{NULL},S_BFGEXP4,0,0}, // S_BFGEXP3
- {SPR_BFE2,32771,8,{NULL},S_NULL,0,0}, // S_BFGEXP4
- {SPR_MISL,32769,8,{A_Explode},S_EXPLODE2,0,0}, // S_EXPLODE1
- {SPR_MISL,32770,6,{NULL},S_EXPLODE3,0,0}, // S_EXPLODE2
- {SPR_MISL,32771,4,{NULL},S_NULL,0,0}, // S_EXPLODE3
- {SPR_TFOG,32768,6,{NULL},S_TFOG01,0,0}, // S_TFOG
- {SPR_TFOG,32769,6,{NULL},S_TFOG02,0,0}, // S_TFOG01
- {SPR_TFOG,32768,6,{NULL},S_TFOG2,0,0}, // S_TFOG02
- {SPR_TFOG,32769,6,{NULL},S_TFOG3,0,0}, // S_TFOG2
- {SPR_TFOG,32770,6,{NULL},S_TFOG4,0,0}, // S_TFOG3
- {SPR_TFOG,32771,6,{NULL},S_TFOG5,0,0}, // S_TFOG4
- {SPR_TFOG,32772,6,{NULL},S_TFOG6,0,0}, // S_TFOG5
- {SPR_TFOG,32773,6,{NULL},S_TFOG7,0,0}, // S_TFOG6
- {SPR_TFOG,32774,6,{NULL},S_TFOG8,0,0}, // S_TFOG7
- {SPR_TFOG,32775,6,{NULL},S_TFOG9,0,0}, // S_TFOG8
- {SPR_TFOG,32776,6,{NULL},S_TFOG10,0,0}, // S_TFOG9
- {SPR_TFOG,32777,6,{NULL},S_NULL,0,0}, // S_TFOG10
- {SPR_IFOG,32768,6,{NULL},S_IFOG01,0,0}, // S_IFOG
- {SPR_IFOG,32769,6,{NULL},S_IFOG02,0,0}, // S_IFOG01
- {SPR_IFOG,32768,6,{NULL},S_IFOG2,0,0}, // S_IFOG02
- {SPR_IFOG,32769,6,{NULL},S_IFOG3,0,0}, // S_IFOG2
- {SPR_IFOG,32770,6,{NULL},S_IFOG4,0,0}, // S_IFOG3
- {SPR_IFOG,32771,6,{NULL},S_IFOG5,0,0}, // S_IFOG4
- {SPR_IFOG,32772,6,{NULL},S_NULL,0,0}, // S_IFOG5
- {SPR_PLAY,0,-1,{NULL},S_NULL,0,0}, // S_PLAY
- {SPR_PLAY,0,4,{NULL},S_PLAY_RUN2,0,0}, // S_PLAY_RUN1
- {SPR_PLAY,1,4,{NULL},S_PLAY_RUN3,0,0}, // S_PLAY_RUN2
- {SPR_PLAY,2,4,{NULL},S_PLAY_RUN4,0,0}, // S_PLAY_RUN3
- {SPR_PLAY,3,4,{NULL},S_PLAY_RUN1,0,0}, // S_PLAY_RUN4
- {SPR_PLAY,4,12,{NULL},S_PLAY,0,0}, // S_PLAY_ATK1
- {SPR_PLAY,32773,6,{NULL},S_PLAY_ATK1,0,0}, // S_PLAY_ATK2
- {SPR_PLAY,6,4,{NULL},S_PLAY_PAIN2,0,0}, // S_PLAY_PAIN
- {SPR_PLAY,6,4,{A_Pain},S_PLAY,0,0}, // S_PLAY_PAIN2
- {SPR_PLAY,7,10,{NULL},S_PLAY_DIE2,0,0}, // S_PLAY_DIE1
- {SPR_PLAY,8,10,{A_PlayerScream},S_PLAY_DIE3,0,0}, // S_PLAY_DIE2
- {SPR_PLAY,9,10,{A_Fall},S_PLAY_DIE4,0,0}, // S_PLAY_DIE3
- {SPR_PLAY,10,10,{NULL},S_PLAY_DIE5,0,0}, // S_PLAY_DIE4
- {SPR_PLAY,11,10,{NULL},S_PLAY_DIE6,0,0}, // S_PLAY_DIE5
- {SPR_PLAY,12,10,{NULL},S_PLAY_DIE7,0,0}, // S_PLAY_DIE6
- {SPR_PLAY,13,-1,{NULL},S_NULL,0,0}, // S_PLAY_DIE7
- {SPR_PLAY,14,5,{NULL},S_PLAY_XDIE2,0,0}, // S_PLAY_XDIE1
- {SPR_PLAY,15,5,{A_XScream},S_PLAY_XDIE3,0,0}, // S_PLAY_XDIE2
- {SPR_PLAY,16,5,{A_Fall},S_PLAY_XDIE4,0,0}, // S_PLAY_XDIE3
- {SPR_PLAY,17,5,{NULL},S_PLAY_XDIE5,0,0}, // S_PLAY_XDIE4
- {SPR_PLAY,18,5,{NULL},S_PLAY_XDIE6,0,0}, // S_PLAY_XDIE5
- {SPR_PLAY,19,5,{NULL},S_PLAY_XDIE7,0,0}, // S_PLAY_XDIE6
- {SPR_PLAY,20,5,{NULL},S_PLAY_XDIE8,0,0}, // S_PLAY_XDIE7
- {SPR_PLAY,21,5,{NULL},S_PLAY_XDIE9,0,0}, // S_PLAY_XDIE8
- {SPR_PLAY,22,-1,{NULL},S_NULL,0,0}, // S_PLAY_XDIE9
- {SPR_POSS,0,10,{A_Look},S_POSS_STND2,0,0}, // S_POSS_STND
- {SPR_POSS,1,10,{A_Look},S_POSS_STND,0,0}, // S_POSS_STND2
- {SPR_POSS,0,4,{A_Chase},S_POSS_RUN2,0,0}, // S_POSS_RUN1
- {SPR_POSS,0,4,{A_Chase},S_POSS_RUN3,0,0}, // S_POSS_RUN2
- {SPR_POSS,1,4,{A_Chase},S_POSS_RUN4,0,0}, // S_POSS_RUN3
- {SPR_POSS,1,4,{A_Chase},S_POSS_RUN5,0,0}, // S_POSS_RUN4
- {SPR_POSS,2,4,{A_Chase},S_POSS_RUN6,0,0}, // S_POSS_RUN5
- {SPR_POSS,2,4,{A_Chase},S_POSS_RUN7,0,0}, // S_POSS_RUN6
- {SPR_POSS,3,4,{A_Chase},S_POSS_RUN8,0,0}, // S_POSS_RUN7
- {SPR_POSS,3,4,{A_Chase},S_POSS_RUN1,0,0}, // S_POSS_RUN8
- {SPR_POSS,4,10,{A_FaceTarget},S_POSS_ATK2,0,0}, // S_POSS_ATK1
- {SPR_POSS,5,8,{A_PosAttack},S_POSS_ATK3,0,0}, // S_POSS_ATK2
- {SPR_POSS,4,8,{NULL},S_POSS_RUN1,0,0}, // S_POSS_ATK3
- {SPR_POSS,6,3,{NULL},S_POSS_PAIN2,0,0}, // S_POSS_PAIN
- {SPR_POSS,6,3,{A_Pain},S_POSS_RUN1,0,0}, // S_POSS_PAIN2
- {SPR_POSS,7,5,{NULL},S_POSS_DIE2,0,0}, // S_POSS_DIE1
- {SPR_POSS,8,5,{A_Scream},S_POSS_DIE3,0,0}, // S_POSS_DIE2
- {SPR_POSS,9,5,{A_Fall},S_POSS_DIE4,0,0}, // S_POSS_DIE3
- {SPR_POSS,10,5,{NULL},S_POSS_DIE5,0,0}, // S_POSS_DIE4
- {SPR_POSS,11,-1,{NULL},S_NULL,0,0}, // S_POSS_DIE5
- {SPR_POSS,12,5,{NULL},S_POSS_XDIE2,0,0}, // S_POSS_XDIE1
- {SPR_POSS,13,5,{A_XScream},S_POSS_XDIE3,0,0}, // S_POSS_XDIE2
- {SPR_POSS,14,5,{A_Fall},S_POSS_XDIE4,0,0}, // S_POSS_XDIE3
- {SPR_POSS,15,5,{NULL},S_POSS_XDIE5,0,0}, // S_POSS_XDIE4
- {SPR_POSS,16,5,{NULL},S_POSS_XDIE6,0,0}, // S_POSS_XDIE5
- {SPR_POSS,17,5,{NULL},S_POSS_XDIE7,0,0}, // S_POSS_XDIE6
- {SPR_POSS,18,5,{NULL},S_POSS_XDIE8,0,0}, // S_POSS_XDIE7
- {SPR_POSS,19,5,{NULL},S_POSS_XDIE9,0,0}, // S_POSS_XDIE8
- {SPR_POSS,20,-1,{NULL},S_NULL,0,0}, // S_POSS_XDIE9
- {SPR_POSS,10,5,{NULL},S_POSS_RAISE2,0,0}, // S_POSS_RAISE1
- {SPR_POSS,9,5,{NULL},S_POSS_RAISE3,0,0}, // S_POSS_RAISE2
- {SPR_POSS,8,5,{NULL},S_POSS_RAISE4,0,0}, // S_POSS_RAISE3
- {SPR_POSS,7,5,{NULL},S_POSS_RUN1,0,0}, // S_POSS_RAISE4
- {SPR_SPOS,0,10,{A_Look},S_SPOS_STND2,0,0}, // S_SPOS_STND
- {SPR_SPOS,1,10,{A_Look},S_SPOS_STND,0,0}, // S_SPOS_STND2
- {SPR_SPOS,0,3,{A_Chase},S_SPOS_RUN2,0,0}, // S_SPOS_RUN1
- {SPR_SPOS,0,3,{A_Chase},S_SPOS_RUN3,0,0}, // S_SPOS_RUN2
- {SPR_SPOS,1,3,{A_Chase},S_SPOS_RUN4,0,0}, // S_SPOS_RUN3
- {SPR_SPOS,1,3,{A_Chase},S_SPOS_RUN5,0,0}, // S_SPOS_RUN4
- {SPR_SPOS,2,3,{A_Chase},S_SPOS_RUN6,0,0}, // S_SPOS_RUN5
- {SPR_SPOS,2,3,{A_Chase},S_SPOS_RUN7,0,0}, // S_SPOS_RUN6
- {SPR_SPOS,3,3,{A_Chase},S_SPOS_RUN8,0,0}, // S_SPOS_RUN7
- {SPR_SPOS,3,3,{A_Chase},S_SPOS_RUN1,0,0}, // S_SPOS_RUN8
- {SPR_SPOS,4,10,{A_FaceTarget},S_SPOS_ATK2,0,0}, // S_SPOS_ATK1
- {SPR_SPOS,32773,10,{A_SPosAttack},S_SPOS_ATK3,0,0}, // S_SPOS_ATK2
- {SPR_SPOS,4,10,{NULL},S_SPOS_RUN1,0,0}, // S_SPOS_ATK3
- {SPR_SPOS,6,3,{NULL},S_SPOS_PAIN2,0,0}, // S_SPOS_PAIN
- {SPR_SPOS,6,3,{A_Pain},S_SPOS_RUN1,0,0}, // S_SPOS_PAIN2
- {SPR_SPOS,7,5,{NULL},S_SPOS_DIE2,0,0}, // S_SPOS_DIE1
- {SPR_SPOS,8,5,{A_Scream},S_SPOS_DIE3,0,0}, // S_SPOS_DIE2
- {SPR_SPOS,9,5,{A_Fall},S_SPOS_DIE4,0,0}, // S_SPOS_DIE3
- {SPR_SPOS,10,5,{NULL},S_SPOS_DIE5,0,0}, // S_SPOS_DIE4
- {SPR_SPOS,11,-1,{NULL},S_NULL,0,0}, // S_SPOS_DIE5
- {SPR_SPOS,12,5,{NULL},S_SPOS_XDIE2,0,0}, // S_SPOS_XDIE1
- {SPR_SPOS,13,5,{A_XScream},S_SPOS_XDIE3,0,0}, // S_SPOS_XDIE2
- {SPR_SPOS,14,5,{A_Fall},S_SPOS_XDIE4,0,0}, // S_SPOS_XDIE3
- {SPR_SPOS,15,5,{NULL},S_SPOS_XDIE5,0,0}, // S_SPOS_XDIE4
- {SPR_SPOS,16,5,{NULL},S_SPOS_XDIE6,0,0}, // S_SPOS_XDIE5
- {SPR_SPOS,17,5,{NULL},S_SPOS_XDIE7,0,0}, // S_SPOS_XDIE6
- {SPR_SPOS,18,5,{NULL},S_SPOS_XDIE8,0,0}, // S_SPOS_XDIE7
- {SPR_SPOS,19,5,{NULL},S_SPOS_XDIE9,0,0}, // S_SPOS_XDIE8
- {SPR_SPOS,20,-1,{NULL},S_NULL,0,0}, // S_SPOS_XDIE9
- {SPR_SPOS,11,5,{NULL},S_SPOS_RAISE2,0,0}, // S_SPOS_RAISE1
- {SPR_SPOS,10,5,{NULL},S_SPOS_RAISE3,0,0}, // S_SPOS_RAISE2
- {SPR_SPOS,9,5,{NULL},S_SPOS_RAISE4,0,0}, // S_SPOS_RAISE3
- {SPR_SPOS,8,5,{NULL},S_SPOS_RAISE5,0,0}, // S_SPOS_RAISE4
- {SPR_SPOS,7,5,{NULL},S_SPOS_RUN1,0,0}, // S_SPOS_RAISE5
- {SPR_VILE,0,10,{A_Look},S_VILE_STND2,0,0}, // S_VILE_STND
- {SPR_VILE,1,10,{A_Look},S_VILE_STND,0,0}, // S_VILE_STND2
- {SPR_VILE,0,2,{A_VileChase},S_VILE_RUN2,0,0}, // S_VILE_RUN1
- {SPR_VILE,0,2,{A_VileChase},S_VILE_RUN3,0,0}, // S_VILE_RUN2
- {SPR_VILE,1,2,{A_VileChase},S_VILE_RUN4,0,0}, // S_VILE_RUN3
- {SPR_VILE,1,2,{A_VileChase},S_VILE_RUN5,0,0}, // S_VILE_RUN4
- {SPR_VILE,2,2,{A_VileChase},S_VILE_RUN6,0,0}, // S_VILE_RUN5
- {SPR_VILE,2,2,{A_VileChase},S_VILE_RUN7,0,0}, // S_VILE_RUN6
- {SPR_VILE,3,2,{A_VileChase},S_VILE_RUN8,0,0}, // S_VILE_RUN7
- {SPR_VILE,3,2,{A_VileChase},S_VILE_RUN9,0,0}, // S_VILE_RUN8
- {SPR_VILE,4,2,{A_VileChase},S_VILE_RUN10,0,0}, // S_VILE_RUN9
- {SPR_VILE,4,2,{A_VileChase},S_VILE_RUN11,0,0}, // S_VILE_RUN10
- {SPR_VILE,5,2,{A_VileChase},S_VILE_RUN12,0,0}, // S_VILE_RUN11
- {SPR_VILE,5,2,{A_VileChase},S_VILE_RUN1,0,0}, // S_VILE_RUN12
- {SPR_VILE,32774,0,{A_VileStart},S_VILE_ATK2,0,0}, // S_VILE_ATK1
- {SPR_VILE,32774,10,{A_FaceTarget},S_VILE_ATK3,0,0}, // S_VILE_ATK2
- {SPR_VILE,32775,8,{A_VileTarget},S_VILE_ATK4,0,0}, // S_VILE_ATK3
- {SPR_VILE,32776,8,{A_FaceTarget},S_VILE_ATK5,0,0}, // S_VILE_ATK4
- {SPR_VILE,32777,8,{A_FaceTarget},S_VILE_ATK6,0,0}, // S_VILE_ATK5
- {SPR_VILE,32778,8,{A_FaceTarget},S_VILE_ATK7,0,0}, // S_VILE_ATK6
- {SPR_VILE,32779,8,{A_FaceTarget},S_VILE_ATK8,0,0}, // S_VILE_ATK7
- {SPR_VILE,32780,8,{A_FaceTarget},S_VILE_ATK9,0,0}, // S_VILE_ATK8
- {SPR_VILE,32781,8,{A_FaceTarget},S_VILE_ATK10,0,0}, // S_VILE_ATK9
- {SPR_VILE,32782,8,{A_VileAttack},S_VILE_ATK11,0,0}, // S_VILE_ATK10
- {SPR_VILE,32783,20,{NULL},S_VILE_RUN1,0,0}, // S_VILE_ATK11
- {SPR_VILE,32794,10,{NULL},S_VILE_HEAL2,0,0}, // S_VILE_HEAL1
- {SPR_VILE,32795,10,{NULL},S_VILE_HEAL3,0,0}, // S_VILE_HEAL2
- {SPR_VILE,32796,10,{NULL},S_VILE_RUN1,0,0}, // S_VILE_HEAL3
- {SPR_VILE,16,5,{NULL},S_VILE_PAIN2,0,0}, // S_VILE_PAIN
- {SPR_VILE,16,5,{A_Pain},S_VILE_RUN1,0,0}, // S_VILE_PAIN2
- {SPR_VILE,16,7,{NULL},S_VILE_DIE2,0,0}, // S_VILE_DIE1
- {SPR_VILE,17,7,{A_Scream},S_VILE_DIE3,0,0}, // S_VILE_DIE2
- {SPR_VILE,18,7,{A_Fall},S_VILE_DIE4,0,0}, // S_VILE_DIE3
- {SPR_VILE,19,7,{NULL},S_VILE_DIE5,0,0}, // S_VILE_DIE4
- {SPR_VILE,20,7,{NULL},S_VILE_DIE6,0,0}, // S_VILE_DIE5
- {SPR_VILE,21,7,{NULL},S_VILE_DIE7,0,0}, // S_VILE_DIE6
- {SPR_VILE,22,7,{NULL},S_VILE_DIE8,0,0}, // S_VILE_DIE7
- {SPR_VILE,23,5,{NULL},S_VILE_DIE9,0,0}, // S_VILE_DIE8
- {SPR_VILE,24,5,{NULL},S_VILE_DIE10,0,0}, // S_VILE_DIE9
- {SPR_VILE,25,-1,{NULL},S_NULL,0,0}, // S_VILE_DIE10
- {SPR_FIRE,32768,2,{A_StartFire},S_FIRE2,0,0}, // S_FIRE1
- {SPR_FIRE,32769,2,{A_Fire},S_FIRE3,0,0}, // S_FIRE2
- {SPR_FIRE,32768,2,{A_Fire},S_FIRE4,0,0}, // S_FIRE3
- {SPR_FIRE,32769,2,{A_Fire},S_FIRE5,0,0}, // S_FIRE4
- {SPR_FIRE,32770,2,{A_FireCrackle},S_FIRE6,0,0}, // S_FIRE5
- {SPR_FIRE,32769,2,{A_Fire},S_FIRE7,0,0}, // S_FIRE6
- {SPR_FIRE,32770,2,{A_Fire},S_FIRE8,0,0}, // S_FIRE7
- {SPR_FIRE,32769,2,{A_Fire},S_FIRE9,0,0}, // S_FIRE8
- {SPR_FIRE,32770,2,{A_Fire},S_FIRE10,0,0}, // S_FIRE9
- {SPR_FIRE,32771,2,{A_Fire},S_FIRE11,0,0}, // S_FIRE10
- {SPR_FIRE,32770,2,{A_Fire},S_FIRE12,0,0}, // S_FIRE11
- {SPR_FIRE,32771,2,{A_Fire},S_FIRE13,0,0}, // S_FIRE12
- {SPR_FIRE,32770,2,{A_Fire},S_FIRE14,0,0}, // S_FIRE13
- {SPR_FIRE,32771,2,{A_Fire},S_FIRE15,0,0}, // S_FIRE14
- {SPR_FIRE,32772,2,{A_Fire},S_FIRE16,0,0}, // S_FIRE15
- {SPR_FIRE,32771,2,{A_Fire},S_FIRE17,0,0}, // S_FIRE16
- {SPR_FIRE,32772,2,{A_Fire},S_FIRE18,0,0}, // S_FIRE17
- {SPR_FIRE,32771,2,{A_Fire},S_FIRE19,0,0}, // S_FIRE18
- {SPR_FIRE,32772,2,{A_FireCrackle},S_FIRE20,0,0}, // S_FIRE19
- {SPR_FIRE,32773,2,{A_Fire},S_FIRE21,0,0}, // S_FIRE20
- {SPR_FIRE,32772,2,{A_Fire},S_FIRE22,0,0}, // S_FIRE21
- {SPR_FIRE,32773,2,{A_Fire},S_FIRE23,0,0}, // S_FIRE22
- {SPR_FIRE,32772,2,{A_Fire},S_FIRE24,0,0}, // S_FIRE23
- {SPR_FIRE,32773,2,{A_Fire},S_FIRE25,0,0}, // S_FIRE24
- {SPR_FIRE,32774,2,{A_Fire},S_FIRE26,0,0}, // S_FIRE25
- {SPR_FIRE,32775,2,{A_Fire},S_FIRE27,0,0}, // S_FIRE26
- {SPR_FIRE,32774,2,{A_Fire},S_FIRE28,0,0}, // S_FIRE27
- {SPR_FIRE,32775,2,{A_Fire},S_FIRE29,0,0}, // S_FIRE28
- {SPR_FIRE,32774,2,{A_Fire},S_FIRE30,0,0}, // S_FIRE29
- {SPR_FIRE,32775,2,{A_Fire},S_NULL,0,0}, // S_FIRE30
- {SPR_PUFF,1,4,{NULL},S_SMOKE2,0,0}, // S_SMOKE1
- {SPR_PUFF,2,4,{NULL},S_SMOKE3,0,0}, // S_SMOKE2
- {SPR_PUFF,1,4,{NULL},S_SMOKE4,0,0}, // S_SMOKE3
- {SPR_PUFF,2,4,{NULL},S_SMOKE5,0,0}, // S_SMOKE4
- {SPR_PUFF,3,4,{NULL},S_NULL,0,0}, // S_SMOKE5
- {SPR_FATB,32768,2,{A_Tracer},S_TRACER2,0,0}, // S_TRACER
- {SPR_FATB,32769,2,{A_Tracer},S_TRACER,0,0}, // S_TRACER2
- {SPR_FBXP,32768,8,{NULL},S_TRACEEXP2,0,0}, // S_TRACEEXP1
- {SPR_FBXP,32769,6,{NULL},S_TRACEEXP3,0,0}, // S_TRACEEXP2
- {SPR_FBXP,32770,4,{NULL},S_NULL,0,0}, // S_TRACEEXP3
- {SPR_SKEL,0,10,{A_Look},S_SKEL_STND2,0,0}, // S_SKEL_STND
- {SPR_SKEL,1,10,{A_Look},S_SKEL_STND,0,0}, // S_SKEL_STND2
- {SPR_SKEL,0,2,{A_Chase},S_SKEL_RUN2,0,0}, // S_SKEL_RUN1
- {SPR_SKEL,0,2,{A_Chase},S_SKEL_RUN3,0,0}, // S_SKEL_RUN2
- {SPR_SKEL,1,2,{A_Chase},S_SKEL_RUN4,0,0}, // S_SKEL_RUN3
- {SPR_SKEL,1,2,{A_Chase},S_SKEL_RUN5,0,0}, // S_SKEL_RUN4
- {SPR_SKEL,2,2,{A_Chase},S_SKEL_RUN6,0,0}, // S_SKEL_RUN5
- {SPR_SKEL,2,2,{A_Chase},S_SKEL_RUN7,0,0}, // S_SKEL_RUN6
- {SPR_SKEL,3,2,{A_Chase},S_SKEL_RUN8,0,0}, // S_SKEL_RUN7
- {SPR_SKEL,3,2,{A_Chase},S_SKEL_RUN9,0,0}, // S_SKEL_RUN8
- {SPR_SKEL,4,2,{A_Chase},S_SKEL_RUN10,0,0}, // S_SKEL_RUN9
- {SPR_SKEL,4,2,{A_Chase},S_SKEL_RUN11,0,0}, // S_SKEL_RUN10
- {SPR_SKEL,5,2,{A_Chase},S_SKEL_RUN12,0,0}, // S_SKEL_RUN11
- {SPR_SKEL,5,2,{A_Chase},S_SKEL_RUN1,0,0}, // S_SKEL_RUN12
- {SPR_SKEL,6,0,{A_FaceTarget},S_SKEL_FIST2,0,0}, // S_SKEL_FIST1
- {SPR_SKEL,6,6,{A_SkelWhoosh},S_SKEL_FIST3,0,0}, // S_SKEL_FIST2
- {SPR_SKEL,7,6,{A_FaceTarget},S_SKEL_FIST4,0,0}, // S_SKEL_FIST3
- {SPR_SKEL,8,6,{A_SkelFist},S_SKEL_RUN1,0,0}, // S_SKEL_FIST4
- {SPR_SKEL,32777,0,{A_FaceTarget},S_SKEL_MISS2,0,0}, // S_SKEL_MISS1
- {SPR_SKEL,32777,10,{A_FaceTarget},S_SKEL_MISS3,0,0}, // S_SKEL_MISS2
- {SPR_SKEL,10,10,{A_SkelMissile},S_SKEL_MISS4,0,0}, // S_SKEL_MISS3
- {SPR_SKEL,10,10,{A_FaceTarget},S_SKEL_RUN1,0,0}, // S_SKEL_MISS4
- {SPR_SKEL,11,5,{NULL},S_SKEL_PAIN2,0,0}, // S_SKEL_PAIN
- {SPR_SKEL,11,5,{A_Pain},S_SKEL_RUN1,0,0}, // S_SKEL_PAIN2
- {SPR_SKEL,11,7,{NULL},S_SKEL_DIE2,0,0}, // S_SKEL_DIE1
- {SPR_SKEL,12,7,{NULL},S_SKEL_DIE3,0,0}, // S_SKEL_DIE2
- {SPR_SKEL,13,7,{A_Scream},S_SKEL_DIE4,0,0}, // S_SKEL_DIE3
- {SPR_SKEL,14,7,{A_Fall},S_SKEL_DIE5,0,0}, // S_SKEL_DIE4
- {SPR_SKEL,15,7,{NULL},S_SKEL_DIE6,0,0}, // S_SKEL_DIE5
- {SPR_SKEL,16,-1,{NULL},S_NULL,0,0}, // S_SKEL_DIE6
- {SPR_SKEL,16,5,{NULL},S_SKEL_RAISE2,0,0}, // S_SKEL_RAISE1
- {SPR_SKEL,15,5,{NULL},S_SKEL_RAISE3,0,0}, // S_SKEL_RAISE2
- {SPR_SKEL,14,5,{NULL},S_SKEL_RAISE4,0,0}, // S_SKEL_RAISE3
- {SPR_SKEL,13,5,{NULL},S_SKEL_RAISE5,0,0}, // S_SKEL_RAISE4
- {SPR_SKEL,12,5,{NULL},S_SKEL_RAISE6,0,0}, // S_SKEL_RAISE5
- {SPR_SKEL,11,5,{NULL},S_SKEL_RUN1,0,0}, // S_SKEL_RAISE6
- {SPR_MANF,32768,4,{NULL},S_FATSHOT2,0,0}, // S_FATSHOT1
- {SPR_MANF,32769,4,{NULL},S_FATSHOT1,0,0}, // S_FATSHOT2
- {SPR_MISL,32769,8,{NULL},S_FATSHOTX2,0,0}, // S_FATSHOTX1
- {SPR_MISL,32770,6,{NULL},S_FATSHOTX3,0,0}, // S_FATSHOTX2
- {SPR_MISL,32771,4,{NULL},S_NULL,0,0}, // S_FATSHOTX3
- {SPR_FATT,0,15,{A_Look},S_FATT_STND2,0,0}, // S_FATT_STND
- {SPR_FATT,1,15,{A_Look},S_FATT_STND,0,0}, // S_FATT_STND2
- {SPR_FATT,0,4,{A_Chase},S_FATT_RUN2,0,0}, // S_FATT_RUN1
- {SPR_FATT,0,4,{A_Chase},S_FATT_RUN3,0,0}, // S_FATT_RUN2
- {SPR_FATT,1,4,{A_Chase},S_FATT_RUN4,0,0}, // S_FATT_RUN3
- {SPR_FATT,1,4,{A_Chase},S_FATT_RUN5,0,0}, // S_FATT_RUN4
- {SPR_FATT,2,4,{A_Chase},S_FATT_RUN6,0,0}, // S_FATT_RUN5
- {SPR_FATT,2,4,{A_Chase},S_FATT_RUN7,0,0}, // S_FATT_RUN6
- {SPR_FATT,3,4,{A_Chase},S_FATT_RUN8,0,0}, // S_FATT_RUN7
- {SPR_FATT,3,4,{A_Chase},S_FATT_RUN9,0,0}, // S_FATT_RUN8
- {SPR_FATT,4,4,{A_Chase},S_FATT_RUN10,0,0}, // S_FATT_RUN9
- {SPR_FATT,4,4,{A_Chase},S_FATT_RUN11,0,0}, // S_FATT_RUN10
- {SPR_FATT,5,4,{A_Chase},S_FATT_RUN12,0,0}, // S_FATT_RUN11
- {SPR_FATT,5,4,{A_Chase},S_FATT_RUN1,0,0}, // S_FATT_RUN12
- {SPR_FATT,6,20,{A_FatRaise},S_FATT_ATK2,0,0}, // S_FATT_ATK1
- {SPR_FATT,32775,10,{A_FatAttack1},S_FATT_ATK3,0,0}, // S_FATT_ATK2
- {SPR_FATT,8,5,{A_FaceTarget},S_FATT_ATK4,0,0}, // S_FATT_ATK3
- {SPR_FATT,6,5,{A_FaceTarget},S_FATT_ATK5,0,0}, // S_FATT_ATK4
- {SPR_FATT,32775,10,{A_FatAttack2},S_FATT_ATK6,0,0}, // S_FATT_ATK5
- {SPR_FATT,8,5,{A_FaceTarget},S_FATT_ATK7,0,0}, // S_FATT_ATK6
- {SPR_FATT,6,5,{A_FaceTarget},S_FATT_ATK8,0,0}, // S_FATT_ATK7
- {SPR_FATT,32775,10,{A_FatAttack3},S_FATT_ATK9,0,0}, // S_FATT_ATK8
- {SPR_FATT,8,5,{A_FaceTarget},S_FATT_ATK10,0,0}, // S_FATT_ATK9
- {SPR_FATT,6,5,{A_FaceTarget},S_FATT_RUN1,0,0}, // S_FATT_ATK10
- {SPR_FATT,9,3,{NULL},S_FATT_PAIN2,0,0}, // S_FATT_PAIN
- {SPR_FATT,9,3,{A_Pain},S_FATT_RUN1,0,0}, // S_FATT_PAIN2
- {SPR_FATT,10,6,{NULL},S_FATT_DIE2,0,0}, // S_FATT_DIE1
- {SPR_FATT,11,6,{A_Scream},S_FATT_DIE3,0,0}, // S_FATT_DIE2
- {SPR_FATT,12,6,{A_Fall},S_FATT_DIE4,0,0}, // S_FATT_DIE3
- {SPR_FATT,13,6,{NULL},S_FATT_DIE5,0,0}, // S_FATT_DIE4
- {SPR_FATT,14,6,{NULL},S_FATT_DIE6,0,0}, // S_FATT_DIE5
- {SPR_FATT,15,6,{NULL},S_FATT_DIE7,0,0}, // S_FATT_DIE6
- {SPR_FATT,16,6,{NULL},S_FATT_DIE8,0,0}, // S_FATT_DIE7
- {SPR_FATT,17,6,{NULL},S_FATT_DIE9,0,0}, // S_FATT_DIE8
- {SPR_FATT,18,6,{NULL},S_FATT_DIE10,0,0}, // S_FATT_DIE9
- {SPR_FATT,19,-1,{A_BossDeath},S_NULL,0,0}, // S_FATT_DIE10
- {SPR_FATT,17,5,{NULL},S_FATT_RAISE2,0,0}, // S_FATT_RAISE1
- {SPR_FATT,16,5,{NULL},S_FATT_RAISE3,0,0}, // S_FATT_RAISE2
- {SPR_FATT,15,5,{NULL},S_FATT_RAISE4,0,0}, // S_FATT_RAISE3
- {SPR_FATT,14,5,{NULL},S_FATT_RAISE5,0,0}, // S_FATT_RAISE4
- {SPR_FATT,13,5,{NULL},S_FATT_RAISE6,0,0}, // S_FATT_RAISE5
- {SPR_FATT,12,5,{NULL},S_FATT_RAISE7,0,0}, // S_FATT_RAISE6
- {SPR_FATT,11,5,{NULL},S_FATT_RAISE8,0,0}, // S_FATT_RAISE7
- {SPR_FATT,10,5,{NULL},S_FATT_RUN1,0,0}, // S_FATT_RAISE8
- {SPR_CPOS,0,10,{A_Look},S_CPOS_STND2,0,0}, // S_CPOS_STND
- {SPR_CPOS,1,10,{A_Look},S_CPOS_STND,0,0}, // S_CPOS_STND2
- {SPR_CPOS,0,3,{A_Chase},S_CPOS_RUN2,0,0}, // S_CPOS_RUN1
- {SPR_CPOS,0,3,{A_Chase},S_CPOS_RUN3,0,0}, // S_CPOS_RUN2
- {SPR_CPOS,1,3,{A_Chase},S_CPOS_RUN4,0,0}, // S_CPOS_RUN3
- {SPR_CPOS,1,3,{A_Chase},S_CPOS_RUN5,0,0}, // S_CPOS_RUN4
- {SPR_CPOS,2,3,{A_Chase},S_CPOS_RUN6,0,0}, // S_CPOS_RUN5
- {SPR_CPOS,2,3,{A_Chase},S_CPOS_RUN7,0,0}, // S_CPOS_RUN6
- {SPR_CPOS,3,3,{A_Chase},S_CPOS_RUN8,0,0}, // S_CPOS_RUN7
- {SPR_CPOS,3,3,{A_Chase},S_CPOS_RUN1,0,0}, // S_CPOS_RUN8
- {SPR_CPOS,4,10,{A_FaceTarget},S_CPOS_ATK2,0,0}, // S_CPOS_ATK1
- {SPR_CPOS,32773,4,{A_CPosAttack},S_CPOS_ATK3,0,0}, // S_CPOS_ATK2
- {SPR_CPOS,32772,4,{A_CPosAttack},S_CPOS_ATK4,0,0}, // S_CPOS_ATK3
- {SPR_CPOS,5,1,{A_CPosRefire},S_CPOS_ATK2,0,0}, // S_CPOS_ATK4
- {SPR_CPOS,6,3,{NULL},S_CPOS_PAIN2,0,0}, // S_CPOS_PAIN
- {SPR_CPOS,6,3,{A_Pain},S_CPOS_RUN1,0,0}, // S_CPOS_PAIN2
- {SPR_CPOS,7,5,{NULL},S_CPOS_DIE2,0,0}, // S_CPOS_DIE1
- {SPR_CPOS,8,5,{A_Scream},S_CPOS_DIE3,0,0}, // S_CPOS_DIE2
- {SPR_CPOS,9,5,{A_Fall},S_CPOS_DIE4,0,0}, // S_CPOS_DIE3
- {SPR_CPOS,10,5,{NULL},S_CPOS_DIE5,0,0}, // S_CPOS_DIE4
- {SPR_CPOS,11,5,{NULL},S_CPOS_DIE6,0,0}, // S_CPOS_DIE5
- {SPR_CPOS,12,5,{NULL},S_CPOS_DIE7,0,0}, // S_CPOS_DIE6
- {SPR_CPOS,13,-1,{NULL},S_NULL,0,0}, // S_CPOS_DIE7
- {SPR_CPOS,14,5,{NULL},S_CPOS_XDIE2,0,0}, // S_CPOS_XDIE1
- {SPR_CPOS,15,5,{A_XScream},S_CPOS_XDIE3,0,0}, // S_CPOS_XDIE2
- {SPR_CPOS,16,5,{A_Fall},S_CPOS_XDIE4,0,0}, // S_CPOS_XDIE3
- {SPR_CPOS,17,5,{NULL},S_CPOS_XDIE5,0,0}, // S_CPOS_XDIE4
- {SPR_CPOS,18,5,{NULL},S_CPOS_XDIE6,0,0}, // S_CPOS_XDIE5
- {SPR_CPOS,19,-1,{NULL},S_NULL,0,0}, // S_CPOS_XDIE6
- {SPR_CPOS,13,5,{NULL},S_CPOS_RAISE2,0,0}, // S_CPOS_RAISE1
- {SPR_CPOS,12,5,{NULL},S_CPOS_RAISE3,0,0}, // S_CPOS_RAISE2
- {SPR_CPOS,11,5,{NULL},S_CPOS_RAISE4,0,0}, // S_CPOS_RAISE3
- {SPR_CPOS,10,5,{NULL},S_CPOS_RAISE5,0,0}, // S_CPOS_RAISE4
- {SPR_CPOS,9,5,{NULL},S_CPOS_RAISE6,0,0}, // S_CPOS_RAISE5
- {SPR_CPOS,8,5,{NULL},S_CPOS_RAISE7,0,0}, // S_CPOS_RAISE6
- {SPR_CPOS,7,5,{NULL},S_CPOS_RUN1,0,0}, // S_CPOS_RAISE7
- {SPR_TROO,0,10,{A_Look},S_TROO_STND2,0,0}, // S_TROO_STND
- {SPR_TROO,1,10,{A_Look},S_TROO_STND,0,0}, // S_TROO_STND2
- {SPR_TROO,0,3,{A_Chase},S_TROO_RUN2,0,0}, // S_TROO_RUN1
- {SPR_TROO,0,3,{A_Chase},S_TROO_RUN3,0,0}, // S_TROO_RUN2
- {SPR_TROO,1,3,{A_Chase},S_TROO_RUN4,0,0}, // S_TROO_RUN3
- {SPR_TROO,1,3,{A_Chase},S_TROO_RUN5,0,0}, // S_TROO_RUN4
- {SPR_TROO,2,3,{A_Chase},S_TROO_RUN6,0,0}, // S_TROO_RUN5
- {SPR_TROO,2,3,{A_Chase},S_TROO_RUN7,0,0}, // S_TROO_RUN6
- {SPR_TROO,3,3,{A_Chase},S_TROO_RUN8,0,0}, // S_TROO_RUN7
- {SPR_TROO,3,3,{A_Chase},S_TROO_RUN1,0,0}, // S_TROO_RUN8
- {SPR_TROO,4,8,{A_FaceTarget},S_TROO_ATK2,0,0}, // S_TROO_ATK1
- {SPR_TROO,5,8,{A_FaceTarget},S_TROO_ATK3,0,0}, // S_TROO_ATK2
- {SPR_TROO,6,6,{A_TroopAttack},S_TROO_RUN1,0,0}, // S_TROO_ATK3
- {SPR_TROO,7,2,{NULL},S_TROO_PAIN2,0,0}, // S_TROO_PAIN
- {SPR_TROO,7,2,{A_Pain},S_TROO_RUN1,0,0}, // S_TROO_PAIN2
- {SPR_TROO,8,8,{NULL},S_TROO_DIE2,0,0}, // S_TROO_DIE1
- {SPR_TROO,9,8,{A_Scream},S_TROO_DIE3,0,0}, // S_TROO_DIE2
- {SPR_TROO,10,6,{NULL},S_TROO_DIE4,0,0}, // S_TROO_DIE3
- {SPR_TROO,11,6,{A_Fall},S_TROO_DIE5,0,0}, // S_TROO_DIE4
- {SPR_TROO,12,-1,{NULL},S_NULL,0,0}, // S_TROO_DIE5
- {SPR_TROO,13,5,{NULL},S_TROO_XDIE2,0,0}, // S_TROO_XDIE1
- {SPR_TROO,14,5,{A_XScream},S_TROO_XDIE3,0,0}, // S_TROO_XDIE2
- {SPR_TROO,15,5,{NULL},S_TROO_XDIE4,0,0}, // S_TROO_XDIE3
- {SPR_TROO,16,5,{A_Fall},S_TROO_XDIE5,0,0}, // S_TROO_XDIE4
- {SPR_TROO,17,5,{NULL},S_TROO_XDIE6,0,0}, // S_TROO_XDIE5
- {SPR_TROO,18,5,{NULL},S_TROO_XDIE7,0,0}, // S_TROO_XDIE6
- {SPR_TROO,19,5,{NULL},S_TROO_XDIE8,0,0}, // S_TROO_XDIE7
- {SPR_TROO,20,-1,{NULL},S_NULL,0,0}, // S_TROO_XDIE8
- {SPR_TROO,12,8,{NULL},S_TROO_RAISE2,0,0}, // S_TROO_RAISE1
- {SPR_TROO,11,8,{NULL},S_TROO_RAISE3,0,0}, // S_TROO_RAISE2
- {SPR_TROO,10,6,{NULL},S_TROO_RAISE4,0,0}, // S_TROO_RAISE3
- {SPR_TROO,9,6,{NULL},S_TROO_RAISE5,0,0}, // S_TROO_RAISE4
- {SPR_TROO,8,6,{NULL},S_TROO_RUN1,0,0}, // S_TROO_RAISE5
- {SPR_SARG,0,10,{A_Look},S_SARG_STND2,0,0}, // S_SARG_STND
- {SPR_SARG,1,10,{A_Look},S_SARG_STND,0,0}, // S_SARG_STND2
- {SPR_SARG,0,2,{A_Chase},S_SARG_RUN2,0,0}, // S_SARG_RUN1
- {SPR_SARG,0,2,{A_Chase},S_SARG_RUN3,0,0}, // S_SARG_RUN2
- {SPR_SARG,1,2,{A_Chase},S_SARG_RUN4,0,0}, // S_SARG_RUN3
- {SPR_SARG,1,2,{A_Chase},S_SARG_RUN5,0,0}, // S_SARG_RUN4
- {SPR_SARG,2,2,{A_Chase},S_SARG_RUN6,0,0}, // S_SARG_RUN5
- {SPR_SARG,2,2,{A_Chase},S_SARG_RUN7,0,0}, // S_SARG_RUN6
- {SPR_SARG,3,2,{A_Chase},S_SARG_RUN8,0,0}, // S_SARG_RUN7
- {SPR_SARG,3,2,{A_Chase},S_SARG_RUN1,0,0}, // S_SARG_RUN8
- {SPR_SARG,4,8,{A_FaceTarget},S_SARG_ATK2,0,0}, // S_SARG_ATK1
- {SPR_SARG,5,8,{A_FaceTarget},S_SARG_ATK3,0,0}, // S_SARG_ATK2
- {SPR_SARG,6,8,{A_SargAttack},S_SARG_RUN1,0,0}, // S_SARG_ATK3
- {SPR_SARG,7,2,{NULL},S_SARG_PAIN2,0,0}, // S_SARG_PAIN
- {SPR_SARG,7,2,{A_Pain},S_SARG_RUN1,0,0}, // S_SARG_PAIN2
- {SPR_SARG,8,8,{NULL},S_SARG_DIE2,0,0}, // S_SARG_DIE1
- {SPR_SARG,9,8,{A_Scream},S_SARG_DIE3,0,0}, // S_SARG_DIE2
- {SPR_SARG,10,4,{NULL},S_SARG_DIE4,0,0}, // S_SARG_DIE3
- {SPR_SARG,11,4,{A_Fall},S_SARG_DIE5,0,0}, // S_SARG_DIE4
- {SPR_SARG,12,4,{NULL},S_SARG_DIE6,0,0}, // S_SARG_DIE5
- {SPR_SARG,13,-1,{NULL},S_NULL,0,0}, // S_SARG_DIE6
- {SPR_SARG,13,5,{NULL},S_SARG_RAISE2,0,0}, // S_SARG_RAISE1
- {SPR_SARG,12,5,{NULL},S_SARG_RAISE3,0,0}, // S_SARG_RAISE2
- {SPR_SARG,11,5,{NULL},S_SARG_RAISE4,0,0}, // S_SARG_RAISE3
- {SPR_SARG,10,5,{NULL},S_SARG_RAISE5,0,0}, // S_SARG_RAISE4
- {SPR_SARG,9,5,{NULL},S_SARG_RAISE6,0,0}, // S_SARG_RAISE5
- {SPR_SARG,8,5,{NULL},S_SARG_RUN1,0,0}, // S_SARG_RAISE6
- {SPR_HEAD,0,10,{A_Look},S_HEAD_STND,0,0}, // S_HEAD_STND
- {SPR_HEAD,0,3,{A_Chase},S_HEAD_RUN1,0,0}, // S_HEAD_RUN1
- {SPR_HEAD,1,5,{A_FaceTarget},S_HEAD_ATK2,0,0}, // S_HEAD_ATK1
- {SPR_HEAD,2,5,{A_FaceTarget},S_HEAD_ATK3,0,0}, // S_HEAD_ATK2
- {SPR_HEAD,32771,5,{A_HeadAttack},S_HEAD_RUN1,0,0}, // S_HEAD_ATK3
- {SPR_HEAD,4,3,{NULL},S_HEAD_PAIN2,0,0}, // S_HEAD_PAIN
- {SPR_HEAD,4,3,{A_Pain},S_HEAD_PAIN3,0,0}, // S_HEAD_PAIN2
- {SPR_HEAD,5,6,{NULL},S_HEAD_RUN1,0,0}, // S_HEAD_PAIN3
- {SPR_HEAD,6,8,{NULL},S_HEAD_DIE2,0,0}, // S_HEAD_DIE1
- {SPR_HEAD,7,8,{A_Scream},S_HEAD_DIE3,0,0}, // S_HEAD_DIE2
- {SPR_HEAD,8,8,{NULL},S_HEAD_DIE4,0,0}, // S_HEAD_DIE3
- {SPR_HEAD,9,8,{NULL},S_HEAD_DIE5,0,0}, // S_HEAD_DIE4
- {SPR_HEAD,10,8,{A_Fall},S_HEAD_DIE6,0,0}, // S_HEAD_DIE5
- {SPR_HEAD,11,-1,{NULL},S_NULL,0,0}, // S_HEAD_DIE6
- {SPR_HEAD,11,8,{NULL},S_HEAD_RAISE2,0,0}, // S_HEAD_RAISE1
- {SPR_HEAD,10,8,{NULL},S_HEAD_RAISE3,0,0}, // S_HEAD_RAISE2
- {SPR_HEAD,9,8,{NULL},S_HEAD_RAISE4,0,0}, // S_HEAD_RAISE3
- {SPR_HEAD,8,8,{NULL},S_HEAD_RAISE5,0,0}, // S_HEAD_RAISE4
- {SPR_HEAD,7,8,{NULL},S_HEAD_RAISE6,0,0}, // S_HEAD_RAISE5
- {SPR_HEAD,6,8,{NULL},S_HEAD_RUN1,0,0}, // S_HEAD_RAISE6
- {SPR_BAL7,32768,4,{NULL},S_BRBALL2,0,0}, // S_BRBALL1
- {SPR_BAL7,32769,4,{NULL},S_BRBALL1,0,0}, // S_BRBALL2
- {SPR_BAL7,32770,6,{NULL},S_BRBALLX2,0,0}, // S_BRBALLX1
- {SPR_BAL7,32771,6,{NULL},S_BRBALLX3,0,0}, // S_BRBALLX2
- {SPR_BAL7,32772,6,{NULL},S_NULL,0,0}, // S_BRBALLX3
- {SPR_BOSS,0,10,{A_Look},S_BOSS_STND2,0,0}, // S_BOSS_STND
- {SPR_BOSS,1,10,{A_Look},S_BOSS_STND,0,0}, // S_BOSS_STND2
- {SPR_BOSS,0,3,{A_Chase},S_BOSS_RUN2,0,0}, // S_BOSS_RUN1
- {SPR_BOSS,0,3,{A_Chase},S_BOSS_RUN3,0,0}, // S_BOSS_RUN2
- {SPR_BOSS,1,3,{A_Chase},S_BOSS_RUN4,0,0}, // S_BOSS_RUN3
- {SPR_BOSS,1,3,{A_Chase},S_BOSS_RUN5,0,0}, // S_BOSS_RUN4
- {SPR_BOSS,2,3,{A_Chase},S_BOSS_RUN6,0,0}, // S_BOSS_RUN5
- {SPR_BOSS,2,3,{A_Chase},S_BOSS_RUN7,0,0}, // S_BOSS_RUN6
- {SPR_BOSS,3,3,{A_Chase},S_BOSS_RUN8,0,0}, // S_BOSS_RUN7
- {SPR_BOSS,3,3,{A_Chase},S_BOSS_RUN1,0,0}, // S_BOSS_RUN8
- {SPR_BOSS,4,8,{A_FaceTarget},S_BOSS_ATK2,0,0}, // S_BOSS_ATK1
- {SPR_BOSS,5,8,{A_FaceTarget},S_BOSS_ATK3,0,0}, // S_BOSS_ATK2
- {SPR_BOSS,6,8,{A_BruisAttack},S_BOSS_RUN1,0,0}, // S_BOSS_ATK3
- {SPR_BOSS,7,2,{NULL},S_BOSS_PAIN2,0,0}, // S_BOSS_PAIN
- {SPR_BOSS,7,2,{A_Pain},S_BOSS_RUN1,0,0}, // S_BOSS_PAIN2
- {SPR_BOSS,8,8,{NULL},S_BOSS_DIE2,0,0}, // S_BOSS_DIE1
- {SPR_BOSS,9,8,{A_Scream},S_BOSS_DIE3,0,0}, // S_BOSS_DIE2
- {SPR_BOSS,10,8,{NULL},S_BOSS_DIE4,0,0}, // S_BOSS_DIE3
- {SPR_BOSS,11,8,{A_Fall},S_BOSS_DIE5,0,0}, // S_BOSS_DIE4
- {SPR_BOSS,12,8,{NULL},S_BOSS_DIE6,0,0}, // S_BOSS_DIE5
- {SPR_BOSS,13,8,{NULL},S_BOSS_DIE7,0,0}, // S_BOSS_DIE6
- {SPR_BOSS,14,-1,{A_BossDeath},S_NULL,0,0}, // S_BOSS_DIE7
- {SPR_BOSS,14,8,{NULL},S_BOSS_RAISE2,0,0}, // S_BOSS_RAISE1
- {SPR_BOSS,13,8,{NULL},S_BOSS_RAISE3,0,0}, // S_BOSS_RAISE2
- {SPR_BOSS,12,8,{NULL},S_BOSS_RAISE4,0,0}, // S_BOSS_RAISE3
- {SPR_BOSS,11,8,{NULL},S_BOSS_RAISE5,0,0}, // S_BOSS_RAISE4
- {SPR_BOSS,10,8,{NULL},S_BOSS_RAISE6,0,0}, // S_BOSS_RAISE5
- {SPR_BOSS,9,8,{NULL},S_BOSS_RAISE7,0,0}, // S_BOSS_RAISE6
- {SPR_BOSS,8,8,{NULL},S_BOSS_RUN1,0,0}, // S_BOSS_RAISE7
- {SPR_BOS2,0,10,{A_Look},S_BOS2_STND2,0,0}, // S_BOS2_STND
- {SPR_BOS2,1,10,{A_Look},S_BOS2_STND,0,0}, // S_BOS2_STND2
- {SPR_BOS2,0,3,{A_Chase},S_BOS2_RUN2,0,0}, // S_BOS2_RUN1
- {SPR_BOS2,0,3,{A_Chase},S_BOS2_RUN3,0,0}, // S_BOS2_RUN2
- {SPR_BOS2,1,3,{A_Chase},S_BOS2_RUN4,0,0}, // S_BOS2_RUN3
- {SPR_BOS2,1,3,{A_Chase},S_BOS2_RUN5,0,0}, // S_BOS2_RUN4
- {SPR_BOS2,2,3,{A_Chase},S_BOS2_RUN6,0,0}, // S_BOS2_RUN5
- {SPR_BOS2,2,3,{A_Chase},S_BOS2_RUN7,0,0}, // S_BOS2_RUN6
- {SPR_BOS2,3,3,{A_Chase},S_BOS2_RUN8,0,0}, // S_BOS2_RUN7
- {SPR_BOS2,3,3,{A_Chase},S_BOS2_RUN1,0,0}, // S_BOS2_RUN8
- {SPR_BOS2,4,8,{A_FaceTarget},S_BOS2_ATK2,0,0}, // S_BOS2_ATK1
- {SPR_BOS2,5,8,{A_FaceTarget},S_BOS2_ATK3,0,0}, // S_BOS2_ATK2
- {SPR_BOS2,6,8,{A_BruisAttack},S_BOS2_RUN1,0,0}, // S_BOS2_ATK3
- {SPR_BOS2,7,2,{NULL},S_BOS2_PAIN2,0,0}, // S_BOS2_PAIN
- {SPR_BOS2,7,2,{A_Pain},S_BOS2_RUN1,0,0}, // S_BOS2_PAIN2
- {SPR_BOS2,8,8,{NULL},S_BOS2_DIE2,0,0}, // S_BOS2_DIE1
- {SPR_BOS2,9,8,{A_Scream},S_BOS2_DIE3,0,0}, // S_BOS2_DIE2
- {SPR_BOS2,10,8,{NULL},S_BOS2_DIE4,0,0}, // S_BOS2_DIE3
- {SPR_BOS2,11,8,{A_Fall},S_BOS2_DIE5,0,0}, // S_BOS2_DIE4
- {SPR_BOS2,12,8,{NULL},S_BOS2_DIE6,0,0}, // S_BOS2_DIE5
- {SPR_BOS2,13,8,{NULL},S_BOS2_DIE7,0,0}, // S_BOS2_DIE6
- {SPR_BOS2,14,-1,{NULL},S_NULL,0,0}, // S_BOS2_DIE7
- {SPR_BOS2,14,8,{NULL},S_BOS2_RAISE2,0,0}, // S_BOS2_RAISE1
- {SPR_BOS2,13,8,{NULL},S_BOS2_RAISE3,0,0}, // S_BOS2_RAISE2
- {SPR_BOS2,12,8,{NULL},S_BOS2_RAISE4,0,0}, // S_BOS2_RAISE3
- {SPR_BOS2,11,8,{NULL},S_BOS2_RAISE5,0,0}, // S_BOS2_RAISE4
- {SPR_BOS2,10,8,{NULL},S_BOS2_RAISE6,0,0}, // S_BOS2_RAISE5
- {SPR_BOS2,9,8,{NULL},S_BOS2_RAISE7,0,0}, // S_BOS2_RAISE6
- {SPR_BOS2,8,8,{NULL},S_BOS2_RUN1,0,0}, // S_BOS2_RAISE7
- {SPR_SKUL,32768,10,{A_Look},S_SKULL_STND2,0,0}, // S_SKULL_STND
- {SPR_SKUL,32769,10,{A_Look},S_SKULL_STND,0,0}, // S_SKULL_STND2
- {SPR_SKUL,32768,6,{A_Chase},S_SKULL_RUN2,0,0}, // S_SKULL_RUN1
- {SPR_SKUL,32769,6,{A_Chase},S_SKULL_RUN1,0,0}, // S_SKULL_RUN2
- {SPR_SKUL,32770,10,{A_FaceTarget},S_SKULL_ATK2,0,0}, // S_SKULL_ATK1
- {SPR_SKUL,32771,4,{A_SkullAttack},S_SKULL_ATK3,0,0}, // S_SKULL_ATK2
- {SPR_SKUL,32770,4,{NULL},S_SKULL_ATK4,0,0}, // S_SKULL_ATK3
- {SPR_SKUL,32771,4,{NULL},S_SKULL_ATK3,0,0}, // S_SKULL_ATK4
- {SPR_SKUL,32772,3,{NULL},S_SKULL_PAIN2,0,0}, // S_SKULL_PAIN
- {SPR_SKUL,32772,3,{A_Pain},S_SKULL_RUN1,0,0}, // S_SKULL_PAIN2
- {SPR_SKUL,32773,6,{NULL},S_SKULL_DIE2,0,0}, // S_SKULL_DIE1
- {SPR_SKUL,32774,6,{A_Scream},S_SKULL_DIE3,0,0}, // S_SKULL_DIE2
- {SPR_SKUL,32775,6,{NULL},S_SKULL_DIE4,0,0}, // S_SKULL_DIE3
- {SPR_SKUL,32776,6,{A_Fall},S_SKULL_DIE5,0,0}, // S_SKULL_DIE4
- {SPR_SKUL,9,6,{NULL},S_SKULL_DIE6,0,0}, // S_SKULL_DIE5
- {SPR_SKUL,10,6,{NULL},S_NULL,0,0}, // S_SKULL_DIE6
- {SPR_SPID,0,10,{A_Look},S_SPID_STND2,0,0}, // S_SPID_STND
- {SPR_SPID,1,10,{A_Look},S_SPID_STND,0,0}, // S_SPID_STND2
- {SPR_SPID,0,3,{A_Metal},S_SPID_RUN2,0,0}, // S_SPID_RUN1
- {SPR_SPID,0,3,{A_Chase},S_SPID_RUN3,0,0}, // S_SPID_RUN2
- {SPR_SPID,1,3,{A_Chase},S_SPID_RUN4,0,0}, // S_SPID_RUN3
- {SPR_SPID,1,3,{A_Chase},S_SPID_RUN5,0,0}, // S_SPID_RUN4
- {SPR_SPID,2,3,{A_Metal},S_SPID_RUN6,0,0}, // S_SPID_RUN5
- {SPR_SPID,2,3,{A_Chase},S_SPID_RUN7,0,0}, // S_SPID_RUN6
- {SPR_SPID,3,3,{A_Chase},S_SPID_RUN8,0,0}, // S_SPID_RUN7
- {SPR_SPID,3,3,{A_Chase},S_SPID_RUN9,0,0}, // S_SPID_RUN8
- {SPR_SPID,4,3,{A_Metal},S_SPID_RUN10,0,0}, // S_SPID_RUN9
- {SPR_SPID,4,3,{A_Chase},S_SPID_RUN11,0,0}, // S_SPID_RUN10
- {SPR_SPID,5,3,{A_Chase},S_SPID_RUN12,0,0}, // S_SPID_RUN11
- {SPR_SPID,5,3,{A_Chase},S_SPID_RUN1,0,0}, // S_SPID_RUN12
- {SPR_SPID,32768,20,{A_FaceTarget},S_SPID_ATK2,0,0}, // S_SPID_ATK1
- {SPR_SPID,32774,4,{A_SPosAttack},S_SPID_ATK3,0,0}, // S_SPID_ATK2
- {SPR_SPID,32775,4,{A_SPosAttack},S_SPID_ATK4,0,0}, // S_SPID_ATK3
- {SPR_SPID,32775,1,{A_SpidRefire},S_SPID_ATK2,0,0}, // S_SPID_ATK4
- {SPR_SPID,8,3,{NULL},S_SPID_PAIN2,0,0}, // S_SPID_PAIN
- {SPR_SPID,8,3,{A_Pain},S_SPID_RUN1,0,0}, // S_SPID_PAIN2
- {SPR_SPID,9,20,{A_Scream},S_SPID_DIE2,0,0}, // S_SPID_DIE1
- {SPR_SPID,10,10,{A_Fall},S_SPID_DIE3,0,0}, // S_SPID_DIE2
- {SPR_SPID,11,10,{NULL},S_SPID_DIE4,0,0}, // S_SPID_DIE3
- {SPR_SPID,12,10,{NULL},S_SPID_DIE5,0,0}, // S_SPID_DIE4
- {SPR_SPID,13,10,{NULL},S_SPID_DIE6,0,0}, // S_SPID_DIE5
- {SPR_SPID,14,10,{NULL},S_SPID_DIE7,0,0}, // S_SPID_DIE6
- {SPR_SPID,15,10,{NULL},S_SPID_DIE8,0,0}, // S_SPID_DIE7
- {SPR_SPID,16,10,{NULL},S_SPID_DIE9,0,0}, // S_SPID_DIE8
- {SPR_SPID,17,10,{NULL},S_SPID_DIE10,0,0}, // S_SPID_DIE9
- {SPR_SPID,18,30,{NULL},S_SPID_DIE11,0,0}, // S_SPID_DIE10
- {SPR_SPID,18,-1,{A_BossDeath},S_NULL,0,0}, // S_SPID_DIE11
- {SPR_BSPI,0,10,{A_Look},S_BSPI_STND2,0,0}, // S_BSPI_STND
- {SPR_BSPI,1,10,{A_Look},S_BSPI_STND,0,0}, // S_BSPI_STND2
- {SPR_BSPI,0,20,{NULL},S_BSPI_RUN1,0,0}, // S_BSPI_SIGHT
- {SPR_BSPI,0,3,{A_BabyMetal},S_BSPI_RUN2,0,0}, // S_BSPI_RUN1
- {SPR_BSPI,0,3,{A_Chase},S_BSPI_RUN3,0,0}, // S_BSPI_RUN2
- {SPR_BSPI,1,3,{A_Chase},S_BSPI_RUN4,0,0}, // S_BSPI_RUN3
- {SPR_BSPI,1,3,{A_Chase},S_BSPI_RUN5,0,0}, // S_BSPI_RUN4
- {SPR_BSPI,2,3,{A_Chase},S_BSPI_RUN6,0,0}, // S_BSPI_RUN5
- {SPR_BSPI,2,3,{A_Chase},S_BSPI_RUN7,0,0}, // S_BSPI_RUN6
- {SPR_BSPI,3,3,{A_BabyMetal},S_BSPI_RUN8,0,0}, // S_BSPI_RUN7
- {SPR_BSPI,3,3,{A_Chase},S_BSPI_RUN9,0,0}, // S_BSPI_RUN8
- {SPR_BSPI,4,3,{A_Chase},S_BSPI_RUN10,0,0}, // S_BSPI_RUN9
- {SPR_BSPI,4,3,{A_Chase},S_BSPI_RUN11,0,0}, // S_BSPI_RUN10
- {SPR_BSPI,5,3,{A_Chase},S_BSPI_RUN12,0,0}, // S_BSPI_RUN11
- {SPR_BSPI,5,3,{A_Chase},S_BSPI_RUN1,0,0}, // S_BSPI_RUN12
- {SPR_BSPI,32768,20,{A_FaceTarget},S_BSPI_ATK2,0,0}, // S_BSPI_ATK1
- {SPR_BSPI,32774,4,{A_BspiAttack},S_BSPI_ATK3,0,0}, // S_BSPI_ATK2
- {SPR_BSPI,32775,4,{NULL},S_BSPI_ATK4,0,0}, // S_BSPI_ATK3
- {SPR_BSPI,32775,1,{A_SpidRefire},S_BSPI_ATK2,0,0}, // S_BSPI_ATK4
- {SPR_BSPI,8,3,{NULL},S_BSPI_PAIN2,0,0}, // S_BSPI_PAIN
- {SPR_BSPI,8,3,{A_Pain},S_BSPI_RUN1,0,0}, // S_BSPI_PAIN2
- {SPR_BSPI,9,20,{A_Scream},S_BSPI_DIE2,0,0}, // S_BSPI_DIE1
- {SPR_BSPI,10,7,{A_Fall},S_BSPI_DIE3,0,0}, // S_BSPI_DIE2
- {SPR_BSPI,11,7,{NULL},S_BSPI_DIE4,0,0}, // S_BSPI_DIE3
- {SPR_BSPI,12,7,{NULL},S_BSPI_DIE5,0,0}, // S_BSPI_DIE4
- {SPR_BSPI,13,7,{NULL},S_BSPI_DIE6,0,0}, // S_BSPI_DIE5
- {SPR_BSPI,14,7,{NULL},S_BSPI_DIE7,0,0}, // S_BSPI_DIE6
- {SPR_BSPI,15,-1,{A_BossDeath},S_NULL,0,0}, // S_BSPI_DIE7
- {SPR_BSPI,15,5,{NULL},S_BSPI_RAISE2,0,0}, // S_BSPI_RAISE1
- {SPR_BSPI,14,5,{NULL},S_BSPI_RAISE3,0,0}, // S_BSPI_RAISE2
- {SPR_BSPI,13,5,{NULL},S_BSPI_RAISE4,0,0}, // S_BSPI_RAISE3
- {SPR_BSPI,12,5,{NULL},S_BSPI_RAISE5,0,0}, // S_BSPI_RAISE4
- {SPR_BSPI,11,5,{NULL},S_BSPI_RAISE6,0,0}, // S_BSPI_RAISE5
- {SPR_BSPI,10,5,{NULL},S_BSPI_RAISE7,0,0}, // S_BSPI_RAISE6
- {SPR_BSPI,9,5,{NULL},S_BSPI_RUN1,0,0}, // S_BSPI_RAISE7
- {SPR_APLS,32768,5,{NULL},S_ARACH_PLAZ2,0,0}, // S_ARACH_PLAZ
- {SPR_APLS,32769,5,{NULL},S_ARACH_PLAZ,0,0}, // S_ARACH_PLAZ2
- {SPR_APBX,32768,5,{NULL},S_ARACH_PLEX2,0,0}, // S_ARACH_PLEX
- {SPR_APBX,32769,5,{NULL},S_ARACH_PLEX3,0,0}, // S_ARACH_PLEX2
- {SPR_APBX,32770,5,{NULL},S_ARACH_PLEX4,0,0}, // S_ARACH_PLEX3
- {SPR_APBX,32771,5,{NULL},S_ARACH_PLEX5,0,0}, // S_ARACH_PLEX4
- {SPR_APBX,32772,5,{NULL},S_NULL,0,0}, // S_ARACH_PLEX5
- {SPR_CYBR,0,10,{A_Look},S_CYBER_STND2,0,0}, // S_CYBER_STND
- {SPR_CYBR,1,10,{A_Look},S_CYBER_STND,0,0}, // S_CYBER_STND2
- {SPR_CYBR,0,3,{A_Hoof},S_CYBER_RUN2,0,0}, // S_CYBER_RUN1
- {SPR_CYBR,0,3,{A_Chase},S_CYBER_RUN3,0,0}, // S_CYBER_RUN2
- {SPR_CYBR,1,3,{A_Chase},S_CYBER_RUN4,0,0}, // S_CYBER_RUN3
- {SPR_CYBR,1,3,{A_Chase},S_CYBER_RUN5,0,0}, // S_CYBER_RUN4
- {SPR_CYBR,2,3,{A_Chase},S_CYBER_RUN6,0,0}, // S_CYBER_RUN5
- {SPR_CYBR,2,3,{A_Chase},S_CYBER_RUN7,0,0}, // S_CYBER_RUN6
- {SPR_CYBR,3,3,{A_Metal},S_CYBER_RUN8,0,0}, // S_CYBER_RUN7
- {SPR_CYBR,3,3,{A_Chase},S_CYBER_RUN1,0,0}, // S_CYBER_RUN8
- {SPR_CYBR,4,6,{A_FaceTarget},S_CYBER_ATK2,0,0}, // S_CYBER_ATK1
- {SPR_CYBR,5,12,{A_CyberAttack},S_CYBER_ATK3,0,0}, // S_CYBER_ATK2
- {SPR_CYBR,4,12,{A_FaceTarget},S_CYBER_ATK4,0,0}, // S_CYBER_ATK3
- {SPR_CYBR,5,12,{A_CyberAttack},S_CYBER_ATK5,0,0}, // S_CYBER_ATK4
- {SPR_CYBR,4,12,{A_FaceTarget},S_CYBER_ATK6,0,0}, // S_CYBER_ATK5
- {SPR_CYBR,5,12,{A_CyberAttack},S_CYBER_RUN1,0,0}, // S_CYBER_ATK6
- {SPR_CYBR,6,10,{A_Pain},S_CYBER_RUN1,0,0}, // S_CYBER_PAIN
- {SPR_CYBR,7,10,{NULL},S_CYBER_DIE2,0,0}, // S_CYBER_DIE1
- {SPR_CYBR,8,10,{A_Scream},S_CYBER_DIE3,0,0}, // S_CYBER_DIE2
- {SPR_CYBR,9,10,{NULL},S_CYBER_DIE4,0,0}, // S_CYBER_DIE3
- {SPR_CYBR,10,10,{NULL},S_CYBER_DIE5,0,0}, // S_CYBER_DIE4
- {SPR_CYBR,11,10,{NULL},S_CYBER_DIE6,0,0}, // S_CYBER_DIE5
- {SPR_CYBR,12,10,{A_Fall},S_CYBER_DIE7,0,0}, // S_CYBER_DIE6
- {SPR_CYBR,13,10,{NULL},S_CYBER_DIE8,0,0}, // S_CYBER_DIE7
- {SPR_CYBR,14,10,{NULL},S_CYBER_DIE9,0,0}, // S_CYBER_DIE8
- {SPR_CYBR,15,30,{NULL},S_CYBER_DIE10,0,0}, // S_CYBER_DIE9
- {SPR_CYBR,15,-1,{A_BossDeath},S_NULL,0,0}, // S_CYBER_DIE10
- {SPR_PAIN,0,10,{A_Look},S_PAIN_STND,0,0}, // S_PAIN_STND
- {SPR_PAIN,0,3,{A_Chase},S_PAIN_RUN2,0,0}, // S_PAIN_RUN1
- {SPR_PAIN,0,3,{A_Chase},S_PAIN_RUN3,0,0}, // S_PAIN_RUN2
- {SPR_PAIN,1,3,{A_Chase},S_PAIN_RUN4,0,0}, // S_PAIN_RUN3
- {SPR_PAIN,1,3,{A_Chase},S_PAIN_RUN5,0,0}, // S_PAIN_RUN4
- {SPR_PAIN,2,3,{A_Chase},S_PAIN_RUN6,0,0}, // S_PAIN_RUN5
- {SPR_PAIN,2,3,{A_Chase},S_PAIN_RUN1,0,0}, // S_PAIN_RUN6
- {SPR_PAIN,3,5,{A_FaceTarget},S_PAIN_ATK2,0,0}, // S_PAIN_ATK1
- {SPR_PAIN,4,5,{A_FaceTarget},S_PAIN_ATK3,0,0}, // S_PAIN_ATK2
- {SPR_PAIN,32773,5,{A_FaceTarget},S_PAIN_ATK4,0,0}, // S_PAIN_ATK3
- {SPR_PAIN,32773,0,{A_PainAttack},S_PAIN_RUN1,0,0}, // S_PAIN_ATK4
- {SPR_PAIN,6,6,{NULL},S_PAIN_PAIN2,0,0}, // S_PAIN_PAIN
- {SPR_PAIN,6,6,{A_Pain},S_PAIN_RUN1,0,0}, // S_PAIN_PAIN2
- {SPR_PAIN,32775,8,{NULL},S_PAIN_DIE2,0,0}, // S_PAIN_DIE1
- {SPR_PAIN,32776,8,{A_Scream},S_PAIN_DIE3,0,0}, // S_PAIN_DIE2
- {SPR_PAIN,32777,8,{NULL},S_PAIN_DIE4,0,0}, // S_PAIN_DIE3
- {SPR_PAIN,32778,8,{NULL},S_PAIN_DIE5,0,0}, // S_PAIN_DIE4
- {SPR_PAIN,32779,8,{A_PainDie},S_PAIN_DIE6,0,0}, // S_PAIN_DIE5
- {SPR_PAIN,32780,8,{NULL},S_NULL,0,0}, // S_PAIN_DIE6
- {SPR_PAIN,12,8,{NULL},S_PAIN_RAISE2,0,0}, // S_PAIN_RAISE1
- {SPR_PAIN,11,8,{NULL},S_PAIN_RAISE3,0,0}, // S_PAIN_RAISE2
- {SPR_PAIN,10,8,{NULL},S_PAIN_RAISE4,0,0}, // S_PAIN_RAISE3
- {SPR_PAIN,9,8,{NULL},S_PAIN_RAISE5,0,0}, // S_PAIN_RAISE4
- {SPR_PAIN,8,8,{NULL},S_PAIN_RAISE6,0,0}, // S_PAIN_RAISE5
- {SPR_PAIN,7,8,{NULL},S_PAIN_RUN1,0,0}, // S_PAIN_RAISE6
- {SPR_SSWV,0,10,{A_Look},S_SSWV_STND2,0,0}, // S_SSWV_STND
- {SPR_SSWV,1,10,{A_Look},S_SSWV_STND,0,0}, // S_SSWV_STND2
- {SPR_SSWV,0,3,{A_Chase},S_SSWV_RUN2,0,0}, // S_SSWV_RUN1
- {SPR_SSWV,0,3,{A_Chase},S_SSWV_RUN3,0,0}, // S_SSWV_RUN2
- {SPR_SSWV,1,3,{A_Chase},S_SSWV_RUN4,0,0}, // S_SSWV_RUN3
- {SPR_SSWV,1,3,{A_Chase},S_SSWV_RUN5,0,0}, // S_SSWV_RUN4
- {SPR_SSWV,2,3,{A_Chase},S_SSWV_RUN6,0,0}, // S_SSWV_RUN5
- {SPR_SSWV,2,3,{A_Chase},S_SSWV_RUN7,0,0}, // S_SSWV_RUN6
- {SPR_SSWV,3,3,{A_Chase},S_SSWV_RUN8,0,0}, // S_SSWV_RUN7
- {SPR_SSWV,3,3,{A_Chase},S_SSWV_RUN1,0,0}, // S_SSWV_RUN8
- {SPR_SSWV,4,10,{A_FaceTarget},S_SSWV_ATK2,0,0}, // S_SSWV_ATK1
- {SPR_SSWV,5,10,{A_FaceTarget},S_SSWV_ATK3,0,0}, // S_SSWV_ATK2
- {SPR_SSWV,32774,4,{A_CPosAttack},S_SSWV_ATK4,0,0}, // S_SSWV_ATK3
- {SPR_SSWV,5,6,{A_FaceTarget},S_SSWV_ATK5,0,0}, // S_SSWV_ATK4
- {SPR_SSWV,32774,4,{A_CPosAttack},S_SSWV_ATK6,0,0}, // S_SSWV_ATK5
- {SPR_SSWV,5,1,{A_CPosRefire},S_SSWV_ATK2,0,0}, // S_SSWV_ATK6
- {SPR_SSWV,7,3,{NULL},S_SSWV_PAIN2,0,0}, // S_SSWV_PAIN
- {SPR_SSWV,7,3,{A_Pain},S_SSWV_RUN1,0,0}, // S_SSWV_PAIN2
- {SPR_SSWV,8,5,{NULL},S_SSWV_DIE2,0,0}, // S_SSWV_DIE1
- {SPR_SSWV,9,5,{A_Scream},S_SSWV_DIE3,0,0}, // S_SSWV_DIE2
- {SPR_SSWV,10,5,{A_Fall},S_SSWV_DIE4,0,0}, // S_SSWV_DIE3
- {SPR_SSWV,11,5,{NULL},S_SSWV_DIE5,0,0}, // S_SSWV_DIE4
- {SPR_SSWV,12,-1,{NULL},S_NULL,0,0}, // S_SSWV_DIE5
- {SPR_SSWV,13,5,{NULL},S_SSWV_XDIE2,0,0}, // S_SSWV_XDIE1
- {SPR_SSWV,14,5,{A_XScream},S_SSWV_XDIE3,0,0}, // S_SSWV_XDIE2
- {SPR_SSWV,15,5,{A_Fall},S_SSWV_XDIE4,0,0}, // S_SSWV_XDIE3
- {SPR_SSWV,16,5,{NULL},S_SSWV_XDIE5,0,0}, // S_SSWV_XDIE4
- {SPR_SSWV,17,5,{NULL},S_SSWV_XDIE6,0,0}, // S_SSWV_XDIE5
- {SPR_SSWV,18,5,{NULL},S_SSWV_XDIE7,0,0}, // S_SSWV_XDIE6
- {SPR_SSWV,19,5,{NULL},S_SSWV_XDIE8,0,0}, // S_SSWV_XDIE7
- {SPR_SSWV,20,5,{NULL},S_SSWV_XDIE9,0,0}, // S_SSWV_XDIE8
- {SPR_SSWV,21,-1,{NULL},S_NULL,0,0}, // S_SSWV_XDIE9
- {SPR_SSWV,12,5,{NULL},S_SSWV_RAISE2,0,0}, // S_SSWV_RAISE1
- {SPR_SSWV,11,5,{NULL},S_SSWV_RAISE3,0,0}, // S_SSWV_RAISE2
- {SPR_SSWV,10,5,{NULL},S_SSWV_RAISE4,0,0}, // S_SSWV_RAISE3
- {SPR_SSWV,9,5,{NULL},S_SSWV_RAISE5,0,0}, // S_SSWV_RAISE4
- {SPR_SSWV,8,5,{NULL},S_SSWV_RUN1,0,0}, // S_SSWV_RAISE5
- {SPR_KEEN,0,-1,{NULL},S_KEENSTND,0,0}, // S_KEENSTND
- {SPR_KEEN,0,6,{NULL},S_COMMKEEN2,0,0}, // S_COMMKEEN
- {SPR_KEEN,1,6,{NULL},S_COMMKEEN3,0,0}, // S_COMMKEEN2
- {SPR_KEEN,2,6,{A_Scream},S_COMMKEEN4,0,0}, // S_COMMKEEN3
- {SPR_KEEN,3,6,{NULL},S_COMMKEEN5,0,0}, // S_COMMKEEN4
- {SPR_KEEN,4,6,{NULL},S_COMMKEEN6,0,0}, // S_COMMKEEN5
- {SPR_KEEN,5,6,{NULL},S_COMMKEEN7,0,0}, // S_COMMKEEN6
- {SPR_KEEN,6,6,{NULL},S_COMMKEEN8,0,0}, // S_COMMKEEN7
- {SPR_KEEN,7,6,{NULL},S_COMMKEEN9,0,0}, // S_COMMKEEN8
- {SPR_KEEN,8,6,{NULL},S_COMMKEEN10,0,0}, // S_COMMKEEN9
- {SPR_KEEN,9,6,{NULL},S_COMMKEEN11,0,0}, // S_COMMKEEN10
- {SPR_KEEN,10,6,{A_KeenDie},S_COMMKEEN12,0,0},// S_COMMKEEN11
- {SPR_KEEN,11,-1,{NULL},S_NULL,0,0}, // S_COMMKEEN12
- {SPR_KEEN,12,4,{NULL},S_KEENPAIN2,0,0}, // S_KEENPAIN
- {SPR_KEEN,12,8,{A_Pain},S_KEENSTND,0,0}, // S_KEENPAIN2
- {SPR_BBRN,0,-1,{NULL},S_NULL,0,0}, // S_BRAIN
- {SPR_BBRN,1,36,{A_BrainPain},S_BRAIN,0,0}, // S_BRAIN_PAIN
- {SPR_BBRN,0,100,{A_BrainScream},S_BRAIN_DIE2,0,0}, // S_BRAIN_DIE1
- {SPR_BBRN,0,10,{NULL},S_BRAIN_DIE3,0,0}, // S_BRAIN_DIE2
- {SPR_BBRN,0,10,{NULL},S_BRAIN_DIE4,0,0}, // S_BRAIN_DIE3
- {SPR_BBRN,0,-1,{A_BrainDie},S_NULL,0,0}, // S_BRAIN_DIE4
- {SPR_SSWV,0,10,{A_Look},S_BRAINEYE,0,0}, // S_BRAINEYE
- {SPR_SSWV,0,181,{A_BrainAwake},S_BRAINEYE1,0,0}, // S_BRAINEYESEE
- {SPR_SSWV,0,150,{A_BrainSpit},S_BRAINEYE1,0,0}, // S_BRAINEYE1
- {SPR_BOSF,32768,3,{A_SpawnSound},S_SPAWN2,0,0}, // S_SPAWN1
- {SPR_BOSF,32769,3,{A_SpawnFly},S_SPAWN3,0,0}, // S_SPAWN2
- {SPR_BOSF,32770,3,{A_SpawnFly},S_SPAWN4,0,0}, // S_SPAWN3
- {SPR_BOSF,32771,3,{A_SpawnFly},S_SPAWN1,0,0}, // S_SPAWN4
- {SPR_FIRE,32768,4,{A_Fire},S_SPAWNFIRE2,0,0}, // S_SPAWNFIRE1
- {SPR_FIRE,32769,4,{A_Fire},S_SPAWNFIRE3,0,0}, // S_SPAWNFIRE2
- {SPR_FIRE,32770,4,{A_Fire},S_SPAWNFIRE4,0,0}, // S_SPAWNFIRE3
- {SPR_FIRE,32771,4,{A_Fire},S_SPAWNFIRE5,0,0}, // S_SPAWNFIRE4
- {SPR_FIRE,32772,4,{A_Fire},S_SPAWNFIRE6,0,0}, // S_SPAWNFIRE5
- {SPR_FIRE,32773,4,{A_Fire},S_SPAWNFIRE7,0,0}, // S_SPAWNFIRE6
- {SPR_FIRE,32774,4,{A_Fire},S_SPAWNFIRE8,0,0}, // S_SPAWNFIRE7
- {SPR_FIRE,32775,4,{A_Fire},S_NULL,0,0}, // S_SPAWNFIRE8
- {SPR_MISL,32769,10,{NULL},S_BRAINEXPLODE2,0,0}, // S_BRAINEXPLODE1
- {SPR_MISL,32770,10,{NULL},S_BRAINEXPLODE3,0,0}, // S_BRAINEXPLODE2
- {SPR_MISL,32771,10,{A_BrainExplode},S_NULL,0,0}, // S_BRAINEXPLODE3
- {SPR_ARM1,0,6,{NULL},S_ARM1A,0,0}, // S_ARM1
- {SPR_ARM1,32769,7,{NULL},S_ARM1,0,0}, // S_ARM1A
- {SPR_ARM2,0,6,{NULL},S_ARM2A,0,0}, // S_ARM2
- {SPR_ARM2,32769,6,{NULL},S_ARM2,0,0}, // S_ARM2A
- {SPR_BAR1,0,6,{NULL},S_BAR2,0,0}, // S_BAR1
- {SPR_BAR1,1,6,{NULL},S_BAR1,0,0}, // S_BAR2
- {SPR_BEXP,32768,5,{NULL},S_BEXP2,0,0}, // S_BEXP
- {SPR_BEXP,32769,5,{A_Scream},S_BEXP3,0,0}, // S_BEXP2
- {SPR_BEXP,32770,5,{NULL},S_BEXP4,0,0}, // S_BEXP3
- {SPR_BEXP,32771,10,{A_Explode},S_BEXP5,0,0}, // S_BEXP4
- {SPR_BEXP,32772,10,{NULL},S_NULL,0,0}, // S_BEXP5
- {SPR_FCAN,32768,4,{NULL},S_BBAR2,0,0}, // S_BBAR1
- {SPR_FCAN,32769,4,{NULL},S_BBAR3,0,0}, // S_BBAR2
- {SPR_FCAN,32770,4,{NULL},S_BBAR1,0,0}, // S_BBAR3
- {SPR_BON1,0,6,{NULL},S_BON1A,0,0}, // S_BON1
- {SPR_BON1,1,6,{NULL},S_BON1B,0,0}, // S_BON1A
- {SPR_BON1,2,6,{NULL},S_BON1C,0,0}, // S_BON1B
- {SPR_BON1,3,6,{NULL},S_BON1D,0,0}, // S_BON1C
- {SPR_BON1,2,6,{NULL},S_BON1E,0,0}, // S_BON1D
- {SPR_BON1,1,6,{NULL},S_BON1,0,0}, // S_BON1E
- {SPR_BON2,0,6,{NULL},S_BON2A,0,0}, // S_BON2
- {SPR_BON2,1,6,{NULL},S_BON2B,0,0}, // S_BON2A
- {SPR_BON2,2,6,{NULL},S_BON2C,0,0}, // S_BON2B
- {SPR_BON2,3,6,{NULL},S_BON2D,0,0}, // S_BON2C
- {SPR_BON2,2,6,{NULL},S_BON2E,0,0}, // S_BON2D
- {SPR_BON2,1,6,{NULL},S_BON2,0,0}, // S_BON2E
- {SPR_BKEY,0,10,{NULL},S_BKEY2,0,0}, // S_BKEY
- {SPR_BKEY,32769,10,{NULL},S_BKEY,0,0}, // S_BKEY2
- {SPR_RKEY,0,10,{NULL},S_RKEY2,0,0}, // S_RKEY
- {SPR_RKEY,32769,10,{NULL},S_RKEY,0,0}, // S_RKEY2
- {SPR_YKEY,0,10,{NULL},S_YKEY2,0,0}, // S_YKEY
- {SPR_YKEY,32769,10,{NULL},S_YKEY,0,0}, // S_YKEY2
- {SPR_BSKU,0,10,{NULL},S_BSKULL2,0,0}, // S_BSKULL
- {SPR_BSKU,32769,10,{NULL},S_BSKULL,0,0}, // S_BSKULL2
- {SPR_RSKU,0,10,{NULL},S_RSKULL2,0,0}, // S_RSKULL
- {SPR_RSKU,32769,10,{NULL},S_RSKULL,0,0}, // S_RSKULL2
- {SPR_YSKU,0,10,{NULL},S_YSKULL2,0,0}, // S_YSKULL
- {SPR_YSKU,32769,10,{NULL},S_YSKULL,0,0}, // S_YSKULL2
- {SPR_STIM,0,-1,{NULL},S_NULL,0,0}, // S_STIM
- {SPR_MEDI,0,-1,{NULL},S_NULL,0,0}, // S_MEDI
- {SPR_SOUL,32768,6,{NULL},S_SOUL2,0,0}, // S_SOUL
- {SPR_SOUL,32769,6,{NULL},S_SOUL3,0,0}, // S_SOUL2
- {SPR_SOUL,32770,6,{NULL},S_SOUL4,0,0}, // S_SOUL3
- {SPR_SOUL,32771,6,{NULL},S_SOUL5,0,0}, // S_SOUL4
- {SPR_SOUL,32770,6,{NULL},S_SOUL6,0,0}, // S_SOUL5
- {SPR_SOUL,32769,6,{NULL},S_SOUL,0,0}, // S_SOUL6
- {SPR_PINV,32768,6,{NULL},S_PINV2,0,0}, // S_PINV
- {SPR_PINV,32769,6,{NULL},S_PINV3,0,0}, // S_PINV2
- {SPR_PINV,32770,6,{NULL},S_PINV4,0,0}, // S_PINV3
- {SPR_PINV,32771,6,{NULL},S_PINV,0,0}, // S_PINV4
- {SPR_PSTR,32768,-1,{NULL},S_NULL,0,0}, // S_PSTR
- {SPR_PINS,32768,6,{NULL},S_PINS2,0,0}, // S_PINS
- {SPR_PINS,32769,6,{NULL},S_PINS3,0,0}, // S_PINS2
- {SPR_PINS,32770,6,{NULL},S_PINS4,0,0}, // S_PINS3
- {SPR_PINS,32771,6,{NULL},S_PINS,0,0}, // S_PINS4
- {SPR_MEGA,32768,6,{NULL},S_MEGA2,0,0}, // S_MEGA
- {SPR_MEGA,32769,6,{NULL},S_MEGA3,0,0}, // S_MEGA2
- {SPR_MEGA,32770,6,{NULL},S_MEGA4,0,0}, // S_MEGA3
- {SPR_MEGA,32771,6,{NULL},S_MEGA,0,0}, // S_MEGA4
- {SPR_SUIT,32768,-1,{NULL},S_NULL,0,0}, // S_SUIT
- {SPR_PMAP,32768,6,{NULL},S_PMAP2,0,0}, // S_PMAP
- {SPR_PMAP,32769,6,{NULL},S_PMAP3,0,0}, // S_PMAP2
- {SPR_PMAP,32770,6,{NULL},S_PMAP4,0,0}, // S_PMAP3
- {SPR_PMAP,32771,6,{NULL},S_PMAP5,0,0}, // S_PMAP4
- {SPR_PMAP,32770,6,{NULL},S_PMAP6,0,0}, // S_PMAP5
- {SPR_PMAP,32769,6,{NULL},S_PMAP,0,0}, // S_PMAP6
- {SPR_PVIS,32768,6,{NULL},S_PVIS2,0,0}, // S_PVIS
- {SPR_PVIS,1,6,{NULL},S_PVIS,0,0}, // S_PVIS2
- {SPR_CLIP,0,-1,{NULL},S_NULL,0,0}, // S_CLIP
- {SPR_AMMO,0,-1,{NULL},S_NULL,0,0}, // S_AMMO
- {SPR_ROCK,0,-1,{NULL},S_NULL,0,0}, // S_ROCK
- {SPR_BROK,0,-1,{NULL},S_NULL,0,0}, // S_BROK
- {SPR_CELL,0,-1,{NULL},S_NULL,0,0}, // S_CELL
- {SPR_CELP,0,-1,{NULL},S_NULL,0,0}, // S_CELP
- {SPR_SHEL,0,-1,{NULL},S_NULL,0,0}, // S_SHEL
- {SPR_SBOX,0,-1,{NULL},S_NULL,0,0}, // S_SBOX
- {SPR_BPAK,0,-1,{NULL},S_NULL,0,0}, // S_BPAK
- {SPR_BFUG,0,-1,{NULL},S_NULL,0,0}, // S_BFUG
- {SPR_MGUN,0,-1,{NULL},S_NULL,0,0}, // S_MGUN
- {SPR_CSAW,0,-1,{NULL},S_NULL,0,0}, // S_CSAW
- {SPR_LAUN,0,-1,{NULL},S_NULL,0,0}, // S_LAUN
- {SPR_PLAS,0,-1,{NULL},S_NULL,0,0}, // S_PLAS
- {SPR_SHOT,0,-1,{NULL},S_NULL,0,0}, // S_SHOT
- {SPR_SGN2,0,-1,{NULL},S_NULL,0,0}, // S_SHOT2
- {SPR_COLU,32768,-1,{NULL},S_NULL,0,0}, // S_COLU
- {SPR_SMT2,0,-1,{NULL},S_NULL,0,0}, // S_STALAG
- {SPR_GOR1,0,10,{NULL},S_BLOODYTWITCH2,0,0}, // S_BLOODYTWITCH
- {SPR_GOR1,1,15,{NULL},S_BLOODYTWITCH3,0,0}, // S_BLOODYTWITCH2
- {SPR_GOR1,2,8,{NULL},S_BLOODYTWITCH4,0,0}, // S_BLOODYTWITCH3
- {SPR_GOR1,1,6,{NULL},S_BLOODYTWITCH,0,0}, // S_BLOODYTWITCH4
- {SPR_PLAY,13,-1,{NULL},S_NULL,0,0}, // S_DEADTORSO
- {SPR_PLAY,18,-1,{NULL},S_NULL,0,0}, // S_DEADBOTTOM
- {SPR_POL2,0,-1,{NULL},S_NULL,0,0}, // S_HEADSONSTICK
- {SPR_POL5,0,-1,{NULL},S_NULL,0,0}, // S_GIBS
- {SPR_POL4,0,-1,{NULL},S_NULL,0,0}, // S_HEADONASTICK
- {SPR_POL3,32768,6,{NULL},S_HEADCANDLES2,0,0}, // S_HEADCANDLES
- {SPR_POL3,32769,6,{NULL},S_HEADCANDLES,0,0}, // S_HEADCANDLES2
- {SPR_POL1,0,-1,{NULL},S_NULL,0,0}, // S_DEADSTICK
- {SPR_POL6,0,6,{NULL},S_LIVESTICK2,0,0}, // S_LIVESTICK
- {SPR_POL6,1,8,{NULL},S_LIVESTICK,0,0}, // S_LIVESTICK2
- {SPR_GOR2,0,-1,{NULL},S_NULL,0,0}, // S_MEAT2
- {SPR_GOR3,0,-1,{NULL},S_NULL,0,0}, // S_MEAT3
- {SPR_GOR4,0,-1,{NULL},S_NULL,0,0}, // S_MEAT4
- {SPR_GOR5,0,-1,{NULL},S_NULL,0,0}, // S_MEAT5
- {SPR_SMIT,0,-1,{NULL},S_NULL,0,0}, // S_STALAGTITE
- {SPR_COL1,0,-1,{NULL},S_NULL,0,0}, // S_TALLGRNCOL
- {SPR_COL2,0,-1,{NULL},S_NULL,0,0}, // S_SHRTGRNCOL
- {SPR_COL3,0,-1,{NULL},S_NULL,0,0}, // S_TALLREDCOL
- {SPR_COL4,0,-1,{NULL},S_NULL,0,0}, // S_SHRTREDCOL
- {SPR_CAND,32768,-1,{NULL},S_NULL,0,0}, // S_CANDLESTIK
- {SPR_CBRA,32768,-1,{NULL},S_NULL,0,0}, // S_CANDELABRA
- {SPR_COL6,0,-1,{NULL},S_NULL,0,0}, // S_SKULLCOL
- {SPR_TRE1,0,-1,{NULL},S_NULL,0,0}, // S_TORCHTREE
- {SPR_TRE2,0,-1,{NULL},S_NULL,0,0}, // S_BIGTREE
- {SPR_ELEC,0,-1,{NULL},S_NULL,0,0}, // S_TECHPILLAR
- {SPR_CEYE,32768,6,{NULL},S_EVILEYE2,0,0}, // S_EVILEYE
- {SPR_CEYE,32769,6,{NULL},S_EVILEYE3,0,0}, // S_EVILEYE2
- {SPR_CEYE,32770,6,{NULL},S_EVILEYE4,0,0}, // S_EVILEYE3
- {SPR_CEYE,32769,6,{NULL},S_EVILEYE,0,0}, // S_EVILEYE4
- {SPR_FSKU,32768,6,{NULL},S_FLOATSKULL2,0,0}, // S_FLOATSKULL
- {SPR_FSKU,32769,6,{NULL},S_FLOATSKULL3,0,0}, // S_FLOATSKULL2
- {SPR_FSKU,32770,6,{NULL},S_FLOATSKULL,0,0}, // S_FLOATSKULL3
- {SPR_COL5,0,14,{NULL},S_HEARTCOL2,0,0}, // S_HEARTCOL
- {SPR_COL5,1,14,{NULL},S_HEARTCOL,0,0}, // S_HEARTCOL2
- {SPR_TBLU,32768,4,{NULL},S_BLUETORCH2,0,0}, // S_BLUETORCH
- {SPR_TBLU,32769,4,{NULL},S_BLUETORCH3,0,0}, // S_BLUETORCH2
- {SPR_TBLU,32770,4,{NULL},S_BLUETORCH4,0,0}, // S_BLUETORCH3
- {SPR_TBLU,32771,4,{NULL},S_BLUETORCH,0,0}, // S_BLUETORCH4
- {SPR_TGRN,32768,4,{NULL},S_GREENTORCH2,0,0}, // S_GREENTORCH
- {SPR_TGRN,32769,4,{NULL},S_GREENTORCH3,0,0}, // S_GREENTORCH2
- {SPR_TGRN,32770,4,{NULL},S_GREENTORCH4,0,0}, // S_GREENTORCH3
- {SPR_TGRN,32771,4,{NULL},S_GREENTORCH,0,0}, // S_GREENTORCH4
- {SPR_TRED,32768,4,{NULL},S_REDTORCH2,0,0}, // S_REDTORCH
- {SPR_TRED,32769,4,{NULL},S_REDTORCH3,0,0}, // S_REDTORCH2
- {SPR_TRED,32770,4,{NULL},S_REDTORCH4,0,0}, // S_REDTORCH3
- {SPR_TRED,32771,4,{NULL},S_REDTORCH,0,0}, // S_REDTORCH4
- {SPR_SMBT,32768,4,{NULL},S_BTORCHSHRT2,0,0}, // S_BTORCHSHRT
- {SPR_SMBT,32769,4,{NULL},S_BTORCHSHRT3,0,0}, // S_BTORCHSHRT2
- {SPR_SMBT,32770,4,{NULL},S_BTORCHSHRT4,0,0}, // S_BTORCHSHRT3
- {SPR_SMBT,32771,4,{NULL},S_BTORCHSHRT,0,0}, // S_BTORCHSHRT4
- {SPR_SMGT,32768,4,{NULL},S_GTORCHSHRT2,0,0}, // S_GTORCHSHRT
- {SPR_SMGT,32769,4,{NULL},S_GTORCHSHRT3,0,0}, // S_GTORCHSHRT2
- {SPR_SMGT,32770,4,{NULL},S_GTORCHSHRT4,0,0}, // S_GTORCHSHRT3
- {SPR_SMGT,32771,4,{NULL},S_GTORCHSHRT,0,0}, // S_GTORCHSHRT4
- {SPR_SMRT,32768,4,{NULL},S_RTORCHSHRT2,0,0}, // S_RTORCHSHRT
- {SPR_SMRT,32769,4,{NULL},S_RTORCHSHRT3,0,0}, // S_RTORCHSHRT2
- {SPR_SMRT,32770,4,{NULL},S_RTORCHSHRT4,0,0}, // S_RTORCHSHRT3
- {SPR_SMRT,32771,4,{NULL},S_RTORCHSHRT,0,0}, // S_RTORCHSHRT4
- {SPR_HDB1,0,-1,{NULL},S_NULL,0,0}, // S_HANGNOGUTS
- {SPR_HDB2,0,-1,{NULL},S_NULL,0,0}, // S_HANGBNOBRAIN
- {SPR_HDB3,0,-1,{NULL},S_NULL,0,0}, // S_HANGTLOOKDN
- {SPR_HDB4,0,-1,{NULL},S_NULL,0,0}, // S_HANGTSKULL
- {SPR_HDB5,0,-1,{NULL},S_NULL,0,0}, // S_HANGTLOOKUP
- {SPR_HDB6,0,-1,{NULL},S_NULL,0,0}, // S_HANGTNOBRAIN
- {SPR_POB1,0,-1,{NULL},S_NULL,0,0}, // S_COLONGIBS
- {SPR_POB2,0,-1,{NULL},S_NULL,0,0}, // S_SMALLPOOL
- {SPR_BRS1,0,-1,{NULL},S_NULL,0,0}, // S_BRAINSTEM
- {SPR_TLMP,32768,4,{NULL},S_TECHLAMP2,0,0}, // S_TECHLAMP
- {SPR_TLMP,32769,4,{NULL},S_TECHLAMP3,0,0}, // S_TECHLAMP2
- {SPR_TLMP,32770,4,{NULL},S_TECHLAMP4,0,0}, // S_TECHLAMP3
- {SPR_TLMP,32771,4,{NULL},S_TECHLAMP,0,0}, // S_TECHLAMP4
- {SPR_TLP2,32768,4,{NULL},S_TECH2LAMP2,0,0}, // S_TECH2LAMP
- {SPR_TLP2,32769,4,{NULL},S_TECH2LAMP3,0,0}, // S_TECH2LAMP2
- {SPR_TLP2,32770,4,{NULL},S_TECH2LAMP4,0,0}, // S_TECH2LAMP3
- {SPR_TLP2,32771,4,{NULL},S_TECH2LAMP,0,0} // S_TECH2LAMP4
+ {SPR_TROO,0,-1,{NULL},S_NULL,0,0},
+ {SPR_SHTG,4,0,{A_Light0},S_NULL,0,0},
+ {SPR_PUNG,0,1,{A_WeaponReady},S_PUNCH,0,0},
+ {SPR_PUNG,0,1,{A_Lower},S_PUNCHDOWN,0,0},
+ {SPR_PUNG,0,1,{A_Raise},S_PUNCHUP,0,0},
+ {SPR_PUNG,1,4,{NULL},S_PUNCH2,0,0},
+ {SPR_PUNG,2,4,{A_Punch},S_PUNCH3,0,0},
+ {SPR_PUNG,3,5,{NULL},S_PUNCH4,0,0},
+ {SPR_PUNG,2,4,{NULL},S_PUNCH5,0,0},
+ {SPR_PUNG,1,5,{A_ReFire},S_PUNCH,0,0},
+ {SPR_PISG,0,1,{A_WeaponReady},S_PISTOL,0,0},
+ {SPR_PISG,0,1,{A_Lower},S_PISTOLDOWN,0,0},
+ {SPR_PISG,0,1,{A_Raise},S_PISTOLUP,0,0},
+ {SPR_PISG,0,4,{NULL},S_PISTOL2,0,0},
+ {SPR_PISG,1,6,{A_FirePistol},S_PISTOL3,0,0},
+ {SPR_PISG,2,4,{NULL},S_PISTOL4,0,0},
+ {SPR_PISG,1,5,{A_ReFire},S_PISTOL,0,0},
+ {SPR_PISF,32768,7,{A_Light1},S_LIGHTDONE,0,0},
+ {SPR_SHTG,0,1,{A_WeaponReady},S_SGUN,0,0},
+ {SPR_SHTG,0,1,{A_Lower},S_SGUNDOWN,0,0},
+ {SPR_SHTG,0,1,{A_Raise},S_SGUNUP,0,0},
+ {SPR_SHTG,0,3,{NULL},S_SGUN2,0,0},
+ {SPR_SHTG,0,7,{A_FireShotgun},S_SGUN3,0,0},
+ {SPR_SHTG,1,5,{NULL},S_SGUN4,0,0},
+ {SPR_SHTG,2,5,{NULL},S_SGUN5,0,0},
+ {SPR_SHTG,3,4,{NULL},S_SGUN6,0,0},
+ {SPR_SHTG,2,5,{NULL},S_SGUN7,0,0},
+ {SPR_SHTG,1,5,{NULL},S_SGUN8,0,0},
+ {SPR_SHTG,0,3,{NULL},S_SGUN9,0,0},
+ {SPR_SHTG,0,7,{A_ReFire},S_SGUN,0,0},
+ {SPR_SHTF,32768,4,{A_Light1},S_SGUNFLASH2,0,0},
+ {SPR_SHTF,32769,3,{A_Light2},S_LIGHTDONE,0,0},
+ {SPR_SHT2,0,1,{A_WeaponReady},S_DSGUN,0,0},
+ {SPR_SHT2,0,1,{A_Lower},S_DSGUNDOWN,0,0},
+ {SPR_SHT2,0,1,{A_Raise},S_DSGUNUP,0,0},
+ {SPR_SHT2,0,3,{NULL},S_DSGUN2,0,0},
+ {SPR_SHT2,0,7,{A_FireShotgun2},S_DSGUN3,0,0},
+ {SPR_SHT2,1,7,{NULL},S_DSGUN4,0,0},
+ {SPR_SHT2,2,7,{A_CheckReload},S_DSGUN5,0,0},
+ {SPR_SHT2,3,7,{A_OpenShotgun2},S_DSGUN6,0,0},
+ {SPR_SHT2,4,7,{NULL},S_DSGUN7,0,0},
+ {SPR_SHT2,5,7,{A_LoadShotgun2},S_DSGUN8,0,0},
+ {SPR_SHT2,6,6,{NULL},S_DSGUN9,0,0},
+ {SPR_SHT2,7,6,{A_CloseShotgun2},S_DSGUN10,0,0},
+ {SPR_SHT2,0,5,{A_ReFire},S_DSGUN,0,0},
+ {SPR_SHT2,1,7,{NULL},S_DSNR2,0,0},
+ {SPR_SHT2,0,3,{NULL},S_DSGUNDOWN,0,0},
+ {SPR_SHT2,32776,5,{A_Light1},S_DSGUNFLASH2,0,0},
+ {SPR_SHT2,32777,4,{A_Light2},S_LIGHTDONE,0,0},
+ {SPR_CHGG,0,1,{A_WeaponReady},S_CHAIN,0,0},
+ {SPR_CHGG,0,1,{A_Lower},S_CHAINDOWN,0,0},
+ {SPR_CHGG,0,1,{A_Raise},S_CHAINUP,0,0},
+ {SPR_CHGG,0,4,{A_FireCGun},S_CHAIN2,0,0},
+ {SPR_CHGG,1,4,{A_FireCGun},S_CHAIN3,0,0},
+ {SPR_CHGG,1,0,{A_ReFire},S_CHAIN,0,0},
+ {SPR_CHGF,32768,5,{A_Light1},S_LIGHTDONE,0,0},
+ {SPR_CHGF,32769,5,{A_Light2},S_LIGHTDONE,0,0},
+ {SPR_MISG,0,1,{A_WeaponReady},S_MISSILE,0,0},
+ {SPR_MISG,0,1,{A_Lower},S_MISSILEDOWN,0,0},
+ {SPR_MISG,0,1,{A_Raise},S_MISSILEUP,0,0},
+ {SPR_MISG,1,8,{A_GunFlash},S_MISSILE2,0,0},
+ {SPR_MISG,1,12,{A_FireMissile},S_MISSILE3,0,0},
+ {SPR_MISG,1,0,{A_ReFire},S_MISSILE,0,0},
+ {SPR_MISF,32768,3,{A_Light1},S_MISSILEFLASH2,0,0},
+ {SPR_MISF,32769,4,{NULL},S_MISSILEFLASH3,0,0},
+ {SPR_MISF,32770,4,{A_Light2},S_MISSILEFLASH4,0,0},
+ {SPR_MISF,32771,4,{A_Light2},S_LIGHTDONE,0,0},
+ {SPR_SAWG,2,4,{A_WeaponReady},S_SAWB,0,0},
+ {SPR_SAWG,3,4,{A_WeaponReady},S_SAW,0,0},
+ {SPR_SAWG,2,1,{A_Lower},S_SAWDOWN,0,0},
+ {SPR_SAWG,2,1,{A_Raise},S_SAWUP,0,0},
+ {SPR_SAWG,0,4,{A_Saw},S_SAW2,0,0},
+ {SPR_SAWG,1,4,{A_Saw},S_SAW3,0,0},
+ {SPR_SAWG,1,0,{A_ReFire},S_SAW,0,0},
+ {SPR_PLSG,0,1,{A_WeaponReady},S_PLASMA,0,0},
+ {SPR_PLSG,0,1,{A_Lower},S_PLASMADOWN,0,0},
+ {SPR_PLSG,0,1,{A_Raise},S_PLASMAUP,0,0},
+ {SPR_PLSG,0,3,{A_FirePlasma},S_PLASMA2,0,0},
+ {SPR_PLSG,1,20,{A_ReFire},S_PLASMA,0,0},
+ {SPR_PLSF,32768,4,{A_Light1},S_LIGHTDONE,0,0},
+ {SPR_PLSF,32769,4,{A_Light1},S_LIGHTDONE,0,0},
+ {SPR_BFGG,0,1,{A_WeaponReady},S_BFG,0,0},
+ {SPR_BFGG,0,1,{A_Lower},S_BFGDOWN,0,0},
+ {SPR_BFGG,0,1,{A_Raise},S_BFGUP,0,0},
+ {SPR_BFGG,0,20,{A_BFGsound},S_BFG2,0,0},
+ {SPR_BFGG,1,10,{A_GunFlash},S_BFG3,0,0},
+ {SPR_BFGG,1,10,{A_FireBFG},S_BFG4,0,0},
+ {SPR_BFGG,1,20,{A_ReFire},S_BFG,0,0},
+ {SPR_BFGF,32768,11,{A_Light1},S_BFGFLASH2,0,0},
+ {SPR_BFGF,32769,6,{A_Light2},S_LIGHTDONE,0,0},
+ {SPR_BLUD,2,8,{NULL},S_BLOOD2,0,0},
+ {SPR_BLUD,1,8,{NULL},S_BLOOD3,0,0},
+ {SPR_BLUD,0,8,{NULL},S_NULL,0,0},
+ {SPR_PUFF,32768,4,{NULL},S_PUFF2,0,0},
+ {SPR_PUFF,1,4,{NULL},S_PUFF3,0,0},
+ {SPR_PUFF,2,4,{NULL},S_PUFF4,0,0},
+ {SPR_PUFF,3,4,{NULL},S_NULL,0,0},
+ {SPR_BAL1,32768,4,{NULL},S_TBALL2,0,0},
+ {SPR_BAL1,32769,4,{NULL},S_TBALL1,0,0},
+ {SPR_BAL1,32770,6,{NULL},S_TBALLX2,0,0},
+ {SPR_BAL1,32771,6,{NULL},S_TBALLX3,0,0},
+ {SPR_BAL1,32772,6,{NULL},S_NULL,0,0},
+ {SPR_BAL2,32768,4,{NULL},S_RBALL2,0,0},
+ {SPR_BAL2,32769,4,{NULL},S_RBALL1,0,0},
+ {SPR_BAL2,32770,6,{NULL},S_RBALLX2,0,0},
+ {SPR_BAL2,32771,6,{NULL},S_RBALLX3,0,0},
+ {SPR_BAL2,32772,6,{NULL},S_NULL,0,0},
+ {SPR_PLSS,32768,6,{NULL},S_PLASBALL2,0,0},
+ {SPR_PLSS,32769,6,{NULL},S_PLASBALL,0,0},
+ {SPR_PLSE,32768,4,{NULL},S_PLASEXP2,0,0},
+ {SPR_PLSE,32769,4,{NULL},S_PLASEXP3,0,0},
+ {SPR_PLSE,32770,4,{NULL},S_PLASEXP4,0,0},
+ {SPR_PLSE,32771,4,{NULL},S_PLASEXP5,0,0},
+ {SPR_PLSE,32772,4,{NULL},S_NULL,0,0},
+ {SPR_MISL,32768,1,{NULL},S_ROCKET,0,0},
+ {SPR_BFS1,32768,4,{NULL},S_BFGSHOT2,0,0},
+ {SPR_BFS1,32769,4,{NULL},S_BFGSHOT,0,0},
+ {SPR_BFE1,32768,8,{NULL},S_BFGLAND2,0,0},
+ {SPR_BFE1,32769,8,{NULL},S_BFGLAND3,0,0},
+ {SPR_BFE1,32770,8,{A_BFGSpray},S_BFGLAND4,0,0},
+ {SPR_BFE1,32771,8,{NULL},S_BFGLAND5,0,0},
+ {SPR_BFE1,32772,8,{NULL},S_BFGLAND6,0,0},
+ {SPR_BFE1,32773,8,{NULL},S_NULL,0,0},
+ {SPR_BFE2,32768,8,{NULL},S_BFGEXP2,0,0},
+ {SPR_BFE2,32769,8,{NULL},S_BFGEXP3,0,0},
+ {SPR_BFE2,32770,8,{NULL},S_BFGEXP4,0,0},
+ {SPR_BFE2,32771,8,{NULL},S_NULL,0,0},
+ {SPR_MISL,32769,8,{A_Explode},S_EXPLODE2,0,0},
+ {SPR_MISL,32770,6,{NULL},S_EXPLODE3,0,0},
+ {SPR_MISL,32771,4,{NULL},S_NULL,0,0},
+ {SPR_TFOG,32768,6,{NULL},S_TFOG01,0,0},
+ {SPR_TFOG,32769,6,{NULL},S_TFOG02,0,0},
+ {SPR_TFOG,32768,6,{NULL},S_TFOG2,0,0},
+ {SPR_TFOG,32769,6,{NULL},S_TFOG3,0,0},
+ {SPR_TFOG,32770,6,{NULL},S_TFOG4,0,0},
+ {SPR_TFOG,32771,6,{NULL},S_TFOG5,0,0},
+ {SPR_TFOG,32772,6,{NULL},S_TFOG6,0,0},
+ {SPR_TFOG,32773,6,{NULL},S_TFOG7,0,0},
+ {SPR_TFOG,32774,6,{NULL},S_TFOG8,0,0},
+ {SPR_TFOG,32775,6,{NULL},S_TFOG9,0,0},
+ {SPR_TFOG,32776,6,{NULL},S_TFOG10,0,0},
+ {SPR_TFOG,32777,6,{NULL},S_NULL,0,0},
+ {SPR_IFOG,32768,6,{NULL},S_IFOG01,0,0},
+ {SPR_IFOG,32769,6,{NULL},S_IFOG02,0,0},
+ {SPR_IFOG,32768,6,{NULL},S_IFOG2,0,0},
+ {SPR_IFOG,32769,6,{NULL},S_IFOG3,0,0},
+ {SPR_IFOG,32770,6,{NULL},S_IFOG4,0,0},
+ {SPR_IFOG,32771,6,{NULL},S_IFOG5,0,0},
+ {SPR_IFOG,32772,6,{NULL},S_NULL,0,0},
+ {SPR_PLAY,0,-1,{NULL},S_NULL,0,0},
+ {SPR_PLAY,0,4,{NULL},S_PLAY_RUN2,0,0},
+ {SPR_PLAY,1,4,{NULL},S_PLAY_RUN3,0,0},
+ {SPR_PLAY,2,4,{NULL},S_PLAY_RUN4,0,0},
+ {SPR_PLAY,3,4,{NULL},S_PLAY_RUN1,0,0},
+ {SPR_PLAY,4,12,{NULL},S_PLAY,0,0},
+ {SPR_PLAY,32773,6,{NULL},S_PLAY_ATK1,0,0},
+ {SPR_PLAY,6,4,{NULL},S_PLAY_PAIN2,0,0},
+ {SPR_PLAY,6,4,{A_Pain},S_PLAY,0,0},
+ {SPR_PLAY,7,10,{NULL},S_PLAY_DIE2,0,0},
+ {SPR_PLAY,8,10,{A_PlayerScream},S_PLAY_DIE3,0,0},
+ {SPR_PLAY,9,10,{A_Fall},S_PLAY_DIE4,0,0},
+ {SPR_PLAY,10,10,{NULL},S_PLAY_DIE5,0,0},
+ {SPR_PLAY,11,10,{NULL},S_PLAY_DIE6,0,0},
+ {SPR_PLAY,12,10,{NULL},S_PLAY_DIE7,0,0},
+ {SPR_PLAY,13,-1,{NULL},S_NULL,0,0},
+ {SPR_PLAY,14,5,{NULL},S_PLAY_XDIE2,0,0},
+ {SPR_PLAY,15,5,{A_XScream},S_PLAY_XDIE3,0,0},
+ {SPR_PLAY,16,5,{A_Fall},S_PLAY_XDIE4,0,0},
+ {SPR_PLAY,17,5,{NULL},S_PLAY_XDIE5,0,0},
+ {SPR_PLAY,18,5,{NULL},S_PLAY_XDIE6,0,0},
+ {SPR_PLAY,19,5,{NULL},S_PLAY_XDIE7,0,0},
+ {SPR_PLAY,20,5,{NULL},S_PLAY_XDIE8,0,0},
+ {SPR_PLAY,21,5,{NULL},S_PLAY_XDIE9,0,0},
+ {SPR_PLAY,22,-1,{NULL},S_NULL,0,0},
+ {SPR_POSS,0,10,{A_Look},S_POSS_STND2,0,0},
+ {SPR_POSS,1,10,{A_Look},S_POSS_STND,0,0},
+ {SPR_POSS,0,4,{A_Chase},S_POSS_RUN2,0,0},
+ {SPR_POSS,0,4,{A_Chase},S_POSS_RUN3,0,0},
+ {SPR_POSS,1,4,{A_Chase},S_POSS_RUN4,0,0},
+ {SPR_POSS,1,4,{A_Chase},S_POSS_RUN5,0,0},
+ {SPR_POSS,2,4,{A_Chase},S_POSS_RUN6,0,0},
+ {SPR_POSS,2,4,{A_Chase},S_POSS_RUN7,0,0},
+ {SPR_POSS,3,4,{A_Chase},S_POSS_RUN8,0,0},
+ {SPR_POSS,3,4,{A_Chase},S_POSS_RUN1,0,0},
+ {SPR_POSS,4,10,{A_FaceTarget},S_POSS_ATK2,0,0},
+ {SPR_POSS,5,8,{A_PosAttack},S_POSS_ATK3,0,0},
+ {SPR_POSS,4,8,{NULL},S_POSS_RUN1,0,0},
+ {SPR_POSS,6,3,{NULL},S_POSS_PAIN2,0,0},
+ {SPR_POSS,6,3,{A_Pain},S_POSS_RUN1,0,0},
+ {SPR_POSS,7,5,{NULL},S_POSS_DIE2,0,0},
+ {SPR_POSS,8,5,{A_Scream},S_POSS_DIE3,0,0},
+ {SPR_POSS,9,5,{A_Fall},S_POSS_DIE4,0,0},
+ {SPR_POSS,10,5,{NULL},S_POSS_DIE5,0,0},
+ {SPR_POSS,11,-1,{NULL},S_NULL,0,0},
+ {SPR_POSS,12,5,{NULL},S_POSS_XDIE2,0,0},
+ {SPR_POSS,13,5,{A_XScream},S_POSS_XDIE3,0,0},
+ {SPR_POSS,14,5,{A_Fall},S_POSS_XDIE4,0,0},
+ {SPR_POSS,15,5,{NULL},S_POSS_XDIE5,0,0},
+ {SPR_POSS,16,5,{NULL},S_POSS_XDIE6,0,0},
+ {SPR_POSS,17,5,{NULL},S_POSS_XDIE7,0,0},
+ {SPR_POSS,18,5,{NULL},S_POSS_XDIE8,0,0},
+ {SPR_POSS,19,5,{NULL},S_POSS_XDIE9,0,0},
+ {SPR_POSS,20,-1,{NULL},S_NULL,0,0},
+ {SPR_POSS,10,5,{NULL},S_POSS_RAISE2,0,0},
+ {SPR_POSS,9,5,{NULL},S_POSS_RAISE3,0,0},
+ {SPR_POSS,8,5,{NULL},S_POSS_RAISE4,0,0},
+ {SPR_POSS,7,5,{NULL},S_POSS_RUN1,0,0},
+ {SPR_SPOS,0,10,{A_Look},S_SPOS_STND2,0,0},
+ {SPR_SPOS,1,10,{A_Look},S_SPOS_STND,0,0},
+ {SPR_SPOS,0,3,{A_Chase},S_SPOS_RUN2,0,0},
+ {SPR_SPOS,0,3,{A_Chase},S_SPOS_RUN3,0,0},
+ {SPR_SPOS,1,3,{A_Chase},S_SPOS_RUN4,0,0},
+ {SPR_SPOS,1,3,{A_Chase},S_SPOS_RUN5,0,0},
+ {SPR_SPOS,2,3,{A_Chase},S_SPOS_RUN6,0,0},
+ {SPR_SPOS,2,3,{A_Chase},S_SPOS_RUN7,0,0},
+ {SPR_SPOS,3,3,{A_Chase},S_SPOS_RUN8,0,0},
+ {SPR_SPOS,3,3,{A_Chase},S_SPOS_RUN1,0,0},
+ {SPR_SPOS,4,10,{A_FaceTarget},S_SPOS_ATK2,0,0},
+ {SPR_SPOS,32773,10,{A_SPosAttack},S_SPOS_ATK3,0,0},
+ {SPR_SPOS,4,10,{NULL},S_SPOS_RUN1,0,0},
+ {SPR_SPOS,6,3,{NULL},S_SPOS_PAIN2,0,0},
+ {SPR_SPOS,6,3,{A_Pain},S_SPOS_RUN1,0,0},
+ {SPR_SPOS,7,5,{NULL},S_SPOS_DIE2,0,0},
+ {SPR_SPOS,8,5,{A_Scream},S_SPOS_DIE3,0,0},
+ {SPR_SPOS,9,5,{A_Fall},S_SPOS_DIE4,0,0},
+ {SPR_SPOS,10,5,{NULL},S_SPOS_DIE5,0,0},
+ {SPR_SPOS,11,-1,{NULL},S_NULL,0,0},
+ {SPR_SPOS,12,5,{NULL},S_SPOS_XDIE2,0,0},
+ {SPR_SPOS,13,5,{A_XScream},S_SPOS_XDIE3,0,0},
+ {SPR_SPOS,14,5,{A_Fall},S_SPOS_XDIE4,0,0},
+ {SPR_SPOS,15,5,{NULL},S_SPOS_XDIE5,0,0},
+ {SPR_SPOS,16,5,{NULL},S_SPOS_XDIE6,0,0},
+ {SPR_SPOS,17,5,{NULL},S_SPOS_XDIE7,0,0},
+ {SPR_SPOS,18,5,{NULL},S_SPOS_XDIE8,0,0},
+ {SPR_SPOS,19,5,{NULL},S_SPOS_XDIE9,0,0},
+ {SPR_SPOS,20,-1,{NULL},S_NULL,0,0},
+ {SPR_SPOS,11,5,{NULL},S_SPOS_RAISE2,0,0},
+ {SPR_SPOS,10,5,{NULL},S_SPOS_RAISE3,0,0},
+ {SPR_SPOS,9,5,{NULL},S_SPOS_RAISE4,0,0},
+ {SPR_SPOS,8,5,{NULL},S_SPOS_RAISE5,0,0},
+ {SPR_SPOS,7,5,{NULL},S_SPOS_RUN1,0,0},
+ {SPR_VILE,0,10,{A_Look},S_VILE_STND2,0,0},
+ {SPR_VILE,1,10,{A_Look},S_VILE_STND,0,0},
+ {SPR_VILE,0,2,{A_VileChase},S_VILE_RUN2,0,0},
+ {SPR_VILE,0,2,{A_VileChase},S_VILE_RUN3,0,0},
+ {SPR_VILE,1,2,{A_VileChase},S_VILE_RUN4,0,0},
+ {SPR_VILE,1,2,{A_VileChase},S_VILE_RUN5,0,0},
+ {SPR_VILE,2,2,{A_VileChase},S_VILE_RUN6,0,0},
+ {SPR_VILE,2,2,{A_VileChase},S_VILE_RUN7,0,0},
+ {SPR_VILE,3,2,{A_VileChase},S_VILE_RUN8,0,0},
+ {SPR_VILE,3,2,{A_VileChase},S_VILE_RUN9,0,0},
+ {SPR_VILE,4,2,{A_VileChase},S_VILE_RUN10,0,0},
+ {SPR_VILE,4,2,{A_VileChase},S_VILE_RUN11,0,0},
+ {SPR_VILE,5,2,{A_VileChase},S_VILE_RUN12,0,0},
+ {SPR_VILE,5,2,{A_VileChase},S_VILE_RUN1,0,0},
+ {SPR_VILE,32774,0,{A_VileStart},S_VILE_ATK2,0,0},
+ {SPR_VILE,32774,10,{A_FaceTarget},S_VILE_ATK3,0,0},
+ {SPR_VILE,32775,8,{A_VileTarget},S_VILE_ATK4,0,0},
+ {SPR_VILE,32776,8,{A_FaceTarget},S_VILE_ATK5,0,0},
+ {SPR_VILE,32777,8,{A_FaceTarget},S_VILE_ATK6,0,0},
+ {SPR_VILE,32778,8,{A_FaceTarget},S_VILE_ATK7,0,0},
+ {SPR_VILE,32779,8,{A_FaceTarget},S_VILE_ATK8,0,0},
+ {SPR_VILE,32780,8,{A_FaceTarget},S_VILE_ATK9,0,0},
+ {SPR_VILE,32781,8,{A_FaceTarget},S_VILE_ATK10,0,0},
+ {SPR_VILE,32782,8,{A_VileAttack},S_VILE_ATK11,0,0},
+ {SPR_VILE,32783,20,{NULL},S_VILE_RUN1,0,0},
+ {SPR_VILE,32794,10,{NULL},S_VILE_HEAL2,0,0},
+ {SPR_VILE,32795,10,{NULL},S_VILE_HEAL3,0,0},
+ {SPR_VILE,32796,10,{NULL},S_VILE_RUN1,0,0},
+ {SPR_VILE,16,5,{NULL},S_VILE_PAIN2,0,0},
+ {SPR_VILE,16,5,{A_Pain},S_VILE_RUN1,0,0},
+ {SPR_VILE,16,7,{NULL},S_VILE_DIE2,0,0},
+ {SPR_VILE,17,7,{A_Scream},S_VILE_DIE3,0,0},
+ {SPR_VILE,18,7,{A_Fall},S_VILE_DIE4,0,0},
+ {SPR_VILE,19,7,{NULL},S_VILE_DIE5,0,0},
+ {SPR_VILE,20,7,{NULL},S_VILE_DIE6,0,0},
+ {SPR_VILE,21,7,{NULL},S_VILE_DIE7,0,0},
+ {SPR_VILE,22,7,{NULL},S_VILE_DIE8,0,0},
+ {SPR_VILE,23,5,{NULL},S_VILE_DIE9,0,0},
+ {SPR_VILE,24,5,{NULL},S_VILE_DIE10,0,0},
+ {SPR_VILE,25,-1,{NULL},S_NULL,0,0},
+ {SPR_FIRE,32768,2,{A_StartFire},S_FIRE2,0,0},
+ {SPR_FIRE,32769,2,{A_Fire},S_FIRE3,0,0},
+ {SPR_FIRE,32768,2,{A_Fire},S_FIRE4,0,0},
+ {SPR_FIRE,32769,2,{A_Fire},S_FIRE5,0,0},
+ {SPR_FIRE,32770,2,{A_FireCrackle},S_FIRE6,0,0},
+ {SPR_FIRE,32769,2,{A_Fire},S_FIRE7,0,0},
+ {SPR_FIRE,32770,2,{A_Fire},S_FIRE8,0,0},
+ {SPR_FIRE,32769,2,{A_Fire},S_FIRE9,0,0},
+ {SPR_FIRE,32770,2,{A_Fire},S_FIRE10,0,0},
+ {SPR_FIRE,32771,2,{A_Fire},S_FIRE11,0,0},
+ {SPR_FIRE,32770,2,{A_Fire},S_FIRE12,0,0},
+ {SPR_FIRE,32771,2,{A_Fire},S_FIRE13,0,0},
+ {SPR_FIRE,32770,2,{A_Fire},S_FIRE14,0,0},
+ {SPR_FIRE,32771,2,{A_Fire},S_FIRE15,0,0},
+ {SPR_FIRE,32772,2,{A_Fire},S_FIRE16,0,0},
+ {SPR_FIRE,32771,2,{A_Fire},S_FIRE17,0,0},
+ {SPR_FIRE,32772,2,{A_Fire},S_FIRE18,0,0},
+ {SPR_FIRE,32771,2,{A_Fire},S_FIRE19,0,0},
+ {SPR_FIRE,32772,2,{A_FireCrackle},S_FIRE20,0,0},
+ {SPR_FIRE,32773,2,{A_Fire},S_FIRE21,0,0},
+ {SPR_FIRE,32772,2,{A_Fire},S_FIRE22,0,0},
+ {SPR_FIRE,32773,2,{A_Fire},S_FIRE23,0,0},
+ {SPR_FIRE,32772,2,{A_Fire},S_FIRE24,0,0},
+ {SPR_FIRE,32773,2,{A_Fire},S_FIRE25,0,0},
+ {SPR_FIRE,32774,2,{A_Fire},S_FIRE26,0,0},
+ {SPR_FIRE,32775,2,{A_Fire},S_FIRE27,0,0},
+ {SPR_FIRE,32774,2,{A_Fire},S_FIRE28,0,0},
+ {SPR_FIRE,32775,2,{A_Fire},S_FIRE29,0,0},
+ {SPR_FIRE,32774,2,{A_Fire},S_FIRE30,0,0},
+ {SPR_FIRE,32775,2,{A_Fire},S_NULL,0,0},
+ {SPR_PUFF,1,4,{NULL},S_SMOKE2,0,0},
+ {SPR_PUFF,2,4,{NULL},S_SMOKE3,0,0},
+ {SPR_PUFF,1,4,{NULL},S_SMOKE4,0,0},
+ {SPR_PUFF,2,4,{NULL},S_SMOKE5,0,0},
+ {SPR_PUFF,3,4,{NULL},S_NULL,0,0},
+ {SPR_FATB,32768,2,{A_Tracer},S_TRACER2,0,0},
+ {SPR_FATB,32769,2,{A_Tracer},S_TRACER,0,0},
+ {SPR_FBXP,32768,8,{NULL},S_TRACEEXP2,0,0},
+ {SPR_FBXP,32769,6,{NULL},S_TRACEEXP3,0,0},
+ {SPR_FBXP,32770,4,{NULL},S_NULL,0,0},
+ {SPR_SKEL,0,10,{A_Look},S_SKEL_STND2,0,0},
+ {SPR_SKEL,1,10,{A_Look},S_SKEL_STND,0,0},
+ {SPR_SKEL,0,2,{A_Chase},S_SKEL_RUN2,0,0},
+ {SPR_SKEL,0,2,{A_Chase},S_SKEL_RUN3,0,0},
+ {SPR_SKEL,1,2,{A_Chase},S_SKEL_RUN4,0,0},
+ {SPR_SKEL,1,2,{A_Chase},S_SKEL_RUN5,0,0},
+ {SPR_SKEL,2,2,{A_Chase},S_SKEL_RUN6,0,0},
+ {SPR_SKEL,2,2,{A_Chase},S_SKEL_RUN7,0,0},
+ {SPR_SKEL,3,2,{A_Chase},S_SKEL_RUN8,0,0},
+ {SPR_SKEL,3,2,{A_Chase},S_SKEL_RUN9,0,0},
+ {SPR_SKEL,4,2,{A_Chase},S_SKEL_RUN10,0,0},
+ {SPR_SKEL,4,2,{A_Chase},S_SKEL_RUN11,0,0},
+ {SPR_SKEL,5,2,{A_Chase},S_SKEL_RUN12,0,0},
+ {SPR_SKEL,5,2,{A_Chase},S_SKEL_RUN1,0,0},
+ {SPR_SKEL,6,0,{A_FaceTarget},S_SKEL_FIST2,0,0},
+ {SPR_SKEL,6,6,{A_SkelWhoosh},S_SKEL_FIST3,0,0},
+ {SPR_SKEL,7,6,{A_FaceTarget},S_SKEL_FIST4,0,0},
+ {SPR_SKEL,8,6,{A_SkelFist},S_SKEL_RUN1,0,0},
+ {SPR_SKEL,32777,0,{A_FaceTarget},S_SKEL_MISS2,0,0},
+ {SPR_SKEL,32777,10,{A_FaceTarget},S_SKEL_MISS3,0,0},
+ {SPR_SKEL,10,10,{A_SkelMissile},S_SKEL_MISS4,0,0},
+ {SPR_SKEL,10,10,{A_FaceTarget},S_SKEL_RUN1,0,0},
+ {SPR_SKEL,11,5,{NULL},S_SKEL_PAIN2,0,0},
+ {SPR_SKEL,11,5,{A_Pain},S_SKEL_RUN1,0,0},
+ {SPR_SKEL,11,7,{NULL},S_SKEL_DIE2,0,0},
+ {SPR_SKEL,12,7,{NULL},S_SKEL_DIE3,0,0},
+ {SPR_SKEL,13,7,{A_Scream},S_SKEL_DIE4,0,0},
+ {SPR_SKEL,14,7,{A_Fall},S_SKEL_DIE5,0,0},
+ {SPR_SKEL,15,7,{NULL},S_SKEL_DIE6,0,0},
+ {SPR_SKEL,16,-1,{NULL},S_NULL,0,0},
+ {SPR_SKEL,16,5,{NULL},S_SKEL_RAISE2,0,0},
+ {SPR_SKEL,15,5,{NULL},S_SKEL_RAISE3,0,0},
+ {SPR_SKEL,14,5,{NULL},S_SKEL_RAISE4,0,0},
+ {SPR_SKEL,13,5,{NULL},S_SKEL_RAISE5,0,0},
+ {SPR_SKEL,12,5,{NULL},S_SKEL_RAISE6,0,0},
+ {SPR_SKEL,11,5,{NULL},S_SKEL_RUN1,0,0},
+ {SPR_MANF,32768,4,{NULL},S_FATSHOT2,0,0},
+ {SPR_MANF,32769,4,{NULL},S_FATSHOT1,0,0},
+ {SPR_MISL,32769,8,{NULL},S_FATSHOTX2,0,0},
+ {SPR_MISL,32770,6,{NULL},S_FATSHOTX3,0,0},
+ {SPR_MISL,32771,4,{NULL},S_NULL,0,0},
+ {SPR_FATT,0,15,{A_Look},S_FATT_STND2,0,0},
+ {SPR_FATT,1,15,{A_Look},S_FATT_STND,0,0},
+ {SPR_FATT,0,4,{A_Chase},S_FATT_RUN2,0,0},
+ {SPR_FATT,0,4,{A_Chase},S_FATT_RUN3,0,0},
+ {SPR_FATT,1,4,{A_Chase},S_FATT_RUN4,0,0},
+ {SPR_FATT,1,4,{A_Chase},S_FATT_RUN5,0,0},
+ {SPR_FATT,2,4,{A_Chase},S_FATT_RUN6,0,0},
+ {SPR_FATT,2,4,{A_Chase},S_FATT_RUN7,0,0},
+ {SPR_FATT,3,4,{A_Chase},S_FATT_RUN8,0,0},
+ {SPR_FATT,3,4,{A_Chase},S_FATT_RUN9,0,0},
+ {SPR_FATT,4,4,{A_Chase},S_FATT_RUN10,0,0},
+ {SPR_FATT,4,4,{A_Chase},S_FATT_RUN11,0,0},
+ {SPR_FATT,5,4,{A_Chase},S_FATT_RUN12,0,0},
+ {SPR_FATT,5,4,{A_Chase},S_FATT_RUN1,0,0},
+ {SPR_FATT,6,20,{A_FatRaise},S_FATT_ATK2,0,0},
+ {SPR_FATT,32775,10,{A_FatAttack1},S_FATT_ATK3,0,0},
+ {SPR_FATT,8,5,{A_FaceTarget},S_FATT_ATK4,0,0},
+ {SPR_FATT,6,5,{A_FaceTarget},S_FATT_ATK5,0,0},
+ {SPR_FATT,32775,10,{A_FatAttack2},S_FATT_ATK6,0,0},
+ {SPR_FATT,8,5,{A_FaceTarget},S_FATT_ATK7,0,0},
+ {SPR_FATT,6,5,{A_FaceTarget},S_FATT_ATK8,0,0},
+ {SPR_FATT,32775,10,{A_FatAttack3},S_FATT_ATK9,0,0},
+ {SPR_FATT,8,5,{A_FaceTarget},S_FATT_ATK10,0,0},
+ {SPR_FATT,6,5,{A_FaceTarget},S_FATT_RUN1,0,0},
+ {SPR_FATT,9,3,{NULL},S_FATT_PAIN2,0,0},
+ {SPR_FATT,9,3,{A_Pain},S_FATT_RUN1,0,0},
+ {SPR_FATT,10,6,{NULL},S_FATT_DIE2,0,0},
+ {SPR_FATT,11,6,{A_Scream},S_FATT_DIE3,0,0},
+ {SPR_FATT,12,6,{A_Fall},S_FATT_DIE4,0,0},
+ {SPR_FATT,13,6,{NULL},S_FATT_DIE5,0,0},
+ {SPR_FATT,14,6,{NULL},S_FATT_DIE6,0,0},
+ {SPR_FATT,15,6,{NULL},S_FATT_DIE7,0,0},
+ {SPR_FATT,16,6,{NULL},S_FATT_DIE8,0,0},
+ {SPR_FATT,17,6,{NULL},S_FATT_DIE9,0,0},
+ {SPR_FATT,18,6,{NULL},S_FATT_DIE10,0,0},
+ {SPR_FATT,19,-1,{A_BossDeath},S_NULL,0,0},
+ {SPR_FATT,17,5,{NULL},S_FATT_RAISE2,0,0},
+ {SPR_FATT,16,5,{NULL},S_FATT_RAISE3,0,0},
+ {SPR_FATT,15,5,{NULL},S_FATT_RAISE4,0,0},
+ {SPR_FATT,14,5,{NULL},S_FATT_RAISE5,0,0},
+ {SPR_FATT,13,5,{NULL},S_FATT_RAISE6,0,0},
+ {SPR_FATT,12,5,{NULL},S_FATT_RAISE7,0,0},
+ {SPR_FATT,11,5,{NULL},S_FATT_RAISE8,0,0},
+ {SPR_FATT,10,5,{NULL},S_FATT_RUN1,0,0},
+ {SPR_CPOS,0,10,{A_Look},S_CPOS_STND2,0,0},
+ {SPR_CPOS,1,10,{A_Look},S_CPOS_STND,0,0},
+ {SPR_CPOS,0,3,{A_Chase},S_CPOS_RUN2,0,0},
+ {SPR_CPOS,0,3,{A_Chase},S_CPOS_RUN3,0,0},
+ {SPR_CPOS,1,3,{A_Chase},S_CPOS_RUN4,0,0},
+ {SPR_CPOS,1,3,{A_Chase},S_CPOS_RUN5,0,0},
+ {SPR_CPOS,2,3,{A_Chase},S_CPOS_RUN6,0,0},
+ {SPR_CPOS,2,3,{A_Chase},S_CPOS_RUN7,0,0},
+ {SPR_CPOS,3,3,{A_Chase},S_CPOS_RUN8,0,0},
+ {SPR_CPOS,3,3,{A_Chase},S_CPOS_RUN1,0,0},
+ {SPR_CPOS,4,10,{A_FaceTarget},S_CPOS_ATK2,0,0},
+ {SPR_CPOS,32773,4,{A_CPosAttack},S_CPOS_ATK3,0,0},
+ {SPR_CPOS,32772,4,{A_CPosAttack},S_CPOS_ATK4,0,0},
+ {SPR_CPOS,5,1,{A_CPosRefire},S_CPOS_ATK2,0,0},
+ {SPR_CPOS,6,3,{NULL},S_CPOS_PAIN2,0,0},
+ {SPR_CPOS,6,3,{A_Pain},S_CPOS_RUN1,0,0},
+ {SPR_CPOS,7,5,{NULL},S_CPOS_DIE2,0,0},
+ {SPR_CPOS,8,5,{A_Scream},S_CPOS_DIE3,0,0},
+ {SPR_CPOS,9,5,{A_Fall},S_CPOS_DIE4,0,0},
+ {SPR_CPOS,10,5,{NULL},S_CPOS_DIE5,0,0},
+ {SPR_CPOS,11,5,{NULL},S_CPOS_DIE6,0,0},
+ {SPR_CPOS,12,5,{NULL},S_CPOS_DIE7,0,0},
+ {SPR_CPOS,13,-1,{NULL},S_NULL,0,0},
+ {SPR_CPOS,14,5,{NULL},S_CPOS_XDIE2,0,0},
+ {SPR_CPOS,15,5,{A_XScream},S_CPOS_XDIE3,0,0},
+ {SPR_CPOS,16,5,{A_Fall},S_CPOS_XDIE4,0,0},
+ {SPR_CPOS,17,5,{NULL},S_CPOS_XDIE5,0,0},
+ {SPR_CPOS,18,5,{NULL},S_CPOS_XDIE6,0,0},
+ {SPR_CPOS,19,-1,{NULL},S_NULL,0,0},
+ {SPR_CPOS,13,5,{NULL},S_CPOS_RAISE2,0,0},
+ {SPR_CPOS,12,5,{NULL},S_CPOS_RAISE3,0,0},
+ {SPR_CPOS,11,5,{NULL},S_CPOS_RAISE4,0,0},
+ {SPR_CPOS,10,5,{NULL},S_CPOS_RAISE5,0,0},
+ {SPR_CPOS,9,5,{NULL},S_CPOS_RAISE6,0,0},
+ {SPR_CPOS,8,5,{NULL},S_CPOS_RAISE7,0,0},
+ {SPR_CPOS,7,5,{NULL},S_CPOS_RUN1,0,0},
+ {SPR_TROO,0,10,{A_Look},S_TROO_STND2,0,0},
+ {SPR_TROO,1,10,{A_Look},S_TROO_STND,0,0},
+ {SPR_TROO,0,3,{A_Chase},S_TROO_RUN2,0,0},
+ {SPR_TROO,0,3,{A_Chase},S_TROO_RUN3,0,0},
+ {SPR_TROO,1,3,{A_Chase},S_TROO_RUN4,0,0},
+ {SPR_TROO,1,3,{A_Chase},S_TROO_RUN5,0,0},
+ {SPR_TROO,2,3,{A_Chase},S_TROO_RUN6,0,0},
+ {SPR_TROO,2,3,{A_Chase},S_TROO_RUN7,0,0},
+ {SPR_TROO,3,3,{A_Chase},S_TROO_RUN8,0,0},
+ {SPR_TROO,3,3,{A_Chase},S_TROO_RUN1,0,0},
+ {SPR_TROO,4,8,{A_FaceTarget},S_TROO_ATK2,0,0},
+ {SPR_TROO,5,8,{A_FaceTarget},S_TROO_ATK3,0,0},
+ {SPR_TROO,6,6,{A_TroopAttack},S_TROO_RUN1,0,0},
+ {SPR_TROO,7,2,{NULL},S_TROO_PAIN2,0,0},
+ {SPR_TROO,7,2,{A_Pain},S_TROO_RUN1,0,0},
+ {SPR_TROO,8,8,{NULL},S_TROO_DIE2,0,0},
+ {SPR_TROO,9,8,{A_Scream},S_TROO_DIE3,0,0},
+ {SPR_TROO,10,6,{NULL},S_TROO_DIE4,0,0},
+ {SPR_TROO,11,6,{A_Fall},S_TROO_DIE5,0,0},
+ {SPR_TROO,12,-1,{NULL},S_NULL,0,0},
+ {SPR_TROO,13,5,{NULL},S_TROO_XDIE2,0,0},
+ {SPR_TROO,14,5,{A_XScream},S_TROO_XDIE3,0,0},
+ {SPR_TROO,15,5,{NULL},S_TROO_XDIE4,0,0},
+ {SPR_TROO,16,5,{A_Fall},S_TROO_XDIE5,0,0},
+ {SPR_TROO,17,5,{NULL},S_TROO_XDIE6,0,0},
+ {SPR_TROO,18,5,{NULL},S_TROO_XDIE7,0,0},
+ {SPR_TROO,19,5,{NULL},S_TROO_XDIE8,0,0},
+ {SPR_TROO,20,-1,{NULL},S_NULL,0,0},
+ {SPR_TROO,12,8,{NULL},S_TROO_RAISE2,0,0},
+ {SPR_TROO,11,8,{NULL},S_TROO_RAISE3,0,0},
+ {SPR_TROO,10,6,{NULL},S_TROO_RAISE4,0,0},
+ {SPR_TROO,9,6,{NULL},S_TROO_RAISE5,0,0},
+ {SPR_TROO,8,6,{NULL},S_TROO_RUN1,0,0},
+ {SPR_SARG,0,10,{A_Look},S_SARG_STND2,0,0},
+ {SPR_SARG,1,10,{A_Look},S_SARG_STND,0,0},
+ {SPR_SARG,0,2,{A_Chase},S_SARG_RUN2,0,0},
+ {SPR_SARG,0,2,{A_Chase},S_SARG_RUN3,0,0},
+ {SPR_SARG,1,2,{A_Chase},S_SARG_RUN4,0,0},
+ {SPR_SARG,1,2,{A_Chase},S_SARG_RUN5,0,0},
+ {SPR_SARG,2,2,{A_Chase},S_SARG_RUN6,0,0},
+ {SPR_SARG,2,2,{A_Chase},S_SARG_RUN7,0,0},
+ {SPR_SARG,3,2,{A_Chase},S_SARG_RUN8,0,0},
+ {SPR_SARG,3,2,{A_Chase},S_SARG_RUN1,0,0},
+ {SPR_SARG,4,8,{A_FaceTarget},S_SARG_ATK2,0,0},
+ {SPR_SARG,5,8,{A_FaceTarget},S_SARG_ATK3,0,0},
+ {SPR_SARG,6,8,{A_SargAttack},S_SARG_RUN1,0,0},
+ {SPR_SARG,7,2,{NULL},S_SARG_PAIN2,0,0},
+ {SPR_SARG,7,2,{A_Pain},S_SARG_RUN1,0,0},
+ {SPR_SARG,8,8,{NULL},S_SARG_DIE2,0,0},
+ {SPR_SARG,9,8,{A_Scream},S_SARG_DIE3,0,0},
+ {SPR_SARG,10,4,{NULL},S_SARG_DIE4,0,0},
+ {SPR_SARG,11,4,{A_Fall},S_SARG_DIE5,0,0},
+ {SPR_SARG,12,4,{NULL},S_SARG_DIE6,0,0},
+ {SPR_SARG,13,-1,{NULL},S_NULL,0,0},
+ {SPR_SARG,13,5,{NULL},S_SARG_RAISE2,0,0},
+ {SPR_SARG,12,5,{NULL},S_SARG_RAISE3,0,0},
+ {SPR_SARG,11,5,{NULL},S_SARG_RAISE4,0,0},
+ {SPR_SARG,10,5,{NULL},S_SARG_RAISE5,0,0},
+ {SPR_SARG,9,5,{NULL},S_SARG_RAISE6,0,0},
+ {SPR_SARG,8,5,{NULL},S_SARG_RUN1,0,0},
+ {SPR_HEAD,0,10,{A_Look},S_HEAD_STND,0,0},
+ {SPR_HEAD,0,3,{A_Chase},S_HEAD_RUN1,0,0},
+ {SPR_HEAD,1,5,{A_FaceTarget},S_HEAD_ATK2,0,0},
+ {SPR_HEAD,2,5,{A_FaceTarget},S_HEAD_ATK3,0,0},
+ {SPR_HEAD,32771,5,{A_HeadAttack},S_HEAD_RUN1,0,0},
+ {SPR_HEAD,4,3,{NULL},S_HEAD_PAIN2,0,0},
+ {SPR_HEAD,4,3,{A_Pain},S_HEAD_PAIN3,0,0},
+ {SPR_HEAD,5,6,{NULL},S_HEAD_RUN1,0,0},
+ {SPR_HEAD,6,8,{NULL},S_HEAD_DIE2,0,0},
+ {SPR_HEAD,7,8,{A_Scream},S_HEAD_DIE3,0,0},
+ {SPR_HEAD,8,8,{NULL},S_HEAD_DIE4,0,0},
+ {SPR_HEAD,9,8,{NULL},S_HEAD_DIE5,0,0},
+ {SPR_HEAD,10,8,{A_Fall},S_HEAD_DIE6,0,0},
+ {SPR_HEAD,11,-1,{NULL},S_NULL,0,0},
+ {SPR_HEAD,11,8,{NULL},S_HEAD_RAISE2,0,0},
+ {SPR_HEAD,10,8,{NULL},S_HEAD_RAISE3,0,0},
+ {SPR_HEAD,9,8,{NULL},S_HEAD_RAISE4,0,0},
+ {SPR_HEAD,8,8,{NULL},S_HEAD_RAISE5,0,0},
+ {SPR_HEAD,7,8,{NULL},S_HEAD_RAISE6,0,0},
+ {SPR_HEAD,6,8,{NULL},S_HEAD_RUN1,0,0},
+ {SPR_BAL7,32768,4,{NULL},S_BRBALL2,0,0},
+ {SPR_BAL7,32769,4,{NULL},S_BRBALL1,0,0},
+ {SPR_BAL7,32770,6,{NULL},S_BRBALLX2,0,0},
+ {SPR_BAL7,32771,6,{NULL},S_BRBALLX3,0,0},
+ {SPR_BAL7,32772,6,{NULL},S_NULL,0,0},
+ {SPR_BOSS,0,10,{A_Look},S_BOSS_STND2,0,0},
+ {SPR_BOSS,1,10,{A_Look},S_BOSS_STND,0,0},
+ {SPR_BOSS,0,3,{A_Chase},S_BOSS_RUN2,0,0},
+ {SPR_BOSS,0,3,{A_Chase},S_BOSS_RUN3,0,0},
+ {SPR_BOSS,1,3,{A_Chase},S_BOSS_RUN4,0,0},
+ {SPR_BOSS,1,3,{A_Chase},S_BOSS_RUN5,0,0},
+ {SPR_BOSS,2,3,{A_Chase},S_BOSS_RUN6,0,0},
+ {SPR_BOSS,2,3,{A_Chase},S_BOSS_RUN7,0,0},
+ {SPR_BOSS,3,3,{A_Chase},S_BOSS_RUN8,0,0},
+ {SPR_BOSS,3,3,{A_Chase},S_BOSS_RUN1,0,0},
+ {SPR_BOSS,4,8,{A_FaceTarget},S_BOSS_ATK2,0,0},
+ {SPR_BOSS,5,8,{A_FaceTarget},S_BOSS_ATK3,0,0},
+ {SPR_BOSS,6,8,{A_BruisAttack},S_BOSS_RUN1,0,0},
+ {SPR_BOSS,7,2,{NULL},S_BOSS_PAIN2,0,0},
+ {SPR_BOSS,7,2,{A_Pain},S_BOSS_RUN1,0,0},
+ {SPR_BOSS,8,8,{NULL},S_BOSS_DIE2,0,0},
+ {SPR_BOSS,9,8,{A_Scream},S_BOSS_DIE3,0,0},
+ {SPR_BOSS,10,8,{NULL},S_BOSS_DIE4,0,0},
+ {SPR_BOSS,11,8,{A_Fall},S_BOSS_DIE5,0,0},
+ {SPR_BOSS,12,8,{NULL},S_BOSS_DIE6,0,0},
+ {SPR_BOSS,13,8,{NULL},S_BOSS_DIE7,0,0},
+ {SPR_BOSS,14,-1,{A_BossDeath},S_NULL,0,0},
+ {SPR_BOSS,14,8,{NULL},S_BOSS_RAISE2,0,0},
+ {SPR_BOSS,13,8,{NULL},S_BOSS_RAISE3,0,0},
+ {SPR_BOSS,12,8,{NULL},S_BOSS_RAISE4,0,0},
+ {SPR_BOSS,11,8,{NULL},S_BOSS_RAISE5,0,0},
+ {SPR_BOSS,10,8,{NULL},S_BOSS_RAISE6,0,0},
+ {SPR_BOSS,9,8,{NULL},S_BOSS_RAISE7,0,0},
+ {SPR_BOSS,8,8,{NULL},S_BOSS_RUN1,0,0},
+ {SPR_BOS2,0,10,{A_Look},S_BOS2_STND2,0,0},
+ {SPR_BOS2,1,10,{A_Look},S_BOS2_STND,0,0},
+ {SPR_BOS2,0,3,{A_Chase},S_BOS2_RUN2,0,0},
+ {SPR_BOS2,0,3,{A_Chase},S_BOS2_RUN3,0,0},
+ {SPR_BOS2,1,3,{A_Chase},S_BOS2_RUN4,0,0},
+ {SPR_BOS2,1,3,{A_Chase},S_BOS2_RUN5,0,0},
+ {SPR_BOS2,2,3,{A_Chase},S_BOS2_RUN6,0,0},
+ {SPR_BOS2,2,3,{A_Chase},S_BOS2_RUN7,0,0},
+ {SPR_BOS2,3,3,{A_Chase},S_BOS2_RUN8,0,0},
+ {SPR_BOS2,3,3,{A_Chase},S_BOS2_RUN1,0,0},
+ {SPR_BOS2,4,8,{A_FaceTarget},S_BOS2_ATK2,0,0},
+ {SPR_BOS2,5,8,{A_FaceTarget},S_BOS2_ATK3,0,0},
+ {SPR_BOS2,6,8,{A_BruisAttack},S_BOS2_RUN1,0,0},
+ {SPR_BOS2,7,2,{NULL},S_BOS2_PAIN2,0,0},
+ {SPR_BOS2,7,2,{A_Pain},S_BOS2_RUN1,0,0},
+ {SPR_BOS2,8,8,{NULL},S_BOS2_DIE2,0,0},
+ {SPR_BOS2,9,8,{A_Scream},S_BOS2_DIE3,0,0},
+ {SPR_BOS2,10,8,{NULL},S_BOS2_DIE4,0,0},
+ {SPR_BOS2,11,8,{A_Fall},S_BOS2_DIE5,0,0},
+ {SPR_BOS2,12,8,{NULL},S_BOS2_DIE6,0,0},
+ {SPR_BOS2,13,8,{NULL},S_BOS2_DIE7,0,0},
+ {SPR_BOS2,14,-1,{NULL},S_NULL,0,0},
+ {SPR_BOS2,14,8,{NULL},S_BOS2_RAISE2,0,0},
+ {SPR_BOS2,13,8,{NULL},S_BOS2_RAISE3,0,0},
+ {SPR_BOS2,12,8,{NULL},S_BOS2_RAISE4,0,0},
+ {SPR_BOS2,11,8,{NULL},S_BOS2_RAISE5,0,0},
+ {SPR_BOS2,10,8,{NULL},S_BOS2_RAISE6,0,0},
+ {SPR_BOS2,9,8,{NULL},S_BOS2_RAISE7,0,0},
+ {SPR_BOS2,8,8,{NULL},S_BOS2_RUN1,0,0},
+ {SPR_SKUL,32768,10,{A_Look},S_SKULL_STND2,0,0},
+ {SPR_SKUL,32769,10,{A_Look},S_SKULL_STND,0,0},
+ {SPR_SKUL,32768,6,{A_Chase},S_SKULL_RUN2,0,0},
+ {SPR_SKUL,32769,6,{A_Chase},S_SKULL_RUN1,0,0},
+ {SPR_SKUL,32770,10,{A_FaceTarget},S_SKULL_ATK2,0,0},
+ {SPR_SKUL,32771,4,{A_SkullAttack},S_SKULL_ATK3,0,0},
+ {SPR_SKUL,32770,4,{NULL},S_SKULL_ATK4,0,0},
+ {SPR_SKUL,32771,4,{NULL},S_SKULL_ATK3,0,0},
+ {SPR_SKUL,32772,3,{NULL},S_SKULL_PAIN2,0,0},
+ {SPR_SKUL,32772,3,{A_Pain},S_SKULL_RUN1,0,0},
+ {SPR_SKUL,32773,6,{NULL},S_SKULL_DIE2,0,0},
+ {SPR_SKUL,32774,6,{A_Scream},S_SKULL_DIE3,0,0},
+ {SPR_SKUL,32775,6,{NULL},S_SKULL_DIE4,0,0},
+ {SPR_SKUL,32776,6,{A_Fall},S_SKULL_DIE5,0,0},
+ {SPR_SKUL,9,6,{NULL},S_SKULL_DIE6,0,0},
+ {SPR_SKUL,10,6,{NULL},S_NULL,0,0},
+ {SPR_SPID,0,10,{A_Look},S_SPID_STND2,0,0},
+ {SPR_SPID,1,10,{A_Look},S_SPID_STND,0,0},
+ {SPR_SPID,0,3,{A_Metal},S_SPID_RUN2,0,0},
+ {SPR_SPID,0,3,{A_Chase},S_SPID_RUN3,0,0},
+ {SPR_SPID,1,3,{A_Chase},S_SPID_RUN4,0,0},
+ {SPR_SPID,1,3,{A_Chase},S_SPID_RUN5,0,0},
+ {SPR_SPID,2,3,{A_Metal},S_SPID_RUN6,0,0},
+ {SPR_SPID,2,3,{A_Chase},S_SPID_RUN7,0,0},
+ {SPR_SPID,3,3,{A_Chase},S_SPID_RUN8,0,0},
+ {SPR_SPID,3,3,{A_Chase},S_SPID_RUN9,0,0},
+ {SPR_SPID,4,3,{A_Metal},S_SPID_RUN10,0,0},
+ {SPR_SPID,4,3,{A_Chase},S_SPID_RUN11,0,0},
+ {SPR_SPID,5,3,{A_Chase},S_SPID_RUN12,0,0},
+ {SPR_SPID,5,3,{A_Chase},S_SPID_RUN1,0,0},
+ {SPR_SPID,32768,20,{A_FaceTarget},S_SPID_ATK2,0,0},
+ {SPR_SPID,32774,4,{A_SPosAttack},S_SPID_ATK3,0,0},
+ {SPR_SPID,32775,4,{A_SPosAttack},S_SPID_ATK4,0,0},
+ {SPR_SPID,32775,1,{A_SpidRefire},S_SPID_ATK2,0,0},
+ {SPR_SPID,8,3,{NULL},S_SPID_PAIN2,0,0},
+ {SPR_SPID,8,3,{A_Pain},S_SPID_RUN1,0,0},
+ {SPR_SPID,9,20,{A_Scream},S_SPID_DIE2,0,0},
+ {SPR_SPID,10,10,{A_Fall},S_SPID_DIE3,0,0},
+ {SPR_SPID,11,10,{NULL},S_SPID_DIE4,0,0},
+ {SPR_SPID,12,10,{NULL},S_SPID_DIE5,0,0},
+ {SPR_SPID,13,10,{NULL},S_SPID_DIE6,0,0},
+ {SPR_SPID,14,10,{NULL},S_SPID_DIE7,0,0},
+ {SPR_SPID,15,10,{NULL},S_SPID_DIE8,0,0},
+ {SPR_SPID,16,10,{NULL},S_SPID_DIE9,0,0},
+ {SPR_SPID,17,10,{NULL},S_SPID_DIE10,0,0},
+ {SPR_SPID,18,30,{NULL},S_SPID_DIE11,0,0},
+ {SPR_SPID,18,-1,{A_BossDeath},S_NULL,0,0},
+ {SPR_BSPI,0,10,{A_Look},S_BSPI_STND2,0,0},
+ {SPR_BSPI,1,10,{A_Look},S_BSPI_STND,0,0},
+ {SPR_BSPI,0,20,{NULL},S_BSPI_RUN1,0,0},
+ {SPR_BSPI,0,3,{A_BabyMetal},S_BSPI_RUN2,0,0},
+ {SPR_BSPI,0,3,{A_Chase},S_BSPI_RUN3,0,0},
+ {SPR_BSPI,1,3,{A_Chase},S_BSPI_RUN4,0,0},
+ {SPR_BSPI,1,3,{A_Chase},S_BSPI_RUN5,0,0},
+ {SPR_BSPI,2,3,{A_Chase},S_BSPI_RUN6,0,0},
+ {SPR_BSPI,2,3,{A_Chase},S_BSPI_RUN7,0,0},
+ {SPR_BSPI,3,3,{A_BabyMetal},S_BSPI_RUN8,0,0},
+ {SPR_BSPI,3,3,{A_Chase},S_BSPI_RUN9,0,0},
+ {SPR_BSPI,4,3,{A_Chase},S_BSPI_RUN10,0,0},
+ {SPR_BSPI,4,3,{A_Chase},S_BSPI_RUN11,0,0},
+ {SPR_BSPI,5,3,{A_Chase},S_BSPI_RUN12,0,0},
+ {SPR_BSPI,5,3,{A_Chase},S_BSPI_RUN1,0,0},
+ {SPR_BSPI,32768,20,{A_FaceTarget},S_BSPI_ATK2,0,0},
+ {SPR_BSPI,32774,4,{A_BspiAttack},S_BSPI_ATK3,0,0},
+ {SPR_BSPI,32775,4,{NULL},S_BSPI_ATK4,0,0},
+ {SPR_BSPI,32775,1,{A_SpidRefire},S_BSPI_ATK2,0,0},
+ {SPR_BSPI,8,3,{NULL},S_BSPI_PAIN2,0,0},
+ {SPR_BSPI,8,3,{A_Pain},S_BSPI_RUN1,0,0},
+ {SPR_BSPI,9,20,{A_Scream},S_BSPI_DIE2,0,0},
+ {SPR_BSPI,10,7,{A_Fall},S_BSPI_DIE3,0,0},
+ {SPR_BSPI,11,7,{NULL},S_BSPI_DIE4,0,0},
+ {SPR_BSPI,12,7,{NULL},S_BSPI_DIE5,0,0},
+ {SPR_BSPI,13,7,{NULL},S_BSPI_DIE6,0,0},
+ {SPR_BSPI,14,7,{NULL},S_BSPI_DIE7,0,0},
+ {SPR_BSPI,15,-1,{A_BossDeath},S_NULL,0,0},
+ {SPR_BSPI,15,5,{NULL},S_BSPI_RAISE2,0,0},
+ {SPR_BSPI,14,5,{NULL},S_BSPI_RAISE3,0,0},
+ {SPR_BSPI,13,5,{NULL},S_BSPI_RAISE4,0,0},
+ {SPR_BSPI,12,5,{NULL},S_BSPI_RAISE5,0,0},
+ {SPR_BSPI,11,5,{NULL},S_BSPI_RAISE6,0,0},
+ {SPR_BSPI,10,5,{NULL},S_BSPI_RAISE7,0,0},
+ {SPR_BSPI,9,5,{NULL},S_BSPI_RUN1,0,0},
+ {SPR_APLS,32768,5,{NULL},S_ARACH_PLAZ2,0,0},
+ {SPR_APLS,32769,5,{NULL},S_ARACH_PLAZ,0,0},
+ {SPR_APBX,32768,5,{NULL},S_ARACH_PLEX2,0,0},
+ {SPR_APBX,32769,5,{NULL},S_ARACH_PLEX3,0,0},
+ {SPR_APBX,32770,5,{NULL},S_ARACH_PLEX4,0,0},
+ {SPR_APBX,32771,5,{NULL},S_ARACH_PLEX5,0,0},
+ {SPR_APBX,32772,5,{NULL},S_NULL,0,0},
+ {SPR_CYBR,0,10,{A_Look},S_CYBER_STND2,0,0},
+ {SPR_CYBR,1,10,{A_Look},S_CYBER_STND,0,0},
+ {SPR_CYBR,0,3,{A_Hoof},S_CYBER_RUN2,0,0},
+ {SPR_CYBR,0,3,{A_Chase},S_CYBER_RUN3,0,0},
+ {SPR_CYBR,1,3,{A_Chase},S_CYBER_RUN4,0,0},
+ {SPR_CYBR,1,3,{A_Chase},S_CYBER_RUN5,0,0},
+ {SPR_CYBR,2,3,{A_Chase},S_CYBER_RUN6,0,0},
+ {SPR_CYBR,2,3,{A_Chase},S_CYBER_RUN7,0,0},
+ {SPR_CYBR,3,3,{A_Metal},S_CYBER_RUN8,0,0},
+ {SPR_CYBR,3,3,{A_Chase},S_CYBER_RUN1,0,0},
+ {SPR_CYBR,4,6,{A_FaceTarget},S_CYBER_ATK2,0,0},
+ {SPR_CYBR,5,12,{A_CyberAttack},S_CYBER_ATK3,0,0},
+ {SPR_CYBR,4,12,{A_FaceTarget},S_CYBER_ATK4,0,0},
+ {SPR_CYBR,5,12,{A_CyberAttack},S_CYBER_ATK5,0,0},
+ {SPR_CYBR,4,12,{A_FaceTarget},S_CYBER_ATK6,0,0},
+ {SPR_CYBR,5,12,{A_CyberAttack},S_CYBER_RUN1,0,0},
+ {SPR_CYBR,6,10,{A_Pain},S_CYBER_RUN1,0,0},
+ {SPR_CYBR,7,10,{NULL},S_CYBER_DIE2,0,0},
+ {SPR_CYBR,8,10,{A_Scream},S_CYBER_DIE3,0,0},
+ {SPR_CYBR,9,10,{NULL},S_CYBER_DIE4,0,0},
+ {SPR_CYBR,10,10,{NULL},S_CYBER_DIE5,0,0},
+ {SPR_CYBR,11,10,{NULL},S_CYBER_DIE6,0,0},
+ {SPR_CYBR,12,10,{A_Fall},S_CYBER_DIE7,0,0},
+ {SPR_CYBR,13,10,{NULL},S_CYBER_DIE8,0,0},
+ {SPR_CYBR,14,10,{NULL},S_CYBER_DIE9,0,0},
+ {SPR_CYBR,15,30,{NULL},S_CYBER_DIE10,0,0},
+ {SPR_CYBR,15,-1,{A_BossDeath},S_NULL,0,0},
+ {SPR_PAIN,0,10,{A_Look},S_PAIN_STND,0,0},
+ {SPR_PAIN,0,3,{A_Chase},S_PAIN_RUN2,0,0},
+ {SPR_PAIN,0,3,{A_Chase},S_PAIN_RUN3,0,0},
+ {SPR_PAIN,1,3,{A_Chase},S_PAIN_RUN4,0,0},
+ {SPR_PAIN,1,3,{A_Chase},S_PAIN_RUN5,0,0},
+ {SPR_PAIN,2,3,{A_Chase},S_PAIN_RUN6,0,0},
+ {SPR_PAIN,2,3,{A_Chase},S_PAIN_RUN1,0,0},
+ {SPR_PAIN,3,5,{A_FaceTarget},S_PAIN_ATK2,0,0},
+ {SPR_PAIN,4,5,{A_FaceTarget},S_PAIN_ATK3,0,0},
+ {SPR_PAIN,32773,5,{A_FaceTarget},S_PAIN_ATK4,0,0},
+ {SPR_PAIN,32773,0,{A_PainAttack},S_PAIN_RUN1,0,0},
+ {SPR_PAIN,6,6,{NULL},S_PAIN_PAIN2,0,0},
+ {SPR_PAIN,6,6,{A_Pain},S_PAIN_RUN1,0,0},
+ {SPR_PAIN,32775,8,{NULL},S_PAIN_DIE2,0,0},
+ {SPR_PAIN,32776,8,{A_Scream},S_PAIN_DIE3,0,0},
+ {SPR_PAIN,32777,8,{NULL},S_PAIN_DIE4,0,0},
+ {SPR_PAIN,32778,8,{NULL},S_PAIN_DIE5,0,0},
+ {SPR_PAIN,32779,8,{A_PainDie},S_PAIN_DIE6,0,0},
+ {SPR_PAIN,32780,8,{NULL},S_NULL,0,0},
+ {SPR_PAIN,12,8,{NULL},S_PAIN_RAISE2,0,0},
+ {SPR_PAIN,11,8,{NULL},S_PAIN_RAISE3,0,0},
+ {SPR_PAIN,10,8,{NULL},S_PAIN_RAISE4,0,0},
+ {SPR_PAIN,9,8,{NULL},S_PAIN_RAISE5,0,0},
+ {SPR_PAIN,8,8,{NULL},S_PAIN_RAISE6,0,0},
+ {SPR_PAIN,7,8,{NULL},S_PAIN_RUN1,0,0},
+ {SPR_SSWV,0,10,{A_Look},S_SSWV_STND2,0,0},
+ {SPR_SSWV,1,10,{A_Look},S_SSWV_STND,0,0},
+ {SPR_SSWV,0,3,{A_Chase},S_SSWV_RUN2,0,0},
+ {SPR_SSWV,0,3,{A_Chase},S_SSWV_RUN3,0,0},
+ {SPR_SSWV,1,3,{A_Chase},S_SSWV_RUN4,0,0},
+ {SPR_SSWV,1,3,{A_Chase},S_SSWV_RUN5,0,0},
+ {SPR_SSWV,2,3,{A_Chase},S_SSWV_RUN6,0,0},
+ {SPR_SSWV,2,3,{A_Chase},S_SSWV_RUN7,0,0},
+ {SPR_SSWV,3,3,{A_Chase},S_SSWV_RUN8,0,0},
+ {SPR_SSWV,3,3,{A_Chase},S_SSWV_RUN1,0,0},
+ {SPR_SSWV,4,10,{A_FaceTarget},S_SSWV_ATK2,0,0},
+ {SPR_SSWV,5,10,{A_FaceTarget},S_SSWV_ATK3,0,0},
+ {SPR_SSWV,32774,4,{A_CPosAttack},S_SSWV_ATK4,0,0},
+ {SPR_SSWV,5,6,{A_FaceTarget},S_SSWV_ATK5,0,0},
+ {SPR_SSWV,32774,4,{A_CPosAttack},S_SSWV_ATK6,0,0},
+ {SPR_SSWV,5,1,{A_CPosRefire},S_SSWV_ATK2,0,0},
+ {SPR_SSWV,7,3,{NULL},S_SSWV_PAIN2,0,0},
+ {SPR_SSWV,7,3,{A_Pain},S_SSWV_RUN1,0,0},
+ {SPR_SSWV,8,5,{NULL},S_SSWV_DIE2,0,0},
+ {SPR_SSWV,9,5,{A_Scream},S_SSWV_DIE3,0,0},
+ {SPR_SSWV,10,5,{A_Fall},S_SSWV_DIE4,0,0},
+ {SPR_SSWV,11,5,{NULL},S_SSWV_DIE5,0,0},
+ {SPR_SSWV,12,-1,{NULL},S_NULL,0,0},
+ {SPR_SSWV,13,5,{NULL},S_SSWV_XDIE2,0,0},
+ {SPR_SSWV,14,5,{A_XScream},S_SSWV_XDIE3,0,0},
+ {SPR_SSWV,15,5,{A_Fall},S_SSWV_XDIE4,0,0},
+ {SPR_SSWV,16,5,{NULL},S_SSWV_XDIE5,0,0},
+ {SPR_SSWV,17,5,{NULL},S_SSWV_XDIE6,0,0},
+ {SPR_SSWV,18,5,{NULL},S_SSWV_XDIE7,0,0},
+ {SPR_SSWV,19,5,{NULL},S_SSWV_XDIE8,0,0},
+ {SPR_SSWV,20,5,{NULL},S_SSWV_XDIE9,0,0},
+ {SPR_SSWV,21,-1,{NULL},S_NULL,0,0},
+ {SPR_SSWV,12,5,{NULL},S_SSWV_RAISE2,0,0},
+ {SPR_SSWV,11,5,{NULL},S_SSWV_RAISE3,0,0},
+ {SPR_SSWV,10,5,{NULL},S_SSWV_RAISE4,0,0},
+ {SPR_SSWV,9,5,{NULL},S_SSWV_RAISE5,0,0},
+ {SPR_SSWV,8,5,{NULL},S_SSWV_RUN1,0,0},
+ {SPR_KEEN,0,-1,{NULL},S_KEENSTND,0,0},
+ {SPR_KEEN,0,6,{NULL},S_COMMKEEN2,0,0},
+ {SPR_KEEN,1,6,{NULL},S_COMMKEEN3,0,0},
+ {SPR_KEEN,2,6,{A_Scream},S_COMMKEEN4,0,0},
+ {SPR_KEEN,3,6,{NULL},S_COMMKEEN5,0,0},
+ {SPR_KEEN,4,6,{NULL},S_COMMKEEN6,0,0},
+ {SPR_KEEN,5,6,{NULL},S_COMMKEEN7,0,0},
+ {SPR_KEEN,6,6,{NULL},S_COMMKEEN8,0,0},
+ {SPR_KEEN,7,6,{NULL},S_COMMKEEN9,0,0},
+ {SPR_KEEN,8,6,{NULL},S_COMMKEEN10,0,0},
+ {SPR_KEEN,9,6,{NULL},S_COMMKEEN11,0,0},
+ {SPR_KEEN,10,6,{A_KeenDie},S_COMMKEEN12,0,0},
+ {SPR_KEEN,11,-1,{NULL},S_NULL,0,0},
+ {SPR_KEEN,12,4,{NULL},S_KEENPAIN2,0,0},
+ {SPR_KEEN,12,8,{A_Pain},S_KEENSTND,0,0},
+ {SPR_BBRN,0,-1,{NULL},S_NULL,0,0},
+ {SPR_BBRN,1,36,{A_BrainPain},S_BRAIN,0,0},
+ {SPR_BBRN,0,100,{A_BrainScream},S_BRAIN_DIE2,0,0},
+ {SPR_BBRN,0,10,{NULL},S_BRAIN_DIE3,0,0},
+ {SPR_BBRN,0,10,{NULL},S_BRAIN_DIE4,0,0},
+ {SPR_BBRN,0,-1,{A_BrainDie},S_NULL,0,0},
+ {SPR_SSWV,0,10,{A_Look},S_BRAINEYE,0,0},
+ {SPR_SSWV,0,181,{A_BrainAwake},S_BRAINEYE1,0,0},
+ {SPR_SSWV,0,150,{A_BrainSpit},S_BRAINEYE1,0,0},
+ {SPR_BOSF,32768,3,{A_SpawnSound},S_SPAWN2,0,0},
+ {SPR_BOSF,32769,3,{A_SpawnFly},S_SPAWN3,0,0},
+ {SPR_BOSF,32770,3,{A_SpawnFly},S_SPAWN4,0,0},
+ {SPR_BOSF,32771,3,{A_SpawnFly},S_SPAWN1,0,0},
+ {SPR_FIRE,32768,4,{A_Fire},S_SPAWNFIRE2,0,0},
+ {SPR_FIRE,32769,4,{A_Fire},S_SPAWNFIRE3,0,0},
+ {SPR_FIRE,32770,4,{A_Fire},S_SPAWNFIRE4,0,0},
+ {SPR_FIRE,32771,4,{A_Fire},S_SPAWNFIRE5,0,0},
+ {SPR_FIRE,32772,4,{A_Fire},S_SPAWNFIRE6,0,0},
+ {SPR_FIRE,32773,4,{A_Fire},S_SPAWNFIRE7,0,0},
+ {SPR_FIRE,32774,4,{A_Fire},S_SPAWNFIRE8,0,0},
+ {SPR_FIRE,32775,4,{A_Fire},S_NULL,0,0},
+ {SPR_MISL,32769,10,{NULL},S_BRAINEXPLODE2,0,0},
+ {SPR_MISL,32770,10,{NULL},S_BRAINEXPLODE3,0,0},
+ {SPR_MISL,32771,10,{A_BrainExplode},S_NULL,0,0},
+ {SPR_ARM1,0,6,{NULL},S_ARM1A,0,0},
+ {SPR_ARM1,32769,7,{NULL},S_ARM1,0,0},
+ {SPR_ARM2,0,6,{NULL},S_ARM2A,0,0},
+ {SPR_ARM2,32769,6,{NULL},S_ARM2,0,0},
+ {SPR_BAR1,0,6,{NULL},S_BAR2,0,0},
+ {SPR_BAR1,1,6,{NULL},S_BAR1,0,0},
+ {SPR_BEXP,32768,5,{NULL},S_BEXP2,0,0},
+ {SPR_BEXP,32769,5,{A_Scream},S_BEXP3,0,0},
+ {SPR_BEXP,32770,5,{NULL},S_BEXP4,0,0},
+ {SPR_BEXP,32771,10,{A_Explode},S_BEXP5,0,0},
+ {SPR_BEXP,32772,10,{NULL},S_NULL,0,0},
+ {SPR_FCAN,32768,4,{NULL},S_BBAR2,0,0},
+ {SPR_FCAN,32769,4,{NULL},S_BBAR3,0,0},
+ {SPR_FCAN,32770,4,{NULL},S_BBAR1,0,0},
+ {SPR_BON1,0,6,{NULL},S_BON1A,0,0},
+ {SPR_BON1,1,6,{NULL},S_BON1B,0,0},
+ {SPR_BON1,2,6,{NULL},S_BON1C,0,0},
+ {SPR_BON1,3,6,{NULL},S_BON1D,0,0},
+ {SPR_BON1,2,6,{NULL},S_BON1E,0,0},
+ {SPR_BON1,1,6,{NULL},S_BON1,0,0},
+ {SPR_BON2,0,6,{NULL},S_BON2A,0,0},
+ {SPR_BON2,1,6,{NULL},S_BON2B,0,0},
+ {SPR_BON2,2,6,{NULL},S_BON2C,0,0},
+ {SPR_BON2,3,6,{NULL},S_BON2D,0,0},
+ {SPR_BON2,2,6,{NULL},S_BON2E,0,0},
+ {SPR_BON2,1,6,{NULL},S_BON2,0,0},
+ {SPR_BKEY,0,10,{NULL},S_BKEY2,0,0},
+ {SPR_BKEY,32769,10,{NULL},S_BKEY,0,0},
+ {SPR_RKEY,0,10,{NULL},S_RKEY2,0,0},
+ {SPR_RKEY,32769,10,{NULL},S_RKEY,0,0},
+ {SPR_YKEY,0,10,{NULL},S_YKEY2,0,0},
+ {SPR_YKEY,32769,10,{NULL},S_YKEY,0,0},
+ {SPR_BSKU,0,10,{NULL},S_BSKULL2,0,0},
+ {SPR_BSKU,32769,10,{NULL},S_BSKULL,0,0},
+ {SPR_RSKU,0,10,{NULL},S_RSKULL2,0,0},
+ {SPR_RSKU,32769,10,{NULL},S_RSKULL,0,0},
+ {SPR_YSKU,0,10,{NULL},S_YSKULL2,0,0},
+ {SPR_YSKU,32769,10,{NULL},S_YSKULL,0,0},
+ {SPR_STIM,0,-1,{NULL},S_NULL,0,0},
+ {SPR_MEDI,0,-1,{NULL},S_NULL,0,0},
+ {SPR_SOUL,32768,6,{NULL},S_SOUL2,0,0},
+ {SPR_SOUL,32769,6,{NULL},S_SOUL3,0,0},
+ {SPR_SOUL,32770,6,{NULL},S_SOUL4,0,0},
+ {SPR_SOUL,32771,6,{NULL},S_SOUL5,0,0},
+ {SPR_SOUL,32770,6,{NULL},S_SOUL6,0,0},
+ {SPR_SOUL,32769,6,{NULL},S_SOUL,0,0},
+ {SPR_PINV,32768,6,{NULL},S_PINV2,0,0},
+ {SPR_PINV,32769,6,{NULL},S_PINV3,0,0},
+ {SPR_PINV,32770,6,{NULL},S_PINV4,0,0},
+ {SPR_PINV,32771,6,{NULL},S_PINV,0,0},
+ {SPR_PSTR,32768,-1,{NULL},S_NULL,0,0},
+ {SPR_PINS,32768,6,{NULL},S_PINS2,0,0},
+ {SPR_PINS,32769,6,{NULL},S_PINS3,0,0},
+ {SPR_PINS,32770,6,{NULL},S_PINS4,0,0},
+ {SPR_PINS,32771,6,{NULL},S_PINS,0,0},
+ {SPR_MEGA,32768,6,{NULL},S_MEGA2,0,0},
+ {SPR_MEGA,32769,6,{NULL},S_MEGA3,0,0},
+ {SPR_MEGA,32770,6,{NULL},S_MEGA4,0,0},
+ {SPR_MEGA,32771,6,{NULL},S_MEGA,0,0},
+ {SPR_SUIT,32768,-1,{NULL},S_NULL,0,0},
+ {SPR_PMAP,32768,6,{NULL},S_PMAP2,0,0},
+ {SPR_PMAP,32769,6,{NULL},S_PMAP3,0,0},
+ {SPR_PMAP,32770,6,{NULL},S_PMAP4,0,0},
+ {SPR_PMAP,32771,6,{NULL},S_PMAP5,0,0},
+ {SPR_PMAP,32770,6,{NULL},S_PMAP6,0,0},
+ {SPR_PMAP,32769,6,{NULL},S_PMAP,0,0},
+ {SPR_PVIS,32768,6,{NULL},S_PVIS2,0,0},
+ {SPR_PVIS,1,6,{NULL},S_PVIS,0,0},
+ {SPR_CLIP,0,-1,{NULL},S_NULL,0,0},
+ {SPR_AMMO,0,-1,{NULL},S_NULL,0,0},
+ {SPR_ROCK,0,-1,{NULL},S_NULL,0,0},
+ {SPR_BROK,0,-1,{NULL},S_NULL,0,0},
+ {SPR_CELL,0,-1,{NULL},S_NULL,0,0},
+ {SPR_CELP,0,-1,{NULL},S_NULL,0,0},
+ {SPR_SHEL,0,-1,{NULL},S_NULL,0,0},
+ {SPR_SBOX,0,-1,{NULL},S_NULL,0,0},
+ {SPR_BPAK,0,-1,{NULL},S_NULL,0,0},
+ {SPR_BFUG,0,-1,{NULL},S_NULL,0,0},
+ {SPR_MGUN,0,-1,{NULL},S_NULL,0,0},
+ {SPR_CSAW,0,-1,{NULL},S_NULL,0,0},
+ {SPR_LAUN,0,-1,{NULL},S_NULL,0,0},
+ {SPR_PLAS,0,-1,{NULL},S_NULL,0,0},
+ {SPR_SHOT,0,-1,{NULL},S_NULL,0,0},
+ {SPR_SGN2,0,-1,{NULL},S_NULL,0,0},
+ {SPR_COLU,32768,-1,{NULL},S_NULL,0,0},
+ {SPR_SMT2,0,-1,{NULL},S_NULL,0,0},
+ {SPR_GOR1,0,10,{NULL},S_BLOODYTWITCH2,0,0},
+ {SPR_GOR1,1,15,{NULL},S_BLOODYTWITCH3,0,0},
+ {SPR_GOR1,2,8,{NULL},S_BLOODYTWITCH4,0,0},
+ {SPR_GOR1,1,6,{NULL},S_BLOODYTWITCH,0,0},
+ {SPR_PLAY,13,-1,{NULL},S_NULL,0,0},
+ {SPR_PLAY,18,-1,{NULL},S_NULL,0,0},
+ {SPR_POL2,0,-1,{NULL},S_NULL,0,0},
+ {SPR_POL5,0,-1,{NULL},S_NULL,0,0},
+ {SPR_POL4,0,-1,{NULL},S_NULL,0,0},
+ {SPR_POL3,32768,6,{NULL},S_HEADCANDLES2,0,0},
+ {SPR_POL3,32769,6,{NULL},S_HEADCANDLES,0,0},
+ {SPR_POL1,0,-1,{NULL},S_NULL,0,0},
+ {SPR_POL6,0,6,{NULL},S_LIVESTICK2,0,0},
+ {SPR_POL6,1,8,{NULL},S_LIVESTICK,0,0},
+ {SPR_GOR2,0,-1,{NULL},S_NULL,0,0},
+ {SPR_GOR3,0,-1,{NULL},S_NULL,0,0},
+ {SPR_GOR4,0,-1,{NULL},S_NULL,0,0},
+ {SPR_GOR5,0,-1,{NULL},S_NULL,0,0},
+ {SPR_SMIT,0,-1,{NULL},S_NULL,0,0},
+ {SPR_COL1,0,-1,{NULL},S_NULL,0,0},
+ {SPR_COL2,0,-1,{NULL},S_NULL,0,0},
+ {SPR_COL3,0,-1,{NULL},S_NULL,0,0},
+ {SPR_COL4,0,-1,{NULL},S_NULL,0,0},
+ {SPR_CAND,32768,-1,{NULL},S_NULL,0,0},
+ {SPR_CBRA,32768,-1,{NULL},S_NULL,0,0},
+ {SPR_COL6,0,-1,{NULL},S_NULL,0,0},
+ {SPR_TRE1,0,-1,{NULL},S_NULL,0,0},
+ {SPR_TRE2,0,-1,{NULL},S_NULL,0,0},
+ {SPR_ELEC,0,-1,{NULL},S_NULL,0,0},
+ {SPR_CEYE,32768,6,{NULL},S_EVILEYE2,0,0},
+ {SPR_CEYE,32769,6,{NULL},S_EVILEYE3,0,0},
+ {SPR_CEYE,32770,6,{NULL},S_EVILEYE4,0,0},
+ {SPR_CEYE,32769,6,{NULL},S_EVILEYE,0,0},
+ {SPR_FSKU,32768,6,{NULL},S_FLOATSKULL2,0,0},
+ {SPR_FSKU,32769,6,{NULL},S_FLOATSKULL3,0,0},
+ {SPR_FSKU,32770,6,{NULL},S_FLOATSKULL,0,0},
+ {SPR_COL5,0,14,{NULL},S_HEARTCOL2,0,0},
+ {SPR_COL5,1,14,{NULL},S_HEARTCOL,0,0},
+ {SPR_TBLU,32768,4,{NULL},S_BLUETORCH2,0,0},
+ {SPR_TBLU,32769,4,{NULL},S_BLUETORCH3,0,0},
+ {SPR_TBLU,32770,4,{NULL},S_BLUETORCH4,0,0},
+ {SPR_TBLU,32771,4,{NULL},S_BLUETORCH,0,0},
+ {SPR_TGRN,32768,4,{NULL},S_GREENTORCH2,0,0},
+ {SPR_TGRN,32769,4,{NULL},S_GREENTORCH3,0,0},
+ {SPR_TGRN,32770,4,{NULL},S_GREENTORCH4,0,0},
+ {SPR_TGRN,32771,4,{NULL},S_GREENTORCH,0,0},
+ {SPR_TRED,32768,4,{NULL},S_REDTORCH2,0,0},
+ {SPR_TRED,32769,4,{NULL},S_REDTORCH3,0,0},
+ {SPR_TRED,32770,4,{NULL},S_REDTORCH4,0,0},
+ {SPR_TRED,32771,4,{NULL},S_REDTORCH,0,0},
+ {SPR_SMBT,32768,4,{NULL},S_BTORCHSHRT2,0,0},
+ {SPR_SMBT,32769,4,{NULL},S_BTORCHSHRT3,0,0},
+ {SPR_SMBT,32770,4,{NULL},S_BTORCHSHRT4,0,0},
+ {SPR_SMBT,32771,4,{NULL},S_BTORCHSHRT,0,0},
+ {SPR_SMGT,32768,4,{NULL},S_GTORCHSHRT2,0,0},
+ {SPR_SMGT,32769,4,{NULL},S_GTORCHSHRT3,0,0},
+ {SPR_SMGT,32770,4,{NULL},S_GTORCHSHRT4,0,0},
+ {SPR_SMGT,32771,4,{NULL},S_GTORCHSHRT,0,0},
+ {SPR_SMRT,32768,4,{NULL},S_RTORCHSHRT2,0,0},
+ {SPR_SMRT,32769,4,{NULL},S_RTORCHSHRT3,0,0},
+ {SPR_SMRT,32770,4,{NULL},S_RTORCHSHRT4,0,0},
+ {SPR_SMRT,32771,4,{NULL},S_RTORCHSHRT,0,0},
+ {SPR_HDB1,0,-1,{NULL},S_NULL,0,0},
+ {SPR_HDB2,0,-1,{NULL},S_NULL,0,0},
+ {SPR_HDB3,0,-1,{NULL},S_NULL,0,0},
+ {SPR_HDB4,0,-1,{NULL},S_NULL,0,0},
+ {SPR_HDB5,0,-1,{NULL},S_NULL,0,0},
+ {SPR_HDB6,0,-1,{NULL},S_NULL,0,0},
+ {SPR_POB1,0,-1,{NULL},S_NULL,0,0},
+ {SPR_POB2,0,-1,{NULL},S_NULL,0,0},
+ {SPR_BRS1,0,-1,{NULL},S_NULL,0,0},
+ {SPR_TLMP,32768,4,{NULL},S_TECHLAMP2,0,0},
+ {SPR_TLMP,32769,4,{NULL},S_TECHLAMP3,0,0},
+ {SPR_TLMP,32770,4,{NULL},S_TECHLAMP4,0,0},
+ {SPR_TLMP,32771,4,{NULL},S_TECHLAMP,0,0},
+ {SPR_TLP2,32768,4,{NULL},S_TECH2LAMP2,0,0},
+ {SPR_TLP2,32769,4,{NULL},S_TECH2LAMP3,0,0},
+ {SPR_TLP2,32770,4,{NULL},S_TECH2LAMP4,0,0},
+ {SPR_TLP2,32771,4,{NULL},S_TECH2LAMP,0,0}
};
mobjinfo_t mobjinfo[NUMMOBJTYPES] = {
- { // MT_PLAYER
- -1, // doomednum
- S_PLAY, // spawnstate
- 100, // spawnhealth
- S_PLAY_RUN1, // seestate
- sfx_None, // seesound
- 0, // reactiontime
- sfx_None, // attacksound
- S_PLAY_PAIN, // painstate
- 255, // painchance
- sfx_plpain, // painsound
- S_NULL, // meleestate
- S_PLAY_ATK1, // missilestate
- S_PLAY_DIE1, // deathstate
- S_PLAY_XDIE1, // xdeathstate
- sfx_pldeth, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 56*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_DROPOFF|MF_PICKUP|MF_NOTDMATCH, // flags
- S_NULL // raisestate
- },
-
- { // MT_POSSESSED
- 3004, // doomednum
- S_POSS_STND, // spawnstate
- 20, // spawnhealth
- S_POSS_RUN1, // seestate
- sfx_posit1, // seesound
- 8, // reactiontime
- sfx_pistol, // attacksound
- S_POSS_PAIN, // painstate
- 200, // painchance
- sfx_popain, // painsound
- 0, // meleestate
- S_POSS_ATK1, // missilestate
- S_POSS_DIE1, // deathstate
- S_POSS_XDIE1, // xdeathstate
- sfx_podth1, // deathsound
- 8, // speed
- 20*FRACUNIT, // radius
- 56*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_posact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL, // flags
- S_POSS_RAISE1 // raisestate
- },
-
- { // MT_SHOTGUY
- 9, // doomednum
- S_SPOS_STND, // spawnstate
- 30, // spawnhealth
- S_SPOS_RUN1, // seestate
- sfx_posit2, // seesound
- 8, // reactiontime
- 0, // attacksound
- S_SPOS_PAIN, // painstate
- 170, // painchance
- sfx_popain, // painsound
- 0, // meleestate
- S_SPOS_ATK1, // missilestate
- S_SPOS_DIE1, // deathstate
- S_SPOS_XDIE1, // xdeathstate
- sfx_podth2, // deathsound
- 8, // speed
- 20*FRACUNIT, // radius
- 56*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_posact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL, // flags
- S_SPOS_RAISE1 // raisestate
- },
-
- { // MT_VILE
- 64, // doomednum
- S_VILE_STND, // spawnstate
- 700, // spawnhealth
- S_VILE_RUN1, // seestate
- sfx_vilsit, // seesound
- 8, // reactiontime
- 0, // attacksound
- S_VILE_PAIN, // painstate
- 10, // painchance
- sfx_vipain, // painsound
- 0, // meleestate
- S_VILE_ATK1, // missilestate
- S_VILE_DIE1, // deathstate
- S_NULL, // xdeathstate
- sfx_vildth, // deathsound
- 15, // speed
- 20*FRACUNIT, // radius
- 56*FRACUNIT, // height
- 500, // mass
- 0, // damage
- sfx_vilact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL, // flags
- S_NULL // raisestate
- },
-
- { // MT_FIRE
- -1, // doomednum
- S_FIRE1, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_UNDEAD
- 66, // doomednum
- S_SKEL_STND, // spawnstate
- 300, // spawnhealth
- S_SKEL_RUN1, // seestate
- sfx_skesit, // seesound
- 8, // reactiontime
- 0, // attacksound
- S_SKEL_PAIN, // painstate
- 100, // painchance
- sfx_popain, // painsound
- S_SKEL_FIST1, // meleestate
- S_SKEL_MISS1, // missilestate
- S_SKEL_DIE1, // deathstate
- S_NULL, // xdeathstate
- sfx_skedth, // deathsound
- 10, // speed
- 20*FRACUNIT, // radius
- 56*FRACUNIT, // height
- 500, // mass
- 0, // damage
- sfx_skeact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL, // flags
- S_SKEL_RAISE1 // raisestate
- },
-
- { // MT_TRACER
- -1, // doomednum
- S_TRACER, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_skeatk, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_TRACEEXP1, // deathstate
- S_NULL, // xdeathstate
- sfx_barexp, // deathsound
- 10*FRACUNIT, // speed
- 11*FRACUNIT, // radius
- 8*FRACUNIT, // height
- 100, // mass
- 10, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_SMOKE
- -1, // doomednum
- S_SMOKE1, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_FATSO
- 67, // doomednum
- S_FATT_STND, // spawnstate
- 600, // spawnhealth
- S_FATT_RUN1, // seestate
- sfx_mansit, // seesound
- 8, // reactiontime
- 0, // attacksound
- S_FATT_PAIN, // painstate
- 80, // painchance
- sfx_mnpain, // painsound
- 0, // meleestate
- S_FATT_ATK1, // missilestate
- S_FATT_DIE1, // deathstate
- S_NULL, // xdeathstate
- sfx_mandth, // deathsound
- 8, // speed
- 48*FRACUNIT, // radius
- 64*FRACUNIT, // height
- 1000, // mass
- 0, // damage
- sfx_posact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL, // flags
- S_FATT_RAISE1 // raisestate
- },
-
- { // MT_FATSHOT
- -1, // doomednum
- S_FATSHOT1, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_firsht, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_FATSHOTX1, // deathstate
- S_NULL, // xdeathstate
- sfx_firxpl, // deathsound
- 20*FRACUNIT, // speed
- 6*FRACUNIT, // radius
- 8*FRACUNIT, // height
- 100, // mass
- 8, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_CHAINGUY
- 65, // doomednum
- S_CPOS_STND, // spawnstate
- 70, // spawnhealth
- S_CPOS_RUN1, // seestate
- sfx_posit2, // seesound
- 8, // reactiontime
- 0, // attacksound
- S_CPOS_PAIN, // painstate
- 170, // painchance
- sfx_popain, // painsound
- 0, // meleestate
- S_CPOS_ATK1, // missilestate
- S_CPOS_DIE1, // deathstate
- S_CPOS_XDIE1, // xdeathstate
- sfx_podth2, // deathsound
- 8, // speed
- 20*FRACUNIT, // radius
- 56*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_posact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL, // flags
- S_CPOS_RAISE1 // raisestate
- },
-
- { // MT_TROOP
- 3001, // doomednum
- S_TROO_STND, // spawnstate
- 60, // spawnhealth
- S_TROO_RUN1, // seestate
- sfx_bgsit1, // seesound
- 8, // reactiontime
- 0, // attacksound
- S_TROO_PAIN, // painstate
- 200, // painchance
- sfx_popain, // painsound
- S_TROO_ATK1, // meleestate
- S_TROO_ATK1, // missilestate
- S_TROO_DIE1, // deathstate
- S_TROO_XDIE1, // xdeathstate
- sfx_bgdth1, // deathsound
- 8, // speed
- 20*FRACUNIT, // radius
- 56*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_bgact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL, // flags
- S_TROO_RAISE1 // raisestate
- },
-
- { // MT_SERGEANT
- 3002, // doomednum
- S_SARG_STND, // spawnstate
- 150, // spawnhealth
- S_SARG_RUN1, // seestate
- sfx_sgtsit, // seesound
- 8, // reactiontime
- sfx_sgtatk, // attacksound
- S_SARG_PAIN, // painstate
- 180, // painchance
- sfx_dmpain, // painsound
- S_SARG_ATK1, // meleestate
- 0, // missilestate
- S_SARG_DIE1, // deathstate
- S_NULL, // xdeathstate
- sfx_sgtdth, // deathsound
- 10, // speed
- 30*FRACUNIT, // radius
- 56*FRACUNIT, // height
- 400, // mass
- 0, // damage
- sfx_dmact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL, // flags
- S_SARG_RAISE1 // raisestate
- },
-
- { // MT_SHADOWS
- 58, // doomednum
- S_SARG_STND, // spawnstate
- 150, // spawnhealth
- S_SARG_RUN1, // seestate
- sfx_sgtsit, // seesound
- 8, // reactiontime
- sfx_sgtatk, // attacksound
- S_SARG_PAIN, // painstate
- 180, // painchance
- sfx_dmpain, // painsound
- S_SARG_ATK1, // meleestate
- 0, // missilestate
- S_SARG_DIE1, // deathstate
- S_NULL, // xdeathstate
- sfx_sgtdth, // deathsound
- 10, // speed
- 30*FRACUNIT, // radius
- 56*FRACUNIT, // height
- 400, // mass
- 0, // damage
- sfx_dmact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_SHADOW|MF_COUNTKILL, // flags
- S_SARG_RAISE1 // raisestate
- },
-
- { // MT_HEAD
- 3005, // doomednum
- S_HEAD_STND, // spawnstate
- 400, // spawnhealth
- S_HEAD_RUN1, // seestate
- sfx_cacsit, // seesound
- 8, // reactiontime
- 0, // attacksound
- S_HEAD_PAIN, // painstate
- 128, // painchance
- sfx_dmpain, // painsound
- 0, // meleestate
- S_HEAD_ATK1, // missilestate
- S_HEAD_DIE1, // deathstate
- S_NULL, // xdeathstate
- sfx_cacdth, // deathsound
- 8, // speed
- 31*FRACUNIT, // radius
- 56*FRACUNIT, // height
- 400, // mass
- 0, // damage
- sfx_dmact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_FLOAT|MF_NOGRAVITY|MF_COUNTKILL, // flags
- S_HEAD_RAISE1 // raisestate
- },
-
- { // MT_BRUISER
- 3003, // doomednum
- S_BOSS_STND, // spawnstate
- 1000, // spawnhealth
- S_BOSS_RUN1, // seestate
- sfx_brssit, // seesound
- 8, // reactiontime
- 0, // attacksound
- S_BOSS_PAIN, // painstate
- 50, // painchance
- sfx_dmpain, // painsound
- S_BOSS_ATK1, // meleestate
- S_BOSS_ATK1, // missilestate
- S_BOSS_DIE1, // deathstate
- S_NULL, // xdeathstate
- sfx_brsdth, // deathsound
- 8, // speed
- 24*FRACUNIT, // radius
- 64*FRACUNIT, // height
- 1000, // mass
- 0, // damage
- sfx_dmact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL, // flags
- S_BOSS_RAISE1 // raisestate
- },
-
- { // MT_BRUISERSHOT
- -1, // doomednum
- S_BRBALL1, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_firsht, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_BRBALLX1, // deathstate
- S_NULL, // xdeathstate
- sfx_firxpl, // deathsound
- 15*FRACUNIT, // speed
- 6*FRACUNIT, // radius
- 8*FRACUNIT, // height
- 100, // mass
- 8, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_KNIGHT
- 69, // doomednum
- S_BOS2_STND, // spawnstate
- 500, // spawnhealth
- S_BOS2_RUN1, // seestate
- sfx_kntsit, // seesound
- 8, // reactiontime
- 0, // attacksound
- S_BOS2_PAIN, // painstate
- 50, // painchance
- sfx_dmpain, // painsound
- S_BOS2_ATK1, // meleestate
- S_BOS2_ATK1, // missilestate
- S_BOS2_DIE1, // deathstate
- S_NULL, // xdeathstate
- sfx_kntdth, // deathsound
- 8, // speed
- 24*FRACUNIT, // radius
- 64*FRACUNIT, // height
- 1000, // mass
- 0, // damage
- sfx_dmact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL, // flags
- S_BOS2_RAISE1 // raisestate
- },
-
- { // MT_SKULL
- 3006, // doomednum
- S_SKULL_STND, // spawnstate
- 100, // spawnhealth
- S_SKULL_RUN1, // seestate
- 0, // seesound
- 8, // reactiontime
- sfx_sklatk, // attacksound
- S_SKULL_PAIN, // painstate
- 256, // painchance
- sfx_dmpain, // painsound
- 0, // meleestate
- S_SKULL_ATK1, // missilestate
- S_SKULL_DIE1, // deathstate
- S_NULL, // xdeathstate
- sfx_firxpl, // deathsound
- 8, // speed
- 16*FRACUNIT, // radius
- 56*FRACUNIT, // height
- 50, // mass
- 3, // damage
- sfx_dmact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_FLOAT|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_SPIDER
- 7, // doomednum
- S_SPID_STND, // spawnstate
- 3000, // spawnhealth
- S_SPID_RUN1, // seestate
- sfx_spisit, // seesound
- 8, // reactiontime
- sfx_shotgn, // attacksound
- S_SPID_PAIN, // painstate
- 40, // painchance
- sfx_dmpain, // painsound
- 0, // meleestate
- S_SPID_ATK1, // missilestate
- S_SPID_DIE1, // deathstate
- S_NULL, // xdeathstate
- sfx_spidth, // deathsound
- 12, // speed
- 128*FRACUNIT, // radius
- 100*FRACUNIT, // height
- 1000, // mass
- 0, // damage
- sfx_dmact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL, // flags
- S_NULL // raisestate
- },
-
- { // MT_BABY
- 68, // doomednum
- S_BSPI_STND, // spawnstate
- 500, // spawnhealth
- S_BSPI_SIGHT, // seestate
- sfx_bspsit, // seesound
- 8, // reactiontime
- 0, // attacksound
- S_BSPI_PAIN, // painstate
- 128, // painchance
- sfx_dmpain, // painsound
- 0, // meleestate
- S_BSPI_ATK1, // missilestate
- S_BSPI_DIE1, // deathstate
- S_NULL, // xdeathstate
- sfx_bspdth, // deathsound
- 12, // speed
- 64*FRACUNIT, // radius
- 64*FRACUNIT, // height
- 600, // mass
- 0, // damage
- sfx_bspact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL, // flags
- S_BSPI_RAISE1 // raisestate
- },
-
- { // MT_CYBORG
- 16, // doomednum
- S_CYBER_STND, // spawnstate
- 4000, // spawnhealth
- S_CYBER_RUN1, // seestate
- sfx_cybsit, // seesound
- 8, // reactiontime
- 0, // attacksound
- S_CYBER_PAIN, // painstate
- 20, // painchance
- sfx_dmpain, // painsound
- 0, // meleestate
- S_CYBER_ATK1, // missilestate
- S_CYBER_DIE1, // deathstate
- S_NULL, // xdeathstate
- sfx_cybdth, // deathsound
- 16, // speed
- 40*FRACUNIT, // radius
- 110*FRACUNIT, // height
- 1000, // mass
- 0, // damage
- sfx_dmact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL, // flags
- S_NULL // raisestate
- },
-
- { // MT_PAIN
- 71, // doomednum
- S_PAIN_STND, // spawnstate
- 400, // spawnhealth
- S_PAIN_RUN1, // seestate
- sfx_pesit, // seesound
- 8, // reactiontime
- 0, // attacksound
- S_PAIN_PAIN, // painstate
- 128, // painchance
- sfx_pepain, // painsound
- 0, // meleestate
- S_PAIN_ATK1, // missilestate
- S_PAIN_DIE1, // deathstate
- S_NULL, // xdeathstate
- sfx_pedth, // deathsound
- 8, // speed
- 31*FRACUNIT, // radius
- 56*FRACUNIT, // height
- 400, // mass
- 0, // damage
- sfx_dmact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_FLOAT|MF_NOGRAVITY|MF_COUNTKILL, // flags
- S_PAIN_RAISE1 // raisestate
- },
-
- { // MT_WOLFSS
- 84, // doomednum
- S_SSWV_STND, // spawnstate
- 50, // spawnhealth
- S_SSWV_RUN1, // seestate
- sfx_sssit, // seesound
- 8, // reactiontime
- 0, // attacksound
- S_SSWV_PAIN, // painstate
- 170, // painchance
- sfx_popain, // painsound
- 0, // meleestate
- S_SSWV_ATK1, // missilestate
- S_SSWV_DIE1, // deathstate
- S_SSWV_XDIE1, // xdeathstate
- sfx_ssdth, // deathsound
- 8, // speed
- 20*FRACUNIT, // radius
- 56*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_posact, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL, // flags
- S_SSWV_RAISE1 // raisestate
- },
-
- { // MT_KEEN
- 72, // doomednum
- S_KEENSTND, // spawnstate
- 100, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_KEENPAIN, // painstate
- 256, // painchance
- sfx_keenpn, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_COMMKEEN, // deathstate
- S_NULL, // xdeathstate
- sfx_keendt, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 72*FRACUNIT, // height
- 10000000, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY|MF_SHOOTABLE|MF_COUNTKILL, // flags
- S_NULL // raisestate
- },
-
- { // MT_BOSSBRAIN
- 88, // doomednum
- S_BRAIN, // spawnstate
- 250, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_BRAIN_PAIN, // painstate
- 255, // painchance
- sfx_bospn, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_BRAIN_DIE1, // deathstate
- S_NULL, // xdeathstate
- sfx_bosdth, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 10000000, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID|MF_SHOOTABLE, // flags
- S_NULL // raisestate
- },
-
- { // MT_BOSSSPIT
- 89, // doomednum
- S_BRAINEYE, // spawnstate
- 1000, // spawnhealth
- S_BRAINEYESEE, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 32*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_NOSECTOR, // flags
- S_NULL // raisestate
- },
-
- { // MT_BOSSTARGET
- 87, // doomednum
- S_NULL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 32*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_NOSECTOR, // flags
- S_NULL // raisestate
- },
-
- { // MT_SPAWNSHOT
- -1, // doomednum
- S_SPAWN1, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_bospit, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_firxpl, // deathsound
- 10*FRACUNIT, // speed
- 6*FRACUNIT, // radius
- 32*FRACUNIT, // height
- 100, // mass
- 3, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY|MF_NOCLIP, // flags
- S_NULL // raisestate
- },
-
- { // MT_SPAWNFIRE
- -1, // doomednum
- S_SPAWNFIRE1, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_BARREL
- 2035, // doomednum
- S_BAR1, // spawnstate
- 20, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_BEXP, // deathstate
- S_NULL, // xdeathstate
- sfx_barexp, // deathsound
- 0, // speed
- 10*FRACUNIT, // radius
- 42*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID|MF_SHOOTABLE|MF_NOBLOOD, // flags
- S_NULL // raisestate
- },
-
- { // MT_TROOPSHOT
- -1, // doomednum
- S_TBALL1, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_firsht, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_TBALLX1, // deathstate
- S_NULL, // xdeathstate
- sfx_firxpl, // deathsound
- 10*FRACUNIT, // speed
- 6*FRACUNIT, // radius
- 8*FRACUNIT, // height
- 100, // mass
- 3, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_HEADSHOT
- -1, // doomednum
- S_RBALL1, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_firsht, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_RBALLX1, // deathstate
- S_NULL, // xdeathstate
- sfx_firxpl, // deathsound
- 10*FRACUNIT, // speed
- 6*FRACUNIT, // radius
- 8*FRACUNIT, // height
- 100, // mass
- 5, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_ROCKET
- -1, // doomednum
- S_ROCKET, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_rlaunc, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_EXPLODE1, // deathstate
- S_NULL, // xdeathstate
- sfx_barexp, // deathsound
- 20*FRACUNIT, // speed
- 11*FRACUNIT, // radius
- 8*FRACUNIT, // height
- 100, // mass
- 20, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_PLASMA
- -1, // doomednum
- S_PLASBALL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_plasma, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_PLASEXP, // deathstate
- S_NULL, // xdeathstate
- sfx_firxpl, // deathsound
- 25*FRACUNIT, // speed
- 13*FRACUNIT, // radius
- 8*FRACUNIT, // height
- 100, // mass
- 5, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_BFG
- -1, // doomednum
- S_BFGSHOT, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- 0, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_BFGLAND, // deathstate
- S_NULL, // xdeathstate
- sfx_rxplod, // deathsound
- 25*FRACUNIT, // speed
- 13*FRACUNIT, // radius
- 8*FRACUNIT, // height
- 100, // mass
- 100, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_ARACHPLAZ
- -1, // doomednum
- S_ARACH_PLAZ, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_plasma, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_ARACH_PLEX, // deathstate
- S_NULL, // xdeathstate
- sfx_firxpl, // deathsound
- 25*FRACUNIT, // speed
- 13*FRACUNIT, // radius
- 8*FRACUNIT, // height
- 100, // mass
- 5, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_PUFF
- -1, // doomednum
- S_PUFF1, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_BLOOD
- -1, // doomednum
- S_BLOOD1, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP, // flags
- S_NULL // raisestate
- },
-
- { // MT_TFOG
- -1, // doomednum
- S_TFOG, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_IFOG
- -1, // doomednum
- S_IFOG, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_TELEPORTMAN
- 14, // doomednum
- S_NULL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_NOSECTOR, // flags
- S_NULL // raisestate
- },
-
- { // MT_EXTRABFG
- -1, // doomednum
- S_BFGEXP, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC0
- 2018, // doomednum
- S_ARM1, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC1
- 2019, // doomednum
- S_ARM2, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC2
- 2014, // doomednum
- S_BON1, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL|MF_COUNTITEM, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC3
- 2015, // doomednum
- S_BON2, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL|MF_COUNTITEM, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC4
- 5, // doomednum
- S_BKEY, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL|MF_NOTDMATCH, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC5
- 13, // doomednum
- S_RKEY, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL|MF_NOTDMATCH, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC6
- 6, // doomednum
- S_YKEY, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL|MF_NOTDMATCH, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC7
- 39, // doomednum
- S_YSKULL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL|MF_NOTDMATCH, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC8
- 38, // doomednum
- S_RSKULL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL|MF_NOTDMATCH, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC9
- 40, // doomednum
- S_BSKULL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL|MF_NOTDMATCH, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC10
- 2011, // doomednum
- S_STIM, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC11
- 2012, // doomednum
- S_MEDI, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC12
- 2013, // doomednum
- S_SOUL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL|MF_COUNTITEM, // flags
- S_NULL // raisestate
- },
-
- { // MT_INV
- 2022, // doomednum
- S_PINV, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL|MF_COUNTITEM, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC13
- 2023, // doomednum
- S_PSTR, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL|MF_COUNTITEM, // flags
- S_NULL // raisestate
- },
-
- { // MT_INS
- 2024, // doomednum
- S_PINS, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL|MF_COUNTITEM, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC14
- 2025, // doomednum
- S_SUIT, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC15
- 2026, // doomednum
- S_PMAP, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL|MF_COUNTITEM, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC16
- 2045, // doomednum
- S_PVIS, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL|MF_COUNTITEM, // flags
- S_NULL // raisestate
- },
-
- { // MT_MEGA
- 83, // doomednum
- S_MEGA, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL|MF_COUNTITEM, // flags
- S_NULL // raisestate
- },
-
- { // MT_CLIP
- 2007, // doomednum
- S_CLIP, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC17
- 2048, // doomednum
- S_AMMO, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC18
- 2010, // doomednum
- S_ROCK, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC19
- 2046, // doomednum
- S_BROK, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC20
- 2047, // doomednum
- S_CELL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC21
- 17, // doomednum
- S_CELP, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC22
- 2008, // doomednum
- S_SHEL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC23
- 2049, // doomednum
- S_SBOX, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC24
- 8, // doomednum
- S_BPAK, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC25
- 2006, // doomednum
- S_BFUG, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_CHAINGUN
- 2002, // doomednum
- S_MGUN, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC26
- 2005, // doomednum
- S_CSAW, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC27
- 2003, // doomednum
- S_LAUN, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC28
- 2004, // doomednum
- S_PLAS, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_SHOTGUN
- 2001, // doomednum
- S_SHOT, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_SUPERSHOTGUN
- 82, // doomednum
- S_SHOT2, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPECIAL, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC29
- 85, // doomednum
- S_TECHLAMP, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC30
- 86, // doomednum
- S_TECH2LAMP, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC31
- 2028, // doomednum
- S_COLU, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC32
- 30, // doomednum
- S_TALLGRNCOL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC33
- 31, // doomednum
- S_SHRTGRNCOL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC34
- 32, // doomednum
- S_TALLREDCOL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC35
- 33, // doomednum
- S_SHRTREDCOL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC36
- 37, // doomednum
- S_SKULLCOL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC37
- 36, // doomednum
- S_HEARTCOL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC38
- 41, // doomednum
- S_EVILEYE, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC39
- 42, // doomednum
- S_FLOATSKULL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC40
- 43, // doomednum
- S_TORCHTREE, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC41
- 44, // doomednum
- S_BLUETORCH, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC42
- 45, // doomednum
- S_GREENTORCH, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC43
- 46, // doomednum
- S_REDTORCH, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC44
- 55, // doomednum
- S_BTORCHSHRT, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC45
- 56, // doomednum
- S_GTORCHSHRT, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC46
- 57, // doomednum
- S_RTORCHSHRT, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC47
- 47, // doomednum
- S_STALAGTITE, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC48
- 48, // doomednum
- S_TECHPILLAR, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC49
- 34, // doomednum
- S_CANDLESTIK, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- 0, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC50
- 35, // doomednum
- S_CANDELABRA, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC51
- 49, // doomednum
- S_BLOODYTWITCH, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 68*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC52
- 50, // doomednum
- S_MEAT2, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 84*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC53
- 51, // doomednum
- S_MEAT3, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 84*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC54
- 52, // doomednum
- S_MEAT4, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 68*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC55
- 53, // doomednum
- S_MEAT5, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 52*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC56
- 59, // doomednum
- S_MEAT2, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 84*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPAWNCEILING|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC57
- 60, // doomednum
- S_MEAT4, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 68*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPAWNCEILING|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC58
- 61, // doomednum
- S_MEAT3, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 52*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPAWNCEILING|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC59
- 62, // doomednum
- S_MEAT5, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 52*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPAWNCEILING|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC60
- 63, // doomednum
- S_BLOODYTWITCH, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 68*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SPAWNCEILING|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC61
- 22, // doomednum
- S_HEAD_DIE6, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- 0, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC62
- 15, // doomednum
- S_PLAY_DIE7, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- 0, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC63
- 18, // doomednum
- S_POSS_DIE5, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- 0, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC64
- 21, // doomednum
- S_SARG_DIE6, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- 0, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC65
- 23, // doomednum
- S_SKULL_DIE6, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- 0, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC66
- 20, // doomednum
- S_TROO_DIE5, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- 0, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC67
- 19, // doomednum
- S_SPOS_DIE5, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- 0, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC68
- 10, // doomednum
- S_PLAY_XDIE9, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- 0, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC69
- 12, // doomednum
- S_PLAY_XDIE9, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- 0, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC70
- 28, // doomednum
- S_HEADSONSTICK, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC71
- 24, // doomednum
- S_GIBS, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- 0, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC72
- 27, // doomednum
- S_HEADONASTICK, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC73
- 29, // doomednum
- S_HEADCANDLES, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC74
- 25, // doomednum
- S_DEADSTICK, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC75
- 26, // doomednum
- S_LIVESTICK, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC76
- 54, // doomednum
- S_BIGTREE, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 32*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC77
- 70, // doomednum
- S_BBAR1, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC78
- 73, // doomednum
- S_HANGNOGUTS, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 88*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC79
- 74, // doomednum
- S_HANGBNOBRAIN, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 88*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC80
- 75, // doomednum
- S_HANGTLOOKDN, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 64*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC81
- 76, // doomednum
- S_HANGTSKULL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 64*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC82
- 77, // doomednum
- S_HANGTLOOKUP, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 64*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC83
- 78, // doomednum
- S_HANGTNOBRAIN, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 16*FRACUNIT, // radius
- 64*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC84
- 79, // doomednum
- S_COLONGIBS, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC85
- 80, // doomednum
- S_SMALLPOOL, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP, // flags
- S_NULL // raisestate
- },
-
- { // MT_MISC86
- 81, // doomednum
- S_BRAINSTEM, // spawnstate
- 1000, // spawnhealth
- S_NULL, // seestate
- sfx_None, // seesound
- 8, // reactiontime
- sfx_None, // attacksound
- S_NULL, // painstate
- 0, // painchance
- sfx_None, // painsound
- S_NULL, // meleestate
- S_NULL, // missilestate
- S_NULL, // deathstate
- S_NULL, // xdeathstate
- sfx_None, // deathsound
- 0, // speed
- 20*FRACUNIT, // radius
- 16*FRACUNIT, // height
- 100, // mass
- 0, // damage
- sfx_None, // activesound
- MF_NOBLOCKMAP, // flags
- S_NULL // raisestate
+ {
+ -1,
+ S_PLAY,
+ 100,
+ S_PLAY_RUN1,
+ sfx_None,
+ 0,
+ sfx_None,
+ S_PLAY_PAIN,
+ 255,
+ sfx_plpain,
+ S_NULL,
+ S_PLAY_ATK1,
+ S_PLAY_DIE1,
+ S_PLAY_XDIE1,
+ sfx_pldeth,
+ 0,
+ 16*FRACUNIT,
+ 56*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID|MF_SHOOTABLE|MF_DROPOFF|MF_PICKUP|MF_NOTDMATCH,
+ S_NULL
+ },
+
+ {
+ 3004,
+ S_POSS_STND,
+ 20,
+ S_POSS_RUN1,
+ sfx_posit1,
+ 8,
+ sfx_pistol,
+ S_POSS_PAIN,
+ 200,
+ sfx_popain,
+ 0,
+ S_POSS_ATK1,
+ S_POSS_DIE1,
+ S_POSS_XDIE1,
+ sfx_podth1,
+ 8,
+ 20*FRACUNIT,
+ 56*FRACUNIT,
+ 100,
+ 0,
+ sfx_posact,
+ MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL,
+ S_POSS_RAISE1
+ },
+
+ {
+ 9,
+ S_SPOS_STND,
+ 30,
+ S_SPOS_RUN1,
+ sfx_posit2,
+ 8,
+ 0,
+ S_SPOS_PAIN,
+ 170,
+ sfx_popain,
+ 0,
+ S_SPOS_ATK1,
+ S_SPOS_DIE1,
+ S_SPOS_XDIE1,
+ sfx_podth2,
+ 8,
+ 20*FRACUNIT,
+ 56*FRACUNIT,
+ 100,
+ 0,
+ sfx_posact,
+ MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL,
+ S_SPOS_RAISE1
+ },
+
+ {
+ 64,
+ S_VILE_STND,
+ 700,
+ S_VILE_RUN1,
+ sfx_vilsit,
+ 8,
+ 0,
+ S_VILE_PAIN,
+ 10,
+ sfx_vipain,
+ 0,
+ S_VILE_ATK1,
+ S_VILE_DIE1,
+ S_NULL,
+ sfx_vildth,
+ 15,
+ 20*FRACUNIT,
+ 56*FRACUNIT,
+ 500,
+ 0,
+ sfx_vilact,
+ MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL,
+ S_NULL
+ },
+
+ {
+ -1,
+ S_FIRE1,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 66,
+ S_SKEL_STND,
+ 300,
+ S_SKEL_RUN1,
+ sfx_skesit,
+ 8,
+ 0,
+ S_SKEL_PAIN,
+ 100,
+ sfx_popain,
+ S_SKEL_FIST1,
+ S_SKEL_MISS1,
+ S_SKEL_DIE1,
+ S_NULL,
+ sfx_skedth,
+ 10,
+ 20*FRACUNIT,
+ 56*FRACUNIT,
+ 500,
+ 0,
+ sfx_skeact,
+ MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL,
+ S_SKEL_RAISE1
+ },
+
+ {
+ -1,
+ S_TRACER,
+ 1000,
+ S_NULL,
+ sfx_skeatk,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_TRACEEXP1,
+ S_NULL,
+ sfx_barexp,
+ 10*FRACUNIT,
+ 11*FRACUNIT,
+ 8*FRACUNIT,
+ 100,
+ 10,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ -1,
+ S_SMOKE1,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 67,
+ S_FATT_STND,
+ 600,
+ S_FATT_RUN1,
+ sfx_mansit,
+ 8,
+ 0,
+ S_FATT_PAIN,
+ 80,
+ sfx_mnpain,
+ 0,
+ S_FATT_ATK1,
+ S_FATT_DIE1,
+ S_NULL,
+ sfx_mandth,
+ 8,
+ 48*FRACUNIT,
+ 64*FRACUNIT,
+ 1000,
+ 0,
+ sfx_posact,
+ MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL,
+ S_FATT_RAISE1
+ },
+
+ {
+ -1,
+ S_FATSHOT1,
+ 1000,
+ S_NULL,
+ sfx_firsht,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_FATSHOTX1,
+ S_NULL,
+ sfx_firxpl,
+ 20*FRACUNIT,
+ 6*FRACUNIT,
+ 8*FRACUNIT,
+ 100,
+ 8,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 65,
+ S_CPOS_STND,
+ 70,
+ S_CPOS_RUN1,
+ sfx_posit2,
+ 8,
+ 0,
+ S_CPOS_PAIN,
+ 170,
+ sfx_popain,
+ 0,
+ S_CPOS_ATK1,
+ S_CPOS_DIE1,
+ S_CPOS_XDIE1,
+ sfx_podth2,
+ 8,
+ 20*FRACUNIT,
+ 56*FRACUNIT,
+ 100,
+ 0,
+ sfx_posact,
+ MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL,
+ S_CPOS_RAISE1
+ },
+
+ {
+ 3001,
+ S_TROO_STND,
+ 60,
+ S_TROO_RUN1,
+ sfx_bgsit1,
+ 8,
+ 0,
+ S_TROO_PAIN,
+ 200,
+ sfx_popain,
+ S_TROO_ATK1,
+ S_TROO_ATK1,
+ S_TROO_DIE1,
+ S_TROO_XDIE1,
+ sfx_bgdth1,
+ 8,
+ 20*FRACUNIT,
+ 56*FRACUNIT,
+ 100,
+ 0,
+ sfx_bgact,
+ MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL,
+ S_TROO_RAISE1
+ },
+
+ {
+ 3002,
+ S_SARG_STND,
+ 150,
+ S_SARG_RUN1,
+ sfx_sgtsit,
+ 8,
+ sfx_sgtatk,
+ S_SARG_PAIN,
+ 180,
+ sfx_dmpain,
+ S_SARG_ATK1,
+ 0,
+ S_SARG_DIE1,
+ S_NULL,
+ sfx_sgtdth,
+ 10,
+ 30*FRACUNIT,
+ 56*FRACUNIT,
+ 400,
+ 0,
+ sfx_dmact,
+ MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL,
+ S_SARG_RAISE1
+ },
+
+ {
+ 58,
+ S_SARG_STND,
+ 150,
+ S_SARG_RUN1,
+ sfx_sgtsit,
+ 8,
+ sfx_sgtatk,
+ S_SARG_PAIN,
+ 180,
+ sfx_dmpain,
+ S_SARG_ATK1,
+ 0,
+ S_SARG_DIE1,
+ S_NULL,
+ sfx_sgtdth,
+ 10,
+ 30*FRACUNIT,
+ 56*FRACUNIT,
+ 400,
+ 0,
+ sfx_dmact,
+ MF_SOLID|MF_SHOOTABLE|MF_SHADOW|MF_COUNTKILL,
+ S_SARG_RAISE1
+ },
+
+ {
+ 3005,
+ S_HEAD_STND,
+ 400,
+ S_HEAD_RUN1,
+ sfx_cacsit,
+ 8,
+ 0,
+ S_HEAD_PAIN,
+ 128,
+ sfx_dmpain,
+ 0,
+ S_HEAD_ATK1,
+ S_HEAD_DIE1,
+ S_NULL,
+ sfx_cacdth,
+ 8,
+ 31*FRACUNIT,
+ 56*FRACUNIT,
+ 400,
+ 0,
+ sfx_dmact,
+ MF_SOLID|MF_SHOOTABLE|MF_FLOAT|MF_NOGRAVITY|MF_COUNTKILL,
+ S_HEAD_RAISE1
+ },
+
+ {
+ 3003,
+ S_BOSS_STND,
+ 1000,
+ S_BOSS_RUN1,
+ sfx_brssit,
+ 8,
+ 0,
+ S_BOSS_PAIN,
+ 50,
+ sfx_dmpain,
+ S_BOSS_ATK1,
+ S_BOSS_ATK1,
+ S_BOSS_DIE1,
+ S_NULL,
+ sfx_brsdth,
+ 8,
+ 24*FRACUNIT,
+ 64*FRACUNIT,
+ 1000,
+ 0,
+ sfx_dmact,
+ MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL,
+ S_BOSS_RAISE1
+ },
+
+ {
+ -1,
+ S_BRBALL1,
+ 1000,
+ S_NULL,
+ sfx_firsht,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_BRBALLX1,
+ S_NULL,
+ sfx_firxpl,
+ 15*FRACUNIT,
+ 6*FRACUNIT,
+ 8*FRACUNIT,
+ 100,
+ 8,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 69,
+ S_BOS2_STND,
+ 500,
+ S_BOS2_RUN1,
+ sfx_kntsit,
+ 8,
+ 0,
+ S_BOS2_PAIN,
+ 50,
+ sfx_dmpain,
+ S_BOS2_ATK1,
+ S_BOS2_ATK1,
+ S_BOS2_DIE1,
+ S_NULL,
+ sfx_kntdth,
+ 8,
+ 24*FRACUNIT,
+ 64*FRACUNIT,
+ 1000,
+ 0,
+ sfx_dmact,
+ MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL,
+ S_BOS2_RAISE1
+ },
+
+ {
+ 3006,
+ S_SKULL_STND,
+ 100,
+ S_SKULL_RUN1,
+ 0,
+ 8,
+ sfx_sklatk,
+ S_SKULL_PAIN,
+ 256,
+ sfx_dmpain,
+ 0,
+ S_SKULL_ATK1,
+ S_SKULL_DIE1,
+ S_NULL,
+ sfx_firxpl,
+ 8,
+ 16*FRACUNIT,
+ 56*FRACUNIT,
+ 50,
+ 3,
+ sfx_dmact,
+ MF_SOLID|MF_SHOOTABLE|MF_FLOAT|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 7,
+ S_SPID_STND,
+ 3000,
+ S_SPID_RUN1,
+ sfx_spisit,
+ 8,
+ sfx_shotgn,
+ S_SPID_PAIN,
+ 40,
+ sfx_dmpain,
+ 0,
+ S_SPID_ATK1,
+ S_SPID_DIE1,
+ S_NULL,
+ sfx_spidth,
+ 12,
+ 128*FRACUNIT,
+ 100*FRACUNIT,
+ 1000,
+ 0,
+ sfx_dmact,
+ MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL,
+ S_NULL
+ },
+
+ {
+ 68,
+ S_BSPI_STND,
+ 500,
+ S_BSPI_SIGHT,
+ sfx_bspsit,
+ 8,
+ 0,
+ S_BSPI_PAIN,
+ 128,
+ sfx_dmpain,
+ 0,
+ S_BSPI_ATK1,
+ S_BSPI_DIE1,
+ S_NULL,
+ sfx_bspdth,
+ 12,
+ 64*FRACUNIT,
+ 64*FRACUNIT,
+ 600,
+ 0,
+ sfx_bspact,
+ MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL,
+ S_BSPI_RAISE1
+ },
+
+ {
+ 16,
+ S_CYBER_STND,
+ 4000,
+ S_CYBER_RUN1,
+ sfx_cybsit,
+ 8,
+ 0,
+ S_CYBER_PAIN,
+ 20,
+ sfx_dmpain,
+ 0,
+ S_CYBER_ATK1,
+ S_CYBER_DIE1,
+ S_NULL,
+ sfx_cybdth,
+ 16,
+ 40*FRACUNIT,
+ 110*FRACUNIT,
+ 1000,
+ 0,
+ sfx_dmact,
+ MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL,
+ S_NULL
+ },
+
+ {
+ 71,
+ S_PAIN_STND,
+ 400,
+ S_PAIN_RUN1,
+ sfx_pesit,
+ 8,
+ 0,
+ S_PAIN_PAIN,
+ 128,
+ sfx_pepain,
+ 0,
+ S_PAIN_ATK1,
+ S_PAIN_DIE1,
+ S_NULL,
+ sfx_pedth,
+ 8,
+ 31*FRACUNIT,
+ 56*FRACUNIT,
+ 400,
+ 0,
+ sfx_dmact,
+ MF_SOLID|MF_SHOOTABLE|MF_FLOAT|MF_NOGRAVITY|MF_COUNTKILL,
+ S_PAIN_RAISE1
+ },
+
+ {
+ 84,
+ S_SSWV_STND,
+ 50,
+ S_SSWV_RUN1,
+ sfx_sssit,
+ 8,
+ 0,
+ S_SSWV_PAIN,
+ 170,
+ sfx_popain,
+ 0,
+ S_SSWV_ATK1,
+ S_SSWV_DIE1,
+ S_SSWV_XDIE1,
+ sfx_ssdth,
+ 8,
+ 20*FRACUNIT,
+ 56*FRACUNIT,
+ 100,
+ 0,
+ sfx_posact,
+ MF_SOLID|MF_SHOOTABLE|MF_COUNTKILL,
+ S_SSWV_RAISE1
+ },
+
+ {
+ 72,
+ S_KEENSTND,
+ 100,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_KEENPAIN,
+ 256,
+ sfx_keenpn,
+ S_NULL,
+ S_NULL,
+ S_COMMKEEN,
+ S_NULL,
+ sfx_keendt,
+ 0,
+ 16*FRACUNIT,
+ 72*FRACUNIT,
+ 10000000,
+ 0,
+ sfx_None,
+ MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY|MF_SHOOTABLE|MF_COUNTKILL,
+ S_NULL
+ },
+
+ {
+ 88,
+ S_BRAIN,
+ 250,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_BRAIN_PAIN,
+ 255,
+ sfx_bospn,
+ S_NULL,
+ S_NULL,
+ S_BRAIN_DIE1,
+ S_NULL,
+ sfx_bosdth,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 10000000,
+ 0,
+ sfx_None,
+ MF_SOLID|MF_SHOOTABLE,
+ S_NULL
+ },
+
+ {
+ 89,
+ S_BRAINEYE,
+ 1000,
+ S_BRAINEYESEE,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 32*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_NOSECTOR,
+ S_NULL
+ },
+
+ {
+ 87,
+ S_NULL,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 32*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_NOSECTOR,
+ S_NULL
+ },
+
+ {
+ -1,
+ S_SPAWN1,
+ 1000,
+ S_NULL,
+ sfx_bospit,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_firxpl,
+ 10*FRACUNIT,
+ 6*FRACUNIT,
+ 32*FRACUNIT,
+ 100,
+ 3,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY|MF_NOCLIP,
+ S_NULL
+ },
+
+ {
+ -1,
+ S_SPAWNFIRE1,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 2035,
+ S_BAR1,
+ 20,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_BEXP,
+ S_NULL,
+ sfx_barexp,
+ 0,
+ 10*FRACUNIT,
+ 42*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID|MF_SHOOTABLE|MF_NOBLOOD,
+ S_NULL
+ },
+
+ {
+ -1,
+ S_TBALL1,
+ 1000,
+ S_NULL,
+ sfx_firsht,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_TBALLX1,
+ S_NULL,
+ sfx_firxpl,
+ 10*FRACUNIT,
+ 6*FRACUNIT,
+ 8*FRACUNIT,
+ 100,
+ 3,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ -1,
+ S_RBALL1,
+ 1000,
+ S_NULL,
+ sfx_firsht,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_RBALLX1,
+ S_NULL,
+ sfx_firxpl,
+ 10*FRACUNIT,
+ 6*FRACUNIT,
+ 8*FRACUNIT,
+ 100,
+ 5,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ -1,
+ S_ROCKET,
+ 1000,
+ S_NULL,
+ sfx_rlaunc,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_EXPLODE1,
+ S_NULL,
+ sfx_barexp,
+ 20*FRACUNIT,
+ 11*FRACUNIT,
+ 8*FRACUNIT,
+ 100,
+ 20,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ -1,
+ S_PLASBALL,
+ 1000,
+ S_NULL,
+ sfx_plasma,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_PLASEXP,
+ S_NULL,
+ sfx_firxpl,
+ 25*FRACUNIT,
+ 13*FRACUNIT,
+ 8*FRACUNIT,
+ 100,
+ 5,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ -1,
+ S_BFGSHOT,
+ 1000,
+ S_NULL,
+ 0,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_BFGLAND,
+ S_NULL,
+ sfx_rxplod,
+ 25*FRACUNIT,
+ 13*FRACUNIT,
+ 8*FRACUNIT,
+ 100,
+ 100,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ -1,
+ S_ARACH_PLAZ,
+ 1000,
+ S_NULL,
+ sfx_plasma,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_ARACH_PLEX,
+ S_NULL,
+ sfx_firxpl,
+ 25*FRACUNIT,
+ 13*FRACUNIT,
+ 8*FRACUNIT,
+ 100,
+ 5,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_MISSILE|MF_DROPOFF|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ -1,
+ S_PUFF1,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ -1,
+ S_BLOOD1,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_NOBLOCKMAP,
+ S_NULL
+ },
+
+ {
+ -1,
+ S_TFOG,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ -1,
+ S_IFOG,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 14,
+ S_NULL,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_NOSECTOR,
+ S_NULL
+ },
+
+ {
+ -1,
+ S_BFGEXP,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_NOBLOCKMAP|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 2018,
+ S_ARM1,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 2019,
+ S_ARM2,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 2014,
+ S_BON1,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL|MF_COUNTITEM,
+ S_NULL
+ },
+
+ {
+ 2015,
+ S_BON2,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL|MF_COUNTITEM,
+ S_NULL
+ },
+
+ {
+ 5,
+ S_BKEY,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL|MF_NOTDMATCH,
+ S_NULL
+ },
+
+ {
+ 13,
+ S_RKEY,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL|MF_NOTDMATCH,
+ S_NULL
+ },
+
+ {
+ 6,
+ S_YKEY,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL|MF_NOTDMATCH,
+ S_NULL
+ },
+
+ {
+ 39,
+ S_YSKULL,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL|MF_NOTDMATCH,
+ S_NULL
+ },
+
+ {
+ 38,
+ S_RSKULL,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL|MF_NOTDMATCH,
+ S_NULL
+ },
+
+ {
+ 40,
+ S_BSKULL,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL|MF_NOTDMATCH,
+ S_NULL
+ },
+
+ {
+ 2011,
+ S_STIM,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 2012,
+ S_MEDI,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 2013,
+ S_SOUL,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL|MF_COUNTITEM,
+ S_NULL
+ },
+
+ {
+ 2022,
+ S_PINV,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL|MF_COUNTITEM,
+ S_NULL
+ },
+
+ {
+ 2023,
+ S_PSTR,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL|MF_COUNTITEM,
+ S_NULL
+ },
+
+ {
+ 2024,
+ S_PINS,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL|MF_COUNTITEM,
+ S_NULL
+ },
+
+ {
+ 2025,
+ S_SUIT,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 2026,
+ S_PMAP,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL|MF_COUNTITEM,
+ S_NULL
+ },
+
+ {
+ 2045,
+ S_PVIS,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL|MF_COUNTITEM,
+ S_NULL
+ },
+
+ {
+ 83,
+ S_MEGA,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL|MF_COUNTITEM,
+ S_NULL
+ },
+
+ {
+ 2007,
+ S_CLIP,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 2048,
+ S_AMMO,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 2010,
+ S_ROCK,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 2046,
+ S_BROK,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 2047,
+ S_CELL,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 17,
+ S_CELP,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 2008,
+ S_SHEL,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 2049,
+ S_SBOX,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 8,
+ S_BPAK,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 2006,
+ S_BFUG,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 2002,
+ S_MGUN,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 2005,
+ S_CSAW,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 2003,
+ S_LAUN,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 2004,
+ S_PLAS,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 2001,
+ S_SHOT,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 82,
+ S_SHOT2,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPECIAL,
+ S_NULL
+ },
+
+ {
+ 85,
+ S_TECHLAMP,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 86,
+ S_TECH2LAMP,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 2028,
+ S_COLU,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 30,
+ S_TALLGRNCOL,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 31,
+ S_SHRTGRNCOL,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 32,
+ S_TALLREDCOL,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 33,
+ S_SHRTREDCOL,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 37,
+ S_SKULLCOL,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 36,
+ S_HEARTCOL,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 41,
+ S_EVILEYE,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 42,
+ S_FLOATSKULL,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 43,
+ S_TORCHTREE,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 44,
+ S_BLUETORCH,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 45,
+ S_GREENTORCH,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 46,
+ S_REDTORCH,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 55,
+ S_BTORCHSHRT,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 56,
+ S_GTORCHSHRT,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 57,
+ S_RTORCHSHRT,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 47,
+ S_STALAGTITE,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 48,
+ S_TECHPILLAR,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 34,
+ S_CANDLESTIK,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ 0,
+ S_NULL
+ },
+
+ {
+ 35,
+ S_CANDELABRA,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 49,
+ S_BLOODYTWITCH,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 68*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 50,
+ S_MEAT2,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 84*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 51,
+ S_MEAT3,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 84*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 52,
+ S_MEAT4,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 68*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 53,
+ S_MEAT5,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 52*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 59,
+ S_MEAT2,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 84*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPAWNCEILING|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 60,
+ S_MEAT4,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 68*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPAWNCEILING|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 61,
+ S_MEAT3,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 52*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPAWNCEILING|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 62,
+ S_MEAT5,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 52*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPAWNCEILING|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 63,
+ S_BLOODYTWITCH,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 68*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SPAWNCEILING|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 22,
+ S_HEAD_DIE6,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ 0,
+ S_NULL
+ },
+
+ {
+ 15,
+ S_PLAY_DIE7,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ 0,
+ S_NULL
+ },
+
+ {
+ 18,
+ S_POSS_DIE5,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ 0,
+ S_NULL
+ },
+
+ {
+ 21,
+ S_SARG_DIE6,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ 0,
+ S_NULL
+ },
+
+ {
+ 23,
+ S_SKULL_DIE6,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ 0,
+ S_NULL
+ },
+
+ {
+ 20,
+ S_TROO_DIE5,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ 0,
+ S_NULL
+ },
+
+ {
+ 19,
+ S_SPOS_DIE5,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ 0,
+ S_NULL
+ },
+
+ {
+ 10,
+ S_PLAY_XDIE9,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ 0,
+ S_NULL
+ },
+
+ {
+ 12,
+ S_PLAY_XDIE9,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ 0,
+ S_NULL
+ },
+
+ {
+ 28,
+ S_HEADSONSTICK,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 24,
+ S_GIBS,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ 0,
+ S_NULL
+ },
+
+ {
+ 27,
+ S_HEADONASTICK,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 29,
+ S_HEADCANDLES,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 25,
+ S_DEADSTICK,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 26,
+ S_LIVESTICK,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 54,
+ S_BIGTREE,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 32*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 70,
+ S_BBAR1,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID,
+ S_NULL
+ },
+
+ {
+ 73,
+ S_HANGNOGUTS,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 88*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 74,
+ S_HANGBNOBRAIN,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 88*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 75,
+ S_HANGTLOOKDN,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 64*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 76,
+ S_HANGTSKULL,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 64*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 77,
+ S_HANGTLOOKUP,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 64*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 78,
+ S_HANGTNOBRAIN,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 16*FRACUNIT,
+ 64*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_SOLID|MF_SPAWNCEILING|MF_NOGRAVITY,
+ S_NULL
+ },
+
+ {
+ 79,
+ S_COLONGIBS,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_NOBLOCKMAP,
+ S_NULL
+ },
+
+ {
+ 80,
+ S_SMALLPOOL,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_NOBLOCKMAP,
+ S_NULL
+ },
+
+ {
+ 81,
+ S_BRAINSTEM,
+ 1000,
+ S_NULL,
+ sfx_None,
+ 8,
+ sfx_None,
+ S_NULL,
+ 0,
+ sfx_None,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ S_NULL,
+ sfx_None,
+ 0,
+ 20*FRACUNIT,
+ 16*FRACUNIT,
+ 100,
+ 0,
+ sfx_None,
+ MF_NOBLOCKMAP,
+ S_NULL
}
};
diff --git a/src/info.h b/src/info.h
@@ -1,30 +1,30 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Thing frame/state LUT,
-// generated by multigen utilitiy.
-// This one is the original DOOM version, preserved.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __INFO__
#define __INFO__
-// Needed for action function pointer handling.
+
#include "d_think.h"
typedef enum
@@ -1149,7 +1149,7 @@ typedef struct
spritenum_t sprite;
long frame;
long tics;
- // void (*action) ();
+
actionf_t action;
statenum_t nextstate;
long misc1, misc2;
@@ -1333,8 +1333,8 @@ typedef struct
extern mobjinfo_t mobjinfo[NUMMOBJTYPES];
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/m_argv.c b/src/m_argv.c
@@ -1,24 +1,24 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: m_argv.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
@@ -32,12 +32,12 @@ char** myargv;
-//
-// M_CheckParm
-// Checks for the given parameter
-// in the program's command line arguments.
-// Returns the argument number (1 to argc-1)
-// or 0 if not present
+
+
+
+
+
+
int M_CheckParm (char *check)
{
int i;
diff --git a/src/m_argv.h b/src/m_argv.h
@@ -1,42 +1,42 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Nil.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __M_ARGV__
#define __M_ARGV__
-//
-// MISC
-//
+
+
+
extern int myargc;
extern char** myargv;
-// Returns the position of the given parameter
-// in the arg list (0 if not found).
+
+
int M_CheckParm (char* check);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/m_bbox.c b/src/m_bbox.c
@@ -1,28 +1,28 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Main loop menu stuff.
-// Random number LUT.
-// Default Config File.
-// PCX Screenshots.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
diff --git a/src/m_bbox.h b/src/m_bbox.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Nil.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __M_BBOX__
@@ -28,16 +28,16 @@
#include "m_fixed.h"
-// Bounding box coordinate storage.
+
enum
{
BOXTOP,
BOXBOTTOM,
BOXLEFT,
BOXRIGHT
-}; // bbox coordinates
+};
+
-// Bounding box functions.
void M_ClearBox (fixed_t* box);
void
@@ -48,8 +48,8 @@ M_AddToBox
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/m_cheat.c b/src/m_cheat.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Cheat sequence checking.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
@@ -27,18 +27,18 @@ rcsid[] = "$Id: m_cheat.c,v 1.1 1997/02/03 21:24:34 b1 Exp $";
#include "m_cheat.h"
-//
-// CHEAT SEQUENCE PACKAGE
-//
+
+
+
static int firsttime = 1;
static unsigned char cheat_xlate_table[256];
-//
-// Called in st_stuff module, which handles the input.
-// Returns a 1 if the cheat was successful, 0 if failed.
-//
+
+
+
+
int
cht_CheckCheat
( cheatseq_t* cht,
@@ -54,7 +54,7 @@ cht_CheckCheat
}
if (!cht->p)
- cht->p = cht->sequence; // initialize if first time
+ cht->p = cht->sequence;
if (*cht->p == 0)
*(cht->p++) = key;
@@ -65,7 +65,7 @@ cht_CheckCheat
if (*cht->p == 1)
cht->p++;
- else if (*cht->p == 0xff) // end of sequence character
+ else if (*cht->p == 0xff)
{
cht->p = cht->sequence;
rc = 1;
diff --git a/src/m_cheat.h b/src/m_cheat.h
@@ -1,31 +1,31 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Cheat code checking.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __M_CHEAT__
#define __M_CHEAT__
-//
-// CHEAT SEQUENCE PACKAGE
-//
+
+
+
#define SCRAMBLE(a) \
((((a)&1)<<7) + (((a)&2)<<5) + ((a)&4) + (((a)&8)<<1) \
@@ -51,8 +51,8 @@ cht_GetParam
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/m_fixed.c b/src/m_fixed.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Fixed point implementation.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
@@ -38,7 +38,7 @@ rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
-// Fixme. __USE_C_FIXED__ or something.
+
fixed_t
FixedMul
@@ -50,9 +50,9 @@ FixedMul
-//
-// FixedDiv, C version.
-//
+
+
+
fixed_t
FixedDiv
diff --git a/src/m_fixed.h b/src/m_fixed.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Fixed point arithemtics, implementation.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __M_FIXED__
@@ -29,9 +29,9 @@
#endif
-//
-// Fixed point, 32bit as 16.16.
-//
+
+
+
#define FRACBITS 16
#define FRACUNIT (1<<FRACBITS)
@@ -44,8 +44,8 @@ fixed_t FixedDiv2 (fixed_t a, fixed_t b);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/m_menu.c b/src/m_menu.c
@@ -1,26 +1,26 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// DOOM selection menu, options, episode etc.
-// Sliders and icons. Kinda widget stuff.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: m_menu.c,v 1.7 1997/02/03 22:45:10 b1 Exp $";
@@ -58,7 +58,7 @@ rcsid[] = "$Id: m_menu.c,v 1.7 1997/02/03 22:45:10 b1 Exp $";
#include "doomstat.h"
-// Data.
+
#include "sounds.h"
#include "m_menu.h"
@@ -68,38 +68,38 @@ rcsid[] = "$Id: m_menu.c,v 1.7 1997/02/03 22:45:10 b1 Exp $";
extern patch_t* hu_font[HU_FONTSIZE];
extern boolean message_dontfuckwithme;
-extern boolean chat_on; // in heads-up code
+extern boolean chat_on;
+
+
+
+
+int mouseSensitivity;
-//
-// defaulted values
-//
-int mouseSensitivity; // has default
-// Show messages has default, 0 = off, 1 = on
int showMessages;
-// Blocky mode, has default, 0 = high, 1 = normal
+
int detailLevel;
-int screenblocks; // has default
+int screenblocks;
+
-// temp for screenblocks (0-9)
int screenSize;
-// -1 = no quicksave slot picked!
+
int quickSaveSlot;
- // 1 = message to be printed
+
int messageToPrint;
-// ...and here is the message string!
+
char* messageString;
-// message x & y
+
int messx;
int messy;
int messageLastMenuActive;
-// timed message = no input from user
+
boolean messageNeedsInput;
void (*messageRoutine)(int response);
@@ -115,11 +115,11 @@ char gammamsg[5][26] =
GAMMALVL4
};
-// we are going to be entering a savegame string
+
int saveStringEnter;
-int saveSlot; // which slot to save in
-int saveCharIndex; // which char we're editing
-// old save description before edit
+int saveSlot;
+int saveCharIndex;
+
char saveOldString[SAVESTRINGSIZE];
boolean inhelpscreens;
@@ -134,22 +134,22 @@ char savegamestrings[10][SAVESTRINGSIZE];
char endstring[160];
-//
-// MENU TYPEDEFS
-//
+
+
+
typedef struct
{
- // 0 = no cursor here, 1 = ok, 2 = arrows ok
+
short status;
char name[10];
- // choice = menu item #.
- // if status = 2,
- // choice=0:leftarrow,1:rightarrow
+
+
+
void (*routine)(int choice);
- // hotkey in menu
+
char alphaKey;
} menuitem_t;
@@ -157,29 +157,29 @@ typedef struct
typedef struct menu_s
{
- short numitems; // # of menu items
- struct menu_s* prevMenu; // previous menu
- menuitem_t* menuitems; // menu items
- void (*routine)(); // draw routine
+ short numitems;
+ struct menu_s* prevMenu;
+ menuitem_t* menuitems;
+ void (*routine)();
short x;
- short y; // x,y of menu
- short lastOn; // last item user was on in menu
+ short y;
+ short lastOn;
} menu_t;
-short itemOn; // menu item skull is on
-short skullAnimCounter; // skull animation counter
-short whichSkull; // which skull to draw
+short itemOn;
+short skullAnimCounter;
+short whichSkull;
+
+
-// graphic name of skulls
-// warning: initializer-string for array of chars is too long
char skullName[2][/*8*/9] = {"M_SKULL1","M_SKULL2"};
-// current menudef
+
menu_t* currentMenu;
-//
-// PROTOTYPES
-//
+
+
+
void M_NewGame(int choice);
void M_Episode(int choice);
void M_ChooseSkill(int choice);
@@ -233,9 +233,9 @@ void M_ClearMenus (void);
-//
-// DOOM MENU
-//
+
+
+
enum
{
newgame = 0,
@@ -253,7 +253,7 @@ menuitem_t MainMenu[]=
{1,"M_OPTION",M_Options,'o'},
{1,"M_LOADG",M_LoadGame,'l'},
{1,"M_SAVEG",M_SaveGame,'s'},
- // Another hickup with Special edition.
+
{1,"M_RDTHIS",M_ReadThis,'r'},
{1,"M_QUITG",M_QuitDOOM,'q'}
};
@@ -269,9 +269,9 @@ menu_t MainDef =
};
-//
-// EPISODE SELECT
-//
+
+
+
enum
{
ep1,
@@ -291,17 +291,17 @@ menuitem_t EpisodeMenu[]=
menu_t EpiDef =
{
- ep_end, // # of menu items
- &MainDef, // previous menu
- EpisodeMenu, // menuitem_t ->
- M_DrawEpisode, // drawing routine ->
- 48,63, // x,y
- ep1 // lastOn
+ ep_end,
+ &MainDef,
+ EpisodeMenu,
+ M_DrawEpisode,
+ 48,63,
+ ep1
};
-//
-// NEW GAME
-//
+
+
+
enum
{
killthings,
@@ -323,19 +323,19 @@ menuitem_t NewGameMenu[]=
menu_t NewDef =
{
- newg_end, // # of menu items
- &EpiDef, // previous menu
- NewGameMenu, // menuitem_t ->
- M_DrawNewGame, // drawing routine ->
- 48,63, // x,y
- hurtme // lastOn
+ newg_end,
+ &EpiDef,
+ NewGameMenu,
+ M_DrawNewGame,
+ 48,63,
+ hurtme
};
-//
-// OPTIONS MENU
-//
+
+
+
enum
{
endgame,
@@ -371,9 +371,9 @@ menu_t OptionsDef =
0
};
-//
-// Read This! MENU 1 & 2
-//
+
+
+
enum
{
rdthsempty1,
@@ -416,9 +416,9 @@ menu_t ReadDef2 =
0
};
-//
-// SOUND VOLUME MENU
-//
+
+
+
enum
{
sfx_vol,
@@ -446,9 +446,9 @@ menu_t SoundDef =
0
};
-//
-// LOAD GAME MENU
-//
+
+
+
enum
{
load1,
@@ -480,9 +480,9 @@ menu_t LoadDef =
0
};
-//
-// SAVE GAME MENU
-//
+
+
+
menuitem_t SaveMenu[]=
{
{1,"", M_SaveSelect,'1'},
@@ -504,10 +504,10 @@ menu_t SaveDef =
};
-//
-// M_ReadSaveStrings
-// read the strings from the savegame files
-//
+
+
+
+
void M_ReadSaveStrings(void)
{
int handle;
@@ -536,9 +536,9 @@ void M_ReadSaveStrings(void)
}
-//
-// M_LoadGame & Cie.
-//
+
+
+
void M_DrawLoad(void)
{
int i;
@@ -553,9 +553,9 @@ void M_DrawLoad(void)
-//
-// Draw border for the savegame description
-//
+
+
+
void M_DrawSaveLoadBorder(int x,int y)
{
int i;
@@ -573,9 +573,9 @@ void M_DrawSaveLoadBorder(int x,int y)
-//
-// User wants to load this game
-//
+
+
+
void M_LoadSelect(int choice)
{
char name[256];
@@ -588,9 +588,9 @@ void M_LoadSelect(int choice)
M_ClearMenus ();
}
-//
-// Selected from DOOM menu
-//
+
+
+
void M_LoadGame (int choice)
{
if (netgame)
@@ -604,9 +604,9 @@ void M_LoadGame (int choice)
}
-//
-// M_SaveGame & Cie.
-//
+
+
+
void M_DrawSave(void)
{
int i;
@@ -625,25 +625,25 @@ void M_DrawSave(void)
}
}
-//
-// M_Responder calls this when user is finished
-//
+
+
+
void M_DoSave(int slot)
{
G_SaveGame (slot,savegamestrings[slot]);
M_ClearMenus ();
- // PICK QUICKSAVE SLOT YET?
+
if (quickSaveSlot == -2)
quickSaveSlot = slot;
}
-//
-// User wants to save. Start string input for M_Responder
-//
+
+
+
void M_SaveSelect(int choice)
{
- // we are going to be intercepting all chars
+
saveStringEnter = 1;
saveSlot = choice;
@@ -653,9 +653,9 @@ void M_SaveSelect(int choice)
saveCharIndex = strlen(savegamestrings[choice]);
}
-//
-// Selected from DOOM menu
-//
+
+
+
void M_SaveGame (int choice)
{
if (!usergame)
@@ -673,9 +673,9 @@ void M_SaveGame (int choice)
-//
-// M_QuickSave
-//
+
+
+
char tempstring[80];
void M_QuickSaveResponse(int ch)
@@ -703,7 +703,7 @@ void M_QuickSave(void)
M_StartControlPanel();
M_ReadSaveStrings();
M_SetupNextMenu(&SaveDef);
- quickSaveSlot = -2; // means to pick a slot now
+ quickSaveSlot = -2;
return;
}
sprintf(tempstring,QSPROMPT,savegamestrings[quickSaveSlot]);
@@ -712,9 +712,9 @@ void M_QuickSave(void)
-//
-// M_QuickLoad
-//
+
+
+
void M_QuickLoadResponse(int ch)
{
if (ch == 'y')
@@ -745,10 +745,10 @@ void M_QuickLoad(void)
-//
-// Read This Menus
-// Had a "quick hack to fix romero bug"
-//
+
+
+
+
void M_DrawReadThis1(void)
{
inhelpscreens = true;
@@ -770,9 +770,9 @@ void M_DrawReadThis1(void)
-//
-// Read This Menus - optional second page.
-//
+
+
+
void M_DrawReadThis2(void)
{
inhelpscreens = true;
@@ -780,7 +780,7 @@ void M_DrawReadThis2(void)
{
case retail:
case commercial:
- // This hack keeps us from having to change menus.
+
V_DrawPatchDirect (0,0,0,W_CacheLumpName("CREDIT",PU_CACHE));
break;
case shareware:
@@ -794,9 +794,9 @@ void M_DrawReadThis2(void)
}
-//
-// Change Sfx & Music volumes
-//
+
+
+
void M_DrawSound(void)
{
V_DrawPatchDirect (60,38,0,W_CacheLumpName("M_SVOL",PU_CACHE));
@@ -850,9 +850,9 @@ void M_MusicVol(int choice)
-//
-// M_DrawMainMenu
-//
+
+
+
void M_DrawMainMenu(void)
{
V_DrawPatchDirect (94,2,0,W_CacheLumpName("M_DOOM",PU_CACHE));
@@ -861,9 +861,9 @@ void M_DrawMainMenu(void)
-//
-// M_NewGame
-//
+
+
+
void M_DrawNewGame(void)
{
V_DrawPatchDirect (96,14,0,W_CacheLumpName("M_NEWG",PU_CACHE));
@@ -885,9 +885,9 @@ void M_NewGame(int choice)
}
-//
-// M_Episode
-//
+
+
+
int epi;
void M_DrawEpisode(void)
@@ -926,7 +926,7 @@ void M_Episode(int choice)
return;
}
- // Yet another hack...
+
if ( (gamemode == registered)
&& (choice > 2))
{
@@ -941,9 +941,9 @@ void M_Episode(int choice)
-//
-// M_Options
-//
+
+
+
char detailNames[2][9] = {"M_GDHIGH","M_GDLOW"};
char msgNames[2][9] = {"M_MSGOFF","M_MSGON"};
@@ -972,12 +972,12 @@ void M_Options(int choice)
-//
-// Toggle messages on/off
-//
+
+
+
void M_ChangeMessages(int choice)
{
- // warning: unused parameter `int choice'
+
choice = 0;
showMessages = 1 - showMessages;
@@ -990,9 +990,9 @@ void M_ChangeMessages(int choice)
}
-//
-// M_EndGame
-//
+
+
+
void M_EndGameResponse(int ch)
{
if (ch != 'y')
@@ -1024,9 +1024,9 @@ void M_EndGame(int choice)
-//
-// M_ReadThis
-//
+
+
+
void M_ReadThis(int choice)
{
choice = 0;
@@ -1048,9 +1048,9 @@ void M_FinishReadThis(int choice)
-//
-// M_QuitDOOM
-//
+
+
+
int quitsounds[8] =
{
sfx_pldeth,
@@ -1097,8 +1097,8 @@ void M_QuitResponse(int ch)
void M_QuitDOOM(int choice)
{
- // We pick index 0 which is language sensitive,
- // or one at random, between 1 and maximum number.
+
+
if (language != english )
sprintf(endstring,"%s\n\n"DOSY, endmsg[0] );
else
@@ -1133,7 +1133,7 @@ void M_ChangeDetail(int choice)
choice = 0;
detailLevel = 1 - detailLevel;
- // FIXME - does not work. Remove anyway?
+
fprintf( stderr, "M_ChangeDetail: low detail mode n.a.\n");
return;
@@ -1176,9 +1176,9 @@ void M_SizeDisplay(int choice)
-//
-// Menu Functions
-//
+
+
+
void
M_DrawThermo
( int x,
@@ -1249,9 +1249,9 @@ void M_StopMessage(void)
-//
-// Find string width from hu_font chars
-//
+
+
+
int M_StringWidth(char* string)
{
int i;
@@ -1272,9 +1272,9 @@ int M_StringWidth(char* string)
-//
-// Find string height from hu_font chars
-//
+
+
+
int M_StringHeight(char* string)
{
int i;
@@ -1290,9 +1290,9 @@ int M_StringHeight(char* string)
}
-//
-// Write a string using the hu_font
-//
+
+
+
void
M_WriteText
( int x,
@@ -1339,13 +1339,13 @@ M_WriteText
-//
-// CONTROL PANEL
-//
-//
-// M_Responder
-//
+
+
+
+
+
+
boolean M_Responder (event_t* ev)
{
int ch;
@@ -1449,7 +1449,7 @@ boolean M_Responder (event_t* ev)
return false;
- // Save Game string input
+
if (saveStringEnter)
{
switch(ch)
@@ -1491,7 +1491,7 @@ boolean M_Responder (event_t* ev)
return true;
}
- // Take care of any messages that need input
+
if (messageToPrint)
{
if (messageNeedsInput == true &&
@@ -1515,25 +1515,25 @@ boolean M_Responder (event_t* ev)
}
- // F-Keys
+
if (!menuactive)
switch(ch)
{
- case KEY_MINUS: // Screen size down
+ case KEY_MINUS:
if (automapactive || chat_on)
return false;
M_SizeDisplay(0);
S_StartSound(NULL,sfx_stnmov);
return true;
- case KEY_EQUALS: // Screen size up
+ case KEY_EQUALS:
if (automapactive || chat_on)
return false;
M_SizeDisplay(1);
S_StartSound(NULL,sfx_stnmov);
return true;
- case KEY_F1: // Help key
+ case KEY_F1:
M_StartControlPanel ();
if ( gamemode == retail )
@@ -1545,56 +1545,56 @@ boolean M_Responder (event_t* ev)
S_StartSound(NULL,sfx_swtchn);
return true;
- case KEY_F2: // Save
+ case KEY_F2:
M_StartControlPanel();
S_StartSound(NULL,sfx_swtchn);
M_SaveGame(0);
return true;
- case KEY_F3: // Load
+ case KEY_F3:
M_StartControlPanel();
S_StartSound(NULL,sfx_swtchn);
M_LoadGame(0);
return true;
- case KEY_F4: // Sound Volume
+ case KEY_F4:
M_StartControlPanel ();
currentMenu = &SoundDef;
itemOn = sfx_vol;
S_StartSound(NULL,sfx_swtchn);
return true;
- case KEY_F5: // Detail toggle
+ case KEY_F5:
M_ChangeDetail(0);
S_StartSound(NULL,sfx_swtchn);
return true;
- case KEY_F6: // Quicksave
+ case KEY_F6:
S_StartSound(NULL,sfx_swtchn);
M_QuickSave();
return true;
- case KEY_F7: // End game
+ case KEY_F7:
S_StartSound(NULL,sfx_swtchn);
M_EndGame(0);
return true;
- case KEY_F8: // Toggle messages
+ case KEY_F8:
M_ChangeMessages(0);
S_StartSound(NULL,sfx_swtchn);
return true;
- case KEY_F9: // Quickload
+ case KEY_F9:
S_StartSound(NULL,sfx_swtchn);
M_QuickLoad();
return true;
- case KEY_F10: // Quit DOOM
+ case KEY_F10:
S_StartSound(NULL,sfx_swtchn);
M_QuitDOOM(0);
return true;
- case KEY_F11: // gamma toggle
+ case KEY_F11:
usegamma++;
if (usegamma > 4)
usegamma = 0;
@@ -1605,7 +1605,7 @@ boolean M_Responder (event_t* ev)
}
- // Pop-up menu?
+
if (!menuactive)
{
if (ch == KEY_ESCAPE)
@@ -1618,7 +1618,7 @@ boolean M_Responder (event_t* ev)
}
- // Keys usable within menu
+
switch (ch)
{
case KEY_DOWNARROW:
@@ -1666,7 +1666,7 @@ boolean M_Responder (event_t* ev)
currentMenu->lastOn = itemOn;
if (currentMenu->menuitems[itemOn].status == 2)
{
- currentMenu->menuitems[itemOn].routine(1); // right arrow
+ currentMenu->menuitems[itemOn].routine(1);
S_StartSound(NULL,sfx_stnmov);
}
else
@@ -1717,26 +1717,26 @@ boolean M_Responder (event_t* ev)
-//
-// M_StartControlPanel
-//
+
+
+
void M_StartControlPanel (void)
{
- // intro might call this repeatedly
+
if (menuactive)
return;
menuactive = 1;
- currentMenu = &MainDef; // JDC
- itemOn = currentMenu->lastOn; // JDC
+ currentMenu = &MainDef;
+ itemOn = currentMenu->lastOn;
}
-//
-// M_Drawer
-// Called after the view has been rendered,
-// but before it has been blitted.
-//
+
+
+
+
+
void M_Drawer (void)
{
static short x;
@@ -1749,7 +1749,7 @@ void M_Drawer (void)
inhelpscreens = false;
- // Horiz. & Vertically center string and print it.
+
if (messageToPrint)
{
start = 0;
@@ -1782,9 +1782,9 @@ void M_Drawer (void)
return;
if (currentMenu->routine)
- currentMenu->routine(); // call Draw routine
+ currentMenu->routine();
+
- // DRAW MENU
x = currentMenu->x;
y = currentMenu->y;
max = currentMenu->numitems;
@@ -1798,29 +1798,29 @@ void M_Drawer (void)
}
- // DRAW SKULL
+
V_DrawPatchDirect(x + SKULLXOFF,currentMenu->y - 5 + itemOn*LINEHEIGHT, 0,
W_CacheLumpName(skullName[whichSkull],PU_CACHE));
}
-//
-// M_ClearMenus
-//
+
+
+
void M_ClearMenus (void)
{
menuactive = 0;
- // if (!netgame && usergame && paused)
- // sendpause = true;
+
+
}
-//
-// M_SetupNextMenu
-//
+
+
+
void M_SetupNextMenu(menu_t *menudef)
{
currentMenu = menudef;
@@ -1828,9 +1828,9 @@ void M_SetupNextMenu(menu_t *menudef)
}
-//
-// M_Ticker
-//
+
+
+
void M_Ticker (void)
{
if (--skullAnimCounter <= 0)
@@ -1841,9 +1841,9 @@ void M_Ticker (void)
}
-//
-// M_Init
-//
+
+
+
void M_Init (void)
{
currentMenu = &MainDef;
@@ -1857,16 +1857,16 @@ void M_Init (void)
messageLastMenuActive = menuactive;
quickSaveSlot = -1;
- // Here we could catch other version dependencies,
- // like HELP1/2, and four episodes.
+
+
switch ( gamemode )
{
case commercial:
- // This is used because DOOM 2 had only one HELP
- // page. I use CREDIT as second page now, but
- // kept this hack for educational purposes.
+
+
+
MainMenu[readthis] = MainMenu[quitdoom];
MainDef.numitems--;
MainDef.y += 8;
@@ -1877,14 +1877,14 @@ void M_Init (void)
ReadMenu1[0].routine = M_FinishReadThis;
break;
case shareware:
- // Episode 2 and 3 are handled,
- // branching to an ad screen.
+
+
case registered:
- // We need to remove the fourth episode.
+
EpiDef.numitems--;
break;
case retail:
- // We are fine.
+
default:
break;
}
diff --git a/src/m_menu.h b/src/m_menu.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Menu widget stuff, episode selection and such.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __M_MENU__
@@ -27,31 +27,31 @@
#include "d_event.h"
-//
-// MENUS
-//
-// Called by main loop,
-// saves config file and calls I_Quit when user exits.
-// Even when the menu is not displayed,
-// this can resize the view and change game parameters.
-// Does all the real work of the menu interaction.
+
+
+
+
+
+
+
+
boolean M_Responder (event_t *ev);
-// Called by main loop,
-// only used for menu (skull cursor) animation.
+
+
void M_Ticker (void);
-// Called by main loop,
-// draws the menus directly into the screen buffer.
+
+
void M_Drawer (void);
-// Called by D_DoomMain,
-// loads the config file.
+
+
void M_Init (void);
-// Called by intro code to force menu up upon a keypress,
-// does nothing if menu is already up.
+
+
void M_StartControlPanel (void);
@@ -60,8 +60,8 @@ void M_StartControlPanel (void);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/m_misc.c b/src/m_misc.c
@@ -1,28 +1,28 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Main loop menu stuff.
-// Default Config File.
-// PCX Screenshots.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: m_misc.c,v 1.6 1997/02/03 22:45:10 b1 Exp $";
@@ -51,19 +51,19 @@ rcsid[] = "$Id: m_misc.c,v 1.6 1997/02/03 22:45:10 b1 Exp $";
#include "hu_stuff.h"
-// State.
+
#include "doomstat.h"
-// Data.
+
#include "dstrings.h"
#include "m_misc.h"
-//
-// M_DrawText
-// Returns the final X coordinate
-// HU_Init must have been called to init the font
-//
+
+
+
+
+
extern patch_t* hu_font[HU_FONTSIZE];
int
@@ -102,9 +102,9 @@ M_DrawText
-//
-// M_WriteFile
-//
+
+
+
#ifndef O_BINARY
#define O_BINARY 0
#endif
@@ -133,9 +133,9 @@ M_WriteFile
}
-//
-// M_ReadFile
-//
+
+
+
int
M_ReadFile
( char const* name,
@@ -163,9 +163,9 @@ M_ReadFile
}
-//
-// DEFAULTS
-//
+
+
+
int usemouse;
int usejoystick;
@@ -203,11 +203,11 @@ extern int screenblocks;
extern int showMessages;
-// machine-independent sound params
+
extern int numChannels;
-// UNIX hack, to be removed.
+
#ifdef SNDSERV
extern char* sndserver_filename;
extern int mb_used;
@@ -227,8 +227,8 @@ typedef struct
char* name;
int* location;
int defaultvalue;
- int scantranslate; // PC scan code hack
- int untranslated; // lousy hack
+ int scantranslate;
+ int untranslated;
} default_t;
default_t defaults[] =
@@ -252,7 +252,7 @@ default_t defaults[] =
{"key_strafe",&key_strafe, KEY_RALT},
{"key_speed",&key_speed, KEY_RSHIFT},
-// UNIX hack, to be removed.
+
#ifdef SNDSERV
{"sndserver", (int *) &sndserver_filename, (int) "sndserver"},
{"mb_used", &mb_used, 2},
@@ -302,9 +302,9 @@ int numdefaults;
char* defaultfile;
-//
-// M_SaveDefaults
-//
+
+
+
void M_SaveDefaults (void)
{
int i;
@@ -313,7 +313,7 @@ void M_SaveDefaults (void)
f = fopen (defaultfile, "w");
if (!f)
- return; // can't write the file, but don't complain
+ return;
for (i=0 ; i<numdefaults ; i++)
{
@@ -332,9 +332,9 @@ void M_SaveDefaults (void)
}
-//
-// M_LoadDefaults
-//
+
+
+
extern byte scantokey[128];
void M_LoadDefaults (void)
@@ -348,12 +348,12 @@ void M_LoadDefaults (void)
int parm;
boolean isstring;
- // set everything to base values
+
numdefaults = sizeof(defaults)/sizeof(defaults[0]);
for (i=0 ; i<numdefaults ; i++)
*defaults[i].location = defaults[i].defaultvalue;
- // check for a custom default file
+
i = M_CheckParm ("-config");
if (i && i<myargc-1)
{
@@ -363,7 +363,7 @@ void M_LoadDefaults (void)
else
defaultfile = basedefault;
- // read the file in, overriding any set defaults
+
f = fopen (defaultfile, "r");
if (f)
{
@@ -374,7 +374,7 @@ void M_LoadDefaults (void)
{
if (strparm[0] == '"')
{
- // get a string default
+
isstring = true;
len = strlen(strparm);
newstring = (char *) malloc(len);
@@ -403,9 +403,9 @@ void M_LoadDefaults (void)
}
-//
-// SCREEN SHOTS
-//
+
+
+
typedef struct
@@ -431,13 +431,13 @@ typedef struct
unsigned short palette_type;
char filler[58];
- unsigned char data; // unbounded
+ unsigned char data;
} pcx_t;
-//
-// WritePCXfile
-//
+
+
+
void
WritePCXfile
( char* filename,
@@ -453,10 +453,10 @@ WritePCXfile
pcx = Z_Malloc (width*height*2+1000, PU_STATIC, NULL);
- pcx->manufacturer = 0x0a; // PCX id
- pcx->version = 5; // 256 color
- pcx->encoding = 1; // uncompressed
- pcx->bits_per_pixel = 8; // 256 color
+ pcx->manufacturer = 0x0a;
+ pcx->version = 5;
+ pcx->encoding = 1;
+ pcx->bits_per_pixel = 8;
pcx->xmin = 0;
pcx->ymin = 0;
pcx->xmax = SHORT(width-1);
@@ -464,13 +464,13 @@ WritePCXfile
pcx->hres = SHORT(width);
pcx->vres = SHORT(height);
memset (pcx->palette,0,sizeof(pcx->palette));
- pcx->color_planes = 1; // chunky image
+ pcx->color_planes = 1;
pcx->bytes_per_line = SHORT(width);
- pcx->palette_type = SHORT(2); // not a grey scale
+ pcx->palette_type = SHORT(2);
memset (pcx->filler,0,sizeof(pcx->filler));
- // pack the image
+
pack = &pcx->data;
for (i=0 ; i<width*height ; i++)
@@ -484,12 +484,12 @@ WritePCXfile
}
}
- // write the palette
- *pack++ = 0x0c; // palette ID byte
+
+ *pack++ = 0x0c;
for (i=0 ; i<768 ; i++)
*pack++ = *palette++;
- // write output file
+
length = pack - (byte *)pcx;
M_WriteFile (filename, pcx, length);
@@ -497,20 +497,20 @@ WritePCXfile
}
-//
-// M_ScreenShot
-//
+
+
+
void M_ScreenShot (void)
{
int i;
byte* linear;
char lbmname[12];
- // munge planar buffer to linear
+
linear = screens[2];
I_ReadScreen (linear);
- // find a file name to save it to
+
strcpy(lbmname,"DOOM00.pcx");
for (i=0 ; i<=99 ; i++)
@@ -518,12 +518,12 @@ void M_ScreenShot (void)
lbmname[4] = i/10 + '0';
lbmname[5] = i%10 + '0';
if (access(lbmname,0) == -1)
- break; // file doesn't exist
+ break;
}
if (i==100)
I_Error ("M_ScreenShot: Couldn't create a PCX");
- // save the pcx file
+
WritePCXfile (lbmname, linear,
SCREENWIDTH, SCREENHEIGHT,
W_CacheLumpName ("PLAYPAL",PU_CACHE));
diff --git a/src/m_misc.h b/src/m_misc.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-//
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __M_MISC__
@@ -25,9 +25,9 @@
#include "doomtype.h"
-//
-// MISC
-//
+
+
+
@@ -58,8 +58,8 @@ M_DrawText
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/m_random.c b/src/m_random.c
@@ -1,33 +1,33 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Random number LUT.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char rcsid[] = "$Id: m_random.c,v 1.1 1997/02/03 22:45:11 b1 Exp $";
-//
-// M_Random
-// Returns a 0-255 number
-//
+
+
+
+
unsigned char rndtable[256] = {
0, 8, 109, 220, 222, 241, 149, 107, 75, 248, 254, 140, 16, 66 ,
74, 21, 211, 47, 80, 242, 154, 27, 205, 128, 161, 89, 77, 36 ,
@@ -53,7 +53,7 @@ unsigned char rndtable[256] = {
int rndindex = 0;
int prndindex = 0;
-// Which one is deterministic?
+
int P_Random (void)
{
prndindex = (prndindex+1)&0xff;
diff --git a/src/m_random.h b/src/m_random.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-//
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __M_RANDOM__
@@ -28,20 +28,20 @@
-// Returns a number from 0 to 255,
-// from a lookup table.
+
+
int M_Random (void);
-// As M_Random, but used only by the play simulation.
+
int P_Random (void);
-// Fix randoms for demos.
+
void M_ClearRandom (void);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/m_swap.c b/src/m_swap.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Endianess handling, swapping 16bit and 32bit.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
@@ -31,17 +31,17 @@ rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
#include "m_swap.h"
-// Not needed with big endian.
+
#ifndef __BIG_ENDIAN__
-// Swap 16bit, that is, MSB and LSB byte.
+
unsigned short SwapSHORT(unsigned short x)
{
- // No masking with 0xFF should be necessary.
+
return (x>>8) | (x<<8);
}
-// Swapping 32bit.
+
unsigned long SwapLONG( unsigned long x)
{
return
diff --git a/src/m_swap.h b/src/m_swap.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Endianess handling, swapping 16bit and 32bit.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __M_SWAP__
@@ -29,8 +29,8 @@
#endif
-// Endianess handling.
-// WAD files are stored little endian.
+
+
#ifdef __BIG_ENDIAN__
short SwapSHORT(short);
long SwapLONG(long);
@@ -45,8 +45,8 @@ long SwapLONG(long);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/p_ceilng.c b/src/p_ceilng.c
@@ -1,24 +1,24 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION: Ceiling aninmation (lowering, crushing, raising)
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_ceilng.c,v 1.4 1997/02/03 16:47:53 b1 Exp $";
@@ -30,24 +30,24 @@ rcsid[] = "$Id: p_ceilng.c,v 1.4 1997/02/03 16:47:53 b1 Exp $";
#include "s_sound.h"
-// State.
+
#include "doomstat.h"
#include "r_state.h"
-// Data.
+
#include "sounds.h"
-//
-// CEILINGS
-//
+
+
+
ceiling_t* activeceilings[MAXCEILINGS];
-//
-// T_MoveCeiling
-//
+
+
+
void T_MoveCeiling (ceiling_t* ceiling)
{
@@ -56,10 +56,10 @@ void T_MoveCeiling (ceiling_t* ceiling)
switch(ceiling->direction)
{
case 0:
- // IN STASIS
+
break;
case 1:
- // UP
+
res = T_MovePlane(ceiling->sector,
ceiling->speed,
ceiling->topheight,
@@ -74,7 +74,7 @@ void T_MoveCeiling (ceiling_t* ceiling)
default:
S_StartSound((mobj_t *)&ceiling->sector->soundorg,
sfx_stnmov);
- // ?
+
break;
}
}
@@ -103,7 +103,7 @@ void T_MoveCeiling (ceiling_t* ceiling)
break;
case -1:
- // DOWN
+
res = T_MovePlane(ceiling->sector,
ceiling->speed,
ceiling->bottomheight,
@@ -142,7 +142,7 @@ void T_MoveCeiling (ceiling_t* ceiling)
break;
}
}
- else // ( res != pastdest )
+ else
{
if (res == crushed)
{
@@ -164,10 +164,10 @@ void T_MoveCeiling (ceiling_t* ceiling)
}
-//
-// EV_DoCeiling
-// Move a ceiling up/down and all around!
-//
+
+
+
+
int
EV_DoCeiling
( line_t* line,
@@ -181,7 +181,7 @@ EV_DoCeiling
secnum = -1;
rtn = 0;
- // Reactivate in-stasis ceilings...for certain types.
+
switch(type)
{
case fastCrushAndRaise:
@@ -198,7 +198,7 @@ EV_DoCeiling
if (sec->specialdata)
continue;
- // new door thinker
+
rtn = 1;
ceiling = Z_Malloc (sizeof(*ceiling), PU_LEVSPEC, 0);
P_AddThinker (&ceiling->thinker);
@@ -245,9 +245,9 @@ EV_DoCeiling
}
-//
-// Add an active ceiling
-//
+
+
+
void P_AddActiveCeiling(ceiling_t* c)
{
int i;
@@ -264,9 +264,9 @@ void P_AddActiveCeiling(ceiling_t* c)
-//
-// Remove a ceiling's thinker
-//
+
+
+
void P_RemoveActiveCeiling(ceiling_t* c)
{
int i;
@@ -285,9 +285,9 @@ void P_RemoveActiveCeiling(ceiling_t* c)
-//
-// Restart a ceiling that's in-stasis
-//
+
+
+
void P_ActivateInStasisCeiling(line_t* line)
{
int i;
@@ -307,10 +307,10 @@ void P_ActivateInStasisCeiling(line_t* line)
-//
-// EV_CeilingCrushStop
-// Stop a ceiling from crushing!
-//
+
+
+
+
int EV_CeilingCrushStop(line_t *line)
{
int i;
@@ -325,7 +325,7 @@ int EV_CeilingCrushStop(line_t *line)
{
activeceilings[i]->olddirection = activeceilings[i]->direction;
activeceilings[i]->thinker.function.acv = (actionf_v)NULL;
- activeceilings[i]->direction = 0; // in-stasis
+ activeceilings[i]->direction = 0;
rtn = 1;
}
}
diff --git a/src/p_doors.c b/src/p_doors.c
@@ -1,24 +1,24 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION: Door animation code (opening/closing)
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_doors.c,v 1.4 1997/02/03 16:47:53 b1 Exp $";
@@ -31,35 +31,35 @@ rcsid[] = "$Id: p_doors.c,v 1.4 1997/02/03 16:47:53 b1 Exp $";
#include "s_sound.h"
-// State.
+
#include "doomstat.h"
#include "r_state.h"
-// Data.
+
#include "dstrings.h"
#include "sounds.h"
#if 0
-//
-// Sliding door frame information
-//
+
+
+
slidename_t slideFrameNames[MAXSLIDEDOORS] =
{
- {"GDOORF1","GDOORF2","GDOORF3","GDOORF4", // front
- "GDOORB1","GDOORB2","GDOORB3","GDOORB4"}, // back
+ {"GDOORF1","GDOORF2","GDOORF3","GDOORF4",
+ "GDOORB1","GDOORB2","GDOORB3","GDOORB4"},
{"\0","\0","\0","\0"}
};
#endif
-//
-// VERTICAL DOORS
-//
-//
-// T_VerticalDoor
-//
+
+
+
+
+
+
void T_VerticalDoor (vldoor_t* door)
{
result_e res;
@@ -67,19 +67,19 @@ void T_VerticalDoor (vldoor_t* door)
switch(door->direction)
{
case 0:
- // WAITING
+
if (!--door->topcountdown)
{
switch(door->type)
{
case blazeRaise:
- door->direction = -1; // time to go back down
+ door->direction = -1;
S_StartSound((mobj_t *)&door->sector->soundorg,
sfx_bdcls);
break;
case normal:
- door->direction = -1; // time to go back down
+ door->direction = -1;
S_StartSound((mobj_t *)&door->sector->soundorg,
sfx_dorcls);
break;
@@ -97,7 +97,7 @@ void T_VerticalDoor (vldoor_t* door)
break;
case 2:
- // INITIAL WAIT
+
if (!--door->topcountdown)
{
switch(door->type)
@@ -116,7 +116,7 @@ void T_VerticalDoor (vldoor_t* door)
break;
case -1:
- // DOWN
+
res = T_MovePlane(door->sector,
door->speed,
door->sector->floorheight,
@@ -128,7 +128,7 @@ void T_VerticalDoor (vldoor_t* door)
case blazeRaise:
case blazeClose:
door->sector->specialdata = NULL;
- P_RemoveThinker (&door->thinker); // unlink and free
+ P_RemoveThinker (&door->thinker);
S_StartSound((mobj_t *)&door->sector->soundorg,
sfx_bdcls);
break;
@@ -136,7 +136,7 @@ void T_VerticalDoor (vldoor_t* door)
case normal:
case close:
door->sector->specialdata = NULL;
- P_RemoveThinker (&door->thinker); // unlink and free
+ P_RemoveThinker (&door->thinker);
break;
case close30ThenOpen:
@@ -153,7 +153,7 @@ void T_VerticalDoor (vldoor_t* door)
switch(door->type)
{
case blazeClose:
- case close: // DO NOT GO BACK UP!
+ case close:
break;
default:
@@ -166,7 +166,7 @@ void T_VerticalDoor (vldoor_t* door)
break;
case 1:
- // UP
+
res = T_MovePlane(door->sector,
door->speed,
door->topheight,
@@ -178,7 +178,7 @@ void T_VerticalDoor (vldoor_t* door)
{
case blazeRaise:
case normal:
- door->direction = 0; // wait at top
+ door->direction = 0;
door->topcountdown = door->topwait;
break;
@@ -186,7 +186,7 @@ void T_VerticalDoor (vldoor_t* door)
case blazeOpen:
case open:
door->sector->specialdata = NULL;
- P_RemoveThinker (&door->thinker); // unlink and free
+ P_RemoveThinker (&door->thinker);
break;
default:
@@ -198,10 +198,10 @@ void T_VerticalDoor (vldoor_t* door)
}
-//
-// EV_DoLockedDoor
-// Move a locked door up/down
-//
+
+
+
+
int
EV_DoLockedDoor
@@ -218,7 +218,7 @@ EV_DoLockedDoor
switch(line->special)
{
- case 99: // Blue Lock
+ case 99:
case 133:
if ( !p )
return 0;
@@ -230,7 +230,7 @@ EV_DoLockedDoor
}
break;
- case 134: // Red Lock
+ case 134:
case 135:
if ( !p )
return 0;
@@ -242,7 +242,7 @@ EV_DoLockedDoor
}
break;
- case 136: // Yellow Lock
+ case 136:
case 137:
if ( !p )
return 0;
@@ -279,7 +279,7 @@ EV_DoDoor
continue;
- // new door thinker
+
rtn = 1;
door = Z_Malloc (sizeof(*door), PU_LEVSPEC, 0);
P_AddThinker (&door->thinker);
@@ -347,9 +347,9 @@ EV_DoDoor
}
-//
-// EV_VerticalDoor : open a door manually, no tag value
-//
+
+
+
void
EV_VerticalDoor
( line_t* line,
@@ -361,14 +361,14 @@ EV_VerticalDoor
vldoor_t* door;
int side;
- side = 0; // only front sides can be used
+ side = 0;
- // Check for locks
+
player = thing->player;
switch(line->special)
{
- case 26: // Blue Lock
+ case 26:
case 32:
if ( !player )
return;
@@ -381,7 +381,7 @@ EV_VerticalDoor
}
break;
- case 27: // Yellow Lock
+ case 27:
case 34:
if ( !player )
return;
@@ -395,7 +395,7 @@ EV_VerticalDoor
}
break;
- case 28: // Red Lock
+ case 28:
case 33:
if ( !player )
return;
@@ -409,7 +409,7 @@ EV_VerticalDoor
break;
}
- // if the sector has an active thinker, use it
+
sec = sides[ line->sidenum[side^1]] .sector;
secnum = sec-sectors;
@@ -418,44 +418,44 @@ EV_VerticalDoor
door = sec->specialdata;
switch(line->special)
{
- case 1: // ONLY FOR "RAISE" DOORS, NOT "OPEN"s
+ case 1:
case 26:
case 27:
case 28:
case 117:
if (door->direction == -1)
- door->direction = 1; // go back up
+ door->direction = 1;
else
{
if (!thing->player)
- return; // JDC: bad guys never close doors
+ return;
- door->direction = -1; // start going down immediately
+ door->direction = -1;
}
return;
}
}
- // for proper sound
+
switch(line->special)
{
- case 117: // BLAZING DOOR RAISE
- case 118: // BLAZING DOOR OPEN
+ case 117:
+ case 118:
S_StartSound((mobj_t *)&sec->soundorg,sfx_bdopn);
break;
- case 1: // NORMAL DOOR SOUND
+ case 1:
case 31:
S_StartSound((mobj_t *)&sec->soundorg,sfx_doropn);
break;
- default: // LOCKED DOOR SOUND
+ default:
S_StartSound((mobj_t *)&sec->soundorg,sfx_doropn);
break;
}
- // new door thinker
+
door = Z_Malloc (sizeof(*door), PU_LEVSPEC, 0);
P_AddThinker (&door->thinker);
sec->specialdata = door;
@@ -482,26 +482,26 @@ EV_VerticalDoor
line->special = 0;
break;
- case 117: // blazing door raise
+ case 117:
door->type = blazeRaise;
door->speed = VDOORSPEED*4;
break;
- case 118: // blazing door open
+ case 118:
door->type = blazeOpen;
line->special = 0;
door->speed = VDOORSPEED*4;
break;
}
- // find the top and bottom of the movement range
+
door->topheight = P_FindLowestCeilingSurrounding(sec);
door->topheight -= 4*FRACUNIT;
}
-//
-// Spawn a door that closes after 30 seconds
-//
+
+
+
void P_SpawnDoorCloseIn30 (sector_t* sec)
{
vldoor_t* door;
@@ -521,9 +521,9 @@ void P_SpawnDoorCloseIn30 (sector_t* sec)
door->topcountdown = 30 * 35;
}
-//
-// Spawn a door that opens after 5 minutes
-//
+
+
+
void
P_SpawnDoorRaiseIn5Mins
( sector_t* sec,
@@ -551,14 +551,14 @@ P_SpawnDoorRaiseIn5Mins
-// UNUSED
-// Separate into p_slidoor.c?
-#if 0 // ABANDONED TO THE MISTS OF TIME!!!
-//
-// EV_SlidingDoor : slide a door horizontally
-// (animate midtexture, then set noblocking line)
-//
+
+
+#if 0
+
+
+
+
slideframe_t slideFrames[MAXSLIDEDOORS];
@@ -571,7 +571,7 @@ void P_InitSlidingDoorFrames(void)
int f3;
int f4;
- // DOOM II ONLY...
+
if ( gamemode != commercial)
return;
@@ -603,10 +603,10 @@ void P_InitSlidingDoorFrames(void)
}
-//
-// Return index into "slideFrames" array
-// for which door type to use
-//
+
+
+
+
int P_FindSlidingDoorType(line_t* line)
{
int i;
@@ -631,7 +631,7 @@ void T_SlidingDoor (slidedoor_t* door)
{
if (++door->frame == SNUMFRAMES)
{
- // IF DOOR IS DONE OPENING...
+
sides[door->line->sidenum[0]].midtexture = 0;
sides[door->line->sidenum[1]].midtexture = 0;
door->line->flags &= ML_BLOCKING^0xff;
@@ -648,7 +648,7 @@ void T_SlidingDoor (slidedoor_t* door)
}
else
{
- // IF DOOR NEEDS TO ANIMATE TO NEXT FRAME...
+
door->timer = SWAITTICS;
sides[door->line->sidenum[0]].midtexture =
@@ -662,10 +662,10 @@ void T_SlidingDoor (slidedoor_t* door)
break;
case sd_waiting:
- // IF DOOR IS DONE WAITING...
+
if (!door->timer--)
{
- // CAN DOOR CLOSE?
+
if (door->frontsector->thinglist != NULL ||
door->backsector->thinglist != NULL)
{
@@ -673,7 +673,7 @@ void T_SlidingDoor (slidedoor_t* door)
break;
}
- //door->frame = SNUMFRAMES-1;
+
door->status = sd_closing;
door->timer = SWAITTICS;
}
@@ -684,7 +684,7 @@ void T_SlidingDoor (slidedoor_t* door)
{
if (--door->frame < 0)
{
- // IF DOOR IS DONE CLOSING...
+
door->line->flags |= ML_BLOCKING;
door->frontsector->specialdata = NULL;
P_RemoveThinker (&door->thinker);
@@ -692,7 +692,7 @@ void T_SlidingDoor (slidedoor_t* door)
}
else
{
- // IF DOOR NEEDS TO ANIMATE TO NEXT FRAME...
+
door->timer = SWAITTICS;
sides[door->line->sidenum[0]].midtexture =
@@ -717,11 +717,11 @@ EV_SlidingDoor
sector_t* sec;
slidedoor_t* door;
- // DOOM II ONLY...
+
if (gamemode != commercial)
return;
- // Make sure door isn't already being animated
+
sec = line->frontsector;
door = NULL;
if (sec->specialdata)
@@ -739,7 +739,7 @@ EV_SlidingDoor
return;
}
- // Init sliding door vars
+
if (!door)
{
door = Z_Malloc (sizeof(*door), PU_LEVSPEC, 0);
diff --git a/src/p_enemy.c b/src/p_enemy.c
@@ -1,27 +1,27 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Enemy thinking, AI.
-// Action Pointer Functions
-// that are associated with states/frames.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_enemy.c,v 1.5 1997/02/03 22:45:11 b1 Exp $";
@@ -38,11 +38,11 @@ rcsid[] = "$Id: p_enemy.c,v 1.5 1997/02/03 22:45:11 b1 Exp $";
#include "g_game.h"
-// State.
+
#include "doomstat.h"
#include "r_state.h"
-// Data.
+
#include "sounds.h"
@@ -64,9 +64,9 @@ typedef enum
} dirtype_t;
-//
-// P_NewChaseDir related LUT.
-//
+
+
+
dirtype_t opposite[] =
{
DI_WEST, DI_SOUTHWEST, DI_SOUTH, DI_SOUTHEAST,
@@ -85,20 +85,20 @@ dirtype_t diags[] =
void A_Fall (mobj_t *actor);
-//
-// ENEMY THINKING
-// Enemies are allways spawned
-// with targetplayer = -1, threshold = 0
-// Most monsters are spawned unaware of all players,
-// but some can be made preaware
-//
-//
-// Called by P_NoiseAlert.
-// Recursively traverse adjacent sectors,
-// sound blocking lines cut off traversal.
-//
+
+
+
+
+
+
+
+
+
+
+
+
mobj_t* soundtarget;
@@ -111,11 +111,11 @@ P_RecursiveSound
line_t* check;
sector_t* other;
- // wake up all monsters in this sector
+
if (sec->validcount == validcount
&& sec->soundtraversed <= soundblocks+1)
{
- return; // already flooded
+ return;
}
sec->validcount = validcount;
@@ -131,7 +131,7 @@ P_RecursiveSound
P_LineOpening (check);
if (openrange <= 0)
- continue; // closed door
+ continue;
if ( sides[ check->sidenum[0] ].sector == sec)
other = sides[ check->sidenum[1] ] .sector;
@@ -150,11 +150,11 @@ P_RecursiveSound
-//
-// P_NoiseAlert
-// If a monster yells at a player,
-// it will alert other monsters to the player.
-//
+
+
+
+
+
void
P_NoiseAlert
( mobj_t* target,
@@ -168,9 +168,9 @@ P_NoiseAlert
-//
-// P_CheckMeleeRange
-//
+
+
+
boolean P_CheckMeleeRange (mobj_t* actor)
{
mobj_t* pl;
@@ -191,9 +191,9 @@ boolean P_CheckMeleeRange (mobj_t* actor)
return true;
}
-//
-// P_CheckMissileRange
-//
+
+
+
boolean P_CheckMissileRange (mobj_t* actor)
{
fixed_t dist;
@@ -203,35 +203,35 @@ boolean P_CheckMissileRange (mobj_t* actor)
if ( actor->flags & MF_JUSTHIT )
{
- // the target just hit the enemy,
- // so fight back!
+
+
actor->flags &= ~MF_JUSTHIT;
return true;
}
if (actor->reactiontime)
- return false; // do not attack yet
+ return false;
- // OPTIMIZE: get this from a global checksight
+
dist = P_AproxDistance ( actor->x-actor->target->x,
actor->y-actor->target->y) - 64*FRACUNIT;
if (!actor->info->meleestate)
- dist -= 128*FRACUNIT; // no melee attack, so fire more
+ dist -= 128*FRACUNIT;
dist >>= 16;
if (actor->type == MT_VILE)
{
if (dist > 14*64)
- return false; // too far away
+ return false;
}
if (actor->type == MT_UNDEAD)
{
if (dist < 196)
- return false; // close for fist attack
+ return false;
dist >>= 1;
}
@@ -256,11 +256,11 @@ boolean P_CheckMissileRange (mobj_t* actor)
}
-//
-// P_Move
-// Move in the current direction,
-// returns false if the move is blocked.
-//
+
+
+
+
+
fixed_t xspeed[8] = {FRACUNIT,47000,0,-47000,-FRACUNIT,-47000,0,47000};
fixed_t yspeed[8] = {0,47000,FRACUNIT,47000,0,-47000,-FRACUNIT,-47000};
@@ -276,8 +276,8 @@ boolean P_Move (mobj_t* actor)
line_t* ld;
- // warning: 'catch', 'throw', and 'try'
- // are all C++ reserved words
+
+
boolean try_ok;
boolean good;
@@ -294,10 +294,10 @@ boolean P_Move (mobj_t* actor)
if (!try_ok)
{
- // open any specials
+
if (actor->flags & MF_FLOAT && floatok)
{
- // must adjust height
+
if (actor->z < tmfloorz)
actor->z += FLOATSPEED;
else
@@ -315,9 +315,9 @@ boolean P_Move (mobj_t* actor)
while (numspechit--)
{
ld = spechit[numspechit];
- // if the special is not a door
- // that can be opened,
- // return false
+
+
+
if (P_UseSpecialLine (actor, ld,0))
good = true;
}
@@ -335,17 +335,17 @@ boolean P_Move (mobj_t* actor)
}
-//
-// TryWalk
-// Attempts to move actor on
-// in its current (ob->moveangle) direction.
-// If blocked by either a wall or an actor
-// returns FALSE
-// If move is either clear or blocked only by a door,
-// returns TRUE and sets...
-// If a door is in the way,
-// an OpenDoor call is made to start it opening.
-//
+
+
+
+
+
+
+
+
+
+
+
boolean P_TryWalk (mobj_t* actor)
{
if (!P_Move (actor))
@@ -395,7 +395,7 @@ void P_NewChaseDir (mobj_t* actor)
else
d[2]=DI_NODIR;
- // try direct route
+
if (d[1] != DI_NODIR
&& d[2] != DI_NODIR)
{
@@ -404,7 +404,7 @@ void P_NewChaseDir (mobj_t* actor)
return;
}
- // try other directions
+
if (P_Random() > 200
|| abs(deltay)>abs(deltax))
{
@@ -423,7 +423,7 @@ void P_NewChaseDir (mobj_t* actor)
actor->movedir = d[1];
if (P_TryWalk(actor))
{
- // either moved forward or attacked
+
return;
}
}
@@ -436,8 +436,8 @@ void P_NewChaseDir (mobj_t* actor)
return;
}
- // there is no direct path to the player,
- // so pick another direction.
+
+
if (olddir!=DI_NODIR)
{
actor->movedir =olddir;
@@ -446,7 +446,7 @@ void P_NewChaseDir (mobj_t* actor)
return;
}
- // randomly determine direction of search
+
if (P_Random()&1)
{
for ( tdir=DI_EAST;
@@ -485,16 +485,16 @@ void P_NewChaseDir (mobj_t* actor)
return;
}
- actor->movedir = DI_NODIR; // can not move
+ actor->movedir = DI_NODIR;
}
-//
-// P_LookForPlayers
-// If allaround is false, only look 180 degrees in front.
-// Returns true if a player is targeted.
-//
+
+
+
+
+
boolean
P_LookForPlayers
( mobj_t* actor,
@@ -520,17 +520,17 @@ P_LookForPlayers
if (c++ == 2
|| actor->lastlook == stop)
{
- // done looking
+
return false;
}
player = &players[actor->lastlook];
if (player->health <= 0)
- continue; // dead
+ continue;
if (!P_CheckSight (actor, player->mo))
- continue; // out of sight
+ continue;
if (!allaround)
{
@@ -544,9 +544,9 @@ P_LookForPlayers
{
dist = P_AproxDistance (player->mo->x - actor->x,
player->mo->y - actor->y);
- // if real close, react anyway
+
if (dist > MELEERANGE)
- continue; // behind back
+ continue;
}
}
@@ -558,11 +558,11 @@ P_LookForPlayers
}
-//
-// A_KeenDie
-// DOOM II special, map 32.
-// Uses special tag 666.
-//
+
+
+
+
+
void A_KeenDie (mobj_t* mo)
{
thinker_t* th;
@@ -571,8 +571,8 @@ void A_KeenDie (mobj_t* mo)
A_Fall (mo);
- // scan the remaining thinkers
- // to see if all Keens are dead
+
+
for (th = thinkercap.next ; th != &thinkercap ; th=th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
@@ -583,7 +583,7 @@ void A_KeenDie (mobj_t* mo)
&& mo2->type == mo->type
&& mo2->health > 0)
{
- // other Keen not dead
+
return;
}
}
@@ -593,19 +593,19 @@ void A_KeenDie (mobj_t* mo)
}
-//
-// ACTION ROUTINES
-//
-//
-// A_Look
-// Stay in state until a player is sighted.
-//
+
+
+
+
+
+
+
void A_Look (mobj_t* actor)
{
mobj_t* targ;
- actor->threshold = 0; // any shot will wake up
+ actor->threshold = 0;
targ = actor->subsector->sector->soundtarget;
if (targ
@@ -626,7 +626,7 @@ void A_Look (mobj_t* actor)
if (!P_LookForPlayers (actor, false) )
return;
- // go into chase state
+
seeyou:
if (actor->info->seesound)
{
@@ -653,7 +653,7 @@ void A_Look (mobj_t* actor)
if (actor->type==MT_SPIDER
|| actor->type == MT_CYBORG)
{
- // full volume
+
S_StartSound (NULL, sound);
}
else
@@ -664,11 +664,11 @@ void A_Look (mobj_t* actor)
}
-//
-// A_Chase
-// Actor has a melee attack,
-// so it tries to close as fast as possible
-//
+
+
+
+
+
void A_Chase (mobj_t* actor)
{
int delta;
@@ -677,7 +677,7 @@ void A_Chase (mobj_t* actor)
actor->reactiontime--;
- // modify target threshold
+
if (actor->threshold)
{
if (!actor->target
@@ -689,7 +689,7 @@ void A_Chase (mobj_t* actor)
actor->threshold--;
}
- // turn towards movement direction if not there yet
+
if (actor->movedir < 8)
{
actor->angle &= (7<<29);
@@ -704,15 +704,15 @@ void A_Chase (mobj_t* actor)
if (!actor->target
|| !(actor->target->flags&MF_SHOOTABLE))
{
- // look for a new target
+
if (P_LookForPlayers(actor,true))
- return; // got a new target
+ return;
P_SetMobjState (actor, actor->info->spawnstate);
return;
}
- // do not attack twice in a row
+
if (actor->flags & MF_JUSTATTACKED)
{
actor->flags &= ~MF_JUSTATTACKED;
@@ -721,7 +721,7 @@ void A_Chase (mobj_t* actor)
return;
}
- // check for melee attack
+
if (actor->info->meleestate
&& P_CheckMeleeRange (actor))
{
@@ -732,7 +732,7 @@ void A_Chase (mobj_t* actor)
return;
}
- // check for missile attack
+
if (actor->info->missilestate)
{
if (gameskill < sk_nightmare
@@ -749,25 +749,25 @@ void A_Chase (mobj_t* actor)
return;
}
- // ?
+
nomissile:
- // possibly choose another target
+
if (netgame
&& !actor->threshold
&& !P_CheckSight (actor, actor->target) )
{
if (P_LookForPlayers(actor,true))
- return; // got a new target
+ return;
}
- // chase towards player
+
if (--actor->movecount<0
|| !P_Move (actor))
{
P_NewChaseDir (actor);
}
- // make active sound
+
if (actor->info->activesound
&& P_Random () < 3)
{
@@ -776,9 +776,9 @@ void A_Chase (mobj_t* actor)
}
-//
-// A_FaceTarget
-//
+
+
+
void A_FaceTarget (mobj_t* actor)
{
if (!actor->target)
@@ -796,9 +796,9 @@ void A_FaceTarget (mobj_t* actor)
}
-//
-// A_PosAttack
-//
+
+
+
void A_PosAttack (mobj_t* actor)
{
int angle;
@@ -864,7 +864,7 @@ void A_CPosAttack (mobj_t* actor)
void A_CPosRefire (mobj_t* actor)
{
- // keep firing unless target got out of sight
+
A_FaceTarget (actor);
if (P_Random () < 40)
@@ -881,7 +881,7 @@ void A_CPosRefire (mobj_t* actor)
void A_SpidRefire (mobj_t* actor)
{
- // keep firing unless target got out of sight
+
A_FaceTarget (actor);
if (P_Random () < 10)
@@ -902,14 +902,14 @@ void A_BspiAttack (mobj_t *actor)
A_FaceTarget (actor);
- // launch a missile
+
P_SpawnMissile (actor, actor->target, MT_ARACHPLAZ);
}
-//
-// A_TroopAttack
-//
+
+
+
void A_TroopAttack (mobj_t* actor)
{
int damage;
@@ -927,7 +927,7 @@ void A_TroopAttack (mobj_t* actor)
}
- // launch a missile
+
P_SpawnMissile (actor, actor->target, MT_TROOPSHOT);
}
@@ -962,7 +962,7 @@ void A_HeadAttack (mobj_t* actor)
return;
}
- // launch a missile
+
P_SpawnMissile (actor, actor->target, MT_HEADSHOT);
}
@@ -991,14 +991,14 @@ void A_BruisAttack (mobj_t* actor)
return;
}
- // launch a missile
+
P_SpawnMissile (actor, actor->target, MT_BRUISERSHOT);
}
-//
-// A_SkelMissile
-//
+
+
+
void A_SkelMissile (mobj_t* actor)
{
mobj_t* mo;
@@ -1007,9 +1007,9 @@ void A_SkelMissile (mobj_t* actor)
return;
A_FaceTarget (actor);
- actor->z += 16*FRACUNIT; // so missile spawns higher
+ actor->z += 16*FRACUNIT;
mo = P_SpawnMissile (actor, actor->target, MT_TRACER);
- actor->z -= 16*FRACUNIT; // back to normal
+ actor->z -= 16*FRACUNIT;
mo->x += mo->momx;
mo->y += mo->momy;
@@ -1029,7 +1029,7 @@ void A_Tracer (mobj_t* actor)
if (gametic & 3)
return;
- // spawn a puff of smoke behind the rocket
+
P_SpawnPuff (actor->x, actor->y, actor->z);
th = P_SpawnMobj (actor->x-actor->momx,
@@ -1041,13 +1041,13 @@ void A_Tracer (mobj_t* actor)
if (th->tics < 1)
th->tics = 1;
- // adjust direction
+
dest = actor->tracer;
if (!dest || dest->health <= 0)
return;
- // change angle
+
exact = R_PointToAngle2 (actor->x,
actor->y,
dest->x,
@@ -1073,7 +1073,7 @@ void A_Tracer (mobj_t* actor)
actor->momx = FixedMul (actor->info->speed, finecosine[exact]);
actor->momy = FixedMul (actor->info->speed, finesine[exact]);
- // change slope
+
dist = P_AproxDistance (dest->x - actor->x,
dest->y - actor->y);
@@ -1117,10 +1117,10 @@ void A_SkelFist (mobj_t* actor)
-//
-// PIT_VileCheck
-// Detect a corpse that could be raised.
-//
+
+
+
+
mobj_t* corpsehit;
mobj_t* vileobj;
fixed_t viletryx;
@@ -1132,19 +1132,19 @@ boolean PIT_VileCheck (mobj_t* thing)
boolean check;
if (!(thing->flags & MF_CORPSE) )
- return true; // not a monster
+ return true;
if (thing->tics != -1)
- return true; // not lying still yet
+ return true;
if (thing->info->raisestate == S_NULL)
- return true; // monster doesn't have a raise state
+ return true;
maxdist = thing->info->radius + mobjinfo[MT_VILE].radius;
if ( abs(thing->x - viletryx) > maxdist
|| abs(thing->y - viletryy) > maxdist )
- return true; // not actually touching
+ return true;
corpsehit = thing;
corpsehit->momx = corpsehit->momy = 0;
@@ -1153,17 +1153,17 @@ boolean PIT_VileCheck (mobj_t* thing)
corpsehit->height >>= 2;
if (!check)
- return true; // doesn't fit here
+ return true;
- return false; // got one, so stop checking
+ return false;
}
-//
-// A_VileChase
-// Check for ressurecting a body
-//
+
+
+
+
void A_VileChase (mobj_t* actor)
{
int xl;
@@ -1179,7 +1179,7 @@ void A_VileChase (mobj_t* actor)
if (actor->movedir != DI_NODIR)
{
- // check for corpses to raise
+
viletryx =
actor->x + actor->info->speed*xspeed[actor->movedir];
viletryy =
@@ -1195,12 +1195,12 @@ void A_VileChase (mobj_t* actor)
{
for (by=yl ; by<=yh ; by++)
{
- // Call PIT_VileCheck to check
- // whether object is a corpse
- // that canbe raised.
+
+
+
if (!P_BlockThingsIterator(bx,by,PIT_VileCheck))
{
- // got one!
+
temp = actor->target;
actor->target = corpsehit;
A_FaceTarget (actor);
@@ -1222,24 +1222,24 @@ void A_VileChase (mobj_t* actor)
}
}
- // Return to normal attack.
+
A_Chase (actor);
}
-//
-// A_VileStart
-//
+
+
+
void A_VileStart (mobj_t* actor)
{
S_StartSound (actor, sfx_vilatk);
}
-//
-// A_Fire
-// Keep fire in front of player unless out of sight
-//
+
+
+
+
void A_Fire (mobj_t* actor);
void A_StartFire (mobj_t* actor)
@@ -1263,7 +1263,7 @@ void A_Fire (mobj_t* actor)
if (!dest)
return;
- // don't move it if the vile lost sight
+
if (!P_CheckSight (actor->target, dest) )
return;
@@ -1278,10 +1278,10 @@ void A_Fire (mobj_t* actor)
-//
-// A_VileTarget
-// Spawn the hellfire
-//
+
+
+
+
void A_VileTarget (mobj_t* actor)
{
mobj_t* fog;
@@ -1304,9 +1304,9 @@ void A_VileTarget (mobj_t* actor)
-//
-// A_VileAttack
-//
+
+
+
void A_VileAttack (mobj_t* actor)
{
mobj_t* fire;
@@ -1331,7 +1331,7 @@ void A_VileAttack (mobj_t* actor)
if (!fire)
return;
- // move the fire between the vile and the player
+
fire->x = actor->target->x - FixedMul (24*FRACUNIT, finecosine[an]);
fire->y = actor->target->y - FixedMul (24*FRACUNIT, finesine[an]);
P_RadiusAttack (fire, actor, 70 );
@@ -1340,12 +1340,12 @@ void A_VileAttack (mobj_t* actor)
-//
-// Mancubus attack,
-// firing three missiles (bruisers)
-// in three different directions?
-// Doesn't look like it.
-//
+
+
+
+
+
+
#define FATSPREAD (ANG90/8)
void A_FatRaise (mobj_t *actor)
@@ -1361,7 +1361,7 @@ void A_FatAttack1 (mobj_t* actor)
int an;
A_FaceTarget (actor);
- // Change direction to ...
+
actor->angle += FATSPREAD;
P_SpawnMissile (actor, actor->target, MT_FATSHOT);
@@ -1378,7 +1378,7 @@ void A_FatAttack2 (mobj_t* actor)
int an;
A_FaceTarget (actor);
- // Now here choose opposite deviation.
+
actor->angle -= FATSPREAD;
P_SpawnMissile (actor, actor->target, MT_FATSHOT);
@@ -1410,10 +1410,10 @@ void A_FatAttack3 (mobj_t* actor)
}
-//
-// SkullAttack
-// Fly at the player like a missile.
-//
+
+
+
+
#define SKULLSPEED (20*FRACUNIT)
void A_SkullAttack (mobj_t* actor)
@@ -1442,10 +1442,10 @@ void A_SkullAttack (mobj_t* actor)
}
-//
-// A_PainShootSkull
-// Spawn a lost soul and launch it at the target
-//
+
+
+
+
void
A_PainShootSkull
( mobj_t* actor,
@@ -1461,7 +1461,7 @@ A_PainShootSkull
int count;
thinker_t* currentthinker;
- // count total number of skull currently on the level
+
count = 0;
currentthinker = thinkercap.next;
@@ -1473,13 +1473,13 @@ A_PainShootSkull
currentthinker = currentthinker->next;
}
- // if there are allready 20 skulls on the level,
- // don't spit another one
+
+
if (count > 20)
return;
- // okay, there's playe for another one
+
an = angle >> ANGLETOFINESHIFT;
prestep =
@@ -1492,10 +1492,10 @@ A_PainShootSkull
newmobj = P_SpawnMobj (x , y, z, MT_SKULL);
- // Check for movements.
+
if (!P_TryMove (newmobj, newmobj->x, newmobj->y))
{
- // kill it immediately
+
P_DamageMobj (newmobj,actor,actor,10000);
return;
}
@@ -1505,10 +1505,10 @@ A_PainShootSkull
}
-//
-// A_PainAttack
-// Spawn a lost soul and launch it at the target
-//
+
+
+
+
void A_PainAttack (mobj_t* actor)
{
if (!actor->target)
@@ -1557,11 +1557,11 @@ void A_Scream (mobj_t* actor)
break;
}
- // Check for bosses.
+
if (actor->type==MT_SPIDER
|| actor->type == MT_CYBORG)
{
- // full volume
+
S_StartSound (NULL, sound);
}
else
@@ -1584,28 +1584,28 @@ void A_Pain (mobj_t* actor)
void A_Fall (mobj_t *actor)
{
- // actor is on ground, it can be walked over
+
actor->flags &= ~MF_SOLID;
- // So change this if corpse objects
- // are meant to be obstacles.
+
+
}
-//
-// A_Explode
-//
+
+
+
void A_Explode (mobj_t* thingy)
{
P_RadiusAttack ( thingy, thingy->target, 128 );
}
-//
-// A_BossDeath
-// Possibly trigger special effects
-// if on first boss level
-//
+
+
+
+
+
void A_BossDeath (mobj_t* mo)
{
thinker_t* th;
@@ -1679,16 +1679,16 @@ void A_BossDeath (mobj_t* mo)
}
- // make sure there is a player alive for victory
+
for (i=0 ; i<MAXPLAYERS ; i++)
if (playeringame[i] && players[i].health > 0)
break;
if (i==MAXPLAYERS)
- return; // no one left alive, so do not end game
+ return;
+
+
- // scan the remaining thinkers to see
- // if all bosses are dead
for (th = thinkercap.next ; th != &thinkercap ; th=th->next)
{
if (th->function.acp1 != (actionf_p1)P_MobjThinker)
@@ -1699,12 +1699,12 @@ void A_BossDeath (mobj_t* mo)
&& mo2->type == mo->type
&& mo2->health > 0)
{
- // other boss not dead
+
return;
}
}
- // victory!
+
if ( gamemode == commercial)
{
if (gamemap == 7)
@@ -1815,7 +1815,7 @@ void A_BrainAwake (mobj_t* mo)
thinker_t* thinker;
mobj_t* m;
- // find all the target spots
+
numbraintargets = 0;
braintargeton = 0;
@@ -1825,7 +1825,7 @@ void A_BrainAwake (mobj_t* mo)
thinker = thinker->next)
{
if (thinker->function.acp1 != (actionf_p1)P_MobjThinker)
- continue; // not a mobj
+ continue;
m = (mobj_t *)thinker;
@@ -1909,11 +1909,11 @@ void A_BrainSpit (mobj_t* mo)
if (gameskill <= sk_easy && (!easy))
return;
- // shoot a cube at current target
+
targ = braintargets[braintargeton];
braintargeton = (braintargeton+1)%numbraintargets;
- // spawn brain missile
+
newmobj = P_SpawnMissile (mo, targ, MT_SPAWNSHOT);
newmobj->target = targ;
newmobj->reactiontime =
@@ -1926,7 +1926,7 @@ void A_BrainSpit (mobj_t* mo)
void A_SpawnFly (mobj_t* mo);
-// travelling cube sound
+
void A_SpawnSound (mobj_t* mo)
{
S_StartSound (mo,sfx_boscub);
@@ -1942,19 +1942,19 @@ void A_SpawnFly (mobj_t* mo)
mobjtype_t type;
if (--mo->reactiontime)
- return; // still flying
+ return;
targ = mo->target;
- // First spawn teleport fog.
+
fog = P_SpawnMobj (targ->x, targ->y, targ->z, MT_SPAWNFIRE);
S_StartSound (fog, sfx_telept);
- // Randomly select monster to spawn.
+
r = P_Random ();
- // Probability distribution (kind of :),
- // decreasing likelihood.
+
+
if ( r<50 )
type = MT_TROOP;
else if (r<90)
@@ -1982,10 +1982,10 @@ void A_SpawnFly (mobj_t* mo)
if (P_LookForPlayers (newmobj, true) )
P_SetMobjState (newmobj, newmobj->info->seestate);
- // telefrag anything in this spot
+
P_TeleportMove (newmobj, newmobj->x, newmobj->y);
- // remove self (i.e., cube).
+
P_RemoveMobj (mo);
}
@@ -1993,14 +1993,14 @@ void A_SpawnFly (mobj_t* mo)
void A_PlayerScream (mobj_t* mo)
{
- // Default death sound.
+
int sound = sfx_pldeth;
if ( (gamemode == commercial)
&& (mo->health < -50))
{
- // IF THE PLAYER DIES
- // LESS THAN -50% WITHOUT GIBBING
+
+
sound = sfx_pdiehi;
}
diff --git a/src/p_floor.c b/src/p_floor.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Floor animation: raising stairs.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_floor.c,v 1.4 1997/02/03 16:47:54 b1 Exp $";
@@ -31,20 +31,20 @@ rcsid[] = "$Id: p_floor.c,v 1.4 1997/02/03 16:47:54 b1 Exp $";
#include "s_sound.h"
-// State.
+
#include "doomstat.h"
#include "r_state.h"
-// Data.
+
#include "sounds.h"
-//
-// FLOORS
-//
-//
-// Move a plane (floor or ceiling) and check for crushing
-//
+
+
+
+
+
+
result_e
T_MovePlane
( sector_t* sector,
@@ -60,11 +60,11 @@ T_MovePlane
switch(floorOrCeiling)
{
case 0:
- // FLOOR
+
switch(direction)
{
case -1:
- // DOWN
+
if (sector->floorheight - speed < dest)
{
lastpos = sector->floorheight;
@@ -74,7 +74,7 @@ T_MovePlane
{
sector->floorheight =lastpos;
P_ChangeSector(sector,crush);
- //return crushed;
+
}
return pastdest;
}
@@ -93,7 +93,7 @@ T_MovePlane
break;
case 1:
- // UP
+
if (sector->floorheight + speed > dest)
{
lastpos = sector->floorheight;
@@ -103,13 +103,13 @@ T_MovePlane
{
sector->floorheight = lastpos;
P_ChangeSector(sector,crush);
- //return crushed;
+
}
return pastdest;
}
else
{
- // COULD GET CRUSHED
+
lastpos = sector->floorheight;
sector->floorheight += speed;
flag = P_ChangeSector(sector,crush);
@@ -127,11 +127,11 @@ T_MovePlane
break;
case 1:
- // CEILING
+
switch(direction)
{
case -1:
- // DOWN
+
if (sector->ceilingheight - speed < dest)
{
lastpos = sector->ceilingheight;
@@ -142,13 +142,13 @@ T_MovePlane
{
sector->ceilingheight = lastpos;
P_ChangeSector(sector,crush);
- //return crushed;
+
}
return pastdest;
}
else
{
- // COULD GET CRUSHED
+
lastpos = sector->ceilingheight;
sector->ceilingheight -= speed;
flag = P_ChangeSector(sector,crush);
@@ -165,7 +165,7 @@ T_MovePlane
break;
case 1:
- // UP
+
if (sector->ceilingheight + speed > dest)
{
lastpos = sector->ceilingheight;
@@ -175,7 +175,7 @@ T_MovePlane
{
sector->ceilingheight = lastpos;
P_ChangeSector(sector,crush);
- //return crushed;
+
}
return pastdest;
}
@@ -184,7 +184,7 @@ T_MovePlane
lastpos = sector->ceilingheight;
sector->ceilingheight += speed;
flag = P_ChangeSector(sector,crush);
-// UNUSED
+
#if 0
if (flag == true)
{
@@ -203,9 +203,9 @@ T_MovePlane
}
-//
-// MOVE A FLOOR TO IT'S DESTINATION (UP OR DOWN)
-//
+
+
+
void T_MoveFloor(floormove_t* floor)
{
result_e res;
@@ -253,9 +253,9 @@ void T_MoveFloor(floormove_t* floor)
}
-//
-// HANDLE FLOOR TYPES
-//
+
+
+
int
EV_DoFloor
( line_t* line,
@@ -273,11 +273,11 @@ EV_DoFloor
{
sec = §ors[secnum];
- // ALREADY MOVING? IF SO, KEEP GOING...
+
if (sec->specialdata)
continue;
- // new floor thinker
+
rtn = 1;
floor = Z_Malloc (sizeof(*floor), PU_LEVSPEC, 0);
P_AddThinker (&floor->thinker);
@@ -446,9 +446,9 @@ EV_DoFloor
-//
-// BUILD A STAIRCASE!
-//
+
+
+
int
EV_BuildStairs
( line_t* line,
@@ -476,11 +476,11 @@ EV_BuildStairs
{
sec = §ors[secnum];
- // ALREADY MOVING? IF SO, KEEP GOING...
+
if (sec->specialdata)
continue;
- // new floor thinker
+
rtn = 1;
floor = Z_Malloc (sizeof(*floor), PU_LEVSPEC, 0);
P_AddThinker (&floor->thinker);
@@ -505,9 +505,9 @@ EV_BuildStairs
texture = sec->floorpic;
- // Find next sector to raise
- // 1. Find 2-sided line with same sector side[0]
- // 2. Other side is the next sector to raise
+
+
+
do
{
ok = 0;
diff --git a/src/p_inter.c b/src/p_inter.c
@@ -1,32 +1,32 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Handling interactions (i.e., collisions).
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_inter.c,v 1.4 1997/02/03 22:45:11 b1 Exp $";
-// Data.
+
#include "doomdef.h"
#include "dstrings.h"
#include "sounds.h"
@@ -53,22 +53,22 @@ rcsid[] = "$Id: p_inter.c,v 1.4 1997/02/03 22:45:11 b1 Exp $";
-// a weapon is found with two clip loads,
-// a big item has five clip loads
+
+
int maxammo[NUMAMMO] = {200, 50, 300, 50};
int clipammo[NUMAMMO] = {10, 4, 20, 1};
-//
-// GET STUFF
-//
-//
-// P_GiveAmmo
-// Num is the number of clip loads,
-// not the individual count (0= 1/2 clip).
-// Returns false if the ammo can't be picked up at all
-//
+
+
+
+
+
+
+
+
+
boolean
P_GiveAmmo
@@ -95,8 +95,8 @@ P_GiveAmmo
if (gameskill == sk_baby
|| gameskill == sk_nightmare)
{
- // give double ammo in trainer mode,
- // you'll need in nightmare
+
+
num <<= 1;
}
@@ -107,15 +107,15 @@ P_GiveAmmo
if (player->ammo[ammo] > player->maxammo[ammo])
player->ammo[ammo] = player->maxammo[ammo];
- // If non zero ammo,
- // don't change up weapons,
- // player was lower on purpose.
+
+
+
if (oldammo)
return true;
- // We were down to zero,
- // so select a new weapon.
- // Preferences are not user selectable.
+
+
+
switch (ammo)
{
case am_clip:
@@ -160,10 +160,10 @@ P_GiveAmmo
}
-//
-// P_GiveWeapon
-// The weapon name may have a MF_DROPPED flag ored in.
-//
+
+
+
+
boolean
P_GiveWeapon
( player_t* player,
@@ -177,7 +177,7 @@ P_GiveWeapon
&& (deathmatch!=2)
&& !dropped )
{
- // leave placed weapons forever on net games
+
if (player->weaponowned[weapon])
return false;
@@ -197,8 +197,8 @@ P_GiveWeapon
if (weaponinfo[weapon].ammo != am_noammo)
{
- // give one clip with a dropped weapon,
- // two clips with a found weapon
+
+
if (dropped)
gaveammo = P_GiveAmmo (player, weaponinfo[weapon].ammo, 1);
else
@@ -221,10 +221,10 @@ P_GiveWeapon
-//
-// P_GiveBody
-// Returns false if the body isn't needed at all
-//
+
+
+
+
boolean
P_GiveBody
( player_t* player,
@@ -243,11 +243,11 @@ P_GiveBody
-//
-// P_GiveArmor
-// Returns false if the armor is worse
-// than the current armor.
-//
+
+
+
+
+
boolean
P_GiveArmor
( player_t* player,
@@ -257,7 +257,7 @@ P_GiveArmor
hits = armortype*100;
if (player->armorpoints >= hits)
- return false; // don't pick up
+ return false;
player->armortype = armortype;
player->armorpoints = hits;
@@ -267,9 +267,9 @@ P_GiveArmor
-//
-// P_GiveCard
-//
+
+
+
void
P_GiveCard
( player_t* player,
@@ -283,9 +283,9 @@ P_GiveCard
}
-//
-// P_GivePower
-//
+
+
+
boolean
P_GivePower
( player_t* player,
@@ -324,7 +324,7 @@ P_GivePower
}
if (player->powers[power])
- return false; // already got it
+ return false;
player->powers[power] = 1;
return true;
@@ -332,9 +332,9 @@ P_GivePower
-//
-// P_TouchSpecialThing
-//
+
+
+
void
P_TouchSpecialThing
( mobj_t* special,
@@ -350,7 +350,7 @@ P_TouchSpecialThing
if (delta > toucher->height
|| delta < -8*FRACUNIT)
{
- // out of reach
+
return;
}
@@ -358,15 +358,15 @@ P_TouchSpecialThing
sound = sfx_itemup;
player = toucher->player;
- // Dead thing touching.
- // Can happen with a sliding player corpse.
+
+
if (toucher->health <= 0)
return;
- // Identify by sprite.
+
switch (special->sprite)
{
- // armor
+
case SPR_ARM1:
if (!P_GiveArmor (player, 1))
return;
@@ -379,9 +379,9 @@ P_TouchSpecialThing
player->message = GOTMEGA;
break;
- // bonus items
+
case SPR_BON1:
- player->health++; // can go over 100%
+ player->health++;
if (player->health > 200)
player->health = 200;
player->mo->health = player->health;
@@ -389,7 +389,7 @@ P_TouchSpecialThing
break;
case SPR_BON2:
- player->armorpoints++; // can go over 100%
+ player->armorpoints++;
if (player->armorpoints > 200)
player->armorpoints = 200;
if (!player->armortype)
@@ -416,8 +416,8 @@ P_TouchSpecialThing
sound = sfx_getpow;
break;
- // cards
- // leave cards for everyone
+
+
case SPR_BKEY:
if (!player->cards[it_bluecard])
player->message = GOTBLUECARD;
@@ -466,7 +466,7 @@ P_TouchSpecialThing
break;
return;
- // medikits, heals
+
case SPR_STIM:
if (!P_GiveBody (player, 10))
return;
@@ -484,7 +484,7 @@ P_TouchSpecialThing
break;
- // power ups
+
case SPR_PINV:
if (!P_GivePower (player, pw_invulnerability))
return;
@@ -529,7 +529,7 @@ P_TouchSpecialThing
sound = sfx_getpow;
break;
- // ammo
+
case SPR_CLIP:
if (special->flags & MF_DROPPED)
{
@@ -598,7 +598,7 @@ P_TouchSpecialThing
player->message = GOTBACKPACK;
break;
- // weapons
+
case SPR_BFUG:
if (!P_GiveWeapon (player, wp_bfg, false) )
return;
@@ -661,9 +661,9 @@ P_TouchSpecialThing
}
-//
-// KillMobj
-//
+
+
+
void
P_KillMobj
( mobj_t* source,
@@ -682,7 +682,7 @@ P_KillMobj
if (source && source->player)
{
- // count for intermission
+
if (target->flags & MF_COUNTKILL)
source->player->killcount++;
@@ -691,14 +691,14 @@ P_KillMobj
}
else if (!netgame && (target->flags & MF_COUNTKILL) )
{
- // count all monster deaths,
- // even those caused by other monsters
+
+
players[0].killcount++;
}
if (target->player)
{
- // count environment kills against you
+
if (!source)
target->player->frags[target->player-players]++;
@@ -709,8 +709,8 @@ P_KillMobj
if (target->player == &players[consoleplayer]
&& automapactive)
{
- // don't die in auto map,
- // switch view prior to dying
+
+
AM_Stop ();
}
@@ -728,12 +728,12 @@ P_KillMobj
if (target->tics < 1)
target->tics = 1;
- // I_StartSound (&actor->r, actor->info->deathsound);
+
- // Drop stuff.
- // This determines the kind of object spawned
- // during the death frame of a thing.
+
+
+
switch (target->type)
{
case MT_WOLFSS:
@@ -754,23 +754,23 @@ P_KillMobj
}
mo = P_SpawnMobj (target->x,target->y,ONFLOORZ, item);
- mo->flags |= MF_DROPPED; // special versions of items
+ mo->flags |= MF_DROPPED;
}
-//
-// P_DamageMobj
-// Damages both enemies and players
-// "inflictor" is the thing that caused the damage
-// creature or missile, can be NULL (slime, etc)
-// "source" is the thing to target after taking damage
-// creature or NULL
-// Source and inflictor are the same for melee attacks.
-// Source can be NULL for slime, barrel explosions
-// and other environmental stuff.
-//
+
+
+
+
+
+
+
+
+
+
+
void
P_DamageMobj
( mobj_t* target,
@@ -785,7 +785,7 @@ P_DamageMobj
int temp;
if ( !(target->flags & MF_SHOOTABLE) )
- return; // shouldn't happen...
+ return;
if (target->health <= 0)
return;
@@ -797,12 +797,12 @@ P_DamageMobj
player = target->player;
if (player && gameskill == sk_baby)
- damage >>= 1; // take half damage in trainer mode
+ damage >>= 1;
- // Some close combat weapons should not
- // inflict thrust and push the victim out of reach,
- // thus kick away unless using the chainsaw.
+
+
+
if (inflictor
&& !(target->flags & MF_NOCLIP)
&& (!source
@@ -816,7 +816,7 @@ P_DamageMobj
thrust = damage*(FRACUNIT>>3)*100/target->info->mass;
- // make fall forwards sometimes
+
if ( damage < 40
&& damage > target->health
&& target->z - inflictor->z > 64*FRACUNIT
@@ -831,10 +831,10 @@ P_DamageMobj
target->momy += FixedMul (thrust, finesine[ang]);
}
- // player specific
+
if (player)
{
- // end of game hell hack
+
if (target->subsector->sector->special == 11
&& damage >= target->health)
{
@@ -842,8 +842,8 @@ P_DamageMobj
}
- // Below certain threshold,
- // ignore damage in GOD mode, or with INVUL power.
+
+
if ( damage < 1000
&& ( (player->cheats&CF_GODMODE)
|| player->powers[pw_invulnerability] ) )
@@ -860,22 +860,22 @@ P_DamageMobj
if (player->armorpoints <= saved)
{
- // armor is used up
+
saved = player->armorpoints;
player->armortype = 0;
}
player->armorpoints -= saved;
damage -= saved;
}
- player->health -= damage; // mirror mobj health here for Dave
+ player->health -= damage;
if (player->health < 0)
player->health = 0;
player->attacker = source;
- player->damagecount += damage; // add damage after armor / invuln
+ player->damagecount += damage;
if (player->damagecount > 100)
- player->damagecount = 100; // teleport stomp does 10k points...
+ player->damagecount = 100;
temp = damage < 100 ? damage : 100;
@@ -883,7 +883,7 @@ P_DamageMobj
I_Tactile (40,10,40+temp*2);
}
- // do the damage
+
target->health -= damage;
if (target->health <= 0)
{
@@ -894,19 +894,19 @@ P_DamageMobj
if ( (P_Random () < target->info->painchance)
&& !(target->flags&MF_SKULLFLY) )
{
- target->flags |= MF_JUSTHIT; // fight back!
+ target->flags |= MF_JUSTHIT;
P_SetMobjState (target, target->info->painstate);
}
- target->reactiontime = 0; // we're awake now...
+ target->reactiontime = 0;
if ( (!target->threshold || target->type == MT_VILE)
&& source && source != target
&& source->type != MT_VILE)
{
- // if not intent on another player,
- // chase after this one
+
+
target->target = source;
target->threshold = BASETHRESHOLD;
if (target->state == &states[target->info->spawnstate]
diff --git a/src/p_inter.h b/src/p_inter.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-//
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __P_INTER__
@@ -34,8 +34,8 @@ boolean P_GivePower(player_t*, int);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/p_lights.c b/src/p_lights.c
@@ -1,26 +1,26 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Handle Sector base lighting effects.
-// Muzzle flash?
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_lights.c,v 1.5 1997/02/03 22:45:11 b1 Exp $";
@@ -33,16 +33,16 @@ rcsid[] = "$Id: p_lights.c,v 1.5 1997/02/03 22:45:11 b1 Exp $";
#include "p_local.h"
-// State.
+
#include "r_state.h"
-//
-// FIRELIGHT FLICKER
-//
-//
-// T_FireFlicker
-//
+
+
+
+
+
+
void T_FireFlicker (fireflicker_t* flick)
{
int amount;
@@ -62,15 +62,15 @@ void T_FireFlicker (fireflicker_t* flick)
-//
-// P_SpawnFireFlicker
-//
+
+
+
void P_SpawnFireFlicker (sector_t* sector)
{
fireflicker_t* flick;
- // Note that we are resetting sector attributes.
- // Nothing special about it during gameplay.
+
+
sector->special = 0;
flick = Z_Malloc ( sizeof(*flick), PU_LEVSPEC, 0);
@@ -86,15 +86,15 @@ void P_SpawnFireFlicker (sector_t* sector)
-//
-// BROKEN LIGHT FLASHING
-//
-//
-// T_LightFlash
-// Do flashing lights.
-//
+
+
+
+
+
+
+
void T_LightFlash (lightflash_t* flash)
{
if (--flash->count)
@@ -116,16 +116,16 @@ void T_LightFlash (lightflash_t* flash)
-//
-// P_SpawnLightFlash
-// After the map has been loaded, scan each sector
-// for specials that spawn thinkers
-//
+
+
+
+
+
void P_SpawnLightFlash (sector_t* sector)
{
lightflash_t* flash;
- // nothing special about it during gameplay
+
sector->special = 0;
flash = Z_Malloc ( sizeof(*flash), PU_LEVSPEC, 0);
@@ -144,14 +144,14 @@ void P_SpawnLightFlash (sector_t* sector)
-//
-// STROBE LIGHT FLASHING
-//
-//
-// T_StrobeFlash
-//
+
+
+
+
+
+
void T_StrobeFlash (strobe_t* flash)
{
if (--flash->count)
@@ -172,11 +172,11 @@ void T_StrobeFlash (strobe_t* flash)
-//
-// P_SpawnStrobeFlash
-// After the map has been loaded, scan each sector
-// for specials that spawn thinkers
-//
+
+
+
+
+
void
P_SpawnStrobeFlash
( sector_t* sector,
@@ -199,7 +199,7 @@ P_SpawnStrobeFlash
if (flash->minlight == flash->maxlight)
flash->minlight = 0;
- // nothing special about it during gameplay
+
sector->special = 0;
if (!inSync)
@@ -209,9 +209,9 @@ P_SpawnStrobeFlash
}
-//
-// Start strobing lights (usually from a trigger)
-//
+
+
+
void EV_StartLightStrobing(line_t* line)
{
int secnum;
@@ -230,9 +230,9 @@ void EV_StartLightStrobing(line_t* line)
-//
-// TURN LINE'S TAG LIGHTS OFF
-//
+
+
+
void EV_TurnTagLightsOff(line_t* line)
{
int i;
@@ -264,9 +264,9 @@ void EV_TurnTagLightsOff(line_t* line)
}
-//
-// TURN LINE'S TAG LIGHTS ON
-//
+
+
+
void
EV_LightTurnOn
( line_t* line,
@@ -284,9 +284,9 @@ EV_LightTurnOn
{
if (sector->tag == line->tag)
{
- // bright = 0 means to search
- // for highest light level
- // surrounding sector
+
+
+
if (!bright)
{
for (j = 0;j < sector->linecount; j++)
@@ -307,16 +307,16 @@ EV_LightTurnOn
}
-//
-// Spawn glowing light
-//
+
+
+
void T_Glow(glow_t* g)
{
switch(g->direction)
{
case -1:
- // DOWN
+
g->sector->lightlevel -= GLOWSPEED;
if (g->sector->lightlevel <= g->minlight)
{
@@ -326,7 +326,7 @@ void T_Glow(glow_t* g)
break;
case 1:
- // UP
+
g->sector->lightlevel += GLOWSPEED;
if (g->sector->lightlevel >= g->maxlight)
{
diff --git a/src/p_local.h b/src/p_local.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Play functions, animation, global header.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __P_LOCAL__
@@ -33,8 +33,8 @@
#define MAXHEALTH 100
#define VIEWHEIGHT (41*FRACUNIT)
-// mapblocks are used to check movement
-// against lines and things
+
+
#define MAPBLOCKUNITS 128
#define MAPBLOCKSIZE (MAPBLOCKUNITS*FRACUNIT)
#define MAPBLOCKSHIFT (FRACBITS+7)
@@ -42,12 +42,12 @@
#define MAPBTOFRAC (MAPBLOCKSHIFT-FRACBITS)
-// player radius for movement checking
+
#define PLAYERRADIUS 16*FRACUNIT
-// MAXRADIUS is for precalculated sector block boxes
-// the spider demon is larger,
-// but we do not have any moving sectors nearby
+
+
+
#define MAXRADIUS 32*FRACUNIT
#define GRAVITY FRACUNIT
@@ -57,16 +57,16 @@
#define MELEERANGE (64*FRACUNIT)
#define MISSILERANGE (32*64*FRACUNIT)
-// follow a player exlusively for 3 seconds
+
#define BASETHRESHOLD 100
-//
-// P_TICK
-//
-// both the head and tail of the thinker list
+
+
+
+
extern thinker_t thinkercap;
@@ -75,27 +75,27 @@ void P_AddThinker (thinker_t* thinker);
void P_RemoveThinker (thinker_t* thinker);
-//
-// P_PSPR
-//
+
+
+
void P_SetupPsprites (player_t* curplayer);
void P_MovePsprites (player_t* curplayer);
void P_DropWeapon (player_t* player);
-//
-// P_USER
-//
+
+
+
void P_PlayerThink (player_t* player);
-//
-// P_MOBJ
-//
+
+
+
#define ONFLOORZ MININT
#define ONCEILINGZ MAXINT
-// Time interval for item respawning.
+
#define ITEMQUESIZE 128
extern mapthing_t itemrespawnque[ITEMQUESIZE];
@@ -123,15 +123,15 @@ mobj_t* P_SpawnMissile (mobj_t* source, mobj_t* dest, mobjtype_t type);
void P_SpawnPlayerMissile (mobj_t* source, mobjtype_t type);
-//
-// P_ENEMY
-//
+
+
+
void P_NoiseAlert (mobj_t* target, mobj_t* emmiter);
-//
-// P_MAPUTL
-//
+
+
+
typedef struct
{
fixed_t x;
@@ -143,7 +143,7 @@ typedef struct
typedef struct
{
- fixed_t frac; // along trace line
+ fixed_t frac;
boolean isaline;
union {
mobj_t* thing;
@@ -194,12 +194,12 @@ void P_UnsetThingPosition (mobj_t* thing);
void P_SetThingPosition (mobj_t* thing);
-//
-// P_MAP
-//
-// If "floatok" true, move would be ok
-// if within "tmfloorz - tmceilingz".
+
+
+
+
+
extern boolean floatok;
extern fixed_t tmfloorz;
extern fixed_t tmceilingz;
@@ -216,7 +216,7 @@ void P_UseLines (player_t* player);
boolean P_ChangeSector (sector_t* sector, boolean crunch);
-extern mobj_t* linetarget; // who got hit (or NULL)
+extern mobj_t* linetarget;
fixed_t
P_AimLineAttack
@@ -240,23 +240,23 @@ P_RadiusAttack
-//
-// P_SETUP
-//
-extern byte* rejectmatrix; // for fast sight rejection
-extern short* blockmaplump; // offsets in blockmap are from here
+
+
+
+extern byte* rejectmatrix;
+extern short* blockmaplump;
extern short* blockmap;
extern int bmapwidth;
-extern int bmapheight; // in mapblocks
+extern int bmapheight;
extern fixed_t bmaporgx;
-extern fixed_t bmaporgy; // origin of block map
-extern mobj_t** blocklinks; // for thing chains
+extern fixed_t bmaporgy;
+extern mobj_t** blocklinks;
+
+
+
-//
-// P_INTER
-//
extern int maxammo[NUMAMMO];
extern int clipammo[NUMAMMO];
@@ -273,17 +273,17 @@ P_DamageMobj
int damage );
-//
-// P_SPEC
-//
+
+
+
#include "p_spec.h"
-#endif // __P_LOCAL__
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+#endif
+
+
+
+
+
diff --git a/src/p_map.c b/src/p_map.c
@@ -1,26 +1,26 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Movement, collision handling.
-// Shooting and aiming.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_map.c,v 1.5 1997/02/03 22:45:11 b1 Exp $";
@@ -36,10 +36,10 @@ rcsid[] = "$Id: p_map.c,v 1.5 1997/02/03 22:45:11 b1 Exp $";
#include "s_sound.h"
-// State.
+
#include "doomstat.h"
#include "r_state.h"
-// Data.
+
#include "sounds.h"
@@ -50,20 +50,20 @@ fixed_t tmx;
fixed_t tmy;
-// If "floatok" true, move would be ok
-// if within "tmfloorz - tmceilingz".
+
+
boolean floatok;
fixed_t tmfloorz;
fixed_t tmceilingz;
fixed_t tmdropoffz;
-// keep track of the line that lowers the ceiling,
-// so missiles don't explode against sky hack walls
+
+
line_t* ceilingline;
-// keep track of special lines as they are hit,
-// but don't process them until the move is proven valid
+
+
#define MAXSPECIALCROSS 8
line_t* spechit[MAXSPECIALCROSS];
@@ -71,13 +71,13 @@ int numspechit;
-//
-// TELEPORT MOVE
-//
-//
-// PIT_StompThing
-//
+
+
+
+
+
+
boolean PIT_StompThing (mobj_t* thing)
{
fixed_t blockdist;
@@ -90,15 +90,15 @@ boolean PIT_StompThing (mobj_t* thing)
if ( abs(thing->x - tmx) >= blockdist
|| abs(thing->y - tmy) >= blockdist )
{
- // didn't hit it
+
return true;
}
- // don't clip against self
+
if (thing == tmthing)
return true;
- // monsters don't stomp things except on boss level
+
if ( !tmthing->player && gamemap != 30)
return false;
@@ -108,9 +108,9 @@ boolean PIT_StompThing (mobj_t* thing)
}
-//
-// P_TeleportMove
-//
+
+
+
boolean
P_TeleportMove
( mobj_t* thing,
@@ -126,7 +126,7 @@ P_TeleportMove
subsector_t* newsubsec;
- // kill anything occupying the position
+
tmthing = thing;
tmflags = thing->flags;
@@ -141,17 +141,17 @@ P_TeleportMove
newsubsec = R_PointInSubsector (x,y);
ceilingline = NULL;
- // The base floor/ceiling is from the subsector
- // that contains the point.
- // Any contacted lines the step closer together
- // will adjust them.
+
+
+
+
tmfloorz = tmdropoffz = newsubsec->sector->floorheight;
tmceilingz = newsubsec->sector->ceilingheight;
validcount++;
numspechit = 0;
- // stomp on any things contacted
+
xl = (tmbbox[BOXLEFT] - bmaporgx - MAXRADIUS)>>MAPBLOCKSHIFT;
xh = (tmbbox[BOXRIGHT] - bmaporgx + MAXRADIUS)>>MAPBLOCKSHIFT;
yl = (tmbbox[BOXBOTTOM] - bmaporgy - MAXRADIUS)>>MAPBLOCKSHIFT;
@@ -162,8 +162,8 @@ P_TeleportMove
if (!P_BlockThingsIterator(bx,by,PIT_StompThing))
return false;
- // the move is ok,
- // so link the thing into its new position
+
+
P_UnsetThingPosition (thing);
thing->floorz = tmfloorz;
@@ -177,15 +177,15 @@ P_TeleportMove
}
-//
-// MOVEMENT ITERATOR FUNCTIONS
-//
-//
-// PIT_CheckLine
-// Adjusts tmfloorz and tmceilingz as lines are contacted
-//
+
+
+
+
+
+
+
boolean PIT_CheckLine (line_t* ld)
{
if (tmbbox[BOXRIGHT] <= ld->bbox[BOXLEFT]
@@ -197,33 +197,33 @@ boolean PIT_CheckLine (line_t* ld)
if (P_BoxOnLineSide (tmbbox, ld) != -1)
return true;
- // A line has been hit
- // The moving thing's destination position will cross
- // the given line.
- // If this should not be allowed, return false.
- // If the line is special, keep track of it
- // to process later if the move is proven ok.
- // NOTE: specials are NOT sorted by order,
- // so two special lines that are only 8 pixels apart
- // could be crossed in either order.
+
+
+
+
+
+
+
+
+
if (!ld->backsector)
- return false; // one sided line
+ return false;
if (!(tmthing->flags & MF_MISSILE) )
{
if ( ld->flags & ML_BLOCKING )
- return false; // explicitly blocking everything
+ return false;
if ( !tmthing->player && ld->flags & ML_BLOCKMONSTERS )
- return false; // block monsters only
+ return false;
}
- // set openrange, opentop, openbottom
+
P_LineOpening (ld);
- // adjust floor / ceiling heights
+
if (opentop < tmceilingz)
{
tmceilingz = opentop;
@@ -236,7 +236,7 @@ boolean PIT_CheckLine (line_t* ld)
if (lowfloor < tmdropoffz)
tmdropoffz = lowfloor;
- // if contacted a special line, add it to the list
+
if (ld->special)
{
spechit[numspechit] = ld;
@@ -246,9 +246,9 @@ boolean PIT_CheckLine (line_t* ld)
return true;
}
-//
-// PIT_CheckThing
-//
+
+
+
boolean PIT_CheckThing (mobj_t* thing)
{
fixed_t blockdist;
@@ -263,15 +263,15 @@ boolean PIT_CheckThing (mobj_t* thing)
if ( abs(thing->x - tmx) >= blockdist
|| abs(thing->y - tmy) >= blockdist )
{
- // didn't hit it
+
return true;
}
- // don't clip against self
+
if (thing == tmthing)
return true;
- // check for skulls slamming into things
+
if (tmthing->flags & MF_SKULLFLY)
{
damage = ((P_Random()%8)+1)*tmthing->info->damage;
@@ -283,57 +283,57 @@ boolean PIT_CheckThing (mobj_t* thing)
P_SetMobjState (tmthing, tmthing->info->spawnstate);
- return false; // stop moving
+ return false;
}
- // missiles can hit other things
+
if (tmthing->flags & MF_MISSILE)
{
- // see if it went over / under
+
if (tmthing->z > thing->z + thing->height)
- return true; // overhead
+ return true;
if (tmthing->z+tmthing->height < thing->z)
- return true; // underneath
+ return true;
if (tmthing->target && (
tmthing->target->type == thing->type ||
(tmthing->target->type == MT_KNIGHT && thing->type == MT_BRUISER)||
(tmthing->target->type == MT_BRUISER && thing->type == MT_KNIGHT) ) )
{
- // Don't hit same species as originator.
+
if (thing == tmthing->target)
return true;
if (thing->type != MT_PLAYER)
{
- // Explode, but do no damage.
- // Let players missile other players.
+
+
return false;
}
}
if (! (thing->flags & MF_SHOOTABLE) )
{
- // didn't do any damage
+
return !(thing->flags & MF_SOLID);
}
- // damage / explode
+
damage = ((P_Random()%8)+1)*tmthing->info->damage;
P_DamageMobj (thing, tmthing, tmthing->target, damage);
- // don't traverse any more
+
return false;
}
- // check for special pickup
+
if (thing->flags & MF_SPECIAL)
{
solid = thing->flags&MF_SOLID;
if (tmflags&MF_PICKUP)
{
- // can remove thing
+
P_TouchSpecialThing (thing, tmthing);
}
return !solid;
@@ -343,34 +343,34 @@ boolean PIT_CheckThing (mobj_t* thing)
}
-//
-// MOVEMENT CLIPPING
-//
-
-//
-// P_CheckPosition
-// This is purely informative, nothing is modified
-// (except things picked up).
-//
-// in:
-// a mobj_t (can be valid or invalid)
-// a position to be checked
-// (doesn't need to be related to the mobj_t->x,y)
-//
-// during:
-// special things are touched if MF_PICKUP
-// early out on solid lines?
-//
-// out:
-// newsubsec
-// floorz
-// ceilingz
-// tmdropoffz
-// the lowest point contacted
-// (monsters won't move to a dropoff)
-// speciallines[]
-// numspeciallines
-//
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
boolean
P_CheckPosition
( mobj_t* thing,
@@ -399,10 +399,10 @@ P_CheckPosition
newsubsec = R_PointInSubsector (x,y);
ceilingline = NULL;
- // The base floor / ceiling is from the subsector
- // that contains the point.
- // Any contacted lines the step closer together
- // will adjust them.
+
+
+
+
tmfloorz = tmdropoffz = newsubsec->sector->floorheight;
tmceilingz = newsubsec->sector->ceilingheight;
@@ -412,11 +412,11 @@ P_CheckPosition
if ( tmflags & MF_NOCLIP )
return true;
- // Check things first, possibly picking things up.
- // The bounding box is extended by MAXRADIUS
- // because mobj_ts are grouped into mapblocks
- // based on their origin point, and can overlap
- // into adjacent blocks by up to MAXRADIUS units.
+
+
+
+
+
xl = (tmbbox[BOXLEFT] - bmaporgx - MAXRADIUS)>>MAPBLOCKSHIFT;
xh = (tmbbox[BOXRIGHT] - bmaporgx + MAXRADIUS)>>MAPBLOCKSHIFT;
yl = (tmbbox[BOXBOTTOM] - bmaporgy - MAXRADIUS)>>MAPBLOCKSHIFT;
@@ -427,7 +427,7 @@ P_CheckPosition
if (!P_BlockThingsIterator(bx,by,PIT_CheckThing))
return false;
- // check lines
+
xl = (tmbbox[BOXLEFT] - bmaporgx)>>MAPBLOCKSHIFT;
xh = (tmbbox[BOXRIGHT] - bmaporgx)>>MAPBLOCKSHIFT;
yl = (tmbbox[BOXBOTTOM] - bmaporgy)>>MAPBLOCKSHIFT;
@@ -442,11 +442,11 @@ P_CheckPosition
}
-//
-// P_TryMove
-// Attempt to move to a new position,
-// crossing special lines unless MF_TELEPORT is set.
-//
+
+
+
+
+
boolean
P_TryMove
( mobj_t* thing,
@@ -461,30 +461,30 @@ P_TryMove
floatok = false;
if (!P_CheckPosition (thing, x, y))
- return false; // solid wall or thing
+ return false;
if ( !(thing->flags & MF_NOCLIP) )
{
if (tmceilingz - tmfloorz < thing->height)
- return false; // doesn't fit
+ return false;
floatok = true;
if ( !(thing->flags&MF_TELEPORT)
&&tmceilingz - thing->z < thing->height)
- return false; // mobj must lower itself to fit
+ return false;
if ( !(thing->flags&MF_TELEPORT)
&& tmfloorz - thing->z > 24*FRACUNIT )
- return false; // too big a step up
+ return false;
if ( !(thing->flags&(MF_DROPOFF|MF_FLOAT))
&& tmfloorz - tmdropoffz > 24*FRACUNIT )
- return false; // don't stand over a dropoff
+ return false;
}
- // the move is ok,
- // so link the thing into its new position
+
+
P_UnsetThingPosition (thing);
oldx = thing->x;
@@ -496,12 +496,12 @@ P_TryMove
P_SetThingPosition (thing);
- // if any special lines were hit, do the effect
+
if (! (thing->flags&(MF_TELEPORT|MF_NOCLIP)) )
{
while (numspechit--)
{
- // see if the line was crossed
+
ld = spechit[numspechit];
side = P_PointOnLineSide (thing->x, thing->y, ld);
oldside = P_PointOnLineSide (oldx, oldy, ld);
@@ -517,16 +517,16 @@ P_TryMove
}
-//
-// P_ThingHeightClip
-// Takes a valid thing and adjusts the thing->floorz,
-// thing->ceilingz, and possibly thing->z.
-// This is called for all nearby monsters
-// whenever a sector changes height.
-// If the thing doesn't fit,
-// the z will be set to the lowest value
-// and false will be returned.
-//
+
+
+
+
+
+
+
+
+
+
boolean P_ThingHeightClip (mobj_t* thing)
{
boolean onfloor;
@@ -534,19 +534,19 @@ boolean P_ThingHeightClip (mobj_t* thing)
onfloor = (thing->z == thing->floorz);
P_CheckPosition (thing, thing->x, thing->y);
- // what about stranding a monster partially off an edge?
+
thing->floorz = tmfloorz;
thing->ceilingz = tmceilingz;
if (onfloor)
{
- // walking monsters rise and fall with the floor
+
thing->z = thing->floorz;
}
else
{
- // don't adjust a floating monster unless forced to
+
if (thing->z+thing->height > thing->ceilingz)
thing->z = thing->ceilingz - thing->height;
}
@@ -559,10 +559,10 @@ boolean P_ThingHeightClip (mobj_t* thing)
-//
-// SLIDE MOVE
-// Allows the player to slide along any angled walls.
-//
+
+
+
+
fixed_t bestslidefrac;
fixed_t secondslidefrac;
@@ -576,11 +576,11 @@ fixed_t tmymove;
-//
-// P_HitSlideLine
-// Adjusts the xmove / ymove
-// so that the next move will slide along the wall.
-//
+
+
+
+
+
void P_HitSlideLine (line_t* ld)
{
int side;
@@ -617,7 +617,7 @@ void P_HitSlideLine (line_t* ld)
if (deltaangle > ANG180)
deltaangle += ANG180;
- // I_Error ("SlideLine: ang>ANG180");
+
lineangle >>= ANGLETOFINESHIFT;
deltaangle >>= ANGLETOFINESHIFT;
@@ -630,9 +630,9 @@ void P_HitSlideLine (line_t* ld)
}
-//
-// PTR_SlideTraverse
-//
+
+
+
boolean PTR_SlideTraverse (intercept_t* in)
{
line_t* li;
@@ -646,29 +646,29 @@ boolean PTR_SlideTraverse (intercept_t* in)
{
if (P_PointOnLineSide (slidemo->x, slidemo->y, li))
{
- // don't hit the back side
+
return true;
}
goto isblocking;
}
- // set openrange, opentop, openbottom
+
P_LineOpening (li);
if (openrange < slidemo->height)
- goto isblocking; // doesn't fit
+ goto isblocking;
if (opentop - slidemo->z < slidemo->height)
- goto isblocking; // mobj is too high
+ goto isblocking;
if (openbottom - slidemo->z > 24*FRACUNIT )
- goto isblocking; // too big a step up
+ goto isblocking;
- // this line doesn't block movement
+
return true;
- // the line does block movement,
- // see if it is closer than best so far
+
+
isblocking:
if (in->frac < bestslidefrac)
{
@@ -678,20 +678,20 @@ boolean PTR_SlideTraverse (intercept_t* in)
bestslideline = li;
}
- return false; // stop
+ return false;
}
-//
-// P_SlideMove
-// The momx / momy move is bad, so try to slide
-// along a wall.
-// Find the first line hit, move flush to it,
-// and slide along it
-//
-// This is a kludgy mess.
-//
+
+
+
+
+
+
+
+
+
void P_SlideMove (mobj_t* mo)
{
fixed_t leadx;
@@ -707,10 +707,10 @@ void P_SlideMove (mobj_t* mo)
retry:
if (++hitcount == 3)
- goto stairstep; // don't loop forever
+ goto stairstep;
- // trace along the three leading corners
+
if (mo->momx > 0)
{
leadx = mo->x + mo->radius;
@@ -742,17 +742,17 @@ void P_SlideMove (mobj_t* mo)
P_PathTraverse ( leadx, traily, leadx+mo->momx, traily+mo->momy,
PT_ADDLINES, PTR_SlideTraverse );
- // move up to the wall
+
if (bestslidefrac == FRACUNIT+1)
{
- // the move most have hit the middle, so stairstep
+
stairstep:
if (!P_TryMove (mo, mo->x, mo->y + mo->momy))
P_TryMove (mo, mo->x + mo->momx, mo->y);
return;
}
- // fudge a bit to make sure it doesn't hit
+
bestslidefrac -= 0x800;
if (bestslidefrac > 0)
{
@@ -763,8 +763,8 @@ void P_SlideMove (mobj_t* mo)
goto stairstep;
}
- // Now continue along the wall.
- // First calculate remainder.
+
+
bestslidefrac = FRACUNIT-(bestslidefrac+0x800);
if (bestslidefrac > FRACUNIT)
@@ -776,7 +776,7 @@ void P_SlideMove (mobj_t* mo)
tmxmove = FixedMul (mo->momx, bestslidefrac);
tmymove = FixedMul (mo->momy, bestslidefrac);
- P_HitSlideLine (bestslideline); // clip the moves
+ P_HitSlideLine (bestslideline);
mo->momx = tmxmove;
mo->momy = tmymove;
@@ -788,14 +788,14 @@ void P_SlideMove (mobj_t* mo)
}
-//
-// P_LineAttack
-//
-mobj_t* linetarget; // who got hit (or NULL)
+
+
+
+mobj_t* linetarget;
mobj_t* shootthing;
-// Height if not aiming up or down
-// ???: use slope for monsters?
+
+
fixed_t shootz;
int la_damage;
@@ -803,15 +803,15 @@ fixed_t attackrange;
fixed_t aimslope;
-// slopes to top and bottom of target
+
extern fixed_t topslope;
extern fixed_t bottomslope;
-//
-// PTR_AimTraverse
-// Sets linetaget and aimslope when a target is aimed at.
-//
+
+
+
+
boolean
PTR_AimTraverse (intercept_t* in)
{
@@ -827,15 +827,15 @@ PTR_AimTraverse (intercept_t* in)
li = in->d.line;
if ( !(li->flags & ML_TWOSIDED) )
- return false; // stop
+ return false;
+
+
+
- // Crosses a two sided line.
- // A two sided line will restrict
- // the possible target ranges.
P_LineOpening (li);
if (openbottom >= opentop)
- return false; // stop
+ return false;
dist = FixedMul (attackrange, in->frac);
@@ -854,32 +854,32 @@ PTR_AimTraverse (intercept_t* in)
}
if (topslope <= bottomslope)
- return false; // stop
+ return false;
- return true; // shot continues
+ return true;
}
- // shoot a thing
+
th = in->d.thing;
if (th == shootthing)
- return true; // can't shoot self
+ return true;
if (!(th->flags&MF_SHOOTABLE))
- return true; // corpse or something
+ return true;
- // check angles to see if the thing can be aimed at
+
dist = FixedMul (attackrange, in->frac);
thingtopslope = FixedDiv (th->z+th->height - shootz , dist);
if (thingtopslope < bottomslope)
- return true; // shot over the thing
+ return true;
thingbottomslope = FixedDiv (th->z - shootz, dist);
if (thingbottomslope > topslope)
- return true; // shot under the thing
+ return true;
+
- // this thing can be hit!
if (thingtopslope > topslope)
thingtopslope = topslope;
@@ -889,13 +889,13 @@ PTR_AimTraverse (intercept_t* in)
aimslope = (thingtopslope+thingbottomslope)/2;
linetarget = th;
- return false; // don't go any farther
+ return false;
}
-//
-// PTR_ShootTraverse
-//
+
+
+
boolean PTR_ShootTraverse (intercept_t* in)
{
fixed_t x;
@@ -922,7 +922,7 @@ boolean PTR_ShootTraverse (intercept_t* in)
if ( !(li->flags & ML_TWOSIDED) )
goto hitline;
- // crosses a two sided line
+
P_LineOpening (li);
dist = FixedMul (attackrange, in->frac);
@@ -941,13 +941,13 @@ boolean PTR_ShootTraverse (intercept_t* in)
goto hitline;
}
- // shot continues
+
return true;
- // hit line
+
hitline:
- // position a bit closer
+
frac = in->frac - FixedDiv (4*FRACUNIT,attackrange);
x = trace.x + FixedMul (trace.dx, frac);
y = trace.y + FixedMul (trace.dy, frac);
@@ -955,53 +955,53 @@ boolean PTR_ShootTraverse (intercept_t* in)
if (li->frontsector->ceilingpic == skyflatnum)
{
- // don't shoot the sky!
+
if (z > li->frontsector->ceilingheight)
return false;
- // it's a sky hack wall
+
if (li->backsector && li->backsector->ceilingpic == skyflatnum)
return false;
}
- // Spawn bullet puffs.
+
P_SpawnPuff (x,y,z);
- // don't go any farther
+
return false;
}
- // shoot a thing
+
th = in->d.thing;
if (th == shootthing)
- return true; // can't shoot self
+ return true;
if (!(th->flags&MF_SHOOTABLE))
- return true; // corpse or something
+ return true;
- // check angles to see if the thing can be aimed at
+
dist = FixedMul (attackrange, in->frac);
thingtopslope = FixedDiv (th->z+th->height - shootz , dist);
if (thingtopslope < aimslope)
- return true; // shot over the thing
+ return true;
thingbottomslope = FixedDiv (th->z - shootz, dist);
if (thingbottomslope > aimslope)
- return true; // shot under the thing
+ return true;
- // hit thing
- // position a bit closer
+
+
frac = in->frac - FixedDiv (10*FRACUNIT,attackrange);
x = trace.x + FixedMul (trace.dx, frac);
y = trace.y + FixedMul (trace.dy, frac);
z = shootz + FixedMul (aimslope, FixedMul(frac, attackrange));
- // Spawn bullet puffs or blod spots,
- // depending on target type.
+
+
if (in->d.thing->flags & MF_NOBLOOD)
P_SpawnPuff (x,y,z);
else
@@ -1010,15 +1010,15 @@ boolean PTR_ShootTraverse (intercept_t* in)
if (la_damage)
P_DamageMobj (th, shootthing, shootthing, la_damage);
- // don't go any farther
+
return false;
}
-//
-// P_AimLineAttack
-//
+
+
+
fixed_t
P_AimLineAttack
( mobj_t* t1,
@@ -1035,7 +1035,7 @@ P_AimLineAttack
y2 = t1->y + (distance>>FRACBITS)*finesine[angle];
shootz = t1->z + (t1->height>>1) + 8*FRACUNIT;
- // can't shoot outside view angles
+
topslope = 100*FRACUNIT/160;
bottomslope = -100*FRACUNIT/160;
@@ -1054,11 +1054,11 @@ P_AimLineAttack
}
-//
-// P_LineAttack
-// If damage == 0, it is just a test trace
-// that will leave linetarget set.
-//
+
+
+
+
+
void
P_LineAttack
( mobj_t* t1,
@@ -1087,9 +1087,9 @@ P_LineAttack
-//
-// USE LINES
-//
+
+
+
mobj_t* usething;
boolean PTR_UseTraverse (intercept_t* in)
@@ -1103,10 +1103,10 @@ boolean PTR_UseTraverse (intercept_t* in)
{
S_StartSound (usething, sfx_noway);
- // can't use through a wall
+
return false;
}
- // not a special line, but keep checking
+
return true ;
}
@@ -1114,19 +1114,19 @@ boolean PTR_UseTraverse (intercept_t* in)
if (P_PointOnLineSide (usething->x, usething->y, in->d.line) == 1)
side = 1;
- // return false; // don't use back side
+
P_UseSpecialLine (usething, in->d.line, side);
- // can't use for than one special line in a row
+
return false;
}
-//
-// P_UseLines
-// Looks for special lines in front of the player to activate.
-//
+
+
+
+
void P_UseLines (player_t* player)
{
int angle;
@@ -1148,19 +1148,19 @@ void P_UseLines (player_t* player)
}
-//
-// RADIUS ATTACK
-//
+
+
+
mobj_t* bombsource;
mobj_t* bombspot;
int bombdamage;
-//
-// PIT_RadiusAttack
-// "bombsource" is the creature
-// that caused the explosion at "bombspot".
-//
+
+
+
+
+
boolean PIT_RadiusAttack (mobj_t* thing)
{
fixed_t dx;
@@ -1170,8 +1170,8 @@ boolean PIT_RadiusAttack (mobj_t* thing)
if (!(thing->flags & MF_SHOOTABLE) )
return true;
- // Boss spider and cyborg
- // take no damage from concussion.
+
+
if (thing->type == MT_CYBORG
|| thing->type == MT_SPIDER)
return true;
@@ -1186,11 +1186,11 @@ boolean PIT_RadiusAttack (mobj_t* thing)
dist = 0;
if (dist >= bombdamage)
- return true; // out of range
+ return true;
if ( P_CheckSight (thing, bombspot) )
{
- // must be in direct path
+
P_DamageMobj (thing, bombspot, bombsource, bombdamage - dist);
}
@@ -1198,10 +1198,10 @@ boolean PIT_RadiusAttack (mobj_t* thing)
}
-//
-// P_RadiusAttack
-// Source is the creature that caused the explosion at spot.
-//
+
+
+
+
void
P_RadiusAttack
( mobj_t* spot,
@@ -1234,38 +1234,38 @@ P_RadiusAttack
-//
-// SECTOR HEIGHT CHANGING
-// After modifying a sectors floor or ceiling height,
-// call this routine to adjust the positions
-// of all things that touch the sector.
-//
-// If anything doesn't fit anymore, true will be returned.
-// If crunch is true, they will take damage
-// as they are being crushed.
-// If Crunch is false, you should set the sector height back
-// the way it was and call P_ChangeSector again
-// to undo the changes.
-//
+
+
+
+
+
+
+
+
+
+
+
+
+
boolean crushchange;
boolean nofit;
-//
-// PIT_ChangeSector
-//
+
+
+
boolean PIT_ChangeSector (mobj_t* thing)
{
mobj_t* mo;
if (P_ThingHeightClip (thing))
{
- // keep checking
+
return true;
}
- // crunch bodies to giblets
+
if (thing->health <= 0)
{
P_SetMobjState (thing, S_GIBS);
@@ -1274,22 +1274,22 @@ boolean PIT_ChangeSector (mobj_t* thing)
thing->height = 0;
thing->radius = 0;
- // keep checking
+
return true;
}
- // crunch dropped items
+
if (thing->flags & MF_DROPPED)
{
P_RemoveMobj (thing);
- // keep checking
+
return true;
}
if (! (thing->flags & MF_SHOOTABLE) )
{
- // assume it is bloody gibs or something
+
return true;
}
@@ -1299,7 +1299,7 @@ boolean PIT_ChangeSector (mobj_t* thing)
{
P_DamageMobj(thing,NULL,NULL,10);
- // spray blood in a random direction
+
mo = P_SpawnMobj (thing->x,
thing->y,
thing->z + thing->height/2, MT_BLOOD);
@@ -1308,15 +1308,15 @@ boolean PIT_ChangeSector (mobj_t* thing)
mo->momy = (P_Random() - P_Random ())<<12;
}
- // keep checking (crush other things)
+
return true;
}
-//
-// P_ChangeSector
-//
+
+
+
boolean
P_ChangeSector
( sector_t* sector,
@@ -1328,7 +1328,7 @@ P_ChangeSector
nofit = false;
crushchange = crunch;
- // re-check heights for all things near the moving sector
+
for (x=sector->blockbox[BOXLEFT] ; x<= sector->blockbox[BOXRIGHT] ; x++)
for (y=sector->blockbox[BOXBOTTOM];y<= sector->blockbox[BOXTOP] ; y++)
P_BlockThingsIterator (x, y, PIT_ChangeSector);
diff --git a/src/p_maputl.c b/src/p_maputl.c
@@ -1,28 +1,28 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Movement/collision utility functions,
-// as used by function in p_map.c.
-// BLOCKMAP Iterator functions,
-// and some PIT_* functions to use for iteration.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_maputl.c,v 1.5 1997/02/03 22:45:11 b1 Exp $";
@@ -37,13 +37,13 @@ rcsid[] = "$Id: p_maputl.c,v 1.5 1997/02/03 22:45:11 b1 Exp $";
#include "p_local.h"
-// State.
+
#include "r_state.h"
-//
-// P_AproxDistance
-// Gives an estimation of distance (not exact)
-//
+
+
+
+
fixed_t
P_AproxDistance
@@ -58,10 +58,10 @@ P_AproxDistance
}
-//
-// P_PointOnLineSide
-// Returns 0 or 1
-//
+
+
+
+
int
P_PointOnLineSide
( fixed_t x,
@@ -95,17 +95,17 @@ P_PointOnLineSide
right = FixedMul ( dy , line->dx>>FRACBITS );
if (right < left)
- return 0; // front side
- return 1; // back side
+ return 0;
+ return 1;
}
-//
-// P_BoxOnLineSide
-// Considers the line to be infinite
-// Returns side 0 or 1, -1 if box crosses the line.
-//
+
+
+
+
+
int
P_BoxOnLineSide
( fixed_t* tmbox,
@@ -153,10 +153,10 @@ P_BoxOnLineSide
}
-//
-// P_PointOnDivlineSide
-// Returns 0 or 1.
-//
+
+
+
+
int
P_PointOnDivlineSide
( fixed_t x,
@@ -186,11 +186,11 @@ P_PointOnDivlineSide
dx = (x - line->x);
dy = (y - line->y);
- // try to quickly decide by looking at sign bits
+
if ( (line->dy ^ line->dx ^ dx ^ dy)&0x80000000 )
{
if ( (line->dy ^ dx) & 0x80000000 )
- return 1; // (left is negative)
+ return 1;
return 0;
}
@@ -198,15 +198,15 @@ P_PointOnDivlineSide
right = FixedMul ( dy>>8 , line->dx>>8 );
if (right < left)
- return 0; // front side
- return 1; // back side
+ return 0;
+ return 1;
}
-//
-// P_MakeDivline
-//
+
+
+
void
P_MakeDivline
( line_t* li,
@@ -220,13 +220,13 @@ P_MakeDivline
-//
-// P_InterceptVector
-// Returns the fractional intercept point
-// along the first divline.
-// This is only called by the addthings
-// and addlines traversers.
-//
+
+
+
+
+
+
+
fixed_t
P_InterceptVector
( divline_t* v2,
@@ -241,7 +241,7 @@ P_InterceptVector
if (den == 0)
return 0;
- // I_Error ("P_InterceptVector: parallel");
+
num =
FixedMul ( (v1->x - v2->x)>>8 ,v1->dy )
@@ -250,7 +250,7 @@ P_InterceptVector
frac = FixedDiv (num , den);
return frac;
-#else // UNUSED, float debug.
+#else
float frac;
float num;
float den;
@@ -275,7 +275,7 @@ P_InterceptVector
den = v1dy*v2dx - v1dx*v2dy;
if (den == 0)
- return 0; // parallel
+ return 0;
num = (v1x - v2x)*v1dy + (v2y - v1y)*v1dx;
frac = num / den;
@@ -285,12 +285,12 @@ P_InterceptVector
}
-//
-// P_LineOpening
-// Sets opentop and openbottom to the window
-// through a two sided line.
-// OPTIMIZE: keep this precalculated
-//
+
+
+
+
+
+
fixed_t opentop;
fixed_t openbottom;
fixed_t openrange;
@@ -304,7 +304,7 @@ void P_LineOpening (line_t* linedef)
if (linedef->sidenum[1] == -1)
{
- // single sided line
+
openrange = 0;
return;
}
@@ -332,18 +332,18 @@ void P_LineOpening (line_t* linedef)
}
-//
-// THING POSITION SETTING
-//
-//
-// P_UnsetThingPosition
-// Unlinks a thing from block map and sectors.
-// On each position change, BLOCKMAP and other
-// lookups maintaining lists ot things inside
-// these structures need to be updated.
-//
+
+
+
+
+
+
+
+
+
+
void P_UnsetThingPosition (mobj_t* thing)
{
int blockx;
@@ -351,8 +351,8 @@ void P_UnsetThingPosition (mobj_t* thing)
if ( ! (thing->flags & MF_NOSECTOR) )
{
- // inert things don't need to be in blockmap?
- // unlink from subsector
+
+
if (thing->snext)
thing->snext->sprev = thing->sprev;
@@ -364,8 +364,8 @@ void P_UnsetThingPosition (mobj_t* thing)
if ( ! (thing->flags & MF_NOBLOCKMAP) )
{
- // inert things don't need to be in blockmap
- // unlink from block map
+
+
if (thing->bnext)
thing->bnext->bprev = thing->bprev;
@@ -386,12 +386,12 @@ void P_UnsetThingPosition (mobj_t* thing)
}
-//
-// P_SetThingPosition
-// Links a thing into both a block and a subsector
-// based on it's x y.
-// Sets thing->subsector properly
-//
+
+
+
+
+
+
void
P_SetThingPosition (mobj_t* thing)
{
@@ -402,13 +402,13 @@ P_SetThingPosition (mobj_t* thing)
mobj_t** link;
- // link into subsector
+
ss = R_PointInSubsector (thing->x,thing->y);
thing->subsector = ss;
if ( ! (thing->flags & MF_NOSECTOR) )
{
- // invisible things don't go into the sector links
+
sec = ss->sector;
thing->sprev = NULL;
@@ -421,10 +421,10 @@ P_SetThingPosition (mobj_t* thing)
}
- // link into blockmap
+
if ( ! (thing->flags & MF_NOBLOCKMAP) )
{
- // inert things don't need to be in blockmap
+
blockx = (thing->x - bmaporgx)>>MAPBLOCKSHIFT;
blocky = (thing->y - bmaporgy)>>MAPBLOCKSHIFT;
@@ -443,7 +443,7 @@ P_SetThingPosition (mobj_t* thing)
}
else
{
- // thing is off the map
+
thing->bnext = thing->bprev = NULL;
}
}
@@ -451,23 +451,23 @@ P_SetThingPosition (mobj_t* thing)
-//
-// BLOCK MAP ITERATORS
-// For each line/thing in the given mapblock,
-// call the passed PIT_* function.
-// If the function returns false,
-// exit with false without checking anything else.
-//
-//
-// P_BlockLinesIterator
-// The validcount flags are used to avoid checking lines
-// that are marked in multiple mapblocks,
-// so increment validcount before the first call
-// to P_BlockLinesIterator, then make one or more calls
-// to it.
-//
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
boolean
P_BlockLinesIterator
( int x,
@@ -495,20 +495,20 @@ P_BlockLinesIterator
ld = &lines[*list];
if (ld->validcount == validcount)
- continue; // line has already been checked
+ continue;
ld->validcount = validcount;
if ( !func(ld) )
return false;
}
- return true; // everything was checked
+ return true;
}
-//
-// P_BlockThingsIterator
-//
+
+
+
boolean
P_BlockThingsIterator
( int x,
@@ -538,9 +538,9 @@ P_BlockThingsIterator
-//
-// INTERCEPT ROUTINES
-//
+
+
+
intercept_t intercepts[MAXINTERCEPTS];
intercept_t* intercept_p;
@@ -548,16 +548,16 @@ divline_t trace;
boolean earlyout;
int ptflags;
-//
-// PIT_AddLineIntercepts.
-// Looks for lines in the given block
-// that intercept the given trace
-// to add to the intercepts list.
-//
-// A line is crossed if its endpoints
-// are on opposite sides of the trace.
-// Returns true if earlyout and a solid line hit.
-//
+
+
+
+
+
+
+
+
+
+
boolean
PIT_AddLineIntercepts (line_t* ld)
{
@@ -566,7 +566,7 @@ PIT_AddLineIntercepts (line_t* ld)
fixed_t frac;
divline_t dl;
- // avoid precision problems with two routines
+
if ( trace.dx > FRACUNIT*16
|| trace.dy > FRACUNIT*16
|| trace.dx < -FRACUNIT*16
@@ -582,21 +582,21 @@ PIT_AddLineIntercepts (line_t* ld)
}
if (s1 == s2)
- return true; // line isn't crossed
+ return true;
+
- // hit the line
P_MakeDivline (ld, &dl);
frac = P_InterceptVector (&trace, &dl);
if (frac < 0)
- return true; // behind source
+ return true;
- // try to early out the check
+
if (earlyout
&& frac < FRACUNIT
&& !ld->backsector)
{
- return false; // stop checking
+ return false;
}
@@ -605,14 +605,14 @@ PIT_AddLineIntercepts (line_t* ld)
intercept_p->d.line = ld;
intercept_p++;
- return true; // continue
+ return true;
}
-//
-// PIT_AddThingIntercepts
-//
+
+
+
boolean PIT_AddThingIntercepts (mobj_t* thing)
{
fixed_t x1;
@@ -631,7 +631,7 @@ boolean PIT_AddThingIntercepts (mobj_t* thing)
tracepositive = (trace.dx ^ trace.dy)>0;
- // check a corner to corner crossection for hit
+
if (tracepositive)
{
x1 = thing->x - thing->radius;
@@ -653,7 +653,7 @@ boolean PIT_AddThingIntercepts (mobj_t* thing)
s2 = P_PointOnDivlineSide (x2, y2, &trace);
if (s1 == s2)
- return true; // line isn't crossed
+ return true;
dl.x = x1;
dl.y = y1;
@@ -663,22 +663,22 @@ boolean PIT_AddThingIntercepts (mobj_t* thing)
frac = P_InterceptVector (&trace, &dl);
if (frac < 0)
- return true; // behind source
+ return true;
intercept_p->frac = frac;
intercept_p->isaline = false;
intercept_p->d.thing = thing;
intercept_p++;
- return true; // keep going
+ return true;
}
-//
-// P_TraverseIntercepts
-// Returns true if the traverser function returns true
-// for all lines.
-//
+
+
+
+
+
boolean
P_TraverseIntercepts
( traverser_t func,
@@ -691,7 +691,7 @@ P_TraverseIntercepts
count = intercept_p - intercepts;
- in = 0; // shut up compiler warning
+ in = 0;
while (count--)
{
@@ -706,11 +706,11 @@ P_TraverseIntercepts
}
if (dist > maxfrac)
- return true; // checked everything in range
+ return true;
-#if 0 // UNUSED
+#if 0
{
- // don't check these yet, there may be others inserted
+
in = scan = intercepts;
for ( scan = intercepts ; scan<intercept_p ; scan++)
if (scan->frac > maxfrac)
@@ -721,24 +721,24 @@ P_TraverseIntercepts
#endif
if ( !func (in) )
- return false; // don't bother going farther
+ return false;
in->frac = MAXINT;
}
- return true; // everything was traversed
+ return true;
}
-//
-// P_PathTraverse
-// Traces a line from x1,y1 to x2,y2,
-// calling the traverser function for each.
-// Returns true if the traverser function returns true
-// for all lines.
-//
+
+
+
+
+
+
+
boolean
P_PathTraverse
( fixed_t x1,
@@ -775,10 +775,10 @@ P_PathTraverse
intercept_p = intercepts;
if ( ((x1-bmaporgx)&(MAPBLOCKSIZE-1)) == 0)
- x1 += FRACUNIT; // don't side exactly on a line
+ x1 += FRACUNIT;
if ( ((y1-bmaporgy)&(MAPBLOCKSIZE-1)) == 0)
- y1 += FRACUNIT; // don't side exactly on a line
+ y1 += FRACUNIT;
trace.x = x1;
trace.y = y1;
@@ -837,9 +837,9 @@ P_PathTraverse
}
xintercept = (x1>>MAPBTOFRAC) + FixedMul (partial, xstep);
- // Step through map blocks.
- // Count is present to prevent a round off error
- // from skipping the break.
+
+
+
mapx = xt1;
mapy = yt1;
@@ -848,13 +848,13 @@ P_PathTraverse
if (flags & PT_ADDLINES)
{
if (!P_BlockLinesIterator (mapx, mapy,PIT_AddLineIntercepts))
- return false; // early out
+ return false;
}
if (flags & PT_ADDTHINGS)
{
if (!P_BlockThingsIterator (mapx, mapy,PIT_AddThingIntercepts))
- return false; // early out
+ return false;
}
if (mapx == xt2
@@ -875,7 +875,7 @@ P_PathTraverse
}
}
- // go through the sorted list
+
return P_TraverseIntercepts ( trav, FRACUNIT );
}
diff --git a/src/p_mobj.c b/src/p_mobj.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Moving object handling. Spawn functions.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_mobj.c,v 1.5 1997/02/03 22:45:12 b1 Exp $";
@@ -44,10 +44,10 @@ void G_PlayerReborn (int player);
void P_SpawnMapThing (mapthing_t* mthing);
-//
-// P_SetMobjState
-// Returns true if the mobj is still present.
-//
+
+
+
+
int test;
boolean
@@ -72,8 +72,8 @@ P_SetMobjState
mobj->sprite = st->sprite;
mobj->frame = st->frame;
- // Modified handling.
- // Call action functions when the state is set
+
+
if (st->action.acp1)
st->action.acp1(mobj);
@@ -84,9 +84,9 @@ P_SetMobjState
}
-//
-// P_ExplodeMissile
-//
+
+
+
void P_ExplodeMissile (mobj_t* mo)
{
mo->momx = mo->momy = mo->momz = 0;
@@ -105,9 +105,9 @@ void P_ExplodeMissile (mobj_t* mo)
}
-//
-// P_XYMovement
-//
+
+
+
#define STOPSPEED 0x1000
#define FRICTION 0xe800
@@ -123,7 +123,7 @@ void P_XYMovement (mobj_t* mo)
{
if (mo->flags & MF_SKULLFLY)
{
- // the skull slammed into something
+
mo->flags &= ~MF_SKULLFLY;
mo->momx = mo->momy = mo->momz = 0;
@@ -165,21 +165,21 @@ void P_XYMovement (mobj_t* mo)
if (!P_TryMove (mo, ptryx, ptryy))
{
- // blocked move
+
if (mo->player)
- { // try to slide along it
+ {
P_SlideMove (mo);
}
else if (mo->flags & MF_MISSILE)
{
- // explode a missile
+
if (ceilingline &&
ceilingline->backsector &&
ceilingline->backsector->ceilingpic == skyflatnum)
{
- // Hack to prevent missiles exploding
- // against the sky.
- // Does not handle sky floors.
+
+
+
P_RemoveMobj (mo);
return;
}
@@ -190,24 +190,24 @@ void P_XYMovement (mobj_t* mo)
}
} while (xmove || ymove);
- // slow down
+
if (player && player->cheats & CF_NOMOMENTUM)
{
- // debug option for no sliding at all
+
mo->momx = mo->momy = 0;
return;
}
if (mo->flags & (MF_MISSILE | MF_SKULLFLY) )
- return; // no friction for missiles ever
+ return;
if (mo->z > mo->floorz)
- return; // no friction when airborne
+ return;
if (mo->flags & MF_CORPSE)
{
- // do not stop sliding
- // if halfway off a step with some momentum
+
+
if (mo->momx > FRACUNIT/4
|| mo->momx < -FRACUNIT/4
|| mo->momy > FRACUNIT/4
@@ -226,7 +226,7 @@ void P_XYMovement (mobj_t* mo)
|| (player->cmd.forwardmove== 0
&& player->cmd.sidemove == 0 ) ) )
{
- // if in a walking frame, stop moving
+
if ( player&&(unsigned)((player->mo->state - states)- S_PLAY_RUN1) < 4)
P_SetMobjState (player->mo, S_PLAY);
@@ -240,15 +240,15 @@ void P_XYMovement (mobj_t* mo)
}
}
-//
-// P_ZMovement
-//
+
+
+
void P_ZMovement (mobj_t* mo)
{
fixed_t dist;
fixed_t delta;
- // check for smooth step up
+
if (mo->player && mo->z < mo->floorz)
{
mo->player->viewheight -= mo->floorz-mo->z;
@@ -257,13 +257,13 @@ void P_ZMovement (mobj_t* mo)
= (VIEWHEIGHT - mo->player->viewheight)>>3;
}
- // adjust height
+
mo->z += mo->momz;
if ( mo->flags & MF_FLOAT
&& mo->target)
{
- // float down towards target if too close
+
if ( !(mo->flags & MF_SKULLFLY)
&& !(mo->flags & MF_INFLOAT) )
{
@@ -280,17 +280,17 @@ void P_ZMovement (mobj_t* mo)
}
- // clip movement
+
if (mo->z <= mo->floorz)
{
- // hit the floor
+
- // Note (id):
- // somebody left this after the setting momz to 0,
- // kinda useless there.
+
+
+
if (mo->flags & MF_SKULLFLY)
{
- // the skull slammed into something
+
mo->momz = -mo->momz;
}
@@ -299,10 +299,10 @@ void P_ZMovement (mobj_t* mo)
if (mo->player
&& mo->momz < -GRAVITY*8)
{
- // Squat down.
- // Decrease viewheight for a moment
- // after hitting the ground (hard),
- // and utter appropriate sound.
+
+
+
+
mo->player->deltaviewheight = mo->momz>>3;
S_StartSound (mo, sfx_oof);
}
@@ -327,7 +327,7 @@ void P_ZMovement (mobj_t* mo)
if (mo->z + mo->height > mo->ceilingz)
{
- // hit the ceiling
+
if (mo->momz > 0)
mo->momz = 0;
{
@@ -335,7 +335,7 @@ void P_ZMovement (mobj_t* mo)
}
if (mo->flags & MF_SKULLFLY)
- { // the skull slammed into something
+ {
mo->momz = -mo->momz;
}
@@ -350,9 +350,9 @@ void P_ZMovement (mobj_t* mo)
-//
-// P_NightmareRespawn
-//
+
+
+
void
P_NightmareRespawn (mobj_t* mobj)
{
@@ -366,35 +366,35 @@ P_NightmareRespawn (mobj_t* mobj)
x = mobj->spawnpoint.x << FRACBITS;
y = mobj->spawnpoint.y << FRACBITS;
- // somthing is occupying it's position?
+
if (!P_CheckPosition (mobj, x, y) )
- return; // no respwan
+ return;
- // spawn a teleport fog at old spot
- // because of removal of the body?
+
+
mo = P_SpawnMobj (mobj->x,
mobj->y,
mobj->subsector->sector->floorheight , MT_TFOG);
- // initiate teleport sound
+
S_StartSound (mo, sfx_telept);
- // spawn a teleport fog at the new spot
+
ss = R_PointInSubsector (x,y);
mo = P_SpawnMobj (x, y, ss->sector->floorheight , MT_TFOG);
S_StartSound (mo, sfx_telept);
- // spawn the new monster
+
mthing = &mobj->spawnpoint;
- // spawn it
+
if (mobj->info->flags & MF_SPAWNCEILING)
z = ONCEILINGZ;
else
z = ONFLOORZ;
- // inherit attributes from deceased one
+
mo = P_SpawnMobj (x,y,z, mobj->type);
mo->spawnpoint = mobj->spawnpoint;
mo->angle = ANG45 * (mthing->angle/45);
@@ -404,52 +404,52 @@ P_NightmareRespawn (mobj_t* mobj)
mo->reactiontime = 18;
- // remove the old monster,
+
P_RemoveMobj (mobj);
}
-//
-// P_MobjThinker
-//
+
+
+
void P_MobjThinker (mobj_t* mobj)
{
- // momentum movement
+
if (mobj->momx
|| mobj->momy
|| (mobj->flags&MF_SKULLFLY) )
{
P_XYMovement (mobj);
- // FIXME: decent NOP/NULL/Nil function pointer please.
+
if (mobj->thinker.function.acv == (actionf_v) (-1))
- return; // mobj was removed
+ return;
}
if ( (mobj->z != mobj->floorz)
|| mobj->momz )
{
P_ZMovement (mobj);
- // FIXME: decent NOP/NULL/Nil function pointer please.
+
if (mobj->thinker.function.acv == (actionf_v) (-1))
- return; // mobj was removed
+ return;
}
- // cycle through states,
- // calling action functions at transitions
+
+
if (mobj->tics != -1)
{
mobj->tics--;
- // you can cycle through multiple states in a tic
+
if (!mobj->tics)
if (!P_SetMobjState (mobj, mobj->state->nextstate) )
- return; // freed itself
+ return;
}
else
{
- // check for nightmare respawn
+
if (! (mobj->flags & MF_COUNTKILL) )
return;
@@ -473,9 +473,9 @@ void P_MobjThinker (mobj_t* mobj)
}
-//
-// P_SpawnMobj
-//
+
+
+
mobj_t*
P_SpawnMobj
( fixed_t x,
@@ -504,8 +504,8 @@ P_SpawnMobj
mobj->reactiontime = info->reactiontime;
mobj->lastlook = P_Random () % MAXPLAYERS;
- // do not set the state with P_SetMobjState,
- // because action routines can not be called yet
+
+
st = &states[info->spawnstate];
mobj->state = st;
@@ -513,7 +513,7 @@ P_SpawnMobj
mobj->sprite = st->sprite;
mobj->frame = st->frame;
- // set subsector and/or block links
+
P_SetThingPosition (mobj);
mobj->floorz = mobj->subsector->sector->floorheight;
@@ -534,9 +534,9 @@ P_SpawnMobj
}
-//
-// P_RemoveMobj
-//
+
+
+
mapthing_t itemrespawnque[ITEMQUESIZE];
int itemrespawntime[ITEMQUESIZE];
int iquehead;
@@ -554,27 +554,27 @@ void P_RemoveMobj (mobj_t* mobj)
itemrespawntime[iquehead] = leveltime;
iquehead = (iquehead+1)&(ITEMQUESIZE-1);
- // lose one off the end?
+
if (iquehead == iquetail)
iquetail = (iquetail+1)&(ITEMQUESIZE-1);
}
- // unlink from sector and block lists
+
P_UnsetThingPosition (mobj);
- // stop any playing sound
+
S_StopSound (mobj);
- // free block
+
P_RemoveThinker ((thinker_t*)mobj);
}
-//
-// P_RespawnSpecials
-//
+
+
+
void P_RespawnSpecials (void)
{
fixed_t x;
@@ -587,15 +587,15 @@ void P_RespawnSpecials (void)
int i;
- // only respawn items in deathmatch
+
if (deathmatch != 2)
- return; //
+ return;
- // nothing left to respawn?
+
if (iquehead == iquetail)
return;
- // wait at least 30 seconds
+
if (leveltime - itemrespawntime[iquetail] < 30*35)
return;
@@ -604,19 +604,19 @@ void P_RespawnSpecials (void)
x = mthing->x << FRACBITS;
y = mthing->y << FRACBITS;
- // spawn a teleport fog at the new spot
+
ss = R_PointInSubsector (x,y);
mo = P_SpawnMobj (x, y, ss->sector->floorheight , MT_IFOG);
S_StartSound (mo, sfx_itmbk);
- // find which type to spawn
+
for (i=0 ; i< NUMMOBJTYPES ; i++)
{
if (mthing->type == mobjinfo[i].doomednum)
break;
}
- // spawn it
+
if (mobjinfo[i].flags & MF_SPAWNCEILING)
z = ONCEILINGZ;
else
@@ -626,19 +626,19 @@ void P_RespawnSpecials (void)
mo->spawnpoint = *mthing;
mo->angle = ANG45 * (mthing->angle/45);
- // pull it from the que
+
iquetail = (iquetail+1)&(ITEMQUESIZE-1);
}
-//
-// P_SpawnPlayer
-// Called when a player is spawned on the level.
-// Most of the player structure stays unchanged
-// between levels.
-//
+
+
+
+
+
+
void P_SpawnPlayer (mapthing_t* mthing)
{
player_t* p;
@@ -650,7 +650,7 @@ void P_SpawnPlayer (mapthing_t* mthing)
int i;
- // not playing?
+
if (!playeringame[mthing->type-1])
return;
@@ -664,7 +664,7 @@ void P_SpawnPlayer (mapthing_t* mthing)
z = ONFLOORZ;
mobj = P_SpawnMobj (x,y,z, MT_PLAYER);
- // set color translations for player sprites
+
if (mthing->type > 1)
mobj->flags |= (mthing->type-1)<<MF_TRANSSHIFT;
@@ -682,29 +682,29 @@ void P_SpawnPlayer (mapthing_t* mthing)
p->fixedcolormap = 0;
p->viewheight = VIEWHEIGHT;
- // setup gun psprite
+
P_SetupPsprites (p);
- // give all cards in death match mode
+
if (deathmatch)
for (i=0 ; i<NUMCARDS ; i++)
p->cards[i] = true;
if (mthing->type-1 == consoleplayer)
{
- // wake up the status bar
+
ST_Start ();
- // wake up the heads up text
+
HU_Start ();
}
}
-//
-// P_SpawnMapThing
-// The fields of the mapthing should
-// already be in host byte order.
-//
+
+
+
+
+
void P_SpawnMapThing (mapthing_t* mthing)
{
int i;
@@ -714,7 +714,7 @@ void P_SpawnMapThing (mapthing_t* mthing)
fixed_t y;
fixed_t z;
- // count deathmatch start positions
+
if (mthing->type == 11)
{
if (deathmatch_p < &deathmatchstarts[10])
@@ -725,10 +725,10 @@ void P_SpawnMapThing (mapthing_t* mthing)
return;
}
- // check for players specially
+
if (mthing->type <= 4)
{
- // save spots for respawning in network games
+
playerstarts[mthing->type-1] = *mthing;
if (!deathmatch)
P_SpawnPlayer (mthing);
@@ -736,7 +736,7 @@ void P_SpawnMapThing (mapthing_t* mthing)
return;
}
- // check for apropriate skill level
+
if (!netgame && (mthing->options & 16) )
return;
@@ -750,7 +750,7 @@ void P_SpawnMapThing (mapthing_t* mthing)
if (!(mthing->options & bit) )
return;
- // find which type to spawn
+
for (i=0 ; i< NUMMOBJTYPES ; i++)
if (mthing->type == mobjinfo[i].doomednum)
break;
@@ -760,11 +760,11 @@ void P_SpawnMapThing (mapthing_t* mthing)
mthing->type,
mthing->x, mthing->y);
- // don't spawn keycards and players in deathmatch
+
if (deathmatch && mobjinfo[i].flags & MF_NOTDMATCH)
return;
- // don't spawn any monsters if -nomonsters
+
if (nomonsters
&& ( i == MT_SKULL
|| (mobjinfo[i].flags & MF_COUNTKILL)) )
@@ -772,7 +772,7 @@ void P_SpawnMapThing (mapthing_t* mthing)
return;
}
- // spawn it
+
x = mthing->x << FRACBITS;
y = mthing->y << FRACBITS;
@@ -798,14 +798,14 @@ void P_SpawnMapThing (mapthing_t* mthing)
-//
-// GAME SPAWN FUNCTIONS
-//
-//
-// P_SpawnPuff
-//
+
+
+
+
+
+
extern fixed_t attackrange;
void
@@ -825,16 +825,16 @@ P_SpawnPuff
if (th->tics < 1)
th->tics = 1;
- // don't make punches spark on the wall
+
if (attackrange == MELEERANGE)
P_SetMobjState (th, S_PUFF3);
}
-//
-// P_SpawnBlood
-//
+
+
+
void
P_SpawnBlood
( fixed_t x,
@@ -860,19 +860,19 @@ P_SpawnBlood
-//
-// P_CheckMissileSpawn
-// Moves the missile forward a bit
-// and possibly explodes it right there.
-//
+
+
+
+
+
void P_CheckMissileSpawn (mobj_t* th)
{
th->tics -= P_Random()&3;
if (th->tics < 1)
th->tics = 1;
- // move a little forward so an angle can
- // be computed if it immediately explodes
+
+
th->x += (th->momx>>1);
th->y += (th->momy>>1);
th->z += (th->momz>>1);
@@ -882,9 +882,9 @@ void P_CheckMissileSpawn (mobj_t* th)
}
-//
-// P_SpawnMissile
-//
+
+
+
mobj_t*
P_SpawnMissile
( mobj_t* source,
@@ -902,10 +902,10 @@ P_SpawnMissile
if (th->info->seesound)
S_StartSound (th, th->info->seesound);
- th->target = source; // where it came from
+ th->target = source;
an = R_PointToAngle2 (source->x, source->y, dest->x, dest->y);
- // fuzzy player
+
if (dest->flags & MF_SHADOW)
an += (P_Random()-P_Random())<<20;
@@ -927,10 +927,10 @@ P_SpawnMissile
}
-//
-// P_SpawnPlayerMissile
-// Tries to aim at a nearby monster
-//
+
+
+
+
void
P_SpawnPlayerMissile
( mobj_t* source,
@@ -944,7 +944,7 @@ P_SpawnPlayerMissile
fixed_t z;
fixed_t slope;
- // see which target is to be aimed at
+
an = source->angle;
slope = P_AimLineAttack (source, an, 16*64*FRACUNIT);
diff --git a/src/p_mobj.h b/src/p_mobj.h
@@ -1,42 +1,42 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Map Objects, MObj, definition and handling.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __P_MOBJ__
#define __P_MOBJ__
-// Basics.
+
#include "tables.h"
#include "m_fixed.h"
-// We need the thinker_t stuff.
+
#include "d_think.h"
-// We need the WAD data structure for Map things,
-// from the THINGS lump.
+
+
#include "doomdata.h"
-// States are tied to finite states are
-// tied to animation frames.
-// Needs precompiled tables/data structures.
+
+
+
#include "info.h"
@@ -47,240 +47,240 @@
-//
-// NOTES: mobj_t
-//
-// mobj_ts are used to tell the refresh where to draw an image,
-// tell the world simulation when objects are contacted,
-// and tell the sound driver how to position a sound.
-//
-// The refresh uses the next and prev links to follow
-// lists of things in sectors as they are being drawn.
-// The sprite, frame, and angle elements determine which patch_t
-// is used to draw the sprite if it is visible.
-// The sprite and frame values are allmost allways set
-// from state_t structures.
-// The statescr.exe utility generates the states.h and states.c
-// files that contain the sprite/frame numbers from the
-// statescr.txt source file.
-// The xyz origin point represents a point at the bottom middle
-// of the sprite (between the feet of a biped).
-// This is the default origin position for patch_ts grabbed
-// with lumpy.exe.
-// A walking creature will have its z equal to the floor
-// it is standing on.
-//
-// The sound code uses the x,y, and subsector fields
-// to do stereo positioning of any sound effited by the mobj_t.
-//
-// The play simulation uses the blocklinks, x,y,z, radius, height
-// to determine when mobj_ts are touching each other,
-// touching lines in the map, or hit by trace lines (gunshots,
-// lines of sight, etc).
-// The mobj_t->flags element has various bit flags
-// used by the simulation.
-//
-// Every mobj_t is linked into a single sector
-// based on its origin coordinates.
-// The subsector_t is found with R_PointInSubsector(x,y),
-// and the sector_t can be found with subsector->sector.
-// The sector links are only used by the rendering code,
-// the play simulation does not care about them at all.
-//
-// Any mobj_t that needs to be acted upon by something else
-// in the play world (block movement, be shot, etc) will also
-// need to be linked into the blockmap.
-// If the thing has the MF_NOBLOCK flag set, it will not use
-// the block links. It can still interact with other things,
-// but only as the instigator (missiles will run into other
-// things, but nothing can run into a missile).
-// Each block in the grid is 128*128 units, and knows about
-// every line_t that it contains a piece of, and every
-// interactable mobj_t that has its origin contained.
-//
-// A valid mobj_t is a mobj_t that has the proper subsector_t
-// filled in for its xy coordinates and is linked into the
-// sector from which the subsector was made, or has the
-// MF_NOSECTOR flag set (the subsector_t needs to be valid
-// even if MF_NOSECTOR is set), and is linked into a blockmap
-// block or has the MF_NOBLOCKMAP flag set.
-// Links should only be modified by the P_[Un]SetThingPosition()
-// functions.
-// Do not change the MF_NO? flags while a thing is valid.
-//
-// Any questions?
-//
-
-//
-// Misc. mobj flags
-//
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
typedef enum
{
- // Call P_SpecialThing when touched.
+
MF_SPECIAL = 1,
- // Blocks.
+
MF_SOLID = 2,
- // Can be hit.
+
MF_SHOOTABLE = 4,
- // Don't use the sector links (invisible but touchable).
+
MF_NOSECTOR = 8,
- // Don't use the blocklinks (inert but displayable)
+
MF_NOBLOCKMAP = 16,
- // Not to be activated by sound, deaf monster.
+
MF_AMBUSH = 32,
- // Will try to attack right back.
+
MF_JUSTHIT = 64,
- // Will take at least one step before attacking.
+
MF_JUSTATTACKED = 128,
- // On level spawning (initial position),
- // hang from ceiling instead of stand on floor.
+
+
MF_SPAWNCEILING = 256,
- // Don't apply gravity (every tic),
- // that is, object will float, keeping current height
- // or changing it actively.
+
+
+
MF_NOGRAVITY = 512,
- // Movement flags.
- // This allows jumps from high places.
+
+
MF_DROPOFF = 0x400,
- // For players, will pick up items.
+
MF_PICKUP = 0x800,
- // Player cheat. ???
+
MF_NOCLIP = 0x1000,
- // Player: keep info about sliding along walls.
+
MF_SLIDE = 0x2000,
- // Allow moves to any height, no gravity.
- // For active floaters, e.g. cacodemons, pain elementals.
+
+
MF_FLOAT = 0x4000,
- // Don't cross lines
- // ??? or look at heights on teleport.
+
+
MF_TELEPORT = 0x8000,
- // Don't hit same species, explode on block.
- // Player missiles as well as fireballs of various kinds.
+
+
MF_MISSILE = 0x10000,
- // Dropped by a demon, not level spawned.
- // E.g. ammo clips dropped by dying former humans.
+
+
MF_DROPPED = 0x20000,
- // Use fuzzy draw (shadow demons or spectres),
- // temporary player invisibility powerup.
+
+
MF_SHADOW = 0x40000,
- // Flag: don't bleed when shot (use puff),
- // barrels and shootable furniture shall not bleed.
+
+
MF_NOBLOOD = 0x80000,
- // Don't stop moving halfway off a step,
- // that is, have dead bodies slide down all the way.
+
+
MF_CORPSE = 0x100000,
- // Floating to a height for a move, ???
- // don't auto float to target's height.
+
+
MF_INFLOAT = 0x200000,
- // On kill, count this enemy object
- // towards intermission kill total.
- // Happy gathering.
+
+
+
MF_COUNTKILL = 0x400000,
- // On picking up, count this item object
- // towards intermission item total.
+
+
MF_COUNTITEM = 0x800000,
- // Special handling: skull in flight.
- // Neither a cacodemon nor a missile.
+
+
MF_SKULLFLY = 0x1000000,
- // Don't spawn this object
- // in death match mode (e.g. key cards).
+
+
MF_NOTDMATCH = 0x2000000,
- // Player sprites in multiplayer modes are modified
- // using an internal color lookup table for re-indexing.
- // If 0x4 0x8 or 0xc,
- // use a translation table for player colormaps
+
+
+
+
MF_TRANSLATION = 0xc000000,
- // Hmm ???.
+
MF_TRANSSHIFT = 26
} mobjflag_t;
-// Map Object definition.
+
typedef struct mobj_s
{
- // List: thinker links.
+
thinker_t thinker;
- // Info for drawing: position.
+
fixed_t x;
fixed_t y;
fixed_t z;
- // More list: links in sector (if needed)
+
struct mobj_s* snext;
struct mobj_s* sprev;
- //More drawing info: to determine current sprite.
- angle_t angle; // orientation
- spritenum_t sprite; // used to find patch_t and flip value
- int frame; // might be ORed with FF_FULLBRIGHT
+
+ angle_t angle;
+ spritenum_t sprite;
+ int frame;
- // Interaction info, by BLOCKMAP.
- // Links in blocks (if needed).
+
+
struct mobj_s* bnext;
struct mobj_s* bprev;
struct subsector_s* subsector;
- // The closest interval over all contacted Sectors.
+
fixed_t floorz;
fixed_t ceilingz;
- // For movement checking.
+
fixed_t radius;
fixed_t height;
- // Momentums, used to update position.
+
fixed_t momx;
fixed_t momy;
fixed_t momz;
- // If == validcount, already checked.
+
int validcount;
mobjtype_t type;
- mobjinfo_t* info; // &mobjinfo[mobj->type]
+ mobjinfo_t* info;
- int tics; // state tic counter
+ int tics;
state_t* state;
int flags;
int health;
- // Movement direction, movement generation (zig-zagging).
- int movedir; // 0-7
- int movecount; // when 0, select a new dir
+
+ int movedir;
+ int movecount;
- // Thing being chased/attacked (or NULL),
- // also the originator for missiles.
+
+
struct mobj_s* target;
- // Reaction time: if non 0, don't attack yet.
- // Used by player to freeze a bit after teleporting.
+
+
int reactiontime;
- // If >0, the target will be chased
- // no matter what (even if shot)
+
+
int threshold;
- // Additional info record for player avatars only.
- // Only valid if type == MT_PLAYER
+
+
struct player_s* player;
- // Player number last looked for.
+
int lastlook;
- // For nightmare respawn.
+
mapthing_t spawnpoint;
- // Thing being chased/attacked for tracers.
+
struct mobj_s* tracer;
} mobj_t;
@@ -288,8 +288,8 @@ typedef struct mobj_s
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/p_plats.c b/src/p_plats.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Plats (i.e. elevator platforms) code, raising/lowering.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_plats.c,v 1.5 1997/02/03 22:45:12 b1 Exp $";
@@ -34,11 +34,11 @@ rcsid[] = "$Id: p_plats.c,v 1.5 1997/02/03 22:45:12 b1 Exp $";
#include "s_sound.h"
-// State.
+
#include "doomstat.h"
#include "r_state.h"
-// Data.
+
#include "sounds.h"
@@ -46,9 +46,9 @@ plat_t* activeplats[MAXPLATS];
-//
-// Move a plat up and down
-//
+
+
+
void T_PlatRaise(plat_t* plat)
{
result_e res;
@@ -131,10 +131,10 @@ void T_PlatRaise(plat_t* plat)
}
-//
-// Do Platforms
-// "amount" is only used for SOME platforms.
-//
+
+
+
+
int
EV_DoPlat
( line_t* line,
@@ -150,7 +150,7 @@ EV_DoPlat
rtn = 0;
- // Activate all <type> plats that are in_stasis
+
switch(type)
{
case perpetualRaise:
@@ -168,7 +168,7 @@ EV_DoPlat
if (sec->specialdata)
continue;
- // Find lowest & highest floors around sector
+
rtn = 1;
plat = Z_Malloc( sizeof(*plat), PU_LEVSPEC, 0);
P_AddThinker(&plat->thinker);
@@ -188,7 +188,7 @@ EV_DoPlat
plat->high = P_FindNextHighestFloor(sec,sec->floorheight);
plat->wait = 0;
plat->status = up;
- // NO MORE DAMAGE, IF APPLICABLE
+
sec->special = 0;
S_StartSound((mobj_t *)&sec->soundorg,sfx_stnmov);
diff --git a/src/p_pspr.c b/src/p_pspr.c
@@ -1,26 +1,26 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Weapon sprite animation, weapon objects.
-// Action functions for weapons.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_pspr.c,v 1.5 1997/02/03 22:45:12 b1 Exp $";
@@ -33,10 +33,10 @@ rcsid[] = "$Id: p_pspr.c,v 1.5 1997/02/03 22:45:12 b1 Exp $";
#include "p_local.h"
#include "s_sound.h"
-// State.
+
#include "doomstat.h"
-// Data.
+
#include "sounds.h"
#include "p_pspr.h"
@@ -48,13 +48,13 @@ rcsid[] = "$Id: p_pspr.c,v 1.5 1997/02/03 22:45:12 b1 Exp $";
#define WEAPONTOP 32*FRACUNIT
-// plasma cells for a bfg attack
+
#define BFGCELLS 40
-//
-// P_SetPsprite
-//
+
+
+
void
P_SetPsprite
( player_t* player,
@@ -70,24 +70,24 @@ P_SetPsprite
{
if (!stnum)
{
- // object removed itself
+
psp->state = NULL;
break;
}
state = &states[stnum];
psp->state = state;
- psp->tics = state->tics; // could be 0
+ psp->tics = state->tics;
if (state->misc1)
{
- // coordinate set
+
psp->sx = state->misc1 << FRACBITS;
psp->sy = state->misc2 << FRACBITS;
}
- // Call action routine.
- // Modified handling.
+
+
if (state->action.acp2)
{
state->action.acp2(player, psp);
@@ -98,14 +98,14 @@ P_SetPsprite
stnum = psp->state->nextstate;
} while (!psp->tics);
- // an initial state of 0 could cycle through
+
}
-//
-// P_CalcSwing
-//
+
+
+
fixed_t swingx;
fixed_t swingy;
@@ -114,9 +114,9 @@ void P_CalcSwing (player_t* player)
fixed_t swing;
int angle;
- // OPTIMIZE: tablify this.
- // A LUT would allow for different modes,
- // and add flexibility.
+
+
+
swing = player->bob;
@@ -129,12 +129,12 @@ void P_CalcSwing (player_t* player)
-//
-// P_BringUpWeapon
-// Starts bringing the pending weapon up
-// from the bottom of the screen.
-// Uses player
-//
+
+
+
+
+
+
void P_BringUpWeapon (player_t* player)
{
statenum_t newstate;
@@ -153,11 +153,11 @@ void P_BringUpWeapon (player_t* player)
P_SetPsprite (player, ps_weapon, newstate);
}
-//
-// P_CheckAmmo
-// Returns true if there is enough ammo to shoot.
-// If not, selects the next weapon to use.
-//
+
+
+
+
+
boolean P_CheckAmmo (player_t* player)
{
ammotype_t ammo;
@@ -165,21 +165,21 @@ boolean P_CheckAmmo (player_t* player)
ammo = weaponinfo[player->readyweapon].ammo;
- // Minimal amount for one shot varies.
+
if (player->readyweapon == wp_bfg)
count = BFGCELLS;
else if (player->readyweapon == wp_supershotgun)
- count = 2; // Double barrel.
+ count = 2;
else
- count = 1; // Regular.
+ count = 1;
- // Some do not need ammunition anyway.
- // Return if current ammunition sufficient.
+
+
if (ammo == am_noammo || player->ammo[ammo] >= count)
return true;
- // Out of ammo, pick a weapon to change to.
- // Preferences are set here.
+
+
do
{
if (player->weaponowned[wp_plasma]
@@ -225,13 +225,13 @@ boolean P_CheckAmmo (player_t* player)
}
else
{
- // If everything fails.
+
player->pendingweapon = wp_fist;
}
} while (player->pendingweapon == wp_nochange);
- // Now set appropriate weapon overlay.
+
P_SetPsprite (player,
ps_weapon,
weaponinfo[player->readyweapon].downstate);
@@ -240,9 +240,9 @@ boolean P_CheckAmmo (player_t* player)
}
-//
-// P_FireWeapon.
-//
+
+
+
void P_FireWeapon (player_t* player)
{
statenum_t newstate;
@@ -258,10 +258,10 @@ void P_FireWeapon (player_t* player)
-//
-// P_DropWeapon
-// Player died, so put the weapon away.
-//
+
+
+
+
void P_DropWeapon (player_t* player)
{
P_SetPsprite (player,
@@ -271,13 +271,13 @@ void P_DropWeapon (player_t* player)
-//
-// A_WeaponReady
-// The player can fire the weapon
-// or change to another weapon at this time.
-// Follows after getting weapon up,
-// or after previous attack/fire sequence.
-//
+
+
+
+
+
+
+
void
A_WeaponReady
( player_t* player,
@@ -286,7 +286,7 @@ A_WeaponReady
statenum_t newstate;
int angle;
- // get out of attack state
+
if (player->mo->state == &states[S_PLAY_ATK1]
|| player->mo->state == &states[S_PLAY_ATK2] )
{
@@ -299,19 +299,19 @@ A_WeaponReady
S_StartSound (player->mo, sfx_sawidl);
}
- // check for change
- // if player is dead, put the weapon away
+
+
if (player->pendingweapon != wp_nochange || !player->health)
{
- // change weapon
- // (pending weapon should allready be validated)
+
+
newstate = weaponinfo[player->readyweapon].downstate;
P_SetPsprite (player, ps_weapon, newstate);
return;
}
- // check for fire
- // the missile launcher and bfg do not auto fire
+
+
if (player->cmd.buttons & BT_ATTACK)
{
if ( !player->attackdown
@@ -326,7 +326,7 @@ A_WeaponReady
else
player->attackdown = false;
- // bob the weapon based on movement speed
+
angle = (128*leveltime)&FINEMASK;
psp->sx = FRACUNIT + FixedMul (player->bob, finecosine[angle]);
angle &= FINEANGLES/2-1;
@@ -335,18 +335,18 @@ A_WeaponReady
-//
-// A_ReFire
-// The player can re-fire the weapon
-// without lowering it entirely.
-//
+
+
+
+
+
void A_ReFire
( player_t* player,
pspdef_t* psp )
{
- // check for fire
- // (if a weaponchange is pending, let it go through instead)
+
+
if ( (player->cmd.buttons & BT_ATTACK)
&& player->pendingweapon == wp_nochange
&& player->health)
@@ -376,11 +376,11 @@ A_CheckReload
-//
-// A_Lower
-// Lowers current weapon,
-// and changes weapon at bottom.
-//
+
+
+
+
+
void
A_Lower
( player_t* player,
@@ -388,24 +388,24 @@ A_Lower
{
psp->sy += LOWERSPEED;
- // Is already down.
+
if (psp->sy < WEAPONBOTTOM )
return;
- // Player is dead.
+
if (player->playerstate == PST_DEAD)
{
psp->sy = WEAPONBOTTOM;
- // don't bring weapon back up
+
return;
}
- // The old weapon has been lowered off the screen,
- // so change the weapon and start raising it
+
+
if (!player->health)
{
- // Player is dead, so keep the weapon off screen.
+
P_SetPsprite (player, ps_weapon, S_NULL);
return;
}
@@ -416,9 +416,9 @@ A_Lower
}
-//
-// A_Raise
-//
+
+
+
void
A_Raise
( player_t* player,
@@ -433,8 +433,8 @@ A_Raise
psp->sy = WEAPONTOP;
- // The weapon has been raised all the way,
- // so change to the ready state.
+
+
newstate = weaponinfo[player->readyweapon].readystate;
P_SetPsprite (player, ps_weapon, newstate);
@@ -442,9 +442,9 @@ A_Raise
-//
-// A_GunFlash
-//
+
+
+
void
A_GunFlash
( player_t* player,
@@ -456,14 +456,14 @@ A_GunFlash
-//
-// WEAPON ATTACKS
-//
-//
-// A_Punch
-//
+
+
+
+
+
+
void
A_Punch
( player_t* player,
@@ -483,7 +483,7 @@ A_Punch
slope = P_AimLineAttack (player->mo, angle, MELEERANGE);
P_LineAttack (player->mo, angle, MELEERANGE, slope, damage);
- // turn to face target
+
if (linetarget)
{
S_StartSound (player->mo, sfx_punch);
@@ -495,9 +495,9 @@ A_Punch
}
-//
-// A_Saw
-//
+
+
+
void
A_Saw
( player_t* player,
@@ -511,7 +511,7 @@ A_Saw
angle = player->mo->angle;
angle += (P_Random()-P_Random())<<18;
- // use meleerange + 1 se the puff doesn't skip the flash
+
slope = P_AimLineAttack (player->mo, angle, MELEERANGE+1);
P_LineAttack (player->mo, angle, MELEERANGE+1, slope, damage);
@@ -522,7 +522,7 @@ A_Saw
}
S_StartSound (player->mo, sfx_sawhit);
- // turn to face target
+
angle = R_PointToAngle2 (player->mo->x, player->mo->y,
linetarget->x, linetarget->y);
if (angle - player->mo->angle > ANG180)
@@ -544,9 +544,9 @@ A_Saw
-//
-// A_FireMissile
-//
+
+
+
void
A_FireMissile
( player_t* player,
@@ -557,9 +557,9 @@ A_FireMissile
}
-//
-// A_FireBFG
-//
+
+
+
void
A_FireBFG
( player_t* player,
@@ -571,9 +571,9 @@ A_FireBFG
-//
-// A_FirePlasma
-//
+
+
+
void
A_FirePlasma
( player_t* player,
@@ -590,11 +590,11 @@ A_FirePlasma
-//
-// P_BulletSlope
-// Sets a slope so a near miss is at aproximately
-// the height of the intended target
-//
+
+
+
+
+
fixed_t bulletslope;
@@ -602,7 +602,7 @@ void P_BulletSlope (mobj_t* mo)
{
angle_t an;
- // see which target is to be aimed at
+
an = mo->angle;
bulletslope = P_AimLineAttack (mo, an, 16*64*FRACUNIT);
@@ -619,9 +619,9 @@ void P_BulletSlope (mobj_t* mo)
}
-//
-// P_GunShot
-//
+
+
+
void
P_GunShot
( mobj_t* mo,
@@ -640,9 +640,9 @@ P_GunShot
}
-//
-// A_FirePistol
-//
+
+
+
void
A_FirePistol
( player_t* player,
@@ -662,9 +662,9 @@ A_FirePistol
}
-//
-// A_FireShotgun
-//
+
+
+
void
A_FireShotgun
( player_t* player,
@@ -689,9 +689,9 @@ A_FireShotgun
-//
-// A_FireShotgun2
-//
+
+
+
void
A_FireShotgun2
( player_t* player,
@@ -726,9 +726,9 @@ A_FireShotgun2
}
-//
-// A_FireCGun
-//
+
+
+
void
A_FireCGun
( player_t* player,
@@ -755,9 +755,9 @@ A_FireCGun
-//
-// ?
-//
+
+
+
void A_Light0 (player_t *player, pspdef_t *psp)
{
player->extralight = 0;
@@ -774,10 +774,10 @@ void A_Light2 (player_t *player, pspdef_t *psp)
}
-//
-// A_BFGSpray
-// Spawn a BFG explosion on every monster in view
-//
+
+
+
+
void A_BFGSpray (mobj_t* mo)
{
int i;
@@ -785,13 +785,13 @@ void A_BFGSpray (mobj_t* mo)
int damage;
angle_t an;
- // offset angles from its attack angle
+
for (i=0 ; i<40 ; i++)
{
an = mo->angle - ANG90/2 + ANG90/40*i;
- // mo->target is the originator (player)
- // of the missile
+
+
P_AimLineAttack (mo->target, an, 16*64*FRACUNIT);
if (!linetarget)
@@ -811,9 +811,9 @@ void A_BFGSpray (mobj_t* mo)
}
-//
-// A_BFGsound
-//
+
+
+
void
A_BFGsound
( player_t* player,
@@ -824,19 +824,19 @@ A_BFGsound
-//
-// P_SetupPsprites
-// Called at start of level for each player.
-//
+
+
+
+
void P_SetupPsprites (player_t* player)
{
int i;
- // remove all psprites
+
for (i=0 ; i<NUMPSPRITES ; i++)
player->psprites[i].state = NULL;
- // spawn the gun
+
player->pendingweapon = player->readyweapon;
P_BringUpWeapon (player);
}
@@ -844,10 +844,10 @@ void P_SetupPsprites (player_t* player)
-//
-// P_MovePsprites
-// Called every tic by player thinking routine.
-//
+
+
+
+
void P_MovePsprites (player_t* player)
{
int i;
@@ -857,12 +857,12 @@ void P_MovePsprites (player_t* player)
psp = &player->psprites[0];
for (i=0 ; i<NUMPSPRITES ; i++, psp++)
{
- // a null state means not active
+
if ( (state = psp->state) )
{
- // drop tic count and possibly change state
+
- // a -1 tic count never changes
+
if (psp->tics != -1)
{
psp->tics--;
diff --git a/src/p_pspr.h b/src/p_pspr.h
@@ -1,41 +1,41 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Sprite animation.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __P_PSPR__
#define __P_PSPR__
-// Basic data types.
-// Needs fixed point, and BAM angles.
+
+
#include "m_fixed.h"
#include "tables.h"
-//
-// Needs to include the precompiled
-// sprite animation tables.
-// Header generated by multigen utility.
-// This includes all the data for thing animation,
-// i.e. the Thing Atrributes table
-// and the Frame Sequence table.
+
+
+
+
+
+
+
#include "info.h"
#ifdef __GNUG__
@@ -43,20 +43,20 @@
#endif
-//
-// Frame flags:
-// handles maximum brightness (torches, muzzle flare, light sources)
-//
-#define FF_FULLBRIGHT 0x8000 // flag in thing->frame
+
+
+
+
+#define FF_FULLBRIGHT 0x8000
#define FF_FRAMEMASK 0x7fff
-//
-// Overlay psprites are scaled shapes
-// drawn directly on the view screen,
-// coordinates are given for a 320*200 view screen.
-//
+
+
+
+
+
typedef enum
{
ps_weapon,
@@ -67,7 +67,7 @@ typedef enum
typedef struct
{
- state_t* state; // a NULL state means not active
+ state_t* state;
int tics;
fixed_t sx;
fixed_t sy;
@@ -75,8 +75,8 @@ typedef struct
} pspdef_t;
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/p_saveg.c b/src/p_saveg.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Archiving: SaveGame I/O.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_tick.c,v 1.4 1997/02/03 16:47:55 b1 Exp $";
@@ -28,22 +28,22 @@ rcsid[] = "$Id: p_tick.c,v 1.4 1997/02/03 16:47:55 b1 Exp $";
#include "z_zone.h"
#include "p_local.h"
-// State.
+
#include "doomstat.h"
#include "r_state.h"
byte* save_p;
-// Pads save_p to a 4-byte boundary
-// so that the load/save works on SGI&Gecko.
+
+
#define PADSAVEP() save_p += (4 - ((int) save_p & 3)) & 3
-//
-// P_ArchivePlayers
-//
+
+
+
void P_ArchivePlayers (void)
{
int i;
@@ -73,9 +73,9 @@ void P_ArchivePlayers (void)
-//
-// P_UnArchivePlayers
-//
+
+
+
void P_UnArchivePlayers (void)
{
int i;
@@ -91,7 +91,7 @@ void P_UnArchivePlayers (void)
memcpy (&players[i],save_p, sizeof(player_t));
save_p += sizeof(player_t);
- // will be set when unarc thinker
+
players[i].mo = NULL;
players[i].message = NULL;
players[i].attacker = NULL;
@@ -108,9 +108,9 @@ void P_UnArchivePlayers (void)
}
-//
-// P_ArchiveWorld
-//
+
+
+
void P_ArchiveWorld (void)
{
int i;
@@ -122,7 +122,7 @@ void P_ArchiveWorld (void)
put = (short *)save_p;
- // do sectors
+
for (i=0, sec = sectors ; i<numsectors ; i++,sec++)
{
*put++ = sec->floorheight >> FRACBITS;
@@ -130,12 +130,12 @@ void P_ArchiveWorld (void)
*put++ = sec->floorpic;
*put++ = sec->ceilingpic;
*put++ = sec->lightlevel;
- *put++ = sec->special; // needed?
- *put++ = sec->tag; // needed?
+ *put++ = sec->special;
+ *put++ = sec->tag;
}
- // do lines
+
for (i=0, li = lines ; i<numlines ; i++,li++)
{
*put++ = li->flags;
@@ -161,9 +161,9 @@ void P_ArchiveWorld (void)
-//
-// P_UnArchiveWorld
-//
+
+
+
void P_UnArchiveWorld (void)
{
int i;
@@ -175,7 +175,7 @@ void P_UnArchiveWorld (void)
get = (short *)save_p;
- // do sectors
+
for (i=0, sec = sectors ; i<numsectors ; i++,sec++)
{
sec->floorheight = *get++ << FRACBITS;
@@ -183,13 +183,13 @@ void P_UnArchiveWorld (void)
sec->floorpic = *get++;
sec->ceilingpic = *get++;
sec->lightlevel = *get++;
- sec->special = *get++; // needed?
- sec->tag = *get++; // needed?
+ sec->special = *get++;
+ sec->tag = *get++;
sec->specialdata = 0;
sec->soundtarget = 0;
}
- // do lines
+
for (i=0, li = lines ; i<numlines ; i++,li++)
{
li->flags = *get++;
@@ -214,9 +214,9 @@ void P_UnArchiveWorld (void)
-//
-// Thinkers
-//
+
+
+
typedef enum
{
tc_end,
@@ -226,15 +226,15 @@ typedef enum
-//
-// P_ArchiveThinkers
-//
+
+
+
void P_ArchiveThinkers (void)
{
thinker_t* th;
mobj_t* mobj;
- // save off the current thinkers
+
for (th = thinkercap.next ; th != &thinkercap ; th=th->next)
{
if (th->function.acp1 == (actionf_p1)P_MobjThinker)
@@ -251,18 +251,18 @@ void P_ArchiveThinkers (void)
continue;
}
- // I_Error ("P_ArchiveThinkers: Unknown thinker function");
+
}
- // add a terminating marker
+
*save_p++ = tc_end;
}
-//
-// P_UnArchiveThinkers
-//
+
+
+
void P_UnArchiveThinkers (void)
{
byte tclass;
@@ -270,7 +270,7 @@ void P_UnArchiveThinkers (void)
thinker_t* next;
mobj_t* mobj;
- // remove all the current thinkers
+
currentthinker = thinkercap.next;
while (currentthinker != &thinkercap)
{
@@ -285,14 +285,14 @@ void P_UnArchiveThinkers (void)
}
P_InitThinkers ();
- // read in saved thinkers
+
while (1)
{
tclass = *save_p++;
switch (tclass)
{
case tc_end:
- return; // end of list
+ return;
case tc_mobj:
PADSAVEP();
@@ -323,9 +323,9 @@ void P_UnArchiveThinkers (void)
}
-//
-// P_ArchiveSpecials
-//
+
+
+
enum
{
tc_ceiling,
@@ -341,17 +341,17 @@ enum
-//
-// Things to handle:
-//
-// T_MoveCeiling, (ceiling_t: sector_t * swizzle), - active list
-// T_VerticalDoor, (vldoor_t: sector_t * swizzle),
-// T_MoveFloor, (floormove_t: sector_t * swizzle),
-// T_LightFlash, (lightflash_t: sector_t * swizzle),
-// T_StrobeFlash, (strobe_t: sector_t *),
-// T_Glow, (glow_t: sector_t *),
-// T_PlatRaise, (plat_t: sector_t *), - active list
-//
+
+
+
+
+
+
+
+
+
+
+
void P_ArchiveSpecials (void)
{
thinker_t* th;
@@ -364,7 +364,7 @@ void P_ArchiveSpecials (void)
glow_t* glow;
int i;
- // save off the current thinkers
+
for (th = thinkercap.next ; th != &thinkercap ; th=th->next)
{
if (th->function.acv == (actionf_v)NULL)
@@ -463,15 +463,15 @@ void P_ArchiveSpecials (void)
}
}
- // add a terminating marker
+
*save_p++ = tc_endspecials;
}
-//
-// P_UnArchiveSpecials
-//
+
+
+
void P_UnArchiveSpecials (void)
{
byte tclass;
@@ -484,14 +484,14 @@ void P_UnArchiveSpecials (void)
glow_t* glow;
- // read in saved thinkers
+
while (1)
{
tclass = *save_p++;
switch (tclass)
{
case tc_endspecials:
- return; // end of list
+ return;
case tc_ceiling:
PADSAVEP();
diff --git a/src/p_saveg.h b/src/p_saveg.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Savegame I/O, archiving, persistence.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __P_SAVEG__
@@ -29,8 +29,8 @@
#endif
-// Persistent storage/archiving.
-// These are the load / save game routines.
+
+
void P_ArchivePlayers (void);
void P_UnArchivePlayers (void);
void P_ArchiveWorld (void);
@@ -44,8 +44,8 @@ extern byte* save_p;
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/p_setup.c b/src/p_setup.c
@@ -1,26 +1,26 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Do all the WAD I/O, get map description,
-// set up initial state and misc. LUTs.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_setup.c,v 1.5 1997/02/03 22:45:12 b1 Exp $";
@@ -49,10 +49,10 @@ rcsid[] = "$Id: p_setup.c,v 1.5 1997/02/03 22:45:12 b1 Exp $";
void P_SpawnMapThing (mapthing_t* mthing);
-//
-// MAP related Lookup tables.
-// Store VERTEXES, LINEDEFS, SIDEDEFS, etc.
-//
+
+
+
+
int numvertexes;
vertex_t* vertexes;
@@ -75,37 +75,37 @@ int numsides;
side_t* sides;
-// BLOCKMAP
-// Created from axis aligned bounding box
-// of the map, a rectangular array of
-// blocks of size ...
-// Used to speed up collision detection
-// by spatial subdivision in 2D.
-//
-// Blockmap size.
+
+
+
+
+
+
+
+
int bmapwidth;
-int bmapheight; // size in mapblocks
-short* blockmap; // int for larger maps
-// offsets in blockmap are from here
+int bmapheight;
+short* blockmap;
+
short* blockmaplump;
-// origin of block map
+
fixed_t bmaporgx;
fixed_t bmaporgy;
-// for thing chains
+
mobj_t** blocklinks;
-// REJECT
-// For fast sight rejection.
-// Speeds up enemy AI by skipping detailed
-// LineOf Sight calculation.
-// Without special effect, this could be
-// used as a PVS lookup as well.
-//
+
+
+
+
+
+
+
byte* rejectmatrix;
-// Maintain single and multi player starting spots.
+
#define MAX_DEATHMATCH_STARTS 10
mapthing_t deathmatchstarts[MAX_DEATHMATCH_STARTS];
@@ -116,9 +116,9 @@ mapthing_t playerstarts[MAXPLAYERS];
-//
-// P_LoadVertexes
-//
+
+
+
void P_LoadVertexes (int lump)
{
byte* data;
@@ -126,36 +126,36 @@ void P_LoadVertexes (int lump)
mapvertex_t* ml;
vertex_t* li;
- // Determine number of lumps:
- // total lump length / vertex record length.
+
+
numvertexes = W_LumpLength (lump) / sizeof(mapvertex_t);
- // Allocate zone memory for buffer.
+
vertexes = Z_Malloc (numvertexes*sizeof(vertex_t),PU_LEVEL,0);
- // Load data into cache.
+
data = W_CacheLumpNum (lump,PU_STATIC);
ml = (mapvertex_t *)data;
li = vertexes;
- // Copy and convert vertex coordinates,
- // internal representation as fixed.
+
+
for (i=0 ; i<numvertexes ; i++, li++, ml++)
{
li->x = SHORT(ml->x)<<FRACBITS;
li->y = SHORT(ml->y)<<FRACBITS;
}
- // Free buffer memory.
+
Z_Free (data);
}
-//
-// P_LoadSegs
-//
+
+
+
void P_LoadSegs (int lump)
{
byte* data;
@@ -196,9 +196,9 @@ void P_LoadSegs (int lump)
}
-//
-// P_LoadSubsectors
-//
+
+
+
void P_LoadSubsectors (int lump)
{
byte* data;
@@ -225,9 +225,9 @@ void P_LoadSubsectors (int lump)
-//
-// P_LoadSectors
-//
+
+
+
void P_LoadSectors (int lump)
{
byte* data;
@@ -258,9 +258,9 @@ void P_LoadSectors (int lump)
}
-//
-// P_LoadNodes
-//
+
+
+
void P_LoadNodes (int lump)
{
byte* data;
@@ -295,9 +295,9 @@ void P_LoadNodes (int lump)
}
-//
-// P_LoadThings
-//
+
+
+
void P_LoadThings (int lump)
{
byte* data;
@@ -314,21 +314,21 @@ void P_LoadThings (int lump)
{
spawn = true;
- // Do not spawn cool, new monsters if !commercial
+
if ( gamemode != commercial)
{
switch(mt->type)
{
- case 68: // Arachnotron
- case 64: // Archvile
- case 88: // Boss Brain
- case 89: // Boss Shooter
- case 69: // Hell Knight
- case 67: // Mancubus
- case 71: // Pain Elemental
- case 65: // Former Human Commando
- case 66: // Revenant
- case 84: // Wolf SS
+ case 68:
+ case 64:
+ case 88:
+ case 89:
+ case 69:
+ case 67:
+ case 71:
+ case 65:
+ case 66:
+ case 84:
spawn = false;
break;
}
@@ -336,7 +336,7 @@ void P_LoadThings (int lump)
if (spawn == false)
break;
- // Do spawn all other stuff.
+
mt->x = SHORT(mt->x);
mt->y = SHORT(mt->y);
mt->angle = SHORT(mt->angle);
@@ -350,10 +350,10 @@ void P_LoadThings (int lump)
}
-//
-// P_LoadLineDefs
-// Also counts secret lines for intermissions.
-//
+
+
+
+
void P_LoadLineDefs (int lump)
{
byte* data;
@@ -432,9 +432,9 @@ void P_LoadLineDefs (int lump)
}
-//
-// P_LoadSideDefs
-//
+
+
+
void P_LoadSideDefs (int lump)
{
byte* data;
@@ -463,9 +463,9 @@ void P_LoadSideDefs (int lump)
}
-//
-// P_LoadBlockMap
-//
+
+
+
void P_LoadBlockMap (int lump)
{
int i;
@@ -483,7 +483,7 @@ void P_LoadBlockMap (int lump)
bmapwidth = blockmaplump[2];
bmapheight = blockmaplump[3];
- // clear out mobj chains
+
count = sizeof(*blocklinks)* bmapwidth*bmapheight;
blocklinks = Z_Malloc (count,PU_LEVEL, 0);
memset (blocklinks, 0, count);
@@ -491,11 +491,11 @@ void P_LoadBlockMap (int lump)
-//
-// P_GroupLines
-// Builds sector line lists and subsector sector numbers.
-// Finds block bounding boxes for sectors.
-//
+
+
+
+
+
void P_GroupLines (void)
{
line_t** linebuffer;
@@ -509,7 +509,7 @@ void P_GroupLines (void)
fixed_t bbox[4];
int block;
- // look up sector number for each subsector
+
ss = subsectors;
for (i=0 ; i<numsubsectors ; i++, ss++)
{
@@ -517,7 +517,7 @@ void P_GroupLines (void)
ss->sector = seg->sidedef->sector;
}
- // count number of lines in each sector
+
li = lines;
total = 0;
for (i=0 ; i<numlines ; i++, li++)
@@ -532,7 +532,7 @@ void P_GroupLines (void)
}
}
- // build line tables for each sector
+
linebuffer = Z_Malloc (total*4, PU_LEVEL, 0);
sector = sectors;
for (i=0 ; i<numsectors ; i++, sector++)
@@ -552,11 +552,11 @@ void P_GroupLines (void)
if (linebuffer - sector->lines != sector->linecount)
I_Error ("P_GroupLines: miscounted");
- // set the degenmobj_t to the middle of the bounding box
+
sector->soundorg.x = (bbox[BOXRIGHT]+bbox[BOXLEFT])/2;
sector->soundorg.y = (bbox[BOXTOP]+bbox[BOXBOTTOM])/2;
- // adjust bounding box to map blocks
+
block = (bbox[BOXTOP]-bmaporgy+MAXRADIUS)>>MAPBLOCKSHIFT;
block = block >= bmapheight ? bmapheight-1 : block;
sector->blockbox[BOXTOP]=block;
@@ -577,9 +577,9 @@ void P_GroupLines (void)
}
-//
-// P_SetupLevel
-//
+
+
+
void
P_SetupLevel
( int episode,
@@ -599,15 +599,15 @@ P_SetupLevel
= players[i].itemcount = 0;
}
- // Initial height of PointOfView
- // will be set by player think.
+
+
players[consoleplayer].viewz = 1;
- // Make sure all sounds are stopped before Z_FreeTags.
+
S_Start ();
-#if 0 // UNUSED
+#if 0
if (debugfile)
{
Z_FreeTags (PU_LEVEL, MAXINT);
@@ -618,13 +618,13 @@ P_SetupLevel
Z_FreeTags (PU_LEVEL, PU_PURGELEVEL-1);
- // UNUSED W_Profile ();
+
P_InitThinkers ();
- // if working with a devlopment map, reload it
+
W_Reload ();
- // find map name
+
if ( gamemode == commercial)
{
if (map<10)
@@ -645,7 +645,7 @@ P_SetupLevel
leveltime = 0;
- // note: most of this ordering is important
+
P_LoadBlockMap (lumpnum+ML_BLOCKMAP);
P_LoadVertexes (lumpnum+ML_VERTEXES);
P_LoadSectors (lumpnum+ML_SECTORS);
@@ -663,7 +663,7 @@ P_SetupLevel
deathmatch_p = deathmatchstarts;
P_LoadThings (lumpnum+ML_THINGS);
- // if deathmatch, randomly spawn the active players
+
if (deathmatch)
{
for (i=0 ; i<MAXPLAYERS ; i++)
@@ -675,28 +675,28 @@ P_SetupLevel
}
- // clear special respawning que
+
iquehead = iquetail = 0;
- // set up world state
+
P_SpawnSpecials ();
- // build subsector connect matrix
- // UNUSED P_ConnectSubsectors ();
+
+
- // preload graphics
+
if (precache)
R_PrecacheLevel ();
- //printf ("free memory: 0x%x\n", Z_FreeMemory());
+
}
-//
-// P_Init
-//
+
+
+
void P_Init (void)
{
P_InitSwitchList ();
diff --git a/src/p_setup.h b/src/p_setup.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Setup a game, startup stuff.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __P_SETUP__
@@ -29,7 +29,7 @@
#endif
-// NOT called by W_Ticker. Fixme.
+
void
P_SetupLevel
( int episode,
@@ -37,12 +37,12 @@ P_SetupLevel
int playermask,
skill_t skill);
-// Called by startup code.
+
void P_Init (void);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/p_sight.c b/src/p_sight.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// LineOfSight/Visibility checks, uses REJECT Lookup Table.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_sight.c,v 1.3 1997/01/28 22:08:28 b1 Exp $";
@@ -30,27 +30,27 @@ rcsid[] = "$Id: p_sight.c,v 1.3 1997/01/28 22:08:28 b1 Exp $";
#include "i_system.h"
#include "p_local.h"
-// State.
+
#include "r_state.h"
-//
-// P_CheckSight
-//
-fixed_t sightzstart; // eye z of looker
+
+
+
+fixed_t sightzstart;
fixed_t topslope;
-fixed_t bottomslope; // slopes to top and bottom of target
+fixed_t bottomslope;
-divline_t strace; // from t1 to t2
+divline_t strace;
fixed_t t2x;
fixed_t t2y;
int sightcounts[2];
-//
-// P_DivlineSide
-// Returns side 0 (front), 1 (back), or 2 (on).
-//
+
+
+
+
int
P_DivlineSide
( fixed_t x,
@@ -91,20 +91,20 @@ P_DivlineSide
right = (dy>>FRACBITS) * (node->dx>>FRACBITS);
if (right < left)
- return 0; // front side
+ return 0;
if (left == right)
return 2;
- return 1; // back side
+ return 1;
}
-//
-// P_InterceptVector2
-// Returns the fractional intercept point
-// along the first divline.
-// This is only called by the addthings and addlines traversers.
-//
+
+
+
+
+
+
fixed_t
P_InterceptVector2
( divline_t* v2,
@@ -118,7 +118,7 @@ P_InterceptVector2
if (den == 0)
return 0;
- // I_Error ("P_InterceptVector: parallel");
+
num = FixedMul ( (v1->x - v2->x)>>8 ,v1->dy) +
FixedMul ( (v2->y - v1->y)>>8 , v1->dx);
@@ -127,11 +127,11 @@ P_InterceptVector2
return frac;
}
-//
-// P_CrossSubsector
-// Returns true
-// if strace crosses the given subsector successfully.
-//
+
+
+
+
+
boolean P_CrossSubsector (int num)
{
seg_t* seg;
@@ -159,7 +159,7 @@ boolean P_CrossSubsector (int num)
sub = &subsectors[num];
- // check lines
+
count = sub->numlines;
seg = &segs[sub->firstline];
@@ -167,7 +167,7 @@ boolean P_CrossSubsector (int num)
{
line = seg->linedef;
- // allready checked other side?
+
if (line->validcount == validcount)
continue;
@@ -178,7 +178,7 @@ boolean P_CrossSubsector (int num)
s1 = P_DivlineSide (v1->x,v1->y, &strace);
s2 = P_DivlineSide (v2->x, v2->y, &strace);
- // line isn't crossed?
+
if (s1 == s2)
continue;
@@ -189,40 +189,40 @@ boolean P_CrossSubsector (int num)
s1 = P_DivlineSide (strace.x, strace.y, &divl);
s2 = P_DivlineSide (t2x, t2y, &divl);
- // line isn't crossed?
+
if (s1 == s2)
continue;
- // stop because it is not two sided anyway
- // might do this after updating validcount?
+
+
if ( !(line->flags & ML_TWOSIDED) )
return false;
- // crosses a two sided line
+
front = seg->frontsector;
back = seg->backsector;
- // no wall to block sight with?
+
if (front->floorheight == back->floorheight
&& front->ceilingheight == back->ceilingheight)
continue;
- // possible occluder
- // because of ceiling height differences
+
+
if (front->ceilingheight < back->ceilingheight)
opentop = front->ceilingheight;
else
opentop = back->ceilingheight;
- // because of ceiling height differences
+
if (front->floorheight > back->floorheight)
openbottom = front->floorheight;
else
openbottom = back->floorheight;
- // quick test for totally closed doors
+
if (openbottom >= opentop)
- return false; // stop
+ return false;
frac = P_InterceptVector2 (&strace, &divl);
@@ -241,19 +241,19 @@ boolean P_CrossSubsector (int num)
}
if (topslope <= bottomslope)
- return false; // stop
+ return false;
}
- // passed the subsector ok
+
return true;
}
-//
-// P_CrossBSPNode
-// Returns true
-// if strace crosses the given node successfully.
-//
+
+
+
+
+
boolean P_CrossBSPNode (int bspnum)
{
node_t* bsp;
@@ -269,33 +269,33 @@ boolean P_CrossBSPNode (int bspnum)
bsp = &nodes[bspnum];
- // decide which side the start point is on
+
side = P_DivlineSide (strace.x, strace.y, (divline_t *)bsp);
if (side == 2)
- side = 0; // an "on" should cross both sides
+ side = 0;
- // cross the starting side
+
if (!P_CrossBSPNode (bsp->children[side]) )
return false;
- // the partition plane is crossed here
+
if (side == P_DivlineSide (t2x, t2y,(divline_t *)bsp))
{
- // the line doesn't touch the other side
+
return true;
}
- // cross the ending side
+
return P_CrossBSPNode (bsp->children[side^1]);
}
-//
-// P_CheckSight
-// Returns true
-// if a straight line between t1 and t2 is unobstructed.
-// Uses REJECT.
-//
+
+
+
+
+
+
boolean
P_CheckSight
( mobj_t* t1,
@@ -307,26 +307,26 @@ P_CheckSight
int bytenum;
int bitnum;
- // First check for trivial rejection.
+
- // Determine subsector entries in REJECT table.
+
s1 = (t1->subsector->sector - sectors);
s2 = (t2->subsector->sector - sectors);
pnum = s1*numsectors + s2;
bytenum = pnum>>3;
bitnum = 1 << (pnum&7);
- // Check in REJECT table.
+
if (rejectmatrix[bytenum]&bitnum)
{
sightcounts[0]++;
- // can't possibly be connected
+
return false;
}
- // An unobstructed LOS is possible.
- // Now look from eyes of t1 to any part of t2.
+
+
sightcounts[1]++;
validcount++;
@@ -342,7 +342,7 @@ P_CheckSight
strace.dx = t2->x - t1->x;
strace.dy = t2->y - t1->y;
- // the head node is the last node output
+
return P_CrossBSPNode (numnodes-1);
}
diff --git a/src/p_spec.c b/src/p_spec.c
@@ -1,29 +1,29 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Implements special effects:
-// Texture animation, height or lighting changes
-// according to adjacent sectors, respective
-// utility functions, etc.
-// Line Tag handling. Line and Sector triggers.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_spec.c,v 1.6 1997/02/03 22:45:12 b1 Exp $";
@@ -46,17 +46,17 @@ rcsid[] = "$Id: p_spec.c,v 1.6 1997/02/03 22:45:12 b1 Exp $";
#include "s_sound.h"
-// State.
+
#include "r_state.h"
-// Data.
+
#include "sounds.h"
-//
-// Animating textures and planes
-// There is another anim_t used in wi_stuff, unrelated.
-//
+
+
+
+
typedef struct
{
boolean istexture;
@@ -67,12 +67,12 @@ typedef struct
} anim_t;
-//
-// source animation definition
-//
+
+
+
typedef struct
{
- boolean istexture; // if false, it is a flat
+ boolean istexture;
char endname[9];
char startname[9];
int speed;
@@ -85,19 +85,19 @@ typedef struct
extern anim_t anims[MAXANIMS];
extern anim_t* lastanim;
-//
-// P_InitPicAnims
-//
-
-// Floor/ceiling animation sequences,
-// defined by first and last frame,
-// i.e. the flat (64x64 tile) name to
-// be used.
-// The full animation sequence is given
-// using all the flats between the start
-// and end entry, in the order found in
-// the WAD file.
-//
+
+
+
+
+
+
+
+
+
+
+
+
+
animdef_t animdefs[] =
{
{false, "NUKAGE3", "NUKAGE1", 8},
@@ -106,7 +106,7 @@ animdef_t animdefs[] =
{false, "LAVA4", "LAVA1", 8},
{false, "BLOOD3", "BLOOD1", 8},
- // DOOM II flat animations.
+
{false, "RROCK08", "RROCK05", 8},
{false, "SLIME04", "SLIME01", 8},
{false, "SLIME08", "SLIME05", 8},
@@ -135,9 +135,9 @@ anim_t anims[MAXANIMS];
anim_t* lastanim;
-//
-// Animating line specials
-//
+
+
+
#define MAXLINEANIMS 64
extern short numlinespecials;
@@ -150,13 +150,13 @@ void P_InitPicAnims (void)
int i;
- // Init animation
+
lastanim = anims;
for (i=0 ; animdefs[i].istexture != -1 ; i++)
{
if (animdefs[i].istexture)
{
- // different episode ?
+
if (R_CheckTextureNumForName(animdefs[i].startname) == -1)
continue;
@@ -188,18 +188,18 @@ void P_InitPicAnims (void)
-//
-// UTILITIES
-//
-//
-// getSide()
-// Will return a side_t*
-// given the number of the current sector,
-// the line number, and the side (0/1) that you want.
-//
+
+
+
+
+
+
+
+
+
side_t*
getSide
( int currentSector,
@@ -210,12 +210,12 @@ getSide
}
-//
-// getSector()
-// Will return a sector_t*
-// given the number of the current sector,
-// the line number and the side (0/1) that you want.
-//
+
+
+
+
+
+
sector_t*
getSector
( int currentSector,
@@ -226,11 +226,11 @@ getSector
}
-//
-// twoSided()
-// Given the sector number and the line number,
-// it will tell you whether the line is two-sided or not.
-//
+
+
+
+
+
int
twoSided
( int sector,
@@ -242,11 +242,11 @@ twoSided
-//
-// getNextSector()
-// Return sector_t * of sector next to current.
-// NULL if not two-sided line
-//
+
+
+
+
+
sector_t*
getNextSector
( line_t* line,
@@ -263,10 +263,10 @@ getNextSector
-//
-// P_FindLowestFloorSurrounding()
-// FIND LOWEST FLOOR HEIGHT IN SURROUNDING SECTORS
-//
+
+
+
+
fixed_t P_FindLowestFloorSurrounding(sector_t* sec)
{
int i;
@@ -290,10 +290,10 @@ fixed_t P_FindLowestFloorSurrounding(sector_t* sec)
-//
-// P_FindHighestFloorSurrounding()
-// FIND HIGHEST FLOOR HEIGHT IN SURROUNDING SECTORS
-//
+
+
+
+
fixed_t P_FindHighestFloorSurrounding(sector_t *sec)
{
int i;
@@ -317,12 +317,12 @@ fixed_t P_FindHighestFloorSurrounding(sector_t *sec)
-//
-// P_FindNextHighestFloor
-// FIND NEXT HIGHEST FLOOR IN SURROUNDING SECTORS
-// Note: this should be doable w/o a fixed array.
-// 20 adjoining sectors max!
+
+
+
+
+
#define MAX_ADJOINING_SECTORS 20
fixed_t
@@ -351,7 +351,7 @@ P_FindNextHighestFloor
if (other->floorheight > height)
heightlist[h++] = other->floorheight;
- // Check for overflow. Exit.
+
if ( h >= MAX_ADJOINING_SECTORS )
{
fprintf( stderr,
@@ -360,13 +360,13 @@ P_FindNextHighestFloor
}
}
- // Find lowest height in list
+
if (!h)
return currentheight;
min = heightlist[0];
- // Range checking?
+
for (i = 1;i < h;i++)
if (heightlist[i] < min)
min = heightlist[i];
@@ -375,9 +375,9 @@ P_FindNextHighestFloor
}
-//
-// FIND LOWEST CEILING IN THE SURROUNDING SECTORS
-//
+
+
+
fixed_t
P_FindLowestCeilingSurrounding(sector_t* sec)
{
@@ -401,9 +401,9 @@ P_FindLowestCeilingSurrounding(sector_t* sec)
}
-//
-// FIND HIGHEST CEILING IN THE SURROUNDING SECTORS
-//
+
+
+
fixed_t P_FindHighestCeilingSurrounding(sector_t* sec)
{
int i;
@@ -427,9 +427,9 @@ fixed_t P_FindHighestCeilingSurrounding(sector_t* sec)
-//
-// RETURN NEXT SECTOR # THAT LINE TAG REFERS TO
-//
+
+
+
int
P_FindSectorFromLineTag
( line_t* line,
@@ -447,9 +447,9 @@ P_FindSectorFromLineTag
-//
-// Find minimum light from an adjacent sector
-//
+
+
+
int
P_FindMinSurroundingLight
( sector_t* sector,
@@ -477,17 +477,17 @@ P_FindMinSurroundingLight
-//
-// EVENTS
-// Events are operations triggered by using, crossing,
-// or shooting special lines, or by timed thinkers.
-//
-//
-// P_CrossSpecialLine - TRIGGER
-// Called every time a thing origin is about
-// to cross a line with a non 0 special.
-//
+
+
+
+
+
+
+
+
+
+
void
P_CrossSpecialLine
( int linenum,
@@ -499,10 +499,10 @@ P_CrossSpecialLine
line = &lines[linenum];
- // Triggers that other things can activate
+
if (!thing->player)
{
- // Things that should NOT trigger specials...
+
switch(thing->type)
{
case MT_ROCKET:
@@ -520,13 +520,13 @@ P_CrossSpecialLine
ok = 0;
switch(line->special)
{
- case 39: // TELEPORT TRIGGER
- case 97: // TELEPORT RETRIGGER
- case 125: // TELEPORT MONSTERONLY TRIGGER
- case 126: // TELEPORT MONSTERONLY RETRIGGER
- case 4: // RAISE DOOR
- case 10: // PLAT DOWN-WAIT-UP-STAY TRIGGER
- case 88: // PLAT DOWN-WAIT-UP-STAY RETRIGGER
+ case 39:
+ case 97:
+ case 125:
+ case 126:
+ case 4:
+ case 10:
+ case 88:
ok = 1;
break;
}
@@ -535,235 +535,235 @@ P_CrossSpecialLine
}
- // Note: could use some const's here.
+
switch (line->special)
{
- // TRIGGERS.
- // All from here to RETRIGGERS.
+
+
case 2:
- // Open Door
+
EV_DoDoor(line,open);
line->special = 0;
break;
case 3:
- // Close Door
+
EV_DoDoor(line,close);
line->special = 0;
break;
case 4:
- // Raise Door
+
EV_DoDoor(line,normal);
line->special = 0;
break;
case 5:
- // Raise Floor
+
EV_DoFloor(line,raiseFloor);
line->special = 0;
break;
case 6:
- // Fast Ceiling Crush & Raise
+
EV_DoCeiling(line,fastCrushAndRaise);
line->special = 0;
break;
case 8:
- // Build Stairs
+
EV_BuildStairs(line,build8);
line->special = 0;
break;
case 10:
- // PlatDownWaitUp
+
EV_DoPlat(line,downWaitUpStay,0);
line->special = 0;
break;
case 12:
- // Light Turn On - brightest near
+
EV_LightTurnOn(line,0);
line->special = 0;
break;
case 13:
- // Light Turn On 255
+
EV_LightTurnOn(line,255);
line->special = 0;
break;
case 16:
- // Close Door 30
+
EV_DoDoor(line,close30ThenOpen);
line->special = 0;
break;
case 17:
- // Start Light Strobing
+
EV_StartLightStrobing(line);
line->special = 0;
break;
case 19:
- // Lower Floor
+
EV_DoFloor(line,lowerFloor);
line->special = 0;
break;
case 22:
- // Raise floor to nearest height and change texture
+
EV_DoPlat(line,raiseToNearestAndChange,0);
line->special = 0;
break;
case 25:
- // Ceiling Crush and Raise
+
EV_DoCeiling(line,crushAndRaise);
line->special = 0;
break;
case 30:
- // Raise floor to shortest texture height
- // on either side of lines.
+
+
EV_DoFloor(line,raiseToTexture);
line->special = 0;
break;
case 35:
- // Lights Very Dark
+
EV_LightTurnOn(line,35);
line->special = 0;
break;
case 36:
- // Lower Floor (TURBO)
+
EV_DoFloor(line,turboLower);
line->special = 0;
break;
case 37:
- // LowerAndChange
+
EV_DoFloor(line,lowerAndChange);
line->special = 0;
break;
case 38:
- // Lower Floor To Lowest
+
EV_DoFloor( line, lowerFloorToLowest );
line->special = 0;
break;
case 39:
- // TELEPORT!
+
EV_Teleport( line, side, thing );
line->special = 0;
break;
case 40:
- // RaiseCeilingLowerFloor
+
EV_DoCeiling( line, raiseToHighest );
EV_DoFloor( line, lowerFloorToLowest );
line->special = 0;
break;
case 44:
- // Ceiling Crush
+
EV_DoCeiling( line, lowerAndCrush );
line->special = 0;
break;
case 52:
- // EXIT!
+
G_ExitLevel ();
break;
case 53:
- // Perpetual Platform Raise
+
EV_DoPlat(line,perpetualRaise,0);
line->special = 0;
break;
case 54:
- // Platform Stop
+
EV_StopPlat(line);
line->special = 0;
break;
case 56:
- // Raise Floor Crush
+
EV_DoFloor(line,raiseFloorCrush);
line->special = 0;
break;
case 57:
- // Ceiling Crush Stop
+
EV_CeilingCrushStop(line);
line->special = 0;
break;
case 58:
- // Raise Floor 24
+
EV_DoFloor(line,raiseFloor24);
line->special = 0;
break;
case 59:
- // Raise Floor 24 And Change
+
EV_DoFloor(line,raiseFloor24AndChange);
line->special = 0;
break;
case 104:
- // Turn lights off in sector(tag)
+
EV_TurnTagLightsOff(line);
line->special = 0;
break;
case 108:
- // Blazing Door Raise (faster than TURBO!)
+
EV_DoDoor (line,blazeRaise);
line->special = 0;
break;
case 109:
- // Blazing Door Open (faster than TURBO!)
+
EV_DoDoor (line,blazeOpen);
line->special = 0;
break;
case 100:
- // Build Stairs Turbo 16
+
EV_BuildStairs(line,turbo16);
line->special = 0;
break;
case 110:
- // Blazing Door Close (faster than TURBO!)
+
EV_DoDoor (line,blazeClose);
line->special = 0;
break;
case 119:
- // Raise floor to nearest surr. floor
+
EV_DoFloor(line,raiseFloorToNearest);
line->special = 0;
break;
case 121:
- // Blazing PlatDownWaitUpStay
+
EV_DoPlat(line,blazeDWUS,0);
line->special = 0;
break;
case 124:
- // Secret EXIT
+
G_SecretExitLevel ();
break;
case 125:
- // TELEPORT MonsterONLY
+
if (!thing->player)
{
EV_Teleport( line, side, thing );
@@ -772,178 +772,178 @@ P_CrossSpecialLine
break;
case 130:
- // Raise Floor Turbo
+
EV_DoFloor(line,raiseFloorTurbo);
line->special = 0;
break;
case 141:
- // Silent Ceiling Crush & Raise
+
EV_DoCeiling(line,silentCrushAndRaise);
line->special = 0;
break;
- // RETRIGGERS. All from here till end.
+
case 72:
- // Ceiling Crush
+
EV_DoCeiling( line, lowerAndCrush );
break;
case 73:
- // Ceiling Crush and Raise
+
EV_DoCeiling(line,crushAndRaise);
break;
case 74:
- // Ceiling Crush Stop
+
EV_CeilingCrushStop(line);
break;
case 75:
- // Close Door
+
EV_DoDoor(line,close);
break;
case 76:
- // Close Door 30
+
EV_DoDoor(line,close30ThenOpen);
break;
case 77:
- // Fast Ceiling Crush & Raise
+
EV_DoCeiling(line,fastCrushAndRaise);
break;
case 79:
- // Lights Very Dark
+
EV_LightTurnOn(line,35);
break;
case 80:
- // Light Turn On - brightest near
+
EV_LightTurnOn(line,0);
break;
case 81:
- // Light Turn On 255
+
EV_LightTurnOn(line,255);
break;
case 82:
- // Lower Floor To Lowest
+
EV_DoFloor( line, lowerFloorToLowest );
break;
case 83:
- // Lower Floor
+
EV_DoFloor(line,lowerFloor);
break;
case 84:
- // LowerAndChange
+
EV_DoFloor(line,lowerAndChange);
break;
case 86:
- // Open Door
+
EV_DoDoor(line,open);
break;
case 87:
- // Perpetual Platform Raise
+
EV_DoPlat(line,perpetualRaise,0);
break;
case 88:
- // PlatDownWaitUp
+
EV_DoPlat(line,downWaitUpStay,0);
break;
case 89:
- // Platform Stop
+
EV_StopPlat(line);
break;
case 90:
- // Raise Door
+
EV_DoDoor(line,normal);
break;
case 91:
- // Raise Floor
+
EV_DoFloor(line,raiseFloor);
break;
case 92:
- // Raise Floor 24
+
EV_DoFloor(line,raiseFloor24);
break;
case 93:
- // Raise Floor 24 And Change
+
EV_DoFloor(line,raiseFloor24AndChange);
break;
case 94:
- // Raise Floor Crush
+
EV_DoFloor(line,raiseFloorCrush);
break;
case 95:
- // Raise floor to nearest height
- // and change texture.
+
+
EV_DoPlat(line,raiseToNearestAndChange,0);
break;
case 96:
- // Raise floor to shortest texture height
- // on either side of lines.
+
+
EV_DoFloor(line,raiseToTexture);
break;
case 97:
- // TELEPORT!
+
EV_Teleport( line, side, thing );
break;
case 98:
- // Lower Floor (TURBO)
+
EV_DoFloor(line,turboLower);
break;
case 105:
- // Blazing Door Raise (faster than TURBO!)
+
EV_DoDoor (line,blazeRaise);
break;
case 106:
- // Blazing Door Open (faster than TURBO!)
+
EV_DoDoor (line,blazeOpen);
break;
case 107:
- // Blazing Door Close (faster than TURBO!)
+
EV_DoDoor (line,blazeClose);
break;
case 120:
- // Blazing PlatDownWaitUpStay.
+
EV_DoPlat(line,blazeDWUS,0);
break;
case 126:
- // TELEPORT MonsterONLY.
+
if (!thing->player)
EV_Teleport( line, side, thing );
break;
case 128:
- // Raise To Nearest Floor
+
EV_DoFloor(line,raiseFloorToNearest);
break;
case 129:
- // Raise Floor Turbo
+
EV_DoFloor(line,raiseFloorTurbo);
break;
}
@@ -951,10 +951,10 @@ P_CrossSpecialLine
-//
-// P_ShootSpecialLine - IMPACT SPECIALS
-// Called when a thing shoots a special line.
-//
+
+
+
+
void
P_ShootSpecialLine
( mobj_t* thing,
@@ -962,14 +962,14 @@ P_ShootSpecialLine
{
int ok;
- // Impacts that other things can activate.
+
if (!thing->player)
{
ok = 0;
switch(line->special)
{
case 46:
- // OPEN DOOR IMPACT
+
ok = 1;
break;
}
@@ -980,19 +980,19 @@ P_ShootSpecialLine
switch(line->special)
{
case 24:
- // RAISE FLOOR
+
EV_DoFloor(line,raiseFloor);
P_ChangeSwitchTexture(line,0);
break;
case 46:
- // OPEN DOOR
+
EV_DoDoor(line,open);
P_ChangeSwitchTexture(line,1);
break;
case 47:
- // RAISE FLOOR NEAR AND CHANGE
+
EV_DoPlat(line,raiseToNearestAndChange,0);
P_ChangeSwitchTexture(line,0);
break;
@@ -1001,42 +1001,42 @@ P_ShootSpecialLine
-//
-// P_PlayerInSpecialSector
-// Called every tic frame
-// that the player origin is in a special sector
-//
+
+
+
+
+
void P_PlayerInSpecialSector (player_t* player)
{
sector_t* sector;
sector = player->mo->subsector->sector;
- // Falling, not all the way down yet?
+
if (player->mo->z != sector->floorheight)
return;
- // Has hitten ground.
+
switch (sector->special)
{
case 5:
- // HELLSLIME DAMAGE
+
if (!player->powers[pw_ironfeet])
if (!(leveltime&0x1f))
P_DamageMobj (player->mo, NULL, NULL, 10);
break;
case 7:
- // NUKAGE DAMAGE
+
if (!player->powers[pw_ironfeet])
if (!(leveltime&0x1f))
P_DamageMobj (player->mo, NULL, NULL, 5);
break;
case 16:
- // SUPER HELLSLIME DAMAGE
+
case 4:
- // STROBE HURT
+
if (!player->powers[pw_ironfeet]
|| (P_Random()<5) )
{
@@ -1046,13 +1046,13 @@ void P_PlayerInSpecialSector (player_t* player)
break;
case 9:
- // SECRET SECTOR
+
player->secretcount++;
sector->special = 0;
break;
case 11:
- // EXIT SUPER DAMAGE! (for E1M8 finale)
+
player->cheats &= ~CF_GODMODE;
if (!(leveltime&0x1f))
@@ -1073,10 +1073,10 @@ void P_PlayerInSpecialSector (player_t* player)
-//
-// P_UpdateSpecials
-// Animate planes, scroll walls, etc.
-//
+
+
+
+
boolean levelTimer;
int levelTimeCount;
@@ -1088,7 +1088,7 @@ void P_UpdateSpecials (void)
line_t* line;
- // LEVEL TIMER
+
if (levelTimer == true)
{
levelTimeCount--;
@@ -1096,7 +1096,7 @@ void P_UpdateSpecials (void)
G_ExitLevel();
}
- // ANIMATE FLATS AND TEXTURES GLOBALLY
+
for (anim = anims ; anim < lastanim ; anim++)
{
for (i=anim->basepic ; i<anim->basepic+anim->numpics ; i++)
@@ -1110,21 +1110,21 @@ void P_UpdateSpecials (void)
}
- // ANIMATE LINE SPECIALS
+
for (i = 0; i < numlinespecials; i++)
{
line = linespeciallist[i];
switch(line->special)
{
case 48:
- // EFFECT FIRSTCOL SCROLL +
+
sides[line->sidenum[0]].textureoffset += FRACUNIT;
break;
}
}
- // DO BUTTONS
+
for (i = 0; i < MAXBUTTONS; i++)
if (buttonlist[i].btimer)
{
@@ -1157,9 +1157,9 @@ void P_UpdateSpecials (void)
-//
-// Special Stuff that can not be categorized
-//
+
+
+
int EV_DoDonut(line_t* line)
{
sector_t* s1;
@@ -1176,7 +1176,7 @@ int EV_DoDonut(line_t* line)
{
s1 = §ors[secnum];
- // ALREADY MOVING? IF SO, KEEP GOING...
+
if (s1->specialdata)
continue;
@@ -1189,7 +1189,7 @@ int EV_DoDonut(line_t* line)
continue;
s3 = s2->lines[i]->backsector;
- // Spawn rising slime
+
floor = Z_Malloc (sizeof(*floor), PU_LEVSPEC, 0);
P_AddThinker (&floor->thinker);
s2->specialdata = floor;
@@ -1203,7 +1203,7 @@ int EV_DoDonut(line_t* line)
floor->newspecial = 0;
floor->floordestheight = s3->floorheight;
- // Spawn lowering donut-hole
+
floor = Z_Malloc (sizeof(*floor), PU_LEVSPEC, 0);
P_AddThinker (&floor->thinker);
s1->specialdata = floor;
@@ -1222,20 +1222,20 @@ int EV_DoDonut(line_t* line)
-//
-// SPECIAL SPAWNING
-//
-//
-// P_SpawnSpecials
-// After the map has been loaded, scan for specials
-// that spawn thinkers
-//
+
+
+
+
+
+
+
+
short numlinespecials;
line_t* linespeciallist[MAXLINEANIMS];
-// Parses command line parameters.
+
void P_SpawnSpecials (void)
{
sector_t* sector;
@@ -1247,7 +1247,7 @@ void P_SpawnSpecials (void)
episode = 2;
- // See if -TIMER needs to be used.
+
levelTimer = false;
i = M_CheckParm("-avg");
@@ -1266,7 +1266,7 @@ void P_SpawnSpecials (void)
levelTimeCount = time;
}
- // Init special SECTORs.
+
sector = sectors;
for (i=0 ; i<numsectors ; i++, sector++)
{
@@ -1276,52 +1276,52 @@ void P_SpawnSpecials (void)
switch (sector->special)
{
case 1:
- // FLICKERING LIGHTS
+
P_SpawnLightFlash (sector);
break;
case 2:
- // STROBE FAST
+
P_SpawnStrobeFlash(sector,FASTDARK,0);
break;
case 3:
- // STROBE SLOW
+
P_SpawnStrobeFlash(sector,SLOWDARK,0);
break;
case 4:
- // STROBE FAST/DEATH SLIME
+
P_SpawnStrobeFlash(sector,FASTDARK,0);
sector->special = 4;
break;
case 8:
- // GLOWING LIGHT
+
P_SpawnGlowingLight(sector);
break;
case 9:
- // SECRET SECTOR
+
totalsecret++;
break;
case 10:
- // DOOR CLOSE IN 30 SECONDS
+
P_SpawnDoorCloseIn30 (sector);
break;
case 12:
- // SYNC STROBE SLOW
+
P_SpawnStrobeFlash (sector, SLOWDARK, 1);
break;
case 13:
- // SYNC STROBE FAST
+
P_SpawnStrobeFlash (sector, FASTDARK, 1);
break;
case 14:
- // DOOR RAISE IN 5 MINUTES
+
P_SpawnDoorRaiseIn5Mins (sector, i);
break;
@@ -1332,14 +1332,14 @@ void P_SpawnSpecials (void)
}
- // Init line EFFECTs
+
numlinespecials = 0;
for (i = 0;i < numlines; i++)
{
switch(lines[i].special)
{
case 48:
- // EFFECT FIRSTCOL SCROLL+
+
linespeciallist[numlinespecials] = &lines[i];
numlinespecials++;
break;
@@ -1347,7 +1347,7 @@ void P_SpawnSpecials (void)
}
- // Init other misc stuff
+
for (i = 0;i < MAXCEILINGS;i++)
activeceilings[i] = NULL;
@@ -1357,6 +1357,6 @@ void P_SpawnSpecials (void)
for (i = 0;i < MAXBUTTONS;i++)
memset(&buttonlist[i],0,sizeof(button_t));
- // UNUSED: no horizonal sliders.
- // P_InitSlidingDoorFrames();
+
+
}
diff --git a/src/p_spec.h b/src/p_spec.h
@@ -1,53 +1,53 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION: none
-// Implements special effects:
-// Texture animation, height or lighting changes
-// according to adjacent sectors, respective
-// utility functions, etc.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __P_SPEC__
#define __P_SPEC__
-//
-// End-level timer (-TIMER option)
-//
+
+
+
extern boolean levelTimer;
extern int levelTimeCount;
-// Define values for map objects
+
#define MO_TELEPORTMAN 14
-// at game start
+
void P_InitPicAnims (void);
-// at map load
+
void P_SpawnSpecials (void);
-// every tic
+
void P_UpdateSpecials (void);
-// when needed
+
boolean
P_UseSpecialLine
( mobj_t* thing,
@@ -111,16 +111,16 @@ getNextSector
sector_t* sec );
-//
-// SPECIAL
-//
+
+
+
int EV_DoDonut(line_t* line);
-//
-// P_LIGHTS
-//
+
+
+
typedef struct
{
thinker_t thinker;
@@ -203,9 +203,9 @@ void P_SpawnGlowingLight(sector_t* sector);
-//
-// P_SWITCH
-//
+
+
+
typedef struct
{
char name1[9];
@@ -237,13 +237,13 @@ typedef struct
- // max # of wall switches in a level
+
#define MAXSWITCHES 50
- // 4 players, 4 buttons each at once, max.
+
#define MAXBUTTONS 16
- // 1 second, in ticks.
+
#define BUTTONTIME 35
extern button_t buttonlist[MAXBUTTONS];
@@ -256,9 +256,9 @@ P_ChangeSwitchTexture
void P_InitSwitchList(void);
-//
-// P_PLATS
-//
+
+
+
typedef enum
{
up,
@@ -322,9 +322,9 @@ void EV_StopPlat(line_t* line);
void P_ActivateInStasis(int tag);
-//
-// P_DOORS
-//
+
+
+
typedef enum
{
normal,
@@ -348,13 +348,13 @@ typedef struct
fixed_t topheight;
fixed_t speed;
- // 1 = up, 0 = waiting at top, -1 = down
+
int direction;
- // tics to wait at the top
+
int topwait;
- // (keep in case a door going down is reset)
- // when it reaches 0, start going down
+
+
int topcountdown;
} vldoor_t;
@@ -390,10 +390,10 @@ P_SpawnDoorRaiseIn5Mins
-#if 0 // UNUSED
-//
-// Sliding doors...
-//
+#if 0
+
+
+
typedef enum
{
sd_opening,
@@ -455,13 +455,13 @@ typedef struct
-// how many frames of animation
+
#define SNUMFRAMES 4
#define SDOORWAIT 35*3
#define SWAITTICS 4
-// how many diff. types of anims
+
#define MAXSLIDEDOORS 5
void P_InitSlidingDoorFrames(void);
@@ -474,9 +474,9 @@ EV_SlidingDoor
-//
-// P_CEILNG
-//
+
+
+
typedef enum
{
lowerToFloor,
@@ -500,10 +500,10 @@ typedef struct
fixed_t speed;
boolean crush;
- // 1 = up, 0 = waiting, -1 = down
+
int direction;
- // ID
+
int tag;
int olddirection;
@@ -531,38 +531,38 @@ int EV_CeilingCrushStop(line_t* line);
void P_ActivateInStasisCeiling(line_t* line);
-//
-// P_FLOOR
-//
+
+
+
typedef enum
{
- // lower floor to highest surrounding floor
+
lowerFloor,
- // lower floor to lowest surrounding floor
+
lowerFloorToLowest,
- // lower floor to highest surrounding floor VERY FAST
+
turboLower,
- // raise floor to lowest surrounding CEILING
+
raiseFloor,
- // raise floor to next highest surrounding floor
+
raiseFloorToNearest,
- // raise floor to shortest height texture around it
+
raiseToTexture,
- // lower floor to lowest surrounding floor
- // and change floorpic
+
+
lowerAndChange,
raiseFloor24,
raiseFloor24AndChange,
raiseFloorCrush,
- // raise to next highest floor, turbo-speed
+
raiseFloorTurbo,
donutRaise,
raiseFloor512
@@ -574,8 +574,8 @@ typedef enum
typedef enum
{
- build8, // slowly build by 8
- turbo16 // quickly build by 16
+ build8,
+ turbo16
} stair_e;
@@ -628,9 +628,9 @@ EV_DoFloor
void T_MoveFloor( floormove_t* floor);
-//
-// P_TELEPT
-//
+
+
+
int
EV_Teleport
( line_t* line,
@@ -638,8 +638,8 @@ EV_Teleport
mobj_t* thing );
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/p_switch.c b/src/p_switch.c
@@ -1,26 +1,26 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Switches, buttons. Two-state animation. Exits.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_switch.c,v 1.3 1997/01/28 22:08:29 b1 Exp $";
@@ -34,20 +34,20 @@ rcsid[] = "$Id: p_switch.c,v 1.3 1997/01/28 22:08:29 b1 Exp $";
#include "s_sound.h"
-// Data.
+
#include "sounds.h"
-// State.
+
#include "doomstat.h"
#include "r_state.h"
-//
-// CHANGE THE TEXTURE OF A WALL SWITCH TO ITS OPPOSITE
-//
+
+
+
switchlist_t alphSwitchList[] =
{
- // Doom shareware episode 1 switches
+
{"SW1BRCOM", "SW2BRCOM", 1},
{"SW1BRN1", "SW2BRN1", 1},
{"SW1BRN2", "SW2BRN2", 1},
@@ -68,7 +68,7 @@ switchlist_t alphSwitchList[] =
{"SW1STONE", "SW2STONE", 1},
{"SW1STRTN", "SW2STRTN", 1},
- // Doom registered episodes 2&3 switches
+
{"SW1BLUE", "SW2BLUE", 2},
{"SW1CMT", "SW2CMT", 2},
{"SW1GARG", "SW2GARG", 2},
@@ -80,7 +80,7 @@ switchlist_t alphSwitchList[] =
{"SW1VINE", "SW2VINE", 2},
{"SW1WOOD", "SW2WOOD", 2},
- // Doom II switches
+
{"SW1PANEL", "SW2PANEL", 3},
{"SW1ROCK", "SW2ROCK", 3},
{"SW1MET2", "SW2MET2", 3},
@@ -100,10 +100,10 @@ int switchlist[MAXSWITCHES * 2];
int numswitches;
button_t buttonlist[MAXBUTTONS];
-//
-// P_InitSwitchList
-// Only called at game initialization.
-//
+
+
+
+
void P_InitSwitchList(void)
{
int i;
@@ -129,7 +129,7 @@ void P_InitSwitchList(void)
if (alphSwitchList[i].episode <= episode)
{
-#if 0 // UNUSED - debug?
+#if 0
int value;
if (R_CheckTextureNumForName(alphSwitchList[i].name1) < 0)
@@ -148,9 +148,9 @@ void P_InitSwitchList(void)
}
-//
-// Start a button counting down till it turns off.
-//
+
+
+
void
P_StartButton
( line_t* line,
@@ -160,7 +160,7 @@ P_StartButton
{
int i;
- // See if button is already pressed
+
for (i = 0;i < MAXBUTTONS;i++)
{
if (buttonlist[i].btimer
@@ -193,10 +193,10 @@ P_StartButton
-//
-// Function that changes wall texture.
-// Tell it if switch is ok to use again (1=yes, it's a button).
-//
+
+
+
+
void
P_ChangeSwitchTexture
( line_t* line,
@@ -217,7 +217,7 @@ P_ChangeSwitchTexture
sound = sfx_swtchn;
- // EXIT SWITCH?
+
if (line->special == 11)
sound = sfx_swtchx;
@@ -267,11 +267,11 @@ P_ChangeSwitchTexture
-//
-// P_UseSpecialLine
-// Called when a thing uses a special line.
-// Only the front sides of lines are usable.
-//
+
+
+
+
+
boolean
P_UseSpecialLine
( mobj_t* thing,
@@ -279,15 +279,15 @@ P_UseSpecialLine
int side )
{
- // Err...
- // Use the back sides of VERY SPECIAL lines...
+
+
if (side)
{
switch(line->special)
{
case 124:
- // Sliding door open&close
- // UNUSED?
+
+
break;
default:
@@ -297,19 +297,19 @@ P_UseSpecialLine
}
- // Switches that other things can activate.
+
if (!thing->player)
{
- // never open secret doors
+
if (line->flags & ML_SECRET)
return false;
switch(line->special)
{
- case 1: // MANUAL DOOR RAISE
- case 32: // MANUAL BLUE
- case 33: // MANUAL RED
- case 34: // MANUAL YELLOW
+ case 1:
+ case 32:
+ case 33:
+ case 34:
break;
default:
@@ -319,330 +319,330 @@ P_UseSpecialLine
}
- // do something
+
switch (line->special)
{
- // MANUALS
- case 1: // Vertical Door
- case 26: // Blue Door/Locked
- case 27: // Yellow Door /Locked
- case 28: // Red Door /Locked
-
- case 31: // Manual door open
- case 32: // Blue locked door open
- case 33: // Red locked door open
- case 34: // Yellow locked door open
-
- case 117: // Blazing door raise
- case 118: // Blazing door open
+
+ case 1:
+ case 26:
+ case 27:
+ case 28:
+
+ case 31:
+ case 32:
+ case 33:
+ case 34:
+
+ case 117:
+ case 118:
EV_VerticalDoor (line, thing);
break;
- //UNUSED - Door Slide Open&Close
- // case 124:
- // EV_SlidingDoor (line, thing);
- // break;
+
+
+
+
- // SWITCHES
+
case 7:
- // Build Stairs
+
if (EV_BuildStairs(line,build8))
P_ChangeSwitchTexture(line,0);
break;
case 9:
- // Change Donut
+
if (EV_DoDonut(line))
P_ChangeSwitchTexture(line,0);
break;
case 11:
- // Exit level
+
P_ChangeSwitchTexture(line,0);
G_ExitLevel ();
break;
case 14:
- // Raise Floor 32 and change texture
+
if (EV_DoPlat(line,raiseAndChange,32))
P_ChangeSwitchTexture(line,0);
break;
case 15:
- // Raise Floor 24 and change texture
+
if (EV_DoPlat(line,raiseAndChange,24))
P_ChangeSwitchTexture(line,0);
break;
case 18:
- // Raise Floor to next highest floor
+
if (EV_DoFloor(line, raiseFloorToNearest))
P_ChangeSwitchTexture(line,0);
break;
case 20:
- // Raise Plat next highest floor and change texture
+
if (EV_DoPlat(line,raiseToNearestAndChange,0))
P_ChangeSwitchTexture(line,0);
break;
case 21:
- // PlatDownWaitUpStay
+
if (EV_DoPlat(line,downWaitUpStay,0))
P_ChangeSwitchTexture(line,0);
break;
case 23:
- // Lower Floor to Lowest
+
if (EV_DoFloor(line,lowerFloorToLowest))
P_ChangeSwitchTexture(line,0);
break;
case 29:
- // Raise Door
+
if (EV_DoDoor(line,normal))
P_ChangeSwitchTexture(line,0);
break;
case 41:
- // Lower Ceiling to Floor
+
if (EV_DoCeiling(line,lowerToFloor))
P_ChangeSwitchTexture(line,0);
break;
case 71:
- // Turbo Lower Floor
+
if (EV_DoFloor(line,turboLower))
P_ChangeSwitchTexture(line,0);
break;
case 49:
- // Ceiling Crush And Raise
+
if (EV_DoCeiling(line,crushAndRaise))
P_ChangeSwitchTexture(line,0);
break;
case 50:
- // Close Door
+
if (EV_DoDoor(line,close))
P_ChangeSwitchTexture(line,0);
break;
case 51:
- // Secret EXIT
+
P_ChangeSwitchTexture(line,0);
G_SecretExitLevel ();
break;
case 55:
- // Raise Floor Crush
+
if (EV_DoFloor(line,raiseFloorCrush))
P_ChangeSwitchTexture(line,0);
break;
case 101:
- // Raise Floor
+
if (EV_DoFloor(line,raiseFloor))
P_ChangeSwitchTexture(line,0);
break;
case 102:
- // Lower Floor to Surrounding floor height
+
if (EV_DoFloor(line,lowerFloor))
P_ChangeSwitchTexture(line,0);
break;
case 103:
- // Open Door
+
if (EV_DoDoor(line,open))
P_ChangeSwitchTexture(line,0);
break;
case 111:
- // Blazing Door Raise (faster than TURBO!)
+
if (EV_DoDoor (line,blazeRaise))
P_ChangeSwitchTexture(line,0);
break;
case 112:
- // Blazing Door Open (faster than TURBO!)
+
if (EV_DoDoor (line,blazeOpen))
P_ChangeSwitchTexture(line,0);
break;
case 113:
- // Blazing Door Close (faster than TURBO!)
+
if (EV_DoDoor (line,blazeClose))
P_ChangeSwitchTexture(line,0);
break;
case 122:
- // Blazing PlatDownWaitUpStay
+
if (EV_DoPlat(line,blazeDWUS,0))
P_ChangeSwitchTexture(line,0);
break;
case 127:
- // Build Stairs Turbo 16
+
if (EV_BuildStairs(line,turbo16))
P_ChangeSwitchTexture(line,0);
break;
case 131:
- // Raise Floor Turbo
+
if (EV_DoFloor(line,raiseFloorTurbo))
P_ChangeSwitchTexture(line,0);
break;
case 133:
- // BlzOpenDoor BLUE
+
case 135:
- // BlzOpenDoor RED
+
case 137:
- // BlzOpenDoor YELLOW
+
if (EV_DoLockedDoor (line,blazeOpen,thing))
P_ChangeSwitchTexture(line,0);
break;
case 140:
- // Raise Floor 512
+
if (EV_DoFloor(line,raiseFloor512))
P_ChangeSwitchTexture(line,0);
break;
- // BUTTONS
+
case 42:
- // Close Door
+
if (EV_DoDoor(line,close))
P_ChangeSwitchTexture(line,1);
break;
case 43:
- // Lower Ceiling to Floor
+
if (EV_DoCeiling(line,lowerToFloor))
P_ChangeSwitchTexture(line,1);
break;
case 45:
- // Lower Floor to Surrounding floor height
+
if (EV_DoFloor(line,lowerFloor))
P_ChangeSwitchTexture(line,1);
break;
case 60:
- // Lower Floor to Lowest
+
if (EV_DoFloor(line,lowerFloorToLowest))
P_ChangeSwitchTexture(line,1);
break;
case 61:
- // Open Door
+
if (EV_DoDoor(line,open))
P_ChangeSwitchTexture(line,1);
break;
case 62:
- // PlatDownWaitUpStay
+
if (EV_DoPlat(line,downWaitUpStay,1))
P_ChangeSwitchTexture(line,1);
break;
case 63:
- // Raise Door
+
if (EV_DoDoor(line,normal))
P_ChangeSwitchTexture(line,1);
break;
case 64:
- // Raise Floor to ceiling
+
if (EV_DoFloor(line,raiseFloor))
P_ChangeSwitchTexture(line,1);
break;
case 66:
- // Raise Floor 24 and change texture
+
if (EV_DoPlat(line,raiseAndChange,24))
P_ChangeSwitchTexture(line,1);
break;
case 67:
- // Raise Floor 32 and change texture
+
if (EV_DoPlat(line,raiseAndChange,32))
P_ChangeSwitchTexture(line,1);
break;
case 65:
- // Raise Floor Crush
+
if (EV_DoFloor(line,raiseFloorCrush))
P_ChangeSwitchTexture(line,1);
break;
case 68:
- // Raise Plat to next highest floor and change texture
+
if (EV_DoPlat(line,raiseToNearestAndChange,0))
P_ChangeSwitchTexture(line,1);
break;
case 69:
- // Raise Floor to next highest floor
+
if (EV_DoFloor(line, raiseFloorToNearest))
P_ChangeSwitchTexture(line,1);
break;
case 70:
- // Turbo Lower Floor
+
if (EV_DoFloor(line,turboLower))
P_ChangeSwitchTexture(line,1);
break;
case 114:
- // Blazing Door Raise (faster than TURBO!)
+
if (EV_DoDoor (line,blazeRaise))
P_ChangeSwitchTexture(line,1);
break;
case 115:
- // Blazing Door Open (faster than TURBO!)
+
if (EV_DoDoor (line,blazeOpen))
P_ChangeSwitchTexture(line,1);
break;
case 116:
- // Blazing Door Close (faster than TURBO!)
+
if (EV_DoDoor (line,blazeClose))
P_ChangeSwitchTexture(line,1);
break;
case 123:
- // Blazing PlatDownWaitUpStay
+
if (EV_DoPlat(line,blazeDWUS,0))
P_ChangeSwitchTexture(line,1);
break;
case 132:
- // Raise Floor Turbo
+
if (EV_DoFloor(line,raiseFloorTurbo))
P_ChangeSwitchTexture(line,1);
break;
case 99:
- // BlzOpenDoor BLUE
+
case 134:
- // BlzOpenDoor RED
+
case 136:
- // BlzOpenDoor YELLOW
+
if (EV_DoLockedDoor (line,blazeOpen,thing))
P_ChangeSwitchTexture(line,1);
break;
case 138:
- // Light Turn On
+
EV_LightTurnOn(line,255);
P_ChangeSwitchTexture(line,1);
break;
case 139:
- // Light Turn Off
+
EV_LightTurnOn(line,35);
P_ChangeSwitchTexture(line,1);
break;
diff --git a/src/p_telept.c b/src/p_telept.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Teleportation.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_telept.c,v 1.3 1997/01/28 22:08:29 b1 Exp $";
@@ -33,17 +33,17 @@ rcsid[] = "$Id: p_telept.c,v 1.3 1997/01/28 22:08:29 b1 Exp $";
#include "p_local.h"
-// Data.
+
#include "sounds.h"
-// State.
+
#include "r_state.h"
-//
-// TELEPORTATION
-//
+
+
+
int
EV_Teleport
( line_t* line,
@@ -61,12 +61,12 @@ EV_Teleport
fixed_t oldy;
fixed_t oldz;
- // don't teleport missiles
+
if (thing->flags & MF_MISSILE)
return 0;
- // Don't teleport if hit back of line,
- // so you can get out of teleporter.
+
+
if (side == 1)
return 0;
@@ -81,18 +81,18 @@ EV_Teleport
thinker != &thinkercap;
thinker = thinker->next)
{
- // not a mobj
+
if (thinker->function.acp1 != (actionf_p1)P_MobjThinker)
continue;
m = (mobj_t *)thinker;
- // not a teleportman
+
if (m->type != MT_TELEPORTMAN )
continue;
sector = m->subsector->sector;
- // wrong sector
+
if (sector-sectors != i )
continue;
@@ -103,21 +103,21 @@ EV_Teleport
if (!P_TeleportMove (thing, m->x, m->y))
return 0;
- thing->z = thing->floorz; //fixme: not needed?
+ thing->z = thing->floorz;
if (thing->player)
thing->player->viewz = thing->z+thing->player->viewheight;
- // spawn teleport fog at source and destination
+
fog = P_SpawnMobj (oldx, oldy, oldz, MT_TFOG);
S_StartSound (fog, sfx_telept);
an = m->angle >> ANGLETOFINESHIFT;
fog = P_SpawnMobj (m->x+20*finecosine[an], m->y+20*finesine[an]
, thing->z, MT_TFOG);
- // emit sound, where?
+
S_StartSound (fog, sfx_telept);
- // don't move for a bit
+
if (thing->player)
thing->reactiontime = 18;
diff --git a/src/p_tick.c b/src/p_tick.c
@@ -1,26 +1,26 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Archiving: SaveGame I/O.
-// Thinker, Ticker.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: p_tick.c,v 1.4 1997/02/03 16:47:55 b1 Exp $";
@@ -33,23 +33,23 @@ rcsid[] = "$Id: p_tick.c,v 1.4 1997/02/03 16:47:55 b1 Exp $";
int leveltime;
-//
-// THINKERS
-// All thinkers should be allocated by Z_Malloc
-// so they can be operated on uniformly.
-// The actual structures will vary in size,
-// but the first element must be thinker_t.
-//
-// Both the head and tail of the thinker list.
+
+
+
+
+
+
+
+
thinker_t thinkercap;
-//
-// P_InitThinkers
-//
+
+
+
void P_InitThinkers (void)
{
thinkercap.prev = thinkercap.next = &thinkercap;
@@ -58,10 +58,10 @@ void P_InitThinkers (void)
-//
-// P_AddThinker
-// Adds a new thinker at the end of the list.
-//
+
+
+
+
void P_AddThinker (thinker_t* thinker)
{
thinkercap.prev->next = thinker;
@@ -72,32 +72,32 @@ void P_AddThinker (thinker_t* thinker)
-//
-// P_RemoveThinker
-// Deallocation is lazy -- it will not actually be freed
-// until its thinking turn comes up.
-//
+
+
+
+
+
void P_RemoveThinker (thinker_t* thinker)
{
- // FIXME: NOP.
+
thinker->function.acv = (actionf_v)(-1);
}
-//
-// P_AllocateThinker
-// Allocates memory and adds a new thinker at the end of the list.
-//
+
+
+
+
void P_AllocateThinker (thinker_t* thinker)
{
}
-//
-// P_RunThinkers
-//
+
+
+
void P_RunThinkers (void)
{
thinker_t* currentthinker;
@@ -107,7 +107,7 @@ void P_RunThinkers (void)
{
if ( currentthinker->function.acv == (actionf_v)(-1) )
{
- // time to remove it
+
currentthinker->next->prev = currentthinker->prev;
currentthinker->prev->next = currentthinker->next;
Z_Free (currentthinker);
@@ -123,19 +123,19 @@ void P_RunThinkers (void)
-//
-// P_Ticker
-//
+
+
+
void P_Ticker (void)
{
int i;
- // run the tic
+
if (paused)
return;
- // pause if in menu and at least one tic has been run
+
if ( !netgame
&& menuactive
&& !demoplayback
@@ -153,6 +153,6 @@ void P_Ticker (void)
P_UpdateSpecials ();
P_RespawnSpecials ();
- // for par times
+
leveltime++;
}
diff --git a/src/p_tick.h b/src/p_tick.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// ?
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __P_TICK__
@@ -29,16 +29,16 @@
#endif
-// Called by C_Ticker,
-// can call G_PlayerExited.
-// Carries out all thinking of monsters and players.
+
+
+
void P_Ticker (void);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/p_user.c b/src/p_user.c
@@ -1,27 +1,27 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Player related stuff.
-// Bobbing POV/weapon, movement.
-// Pending weapon.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
@@ -37,24 +37,24 @@ rcsid[] = "$Id: p_user.c,v 1.3 1997/01/28 22:08:29 b1 Exp $";
-// Index of the special effects (INVUL inverse) map.
+
#define INVERSECOLORMAP 32
-//
-// Movement.
-//
-// 16 pixels of bob
+
+
+
+
#define MAXBOB 0x100000
boolean onground;
-//
-// P_Thrust
-// Moves the given origin along a given angle.
-//
+
+
+
+
void
P_Thrust
( player_t* player,
@@ -70,21 +70,21 @@ P_Thrust
-//
-// P_CalcHeight
-// Calculate the walking / running height adjustment
-//
+
+
+
+
void P_CalcHeight (player_t* player)
{
int angle;
fixed_t bob;
- // Regular movement bobbing
- // (needs to be calculated for gun swing
- // even if not on ground)
- // OPTIMIZE: tablify angle
- // Note: a LUT allows for effects
- // like a ramp with low health.
+
+
+
+
+
+
player->bob =
FixedMul (player->mo->momx, player->mo->momx)
+ FixedMul (player->mo->momy,player->mo->momy);
@@ -109,7 +109,7 @@ void P_CalcHeight (player_t* player)
bob = FixedMul ( player->bob/2, finesine[angle]);
- // move viewheight
+
if (player->playerstate == PST_LIVE)
{
player->viewheight += player->deltaviewheight;
@@ -142,9 +142,9 @@ void P_CalcHeight (player_t* player)
-//
-// P_MovePlayer
-//
+
+
+
void P_MovePlayer (player_t* player)
{
ticcmd_t* cmd;
@@ -153,8 +153,8 @@ void P_MovePlayer (player_t* player)
player->mo->angle += (cmd->angleturn<<16);
- // Do not let the player control movement
- // if not onground.
+
+
onground = (player->mo->z <= player->mo->floorz);
if (cmd->forwardmove && onground)
@@ -172,11 +172,11 @@ void P_MovePlayer (player_t* player)
-//
-// P_DeathThink
-// Fall on your face when dying.
-// Decrease POV height to floor height.
-//
+
+
+
+
+
#define ANG5 (ANG90/18)
void P_DeathThink (player_t* player)
@@ -186,7 +186,7 @@ void P_DeathThink (player_t* player)
P_MovePsprites (player);
- // fall to the ground
+
if (player->viewheight > 6*FRACUNIT)
player->viewheight -= FRACUNIT;
@@ -208,8 +208,8 @@ void P_DeathThink (player_t* player)
if (delta < ANG5 || delta > (unsigned)-ANG5)
{
- // Looking at killer,
- // so fade damage flash down.
+
+
player->mo->angle = angle;
if (player->damagecount)
@@ -230,21 +230,21 @@ void P_DeathThink (player_t* player)
-//
-// P_PlayerThink
-//
+
+
+
void P_PlayerThink (player_t* player)
{
ticcmd_t* cmd;
weapontype_t newweapon;
- // fixme: do this in the cheat code
+
if (player->cheats & CF_NOCLIP)
player->mo->flags |= MF_NOCLIP;
else
player->mo->flags &= ~MF_NOCLIP;
- // chain saw run forward
+
cmd = &player->cmd;
if (player->mo->flags & MF_JUSTATTACKED)
{
@@ -261,9 +261,9 @@ void P_PlayerThink (player_t* player)
return;
}
- // Move around.
- // Reactiontime is used to prevent movement
- // for a bit after a teleport.
+
+
+
if (player->mo->reactiontime)
player->mo->reactiontime--;
else
@@ -274,17 +274,17 @@ void P_PlayerThink (player_t* player)
if (player->mo->subsector->sector->special)
P_PlayerInSpecialSector (player);
- // Check for weapon change.
+
- // A special event has no other buttons.
+
if (cmd->buttons & BT_SPECIAL)
cmd->buttons = 0;
if (cmd->buttons & BT_CHANGE)
{
- // The actual changing of the weapon is done
- // when the weapon psprite can do it
- // (read: not in the middle of an attack).
+
+
+
newweapon = (cmd->buttons&BT_WEAPONMASK)>>BT_WEAPONSHIFT;
if (newweapon == wp_fist
@@ -307,8 +307,8 @@ void P_PlayerThink (player_t* player)
if (player->weaponowned[newweapon]
&& newweapon != player->readyweapon)
{
- // Do not go to plasma or BFG in shareware,
- // even if cheated.
+
+
if ((newweapon != wp_plasma
&& newweapon != wp_bfg)
|| (gamemode != shareware) )
@@ -318,7 +318,7 @@ void P_PlayerThink (player_t* player)
}
}
- // check for use
+
if (cmd->buttons & BT_USE)
{
if (!player->usedown)
@@ -330,12 +330,12 @@ void P_PlayerThink (player_t* player)
else
player->usedown = false;
- // cycle psprites
+
P_MovePsprites (player);
- // Counters, time dependend power ups.
+
- // Strength counts up to diminish fade.
+
if (player->powers[pw_strength])
player->powers[pw_strength]++;
@@ -359,7 +359,7 @@ void P_PlayerThink (player_t* player)
player->bonuscount--;
- // Handling colormaps.
+
if (player->powers[pw_invulnerability])
{
if (player->powers[pw_invulnerability] > 4*32
@@ -373,7 +373,7 @@ void P_PlayerThink (player_t* player)
if (player->powers[pw_infrared] > 4*32
|| (player->powers[pw_infrared]&8) )
{
- // almost full bright
+
player->fixedcolormap = 1;
}
else
diff --git a/src/r_bsp.c b/src/r_bsp.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// BSP traversal, handling of LineSegs for rendering.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
@@ -36,11 +36,11 @@ rcsid[] = "$Id: r_bsp.c,v 1.4 1997/02/03 22:45:12 b1 Exp $";
#include "r_plane.h"
#include "r_things.h"
-// State.
+
#include "doomstat.h"
#include "r_state.h"
-//#include "r_local.h"
+
@@ -62,9 +62,9 @@ R_StoreWallRange
-//
-// R_ClearDrawSegs
-//
+
+
+
void R_ClearDrawSegs (void)
{
ds_p = drawsegs;
@@ -72,11 +72,11 @@ void R_ClearDrawSegs (void)
-//
-// ClipWallSegment
-// Clips the given range of columns
-// and includes it in the new clip list.
-//
+
+
+
+
+
typedef struct
{
int first;
@@ -87,19 +87,19 @@ typedef struct
#define MAXSEGS 32
-// newend is one past the last valid seg
+
cliprange_t* newend;
cliprange_t solidsegs[MAXSEGS];
-//
-// R_ClipSolidWallSegment
-// Does handle solid walls,
-// e.g. single sided LineDefs (middle texture)
-// that entirely block the view.
-//
+
+
+
+
+
+
void
R_ClipSolidWallSegment
( int first,
@@ -108,8 +108,8 @@ R_ClipSolidWallSegment
cliprange_t* next;
cliprange_t* start;
- // Find the first range that touches the range
- // (adjacent pixels are touching).
+
+
start = solidsegs;
while (start->last < first-1)
start++;
@@ -118,8 +118,8 @@ R_ClipSolidWallSegment
{
if (last < start->first-1)
{
- // Post is entirely visible (above start),
- // so insert a new clippost.
+
+
R_StoreWallRange (first, last);
next = newend;
newend++;
@@ -134,50 +134,50 @@ R_ClipSolidWallSegment
return;
}
- // There is a fragment above *start.
+
R_StoreWallRange (first, start->first - 1);
- // Now adjust the clip size.
+
start->first = first;
}
- // Bottom contained in start?
+
if (last <= start->last)
return;
next = start;
while (last >= (next+1)->first-1)
{
- // There is a fragment between two posts.
+
R_StoreWallRange (next->last + 1, (next+1)->first - 1);
next++;
if (last <= next->last)
{
- // Bottom is contained in next.
- // Adjust the clip size.
+
+
start->last = next->last;
goto crunch;
}
}
- // There is a fragment after *next.
+
R_StoreWallRange (next->last + 1, last);
- // Adjust the clip size.
+
start->last = last;
- // Remove start+1 to next from the clip list,
- // because start now covers their area.
+
+
crunch:
if (next == start)
{
- // Post just extended past the bottom of one post.
+
return;
}
while (next++ != newend)
{
- // Remove a post.
+
*++start = *next;
}
@@ -186,13 +186,13 @@ R_ClipSolidWallSegment
-//
-// R_ClipPassWallSegment
-// Clips the given range of columns,
-// but does not includes it in the clip list.
-// Does handle windows,
-// e.g. LineDefs with upper and lower texture.
-//
+
+
+
+
+
+
+
void
R_ClipPassWallSegment
( int first,
@@ -200,8 +200,8 @@ R_ClipPassWallSegment
{
cliprange_t* start;
- // Find the first range that touches the range
- // (adjacent pixels are touching).
+
+
start = solidsegs;
while (start->last < first-1)
start++;
@@ -210,22 +210,22 @@ R_ClipPassWallSegment
{
if (last < start->first-1)
{
- // Post is entirely visible (above start).
+
R_StoreWallRange (first, last);
return;
}
- // There is a fragment above *start.
+
R_StoreWallRange (first, start->first - 1);
}
- // Bottom contained in start?
+
if (last <= start->last)
return;
while (last >= (start+1)->first-1)
{
- // There is a fragment between two posts.
+
R_StoreWallRange (start->last + 1, (start+1)->first - 1);
start++;
@@ -233,15 +233,15 @@ R_ClipPassWallSegment
return;
}
- // There is a fragment after *next.
+
R_StoreWallRange (start->last + 1, last);
}
-//
-// R_ClearClipSegs
-//
+
+
+
void R_ClearClipSegs (void)
{
solidsegs[0].first = -0x7fffffff;
@@ -251,11 +251,11 @@ void R_ClearClipSegs (void)
newend = solidsegs+2;
}
-//
-// R_AddLine
-// Clips the given segment
-// and adds any visible pieces to the line list.
-//
+
+
+
+
+
void R_AddLine (seg_t* line)
{
int x1;
@@ -267,19 +267,19 @@ void R_AddLine (seg_t* line)
curline = line;
- // OPTIMIZE: quickly reject orthogonal back sides.
+
angle1 = R_PointToAngle (line->v1->x, line->v1->y);
angle2 = R_PointToAngle (line->v2->x, line->v2->y);
- // Clip to view edges.
- // OPTIMIZE: make constant out of 2*clipangle (FIELDOFVIEW).
+
+
span = angle1 - angle2;
- // Back side? I.e. backface culling?
+
if (span >= ANG180)
return;
- // Global angle needed by segcalc.
+
rw_angle1 = angle1;
angle1 -= viewangle;
angle2 -= viewangle;
@@ -289,7 +289,7 @@ void R_AddLine (seg_t* line)
{
tspan -= 2*clipangle;
- // Totally off the left edge?
+
if (tspan >= span)
return;
@@ -300,44 +300,44 @@ void R_AddLine (seg_t* line)
{
tspan -= 2*clipangle;
- // Totally off the left edge?
+
if (tspan >= span)
return;
angle2 = -clipangle;
}
- // The seg is in the view range,
- // but not necessarily visible.
+
+
angle1 = (angle1+ANG90)>>ANGLETOFINESHIFT;
angle2 = (angle2+ANG90)>>ANGLETOFINESHIFT;
x1 = viewangletox[angle1];
x2 = viewangletox[angle2];
- // Does not cross a pixel?
+
if (x1 == x2)
return;
backsector = line->backsector;
- // Single sided line?
+
if (!backsector)
goto clipsolid;
- // Closed door.
+
if (backsector->ceilingheight <= frontsector->floorheight
|| backsector->floorheight >= frontsector->ceilingheight)
goto clipsolid;
- // Window.
+
if (backsector->ceilingheight != frontsector->ceilingheight
|| backsector->floorheight != frontsector->floorheight)
goto clippass;
- // Reject empty lines used for triggers
- // and special events.
- // Identical floor and ceiling on both sides,
- // identical light levels on both sides,
- // and no middle texture.
+
+
+
+
+
if (backsector->ceilingpic == frontsector->ceilingpic
&& backsector->floorpic == frontsector->floorpic
&& backsector->lightlevel == frontsector->lightlevel
@@ -356,12 +356,12 @@ void R_AddLine (seg_t* line)
}
-//
-// R_CheckBBox
-// Checks BSP node/subtree bounding box.
-// Returns true
-// if some part of the bbox might be visible.
-//
+
+
+
+
+
+
int checkcoord[12][4] =
{
{3,0,2,1},
@@ -399,8 +399,8 @@ boolean R_CheckBBox (fixed_t* bspcoord)
int sx1;
int sx2;
- // Find the corners of the box
- // that define the edges from current viewpoint.
+
+
if (viewx <= bspcoord[BOXLEFT])
boxx = 0;
else if (viewx < bspcoord[BOXRIGHT])
@@ -424,13 +424,13 @@ boolean R_CheckBBox (fixed_t* bspcoord)
x2 = bspcoord[checkcoord[boxpos][2]];
y2 = bspcoord[checkcoord[boxpos][3]];
- // check clip list for an open space
+
angle1 = R_PointToAngle (x1, y1) - viewangle;
angle2 = R_PointToAngle (x2, y2) - viewangle;
span = angle1 - angle2;
- // Sitting on a line?
+
if (span >= ANG180)
return true;
@@ -440,7 +440,7 @@ boolean R_CheckBBox (fixed_t* bspcoord)
{
tspan -= 2*clipangle;
- // Totally off the left edge?
+
if (tspan >= span)
return false;
@@ -451,7 +451,7 @@ boolean R_CheckBBox (fixed_t* bspcoord)
{
tspan -= 2*clipangle;
- // Totally off the left edge?
+
if (tspan >= span)
return false;
@@ -459,15 +459,15 @@ boolean R_CheckBBox (fixed_t* bspcoord)
}
- // Find the first clippost
- // that touches the source post
- // (adjacent pixels are touching).
+
+
+
angle1 = (angle1+ANG90)>>ANGLETOFINESHIFT;
angle2 = (angle2+ANG90)>>ANGLETOFINESHIFT;
sx1 = viewangletox[angle1];
sx2 = viewangletox[angle2];
- // Does not cross a pixel.
+
if (sx1 == sx2)
return false;
sx2--;
@@ -479,7 +479,7 @@ boolean R_CheckBBox (fixed_t* bspcoord)
if (sx1 >= start->first
&& sx2 <= start->last)
{
- // The clippost contains the new span.
+
return false;
}
@@ -488,12 +488,12 @@ boolean R_CheckBBox (fixed_t* bspcoord)
-//
-// R_Subsector
-// Determine floor/ceiling planes.
-// Add sprites of things in sector.
-// Draw one or more line segments.
-//
+
+
+
+
+
+
void R_Subsector (int num)
{
int count;
@@ -544,17 +544,17 @@ void R_Subsector (int num)
-//
-// RenderBSPNode
-// Renders all subsectors below a given node,
-// traversing subtree recursively.
-// Just call with BSP root.
+
+
+
+
+
void R_RenderBSPNode (int bspnum)
{
node_t* bsp;
int side;
- // Found a subsector?
+
if (bspnum & NF_SUBSECTOR)
{
if (bspnum == -1)
@@ -566,13 +566,13 @@ void R_RenderBSPNode (int bspnum)
bsp = &nodes[bspnum];
- // Decide which side the view point is on.
+
side = R_PointOnSide (viewx, viewy, bsp);
- // Recursively divide front space.
+
R_RenderBSPNode (bsp->children[side]);
- // Possibly divide back space.
+
if (R_CheckBBox (bsp->bbox[side^1]))
R_RenderBSPNode (bsp->children[side^1]);
}
diff --git a/src/r_bsp.h b/src/r_bsp.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Refresh module, BSP traversal and handling.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __R_BSP__
@@ -39,7 +39,7 @@ extern int rw_stopx;
extern boolean segtextured;
-// false if the back side is the same plane
+
extern boolean markfloor;
extern boolean markceiling;
@@ -56,7 +56,7 @@ extern lighttable_t** dscalelight;
typedef void (*drawfunc_t) (int start, int stop);
-// BSP?
+
void R_ClearClipSegs (void);
void R_ClearDrawSegs (void);
@@ -65,8 +65,8 @@ void R_RenderBSPNode (int bspnum);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/r_data.c b/src/r_data.c
@@ -1,27 +1,27 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// Revision 1.3 1997/01/29 20:10
-// DESCRIPTION:
-// Preparation of data for rendering,
-// generation of lookups, caching, retrieval by name.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
@@ -48,24 +48,24 @@ rcsid[] = "$Id: r_data.c,v 1.4 1997/02/03 16:47:55 b1 Exp $";
#include "r_data.h"
-//
-// Graphics.
-// DOOM graphics for walls and sprites
-// is stored in vertical runs of opaque pixels (posts).
-// A column is composed of zero or more posts,
-// a patch or sprite is composed of zero or more columns.
-//
-//
-// Texture definition.
-// Each texture is composed of one or more patches,
-// with patches being lumps stored in the WAD.
-// The lumps are referenced by number, and patched
-// into the rectangular texture space using origin
-// and possibly other attributes.
-//
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
typedef struct
{
short originx;
@@ -76,49 +76,49 @@ typedef struct
} mappatch_t;
-//
-// Texture definition.
-// A DOOM wall texture is a list of patches
-// which are to be combined in a predefined order.
-//
+
+
+
+
+
typedef struct
{
char name[8];
boolean masked;
short width;
short height;
- void **columndirectory; // OBSOLETE
+ void **columndirectory;
short patchcount;
mappatch_t patches[1];
} maptexture_t;
-// A single patch from a texture definition,
-// basically a rectangular area within
-// the texture rectangle.
+
+
+
typedef struct
{
- // Block origin (allways UL),
- // which has allready accounted
- // for the internal origin of the patch.
+
+
+
int originx;
int originy;
int patch;
} texpatch_t;
-// A maptexturedef_t describes a rectangular texture,
-// which is composed of one or more mappatch_t structures
-// that arrange graphic patches.
+
+
+
typedef struct
{
- // Keep name for switch changing, etc.
+
char name[8];
short width;
short height;
- // All the patches[patchcount]
- // are drawn back to front into the cached texture.
+
+
short patchcount;
texpatch_t patches[1];
@@ -143,18 +143,18 @@ texture_t** textures;
int* texturewidthmask;
-// needed for texture pegging
+
fixed_t* textureheight;
int* texturecompositesize;
short** texturecolumnlump;
unsigned short** texturecolumnofs;
byte** texturecomposite;
-// for global animation
+
int* flattranslation;
int* texturetranslation;
-// needed for pre rendering
+
fixed_t* spritewidth;
fixed_t* spriteoffset;
fixed_t* spritetopoffset;
@@ -162,25 +162,25 @@ fixed_t* spritetopoffset;
lighttable_t *colormaps;
-//
-// MAPTEXTURE_T CACHING
-// When a texture is first needed,
-// it counts the number of composite columns
-// required in the texture and allocates space
-// for a column directory and any new columns.
-// The directory will simply point inside other patches
-// if there is only one patch in a given column,
-// but any columns with multiple patches
-// will have new column_ts generated.
-//
-//
-// R_DrawColumnInCache
-// Clip and draw a column
-// from a patch into a cached post.
-//
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
void
R_DrawColumnInCache
( column_t* patch,
@@ -219,12 +219,12 @@ R_DrawColumnInCache
-//
-// R_GenerateComposite
-// Using the texture definition,
-// the composite texture is created from the patches,
-// and each column is cached.
-//
+
+
+
+
+
+
void R_GenerateComposite (int texnum)
{
byte* block;
@@ -248,7 +248,7 @@ void R_GenerateComposite (int texnum)
collump = texturecolumnlump[texnum];
colofs = texturecolumnofs[texnum];
- // Composite the columns together.
+
patch = texture->patches;
for (i=0 , patch = texture->patches;
@@ -269,7 +269,7 @@ void R_GenerateComposite (int texnum)
for ( ; x<x2 ; x++)
{
- // Column does not have multiple patches?
+
if (collump[x] >= 0)
continue;
@@ -283,20 +283,20 @@ void R_GenerateComposite (int texnum)
}
- // Now that the texture has been built in column cache,
- // it is purgable from zone memory.
+
+
Z_ChangeTag (block, PU_CACHE);
}
-//
-// R_GenerateLookup
-//
+
+
+
void R_GenerateLookup (int texnum)
{
texture_t* texture;
- byte* patchcount; // patchcount[texture->width]
+ byte* patchcount;
texpatch_t* patch;
patch_t* realpatch;
int x;
@@ -308,17 +308,17 @@ void R_GenerateLookup (int texnum)
texture = textures[texnum];
- // Composited texture not created yet.
+
texturecomposite[texnum] = 0;
texturecompositesize[texnum] = 0;
collump = texturecolumnlump[texnum];
colofs = texturecolumnofs[texnum];
- // Now count the number of columns
- // that are covered by more than one patch.
- // Fill in the lump / offset, so columns
- // with only a single patch are all done.
+
+
+
+
patchcount = (byte *)alloca (texture->width);
memset (patchcount, 0, texture->width);
patch = texture->patches;
@@ -354,11 +354,11 @@ void R_GenerateLookup (int texnum)
texture->name);
return;
}
- // I_Error ("R_GenerateLookup: column without a patch");
+
if (patchcount[x] > 1)
{
- // Use the cached block.
+
collump[x] = -1;
colofs[x] = texturecompositesize[texnum];
@@ -376,9 +376,9 @@ void R_GenerateLookup (int texnum)
-//
-// R_GetColumn
-//
+
+
+
byte*
R_GetColumn
( int tex,
@@ -403,11 +403,11 @@ R_GetColumn
-//
-// R_InitTextures
-// Initializes the texture list
-// with the textures from the world map.
-//
+
+
+
+
+
void R_InitTextures (void)
{
maptexture_t* mtexture;
@@ -443,7 +443,7 @@ void R_InitTextures (void)
int temp3;
- // Load the patch names from pnames.lmp.
+
name[8] = 0;
names = W_CacheLumpName ("PNAMES", PU_STATIC);
nummappatches = LONG ( *((int *)names) );
@@ -457,9 +457,9 @@ void R_InitTextures (void)
}
Z_Free (names);
- // Load the map texture definitions from textures.lmp.
- // The data is contained in one or two lumps,
- // TEXTURE1 for shareware, plus TEXTURE2 for commercial.
+
+
+
maptex = maptex1 = W_CacheLumpName ("TEXTURE1", PU_STATIC);
numtextures1 = LONG(*maptex);
maxoff = W_LumpLength (W_GetNumForName ("TEXTURE1"));
@@ -489,8 +489,8 @@ void R_InitTextures (void)
totalwidth = 0;
- // Really complex printing shit...
- temp1 = W_GetNumForName ("S_START"); // P_???????
+
+ temp1 = W_GetNumForName ("S_START");
temp2 = W_GetNumForName ("S_END") - 1;
temp3 = ((temp2-temp1+63)/64) + ((numtextures+63)/64);
printf("[");
@@ -508,7 +508,7 @@ void R_InitTextures (void)
if (i == numtextures1)
{
- // Start looking in second texture file.
+
maptex = maptex2;
maxoff = maxoff2;
directory = maptex+1;
@@ -562,11 +562,11 @@ void R_InitTextures (void)
if (maptex2)
Z_Free (maptex2);
- // Precalculate whatever possible.
+
for (i=0 ; i<numtextures ; i++)
R_GenerateLookup (i);
- // Create translation table for global animation.
+
texturetranslation = Z_Malloc ((numtextures+1)*4, PU_STATIC, 0);
for (i=0 ; i<numtextures ; i++)
@@ -575,9 +575,9 @@ void R_InitTextures (void)
-//
-// R_InitFlats
-//
+
+
+
void R_InitFlats (void)
{
int i;
@@ -586,7 +586,7 @@ void R_InitFlats (void)
lastflat = W_GetNumForName ("F_END") - 1;
numflats = lastflat - firstflat + 1;
- // Create translation table for global animation.
+
flattranslation = Z_Malloc ((numflats+1)*4, PU_STATIC, 0);
for (i=0 ; i<numflats ; i++)
@@ -594,12 +594,12 @@ void R_InitFlats (void)
}
-//
-// R_InitSpriteLumps
-// Finds the width and hoffset of all sprites in the wad,
-// so the sprite does not need to be cached completely
-// just for having the header info ready during rendering.
-//
+
+
+
+
+
+
void R_InitSpriteLumps (void)
{
int i;
@@ -627,15 +627,15 @@ void R_InitSpriteLumps (void)
-//
-// R_InitColormaps
-//
+
+
+
void R_InitColormaps (void)
{
int lump, length;
- // Load in the light tables,
- // 256 byte align tables.
+
+
lump = W_GetNumForName("COLORMAP");
length = W_LumpLength (lump) + 255;
colormaps = Z_Malloc (length, PU_STATIC, 0);
@@ -645,12 +645,12 @@ void R_InitColormaps (void)
-//
-// R_InitData
-// Locates all the lumps
-// that will be used by all views
-// Must be called after W_Init.
-//
+
+
+
+
+
+
void R_InitData (void)
{
R_InitTextures ();
@@ -665,10 +665,10 @@ void R_InitData (void)
-//
-// R_FlatNumForName
-// Retrieval, get a flat number for a flat name.
-//
+
+
+
+
int R_FlatNumForName (char* name)
{
int i;
@@ -688,16 +688,16 @@ int R_FlatNumForName (char* name)
-//
-// R_CheckTextureNumForName
-// Check whether texture is available.
-// Filter out NoTexture indicator.
-//
+
+
+
+
+
int R_CheckTextureNumForName (char *name)
{
int i;
- // "NoTexture" marker.
+
if (name[0] == '-')
return 0;
@@ -710,11 +710,11 @@ int R_CheckTextureNumForName (char *name)
-//
-// R_TextureNumForName
-// Calls R_CheckTextureNumForName,
-// aborts with error message.
-//
+
+
+
+
+
int R_TextureNumForName (char* name)
{
int i;
@@ -732,10 +732,10 @@ int R_TextureNumForName (char* name)
-//
-// R_PrecacheLevel
-// Preloads all relevant graphics for the level.
-//
+
+
+
+
int flatmemory;
int texturememory;
int spritememory;
@@ -758,7 +758,7 @@ void R_PrecacheLevel (void)
if (demoplayback)
return;
- // Precache flats.
+
flatpresent = alloca(numflats);
memset (flatpresent,0,numflats);
@@ -780,7 +780,7 @@ void R_PrecacheLevel (void)
}
}
- // Precache textures.
+
texturepresent = alloca(numtextures);
memset (texturepresent,0, numtextures);
@@ -791,12 +791,12 @@ void R_PrecacheLevel (void)
texturepresent[sides[i].bottomtexture] = 1;
}
- // Sky texture is always present.
- // Note that F_SKY1 is the name used to
- // indicate a sky floor/ceiling as a flat,
- // while the sky texture is stored like
- // a wall texture, with an episode dependend
- // name.
+
+
+
+
+
+
texturepresent[skytexture] = 1;
texturememory = 0;
@@ -815,7 +815,7 @@ void R_PrecacheLevel (void)
}
}
- // Precache sprites.
+
spritepresent = alloca(numsprites);
memset (spritepresent,0, numsprites);
diff --git a/src/r_data.h b/src/r_data.h
@@ -1,24 +1,24 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Refresh module, data I/O, caching, retrieval of graphics
-// by name.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __R_DATA__
@@ -31,32 +31,32 @@
#pragma interface
#endif
-// Retrieve column data for span blitting.
+
byte*
R_GetColumn
( int tex,
int col );
-// I/O, setting up the stuff.
+
void R_InitData (void);
void R_PrecacheLevel (void);
-// Retrieval.
-// Floor/ceiling opaque texture tiles,
-// lookup by name. For animation?
+
+
+
int R_FlatNumForName (char* name);
-// Called by P_Ticker for switches and animations,
-// returns the texture number for the texture name.
+
+
int R_TextureNumForName (char *name);
int R_CheckTextureNumForName (char *name);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/r_defs.h b/src/r_defs.h
@@ -1,40 +1,40 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Refresh/rendering module, shared data struct definitions.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __R_DEFS__
#define __R_DEFS__
-// Screenwidth.
+
#include "doomdef.h"
-// Some more or less basic data types
-// we depend on.
+
+
#include "m_fixed.h"
-// We rely on the thinker data struct
-// to handle sound origins in sectors.
+
+
#include "d_think.h"
-// SECTORS do store MObjs anyway.
+
#include "p_mobj.h"
@@ -45,8 +45,8 @@
-// Silhouette, needed for clipping Segs (mainly)
-// and sprites representing things.
+
+
#define SIL_NONE 0
#define SIL_BOTTOM 1
#define SIL_TOP 2
@@ -58,16 +58,16 @@
-//
-// INTERNAL MAP TYPES
-// used by play and refresh
-//
-//
-// Your plain vanilla vertex.
-// Note: transformed values not buffered locally,
-// like some DOOM-alikes ("wt", "WebView") did.
-//
+
+
+
+
+
+
+
+
+
typedef struct
{
fixed_t x;
@@ -76,28 +76,28 @@ typedef struct
} vertex_t;
-// Forward of LineDefs, for Sectors.
+
struct line_s;
-// Each sector has a degenmobj_t in its center
-// for sound origin purposes.
-// I suppose this does not handle sound from
-// moving objects (doppler), because
-// position is prolly just buffered, not
-// updated.
+
+
+
+
+
+
typedef struct
{
- thinker_t thinker; // not used for anything
+ thinker_t thinker;
fixed_t x;
fixed_t y;
fixed_t z;
} degenmobj_t;
-//
-// The SECTORS record, at runtime.
-// Stores things/mobjs.
-//
+
+
+
+
typedef struct
{
fixed_t floorheight;
@@ -108,63 +108,63 @@ typedef struct
short special;
short tag;
- // 0 = untraversed, 1,2 = sndlines -1
+
int soundtraversed;
- // thing that made a sound (or null)
+
mobj_t* soundtarget;
- // mapblock bounding box for height changes
+
int blockbox[4];
- // origin for any sounds played by the sector
+
degenmobj_t soundorg;
- // if == validcount, already checked
+
int validcount;
- // list of mobjs in sector
+
mobj_t* thinglist;
- // thinker_t for reversable actions
+
void* specialdata;
int linecount;
- struct line_s** lines; // [linecount] size
+ struct line_s** lines;
} sector_t;
-//
-// The SideDef.
-//
+
+
+
typedef struct
{
- // add this to the calculated texture column
+
fixed_t textureoffset;
- // add this to the calculated texture top
+
fixed_t rowoffset;
- // Texture indices.
- // We do not maintain names here.
+
+
short toptexture;
short bottomtexture;
short midtexture;
- // Sector the SideDef is facing.
+
sector_t* sector;
} side_t;
-//
-// Move clipping aid for LineDefs.
-//
+
+
+
typedef enum
{
ST_HORIZONTAL,
@@ -178,52 +178,52 @@ typedef enum
typedef struct line_s
{
- // Vertices, from v1 to v2.
+
vertex_t* v1;
vertex_t* v2;
- // Precalculated v2 - v1 for side checking.
+
fixed_t dx;
fixed_t dy;
- // Animation related.
+
short flags;
short special;
short tag;
- // Visual appearance: SideDefs.
- // sidenum[1] will be -1 if one sided
+
+
short sidenum[2];
- // Neat. Another bounding box, for the extent
- // of the LineDef.
+
+
fixed_t bbox[4];
- // To aid move clipping.
+
slopetype_t slopetype;
- // Front and back sector.
- // Note: redundant? Can be retrieved from SideDefs.
+
+
sector_t* frontsector;
sector_t* backsector;
- // if == validcount, already checked
+
int validcount;
- // thinker_t for reversable actions
+
void* specialdata;
} line_t;
-//
-// A SubSector.
-// References a Sector.
-// Basically, this is a list of LineSegs,
-// indicating the visible walls that define
-// (all or some) sides of a convex BSP leaf.
-//
+
+
+
+
+
+
+
typedef struct subsector_s
{
sector_t* sector;
@@ -234,9 +234,9 @@ typedef struct subsector_s
-//
-// The LineSeg.
-//
+
+
+
typedef struct
{
vertex_t* v1;
@@ -249,9 +249,9 @@ typedef struct
side_t* sidedef;
line_t* linedef;
- // Sector references.
- // Could be retrieved from linedef, too.
- // backsector is NULL for one sided lines
+
+
+
sector_t* frontsector;
sector_t* backsector;
@@ -259,21 +259,21 @@ typedef struct
-//
-// BSP node.
-//
+
+
+
typedef struct
{
- // Partition line.
+
fixed_t x;
fixed_t y;
fixed_t dx;
fixed_t dy;
- // Bounding box for each child.
+
fixed_t bbox[2][4];
- // If NF_SUBSECTOR its a subsector.
+
unsigned short children[2];
} node_t;
@@ -281,44 +281,44 @@ typedef struct
-// posts are runs of non masked source pixels
+
typedef struct
{
- byte topdelta; // -1 is the last post in a column
- byte length; // length data bytes follows
+ byte topdelta;
+ byte length;
} post_t;
-// column_t is a list of 0 or more post_t, (byte)-1 terminated
+
typedef post_t column_t;
-// PC direct to screen pointers
-//B UNUSED - keep till detailshift in r_draw.c resolved
-//extern byte* destview;
-//extern byte* destscreen;
-//
-// OTHER TYPES
-//
-// This could be wider for >8 bit display.
-// Indeed, true color support is posibble
-// precalculating 24bpp lightmap/colormap LUT.
-// from darkening PLAYPAL to all black.
-// Could even us emore than 32 levels.
+
+
+
+
+
+
+
+
+
+
+
+
typedef byte lighttable_t;
-//
-// ?
-//
+
+
+
typedef struct drawseg_s
{
seg_t* curline;
@@ -329,17 +329,17 @@ typedef struct drawseg_s
fixed_t scale2;
fixed_t scalestep;
- // 0=none, 1=bottom, 2=top, 3=both
+
int silhouette;
- // do not clip sprites above this
+
fixed_t bsilheight;
- // do not clip sprites below this
+
fixed_t tsilheight;
- // Pointers to lists for sprite clipping,
- // all three adjusted so [x1] is first value.
+
+
short* sprtopclip;
short* sprbottomclip;
short* maskedtexturecol;
@@ -348,19 +348,19 @@ typedef struct drawseg_s
-// Patches.
-// A patch holds one or more columns.
-// Patches are used for sprites and all masked pictures,
-// and we compose textures from the TEXTURE1/2 lists
-// of patches.
+
+
+
+
+
typedef struct
{
- short width; // bounding box size
+ short width;
short height;
- short leftoffset; // pixels to the left of origin
- short topoffset; // pixels below the origin
- int columnofs[8]; // only [width] used
- // the [0] is &columnofs[width]
+ short leftoffset;
+ short topoffset;
+ int columnofs[8];
+
} patch_t;
@@ -369,39 +369,39 @@ typedef struct
-// A vissprite_t is a thing
-// that will be drawn during a refresh.
-// I.e. a sprite object that is partly visible.
+
+
+
typedef struct vissprite_s
{
- // Doubly linked list.
+
struct vissprite_s* prev;
struct vissprite_s* next;
int x1;
int x2;
- // for line side calculation
+
fixed_t gx;
fixed_t gy;
- // global bottom / top for silhouette clipping
+
fixed_t gz;
fixed_t gzt;
- // horizontal position of x1
+
fixed_t startfrac;
fixed_t scale;
- // negative if flipped
+
fixed_t xiscale;
fixed_t texturemid;
int patch;
- // for color translation and shadow draw,
- // maxbright frames as well
+
+
lighttable_t* colormap;
int mobjflags;
@@ -409,42 +409,42 @@ typedef struct vissprite_s
} vissprite_t;
-//
-// Sprites are patches with a special naming convention
-// so they can be recognized by R_InitSprites.
-// The base name is NNNNFx or NNNNFxFx, with
-// x indicating the rotation, x = 0, 1-7.
-// The sprite and frame specified by a thing_t
-// is range checked at run time.
-// A sprite is a patch_t that is assumed to represent
-// a three dimensional object and may have multiple
-// rotations pre drawn.
-// Horizontal flipping is used to save space,
-// thus NNNNF2F5 defines a mirrored patch.
-// Some sprites will only have one picture used
-// for all views: NNNNF0
-//
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
typedef struct
{
- // If false use 0 for any position.
- // Note: as eight entries are available,
- // we might as well insert the same name eight times.
+
+
+
boolean rotate;
- // Lump to use for view angles 0-7.
+
short lump[8];
- // Flip bit (1 = flip) to use for view angles 0-7.
+
byte flip[8];
} spriteframe_t;
-//
-// A sprite definition:
-// a number of animation frames.
-//
+
+
+
+
typedef struct
{
int numframes;
@@ -454,9 +454,9 @@ typedef struct
-//
-// Now what is a visplane, anyway?
-//
+
+
+
typedef struct
{
fixed_t height;
@@ -465,15 +465,15 @@ typedef struct
int minx;
int maxx;
- // leave pads for [minx-1]/[maxx+1]
+
byte pad1;
- // Here lies the rub for all
- // dynamic resize/change of resolution.
+
+
byte top[SCREENWIDTH];
byte pad2;
byte pad3;
- // See above.
+
byte bottom[SCREENWIDTH];
byte pad4;
@@ -483,8 +483,8 @@ typedef struct
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/r_draw.c b/src/r_draw.c
@@ -1,27 +1,27 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// The actual span/column drawing functions.
-// Here find the main potential for optimization,
-// e.g. inline assembly, different algorithms.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
@@ -36,28 +36,28 @@ rcsid[] = "$Id: r_draw.c,v 1.4 1997/02/03 16:47:55 b1 Exp $";
#include "r_local.h"
-// Needs access to LFB (guess what).
+
#include "v_video.h"
-// State.
+
#include "doomstat.h"
-// ?
+
#define MAXWIDTH 1120
#define MAXHEIGHT 832
-// status bar height at bottom of screen
+
#define SBARHEIGHT 32
-//
-// All drawing to the view buffer is accomplished in this file.
-// The other refresh files only know about ccordinates,
-// not the architecture of the frame buffer.
-// Conveniently, the frame buffer is a linear one,
-// and we need only the base address,
-// and the total size == width*height*depth/8.,
-//
+
+
+
+
+
+
+
+
byte* viewimage;
@@ -69,19 +69,19 @@ int viewwindowy;
byte* ylookup[MAXHEIGHT];
int columnofs[MAXWIDTH];
-// Color tables for different players,
-// translate a limited part to another
-// (color ramps used for suit colors).
-//
+
+
+
+
byte translations[3][256];
-//
-// R_DrawColumn
-// Source is the top of the column to scale.
-//
+
+
+
+
lighttable_t* dc_colormap;
int dc_x;
int dc_yl;
@@ -89,19 +89,19 @@ int dc_yh;
fixed_t dc_iscale;
fixed_t dc_texturemid;
-// first pixel in a column (possibly virtual)
+
byte* dc_source;
-// just for profiling
+
int dccount;
-//
-// A column is a vertical slice/span from a wall texture that,
-// given the DOOM style restrictions on the view orientation,
-// will always have constant z depth.
-// Thus a special case loop for very fast rendering can
-// be used. It has also been used with Wolfenstein 3D.
-//
+
+
+
+
+
+
+
void R_DrawColumn (void)
{
int count;
@@ -111,7 +111,7 @@ void R_DrawColumn (void)
count = dc_yh - dc_yl;
- // Zero length, column does not exceed a pixel.
+
if (count < 0)
return;
@@ -122,23 +122,23 @@ void R_DrawColumn (void)
I_Error ("R_DrawColumn: %i to %i at %i", dc_yl, dc_yh, dc_x);
#endif
- // Framebuffer destination address.
- // Use ylookup LUT to avoid multiply with ScreenWidth.
- // Use columnofs LUT for subwindows?
+
+
+
dest = ylookup[dc_yl] + columnofs[dc_x];
- // Determine scaling,
- // which is the only mapping to be done.
+
+
fracstep = dc_iscale;
frac = dc_texturemid + (dc_yl-centery)*fracstep;
- // Inner loop that does the actual texture mapping,
- // e.g. a DDA-lile scaling.
- // This is as fast as it gets.
+
+
+
do
{
- // Re-map color indices from wall texture column
- // using a lighting/special effects LUT.
+
+
*dest = dc_colormap[dc_source[(frac>>FRACBITS)&127]];
dest += SCREENWIDTH;
@@ -149,8 +149,8 @@ void R_DrawColumn (void)
-// UNUSED.
-// Loop unrolled.
+
+
#if 0
void R_DrawColumn (void)
{
@@ -218,7 +218,7 @@ void R_DrawColumnLow (void)
count = dc_yh - dc_yl;
- // Zero length.
+
if (count < 0)
return;
@@ -230,9 +230,9 @@ void R_DrawColumnLow (void)
I_Error ("R_DrawColumn: %i to %i at %i", dc_yl, dc_yh, dc_x);
}
- // dccount++;
+
#endif
- // Blocky mode, need to multiply by 2.
+
dc_x <<= 1;
dest = ylookup[dc_yl] + columnofs[dc_x];
@@ -243,7 +243,7 @@ void R_DrawColumnLow (void)
do
{
- // Hack. Does not work corretly.
+
*dest2 = *dest = dc_colormap[dc_source[(frac>>FRACBITS)&127]];
dest += SCREENWIDTH;
dest2 += SCREENWIDTH;
@@ -253,9 +253,9 @@ void R_DrawColumnLow (void)
}
-//
-// Spectre/Invisibility.
-//
+
+
+
#define FUZZTABLE 50
#define FUZZOFF (SCREENWIDTH)
@@ -274,14 +274,14 @@ int fuzzoffset[FUZZTABLE] =
int fuzzpos = 0;
-//
-// Framebuffer postprocessing.
-// Creates a fuzzy image by copying pixels
-// from adjacent ones to left and right.
-// Used with an all black colormap, this
-// could create the SHADOW effect,
-// i.e. spectres and invisible players.
-//
+
+
+
+
+
+
+
+
void R_DrawFuzzColumn (void)
{
int count;
@@ -289,17 +289,17 @@ void R_DrawFuzzColumn (void)
fixed_t frac;
fixed_t fracstep;
- // Adjust borders. Low...
+
if (!dc_yl)
dc_yl = 1;
- // .. and high.
+
if (dc_yh == viewheight-1)
dc_yh = viewheight - 2;
count = dc_yh - dc_yl;
- // Zero length.
+
if (count < 0)
return;
@@ -314,8 +314,8 @@ void R_DrawFuzzColumn (void)
#endif
- // Keep till detailshift bug in blocky mode fixed,
- // or blocky mode removed.
+
+
/* WATCOM code
if (detailshift)
{
@@ -339,25 +339,25 @@ void R_DrawFuzzColumn (void)
}*/
- // Does not work with blocky mode.
+
dest = ylookup[dc_yl] + columnofs[dc_x];
- // Looks familiar.
+
fracstep = dc_iscale;
frac = dc_texturemid + (dc_yl-centery)*fracstep;
- // Looks like an attempt at dithering,
- // using the colormap #6 (of 0-31, a bit
- // brighter than average).
+
+
+
do
{
- // Lookup framebuffer, and retrieve
- // a pixel that is either one column
- // left or right of the current one.
- // Add index from colormap to index.
+
+
+
+
*dest = colormaps[6*256+dest[fuzzoffset[fuzzpos]]];
- // Clamp table lookup index.
+
if (++fuzzpos == FUZZTABLE)
fuzzpos = 0;
@@ -370,15 +370,15 @@ void R_DrawFuzzColumn (void)
-//
-// R_DrawTranslatedColumn
-// Used to draw player sprites
-// with the green colorramp mapped to others.
-// Could be used with different translation
-// tables, e.g. the lighter colored version
-// of the BaronOfHell, the HellKnight, uses
-// identical sprites, kinda brightened up.
-//
+
+
+
+
+
+
+
+
+
byte* dc_translation;
byte* translationtables;
@@ -405,7 +405,7 @@ void R_DrawTranslatedColumn (void)
#endif
- // WATCOM VGA specific.
+
/* Keep for fixing.
if (detailshift)
{
@@ -424,21 +424,21 @@ void R_DrawTranslatedColumn (void)
}*/
- // FIXME. As above.
+
dest = ylookup[dc_yl] + columnofs[dc_x];
- // Looks familiar.
+
fracstep = dc_iscale;
frac = dc_texturemid + (dc_yl-centery)*fracstep;
- // Here we do an additional index re-mapping.
+
do
{
- // Translation tables are used
- // to map certain colorramps to other ones,
- // used with PLAY sprites.
- // Thus the "green" ramp of the player 0 sprite
- // is mapped to gray, red, black/indigo.
+
+
+
+
+
*dest = dc_colormap[dc_translation[dc_source[frac>>FRACBITS]]];
dest += SCREENWIDTH;
@@ -449,13 +449,13 @@ void R_DrawTranslatedColumn (void)
-//
-// R_InitTranslationTables
-// Creates the translation tables to map
-// the green color ramp to gray, brown, red.
-// Assumes a given structure of the PLAYPAL.
-// Could be read from a lump instead.
-//
+
+
+
+
+
+
+
void R_InitTranslationTables (void)
{
int i;
@@ -463,19 +463,19 @@ void R_InitTranslationTables (void)
translationtables = Z_Malloc (256*3+255, PU_STATIC, 0);
translationtables = (byte *)(( (int)translationtables + 255 )& ~255);
- // translate just the 16 green colors
+
for (i=0 ; i<256 ; i++)
{
if (i >= 0x70 && i<= 0x7f)
{
- // map green ramp to gray, brown, red
+
translationtables[i] = 0x60 + (i&0xf);
translationtables [i+256] = 0x40 + (i&0xf);
translationtables [i+512] = 0x20 + (i&0xf);
}
else
{
- // Keep all other colors as is.
+
translationtables[i] = translationtables[i+256]
= translationtables[i+512] = i;
}
@@ -485,18 +485,18 @@ void R_InitTranslationTables (void)
-//
-// R_DrawSpan
-// With DOOM style restrictions on view orientation,
-// the floors and ceilings consist of horizontal slices
-// or spans with constant z depth.
-// However, rotation around the world z axis is possible,
-// thus this mapping, while simpler and faster than
-// perspective correct texture mapping, has to traverse
-// the texture at an angle in all but a few cases.
-// In consequence, flats are not stored by column (like walls),
-// and the inner loop has to step in texture space u and v.
-//
+
+
+
+
+
+
+
+
+
+
+
+
int ds_y;
int ds_x1;
int ds_x2;
@@ -508,15 +508,15 @@ fixed_t ds_yfrac;
fixed_t ds_xstep;
fixed_t ds_ystep;
-// start of a 64*64 tile image
+
byte* ds_source;
-// just for profiling
+
int dscount;
-//
-// Draws the actual span.
+
+
void R_DrawSpan (void)
{
fixed_t xfrac;
@@ -534,7 +534,7 @@ void R_DrawSpan (void)
I_Error( "R_DrawSpan: %i to %i at %i",
ds_x1,ds_x2,ds_y);
}
-// dscount++;
+
#endif
@@ -543,19 +543,19 @@ void R_DrawSpan (void)
dest = ylookup[ds_y] + columnofs[ds_x1];
- // We do not check for zero spans here?
+
count = ds_x2 - ds_x1;
do
{
- // Current texture index in u,v.
+
spot = ((yfrac>>(16-6))&(63*64)) + ((xfrac>>16)&63);
- // Lookup pixel from flat texture tile,
- // re-index using light/colormap.
+
+
*dest++ = ds_colormap[ds_source[spot]];
- // Next step in u,v.
+
xfrac += ds_xstep;
yfrac += ds_ystep;
@@ -564,8 +564,8 @@ void R_DrawSpan (void)
-// UNUSED.
-// Loop unrolled by 4.
+
+
#if 0
void R_DrawSpan (void)
{
@@ -637,9 +637,9 @@ void R_DrawSpan (void)
#endif
-//
-// Again..
-//
+
+
+
void R_DrawSpanLow (void)
{
fixed_t xfrac;
@@ -657,13 +657,13 @@ void R_DrawSpanLow (void)
I_Error( "R_DrawSpan: %i to %i at %i",
ds_x1,ds_x2,ds_y);
}
-// dscount++;
+
#endif
xfrac = ds_xfrac;
yfrac = ds_yfrac;
- // Blocky mode, need to multiply by 2.
+
ds_x1 <<= 1;
ds_x2 <<= 1;
@@ -674,8 +674,8 @@ void R_DrawSpanLow (void)
do
{
spot = ((yfrac>>(16-6))&(63*64)) + ((xfrac>>16)&63);
- // Lowres/blocky mode does it twice,
- // while scale is adjusted appropriately.
+
+
*dest++ = ds_colormap[ds_source[spot]];
*dest++ = ds_colormap[ds_source[spot]];
@@ -685,13 +685,13 @@ void R_DrawSpanLow (void)
} while (count--);
}
-//
-// R_InitBuffer
-// Creats lookup tables that avoid
-// multiplies and other hazzles
-// for getting the framebuffer address
-// of a pixel to draw.
-//
+
+
+
+
+
+
+
void
R_InitBuffer
( int width,
@@ -699,22 +699,22 @@ R_InitBuffer
{
int i;
- // Handle resize,
- // e.g. smaller view windows
- // with border and/or status bar.
+
+
+
viewwindowx = (SCREENWIDTH-width) >> 1;
- // Column offset. For windows.
+
for (i=0 ; i<width ; i++)
columnofs[i] = viewwindowx + i;
- // Samw with base row offset.
+
if (width == SCREENWIDTH)
viewwindowy = 0;
else
viewwindowy = (SCREENHEIGHT-SBARHEIGHT-height) >> 1;
- // Preclaculate all row offsets.
+
for (i=0 ; i<height ; i++)
ylookup[i] = screens[0] + (i+viewwindowy)*SCREENWIDTH;
}
@@ -722,12 +722,12 @@ R_InitBuffer
-//
-// R_FillBackScreen
-// Fills the back screen with a pattern
-// for variable screen sizes
-// Also draws a beveled edge.
-//
+
+
+
+
+
+
void R_FillBackScreen (void)
{
byte* src;
@@ -736,10 +736,10 @@ void R_FillBackScreen (void)
int y;
patch_t* patch;
- // DOOM border patch.
+
char name1[] = "FLOOR7_2";
- // DOOM II border patch.
+
char name2[] = "GRNROCK";
char* name;
@@ -788,7 +788,7 @@ void R_FillBackScreen (void)
V_DrawPatch (viewwindowx+scaledviewwidth,viewwindowy+y,1,patch);
- // Draw beveled edge.
+
V_DrawPatch (viewwindowx-8,
viewwindowy-8,
1,
@@ -811,28 +811,28 @@ void R_FillBackScreen (void)
}
-//
-// Copy a screen buffer.
-//
+
+
+
void
R_VideoErase
( unsigned ofs,
int count )
{
- // LFB copy.
- // This might not be a good idea if memcpy
- // is not optiomal, e.g. byte by byte on
- // a 32bit CPU, as GNU GCC/Linux libc did
- // at one point.
+
+
+
+
+
memcpy (screens[0]+ofs, screens[1]+ofs, count);
}
-//
-// R_DrawViewBorder
-// Draws the border around the view
-// for different size windows?
-//
+
+
+
+
+
void
V_MarkRect
( int x,
@@ -853,14 +853,14 @@ void R_DrawViewBorder (void)
top = ((SCREENHEIGHT-SBARHEIGHT)-viewheight)/2;
side = (SCREENWIDTH-scaledviewwidth)/2;
- // copy top and one line of left side
+
R_VideoErase (0, top*SCREENWIDTH+side);
- // copy one line of right side and bottom
+
ofs = (viewheight+top)*SCREENWIDTH-side;
R_VideoErase (ofs, top*SCREENWIDTH+side);
- // copy sides using wraparound
+
ofs = top*SCREENWIDTH + SCREENWIDTH-side;
side <<= 1;
@@ -870,7 +870,7 @@ void R_DrawViewBorder (void)
ofs += SCREENWIDTH;
}
- // ?
+
V_MarkRect (0,0,SCREENWIDTH, SCREENHEIGHT-SBARHEIGHT);
}
diff --git a/src/r_draw.h b/src/r_draw.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// System specific interface stuff.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __R_DRAW__
@@ -36,23 +36,23 @@ extern int dc_yh;
extern fixed_t dc_iscale;
extern fixed_t dc_texturemid;
-// first pixel in a column
+
extern byte* dc_source;
-// The span blitting interface.
-// Hook in assembler or system specific BLT
-// here.
+
+
+
void R_DrawColumn (void);
void R_DrawColumnLow (void);
-// The Spectre/Invisibility effect.
+
void R_DrawFuzzColumn (void);
void R_DrawFuzzColumnLow (void);
-// Draw with color translation tables,
-// for player sprite rendering,
-// Green/Red/Blue/Indigo shirts.
+
+
+
void R_DrawTranslatedColumn (void);
void R_DrawTranslatedColumnLow (void);
@@ -72,18 +72,18 @@ extern fixed_t ds_yfrac;
extern fixed_t ds_xstep;
extern fixed_t ds_ystep;
-// start of a 64*64 tile image
+
extern byte* ds_source;
extern byte* translationtables;
extern byte* dc_translation;
-// Span blitting for rows, floor/ceiling.
-// No Sepctre effect needed.
+
+
void R_DrawSpan (void);
-// Low resolution mode, 160x200?
+
void R_DrawSpanLow (void);
@@ -93,23 +93,23 @@ R_InitBuffer
int height );
-// Initialize color translation tables,
-// for player rendering etc.
+
+
void R_InitTranslationTables (void);
-// Rendering function.
+
void R_FillBackScreen (void);
-// If the view size is not full screen, draws a border around it.
+
void R_DrawViewBorder (void);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/r_local.h b/src/r_local.h
@@ -1,42 +1,42 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Refresh (R_*) module, global header.
-// All the rendering/drawing stuff is here.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __R_LOCAL__
#define __R_LOCAL__
-// Binary Angles, sine/cosine/atan lookups.
+
#include "tables.h"
-// Screen size related parameters.
+
#include "doomdef.h"
-// Include the refresh/render data structs.
+
#include "r_data.h"
-//
-// Separate header file for each module.
-//
+
+
+
#include "r_main.h"
#include "r_bsp.h"
#include "r_segs.h"
@@ -45,9 +45,9 @@
#include "r_things.h"
#include "r_draw.h"
-#endif // __R_LOCAL__
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+#endif
+
+
+
+
+
diff --git a/src/r_main.c b/src/r_main.c
@@ -1,27 +1,27 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Rendering main loop and setup functions,
-// utility functions (BSP, geometry, trigonometry).
-// See tables.c, too.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char rcsid[] = "$Id: r_main.c,v 1.5 1997/02/03 22:45:12 b1 Exp $";
@@ -44,14 +44,14 @@ static const char rcsid[] = "$Id: r_main.c,v 1.5 1997/02/03 22:45:12 b1 Exp $";
-// Fineangles in the SCREENWIDTH wide window.
+
#define FIELDOFVIEW 2048
int viewangleoffset;
-// increment every time a check is made
+
int validcount = 1;
@@ -65,7 +65,7 @@ fixed_t centerxfrac;
fixed_t centeryfrac;
fixed_t projection;
-// just for profiling purposes
+
int framecount;
int sscount;
@@ -83,33 +83,33 @@ fixed_t viewsin;
player_t* viewplayer;
-// 0 = high, 1 = low
+
int detailshift;
-//
-// precalculated math tables
-//
+
+
+
angle_t clipangle;
-// The viewangletox[viewangle + FINEANGLES/4] lookup
-// maps the visible view angles to screen X coordinates,
-// flattening the arc to a flat projection plane.
-// There will be many angles mapped to the same X.
+
+
+
+
int viewangletox[FINEANGLES/2];
-// The xtoviewangleangle[] table maps a screen pixel
-// to the lowest viewangle that maps back to x ranges
-// from clipangle to -clipangle.
+
+
+
angle_t xtoviewangle[SCREENWIDTH+1];
-// UNUSED.
-// The finetangentgent[angle+FINEANGLES/4] table
-// holds the fixed_t tangent values for view angles,
-// ranging from MININT to 0 to MAXINT.
-// fixed_t finetangent[FINEANGLES/2];
-// fixed_t finesine[5*FINEANGLES/4];
+
+
+
+
+
+
fixed_t* finecosine = &finesine[FINEANGLES/4];
@@ -117,7 +117,7 @@ lighttable_t* scalelight[LIGHTLEVELS][MAXLIGHTSCALE];
lighttable_t* scalelightfixed[MAXLIGHTSCALE];
lighttable_t* zlight[LIGHTLEVELS][MAXLIGHTZ];
-// bumped light from gun blasts
+
int extralight;
@@ -130,11 +130,11 @@ void (*spanfunc) (void);
-//
-// R_AddPointToBox
-// Expand a given bbox
-// so that it encloses a given point.
-//
+
+
+
+
+
void
R_AddPointToBox
( int x,
@@ -152,12 +152,12 @@ R_AddPointToBox
}
-//
-// R_PointOnSide
-// Traverse BSP (sub) tree,
-// check point against partition plane.
-// Returns side 0 (front) or 1 (back).
-//
+
+
+
+
+
+
int
R_PointOnSide
( fixed_t x,
@@ -187,12 +187,12 @@ R_PointOnSide
dx = (x - node->x);
dy = (y - node->y);
- // Try to quickly decide by looking at sign bits.
+
if ( (node->dy ^ node->dx ^ dx ^ dy)&0x80000000 )
{
if ( (node->dy ^ dx) & 0x80000000 )
{
- // (left is negative)
+
return 1;
}
return 0;
@@ -203,10 +203,10 @@ R_PointOnSide
if (right < left)
{
- // front side
+
return 0;
}
- // back side
+
return 1;
}
@@ -250,12 +250,12 @@ R_PointOnSegSide
dx = (x - lx);
dy = (y - ly);
- // Try to quickly decide by looking at sign bits.
+
if ( (ldy ^ ldx ^ dx ^ dy)&0x80000000 )
{
if ( (ldy ^ dx) & 0x80000000 )
{
- // (left is negative)
+
return 1;
}
return 0;
@@ -266,24 +266,24 @@ R_PointOnSegSide
if (right < left)
{
- // front side
+
return 0;
}
- // back side
+
return 1;
}
-//
-// R_PointToAngle
-// To get a global angle from cartesian coordinates,
-// the coordinates are flipped until they are in
-// the first octant of the coordinate system, then
-// the y (<=x) is scaled and divided by x to get a
-// tangent (slope) value which is looked up in the
-// tantoangle[] table.
-//
+
+
+
+
+
+
+
+
+
@@ -301,71 +301,71 @@ R_PointToAngle
if (x>= 0)
{
- // x >=0
+
if (y>= 0)
{
- // y>= 0
+
if (x>y)
{
- // octant 0
+
return tantoangle[ SlopeDiv(y,x)];
}
else
{
- // octant 1
+
return ANG90-1-tantoangle[ SlopeDiv(x,y)];
}
}
else
{
- // y<0
+
y = -y;
if (x>y)
{
- // octant 8
+
return -tantoangle[SlopeDiv(y,x)];
}
else
{
- // octant 7
+
return ANG270+tantoangle[ SlopeDiv(x,y)];
}
}
}
else
{
- // x<0
+
x = -x;
if (y>= 0)
{
- // y>= 0
+
if (x>y)
{
- // octant 3
+
return ANG180-1-tantoangle[ SlopeDiv(y,x)];
}
else
{
- // octant 2
+
return ANG90+ tantoangle[ SlopeDiv(x,y)];
}
}
else
{
- // y<0
+
y = -y;
if (x>y)
{
- // octant 4
+
return ANG180+tantoangle[ SlopeDiv(y,x)];
}
else
{
- // octant 5
+
return ANG270-1-tantoangle[ SlopeDiv(x,y)];
}
}
@@ -411,7 +411,7 @@ R_PointToDist
angle = (tantoangle[ FixedDiv(dy,dx)>>DBITS ]+ANG90) >> ANGLETOFINESHIFT;
- // use as cosine
+
dist = FixedDiv (dx, finesine[angle] );
return dist;
@@ -420,19 +420,19 @@ R_PointToDist
-//
-// R_InitPointToAngle
-//
+
+
+
void R_InitPointToAngle (void)
{
- // UNUSED - now getting from tables.c
+
#if 0
int i;
long t;
float f;
-//
-// slope (tangent) to angle lookup
-//
+
+
+
for (i=0 ; i<=SLOPERANGE ; i++)
{
f = atan( (float)i/SLOPERANGE )/(3.141592657*2);
@@ -443,13 +443,13 @@ void R_InitPointToAngle (void)
}
-//
-// R_ScaleFromGlobalAngle
-// Returns the texture mapping scale
-// for the current line (horizontal span)
-// at the given angle.
-// rw_distance must be calculated first.
-//
+
+
+
+
+
+
+
fixed_t R_ScaleFromGlobalAngle (angle_t visangle)
{
fixed_t scale;
@@ -460,7 +460,7 @@ fixed_t R_ScaleFromGlobalAngle (angle_t visangle)
fixed_t num;
int den;
- // UNUSED
+
#if 0
{
fixed_t dist;
@@ -480,7 +480,7 @@ fixed_t R_ScaleFromGlobalAngle (angle_t visangle)
anglea = ANG90 + (visangle-viewangle);
angleb = ANG90 + (visangle-rw_normalangle);
- // both sines are allways positive
+
sinea = finesine[anglea>>ANGLETOFINESHIFT];
sineb = finesine[angleb>>ANGLETOFINESHIFT];
num = FixedMul(projection,sineb)<<detailshift;
@@ -503,19 +503,19 @@ fixed_t R_ScaleFromGlobalAngle (angle_t visangle)
-//
-// R_InitTables
-//
+
+
+
void R_InitTables (void)
{
- // UNUSED: now getting from tables.c
+
#if 0
int i;
float a;
float fv;
int t;
- // viewangle tangent table
+
for (i=0 ; i<FINEANGLES/2 ; i++)
{
a = (i-FINEANGLES/4+0.5)*PI*2/FINEANGLES;
@@ -524,10 +524,10 @@ void R_InitTables (void)
finetangent[i] = t;
}
- // finesine table
+
for (i=0 ; i<5*FINEANGLES/4 ; i++)
{
- // OPTIMIZE: mirror...
+
a = (i+0.5)*PI*2/FINEANGLES;
t = FRACUNIT*sin (a);
finesine[i] = t;
@@ -538,9 +538,9 @@ void R_InitTables (void)
-//
-// R_InitTextureMapping
-//
+
+
+
void R_InitTextureMapping (void)
{
int i;
@@ -548,12 +548,12 @@ void R_InitTextureMapping (void)
int t;
fixed_t focallength;
- // Use tangent table to generate viewangletox:
- // viewangletox will give the next greatest x
- // after the view angle.
- //
- // Calc focallength
- // so FIELDOFVIEW angles covers SCREENWIDTH.
+
+
+
+
+
+
focallength = FixedDiv (centerxfrac,
finetangent[FINEANGLES/4+FIELDOFVIEW/2] );
@@ -576,9 +576,9 @@ void R_InitTextureMapping (void)
viewangletox[i] = t;
}
- // Scan viewangletox[] to generate xtoviewangle[]:
- // xtoviewangle will give the smallest view angle
- // that maps to x.
+
+
+
for (x=0;x<=viewwidth;x++)
{
i = 0;
@@ -587,7 +587,7 @@ void R_InitTextureMapping (void)
xtoviewangle[x] = (i<<ANGLETOFINESHIFT)-ANG90;
}
- // Take out the fencepost cases from viewangletox.
+
for (i=0 ; i<FINEANGLES/2 ; i++)
{
t = FixedMul (finetangent[i], focallength);
@@ -604,11 +604,11 @@ void R_InitTextureMapping (void)
-//
-// R_InitLightTables
-// Only inits the zlight table,
-// because the scalelight table changes with view size.
-//
+
+
+
+
+
#define DISTMAP 2
void R_InitLightTables (void)
@@ -619,8 +619,8 @@ void R_InitLightTables (void)
int startmap;
int scale;
- // Calculate the light levels to use
- // for each level / distance combination.
+
+
for (i=0 ; i< LIGHTLEVELS ; i++)
{
startmap = ((LIGHTLEVELS-1-i)*2)*NUMCOLORMAPS/LIGHTLEVELS;
@@ -643,12 +643,12 @@ void R_InitLightTables (void)
-//
-// R_SetViewSize
-// Do not really change anything here,
-// because it might be in the middle of a refresh.
-// The change will take effect next refresh.
-//
+
+
+
+
+
+
boolean setsizeneeded;
int setblocks;
int setdetail;
@@ -665,9 +665,9 @@ R_SetViewSize
}
-//
-// R_ExecuteSetViewSize
-//
+
+
+
void R_ExecuteSetViewSize (void)
{
fixed_t cosadj;
@@ -718,15 +718,15 @@ void R_ExecuteSetViewSize (void)
R_InitTextureMapping ();
- // psprite scales
+
pspritescale = FRACUNIT*viewwidth/SCREENWIDTH;
pspriteiscale = FRACUNIT*SCREENWIDTH/viewwidth;
- // thing clipping
+
for (i=0 ; i<viewwidth ; i++)
screenheightarray[i] = viewheight;
- // planes
+
for (i=0 ; i<viewheight ; i++)
{
dy = ((i-viewheight/2)<<FRACBITS)+FRACUNIT/2;
@@ -740,8 +740,8 @@ void R_ExecuteSetViewSize (void)
distscale[i] = FixedDiv (FRACUNIT,cosadj);
}
- // Calculate the light levels to use
- // for each level / scale combination.
+
+
for (i=0 ; i< LIGHTLEVELS ; i++)
{
startmap = ((LIGHTLEVELS-1-i)*2)*NUMCOLORMAPS/LIGHTLEVELS;
@@ -762,9 +762,9 @@ void R_ExecuteSetViewSize (void)
-//
-// R_Init
-//
+
+
+
extern int detailLevel;
extern int screenblocks;
@@ -777,7 +777,7 @@ void R_Init (void)
R_InitPointToAngle ();
printf ("\nR_InitPointToAngle");
R_InitTables ();
- // viewwidth / viewheight / detailLevel are set by the defaults
+
printf ("\nR_InitTables");
R_SetViewSize (screenblocks, detailLevel);
@@ -794,9 +794,9 @@ void R_Init (void)
}
-//
-// R_PointInSubsector
-//
+
+
+
subsector_t*
R_PointInSubsector
( fixed_t x,
@@ -806,7 +806,7 @@ R_PointInSubsector
int side;
int nodenum;
- // single subsector is a special case
+
if (!numnodes)
return subsectors;
@@ -824,9 +824,9 @@ R_PointInSubsector
-//
-// R_SetupFrame
-//
+
+
+
void R_SetupFrame (player_t* player)
{
int i;
@@ -864,35 +864,35 @@ void R_SetupFrame (player_t* player)
-//
-// R_RenderView
-//
+
+
+
void R_RenderPlayerView (player_t* player)
{
R_SetupFrame (player);
- // Clear buffers.
+
R_ClearClipSegs ();
R_ClearDrawSegs ();
R_ClearPlanes ();
R_ClearSprites ();
- // check for new console commands.
+
NetUpdate ();
- // The head node is the last node output.
+
R_RenderBSPNode (numnodes-1);
- // Check for new console commands.
+
NetUpdate ();
R_DrawPlanes ();
- // Check for new console commands.
+
NetUpdate ();
R_DrawMasked ();
- // Check for new console commands.
+
NetUpdate ();
}
diff --git a/src/r_main.h b/src/r_main.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// System specific interface stuff.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __R_MAIN__
@@ -32,9 +32,9 @@
#endif
-//
-// POV related.
-//
+
+
+
extern fixed_t viewcos;
extern fixed_t viewsin;
@@ -58,14 +58,14 @@ extern int linecount;
extern int loopcount;
-//
-// Lighting LUT.
-// Used for z-depth cuing per column/row,
-// and other lighting effects (sector ambient, flash).
-//
-// Lighting constants.
-// Now why not 32 levels here?
+
+
+
+
+
+
+
#define LIGHTLEVELS 16
#define LIGHTSEGSHIFT 4
@@ -82,30 +82,30 @@ extern int extralight;
extern lighttable_t* fixedcolormap;
-// Number of diminishing brightness levels.
-// There a 0-31, i.e. 32 LUT in the COLORMAP lump.
+
+
#define NUMCOLORMAPS 32
-// Blocky/low detail mode.
-//B remove this?
-// 0 = high, 1 = low
+
+
+
extern int detailshift;
-//
-// Function pointers to switch refresh/drawing functions.
-// Used to select shadow mode etc.
-//
+
+
+
+
extern void (*colfunc) (void);
extern void (*basecolfunc) (void);
extern void (*fuzzcolfunc) (void);
-// No shadow effects on floors.
+
extern void (*spanfunc) (void);
-//
-// Utility functions.
+
+
int
R_PointOnSide
( fixed_t x,
@@ -151,22 +151,22 @@ R_AddPointToBox
-//
-// REFRESH - the actual rendering functions.
-//
-// Called by G_Drawer.
+
+
+
+
void R_RenderPlayerView (player_t *player);
-// Called by startup code.
+
void R_Init (void);
-// Called by M_Responder.
+
void R_SetViewSize (int blocks, int detail);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/r_plane.c b/src/r_plane.c
@@ -1,27 +1,27 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Here is a core component: drawing the floors and ceilings,
-// while maintaining a per column clipping list only.
-// Moreover, the sky areas have to be determined.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
@@ -44,41 +44,41 @@ rcsid[] = "$Id: r_plane.c,v 1.4 1997/02/03 16:47:55 b1 Exp $";
planefunction_t floorfunc;
planefunction_t ceilingfunc;
-//
-// opening
-//
-// Here comes the obnoxious "visplane".
+
+
+
+
#define MAXVISPLANES 128
visplane_t visplanes[MAXVISPLANES];
visplane_t* lastvisplane;
visplane_t* floorplane;
visplane_t* ceilingplane;
-// ?
+
#define MAXOPENINGS SCREENWIDTH*64
short openings[MAXOPENINGS];
short* lastopening;
-//
-// Clip values are the solid pixel bounding the range.
-// floorclip starts out SCREENHEIGHT
-// ceilingclip starts out -1
-//
+
+
+
+
+
short floorclip[SCREENWIDTH];
short ceilingclip[SCREENWIDTH];
-//
-// spanstart holds the start of a plane span
-// initialized to 0 at start
-//
+
+
+
+
int spanstart[SCREENHEIGHT];
int spanstop[SCREENHEIGHT];
-//
-// texture mapping
-//
+
+
+
lighttable_t** planezlight;
fixed_t planeheight;
@@ -94,29 +94,29 @@ fixed_t cachedystep[SCREENHEIGHT];
-//
-// R_InitPlanes
-// Only at game startup.
-//
+
+
+
+
void R_InitPlanes (void)
{
- // Doh!
+
}
-//
-// R_MapPlane
-//
-// Uses global vars:
-// planeheight
-// ds_source
-// basexscale
-// baseyscale
-// viewx
-// viewy
-//
-// BASIC PRIMITIVE
-//
+
+
+
+
+
+
+
+
+
+
+
+
+
void
R_MapPlane
( int y,
@@ -173,21 +173,21 @@ R_MapPlane
ds_x1 = x1;
ds_x2 = x2;
- // high or low detail
+
spanfunc ();
}
-//
-// R_ClearPlanes
-// At begining of frame.
-//
+
+
+
+
void R_ClearPlanes (void)
{
int i;
angle_t angle;
- // opening / clipping determination
+
for (i=0 ; i<viewwidth ; i++)
{
floorclip[i] = viewheight;
@@ -197,13 +197,13 @@ void R_ClearPlanes (void)
lastvisplane = visplanes;
lastopening = openings;
- // texture calculation
+
memset (cachedheight, 0, sizeof(cachedheight));
- // left to right mapping
+
angle = (viewangle-ANG90)>>ANGLETOFINESHIFT;
- // scale will be unit scale at SCREENWIDTH/2 distance
+
basexscale = FixedDiv (finecosine[angle],centerxfrac);
baseyscale = -FixedDiv (finesine[angle],centerxfrac);
}
@@ -211,9 +211,9 @@ void R_ClearPlanes (void)
-//
-// R_FindPlane
-//
+
+
+
visplane_t*
R_FindPlane
( fixed_t height,
@@ -224,7 +224,7 @@ R_FindPlane
if (picnum == skyflatnum)
{
- height = 0; // all skys map together
+ height = 0;
lightlevel = 0;
}
@@ -259,9 +259,9 @@ R_FindPlane
}
-//
-// R_CheckPlane
-//
+
+
+
visplane_t*
R_CheckPlane
( visplane_t* pl,
@@ -305,11 +305,11 @@ R_CheckPlane
pl->minx = unionl;
pl->maxx = unionh;
- // use the same one
+
return pl;
}
- // make a new visplane
+
lastvisplane->height = pl->height;
lastvisplane->picnum = pl->picnum;
lastvisplane->lightlevel = pl->lightlevel;
@@ -324,9 +324,9 @@ R_CheckPlane
}
-//
-// R_MakeSpans
-//
+
+
+
void
R_MakeSpans
( int x,
@@ -360,10 +360,10 @@ R_MakeSpans
-//
-// R_DrawPlanes
-// At the end of each frame.
-//
+
+
+
+
void R_DrawPlanes (void)
{
visplane_t* pl;
@@ -392,15 +392,15 @@ void R_DrawPlanes (void)
continue;
- // sky flat
+
if (pl->picnum == skyflatnum)
{
dc_iscale = pspriteiscale>>detailshift;
- // Sky is allways drawn full bright,
- // i.e. colormaps[0] is used.
- // Because of this hack, sky is not affected
- // by INVUL inverse mapping.
+
+
+
+
dc_colormap = colormaps;
dc_texturemid = skytexturemid;
for (x=pl->minx ; x <= pl->maxx ; x++)
@@ -419,7 +419,7 @@ void R_DrawPlanes (void)
continue;
}
- // regular flat
+
ds_source = W_CacheLumpNum(firstflat +
flattranslation[pl->picnum],
PU_STATIC);
diff --git a/src/r_plane.h b/src/r_plane.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Refresh, visplane stuff (floor, ceilings).
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __R_PLANE__
@@ -31,7 +31,7 @@
#endif
-// Visplane related.
+
extern short* lastopening;
@@ -80,8 +80,8 @@ R_CheckPlane
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/r_segs.c b/src/r_segs.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// All the clipping: columns, horizontal spans, sky columns.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
@@ -40,12 +40,12 @@ rcsid[] = "$Id: r_segs.c,v 1.3 1997/01/29 20:10:19 b1 Exp $";
#include "r_sky.h"
-// OPTIMIZE: closed two sided lines as single sided
-// True if any of the segs textures might be visible.
+
+
boolean segtextured;
-// False if the back side is the same plane.
+
boolean markfloor;
boolean markceiling;
@@ -56,12 +56,12 @@ int midtexture;
angle_t rw_normalangle;
-// angle to line origin
+
int rw_angle1;
-//
-// regular wall
-//
+
+
+
int rw_x;
int rw_stopx;
angle_t rw_centerangle;
@@ -96,9 +96,9 @@ short* maskedtexturecol;
-//
-// R_RenderMaskedSegRange
-//
+
+
+
void
R_RenderMaskedSegRange
( drawseg_t* ds,
@@ -110,10 +110,10 @@ R_RenderMaskedSegRange
int lightnum;
int texnum;
- // Calculate light table.
- // Use different light tables
- // for horizontal / vertical / diagonal. Diagonal?
- // OPTIMIZE: get rid of LIGHTSEGSHIFT globally
+
+
+
+
curline = ds->curline;
frontsector = curline->frontsector;
backsector = curline->backsector;
@@ -140,7 +140,7 @@ R_RenderMaskedSegRange
mfloorclip = ds->sprbottomclip;
mceilingclip = ds->sprtopclip;
- // find positioning
+
if (curline->linedef->flags & ML_DONTPEGBOTTOM)
{
dc_texturemid = frontsector->floorheight > backsector->floorheight
@@ -158,10 +158,10 @@ R_RenderMaskedSegRange
if (fixedcolormap)
dc_colormap = fixedcolormap;
- // draw the columns
+
for (dc_x = x1 ; dc_x <= x2 ; dc_x++)
{
- // calculate lighting
+
if (maskedtexturecol[dc_x] != MAXSHORT)
{
if (!fixedcolormap)
@@ -177,7 +177,7 @@ R_RenderMaskedSegRange
sprtopscreen = centeryfrac - FixedMul(dc_texturemid, spryscale);
dc_iscale = 0xffffffffu / (unsigned)spryscale;
- // draw the texture
+
col = (column_t *)(
(byte *)R_GetColumn(texnum,maskedtexturecol[dc_x]) -3);
@@ -192,14 +192,14 @@ R_RenderMaskedSegRange
-//
-// R_RenderSegLoop
-// Draws zero, one, or two textures (and possibly a masked
-// texture) for walls.
-// Can draw or mark the starting pixel of floor and ceiling
-// textures.
-// CALLED: CORE LOOPING ROUTINE.
-//
+
+
+
+
+
+
+
+
#define HEIGHTBITS 12
#define HEIGHTUNIT (1<<HEIGHTBITS)
@@ -214,14 +214,14 @@ void R_RenderSegLoop (void)
int top;
int bottom;
- //texturecolumn = 0; // shut up compiler warning
+
for ( ; rw_x < rw_stopx ; rw_x++)
{
- // mark floor / ceiling areas
+
yl = (topfrac+HEIGHTUNIT-1)>>HEIGHTBITS;
- // no space above wall?
+
if (yl < ceilingclip[rw_x]+1)
yl = ceilingclip[rw_x]+1;
@@ -258,14 +258,14 @@ void R_RenderSegLoop (void)
}
}
- // texturecolumn and lighting are independent of wall tiers
+
if (segtextured)
{
- // calculate texture offset
+
angle = (rw_centerangle + xtoviewangle[rw_x])>>ANGLETOFINESHIFT;
texturecolumn = rw_offset-FixedMul(finetangent[angle],rw_distance);
texturecolumn >>= FRACBITS;
- // calculate lighting
+
index = rw_scale>>LIGHTSCALESHIFT;
if (index >= MAXLIGHTSCALE )
@@ -276,10 +276,10 @@ void R_RenderSegLoop (void)
dc_iscale = 0xffffffffu / (unsigned)rw_scale;
}
- // draw the wall tiers
+
if (midtexture)
{
- // single sided line
+
dc_yl = yl;
dc_yh = yh;
dc_texturemid = rw_midtexturemid;
@@ -290,10 +290,10 @@ void R_RenderSegLoop (void)
}
else
{
- // two sided line
+
if (toptexture)
{
- // top wall
+
mid = pixhigh>>HEIGHTBITS;
pixhigh += pixhighstep;
@@ -314,18 +314,18 @@ void R_RenderSegLoop (void)
}
else
{
- // no top wall
+
if (markceiling)
ceilingclip[rw_x] = yl-1;
}
if (bottomtexture)
{
- // bottom wall
+
mid = (pixlow+HEIGHTUNIT-1)>>HEIGHTBITS;
pixlow += pixlowstep;
- // no space above wall?
+
if (mid <= ceilingclip[rw_x])
mid = ceilingclip[rw_x]+1;
@@ -344,15 +344,15 @@ void R_RenderSegLoop (void)
}
else
{
- // no bottom wall
+
if (markfloor)
floorclip[rw_x] = yh+1;
}
if (maskedtexture)
{
- // save texturecol
- // for backdrawing of masked mid texture
+
+
maskedtexturecol[rw_x] = texturecolumn;
}
}
@@ -366,11 +366,11 @@ void R_RenderSegLoop (void)
-//
-// R_StoreWallRange
-// A wall segment will be drawn
-// between start and stop pixels (inclusive).
-//
+
+
+
+
+
void
R_StoreWallRange
( int start,
@@ -382,7 +382,7 @@ R_StoreWallRange
fixed_t vtop;
int lightnum;
- // don't overflow and crash
+
if (ds_p == &drawsegs[MAXDRAWSEGS])
return;
@@ -394,10 +394,10 @@ R_StoreWallRange
sidedef = curline->sidedef;
linedef = curline->linedef;
- // mark the segment as visible for auto map
+
linedef->flags |= ML_MAPPED;
- // calculate rw_distance for scale calculation
+
rw_normalangle = curline->angle + ANG90;
offsetangle = abs(rw_normalangle-rw_angle1);
@@ -415,7 +415,7 @@ R_StoreWallRange
ds_p->curline = curline;
rw_stopx = stop+1;
- // calculate scale at both ends and step
+
ds_p->scale1 = rw_scale =
R_ScaleFromGlobalAngle (viewangle + xtoviewangle[start]);
@@ -427,7 +427,7 @@ R_StoreWallRange
}
else
{
- // UNUSED: try to fix the stretched line bug
+
#if 0
if (rw_distance < FRACUNIT/2)
{
@@ -445,8 +445,8 @@ R_StoreWallRange
ds_p->scale2 = ds_p->scale1;
}
- // calculate texture boundaries
- // and decide if floor / ceiling marks are needed
+
+
worldtop = frontsector->ceilingheight - viewz;
worldbottom = frontsector->floorheight - viewz;
@@ -455,20 +455,20 @@ R_StoreWallRange
if (!backsector)
{
- // single sided line
+
midtexture = texturetranslation[sidedef->midtexture];
- // a single sided line is terminal, so it must mark ends
+
markfloor = markceiling = true;
if (linedef->flags & ML_DONTPEGBOTTOM)
{
vtop = frontsector->floorheight +
textureheight[sidedef->midtexture];
- // bottom of texture at bottom
+
rw_midtexturemid = vtop - viewz;
}
else
{
- // top of texture at top
+
rw_midtexturemid = worldtop;
}
rw_midtexturemid += sidedef->rowoffset;
@@ -481,7 +481,7 @@ R_StoreWallRange
}
else
{
- // two sided line
+
ds_p->sprtopclip = ds_p->sprbottomclip = NULL;
ds_p->silhouette = 0;
@@ -494,7 +494,7 @@ R_StoreWallRange
{
ds_p->silhouette = SIL_BOTTOM;
ds_p->bsilheight = MAXINT;
- // ds_p->sprbottomclip = negonearray;
+
}
if (frontsector->ceilingheight < backsector->ceilingheight)
@@ -506,7 +506,7 @@ R_StoreWallRange
{
ds_p->silhouette |= SIL_TOP;
ds_p->tsilheight = MININT;
- // ds_p->sprtopclip = screenheightarray;
+
}
if (backsector->ceilingheight <= frontsector->floorheight)
@@ -526,7 +526,7 @@ R_StoreWallRange
worldhigh = backsector->ceilingheight - viewz;
worldlow = backsector->floorheight - viewz;
- // hack to allow height changes in outdoor areas
+
if (frontsector->ceilingpic == skyflatnum
&& backsector->ceilingpic == skyflatnum)
{
@@ -542,7 +542,7 @@ R_StoreWallRange
}
else
{
- // same plane on both sides
+
markfloor = false;
}
@@ -555,25 +555,25 @@ R_StoreWallRange
}
else
{
- // same plane on both sides
+
markceiling = false;
}
if (backsector->ceilingheight <= frontsector->floorheight
|| backsector->floorheight >= frontsector->ceilingheight)
{
- // closed door
+
markceiling = markfloor = true;
}
if (worldhigh < worldtop)
{
- // top texture
+
toptexture = texturetranslation[sidedef->toptexture];
if (linedef->flags & ML_DONTPEGTOP)
{
- // top of texture at top
+
rw_toptexturemid = worldtop;
}
else
@@ -582,38 +582,38 @@ R_StoreWallRange
backsector->ceilingheight
+ textureheight[sidedef->toptexture];
- // bottom of texture
+
rw_toptexturemid = vtop - viewz;
}
}
if (worldlow > worldbottom)
{
- // bottom texture
+
bottomtexture = texturetranslation[sidedef->bottomtexture];
if (linedef->flags & ML_DONTPEGBOTTOM )
{
- // bottom of texture at bottom
- // top of texture at top
+
+
rw_bottomtexturemid = worldtop;
}
- else // top of texture at top
+ else
rw_bottomtexturemid = worldlow;
}
rw_toptexturemid += sidedef->rowoffset;
rw_bottomtexturemid += sidedef->rowoffset;
- // allocate space for masked texture tables
+
if (sidedef->midtexture)
{
- // masked midtexture
+
maskedtexture = true;
ds_p->maskedtexturecol = maskedtexturecol = lastopening - rw_x;
lastopening += rw_stopx - rw_x;
}
}
- // calculate rw_offset (only needed for textured lines)
+
segtextured = midtexture | toptexture | bottomtexture | maskedtexture;
if (segtextured)
@@ -635,10 +635,10 @@ R_StoreWallRange
rw_offset += sidedef->textureoffset + curline->offset;
rw_centerangle = ANG90 + viewangle - rw_normalangle;
- // calculate light table
- // use different light tables
- // for horizontal / vertical / diagonal
- // OPTIMIZE: get rid of LIGHTSEGSHIFT globally
+
+
+
+
if (!fixedcolormap)
{
lightnum = (frontsector->lightlevel >> LIGHTSEGSHIFT)+extralight;
@@ -657,26 +657,26 @@ R_StoreWallRange
}
}
- // if a floor / ceiling plane is on the wrong side
- // of the view plane, it is definitely invisible
- // and doesn't need to be marked.
+
+
+
if (frontsector->floorheight >= viewz)
{
- // above view plane
+
markfloor = false;
}
if (frontsector->ceilingheight <= viewz
&& frontsector->ceilingpic != skyflatnum)
{
- // below view plane
+
markceiling = false;
}
- // calculate incremental stepping values for texture edges
+
worldtop >>= 4;
worldbottom >>= 4;
@@ -704,7 +704,7 @@ R_StoreWallRange
}
}
- // render it
+
if (markceiling)
ceilingplane = R_CheckPlane (ceilingplane, rw_x, rw_stopx-1);
@@ -714,7 +714,7 @@ R_StoreWallRange
R_RenderSegLoop ();
- // save sprite clipping info
+
if ( ((ds_p->silhouette & SIL_TOP) || maskedtexture)
&& !ds_p->sprtopclip)
{
diff --git a/src/r_segs.h b/src/r_segs.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Refresh module, drawing LineSegs from BSP.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __R_SEGS__
@@ -37,8 +37,8 @@ R_RenderMaskedSegRange
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/r_sky.c b/src/r_sky.c
@@ -1,38 +1,38 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Sky rendering. The DOOM sky is a texture map like any
-// wall, wrapping around. A 1024 columns equal 360 degrees.
-// The default sky map is 256 columns and repeats 4 times
-// on a 320 screen?
-//
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
-// Needed for FRACUNIT.
+
#include "m_fixed.h"
-// Needed for Flat retrieval.
+
#include "r_data.h"
@@ -41,22 +41,22 @@ rcsid[] = "$Id: m_bbox.c,v 1.1 1997/02/03 22:45:10 b1 Exp $";
#endif
#include "r_sky.h"
-//
-// sky mapping
-//
+
+
+
int skyflatnum;
int skytexture;
int skytexturemid;
-//
-// R_InitSkyMap
-// Called whenever the view size changes.
-//
+
+
+
+
void R_InitSkyMap (void)
{
- // skyflatnum = R_FlatNumForName ( SKYFLATNAME );
+
skytexturemid = 100*FRACUNIT;
}
diff --git a/src/r_sky.h b/src/r_sky.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Sky rendering.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __R_SKY__
@@ -28,21 +28,21 @@
#pragma interface
#endif
-// SKY, store the number for name.
+
#define SKYFLATNAME "F_SKY1"
-// The sky map is 256*128*4 maps.
+
#define ANGLETOSKYSHIFT 22
extern int skytexture;
extern int skytexturemid;
-// Called whenever the view size changes.
+
void R_InitSkyMap (void);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/r_state.h b/src/r_state.h
@@ -1,29 +1,29 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Refresh/render internal state variables (global).
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __R_STATE__
#define __R_STATE__
-// Need data structure definitions.
+
#include "d_player.h"
#include "r_data.h"
@@ -35,15 +35,15 @@
-//
-// Refresh internal data structures,
-// for rendering.
-//
-// needed for texture pegging
+
+
+
+
+
extern fixed_t* textureheight;
-// needed for pre rendering (fracs)
+
extern fixed_t* spritewidth;
extern fixed_t* spriteoffset;
@@ -57,21 +57,21 @@ extern int viewheight;
extern int firstflat;
-// for global animation
+
extern int* flattranslation;
extern int* texturetranslation;
-// Sprite....
+
extern int firstspritelump;
extern int lastspritelump;
extern int numspritelumps;
-//
-// Lookup tables for map data.
-//
+
+
+
extern int numsprites;
extern spritedef_t* sprites;
@@ -97,9 +97,9 @@ extern int numsides;
extern side_t* sides;
-//
-// POV data.
-//
+
+
+
extern fixed_t viewx;
extern fixed_t viewy;
extern fixed_t viewz;
@@ -108,22 +108,22 @@ extern angle_t viewangle;
extern player_t* viewplayer;
-// ?
+
extern angle_t clipangle;
extern int viewangletox[FINEANGLES/2];
extern angle_t xtoviewangle[SCREENWIDTH+1];
-//extern fixed_t finetangent[FINEANGLES/2];
+
extern fixed_t rw_distance;
extern angle_t rw_normalangle;
-// angle to line origin
+
extern int rw_angle1;
-// Segs count?
+
extern int sscount;
extern visplane_t* floorplane;
@@ -131,8 +131,8 @@ extern visplane_t* ceilingplane;
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/r_things.c b/src/r_things.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Refresh of things, i.e. objects represented by sprites.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
@@ -46,8 +46,8 @@ rcsid[] = "$Id: r_things.c,v 1.5 1997/02/03 16:47:56 b1 Exp $";
#define MINZ (FRACUNIT*4)
#define BASEYCENTER 100
-//void R_DrawColumn (void);
-//void R_DrawFuzzColumn (void);
+
+
@@ -64,30 +64,30 @@ typedef struct
-//
-// Sprite rotation 0 is facing the viewer,
-// rotation 1 is one angle turn CLOCKWISE around the axis.
-// This is not the same as the angle,
-// which increases counter clockwise (protractor).
-// There was a lot of stuff grabbed wrong, so I changed it...
-//
+
+
+
+
+
+
+
fixed_t pspritescale;
fixed_t pspriteiscale;
lighttable_t** spritelights;
-// constant arrays
-// used for psprite clipping and initializing clipping
+
+
short negonearray[SCREENWIDTH];
short screenheightarray[SCREENWIDTH];
-//
-// INITIALIZATION FUNCTIONS
-//
-// variables used to look up
-// and range check thing_t sprites patches
+
+
+
+
+
spritedef_t* sprites;
int numsprites;
@@ -98,10 +98,10 @@ char* spritename;
-//
-// R_InstallSpriteLump
-// Local function for R_InitSprites.
-//
+
+
+
+
void
R_InstallSpriteLump
( int lump,
@@ -120,7 +120,7 @@ R_InstallSpriteLump
if (rotation == 0)
{
- // the lump should be used for all rotations
+
if (sprtemp[frame].rotate == false)
I_Error ("R_InitSprites: Sprite %s frame %c has "
"multip rot=0 lump", spritename, 'A'+frame);
@@ -138,14 +138,14 @@ R_InstallSpriteLump
return;
}
- // the lump is only used for one rotation
+
if (sprtemp[frame].rotate == false)
I_Error ("R_InitSprites: Sprite %s frame %c has rotations "
"and a rot=0 lump", spritename, 'A'+frame);
sprtemp[frame].rotate = true;
- // make 0 based
+
rotation--;
if (sprtemp[frame].lump[rotation] != -1)
I_Error ("R_InitSprites: Sprite %s : %c : %c "
@@ -159,21 +159,21 @@ R_InstallSpriteLump
-//
-// R_InitSpriteDefs
-// Pass a null terminated list of sprite names
-// (4 chars exactly) to be used.
-// Builds the sprite rotation matrixes to account
-// for horizontally flipped sprites.
-// Will report an error if the lumps are inconsistant.
-// Only called at startup.
-//
-// Sprite lump names are 4 characters for the actor,
-// a letter for the frame, and a number for the rotation.
-// A sprite that is flippable will have an additional
-// letter/number appended.
-// The rotation character can be 0 to signify no rotations.
-//
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
void R_InitSpriteDefs (char** namelist)
{
char** check;
@@ -186,7 +186,7 @@ void R_InitSpriteDefs (char** namelist)
int end;
int patched;
- // count the number of sprite names
+
check = namelist;
while (*check != NULL)
check++;
@@ -201,9 +201,9 @@ void R_InitSpriteDefs (char** namelist)
start = firstspritelump-1;
end = lastspritelump+1;
- // scan all the lump names for each of the names,
- // noting the highest frame letter.
- // Just compare 4 characters as ints
+
+
+
for (i=0 ; i<numsprites ; i++)
{
spritename = namelist[i];
@@ -212,8 +212,8 @@ void R_InitSpriteDefs (char** namelist)
maxframe = -1;
intname = *(int *)namelist[i];
- // scan the lumps,
- // filling in the frames for whatever is found
+
+
for (l=start+1 ; l<end ; l++)
{
if (*(int *)lumpinfo[l].name == intname)
@@ -237,7 +237,7 @@ void R_InitSpriteDefs (char** namelist)
}
}
- // check the frames that were found for completeness
+
if (maxframe == -1)
{
sprites[i].numframes = 0;
@@ -251,17 +251,17 @@ void R_InitSpriteDefs (char** namelist)
switch ((int)sprtemp[frame].rotate)
{
case -1:
- // no rotations were found for that frame at all
+
I_Error ("R_InitSprites: No patches found "
"for %s frame %c", namelist[i], frame+'A');
break;
case 0:
- // only the first rotation is needed
+
break;
case 1:
- // must have all 8 frames
+
for (rotation=0 ; rotation<8 ; rotation++)
if (sprtemp[frame].lump[rotation] == -1)
I_Error ("R_InitSprites: Sprite %s frame %c "
@@ -271,7 +271,7 @@ void R_InitSpriteDefs (char** namelist)
}
}
- // allocate space for the frames present and copy sprtemp to it
+
sprites[i].numframes = maxframe;
sprites[i].spriteframes =
Z_Malloc (maxframe * sizeof(spriteframe_t), PU_STATIC, NULL);
@@ -283,19 +283,19 @@ void R_InitSpriteDefs (char** namelist)
-//
-// GAME FUNCTIONS
-//
+
+
+
vissprite_t vissprites[MAXVISSPRITES];
vissprite_t* vissprite_p;
int newvissprite;
-//
-// R_InitSprites
-// Called at program start.
-//
+
+
+
+
void R_InitSprites (char** namelist)
{
int i;
@@ -310,19 +310,19 @@ void R_InitSprites (char** namelist)
-//
-// R_ClearSprites
-// Called at frame start.
-//
+
+
+
+
void R_ClearSprites (void)
{
vissprite_p = vissprites;
}
-//
-// R_NewVisSprite
-//
+
+
+
vissprite_t overflowsprite;
vissprite_t* R_NewVisSprite (void)
@@ -336,12 +336,12 @@ vissprite_t* R_NewVisSprite (void)
-//
-// R_DrawMaskedColumn
-// Used for sprites and masked mid textures.
-// Masked means: partly transparent, i.e. stored
-// in posts/runs of opaque pixels.
-//
+
+
+
+
+
+
short* mfloorclip;
short* mceilingclip;
@@ -358,8 +358,8 @@ void R_DrawMaskedColumn (column_t* column)
for ( ; column->topdelta != 0xff ; )
{
- // calculate unclipped screen coordinates
- // for post
+
+
topscreen = sprtopscreen + spryscale*column->topdelta;
bottomscreen = topscreen + spryscale*column->length;
@@ -375,10 +375,10 @@ void R_DrawMaskedColumn (column_t* column)
{
dc_source = (byte *)column + 3;
dc_texturemid = basetexturemid - (column->topdelta<<FRACBITS);
- // dc_source = (byte *)column + 3 - column->topdelta;
+
- // Drawn by either R_DrawColumn
- // or (SHADOW) R_DrawFuzzColumn.
+
+
colfunc ();
}
column = (column_t *)( (byte *)column + column->length + 4);
@@ -389,10 +389,10 @@ void R_DrawMaskedColumn (column_t* column)
-//
-// R_DrawVisSprite
-// mfloorclip and mceilingclip should also be set.
-//
+
+
+
+
void
R_DrawVisSprite
( vissprite_t* vis,
@@ -411,7 +411,7 @@ R_DrawVisSprite
if (!dc_colormap)
{
- // NULL colormap = shadow draw
+
colfunc = fuzzcolfunc;
}
else if (vis->mobjflags & MF_TRANSLATION)
@@ -444,11 +444,11 @@ R_DrawVisSprite
-//
-// R_ProjectSprite
-// Generates a vissprite for a thing
-// if it might be visible.
-//
+
+
+
+
+
void R_ProjectSprite (mobj_t* thing)
{
fixed_t tr_x;
@@ -479,7 +479,7 @@ void R_ProjectSprite (mobj_t* thing)
angle_t ang;
fixed_t iscale;
- // transform the origin point
+
tr_x = thing->x - viewx;
tr_y = thing->y - viewy;
@@ -488,7 +488,7 @@ void R_ProjectSprite (mobj_t* thing)
tz = gxt-gyt;
- // thing is behind view plane?
+
if (tz < MINZ)
return;
@@ -498,11 +498,11 @@ void R_ProjectSprite (mobj_t* thing)
gyt = FixedMul(tr_y,viewcos);
tx = -(gyt+gxt);
- // too far off the side?
+
if (abs(tx)>(tz<<2))
return;
- // decide which patch to use for sprite relative to player
+
#ifdef RANGECHECK
if ((unsigned)thing->sprite >= numsprites)
I_Error ("R_ProjectSprite: invalid sprite number %i ",
@@ -518,7 +518,7 @@ void R_ProjectSprite (mobj_t* thing)
if (sprframe->rotate)
{
- // choose a different rotation based on player view
+
ang = R_PointToAngle (thing->x, thing->y);
rot = (ang-thing->angle+(unsigned)(ANG45/2)*9)>>29;
lump = sprframe->lump[rot];
@@ -526,27 +526,27 @@ void R_ProjectSprite (mobj_t* thing)
}
else
{
- // use single rotation for all views
+
lump = sprframe->lump[0];
flip = (boolean)sprframe->flip[0];
}
- // calculate edges of the shape
+
tx -= spriteoffset[lump];
x1 = (centerxfrac + FixedMul (tx,xscale) ) >>FRACBITS;
- // off the right side?
+
if (x1 > viewwidth)
return;
tx += spritewidth[lump];
x2 = ((centerxfrac + FixedMul (tx,xscale) ) >>FRACBITS) - 1;
- // off the left side
+
if (x2 < 0)
return;
- // store information in a vissprite
+
vis = R_NewVisSprite ();
vis->mobjflags = thing->flags;
vis->scale = xscale<<detailshift;
@@ -574,26 +574,26 @@ void R_ProjectSprite (mobj_t* thing)
vis->startfrac += vis->xiscale*(vis->x1-x1);
vis->patch = lump;
- // get light level
+
if (thing->flags & MF_SHADOW)
{
- // shadow draw
+
vis->colormap = NULL;
}
else if (fixedcolormap)
{
- // fixed map
+
vis->colormap = fixedcolormap;
}
else if (thing->frame & FF_FULLBRIGHT)
{
- // full bright
+
vis->colormap = colormaps;
}
else
{
- // diminished light
+
index = xscale>>(LIGHTSCALESHIFT-detailshift);
if (index >= MAXLIGHTSCALE)
@@ -606,23 +606,23 @@ void R_ProjectSprite (mobj_t* thing)
-//
-// R_AddSprites
-// During BSP traversal, this adds sprites by sector.
-//
+
+
+
+
void R_AddSprites (sector_t* sec)
{
mobj_t* thing;
int lightnum;
- // BSP is traversed by subsector.
- // A sector might have been split into several
- // subsectors during BSP building.
- // Thus we check whether its already added.
+
+
+
+
if (sec->validcount == validcount)
return;
- // Well, now it will be done.
+
sec->validcount = validcount;
lightnum = (sec->lightlevel >> LIGHTSEGSHIFT)+extralight;
@@ -634,15 +634,15 @@ void R_AddSprites (sector_t* sec)
else
spritelights = scalelight[lightnum];
- // Handle all things in sector.
+
for (thing = sec->thinglist ; thing ; thing = thing->snext)
R_ProjectSprite (thing);
}
-//
-// R_DrawPSprite
-//
+
+
+
void R_DrawPSprite (pspdef_t* psp)
{
fixed_t tx;
@@ -655,7 +655,7 @@ void R_DrawPSprite (pspdef_t* psp)
vissprite_t* vis;
vissprite_t avis;
- // decide which patch to use
+
#ifdef RANGECHECK
if ( (unsigned)psp->state->sprite >= numsprites)
I_Error ("R_ProjectSprite: invalid sprite number %i ",
@@ -672,24 +672,24 @@ void R_DrawPSprite (pspdef_t* psp)
lump = sprframe->lump[0];
flip = (boolean)sprframe->flip[0];
- // calculate edges of the shape
+
tx = psp->sx-160*FRACUNIT;
tx -= spriteoffset[lump];
x1 = (centerxfrac + FixedMul (tx,pspritescale) ) >>FRACBITS;
- // off the right side
+
if (x1 > viewwidth)
return;
tx += spritewidth[lump];
x2 = ((centerxfrac + FixedMul (tx, pspritescale) ) >>FRACBITS) - 1;
- // off the left side
+
if (x2 < 0)
return;
- // store information in a vissprite
+
vis = &avis;
vis->mobjflags = 0;
vis->texturemid = (BASEYCENTER<<FRACBITS)+FRACUNIT/2-(psp->sy-spritetopoffset[lump]);
@@ -716,22 +716,22 @@ void R_DrawPSprite (pspdef_t* psp)
if (viewplayer->powers[pw_invisibility] > 4*32
|| viewplayer->powers[pw_invisibility] & 8)
{
- // shadow draw
+
vis->colormap = NULL;
}
else if (fixedcolormap)
{
- // fixed color
+
vis->colormap = fixedcolormap;
}
else if (psp->state->frame & FF_FULLBRIGHT)
{
- // full bright
+
vis->colormap = colormaps;
}
else
{
- // local light
+
vis->colormap = spritelights[MAXLIGHTSCALE-1];
}
@@ -740,16 +740,16 @@ void R_DrawPSprite (pspdef_t* psp)
-//
-// R_DrawPlayerSprites
-//
+
+
+
void R_DrawPlayerSprites (void)
{
int i;
int lightnum;
pspdef_t* psp;
- // get light level
+
lightnum =
(viewplayer->mo->subsector->sector->lightlevel >> LIGHTSEGSHIFT)
+extralight;
@@ -761,11 +761,11 @@ void R_DrawPlayerSprites (void)
else
spritelights = scalelight[lightnum];
- // clip to screen bounds
+
mfloorclip = screenheightarray;
mceilingclip = negonearray;
- // add all active psprites
+
for (i=0, psp=viewplayer->psprites;
i<NUMPSPRITES;
i++,psp++)
@@ -778,9 +778,9 @@ void R_DrawPlayerSprites (void)
-//
-// R_SortVisSprites
-//
+
+
+
vissprite_t vsprsortedhead;
@@ -811,8 +811,8 @@ void R_SortVisSprites (void)
(vissprite_p-1)->next = &unsorted;
unsorted.prev = vissprite_p-1;
- // pull the vissprites out by scale
- //best = 0; // shut up the compiler warning
+
+
vsprsortedhead.next = vsprsortedhead.prev = &vsprsortedhead;
for (i=0 ; i<count ; i++)
{
@@ -836,9 +836,9 @@ void R_SortVisSprites (void)
-//
-// R_DrawSprite
-//
+
+
+
void R_DrawSprite (vissprite_t* spr)
{
drawseg_t* ds;
@@ -854,18 +854,18 @@ void R_DrawSprite (vissprite_t* spr)
for (x = spr->x1 ; x<=spr->x2 ; x++)
clipbot[x] = cliptop[x] = -2;
- // Scan drawsegs from end to start for obscuring segs.
- // The first drawseg that has a greater scale
- // is the clip seg.
+
+
+
for (ds=ds_p-1 ; ds >= drawsegs ; ds--)
{
- // determine if the drawseg obscures the sprite
+
if (ds->x1 > spr->x2
|| ds->x2 < spr->x1
|| (!ds->silhouette
&& !ds->maskedtexturecol) )
{
- // does not cover sprite
+
continue;
}
@@ -887,15 +887,15 @@ void R_DrawSprite (vissprite_t* spr)
|| ( lowscale < spr->scale
&& !R_PointOnSegSide (spr->gx, spr->gy, ds->curline) ) )
{
- // masked mid texture?
+
if (ds->maskedtexturecol)
R_RenderMaskedSegRange (ds, r1, r2);
- // seg is behind sprite
+
continue;
}
- // clip this piece of the sprite
+
silhouette = ds->silhouette;
if (spr->gz >= ds->bsilheight)
@@ -906,21 +906,21 @@ void R_DrawSprite (vissprite_t* spr)
if (silhouette == 1)
{
- // bottom sil
+
for (x=r1 ; x<=r2 ; x++)
if (clipbot[x] == -2)
clipbot[x] = ds->sprbottomclip[x];
}
else if (silhouette == 2)
{
- // top sil
+
for (x=r1 ; x<=r2 ; x++)
if (cliptop[x] == -2)
cliptop[x] = ds->sprtopclip[x];
}
else if (silhouette == 3)
{
- // both
+
for (x=r1 ; x<=r2 ; x++)
{
if (clipbot[x] == -2)
@@ -932,9 +932,9 @@ void R_DrawSprite (vissprite_t* spr)
}
- // all clipping has been performed, so draw the sprite
+
- // check for unclipped columns
+
for (x = spr->x1 ; x<=spr->x2 ; x++)
{
if (clipbot[x] == -2)
@@ -952,9 +952,9 @@ void R_DrawSprite (vissprite_t* spr)
-//
-// R_DrawMasked
-//
+
+
+
void R_DrawMasked (void)
{
vissprite_t* spr;
@@ -964,7 +964,7 @@ void R_DrawMasked (void)
if (vissprite_p > vissprites)
{
- // draw all vissprites back to front
+
for (spr = vsprsortedhead.next ;
spr != &vsprsortedhead ;
spr=spr->next)
@@ -974,13 +974,13 @@ void R_DrawMasked (void)
}
}
- // render any remaining masked mid textures
+
for (ds=ds_p-1 ; ds >= drawsegs ; ds--)
if (ds->maskedtexturecol)
R_RenderMaskedSegRange (ds, ds->x1, ds->x2);
- // draw the psprites on top of everything
- // but does not draw on side views
+
+
if (!viewangleoffset)
R_DrawPlayerSprites ();
}
diff --git a/src/r_things.h b/src/r_things.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Rendering of moving objects, sprites.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __R_THINGS__
@@ -34,12 +34,12 @@ extern vissprite_t vissprites[MAXVISSPRITES];
extern vissprite_t* vissprite_p;
extern vissprite_t vsprsortedhead;
-// Constant arrays used for psprite clipping
-// and initializing clipping.
+
+
extern short negonearray[SCREENWIDTH];
extern short screenheightarray[SCREENWIDTH];
-// vars for R_DrawMaskedColumn
+
extern short* mfloorclip;
extern short* mceilingclip;
extern fixed_t spryscale;
@@ -69,8 +69,8 @@ R_ClipVisSprite
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/s_sound.c b/src/s_sound.c
@@ -1,24 +1,24 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION: none
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
@@ -44,26 +44,26 @@ rcsid[] = "$Id: s_sound.c,v 1.6 1997/02/03 22:45:12 b1 Exp $";
#include "doomstat.h"
-// Purpose?
+
const char snd_prefixen[]
= { 'P', 'P', 'A', 'S', 'S', 'S', 'M', 'M', 'M', 'S', 'S', 'S' };
#define S_MAX_VOLUME 127
-// when to clip out sounds
-// Does not fit the large outdoor areas.
+
+
#define S_CLIPPING_DIST (1200*0x10000)
-// Distance tp origin when sounds should be maxed out.
-// This should relate to movement clipping resolution
-// (see BLOCKMAP handling).
-// Originally: (200*0x10000).
+
+
+
+
#define S_CLOSE_DIST (160*0x10000)
#define S_ATTENUATOR ((S_CLIPPING_DIST-S_CLOSE_DIST)>>FRACBITS)
-// Adjustable by menu.
+
#define NORM_VOLUME snd_MaxVolume
#define NORM_PITCH 128
@@ -73,18 +73,18 @@ const char snd_prefixen[]
#define S_PITCH_PERTURB 1
#define S_STEREO_SWING (96*0x10000)
-// percent attenuation from front to back
+
#define S_IFRACVOL 30
#define NA 0
#define S_NUMCHANNELS 2
-// Current music/sfx card - index useless
-// w/o a reference LUT in a sound module.
+
+
extern int snd_MusicDevice;
extern int snd_SfxDevice;
-// Config file? Same disclaimer as above.
+
extern int snd_DesiredMusicDevice;
extern int snd_DesiredSfxDevice;
@@ -92,49 +92,49 @@ extern int snd_DesiredSfxDevice;
typedef struct
{
- // sound information (if null, channel avail.)
+
sfxinfo_t* sfxinfo;
- // origin of sound
+
void* origin;
- // handle of the sound being played
+
int handle;
} channel_t;
-// the set of channels available
+
static channel_t* channels;
-// These are not used, but should be (menu).
-// Maximum volume of a sound effect.
-// Internal default is max out of 0-15.
+
+
+
int snd_SfxVolume = 15;
-// Maximum volume of music. Useless so far.
+
int snd_MusicVolume = 15;
-// whether songs are mus_paused
+
static boolean mus_paused;
-// music currently being played
+
static musicinfo_t* mus_playing=0;
-// following is set
-// by the defaults code in M_misc:
-// number of channels available
+
+
+
int numChannels;
static int nextcleanup;
-//
-// Internals.
-//
+
+
+
int
S_getChannel
( void* origin,
@@ -153,11 +153,11 @@ void S_StopChannel(int cnum);
-//
-// Initializes sound stuff, including volume
-// Sets channels, SFX and music volume,
-// allocates channel buffer, sets S_sfx lookup.
-//
+
+
+
+
+
void S_Init
( int sfxVolume,
int musicVolume )
@@ -166,27 +166,27 @@ void S_Init
fprintf( stderr, "S_Init: default sfx volume %d\n", sfxVolume);
- // Whatever these did with DMX, these are rather dummies now.
+
I_SetChannels();
S_SetSfxVolume(sfxVolume);
- // No music with Linux - another dummy.
+
S_SetMusicVolume(musicVolume);
- // Allocating the internal channels for mixing
- // (the maximum numer of sounds rendered
- // simultaneously) within zone memory.
+
+
+
channels =
(channel_t *) Z_Malloc(numChannels*sizeof(channel_t), PU_STATIC, 0);
- // Free all channels for use
+
for (i=0 ; i<numChannels ; i++)
channels[i].sfxinfo = 0;
- // no sounds are playing, and they are not mus_paused
+
mus_paused = 0;
- // Note that sounds have not been cached (yet).
+
for (i=1 ; i<NUMSFX ; i++)
S_sfx[i].lumpnum = S_sfx[i].usefulness = -1;
}
@@ -194,23 +194,23 @@ void S_Init
-//
-// Per level startup code.
-// Kills playing sounds at start of level,
-// determines music if any, changes music.
-//
+
+
+
+
+
void S_Start(void)
{
int cnum;
int mnum;
- // kill all playing sounds at start of level
- // (trust me - a good idea)
+
+
for (cnum=0 ; cnum<numChannels ; cnum++)
if (channels[cnum].sfxinfo)
S_StopChannel(cnum);
- // start new music for the level
+
mus_paused = 0;
if (gamemode == commercial)
@@ -219,17 +219,17 @@ void S_Start(void)
{
int spmus[]=
{
- // Song - Who? - Where?
- mus_e3m4, // American e4m1
- mus_e3m2, // Romero e4m2
- mus_e3m3, // Shawn e4m3
- mus_e1m5, // American e4m4
- mus_e2m7, // Tim e4m5
- mus_e2m4, // Romero e4m6
- mus_e2m6, // J.Anderson e4m7 CHIRON.WAD
- mus_e2m5, // Shawn e4m8
- mus_e1m9 // Tim e4m9
+
+ mus_e3m4,
+ mus_e3m2,
+ mus_e3m3,
+ mus_e1m5,
+ mus_e2m7,
+ mus_e2m4,
+ mus_e2m6,
+ mus_e2m5,
+ mus_e1m9
};
if (gameepisode < 4)
@@ -238,9 +238,9 @@ void S_Start(void)
mnum = spmus[gamemap-1];
}
- // HACK FOR COMMERCIAL
- // if (commercial && mnum > mus_e3m9)
- // mnum -= mus_e3m9;
+
+
+
S_ChangeMusic(mnum, true);
@@ -268,18 +268,18 @@ S_StartSoundAtVolume
mobj_t* origin = (mobj_t *) origin_p;
- // Debug.
+
/*fprintf( stderr,
"S_StartSoundAtVolume: playing sound %d (%s)\n",
sfx_id, S_sfx[sfx_id].name );*/
- // check for bogus sound #
+
if (sfx_id < 1 || sfx_id > NUMSFX)
I_Error("Bad sfx #: %d", sfx_id);
sfx = &S_sfx[sfx_id];
- // Initialize sound parameters
+
if (sfx->link)
{
pitch = sfx->pitch;
@@ -299,8 +299,8 @@ S_StartSoundAtVolume
}
- // Check to see if it is audible,
- // and if not, modify the params
+
+
if (origin && origin != players[consoleplayer].mo)
{
rc = S_AdjustSoundParams(players[consoleplayer].mo,
@@ -323,7 +323,7 @@ S_StartSoundAtVolume
sep = NORM_SEP;
}
- // hacks to vary the sfx pitches
+
if (sfx_id >= sfx_sawup
&& sfx_id <= sfx_sawhit)
{
@@ -345,47 +345,47 @@ S_StartSoundAtVolume
pitch = 255;
}
- // kill old sound
+
S_StopSound(origin);
- // try to find a channel
+
cnum = S_getChannel(origin, sfx);
if (cnum<0)
return;
- //
- // This is supposed to handle the loading/caching.
- // For some odd reason, the caching is done nearly
- // each time the sound is needed?
- //
- // get lumpnum if necessary
+
+
+
+
+
+
if (sfx->lumpnum < 0)
sfx->lumpnum = I_GetSfxLumpNum(sfx);
#ifndef SNDSRV
- // cache data if necessary
+
if (!sfx->data)
{
fprintf( stderr,
"S_StartSoundAtVolume: 16bit and not pre-cached - wtf?\n");
- // DOS remains, 8bit handling
- //sfx->data = (void *) W_CacheLumpNum(sfx->lumpnum, PU_MUSIC);
- // fprintf( stderr,
- // "S_StartSoundAtVolume: loading %d (lump %d) : 0x%x\n",
- // sfx_id, sfx->lumpnum, (int)sfx->data );
+
+
+
+
+
}
#endif
- // increase the usefulness
+
if (sfx->usefulness++ < 0)
sfx->usefulness = 1;
- // Assigns the handle to one of the channels in the
- // mix/output buffer.
+
+
channels[cnum].handle = I_StartSound(sfx_id,
/*sfx->data,*/
volume,
@@ -400,14 +400,14 @@ S_StartSound
int sfx_id )
{
#ifdef SAWDEBUG
- // if (sfx_id == sfx_sawful)
- // sfx_id = sfx_itemup;
+
+
#endif
S_StartSoundAtVolume(origin, sfx_id, snd_SfxVolume);
- // UNUSED. We had problems, had we not?
+
#ifdef SAWDEBUG
{
int i;
@@ -491,9 +491,9 @@ void S_StopSound(void *origin)
-//
-// Stop and resume music, during game PAUSE.
-//
+
+
+
void S_PauseSound(void)
{
if (mus_playing && !mus_paused)
@@ -513,9 +513,9 @@ void S_ResumeSound(void)
}
-//
-// Updates music & sounds
-//
+
+
+
void S_UpdateSounds(void* listener_p)
{
int audible;
@@ -530,9 +530,9 @@ void S_UpdateSounds(void* listener_p)
- // Clean up unused data.
- // This is currently not done for 16bit (sounds cached static).
- // DOS 8bit remains.
+
+
+
/*if (gametic > nextcleanup)
{
for (i=1 ; i<NUMSFX ; i++)
@@ -559,7 +559,7 @@ void S_UpdateSounds(void* listener_p)
{
if (I_SoundIsPlaying(c->handle))
{
- // initialize parameters
+
volume = snd_SfxVolume;
pitch = NORM_PITCH;
sep = NORM_SEP;
@@ -579,8 +579,8 @@ void S_UpdateSounds(void* listener_p)
}
}
- // check non-local sounds for distance clipping
- // or modify their params
+
+
if (c->origin && listener_p != c->origin)
{
audible = S_AdjustSoundParams(listener,
@@ -599,17 +599,17 @@ void S_UpdateSounds(void* listener_p)
}
else
{
- // if channel is allocated but sound has stopped,
- // free it
+
+
S_StopChannel(cnum);
}
}
}
- // kill music if it is a single-play && finished
- // if ( mus_playing
- // && !I_QrySongPlaying(mus_playing->handle)
- // && !mus_paused )
- // S_StopMusic();
+
+
+
+
+
}
@@ -638,9 +638,9 @@ void S_SetSfxVolume(int volume)
}
-//
-// Starts some music with the music id found in sounds.h.
-//
+
+
+
void S_StartMusic(int m_id)
{
S_ChangeMusic(m_id, false);
@@ -665,21 +665,21 @@ S_ChangeMusic
if (mus_playing == music)
return;
- // shutdown old music
+
S_StopMusic();
- // get lumpnum if neccessary
+
if (!music->lumpnum)
{
sprintf(namebuf, "d_%s", music->name);
music->lumpnum = W_GetNumForName(namebuf);
}
- // load & register it
+
music->data = (void *) W_CacheLumpNum(music->lumpnum, PU_MUSIC);
music->handle = I_RegisterSong(music->data);
- // play it
+
I_PlaySong(music->handle, looping);
mus_playing = music;
@@ -713,7 +713,7 @@ void S_StopChannel(int cnum)
if (c->sfxinfo)
{
- // stop the sound playing
+
if (I_SoundIsPlaying(c->handle))
{
#ifdef SAWDEBUG
@@ -723,8 +723,8 @@ void S_StopChannel(int cnum)
I_StopSound(c->handle);
}
- // check to see
- // if other channels are playing the sound
+
+
for (i=0 ; i<numChannels ; i++)
{
if (cnum != i
@@ -734,7 +734,7 @@ void S_StopChannel(int cnum)
}
}
- // degrade usefulness of sound data
+
c->sfxinfo->usefulness--;
c->sfxinfo = 0;
@@ -743,12 +743,12 @@ void S_StopChannel(int cnum)
-//
-// Changes volume, stereo-separation, and pitch variables
-// from the norm of a sound effect to be played.
-// If the sound is not audible, returns a 0.
-// Otherwise, modifies parameters and returns 1.
-//
+
+
+
+
+
+
int
S_AdjustSoundParams
( mobj_t* listener,
@@ -762,12 +762,12 @@ S_AdjustSoundParams
fixed_t ady;
angle_t angle;
- // calculate the distance to sound origin
- // and clip it if necessary
+
+
adx = abs(listener->x - source->x);
ady = abs(listener->y - source->y);
- // From _GG1_ p.428. Appox. eucledian distance fast.
+
approx_dist = adx + ady - ((adx < ady ? adx : ady)>>1);
if (gamemap != 8
@@ -776,7 +776,7 @@ S_AdjustSoundParams
return 0;
}
- // angle of source to listener
+
angle = R_PointToAngle2(listener->x,
listener->y,
source->x,
@@ -789,10 +789,10 @@ S_AdjustSoundParams
angle >>= ANGLETOFINESHIFT;
- // stereo separation
+
*sep = 128 - (FixedMul(S_STEREO_SWING,finesine[angle])>>FRACBITS);
- // volume calculation
+
if (approx_dist < S_CLOSE_DIST)
{
*vol = snd_SfxVolume;
@@ -808,7 +808,7 @@ S_AdjustSoundParams
}
else
{
- // distance effect
+
*vol = (snd_SfxVolume
* ((S_CLIPPING_DIST - approx_dist)>>FRACBITS))
/ S_ATTENUATOR;
@@ -820,21 +820,21 @@ S_AdjustSoundParams
-//
-// S_getChannel :
-// If none available, return -1. Otherwise channel #.
-//
+
+
+
+
int
S_getChannel
( void* origin,
sfxinfo_t* sfxinfo )
{
- // channel number to use
+
int cnum;
channel_t* c;
- // Find an open channel
+
for (cnum=0 ; cnum<numChannels ; cnum++)
{
if (!channels[cnum].sfxinfo)
@@ -846,28 +846,28 @@ S_getChannel
}
}
- // None available
+
if (cnum == numChannels)
{
- // Look for lower priority
+
for (cnum=0 ; cnum<numChannels ; cnum++)
if (channels[cnum].sfxinfo->priority >= sfxinfo->priority) break;
if (cnum == numChannels)
{
- // FUCK! No lower priority. Sorry, Charlie.
+
return -1;
}
else
{
- // Otherwise, kick out lower priority.
+
S_StopChannel(cnum);
}
}
c = &channels[cnum];
- // channel is decided to be cnum.
+
c->sfxinfo = sfxinfo;
c->origin = origin;
diff --git a/src/s_sound.h b/src/s_sound.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// The not so system specific sound interface.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __S_SOUND__
@@ -30,11 +30,11 @@
-//
-// Initializes sound stuff, including volume
-// Sets channels, SFX and music volume,
-// allocates channel buffer, sets S_sfx lookup.
-//
+
+
+
+
+
void
S_Init
( int sfxVolume,
@@ -43,18 +43,18 @@ S_Init
-//
-// Per level startup code.
-// Kills playing sounds at start of level,
-// determines music if any, changes music.
-//
+
+
+
+
+
void S_Start(void);
-//
-// Start sound for thing at <origin>
-// using <sound_id> from sounds.h
-//
+
+
+
+
void
S_StartSound
( void* origin,
@@ -62,7 +62,7 @@ S_StartSound
-// Will start a sound at a given volume.
+
void
S_StartSoundAtVolume
( void* origin,
@@ -70,31 +70,31 @@ S_StartSoundAtVolume
int volume );
-// Stop sound for thing at <origin>
+
void S_StopSound(void* origin);
-// Start music using <music_id> from sounds.h
+
void S_StartMusic(int music_id);
-// Start music using <music_id> from sounds.h,
-// and set whether looping
+
+
void
S_ChangeMusic
( int music_id,
int looping );
-// Stops the music fer sure.
+
void S_StopMusic(void);
-// Stop and resume music, during game PAUSE.
+
void S_PauseSound(void);
void S_ResumeSound(void);
-//
-// Updates music & sounds
-//
+
+
+
void S_UpdateSounds(void* listener);
void S_SetMusicVolume(int volume);
@@ -102,8 +102,8 @@ void S_SetSfxVolume(int volume);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/sounds.c b/src/sounds.c
@@ -1,26 +1,26 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Created by a sound utility.
-// Kept as a sample, DOOM2 sounds.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
@@ -30,9 +30,9 @@ rcsid[] = "$Id: sounds.c,v 1.3 1997/01/29 22:40:44 b1 Exp $";
#include "doomtype.h"
#include "sounds.h"
-//
-// Information about all the music
-//
+
+
+
musicinfo_t S_music[] =
{
@@ -107,13 +107,13 @@ musicinfo_t S_music[] =
};
-//
-// Information about all the sfx
-//
+
+
+
sfxinfo_t S_sfx[] =
{
- // S_sfx[0] needs to be a dummy for odd reasons.
+
{ "none", false, 0, 0, -1, -1, 0 },
{ "pistol", false, 64, 0, -1, -1, 0 },
diff --git a/src/sounds.h b/src/sounds.h
@@ -1,84 +1,84 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Created by the sound utility written by Dave Taylor.
-// Kept as a sample, DOOM2 sounds. Frozen.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __SOUNDS__
#define __SOUNDS__
-//
-// SoundFX struct.
-//
+
+
+
typedef struct sfxinfo_struct sfxinfo_t;
struct sfxinfo_struct
{
- // up to 6-character name
+
char* name;
- // Sfx singularity (only one at a time)
+
int singularity;
- // Sfx priority
+
int priority;
- // referenced sound if a link
+
sfxinfo_t* link;
- // pitch if a link
+
int pitch;
- // volume if a link
+
int volume;
- // sound data
+
void* data;
- // this is checked every second to see if sound
- // can be thrown out (if 0, then decrement, if -1,
- // then throw out, if > 0, then it is in use)
+
+
+
int usefulness;
- // lump number of sfx
+
int lumpnum;
};
-//
-// MusicInfo struct.
-//
+
+
+
typedef struct
{
- // up to 6-character name
+
char* name;
- // lump number of music
+
int lumpnum;
- // music data
+
void* data;
- // music handle once registered
+
int handle;
} musicinfo_t;
@@ -86,15 +86,15 @@ typedef struct
-// the complete set of sound effects
+
extern sfxinfo_t S_sfx[];
-// the complete set of music
+
extern musicinfo_t S_music[];
-//
-// Identifiers for all music in game.
-//
+
+
+
typedef enum
{
@@ -170,9 +170,9 @@ typedef enum
} musicenum_t;
-//
-// Identifiers for all sfx in game.
-//
+
+
+
typedef enum
{
@@ -289,9 +289,9 @@ typedef enum
} sfxenum_t;
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/st_lib.c b/src/st_lib.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// The status bar widget code.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
@@ -43,16 +43,16 @@ rcsid[] = "$Id: st_lib.c,v 1.4 1997/02/03 16:47:56 b1 Exp $";
#include "r_local.h"
-// in AM_map.c
+
extern boolean automapactive;
-//
-// Hack display negative frags.
-// Loads and store the stminus lump.
-//
+
+
+
+
patch_t* sttminus;
void STlib_init(void)
@@ -61,7 +61,7 @@ void STlib_init(void)
}
-// ?
+
void
STlib_initNum
( st_number_t* n,
@@ -82,11 +82,11 @@ STlib_initNum
}
-//
-// A fairly efficient way to draw a number
-// based on differences from the old number.
-// Note: worth the trouble?
-//
+
+
+
+
+
void
STlib_drawNum
( st_number_t* n,
@@ -116,7 +116,7 @@ STlib_drawNum
num = -num;
}
- // clear the area
+
x = n->x - numdigits*w;
if (n->y - ST_Y < 0)
@@ -124,17 +124,17 @@ STlib_drawNum
V_CopyRect(x, n->y - ST_Y, BG, w*numdigits, h, x, n->y, FG);
- // if non-number, do not draw it
+
if (num == 1994)
return;
x = n->x;
- // in the special case of 0, you draw 0
+
if (!num)
V_DrawPatch(x - w, n->y, FG, n->p[ 0 ]);
- // draw the new number
+
while (num && numdigits--)
{
x -= w;
@@ -142,13 +142,13 @@ STlib_drawNum
num /= 10;
}
- // draw a minus sign if necessary
+
if (neg)
V_DrawPatch(x - 8, n->y, FG, sttminus);
}
-//
+
void
STlib_updateNum
( st_number_t* n,
@@ -158,7 +158,7 @@ STlib_updateNum
}
-//
+
void
STlib_initPercent
( st_percent_t* p,
diff --git a/src/st_lib.h b/src/st_lib.h
@@ -1,111 +1,111 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// The status bar widget code.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __STLIB__
#define __STLIB__
-// We are referring to patches.
+
#include "r_defs.h"
-//
-// Background and foreground screen numbers
-//
+
+
+
#define BG 4
#define FG 0
-//
-// Typedefs of widgets
-//
-// Number widget
+
+
+
+
typedef struct
{
- // upper right-hand corner
- // of the number (right-justified)
+
+
int x;
int y;
- // max # of digits in number
+
int width;
- // last number value
+
int oldnum;
- // pointer to current value
+
int* num;
- // pointer to boolean stating
- // whether to update number
+
+
boolean* on;
- // list of patches for 0-9
+
patch_t** p;
- // user data
+
int data;
} st_number_t;
-// Percent widget ("child" of number widget,
-// or, more precisely, contains a number widget.)
+
+
typedef struct
{
- // number information
+
st_number_t n;
- // percent sign graphic
+
patch_t* p;
} st_percent_t;
-// Multiple Icon widget
+
typedef struct
{
- // center-justified location of icons
+
int x;
int y;
- // last icon number
+
int oldinum;
- // pointer to current icon
+
int* inum;
- // pointer to boolean stating
- // whether to update icon
+
+
boolean* on;
- // list of icons
+
patch_t** p;
- // user data
+
int data;
} st_multicon_t;
@@ -113,45 +113,45 @@ typedef struct
-// Binary Icon widget
+
typedef struct
{
- // center-justified location of icon
+
int x;
int y;
- // last icon value
+
int oldval;
- // pointer to current icon status
+
boolean* val;
- // pointer to boolean
- // stating whether to update icon
+
+
boolean* on;
- patch_t* p; // icon
- int data; // user data
+ patch_t* p;
+ int data;
} st_binicon_t;
-//
-// Widget creation, access, and update routines
-//
-// Initializes widget library.
-// More precisely, initialize STMINUS,
-// everything else is done somewhere else.
-//
+
+
+
+
+
+
+
void STlib_init(void);
-// Number widget routines
+
void
STlib_initNum
( st_number_t* n,
@@ -168,7 +168,7 @@ STlib_updateNum
boolean refresh );
-// Percent widget routines
+
void
STlib_initPercent
( st_percent_t* p,
@@ -186,7 +186,7 @@ STlib_updatePercent
int refresh );
-// Multiple Icon widget routines
+
void
STlib_initMultIcon
( st_multicon_t* mi,
@@ -202,7 +202,7 @@ STlib_updateMultIcon
( st_multicon_t* mi,
boolean refresh );
-// Binary Icon widget routines
+
void
STlib_initBinIcon
@@ -219,8 +219,8 @@ STlib_updateBinIcon
boolean refresh );
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/st_stuff.c b/src/st_stuff.c
@@ -1,27 +1,27 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Status bar code.
-// Does the face/direction indicator animatin.
-// Does palette indicators as well (red pain/berserk, bright pickup)
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: st_stuff.c,v 1.6 1997/02/03 22:45:13 b1 Exp $";
@@ -51,49 +51,49 @@ rcsid[] = "$Id: st_stuff.c,v 1.6 1997/02/03 22:45:13 b1 Exp $";
#include "s_sound.h"
-// Needs access to LFB.
+
#include "v_video.h"
-// State.
+
#include "doomstat.h"
-// Data.
+
#include "dstrings.h"
#include "sounds.h"
-//
-// STATUS BAR DATA
-//
-// Palette indices.
-// For damage/bonus red-/gold-shifts
+
+
+
+
+
#define STARTREDPALS 1
#define STARTBONUSPALS 9
#define NUMREDPALS 8
#define NUMBONUSPALS 4
-// Radiation suit, green shift.
+
#define RADIATIONPAL 13
-// N/256*100% probability
-// that the normal face state will change
+
+
#define ST_FACEPROBABILITY 96
-// For Responder
+
#define ST_TOGGLECHAT KEY_ENTER
-// Location of status bar
+
#define ST_X 0
#define ST_X2 104
#define ST_FX 143
#define ST_FY 169
-// Should be set to patch width
-// for tall numbers later on
+
+
#define ST_TALLNUMWIDTH (tallnum[0]->width)
-// Number of status faces.
+
#define ST_NUMPAINFACES 5
#define ST_NUMSTRAIGHTFACES 3
#define ST_NUMTURNFACES 2
@@ -126,25 +126,25 @@ rcsid[] = "$Id: st_stuff.c,v 1.6 1997/02/03 22:45:13 b1 Exp $";
#define ST_MUCHPAIN 20
-// Location and size of statistics,
-// justified according to widget type.
-// Problem is, within which space? STbar? Screen?
-// Note: this could be read in by a lump.
-// Problem is, is the stuff rendered
-// into a buffer,
-// or into the frame buffer?
-// AMMO number pos.
+
+
+
+
+
+
+
+
#define ST_AMMOWIDTH 3
#define ST_AMMOX 44
#define ST_AMMOY 171
-// HEALTH number pos.
+
#define ST_HEALTHWIDTH 3
#define ST_HEALTHX 90
#define ST_HEALTHY 171
-// Weapon pos.
+
#define ST_ARMSX 111
#define ST_ARMSY 172
#define ST_ARMSBGX 104
@@ -152,17 +152,17 @@ rcsid[] = "$Id: st_stuff.c,v 1.6 1997/02/03 22:45:13 b1 Exp $";
#define ST_ARMSXSPACE 12
#define ST_ARMSYSPACE 10
-// Frags pos.
+
#define ST_FRAGSX 138
#define ST_FRAGSY 171
#define ST_FRAGSWIDTH 2
-// ARMOR number pos.
+
#define ST_ARMORWIDTH 3
#define ST_ARMORX 221
#define ST_ARMORY 171
-// Key icon positions.
+
#define ST_KEY0WIDTH 8
#define ST_KEY0HEIGHT 5
#define ST_KEY0X 239
@@ -174,7 +174,7 @@ rcsid[] = "$Id: st_stuff.c,v 1.6 1997/02/03 22:45:13 b1 Exp $";
#define ST_KEY2X 239
#define ST_KEY2Y 191
-// Ammunition counter.
+
#define ST_AMMO0WIDTH 3
#define ST_AMMO0HEIGHT 6
#define ST_AMMO0X 288
@@ -189,8 +189,8 @@ rcsid[] = "$Id: st_stuff.c,v 1.6 1997/02/03 22:45:13 b1 Exp $";
#define ST_AMMO3X 288
#define ST_AMMO3Y 185
-// Indicate maximum ammunition.
-// Only needed because backpack exists.
+
+
#define ST_MAXAMMO0WIDTH 3
#define ST_MAXAMMO0HEIGHT 5
#define ST_MAXAMMO0X 314
@@ -205,55 +205,55 @@ rcsid[] = "$Id: st_stuff.c,v 1.6 1997/02/03 22:45:13 b1 Exp $";
#define ST_MAXAMMO3X 314
#define ST_MAXAMMO3Y 185
-// pistol
+
#define ST_WEAPON0X 110
#define ST_WEAPON0Y 172
-// shotgun
+
#define ST_WEAPON1X 122
#define ST_WEAPON1Y 172
-// chain gun
+
#define ST_WEAPON2X 134
#define ST_WEAPON2Y 172
-// missile launcher
+
#define ST_WEAPON3X 110
#define ST_WEAPON3Y 181
-// plasma gun
+
#define ST_WEAPON4X 122
#define ST_WEAPON4Y 181
- // bfg
+
#define ST_WEAPON5X 134
#define ST_WEAPON5Y 181
-// WPNS title
+
#define ST_WPNSX 109
#define ST_WPNSY 191
- // DETH title
+
#define ST_DETHX 109
#define ST_DETHY 191
-//Incoming messages window location
-//UNUSED
-// #define ST_MSGTEXTX (viewwindowx)
-// #define ST_MSGTEXTY (viewwindowy+viewheight-18)
+
+
+
+
#define ST_MSGTEXTX 0
#define ST_MSGTEXTY 0
-// Dimensions given in characters.
+
#define ST_MSGWIDTH 52
-// Or shall I say, in lines?
+
#define ST_MSGHEIGHT 1
#define ST_OUTTEXTX 0
#define ST_OUTTEXTY 6
-// Width, in characters again.
+
#define ST_OUTWIDTH 52
- // Height, in lines.
+
#define ST_OUTHEIGHT 1
#define ST_MAPWIDTH \
@@ -266,137 +266,137 @@ rcsid[] = "$Id: st_stuff.c,v 1.6 1997/02/03 22:45:13 b1 Exp $";
#define ST_MAPHEIGHT 1
-// main player in game
+
static player_t* plyr;
-// ST_Start() has just been called
+
static boolean st_firsttime;
-// used to execute ST_Init() only once
+
static int veryfirsttime = 1;
-// lump number for PLAYPAL
+
static int lu_palette;
-// used for timing
+
static unsigned int st_clock;
-// used for making messages go away
+
static int st_msgcounter=0;
-// used when in chat
+
static st_chatstateenum_t st_chatstate;
-// whether in automap or first-person
+
static st_stateenum_t st_gamestate;
-// whether left-side main status bar is active
+
static boolean st_statusbaron;
-// whether status bar chat is active
+
static boolean st_chat;
-// value of st_chat before message popped up
+
static boolean st_oldchat;
-// whether chat window has the cursor on
+
static boolean st_cursoron;
-// !deathmatch
+
static boolean st_notdeathmatch;
-// !deathmatch && st_statusbaron
+
static boolean st_armson;
-// !deathmatch
+
static boolean st_fragson;
-// main bar left
+
static patch_t* sbar;
-// 0-9, tall numbers
+
static patch_t* tallnum[10];
-// tall % sign
+
static patch_t* tallpercent;
-// 0-9, short, yellow (,different!) numbers
+
static patch_t* shortnum[10];
-// 3 key-cards, 3 skulls
+
static patch_t* keys[NUMCARDS];
-// face status patches
+
static patch_t* faces[ST_NUMFACES];
-// face background
+
static patch_t* faceback;
- // main bar right
+
static patch_t* armsbg;
-// weapon ownership patches
+
static patch_t* arms[6][2];
-// ready-weapon widget
+
static st_number_t w_ready;
- // in deathmatch only, summary of frags stats
+
static st_number_t w_frags;
-// health widget
+
static st_percent_t w_health;
-// arms background
+
static st_binicon_t w_armsbg;
-// weapon ownership widgets
+
static st_multicon_t w_arms[6];
-// face status widget
+
static st_multicon_t w_faces;
-// keycard widgets
+
static st_multicon_t w_keyboxes[3];
-// armor widget
+
static st_percent_t w_armor;
-// ammo widgets
+
static st_number_t w_ammo[4];
-// max ammo widgets
+
static st_number_t w_maxammo[4];
- // number of frags so far in deathmatch
+
static int st_fragscount;
-// used to use appopriately pained face
+
static int st_oldhealth = -1;
-// used for evil grin
+
static boolean oldweaponsowned[NUMWEAPONS];
- // count until face changes
+
static int st_facecount = 0;
-// current face index, used by w_faces
+
static int st_faceindex = 0;
-// holds key-type for each key box on bar
+
static int keyboxes[3];
-// a random number per tick
+
static int st_randomnumber;
-// Massive bunches of cheat shit
-// to keep it from being easy to figure them out.
-// Yeah, right...
+
+
+
unsigned char cheat_mus_seq[] =
{
0xb2, 0x26, 0xb6, 0xae, 0xea, 1, 0, 0, 0xff
@@ -404,66 +404,66 @@ unsigned char cheat_mus_seq[] =
unsigned char cheat_choppers_seq[] =
{
- 0xb2, 0x26, 0xe2, 0x32, 0xf6, 0x2a, 0x2a, 0xa6, 0x6a, 0xea, 0xff // id...
+ 0xb2, 0x26, 0xe2, 0x32, 0xf6, 0x2a, 0x2a, 0xa6, 0x6a, 0xea, 0xff
};
unsigned char cheat_god_seq[] =
{
- 0xb2, 0x26, 0x26, 0xaa, 0x26, 0xff // iddqd
+ 0xb2, 0x26, 0x26, 0xaa, 0x26, 0xff
};
unsigned char cheat_ammo_seq[] =
{
- 0xb2, 0x26, 0xf2, 0x66, 0xa2, 0xff // idkfa
+ 0xb2, 0x26, 0xf2, 0x66, 0xa2, 0xff
};
unsigned char cheat_ammonokey_seq[] =
{
- 0xb2, 0x26, 0x66, 0xa2, 0xff // idfa
+ 0xb2, 0x26, 0x66, 0xa2, 0xff
};
-// Smashing Pumpkins Into Samml Piles Of Putried Debris.
+
unsigned char cheat_noclip_seq[] =
{
- 0xb2, 0x26, 0xea, 0x2a, 0xb2, // idspispopd
+ 0xb2, 0x26, 0xea, 0x2a, 0xb2,
0xea, 0x2a, 0xf6, 0x2a, 0x26, 0xff
};
-//
+
unsigned char cheat_commercial_noclip_seq[] =
{
- 0xb2, 0x26, 0xe2, 0x36, 0xb2, 0x2a, 0xff // idclip
+ 0xb2, 0x26, 0xe2, 0x36, 0xb2, 0x2a, 0xff
};
unsigned char cheat_powerup_seq[7][10] =
{
- { 0xb2, 0x26, 0x62, 0xa6, 0x32, 0xf6, 0x36, 0x26, 0x6e, 0xff }, // beholdv
- { 0xb2, 0x26, 0x62, 0xa6, 0x32, 0xf6, 0x36, 0x26, 0xea, 0xff }, // beholds
- { 0xb2, 0x26, 0x62, 0xa6, 0x32, 0xf6, 0x36, 0x26, 0xb2, 0xff }, // beholdi
- { 0xb2, 0x26, 0x62, 0xa6, 0x32, 0xf6, 0x36, 0x26, 0x6a, 0xff }, // beholdr
- { 0xb2, 0x26, 0x62, 0xa6, 0x32, 0xf6, 0x36, 0x26, 0xa2, 0xff }, // beholda
- { 0xb2, 0x26, 0x62, 0xa6, 0x32, 0xf6, 0x36, 0x26, 0x36, 0xff }, // beholdl
- { 0xb2, 0x26, 0x62, 0xa6, 0x32, 0xf6, 0x36, 0x26, 0xff } // behold
+ { 0xb2, 0x26, 0x62, 0xa6, 0x32, 0xf6, 0x36, 0x26, 0x6e, 0xff },
+ { 0xb2, 0x26, 0x62, 0xa6, 0x32, 0xf6, 0x36, 0x26, 0xea, 0xff },
+ { 0xb2, 0x26, 0x62, 0xa6, 0x32, 0xf6, 0x36, 0x26, 0xb2, 0xff },
+ { 0xb2, 0x26, 0x62, 0xa6, 0x32, 0xf6, 0x36, 0x26, 0x6a, 0xff },
+ { 0xb2, 0x26, 0x62, 0xa6, 0x32, 0xf6, 0x36, 0x26, 0xa2, 0xff },
+ { 0xb2, 0x26, 0x62, 0xa6, 0x32, 0xf6, 0x36, 0x26, 0x36, 0xff },
+ { 0xb2, 0x26, 0x62, 0xa6, 0x32, 0xf6, 0x36, 0x26, 0xff }
};
unsigned char cheat_clev_seq[] =
{
- 0xb2, 0x26, 0xe2, 0x36, 0xa6, 0x6e, 1, 0, 0, 0xff // idclev
+ 0xb2, 0x26, 0xe2, 0x36, 0xa6, 0x6e, 1, 0, 0, 0xff
};
-// my position cheat
+
unsigned char cheat_mypos_seq[] =
{
- 0xb2, 0x26, 0xb6, 0xba, 0x2a, 0xf6, 0xea, 0xff // idmypos
+ 0xb2, 0x26, 0xb6, 0xba, 0x2a, 0xf6, 0xea, 0xff
};
-// Now what?
+
cheatseq_t cheat_mus = { cheat_mus_seq, 0 };
cheatseq_t cheat_god = { cheat_god_seq, 0 };
cheatseq_t cheat_ammo = { cheat_ammo_seq, 0 };
@@ -487,13 +487,13 @@ cheatseq_t cheat_clev = { cheat_clev_seq, 0 };
cheatseq_t cheat_mypos = { cheat_mypos_seq, 0 };
-//
+
extern char* mapnames[];
-//
-// STATUS BAR CODE
-//
+
+
+
void ST_Stop(void);
void ST_refreshBackground(void)
@@ -512,14 +512,14 @@ void ST_refreshBackground(void)
}
-// Respond to keyboard input events,
-// intercept cheats.
+
+
boolean
ST_Responder (event_t* ev)
{
int i;
- // Filter automap on/off.
+
if (ev->type == ev_keyup
&& ((ev->data1 & 0xffff0000) == AM_MSGHEADER))
{
@@ -531,21 +531,21 @@ ST_Responder (event_t* ev)
break;
case AM_MSGEXITED:
- // fprintf(stderr, "AM exited\n");
+
st_gamestate = FirstPersonState;
break;
}
}
- // if a user keypress...
+
else if (ev->type == ev_keydown)
{
if (!netgame)
{
- // b. - enabled for more debug fun.
- // if (gameskill != sk_nightmare) {
- // 'dqd' cheat for toggleable god mode
+
+
+
if (cht_CheckCheat(&cheat_god, ev->data1))
{
plyr->cheats ^= CF_GODMODE;
@@ -560,7 +560,7 @@ ST_Responder (event_t* ev)
else
plyr->message = STSTR_DQDOFF;
}
- // 'fa' cheat for killer fucking arsenal
+
else if (cht_CheckCheat(&cheat_ammonokey, ev->data1))
{
plyr->armorpoints = 200;
@@ -574,7 +574,7 @@ ST_Responder (event_t* ev)
plyr->message = STSTR_FAADDED;
}
- // 'kfa' cheat for key full ammo
+
else if (cht_CheckCheat(&cheat_ammo, ev->data1))
{
plyr->armorpoints = 200;
@@ -591,7 +591,7 @@ ST_Responder (event_t* ev)
plyr->message = STSTR_KFAADDED;
}
- // 'mus' cheat for changing music
+
else if (cht_CheckCheat(&cheat_mus, ev->data1))
{
@@ -620,8 +620,8 @@ ST_Responder (event_t* ev)
S_ChangeMusic(musnum, 1);
}
}
- // Simplified, accepting both "noclip" and "idspispopd".
- // no clipping mode cheat
+
+
else if ( cht_CheckCheat(&cheat_noclip, ev->data1)
|| cht_CheckCheat(&cheat_commercial_noclip,ev->data1) )
{
@@ -632,7 +632,7 @@ ST_Responder (event_t* ev)
else
plyr->message = STSTR_NCOFF;
}
- // 'behold?' power-up cheats
+
for (i=0;i<6;i++)
{
if (cht_CheckCheat(&cheat_powerup[i], ev->data1))
@@ -648,19 +648,19 @@ ST_Responder (event_t* ev)
}
}
- // 'behold' power-up menu
+
if (cht_CheckCheat(&cheat_powerup[6], ev->data1))
{
plyr->message = STSTR_BEHOLD;
}
- // 'choppers' invulnerability & chainsaw
+
else if (cht_CheckCheat(&cheat_choppers, ev->data1))
{
plyr->weaponowned[wp_chainsaw] = true;
plyr->powers[pw_invulnerability] = true;
plyr->message = STSTR_CHOPPERS;
}
- // 'mypos' for player position
+
else if (cht_CheckCheat(&cheat_mypos, ev->data1))
{
static char buf[ST_MSGWIDTH];
@@ -672,7 +672,7 @@ ST_Responder (event_t* ev)
}
}
- // 'clev' change-level cheat
+
if (cht_CheckCheat(&cheat_clev, ev->data1))
{
char buf[3];
@@ -692,14 +692,14 @@ ST_Responder (event_t* ev)
map = buf[1] - '0';
}
- // Catch invalid maps.
+
if (epsd < 1)
return false;
if (map < 1)
return false;
- // Ohmygod - this is not going to work.
+
if ((gamemode == retail)
&& ((epsd > 4) || (map > 9)))
return false;
@@ -716,7 +716,7 @@ ST_Responder (event_t* ev)
&& (( epsd > 1) || (map > 34)))
return false;
- // So be it.
+
plyr->message = STSTR_CLEV;
G_DeferedInitNew(gameskill, epsd, map);
}
@@ -743,12 +743,12 @@ int ST_calcPainOffset(void)
}
-//
-// This is a not-very-pretty routine which handles
-// the face states and their timing.
-// the precedence of expressions is:
-// dead > evil grin > turned head > straight ahead
-//
+
+
+
+
+
+
void ST_updateFaceWidget(void)
{
int i;
@@ -760,7 +760,7 @@ void ST_updateFaceWidget(void)
if (priority < 10)
{
- // dead
+
if (!plyr->health)
{
priority = 9;
@@ -773,7 +773,7 @@ void ST_updateFaceWidget(void)
{
if (plyr->bonuscount)
{
- // picking up bonus
+
doevilgrin = false;
for (i=0;i<NUMWEAPONS;i++)
@@ -786,7 +786,7 @@ void ST_updateFaceWidget(void)
}
if (doevilgrin)
{
- // evil grin if just picked up weapon
+
priority = 8;
st_facecount = ST_EVILGRINCOUNT;
st_faceindex = ST_calcPainOffset() + ST_EVILGRINOFFSET;
@@ -801,7 +801,7 @@ void ST_updateFaceWidget(void)
&& plyr->attacker
&& plyr->attacker != plyr->mo)
{
- // being attacked
+
priority = 7;
if (plyr->health - st_oldhealth > ST_MUCHPAIN)
@@ -818,16 +818,16 @@ void ST_updateFaceWidget(void)
if (badguyangle > plyr->mo->angle)
{
- // whether right or left
+
diffang = badguyangle - plyr->mo->angle;
i = diffang > ANG180;
}
else
{
- // whether left or right
+
diffang = plyr->mo->angle - badguyangle;
i = diffang <= ANG180;
- } // confusing, aint it?
+ }
st_facecount = ST_TURNCOUNT;
@@ -835,17 +835,17 @@ void ST_updateFaceWidget(void)
if (diffang < ANG45)
{
- // head-on
+
st_faceindex += ST_RAMPAGEOFFSET;
}
else if (i)
{
- // turn face right
+
st_faceindex += ST_TURNOFFSET;
}
else
{
- // turn face left
+
st_faceindex += ST_TURNOFFSET+1;
}
}
@@ -854,7 +854,7 @@ void ST_updateFaceWidget(void)
if (priority < 7)
{
- // getting hurt because of your own damn stupidity
+
if (plyr->damagecount)
{
if (plyr->health - st_oldhealth > ST_MUCHPAIN)
@@ -876,7 +876,7 @@ void ST_updateFaceWidget(void)
if (priority < 6)
{
- // rapid firing
+
if (plyr->attackdown)
{
if (lastattackdown==-1)
@@ -896,7 +896,7 @@ void ST_updateFaceWidget(void)
if (priority < 5)
{
- // invulnerability
+
if ((plyr->cheats & CF_GODMODE)
|| plyr->powers[pw_invulnerability])
{
@@ -909,7 +909,7 @@ void ST_updateFaceWidget(void)
}
- // look left or look right if the facecount has timed out
+
if (!st_facecount)
{
st_faceindex = ST_calcPainOffset() + (st_randomnumber % 3);
@@ -923,33 +923,33 @@ void ST_updateFaceWidget(void)
void ST_updateWidgets(void)
{
- static int largeammo = 1994; // means "n/a"
+ static int largeammo = 1994;
int i;
- // must redirect the pointer if the ready weapon has changed.
- // if (w_ready.data != plyr->readyweapon)
- // {
+
+
+
if (weaponinfo[plyr->readyweapon].ammo == am_noammo)
w_ready.num = &largeammo;
else
w_ready.num = &plyr->ammo[weaponinfo[plyr->readyweapon].ammo];
- //{
- // static int tic=0;
- // static int dir=-1;
- // if (!(tic&15))
- // plyr->ammo[weaponinfo[plyr->readyweapon].ammo]+=dir;
- // if (plyr->ammo[weaponinfo[plyr->readyweapon].ammo] == -100)
- // dir = 1;
- // tic++;
- // }
+
+
+
+
+
+
+
+
+
w_ready.data = plyr->readyweapon;
- // if (*w_ready.on)
- // STlib_updateNum(&w_ready, true);
- // refresh weapon change
- // }
+
+
+
+
- // update keycard multiple widgets
+
for (i=0;i<3;i++)
{
keyboxes[i] = plyr->cards[i] ? i : -1;
@@ -958,16 +958,16 @@ void ST_updateWidgets(void)
keyboxes[i] = i+3;
}
- // refresh everything if this is him coming back to life
+
ST_updateFaceWidget();
- // used by the w_armsbg widget
+
st_notdeathmatch = !deathmatch;
- // used by w_arms[] widgets
+
st_armson = st_statusbaron && !deathmatch;
- // used by w_frags widget
+
st_fragson = deathmatch && st_statusbaron;
st_fragscount = 0;
@@ -979,7 +979,7 @@ void ST_updateWidgets(void)
st_fragscount -= plyr->frags[i];
}
- // get rid of chat window if up because of message
+
if (!--st_msgcounter)
st_chat = st_oldchat;
@@ -1009,7 +1009,7 @@ void ST_doPaletteStuff(void)
if (plyr->powers[pw_strength])
{
- // slowly fade the berzerk out
+
bzc = 12 - (plyr->powers[pw_strength]>>6);
if (bzc > cnt)
@@ -1055,10 +1055,10 @@ void ST_drawWidgets(boolean refresh)
{
int i;
- // used by w_arms[] widgets
+
st_armson = st_statusbaron && !deathmatch;
- // used by w_frags widget
+
st_fragson = deathmatch && st_statusbaron;
STlib_updateNum(&w_ready, refresh);
@@ -1091,17 +1091,17 @@ void ST_doRefresh(void)
st_firsttime = false;
- // draw status bar background to off-screen buff
+
ST_refreshBackground();
- // and refresh all widgets
+
ST_drawWidgets(true);
}
void ST_diffDraw(void)
{
- // update all widgets
+
ST_drawWidgets(false);
}
@@ -1111,12 +1111,12 @@ void ST_Drawer (boolean fullscreen, boolean refresh)
st_statusbaron = (!fullscreen) || automapactive;
st_firsttime = st_firsttime || refresh;
- // Do red-/gold-shifts from damage/items
+
ST_doPaletteStuff();
- // If just after ST_Start(), refresh all
+
if (st_firsttime) ST_doRefresh();
- // Otherwise, update as little as possible
+
else ST_diffDraw();
}
@@ -1130,7 +1130,7 @@ void ST_loadGraphics(void)
char namebuf[9];
- // Load the numbers, tall and short
+
for (i=0;i<10;i++)
{
sprintf(namebuf, "STTNUM%d", i);
@@ -1140,40 +1140,40 @@ void ST_loadGraphics(void)
shortnum[i] = (patch_t *) W_CacheLumpName(namebuf, PU_STATIC);
}
- // Load percent key.
- //Note: why not load STMINUS here, too?
+
+
tallpercent = (patch_t *) W_CacheLumpName("STTPRCNT", PU_STATIC);
- // key cards
+
for (i=0;i<NUMCARDS;i++)
{
sprintf(namebuf, "STKEYS%d", i);
keys[i] = (patch_t *) W_CacheLumpName(namebuf, PU_STATIC);
}
- // arms background
+
armsbg = (patch_t *) W_CacheLumpName("STARMS", PU_STATIC);
- // arms ownership widgets
+
for (i=0;i<6;i++)
{
sprintf(namebuf, "STGNUM%d", i+2);
- // gray #
+
arms[i][0] = (patch_t *) W_CacheLumpName(namebuf, PU_STATIC);
- // yellow #
+
arms[i][1] = shortnum[i+2];
}
- // face backgrounds for different color players
+
sprintf(namebuf, "STFB%d", consoleplayer);
faceback = (patch_t *) W_CacheLumpName(namebuf, PU_STATIC);
- // status bar background bits
+
sbar = (patch_t *) W_CacheLumpName("STBAR", PU_STATIC);
- // face states
+
facenum = 0;
for (i=0;i<ST_NUMPAINFACES;i++)
{
@@ -1182,15 +1182,15 @@ void ST_loadGraphics(void)
sprintf(namebuf, "STFST%d%d", i, j);
faces[facenum++] = W_CacheLumpName(namebuf, PU_STATIC);
}
- sprintf(namebuf, "STFTR%d0", i); // turn right
+ sprintf(namebuf, "STFTR%d0", i);
faces[facenum++] = W_CacheLumpName(namebuf, PU_STATIC);
- sprintf(namebuf, "STFTL%d0", i); // turn left
+ sprintf(namebuf, "STFTL%d0", i);
faces[facenum++] = W_CacheLumpName(namebuf, PU_STATIC);
- sprintf(namebuf, "STFOUCH%d", i); // ouch!
+ sprintf(namebuf, "STFOUCH%d", i);
faces[facenum++] = W_CacheLumpName(namebuf, PU_STATIC);
- sprintf(namebuf, "STFEVL%d", i); // evil grin ;)
+ sprintf(namebuf, "STFEVL%d", i);
faces[facenum++] = W_CacheLumpName(namebuf, PU_STATIC);
- sprintf(namebuf, "STFKILL%d", i); // pissed off
+ sprintf(namebuf, "STFKILL%d", i);
faces[facenum++] = W_CacheLumpName(namebuf, PU_STATIC);
}
faces[facenum++] = W_CacheLumpName("STFGOD0", PU_STATIC);
@@ -1209,23 +1209,23 @@ void ST_unloadGraphics(void)
int i;
- // unload the numbers, tall and short
+
for (i=0;i<10;i++)
{
Z_ChangeTag(tallnum[i], PU_CACHE);
Z_ChangeTag(shortnum[i], PU_CACHE);
}
- // unload tall percent
+
Z_ChangeTag(tallpercent, PU_CACHE);
- // unload arms background
+
Z_ChangeTag(armsbg, PU_CACHE);
- // unload gray #'s
+
for (i=0;i<6;i++)
Z_ChangeTag(arms[i][0], PU_CACHE);
- // unload the key cards
+
for (i=0;i<NUMCARDS;i++)
Z_ChangeTag(keys[i], PU_CACHE);
@@ -1235,8 +1235,8 @@ void ST_unloadGraphics(void)
for (i=0;i<ST_NUMFACES;i++)
Z_ChangeTag(faces[i], PU_CACHE);
- // Note: nobody ain't seen no unloading
- // of stminus yet. Dude.
+
+
}
@@ -1284,7 +1284,7 @@ void ST_createWidgets(void)
int i;
- // ready weapon ammo
+
STlib_initNum(&w_ready,
ST_AMMOX,
ST_AMMOY,
@@ -1293,10 +1293,10 @@ void ST_createWidgets(void)
&st_statusbaron,
ST_AMMOWIDTH );
- // the last weapon type
+
w_ready.data = plyr->readyweapon;
- // health percentage
+
STlib_initPercent(&w_health,
ST_HEALTHX,
ST_HEALTHY,
@@ -1305,7 +1305,7 @@ void ST_createWidgets(void)
&st_statusbaron,
tallpercent);
- // arms background
+
STlib_initBinIcon(&w_armsbg,
ST_ARMSBGX,
ST_ARMSBGY,
@@ -1313,7 +1313,7 @@ void ST_createWidgets(void)
&st_notdeathmatch,
&st_statusbaron);
- // weapons owned
+
for(i=0;i<6;i++)
{
STlib_initMultIcon(&w_arms[i],
@@ -1323,7 +1323,7 @@ void ST_createWidgets(void)
&st_armson);
}
- // frags sum
+
STlib_initNum(&w_frags,
ST_FRAGSX,
ST_FRAGSY,
@@ -1332,7 +1332,7 @@ void ST_createWidgets(void)
&st_fragson,
ST_FRAGSWIDTH);
- // faces
+
STlib_initMultIcon(&w_faces,
ST_FACESX,
ST_FACESY,
@@ -1340,7 +1340,7 @@ void ST_createWidgets(void)
&st_faceindex,
&st_statusbaron);
- // armor percentage - should be colored later
+
STlib_initPercent(&w_armor,
ST_ARMORX,
ST_ARMORY,
@@ -1348,7 +1348,7 @@ void ST_createWidgets(void)
&plyr->armorpoints,
&st_statusbaron, tallpercent);
- // keyboxes 0-2
+
STlib_initMultIcon(&w_keyboxes[0],
ST_KEY0X,
ST_KEY0Y,
@@ -1370,7 +1370,7 @@ void ST_createWidgets(void)
&keyboxes[2],
&st_statusbaron);
- // ammo count (all four kinds)
+
STlib_initNum(&w_ammo[0],
ST_AMMO0X,
ST_AMMO0Y,
@@ -1403,7 +1403,7 @@ void ST_createWidgets(void)
&st_statusbaron,
ST_AMMO3WIDTH);
- // max ammo count (all four kinds)
+
STlib_initNum(&w_maxammo[0],
ST_MAXAMMO0X,
ST_MAXAMMO0Y,
diff --git a/src/st_stuff.h b/src/st_stuff.h
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Status bar code.
-// Does the face/direction indicator animatin.
-// Does palette indicators as well (red pain/berserk, bright pickup)
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __STSTUFF_H__
#define __STSTUFF_H__
@@ -27,35 +27,35 @@
#include "doomtype.h"
#include "d_event.h"
-// Size of statusbar.
-// Now sensitive for scaling.
+
+
#define ST_HEIGHT 32*SCREEN_MUL
#define ST_WIDTH SCREENWIDTH
#define ST_Y (SCREENHEIGHT - ST_HEIGHT)
-//
-// STATUS BAR
-//
-// Called by main loop.
+
+
+
+
boolean ST_Responder (event_t* ev);
-// Called by main loop.
+
void ST_Ticker (void);
-// Called by main loop.
+
void ST_Drawer (boolean fullscreen, boolean refresh);
-// Called when the console player is spawned on each level.
+
void ST_Start (void);
-// Called by startup code.
+
void ST_Init (void);
-// States for status bar code.
+
typedef enum
{
AutomapState,
@@ -64,7 +64,7 @@ typedef enum
} st_stateenum_t;
-// States for the chat code.
+
typedef enum
{
StartChatState,
@@ -79,8 +79,8 @@ boolean ST_Responder(event_t* ev);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/tables.c b/src/tables.c
@@ -1,39 +1,39 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Lookup tables.
-// Do not try to look them up :-).
-// In the order of appearance:
-//
-// int finetangent[4096] - Tangens LUT.
-// Should work with BAM fairly well (12 of 16bit,
-// effectively, by shifting).
-//
-// int finesine[10240] - Sine lookup.
-// Guess what, serves as cosine, too.
-// Remarkable thing is, how to use BAMs with this?
-//
-// int tantoangle[2049] - ArcTan LUT,
-// maps tan(angle) to angle fast. Gotta search.
-//
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
diff --git a/src/tables.h b/src/tables.h
@@ -1,36 +1,36 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Lookup tables.
-// Do not try to look them up :-).
-// In the order of appearance:
-//
-// int finetangent[4096] - Tangens LUT.
-// Should work with BAM fairly well (12 of 16bit,
-// effectively, by shifting).
-//
-// int finesine[10240] - Sine lookup.
-// Guess what, serves as cosine, too.
-// Remarkable thing is, how to use BAMs with this?
-//
-// int tantoangle[2049] - ArcTan LUT,
-// maps tan(angle) to angle fast. Gotta search.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __TABLES__
@@ -51,20 +51,20 @@
#define FINEMASK (FINEANGLES-1)
-// 0x100000000 to 0x2000
+
#define ANGLETOFINESHIFT 19
-// Effective size is 10240.
+
extern fixed_t finesine[5*FINEANGLES/4];
-// Re-use data, is just PI/2 pahse shift.
+
extern fixed_t* finecosine;
-// Effective size is 4096.
+
extern fixed_t finetangent[FINEANGLES/2];
-// Binary Angle Measument, BAM.
+
#define ANG45 0x20000000
#define ANG90 0x40000000
#define ANG180 0x80000000
@@ -78,14 +78,14 @@ extern fixed_t finetangent[FINEANGLES/2];
typedef unsigned angle_t;
-// Effective size is 2049;
-// The +1 size is to handle the case when x==y
-// without additional checking.
+
+
+
extern angle_t tantoangle[SLOPERANGE+1];
-// Utility function,
-// called by R_PointToAngle.
+
+
int
SlopeDiv
( unsigned num,
@@ -93,8 +93,8 @@ SlopeDiv
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/v_video.c b/src/v_video.c
@@ -1,27 +1,27 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Gamma correction LUT stuff.
-// Functions to draw patches (by post) directly to screen.
-// Functions to blit a block to the screen.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
@@ -40,14 +40,14 @@ rcsid[] = "$Id: v_video.c,v 1.5 1997/02/03 22:45:13 b1 Exp $";
#include "v_video.h"
-// Each screen is [SCREENWIDTH*SCREENHEIGHT];
+
byte* screens[5];
int dirtybox[4];
-// Now where did these came from?
+
byte gammatable[5][256] =
{
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
@@ -136,9 +136,9 @@ byte gammatable[5][256] =
int usegamma;
-//
-// V_MarkRect
-//
+
+
+
void
V_MarkRect
( int x,
@@ -151,9 +151,9 @@ V_MarkRect
}
-//
-// V_CopyRect
-//
+
+
+
void
V_CopyRect
( int srcx,
@@ -196,10 +196,10 @@ V_CopyRect
}
-//
-// V_DrawPatch
-// Masks a column based masked pic to the screen.
-//
+
+
+
+
void
V_DrawPatch
( int x,
@@ -226,7 +226,7 @@ V_DrawPatch
|| (unsigned)scrn>4)
{
fprintf( stderr, "Patch at %d,%d exceeds LFB\n", x,y );
- // No I_Error abort - what is up with TNT.WAD?
+
fprintf( stderr, "V_DrawPatch: bad patch (ignored)\n");
return;
}
@@ -244,7 +244,7 @@ V_DrawPatch
{
column = (column_t *)((byte *)patch + LONG(patch->columnofs[col]));
- // step through the posts in a column
+
while (column->topdelta != 0xff )
{
source = (byte *)column + 3;
@@ -262,11 +262,11 @@ V_DrawPatch
}
}
-//
-// V_DrawPatchFlipped
-// Masks a column based masked pic to the screen.
-// Flips horizontally, e.g. to mirror face.
-//
+
+
+
+
+
void
V_DrawPatchFlipped
( int x,
@@ -309,7 +309,7 @@ V_DrawPatchFlipped
{
column = (column_t *)((byte *)patch + LONG(patch->columnofs[w-1-col]));
- // step through the posts in a column
+
while (column->topdelta != 0xff )
{
source = (byte *)column + 3;
@@ -329,10 +329,10 @@ V_DrawPatchFlipped
-//
-// V_DrawPatchDirect
-// Draws directly to the screen on the pc.
-//
+
+
+
+
void
V_DrawPatchDirect
( int x,
@@ -365,7 +365,7 @@ V_DrawPatchDirect
}
#endif
- // V_MarkRect (x, y, SHORT(patch->width), SHORT(patch->height));
+
desttop = destscreen + y*SCREENWIDTH/4 + (x>>2);
w = SHORT(patch->width);
@@ -374,7 +374,7 @@ V_DrawPatchDirect
outp (SC_INDEX+1,1<<(x&3));
column = (column_t *)((byte *)patch + LONG(patch->columnofs[col]));
- // step through the posts in a column
+
while (column->topdelta != 0xff )
{
@@ -391,16 +391,16 @@ V_DrawPatchDirect
+ 4 );
}
if ( ((++x)&3) == 0 )
- desttop++; // go to next byte, not next plane
+ desttop++;
}*/
}
-//
-// V_DrawBlock
-// Draw a linear block of pixels into the view buffer.
-//
+
+
+
+
void
V_DrawBlock
( int x,
@@ -437,10 +437,10 @@ V_DrawBlock
-//
-// V_GetBlock
-// Gets a linear block of pixels from the view buffer.
-//
+
+
+
+
void
V_GetBlock
( int x,
@@ -476,15 +476,15 @@ V_GetBlock
-//
-// V_Init
-//
+
+
+
void V_Init (void)
{
int i;
byte* base;
- // stick these in low dos memory on PCs
+
base = I_AllocLow (SCREENWIDTH*SCREENHEIGHT*4);
diff --git a/src/v_video.h b/src/v_video.h
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Gamma correction LUT.
-// Functions to draw patches (by post) directly to screen.
-// Functions to blit a block to the screen.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __V_VIDEO__
@@ -29,18 +29,18 @@
#include "doomdef.h"
-// Needed because we are refering to patches.
+
#include "r_data.h"
-//
-// VIDEO
-//
+
+
+
#define CENTERY (SCREENHEIGHT/2)
-// Screen 0 is the screen updated by I_Update screen.
-// Screen 1 is an extra buffer.
+
+
@@ -53,7 +53,7 @@ extern int usegamma;
-// Allocates buffer screens, call before R_Init.
+
void V_Init (void);
@@ -83,7 +83,7 @@ V_DrawPatchDirect
patch_t* patch );
-// Draw a linear block of pixels into the view buffer.
+
void
V_DrawBlock
( int x,
@@ -93,7 +93,7 @@ V_DrawBlock
int height,
byte* src );
-// Reads a linear block of pixels into the view buffer.
+
void
V_GetBlock
( int x,
@@ -112,8 +112,8 @@ V_MarkRect
int height );
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/w_wad.c b/src/w_wad.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Handles WAD file header, directory, lump I/O.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
@@ -53,11 +53,11 @@ rcsid[] = "$Id: w_wad.c,v 1.5 1997/02/03 16:47:57 b1 Exp $";
-//
-// GLOBALS
-//
-// Location of each lump on disk.
+
+
+
+
lumpinfo_t* lumpinfo;
int numlumps;
@@ -92,7 +92,7 @@ ExtractFileBase
src = path + strlen(path) - 1;
- // back up until a \ or the start
+
while (src != path
&& *(src-1) != '\\'
&& *(src-1) != '/')
@@ -100,7 +100,7 @@ ExtractFileBase
src--;
}
- // copy up to eight characters
+
memset (dest,0,8);
length = 0;
@@ -117,22 +117,22 @@ ExtractFileBase
-//
-// LUMP BASED ROUTINES.
-//
-//
-// W_AddFile
-// All files are optional, but at least one file must be
-// found (PWAD, if all required lumps are present).
-// Files with a .wad extension are wadlink files
-// with multiple lumps.
-// Other files are single lumps with the base filename
-// for the lump name.
-//
-// If filename starts with a tilde, the file is handled
-// specially to allow map reloads.
-// But: the reload feature is a fragile hack...
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
int reloadlump;
char* reloadname;
@@ -150,9 +150,9 @@ void W_AddFile (char *filename)
filelump_t singleinfo;
int storehandle;
- // open the file and add to directory
+
- // handle reload indicator.
+
if (filename[0] == '~')
{
filename++;
@@ -171,7 +171,7 @@ void W_AddFile (char *filename)
if (strcmpi (filename+strlen(filename)-3 , "wad" ) )
{
- // single lump file
+
fileinfo = &singleinfo;
singleinfo.filepos = 0;
singleinfo.size = LONG(filelength(handle));
@@ -180,18 +180,18 @@ void W_AddFile (char *filename)
}
else
{
- // WAD file
+
read (handle, &header, sizeof(header));
if (strncmp(header.identification,"IWAD",4))
{
- // Homebrew levels?
+
if (strncmp(header.identification,"PWAD",4))
{
I_Error ("Wad file %s doesn't have IWAD "
"or PWAD id\n", filename);
}
- // ???modifiedgame = true;
+
}
header.numlumps = LONG(header.numlumps);
header.infotableofs = LONG(header.infotableofs);
@@ -203,7 +203,7 @@ void W_AddFile (char *filename)
}
- // Fill in lumpinfo
+
lumpinfo = realloc (lumpinfo, numlumps*sizeof(lumpinfo_t));
if (!lumpinfo)
@@ -228,11 +228,11 @@ void W_AddFile (char *filename)
-//
-// W_Reload
-// Flushes any of the reloadable lumps in memory
-// and reloads the directory.
-//
+
+
+
+
+
void W_Reload (void)
{
wadinfo_t header;
@@ -257,7 +257,7 @@ void W_Reload (void)
lseek (handle, header.infotableofs, SEEK_SET);
read (handle, fileinfo, length);
- // Fill in lumpinfo
+
lump_p = &lumpinfo[reloadlump];
for (i=reloadlump ;
@@ -276,27 +276,27 @@ void W_Reload (void)
-//
-// W_InitMultipleFiles
-// Pass a null terminated list of files to use.
-// All files are optional, but at least one file
-// must be found.
-// Files with a .wad extension are idlink files
-// with multiple lumps.
-// Other files are single lumps with the base filename
-// for the lump name.
-// Lump names can appear multiple times.
-// The name searcher looks backwards, so a later file
-// does override all earlier ones.
-//
+
+
+
+
+
+
+
+
+
+
+
+
+
void W_InitMultipleFiles (char** filenames)
{
int size;
- // open all the files, load headers, and count lumps
+
numlumps = 0;
- // will be realloced as lumps are added
+
lumpinfo = malloc(1);
for ( ; *filenames ; filenames++)
@@ -305,7 +305,7 @@ void W_InitMultipleFiles (char** filenames)
if (!numlumps)
I_Error ("W_InitFiles: no files found");
- // set up caching
+
size = numlumps * sizeof(*lumpcache);
lumpcache = malloc (size);
@@ -318,10 +318,10 @@ void W_InitMultipleFiles (char** filenames)
-//
-// W_InitFile
-// Just initialize from a single file.
-//
+
+
+
+
void W_InitFile (char* filename)
{
char* names[2];
@@ -333,9 +333,9 @@ void W_InitFile (char* filename)
-//
-// W_NumLumps
-//
+
+
+
int W_NumLumps (void)
{
return numlumps;
@@ -343,10 +343,10 @@ int W_NumLumps (void)
-//
-// W_CheckNumForName
-// Returns -1 if name not found.
-//
+
+
+
+
int W_CheckNumForName (char* name)
{
@@ -360,20 +360,20 @@ int W_CheckNumForName (char* name)
int v2;
lumpinfo_t* lump_p;
- // make the name into two integers for easy compares
+
strncpy (name8.s,name,8);
- // in case the name was a fill 8 chars
+
name8.s[8] = 0;
- // case insensitive
+
strupr (name8.s);
v1 = name8.x[0];
v2 = name8.x[1];
- // scan backwards so patch lump files take precedence
+
lump_p = lumpinfo + numlumps;
while (lump_p-- != lumpinfo)
@@ -385,17 +385,17 @@ int W_CheckNumForName (char* name)
}
}
- // TFB. Not found.
+
return -1;
}
-//
-// W_GetNumForName
-// Calls W_CheckNumForName, but bombs out if not found.
-//
+
+
+
+
int W_GetNumForName (char* name)
{
int i;
@@ -409,10 +409,10 @@ int W_GetNumForName (char* name)
}
-//
-// W_LumpLength
-// Returns the buffer size needed to load the given lump.
-//
+
+
+
+
int W_LumpLength (int lump)
{
if (lump >= numlumps)
@@ -423,11 +423,11 @@ int W_LumpLength (int lump)
-//
-// W_ReadLump
-// Loads the lump into the given buffer,
-// which must be >= W_LumpLength().
-//
+
+
+
+
+
void
W_ReadLump
( int lump,
@@ -442,11 +442,11 @@ W_ReadLump
l = lumpinfo+lump;
- // ??? I_BeginRead ();
+
if (l->handle == -1)
{
- // reloadable file, so use open / read / close
+
if ( (handle = open (reloadname,O_RDONLY | O_BINARY)) == -1)
I_Error ("W_ReadLump: couldn't open %s",reloadname);
}
@@ -463,15 +463,15 @@ W_ReadLump
if (l->handle == -1)
close (handle);
- // ??? I_EndRead ();
+
}
-//
-// W_CacheLumpNum
-//
+
+
+
void*
W_CacheLumpNum
( int lump,
@@ -484,15 +484,15 @@ W_CacheLumpNum
if (!lumpcache[lump])
{
- // read the lump in
- //printf ("cache miss on lump %i\n",lump);
+
+
ptr = Z_Malloc (W_LumpLength (lump), tag, &lumpcache[lump]);
W_ReadLump (lump, lumpcache[lump]);
}
else
{
- //printf ("cache hit on lump %i\n",lump);
+
Z_ChangeTag (lumpcache[lump],tag);
}
@@ -501,9 +501,9 @@ W_CacheLumpNum
-//
-// W_CacheLumpName
-//
+
+
+
void*
W_CacheLumpName
( char* name,
@@ -513,9 +513,9 @@ W_CacheLumpName
}
-//
-// W_Profile
-//
+
+
+
int info[2500][10];
int profilecount;
diff --git a/src/w_wad.h b/src/w_wad.h
@@ -1,23 +1,23 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// WAD I/O functions.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __W_WAD__
@@ -29,12 +29,12 @@
#endif
-//
-// TYPES
-//
+
+
+
typedef struct
{
- // Should be "IWAD" or "PWAD".
+
char identification[4];
int numlumps;
int infotableofs;
@@ -50,9 +50,9 @@ typedef struct
} filelump_t;
-//
-// WADFILE I/O related stuff.
-//
+
+
+
typedef struct
{
char name[8];
@@ -82,8 +82,8 @@ void* W_CacheLumpName (char* name, int tag);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/wi_stuff.c b/src/wi_stuff.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Intermission screens.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: wi_stuff.c,v 1.7 1997/02/03 22:45:13 b1 Exp $";
@@ -42,45 +42,45 @@ rcsid[] = "$Id: wi_stuff.c,v 1.7 1997/02/03 22:45:13 b1 Exp $";
#include "doomstat.h"
-// Data.
+
#include "sounds.h"
-// Needs access to LFB.
+
#include "v_video.h"
#include "wi_stuff.h"
-//
-// Data needed to add patches to full screen intermission pics.
-// Patches are statistics messages, and animations.
-// Loads of by-pixel layout and placement, offsets etc.
-//
-//
-// Different vetween registered DOOM (1994) and
-// Ultimate DOOM - Final edition (retail, 1995?).
-// This is supposedly ignored for commercial
-// release (aka DOOM II), which had 34 maps
-// in one episode. So there.
+
+
+
+
+
+
+
+
+
+
+
#define NUMEPISODES 4
#define NUMMAPS 9
-// in tics
-//U #define PAUSELEN (TICRATE*2)
-//U #define SCORESTEP 100
-//U #define ANIMPERIOD 32
-// pixel distance from "(YOU)" to "PLAYER N"
-//U #define STARDIST 10
-//U #define WK 1
-// GLOBAL LOCATIONS
+
+
+
+
+
+
+
+
#define WI_TITLEY 2
#define WI_SPACINGY 33
-// SINGPLE-PLAYER STUFF
+
#define SP_STATSX 50
#define SP_STATSY 50
@@ -88,14 +88,14 @@ rcsid[] = "$Id: wi_stuff.c,v 1.7 1997/02/03 22:45:13 b1 Exp $";
#define SP_TIMEY (SCREENHEIGHT-32)
-// NET GAME STUFF
+
#define NG_STATSY 50
#define NG_STATSX (32 + SHORT(star->width)/2 + 32*!dofrags)
#define NG_SPACINGX 64
-// DEATHMATCH STUFF
+
#define DM_MATRIXX 42
#define DM_MATRIXY 68
@@ -127,48 +127,48 @@ typedef struct
} point_t;
-//
-// Animation.
-// There is another anim_t used in p_spec.
-//
+
+
+
+
typedef struct
{
animenum_t type;
- // period in tics between animations
+
int period;
- // number of animation frames
+
int nanims;
- // location of animation
+
point_t loc;
- // ALWAYS: n/a,
- // RANDOM: period deviation (<256),
- // LEVEL: level
+
+
+
int data1;
- // ALWAYS: n/a,
- // RANDOM: random base period,
- // LEVEL: n/a
+
+
+
int data2;
- // actual graphics for frames of animations
+
patch_t* p[3];
- // following must be initialized to zero before use!
+
- // next value of bcnt (used in conjunction with period)
+
int nexttic;
- // last drawn animation frame
+
int lastdrawn;
- // next frame number to animate
+
int ctr;
- // used by RANDOM and LEVEL when animating
+
int state;
} anim_t;
@@ -176,53 +176,53 @@ typedef struct
static point_t lnodes[NUMEPISODES][NUMMAPS] =
{
- // Episode 0 World Map
+
{
- { 185, 164 }, // location of level 0 (CJ)
- { 148, 143 }, // location of level 1 (CJ)
- { 69, 122 }, // location of level 2 (CJ)
- { 209, 102 }, // location of level 3 (CJ)
- { 116, 89 }, // location of level 4 (CJ)
- { 166, 55 }, // location of level 5 (CJ)
- { 71, 56 }, // location of level 6 (CJ)
- { 135, 29 }, // location of level 7 (CJ)
- { 71, 24 } // location of level 8 (CJ)
+ { 185, 164 },
+ { 148, 143 },
+ { 69, 122 },
+ { 209, 102 },
+ { 116, 89 },
+ { 166, 55 },
+ { 71, 56 },
+ { 135, 29 },
+ { 71, 24 }
},
- // Episode 1 World Map should go here
+
{
- { 254, 25 }, // location of level 0 (CJ)
- { 97, 50 }, // location of level 1 (CJ)
- { 188, 64 }, // location of level 2 (CJ)
- { 128, 78 }, // location of level 3 (CJ)
- { 214, 92 }, // location of level 4 (CJ)
- { 133, 130 }, // location of level 5 (CJ)
- { 208, 136 }, // location of level 6 (CJ)
- { 148, 140 }, // location of level 7 (CJ)
- { 235, 158 } // location of level 8 (CJ)
+ { 254, 25 },
+ { 97, 50 },
+ { 188, 64 },
+ { 128, 78 },
+ { 214, 92 },
+ { 133, 130 },
+ { 208, 136 },
+ { 148, 140 },
+ { 235, 158 }
},
- // Episode 2 World Map should go here
+
{
- { 156, 168 }, // location of level 0 (CJ)
- { 48, 154 }, // location of level 1 (CJ)
- { 174, 95 }, // location of level 2 (CJ)
- { 265, 75 }, // location of level 3 (CJ)
- { 130, 48 }, // location of level 4 (CJ)
- { 279, 23 }, // location of level 5 (CJ)
- { 198, 48 }, // location of level 6 (CJ)
- { 140, 25 }, // location of level 7 (CJ)
- { 281, 136 } // location of level 8 (CJ)
+ { 156, 168 },
+ { 48, 154 },
+ { 174, 95 },
+ { 265, 75 },
+ { 130, 48 },
+ { 279, 23 },
+ { 198, 48 },
+ { 140, 25 },
+ { 281, 136 }
}
};
-//
-// Animation locations for episode 0 (1).
-// Using patches saves a lot of space,
-// as they replace 320x200 full screen frames.
-//
+
+
+
+
+
static anim_t epsd0animinfo[] =
{
{ ANIM_ALWAYS, TICRATE/3, 3, { 224, 104 } },
@@ -275,17 +275,17 @@ static anim_t *anims[NUMEPISODES] =
};
-//
-// GENERAL DATA
-//
-//
-// Locally used stuff.
-//
+
+
+
+
+
+
#define FB 0
-// States for single-player
+
#define SP_KILLS 0
#define SP_ITEMS 2
#define SP_SECRET 4
@@ -295,32 +295,32 @@ static anim_t *anims[NUMEPISODES] =
#define SP_PAUSE 1
-// in seconds
+
#define SHOWNEXTLOCDELAY 4
-//#define SHOWLASTLOCDELAY SHOWNEXTLOCDELAY
-// used to accelerate or skip a stage
+
+
static int acceleratestage;
-// wbs->pnum
+
static int me;
- // specifies current state
+
static stateenum_t state;
-// contains information passed into intermission
+
static wbstartstruct_t* wbs;
-static wbplayerstruct_t* plrs; // wbs->plyr[]
+static wbplayerstruct_t* plrs;
+
-// used for general timing
static int cnt;
-// used for timing of background animation
+
static int bcnt;
-// signals to refresh everything for one frame
+
static int firstrefresh;
static int cnt_kills[MAXPLAYERS];
@@ -330,77 +330,77 @@ static int cnt_time;
static int cnt_par;
static int cnt_pause;
-// # of commercial levels
+
static int NUMCMAPS;
-//
-// GRAPHICS
-//
-// background (map of levels).
+
+
+
+
static patch_t* bg;
-// You Are Here graphic
+
static patch_t* yah[2];
-// splat
+
static patch_t* splat;
-// %, : graphics
+
static patch_t* percent;
static patch_t* colon;
-// 0-9 graphic
+
static patch_t* num[10];
-// minus sign
+
static patch_t* wiminus;
-// "Finished!" graphics
+
static patch_t* finished;
-// "Entering" graphic
+
static patch_t* entering;
-// "secret"
+
static patch_t* sp_secret;
- // "Kills", "Scrt", "Items", "Frags"
+
static patch_t* kills;
static patch_t* secret;
static patch_t* items;
static patch_t* frags;
-// Time sucks.
+
static patch_t* time;
static patch_t* par;
static patch_t* sucks;
-// "killers", "victims"
+
static patch_t* killers;
static patch_t* victims;
-// "Total", your face, your dead face
+
static patch_t* total;
static patch_t* star;
static patch_t* bstar;
-// "red P[1..MAXPLAYERS]"
+
static patch_t* p[MAXPLAYERS];
-// "gray P[1..MAXPLAYERS]"
+
static patch_t* bp[MAXPLAYERS];
- // Name graphics of each level (centered)
+
static patch_t** lnames;
-//
-// CODE
-//
-// slam background
-// UNUSED static unsigned char *background=0;
+
+
+
+
+
void WI_slamBackground(void)
@@ -409,24 +409,24 @@ void WI_slamBackground(void)
V_MarkRect (0, 0, SCREENWIDTH, SCREENHEIGHT);
}
-// The ticker is used to detect keys
-// because of timing issues in netgames.
+
+
boolean WI_Responder(event_t* ev)
{
return false;
}
-// Draws "<Levelname> Finished!"
+
void WI_drawLF(void)
{
int y = WI_TITLEY;
- // draw <LevelName>
+
V_DrawPatch((SCREENWIDTH - SHORT(lnames[wbs->last]->width))/2,
y, FB, lnames[wbs->last]);
- // draw "Finished!"
+
y += (5*SHORT(lnames[wbs->last]->height))/4;
V_DrawPatch((SCREENWIDTH - SHORT(finished->width))/2,
@@ -435,16 +435,16 @@ void WI_drawLF(void)
-// Draws "Entering <LevelName>"
+
void WI_drawEL(void)
{
int y = WI_TITLEY;
- // draw "Entering"
+
V_DrawPatch((SCREENWIDTH - SHORT(entering->width))/2,
y, FB, entering);
- // draw level
+
y += (5*SHORT(lnames[wbs->next]->height))/4;
V_DrawPatch((SCREENWIDTH - SHORT(lnames[wbs->next]->width))/2,
@@ -493,7 +493,7 @@ WI_drawOnLnode
}
else
{
- // DEBUG
+
printf("Could not place patch on level %d", n+1);
}
}
@@ -515,10 +515,10 @@ void WI_initAnimatedBack(void)
{
a = &anims[wbs->epsd][i];
- // init variables
+
a->ctr = -1;
- // specify the next time to draw it
+
if (a->type == ANIM_ALWAYS)
a->nexttic = bcnt + 1 + (M_Random()%a->period);
else if (a->type == ANIM_RANDOM)
@@ -564,7 +564,7 @@ void WI_updateAnimatedBack(void)
break;
case ANIM_LEVEL:
- // gawd-awful hack for level anims
+
if (!(state == StatCount && i == 7)
&& wbs->next == a->data1)
{
@@ -601,12 +601,12 @@ void WI_drawAnimatedBack(void)
}
-//
-// Draws a number.
-// If digits > 0, then use that many digits minimum,
-// otherwise only use as many as necessary.
-// Returns new x position.
-//
+
+
+
+
+
+
int
WI_drawNum
@@ -624,12 +624,12 @@ WI_drawNum
{
if (!n)
{
- // make variable-length zeros 1 digit long
+
digits = 1;
}
else
{
- // figure out # of digits in #
+
digits = 0;
temp = n;
@@ -645,11 +645,11 @@ WI_drawNum
if (neg)
n = -n;
- // if non-number, do not draw it
+
if (n == 1994)
return 0;
- // draw the new number
+
while (digits--)
{
x -= fontwidth;
@@ -657,7 +657,7 @@ WI_drawNum
n /= 10;
}
- // draw a minus sign if necessary
+
if (neg)
V_DrawPatch(x-=8, y, FB, wiminus);
@@ -680,10 +680,10 @@ WI_drawPercent
-//
-// Display level completion time and par,
-// or "sucks" message if overflow.
-//
+
+
+
+
void
WI_drawTime
( int x,
@@ -707,7 +707,7 @@ WI_drawTime
x = WI_drawNum(x, y, n, 2) - SHORT(colon->width);
div *= 60;
- // draw
+
if (div==60 || t / div)
V_DrawPatch(x, y, FB, colon);
@@ -715,7 +715,7 @@ WI_drawTime
}
else
{
- // "sucks"
+
V_DrawPatch(x - SHORT(sucks->width), y, FB, sucks);
}
}
@@ -776,7 +776,7 @@ void WI_drawShowNextLoc(void)
WI_slamBackground();
- // draw animated background
+
WI_drawAnimatedBack();
if ( gamemode != commercial)
@@ -789,20 +789,20 @@ void WI_drawShowNextLoc(void)
last = (wbs->last == 8) ? wbs->next - 1 : wbs->last;
- // draw a splat on taken cities.
+
for (i=0 ; i<=last ; i++)
WI_drawOnLnode(i, &splat);
- // splat the secret level?
+
if (wbs->didsecret)
WI_drawOnLnode(8, &splat);
- // draw flashing ptr
+
if (snl_pointeron)
WI_drawOnLnode(wbs->next, yah);
}
- // draws which level you are entering..
+
if ( (gamemode != commercial)
|| wbs->next != 30)
WI_drawEL();
@@ -830,10 +830,10 @@ int WI_fragSum(int playernum)
}
- // JDC hack - negative frags.
+
frags -= plrs[playernum].frags[playernum];
- // UNUSED if (frags < 0)
- // frags = 0;
+
+
return frags;
}
@@ -987,17 +987,17 @@ void WI_drawDeathmatchStats(void)
int y;
int w;
- int lh; // line height
+ int lh;
lh = WI_SPACINGY;
WI_slamBackground();
- // draw animated background
+
WI_drawAnimatedBack();
WI_drawLF();
- // draw stat titles (top line)
+
V_DrawPatch(DM_TOTALSX-SHORT(total->width)/2,
DM_MATRIXY-WI_SPACINGY+10,
FB,
@@ -1006,7 +1006,7 @@ void WI_drawDeathmatchStats(void)
V_DrawPatch(DM_KILLERSX, DM_KILLERSY, FB, killers);
V_DrawPatch(DM_VICTIMSX, DM_VICTIMSY, FB, victims);
- // draw P?
+
x = DM_MATRIXX + DM_SPACINGX;
y = DM_MATRIXY;
@@ -1039,16 +1039,16 @@ void WI_drawDeathmatchStats(void)
}
else
{
- // V_DrawPatch(x-SHORT(bp[i]->width)/2,
- // DM_MATRIXY - WI_SPACINGY, FB, bp[i]);
- // V_DrawPatch(DM_MATRIXX-SHORT(bp[i]->width)/2,
- // y, FB, bp[i]);
+
+
+
+
}
x += DM_SPACINGX;
y += WI_SPACINGY;
}
- // draw stats
+
y = DM_MATRIXY+10;
w = SHORT(num[0]->width);
@@ -1267,12 +1267,12 @@ void WI_drawNetgameStats(void)
WI_slamBackground();
- // draw animated background
+
WI_drawAnimatedBack();
WI_drawLF();
- // draw stat titles (top line)
+
V_DrawPatch(NG_STATSX+NG_SPACINGX-SHORT(kills->width),
NG_STATSY, FB, kills);
@@ -1286,7 +1286,7 @@ void WI_drawNetgameStats(void)
V_DrawPatch(NG_STATSX+4*NG_SPACINGX-SHORT(frags->width),
NG_STATSY, FB, frags);
- // draw stats
+
y = NG_STATSY + SHORT(kills->height);
for (i=0 ; i<MAXPLAYERS ; i++)
@@ -1435,14 +1435,14 @@ void WI_updateStats(void)
void WI_drawStats(void)
{
- // line height
+
int lh;
lh = (3*SHORT(num[0]->height))/2;
WI_slamBackground();
- // draw animated background
+
WI_drawAnimatedBack();
WI_drawLF();
@@ -1472,7 +1472,7 @@ void WI_checkForAccelerate(void)
int i;
player_t *player;
- // check for button presses to skip delays
+
for (i=0, player = players ; i<MAXPLAYERS ; i++, player++)
{
if (playeringame[i])
@@ -1499,15 +1499,15 @@ void WI_checkForAccelerate(void)
-// Updates stuff each tick
+
void WI_Ticker(void)
{
- // counter for general background animation
+
bcnt++;
if (bcnt == 1)
{
- // intermission music
+
if ( gamemode == commercial )
S_ChangeMusic(mus_dm2int, true);
else
@@ -1553,21 +1553,21 @@ void WI_loadData(void)
strcpy(name,"INTERPIC");
}
- // background
+
bg = W_CacheLumpName(name, PU_CACHE);
V_DrawPatch(0, 0, 1, bg);
- // UNUSED unsigned char *pic = screens[1];
- // if (gamemode == commercial)
- // {
- // darken the background image
- // while (pic != screens[1] + SCREENHEIGHT*SCREENWIDTH)
- // {
- // *pic = colormaps[256*25 + *pic];
- // pic++;
- // }
- //}
+
+
+
+
+
+
+
+
+
+
if (gamemode == commercial)
{
@@ -1590,13 +1590,13 @@ void WI_loadData(void)
lnames[i] = W_CacheLumpName(name, PU_STATIC);
}
- // you are here
+
yah[0] = W_CacheLumpName("WIURH0", PU_STATIC);
- // you are here (alt.)
+
yah[1] = W_CacheLumpName("WIURH1", PU_STATIC);
- // splat
+
splat = W_CacheLumpName("WISPLAT", PU_STATIC);
if (wbs->epsd < 3)
@@ -1606,16 +1606,16 @@ void WI_loadData(void)
a = &anims[wbs->epsd][j];
for (i=0;i<a->nanims;i++)
{
- // MONDO HACK!
+
if (wbs->epsd != 1 || j != 8)
{
- // animations
+
sprintf(name, "WIA%d%.2d%.2d", wbs->epsd, j, i);
a->p[i] = W_CacheLumpName(name, PU_STATIC);
}
else
{
- // HACK ALERT!
+
a->p[i] = anims[1][4].p[i];
}
}
@@ -1623,38 +1623,38 @@ void WI_loadData(void)
}
}
- // More hacks on minus sign.
+
wiminus = W_CacheLumpName("WIMINUS", PU_STATIC);
for (i=0;i<10;i++)
{
- // numbers 0-9
+
sprintf(name, "WINUM%d", i);
num[i] = W_CacheLumpName(name, PU_STATIC);
}
- // percent sign
+
percent = W_CacheLumpName("WIPCNT", PU_STATIC);
- // "finished"
+
finished = W_CacheLumpName("WIF", PU_STATIC);
- // "entering"
+
entering = W_CacheLumpName("WIENTER", PU_STATIC);
- // "kills"
+
kills = W_CacheLumpName("WIOSTK", PU_STATIC);
- // "scrt"
+
secret = W_CacheLumpName("WIOSTS", PU_STATIC);
- // "secret"
+
sp_secret = W_CacheLumpName("WISCRT2", PU_STATIC);
- // Yuck.
+
if (french)
{
- // "items"
+
if (netgame && !deathmatch)
items = W_CacheLumpName("WIOBJ", PU_STATIC);
else
@@ -1662,43 +1662,43 @@ void WI_loadData(void)
} else
items = W_CacheLumpName("WIOSTI", PU_STATIC);
- // "frgs"
+
frags = W_CacheLumpName("WIFRGS", PU_STATIC);
- // ":"
+
colon = W_CacheLumpName("WICOLON", PU_STATIC);
- // "time"
+
time = W_CacheLumpName("WITIME", PU_STATIC);
- // "sucks"
+
sucks = W_CacheLumpName("WISUCKS", PU_STATIC);
- // "par"
+
par = W_CacheLumpName("WIPAR", PU_STATIC);
- // "killers" (vertical)
+
killers = W_CacheLumpName("WIKILRS", PU_STATIC);
- // "victims" (horiz)
+
victims = W_CacheLumpName("WIVCTMS", PU_STATIC);
- // "total"
+
total = W_CacheLumpName("WIMSTT", PU_STATIC);
- // your face
+
star = W_CacheLumpName("STFST01", PU_STATIC);
- // dead face
+
bstar = W_CacheLumpName("STFDEAD0", PU_STATIC);
for (i=0 ; i<MAXPLAYERS ; i++)
{
- // "1,2,3,4"
+
sprintf(name, "STPB%d", i);
p[i] = W_CacheLumpName(name, PU_STATIC);
- // "1,2,3,4"
+
sprintf(name, "WIBP%d", i+1);
bp[i] = W_CacheLumpName(name, PU_STATIC);
}
@@ -1759,8 +1759,8 @@ void WI_unloadData(void)
Z_ChangeTag(victims, PU_CACHE);
Z_ChangeTag(killers, PU_CACHE);
Z_ChangeTag(total, PU_CACHE);
- // Z_ChangeTag(star, PU_CACHE);
- // Z_ChangeTag(bstar, PU_CACHE);
+
+
for (i=0 ; i<MAXPLAYERS ; i++)
Z_ChangeTag(p[i], PU_CACHE);
diff --git a/src/wi_stuff.h b/src/wi_stuff.h
@@ -1,32 +1,32 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Intermission.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
#ifndef __WI_STUFF__
#define __WI_STUFF__
-//#include "v_video.h"
+
#include "doomdef.h"
-// States for the intermission
+
typedef enum
{
@@ -36,19 +36,19 @@ typedef enum
} stateenum_t;
-// Called by main loop, animate the intermission.
+
void WI_Ticker (void);
-// Called by main loop,
-// draws the intermission directly into the screen buffer.
+
+
void WI_Drawer (void);
-// Setup for an intermission screen.
+
void WI_Start(wbstartstruct_t* wbstartstruct);
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
diff --git a/src/z_zone.c b/src/z_zone.c
@@ -1,25 +1,25 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// $Log:$
-//
-// DESCRIPTION:
-// Zone Memory Allocation. Neat.
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
static const char
rcsid[] = "$Id: z_zone.c,v 1.4 1997/02/03 16:47:58 b1 Exp $";
@@ -29,26 +29,26 @@ rcsid[] = "$Id: z_zone.c,v 1.4 1997/02/03 16:47:58 b1 Exp $";
#include "doomdef.h"
-//
-// ZONE MEMORY ALLOCATION
-//
-// There is never any space between memblocks,
-// and there will never be two contiguous free memblocks.
-// The rover can be left pointing at a non-empty block.
-//
-// It is of no value to free a cachable block,
-// because it will get overwritten automatically if needed.
-//
+
+
+
+
+
+
+
+
+
+
#define ZONEID 0x1d4a11
typedef struct
{
- // total bytes malloced, including header
+
int size;
- // start / end cap for linked list
+
memblock_t blocklist;
memblock_t* rover;
@@ -61,14 +61,14 @@ memzone_t* mainzone;
-//
-// Z_ClearZone
-//
+
+
+
void Z_ClearZone (memzone_t* zone)
{
memblock_t* block;
- // set the entire zone to one free block
+
zone->blocklist.next =
zone->blocklist.prev =
block = (memblock_t *)( (byte *)zone + sizeof(memzone_t) );
@@ -79,7 +79,7 @@ void Z_ClearZone (memzone_t* zone)
block->prev = block->next = &zone->blocklist;
- // NULL indicates a free block.
+
block->user = NULL;
block->size = zone->size - sizeof(memzone_t);
@@ -87,9 +87,9 @@ void Z_ClearZone (memzone_t* zone)
-//
-// Z_Init
-//
+
+
+
void Z_Init (void)
{
memblock_t* block;
@@ -98,7 +98,7 @@ void Z_Init (void)
mainzone = (memzone_t *)I_ZoneBase (&size);
mainzone->size = size;
- // set the entire zone to one free block
+
mainzone->blocklist.next =
mainzone->blocklist.prev =
block = (memblock_t *)( (byte *)mainzone + sizeof(memzone_t) );
@@ -109,16 +109,16 @@ void Z_Init (void)
block->prev = block->next = &mainzone->blocklist;
- // NULL indicates a free block.
+
block->user = NULL;
block->size = mainzone->size - sizeof(memzone_t);
}
-//
-// Z_Free
-//
+
+
+
void Z_Free (void* ptr)
{
memblock_t* block;
@@ -131,14 +131,14 @@ void Z_Free (void* ptr)
if (block->user > (void **)0x100)
{
- // smaller values are not pointers
- // Note: OS-dependend?
- // clear the user's mark
+
+
+
*block->user = 0;
}
- // mark as free
+
block->user = NULL;
block->tag = 0;
block->id = 0;
@@ -147,7 +147,7 @@ void Z_Free (void* ptr)
if (!other->user)
{
- // merge with previous free block
+
other->size += block->size;
other->next = block->next;
other->next->prev = other;
@@ -161,7 +161,7 @@ void Z_Free (void* ptr)
other = block->next;
if (!other->user)
{
- // merge the next free block onto the end
+
block->size += other->size;
block->next = other->next;
block->next->prev = block;
@@ -173,10 +173,10 @@ void Z_Free (void* ptr)
-//
-// Z_Malloc
-// You can pass a NULL user if the tag is < PU_PURGELEVEL.
-//
+
+
+
+
#define MINFRAGMENT 64
@@ -194,16 +194,16 @@ Z_Malloc
size = (size + 3) & ~3;
- // scan through the block list,
- // looking for the first free block
- // of sufficient size,
- // throwing out any purgable blocks along the way.
+
+
+
+
- // account for size of block header
+
size += sizeof(memblock_t);
- // if there is a free block behind the rover,
- // back up over them
+
+
base = mainzone->rover;
if (!base->prev->user)
@@ -216,7 +216,7 @@ Z_Malloc
{
if (rover == start)
{
- // scanned all the way around the list
+
I_Error ("Z_Malloc: failed on allocation of %i bytes", size);
}
@@ -224,15 +224,15 @@ Z_Malloc
{
if (rover->tag < PU_PURGELEVEL)
{
- // hit a block that can't be purged,
- // so move base past it
+
+
base = rover = rover->next;
}
else
{
- // free the rover block (adding the size to base)
+
- // the rover can be the base block
+
base = base->prev;
Z_Free ((byte *)rover+sizeof(memblock_t));
base = base->next;
@@ -244,16 +244,16 @@ Z_Malloc
} while (base->user || base->size < size);
- // found a block big enough
+
extra = base->size - size;
if (extra > MINFRAGMENT)
{
- // there will be a free fragment after the allocated block
+
newblock = (memblock_t *) ((byte *)base + size );
newblock->size = extra;
- // NULL indicates free block.
+
newblock->user = NULL;
newblock->tag = 0;
newblock->prev = base;
@@ -266,7 +266,7 @@ Z_Malloc
if (user)
{
- // mark as an in use block
+
base->user = user;
*(void **)user = (void *) ((byte *)base + sizeof(memblock_t));
}
@@ -275,12 +275,12 @@ Z_Malloc
if (tag >= PU_PURGELEVEL)
I_Error ("Z_Malloc: an owner is required for purgable blocks");
- // mark as in use, but unowned
+
base->user = (void *)2;
}
base->tag = tag;
- // next allocation will start looking here
+
mainzone->rover = base->next;
base->id = ZONEID;
@@ -290,9 +290,9 @@ Z_Malloc
-//
-// Z_FreeTags
-//
+
+
+
void
Z_FreeTags
( int lowtag,
@@ -305,10 +305,10 @@ Z_FreeTags
block != &mainzone->blocklist ;
block = next)
{
- // get link before freeing
+
next = block->next;
- // free block?
+
if (!block->user)
continue;
@@ -319,10 +319,10 @@ Z_FreeTags
-//
-// Z_DumpHeap
-// Note: TFileDumpHeap( stdout ) ?
-//
+
+
+
+
void
Z_DumpHeap
( int lowtag,
@@ -344,7 +344,7 @@ Z_DumpHeap
if (block->next == &mainzone->blocklist)
{
- // all blocks have been hit
+
break;
}
@@ -360,9 +360,9 @@ Z_DumpHeap
}
-//
-// Z_FileDumpHeap
-//
+
+
+
void Z_FileDumpHeap (FILE* f)
{
memblock_t* block;
@@ -376,7 +376,7 @@ void Z_FileDumpHeap (FILE* f)
if (block->next == &mainzone->blocklist)
{
- // all blocks have been hit
+
break;
}
@@ -393,9 +393,9 @@ void Z_FileDumpHeap (FILE* f)
-//
-// Z_CheckHeap
-//
+
+
+
void Z_CheckHeap (void)
{
memblock_t* block;
@@ -404,7 +404,7 @@ void Z_CheckHeap (void)
{
if (block->next == &mainzone->blocklist)
{
- // all blocks have been hit
+
break;
}
@@ -422,9 +422,9 @@ void Z_CheckHeap (void)
-//
-// Z_ChangeTag
-//
+
+
+
void
Z_ChangeTag2
( void* ptr,
@@ -445,9 +445,9 @@ Z_ChangeTag2
-//
-// Z_FreeMemory
-//
+
+
+
int Z_FreeMemory (void)
{
memblock_t* block;
diff --git a/src/z_zone.h b/src/z_zone.h
@@ -1,26 +1,26 @@
-// Emacs style mode select -*- C++ -*-
-//-----------------------------------------------------------------------------
-//
-// $Id:$
-//
-// Copyright (C) 1993-1996 by id Software, Inc.
-//
-// This source is available for distribution and/or modification
-// only under the terms of the DOOM Source Code License as
-// published by id Software. All rights reserved.
-//
-// The source is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
-// for more details.
-//
-// DESCRIPTION:
-// Zone Memory Allocation, perhaps NeXT ObjectiveC inspired.
-// Remark: this was the only stuff that, according
-// to John Carmack, might have been useful for
-// Quake.
-//
-//---------------------------------------------------------------------
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
@@ -29,17 +29,17 @@
#include <stdio.h>
-//
-// ZONE MEMORY
-// PU - purge tags.
-// Tags < 100 are not overwritten until freed.
-#define PU_STATIC 1 // static entire execution time
-#define PU_SOUND 2 // static while playing
-#define PU_MUSIC 3 // static while playing
-#define PU_DAVE 4 // anything else Dave wants static
-#define PU_LEVEL 50 // static until level exited
-#define PU_LEVSPEC 51 // a special thinker in a level
-// Tags >= 100 are purgable whenever needed.
+
+
+
+
+#define PU_STATIC 1
+#define PU_SOUND 2
+#define PU_MUSIC 3
+#define PU_DAVE 4
+#define PU_LEVEL 50
+#define PU_LEVSPEC 51
+
#define PU_PURGELEVEL 100
#define PU_CACHE 101
@@ -57,18 +57,18 @@ int Z_FreeMemory (void);
typedef struct memblock_s
{
- int size; // including the header and possibly tiny fragments
- void** user; // NULL if a free block
- int tag; // purgelevel
- int id; // should be ZONEID
+ int size;
+ void** user;
+ int tag;
+ int id;
struct memblock_s* next;
struct memblock_s* prev;
} memblock_t;
-//
-// This is used to get the local FILE:LINE info from CPP
-// prior to really call the function in question.
-//
+
+
+
+
#define Z_ChangeTag(p,t) \
{ \
if (( (memblock_t *)( (byte *)(p) - sizeof(memblock_t)))->id!=0x1d4a11) \
@@ -79,8 +79,8 @@ typedef struct memblock_s
#endif
-//-----------------------------------------------------------------------------
-//
-// $Log:$
-//
-//-----------------------------------------------------------------------------
+
+
+
+
+