Skip to content

Commit

Permalink
Some changes to the hot reload code
Browse files Browse the repository at this point in the history
  • Loading branch information
tanis2000 committed Feb 12, 2025
1 parent 78112cc commit 9056008
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
3 changes: 2 additions & 1 deletion example/gameplay/my_script.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include <stdint.h>
#pragma once
#include "binocle_platform.h"
#include <stdint.h>

typedef struct game_state
{
Expand Down
2 changes: 1 addition & 1 deletion example/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
#include "binocle_http.h"
#include "binocle_memory.h"

//#define GAMELOOP 1
// #define GAMELOOP 1
//#define DEMOLOOP
#define TWODLOOP

Expand Down
4 changes: 2 additions & 2 deletions src/binocle/core/binocle_game.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include "binocle_input.h"
#include "binocle_math.h"

void binocle_game_run(binocle_window window, binocle_input input) {
void binocle_game_run(binocle_window *window, binocle_input input) {
binocle_game game = {0};
game_memory game_memory = {0};
game_code game_code = {0};
Expand Down Expand Up @@ -61,7 +61,7 @@ void binocle_game_update(binocle_game *game, float dt) {
}
}

void binocle_game_draw(binocle_game *game, binocle_window window, float dt) {
void binocle_game_draw(binocle_game *game, binocle_window *window, float dt) {
// TODO: split UpdateAndRender into Update and Render
if (game->paused) return;
//binocle_window_clear(&window);
Expand Down
4 changes: 2 additions & 2 deletions src/binocle/core/binocle_game.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ typedef struct binocle_game {
} binocle_game;


void binocle_game_run(struct binocle_window window, struct binocle_input input);
void binocle_game_run(struct binocle_window *window, struct binocle_input input);

void binocle_game_update(binocle_game *game, float dt);

void binocle_game_draw(binocle_game *game, struct binocle_window window, float dt);
void binocle_game_draw(binocle_game *game, struct binocle_window *window, float dt);

void binocle_game_hotreload(binocle_game *game, char *sourceGameCodeDLLFullPath);

Expand Down

0 comments on commit 9056008

Please sign in to comment.