Dominic Szablewski
64a492f992
Add src/libs/ as additional include dir as it is now specified as system headers
2023-09-04 16:30:42 +02:00
Dominic Szablewski
3b97df8f0a
Mention Makefile build; formatting
2023-09-04 16:27:42 +02:00
Dominic Szablewski
8670d6bb54
Merge branch 'cmake'
2023-09-04 15:50:11 +02:00
Dominic Szablewski
701e2d55e6
Fix 8 byte alignment in temp allocator; close #68
2023-09-04 13:58:43 +02:00
Stephen Gregoratto
b7c4c9bff3
Add a CMake build guide
2023-09-04 01:12:09 +10:00
Stephen Gregoratto
65d9494cfb
Add CMakeSettings.json for easier Visual Studio building
2023-09-04 01:12:08 +10:00
Stephen Gregoratto
a9b9e35266
Add vcpkg.json
2023-09-04 01:12:08 +10:00
Stephen Gregoratto
9f046ea0a4
Fixes for -Wstrict-prototype
2023-09-04 01:12:08 +10:00
Stephen Gregoratto
2b3fcaaf0b
Include 3rd-party libs as system headers
...
Now, the compiler will only report errors in our code and not in any of
these headers.
2023-09-04 01:12:05 +10:00
Stephen Gregoratto
53d260d632
fixup
2023-09-04 01:11:21 +10:00
Stephen Gregoratto
98ad9b0679
Build with CMake.
...
Tested building with SDL2 + Sokol on:
- Windows with clang-cl 16
- GLEW/SDL2 built using vcpkg.
- Arch Linux with the `sdl2`/`glew` packages.
- macOS 13.5 with SDL2 via homebrew.
- Emscripten using the Arch Linux `emscripten` package.
- Mingw toolchain with the GLEW/SDL2 packages installed:
- On Arch Linux with the mingw packages.
- On Windows using MSYS2 with the ucrt packages.
2023-09-02 23:15:07 +10:00
Stephen Gregoratto
90b9cffc60
Update sokol headers to fix a build issue on Windows
...
For some reason, the private method `_sapp_win32_init_console` used
`freopens` instead of `freopen_s`. Instead of fixing that, just upgrade
all the Sokol headers instead.
Also, the GLES2 renderer is no longer available for Emscripten, so bump
it up to GLES3.
2023-09-02 22:40:41 +10:00
Stephen Gregoratto
9207839c80
Fix building on Windows
...
- Drop linking opengl32/glew32.libs using `#pragma`s in favour of
specifing the libraries at build time.
- Use check for the `WIN32` macro when including Windows specific
headers in `src/render_gl.c`.
- Undefine the `min`, `max`, `near`, and `far` macros when building on
Windows.
2023-09-02 22:40:41 +10:00
Dominic Szablewski
ecf1e63508
Do some culling based on camera direction
2023-09-01 19:04:27 +02:00
Dominic Szablewski
9e90c4768f
Merge pull request #63 from BeWorld2018/fix
...
Fix memory leak on exit
2023-09-01 14:11:44 +02:00
BeWorld
aa06570a05
Move SDL_DestroyWindow in main()
2023-09-01 14:10:24 +02:00
BeWorld
07d8a37afd
Destroy Window and Renderer
2023-09-01 10:26:56 +02:00
BeWorld
c8bf7c82f7
Add SDL_GameContrllerClose
...
Fix memory leak
2023-08-31 12:57:31 +02:00
Dominic Szablewski
cf68eab8b2
Merge pull request #60 from tjrileywisc/change-app-name
...
Rename sokol app window for consistency
2023-08-31 12:12:26 +02:00
Timothy Riley
61ffe2f410
Rename sokol app window for consistency
2023-08-31 00:07:49 -04:00
Dominic Szablewski
98bd55a342
WASM: add touch controls
2023-08-30 17:40:50 +02:00
Dominic Szablewski
a84982b31e
Shutdown sokol audio on exit
2023-08-30 17:24:26 +02:00
Dominic Szablewski
a3b156ef30
Properly free sdl paths on exit
2023-08-30 17:23:59 +02:00
Dominic Szablewski
2c5c3d3f13
Use US spelling of "color" everywhere
2023-08-30 12:38:34 +02:00
Dominic Szablewski
69122122f0
Remove unused color union fields
2023-08-30 12:34:52 +02:00
Dominic Szablewski
530fb40fb7
Remove obsolete TRACK_*_MAX defines and struct fields
2023-08-30 12:25:17 +02:00
Dominic Szablewski
2430297998
Make track vertex color loading endian agnostic; see #56
2023-08-30 12:21:10 +02:00
Dominic Szablewski
4b1fa81f30
Make image loading a bit faster by doing the color conversion for each palette entry just once
2023-08-28 18:09:34 +02:00
Dominic Szablewski
97a1073946
Fix TIM palette loading; see #56
2023-08-28 18:02:03 +02:00
Dominic Szablewski
4c76aadf80
Fix audio on big endian machines; see #56
2023-08-28 17:22:48 +02:00
Dominic Szablewski
78f452decf
Add USER_CFLAGS to allow specifying additional defines; see #53
2023-08-28 16:48:47 +02:00
Dominic Szablewski
108cfac9dc
Use Use appropriate platform-specific paths for assets and userdata; close #10 , #53 , #47
...
This commit also allows overriding these path at build time through
-DPATH_ASSETS=.. and -DPATH_USERDATA=..
2023-08-28 16:39:51 +02:00
Dominic Szablewski
18ebcc7457
Make loading palette colors in TIM images endian agnostic; see #56
2023-08-28 14:29:39 +02:00
Dominic Szablewski
209c1fd627
Add ALT+Enter hotkey to toggle fullscreen; close #45
2023-08-27 12:52:58 +02:00
Dominic Szablewski
da4d3b5c0c
Prevent int overflow when projecting target reticle on screen; close #48
2023-08-26 17:49:42 +02:00
Dominic Szablewski
41399234f6
Merge pull request #37 from jantlo/avoid_draw_sections_more_than_once
...
Avoid rendering more than once those track sections in tracks with alternative paths.
2023-08-23 23:31:43 +02:00
Juan Lopez
6170976e6a
Avoid rendering more than once those track sections in tracks with alternative paths.
2023-08-23 23:08:23 +02:00
Dominic Szablewski
e9f91c57f0
Remove obsolete -rdynamic flag
2023-08-23 18:26:23 +02:00
Juan Lopez
6fcd669733
Added support build on Windows under the MSYS2 enviroment.
2023-08-21 22:14:59 +02:00
Dominic Szablewski
9f0e6454bf
Remove implemented things from todo list; fix wording for required files ( #34 )
2023-08-21 20:40:34 +02:00
Dominic Szablewski
5e0cd76948
Initialize joysticks and support loading gamecontrollerdb.txt; see #26
2023-08-21 13:07:39 +02:00
Dominic Szablewski
4c1e50939e
Add mapping game controller guide button; see #26
2023-08-19 23:40:02 +02:00
Dominic Szablewski
a721eec118
Fix championship rank calculation
2023-08-19 21:30:15 +02:00
Dominic Szablewski
8c9ec8871e
Fix makefile to pick up changes in headers
2023-08-18 19:32:41 +02:00
Dominic Szablewski
59ebb89ed2
Blink current menu item 30x per second; see #31
2023-08-18 19:09:28 +02:00
Dominic Szablewski
dae45b786a
Show correct team logo in team selection menu; close #32
2023-08-18 18:46:34 +02:00
Dominic Szablewski
7760f83ce1
Add software rendering backend as a demo
2023-08-16 22:55:04 +02:00
Dominic Szablewski
b2e3ae80dd
Add button bindings to save data, add controls menu; close #6
2023-08-15 23:42:51 +02:00
Dominic Szablewski
0ded93de55
Allow for A_MENU_START to select in menu; add A_MENU_QUIT to go back
2023-08-15 23:37:05 +02:00
Dominic Szablewski
24b6efd3ea
Fix input problems when rebinding input
2023-08-15 23:35:02 +02:00