Commit Graph

27 Commits

Author SHA1 Message Date
Xavier Del Campo Romero 39ecbd690b
cmake: Do not mkdir cdroot for non-PS1 builds 2024-01-27 17:38:10 +01:00
Xavier Del Campo Romero b4209ea68c
Rename project 2024-01-26 21:53:15 +01:00
Xavier Del Campo Romero 9808581861 WIP 2022-11-01 16:26:16 +01:00
Xavier Del Campo Romero 635d950efd Implement net component 2022-09-20 17:34:21 +02:00
Xavier Del Campo Romero 95ae0911ff Split CMakeLists.txt for src 2022-09-16 20:29:47 +02:00
Xavier Del Campo Romero 64f75ac924 CMakeLists.txt: bump minimum CMake version 2022-09-16 14:27:18 +02:00
Xavier Del Campo Romero e8dd951c6c 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 8b9822c013 Create cdroot directory on common CMakeLists.txt 2022-07-23 04:23:05 +02:00
Xavier Del Campo Romero 0b201a49f6 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 ca510a11c4 Import SDL_gfx 2022-07-15 01:03:36 +02:00
Xavier Del Campo Romero 19d9a571af Implement main menu 2022-06-26 21:51:47 +02:00
Xavier Del Campo Romero aea50395c5 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 1133af2f9a Deprecate <TARGET>_BUILD in favor of CMAKE_TOOLCHAIN_FILE 2022-06-19 03:09:28 +02:00
Xavier Del Campo Romero 5226dc4663 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 b2af4c6bcc 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 6f74cbd20b Implement button component 2022-06-11 23:42:27 +02:00
Xavier Del Campo Romero 0167e527cd 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 bf3ad3f9e4 CMakeLists.txt: build host tools as ExternalProject 2022-06-08 00:21:18 +02:00
Xavier Del Campo Romero 6712c8ef22 CMakeLists.txt: move target-specific logic away 2022-06-07 23:32:32 +02:00
Xavier Del Campo Romero 7b8c0725f0 Split CMakeLists.txt into platform-specific *.cmake 2022-05-24 22:20:04 +02:00
Xavier Del Campo Romero c3a33ebe3e Import fixmath 2022-03-30 08:20:21 +02:00
Xavier Del Campo Romero 8f8c5df4f2 Add support for keyboard and mouse 2022-03-30 08:20:21 +02:00
Xavier Del Campo Romero 4765653cb3 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 a3fec3dbb6 Copy src/system.cnf to cdroot on PS1 builds 2022-03-30 08:20:21 +02:00
Xavier Del Campo Romero 44e0fa401d Strip debug info for Win9x builds 2022-03-30 08:20:21 +02:00
Xavier Del Campo Romero 56286a0a96 Set common cdroot path to all platforms 2022-03-30 08:20:20 +02:00
Xavier Del Campo Romero 6b9f686913 Add project source code 2022-03-30 08:20:20 +02:00