Commit Graph

33 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
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 d3874216c0 fix tests build 2021-09-10 13:44:52 +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 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
Jeff Harris 6bc804710e
Feature/loadcar (#42)
* LoadCar
2021-01-26 21:49:35 +13:00
Jeff Harris f665dbf6cf
Implements Select Driver screen (#39)
* Adds driver select interface screen
2020-09-23 00:30:16 -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 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 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
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 f52f394675 merge 2020-01-11 09:27:00 -08:00
Jeff Harris efe0a8dbdc
clang format all files (#21) 2020-01-11 09:23:28 -08:00
Jeff Harris 8648891d4a merge 2020-01-10 15:03:27 -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 7d1789a6ef Adds LoadGeneralParameters function 2020-01-10 14:56:03 -08:00
Jeff Harris 2ae8c4bc8d Implements BrV1dbBeginWrapper_Float tree calls 2020-01-02 21:40:49 -08:00
Jeff Harris 53de41f556 tests pass with *prev 2019-12-30 12:52:18 -08:00
Jeff Harris 25eeef2010 wip 2019-12-17 23:04:46 -08:00
Jeff Harris f42242306a
Implements GameMain initialization (#17)
* GameMain methods
* Adds tests for PDInitialise, CD checks
2019-12-06 09:50:11 -08:00
Jeff Harris 66fe07e9a2
implements main method (#16)
* Implements: main, Usage
2019-12-02 11:24:18 -08:00
OmniBlade cee44698b2 Implements BrFloat* functions. (#15) 2019-11-26 16:21:18 -08:00
Jeff Harris b04c31139f
Adds unit tests, some more implementations (#14)
* unit tests, some implementations
2019-11-24 21:19:15 -08:00