summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOmniscient <omniscient.oce@gmail.com>2024-04-23 21:20:52 +1000
committerOmniscient <omniscient.oce@gmail.com>2024-04-23 21:20:52 +1000
commitfd582eeebe716dac85531d2dda8cee2c06b8ddf9 (patch)
treed722da639ec7c9c6c6699209ec0ef775553d4667 /src
parent823f25f993d52a377e95bbfd98506b6b73fdf01e (diff)
start spitballing physics
Diffstat (limited to 'src')
-rw-r--r--src/defines.h2
-rw-r--r--src/logos/jobs.h3
-rw-r--r--src/systems/physics.c1
-rw-r--r--src/systems/physics.h19
4 files changed, 24 insertions, 1 deletions
diff --git a/src/defines.h b/src/defines.h
index 52aa7b0..7698e98 100644
--- a/src/defines.h
+++ b/src/defines.h
@@ -1,6 +1,6 @@
/**
* @file defines.h
- * @brief
+ * @brief Typedefs for common integer/floating point types and very basic macros
* @date 2024-02-24
* @copyright Copyright (c) 2024
*/
diff --git a/src/logos/jobs.h b/src/logos/jobs.h
new file mode 100644
index 0000000..cc2c8fa
--- /dev/null
+++ b/src/logos/jobs.h
@@ -0,0 +1,3 @@
+/**
+ * Common jobs that get run
+*/ \ No newline at end of file
diff --git a/src/systems/physics.c b/src/systems/physics.c
new file mode 100644
index 0000000..299c0c1
--- /dev/null
+++ b/src/systems/physics.c
@@ -0,0 +1 @@
+#include "physics.h" \ No newline at end of file
diff --git a/src/systems/physics.h b/src/systems/physics.h
new file mode 100644
index 0000000..17fc746
--- /dev/null
+++ b/src/systems/physics.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include "maths_types.h"
+
+// 'system' means that it gets called per frame
+
+typedef struct physics_settings {
+ f32 gravity_strength;
+} physics_settings;
+
+typedef struct physics_world {
+ physics_settings settings;
+} physics_world;
+
+physics_world physics_init(physics_settings settings);
+void physics_shutdown(physics_world* phys_world);
+
+/** @brief perform one or more simulation steps */
+void physics_system_update(physics_world* phys_world, f64 deltatime); \ No newline at end of file