Commit Graph

30 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
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 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 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
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
Anonymous Maarten e97bc083d9
Add pedestrians + power-ups (#118)
* Add pedestrians

* Pedestrian tweaks

* glrenderer: add texture tranformation support for animated pedestrians

* Use Brender functions in more locations

* Implement CheckPileDriverBonus

* revert changes to CollideCamera2 except bugfix

* fix uninitialized variable

Co-authored-by: Dethrace Engineering Department <78985374+dethrace-labs@users.noreply.github.com>
Co-authored-by: Dethrace Labs <carmageddon.reversing@gmail.com>
2022-05-10 23:39:55 +12:00
Anonymous Maarten 26fd105889
Various work for upstream (#93)
* dethrace: right align numbers in columns

* tools/progress.py: allow sorting on different keys

* brender: add BrPixelmapSave(Many)? to brender.h

* brender: add BrActorLoadMany and BrModelAddMany to brender.h

* brender: add BrWriteModeSet to brender.h header

* brender: define br_size_t as size_t

* brender: expose default order_table through header

* brender: sort tokens by value (and add _BRT_LAST_BUILTIN_TOKEN value)

* brender: diffusion factor of default material is 0.7

* brender; br_value_tag and br_lexer_token.v are unions

* brender: add all genclip functions

* brender: add all token functions

* brender: add assocarr functions

* brender: add lexer functions

* brender: add default model

* brender: add resource functions

* brender: fix BrMaterialAllocate

* brender: add logwrite functions

* brender: add brprintf functions

* brender: add missing file function (BrFileAttributes)

* brender: add BrAngleToDegrees define in br_defs.h

* brender: add image functions

* brender: implement all resreg functions

* brender: implement all pmnull methods

* dethrace: fix brender init string + other params

* brender: use BR_ASIZE when using pm_resourceClasses

* brender: implement all dbsetup functions

* dethrace: implement all input functions

* dethrace: implement various depth edit mode functions

* infra: add WARN_ONCE macro to avoid spamming the console

* dethrace: add enable/disable plingmaterials + add log message

* dethrace: Implement a few loading functions

* dethrace: implement PrintScreenFile + PrintScreen to write screen to BMP

* brender: 8 directories for image is a better default

* brender: Implement makeMeshFromBounds + add typedef for render callbacks

* brender: implement all functions in enables.c

* brender: implement all fwsetup functions

* brender: implement some prepmesh functions

* brender: implement all modsupt.c functions

* brender: use correct types in comparisons

* brender: add whitespace in brlists.c

* brender: actually return something in BrBoundsToMatrix34

* brender: implement all bswap functions

* brender: implement all brerxcept functions

* brender: Implement BrActorSearch + fix RenumberActor

'd' is the depth, it should be the same for all children

* dethrace: gMem_names contains empty strings instead of NULL

* dethrace: ServiceTheGame also does CheckMemory

* dethrace: implement DisposeActorMatrix + DisposeColumns

* dethrace: Implement TogglePedestrians + GetPedCount + GetPedPosition

* dethrace: implement a few superficial powerup functions

* dethrace: implement a few shading helper functions

* dethrace: implement a few world actor helper functions

* dethrace: InitNetGameplayStuff has empty implementation

* dethrace: implement + use DRPixelmapCentredText

* dethrace: display APO bars on HUD

* dethrace: do DoNewGameAnimation when starting a new race (=empty)

* dethrace: (Open|Close)Diagnostics are the first/last functions to run

* dethrace: implement RestoreCameraPosition

* dethrace: LoadOpponentMugShot does a MAMSLock

* dethrace: use enum value for gRace_over_reason

* dethrace: add withespace after LOG_TRACE

* dethrace: implement SetSmokeLastDamageLEvel + StealCar

* dethrace: implement ResetOilSpills

* dethrace: InitRace calls InitNetGameplayStuff

* dethrace: use COUNT_OF instead of magic number

* brender; br_value_tag and br_lexer_token.v are unions

* dethrace: implement options menu (missing graphics/controller/sound menu)

* dethrace: implement DrawRectangle + DrawRRectangle

* dethrace: implement (Set|Reset)NonFatalALlocationErrors + MAMSInitMem

* dethrace: Call MAMSInitMem() in InitialiseApplication

* dethrace: implement some flic accessor methods

* dethrace: implement getters to initialize the graphics options menu

* dethrace: implement graphics options menu

* dethrace: support saving options to file

* dethrace: implement AwardTime

* Add utility script to decode encrypted text file

* dethrace: implement Log2 + LoadDepthTable

* dethrace: replace number with their character equivalent

* dethrace: implement DimRectangle

Dimming the rectangles for the HUD is not working, because the renderer needs to write back to the back screen.

* dethrace: implement KillOldestQueuedHeadup

* resource: remove debug fflush

* modrend: fix comment

* depth: fix factor 2 bug

* loading: undefine BAIL_IF_NEGATIVE

* dbsetup: use macros for enabled types

* input: remove outdated comment
2022-02-23 13:58:24 +13:00
Dethrace Engineering Department 0f4957064f
Vehicle shadows (#92)
* solid black shadow polygons rendering, no clip planes yet

* 8 bit colors, full color framebuffer

* fancy shadows, full 8 bit color pipeline

* fix shadows disappearing sometimes
2022-02-23 08:14:15 +13:00
Dethrace Engineering Department a5dad0f74f
adds progress script (#76) 2022-01-27 09:30:41 +13:00
Jeff Harris 9ac6479f34
Feature/groove animations (#59)
* implements groove animations
2021-09-14 12:00:21 +12:00
Jeff Harris 6a31e4f6a9
Fix/global vars ordering (#58)
* reordered global vars based on updated codegen, resolve duplicate symbols
2021-09-10 13:36:14 +12:00
Jeff Harris f1ed9ff522
Car control and physics attempt #1 (#57)
* correctly render track based on current view and yon factor

* some physics code

* rotate, translate, self centering steering

* Fix ordering of global variables

* ApplyPhysicsToCars

* car is moving somewhat

* fixes stumbling at low revs

* camera swings around properly when switching direction

* fix compile errors
2021-09-08 13:19:08 +12:00
Jeff Harris 6bc804710e
Feature/loadcar (#42)
* LoadCar
2021-01-26 21:49:35 +13:00
Jeff Harris a7e588d1f8
Adds VerifyQuit screen, tidies up memory alloc/free tracing (#37)
* Adds VerifyQuit screen, tidies up very verbose memory alloc/free tracing, extra error checks on SDL calls
2020-09-09 07:41:12 -07:00
Jeff Harris 185fb8a2dc
Feature/mainmenu (#35)
* rendering main menu
2020-09-03 00:35:15 -07:00
Jeff Harris 716c65807d
plays intro smack files (#32)
* plays intro smack files
2020-07-19 23:42:03 -07:00
Jeff Harris e54cf25a74
Feature/load races (#31)
* loading races, powerups, opponents
* runs all the way to end of initialization
2020-07-15 22:02:11 -07:00
Jeff Harris 60309ba905
Load fonts, pixelmaps, materials (#28)
* load fonts, pixelmaps, shadetables, materials
2020-06-29 21:20:03 -07:00
Jeff Harris 4995fe4979
Implements LoadModel (#24)
* cpoint.dat model loading working
* Simplify resource_header padding, fixes resource free callback to close files correctly
2020-05-17 14:59:41 -07:00
Jeff Harris 92d549520e
Actor, pixelmap allocation etc (#23)
* Adds screen init, camera allocation
* Implements missing BrActorAdd
2020-02-01 09:15:06 -08:00
Jeff Harris c4aba6e122
Implements RestoreOptions functions (#22) 2020-01-16 23:06:12 -08:00
Jeff Harris 1a5715dc81
BrV1dbBeginWrapper_Float call tree (#19)
* Implements BrV1dbBeginWrapper_Float tree calls
2020-01-10 14:59:43 -08:00
Jeff Harris 5f0d3652b5
Update README.md 2019-12-10 10:56:25 -08:00
Jeff Harris e3a6995118
Update README.md 2019-12-10 10:56:09 -08:00
Jeff Harris 3ed8d79000
Codegen: add static modifier (#12)
* Codegen: add static modifier
2019-11-18 22:12:30 -08:00
Jeff Harris f97a2d4959
Update README.md 2019-11-14 17:42:47 -08:00
Jeff Harris a4dab84dc8 Dont forward declare every single struct 2019-11-14 17:37:39 -08:00
Jeff Harris 6b8376e142 removes generated files 2019-11-14 15:28:45 -08:00
Jeff Harris 14f5b121bb
Update README.md 2019-11-14 15:27:23 -08:00
Jeff Harris fb4e4f73e7 Fixes some functions having incorrect parameters 2019-11-14 13:53:30 -08:00