summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Makefile.am1
-rw-r--r--src/doom/r_defs.h34
-rw-r--r--src/f_wipe.c4
-rw-r--r--src/v_patch.h58
-rw-r--r--src/v_video.c1
-rw-r--r--src/v_video.h2
6 files changed, 62 insertions, 38 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index 5337c008..e0a17534 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -51,6 +51,7 @@ m_random.c m_random.h \
s_sound.c s_sound.h \
tables.c tables.h \
v_video.c v_video.h \
+ v_patch.h \
w_checksum.c w_checksum.h \
w_wad.c w_wad.h \
w_file.c w_file.h \
diff --git a/src/doom/r_defs.h b/src/doom/r_defs.h
index fe3517c2..bbd4b211 100644
--- a/src/doom/r_defs.h
+++ b/src/doom/r_defs.h
@@ -44,6 +44,7 @@
#include "i_video.h"
+#include "v_patch.h"
@@ -284,18 +285,6 @@ 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
-} PACKEDATTR 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;
@@ -351,27 +340,6 @@ 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 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]
-} PACKEDATTR patch_t;
-
-
-
-
-
-
-
// A vissprite_t is a thing
// that will be drawn during a refresh.
// I.e. a sprite object that is partly visible.
diff --git a/src/f_wipe.c b/src/f_wipe.c
index aeb27f12..2ab66848 100644
--- a/src/f_wipe.c
+++ b/src/f_wipe.c
@@ -24,9 +24,7 @@
//
//-----------------------------------------------------------------------------
-
-
-
+#include <string.h>
#include "z_zone.h"
#include "i_video.h"
diff --git a/src/v_patch.h b/src/v_patch.h
new file mode 100644
index 00000000..257603f6
--- /dev/null
+++ b/src/v_patch.h
@@ -0,0 +1,58 @@
+// Emacs style mode select -*- C++ -*-
+//-----------------------------------------------------------------------------
+//
+// Copyright(C) 1993-1996 Id Software, Inc.
+// Copyright(C) 2005 Simon Howard
+//
+// This program is free software; you can redistribute it and/or
+// modify it under the terms of the GNU General Public License
+// as published by the Free Software Foundation; either version 2
+// of the License, or (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
+// 02111-1307, USA.
+//
+// DESCRIPTION:
+// Refresh/rendering module, shared data struct definitions.
+//
+//-----------------------------------------------------------------------------
+
+
+#ifndef V_PATCH_H
+#define V_PATCH_H
+
+// 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 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]
+} PACKEDATTR patch_t;
+
+// 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
+} PACKEDATTR post_t;
+
+// column_t is a list of 0 or more post_t, (byte)-1 terminated
+typedef post_t column_t;
+
+#endif
+
diff --git a/src/v_video.c b/src/v_video.c
index 07908f84..bea0171c 100644
--- a/src/v_video.c
+++ b/src/v_video.c
@@ -30,7 +30,6 @@
#include "i_system.h"
-#include "r_local.h"
#include "doomtype.h"
#include "doomdata.h"
diff --git a/src/v_video.h b/src/v_video.h
index c9b10db8..6afab9d8 100644
--- a/src/v_video.h
+++ b/src/v_video.h
@@ -33,7 +33,7 @@
#include "doomtype.h"
// Needed because we are refering to patches.
-#include "r_data.h"
+#include "v_patch.h"
//
// VIDEO