Commit Graph

24 Commits

Author SHA1 Message Date
Xavier Del Campo Romero 84c834c000 Implement net component 2022-09-20 17:34:21 +02:00
Xavier Del Campo Romero da22c8d922 Split CMakeLists.txt for src 2022-09-16 20:29:47 +02:00
Xavier Del Campo Romero a30aee8b90 CMakeLists.txt: bump minimum CMake version 2022-09-16 14:27:18 +02:00
Xavier Del Campo Romero 5829ef82c4 Use find_package for SDL libraries
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.
2022-07-23 04:23:05 +02:00
Xavier Del Campo Romero 79c0164c21 Create cdroot directory on common CMakeLists.txt 2022-07-23 04:23:05 +02:00
Xavier Del Campo Romero 6b46057728 CMakeLists.txt: Define rts as a C-only project
While it is true "extern C" is used on all headers, there is no need for
CMake to check the C++ compiler.
2022-07-23 04:16:57 +02:00
Xavier Del Campo Romero 2d22b88695 Import SDL_gfx 2022-07-15 01:03:36 +02:00
Xavier Del Campo Romero c401b7663d Implement main menu 2022-06-26 21:51:47 +02:00
Xavier Del Campo Romero 7c75118429 Revamp gui component
`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.
2022-06-26 20:00:27 +02:00
Xavier Del Campo Romero 7c1795401b Deprecate <TARGET>_BUILD in favor of CMAKE_TOOLCHAIN_FILE 2022-06-19 03:09:28 +02:00
Xavier Del Campo Romero 0f9e2d8958 Split peripheral-related logic into its own component
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).
2022-06-12 23:18:57 +02:00
Xavier Del Campo Romero 5794dbf403 CMakeLists.txt: limit libraries linked to by ${PROJECT_NAME}
Old behaviour was linking to all components, but main.c currently only
needs a few of them.
2022-06-12 00:00:56 +02:00
Xavier Del Campo Romero a84a55aa25 Implement button component 2022-06-11 23:42:27 +02:00
Xavier Del Campo Romero d57cd4ad82 CMakeLists.txt: assume native build by default
This has been decided to make the de-facto standard CMake build process
(shown below) possible.

$ mkdir build
$ cd build/
$ cmake ..
2022-06-08 00:25:17 +02:00
Xavier Del Campo Romero a5f2f1a4ba CMakeLists.txt: build host tools as ExternalProject 2022-06-08 00:21:18 +02:00
Xavier Del Campo Romero 787402efcf CMakeLists.txt: move target-specific logic away 2022-06-07 23:32:32 +02:00
Xavier Del Campo Romero 9073d82ea6 Split CMakeLists.txt into platform-specific *.cmake 2022-05-24 22:20:04 +02:00
Xavier Del Campo Romero ae5b0bed12 Import fixmath 2022-03-30 08:20:21 +02:00
Xavier Del Campo Romero 9eee43d3bb Add support for keyboard and mouse 2022-03-30 08:20:21 +02:00
Xavier Del Campo Romero 18717569ac Add metadata header to media files
The following properties are supported:

- Sound: "loop". Must be either 0 or 1
- Images: "transparent". Must be either 0 or 1

These headers are only used for non-PS1 builds, since .TIM and .VAG
files do already implement such information.
2022-03-30 08:20:21 +02:00
Xavier Del Campo Romero 7929aecc79 Copy src/system.cnf to cdroot on PS1 builds 2022-03-30 08:20:21 +02:00
Xavier Del Campo Romero bdd0af2ce0 Strip debug info for Win9x builds 2022-03-30 08:20:21 +02:00
Xavier Del Campo Romero df2ecf50e0 Set common cdroot path to all platforms 2022-03-30 08:20:20 +02:00
Xavier Del Campo Romero 8c10334252 Add project source code 2022-03-30 08:20:20 +02:00