Commit Graph

220 Commits

Author SHA1 Message Date
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 8e576ddbe3
Fix buffer overload when loading more then 100 pixelmaps on 64-bit system (#175) 2022-09-23 21:15:26 +12:00
Anonymous Maarten fc65625272
brender: don't override the row_bytes stored on disk (#167) 2022-09-23 20:52:40 +12:00
Anonymous Maarten b71d585583
Simplify code in ChooseNewObjective (#168) 2022-09-23 14:47:08 +12:00
Anonymous Maarten b7da8770b4
Fix IRandomBetween returning out-of-range numbers (#173) 2022-09-23 08:39:52 +12: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
Dethrace Engineering Department 370c7ca480
Implements TeleportOpponentToNearestSafeLocation (#165)
* implements TeleportOpponentToNearestSafeLocation
2022-09-16 21:19:16 +12:00
Anonymous Maarten 4bb4be17a4
Fix pedestrian edit functions segfaulting when path isn't created (#163)
Dropping a point in pedestrian edit mode would segfault otherwise.
CARM95.EXE also segfaults.

How to reproduce:
- enable Pedestrian edit mode
- F10 or F11 (+a few other)
2022-09-16 15:14:31 +12:00
Anonymous Maarten 25b796335d
Fix address sanitizer error when loading "Industrial Action" (#150)
* Move resource header check out of UserToRes to allow BrResCheck to fail

* Add BrResCheck and BrResSize to brender.h header (used while debugging)

* Skip OG code behavior of setting row_bytes to align to a 4 byte boundary
2022-09-16 15:13:11 +12:00
Anonymous Maarten 9ec9fb008f
Implement DoEndSummary2 (aka Damage Gallery) (#152)
* Implement DoEndSummary2 (aka Damage Gallery)

* Fix warnings emitted by -Wabsolute-value and -Wsometimes-uninitialized
2022-09-16 15:10:52 +12:00
Anonymous Maarten 4c6e3a325c
Use nearest_section in FindNearestGeneralSection (#162) 2022-09-16 15:09:41 +12:00
Anonymous Maarten 25ecaf7309
damage_magnitude_accumulator is only available when a car is oppo, net_human or local human (#160) 2022-09-16 08:43:37 +12:00
Dethrace Engineering Department e8a38f4a1a
fixes NextPratcamChunk (#155) 2022-09-12 10:32:28 +12:00
Anonymous Maarten 0081b02dec
Implement parts shop (#151)
* Change type of last argument of TransBrPixelmapText from 'signed char*' to 'char*'

* Implement parts shop
2022-09-12 06:16:01 +12:00
Anonymous Maarten 561e369ede
Implement pratcam (#148) 2022-09-11 20:37:23 +12:00
Dethrace Engineering Department de154693c9
implements processfrozen (#154) 2022-09-11 16:12:41 +12:00
Dethrace Engineering Department 5e05fc1c6b
Aggressive opponents (#153)
* implements crash earnings, fixes wasted message
2022-09-11 15:52:32 +12:00
Anonymous Maarten f99be5f57a
Fix buffer overflow when driving with full speed into noncar thing (#144) 2022-09-07 15:59:37 +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
Anonymous Maarten 8a2167920e
Add support for fullscreen + never grab mouse + resize window (#140)
* Implement full-screen via ALT+ENTER

* Never grab mouse

* Allow resizable window + fix mouse when resizing/switching to full screen

* Keep aspect ratio of gl viewport when resizing window

* Fix mouse when resizing the window

* Fix off by one error
2022-09-05 09:59:00 +12:00
Anonymous Maarten b3bdbb2650
Little changes (#139)
* br_material.power is a br_scalar (=float)

* Implement FopRead_OLD_VERTICES

* Fix FopRead_OLD_MATERIAL_INDEX

* Use BR_ASIZE in appropriate places

* Use br_material* instead of intptr_t

* Reset resource parent after reading struct

* Use flags of correct type

* Use NULL instead of 0

* Ignore utf-8 errors when decoding carmageddon-"encrypted" files to utf-8
2022-09-02 12:50:55 +12:00
Willian c220ad0b5e
remove unused Windows HANDLE (#142) 2022-09-02 12:43:16 +12:00
Priit Laes 8c060fa1c7
gl: Relax GLSL requirement from 3.3 to 3.1 (#137)
* opengl: Bump to OpenGL 3.1 / GLSL 1.40
2022-08-31 15:01:20 +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 408d550156
Update README.md 2022-08-30 09:18:44 +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
Anonymous Maarten 05f16d3066
Fix prototype(s) + function uses (#133) 2022-07-11 06:35:38 +12:00
Dethrace Labs 44df22a375 implement missing S3StopOutletSound 2022-06-03 17:40:06 +12:00