Mercurial > hg > batmud > maputils
changeset 1881:07658e9da93c
Use pattern->{width, height} instead of previously computed width and height
to prepare for pattern block auto cropping.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Sat, 04 Nov 2017 20:25:39 +0200 |
parents | 6d42169d60aa |
children | 6294c4ae82b2 |
files | mapsearch.c |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mapsearch.c Sat Nov 04 20:24:42 2017 +0200 +++ b/mapsearch.c Sat Nov 04 20:25:39 2017 +0200 @@ -880,8 +880,8 @@ { MAPInfoCtx *info = &optMaps[nmap]; - for (int oy = 0; oy < info->map->height - height; oy++) - for (int ox = 0; ox < info->map->width - width; ox++) + for (int oy = 0; oy < info->map->height - pattern->height; oy++) + for (int ox = 0; ox < info->map->width - pattern->width; ox++) { // Check for match double accuracy = mapMatchBlock(info->map, pattern, ox, oy, TRUE);