Browse Source

Automatically added HandmadeMath

master
Macoy Madson 2 years ago
parent
commit
a7f98b4280
  1. 3
      .gitmodules
  2. 1
      Dependencies/Handmade-Math
  3. 2
      Dependencies/gamelib
  4. 5
      src/TownCoding.cake

3
.gitmodules

@ -7,3 +7,6 @@
[submodule "Dependencies/SDL"]
path = Dependencies/SDL
url = https://github.com/libsdl-org/SDL
[submodule "Dependencies/Handmade-Math"]
path = Dependencies/Handmade-Math
url = https://github.com/HandmadeMath/Handmade-Math

1
Dependencies/Handmade-Math

@ -0,0 +1 @@
Subproject commit 43afc87fa74d6c4e495fdb131e8a91eb42b39db8

2
Dependencies/gamelib

@ -1 +1 @@
Subproject commit 0a9235af87bd991eb943c4665c9ab33868354ff7
Subproject commit d9385b122adb689050fe7f35cd11407c71b0b101

5
src/TownCoding.cake

@ -2,7 +2,7 @@
(add-cakelisp-search-directory "Dependencies/gamelib/src")
(add-cakelisp-search-directory "Dependencies/cakelisp/runtime")
(import "SDL.cake")
(import "SDL.cake" "Math.cake")
(c-import "SDL.h" "SDL_syswm.h" "SDL_timer.h")
;; TODO: Somehow inherit this from SDL.cake?
(module-use-sdl-build-options)
@ -27,6 +27,9 @@ Licensed under GPL-3.0-or-later.\n\n")
(var currentKeyStates (* (const Uint8)) (SDL_GetKeyboardState null))
(when (at SDL_SCANCODE_ESCAPE currentKeyStates)
(set exit-reason "Escape pressed"))
(var test-vec vec3 (array 0.f 0.f 0.f))
(vec3-add test-vec g-up-axis)
(SDL_UpdateWindowSurface window))
(when exit-reason

Loading…
Cancel
Save