/** Draw the map tiles on the radar. */ static void DrawRadarTiles(void) { SDWORD x, y; for (x = scrollMinX; x < scrollMaxX; x++) { for (y = scrollMinY; y < scrollMaxY; y++) { MAPTILE *psTile = mapTile(x, y); size_t pos = radarTexWidth * (y - scrollMinY) + (x - scrollMinX); ASSERT(pos * sizeof(*radarBuffer) < radarBufferSize, "Buffer overrun"); radarBuffer[pos] = appliedRadarColour(radarDrawMode, psTile).rgba; } } }
/** Draw the map tiles on the radar. */ static void DrawRadarTiles() { SDWORD x, y; for (x = scrollMinX; x < scrollMaxX; x++) { for (y = scrollMinY; y < scrollMaxY; y++) { MAPTILE *psTile = mapTile(x, y); size_t pos = radarTexWidth * (y - scrollMinY) + (x - scrollMinX); ASSERT(pos * sizeof(*radarBuffer) < radarBufferSize, "Buffer overrun"); if (y == scrollMinY || x == scrollMinX || y == scrollMaxY - 1 || x == scrollMaxX - 1) { radarBuffer[pos] = WZCOL_BLACK.rgba; continue; } radarBuffer[pos] = appliedRadarColour(radarDrawMode, psTile).rgba; } } }