Mercurial > hg > batmud > maputils
changeset 2083:c7d0e5200c4f
Constify.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Wed, 21 Aug 2019 15:07:11 +0300 |
parents | f603384d6c5a |
children | 5933039ce1fd |
files | mkspecial.c |
diffstat | 1 files changed, 6 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/mkspecial.c Wed Aug 21 15:03:18 2019 +0300 +++ b/mkspecial.c Wed Aug 21 15:07:11 2019 +0300 @@ -187,7 +187,8 @@ /* Calculate matching percentage of given block against a map, * with using specified x/y offsets. */ -float matchBlock(MapBlock *map, MapBlock *match, int ox, int oy, BOOL hardDrop) +float matchBlock(MapBlock *map, MapBlock *match, + const int ox, const int oy, const BOOL hardDrop) { int n, k; @@ -235,7 +236,7 @@ } -BOOL adjustBlockCenter(MapBlock *block, char centerCh) +BOOL adjustBlockCenter(MapBlock *block, const char centerCh) { for (int y = 0; y < block->height; y++) for (int x = 0; x < block->width; x++) @@ -256,7 +257,7 @@ /* Parse next block (marked by string optPattern) from * input stream into a mapblock, return NULL if not found or error. */ -BOOL getLineData(FILE *inFile, char *buf, size_t bufSize) +BOOL getLineData(FILE *inFile, char *buf, const size_t bufSize) { if (feof(inFile) || !fgets(buf, bufSize, inFile)) { @@ -267,7 +268,8 @@ return TRUE; } -int getLineWidth(char *buf, size_t bufSize) + +int getLineWidth(char *buf, const size_t bufSize) { size_t width;