tiles: constify data and API call arguments as appropriate

This commit is contained in:
Darryl L. Miles 2025-01-31 15:59:26 +00:00 committed by R. Timothy Edwards
parent d082c67b03
commit cc6e7ebe84
3 changed files with 6 additions and 6 deletions

View File

@ -53,7 +53,7 @@ TiSrPoint(hintTile, plane, point)
* with the plane instead.
*/
Plane * plane; /* Plane (containing hint tile pointer) */
Point * point; /* Point for which to search */
const Point * point; /* Point for which to search */
{
Tile *tp = (hintTile) ? hintTile : PlaneGetHint(plane);

View File

@ -57,7 +57,7 @@ TiSetBody(tp, b)
* this area.
*/
global Rect TiPlaneRect = { {MINFINITY+2, MINFINITY+2}, {INFINITY-2, INFINITY-2} };
global const Rect TiPlaneRect = { {MINFINITY+2, MINFINITY+2}, {INFINITY-2, INFINITY-2} };
#ifdef HAVE_SYS_MMAN_H
@ -212,7 +212,7 @@ TiFreePlane(plane)
void
TiToRect(tile, rect)
Tile *tile; /* Tile whose bounding box is to be stored in *rect */
const Tile *tile; /* Tile whose bounding box is to be stored in *rect */
Rect *rect; /* Pointer to rect to be set to bounding box */
{
rect->r_xbot = LEFT(tile);

View File

@ -196,14 +196,14 @@ PlaneSetHint_inline(Plane *pl, Tile *ti)
extern Plane *TiNewPlane(Tile *tile);
extern void TiFreePlane(Plane *plane);
extern void TiToRect(Tile *tile, Rect *rect);
extern void TiToRect(const Tile *tile, Rect *rect);
extern Tile *TiSplitX(Tile *tile, int x);
extern Tile *TiSplitY(Tile *tile, int y);
extern Tile *TiSplitX_Left(Tile *tile, int x);
extern Tile *TiSplitY_Bottom(Tile *tile, int y);
extern void TiJoinX(Tile *tile1, Tile *tile2, Plane *plane);
extern void TiJoinY(Tile *tile1, Tile *tile2, Plane *plane);
extern Tile *TiSrPoint(Tile *hint, Plane *plane, Point *point);
extern Tile *TiSrPoint(Tile *hint, Plane *plane, const Point *point);
#define TiBottom(tp) (BOTTOM(tp))
#define TiLeft(tp) (LEFT(tp))
@ -335,7 +335,7 @@ extern void TiFree(Tile *tile);
((rp)->r_xbot = LEFT(tp), (rp)->r_ybot = BOTTOM(tp), \
(rp)->r_xtop = RIGHT(tp), (rp)->r_ytop = TOP(tp))
extern Rect TiPlaneRect; /* Rectangle large enough to force area
extern const Rect TiPlaneRect; /* Rectangle large enough to force area
* search to visit every tile in the
* plane. This is the largest rectangle
* that should ever be painted in a plane.