Commit Graph

262 Commits

Author SHA1 Message Date
Artur Rojek 39e34e2cfd Hide mouse cursor when scrolling driver info (#121)
Mouse cursor is supposed to be hidden for a moment when scrolling
through the driver info screen.

Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
2022-12-03 20:16:13 +01:00
Dethrace Engineering Department 7bbf6df39a
Fix vehicle suspension so that it actually works (#252)
* fixes suspension travel (#221)

* tidy floats

* Extra fixes (#253)

Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
2022-12-03 14:14:28 +13:00
Anonymous Maarten 3f440a5e16
Implement SmudgeCar (#242) 2022-11-21 22:47:35 +01:00
Anonymous Maarten 5eebedfdc9
Add action replay (#230)
* Add replay

* Hide action replay behind --enable-replay

* Update src/DETHRACE/dr_types.h

* Compy OS_ALlocateACtionReplayBuffer from linux to macos

* Add missing macro

* Fix LengthOfSession for smudges

* Implement PipeInstantUnSmudge
2022-11-21 22:44:37 +01:00
Anonymous Maarten e1cbc20465
cmake: inner loop of DoWheelDamage needs to be executed 4 times (#248) 2022-11-21 21:15:18 +01:00
Anonymous Maarten 2c6f69976f
When respawning pedestrians, only animate nearby pedestrians (#244)
* Use Brender macro's in MungeClipPlane

* gNet_mode is an enum

* Create macro defining the area where pedestrians are considered active

* When respawning pedestrians, only animate the pedestrians that are in view
2022-11-17 23:15:56 +01:00
Dethrace Engineering Department a15d62f85f
Implements DoSpecialCameraEffect (#246)
* implements DoSpecialCameraEffect
2022-11-18 05:31:08 +13:00
Artur Rojek a1504075cc
Fix oil spill rendering (#240)
* Make the gl renderer aware of BR_MATF_TWO_SIDED and BR_MATF_ALWAYS_VISIBLE

Prevent the gl renderer from culling back-faced textures if the material
is two-sided or always visible.

Due to the wrong order of vertices in the model, oil spill object is
subject to back face culling, preventing it from being rendered. Set
the oil spill material as two-sided, allowing it to be displayed.

Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
2022-11-17 17:25:32 +13:00
Dethrace Engineering Department 6c55ba2827
Fix funk texture UV animation (#234)
* fix clock_time to float precision loss
2022-11-13 08:17:06 +13: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 4246f66384
Embed GLSL files during build (#238)
* Embed GLSL files during build
2022-11-11 13:18:07 +13:00
Artur Rojek 73d924891e
Show Squad Car in the wreck gallery (#208) (#235)
Fix OG bug, where APC car would have its vertices and faces removed,
preventing it from being rendered in the wreck gallery.

Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
2022-11-10 06:33:05 +13:00
Dethrace Engineering Department 097eb8c66a
Create CONTRIBUTING.md 2022-11-10 06:21:06 +13: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
Artur Rojek ff431b7955
Fix skidmark orientation (#220) (#233)
Don't reset skidmark normal to the horizontal plane, but rather use the
one received from the wheel.

This fixes incorrect rendering of skidmarks on sloped surfaces.

Signed-off-by: Artur Rojek <contact@artur-rojek.eu>
2022-11-07 11:02:09 +13:00
Anonymous Maarten 8a24f85e7b
Implement funkotronics (#145) 2022-11-04 16:13:10 +13:00
Anonymous Maarten 0dc0c55dc8
Various formatting fixes (#225)
* Remove magic numbers from CalculateFrameRate

* Move conditionals in MungeCarGraphics a bit

* Move code around in LoadCar + less magic numbers

* Tweak conditionals of ReallocExtraPathSections

* Use BrVector3Copy in PointVisibleFromHere

* tCar_spec->gear is an int

* Re-use variable in SearchForSection

* Use floats in CalcGetNearPlayerRoute

* Use floats in ControlBoundFunkGroovePlus

* Align pointers to multiple of pointer size in ShiftBoundGrooveFunks

* Change conditionals in AddProximities + assign the_face at start of iteration

* Move conditionals around in AddGroovidelics

* Move code around in GrooveThisDelic

* Assign the_groove each loop iteration in GrooveThoseDelics

* Compare against NULL in MungeWindscreen

* No need to check for pCount <= 0 in GetALineAndInterpretCommand
2022-11-03 21:28:36 +13:00
Anonymous Maarten 531403a18a
Disable invalid groove bindings at end of LoadCar() (#226)
* Disable invalid groove bindings at end of LoadCar()

* A groove bindings index >= the size of the bindings array is invalid as well
2022-11-02 05:38:31 +13:00
Dethrace Engineering Department 1208a5061a
Fix sounds (#228)
* fixes sound volume and cutoff when too far away

* adds volume-multipler command line arg
2022-11-02 05:36:09 +13:00
Dethrace Engineering Department a86a04fcd0
fixes #187 (#222) 2022-11-01 20:42:57 +13:00
Anonymous Maarten 9f8ff0ddd7
Implement opponent edit functions (#227)
* sdl: print SDL error when failed to create window

* Implement all opponent (edit) functions
2022-11-01 20:42:40 +13:00
Anonymous Maarten 1388e43123
Splatpack x-mas demo eecutes ToggleArrow when the race finished (#224) 2022-11-01 20:32:19 +13:00
Anonymous Maarten e7a17cf13f
Fix of 3 little issues found with the undefined behavior sanitizer (#219)
* racestrt.c: fix out-of-bounds write in DrawGrid

Catched by undefined behavior sanitizer

* opponent.c: use cops array to access 'finished_for_this_race' property

* displays.c: Fix left shift of negative value in DoHeadups

Found by using he undefined behavior sanitizer

* Switch variable names in DoDamageScreen
2022-11-01 20:31:23 +13:00
Anonymous Maarten 97c04789a6
macos: mark junk as 'used' to fix -Wunused-but-set-variable warning (#229) 2022-11-01 20:30:00 +13:00
Anonymous Maarten 1052cc14d5
Fix conditional in CalcRaceRoute (#223) 2022-11-01 20:27:59 +13:00
Dethrace Engineering Department 2ade8f6f7c
Original "high resolution" support (#217)
* hires support

* hide system cursor in dethrace window
2022-10-19 10:25:46 +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
Anonymous Maarten d3efa46815
Add enum for FatalError + void-alize all functions taking no arguments (#202)
* Add enum for 1st FatalError argument

* Use enum values when calling FatalError

* Add explicit void to all functions not accepting any arguments
2022-10-16 21:20:04 +13:00
Anonymous Maarten 8cf6c7e931
Fix y-alignment of numbers in parts shop (#201) 2022-10-16 21:15:01 +13:00
Anonymous Maarten 1dab154c75
Fix amount of credits handed out in GotCredits (#198) 2022-10-16 21:13:39 +13:00
Anonymous Maarten 4689b4e9a6
Add totally repair car (#190)
* Implement TotallyRepairCar

* Implement ResetCarScreens

* Implement CarWorldOffFallenCheckThingy

* Implement MungeRearviewSky

* Add comment about BrModelUpdate(..., 0x3)
2022-10-16 21:11:51 +13:00
Anonymous Maarten bec1e51e02
Fix racer info (#185) 2022-10-16 21:09:30 +13:00
Anonymous Maarten 31afabce90
Oil spills (#171)
* Simplify FindFacesInBox

* Simplify FindFacesInBox

* Simplify ActorBoxPick

* Implement oil spills

* Simplify DRScenePick2D
2022-10-15 07:11:47 +13:00
Anonymous Maarten 6061fd1d5f
Implement ProcessLevitate (#196) 2022-10-14 20:52:05 +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 Engineering Department 8602f68e44
Update README.md 2022-10-03 16:08:28 +13:00
Anonymous Maarten e741362731
Fix out of bounds read + v_diff should not always be updated (#191) 2022-10-01 19:56:37 +13:00
Anonymous Maarten 3a9c037939
Fix pedestrian collision when floating very close to ped (#189)
* Fix pedestrian collision when floating very close to ped
2022-10-01 06:48:14 +13:00
Anonymous Maarten 24a08b2c9f
Fix signal handler for pie executables (#177)
* Disable pie on github actions

* Use dl_iterate_phdr to get base of elf
2022-10-01 06:29:03 +13:00
Dethrace Engineering Department 19ace40cb8
fixes bouncing lampposts and other odd physics things (#174) 2022-09-28 20:42:22 +13:00
Dethrace Engineering Department 76ea16aabe
fix damage not being applied when hitting walls (#164) 2022-09-28 20:41:52 +13:00
Anonymous Maarten db3d6ac91e
Implement edit functions + functions around camera + ... (#146)
* Fix SEGFAULT due to reading out of bounds (we were using wrong index)

* Use floats instead of doubles

* Implement all flicplay.c functions

* Compare ptr against NULL

* Implement TotalRepair

* Implement some edit functions

* Implement actor/special volume related edit functions

* Implement MungeSpecialVolume

* Implement a few depth functions

* Fix location of spawned actors (when SHIFT was not pressed)

Co-authored-by: Dethrace Engineering Department <78985374+dethrace-labs@users.noreply.github.com>
2022-09-28 20:40:53 +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 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