fp: Rename String8 to Str8
This commit is contained in:
parent
6febed1d08
commit
511c2d715f
2
External/tely
vendored
2
External/tely
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 4c979bbf759e6795a4d164ef4f7b7e8676cea3f7
|
Subproject commit 690696e60e846f27c5ccc60b50c64dbbc43c197a
|
200
feely_pona.cpp
200
feely_pona.cpp
@ -5,7 +5,7 @@
|
|||||||
|
|
||||||
Dqn_V2 const FP_TARGET_VIEWPORT_SIZE = Dqn_V2_InitNx2(1824, 1046);
|
Dqn_V2 const FP_TARGET_VIEWPORT_SIZE = Dqn_V2_InitNx2(1824, 1046);
|
||||||
|
|
||||||
static FP_ParticleDescriptor FP_DefaultFloatUpParticleDescriptor(Dqn_String8 anim_name, Dqn_usize duration_ms)
|
static FP_ParticleDescriptor FP_DefaultFloatUpParticleDescriptor(Dqn_Str8 anim_name, Dqn_usize duration_ms)
|
||||||
{
|
{
|
||||||
FP_ParticleDescriptor result = {};
|
FP_ParticleDescriptor result = {};
|
||||||
result.anim_name = anim_name;
|
result.anim_name = anim_name;
|
||||||
@ -26,7 +26,7 @@ static void FP_EmitParticle(FP_Game *game, FP_ParticleDescriptor descriptor, Dqn
|
|||||||
if (particle->alive)
|
if (particle->alive)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
particle->anim_name = Dqn_String8_Copy(Dqn_Arena_Allocator(game->frame_arena), descriptor.anim_name);
|
particle->anim_name = Dqn_Str8_Copy(Dqn_Arena_Allocator(game->frame_arena), descriptor.anim_name);
|
||||||
particle->alive = true;
|
particle->alive = true;
|
||||||
particle->pos = descriptor.pos;
|
particle->pos = descriptor.pos;
|
||||||
particle->velocity.x = descriptor.velocity.x + (descriptor.velocity_variance.x * (Dqn_PCG32_NextF32(&game->play.rng) - 0.5f));
|
particle->velocity.x = descriptor.velocity.x + (descriptor.velocity_variance.x * (Dqn_PCG32_NextF32(&game->play.rng) - 0.5f));
|
||||||
@ -38,7 +38,7 @@ static void FP_EmitParticle(FP_Game *game, FP_ParticleDescriptor descriptor, Dqn
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static TELY_AssetSpriteSheet FP_LoadSpriteSheetFromSpec(TELY_Platform *platform, TELY_Assets *assets, Dqn_Arena *arena, Dqn_String8 sheet_name)
|
static TELY_AssetSpriteSheet FP_LoadSpriteSheetFromSpec(TELY_Platform *platform, TELY_Assets *assets, Dqn_Arena *arena, Dqn_Str8 sheet_name)
|
||||||
{
|
{
|
||||||
TELY_AssetSpriteSheet result = {};
|
TELY_AssetSpriteSheet result = {};
|
||||||
Dqn_ThreadScratch scratch = Dqn_Thread_GetScratch(arena);
|
Dqn_ThreadScratch scratch = Dqn_Thread_GetScratch(arena);
|
||||||
@ -46,32 +46,32 @@ static TELY_AssetSpriteSheet FP_LoadSpriteSheetFromSpec(TELY_Platform *platform,
|
|||||||
result.type = TELY_AssetSpriteSheetType_Rects;
|
result.type = TELY_AssetSpriteSheetType_Rects;
|
||||||
|
|
||||||
// NOTE: Load the sprite meta file =========================================================
|
// NOTE: Load the sprite meta file =========================================================
|
||||||
Dqn_String8 sprite_spec_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/%.*s.txt", DQN_STRING_FMT(assets->textures_dir), DQN_STRING_FMT(sheet_name));
|
Dqn_Str8 sprite_spec_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/%.*s.txt", DQN_STR_FMT(assets->textures_dir), DQN_STR_FMT(sheet_name));
|
||||||
Dqn_String8 sprite_spec_buffer = platform->func_load_file(scratch.arena, sprite_spec_path);
|
Dqn_Str8 sprite_spec_buffer = platform->func_load_file(scratch.arena, sprite_spec_path);
|
||||||
Dqn_String8SplitAllocResult lines = Dqn_String8_SplitAlloc(scratch.allocator, sprite_spec_buffer, DQN_STRING8("\n"));
|
Dqn_Str8SplitAllocResult lines = Dqn_Str8_SplitAlloc(scratch.allocator, sprite_spec_buffer, DQN_STR8("\n"));
|
||||||
Dqn_usize sprite_rect_index = 0;
|
Dqn_usize sprite_rect_index = 0;
|
||||||
Dqn_usize sprite_anim_index = 0;
|
Dqn_usize sprite_anim_index = 0;
|
||||||
|
|
||||||
DQN_FOR_UINDEX(line_index, lines.size) {
|
DQN_FOR_UINDEX(line_index, lines.size) {
|
||||||
Dqn_String8 line = lines.data[line_index];
|
Dqn_Str8 line = lines.data[line_index];
|
||||||
Dqn_String8SplitAllocResult line_splits = Dqn_String8_SplitAlloc(scratch.allocator, line, DQN_STRING8(";"));
|
Dqn_Str8SplitAllocResult line_splits = Dqn_Str8_SplitAlloc(scratch.allocator, line, DQN_STR8(";"));
|
||||||
|
|
||||||
if (line_index == 0) {
|
if (line_index == 0) {
|
||||||
DQN_ASSERTF(line_splits.size == 4, "Expected 4 splits for @file lines");
|
DQN_ASSERTF(line_splits.size == 4, "Expected 4 splits for @file lines");
|
||||||
DQN_ASSERT(Dqn_String8_StartsWith(line_splits.data[0], DQN_STRING8("@file"), Dqn_String8EqCase_Sensitive));
|
DQN_ASSERT(Dqn_Str8_StartsWith(line_splits.data[0], DQN_STR8("@file"), Dqn_Str8EqCase_Sensitive));
|
||||||
|
|
||||||
// NOTE: Sprite sheet path
|
// NOTE: Sprite sheet path
|
||||||
Dqn_String8 sprite_sheet_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/%.*s", DQN_STRING_FMT(assets->textures_dir), DQN_STRING_FMT(line_splits.data[1]));
|
Dqn_Str8 sprite_sheet_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/%.*s", DQN_STR_FMT(assets->textures_dir), DQN_STR_FMT(line_splits.data[1]));
|
||||||
result.tex_handle = platform->func_load_texture(assets, sheet_name, sprite_sheet_path);
|
result.tex_handle = platform->func_load_texture(assets, sheet_name, sprite_sheet_path);
|
||||||
DQN_ASSERTF(Dqn_Fs_Exists(sprite_sheet_path), "Required file does not exist '%.*s'", DQN_STRING_FMT(sprite_sheet_path));
|
DQN_ASSERTF(Dqn_Fs_Exists(sprite_sheet_path), "Required file does not exist '%.*s'", DQN_STR_FMT(sprite_sheet_path));
|
||||||
|
|
||||||
// NOTE: Total sprite frame count
|
// NOTE: Total sprite frame count
|
||||||
Dqn_String8ToU64Result total_frame_count = Dqn_String8_ToU64(line_splits.data[2], 0);
|
Dqn_Str8ToU64Result total_frame_count = Dqn_Str8_ToU64(line_splits.data[2], 0);
|
||||||
DQN_ASSERT(total_frame_count.success);
|
DQN_ASSERT(total_frame_count.success);
|
||||||
result.rects = Dqn_Slice_Alloc<Dqn_Rect>(arena, total_frame_count.value, Dqn_ZeroMem_No);
|
result.rects = Dqn_Slice_Alloc<Dqn_Rect>(arena, total_frame_count.value, Dqn_ZeroMem_No);
|
||||||
|
|
||||||
// NOTE: Total animation count
|
// NOTE: Total animation count
|
||||||
Dqn_String8ToU64Result total_anim_count = Dqn_String8_ToU64(line_splits.data[3], 0);
|
Dqn_Str8ToU64Result total_anim_count = Dqn_Str8_ToU64(line_splits.data[3], 0);
|
||||||
DQN_ASSERT(total_anim_count.success);
|
DQN_ASSERT(total_anim_count.success);
|
||||||
result.anims = Dqn_Slice_Alloc<TELY_AssetSpriteAnimation>(arena, total_anim_count.value, Dqn_ZeroMem_No);
|
result.anims = Dqn_Slice_Alloc<TELY_AssetSpriteAnimation>(arena, total_anim_count.value, Dqn_ZeroMem_No);
|
||||||
|
|
||||||
@ -81,11 +81,11 @@ static TELY_AssetSpriteSheet FP_LoadSpriteSheetFromSpec(TELY_Platform *platform,
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Dqn_String8_StartsWith(line, DQN_STRING8("@anim"))) {
|
if (Dqn_Str8_StartsWith(line, DQN_STR8("@anim"))) {
|
||||||
DQN_ASSERTF(line_splits.size == 4, "Expected 4 splits for @anim lines");
|
DQN_ASSERTF(line_splits.size == 4, "Expected 4 splits for @anim lines");
|
||||||
Dqn_String8 anim_name = line_splits.data[1];
|
Dqn_Str8 anim_name = line_splits.data[1];
|
||||||
Dqn_String8ToU64Result frames_per_second = Dqn_String8_ToU64(line_splits.data[2], 0);
|
Dqn_Str8ToU64Result frames_per_second = Dqn_Str8_ToU64(line_splits.data[2], 0);
|
||||||
Dqn_String8ToU64Result frame_count = Dqn_String8_ToU64(line_splits.data[3], 0);
|
Dqn_Str8ToU64Result frame_count = Dqn_Str8_ToU64(line_splits.data[3], 0);
|
||||||
|
|
||||||
DQN_ASSERT(anim_name.size);
|
DQN_ASSERT(anim_name.size);
|
||||||
DQN_ASSERT(frame_count.success);
|
DQN_ASSERT(frame_count.success);
|
||||||
@ -93,17 +93,17 @@ static TELY_AssetSpriteSheet FP_LoadSpriteSheetFromSpec(TELY_Platform *platform,
|
|||||||
|
|
||||||
Dqn_Allocator allocator = Dqn_Arena_Allocator(arena);
|
Dqn_Allocator allocator = Dqn_Arena_Allocator(arena);
|
||||||
TELY_AssetSpriteAnimation *anim = result.anims.data + sprite_anim_index++;
|
TELY_AssetSpriteAnimation *anim = result.anims.data + sprite_anim_index++;
|
||||||
anim->label = Dqn_String8_Copy(allocator, anim_name);
|
anim->label = Dqn_Str8_Copy(allocator, anim_name);
|
||||||
anim->index = DQN_CAST(uint16_t)sprite_rect_index;
|
anim->index = DQN_CAST(uint16_t)sprite_rect_index;
|
||||||
anim->count = DQN_CAST(uint16_t)frame_count.value;
|
anim->count = DQN_CAST(uint16_t)frame_count.value;
|
||||||
anim->ms_per_frame = DQN_CAST(uint32_t)(1000.f / frames_per_second.value);
|
anim->ms_per_frame = DQN_CAST(uint32_t)(1000.f / frames_per_second.value);
|
||||||
DQN_ASSERT(anim->ms_per_frame != 0);
|
DQN_ASSERT(anim->ms_per_frame != 0);
|
||||||
} else {
|
} else {
|
||||||
DQN_ASSERTF(line_splits.size == 5, "Expected 5 splits for sprite frame lines");
|
DQN_ASSERTF(line_splits.size == 5, "Expected 5 splits for sprite frame lines");
|
||||||
Dqn_String8ToU64Result x = Dqn_String8_ToU64(line_splits.data[0], 0);
|
Dqn_Str8ToU64Result x = Dqn_Str8_ToU64(line_splits.data[0], 0);
|
||||||
Dqn_String8ToU64Result y = Dqn_String8_ToU64(line_splits.data[1], 0);
|
Dqn_Str8ToU64Result y = Dqn_Str8_ToU64(line_splits.data[1], 0);
|
||||||
Dqn_String8ToU64Result w = Dqn_String8_ToU64(line_splits.data[2], 0);
|
Dqn_Str8ToU64Result w = Dqn_Str8_ToU64(line_splits.data[2], 0);
|
||||||
Dqn_String8ToU64Result h = Dqn_String8_ToU64(line_splits.data[3], 0);
|
Dqn_Str8ToU64Result h = Dqn_Str8_ToU64(line_splits.data[3], 0);
|
||||||
|
|
||||||
DQN_ASSERT(x.success);
|
DQN_ASSERT(x.success);
|
||||||
DQN_ASSERT(y.success);
|
DQN_ASSERT(y.success);
|
||||||
@ -252,22 +252,22 @@ static void FP_PlayReset(FP_Game *game, TELY_Platform *platform)
|
|||||||
Dqn_f32 half_wall_thickness = wall_thickness * .5f;
|
Dqn_f32 half_wall_thickness = wall_thickness * .5f;
|
||||||
|
|
||||||
FP_Entity_CreateWallAtPos(game,
|
FP_Entity_CreateWallAtPos(game,
|
||||||
DQN_STRING8("Left Wall"),
|
DQN_STR8("Left Wall"),
|
||||||
Dqn_Rect_InterpolatedPoint(map_hit_box, Dqn_V2_InitNx2(0.f, 0.5f)) - Dqn_V2_InitNx2(half_wall_thickness, 0.f),
|
Dqn_Rect_InterpolatedPoint(map_hit_box, Dqn_V2_InitNx2(0.f, 0.5f)) - Dqn_V2_InitNx2(half_wall_thickness, 0.f),
|
||||||
Dqn_V2_InitNx2(wall_thickness, map_hit_box.size.h));
|
Dqn_V2_InitNx2(wall_thickness, map_hit_box.size.h));
|
||||||
|
|
||||||
FP_Entity_CreateWallAtPos(game,
|
FP_Entity_CreateWallAtPos(game,
|
||||||
DQN_STRING8("Right Wall"),
|
DQN_STR8("Right Wall"),
|
||||||
Dqn_Rect_InterpolatedPoint(map_hit_box, Dqn_V2_InitNx2(1.f, 0.5f)) + Dqn_V2_InitNx2(half_wall_thickness, 0.f),
|
Dqn_Rect_InterpolatedPoint(map_hit_box, Dqn_V2_InitNx2(1.f, 0.5f)) + Dqn_V2_InitNx2(half_wall_thickness, 0.f),
|
||||||
Dqn_V2_InitNx2(wall_thickness, map_hit_box.size.h));
|
Dqn_V2_InitNx2(wall_thickness, map_hit_box.size.h));
|
||||||
|
|
||||||
FP_Entity_CreateWallAtPos(game,
|
FP_Entity_CreateWallAtPos(game,
|
||||||
DQN_STRING8("Top Wall"),
|
DQN_STR8("Top Wall"),
|
||||||
Dqn_Rect_InterpolatedPoint(map_hit_box, Dqn_V2_InitNx2(0.5f, 0.f)) - Dqn_V2_InitNx2(0.f, half_wall_thickness),
|
Dqn_Rect_InterpolatedPoint(map_hit_box, Dqn_V2_InitNx2(0.5f, 0.f)) - Dqn_V2_InitNx2(0.f, half_wall_thickness),
|
||||||
Dqn_V2_InitNx2(map_hit_box.size.w, wall_thickness));
|
Dqn_V2_InitNx2(map_hit_box.size.w, wall_thickness));
|
||||||
|
|
||||||
FP_Entity_CreateWallAtPos(game,
|
FP_Entity_CreateWallAtPos(game,
|
||||||
DQN_STRING8("Bottom Wall"),
|
DQN_STR8("Bottom Wall"),
|
||||||
Dqn_Rect_InterpolatedPoint(map_hit_box, Dqn_V2_InitNx2(0.5f, 1.f)) + Dqn_V2_InitNx2(0.f, half_wall_thickness),
|
Dqn_Rect_InterpolatedPoint(map_hit_box, Dqn_V2_InitNx2(0.5f, 1.f)) + Dqn_V2_InitNx2(0.f, half_wall_thickness),
|
||||||
Dqn_V2_InitNx2(map_hit_box.size.w, wall_thickness));
|
Dqn_V2_InitNx2(map_hit_box.size.w, wall_thickness));
|
||||||
}
|
}
|
||||||
@ -404,7 +404,7 @@ void TELY_DLL_Reload(void *user_data)
|
|||||||
{
|
{
|
||||||
TELY_Platform *platform = DQN_CAST(TELY_Platform *)user_data;
|
TELY_Platform *platform = DQN_CAST(TELY_Platform *)user_data;
|
||||||
Dqn_Library_SetPointer(platform->core.dqn_lib);
|
Dqn_Library_SetPointer(platform->core.dqn_lib);
|
||||||
platform->func_set_window_title(DQN_STRING8("Terry Cherry"));
|
platform->func_set_window_title(DQN_STR8("Terry Cherry"));
|
||||||
}
|
}
|
||||||
|
|
||||||
FP_DLL_FUNCTION
|
FP_DLL_FUNCTION
|
||||||
@ -421,32 +421,32 @@ void TELY_DLL_Init(void *user_data)
|
|||||||
|
|
||||||
Dqn_f32 font_scalar = FP_TARGET_VIEWPORT_SIZE.w / DQN_CAST(Dqn_f32)platform->core.window_size.x;
|
Dqn_f32 font_scalar = FP_TARGET_VIEWPORT_SIZE.w / DQN_CAST(Dqn_f32)platform->core.window_size.x;
|
||||||
uint16_t font_size = DQN_CAST(uint16_t)(18 * font_scalar);
|
uint16_t font_size = DQN_CAST(uint16_t)(18 * font_scalar);
|
||||||
game->inter_regular_font_large = platform->func_load_font(assets, DQN_STRING8("Inter (Regular)"), DQN_STRING8("Data/Fonts/Inter-Regular.otf"), DQN_CAST(uint16_t)(font_size * 5.f));
|
game->inter_regular_font_large = platform->func_load_font(assets, DQN_STR8("Inter (Regular)"), DQN_STR8("Data/Fonts/Inter-Regular.otf"), DQN_CAST(uint16_t)(font_size * 5.f));
|
||||||
game->inter_regular_font = platform->func_load_font(assets, DQN_STRING8("Inter (Regular)"), DQN_STRING8("Data/Fonts/Inter-Regular.otf"), DQN_CAST(uint16_t)(font_size));
|
game->inter_regular_font = platform->func_load_font(assets, DQN_STR8("Inter (Regular)"), DQN_STR8("Data/Fonts/Inter-Regular.otf"), DQN_CAST(uint16_t)(font_size));
|
||||||
game->inter_italic_font = platform->func_load_font(assets, DQN_STRING8("Inter (Italic)"), DQN_STRING8("Data/Fonts/Inter-Italic.otf"), font_size);
|
game->inter_italic_font = platform->func_load_font(assets, DQN_STR8("Inter (Italic)"), DQN_STR8("Data/Fonts/Inter-Italic.otf"), font_size);
|
||||||
game->jetbrains_mono_font = platform->func_load_font(assets, DQN_STRING8("JetBrains Mono NL (Regular)"), DQN_STRING8("Data/Fonts/JetBrainsMonoNL-Regular.ttf"), font_size);
|
game->jetbrains_mono_font = platform->func_load_font(assets, DQN_STR8("JetBrains Mono NL (Regular)"), DQN_STR8("Data/Fonts/JetBrainsMonoNL-Regular.ttf"), font_size);
|
||||||
game->talkco_font = platform->func_load_font(assets, DQN_STRING8("Talkco"), DQN_STRING8("Data/Fonts/Talkco.otf"), font_size);
|
game->talkco_font = platform->func_load_font(assets, DQN_STR8("Talkco"), DQN_STR8("Data/Fonts/Talkco.otf"), font_size);
|
||||||
game->talkco_font_large = platform->func_load_font(assets, DQN_STRING8("Talkco"), DQN_STRING8("Data/Fonts/Talkco.otf"), DQN_CAST(uint16_t)(font_size * 1.5f));
|
game->talkco_font_large = platform->func_load_font(assets, DQN_STR8("Talkco"), DQN_STR8("Data/Fonts/Talkco.otf"), DQN_CAST(uint16_t)(font_size * 1.5f));
|
||||||
game->talkco_font_xlarge = platform->func_load_font(assets, DQN_STRING8("Talkco"), DQN_STRING8("Data/Fonts/Talkco.otf"), DQN_CAST(uint16_t)(font_size * 2.f));
|
game->talkco_font_xlarge = platform->func_load_font(assets, DQN_STR8("Talkco"), DQN_STR8("Data/Fonts/Talkco.otf"), DQN_CAST(uint16_t)(font_size * 2.f));
|
||||||
game->audio[FP_GameAudio_TerryHit] = platform->func_load_audio(assets, DQN_STRING8("Terry Hit"), DQN_STRING8("Data/Audio/terry_hit.ogg"));
|
game->audio[FP_GameAudio_TerryHit] = platform->func_load_audio(assets, DQN_STR8("Terry Hit"), DQN_STR8("Data/Audio/terry_hit.ogg"));
|
||||||
game->audio[FP_GameAudio_Ching] = platform->func_load_audio(assets, DQN_STRING8("Ching"), DQN_STRING8("Data/Audio/ching.ogg"));
|
game->audio[FP_GameAudio_Ching] = platform->func_load_audio(assets, DQN_STR8("Ching"), DQN_STR8("Data/Audio/ching.ogg"));
|
||||||
game->audio[FP_GameAudio_Church] = platform->func_load_audio(assets, DQN_STRING8("Church"), DQN_STRING8("Data/Audio/church.ogg"));
|
game->audio[FP_GameAudio_Church] = platform->func_load_audio(assets, DQN_STR8("Church"), DQN_STR8("Data/Audio/church.ogg"));
|
||||||
game->audio[FP_GameAudio_Club] = platform->func_load_audio(assets, DQN_STRING8("Club"), DQN_STRING8("Data/Audio/club_terry.ogg"));
|
game->audio[FP_GameAudio_Club] = platform->func_load_audio(assets, DQN_STR8("Club"), DQN_STR8("Data/Audio/club_terry.ogg"));
|
||||||
game->audio[FP_GameAudio_Dog] = platform->func_load_audio(assets, DQN_STRING8("Dog"), DQN_STRING8("Data/Audio/dog.ogg"));
|
game->audio[FP_GameAudio_Dog] = platform->func_load_audio(assets, DQN_STR8("Dog"), DQN_STR8("Data/Audio/dog.ogg"));
|
||||||
game->audio[FP_GameAudio_MerchantGhost] = platform->func_load_audio(assets, DQN_STRING8("Ghost"), DQN_STRING8("Data/Audio/merchant_ghost.ogg"));
|
game->audio[FP_GameAudio_MerchantGhost] = platform->func_load_audio(assets, DQN_STR8("Ghost"), DQN_STR8("Data/Audio/merchant_ghost.ogg"));
|
||||||
game->audio[FP_GameAudio_MerchantGym] = platform->func_load_audio(assets, DQN_STRING8("Gym"), DQN_STRING8("Data/Audio/merchant_gym.ogg"));
|
game->audio[FP_GameAudio_MerchantGym] = platform->func_load_audio(assets, DQN_STR8("Gym"), DQN_STR8("Data/Audio/merchant_gym.ogg"));
|
||||||
game->audio[FP_GameAudio_MerchantPhone] = platform->func_load_audio(assets, DQN_STRING8("Phone"), DQN_STRING8("Data/Audio/merchant_tech.ogg"));
|
game->audio[FP_GameAudio_MerchantPhone] = platform->func_load_audio(assets, DQN_STR8("Phone"), DQN_STR8("Data/Audio/merchant_tech.ogg"));
|
||||||
game->audio[FP_GameAudio_MerchantTerry] = platform->func_load_audio(assets, DQN_STRING8("Door"), DQN_STRING8("Data/Audio/merchant_terry.ogg"));
|
game->audio[FP_GameAudio_MerchantTerry] = platform->func_load_audio(assets, DQN_STR8("Door"), DQN_STR8("Data/Audio/merchant_terry.ogg"));
|
||||||
game->audio[FP_GameAudio_Message] = platform->func_load_audio(assets, DQN_STRING8("Message"), DQN_STRING8("Data/Audio/message.ogg"));
|
game->audio[FP_GameAudio_Message] = platform->func_load_audio(assets, DQN_STR8("Message"), DQN_STR8("Data/Audio/message.ogg"));
|
||||||
game->audio[FP_GameAudio_Monkey] = platform->func_load_audio(assets, DQN_STRING8("Monkey"), DQN_STRING8("Data/Audio/monkey.ogg"));
|
game->audio[FP_GameAudio_Monkey] = platform->func_load_audio(assets, DQN_STR8("Monkey"), DQN_STR8("Data/Audio/monkey.ogg"));
|
||||||
game->audio[FP_GameAudio_Plane] = platform->func_load_audio(assets, DQN_STRING8("Plane"), DQN_STRING8("Data/Audio/airport.ogg"));
|
game->audio[FP_GameAudio_Plane] = platform->func_load_audio(assets, DQN_STR8("Plane"), DQN_STR8("Data/Audio/airport.ogg"));
|
||||||
game->audio[FP_GameAudio_PortalDestroy] = platform->func_load_audio(assets, DQN_STRING8("Portal Destroy"), DQN_STRING8("Data/Audio/portal_destroy.ogg"));
|
game->audio[FP_GameAudio_PortalDestroy] = platform->func_load_audio(assets, DQN_STR8("Portal Destroy"), DQN_STR8("Data/Audio/portal_destroy.ogg"));
|
||||||
game->audio[FP_GameAudio_Smooch] = platform->func_load_audio(assets, DQN_STRING8("Smooch"), DQN_STRING8("Data/Audio/smooch.ogg"));
|
game->audio[FP_GameAudio_Smooch] = platform->func_load_audio(assets, DQN_STR8("Smooch"), DQN_STR8("Data/Audio/smooch.ogg"));
|
||||||
game->audio[FP_GameAudio_Woosh] = platform->func_load_audio(assets, DQN_STRING8("Woosh"), DQN_STRING8("Data/Audio/woosh.ogg"));
|
game->audio[FP_GameAudio_Woosh] = platform->func_load_audio(assets, DQN_STR8("Woosh"), DQN_STR8("Data/Audio/woosh.ogg"));
|
||||||
|
|
||||||
// NOTE: Load sprite sheets ====================================================================
|
// NOTE: Load sprite sheets ====================================================================
|
||||||
platform->user_data = game;
|
platform->user_data = game;
|
||||||
game->atlas_sprite_sheet = FP_LoadSpriteSheetFromSpec(platform, assets, &platform->arena, DQN_STRING8("atlas"));
|
game->atlas_sprite_sheet = FP_LoadSpriteSheetFromSpec(platform, assets, &platform->arena, DQN_STR8("atlas"));
|
||||||
FP_PlayReset(game, platform);
|
FP_PlayReset(game, platform);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1306,7 +1306,7 @@ static void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput
|
|||||||
Dqn_Profiler_ZoneScopeWithIndex("FP_Update", FP_ProfileZone_FPUpdate);
|
Dqn_Profiler_ZoneScopeWithIndex("FP_Update", FP_ProfileZone_FPUpdate);
|
||||||
|
|
||||||
game->play.update_counter++;
|
game->play.update_counter++;
|
||||||
Dqn_ProfilerZone update_zone = Dqn_Profiler_BeginZoneWithIndex(DQN_STRING8("FP_Update: Entity loop"), FP_ProfileZone_FPUpdate_EntityLoop);
|
Dqn_ProfilerZone update_zone = Dqn_Profiler_BeginZoneWithIndex(DQN_STR8("FP_Update: Entity loop"), FP_ProfileZone_FPUpdate_EntityLoop);
|
||||||
if (game->play.state == FP_GameState_Play && game->play.perry_joined != FP_GamePerryJoins_Enters) {
|
if (game->play.state == FP_GameState_Play && game->play.perry_joined != FP_GamePerryJoins_Enters) {
|
||||||
game->play.clock_ms = DQN_CAST(uint64_t)(platform->input.timer_s * 1000.f);
|
game->play.clock_ms = DQN_CAST(uint64_t)(platform->input.timer_s * 1000.f);
|
||||||
|
|
||||||
@ -2320,28 +2320,28 @@ static void FP_Update(TELY_Platform *platform, FP_Game *game, TELY_PlatformInput
|
|||||||
Dqn_Profiler_EndZone(update_zone);
|
Dqn_Profiler_EndZone(update_zone);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Dqn_String8 FP_ScanCodeToLabel(Dqn_Arena *arena, TELY_PlatformInputScanCode scan_code)
|
static Dqn_Str8 FP_ScanCodeToLabel(Dqn_Arena *arena, TELY_PlatformInputScanCode scan_code)
|
||||||
{
|
{
|
||||||
Dqn_String8 result = {};
|
Dqn_Str8 result = {};
|
||||||
Dqn_Allocator allocator = Dqn_Arena_Allocator(arena);
|
Dqn_Allocator allocator = Dqn_Arena_Allocator(arena);
|
||||||
if (scan_code >= TELY_PlatformInputScanCode_A && scan_code <= TELY_PlatformInputScanCode_Z) {
|
if (scan_code >= TELY_PlatformInputScanCode_A && scan_code <= TELY_PlatformInputScanCode_Z) {
|
||||||
char scan_code_ch = DQN_CAST(char)('A' + (scan_code - TELY_PlatformInputScanCode_A));
|
char scan_code_ch = DQN_CAST(char)('A' + (scan_code - TELY_PlatformInputScanCode_A));
|
||||||
result = Dqn_String8_InitF(allocator, "[%c]", scan_code_ch);
|
result = Dqn_Str8_InitF(allocator, "[%c]", scan_code_ch);
|
||||||
} else {
|
} else {
|
||||||
if (scan_code == TELY_PlatformInputScanCode_Up) {
|
if (scan_code == TELY_PlatformInputScanCode_Up) {
|
||||||
result = Dqn_String8_InitF(allocator, "[Up]");
|
result = Dqn_Str8_InitF(allocator, "[Up]");
|
||||||
} else if (scan_code == TELY_PlatformInputScanCode_Down) {
|
} else if (scan_code == TELY_PlatformInputScanCode_Down) {
|
||||||
result = Dqn_String8_InitF(allocator, "[Down]");
|
result = Dqn_Str8_InitF(allocator, "[Down]");
|
||||||
} else if (scan_code == TELY_PlatformInputScanCode_Left) {
|
} else if (scan_code == TELY_PlatformInputScanCode_Left) {
|
||||||
result = Dqn_String8_InitF(allocator, "[Left]");
|
result = Dqn_Str8_InitF(allocator, "[Left]");
|
||||||
} else if (scan_code == TELY_PlatformInputScanCode_Right) {
|
} else if (scan_code == TELY_PlatformInputScanCode_Right) {
|
||||||
result = Dqn_String8_InitF(allocator, "[Right]");
|
result = Dqn_Str8_InitF(allocator, "[Right]");
|
||||||
} else if (scan_code == TELY_PlatformInputScanCode_Semicolon) {
|
} else if (scan_code == TELY_PlatformInputScanCode_Semicolon) {
|
||||||
result = Dqn_String8_InitF(allocator, "[;]");
|
result = Dqn_Str8_InitF(allocator, "[;]");
|
||||||
} else if (scan_code == TELY_PlatformInputScanCode_Apostrophe) {
|
} else if (scan_code == TELY_PlatformInputScanCode_Apostrophe) {
|
||||||
result = Dqn_String8_InitF(allocator, "[']");
|
result = Dqn_Str8_InitF(allocator, "[']");
|
||||||
} else if (scan_code == TELY_PlatformInputScanCode_Backslash) {
|
} else if (scan_code == TELY_PlatformInputScanCode_Backslash) {
|
||||||
result = Dqn_String8_InitF(allocator, "[/]");
|
result = Dqn_Str8_InitF(allocator, "[/]");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
@ -2357,12 +2357,12 @@ static void FP_DrawBillboardKeyBindHint(TELY_Renderer *renderer,
|
|||||||
bool draw_player_prefix)
|
bool draw_player_prefix)
|
||||||
{
|
{
|
||||||
Dqn_ThreadScratch scratch = Dqn_Thread_GetScratch(nullptr);
|
Dqn_ThreadScratch scratch = Dqn_Thread_GetScratch(nullptr);
|
||||||
Dqn_String8 player_prefix = {};
|
Dqn_Str8 player_prefix = {};
|
||||||
if (draw_player_prefix)
|
if (draw_player_prefix)
|
||||||
player_prefix = Dqn_String8_InitF(scratch.allocator, "P%zu ", player_index);
|
player_prefix = Dqn_Str8_InitF(scratch.allocator, "P%zu ", player_index);
|
||||||
|
|
||||||
if (mode == FP_GameControlMode_Gamepad) {
|
if (mode == FP_GameControlMode_Gamepad) {
|
||||||
Dqn_String8 tex_name = {};
|
Dqn_Str8 tex_name = {};
|
||||||
if (key_bind.gamepad_key == TELY_PlatformInputGamepadKey_A)
|
if (key_bind.gamepad_key == TELY_PlatformInputGamepadKey_A)
|
||||||
tex_name = g_anim_names.merchant_button_a;
|
tex_name = g_anim_names.merchant_button_a;
|
||||||
else if (key_bind.gamepad_key == TELY_PlatformInputGamepadKey_B)
|
else if (key_bind.gamepad_key == TELY_PlatformInputGamepadKey_B)
|
||||||
@ -2392,8 +2392,8 @@ static void FP_DrawBillboardKeyBindHint(TELY_Renderer *renderer,
|
|||||||
TELY_COLOUR_WHITE_V4);
|
TELY_COLOUR_WHITE_V4);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Dqn_String8 key_bind_label = FP_ScanCodeToLabel(scratch.arena, key_bind.scan_code);
|
Dqn_Str8 key_bind_label = FP_ScanCodeToLabel(scratch.arena, key_bind.scan_code);
|
||||||
TELY_Render_TextF(renderer, draw_p, Dqn_V2_InitNx2(0, +1.f), "%.*s%.*s", DQN_STRING_FMT(player_prefix), DQN_STRING_FMT(key_bind_label));
|
TELY_Render_TextF(renderer, draw_p, Dqn_V2_InitNx2(0, +1.f), "%.*s%.*s", DQN_STR_FMT(player_prefix), DQN_STR_FMT(key_bind_label));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2797,19 +2797,19 @@ static void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *ren
|
|||||||
Dqn_V2I player_tile = Dqn_V2I_InitNx2(world_pos.x / game->play.tile_size, world_pos.y / game->play.tile_size);
|
Dqn_V2I player_tile = Dqn_V2I_InitNx2(world_pos.x / game->play.tile_size, world_pos.y / game->play.tile_size);
|
||||||
Dqn_f32 line_height = TELY_Render_FontHeight(renderer, &platform->assets);
|
Dqn_f32 line_height = TELY_Render_FontHeight(renderer, &platform->assets);
|
||||||
Dqn_V2 draw_p = world_mouse_p;
|
Dqn_V2 draw_p = world_mouse_p;
|
||||||
TELY_Render_TextF(renderer, draw_p, Dqn_V2_InitNx2(0.f, 1), "%.*s", DQN_STRING_FMT(entity->name)); draw_p.y += line_height;
|
TELY_Render_TextF(renderer, draw_p, Dqn_V2_InitNx2(0.f, 1), "%.*s", DQN_STR_FMT(entity->name)); draw_p.y += line_height;
|
||||||
TELY_Render_TextF(renderer, draw_p, Dqn_V2_InitNx2(0.f, 1), "World Pos: (%.1f, %.1f)", world_pos.x, world_pos.y); draw_p.y += line_height;
|
TELY_Render_TextF(renderer, draw_p, Dqn_V2_InitNx2(0.f, 1), "World Pos: (%.1f, %.1f)", world_pos.x, world_pos.y); draw_p.y += line_height;
|
||||||
TELY_Render_TextF(renderer, draw_p, Dqn_V2_InitNx2(0.f, 1), "Hit Box Size: %.1fx%.1f", world_hit_box.size.x, world_hit_box.size.y); draw_p.y += line_height;
|
TELY_Render_TextF(renderer, draw_p, Dqn_V2_InitNx2(0.f, 1), "Hit Box Size: %.1fx%.1f", world_hit_box.size.x, world_hit_box.size.y); draw_p.y += line_height;
|
||||||
TELY_Render_TextF(renderer, draw_p, Dqn_V2_InitNx2(0.f, 1), "Tile: %I32dx%I32d", player_tile.x, player_tile.y); draw_p.y += line_height;
|
TELY_Render_TextF(renderer, draw_p, Dqn_V2_InitNx2(0.f, 1), "Tile: %I32dx%I32d", player_tile.x, player_tile.y); draw_p.y += line_height;
|
||||||
TELY_Render_TextF(renderer, draw_p, Dqn_V2_InitNx2(0.f, 1), "World Mouse Pos: (%.1f, %.1f)", world_mouse_p.x, world_mouse_p.y); draw_p.y += line_height;
|
TELY_Render_TextF(renderer, draw_p, Dqn_V2_InitNx2(0.f, 1), "World Mouse Pos: (%.1f, %.1f)", world_mouse_p.x, world_mouse_p.y); draw_p.y += line_height;
|
||||||
|
|
||||||
Dqn_String8 faction = {};
|
Dqn_Str8 faction = {};
|
||||||
switch (entity->faction) {
|
switch (entity->faction) {
|
||||||
case FP_GameEntityFaction_Nil: faction = DQN_STRING8("Nil"); break;
|
case FP_GameEntityFaction_Nil: faction = DQN_STR8("Nil"); break;
|
||||||
case FP_GameEntityFaction_Friendly: faction = DQN_STRING8("Friendly"); break;
|
case FP_GameEntityFaction_Friendly: faction = DQN_STR8("Friendly"); break;
|
||||||
case FP_GameEntityFaction_Foe: faction = DQN_STRING8("Foe"); break;
|
case FP_GameEntityFaction_Foe: faction = DQN_STR8("Foe"); break;
|
||||||
}
|
}
|
||||||
TELY_Render_TextF(renderer, draw_p, Dqn_V2_InitNx2(0.f, 1), "Faction: %.*s", DQN_STRING_FMT(faction)); draw_p.y += line_height;
|
TELY_Render_TextF(renderer, draw_p, Dqn_V2_InitNx2(0.f, 1), "Faction: %.*s", DQN_STR_FMT(faction)); draw_p.y += line_height;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3019,15 +3019,15 @@ static void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *ren
|
|||||||
};
|
};
|
||||||
|
|
||||||
FP_GameEntity *first_player = FP_Game_GetEntity(game, game->play.players.data[0]);
|
FP_GameEntity *first_player = FP_Game_GetEntity(game, game->play.players.data[0]);
|
||||||
Dqn_String8 join_game_key = {};
|
Dqn_Str8 join_game_key = {};
|
||||||
if (first_player->controls.mode == FP_GameControlMode_Keyboard)
|
if (first_player->controls.mode == FP_GameControlMode_Keyboard)
|
||||||
join_game_key = DQN_STRING8("<Gamepad: Start>");
|
join_game_key = DQN_STR8("<Gamepad: Start>");
|
||||||
else
|
else
|
||||||
join_game_key = DQN_STRING8("<Gamepad: B>");
|
join_game_key = DQN_STR8("<Gamepad: B>");
|
||||||
|
|
||||||
Dqn_f32 font_height = TELY_Render_FontHeight(renderer, assets);
|
Dqn_f32 font_height = TELY_Render_FontHeight(renderer, assets);
|
||||||
Dqn_V2 base_p = player_avatar_base_pos[game->play.players.size];
|
Dqn_V2 base_p = player_avatar_base_pos[game->play.players.size];
|
||||||
TELY_Render_TextF(renderer, base_p, Dqn_V2_Zero, "Press %.*s", DQN_STRING_FMT(join_game_key)); base_p.y += font_height;
|
TELY_Render_TextF(renderer, base_p, Dqn_V2_Zero, "Press %.*s", DQN_STR_FMT(join_game_key)); base_p.y += font_height;
|
||||||
FP_ListenForNewPlayer(input, game);
|
FP_ListenForNewPlayer(input, game);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3044,9 +3044,9 @@ static void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *ren
|
|||||||
struct FP_MerchantToMenuMapping {
|
struct FP_MerchantToMenuMapping {
|
||||||
FP_GameEntityHandle merchant;
|
FP_GameEntityHandle merchant;
|
||||||
Dqn_V2 *menu_pos;
|
Dqn_V2 *menu_pos;
|
||||||
Dqn_String8 upgrade_icon;
|
Dqn_Str8 upgrade_icon;
|
||||||
Dqn_String8 menu_anim;
|
Dqn_Str8 menu_anim;
|
||||||
Dqn_String8 building;
|
Dqn_Str8 building;
|
||||||
Dqn_V2 building_offset01;
|
Dqn_V2 building_offset01;
|
||||||
uint8_t *inventory_count;
|
uint8_t *inventory_count;
|
||||||
uint32_t *building_base_price;
|
uint32_t *building_base_price;
|
||||||
@ -3179,7 +3179,7 @@ static void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *ren
|
|||||||
} else {
|
} else {
|
||||||
Dqn_ThreadScratch scratch = Dqn_Thread_GetScratch(nullptr);
|
Dqn_ThreadScratch scratch = Dqn_Thread_GetScratch(nullptr);
|
||||||
TELY_AssetFont const *font = TELY_Render_Font(renderer, assets);
|
TELY_AssetFont const *font = TELY_Render_Font(renderer, assets);
|
||||||
Dqn_String8 key_bind_label = FP_ScanCodeToLabel(scratch.arena, key_bind.scan_code);
|
Dqn_Str8 key_bind_label = FP_ScanCodeToLabel(scratch.arena, key_bind.scan_code);
|
||||||
interact_btn_rect.size = TELY_Asset_MeasureText(font, key_bind_label);
|
interact_btn_rect.size = TELY_Asset_MeasureText(font, key_bind_label);
|
||||||
|
|
||||||
Dqn_Rect key_bind_rect = interact_btn_rect;
|
Dqn_Rect key_bind_rect = interact_btn_rect;
|
||||||
@ -3294,7 +3294,7 @@ static void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *ren
|
|||||||
} else {
|
} else {
|
||||||
Dqn_ThreadScratch scratch = Dqn_Thread_GetScratch(nullptr);
|
Dqn_ThreadScratch scratch = Dqn_Thread_GetScratch(nullptr);
|
||||||
TELY_AssetFont const *font = TELY_Render_Font(renderer, assets);
|
TELY_AssetFont const *font = TELY_Render_Font(renderer, assets);
|
||||||
Dqn_String8 key_bind_label = FP_ScanCodeToLabel(scratch.arena, key_bind.scan_code);
|
Dqn_Str8 key_bind_label = FP_ScanCodeToLabel(scratch.arena, key_bind.scan_code);
|
||||||
interact_btn_rect.size = TELY_Asset_MeasureText(font, key_bind_label);
|
interact_btn_rect.size = TELY_Asset_MeasureText(font, key_bind_label);
|
||||||
|
|
||||||
Dqn_Rect key_bind_rect = interact_btn_rect;
|
Dqn_Rect key_bind_rect = interact_btn_rect;
|
||||||
@ -3995,7 +3995,7 @@ static void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *ren
|
|||||||
TELY_RFui_PushMargin(rfui, Dqn_V2_InitNx1(1));
|
TELY_RFui_PushMargin(rfui, Dqn_V2_InitNx1(1));
|
||||||
DQN_DEFER { TELY_RFui_PopMargin(rfui); };
|
DQN_DEFER { TELY_RFui_PopMargin(rfui); };
|
||||||
|
|
||||||
TELY_RFuiResult info_column = TELY_RFui_ColumnReverse(rfui, DQN_STRING8("Info Column"));
|
TELY_RFuiResult info_column = TELY_RFui_ColumnReverse(rfui, DQN_STR8("Info Column"));
|
||||||
TELY_RFui_PushParent(rfui, info_column.widget);
|
TELY_RFui_PushParent(rfui, info_column.widget);
|
||||||
DQN_DEFER { TELY_RFui_PopParent(rfui); };
|
DQN_DEFER { TELY_RFui_PopParent(rfui); };
|
||||||
|
|
||||||
@ -4009,20 +4009,20 @@ static void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *ren
|
|||||||
info_column.widget->semantic_position[TELY_RFuiAxis_Y].value = platform->core.window_size.h - TELY_Render_FontHeight(renderer, assets);
|
info_column.widget->semantic_position[TELY_RFuiAxis_Y].value = platform->core.window_size.h - TELY_Render_FontHeight(renderer, assets);
|
||||||
|
|
||||||
{
|
{
|
||||||
TELY_RFuiResult row = TELY_RFui_Row(rfui, DQN_STRING8("Info Bar"));
|
TELY_RFuiResult row = TELY_RFui_Row(rfui, DQN_STR8("Info Bar"));
|
||||||
TELY_RFui_PushParent(rfui, row.widget);
|
TELY_RFui_PushParent(rfui, row.widget);
|
||||||
DQN_DEFER { TELY_RFui_PopParent(rfui); };
|
DQN_DEFER { TELY_RFui_PopParent(rfui); };
|
||||||
|
|
||||||
Dqn_ThreadScratch scratch = Dqn_Thread_GetScratch(nullptr);
|
Dqn_ThreadScratch scratch = Dqn_Thread_GetScratch(nullptr);
|
||||||
Dqn_String8Builder builder = {};
|
Dqn_Str8Builder builder = {};
|
||||||
builder.allocator = scratch.allocator;
|
builder.allocator = scratch.allocator;
|
||||||
|
|
||||||
Dqn_String8Builder_AppendF(&builder, "TELY");
|
Dqn_Str8Builder_AppendF(&builder, "TELY");
|
||||||
if (Dqn_String8_IsValid(platform->core.os_name)) {
|
if (Dqn_Str8_IsValid(platform->core.os_name)) {
|
||||||
Dqn_String8Builder_AppendF(&builder, " | %.*s", DQN_STRING_FMT(platform->core.os_name));
|
Dqn_Str8Builder_AppendF(&builder, " | %.*s", DQN_STR_FMT(platform->core.os_name));
|
||||||
}
|
}
|
||||||
|
|
||||||
Dqn_String8Builder_AppendF(&builder,
|
Dqn_Str8Builder_AppendF(&builder,
|
||||||
" | %dx%d %.1fHz | TSC %.1f GHz",
|
" | %dx%d %.1fHz | TSC %.1f GHz",
|
||||||
platform->core.window_size.w,
|
platform->core.window_size.w,
|
||||||
platform->core.window_size.h,
|
platform->core.window_size.h,
|
||||||
@ -4030,9 +4030,9 @@ static void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *ren
|
|||||||
platform->core.tsc_per_second / 1'000'000'000.0);
|
platform->core.tsc_per_second / 1'000'000'000.0);
|
||||||
|
|
||||||
if (platform->core.ram_mb)
|
if (platform->core.ram_mb)
|
||||||
Dqn_String8Builder_AppendF(&builder, " | RAM %.1fGB", platform->core.ram_mb / 1024.0);
|
Dqn_Str8Builder_AppendF(&builder, " | RAM %.1fGB", platform->core.ram_mb / 1024.0);
|
||||||
|
|
||||||
Dqn_String8Builder_AppendF(&builder,
|
Dqn_Str8Builder_AppendF(&builder,
|
||||||
" | Work %04.1fms/f (%04.1f%%) | %05.1f FPS | Frame %'I64u | Timer %.1fs",
|
" | Work %04.1fms/f (%04.1f%%) | %05.1f FPS | Frame %'I64u | Timer %.1fs",
|
||||||
input->work_ms,
|
input->work_ms,
|
||||||
input->work_ms * 100.0 / input->delta_ms,
|
input->work_ms * 100.0 / input->delta_ms,
|
||||||
@ -4040,8 +4040,8 @@ static void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *ren
|
|||||||
input->frame_counter,
|
input->frame_counter,
|
||||||
input->timer_s);
|
input->timer_s);
|
||||||
|
|
||||||
Dqn_String8 text = Dqn_String8Builder_Build(&builder, scratch.allocator);
|
Dqn_Str8 text = Dqn_Str8Builder_Build(&builder, scratch.allocator);
|
||||||
TELY_RFui_TextBackgroundF(rfui, "%.*s", DQN_STRING_FMT(text));
|
TELY_RFui_TextBackgroundF(rfui, "%.*s", DQN_STR_FMT(text));
|
||||||
}
|
}
|
||||||
|
|
||||||
TELY_RFui_TextBackgroundF(rfui, "Mouse: %.1f, %.1f", input->mouse_p.x, input->mouse_p.y);
|
TELY_RFui_TextBackgroundF(rfui, "Mouse: %.1f, %.1f", input->mouse_p.x, input->mouse_p.y);
|
||||||
@ -4116,7 +4116,7 @@ static void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *ren
|
|||||||
|
|
||||||
if (0) {
|
if (0) {
|
||||||
next_y += TELY_Asset_GetFont(assets, TELY_RFui_ActiveFont(rfui))->pixel_height;
|
next_y += TELY_Asset_GetFont(assets, TELY_RFui_ActiveFont(rfui))->pixel_height;
|
||||||
TELY_RFuiResult bar = TELY_RFui_Column(rfui, DQN_STRING8("Memory bar"));
|
TELY_RFuiResult bar = TELY_RFui_Column(rfui, DQN_STR8("Memory bar"));
|
||||||
bar.widget->semantic_position[TELY_RFuiAxis_X].kind = TELY_RFuiPositionKind_Absolute;
|
bar.widget->semantic_position[TELY_RFuiAxis_X].kind = TELY_RFuiPositionKind_Absolute;
|
||||||
bar.widget->semantic_position[TELY_RFuiAxis_X].value = 10.f;
|
bar.widget->semantic_position[TELY_RFuiAxis_X].value = 10.f;
|
||||||
bar.widget->semantic_position[TELY_RFuiAxis_Y].kind = TELY_RFuiPositionKind_Absolute;
|
bar.widget->semantic_position[TELY_RFuiAxis_Y].kind = TELY_RFuiPositionKind_Absolute;
|
||||||
@ -4144,7 +4144,7 @@ static void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *ren
|
|||||||
Dqn_ArenaInfo arena_info = Dqn_Arena_Info(arena);
|
Dqn_ArenaInfo arena_info = Dqn_Arena_Info(arena);
|
||||||
TELY_RFui_TextF(rfui,
|
TELY_RFui_TextF(rfui,
|
||||||
"%.*s[%I64u]: %_$$d/%_$$d (HWM %_$$d, COMMIT %_$$d)",
|
"%.*s[%I64u]: %_$$d/%_$$d (HWM %_$$d, COMMIT %_$$d)",
|
||||||
DQN_STRING_FMT(arena->label),
|
DQN_STR_FMT(arena->label),
|
||||||
arena->blocks,
|
arena->blocks,
|
||||||
arena_info.used,
|
arena_info.used,
|
||||||
arena_info.capacity,
|
arena_info.capacity,
|
||||||
@ -4156,7 +4156,7 @@ static void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *ren
|
|||||||
// NOTE: Profiler
|
// NOTE: Profiler
|
||||||
if (0) {
|
if (0) {
|
||||||
next_y += TELY_Asset_GetFont(assets, TELY_RFui_ActiveFont(rfui))->pixel_height;
|
next_y += TELY_Asset_GetFont(assets, TELY_RFui_ActiveFont(rfui))->pixel_height;
|
||||||
TELY_RFuiResult profiler_layout = TELY_RFui_Column(rfui, DQN_STRING8("Profiler Bar"));
|
TELY_RFuiResult profiler_layout = TELY_RFui_Column(rfui, DQN_STR8("Profiler Bar"));
|
||||||
profiler_layout.widget->semantic_position[TELY_RFuiAxis_X].kind = TELY_RFuiPositionKind_Absolute;
|
profiler_layout.widget->semantic_position[TELY_RFuiAxis_X].kind = TELY_RFuiPositionKind_Absolute;
|
||||||
profiler_layout.widget->semantic_position[TELY_RFuiAxis_X].value = 10.f;
|
profiler_layout.widget->semantic_position[TELY_RFuiAxis_X].value = 10.f;
|
||||||
profiler_layout.widget->semantic_position[TELY_RFuiAxis_Y].kind = TELY_RFuiPositionKind_Absolute;
|
profiler_layout.widget->semantic_position[TELY_RFuiAxis_Y].kind = TELY_RFuiPositionKind_Absolute;
|
||||||
@ -4181,14 +4181,14 @@ static void FP_Render(FP_Game *game, TELY_Platform *platform, TELY_Renderer *ren
|
|||||||
if (tsc_exclusive == tsc_inclusive) {
|
if (tsc_exclusive == tsc_inclusive) {
|
||||||
TELY_RFui_TextF(rfui,
|
TELY_RFui_TextF(rfui,
|
||||||
"%.*s[%u]: %.1fms",
|
"%.*s[%u]: %.1fms",
|
||||||
DQN_STRING_FMT(anchor->name),
|
DQN_STR_FMT(anchor->name),
|
||||||
anchor->hit_count,
|
anchor->hit_count,
|
||||||
tsc_exclusive_milliseconds);
|
tsc_exclusive_milliseconds);
|
||||||
} else {
|
} else {
|
||||||
Dqn_f64 tsc_inclusive_milliseconds = tsc_inclusive * 1000 / tsc_frequency;
|
Dqn_f64 tsc_inclusive_milliseconds = tsc_inclusive * 1000 / tsc_frequency;
|
||||||
TELY_RFui_TextF(rfui,
|
TELY_RFui_TextF(rfui,
|
||||||
"%.*s[%u]: %.1f/%.1fms",
|
"%.*s[%u]: %.1f/%.1fms",
|
||||||
DQN_STRING_FMT(anchor->name),
|
DQN_STR_FMT(anchor->name),
|
||||||
anchor->hit_count,
|
anchor->hit_count,
|
||||||
tsc_exclusive_milliseconds,
|
tsc_exclusive_milliseconds,
|
||||||
tsc_inclusive_milliseconds);
|
tsc_inclusive_milliseconds);
|
||||||
|
232
feely_pona.h
232
feely_pona.h
@ -23,146 +23,146 @@ struct FP_Meters
|
|||||||
|
|
||||||
struct FP_GlobalAnimations
|
struct FP_GlobalAnimations
|
||||||
{
|
{
|
||||||
Dqn_String8 airport_terry = DQN_STRING8("airport_terry");
|
Dqn_Str8 airport_terry = DQN_STR8("airport_terry");
|
||||||
Dqn_String8 airport_terry_plane = DQN_STRING8("airport_terry_plane");
|
Dqn_Str8 airport_terry_plane = DQN_STR8("airport_terry_plane");
|
||||||
|
|
||||||
Dqn_String8 catfish_attack_down = DQN_STRING8("catfish_attack_down");
|
Dqn_Str8 catfish_attack_down = DQN_STR8("catfish_attack_down");
|
||||||
Dqn_String8 catfish_attack_side = DQN_STRING8("catfish_attack_side");
|
Dqn_Str8 catfish_attack_side = DQN_STR8("catfish_attack_side");
|
||||||
Dqn_String8 catfish_attack_up = DQN_STRING8("catfish_attack_up");
|
Dqn_Str8 catfish_attack_up = DQN_STR8("catfish_attack_up");
|
||||||
Dqn_String8 catfish_death = DQN_STRING8("catfish_death");
|
Dqn_Str8 catfish_death = DQN_STR8("catfish_death");
|
||||||
Dqn_String8 catfish_walk_up = DQN_STRING8("catfish_walk_up");
|
Dqn_Str8 catfish_walk_up = DQN_STR8("catfish_walk_up");
|
||||||
Dqn_String8 catfish_walk_side = DQN_STRING8("catfish_walk_side");
|
Dqn_Str8 catfish_walk_side = DQN_STR8("catfish_walk_side");
|
||||||
Dqn_String8 catfish_walk_down = DQN_STRING8("catfish_walk_down");
|
Dqn_Str8 catfish_walk_down = DQN_STR8("catfish_walk_down");
|
||||||
|
|
||||||
Dqn_String8 clinger_attack_down = DQN_STRING8("clinger_attack_down");
|
Dqn_Str8 clinger_attack_down = DQN_STR8("clinger_attack_down");
|
||||||
Dqn_String8 clinger_attack_side = DQN_STRING8("clinger_attack_side");
|
Dqn_Str8 clinger_attack_side = DQN_STR8("clinger_attack_side");
|
||||||
Dqn_String8 clinger_attack_up = DQN_STRING8("clinger_attack_up");
|
Dqn_Str8 clinger_attack_up = DQN_STR8("clinger_attack_up");
|
||||||
Dqn_String8 clinger_death = DQN_STRING8("clinger_death");
|
Dqn_Str8 clinger_death = DQN_STR8("clinger_death");
|
||||||
Dqn_String8 clinger_walk_up = DQN_STRING8("clinger_walk_up");
|
Dqn_Str8 clinger_walk_up = DQN_STR8("clinger_walk_up");
|
||||||
Dqn_String8 clinger_walk_down = DQN_STRING8("clinger_walk_down");
|
Dqn_Str8 clinger_walk_down = DQN_STR8("clinger_walk_down");
|
||||||
|
|
||||||
Dqn_String8 church_terry_alive = DQN_STRING8("church_terry_alive");
|
Dqn_Str8 church_terry_alive = DQN_STR8("church_terry_alive");
|
||||||
Dqn_String8 church_terry_dark = DQN_STRING8("church_terry_dark");
|
Dqn_Str8 church_terry_dark = DQN_STR8("church_terry_dark");
|
||||||
|
|
||||||
Dqn_String8 club_terry_alive = DQN_STRING8("club_terry_alive");
|
Dqn_Str8 club_terry_alive = DQN_STR8("club_terry_alive");
|
||||||
Dqn_String8 club_terry_dark = DQN_STRING8("club_terry_dark");
|
Dqn_Str8 club_terry_dark = DQN_STR8("club_terry_dark");
|
||||||
|
|
||||||
Dqn_String8 end_screen = DQN_STRING8("end_screen");
|
Dqn_Str8 end_screen = DQN_STR8("end_screen");
|
||||||
|
|
||||||
Dqn_String8 heart = DQN_STRING8("heart");
|
Dqn_Str8 heart = DQN_STR8("heart");
|
||||||
Dqn_String8 heart_bleed = DQN_STRING8("heart_bleed");
|
Dqn_Str8 heart_bleed = DQN_STR8("heart_bleed");
|
||||||
|
|
||||||
Dqn_String8 icon_attack = DQN_STRING8("icon_attack");
|
Dqn_Str8 icon_attack = DQN_STR8("icon_attack");
|
||||||
Dqn_String8 icon_health = DQN_STRING8("icon_health");
|
Dqn_Str8 icon_health = DQN_STR8("icon_health");
|
||||||
Dqn_String8 icon_money = DQN_STRING8("icon_money");
|
Dqn_Str8 icon_money = DQN_STR8("icon_money");
|
||||||
Dqn_String8 icon_phone = DQN_STRING8("icon_phone");
|
Dqn_Str8 icon_phone = DQN_STR8("icon_phone");
|
||||||
Dqn_String8 icon_stamina = DQN_STRING8("icon_stamina");
|
Dqn_Str8 icon_stamina = DQN_STR8("icon_stamina");
|
||||||
|
|
||||||
Dqn_String8 intro_screen_arrows = DQN_STRING8("intro_screen_arrows");
|
Dqn_Str8 intro_screen_arrows = DQN_STR8("intro_screen_arrows");
|
||||||
Dqn_String8 intro_screen_subtitle = DQN_STRING8("intro_screen_subtitle");
|
Dqn_Str8 intro_screen_subtitle = DQN_STR8("intro_screen_subtitle");
|
||||||
Dqn_String8 intro_screen_terry = DQN_STRING8("intro_screen_terry");
|
Dqn_Str8 intro_screen_terry = DQN_STR8("intro_screen_terry");
|
||||||
Dqn_String8 intro_screen_title = DQN_STRING8("intro_screen_title");
|
Dqn_Str8 intro_screen_title = DQN_STR8("intro_screen_title");
|
||||||
Dqn_String8 intro_screen_perry_joins_the_fight = DQN_STRING8("intro_screen_perry_joins_the_fight");
|
Dqn_Str8 intro_screen_perry_joins_the_fight = DQN_STR8("intro_screen_perry_joins_the_fight");
|
||||||
|
|
||||||
Dqn_String8 kennel_terry = DQN_STRING8("kennel_terry");
|
Dqn_Str8 kennel_terry = DQN_STR8("kennel_terry");
|
||||||
|
|
||||||
Dqn_String8 map = DQN_STRING8("map");
|
Dqn_Str8 map = DQN_STR8("map");
|
||||||
Dqn_String8 map_billboard_attack = DQN_STRING8("map_billboard_attack");
|
Dqn_Str8 map_billboard_attack = DQN_STR8("map_billboard_attack");
|
||||||
Dqn_String8 map_billboard_dash = DQN_STRING8("map_billboard_dash");
|
Dqn_Str8 map_billboard_dash = DQN_STR8("map_billboard_dash");
|
||||||
Dqn_String8 map_billboard_monkey = DQN_STRING8("map_billboard_monkey");
|
Dqn_Str8 map_billboard_monkey = DQN_STR8("map_billboard_monkey");
|
||||||
Dqn_String8 map_billboard_range_attack = DQN_STRING8("map_billboard_range_attack");
|
Dqn_Str8 map_billboard_range_attack = DQN_STR8("map_billboard_range_attack");
|
||||||
Dqn_String8 map_billboard_strafe = DQN_STRING8("map_billboard_strafe");
|
Dqn_Str8 map_billboard_strafe = DQN_STR8("map_billboard_strafe");
|
||||||
Dqn_String8 map_billboard_build = DQN_STRING8("map_billboard_build");
|
Dqn_Str8 map_billboard_build = DQN_STR8("map_billboard_build");
|
||||||
Dqn_String8 map_police = DQN_STRING8("map_police");
|
Dqn_Str8 map_police = DQN_STR8("map_police");
|
||||||
|
|
||||||
Dqn_String8 merchant_button_a = DQN_STRING8("merchant_button_a");
|
Dqn_Str8 merchant_button_a = DQN_STR8("merchant_button_a");
|
||||||
Dqn_String8 merchant_button_b = DQN_STRING8("merchant_button_b");
|
Dqn_Str8 merchant_button_b = DQN_STR8("merchant_button_b");
|
||||||
Dqn_String8 merchant_button_x = DQN_STRING8("merchant_button_x");
|
Dqn_Str8 merchant_button_x = DQN_STR8("merchant_button_x");
|
||||||
Dqn_String8 merchant_button_y = DQN_STRING8("merchant_button_y");
|
Dqn_Str8 merchant_button_y = DQN_STR8("merchant_button_y");
|
||||||
|
|
||||||
Dqn_String8 merchant_graveyard = DQN_STRING8("merchant_graveyard");
|
Dqn_Str8 merchant_graveyard = DQN_STR8("merchant_graveyard");
|
||||||
Dqn_String8 merchant_graveyard_menu = DQN_STRING8("merchant_graveyard_menu");
|
Dqn_Str8 merchant_graveyard_menu = DQN_STR8("merchant_graveyard_menu");
|
||||||
Dqn_String8 merchant_gym = DQN_STRING8("merchant_gym");
|
Dqn_Str8 merchant_gym = DQN_STR8("merchant_gym");
|
||||||
Dqn_String8 merchant_gym_menu = DQN_STRING8("merchant_gym_menu");
|
Dqn_Str8 merchant_gym_menu = DQN_STR8("merchant_gym_menu");
|
||||||
Dqn_String8 merchant_phone_company = DQN_STRING8("merchant_phone_company");
|
Dqn_Str8 merchant_phone_company = DQN_STR8("merchant_phone_company");
|
||||||
Dqn_String8 merchant_phone_company_menu = DQN_STRING8("merchant_phone_company_menu");
|
Dqn_Str8 merchant_phone_company_menu = DQN_STR8("merchant_phone_company_menu");
|
||||||
Dqn_String8 merchant_terry = DQN_STRING8("merchant_terry");
|
Dqn_Str8 merchant_terry = DQN_STR8("merchant_terry");
|
||||||
Dqn_String8 merchant_terry_menu = DQN_STRING8("merchant_terry_menu");
|
Dqn_Str8 merchant_terry_menu = DQN_STR8("merchant_terry_menu");
|
||||||
|
|
||||||
Dqn_String8 particle_church_halo = DQN_STRING8("particle_church_halo");
|
Dqn_Str8 particle_church_halo = DQN_STR8("particle_church_halo");
|
||||||
Dqn_String8 particle_church_cross = DQN_STRING8("particle_church_cross");
|
Dqn_Str8 particle_church_cross = DQN_STR8("particle_church_cross");
|
||||||
Dqn_String8 particle_drunk = DQN_STRING8("particle_drunk");
|
Dqn_Str8 particle_drunk = DQN_STR8("particle_drunk");
|
||||||
Dqn_String8 particle_drunk_bottle = DQN_STRING8("particle_drunk_bottle");
|
Dqn_Str8 particle_drunk_bottle = DQN_STR8("particle_drunk_bottle");
|
||||||
Dqn_String8 particle_drunk_martini = DQN_STRING8("particle_drunk_martini");
|
Dqn_Str8 particle_drunk_martini = DQN_STR8("particle_drunk_martini");
|
||||||
Dqn_String8 particle_heart = DQN_STRING8("particle_heart");
|
Dqn_Str8 particle_heart = DQN_STR8("particle_heart");
|
||||||
Dqn_String8 particle_hit_1 = DQN_STRING8("particle_hit_1");
|
Dqn_Str8 particle_hit_1 = DQN_STR8("particle_hit_1");
|
||||||
Dqn_String8 particle_hit_2 = DQN_STRING8("particle_hit_2");
|
Dqn_Str8 particle_hit_2 = DQN_STR8("particle_hit_2");
|
||||||
Dqn_String8 particle_hit_3 = DQN_STRING8("particle_hit_3");
|
Dqn_Str8 particle_hit_3 = DQN_STR8("particle_hit_3");
|
||||||
Dqn_String8 particle_purchase = DQN_STRING8("particle_purchase");
|
Dqn_Str8 particle_purchase = DQN_STR8("particle_purchase");
|
||||||
|
|
||||||
Dqn_String8 portal = DQN_STRING8("portal");
|
Dqn_Str8 portal = DQN_STR8("portal");
|
||||||
Dqn_String8 portal_break = DQN_STRING8("portal_break");
|
Dqn_Str8 portal_break = DQN_STR8("portal_break");
|
||||||
Dqn_String8 portal_monk = DQN_STRING8("portal_monk");
|
Dqn_Str8 portal_monk = DQN_STR8("portal_monk");
|
||||||
|
|
||||||
Dqn_String8 shadow_long_circle = DQN_STRING8("shadow_long_circle");
|
Dqn_Str8 shadow_long_circle = DQN_STR8("shadow_long_circle");
|
||||||
Dqn_String8 shadow_tight_circle = DQN_STRING8("shadow_tight_circle");
|
Dqn_Str8 shadow_tight_circle = DQN_STR8("shadow_tight_circle");
|
||||||
|
|
||||||
Dqn_String8 shrubbery_bush_1 = DQN_STRING8("shrubbery_bush_1");
|
Dqn_Str8 shrubbery_bush_1 = DQN_STR8("shrubbery_bush_1");
|
||||||
Dqn_String8 shrubbery_bush_2 = DQN_STRING8("shrubbery_bush_2");
|
Dqn_Str8 shrubbery_bush_2 = DQN_STR8("shrubbery_bush_2");
|
||||||
Dqn_String8 shrubbery_island_1 = DQN_STRING8("shrubbery_island_1");
|
Dqn_Str8 shrubbery_island_1 = DQN_STR8("shrubbery_island_1");
|
||||||
Dqn_String8 shrubbery_island_2 = DQN_STRING8("shrubbery_island_2");
|
Dqn_Str8 shrubbery_island_2 = DQN_STR8("shrubbery_island_2");
|
||||||
Dqn_String8 shrubbery_island_3 = DQN_STRING8("shrubbery_island_3");
|
Dqn_Str8 shrubbery_island_3 = DQN_STR8("shrubbery_island_3");
|
||||||
|
|
||||||
Dqn_String8 smoochie_walk_up = DQN_STRING8("smoochie_walk_up");
|
Dqn_Str8 smoochie_walk_up = DQN_STR8("smoochie_walk_up");
|
||||||
Dqn_String8 smoochie_walk_down = DQN_STRING8("smoochie_walk_down");
|
Dqn_Str8 smoochie_walk_down = DQN_STR8("smoochie_walk_down");
|
||||||
Dqn_String8 smoochie_walk_left = DQN_STRING8("smoochie_walk_left");
|
Dqn_Str8 smoochie_walk_left = DQN_STR8("smoochie_walk_left");
|
||||||
Dqn_String8 smoochie_walk_right = DQN_STRING8("smoochie_walk_right");
|
Dqn_Str8 smoochie_walk_right = DQN_STR8("smoochie_walk_right");
|
||||||
Dqn_String8 smoochie_attack_down = DQN_STRING8("smoochie_attack_down");
|
Dqn_Str8 smoochie_attack_down = DQN_STR8("smoochie_attack_down");
|
||||||
Dqn_String8 smoochie_hurt_side = DQN_STRING8("smoochie_hurt_side");
|
Dqn_Str8 smoochie_hurt_side = DQN_STR8("smoochie_hurt_side");
|
||||||
Dqn_String8 smoochie_attack_heart = DQN_STRING8("smoochie_attack_heart");
|
Dqn_Str8 smoochie_attack_heart = DQN_STR8("smoochie_attack_heart");
|
||||||
Dqn_String8 smoochie_death = DQN_STRING8("smoochie_death");
|
Dqn_Str8 smoochie_death = DQN_STR8("smoochie_death");
|
||||||
|
|
||||||
Dqn_String8 terry_attack_up = DQN_STRING8("terry_attack_up");
|
Dqn_Str8 terry_attack_up = DQN_STR8("terry_attack_up");
|
||||||
Dqn_String8 terry_attack_side = DQN_STRING8("terry_attack_side");
|
Dqn_Str8 terry_attack_side = DQN_STR8("terry_attack_side");
|
||||||
Dqn_String8 terry_attack_down = DQN_STRING8("terry_attack_down");
|
Dqn_Str8 terry_attack_down = DQN_STR8("terry_attack_down");
|
||||||
Dqn_String8 terry_attack_phone_up = DQN_STRING8("terry_attack_phone_up");
|
Dqn_Str8 terry_attack_phone_up = DQN_STR8("terry_attack_phone_up");
|
||||||
Dqn_String8 terry_attack_phone_side = DQN_STRING8("terry_attack_phone_side");
|
Dqn_Str8 terry_attack_phone_side = DQN_STR8("terry_attack_phone_side");
|
||||||
Dqn_String8 terry_attack_phone_down = DQN_STRING8("terry_attack_phone_down");
|
Dqn_Str8 terry_attack_phone_down = DQN_STR8("terry_attack_phone_down");
|
||||||
Dqn_String8 terry_attack_phone_message = DQN_STRING8("terry_attack_phone_message");
|
Dqn_Str8 terry_attack_phone_message = DQN_STR8("terry_attack_phone_message");
|
||||||
Dqn_String8 terry_death = DQN_STRING8("terry_death");
|
Dqn_Str8 terry_death = DQN_STR8("terry_death");
|
||||||
Dqn_String8 terry_pat_dog = DQN_STRING8("terry_pat_dog");
|
Dqn_Str8 terry_pat_dog = DQN_STR8("terry_pat_dog");
|
||||||
Dqn_String8 terry_ghost = DQN_STRING8("terry_ghost");
|
Dqn_Str8 terry_ghost = DQN_STR8("terry_ghost");
|
||||||
Dqn_String8 terry_walk_idle = DQN_STRING8("terry_walk_idle");
|
Dqn_Str8 terry_walk_idle = DQN_STR8("terry_walk_idle");
|
||||||
Dqn_String8 terry_walk_up = DQN_STRING8("terry_walk_up");
|
Dqn_Str8 terry_walk_up = DQN_STR8("terry_walk_up");
|
||||||
Dqn_String8 terry_walk_down = DQN_STRING8("terry_walk_down");
|
Dqn_Str8 terry_walk_down = DQN_STR8("terry_walk_down");
|
||||||
Dqn_String8 terry_walk_left = DQN_STRING8("terry_walk_left");
|
Dqn_Str8 terry_walk_left = DQN_STR8("terry_walk_left");
|
||||||
Dqn_String8 terry_walk_right = DQN_STRING8("terry_walk_right");
|
Dqn_Str8 terry_walk_right = DQN_STR8("terry_walk_right");
|
||||||
|
|
||||||
Dqn_String8 perry_attack_up = DQN_STRING8("perry_attack_up");
|
Dqn_Str8 perry_attack_up = DQN_STR8("perry_attack_up");
|
||||||
Dqn_String8 perry_attack_side = DQN_STRING8("perry_attack_side");
|
Dqn_Str8 perry_attack_side = DQN_STR8("perry_attack_side");
|
||||||
Dqn_String8 perry_attack_down = DQN_STRING8("perry_attack_down");
|
Dqn_Str8 perry_attack_down = DQN_STR8("perry_attack_down");
|
||||||
Dqn_String8 perry_attack_phone_up = DQN_STRING8("perry_attack_phone_up");
|
Dqn_Str8 perry_attack_phone_up = DQN_STR8("perry_attack_phone_up");
|
||||||
Dqn_String8 perry_attack_phone_side = DQN_STRING8("perry_attack_phone_side");
|
Dqn_Str8 perry_attack_phone_side = DQN_STR8("perry_attack_phone_side");
|
||||||
Dqn_String8 perry_attack_phone_down = DQN_STRING8("perry_attack_phone_down");
|
Dqn_Str8 perry_attack_phone_down = DQN_STR8("perry_attack_phone_down");
|
||||||
Dqn_String8 perry_death = DQN_STRING8("perry_death");
|
Dqn_Str8 perry_death = DQN_STR8("perry_death");
|
||||||
Dqn_String8 perry_pat_dog = DQN_STRING8("perry_pat_dog");
|
Dqn_Str8 perry_pat_dog = DQN_STR8("perry_pat_dog");
|
||||||
Dqn_String8 perry_ghost = DQN_STRING8("perry_ghost");
|
Dqn_Str8 perry_ghost = DQN_STR8("perry_ghost");
|
||||||
Dqn_String8 perry_walk_idle = DQN_STRING8("perry_walk_idle");
|
Dqn_Str8 perry_walk_idle = DQN_STR8("perry_walk_idle");
|
||||||
Dqn_String8 perry_walk_up = DQN_STRING8("perry_walk_up");
|
Dqn_Str8 perry_walk_up = DQN_STR8("perry_walk_up");
|
||||||
Dqn_String8 perry_walk_down = DQN_STRING8("perry_walk_down");
|
Dqn_Str8 perry_walk_down = DQN_STR8("perry_walk_down");
|
||||||
Dqn_String8 perry_walk_right = DQN_STRING8("perry_walk_right");
|
Dqn_Str8 perry_walk_right = DQN_STR8("perry_walk_right");
|
||||||
}
|
}
|
||||||
g_anim_names;
|
g_anim_names;
|
||||||
|
|
||||||
struct FP_ParticleDescriptor
|
struct FP_ParticleDescriptor
|
||||||
{
|
{
|
||||||
Dqn_String8 anim_name;
|
Dqn_Str8 anim_name;
|
||||||
Dqn_V2 pos;
|
Dqn_V2 pos;
|
||||||
Dqn_V2 velocity;
|
Dqn_V2 velocity;
|
||||||
Dqn_V2 velocity_variance;
|
Dqn_V2 velocity_variance;
|
||||||
Dqn_V4 colour_begin;
|
Dqn_V4 colour_begin;
|
||||||
Dqn_V4 colour_end;
|
Dqn_V4 colour_end;
|
||||||
Dqn_usize duration_ms;
|
Dqn_usize duration_ms;
|
||||||
};
|
};
|
||||||
|
|
||||||
#if defined(DQN_PLATFORM_EMSCRIPTEN)
|
#if defined(DQN_PLATFORM_EMSCRIPTEN)
|
||||||
|
@ -12,15 +12,15 @@
|
|||||||
void RebuildProgramIfRequired(int argc, char const **argv)
|
void RebuildProgramIfRequired(int argc, char const **argv)
|
||||||
{
|
{
|
||||||
Dqn_ThreadScratch scratch = Dqn_Thread_GetScratch(nullptr);
|
Dqn_ThreadScratch scratch = Dqn_Thread_GetScratch(nullptr);
|
||||||
Dqn_String8 const exe_dir = Dqn_OS_EXEDir(scratch.arena);
|
Dqn_Str8 const exe_dir = Dqn_OS_EXEDir(scratch.arena);
|
||||||
Dqn_String8 build_program_path = Dqn_OS_EXEPath(scratch.arena);
|
Dqn_Str8 build_program_path = Dqn_OS_EXEPath(scratch.arena);
|
||||||
Dqn_FsInfo build_program_info = Dqn_Fs_GetInfo(build_program_path);
|
Dqn_FsInfo build_program_info = Dqn_Fs_GetInfo(build_program_path);
|
||||||
Dqn_FsInfo source_path = Dqn_Fs_GetInfo(Dqn_String8_InitCString8(__FILE__));
|
Dqn_FsInfo source_path = Dqn_Fs_GetInfo(Dqn_Str8_InitCStr8(__FILE__));
|
||||||
|
|
||||||
if (!build_program_info.exists) {
|
if (!build_program_info.exists) {
|
||||||
Dqn_WinError error = Dqn_Win_LastError(scratch.arena);
|
Dqn_WinError error = Dqn_Win_LastError(scratch.arena);
|
||||||
Dqn_Log_WarningF("Failed to get the last write time of the build program '%.*s', skipping rebuild (%d): %.*s",
|
Dqn_Log_WarningF("Failed to get the last write time of the build program '%.*s', skipping rebuild (%d): %.*s",
|
||||||
DQN_STRING_FMT(build_program_path), error.code, DQN_STRING_FMT(error.msg));
|
DQN_STR_FMT(build_program_path), error.code, DQN_STR_FMT(error.msg));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -28,7 +28,7 @@ void RebuildProgramIfRequired(int argc, char const **argv)
|
|||||||
Dqn_WinError error = Dqn_Win_LastError(scratch.arena);
|
Dqn_WinError error = Dqn_Win_LastError(scratch.arena);
|
||||||
Dqn_Log_WarningF(
|
Dqn_Log_WarningF(
|
||||||
"Failed to get the last write time of the build program's source code '%s', skipping rebuild (%d): %.*s",
|
"Failed to get the last write time of the build program's source code '%s', skipping rebuild (%d): %.*s",
|
||||||
__FILE__, error.code, DQN_STRING_FMT(error.msg));
|
__FILE__, error.code, DQN_STR_FMT(error.msg));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -41,19 +41,19 @@ void RebuildProgramIfRequired(int argc, char const **argv)
|
|||||||
source_path.last_write_time_in_s,
|
source_path.last_write_time_in_s,
|
||||||
build_program_info.last_write_time_in_s);
|
build_program_info.last_write_time_in_s);
|
||||||
|
|
||||||
Dqn_String8 temp_build_program_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s.old", DQN_STRING_FMT(build_program_path));
|
Dqn_Str8 temp_build_program_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s.old", DQN_STR_FMT(build_program_path));
|
||||||
if (!Dqn_Fs_Move(build_program_path, temp_build_program_path, true)) {
|
if (!Dqn_Fs_Move(build_program_path, temp_build_program_path, true)) {
|
||||||
Dqn_WinError error = Dqn_Win_LastError(scratch.arena);
|
Dqn_WinError error = Dqn_Win_LastError(scratch.arena);
|
||||||
Dqn_Log_WarningF("Failed to backup the build program for rebuilding, skipping rebuild (%d): %.*s", error.code, DQN_STRING_FMT(error.msg));
|
Dqn_Log_WarningF("Failed to backup the build program for rebuilding, skipping rebuild (%d): %.*s", error.code, DQN_STR_FMT(error.msg));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: Rebuild the build program because a change was detected ===============
|
// NOTE: Rebuild the build program because a change was detected ===============
|
||||||
Dqn_String8 rebuild_cmd = Dqn_String8_InitF(scratch.allocator, "cl /Z7 /W4 /nologo %s /incremental:no /link", __FILE__);
|
Dqn_Str8 rebuild_cmd = Dqn_Str8_InitF(scratch.allocator, "cl /Z7 /W4 /nologo %s /incremental:no /link", __FILE__);
|
||||||
Dqn_OSExecResult rebuild_result = Dqn_OS_Exec(rebuild_cmd, exe_dir /*working_dir*/);
|
Dqn_OSExecResult rebuild_result = Dqn_OS_Exec(rebuild_cmd, exe_dir /*working_dir*/);
|
||||||
if (rebuild_result.os_error_code) {
|
if (rebuild_result.os_error_code) {
|
||||||
Dqn_WinError error = Dqn_Win_LastError(scratch.arena);
|
Dqn_WinError error = Dqn_Win_LastError(scratch.arena);
|
||||||
Dqn_Log_ErrorF("Detected change in the build program's source code '%s' but the OS failed to rebuild the program, skipping rebuild (%d): %.*s", __FILE__, error.code, DQN_STRING_FMT(error.msg));
|
Dqn_Log_ErrorF("Detected change in the build program's source code '%s' but the OS failed to rebuild the program, skipping rebuild (%d): %.*s", __FILE__, error.code, DQN_STR_FMT(error.msg));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -62,16 +62,16 @@ void RebuildProgramIfRequired(int argc, char const **argv)
|
|||||||
exit(rebuild_result.exit_code);
|
exit(rebuild_result.exit_code);
|
||||||
}
|
}
|
||||||
|
|
||||||
Dqn_String8Builder builder = {};
|
Dqn_Str8Builder builder = {};
|
||||||
builder.allocator = scratch.allocator;
|
builder.allocator = scratch.allocator;
|
||||||
DQN_FOR_UINDEX (arg_index, argc)
|
DQN_FOR_UINDEX (arg_index, argc)
|
||||||
Dqn_String8Builder_AppendF(&builder, "%s%s", arg_index ? " " : "", argv[arg_index]);
|
Dqn_Str8Builder_AppendF(&builder, "%s%s", arg_index ? " " : "", argv[arg_index]);
|
||||||
|
|
||||||
Dqn_String8 rebootstrap_cmd = Dqn_String8Builder_Build(&builder, scratch.allocator);
|
Dqn_Str8 rebootstrap_cmd = Dqn_Str8Builder_Build(&builder, scratch.allocator);
|
||||||
Dqn_OSExecResult exec_result = Dqn_OS_Exec(rebootstrap_cmd, exe_dir /*working_dir*/);
|
Dqn_OSExecResult exec_result = Dqn_OS_Exec(rebootstrap_cmd, exe_dir /*working_dir*/);
|
||||||
if (exec_result.os_error_code) {
|
if (exec_result.os_error_code) {
|
||||||
Dqn_WinError error = Dqn_Win_LastError(scratch.arena);
|
Dqn_WinError error = Dqn_Win_LastError(scratch.arena);
|
||||||
Dqn_Log_ErrorF("Detected change in the build program's source code '%s' but the OS failed to rebuild the program, skipping rebuild (%d): %.*s", __FILE__, error.code, DQN_STRING_FMT(error.msg));
|
Dqn_Log_ErrorF("Detected change in the build program's source code '%s' but the OS failed to rebuild the program, skipping rebuild (%d): %.*s", __FILE__, error.code, DQN_STR_FMT(error.msg));
|
||||||
Dqn_Fs_Move(temp_build_program_path, build_program_path, true);
|
Dqn_Fs_Move(temp_build_program_path, build_program_path, true);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -88,13 +88,13 @@ int main(int argc, char const **argv)
|
|||||||
bool dry_run = false;
|
bool dry_run = false;
|
||||||
bool target_web = false;
|
bool target_web = false;
|
||||||
for (Dqn_usize arg_index = 1; arg_index < argc; arg_index++) {
|
for (Dqn_usize arg_index = 1; arg_index < argc; arg_index++) {
|
||||||
Dqn_String8 arg = Dqn_String8_InitCString8(argv[arg_index]);
|
Dqn_Str8 arg = Dqn_Str8_InitCStr8(argv[arg_index]);
|
||||||
if (arg == DQN_STRING8("--help")) {
|
if (arg == DQN_STR8("--help")) {
|
||||||
PRINT_HELP;
|
PRINT_HELP;
|
||||||
return 0;
|
return 0;
|
||||||
} else if (arg == DQN_STRING8("--dry-run")) {
|
} else if (arg == DQN_STR8("--dry-run")) {
|
||||||
dry_run = true;
|
dry_run = true;
|
||||||
} else if (arg == DQN_STRING8("--web")) {
|
} else if (arg == DQN_STR8("--web")) {
|
||||||
target_web = true;
|
target_web = true;
|
||||||
} else {
|
} else {
|
||||||
PRINT_HELP;
|
PRINT_HELP;
|
||||||
@ -108,26 +108,26 @@ int main(int argc, char const **argv)
|
|||||||
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "-- Dqn_CPPBuild v0");
|
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "-- Dqn_CPPBuild v0");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uint64_t build_timings[2] = {};
|
uint64_t build_timings[2] = {};
|
||||||
build_timings[0] = Dqn_OS_PerfCounterNow();
|
build_timings[0] = Dqn_OS_PerfCounterNow();
|
||||||
Dqn_ThreadScratch scratch = Dqn_Thread_GetScratch(nullptr);
|
Dqn_ThreadScratch scratch = Dqn_Thread_GetScratch(nullptr);
|
||||||
Dqn_String8 const exe_dir = Dqn_OS_EXEDir(scratch.arena);
|
Dqn_Str8 const exe_dir = Dqn_OS_EXEDir(scratch.arena);
|
||||||
Dqn_String8 const code_dir = exe_dir;
|
Dqn_Str8 const code_dir = exe_dir;
|
||||||
Dqn_String8 const build_dir = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/Build", DQN_STRING_FMT(exe_dir));
|
Dqn_Str8 const build_dir = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/Build", DQN_STR_FMT(exe_dir));
|
||||||
Dqn_String8 const tely_dir = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/External/tely", DQN_STRING_FMT(exe_dir));
|
Dqn_Str8 const tely_dir = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/External/tely", DQN_STR_FMT(exe_dir));
|
||||||
|
|
||||||
Dqn_Slice<Dqn_String8> common_compile_flags = Dqn_Slice_InitCArrayCopy(scratch.arena, {
|
Dqn_Slice<Dqn_Str8> common_compile_flags = Dqn_Slice_InitCArrayCopy(scratch.arena, {
|
||||||
DQN_STRING8("cl"),
|
DQN_STR8("cl"),
|
||||||
DQN_STRING8("/W4"),
|
DQN_STR8("/W4"),
|
||||||
DQN_STRING8("/Z7"),
|
DQN_STR8("/Z7"),
|
||||||
DQN_STRING8("/MT"),
|
DQN_STR8("/MT"),
|
||||||
DQN_STRING8("/EHsc"),
|
DQN_STR8("/EHsc"),
|
||||||
DQN_STRING8("/nologo"),
|
DQN_STR8("/nologo"),
|
||||||
});
|
});
|
||||||
|
|
||||||
Dqn_Slice<Dqn_String8> common_link_flags = Dqn_Slice_InitCArrayCopy(scratch.arena, {
|
Dqn_Slice<Dqn_Str8> common_link_flags = Dqn_Slice_InitCArrayCopy(scratch.arena, {
|
||||||
DQN_STRING8("/link"),
|
DQN_STR8("/link"),
|
||||||
DQN_STRING8("/incremental:no"),
|
DQN_STR8("/incremental:no"),
|
||||||
});
|
});
|
||||||
|
|
||||||
// NOTE: Assets ================================================================================
|
// NOTE: Assets ================================================================================
|
||||||
@ -135,33 +135,33 @@ int main(int argc, char const **argv)
|
|||||||
{
|
{
|
||||||
robocopy_timings[0] = Dqn_OS_PerfCounterNow();
|
robocopy_timings[0] = Dqn_OS_PerfCounterNow();
|
||||||
DQN_DEFER { robocopy_timings[1] = Dqn_OS_PerfCounterNow(); };
|
DQN_DEFER { robocopy_timings[1] = Dqn_OS_PerfCounterNow(); };
|
||||||
Dqn_String8 robocopy_cmd[] = {
|
Dqn_Str8 robocopy_cmd[] = {
|
||||||
Dqn_String8_InitF(scratch.allocator, "robocopy /NJH /NJS /NDL /NP %.*s\\Data\\Textures %.*s\\Data\\Textures atlas.*", DQN_STRING_FMT(exe_dir), DQN_STRING_FMT(build_dir)),
|
Dqn_Str8_InitF(scratch.allocator, "robocopy /NJH /NJS /NDL /NP %.*s\\Data\\Textures %.*s\\Data\\Textures atlas.*", DQN_STR_FMT(exe_dir), DQN_STR_FMT(build_dir)),
|
||||||
Dqn_String8_InitF(scratch.allocator, "robocopy /MIR /NJH /NJS /NDL /NP %.*s\\Data\\Fonts %.*s\\Data\\Fonts", DQN_STRING_FMT(exe_dir), DQN_STRING_FMT(build_dir)),
|
Dqn_Str8_InitF(scratch.allocator, "robocopy /MIR /NJH /NJS /NDL /NP %.*s\\Data\\Fonts %.*s\\Data\\Fonts", DQN_STR_FMT(exe_dir), DQN_STR_FMT(build_dir)),
|
||||||
Dqn_String8_InitF(scratch.allocator, "robocopy /MIR /NJH /NJS /NDL /NP %.*s\\Data\\Audio %.*s\\Data\\Audio", DQN_STRING_FMT(exe_dir), DQN_STRING_FMT(build_dir)),
|
Dqn_Str8_InitF(scratch.allocator, "robocopy /MIR /NJH /NJS /NDL /NP %.*s\\Data\\Audio %.*s\\Data\\Audio", DQN_STR_FMT(exe_dir), DQN_STR_FMT(build_dir)),
|
||||||
};
|
};
|
||||||
|
|
||||||
for (Dqn_String8 cmd : robocopy_cmd) {
|
for (Dqn_Str8 cmd : robocopy_cmd) {
|
||||||
if (dry_run)
|
if (dry_run)
|
||||||
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STRING_FMT(cmd));
|
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STR_FMT(cmd));
|
||||||
else
|
else
|
||||||
Dqn_OS_Exec(cmd, /*working_dir*/ {});
|
Dqn_OS_Exec(cmd, /*working_dir*/ {});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: Raylib ================================================================================
|
// NOTE: Raylib ================================================================================
|
||||||
Dqn_String8 const raylib_dir = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/External/tely/external/raylib", DQN_STRING_FMT(exe_dir));
|
Dqn_Str8 const raylib_dir = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/External/tely/external/raylib", DQN_STR_FMT(exe_dir));
|
||||||
Dqn_Slice<Dqn_String8> const raylib_base_files = Dqn_Slice_InitCArrayCopy(scratch.arena, {
|
Dqn_Slice<Dqn_Str8> const raylib_base_files = Dqn_Slice_InitCArrayCopy(scratch.arena, {
|
||||||
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/rcore.c", DQN_STRING_FMT(raylib_dir)),
|
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/rcore.c", DQN_STR_FMT(raylib_dir)),
|
||||||
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/utils.c", DQN_STRING_FMT(raylib_dir)),
|
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/utils.c", DQN_STR_FMT(raylib_dir)),
|
||||||
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/raudio.c", DQN_STRING_FMT(raylib_dir)),
|
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/raudio.c", DQN_STR_FMT(raylib_dir)),
|
||||||
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/rmodels.c", DQN_STRING_FMT(raylib_dir)),
|
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/rmodels.c", DQN_STR_FMT(raylib_dir)),
|
||||||
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/rtext.c", DQN_STRING_FMT(raylib_dir)),
|
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/rtext.c", DQN_STR_FMT(raylib_dir)),
|
||||||
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/rtextures.c", DQN_STRING_FMT(raylib_dir)),
|
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/rtextures.c", DQN_STR_FMT(raylib_dir)),
|
||||||
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/rshapes.c", DQN_STRING_FMT(raylib_dir)),
|
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/rshapes.c", DQN_STR_FMT(raylib_dir)),
|
||||||
});
|
});
|
||||||
|
|
||||||
Dqn_List<Dqn_String8> raylib_pc_output_files = Dqn_List_Init<Dqn_String8>(scratch.arena, 16);
|
Dqn_List<Dqn_Str8> raylib_pc_output_files = Dqn_List_Init<Dqn_Str8>(scratch.arena, 16);
|
||||||
uint64_t raylib_pc_timings[2] = {};
|
uint64_t raylib_pc_timings[2] = {};
|
||||||
{
|
{
|
||||||
raylib_pc_timings[0] = Dqn_OS_PerfCounterNow();
|
raylib_pc_timings[0] = Dqn_OS_PerfCounterNow();
|
||||||
@ -171,39 +171,39 @@ int main(int argc, char const **argv)
|
|||||||
Dqn_CPPBuildContext build_context = {};
|
Dqn_CPPBuildContext build_context = {};
|
||||||
{
|
{
|
||||||
build_context.include_dirs = Dqn_Slice_InitCArrayCopy(scratch.arena, {
|
build_context.include_dirs = Dqn_Slice_InitCArrayCopy(scratch.arena, {
|
||||||
Dqn_FsPath_ConvertF(scratch.arena, "%.*s", DQN_STRING_FMT(raylib_dir)),
|
Dqn_FsPath_ConvertF(scratch.arena, "%.*s", DQN_STR_FMT(raylib_dir)),
|
||||||
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/external/glfw/include", DQN_STRING_FMT(raylib_dir)),
|
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/external/glfw/include", DQN_STR_FMT(raylib_dir)),
|
||||||
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/glfw/deps/mingw", DQN_STRING_FMT(raylib_dir)),
|
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/glfw/deps/mingw", DQN_STR_FMT(raylib_dir)),
|
||||||
});
|
});
|
||||||
|
|
||||||
build_context.compile_flags = Dqn_Slice_InitCArrayCopy(scratch.arena, {
|
build_context.compile_flags = Dqn_Slice_InitCArrayCopy(scratch.arena, {
|
||||||
DQN_STRING8("cl"),
|
DQN_STR8("cl"),
|
||||||
DQN_STRING8("/w"),
|
DQN_STR8("/w"),
|
||||||
DQN_STRING8("/c"),
|
DQN_STR8("/c"),
|
||||||
DQN_STRING8("/D _DEFAULT_SOURCE"),
|
DQN_STR8("/D _DEFAULT_SOURCE"),
|
||||||
DQN_STRING8("/D PLATFORM_DESKTOP"),
|
DQN_STR8("/D PLATFORM_DESKTOP"),
|
||||||
DQN_STRING8("/Z7"),
|
DQN_STR8("/Z7"),
|
||||||
DQN_STRING8("/MT"),
|
DQN_STR8("/MT"),
|
||||||
DQN_STRING8("/EHsc"),
|
DQN_STR8("/EHsc"),
|
||||||
DQN_STRING8("/nologo"),
|
DQN_STR8("/nologo"),
|
||||||
});
|
});
|
||||||
build_context.build_dir = build_dir;
|
build_context.build_dir = build_dir;
|
||||||
build_context.compiler = Dqn_CPPBuildCompiler_MSVC;
|
build_context.compiler = Dqn_CPPBuildCompiler_MSVC;
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: Compile each file separately with a custom output name ============================
|
// NOTE: Compile each file separately with a custom output name ============================
|
||||||
for (Dqn_String8 base_file : raylib_base_files) {
|
for (Dqn_Str8 base_file : raylib_base_files) {
|
||||||
Dqn_String8 file_stem = Dqn_String8_FileNameNoExtension(base_file);
|
Dqn_Str8 file_stem = Dqn_Str8_FileNameNoExtension(base_file);
|
||||||
|
|
||||||
Dqn_CPPBuildCompileFile build_file = {};
|
Dqn_CPPBuildCompileFile build_file = {};
|
||||||
build_file.input_file_path = base_file;
|
build_file.input_file_path = base_file;
|
||||||
build_file.output_file_path = Dqn_String8_InitF(scratch.allocator, "raylib_%.*s.obj", DQN_STRING_FMT(file_stem));
|
build_file.output_file_path = Dqn_Str8_InitF(scratch.allocator, "raylib_%.*s.obj", DQN_STR_FMT(file_stem));
|
||||||
build_context.compile_files = Dqn_Slice_InitCArrayCopy(scratch.arena, {build_file});
|
build_context.compile_files = Dqn_Slice_InitCArrayCopy(scratch.arena, {build_file});
|
||||||
Dqn_List_Add(&raylib_pc_output_files, build_file.output_file_path);
|
Dqn_List_Add(&raylib_pc_output_files, build_file.output_file_path);
|
||||||
|
|
||||||
if (dry_run) {
|
if (dry_run) {
|
||||||
Dqn_String8 cmd = Dqn_CPPBuild_ToCommandLine(build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
Dqn_Str8 cmd = Dqn_CPPBuild_ToCommandLine(build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
||||||
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STRING_FMT(cmd));
|
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STR_FMT(cmd));
|
||||||
} else {
|
} else {
|
||||||
Dqn_CPPBuild_ExecOrAbort(build_context, Dqn_CPPBuildMode_CacheBuild);
|
Dqn_CPPBuild_ExecOrAbort(build_context, Dqn_CPPBuildMode_CacheBuild);
|
||||||
}
|
}
|
||||||
@ -212,14 +212,14 @@ int main(int argc, char const **argv)
|
|||||||
// NOTE: Build rlgfw =======================================================================
|
// NOTE: Build rlgfw =======================================================================
|
||||||
{
|
{
|
||||||
Dqn_CPPBuildCompileFile build_file = {};
|
Dqn_CPPBuildCompileFile build_file = {};
|
||||||
build_file.input_file_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/rglfw.c", DQN_STRING_FMT(raylib_dir));
|
build_file.input_file_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/rglfw.c", DQN_STR_FMT(raylib_dir));
|
||||||
build_file.output_file_path = Dqn_String8_InitF(scratch.allocator, "raylib_rglfw.obj");
|
build_file.output_file_path = Dqn_Str8_InitF(scratch.allocator, "raylib_rglfw.obj");
|
||||||
build_context.compile_files = Dqn_Slice_InitCArrayCopy(scratch.arena, {build_file});
|
build_context.compile_files = Dqn_Slice_InitCArrayCopy(scratch.arena, {build_file});
|
||||||
Dqn_List_Add(&raylib_pc_output_files, build_file.output_file_path);
|
Dqn_List_Add(&raylib_pc_output_files, build_file.output_file_path);
|
||||||
|
|
||||||
if (dry_run) {
|
if (dry_run) {
|
||||||
Dqn_String8 cmd = Dqn_CPPBuild_ToCommandLine(build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
Dqn_Str8 cmd = Dqn_CPPBuild_ToCommandLine(build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
||||||
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STRING_FMT(cmd));
|
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STR_FMT(cmd));
|
||||||
} else {
|
} else {
|
||||||
Dqn_CPPBuild_ExecOrAbort(build_context, Dqn_CPPBuildMode_CacheBuild);
|
Dqn_CPPBuild_ExecOrAbort(build_context, Dqn_CPPBuildMode_CacheBuild);
|
||||||
}
|
}
|
||||||
@ -235,17 +235,17 @@ int main(int argc, char const **argv)
|
|||||||
Dqn_CPPBuildContext build_context = {};
|
Dqn_CPPBuildContext build_context = {};
|
||||||
build_context.compiler = Dqn_CPPBuildCompiler_MSVC;
|
build_context.compiler = Dqn_CPPBuildCompiler_MSVC;
|
||||||
build_context.compile_files = Dqn_Slice_InitCArrayCopy(scratch.arena, {
|
build_context.compile_files = Dqn_Slice_InitCArrayCopy(scratch.arena, {
|
||||||
Dqn_CPPBuildCompileFile{{}, Dqn_FsPath_ConvertF(scratch.arena, "%.*s/External/qoiconv.c", DQN_STRING_FMT(code_dir)) },
|
Dqn_CPPBuildCompileFile{{}, Dqn_FsPath_ConvertF(scratch.arena, "%.*s/External/qoiconv.c", DQN_STR_FMT(code_dir)) },
|
||||||
});
|
});
|
||||||
|
|
||||||
build_context.compile_flags = Dqn_Slice_InitCArrayCopy(scratch.arena, {DQN_STRING8("cl"), DQN_STRING8("-O2"), DQN_STRING8("-MT"), DQN_STRING8("/nologo")});
|
build_context.compile_flags = Dqn_Slice_InitCArrayCopy(scratch.arena, {DQN_STR8("cl"), DQN_STR8("-O2"), DQN_STR8("-MT"), DQN_STR8("/nologo")});
|
||||||
build_context.link_flags = Dqn_Slice_InitCArrayCopy(scratch.arena, {DQN_STRING8("/link"), DQN_STRING8("/incremental:no")});
|
build_context.link_flags = Dqn_Slice_InitCArrayCopy(scratch.arena, {DQN_STR8("/link"), DQN_STR8("/incremental:no")});
|
||||||
build_context.include_dirs = Dqn_Slice_InitCArrayCopy(scratch.arena, {Dqn_FsPath_ConvertF(scratch.arena, "%.*s/External/stb", DQN_STRING_FMT(tely_dir))});
|
build_context.include_dirs = Dqn_Slice_InitCArrayCopy(scratch.arena, {Dqn_FsPath_ConvertF(scratch.arena, "%.*s/External/stb", DQN_STR_FMT(tely_dir))});
|
||||||
build_context.build_dir = build_dir;
|
build_context.build_dir = build_dir;
|
||||||
|
|
||||||
if (dry_run) {
|
if (dry_run) {
|
||||||
Dqn_String8 cmd = Dqn_CPPBuild_ToCommandLine(build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
Dqn_Str8 cmd = Dqn_CPPBuild_ToCommandLine(build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
||||||
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STRING_FMT(cmd));
|
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STR_FMT(cmd));
|
||||||
} else {
|
} else {
|
||||||
Dqn_CPPBuild_ExecOrAbort(build_context, Dqn_CPPBuildMode_CacheBuild);
|
Dqn_CPPBuild_ExecOrAbort(build_context, Dqn_CPPBuildMode_CacheBuild);
|
||||||
}
|
}
|
||||||
@ -260,7 +260,7 @@ int main(int argc, char const **argv)
|
|||||||
Dqn_CPPBuildContext build_context = {};
|
Dqn_CPPBuildContext build_context = {};
|
||||||
build_context.compiler = Dqn_CPPBuildCompiler_MSVC;
|
build_context.compiler = Dqn_CPPBuildCompiler_MSVC;
|
||||||
build_context.compile_files = Dqn_Slice_InitCArrayCopy(scratch.arena, {
|
build_context.compile_files = Dqn_Slice_InitCArrayCopy(scratch.arena, {
|
||||||
Dqn_CPPBuildCompileFile{{}, Dqn_FsPath_ConvertF(scratch.arena, "%.*s/feely_pona_sprite_packer.cpp", DQN_STRING_FMT(code_dir)) },
|
Dqn_CPPBuildCompileFile{{}, Dqn_FsPath_ConvertF(scratch.arena, "%.*s/feely_pona_sprite_packer.cpp", DQN_STR_FMT(code_dir)) },
|
||||||
});
|
});
|
||||||
|
|
||||||
build_context.compile_flags = common_compile_flags;
|
build_context.compile_flags = common_compile_flags;
|
||||||
@ -268,8 +268,8 @@ int main(int argc, char const **argv)
|
|||||||
build_context.build_dir = build_dir;
|
build_context.build_dir = build_dir;
|
||||||
|
|
||||||
if (dry_run) {
|
if (dry_run) {
|
||||||
Dqn_String8 cmd = Dqn_CPPBuild_ToCommandLine(build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
Dqn_Str8 cmd = Dqn_CPPBuild_ToCommandLine(build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
||||||
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STRING_FMT(cmd));
|
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STR_FMT(cmd));
|
||||||
} else {
|
} else {
|
||||||
Dqn_CPPBuild_ExecOrAbort(build_context, Dqn_CPPBuildMode_CacheBuild);
|
Dqn_CPPBuild_ExecOrAbort(build_context, Dqn_CPPBuildMode_CacheBuild);
|
||||||
}
|
}
|
||||||
@ -283,8 +283,8 @@ int main(int argc, char const **argv)
|
|||||||
DQN_DEFER { feely_pona_no_dll_timings[1] = Dqn_OS_PerfCounterNow(); };
|
DQN_DEFER { feely_pona_no_dll_timings[1] = Dqn_OS_PerfCounterNow(); };
|
||||||
|
|
||||||
Dqn_CPPBuildCompileFile build_file = {};
|
Dqn_CPPBuildCompileFile build_file = {};
|
||||||
build_file.input_file_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/feely_pona_unity_nodll.h", DQN_STRING_FMT(code_dir));
|
build_file.input_file_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/feely_pona_unity_nodll.h", DQN_STR_FMT(code_dir));
|
||||||
build_file.flags = Dqn_Slice_InitCArrayCopy(scratch.arena, {DQN_STRING8("/Tp")});
|
build_file.flags = Dqn_Slice_InitCArrayCopy(scratch.arena, {DQN_STR8("/Tp")});
|
||||||
feely_pona_no_dll_build_context.compiler = Dqn_CPPBuildCompiler_MSVC;
|
feely_pona_no_dll_build_context.compiler = Dqn_CPPBuildCompiler_MSVC;
|
||||||
feely_pona_no_dll_build_context.compile_files = Dqn_Slice_InitCArrayCopy(scratch.arena, {build_file});
|
feely_pona_no_dll_build_context.compile_files = Dqn_Slice_InitCArrayCopy(scratch.arena, {build_file});
|
||||||
feely_pona_no_dll_build_context.include_dirs = Dqn_Slice_InitCArrayCopy(scratch.arena, {raylib_dir});
|
feely_pona_no_dll_build_context.include_dirs = Dqn_Slice_InitCArrayCopy(scratch.arena, {raylib_dir});
|
||||||
@ -292,21 +292,21 @@ int main(int argc, char const **argv)
|
|||||||
feely_pona_no_dll_build_context.build_dir = build_dir;
|
feely_pona_no_dll_build_context.build_dir = build_dir;
|
||||||
|
|
||||||
// NOTE: Link to raylib object files and windows libs ======================================
|
// NOTE: Link to raylib object files and windows libs ======================================
|
||||||
Dqn_List<Dqn_String8> link_flags = Dqn_List_InitSliceCopy(scratch.arena, 128, common_link_flags);
|
Dqn_List<Dqn_Str8> link_flags = Dqn_List_InitSliceCopy(scratch.arena, 128, common_link_flags);
|
||||||
{
|
{
|
||||||
for (Dqn_ListIterator<Dqn_String8> it = {}; Dqn_List_Iterate(&raylib_pc_output_files, &it, 0); )
|
for (Dqn_ListIterator<Dqn_Str8> it = {}; Dqn_List_Iterate(&raylib_pc_output_files, &it, 0); )
|
||||||
Dqn_List_Add(&link_flags, *it.data);
|
Dqn_List_Add(&link_flags, *it.data);
|
||||||
Dqn_List_Add(&link_flags, DQN_STRING8("gdi32.lib"));
|
Dqn_List_Add(&link_flags, DQN_STR8("gdi32.lib"));
|
||||||
Dqn_List_Add(&link_flags, DQN_STRING8("opengl32.lib"));
|
Dqn_List_Add(&link_flags, DQN_STR8("opengl32.lib"));
|
||||||
Dqn_List_Add(&link_flags, DQN_STRING8("winmm.lib"));
|
Dqn_List_Add(&link_flags, DQN_STR8("winmm.lib"));
|
||||||
Dqn_List_Add(&link_flags, DQN_STRING8("user32.lib"));
|
Dqn_List_Add(&link_flags, DQN_STR8("user32.lib"));
|
||||||
Dqn_List_Add(&link_flags, DQN_STRING8("shell32.lib"));
|
Dqn_List_Add(&link_flags, DQN_STR8("shell32.lib"));
|
||||||
}
|
}
|
||||||
feely_pona_no_dll_build_context.link_flags = Dqn_List_ToSliceCopy(&link_flags, scratch.arena);
|
feely_pona_no_dll_build_context.link_flags = Dqn_List_ToSliceCopy(&link_flags, scratch.arena);
|
||||||
|
|
||||||
if (dry_run) {
|
if (dry_run) {
|
||||||
Dqn_String8 cmd = Dqn_CPPBuild_ToCommandLine(feely_pona_no_dll_build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
Dqn_Str8 cmd = Dqn_CPPBuild_ToCommandLine(feely_pona_no_dll_build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
||||||
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STRING_FMT(cmd));
|
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STR_FMT(cmd));
|
||||||
} else {
|
} else {
|
||||||
Dqn_CPPBuild_ExecOrAbort(feely_pona_no_dll_build_context, Dqn_CPPBuildMode_AlwaysRebuild);
|
Dqn_CPPBuild_ExecOrAbort(feely_pona_no_dll_build_context, Dqn_CPPBuildMode_AlwaysRebuild);
|
||||||
}
|
}
|
||||||
@ -319,13 +319,13 @@ int main(int argc, char const **argv)
|
|||||||
DQN_DEFER { feely_pona_dll_timings[1] = Dqn_OS_PerfCounterNow(); };
|
DQN_DEFER { feely_pona_dll_timings[1] = Dqn_OS_PerfCounterNow(); };
|
||||||
|
|
||||||
Dqn_CPPBuildCompileFile build_file = {};
|
Dqn_CPPBuildCompileFile build_file = {};
|
||||||
build_file.input_file_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/feely_pona_unity.h", DQN_STRING_FMT(code_dir));
|
build_file.input_file_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/feely_pona_unity.h", DQN_STR_FMT(code_dir));
|
||||||
build_file.output_file_path = Dqn_FsPath_ConvertF(scratch.arena, "tely_dll_msvc", DQN_STRING_FMT(code_dir));
|
build_file.output_file_path = Dqn_FsPath_ConvertF(scratch.arena, "tely_dll_msvc", DQN_STR_FMT(code_dir));
|
||||||
build_file.flags = Dqn_Slice_InitCArrayCopy(scratch.arena, {DQN_STRING8("/Tp")});
|
build_file.flags = Dqn_Slice_InitCArrayCopy(scratch.arena, {DQN_STR8("/Tp")});
|
||||||
|
|
||||||
Dqn_List<Dqn_String8> compile_flags = Dqn_List_InitSliceCopy(scratch.arena, 128, common_compile_flags);
|
Dqn_List<Dqn_Str8> compile_flags = Dqn_List_InitSliceCopy(scratch.arena, 128, common_compile_flags);
|
||||||
Dqn_List_Add(&compile_flags, DQN_STRING8("/LD"));
|
Dqn_List_Add(&compile_flags, DQN_STR8("/LD"));
|
||||||
Dqn_List_Add(&compile_flags, DQN_STRING8("/Fetely_dll_msvc"));
|
Dqn_List_Add(&compile_flags, DQN_STR8("/Fetely_dll_msvc"));
|
||||||
|
|
||||||
Dqn_CPPBuildContext build_context = {};
|
Dqn_CPPBuildContext build_context = {};
|
||||||
build_context.compiler = Dqn_CPPBuildCompiler_MSVC;
|
build_context.compiler = Dqn_CPPBuildCompiler_MSVC;
|
||||||
@ -335,8 +335,8 @@ int main(int argc, char const **argv)
|
|||||||
build_context.build_dir = build_dir;
|
build_context.build_dir = build_dir;
|
||||||
|
|
||||||
if (dry_run) {
|
if (dry_run) {
|
||||||
Dqn_String8 cmd = Dqn_CPPBuild_ToCommandLine(build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
Dqn_Str8 cmd = Dqn_CPPBuild_ToCommandLine(build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
||||||
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STRING_FMT(cmd));
|
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STR_FMT(cmd));
|
||||||
} else {
|
} else {
|
||||||
Dqn_CPPBuild_ExecOrAbort(build_context, Dqn_CPPBuildMode_AlwaysRebuild);
|
Dqn_CPPBuild_ExecOrAbort(build_context, Dqn_CPPBuildMode_AlwaysRebuild);
|
||||||
}
|
}
|
||||||
@ -349,12 +349,12 @@ int main(int argc, char const **argv)
|
|||||||
DQN_DEFER { feely_pona_platform_timings[1] = Dqn_OS_PerfCounterNow(); };
|
DQN_DEFER { feely_pona_platform_timings[1] = Dqn_OS_PerfCounterNow(); };
|
||||||
|
|
||||||
Dqn_CPPBuildCompileFile build_file = {};
|
Dqn_CPPBuildCompileFile build_file = {};
|
||||||
build_file.input_file_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/tely_platform_raylib_unity.h", DQN_STRING_FMT(tely_dir));
|
build_file.input_file_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/tely_platform_raylib_unity.h", DQN_STR_FMT(tely_dir));
|
||||||
build_file.output_file_path = Dqn_FsPath_ConvertF(scratch.arena, "feely_pona_msvc", DQN_STRING_FMT(code_dir));
|
build_file.output_file_path = Dqn_FsPath_ConvertF(scratch.arena, "feely_pona_msvc", DQN_STR_FMT(code_dir));
|
||||||
build_file.flags = Dqn_Slice_InitCArrayCopy(scratch.arena, {DQN_STRING8("/Tp")});
|
build_file.flags = Dqn_Slice_InitCArrayCopy(scratch.arena, {DQN_STR8("/Tp")});
|
||||||
|
|
||||||
Dqn_List<Dqn_String8> compile_flags = Dqn_List_InitSliceCopy(scratch.arena, 128, common_compile_flags);
|
Dqn_List<Dqn_Str8> compile_flags = Dqn_List_InitSliceCopy(scratch.arena, 128, common_compile_flags);
|
||||||
Dqn_List_Add(&compile_flags, DQN_STRING8("/Fefeely_pona_msvc"));
|
Dqn_List_Add(&compile_flags, DQN_STR8("/Fefeely_pona_msvc"));
|
||||||
|
|
||||||
Dqn_CPPBuildContext build_context = {};
|
Dqn_CPPBuildContext build_context = {};
|
||||||
build_context.compiler = Dqn_CPPBuildCompiler_MSVC;
|
build_context.compiler = Dqn_CPPBuildCompiler_MSVC;
|
||||||
@ -365,10 +365,10 @@ int main(int argc, char const **argv)
|
|||||||
build_context.include_dirs = Dqn_Slice_InitCArrayCopy(scratch.arena, {raylib_dir});
|
build_context.include_dirs = Dqn_Slice_InitCArrayCopy(scratch.arena, {raylib_dir});
|
||||||
|
|
||||||
if (dry_run) {
|
if (dry_run) {
|
||||||
Dqn_String8 cmd = Dqn_CPPBuild_ToCommandLine(build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
Dqn_Str8 cmd = Dqn_CPPBuild_ToCommandLine(build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
||||||
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STRING_FMT(cmd));
|
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STR_FMT(cmd));
|
||||||
} else {
|
} else {
|
||||||
Dqn_String8 exe_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/feely_pona_msvc.exe", DQN_STRING_FMT(build_dir));
|
Dqn_Str8 exe_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/feely_pona_msvc.exe", DQN_STR_FMT(build_dir));
|
||||||
bool exe_is_locked = false;
|
bool exe_is_locked = false;
|
||||||
if (Dqn_Fs_Exists(exe_path)) {
|
if (Dqn_Fs_Exists(exe_path)) {
|
||||||
Dqn_FsFile exe_file = Dqn_Fs_OpenFile(exe_path, Dqn_FsFileOpen_OpenIfExist, Dqn_FsFileAccess_Read | Dqn_FsFileAccess_Write);
|
Dqn_FsFile exe_file = Dqn_Fs_OpenFile(exe_path, Dqn_FsFileOpen_OpenIfExist, Dqn_FsFileAccess_Read | Dqn_FsFileAccess_Write);
|
||||||
@ -386,21 +386,21 @@ int main(int argc, char const **argv)
|
|||||||
uint64_t raylib_emscripten_timings[2] = {};
|
uint64_t raylib_emscripten_timings[2] = {};
|
||||||
uint64_t feely_pona_emscripten_timings[2] = {};
|
uint64_t feely_pona_emscripten_timings[2] = {};
|
||||||
if (target_web) {
|
if (target_web) {
|
||||||
Dqn_String8 const raylib_emscripten_lib_name = DQN_STRING8("raylib_emscripten.a");
|
Dqn_Str8 const raylib_emscripten_lib_name = DQN_STR8("raylib_emscripten.a");
|
||||||
bool debug_build = false;
|
bool debug_build = false;
|
||||||
|
|
||||||
Dqn_List<Dqn_String8> build_specific_compile_flags = {};
|
Dqn_List<Dqn_Str8> build_specific_compile_flags = {};
|
||||||
if (debug_build) {
|
if (debug_build) {
|
||||||
build_specific_compile_flags = Dqn_List_InitCArrayCopy<Dqn_String8>(scratch.arena, 32, {
|
build_specific_compile_flags = Dqn_List_InitCArrayCopy<Dqn_Str8>(scratch.arena, 32, {
|
||||||
DQN_STRING8("-s"), DQN_STRING8("ASSERTIONS=2"),
|
DQN_STR8("-s"), DQN_STR8("ASSERTIONS=2"),
|
||||||
DQN_STRING8("-s"), DQN_STRING8("SAFE_HEAP=0"),
|
DQN_STR8("-s"), DQN_STR8("SAFE_HEAP=0"),
|
||||||
DQN_STRING8("-s"), DQN_STRING8("STACK_OVERFLOW_CHECK=2"),
|
DQN_STR8("-s"), DQN_STR8("STACK_OVERFLOW_CHECK=2"),
|
||||||
DQN_STRING8("--profiling-funcs"), // Expose function names in stack trace
|
DQN_STR8("--profiling-funcs"), // Expose function names in stack trace
|
||||||
DQN_STRING8("-g"), // Debug symbols
|
DQN_STR8("-g"), // Debug symbols
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
build_specific_compile_flags = Dqn_List_InitCArrayCopy<Dqn_String8>(scratch.arena, 32, {
|
build_specific_compile_flags = Dqn_List_InitCArrayCopy<Dqn_Str8>(scratch.arena, 32, {
|
||||||
DQN_STRING8("-Os"), // Optimise for size
|
DQN_STR8("-Os"), // Optimise for size
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -410,27 +410,27 @@ int main(int argc, char const **argv)
|
|||||||
DQN_DEFER { raylib_emscripten_timings[1] = Dqn_OS_PerfCounterNow(); };
|
DQN_DEFER { raylib_emscripten_timings[1] = Dqn_OS_PerfCounterNow(); };
|
||||||
|
|
||||||
// NOTE: Setup build context ===========================================================
|
// NOTE: Setup build context ===========================================================
|
||||||
Dqn_List<Dqn_String8> raylib_emscripten_output_files = Dqn_List_Init<Dqn_String8>(scratch.arena, 16);
|
Dqn_List<Dqn_Str8> raylib_emscripten_output_files = Dqn_List_Init<Dqn_Str8>(scratch.arena, 16);
|
||||||
Dqn_CPPBuildContext raylib_emscripten_build_context = {};
|
Dqn_CPPBuildContext raylib_emscripten_build_context = {};
|
||||||
raylib_emscripten_build_context.compiler = Dqn_CPPBuildCompiler_GCC;
|
raylib_emscripten_build_context.compiler = Dqn_CPPBuildCompiler_GCC;
|
||||||
|
|
||||||
for (Dqn_String8 base_file : raylib_base_files) {
|
for (Dqn_Str8 base_file : raylib_base_files) {
|
||||||
Dqn_String8 file_stem = Dqn_String8_FileNameNoExtension(base_file);
|
Dqn_Str8 file_stem = Dqn_Str8_FileNameNoExtension(base_file);
|
||||||
|
|
||||||
// NOTE: Append "emscripten" suffix to the object files
|
// NOTE: Append "emscripten" suffix to the object files
|
||||||
Dqn_CPPBuildCompileFile build_file = {};
|
Dqn_CPPBuildCompileFile build_file = {};
|
||||||
build_file.input_file_path = base_file;
|
build_file.input_file_path = base_file;
|
||||||
build_file.output_file_path = Dqn_String8_InitF(scratch.allocator, "raylib_%.*s_emscripten.o", DQN_STRING_FMT(file_stem));
|
build_file.output_file_path = Dqn_Str8_InitF(scratch.allocator, "raylib_%.*s_emscripten.o", DQN_STR_FMT(file_stem));
|
||||||
|
|
||||||
Dqn_List<Dqn_String8> compile_flags = Dqn_List_InitCArrayCopy(scratch.arena, 32, {
|
Dqn_List<Dqn_Str8> compile_flags = Dqn_List_InitCArrayCopy(scratch.arena, 32, {
|
||||||
DQN_STRING8("cmd"),
|
DQN_STR8("cmd"),
|
||||||
DQN_STRING8("/C"),
|
DQN_STR8("/C"),
|
||||||
DQN_STRING8("emcc.bat"),
|
DQN_STR8("emcc.bat"),
|
||||||
DQN_STRING8("-c"), // Compile and assemble, but do not link
|
DQN_STR8("-c"), // Compile and assemble, but do not link
|
||||||
DQN_STRING8("-Wall"),
|
DQN_STR8("-Wall"),
|
||||||
DQN_STRING8("-Os"), // Optimize for size
|
DQN_STR8("-Os"), // Optimize for size
|
||||||
DQN_STRING8("-D PLATFORM_WEB"),
|
DQN_STR8("-D PLATFORM_WEB"),
|
||||||
DQN_STRING8("-D GRAPHICS_API_OPENGL_ES2"),
|
DQN_STR8("-D GRAPHICS_API_OPENGL_ES2"),
|
||||||
});
|
});
|
||||||
Dqn_List_AddList(&compile_flags, build_specific_compile_flags);
|
Dqn_List_AddList(&compile_flags, build_specific_compile_flags);
|
||||||
|
|
||||||
@ -440,8 +440,8 @@ int main(int argc, char const **argv)
|
|||||||
Dqn_List_Add(&raylib_emscripten_output_files, build_file.output_file_path);
|
Dqn_List_Add(&raylib_emscripten_output_files, build_file.output_file_path);
|
||||||
|
|
||||||
if (dry_run) {
|
if (dry_run) {
|
||||||
Dqn_String8 cmd = Dqn_CPPBuild_ToCommandLine(raylib_emscripten_build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
Dqn_Str8 cmd = Dqn_CPPBuild_ToCommandLine(raylib_emscripten_build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
||||||
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STRING_FMT(cmd));
|
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STR_FMT(cmd));
|
||||||
} else {
|
} else {
|
||||||
Dqn_CPPBuild_ExecOrAbort(raylib_emscripten_build_context, Dqn_CPPBuildMode_CacheBuild);
|
Dqn_CPPBuild_ExecOrAbort(raylib_emscripten_build_context, Dqn_CPPBuildMode_CacheBuild);
|
||||||
}
|
}
|
||||||
@ -449,16 +449,16 @@ int main(int argc, char const **argv)
|
|||||||
|
|
||||||
// NOTE: Build the wasm raylib library =================================================
|
// NOTE: Build the wasm raylib library =================================================
|
||||||
{
|
{
|
||||||
Dqn_String8Builder builder = {};
|
Dqn_Str8Builder builder = {};
|
||||||
builder.allocator = scratch.allocator;
|
builder.allocator = scratch.allocator;
|
||||||
Dqn_String8Builder_AppendF(&builder, "cmd /C emar.bat rcs %.*s", DQN_STRING_FMT(raylib_emscripten_lib_name));
|
Dqn_Str8Builder_AppendF(&builder, "cmd /C emar.bat rcs %.*s", DQN_STR_FMT(raylib_emscripten_lib_name));
|
||||||
|
|
||||||
for (Dqn_ListIterator<Dqn_String8> it = {}; Dqn_List_Iterate(&raylib_emscripten_output_files, &it, 0); )
|
for (Dqn_ListIterator<Dqn_Str8> it = {}; Dqn_List_Iterate(&raylib_emscripten_output_files, &it, 0); )
|
||||||
Dqn_String8Builder_AppendF(&builder, " %.*s", DQN_STRING_FMT(*it.data));
|
Dqn_Str8Builder_AppendF(&builder, " %.*s", DQN_STR_FMT(*it.data));
|
||||||
|
|
||||||
Dqn_String8 cmd = Dqn_String8Builder_Build(&builder, scratch.allocator);
|
Dqn_Str8 cmd = Dqn_Str8Builder_Build(&builder, scratch.allocator);
|
||||||
if (dry_run) {
|
if (dry_run) {
|
||||||
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STRING_FMT(cmd));
|
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STR_FMT(cmd));
|
||||||
} else {
|
} else {
|
||||||
Dqn_OS_ExecOrAbort(cmd, build_dir);
|
Dqn_OS_ExecOrAbort(cmd, build_dir);
|
||||||
}
|
}
|
||||||
@ -471,44 +471,44 @@ int main(int argc, char const **argv)
|
|||||||
DQN_DEFER { feely_pona_emscripten_timings[1] = Dqn_OS_PerfCounterNow(); };
|
DQN_DEFER { feely_pona_emscripten_timings[1] = Dqn_OS_PerfCounterNow(); };
|
||||||
|
|
||||||
// NOTE: feely pona emscripten shell =======================================================
|
// NOTE: feely pona emscripten shell =======================================================
|
||||||
Dqn_String8 html_shell_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/feely_pona_emscripten_shell.html", DQN_STRING_FMT(build_dir));
|
Dqn_Str8 html_shell_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/feely_pona_emscripten_shell.html", DQN_STR_FMT(build_dir));
|
||||||
{
|
{
|
||||||
Dqn_String8 html_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/feely_pona_emscripten_shell.html", DQN_STRING_FMT(code_dir));
|
Dqn_Str8 html_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/feely_pona_emscripten_shell.html", DQN_STR_FMT(code_dir));
|
||||||
Dqn_String8 html_buffer = Dqn_Fs_Read(html_path, scratch.allocator);
|
Dqn_Str8 html_buffer = Dqn_Fs_Read(html_path, scratch.allocator);
|
||||||
if (!DQN_CHECKF(html_buffer.size,
|
if (!DQN_CHECKF(html_buffer.size,
|
||||||
"Failed to read Emscripten HTML shell file. The file at\n\n '%.*s'\n\ndoes not exist or is not readable",
|
"Failed to read Emscripten HTML shell file. The file at\n\n '%.*s'\n\ndoes not exist or is not readable",
|
||||||
DQN_STRING_FMT(html_path)))
|
DQN_STR_FMT(html_path)))
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
Dqn_String8 version_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/feely_pona_version.txt", DQN_STRING_FMT(code_dir));
|
Dqn_Str8 version_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/feely_pona_version.txt", DQN_STR_FMT(code_dir));
|
||||||
Dqn_String8 version_buffer = Dqn_Fs_Read(version_path, scratch.allocator);
|
Dqn_Str8 version_buffer = Dqn_Fs_Read(version_path, scratch.allocator);
|
||||||
Dqn_String8SplitAllocResult version_parts = Dqn_String8_SplitAlloc(scratch.allocator, version_buffer, DQN_STRING8("\n"));
|
Dqn_Str8SplitAllocResult version_parts = Dqn_Str8_SplitAlloc(scratch.allocator, version_buffer, DQN_STR8("\n"));
|
||||||
|
|
||||||
if (!DQN_CHECKF(version_parts.size == 3,
|
if (!DQN_CHECKF(version_parts.size == 3,
|
||||||
"Version file '%.*s' must have 3 lines containing, date, commit hash and number of commits. The buffer we tried extracting information from was\n\n%.*s\n\n",
|
"Version file '%.*s' must have 3 lines containing, date, commit hash and number of commits. The buffer we tried extracting information from was\n\n%.*s\n\n",
|
||||||
DQN_STRING_FMT(version_path),
|
DQN_STR_FMT(version_path),
|
||||||
DQN_STRING_FMT(version_buffer))) {
|
DQN_STR_FMT(version_buffer))) {
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
Dqn_String8 date = Dqn_String8_TrimWhitespaceAround(version_parts.data[0]);
|
Dqn_Str8 date = Dqn_Str8_TrimWhitespaceAround(version_parts.data[0]);
|
||||||
Dqn_String8 commit_hash = Dqn_String8_TrimWhitespaceAround(version_parts.data[1]);
|
Dqn_Str8 commit_hash = Dqn_Str8_TrimWhitespaceAround(version_parts.data[1]);
|
||||||
Dqn_String8 commit_count = Dqn_String8_TrimWhitespaceAround(version_parts.data[2]);
|
Dqn_Str8 commit_count = Dqn_Str8_TrimWhitespaceAround(version_parts.data[2]);
|
||||||
Dqn_String8 version_text = Dqn_String8_InitF(scratch.allocator,
|
Dqn_Str8 version_text = Dqn_Str8_InitF(scratch.allocator,
|
||||||
"%.*s edition rev. %.*s-%.*s",
|
"%.*s edition rev. %.*s-%.*s",
|
||||||
DQN_STRING_FMT(date),
|
DQN_STR_FMT(date),
|
||||||
DQN_STRING_FMT(commit_count),
|
DQN_STR_FMT(commit_count),
|
||||||
DQN_STRING_FMT(commit_hash));
|
DQN_STR_FMT(commit_hash));
|
||||||
|
|
||||||
Dqn_String8 html_buffer_processed = Dqn_String8_Replace(html_buffer,
|
Dqn_Str8 html_buffer_processed = Dqn_Str8_Replace(html_buffer,
|
||||||
DQN_STRING8("@version@"),
|
DQN_STR8("@version@"),
|
||||||
version_text,
|
version_text,
|
||||||
0 /*start_index*/,
|
0 /*start_index*/,
|
||||||
scratch.allocator);
|
scratch.allocator);
|
||||||
if (!DQN_CHECKF(Dqn_Fs_Write(html_shell_path,
|
if (!DQN_CHECKF(Dqn_Fs_Write(html_shell_path,
|
||||||
html_buffer_processed),
|
html_buffer_processed),
|
||||||
"Failed to write Emscripten HTML shell with the project version inserted into it. We were unable to write to the target location\n\n '%.*s'\n",
|
"Failed to write Emscripten HTML shell with the project version inserted into it. We were unable to write to the target location\n\n '%.*s'\n",
|
||||||
DQN_STRING_FMT(html_shell_path)))
|
DQN_STR_FMT(html_shell_path)))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -516,23 +516,23 @@ int main(int argc, char const **argv)
|
|||||||
Dqn_CPPBuildContext build_context = {};
|
Dqn_CPPBuildContext build_context = {};
|
||||||
build_context.compile_file_obj_suffix = DQN_CPP_BUILD_OBJ_SUFFIX_O;
|
build_context.compile_file_obj_suffix = DQN_CPP_BUILD_OBJ_SUFFIX_O;
|
||||||
build_context.compile_files = Dqn_Slice_InitCArrayCopy(scratch.arena, {
|
build_context.compile_files = Dqn_Slice_InitCArrayCopy(scratch.arena, {
|
||||||
Dqn_CPPBuildCompileFile{{}, Dqn_FsPath_ConvertF(scratch.arena, "%.*s/feely_pona_unity_nodll.cpp", DQN_STRING_FMT(code_dir)) },
|
Dqn_CPPBuildCompileFile{{}, Dqn_FsPath_ConvertF(scratch.arena, "%.*s/feely_pona_unity_nodll.cpp", DQN_STR_FMT(code_dir)) },
|
||||||
});
|
});
|
||||||
|
|
||||||
Dqn_String8 output_name = DQN_STRING8("Terry_Cherry");
|
Dqn_Str8 output_name = DQN_STR8("Terry_Cherry");
|
||||||
Dqn_List<Dqn_String8> compile_flags = Dqn_List_InitCArrayCopy(scratch.arena, 32, {
|
Dqn_List<Dqn_Str8> compile_flags = Dqn_List_InitCArrayCopy(scratch.arena, 32, {
|
||||||
DQN_STRING8("cmd"), DQN_STRING8("/C"), DQN_STRING8("emcc.bat"),
|
DQN_STR8("cmd"), DQN_STR8("/C"), DQN_STR8("emcc.bat"),
|
||||||
DQN_STRING8("-o"), Dqn_String8_InitF(scratch.allocator, "%.*s.html", DQN_STRING_FMT(output_name)),
|
DQN_STR8("-o"), Dqn_Str8_InitF(scratch.allocator, "%.*s.html", DQN_STR_FMT(output_name)),
|
||||||
DQN_STRING8("-Wall"),
|
DQN_STR8("-Wall"),
|
||||||
DQN_STRING8("--shell-file"), html_shell_path,
|
DQN_STR8("--shell-file"), html_shell_path,
|
||||||
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/%.*s", DQN_STRING_FMT(build_dir), DQN_STRING_FMT(raylib_emscripten_lib_name)),
|
Dqn_FsPath_ConvertF(scratch.arena, "%.*s/%.*s", DQN_STR_FMT(build_dir), DQN_STR_FMT(raylib_emscripten_lib_name)),
|
||||||
DQN_STRING8("-s"), DQN_STRING8("USE_GLFW=3"),
|
DQN_STR8("-s"), DQN_STR8("USE_GLFW=3"),
|
||||||
DQN_STRING8("-s"), DQN_STRING8("TOTAL_MEMORY=512MB"),
|
DQN_STR8("-s"), DQN_STR8("TOTAL_MEMORY=512MB"),
|
||||||
DQN_STRING8("-s"), DQN_STRING8("TOTAL_STACK=32MB"),
|
DQN_STR8("-s"), DQN_STR8("TOTAL_STACK=32MB"),
|
||||||
DQN_STRING8("-s"), DQN_STRING8("ALLOW_MEMORY_GROWTH"),
|
DQN_STR8("-s"), DQN_STR8("ALLOW_MEMORY_GROWTH"),
|
||||||
DQN_STRING8("--preload-file"), DQN_STRING8("Data"),
|
DQN_STR8("--preload-file"), DQN_STR8("Data"),
|
||||||
DQN_STRING8("-msimd128"),
|
DQN_STR8("-msimd128"),
|
||||||
DQN_STRING8("-msse2"),
|
DQN_STR8("-msse2"),
|
||||||
});
|
});
|
||||||
Dqn_List_AddList(&compile_flags, build_specific_compile_flags);
|
Dqn_List_AddList(&compile_flags, build_specific_compile_flags);
|
||||||
|
|
||||||
@ -540,32 +540,32 @@ int main(int argc, char const **argv)
|
|||||||
build_context.build_dir = build_dir;
|
build_context.build_dir = build_dir;
|
||||||
|
|
||||||
if (dry_run) {
|
if (dry_run) {
|
||||||
Dqn_String8 cmd = Dqn_CPPBuild_ToCommandLine(build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
Dqn_Str8 cmd = Dqn_CPPBuild_ToCommandLine(build_context, Dqn_CPPBuildMode_AlwaysRebuild, scratch.allocator);
|
||||||
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STRING_FMT(cmd));
|
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STR_FMT(cmd));
|
||||||
} else {
|
} else {
|
||||||
Dqn_CPPBuild_ExecOrAbort(build_context, Dqn_CPPBuildMode_CacheBuild);
|
Dqn_CPPBuild_ExecOrAbort(build_context, Dqn_CPPBuildMode_CacheBuild);
|
||||||
}
|
}
|
||||||
|
|
||||||
// NOTE: Move the files to a directory
|
// NOTE: Move the files to a directory
|
||||||
Dqn_String8 folder_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/%.*s_Emscripten", DQN_STRING_FMT(build_dir), DQN_STRING_FMT(output_name));
|
Dqn_Str8 folder_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/%.*s_Emscripten", DQN_STR_FMT(build_dir), DQN_STR_FMT(output_name));
|
||||||
if (!Dqn_Fs_DirExists(folder_path)) {
|
if (!Dqn_Fs_DirExists(folder_path)) {
|
||||||
Dqn_String8 mkdir_cmd = Dqn_String8_InitF(scratch.allocator, "mkdir %.*s", DQN_STRING_FMT(folder_path));
|
Dqn_Str8 mkdir_cmd = Dqn_Str8_InitF(scratch.allocator, "mkdir %.*s", DQN_STR_FMT(folder_path));
|
||||||
Dqn_OS_ExecOrAbort(mkdir_cmd, {});
|
Dqn_OS_ExecOrAbort(mkdir_cmd, {});
|
||||||
}
|
}
|
||||||
|
|
||||||
Dqn_String8 const generated_file_extension[] = {
|
Dqn_Str8 const generated_file_extension[] = {
|
||||||
DQN_STRING8("data"),
|
DQN_STR8("data"),
|
||||||
DQN_STRING8("html"),
|
DQN_STR8("html"),
|
||||||
DQN_STRING8("js"),
|
DQN_STR8("js"),
|
||||||
DQN_STRING8("wasm"),
|
DQN_STR8("wasm"),
|
||||||
};
|
};
|
||||||
|
|
||||||
for (Dqn_String8 file_ext : generated_file_extension) {
|
for (Dqn_Str8 file_ext : generated_file_extension) {
|
||||||
Dqn_String8 src_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/%.*s.%.*s", DQN_STRING_FMT(build_dir), DQN_STRING_FMT(output_name), DQN_STRING_FMT(file_ext));
|
Dqn_Str8 src_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/%.*s.%.*s", DQN_STR_FMT(build_dir), DQN_STR_FMT(output_name), DQN_STR_FMT(file_ext));
|
||||||
Dqn_String8 dest_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/%.*s.%.*s", DQN_STRING_FMT(folder_path), DQN_STRING_FMT(output_name), DQN_STRING_FMT(file_ext));
|
Dqn_Str8 dest_path = Dqn_FsPath_ConvertF(scratch.arena, "%.*s/%.*s.%.*s", DQN_STR_FMT(folder_path), DQN_STR_FMT(output_name), DQN_STR_FMT(file_ext));
|
||||||
Dqn_String8 cmd = Dqn_String8_InitF(scratch.allocator, "cmd /C move /Y %.*s %.*s", DQN_STRING_FMT(src_path), DQN_STRING_FMT(dest_path));
|
Dqn_Str8 cmd = Dqn_Str8_InitF(scratch.allocator, "cmd /C move /Y %.*s %.*s", DQN_STR_FMT(src_path), DQN_STR_FMT(dest_path));
|
||||||
if (dry_run) {
|
if (dry_run) {
|
||||||
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STRING_FMT(cmd));
|
Dqn_Print_StdLnF(Dqn_PrintStd_Out, "%.*s\n", DQN_STR_FMT(cmd));
|
||||||
} else {
|
} else {
|
||||||
Dqn_OS_ExecOrAbort(cmd, build_dir);
|
Dqn_OS_ExecOrAbort(cmd, build_dir);
|
||||||
}
|
}
|
||||||
|
@ -144,7 +144,7 @@ struct FP_EntityRenderData
|
|||||||
{
|
{
|
||||||
FP_Meters height;
|
FP_Meters height;
|
||||||
TELY_AssetFlip flip;
|
TELY_AssetFlip flip;
|
||||||
Dqn_String8 anim_name;
|
Dqn_Str8 anim_name;
|
||||||
TELY_AssetSpriteSheet *sheet;
|
TELY_AssetSpriteSheet *sheet;
|
||||||
Dqn_Rect sheet_rect;
|
Dqn_Rect sheet_rect;
|
||||||
Dqn_V2 render_size;
|
Dqn_V2 render_size;
|
||||||
|
@ -14,7 +14,7 @@ static void FP_Entity_AddDebugEditorFlags(FP_Game *game, FP_GameEntityHandle han
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateWaypointF(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreateWaypointF(FP_Game *game, Dqn_V2 pos, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -29,7 +29,7 @@ static FP_GameEntityHandle FP_Entity_CreateWaypointF(FP_Game *game, Dqn_V2 pos,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateClinger(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreateClinger(FP_Game *game, Dqn_V2 pos, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -57,7 +57,7 @@ static FP_GameEntityHandle FP_Entity_CreateClinger(FP_Game *game, Dqn_V2 pos, DQ
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateSmoochie(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreateSmoochie(FP_Game *game, Dqn_V2 pos, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -85,7 +85,7 @@ static FP_GameEntityHandle FP_Entity_CreateSmoochie(FP_Game *game, Dqn_V2 pos, D
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateCatfish(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreateCatfish(FP_Game *game, Dqn_V2 pos, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -112,7 +112,7 @@ static FP_GameEntityHandle FP_Entity_CreateCatfish(FP_Game *game, Dqn_V2 pos, DQ
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateWallAtPos(FP_Game *game, Dqn_String8 name, Dqn_V2 pos, Dqn_V2 size)
|
static FP_GameEntityHandle FP_Entity_CreateWallAtPos(FP_Game *game, Dqn_Str8 name, Dqn_V2 pos, Dqn_V2 size)
|
||||||
{
|
{
|
||||||
FP_GameEntity *entity = FP_Game_MakeEntityPointerF(game, name.data);
|
FP_GameEntity *entity = FP_Game_MakeEntityPointerF(game, name.data);
|
||||||
FP_GameEntityHandle result = entity->handle;
|
FP_GameEntityHandle result = entity->handle;
|
||||||
@ -128,7 +128,7 @@ static FP_GameEntityHandle FP_Entity_CreateWallAtPos(FP_Game *game, Dqn_String8
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreatePermittedBuildZone(FP_Game *game, Dqn_V2 pos, Dqn_V2 size, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreatePermittedBuildZone(FP_Game *game, Dqn_V2 pos, Dqn_V2 size, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -167,7 +167,7 @@ static FP_GameEntityHandle FP_Entity_CreateMobSpawner(FP_Game *game, Dqn_V2 pos,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateTerryInternal(FP_Game *game, Dqn_V2 pos, bool is_perry, DQN_FMT_STRING_ANNOTATE char const *fmt, va_list args)
|
static FP_GameEntityHandle FP_Entity_CreateTerryInternal(FP_Game *game, Dqn_V2 pos, bool is_perry, DQN_FMT_ATTRIB char const *fmt, va_list args)
|
||||||
{
|
{
|
||||||
FP_GameEntity *entity = FP_Game_MakeEntityPointerFV(game, fmt, args);
|
FP_GameEntity *entity = FP_Game_MakeEntityPointerFV(game, fmt, args);
|
||||||
FP_GameEntityHandle result = entity->handle;
|
FP_GameEntityHandle result = entity->handle;
|
||||||
@ -197,7 +197,7 @@ static FP_GameEntityHandle FP_Entity_CreateTerryInternal(FP_Game *game, Dqn_V2 p
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateTerry(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreateTerry(FP_Game *game, Dqn_V2 pos, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -206,7 +206,7 @@ static FP_GameEntityHandle FP_Entity_CreateTerry(FP_Game *game, Dqn_V2 pos, DQN_
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreatePerry(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreatePerry(FP_Game *game, Dqn_V2 pos, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -215,7 +215,7 @@ static FP_GameEntityHandle FP_Entity_CreatePerry(FP_Game *game, Dqn_V2 pos, DQN_
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateMerchantTerry(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreateMerchantTerry(FP_Game *game, Dqn_V2 pos, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -244,7 +244,7 @@ static FP_GameEntityHandle FP_Entity_CreateMerchantTerry(FP_Game *game, Dqn_V2 p
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateMerchantGraveyard(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreateMerchantGraveyard(FP_Game *game, Dqn_V2 pos, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -273,7 +273,7 @@ static FP_GameEntityHandle FP_Entity_CreateMerchantGraveyard(FP_Game *game, Dqn_
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateMerchantGym(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreateMerchantGym(FP_Game *game, Dqn_V2 pos, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -302,7 +302,7 @@ static FP_GameEntityHandle FP_Entity_CreateMerchantGym(FP_Game *game, Dqn_V2 pos
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateMerchantPhoneCompany(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreateMerchantPhoneCompany(FP_Game *game, Dqn_V2 pos, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -331,7 +331,7 @@ static FP_GameEntityHandle FP_Entity_CreateMerchantPhoneCompany(FP_Game *game, D
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateClubTerry(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreateClubTerry(FP_Game *game, Dqn_V2 pos, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -360,7 +360,7 @@ static FP_GameEntityHandle FP_Entity_CreateClubTerry(FP_Game *game, Dqn_V2 pos,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateHeart(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreateHeart(FP_Game *game, Dqn_V2 pos, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -395,7 +395,7 @@ static FP_GameEntityHandle FP_Entity_CreateHeart(FP_Game *game, Dqn_V2 pos, DQN_
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateChurchTerry(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreateChurchTerry(FP_Game *game, Dqn_V2 pos, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -424,7 +424,7 @@ static FP_GameEntityHandle FP_Entity_CreateChurchTerry(FP_Game *game, Dqn_V2 pos
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateKennelTerry(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreateKennelTerry(FP_Game *game, Dqn_V2 pos, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -453,7 +453,7 @@ static FP_GameEntityHandle FP_Entity_CreateKennelTerry(FP_Game *game, Dqn_V2 pos
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateAirportTerry(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreateAirportTerry(FP_Game *game, Dqn_V2 pos, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -482,7 +482,7 @@ static FP_GameEntityHandle FP_Entity_CreateAirportTerry(FP_Game *game, Dqn_V2 po
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreatePhoneMessageProjectile(FP_Game *game, FP_GameEntityHandle owner, Dqn_V2 pos, Dqn_V2 velocity, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreatePhoneMessageProjectile(FP_Game *game, FP_GameEntityHandle owner, Dqn_V2 pos, Dqn_V2 velocity, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -513,7 +513,7 @@ static FP_GameEntityHandle FP_Entity_CreatePhoneMessageProjectile(FP_Game *game,
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreatePortalMonkey(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreatePortalMonkey(FP_Game *game, Dqn_V2 pos, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -537,7 +537,7 @@ static FP_GameEntityHandle FP_Entity_CreatePortalMonkey(FP_Game *game, Dqn_V2 po
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateAirportTerryPlane(FP_Game *game, Dqn_V2 pos, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreateAirportTerryPlane(FP_Game *game, Dqn_V2 pos, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -561,7 +561,7 @@ static FP_GameEntityHandle FP_Entity_CreateAirportTerryPlane(FP_Game *game, Dqn_
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Entity_CreateBillboard(FP_Game *game, Dqn_V2 pos, FP_EntityBillboardState state, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Entity_CreateBillboard(FP_Game *game, Dqn_V2 pos, FP_EntityBillboardState state, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
|
@ -214,7 +214,7 @@ static FP_GameEntity *FP_Game_ActiveParentEntityPointer(FP_Game const *game)
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntity *FP_Game_MakeEntityPointerFV(FP_Game *game, DQN_FMT_STRING_ANNOTATE char const *fmt, va_list args)
|
static FP_GameEntity *FP_Game_MakeEntityPointerFV(FP_Game *game, DQN_FMT_ATTRIB char const *fmt, va_list args)
|
||||||
{
|
{
|
||||||
FP_GameEntity *result = nullptr;
|
FP_GameEntity *result = nullptr;
|
||||||
if (!game)
|
if (!game)
|
||||||
@ -276,7 +276,7 @@ static FP_GameEntity *FP_Game_MakeEntityPointerFV(FP_Game *game, DQN_FMT_STRING_
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntity *FP_Game_MakeEntityPointerF(FP_Game *game, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntity *FP_Game_MakeEntityPointerF(FP_Game *game, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -285,7 +285,7 @@ static FP_GameEntity *FP_Game_MakeEntityPointerF(FP_Game *game, DQN_FMT_STRING_A
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
static FP_GameEntityHandle FP_Game_MakeEntityF(FP_Game *game, DQN_FMT_STRING_ANNOTATE char const *fmt, ...)
|
static FP_GameEntityHandle FP_Game_MakeEntityF(FP_Game *game, DQN_FMT_ATTRIB char const *fmt, ...)
|
||||||
{
|
{
|
||||||
va_list args;
|
va_list args;
|
||||||
va_start(args, fmt);
|
va_start(args, fmt);
|
||||||
@ -561,7 +561,7 @@ static Dqn_Slice<Dqn_V2I> FP_Game_AStarPathFind(FP_Game *game,
|
|||||||
|
|
||||||
// NOTE: Enumerate the entities that are collidable ============================================
|
// NOTE: Enumerate the entities that are collidable ============================================
|
||||||
bool dest_tile_is_non_traversable = false;
|
bool dest_tile_is_non_traversable = false;
|
||||||
auto zone_enum_collidables = Dqn_Profiler_BeginZoneWithIndex(DQN_STRING8("FP_Update: A* enumerate collidables"), FP_ProfileZone_FPUpdate_AStarEnumerateCollidables);
|
auto zone_enum_collidables = Dqn_Profiler_BeginZoneWithIndex(DQN_STR8("FP_Update: A* enumerate collidables"), FP_ProfileZone_FPUpdate_AStarEnumerateCollidables);
|
||||||
for (FP_GameEntityIterator it = {}; FP_Game_DFSPreOrderWalkEntityTree(game, &it, game->play.root_entity); ) {
|
for (FP_GameEntityIterator it = {}; FP_Game_DFSPreOrderWalkEntityTree(game, &it, game->play.root_entity); ) {
|
||||||
FP_GameEntity const *walk_entity = it.entity;
|
FP_GameEntity const *walk_entity = it.entity;
|
||||||
if (entity == walk_entity->handle)
|
if (entity == walk_entity->handle)
|
||||||
@ -605,7 +605,7 @@ static Dqn_Slice<Dqn_V2I> FP_Game_AStarPathFind(FP_Game *game,
|
|||||||
Dqn_usize last_successful_manhattan_dist = DQN_USIZE_MAX;
|
Dqn_usize last_successful_manhattan_dist = DQN_USIZE_MAX;
|
||||||
Dqn_V2I last_successful_tile = src_tile;
|
Dqn_V2I last_successful_tile = src_tile;
|
||||||
|
|
||||||
auto zone_astar_expand = Dqn_Profiler_BeginZoneWithIndex(DQN_STRING8("FP_Update: A* expand"), FP_ProfileZone_FPUpdate_AStarExpand);
|
auto zone_astar_expand = Dqn_Profiler_BeginZoneWithIndex(DQN_STR8("FP_Update: A* expand"), FP_ProfileZone_FPUpdate_AStarExpand);
|
||||||
while (frontier.size) {
|
while (frontier.size) {
|
||||||
Dqn_Profiler_ZoneScopeWithIndex("FP_Update: A* neighbours", FP_ProfileZone_FPUpdate_AStarExploreNeighbours);
|
Dqn_Profiler_ZoneScopeWithIndex("FP_Update: A* neighbours", FP_ProfileZone_FPUpdate_AStarExploreNeighbours);
|
||||||
Dqn_V2I curr_tile = Dqn_FArray_PopFront(&frontier, 1);
|
Dqn_V2I curr_tile = Dqn_FArray_PopFront(&frontier, 1);
|
||||||
|
@ -206,7 +206,7 @@ struct FP_GameEntity
|
|||||||
FP_GameEntity *parent;
|
FP_GameEntity *parent;
|
||||||
|
|
||||||
FP_EntityType type;
|
FP_EntityType type;
|
||||||
Dqn_String8 name;
|
Dqn_Str8 name;
|
||||||
FP_GameEntityHandle handle;
|
FP_GameEntityHandle handle;
|
||||||
|
|
||||||
// The target size to render the sprite in meters. The width of the sprite
|
// The target size to render the sprite in meters. The width of the sprite
|
||||||
@ -355,7 +355,7 @@ enum FP_GamePerryJoined
|
|||||||
|
|
||||||
struct FP_Particle
|
struct FP_Particle
|
||||||
{
|
{
|
||||||
Dqn_String8 anim_name;
|
Dqn_Str8 anim_name;
|
||||||
bool alive;
|
bool alive;
|
||||||
Dqn_V2 pos;
|
Dqn_V2 pos;
|
||||||
Dqn_V2 velocity;
|
Dqn_V2 velocity;
|
||||||
|
Loading…
Reference in New Issue
Block a user