aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* mouse.c: Reduce thresholdXavier Del Campo Romero2022-09-161-2/+2
|
* Split CMakeLists.txt for srcXavier Del Campo Romero2022-09-162-47/+48
|
* Split res-related CMake functions into their own fileXavier Del Campo Romero2022-09-162-109/+110
|
* CMakeLists.txt: bump minimum CMake versionXavier Del Campo Romero2022-09-161-1/+2
|
* Use find_package for SDL librariesXavier Del Campo Romero2022-07-2320-51/+37
| | | | | | | | | | CMake already distributes FindSDL*.cmake files for SDL and SDL_mixer, which support custom prefixes via environment variables, removing the need for ad-hoc logic in Win9x builds. Also, according to FindSDL.cmake, #include <SDL.h> is the preferred way for portability reasons, instead of #include <SDL/SDL.h>, which is the option that has been used so far.
* ps1.cmake: import PSXSDK using find_packageXavier Del Campo Romero2022-07-231-10/+1
|
* README.md: Update documentation for Win9x buildsXavier Del Campo Romero2022-07-231-1/+30
|
* ps1: Use exported target PSXSDK::PSXSDKXavier Del Campo Romero2022-07-236-2/+6
|
* Implement FindPSXSDK.cmakeXavier Del Campo Romero2022-07-231-0/+94
|
* Update FindSDL_gfx.cmake as of today's upstreamXavier Del Campo Romero2022-07-231-39/+17
| | | | | Ongoing PR: https://gitlab.kitware.com/cmake/cmake/-/merge_requests/7475
* system/CMakeLists.txt: group common private dependencies into varXavier Del Campo Romero2022-07-231-1/+2
|
* Create cdroot directory on common CMakeLists.txtXavier Del Campo Romero2022-07-234-3/+1
|
* README.md: Document dependencies for Ubuntu buildsXavier Del Campo Romero2022-07-231-0/+8
|
* CMakeLists.txt: Define rts as a C-only projectXavier Del Campo Romero2022-07-231-1/+1
| | | | | While it is true "extern C" is used on all headers, there is no need for CMake to check the C++ compiler.
* SDL-1.2: Implement X mirroring for quadsXavier Del Campo Romero2022-07-153-20/+48
|
* Import SDL_gfxXavier Del Campo Romero2022-07-155-1/+18
|
* Implement FindSDL_gfx.cmakeXavier Del Campo Romero2022-07-151-0/+106
| | | | | | | | | Surprisingly, as of today (July 2022) CMake ships with FindSDL*.cmake files for several SDL libraries such as SDL_mixer or SDL_image, but not for SDL_gfx, so one was created, based on FindSDL_mixer.cmake. Reference: https://gitlab.kitware.com/cmake/cmake/-/blob/8a3004d5c28c0ca0ac45f718b64ed3662e499c7a/Modules/FindSDL_mixer.cmake
* gui: Update elements in reverse orderXavier Del Campo Romero2022-07-151-2/+2
| | | | | This allows to calculate dimensions for containers with children containers in it.
* Deprecate memset(3) in favour of C99 compound literalsXavier Del Campo Romero2022-07-152-7/+3
|
* Allow children of gui_container be resized anytimeXavier Del Campo Romero2022-07-104-10/+32
| | | | | | | | | | | | | | So far, their position inside the container was determined when initializing the interface. However, if a child were resized afterwards, the container would not adjust its elements accordingly. Moreover, the implementation for gui_container relied on hacking the children's X/Y coordinates, which could only be done once. Now, two additional members have been added to gui_common so that specific X/Y offset can be determined by the parent, additionally to the traditional rules followed by gui_coords. Despite the extra memory footprint, it now allows containers to set specific X/Y offsets for their children on every game cycle.
* Implement join/host and game cfg menusXavier Del Campo Romero2022-07-076-72/+341
|
* Implement system_can_exitXavier Del Campo Romero2022-07-073-0/+13
|
* Allow multiple button typesXavier Del Campo Romero2022-07-076-117/+218
|
* button.c: fix wrong function callXavier Del Campo Romero2022-07-071-1/+1
|
* rounded_rect.h: fix typoXavier Del Campo Romero2022-07-071-1/+1
|
* font.c: set null dimensions on null strXavier Del Campo Romero2022-07-021-0/+11
|
* human_player_gui.c: use gui_container for top gui_barXavier Del Campo Romero2022-07-021-9/+16
|
* gui/container: support spacing between GUI elementsXavier Del Campo Romero2022-07-022-1/+7
|
* gui/bar: support arbitrary x/y and widthXavier Del Campo Romero2022-07-022-20/+46
|
* gui: reuse callback dataXavier Del Campo Romero2022-07-028-26/+60
| | | | | | There is no need to allocate memory for these callbacks for each single GUI element. Instead, a single, statically-allocated instance can be shared among all GUI elements of a given type.
* menu: implement main menu using new GUI improvementsXavier Del Campo Romero2022-07-021-8/+19
|
* gui: implement containerXavier Del Campo Romero2022-07-023-0/+91
| | | | | Containers, somewhat inspired by GtkBox, allow to packed other GUI elements into a single row or column.
* button.c: h/v-center child label by defaultXavier Del Campo Romero2022-07-021-0/+2
|
* gui.c: fix wrong logic on gui_coordsXavier Del Campo Romero2022-07-021-1/+3
| | | | | | | The older logic would iterate for all parents, where each parent would again iterate for all of its parents, until no more parents found. This is however not needed, since only inspecting the closest parent will already cause the (recursive) algorithm to iterate for all parents.
* gui: allow custom add_child callbackXavier Del Campo Romero2022-07-022-0/+4
|
* host.cmake, win9x.cmake: fetch libfixmath if missingXavier Del Campo Romero2022-06-303-0/+10
|
* menu.c: center play button on screenXavier Del Campo Romero2022-06-291-2/+2
|
* button.c: fail on negative widthXavier Del Campo Romero2022-06-291-0/+2
|
* gui: implement {h,v}centeredXavier Del Campo Romero2022-06-295-3/+70
|
* font: implement font_dimXavier Del Campo Romero2022-06-292-16/+46
|
* Deprecate memset(3) for zero-initXavier Del Campo Romero2022-06-272-2/+2
|
* human_player_gui.c: fix segfault when selecting one unitXavier Del Campo Romero2022-06-271-1/+1
| | | | | | | Checking against `sel` is just plain wrong, since it always expected to be non-NULL, since `h->sel` is an array defined in `struct human_player`. Instead, `sel->d.i` is the pointer that should be checked.
* human_player: deprecate memset(3) for zero-initXavier Del Campo Romero2022-06-262-7/+12
|
* human_player.c: reset deselected instancesXavier Del Campo Romero2022-06-261-0/+9
|
* Fix hp bar not being displayed when carryingXavier Del Campo Romero2022-06-261-7/+6
|
* ps1/heap.c: bump heap sizeXavier Del Campo Romero2022-06-261-1/+1
|
* Implement main menuXavier Del Campo Romero2022-06-268-12/+106
|
* terrain: fix wrong renderingXavier Del Campo Romero2022-06-261-2/+2
| | | | | The older implementation would leave empty areas on the right side of the screen.
* font: deprecate font_printfXavier Del Campo Romero2022-06-262-20/+0
| | | | This function is no longer needed since `gui` was revamped.
* Revamp gui componentXavier Del Campo Romero2022-06-2624-599/+1245
| | | | | | | | | | | | | | | | | | | | `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.