aboutsummaryrefslogtreecommitdiff
path: root/src/game
Commit message (Collapse)AuthorAgeFilesLines
* Remove resource, tech and old game resourcesXavier Del Campo Romero2024-01-273-306/+3
|
* WIPXavier Del Campo Romero2022-11-013-43/+54
|
* Implement checkbox GUI elementXavier Del Campo Romero2022-09-231-0/+10
|
* Implement GUI line editXavier Del Campo Romero2022-09-201-0/+28
|
* Implement main menuXavier Del Campo Romero2022-06-263-9/+11
|
* Revamp gui componentXavier Del Campo Romero2022-06-262-15/+15
| | | | | | | | | | | | | | | | | | | | `gui` was tighly coupled to game logic, and could not be extended for other purposes. Therefore, a generic GUI implementation, loosely inspired by well-known GUI frameworks such as GTK, is now provided, with the following properties: - Does not depend on dynamic or static memory allocation, only automatic (i.e., stack) memory allocation required. - Portable among existing implementations. - Simple to extend. - Tiny memory footprint. `gui` is now composed by GUI elements that can be chained to form a tree structure. This is useful e.g.: to calculate X/Y coordinates for a given GUI element given its parent(s). This commit also refactors the older implementation, moving game-specific logic into `player` and making use of the new component.
* peripheral: provide common actionsXavier Del Campo Romero2022-06-241-1/+2
| | | | | | Whereas some actions are context-specific (e.g.: selecting a player), some are context-independent and can be executed for all screens (e.g.: exiting the game).
* camera: remove dependency against terrainXavier Del Campo Romero2022-06-121-0/+6
| | | | | 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-121-1/+1
| | | | | | | | | | | 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 button componentXavier Del Campo Romero2022-06-112-1/+30
|
* Make gfx_draw return intXavier Del Campo Romero2022-05-241-1/+3
|
* Implement touch controlsXavier Del Campo Romero2022-03-311-3/+2
|
* Implement sub-tile collboxesXavier Del Campo Romero2022-03-301-2/+5
| | | | These will be later used by the pathfinding algorithm.
* game.c: remove #if 0Xavier Del Campo Romero2022-03-301-2/+2
|
* Add support for keyboard and mouseXavier Del Campo Romero2022-03-301-0/+1
|
* Refresh camera and terrain rendering on screen resizeXavier Del Campo Romero2022-03-301-0/+1
|
* Add project source codeXavier Del Campo Romero2022-03-305-0/+394