aboutsummaryrefslogtreecommitdiff
path: root/src/camera
Commit message (Collapse)AuthorAgeFilesLines
* Remap calls to pad/mouse/keyboard to inputXavier Del Campo Romero2022-09-206-31/+52
|
* mouse.c: Reduce thresholdXavier Del Campo Romero2022-09-161-2/+2
|
* camera: implement fixed cursor movementXavier Del Campo Romero2022-06-243-3/+77
| | | | | | | | | | | On platforms with PERIPHERAL_TYPE_PAD, navigating through menus and options can be cumbersome if moving the cursor freely around the screen. Therefore, this commit instead defines a list of (X, Y) coordinates that the cursor can jump to. The implementation also attempts to guess which direction the cursor should jump to for the previous/next point, and hence determine which button should be pressed by the user.
* camera.c: refactor cursor_initXavier Del Campo Romero2022-06-241-4/+15
| | | | So that uninitialized members are set to 0.
* camera: remove dependency against terrainXavier Del Campo Romero2022-06-124-9/+13
| | | | | This will allow using camera for purposes other than showing the game map.
* Split peripheral-related logic into its own componentXavier Del Campo Romero2022-06-126-15/+30
| | | | | | | | | | | This has several advantages: - `camera` no longer needs to define public functions for each peripheral type. - Peripheral-related is now no longer tighly coupled to human_player, so peripheral logic can be reused elsewhere e.g.: on menus. - Makes camera_update_touch consistent compared to equivalent functions, since now `pan` has now been moved to `camera` (as it should be).
* Implement touch controlsXavier Del Campo Romero2022-03-313-1/+59
|
* Rename MAP_{X|Y} to MAP_{W|H}Xavier Del Campo Romero2022-03-302-6/+6
|
* camera: implement mouse supportXavier Del Campo Romero2022-03-301-2/+27
|
* Move CURSOR_{WIDTH|HEIGHT} to library scopeXavier Del Campo Romero2022-03-302-13/+13
|
* Add support for keyboard and mouseXavier Del Campo Romero2022-03-306-105/+169
|
* Replace x_get functions with macrosXavier Del Campo Romero2022-03-301-2/+2
| | | | | | The PS1 port relies on a heap for primitives since the GPU renders the scene asynchronously. However, SDL-based platforms render primitives synchronously, so structures can be allocated on the stack instead.
* Refresh camera and terrain rendering on screen resizeXavier Del Campo Romero2022-03-302-0/+10
|
* Add project source codeXavier Del Campo Romero2022-03-303-0/+248