MCPcopy Create free account
hub / github.com/OpenXcom/OpenXcom / GetPitch

Function GetPitch

src/Engine/Surface.cpp:56–59  ·  view source on GitHub ↗

* Helper function counting pitch in bytes with 16byte padding * @param bpp bytes per pixel * @param width number of pixel in row * @return pitch in bytes */

Source from the content-addressed store, hash-verified

54 * @return pitch in bytes
55 */
56inline int GetPitch(int bpp, int width)
57{
58 return ((bpp/8) * width + 15) & ~0xF;
59}
60
61/**
62 * Helper function creating aligned buffer

Callers 3

NewAlignedFunction · 0.85
SurfaceMethod · 0.85
resizeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected