diff --git a/src/app/app.c b/src/app/app.c index 727bc1fa..9d90e640 100644 --- a/src/app/app.c +++ b/src/app/app.c @@ -225,7 +225,7 @@ void Startup(void) P_LogInfoF("Settings file found"); P_File settings_file = P_OpenFileRead(settings_path); String file_data = P_ReadFile(temp.arena, settings_file); - P_CloseFIle(settings_file); + P_CloseFile(settings_file); P_LogInfoF("Deserializing settings file data: %F", FmtString(file_data)); String error = ZI; P_WindowSettings *deser = SETTINGS_WindowSettingsFromString(temp.arena, file_data, &error); @@ -292,7 +292,7 @@ void Startup(void) P_LogInfoF("Writing settings file to path \"%F\"", FmtString(window_settings_path)); P_File settings_file = P_OpenFileWrite(window_settings_path); P_WriteFile(settings_file, str); - P_CloseFIle(settings_file); + P_CloseFile(settings_file); P_LogInfoF("Finished writing settings file"); EndTempArena(temp); diff --git a/src/platform/platform.h b/src/platform/platform.h index accc3a32..8edd8beb 100644 --- a/src/platform/platform.h +++ b/src/platform/platform.h @@ -299,7 +299,7 @@ P_File P_OpenFileRead(String path); P_File P_OpenFileReadWait(String path); /* Waits until file is not being used by another program */ P_File P_OpenFileWrite(String path); P_File P_OpenFileAppend(String path); -void P_CloseFIle(P_File file); +void P_CloseFile(P_File file); //- File data manipulation String P_ReadFile(Arena *arena, P_File file); diff --git a/src/platform/platform_log.c b/src/platform/platform_log.c index 9ed7b525..cd86a0d4 100644 --- a/src/platform/platform_log.c +++ b/src/platform/platform_log.c @@ -13,7 +13,7 @@ void P_StartupLog(void) if (logfile_path.len > 0) { /* Create / wipe log file */ - P_CloseFIle(P_OpenFileWrite(logfile_path)); + P_CloseFile(P_OpenFileWrite(logfile_path)); /* Keep log file open for appending */ if (P_IsFile(logfile_path)) { diff --git a/src/platform/platform_win32/platform_win32.c b/src/platform/platform_win32/platform_win32.c index 3110c00e..8feae9a5 100644 --- a/src/platform/platform_win32/platform_win32.c +++ b/src/platform/platform_win32/platform_win32.c @@ -232,7 +232,7 @@ P_DateTime P_LocalTime(void) //////////////////////////////////////////////////////////// //~ @hookdef File system hooks -//- FIle system helpers +//- File system helpers String P_GetWritePath(Arena *arena) { u16 *p = 0; @@ -415,7 +415,7 @@ P_File P_OpenFileAppend(String path) return file; } -void P_CloseFIle(P_File file) +void P_CloseFile(P_File file) { __prof; if (file.handle) diff --git a/src/pp/pp.c b/src/pp/pp.c index 97a1812f..81871da8 100644 --- a/src/pp/pp.c +++ b/src/pp/pp.c @@ -104,6 +104,9 @@ void PP_PushGameUiStyle(void) { // UI_Push(FontSize, 48); // UI_Push(FontSize, 24); + + // UI_Push(Font, ResourceKeyFromStore(&PP_Resources, Lit("font/roboto-med.ttf"))); + // UI_Push(Font, ResourceKeyFromStore(&PP_Resources, Lit("font/fixedsys.ttf"))); UI_Push(FontSize, 12); UI_Push(Rounding, 0); @@ -2132,34 +2135,34 @@ void PP_UpdateUser(void) UI_Push(BorderColor, 0); UI_Push(TextPadding, 2); - UI_BuildLabelF("blended world entities: %F/%F", FmtUint(g->ss_blended->num_ents_allocated), FmtUint(g->ss_blended->num_ents_reserved)); - UI_BuildLabelF("blended world tick: %F", FmtUint(g->ss_blended->tick)); + UI_BuildLabelF("Blended world entities: %F/%F", FmtUint(g->ss_blended->num_ents_allocated), FmtUint(g->ss_blended->num_ents_reserved)); + UI_BuildLabelF("Blended world tick: %F", FmtUint(g->ss_blended->tick)); - UI_BuildLabelF("blended world time: %F", FmtFloat(SecondsFromNs(g->ss_blended->sim_time_ns))); + UI_BuildLabelF("Blended world time: %F", FmtFloat(SecondsFromNs(g->ss_blended->sim_time_ns))); UI_BuildSpacer(UI_EM(1.5, 0)); - UI_BuildLabelF("average local sim publish dt: %F", FmtFloat(SecondsFromNs(g->average_local_to_user_snapshot_publish_dt_ns))); - UI_BuildLabelF("local sim last known tick: %F", FmtUint(g->local_sim_last_known_tick)); - UI_BuildLabelF("local sim last known time: %F", FmtFloat(SecondsFromNs(g->local_sim_last_known_time_ns))); - UI_BuildLabelF("local sim predicted time: %F", FmtFloat(SecondsFromNs(g->local_sim_predicted_time_ns))); - UI_BuildLabelF("render time target: %F", FmtFloat(SecondsFromNs(g->render_time_target_ns))); + UI_BuildLabelF("Average local sim publish dt: %F", FmtFloat(SecondsFromNs(g->average_local_to_user_snapshot_publish_dt_ns))); + UI_BuildLabelF("Local sim last known tick: %F", FmtUint(g->local_sim_last_known_tick)); + UI_BuildLabelF("Local sim last known time: %F", FmtFloat(SecondsFromNs(g->local_sim_last_known_time_ns))); + UI_BuildLabelF("Local sim predicted time: %F", FmtFloat(SecondsFromNs(g->local_sim_predicted_time_ns))); + UI_BuildLabelF("Render time target: %F", FmtFloat(SecondsFromNs(g->render_time_target_ns))); - UI_BuildLabelF("render time: %F", FmtFloat(SecondsFromNs(g->render_time_ns))); + UI_BuildLabelF("Render time: %F", FmtFloat(SecondsFromNs(g->render_time_ns))); - UI_BuildLabelF("local player: [%F]", FmtUid(local_player->key.uid)); + UI_BuildLabelF("Local player: [%F]", FmtUid(local_player->key.uid)); UI_BuildSpacer(UI_EM(1.5, 0)); Vec2 world_cursor = g->world_cursor; - UI_BuildLabelF("cursor world: %F, %F", FmtFloat(world_cursor.x), FmtFloat(world_cursor.y)); + UI_BuildLabelF("Cursor world: %F, %F", FmtFloat(world_cursor.x), FmtFloat(world_cursor.y)); Vec2I32 world_tile_cursor = PP_WorldTileIndexFromPos(world_cursor); - UI_BuildLabelF("cursor world tile: %F, %F", FmtSint(world_tile_cursor.x), FmtSint(world_tile_cursor.y)); + UI_BuildLabelF("Cursor world tile: %F, %F", FmtSint(world_tile_cursor.x), FmtSint(world_tile_cursor.y)); Vec2I32 local_tile_cursor = PP_LocalTileIndexFromWorldTileIndex(world_tile_cursor); - UI_BuildLabelF("cursor local tile: %F, %F", FmtSint(local_tile_cursor.x), FmtSint(local_tile_cursor.y)); + UI_BuildLabelF("Cursor local tile: %F, %F", FmtSint(local_tile_cursor.x), FmtSint(local_tile_cursor.y)); Vec2I32 tile_chunk_cursor = PP_TileChunkIndexFromWorldTileIndex(world_tile_cursor); - UI_BuildLabelF("cursor tile chunk: %F, %F", FmtSint(tile_chunk_cursor.x), FmtSint(tile_chunk_cursor.y)); + UI_BuildLabelF("Cursor tile chunk: %F, %F", FmtSint(tile_chunk_cursor.x), FmtSint(tile_chunk_cursor.y)); UI_BuildSpacer(UI_EM(1.5, 0)); UI_BuildLabelF("Network read: %F mbit/s", FmtFloat((f64)g->net_bytes_read.last_second * 8 / 1000 / 1000)); diff --git a/src/ui/ui_res/font/default.ttf b/src/pp/pp_res/font/fixedsys.ttf similarity index 100% rename from src/ui/ui_res/font/default.ttf rename to src/pp/pp_res/font/fixedsys.ttf diff --git a/src/pp/pp_res/font/roboto-med.ttf b/src/pp/pp_res/font/roboto-med.ttf new file mode 100644 index 00000000..02435fc5 --- /dev/null +++ b/src/pp/pp_res/font/roboto-med.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8559132c89ad51d8a2ba5b171887a44a7ba93776e205f553573de228e64b45f8 +size 162588 diff --git a/src/ui/ui_core.c b/src/ui/ui_core.c index 8b5bfb8f..6b266c9f 100644 --- a/src/ui/ui_core.c +++ b/src/ui/ui_core.c @@ -7,7 +7,7 @@ void UI_Startup(void) { /* Prefetch default font */ ResourceKey default_font = UI_GetDefaultFontResource(); - F_LoadFontAsync(default_font, 12); + F_LoadFontAsync(default_font, 16); } //////////////////////////////////////////////////////////// @@ -15,7 +15,7 @@ void UI_Startup(void) ResourceKey UI_GetDefaultFontResource(void) { - return ResourceKeyFromStore(&UI_Resources, Lit("font/default.ttf")); + return ResourceKeyFromStore(&UI_Resources, Lit("font/proggy.ttf")); } //////////////////////////////////////////////////////////// @@ -304,7 +304,7 @@ void UI_BeginBuild(void) g->style_tops[UI_StyleKind_Width]->style.Width = UI_FILL(1, 0); g->style_tops[UI_StyleKind_Height]->style.Height = UI_FILL(1, 0); g->style_tops[UI_StyleKind_Font]->style.Font = UI_GetDefaultFontResource(); - g->style_tops[UI_StyleKind_FontSize]->style.FontSize = 12.0f; + g->style_tops[UI_StyleKind_FontSize]->style.FontSize = 16.0f; g->style_tops[UI_StyleKind_Tint]->style.Tint = 0xFFFFFFFF; } diff --git a/src/ui/ui_res/font/proggy.ttf b/src/ui/ui_res/font/proggy.ttf new file mode 100644 index 00000000..bf372a12 --- /dev/null +++ b/src/ui/ui_res/font/proggy.ttf @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:527d2a443ce051f93f7e77b855609722b8cb220a9f104b4aa037be5c90b71324 +size 41208