diff options
| author | XaviDCR92 <xavi.dcr@gmail.com> | 2017-03-09 23:59:53 +0100 |
|---|---|---|
| committer | XaviDCR92 <xavi.dcr@gmail.com> | 2017-03-09 23:59:53 +0100 |
| commit | f416816883545433ea33ca410983371e657dba18 (patch) | |
| tree | 1c8682679b1c67261447570c4f66d0d8919bdc00 /Camera.c | |
| parent | 8ec41b4410aba535008daf991ea59a8740951d44 (diff) | |
| download | pocketempires-f416816883545433ea33ca410983371e657dba18.tar.gz | |
* Nearest unit and/or building is found (no sqrt method used).
* Preliminar unit/building selection algorithm.
* Added cursor onscreen.
- Removed old Peasant sprites. Only 2 sprites needed!
Diffstat (limited to 'Camera.c')
| -rw-r--r-- | Camera.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -28,6 +28,20 @@ void CameraInit(TYPE_CAMERA * ptrCamera) ptrCamera->Speed_Timer = SPEED_CALCULATION_TIME; } +TYPE_COLLISION_BLOCK CameraApplyCoordinatesToCoordinates( TYPE_CAMERA * ptrCamera, + uint16_t x, + uint16_t y ) +{ + TYPE_COLLISION_BLOCK cb; + + memset(&cb, 0, sizeof(TYPE_COLLISION_BLOCK)); + + cb.x = x + ptrCamera->X_Offset; + cb.y = y + ptrCamera->Y_Offset; + + return cb; +} + void CameraApplyCoordinatesToSprite(TYPE_CAMERA * ptrCamera, TYPE_SPRITE * spr, uint16_t x, |
