Skip to content

Commit

Permalink
Remove visplane limit
Browse files Browse the repository at this point in the history
Previously the limit was only increased, from 128 to 1024. This fixes
issue #25.
  • Loading branch information
bradharding committed Apr 26, 2014
1 parent ba75f9a commit 8323e8a
Show file tree
Hide file tree
Showing 3 changed files with 131 additions and 214 deletions.
89 changes: 4 additions & 85 deletions src/r_defs.h
Expand Up @@ -29,35 +29,15 @@ along with DOOM RETRO. If not, see http://www.gnu.org/licenses/.
#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"






// Silhouette, needed for clipping Segs (mainly)
// and sprites representing things.
#define SIL_NONE 0
#define SIL_BOTTOM 1
#define SIL_TOP 2
#define SIL_BOTH 3




//
// INTERNAL MAP TYPES
// used by play and refresh
Expand All @@ -72,10 +52,8 @@ typedef struct
{
fixed_t x;
fixed_t y;

} vertex_t;


// Forward of LineDefs, for Sectors.
struct line_s;

Expand All @@ -91,7 +69,6 @@ typedef struct
fixed_t x;
fixed_t y;
fixed_t z;

} degenmobj_t;

//
Expand Down Expand Up @@ -131,16 +108,11 @@ typedef struct

int linecount;
struct line_s **lines; // [linecount] size

} sector_t;




//
// The SideDef.
//

typedef struct
{
// add this to the calculated texture column
Expand All @@ -157,11 +129,8 @@ typedef struct

// Sector the SideDef is facing.
sector_t *sector;

} side_t;



//
// Move clipping aid for LineDefs.
//
Expand All @@ -171,19 +140,8 @@ typedef enum
ST_VERTICAL,
ST_POSITIVE,
ST_NEGATIVE

} slopetype_t;

typedef enum
{
WALL,
FDWALL,
CDWALL,
TSWALL

} linetype_t;


typedef struct line_s
{
// Vertices, from v1 to v2.
Expand Down Expand Up @@ -391,8 +349,7 @@ typedef enum
RaiseDoorIn5Minutes = 14,
SuperHellslimeDamage = 16,
FlickeringFire = 17
}
sectorspecial_t;
} sectorspecial_t;

typedef enum
{
Expand Down Expand Up @@ -521,8 +478,6 @@ typedef enum
LostSoul = 3006
} thingtype_t;



//
// A SubSector.
// References a Sector.
Expand All @@ -535,11 +490,8 @@ typedef struct subsector_s
sector_t *sector;
short numlines;
short firstline;

} subsector_t;



//
// The LineSeg.
//
Expand All @@ -560,11 +512,8 @@ typedef struct
// backsector is NULL for one sided lines
sector_t *frontsector;
sector_t *backsector;

} seg_t;



//
// BSP node.
//
Expand All @@ -581,12 +530,8 @@ typedef struct

// If NF_SUBSECTOR its a subsector.
unsigned short children[2];

} node_t;




// posts are runs of non masked source pixels
typedef struct
{
Expand All @@ -597,8 +542,6 @@ typedef struct
// column_t is a list of 0 or more post_t, (byte)-1 terminated
typedef post_t column_t;



//
// OTHER TYPES
//
Expand All @@ -610,12 +553,6 @@ typedef post_t column_t;
// Could even us emore than 32 levels.
typedef byte lighttable_t;




//
// ?
//
typedef struct drawseg_s
{
seg_t *curline;
Expand All @@ -642,8 +579,6 @@ typedef struct drawseg_s
int *maskedtexturecol;
} drawseg_t;



// Patches.
// A patch holds one or more columns.
// Patches are used for sprites and all masked pictures,
Expand All @@ -659,12 +594,6 @@ typedef struct
// 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.
Expand Down Expand Up @@ -706,10 +635,8 @@ typedef struct vissprite_s
mobjtype_t type;

void (*colfunc)(void);

} vissprite_t;


//
// Sprites are patches with a special naming convention
// so they can be recognized by R_InitSprites.
Expand Down Expand Up @@ -737,11 +664,8 @@ typedef struct

// Flip bit (1 = flip) to use for view angles 0-7.
byte flip[8];

} spriteframe_t;



//
// A sprite definition:
// a number of animation frames.
Expand All @@ -750,15 +674,12 @@ typedef struct
{
int numframes;
spriteframe_t *spriteframes;

} spritedef_t;



//
// Now what is a visplane, anyway?
//
typedef struct
typedef struct visplane_s
{
fixed_t height;
int picnum;
Expand All @@ -778,9 +699,7 @@ typedef struct
unsigned short bottom[SCREENWIDTH];
unsigned short pad4;

struct visplane_s *next; // Next visplane in hash chain -- killough
} visplane_t;




#endif
#endif

0 comments on commit 8323e8a

Please sign in to comment.