MCPcopy Create free account
hub / github.com/ddnet/ddnet / ClearPixelsTile

Function ClearPixelsTile

src/tools/map_optimize.cpp:47–65  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47static void ClearPixelsTile(uint8_t *pImg, int Width, int Height, int TileIndex)
48{
49 int WTile = Width / 16;
50 int HTile = Height / 16;
51 int StartX = (TileIndex % 16) * WTile;
52 int StartY = (TileIndex / 16) * HTile;
53
54 for(int y = StartY; y < StartY + HTile; ++y)
55 {
56 for(int x = StartX; x < StartX + WTile; ++x)
57 {
58 int Index = y * Width * 4 + x * 4;
59 pImg[Index + 0] = 0;
60 pImg[Index + 1] = 0;
61 pImg[Index + 2] = 0;
62 pImg[Index + 3] = 0;
63 }
64 }
65}
66
67static void GetImageSHA256(uint8_t *pImgBuff, int ImgSize, int Width, int Height, char *pSHA256Str, size_t SHA256StrSize)
68{

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected