diff --git a/src/game/first_person_cam.c b/src/game/first_person_cam.c index 3b46cc6b..81e5b52a 100644 --- a/src/game/first_person_cam.c +++ b/src/game/first_person_cam.c @@ -160,7 +160,7 @@ void first_person_update(void) { Vec3f camDir = { m->area->camera->focus[0] - m->area->camera->pos[0], m->area->camera->focus[1] - m->area->camera->pos[1], - m->area->camera->focus[2] - m->area->camera->pos[2], + m->area->camera->focus[2] - m->area->camera->pos[2] }; vec3f_normalize(camDir); vec3f_mul(camDir, 100); diff --git a/src/pc/configfile.c b/src/pc/configfile.c index 223303d4..7db959ad 100644 --- a/src/pc/configfile.c +++ b/src/pc/configfile.c @@ -627,9 +627,7 @@ void configfile_load(void) { void configfile_save(const char *filename) { FILE *file; -#ifdef DEVELOPMENT printf("Saving configuration to '%s'\n", filename); -#endif file = fopen(fs_get_write_path(filename), "w"); if (file == NULL) { diff --git a/src/pc/djui/djui_gfx.c b/src/pc/djui/djui_gfx.c index ed4f60e9..28853a1d 100644 --- a/src/pc/djui/djui_gfx.c +++ b/src/pc/djui/djui_gfx.c @@ -48,11 +48,10 @@ f32 djui_gfx_get_scale(void) { u32 windowWidth, windowHeight; wm_api->get_dimensions(&windowWidth, &windowHeight); switch (configDjuiScale) { - case 0: return 0.85f; - case 1: return 1.0f; - case 2: return 1.25f; - case 3: return 1.5f; - default: return 1.0f; + case 0: return 0.85f; + case 1: return 1.0f; + case 2: return 1.5f; + default: return 1.0f; } } ///////////////////////////////////////////// diff --git a/src/pc/djui/djui_panel_host.c b/src/pc/djui/djui_panel_host.c index a53562a7..fe2baf70 100644 --- a/src/pc/djui/djui_panel_host.c +++ b/src/pc/djui/djui_panel_host.c @@ -80,7 +80,7 @@ static void djui_panel_host_do_host(struct DjuiBase* caller) { if (gNetworkType == NT_SERVER) { network_rehost_begin(); - } else if (configNetworkSystem == NS_COOPNET) { + } else if (configNetworkSystem == NS_COOPNET || configAmountofPlayers == 1) { extern void djui_panel_do_host(bool reconnecting); network_reset_reconnect_and_rehost(); djui_panel_do_host(false); diff --git a/src/pc/djui/djui_panel_menu_options.c b/src/pc/djui/djui_panel_menu_options.c index 9d692dc4..f34b7c8f 100644 --- a/src/pc/djui/djui_panel_menu_options.c +++ b/src/pc/djui/djui_panel_menu_options.c @@ -2,13 +2,17 @@ #include "djui_theme.h" #include "djui_panel.h" #include "djui_panel_menu.h" -#include "djui_panel_pause.h" +#include "djui_panel_main.h" +#include "djui_panel_options.h" +#include "djui_panel_misc.h" #include "src/pc/utils/misc.h" #include "src/pc/configfile.h" #include "src/game/level_update.h" static struct DjuiSelectionbox* sLevelBox = NULL; +void djui_panel_main_menu_create(struct DjuiBase* caller); + static void djui_panel_level_menu(UNUSED struct DjuiBase* caller) { djui_base_set_enabled(&sLevelBox->base, !(configMenuRandom || configMenuStaffRoll)); if (configMenuStaffRoll) { @@ -18,22 +22,16 @@ static void djui_panel_level_menu(UNUSED struct DjuiBase* caller) { } static void djui_panel_misc_djui_setting_change(UNUSED struct DjuiBase* caller) { - // god this is so hacky and terrible - djoslin0, 2023 if (gDjuiInMainMenu) { djui_panel_shutdown(); gDjuiInMainMenu = true; djui_panel_main_create(NULL); djui_panel_options_create(NULL); djui_panel_misc_create(NULL); - } else if (gDjuiPanelPauseCreated) { - djui_panel_shutdown(); - djui_panel_pause_create(NULL); - djui_panel_options_create(NULL); - djui_panel_misc_create(NULL); + djui_panel_main_menu_create(NULL); } else { djui_panel_shutdown(); } - } void djui_panel_main_menu_create(struct DjuiBase* caller) { @@ -62,7 +60,15 @@ void djui_panel_main_menu_create(struct DjuiBase* caller) { "WDW" }; - char* djuiScaleChoices[4] = {"x0.85", "x1.0", "x1.25", "x1.5"}; + + char* themeChoices[DJUI_THEME_MAX]; + for (int i = 0; i < DJUI_THEME_MAX; i++) { + themeChoices[i] = (char*)gDjuiThemes[i]->name; + } + djui_selectionbox_create(body, DLANG(DJUI_THEMES, DJUI_THEME), themeChoices, DJUI_THEME_MAX, &configDjuiTheme, djui_panel_misc_djui_setting_change); + char* djuiScaleChoices[3] = {"x0.85", "x1.0", "x1.5"}; + djui_selectionbox_create(body, DLANG(DJUI_THEMES, DJUI_SCALE), djuiScaleChoices, 3, &configDjuiScale, djui_panel_misc_djui_setting_change); + djui_checkbox_create(body, DLANG(DJUI_THEMES, CENTER), &configDjuiThemeCenter, djui_panel_misc_djui_setting_change); struct DjuiSelectionbox* selectionbox1 = djui_selectionbox_create(body, DLANG(MENU_OPTIONS, LEVEL), levelChoices, 18, &configMenuLevel, NULL); djui_base_set_enabled(&selectionbox1->base, !(configMenuRandom || configMenuStaffRoll)); @@ -73,16 +79,6 @@ void djui_panel_main_menu_create(struct DjuiBase* caller) { djui_checkbox_create(body, DLANG(MENU_OPTIONS, RANDOM_STAGE), &configMenuRandom, djui_panel_level_menu); djui_checkbox_create(body, DLANG(MENU_OPTIONS, PLAY_VANILLA_DEMOS), &configMenuDemos, stop_demo); - char* themeChoices[DJUI_THEME_MAX]; - for (int i = 0; i < DJUI_THEME_MAX; i++) { - themeChoices[i] = (char*)gDjuiThemes[i]->name; - } - djui_selectionbox_create(body, DLANG(DJUI_THEMES, DJUI_THEME), themeChoices, DJUI_THEME_MAX, &configDjuiTheme, djui_panel_misc_djui_setting_change); - - djui_checkbox_create(body, DLANG(DJUI_THEMES, CENTER), &configDjuiThemeCenter, djui_panel_misc_djui_setting_change); - - djui_selectionbox_create(body, DLANG(DJUI_THEMES, DJUI_SCALE), djuiScaleChoices, 4, &configDjuiScale, djui_panel_misc_djui_setting_change); - djui_button_create(body, DLANG(MENU, BACK), DJUI_BUTTON_STYLE_BACK, djui_panel_menu_back); } diff --git a/src/pc/djui/djui_panel_misc.c b/src/pc/djui/djui_panel_misc.c index 7cf07ec9..e6c26f36 100644 --- a/src/pc/djui/djui_panel_misc.c +++ b/src/pc/djui/djui_panel_misc.c @@ -4,7 +4,6 @@ #include "djui_panel_menu_options.h" #include "djui_panel_main.h" #include "djui_panel_options.h" -//#include "djui_panel_pause.h" #include "djui_panel_language.h" #include "djui_panel_info.h" #include "pc/utils/misc.h" diff --git a/src/pc/djui/djui_theme.c b/src/pc/djui/djui_theme.c index 64fec02c..fabdd22f 100644 --- a/src/pc/djui/djui_theme.c +++ b/src/pc/djui/djui_theme.c @@ -172,9 +172,9 @@ struct DjuiTheme* gDjuiThemes[] = { }; struct DjuiColor djui_theme_shade_color(struct DjuiColor color) { - color.r *= 0.75f; - color.g *= 0.75f; - color.b *= 0.75f; + color.r *= 0.6f; + color.g *= 0.6f; + color.b *= 0.6f; return color; }