Commit Graph

83 Commits

Author SHA1 Message Date
Dethrace Engineering Department 988891306d
Adds skidmarks (#78) 2022-01-28 13:27:21 +13:00
Dethrace Engineering Department a5dad0f74f
adds progress script (#76) 2022-01-27 09:30:41 +13:00
Anonymous Maarten ba4b7630fb
Add all datafile functions (+needed dependent functions) (#73)
* brender: add fixed functions + tests

* brender: re-order assignment of variables

Little nitpick patch, sorry :^)

* brender: implement all scratch functions + tests

* tests: Actually build and run math test functions

* brender: implement BrFilePrintf

* brender: BrVsprintfN returns number of characers written

* tests: add ability to create temporary file in temporary folder

* brender: add binary/text store+load of datafile + tests
2022-01-26 11:54:30 +13:00
Dethrace Engineering Department 94167e09c8
Recovery and Race Completed logic (#74)
* implements race completed, recovery logic

* fps limiter, better framebuffer handling
2022-01-25 22:32:11 +13:00
Anonymous Maarten ee032df264
Fix MSVC tests + add mingw support (#65)
* Include windows.h before imagehlp.h

This fixes a long list of undefined type errors when building with mingw (on Linux).

* Remove matherr function

This function is provided by the c library.

* Use GetFileAttributesA to filter files

dirent->d_type is not available in all implementation.
Posix only mandates the fields d_name and d_ino.

* Use FindOpenGL.cmake to get the opengl library

Mingw has no libGL.so, but has libopengl32.a. Use the CMake module to abstract this away.

* harness needs to link to dbghelp

This fixes undefined references to:
__imp_SymInitialize, __imp_SymGetModuleBase64,
__imp_SymFunctionTableAccess64, __imp_StackWalk64 and __imp_SymCleanup.

* Don't add -g to compile options.

CMAKE_BUILD_TYPE=(Debug|RelWithDebInfo) takes care of this

* Set test file name before running tests in suite.

This causes the message to contain the correct file name where an assertion failed/succeeded.

* Use wrapper to sleep for number on seconds in tests

sleep on Windows expects milliseconds.
sleep on Posix expects seconds.

* Use char* instead of void*

MSVC complained that it couldn't determine the size of void

* Don't test state of removed resource after deletion when building Debug

When building in Debug configuration, the compiler may mark deleted memory ranges with some value.
Therefore, we cannot expect deleted memory to remain unchanged.
(MSVC in Debug mode does this)

* Use helper to get system temporary folder.

Using /tmp on Windows failed hard.

* Header containing sse3 intrinsics is pmmintrin.h

See https://github.com/recp/cglm/pull/234

* Add errno.h include for ENOTSUP

* Fix test_utility_GetALineWithNoPossibleService: avoid strcpy of uninitialized s

Found by running the tests with CMAKE_BUILD_TYPE=Debug with MSVC

* Add mingw@Linux and mingw@Windows jobs to github workflow

* Rename build-windows.ps1 script to build-msvc.ps1.

Also bump the versions of SDL2 and ninja, used in this script.

* Run tests in github jobs running on Windows

Co-authored-by: Dethrace Engineering Laboratory <78985374+dethrace-labs@users.noreply.github.com>
2022-01-20 13:17:10 +13:00
Anonymous Maarten e8f3b6f95b
Implement all brender matrix functions (#66)
* Add macro to test float array with precision

* Implement all matrix4 functions + add tests

* Implement all matrix23 functions + add tests

* Implement all matrix34 functions + add tests

* Implement all quat functions + add tests
2022-01-20 13:13:25 +13:00
Anonymous Maarten 991a9226fb
Implement all functions related to lists + registries (#67)
* Implement all br_list + br_simple_lists operations + tests

* Implement all br_register operations + tests

* Also fix BrRegistryFind/BrRegistryRemove with empty registers
2022-01-20 13:10:19 +13:00
DJs3000 6971c1d49c
Fix 2 error (#71)
* Update datafile.c

lcc: "/root/dev/dethrace/src/BRSRC13/CORE/FW/datafile.c", строка 409: ошибка:
         переменная "n" может быть использована неинициализированной
         [-Werror=maybe-uninitialized]

* Update common.c
"scancode unsigned" can't be below zero.
2022-01-20 13:09:36 +13:00
Dethrace Labs 905bf98867 fixes demo CheckTimer() 2022-01-18 09:31:42 +13:00
Dethrace Engineering Laboratory 73c799d573
Textures! (#69)
* textures working
* adds demo code
* fixes incorrect rotation
2022-01-18 09:16:24 +13:00
Dethrace Engineering Laboratory 6d21a1c480
BRender inline functions (#64)
* convert CollCheck to use inline BR functions

* convert CalcForce to use inline BR functions

* partial support for demo content

* harness interface tidy up

* cleaner platform handing
2021-10-04 12:37:23 +13:00
Jeff Harris 4608bdd8ca
Feature/collision detection (#60)
* most functions implemented, car disappears on collision?
* implements friction from collision, car no longer disappears
* removes -Werror compiler flag for DETHRACE directory
2021-09-21 13:09:18 +12: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 3244bdbd55
Awfully complicated camera collision bits (#54)
* Awfully complicated camera collision bits
2021-07-18 22:27:08 +12:00
Jeff Harris a8f34c5815
Fixes loading regular Carma1 data directory (#53) 2021-07-17 20:10:58 +12: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 4754aea863
Enable more compiler errors (#50)
* Fixes clever text rendering
* Adds better compile errors
2021-05-02 22:32:38 +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 b435e49f2b workflow: tag release 9 2021-04-14 08:21:00 +12:00
Jeff Harris baafd76a09
Workflow test (#47)
* Adds first test of create release when tag is pushed
* fix pixelmap read warnings
2021-04-14 06:01:19 +12:00
Jeff Harris 43f517234d
Set Initial Grid Position (#46)
* Implements SetInitialPosition, fixed prepareGroups vertices
2021-04-13 14:04:03 +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 a10d622943 Fixes linking issues on macOS.
macOS linker seems to have issue with linking when only symbols are default initialised globals.
2021-03-12 15:49:29 +00:00
OmniBlade aa70c9c966 Corrects the types on some pointer casts. 2021-03-12 15:49:29 +00:00
OmniBlade 50b4b4f37a Adds startup code to enable printing to cmd prompt.
If game is started from command line, debug output prints to the console.
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 efb3484b79 Applies some fixes for an MSVC build.
Casts for arithmetic on void*.
Includes SDL.h directly with no folder (Documentation suggests this is
best practice anyhow)
Provides a win32 clock_gettime implementation suitable for how it is used.
Removes braces from struct typedefs to keep msvc happy.
Other misc changes.
OpenGL implementation needs work on MSVC and does not build correctly
yet.
2021-03-12 15:49:29 +00:00
OmniBlade f2168d0db4 Initial CMake based build system implementation. 2021-03-12 15:49:29 +00:00
OmniBlade 6f64649abb
Refactors InitWobbleStuff. (#44)
Implements ClearWobbles and replaces inlined code.
Cleans up floating point optimisations to use original divisions.
2021-03-05 22:51:55 +00:00
Jeff Harris 6bc804710e
Feature/loadcar (#42)
* LoadCar
2021-01-26 21:49:35 +13:00
Jeff Harris 62d000b861
Disable cd check by default, add support for SP/Carma game modes (#41) 2020-09-24 09:50:23 -07:00
Jeff Harris dd05afea6e
Feature/loading race screen (#40)
* Adds loading splash screen, switch to single threaded mode
2020-09-23 12:03:00 -07:00
Jeff Harris f665dbf6cf
Implements Select Driver screen (#39)
* Adds driver select interface screen
2020-09-23 00:30:16 -07:00
Jeff Harris 7b7f691c45
Fix/update from new codegen (#38)
* removes duplicate comments in header files
* replaces offset, size, register comments with a single IDA format comment
2020-09-11 11:01:54 -07: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 f843c1037f
fixes handling of scan codes in memory buffer (#36) 2020-09-04 22:10:17 -07:00
Jeff Harris 185fb8a2dc
Feature/mainmenu (#35)
* rendering main menu
2020-09-03 00:35:15 -07:00
Jeff Harris ecc435ef8e
Feature/keyboard input (#33)
* Adds basic keyboard handling, palette fading
2020-07-24 18:49:35 -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 77e404f141
Adds font rendering, makes low memory screen work (#30)
* Adds font rendering, makes low memory screen work
* fix tests without data directory
2020-07-08 21:08:55 -07:00
Jeff Harris 0246c1de7f
Feature/renderer (#29)
* Adds first cut of GL renderer
* Adds harness: where we add modern code to interface with the original game code
2020-07-06 00:45:08 -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 9afc5fdef8
Feature/brmodelupdate (#27)
* Adds bbox and raduis generation for models
2020-06-13 00:13:49 -07:00
Jeff Harris 87930e0af9
Removes incorrect NOT_IMPLEMENTED guards, adds DR filesystem (#26) 2020-05-22 22:36:54 -07:00
Jeff Harris 12da0ed779
LoadActor (#25)
* Implements LoadActor call tree
* Added defines for df_* constants that we don’t have symbols for
2020-05-22 19:05:22 -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