Commit Graph

58 Commits

Author SHA1 Message Date
Anonymous Maarten a2cdd1f061
Support multiple platform drivers (#444)
* Start of supporting multiple platform drivers

* Remove dependency of null platform on SDL2

* cmake: support loading SDL2 dynamically

* Move CMake options to project root for SDL2::SDL2 access

* Don't link to OpenGL

* Move common dynamic loading to header

* Add SDL 1.2 platform

* Add SDL1 platform backend

* Remove accidental addition

* Try multiple platform drivers until we find a good one

* Fix sdl1 mouse

* Use my BRender fork FIXME FIXME FIXME REMOVEME REMOVEME REMOVEME

* Build dethrace supporting SDL1 on ci

* use dethrace-labs BRender fork
2025-05-03 23:44:46 +02:00
Dethrace Engineering Department ca1ef76e7f
Adds original 3dfx rendering path (#434)
* using dossys, virtual_fb driver

* keyboard and hires working with dossys

* adds explicit opengl mode, opengles support, use-after-free fix

* remove compiler warnings

* bump BRender dep to latest commit

* adds mouse code from DOS version which correctly scales based on pixel size

* more 3dfx fixes, adds game-completed arg
2025-03-31 18:44:38 +13:00
Dethrace Engineering Department 3c01b63346
adds missing lib for github build (#432) 2025-01-07 12:26:15 +13:00
Anonymous Maarten e3a50e34d1
Fix Windows arm64 build (#371)
* Build arm64 Windows executable

* Use dbghelp to print a stacktrace and use addr2line as last resort

* Print stack depth

* Cleanup windows.c includes + use OS_Basename + define [RX]_OK ourselves

* Cannot do _access(X_OK) on Windows

* SymInitialize: don't invade process

* Use _access_s

* Ignore failure to get symbol line and line number

* Only consider using addr2line when ADDR2LINE is set
2024-07-09 02:28:40 +02:00
Dethrace Engineering Department 6222f6994f
Software renderer (#363)
* BRender software rendering initial commit

* changes required for brender v1.3.2

* fixes missing selection rectangle in race summary screen

* fix track rendering, remove opengl bits

* adding BRender submodule

* enables mirror, bumps brender

* enable linux arm64 builds

* clang-format on all files

---------

Co-authored-by: Anonymous Maarten <anonymous.maarten@gmail.com>
2024-06-14 19:52:09 +12:00
Anonymous Maarten c76b766ce7
ci: use libsdl-org/setup for SDL + package with CPack (#362)
* Fix unittests with null renderer

* cmake: fix configuration when building from a non-git/non-release archive

* test: don't access freed memory

* cmake+ci: use libsdl-org/setup-sdl for SDL2 + create package with CMake

* Install all files to root + SDL2.dll
2024-05-28 10:02:39 +00:00
Anonymous Maarten 9054ba9b81
Little touches to windows platform code (#331)
* windows: print strerror message on failure to open file

* Remove leading _ from _program_name

* A few windows functions can be static

* ci: Always upload artifact

* linux+macos: Print message on stderr when fopen fails

* Remove merge artifacts

* Remove stray '#include <stdio.h>'
2024-05-25 21:14:29 +00:00
Anonymous Maarten 889e7ba410
Fix ci warnings (#231)
* Fix CI warnings

* Use brender macro's

* Fix conditional in CollideCamera2

* ci: set-output comand is deprecated

* Fix bug in RebuildOppoPathModel
2022-11-07 11:59:14 +13:00
Dethrace Engineering Department 7fff315643
Tidy up debug logging (#213)
* tidy up log output

* adds enable-diagnostics argument, disable by default
2022-10-18 13:07:58 +13:00
Dethrace Engineering Department 2708c614ab
Workflow Updates (#205)
Publish artifacts when building on main branch
2022-10-03 16:45:40 +13:00
Dethrace Labs f1849412e9 workflow 18 2022-09-22 05:46:36 +12:00
Dethrace Labs 9f1e7bc062 workflow 17 2022-09-21 20:28:13 +12:00
Dethrace Labs 89d7b96d5b workflow 16 2022-09-21 19:31:07 +12:00
Dethrace Labs 66840c3efb workflow 15 2022-09-21 19:03:20 +12:00
Dethrace Labs de49cb4fa7 workflow 14 2022-09-21 18:48:49 +12:00
Dethrace Labs fdbb4ad8d1 workflow 13 2022-09-21 16:10:02 +12:00
Dethrace Labs 1437ea5ad3 workflow changes 12 2022-09-21 05:30:00 +12:00
Dethrace Labs cee3f0362a workflow changes 11 2022-09-20 21:14:51 +12:00
Dethrace Labs af9702053c workflow changes 10 2022-09-20 21:09:05 +12:00
Dethrace Labs cd7d19a57f workflow changes 8 2022-09-20 21:04:47 +12:00
Dethrace Labs 30540e72da workflow changes 7 2022-09-20 20:59:22 +12:00
Dethrace Labs 190145ad3d workflow changes 6 2022-09-20 20:56:36 +12:00
Dethrace Labs 5172d25013 workflow changes 5 #none 2022-09-20 20:39:32 +12:00
Dethrace Labs b07432bba7 workflow changes 4 2022-09-20 20:35:39 +12:00
Dethrace Labs a89c198660 workflow changes 3 2022-09-20 20:32:44 +12:00
Dethrace Labs 13ad81b30b workflow changes 2 2022-09-20 17:41:54 +12:00
Dethrace Labs 3146a67563 workflow changes 2022-09-20 17:26:23 +12:00
Dethrace Engineering Department 0a3fb1049c
bump to macos-latest 2022-09-19 11:52:12 +12:00
Dethrace Labs f638d790a7 enable ci on non-main branches 2022-09-17 06:49:33 +12:00
Dethrace Labs 8471091fbc fix on tag workflow 2022-09-17 06:43:36 +12:00
Dethrace Labs b6f1d48ea7 bump github to macos-11. #minor 2022-09-17 05:58:58 +12:00
Dethrace Labs f2376b27a2 github workflow updates 2 2022-09-17 05:50:11 +12:00
Dethrace Labs 1ceba81a93 github workflow updates 2022-09-16 21:57:50 +12:00
Anonymous Maarten 519671f9e8
Refactor CMake build system (#119)
* Remove 'SCRATCH' file

* cmake: move as much as variable assignments after project()

* Embed version in dethrace executable

* Allow installing DethRace + create binary archive

* Use ashutoshvarma/setup-ninja github action for getting ninja

* cmake: group user configurable options

* cmake: building in debug mode will add -g

* cmake: provide dethrace_werror interface target + DETHRACE_WERROR cmake option

* Update SDL2 to latest release

* Rename dethrace_werror target to compile_with_werror

* Also add -Werror to dethrace
2022-09-05 14:22:59 +12:00
Dethrace Engineering Department 21f3ef3631
Run workflow on PRs 2022-03-25 12:34:23 +13:00
Anonymous Maarten d3ebbb6f1f
Visual Studio Fixes (#106)
* Visual Studio Fixes

* Disable flooring the frame period to 10ms

* Don't build with mingw on gha
2022-03-17 10:30:38 +13:00
Anonymous Maarten ee032df264
Fix MSVC tests + add mingw support (#65)
* Include windows.h before imagehlp.h

This fixes a long list of undefined type errors when building with mingw (on Linux).

* Remove matherr function

This function is provided by the c library.

* Use GetFileAttributesA to filter files

dirent->d_type is not available in all implementation.
Posix only mandates the fields d_name and d_ino.

* Use FindOpenGL.cmake to get the opengl library

Mingw has no libGL.so, but has libopengl32.a. Use the CMake module to abstract this away.

* harness needs to link to dbghelp

This fixes undefined references to:
__imp_SymInitialize, __imp_SymGetModuleBase64,
__imp_SymFunctionTableAccess64, __imp_StackWalk64 and __imp_SymCleanup.

* Don't add -g to compile options.

CMAKE_BUILD_TYPE=(Debug|RelWithDebInfo) takes care of this

* Set test file name before running tests in suite.

This causes the message to contain the correct file name where an assertion failed/succeeded.

* Use wrapper to sleep for number on seconds in tests

sleep on Windows expects milliseconds.
sleep on Posix expects seconds.

* Use char* instead of void*

MSVC complained that it couldn't determine the size of void

* Don't test state of removed resource after deletion when building Debug

When building in Debug configuration, the compiler may mark deleted memory ranges with some value.
Therefore, we cannot expect deleted memory to remain unchanged.
(MSVC in Debug mode does this)

* Use helper to get system temporary folder.

Using /tmp on Windows failed hard.

* Header containing sse3 intrinsics is pmmintrin.h

See https://github.com/recp/cglm/pull/234

* Add errno.h include for ENOTSUP

* Fix test_utility_GetALineWithNoPossibleService: avoid strcpy of uninitialized s

Found by running the tests with CMAKE_BUILD_TYPE=Debug with MSVC

* Add mingw@Linux and mingw@Windows jobs to github workflow

* Rename build-windows.ps1 script to build-msvc.ps1.

Also bump the versions of SDL2 and ninja, used in this script.

* Run tests in github jobs running on Windows

Co-authored-by: Dethrace Engineering Laboratory <78985374+dethrace-labs@users.noreply.github.com>
2022-01-20 13:17:10 +13:00
Jeff Harris 707d1ee0b5 Fix windows workflow artifact path 2021-04-14 10:13:16 +12:00
Jeff Harris 5f8f20cda3
Workflow #2 (#48)
* Workflow changes #2
2021-04-14 09:46:31 +12:00
Jeff Harris e13d327f7c workflow: tag release 11 2021-04-14 08:30:50 +12:00
Jeff Harris b435e49f2b workflow: tag release 9 2021-04-14 08:21:00 +12:00
Jeff Harris 971bd31e4e workflow: tag release 8 2021-04-14 06:56:01 +12:00
Jeff Harris 4d8ed45c67 workflow: tag release 7 2021-04-14 06:54:37 +12:00
Jeff Harris 88d31399bc workflow: tag release 6 2021-04-14 06:39:07 +12:00
Jeff Harris eaca67a0c5 workflow: tag release 5 2021-04-14 06:36:27 +12:00
Jeff Harris fa9313c39b workflow: tag release 4 2021-04-14 06:35:20 +12:00
Jeff Harris 0c9e0124f8 workflow: tag release 3 2021-04-14 06:23:46 +12:00
Jeff Harris c921170883 workflow: tag release 2 2021-04-14 06:15:01 +12:00
Jeff Harris 66ced04915 workflow: tag release 2021-04-14 06:11:35 +12:00
Jeff Harris baafd76a09
Workflow test (#47)
* Adds first test of create release when tag is pushed
* fix pixelmap read warnings
2021-04-14 06:01:19 +12:00