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

Method Tile_Prepare_Gfx

Source/PC/Graphics_PC.cpp:215–238  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

213}
214
215void cGraphics_PC::Tile_Prepare_Gfx() {
216 uint16 TileOffset = 0, Tile = 0;
217
218 for (auto& TilePtr : mTile_Gfx_Ptrs) {
219 TilePtr = 0;
220 }
221
222 for (uint16 cx = 0; cx < 240; ++cx) {
223
224 mTile_Gfx_Ptrs[cx + 0x00] = mFodder->mTile_BaseBlk->data() + TileOffset;
225 mTile_Gfx_Ptrs[cx + 0xF0] = mFodder->mTile_SubBlk->data() + TileOffset;
226
227 ++Tile;
228 TileOffset += 0x10;
229
230 // 20 Tiles per row, have we reached end of row?
231 if (Tile % 20 == 0) {
232 Tile = 0;
233
234 // Skip the rest of the rows for the current tile (240 * 20)
235 TileOffset += 0x12C0;
236 }
237 }
238}
239
240void cGraphics_PC::PaletteLoad( const uint8 *pBuffer, uint32 pColors, uint32 pColorID ) {
241 size_t colorStartID = pColorID;

Callers 1

Map_Load_ResourcesMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected