*=======================================================*
*	Program header:	latest update 21/11/95		*
*=======================================================*

*-------------------------------------------------------*
*	Player attributes				*
*-------------------------------------------------------*

player_height		=	40	; player head-height
player_speed		=	40	; movement velocity
turn_speed		=	$800	; turning velocity

*-------------------------------------------------------*
*	Display engine constants			*
*-------------------------------------------------------*

max_xres		=	320	
max_yres		=	240

vbilock			=	1	; minimum vblanks before pageswap

window_max		=	1<<10

ZMIN			=	12	; minimum clipping Z

UPPER_TYPE		=	0	; wall definition codes
WALL_TYPE		=	1
LOWER_TYPE		=	2

maxwallruns		=	4096	; reserve space for wall runs
max_xint		=	64	; be careful when modifying these as a few
max_yint		=	64	; mults have been optimised using shifts instead.

attrib_twosided		=	1<<2	; twosided flag-mask

terminator		=	-1	; general list-terminator

*-------------------------------------------------------*
*	Memory allocation codes				*
*-------------------------------------------------------*
			rsreset
*-------------------------------------------------------*
STRAM_only		rs.b	1
VRAM_only		rs.b	1
STRAM_preferred		rs.b	1
VRAM_preferred		rs.b	1

*-------------------------------------------------------*
*	Wall-run ministructure				*
*-------------------------------------------------------*
			rsreset
*-------------------------------------------------------*
wall_id:		rs.w	1
wall_x:			rs.w	1
wall_y1:		rs.w	1
wall_y2:		rs.w	1
wall_len:		rs.b	0

*-------------------------------------------------------*
*	Floor-run ministructure				*
*-------------------------------------------------------*
			rsreset
*-------------------------------------------------------*
flat_id:		rs.w	1
flat_x2:		rs.w	1
flat_x1:		rs.w	1
flat_u:			rs.w	1
flat_len:		rs.b	0

*-------------------------------------------------------*
*	Vertex ministructure				*
*-------------------------------------------------------*
			rsreset
*-------------------------------------------------------*
vtx_x:			rs.w	1
vtx_y:			rs.w	1
vtx_len:		rs.b	0

*-------------------------------------------------------*
*	Node-vertex ministructure			*
*-------------------------------------------------------*
			rsreset
*-------------------------------------------------------*
nodevtx_y2:		rs.w	1
nodevtx_y1:		rs.w	1
nodevtx_x1:		rs.w	1
nodevtx_x2:		rs.w	1
nodevtx_len:		rs.b	0

*-------------------------------------------------------*
*	WAD Seg structure				*
*-------------------------------------------------------*
			rsreset
*-------------------------------------------------------*
seg_from:		rs.w	1
seg_to:			rs.w	1
seg_bam:		rs.w	1
seg_linedef:		rs.w	1
seg_sidedef:		rs.w	1
seg_distance:		rs.w	1
seg_len:		rs.b	0

*-------------------------------------------------------*
*	WAD Sector structure				*
*-------------------------------------------------------*
			rsreset
*-------------------------------------------------------*
sector_floorht:		rs.w	1
sector_ceilht:		rs.w	1
sector_ftns:		rs.b	8
sector_ctns:		rs.b	8
sector_light:		rs.w	1
sector_special:		rs.w	1
sector_tag:		rs.w	1
sector_len:		rs.b	0

*-------------------------------------------------------*
*	WAD SSector structure				*
*-------------------------------------------------------*
			rsreset
*-------------------------------------------------------*
ssec_segments:		rs.w	1	
ssec_first:		rs.w	1
ssec_len:		rs.b	0

*-------------------------------------------------------*
*	WAD Sidedef structure				*
*-------------------------------------------------------*
			rsreset
*-------------------------------------------------------*
sidedef_xoff:		rs.w	1
sidedef_yoff:		rs.w	1
sidedef_utns:		rs.b	8
sidedef_ltns:		rs.b	8
sidedef_mtns:		rs.b	8
sidedef_sector:		rs.w	1
sidedef_len:		rs.b	0

*-------------------------------------------------------*
*	WAD Linedef structure				*
*-------------------------------------------------------*
			rsreset
*-------------------------------------------------------*
linedef_from:		rs.w	1
linedef_to:		rs.w	1
linedef_attrib:		rs.w	1
linedef_type:		rs.w	1
linedef_tag:		rs.w	1
linedef_right:		rs.w	1
linedef_left:		rs.w	1
linedef_len:		rs.b	0

*-------------------------------------------------------*
*	WAD Node structure				*
*-------------------------------------------------------*
			rsreset
*-------------------------------------------------------*
node_x:			rs.w	1
node_y:			rs.w	1
node_dx:		rs.w	1
node_dy:		rs.w	1
node_rvtx:		rs.b	0
node_ry2:		rs.w	1
node_ry1:		rs.w	1
node_rx1:		rs.w	1
node_rx2:		rs.w	1
node_lvtx:		rs.b	0
node_ly2:		rs.w	1
node_ly1:		rs.w	1
node_lx1:		rs.w	1
node_lx2:		rs.w	1
node_right:		rs.w	1	
node_left:		rs.w	1
node_len:		rs.b	0

*-------------------------------------------------------*
*	General display structure			*
*-------------------------------------------------------*
			rsreset
*-------------------------------------------------------*
display_sina:		rs.w	1	; sin(pangle)
display_cosa:		rs.w	1	; cos(pangle)
display_px:		rs.w	1	; px
display_py:		rs.w	1	; py
display_width:		rs.w	1	; window x-size
display_shwid:		rs.w	1	; window x-size/2
display_imin:		rs.l	1	; projected node min-x
display_imax:		rs.l	1	; projected node max-x
display_octant:		rs.w	1	; node-octant code for pangle
display_segbase:	rs.w	1	; initial seg index for ssector
display_segnum:		rs.w	1	; seg count for ssector

display_nodes:		rs.l	1	; node-array
display_segs:		rs.l	1	; seg-array
display_sectors:	rs.l	1	; sector-array
display_ssectors:	rs.l	1	; ssector-array
display_sidedefs:	rs.l	1	; sidedef-array
display_linedefs:	rs.l	1	; linedef-array
display_vertices:	rs.l	1	; vertex-array

display_len:		rs.b	0

*-------------------------------------------------------*
*	AddWall local variable structure		*
*-------------------------------------------------------*
			rsreset
*-------------------------------------------------------*
addwall_tex:		rs.l	1	; wall texture ID
addwall_i1:		rs.l	1	; wall screen-x1 (unclipped)
addwall_i2:		rs.l	1	; wall screen-x2 (unclipped)
addwall_ci2:		rs.l	1	; wall screen-x2 (clipped)
addwall_y1:		rs.l	1	; wall top
addwall_y2:		rs.l	1	; wall bottom
addwall_z1:		rs.l	1	; wall left-z
addwall_z2:		rs.l	1	; wall right-z
addwall_y1a:		rs.l	1	; wall y1 (upper-edge) accumulator
addwall_y2a:		rs.l	1	; wall y2 (lower-edge) accumulator
addwall_y1i:		rs.l	1	; wall y1 (top-edge) increment
addwall_y2i:		rs.l	1	; wall y2 (lower-edge) increment
addwall_hi:		rs.l	1	; high-res (16.16) screen-x (x1)
addwall_hdi:		rs.l	1	; high-res (16.16) screen-dx (x2-x1)
addwall_xsize:		rs.w	1	; window x-size
addwall_ysize:		rs.w	1	; window y-size
addwall_runs:		rs.w	1	; local copy of wall-runs total
addwall_columns:	rs.w	1	; local copy of column-count
addwall_fc:		rs.w	1	; floor colour/texture-ID
addwall_cc:		rs.w	1	; ceiling colour/texture-ID
addwall_opaque:		rs.b	1	; solid flag for textures with holes
addwall_type:		rs.b	1	; wall type (upper/lower/main)
addwall_len:		rs.b	0

