XenevaOS
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
am_map.c File Reference
#include <stdio.h>
#include "deh_main.h"
#include "z_zone.h"
#include "doomkeys.h"
#include "doomdef.h"
#include "st_stuff.h"
#include "p_local.h"
#include "w_wad.h"
#include "m_cheat.h"
#include "m_controls.h"
#include "m_misc.h"
#include "i_system.h"
#include "v_video.h"
#include "doomstat.h"
#include "r_state.h"
#include "dstrings.h"
#include "am_map.h"
Include dependency graph for am_map.c:

Classes

struct  fpoint_t
 
struct  fline_t
 
struct  mpoint_t
 
struct  mline_t
 
struct  islope_t
 

Macros

#define REDS   (256-5*16)
 
#define REDRANGE   16
 
#define BLUES   (256-4*16+8)
 
#define BLUERANGE   8
 
#define GREENS   (7*16)
 
#define GREENRANGE   16
 
#define GRAYS   (6*16)
 
#define GRAYSRANGE   16
 
#define BROWNS   (4*16)
 
#define BROWNRANGE   16
 
#define YELLOWS   (256-32+7)
 
#define YELLOWRANGE   1
 
#define BLACK   0
 
#define WHITE   (256-47)
 
#define BACKGROUND   BLACK
 
#define YOURCOLORS   WHITE
 
#define YOURRANGE   0
 
#define WALLCOLORS   REDS
 
#define WALLRANGE   REDRANGE
 
#define TSWALLCOLORS   GRAYS
 
#define TSWALLRANGE   GRAYSRANGE
 
#define FDWALLCOLORS   BROWNS
 
#define FDWALLRANGE   BROWNRANGE
 
#define CDWALLCOLORS   YELLOWS
 
#define CDWALLRANGE   YELLOWRANGE
 
#define THINGCOLORS   GREENS
 
#define THINGRANGE   GREENRANGE
 
#define SECRETWALLCOLORS   WALLCOLORS
 
#define SECRETWALLRANGE   WALLRANGE
 
#define GRIDCOLORS   (GRAYS + GRAYSRANGE/2)
 
#define GRIDRANGE   0
 
#define XHAIRCOLORS   GRAYS
 
#define AM_NUMMARKPOINTS   10
 
#define INITSCALEMTOF   (.2*FRACUNIT)
 
#define F_PANINC   4
 
#define M_ZOOMIN   ((int) (1.02*FRACUNIT))
 
#define M_ZOOMOUT   ((int) (FRACUNIT/1.02))
 
#define FTOM(x)   FixedMul(((x)<<16),scale_ftom)
 
#define MTOF(x)   (FixedMul((x),scale_mtof)>>16)
 
#define CXMTOF(x)   (f_x + MTOF((x)-m_x))
 
#define CYMTOF(y)   (f_y + (f_h - MTOF((y)-m_y)))
 
#define LINE_NEVERSEE   ML_DONTDRAW
 
#define R   ((8*PLAYERRADIUS)/7)
 
#define R   ((8*PLAYERRADIUS)/7)
 
#define R   (FRACUNIT)
 
#define R   (FRACUNIT)
 
#define DOOUTCODE(oc, mx, my)
 
#define PUTDOT(xx, yy, cc)   fb[(yy)*f_w+(xx)]=(cc)
 

Functions

void AM_getIslope (mline_t *ml, islope_t *is)
 
void AM_activateNewScale (void)
 
void AM_saveScaleAndLoc (void)
 
void AM_restoreScaleAndLoc (void)
 
void AM_addMark (void)
 
void AM_findMinMaxBoundaries (void)
 
void AM_changeWindowLoc (void)
 
void AM_initVariables (void)
 
void AM_loadPics (void)
 
void AM_unloadPics (void)
 
void AM_clearMarks (void)
 
void AM_LevelInit (void)
 
void AM_Stop (void)
 
void AM_Start (void)
 
void AM_minOutWindowScale (void)
 
void AM_maxOutWindowScale (void)
 
boolean AM_Responder (event_t *ev)
 
void AM_changeWindowScale (void)
 
void AM_doFollowPlayer (void)
 
void AM_updateLightLev (void)
 
void AM_Ticker (void)
 
void AM_clearFB (int color)
 
boolean AM_clipMline (mline_t *ml, fline_t *fl)
 
void AM_drawFline (fline_t *fl, int color)
 
void AM_drawMline (mline_t *ml, int color)
 
void AM_drawGrid (int color)
 
void AM_drawWalls (void)
 
void AM_rotate (fixed_t *x, fixed_t *y, angle_t a)
 
void AM_drawLineCharacter (mline_t *lineguy, int lineguylines, fixed_t scale, angle_t angle, int color, fixed_t x, fixed_t y)
 
void AM_drawPlayers (void)
 
void AM_drawThings (int colors, int colorrange)
 
void AM_drawMarks (void)
 
void AM_drawCrosshair (int color)
 
void AM_Drawer (void)
 

Variables

mline_t player_arrow []
 
mline_t cheat_player_arrow []
 
mline_t triangle_guy []
 
mline_t thintriangle_guy []
 
boolean automapactive = false
 
cheatseq_t cheat_amap = CHEAT("iddt", 0)
 

Macro Definition Documentation

◆ AM_NUMMARKPOINTS

#define AM_NUMMARKPOINTS   10

◆ BACKGROUND

#define BACKGROUND   BLACK

◆ BLACK

#define BLACK   0

◆ BLUERANGE

#define BLUERANGE   8

◆ BLUES

#define BLUES   (256-4*16+8)

◆ BROWNRANGE

#define BROWNRANGE   16

◆ BROWNS

#define BROWNS   (4*16)

◆ CDWALLCOLORS

#define CDWALLCOLORS   YELLOWS

◆ CDWALLRANGE

#define CDWALLRANGE   YELLOWRANGE

◆ CXMTOF

#define CXMTOF (   x)    (f_x + MTOF((x)-m_x))

◆ CYMTOF

#define CYMTOF (   y)    (f_y + (f_h - MTOF((y)-m_y)))

◆ DOOUTCODE

#define DOOUTCODE (   oc,
  mx,
  my 
)
Value:
(oc) = 0; \
if ((my) < 0) (oc) |= TOP; \
else if ((my) >= f_h) (oc) |= BOTTOM; \
if ((mx) < 0) (oc) |= LEFT; \
else if ((mx) >= f_w) (oc) |= RIGHT;
@ TOP
Definition h264bsd_deblocking.c:138
@ LEFT
Definition h264bsd_deblocking.c:138
@ BOTTOM
Definition propstrings.h:49
@ RIGHT
Definition propstrings.h:66

◆ F_PANINC

#define F_PANINC   4

◆ FDWALLCOLORS

#define FDWALLCOLORS   BROWNS

◆ FDWALLRANGE

#define FDWALLRANGE   BROWNRANGE

◆ FTOM

#define FTOM (   x)    FixedMul(((x)<<16),scale_ftom)

◆ GRAYS

#define GRAYS   (6*16)

◆ GRAYSRANGE

#define GRAYSRANGE   16

◆ GREENRANGE

#define GREENRANGE   16

◆ GREENS

#define GREENS   (7*16)

◆ GRIDCOLORS

#define GRIDCOLORS   (GRAYS + GRAYSRANGE/2)

◆ GRIDRANGE

#define GRIDRANGE   0

◆ INITSCALEMTOF

#define INITSCALEMTOF   (.2*FRACUNIT)

◆ LINE_NEVERSEE

#define LINE_NEVERSEE   ML_DONTDRAW

◆ M_ZOOMIN

#define M_ZOOMIN   ((int) (1.02*FRACUNIT))

◆ M_ZOOMOUT

#define M_ZOOMOUT   ((int) (FRACUNIT/1.02))

◆ MTOF

#define MTOF (   x)    (FixedMul((x),scale_mtof)>>16)

◆ PUTDOT

#define PUTDOT (   xx,
  yy,
  cc 
)    fb[(yy)*f_w+(xx)]=(cc)

◆ R [1/4]

#define R   ((8*PLAYERRADIUS)/7)

◆ R [2/4]

#define R   ((8*PLAYERRADIUS)/7)

◆ R [3/4]

#define R   (FRACUNIT)

◆ R [4/4]

#define R   (FRACUNIT)

◆ REDRANGE

#define REDRANGE   16

◆ REDS

#define REDS   (256-5*16)

◆ SECRETWALLCOLORS

#define SECRETWALLCOLORS   WALLCOLORS

◆ SECRETWALLRANGE

#define SECRETWALLRANGE   WALLRANGE

◆ THINGCOLORS

#define THINGCOLORS   GREENS

◆ THINGRANGE

#define THINGRANGE   GREENRANGE

◆ TSWALLCOLORS

#define TSWALLCOLORS   GRAYS

◆ TSWALLRANGE

#define TSWALLRANGE   GRAYSRANGE

◆ WALLCOLORS

#define WALLCOLORS   REDS

◆ WALLRANGE

#define WALLRANGE   REDRANGE

◆ WHITE

#define WHITE   (256-47)

◆ XHAIRCOLORS

#define XHAIRCOLORS   GRAYS

◆ YELLOWRANGE

#define YELLOWRANGE   1

◆ YELLOWS

#define YELLOWS   (256-32+7)

◆ YOURCOLORS

#define YOURCOLORS   WHITE

◆ YOURRANGE

#define YOURRANGE   0

Function Documentation

◆ AM_activateNewScale()

void AM_activateNewScale ( void  )

◆ AM_addMark()

void AM_addMark ( void  )

◆ AM_changeWindowLoc()

void AM_changeWindowLoc ( void  )

◆ AM_changeWindowScale()

void AM_changeWindowScale ( void  )

◆ AM_clearFB()

void AM_clearFB ( int  color)

◆ AM_clearMarks()

void AM_clearMarks ( void  )

◆ AM_clipMline()

boolean AM_clipMline ( mline_t *  ml,
fline_t *  fl 
)

◆ AM_doFollowPlayer()

void AM_doFollowPlayer ( void  )

◆ AM_drawCrosshair()

void AM_drawCrosshair ( int  color)

◆ AM_Drawer()

void AM_Drawer ( void  )

◆ AM_drawFline()

void AM_drawFline ( fline_t *  fl,
int  color 
)

◆ AM_drawGrid()

void AM_drawGrid ( int  color)

◆ AM_drawLineCharacter()

void AM_drawLineCharacter ( mline_t *  lineguy,
int  lineguylines,
fixed_t  scale,
angle_t  angle,
int  color,
fixed_t  x,
fixed_t  y 
)

◆ AM_drawMarks()

void AM_drawMarks ( void  )

◆ AM_drawMline()

void AM_drawMline ( mline_t *  ml,
int  color 
)

◆ AM_drawPlayers()

void AM_drawPlayers ( void  )

◆ AM_drawThings()

void AM_drawThings ( int  colors,
int  colorrange 
)

◆ AM_drawWalls()

void AM_drawWalls ( void  )

◆ AM_findMinMaxBoundaries()

void AM_findMinMaxBoundaries ( void  )

◆ AM_getIslope()

void AM_getIslope ( mline_t *  ml,
islope_t *  is 
)

◆ AM_initVariables()

void AM_initVariables ( void  )

◆ AM_LevelInit()

void AM_LevelInit ( void  )

◆ AM_loadPics()

void AM_loadPics ( void  )

◆ AM_maxOutWindowScale()

void AM_maxOutWindowScale ( void  )

◆ AM_minOutWindowScale()

void AM_minOutWindowScale ( void  )

◆ AM_Responder()

boolean AM_Responder ( event_t *  ev)

◆ AM_restoreScaleAndLoc()

void AM_restoreScaleAndLoc ( void  )

◆ AM_rotate()

void AM_rotate ( fixed_t *  x,
fixed_t *  y,
angle_t  a 
)

◆ AM_saveScaleAndLoc()

void AM_saveScaleAndLoc ( void  )

◆ AM_Start()

void AM_Start ( void  )

◆ AM_Stop()

void AM_Stop ( void  )

◆ AM_Ticker()

void AM_Ticker ( void  )

◆ AM_unloadPics()

void AM_unloadPics ( void  )

◆ AM_updateLightLev()

void AM_updateLightLev ( void  )

Variable Documentation

◆ automapactive

boolean automapactive = false

◆ cheat_amap

cheatseq_t cheat_amap = CHEAT("iddt", 0)

◆ cheat_player_arrow

mline_t cheat_player_arrow[]
Initial value:
= {
{ { -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+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 } },
{ { -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 } },
{ { -R/6, -R/6 }, { 0, -R/6 } },
{ { 0, -R/6 }, { 0, R/4 } },
{ { 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 } }
}
#define R
Definition am_map.c:143

◆ player_arrow

mline_t player_arrow[]
Initial value:
= {
{ { -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+3*R/8, 0 }, { -R+R/8, R/4 } },
{ { -R+3*R/8, 0 }, { -R+R/8, -R/4 } }
}

◆ thintriangle_guy

mline_t thintriangle_guy[]
Initial value:
= {
{ { (fixed_t)(-.5*R), (fixed_t)(-.7*R) }, { (fixed_t)(R ), (fixed_t)(0 ) } },
{ { (fixed_t)(R ), (fixed_t)(0 ) }, { (fixed_t)(-.5*R), (fixed_t)(.7*R ) } },
{ { (fixed_t)(-.5*R), (fixed_t)(.7*R ) }, { (fixed_t)(-.5*R), (fixed_t)(-.7*R) } }
}
int fixed_t
Definition m_fixed.h:32

◆ triangle_guy

mline_t triangle_guy[]
Initial value:
= {
{ { (fixed_t)(-.867*R), (fixed_t)(-.5*R) }, { (fixed_t)(.867*R ), (fixed_t)(-.5*R) } },
{ { (fixed_t)(.867*R ), (fixed_t)(-.5*R) }, { (fixed_t)(0 ), (fixed_t)(R ) } },
{ { (fixed_t)(0 ), (fixed_t)(R ) }, { (fixed_t)(-.867*R), (fixed_t)(-.5*R) } }
}