XenevaOS
Loading...
Searching...
No Matches
v_patch.h
Go to the documentation of this file.
1//
2// Copyright(C) 1993-1996 Id Software, Inc.
3// Copyright(C) 2005-2014 Simon Howard
4//
5// This program is free software; you can redistribute it and/or
6// modify it under the terms of the GNU General Public License
7// as published by the Free Software Foundation; either version 2
8// of the License, or (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// DESCRIPTION:
16// Refresh/rendering module, shared data struct definitions.
17//
18
19
20#ifndef V_PATCH_H
21#define V_PATCH_H
22
23// Patches.
24// A patch holds one or more columns.
25// Patches are used for sprites and all masked pictures,
26// and we compose textures from the TEXTURE1/2 lists
27// of patches.
28
29typedef struct
30{
31 short width; // bounding box size
32 short height;
33 short leftoffset; // pixels to the left of origin
34 short topoffset; // pixels below the origin
35 int columnofs[8]; // only [width] used
36 // the [0] is &columnofs[width]
37} PACKEDATTR patch_t;
38
39// posts are runs of non masked source pixels
40typedef struct
41{
42 byte topdelta; // -1 is the last post in a column
43 byte length; // length data bytes follows
44} PACKEDATTR post_t;
45
46// column_t is a list of 0 or more post_t, (byte)-1 terminated
47typedef post_t column_t;
48
49#endif
50
int columnofs[MAXWIDTH]
Definition r_draw.c:64
Definition doomdata.h:58
byte topdelta
Definition v_patch.h:42
short topoffset
Definition v_patch.h:34
byte length
Definition v_patch.h:43
short leftoffset
Definition v_patch.h:33
post_t column_t
Definition v_patch.h:47