MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / Map_Tile_Draw

Method Map_Tile_Draw

Source/PC/Graphics_PC.cpp:267–284  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267void cGraphics_PC::Map_Tile_Draw( cSurface *pTarget, uint16 pTile, uint16 pX, uint16 pY, uint16 pOffset) {
268 uint8* Target = pTarget->GetSurfaceBuffer();
269
270 pX *= (16 + pOffset);
271
272 Target += (pY * (16 + pOffset)) * pTarget->GetWidth();
273 Target += pX;
274
275 uint8* TilePtr = mTile_Gfx_Ptrs[pTile];
276
277 for (uint16 i = 0; i < 16; ++i) {
278
279 memcpy(Target, TilePtr, 16);
280
281 TilePtr += 320;
282 Target += pTarget->GetWidth();
283 }
284}
285
286void cGraphics_PC::MapTiles_Draw() {
287

Callers

nothing calls this directly

Calls 2

GetSurfaceBufferMethod · 0.80
GetWidthMethod · 0.80

Tested by

no test coverage detected