fix: small changes
parent
7c587faba6
commit
0a6f2485a2
|
@ -1,12 +1,12 @@
|
||||||
#include "debug_ui.h"
|
#include "debug_ui.h"
|
||||||
#include "world/blocks.h"
|
#include "world/blocks.h"
|
||||||
|
|
||||||
static inline void
|
void
|
||||||
ActExitGame(void) {
|
ActExitGame(void) {
|
||||||
game_request_close();
|
game_request_close();
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
void
|
||||||
ActSpawnCar(void) {
|
ActSpawnCar(void) {
|
||||||
ecs_entity_t e = vehicle_spawn();
|
ecs_entity_t e = vehicle_spawn();
|
||||||
ecs_entity_t plr = camera_get().ent_id;
|
ecs_entity_t plr = camera_get().ent_id;
|
||||||
|
@ -18,7 +18,7 @@ ActSpawnCar(void) {
|
||||||
debug_replay_special_action(RPKIND_SPAWN_CAR);
|
debug_replay_special_action(RPKIND_SPAWN_CAR);
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
void
|
||||||
ActPlaceIceRink(void) {
|
ActPlaceIceRink(void) {
|
||||||
ecs_entity_t plr = camera_get().ent_id;
|
ecs_entity_t plr = camera_get().ent_id;
|
||||||
uint8_t watr_id = blocks_find(BLOCK_BIOME_DEV, BLOCK_KIND_WATER);
|
uint8_t watr_id = blocks_find(BLOCK_BIOME_DEV, BLOCK_KIND_WATER);
|
||||||
|
@ -37,64 +37,64 @@ ActPlaceIceRink(void) {
|
||||||
|
|
||||||
// NOTE(zaklaus): Replay system
|
// NOTE(zaklaus): Replay system
|
||||||
|
|
||||||
static inline uint8_t
|
uint8_t
|
||||||
CondReplayStatusOn(void) {
|
CondReplayStatusOn(void) {
|
||||||
return is_recording && !is_playing;
|
return is_recording && !is_playing;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint8_t
|
uint8_t
|
||||||
CondReplayStatusOff(void) {
|
CondReplayStatusOff(void) {
|
||||||
return !is_recording && !is_playing;
|
return !is_recording && !is_playing;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint8_t
|
uint8_t
|
||||||
CondReplayDataPresentAndNotPlaying(void) {
|
CondReplayDataPresentAndNotPlaying(void) {
|
||||||
return records != NULL && !is_recording && !is_playing;
|
return records != NULL && !is_recording && !is_playing;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint8_t
|
uint8_t
|
||||||
CondReplayIsPlaying(void) {
|
CondReplayIsPlaying(void) {
|
||||||
return records != NULL && !is_recording && is_playing;
|
return records != NULL && !is_recording && is_playing;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint8_t
|
uint8_t
|
||||||
CondReplayIsNotPlaying(void) {
|
CondReplayIsNotPlaying(void) {
|
||||||
return !is_recording && !is_playing;
|
return !is_recording && !is_playing;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline uint8_t
|
uint8_t
|
||||||
CondReplayIsNotPlayingOrRecordsNotClear(void) {
|
CondReplayIsNotPlayingOrRecordsNotClear(void) {
|
||||||
return records != NULL && !is_recording && !is_playing;
|
return records != NULL && !is_recording && !is_playing;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
void
|
||||||
ActReplayBegin(void) {
|
ActReplayBegin(void) {
|
||||||
debug_replay_start();
|
debug_replay_start();
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
void
|
||||||
ActReplayEnd(void) {
|
ActReplayEnd(void) {
|
||||||
debug_replay_stop();
|
debug_replay_stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
void
|
||||||
ActReplayRun(void) {
|
ActReplayRun(void) {
|
||||||
debug_replay_run();
|
debug_replay_run();
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
void
|
||||||
ActReplayClear(void) {
|
ActReplayClear(void) {
|
||||||
debug_replay_clear();
|
debug_replay_clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static inline void
|
void
|
||||||
ActReplayNew(void) {
|
ActReplayNew(void) {
|
||||||
debug_replay_clear();
|
debug_replay_clear();
|
||||||
zpl_zero_size(replay_filename, sizeof(replay_filename));
|
zpl_zero_size(replay_filename, sizeof(replay_filename));
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
void
|
||||||
ActReplaySaveAs(void) {
|
ActReplaySaveAs(void) {
|
||||||
if (!records) return;
|
if (!records) return;
|
||||||
char const *workdir = GetWorkingDirectory();
|
char const *workdir = GetWorkingDirectory();
|
||||||
|
@ -116,7 +116,7 @@ ActReplaySaveAs(void) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
void
|
||||||
ActReplaySave(void) {
|
ActReplaySave(void) {
|
||||||
if (!replay_filename[0]) {
|
if (!replay_filename[0]) {
|
||||||
ActReplaySaveAs();
|
ActReplaySaveAs();
|
||||||
|
@ -124,7 +124,7 @@ ActReplaySave(void) {
|
||||||
else debug_replay_store();
|
else debug_replay_store();
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
void
|
||||||
ActReplayLoad(void) {
|
ActReplayLoad(void) {
|
||||||
char const *workdir = GetWorkingDirectory();
|
char const *workdir = GetWorkingDirectory();
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ ActReplayLoad(void) {
|
||||||
// NOTE(zaklaus): Demo NPCs
|
// NOTE(zaklaus): Demo NPCs
|
||||||
static ecs_entity_t *demo_npcs = NULL;
|
static ecs_entity_t *demo_npcs = NULL;
|
||||||
|
|
||||||
static inline void
|
void
|
||||||
ActSpawnDemoNPCs(void) {
|
ActSpawnDemoNPCs(void) {
|
||||||
if (!demo_npcs) zpl_array_init(demo_npcs, zpl_heap());
|
if (!demo_npcs) zpl_array_init(demo_npcs, zpl_heap());
|
||||||
if (zpl_array_count(demo_npcs) >= 10000) return;
|
if (zpl_array_count(demo_npcs) >= 10000) return;
|
||||||
|
@ -169,7 +169,7 @@ ActSpawnDemoNPCs(void) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void
|
void
|
||||||
ActDespawnDemoNPCs(void) {
|
ActDespawnDemoNPCs(void) {
|
||||||
if (!demo_npcs) return;
|
if (!demo_npcs) return;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue