Commit Graph

128 Commits

Author SHA1 Message Date
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 f0ff895a8f remove double unit test run 2021-09-10 13:46:46 +12:00
Jeff Harris d3874216c0 fix tests build 2021-09-10 13:44:52 +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 12a500a9ee
Update README.md 2021-09-10 06:30:44 +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 a76d5c7875 Fix windows artifact paths 2021-04-14 10:46:15 +12:00
Jeff Harris 707d1ee0b5 Fix windows workflow artifact path 2021-04-14 10:13:16 +12:00
Jeff Harris 5f8f20cda3
Workflow #2 (#48)
* Workflow changes #2
2021-04-14 09:46:31 +12:00
Jeff Harris e13d327f7c workflow: tag release 11 2021-04-14 08:30:50 +12:00
Jeff Harris 1e2e9751a7 workflow: tag release 10 2021-04-14 08:26:14 +12:00
Jeff Harris b435e49f2b workflow: tag release 9 2021-04-14 08:21:00 +12:00
Jeff Harris 971bd31e4e workflow: tag release 8 2021-04-14 06:56:01 +12:00
Jeff Harris 4d8ed45c67 workflow: tag release 7 2021-04-14 06:54:37 +12:00
Jeff Harris 88d31399bc workflow: tag release 6 2021-04-14 06:39:07 +12:00
Jeff Harris eaca67a0c5 workflow: tag release 5 2021-04-14 06:36:27 +12:00
Jeff Harris fa9313c39b workflow: tag release 4 2021-04-14 06:35:20 +12:00
Jeff Harris 0c9e0124f8 workflow: tag release 3 2021-04-14 06:23:46 +12:00
Jeff Harris c921170883 workflow: tag release 2 2021-04-14 06:15:01 +12:00
Jeff Harris 66ced04915 workflow: tag release 2021-04-14 06:11:35 +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 4753c28593 Adds github workflows to test builds using CMake.
Builds 32bit and 64bit windows binaries.
Builds 64bit binaries with both clang and gcc on linux.
Builds 64bit macos binaries.
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 9bbf3028f3 Initial implementation of posix compat layer.
Small layer intended to provide win32 implementation of some common
posix fuctionality.
2021-03-12 15:49:29 +00:00
OmniBlade f2168d0db4 Initial CMake based build system implementation. 2021-03-12 15:49:29 +00:00
Jeff Harris 932261511b
Update SCREENSHOTS.md 2021-03-12 12:10:37 +13:00
Jeff Harris 458812ac24
Create SCREENSHOTS.md 2021-03-12 11:53:49 +13: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 65c4da8a63
Update README.md 2021-01-27 09:05:49 +13:00
Jeff Harris 19ef9d60d6
Update README.md 2021-01-27 05:54:13 +13:00