summaryrefslogtreecommitdiff
path: root/sim.cpp
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-12-08 13:47:38 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-12-08 13:47:38 -0500
commitcfe2db8135b5332c71a9b844cb5136c4bfd120e3 (patch)
treec589abc4a4f792d3d4c3758957040dd6a7b08744 /sim.cpp
parent7efbd44a641b32285499b07dc4f5461fec8dc8d5 (diff)
got windows build to work
Diffstat (limited to 'sim.cpp')
-rw-r--r--sim.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/sim.cpp b/sim.cpp
index a2bdaf1..906ece9 100644
--- a/sim.cpp
+++ b/sim.cpp
@@ -258,12 +258,12 @@ static b2Body *platform_to_body(State *state, Platform *platform) {
return body;
}
-#ifdef _WIN32
-__declspec(dllexport)
-#endif
#ifdef __cplusplus
extern "C"
#endif
+#ifdef _WIN32
+__declspec(dllexport)
+#endif
void sim_frame(Frame *frame) {
if (frame->memory_size < sizeof(State)) {
printf("Not enough memory (got %lu, require %lu).\n", (ulong)frame->memory_size, (ulong)sizeof(State));
@@ -295,10 +295,11 @@ void sim_frame(Frame *frame) {
glClearColor(0, 0, 0, 1);
glClear(GL_COLOR_BUFFER_BIT);
+#if DEBUG
if (state->magic_number != MAGIC_NUMBER || keys_pressed[KEY_F5]) {
memset(state, 0, sizeof *state);
}
-
+#endif
if (!state->initialized) {
logln("Initializing...");