Commit Graph

356 Commits

Author SHA1 Message Date
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
Szilárd Biró 1ef129a7bf
add AudioBackend_SetVolumeSeparate to the harness audio interface (#433) 2025-01-31 06:56:54 +13:00
Dethrace Engineering Department 3c01b63346
adds missing lib for github build (#432) 2025-01-07 12:26:15 +13:00
Bartosz Kurczyński 0ccb454316
Fix: Replace constant with configurable physics_step_time (#430) 2025-01-07 10:04:23 +13:00
Bartosz Kurczyński 1f009a2490
Fixed random rotation in Wrecks Gallery on first click when car is zoomed. (#427) 2024-12-13 10:06:24 +13:00
Bartosz Kurczyński 884f134664
Ensure initial volume for CD music is properly set. (#406)
* Ensure initial volume for CD music is properly set.

* Incorporate review comments.
2024-12-04 10:13:31 +13:00
Szilárd Biró 20e81f46ff
Polish localization support (#414) 2024-12-04 07:27:34 +13:00
Anonymous Maarten a826a16d75
Play music when starting the game with `-nocutscenes` (#398)
* Use BrIntToFixed in DoHeadups

* Add and use enum for headup slot

* Play music when starting with -nocutscenes

---------

Co-authored-by: Dethrace Engineering Department <78985374+dethrace-labs@users.noreply.github.com>
2024-10-15 08:30:02 +13:00
Szilárd Biró 22369744bb
Big endian fixes - part 2 (#405)
* Big endian fix for S3LoadSample and Win32SetPaletteEntries

* Add the missing BR_ENDIAN_BIG guard to S3LoadSample

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>

* DRPixelmapDoubledCopy big endian fix

* big endian fix for the KEYBOARD.COK loading

* CalcLSChecksum big endian fix

* PrintScreenFile big endian fix

---------

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
2024-10-15 08:28:57 +13:00
Dethrace Engineering Department 78ef3c27f2
Update CHANGELOG.md 2024-09-30 11:08:06 +13:00
Dethrace Engineering Department 33ecfc01c7
Update CHANGELOG.md 2024-09-30 11:06:53 +13:00
Dethrace Engineering Department 7ffcca6c28
Update CONTRIBUTING.md 2024-09-30 10:47:02 +13:00
Dethrace Engineering Department 954f40b8c7
Update README.md 2024-09-30 10:45:16 +13:00
Dethrace Engineering Department e7a79a8aad
Update README.md (#411) 2024-09-20 12:27:22 +12:00
Szilárd Biró 16048adbc1
turn closesocket into a function (#409)
Co-authored-by: Dethrace Engineering Department <78985374+dethrace-labs@users.noreply.github.com>
2024-09-20 07:35:37 +12:00
BeWorld d47c7a03d4
remove duplicate "platform->DestroyWindow" (#410)
Duplicate code, not necessary

Co-authored-by: Dethrace Engineering Department <78985374+dethrace-labs@users.noreply.github.com>
2024-09-20 07:34:59 +12: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
Szilárd Biró a25ee50e94
make sure audio_stream is always initialized by SmackOpen (#407) 2024-08-27 09:29:27 +12:00
Anonymous Maarten 361eca4875
Fix cops initialization in InitOpponents (#402)
Originally spotted by Bartosz Kurczyński (https://github.com/b-kurczynsk)
2024-07-29 09:21:55 +00:00
Bartosz Kurczyński 90971e9e56
Fixed: Non-spatial sound does not obey global sound effect's volume. Spatial sound is either too loud or to quiet. (#400) 2024-07-27 07:00:09 +12:00
Dethrace Engineering Department ec04a9c111
Fixes crash when not calling ma_audio_unint correctly (#397)
* fixes crash when not calling ma_audio_unint correctly

* adds check that we are not still playing the previous track
2024-07-21 03:01:41 +12:00
Anonymous Maarten e757db4227
Fix 'iteration 2 invokes undefined behavior [-Waggressive-loop-optimizations]' (#395) 2024-07-16 19:11:22 +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
MastaG a48c47beab
Update BRender-v1.3.2 a submodule (#392) 2024-07-14 23:00:12 +12:00
Dethrace Engineering Department 40919b4295
full screen by default (#394) 2024-07-13 21:16:16 +12:00
Dethrace Engineering Department af3019469a
Audio in cutscenes (#390)
* audio in cutscenes
2024-07-10 06:27:31 +12:00
Dethrace Engineering Department ca1098ad91
Fix some Address Sanitizer errors (#384)
* fix some invalid memory accesses
2024-07-10 06:08:35 +12: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
Anonymous Maarten 3d67fd730d
Run QuitGame instead of DoSaveGame when quitting a game after pressing CTRL+Q (#388) 2024-07-09 02:27:47 +02:00
Dethrace Engineering Department 8751f63695
Update README.md 2024-07-05 20:29:45 +12:00
Dethrace Engineering Department d5d38c86ac
bump BRender (#383) 2024-07-05 14:18:52 +12:00
Dethrace Engineering Department f9346d8b59
bump miniaudio to fix playback on recent macos (#382) 2024-07-05 12:53:41 +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
Anonymous Maarten fdc37eff8f
Show 'Completion Bonus' message at end of race (#380) 2024-07-03 14:12:03 +12:00
Anonymous Maarten 673244bb8c
Implement network (#366)
* SendCarData, ReceivedStartRace

* fixes heap overflow during join

* fixes access on possibly-null pDetails

* DoNetScores

* Fix cast warning of comparefn of qsort

* DisplayUserMessage

* Pack tNet_contents on 4 byte boundary so 32-bit and 64-bit Intel cpu get same struct lay-out

* Add a few static assertions to verify net message offsets

* Add dethrace Wireshark dissector (WIP)

* add dissector installation instructions

* Set wireshark info column

* Fix various typo's

* 4-byte align tNet_message_join as well + more dethrace.lua

* Add more assertions

* Fix network car choose loop

* player scores

* tidy

* mechanics

* Implement SortNetHeadAscending for 'Terminal Tag'

* Update WireShark dissector

* start of tNet_message_pedestrian dissector

* network player cars can see each other move

* netmsgid tidy ups

* dissector: print HOST/CLIENT in info column

* Don't allow hosting a game when starting dethrace with --no-bind

* fix oldd copy

* time_step is integer, fixes client car out of sync

* wasted, recover, kick player out

* NetSendPointCrush

* crushpoint, declarewinner

* network race summary wip

* Start and finish a game of tag/fox

* network fixes

* Players can now send love letters to each other

* Rewrite if's a bit

* Use enum values for GetMiscString and DoFancyHeadup

* Fix fox effect

* Fix fox/it effect at start of race

* Use KEYMAP_ enum values

* Disable address sanitizer and dr_dprintf logging

---------

Co-authored-by: Dethrace Labs <78985374+dethrace-labs@users.noreply.github.com>
2024-06-20 22:35:48 +02:00
Anonymous Maarten 1d5f6f1634
Add '--verbose' cli argument (#370) 2024-06-20 00:24:56 +02:00
Anonymous Maarten a74ee0ac82
Don't leak file descriptors in GetFileAttributesA polyfill (#372) 2024-06-20 10:22:34 +12:00
Dethrace Engineering Department 5a9579143b
Update README.md 2024-06-17 15:56:52 +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
Dethrace Engineering Department 3870bf8c8a
Fix windows chdir behavior (#365)
* fix windows chdir behavior

* log panics to file and check for gl shading language

---------

Co-authored-by: Jeff Harris <jeff@1amstudios.com>
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
2024-06-14 10:31:54 +12:00
Anonymous Maarten 62bbf66deb
Fixes for Portuguese Carmageddon (#353)
* Fix bugs exposed by Portuguese Carmageddon

* Fixes for warnings/errors found in rec2

* Macos says "no"

* Last argument of _partSet can be a pointer

* feof is a macro dereferencing f on some systems

* Allow longer program_name in addr2ine

* Fix casing issue with sounds

French Carmageddon provides DATA/SOUND/fyeah1.WAV where it expects DATA/SOUND/FYEAH1.WAV

* tools: add encode capability to decode script

* Replace font id integers with enum

* Result of BrFileGetLine is not used

* Document the StripControls fix

Co-authored-by: Dethrace Engineering Department <78985374+dethrace-labs@users.noreply.github.com>

---------

Co-authored-by: Dethrace Engineering Department <78985374+dethrace-labs@users.noreply.github.com>
2024-05-28 12:59:37 +00:00
Anonymous Maarten e07b7114a3
Implement sound options menu (hidden behind --sound-options) (#359)
* Implement sound options menu (hidden behind --sound-options

* Don't use M_PI*

* DoInterfaceScreen uses gEffects_outlet instead of gIndexed_outlets[0]
2024-05-28 10:10:23 +00: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 7e98d3b887 Implement -noreplay from Carmageddon DOS version 2024-05-15 20:34:33 +02:00
Dethrace Engineering Department d67f04e6c6
Fixes #357 (#358)
* fixes #357
2024-01-17 07:20:16 +13:00
Dethrace Engineering Department 8051ca2b6d
Fixes #319 (#346)
* fixes #319

* adds -Wno-deprecated-declarations to miniaudio on clang
2023-08-09 20:20:11 +12:00
Dethrace Engineering Department 511d827e7e
chdir to exe path (#345)
* using OS_Basename to get root directory from argv[0]

* remove call to old GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS since opengl guarantees at least 16
2023-08-09 12:56:09 +12:00
Dethrace Engineering Department dc135e46ec
fixes initial value of gOld_sound_detail_level (#347) 2023-08-09 12:53:32 +12:00
Anonymous Maarten 4200cfab6c
Replace magic numbers with enum (#341)
* Replace magic string numbers with enum

* Fix enum FatalError enum item
2023-07-22 00:05:07 +00:00