Commit Graph

25 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
Anonymous Maarten cd64d99512
Only pass mouse/keyboard to dethrace when the current window is DethRace (#404)
This is useful when opening a 2nd SDL window to avoid events of the
other window leaking into carmageddon (and the reverse).
2024-09-12 03:04:25 +00:00
Dethrace Engineering Department 6e6ce12eb7
Original music (#393)
* adds support for GOG-format music ogg files

---------

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
2024-07-17 06:53:42 +12:00
Dethrace Engineering Department 68360350e5
Adds proper MacOS bundle and icons for Windows builds (#381)
* macos bundle

* windows icons

* MacOS bundle works when placed inside a carmageddon directory
2024-07-05 09:12:19 +12: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
Dethrace Engineering Department 1c10b74141
Networking #1 - Lobby implemented (#335)
* Basic networking functions implemented to get the lobby functional

* Apply suggestions from code review

* PDNetObtainSystemUserName gets local system name

---------

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
2023-07-05 14:18:52 +12:00
Dethrace Engineering Department 7d475fc117
Fixes player engine stumbling sound (#332)
* audio backend

* fixes stumbing sound at speed

* implements missing S3ChangePitchSpeed, tidies error codes

---------

Co-authored-by: Jeff Harris <jeff@1amstudios.com>
2023-07-04 07:40:44 +12:00
Dethrace Engineering Department f3515d5f64
SmackerLib API (#303)
* adds better smack support

* more docs
2023-04-19 13:11:56 +12:00
Anonymous Maarten 4c9795a37b
Implement TestAutoSpecialVolume + fix IWANTTOFIDDLE (#237)
* Add enum for splatpack xmas: they have a different demo screen (splatpack demo has smk, xmas demo has a flic)

* Simplify sign

* Fix DecodeLine2 + decode_datatxt.py

* Compare against pointers

* Use float cos and sin functions

* Implement StopGroovidelic

* Implement TestAutoSpecialVolume

* Use floats in SmokeCircle related functions

* gOffset is initialized to 0

* Don't stub DrawTheGlow: every crash is an opportunity to find a bug

* Decrease indentation of LineBoxColl (no functional change)

* Use BrVector3XXX macro's in GetBoundsEdge (no functional change)

* Fix address sanitzier warning when using APC

* Use BrVector3XXX macro in GetPlaneNormal (no functional change)

* Get rid of global is_full_screen variable

* Add command line argument to start DethRace in full screen mode

* cmake: move DETHRACE_FIX_BUGS cmake option to top cmake script

* Add DETHRACE_FIX_BUGS macro when DETHRACE_FIX_BUGS cmake variable is defined

* harness: prescale mouse pointer so it works seamlessly with hires

* Fix IWANTTOFIDDLE

* Add comments for the fixes

* Revert "Don't stub DrawTheGlow: every crash is an opportunity to find a bug"

This reverts commit 3345649201.
2022-11-11 19:57:37 +01:00
Dethrace Engineering Department 76ea16aabe
fix damage not being applied when hitting walls (#164) 2022-09-28 20:41:52 +13:00
Anonymous Maarten b5ccfe7dd2
No more gcc/clang warnings (#169)
* Change type of DRPixelmapCleverText2 to char*

* Fix warnings emitted due to -Wreturn-type

* Fix BR_ONE_LS redefinition warning

* Fix warnings emitted by -Wparentheses

* Tag FatalError and PDFatalError with noreturn attribute, fixing -Wreturn-type warnings

* Fix string type of TransBrPixelmapText~

* Fix a few -Wmaybe-uninitialized warnings

* Fix -Wformat and -Wpointer-sign warnings in test_datafile.c

* Fix -Wshift-negative-value warning

* Fix -Wpointer-sign warning

* chdir is declared with attribute 'warn_unused_result'

* Fix -Wmaybe-uninitialized warning

* Fix -Warray-bounds warning

* Fix -Wmaybe-unitialized warning

* Fix -Wmaybe-unitialized warning

* Fix -Wmaybe-unitialized warning

* Fix -Wmaybe-unitialized warnings

* Fix a few -Wmaybe-uninitialized warnings

* cmake: unify warnings amongst gcc and clang

* fatalerror_fixup

* Fix -Wabsolute-value warning

* Fix all warnings when building with MinGW on Windows

* Fix warning caused by -Wimplicit-fallthrough

* Fix warnings caused by -Wcast-function-type

Fixes these types of warnings:
cast between incompatible function types from ‘br_uint_32 (*)(br_actor *, void *)’ {aka ‘unsigned int (*)(struct br_actor *, void *)’} to ‘intptr_t (*)(br_actor *, void *)’ {aka ‘long int (*)(struct br_actor *, void *)’} [-Wcast-function-type]

* Fix warning caused by -Wmissing-field-initializers

* Normalize direction_v vector and store in displacement
2022-09-24 17:42:58 +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
Szilárd Biró 20c2128b89
Big endian fixes (#135)
* BRender big endian fixes

* Game big endian fixes

* Replace BrSwap32 with BrHtoNL for load/save

* Detect endianness using CMake
2022-08-30 09:19:50 +12:00
Dethrace Engineering Department ee83724f8a
Opponents following race and cheat paths (#136)
* fix segfault, now hitting not implemented on ProcessPursueAndTwat

* opponents actually sort of driving

* remove cglm dependency

* opponents driving around generally working

* fully mapped out gEdit_funcs

* adds --i-am-cheating flag to allow skipping entering cheat code

* cleaned up ProcessFollowPath

* cleanup FollowCheatyPath, fixes crash in SmokeLine

Co-authored-by: Anonymous Maarten <anonymous.maarten@gmail.com>
2022-08-29 15:21:57 +12:00
Dethrace Engineering Department 7730cf842e
Audio support (#130)
* 2d sound working in menus

* fix incorrect references to gIndexed_outlets

* 3d sound, pitch, pan, volume

* enable per-outlet pitch

* fix path length issues, compile warnings

* fixes hall of mirrors effect in smack videos

* fixes ped running away direction

* fixes horn by fixing S3GetChannelForTag

* fix master volume, uninitialized variable
2022-06-03 13:03:49 +12:00
Dethrace Engineering Department 7e14a97692
Easier platform porting (#108)
* Create PORTING.md

* Creates io_platform abstraction

* removes miniposix

* remove unistd refs

* removes watcom functions

* fixes shadow rendering memory leak
2022-03-21 12:10:49 +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
Jeff Harris 6cc2db6201
Rendering our first 3d scene! (#52)
* 3d rendering working slightly

* lighting working but looks funny

* camera swoop working somehow

* 3d rendering working down to camera

* fix linux build
2021-07-17 07:08:06 +12:00
Jeff Harris d08ab2f0e7
Adds game main loop (#49)
* Adds game main loop, 2d rendering in game mode
2021-04-21 12:25:19 +12:00
Jeff Harris 1ce611e9d8
Implements load race screen and grid selection screens! (#45)
* Load Race screen
* Grid Selection screen
* Loads race objects into memory
2021-03-25 06:51:35 +13:00
OmniBlade d1232abceb Refactors CMake to allow buildings tests.
Adds running of tests to the linux and macos workflows.
Tests themselves need some refactoring to pass on windows.
2021-03-12 15:49:29 +00:00
OmniBlade 0d023ca25f Adds glad generated OpenGL extension loader.
Fixes building gl renderer with MSVC.
Adds additional fixes to build and link on MSVC.
2021-03-12 15:49:29 +00:00
OmniBlade f2168d0db4 Initial CMake based build system implementation. 2021-03-12 15:49:29 +00:00