MiniDoom

src/m_bbox.ml

Maintains fixed-point top, bottom, left, and right bounds for renderer and map geometry.

Package
(global)
Reachable
Yes

Imports

Declarations

BBOX_MAXINT

const BBOX_MAXINT = 2147483647

Defines the maximum bbox maxint accepted by the m bbox subsystem.

View source

BBOX_MININT

const BBOX_MININT = -2147483648

Defines the minimum bbox minint accepted by the m bbox subsystem.

View source

BOXBOTTOM

const BOXBOTTOM = 1

Defines boxbottom for the m bbox subsystem.

View source

BOXLEFT

const BOXLEFT = 2

Defines boxleft for the m bbox subsystem.

View source

BOXRIGHT

const BOXRIGHT = 3

Defines boxright for the m bbox subsystem.

View source

BOXTOP

const BOXTOP = 0

Defines boxtop for the m bbox subsystem.

View source

M_AddToBox

function M_AddToBox(box, x, y)

Expands a four-entry bounding box in place to include one fixed-point coordinate.

ParameterTypeDefaultDescription
boxdynamic—Bounding-box array to read or update.
xdynamic—Horizontal map- or screen-space coordinate.
ydynamic—Vertical map- or screen-space coordinate.

View source

M_ClearBox

function M_ClearBox(box)

Resets a four-entry bounding box to inverted extremes so the next point establishes every edge.

ParameterTypeDefaultDescription
boxdynamic—Bounding-box array to read or update.

View source