Game camera system. More...
Functions | |
| void | Camera_UpdatePosition () |
| [PostUpdate] Updates the camera position based on player position and mouse input | |
| Vec2 | Camera_WorldVecToScreen (Vec2 worldPosition) |
| [Utility] Converts world coordinates to screen coordinates | |
| Vec2 | Camera_ScreenVecToWorld (Vec2 screenPosition) |
| [Utility] Converts screen coordinates to world coordinates | |
| SDL_Rect | Camera_ScreenRectToWorld (SDL_Rect screenRect) |
| [Utility] Converts a screen rectangle to world coordinates | |
| SDL_Rect | Camera_GetWorldViewRect () |
| [Utility] Gets the current view rectangle in world coordinates | |
| bool | Camera_WorldRectIsOnScreen (SDL_Rect rect) |
| [Utility] Checks if a rectangle is visible on screen | |
| bool | Camera_ScreenRectIsOnScreen (SDL_Rect rect) |
Variables | |
| CameraSystem | camera |
Game camera system.
Manages the game's camera view, handling player tracking, coordinate transformations between screen and world space, and viewport calculations.
| SDL_Rect Camera_GetWorldViewRect | ( | ) |
[Utility] Gets the current view rectangle in world coordinates
| bool Camera_ScreenRectIsOnScreen | ( | SDL_Rect | rect | ) |
| SDL_Rect Camera_ScreenRectToWorld | ( | SDL_Rect | screenRect | ) |
[Utility] Converts a screen rectangle to world coordinates
| screenRect | Rectangle in screen space |
[Utility] Converts screen coordinates to world coordinates
| screenPosition | Position in screen space |
| void Camera_UpdatePosition | ( | ) |
[PostUpdate] Updates the camera position based on player position and mouse input
| bool Camera_WorldRectIsOnScreen | ( | SDL_Rect | rect | ) |
[Utility] Checks if a rectangle is visible on screen
| rect | Rectangle in world coordinates to check |
[Utility] Converts world coordinates to screen coordinates
| worldPosition | Position in world space |
| CameraSystem camera |