code: fixed minor stuff
parent
028cdb34b2
commit
fbf9129b8a
|
@ -25,7 +25,7 @@ bool debug_draw_state(void) {
|
||||||
return draw_is_enabled;
|
return draw_is_enabled;
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void debug_push_entry(debug_draw_entry entry) {
|
static inline void debug_push_entry(debug_draw_entry entry) {
|
||||||
if (!draw_is_enabled) return;
|
if (!draw_is_enabled) return;
|
||||||
if (game_get_kind() == GAMEKIND_HEADLESS) return;
|
if (game_get_kind() == GAMEKIND_HEADLESS) return;
|
||||||
ZPL_ASSERT(draw_queue.num_entries < DEBUG_DRAW_MAX_ENTRIES);
|
ZPL_ASSERT(draw_queue.num_entries < DEBUG_DRAW_MAX_ENTRIES);
|
||||||
|
@ -60,4 +60,4 @@ void debug_push_rect(debug_v2 bmin, debug_v2 bmax, int32_t color) {
|
||||||
.bmin = bmin,
|
.bmin = bmin,
|
||||||
.bmax = bmax,
|
.bmax = bmax,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
static uint8_t inv_selected_item = 0;
|
static uint8_t inv_selected_item = 0;
|
||||||
static bool inv_drop_item = false;
|
static bool inv_drop_item = false;
|
||||||
static bool inv_is_open = false;
|
bool inv_is_open = false;
|
||||||
|
|
||||||
static bool inv_item_is_held = false;
|
static bool inv_item_is_held = false;
|
||||||
static uint8_t inv_held_item_idx = 0;
|
static uint8_t inv_held_item_idx = 0;
|
||||||
|
@ -91,4 +91,4 @@ void inventory_draw() {
|
||||||
inv_item_is_held = false;
|
inv_item_is_held = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,7 +16,7 @@
|
||||||
#include "source/system_vehicle.c"
|
#include "source/system_vehicle.c"
|
||||||
#include "source/system_items.c"
|
#include "source/system_items.c"
|
||||||
|
|
||||||
inline float physics_correction(float x, float vx, float bounce) {
|
static inline float physics_correction(float x, float vx, float bounce) {
|
||||||
float r = (((zpl_max(0.0f, (WORLD_BLOCK_SIZE/2.0f) - zpl_abs(x))*zpl_sign(x)))*(WORLD_BLOCK_SIZE/2.0f));
|
float r = (((zpl_max(0.0f, (WORLD_BLOCK_SIZE/2.0f) - zpl_abs(x))*zpl_sign(x)))*(WORLD_BLOCK_SIZE/2.0f));
|
||||||
return r + (-vx*bounce);
|
return r + (-vx*bounce);
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,15 +1,15 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "flecs/flecs.h"
|
#include "flecs/flecs.h"
|
||||||
|
|
||||||
inline float safe_dt(ecs_iter_t *it) {
|
static inline float safe_dt(ecs_iter_t *it) {
|
||||||
return zpl_min(it->delta_time, 0.03334f);
|
return zpl_min(it->delta_time, 0.03334f);
|
||||||
}
|
}
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
// NOTE(zaklaus): Public systems are exposed here
|
// NOTE(zaklaus): Public systems are exposed here
|
||||||
int32_t _unused;
|
int32_t _unused;
|
||||||
} Systems;
|
} Systems;
|
||||||
|
|
||||||
#define SystemsImportHandles(handles) (void)(handles)
|
#define SystemsImportHandles(handles) (void)(handles)
|
||||||
|
|
||||||
void SystemsImport(ecs_world_t *ecs);
|
void SystemsImport(ecs_world_t *ecs);
|
||||||
|
|
Loading…
Reference in New Issue