camera controller
This commit is contained in:
parent
a1f8e26d9a
commit
83e312894b
5 changed files with 15 additions and 9 deletions
|
@ -25,8 +25,8 @@ void PDestroyTexture(PhoenixTexture *texture) {
|
|||
|
||||
void PRenderTexture(PhoenixTexture *texture, int x, int y) {
|
||||
SDL_Rect dstRect{};
|
||||
dstRect.x = x;
|
||||
dstRect.y = y;
|
||||
dstRect.x = x - state.camera.x;
|
||||
dstRect.y = y - state.camera.y;
|
||||
dstRect.w = TEXTURE_WIDTH;
|
||||
dstRect.h = TEXTURE_HEIGHT;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue