MCPcopy Create free account
hub / github.com/atraczyk/2d-engine / adjustPosition

Method adjustPosition

engine/src/tile.cpp:147–150  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

145}
146
147void TileMap::adjustPosition(Camera *pcamera) {
148 position.x = -(int)((pcamera->size.x / 2) * w_depth);
149 position.y = -(int)((pcamera->size.y / 2) * w_depth);
150}
151
152void TileMap::initialize(float x, float y, int w, int h, float tilewidth,
153 float tileheight, float depth, TileAtlas *ptexatlas,

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected