diff --git a/autogen/convert_structs.py b/autogen/convert_structs.py index ab0d55a4..1e67b954 100644 --- a/autogen/convert_structs.py +++ b/autogen/convert_structs.py @@ -62,7 +62,7 @@ override_field_names = { override_field_types = { "Surface": { "normal": "Vec3f" }, - "Object": { "oAnimations": "ObjectAnimPointer*"}, + "Object": { "oAnimations": "ObjectAnimPointer*" }, } override_field_mutable = { diff --git a/lang/Czech.ini b/lang/Czech.ini index c0357aa3..b6e7f067 100644 --- a/lang/Czech.ini +++ b/lang/Czech.ini @@ -374,6 +374,3 @@ REFRESHING = "Obnovování..." ENTER_PASSWORD = "Zadejte heslo soukromé hry:" SEARCH = "Hledat" NONE_FOUND = "Nebyly nalezeny žádné hry." - -[LOADING_SCREEN] -LOADING = "Načítání" diff --git a/lang/Dutch.ini b/lang/Dutch.ini index 09ff2156..db8698c2 100644 --- a/lang/Dutch.ini +++ b/lang/Dutch.ini @@ -374,6 +374,3 @@ REFRESHING = "herladen..." ENTER_PASSWORD = "Typ het wachtwoord van de privé lobby:" SEARCH = "Zoek" NONE_FOUND = "Er zijn geen lobby's gevonden." - -[LOADING_SCREEN] -LOADING = "Bezig met laden" diff --git a/lang/English.ini b/lang/English.ini index 2ca54006..9391ac63 100644 --- a/lang/English.ini +++ b/lang/English.ini @@ -374,6 +374,3 @@ REFRESHING = "Refreshing..." ENTER_PASSWORD = "Enter the private lobby's password:" SEARCH = "Search" NONE_FOUND = "No lobbies were found." - -[LOADING_SCREEN] -LOADING = "Loading" diff --git a/lang/French.ini b/lang/French.ini index 4f4395df..ced43a85 100644 --- a/lang/French.ini +++ b/lang/French.ini @@ -374,6 +374,3 @@ REFRESHING = "Actualisation..." ENTER_PASSWORD = "Entrez le mot de passe de la partie:" SEARCH = "Rechercher" NONE_FOUND = "Aucune partie n'a été trouvée." - -[LOADING_SCREEN] -LOADING = "Chargement" diff --git a/lang/German.ini b/lang/German.ini index 485d63c5..ba4d92d5 100644 --- a/lang/German.ini +++ b/lang/German.ini @@ -374,6 +374,3 @@ REFRESHING = "Aktualisiere..." ENTER_PASSWORD = "Gib das Passwort für die Lobby ein:" SEARCH = "Suchen" NONE_FOUND = "Keine Lobbys gefunden." - -[LOADING_SCREEN] -LOADING = "Wird geladen" diff --git a/lang/Italian.ini b/lang/Italian.ini index c4d44d1b..1d93cedc 100644 --- a/lang/Italian.ini +++ b/lang/Italian.ini @@ -371,6 +371,3 @@ REFRESHING = "Refreshing..." ENTER_PASSWORD = "Enter the private lobby's password:" SEARCH = "Search" NONE_FOUND = "No lobbies were found." - -[LOADING_SCREEN] -LOADING = "Caricamento" diff --git a/lang/Portuguese.ini b/lang/Portuguese.ini index 8cce0e2b..d4977d1a 100644 --- a/lang/Portuguese.ini +++ b/lang/Portuguese.ini @@ -374,6 +374,3 @@ REFRESHING = "Recarregando..." ENTER_PASSWORD = "Coloque a senha para a partida privada:" SEARCH = "Pesquisar" NONE_FOUND = "Nenhuma partida foi encontrada." - -[LOADING_SCREEN] -LOADING = "Carregando" diff --git a/lang/Russian.ini b/lang/Russian.ini index ee16c6dd..8088ee07 100644 --- a/lang/Russian.ini +++ b/lang/Russian.ini @@ -373,6 +373,3 @@ REFRESHING = "Обновление..." ENTER_PASSWORD = "Введите пароль закрытой группы:" SEARCH = "Поиск" NONE_FOUND = "Группы не найдены." - -[LOADING_SCREEN] -LOADING = "Загрузка" diff --git a/src/game/behaviors/fish.inc.c b/src/game/behaviors/fish.inc.c index 47bb2737..aca63223 100644 --- a/src/game/behaviors/fish.inc.c +++ b/src/game/behaviors/fish.inc.c @@ -52,10 +52,11 @@ static void fish_spawner_act_spawn(void) { * Mario is more than 2000 units higher. */ void fish_spawner_act_idle(void) { - struct Object *player = nearest_player_to_object(o); - if ((gCurrLevelNum != LEVEL_SA) && (player->oPosY - o->oPosY > 2000.0f)) { - o->oAction = FISH_SPAWNER_ACT_RESPAWN; - } + // due to the lack of draw distance, you can see fish flickering to random positions from higher up, therefore it would be better to disable this. + // struct Object *player = nearest_player_to_object(o); + // if ((gCurrLevelNum != LEVEL_SA) && (player->oPosY - o->oPosY > 2000.0f)) { + // o->oAction = FISH_SPAWNER_ACT_RESPAWN; + // } } /** diff --git a/src/game/bettercamera.inc.h b/src/game/bettercamera.inc.h index 97c94a05..d0acf32d 100644 --- a/src/game/bettercamera.inc.h +++ b/src/game/bettercamera.inc.h @@ -358,17 +358,18 @@ static void newcam_rotate_button(void) { } newcam_framessincec[1] = 0; } - if ((gPlayer1Controller->buttonPressed & U_CBUTTONS) && !(gPlayer1Controller->buttonPressed & (L_CBUTTONS | R_CBUTTONS | D_CBUTTONS)) && newcam_modeflags & NC_FLAG_YTURN && !(newcam_modeflags & NC_FLAG_8D) && newcam_analogue == 0) { - if (newcam_framessincec[1] < 3 && gMarioState->action & ACT_FLAG_ALLOW_FIRST_PERSON) { - gCameraMovementFlags |= CAM_MOVE_C_UP_MODE; - #ifndef nosound - play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource); - #endif - newcam_init_settings(); - return; - } - newcam_framessincec[1] = 0; - } + // TODO: find a better way to do this + // if ((gPlayer1Controller->buttonPressed & U_CBUTTONS) && newcam_modeflags & NC_FLAG_YTURN && !(newcam_modeflags & NC_FLAG_8D) && newcam_analogue == 0) { + // if (newcam_framessincec[1] < 3 && gMarioState->action & ACT_FLAG_ALLOW_FIRST_PERSON) { + // gCameraMovementFlags |= CAM_MOVE_C_UP_MODE; + // #ifndef nosound + // play_sound(SOUND_MENU_CAMERA_ZOOM_IN, gGlobalSoundSource); + // #endif + // newcam_init_settings(); + // return; + // } + // newcam_framessincec[1] = 0; + // } //There's not much point in keeping this behind a check, but it wouldn't hurt, just incase any 2player shenanigans ever happen, it makes it easy to disable. diff --git a/src/pc/loading.c b/src/pc/loading.c index 9f6ee9fa..e7ef74ed 100644 --- a/src/pc/loading.c +++ b/src/pc/loading.c @@ -73,7 +73,7 @@ static bool loading_screen_on_render(struct DjuiBase* base) { { // Loading... text - char* loadingStr = DLANG(LOADING_SCREEN, LOADING); + char* loadingStr = "Loading"; char tmp[20] = ""; switch ((u8) floor(clock_elapsed()) % 3) { case 0: snprintf(tmp, 20, "%s...", loadingStr); break; @@ -153,7 +153,7 @@ void render_loading_screen(void) { djui_base_set_color(&text->base, 200, 200, 200, 255); djui_text_set_alignment(text, DJUI_HALIGN_CENTER, DJUI_VALIGN_TOP); djui_text_set_font(text, gDjuiFonts[0]); - djui_text_set_font_scale(text, gDjuiFonts[0]->defaultFontScale * 2); + djui_text_set_font_scale(text, gDjuiFonts[0]->defaultFontScale * 1.5f); load->loadingDesc = text; } diff --git a/src/pc/lua/utils/smlua_misc_utils.c b/src/pc/lua/utils/smlua_misc_utils.c index 2c9aca17..2b576ea8 100644 --- a/src/pc/lua/utils/smlua_misc_utils.c +++ b/src/pc/lua/utils/smlua_misc_utils.c @@ -81,22 +81,15 @@ void djui_reset_popup_disabled_override(void) { /// -void hud_hide(void) { - gOverrideHideHud = TRUE; -} - -void hud_show(void) { - gOverrideHideHud = FALSE; -} - -bool hud_is_hidden(void) { - return gOverrideHideHud; +void log_to_console(const char* message) { + djui_console_message_create(message); } /// -void log_to_console(const char* message) { - djui_console_message_create((char*)message); +extern s8 gDialogBoxState; +s8 get_dialog_box_state(void) { + return gDialogBoxState; } /// @@ -148,12 +141,17 @@ void set_save_file_modified(bool value) { /// -extern s8 gDialogBoxState; -s8 get_dialog_box_state(void) { - return gDialogBoxState; +void hud_hide(void) { + gOverrideHideHud = TRUE; } -/// +void hud_show(void) { + gOverrideHideHud = FALSE; +} + +bool hud_is_hidden(void) { + return gOverrideHideHud; +} s32 hud_get_value(enum HudDisplayValue type) { switch (type) { @@ -192,16 +190,16 @@ void hud_render_power_meter(s32 health, f32 x, f32 y, f32 width, f32 height) { extern const u8 texture_power_meter_two_segments[]; extern const u8 texture_power_meter_one_segments[]; static struct TextureInfo sPowerMeterTexturesInfo[] = { - { (u8*)texture_power_meter_left_side, 8, 32, 64 }, - { (u8*)texture_power_meter_right_side, 8, 32, 64 }, - { (u8*)texture_power_meter_one_segments, 8, 32, 32 }, - { (u8*)texture_power_meter_two_segments, 8, 32, 32 }, - { (u8*)texture_power_meter_three_segments, 8, 32, 32 }, - { (u8*)texture_power_meter_four_segments, 8, 32, 32 }, - { (u8*)texture_power_meter_five_segments, 8, 32, 32 }, - { (u8*)texture_power_meter_six_segments, 8, 32, 32 }, - { (u8*)texture_power_meter_seven_segments, 8, 32, 32 }, - { (u8*)texture_power_meter_full, 8, 32, 32 }, + { (u8*)texture_power_meter_left_side, 8, 32, 64, "texture_power_meter_left_side" }, + { (u8*)texture_power_meter_right_side, 8, 32, 64, "texture_power_meter_right_side" }, + { (u8*)texture_power_meter_one_segments, 8, 32, 32, "texture_power_meter_one_segments" }, + { (u8*)texture_power_meter_two_segments, 8, 32, 32, "texture_power_meter_two_segments" }, + { (u8*)texture_power_meter_three_segments, 8, 32, 32, "texture_power_meter_three_segments" }, + { (u8*)texture_power_meter_four_segments, 8, 32, 32, "texture_power_meter_four_segments" }, + { (u8*)texture_power_meter_five_segments, 8, 32, 32, "texture_power_meter_five_segments" }, + { (u8*)texture_power_meter_six_segments, 8, 32, 32, "texture_power_meter_six_segments" }, + { (u8*)texture_power_meter_seven_segments, 8, 32, 32, "texture_power_meter_seven_segments" }, + { (u8*)texture_power_meter_full, 8, 32, 32, "texture_power_meter_full" }, }; djui_hud_render_texture(&sPowerMeterTexturesInfo[0], x, y, width / 64, height / 64); djui_hud_render_texture(&sPowerMeterTexturesInfo[1], x + (width - 2) / 2, y, width / 64, height / 64); @@ -210,6 +208,7 @@ void hud_render_power_meter(s32 health, f32 x, f32 y, f32 width, f32 height) { djui_hud_render_texture(&sPowerMeterTexturesInfo[numWedges + 1], x + (width - 4) / 4, y + height / 4, width / 64, height / 64); } } + void hud_render_power_meter_interpolated(s32 health, f32 prevX, f32 prevY, f32 prevWidth, f32 prevHeight, f32 x, f32 y, f32 width, f32 height) { extern const u8 texture_power_meter_left_side[]; extern const u8 texture_power_meter_right_side[]; @@ -222,16 +221,16 @@ void hud_render_power_meter_interpolated(s32 health, f32 prevX, f32 prevY, f32 p extern const u8 texture_power_meter_two_segments[]; extern const u8 texture_power_meter_one_segments[]; static struct TextureInfo sPowerMeterTexturesInfo[] = { - { (u8*)texture_power_meter_left_side, 8, 32, 64 }, - { (u8*)texture_power_meter_right_side, 8, 32, 64 }, - { (u8*)texture_power_meter_one_segments, 8, 32, 32 }, - { (u8*)texture_power_meter_two_segments, 8, 32, 32 }, - { (u8*)texture_power_meter_three_segments, 8, 32, 32 }, - { (u8*)texture_power_meter_four_segments, 8, 32, 32 }, - { (u8*)texture_power_meter_five_segments, 8, 32, 32 }, - { (u8*)texture_power_meter_six_segments, 8, 32, 32 }, - { (u8*)texture_power_meter_seven_segments, 8, 32, 32 }, - { (u8*)texture_power_meter_full, 8, 32, 32 }, + { (u8*)texture_power_meter_left_side, 8, 32, 64, "texture_power_meter_left_side" }, + { (u8*)texture_power_meter_right_side, 8, 32, 64, "texture_power_meter_right_side" }, + { (u8*)texture_power_meter_one_segments, 8, 32, 32, "texture_power_meter_one_segments" }, + { (u8*)texture_power_meter_two_segments, 8, 32, 32, "texture_power_meter_two_segments" }, + { (u8*)texture_power_meter_three_segments, 8, 32, 32, "texture_power_meter_three_segments" }, + { (u8*)texture_power_meter_four_segments, 8, 32, 32, "texture_power_meter_four_segments" }, + { (u8*)texture_power_meter_five_segments, 8, 32, 32, "texture_power_meter_five_segments" }, + { (u8*)texture_power_meter_six_segments, 8, 32, 32, "texture_power_meter_six_segments" }, + { (u8*)texture_power_meter_seven_segments, 8, 32, 32, "texture_power_meter_seven_segments" }, + { (u8*)texture_power_meter_full, 8, 32, 32, "texture_power_meter_full" }, }; djui_hud_render_texture_interpolated(&sPowerMeterTexturesInfo[0], diff --git a/src/pc/lua/utils/smlua_misc_utils.h b/src/pc/lua/utils/smlua_misc_utils.h index 32023695..4f36bf6e 100644 --- a/src/pc/lua/utils/smlua_misc_utils.h +++ b/src/pc/lua/utils/smlua_misc_utils.h @@ -4,11 +4,6 @@ #include "dialog_ids.h" #include "game/camera.h" -u32 get_network_area_timer(void); - -s32* get_temp_s32_pointer(s32 initialValue); -s32 deref_s32_pointer(s32* pointer); - enum HudDisplayValue { HUD_DISPLAY_LIVES, HUD_DISPLAY_COINS, @@ -42,11 +37,32 @@ struct DateTime { s32 second; }; +u32 get_network_area_timer(void); + +s32* get_temp_s32_pointer(s32 initialValue); +s32 deref_s32_pointer(s32* pointer); + void djui_popup_create_global(const char* message, int lines); -void log_to_console(const char* message); bool djui_is_popup_disabled(void); void djui_set_popup_disabled_override(bool value); void djui_reset_popup_disabled_override(void); + +void log_to_console(const char* message); + +s8 get_dialog_box_state(void); +s16 get_dialog_id(void); + +s32 get_last_star_or_key(void); +void set_last_star_or_key(u8 value); +u8 get_last_completed_course_num(void); +void set_last_completed_course_num(u8 courseNum); +u8 get_last_completed_star_num(void); +void set_last_completed_star_num(u8 starNum); +bool get_got_file_coin_hi_score(void); +void set_got_file_coin_hi_score(bool value); +bool get_save_file_modified(void); +void set_save_file_modified(bool value); + void hud_hide(void); void hud_show(void); bool hud_is_hidden(void); @@ -89,19 +105,6 @@ void camera_config_set_deceleration(u32 value); bool is_game_paused(void); bool is_transition_playing(void); -s8 get_dialog_box_state(void); -s16 get_dialog_id(void); -s32 get_last_star_or_key(void); -void set_last_star_or_key(u8 value); -u8 get_last_completed_course_num(void); -void set_last_completed_course_num(u8 courseNum); -u8 get_last_completed_star_num(void); -void set_last_completed_star_num(u8 starNum); -bool get_got_file_coin_hi_score(void); -void set_got_file_coin_hi_score(bool value); -bool get_save_file_modified(void); -void set_save_file_modified(bool value); - u32 allocate_mario_action(u32 actFlags); f32 get_hand_foot_pos_x(struct MarioState* m, u8 index); diff --git a/src/pc/mods/mods.c b/src/pc/mods/mods.c index 8357ee74..3980fa2a 100644 --- a/src/pc/mods/mods.c +++ b/src/pc/mods/mods.c @@ -157,7 +157,7 @@ static u32 mods_count_directory(char* modsBasePath) { } static void mods_load(struct Mods* mods, char* modsBasePath, bool isUserModPath) { - if (gIsThreaded) { REFRESH_MUTEX(snprintf(gCurrLoadingSegment.str, 256, "Generating DynOS Packs In %s Path (%s)", isUserModPath ? "User" : "Local", modsBasePath)); } + if (gIsThreaded) { REFRESH_MUTEX(snprintf(gCurrLoadingSegment.str, 256, "Generating DynOS Packs In %s Path", isUserModPath ? "User" : "Local")); } // generate bins dynos_generate_packs(modsBasePath); @@ -186,7 +186,7 @@ static void mods_load(struct Mods* mods, char* modsBasePath, bool isUserModPath) return; } f32 count = (f32) mods_count_directory(modsBasePath); - if (gIsThreaded) { REFRESH_MUTEX(snprintf(gCurrLoadingSegment.str, 256, "Loading Mods In %s Mod Path (%s)", isUserModPath ? "User" : "Local", modsBasePath)); } + if (gIsThreaded) { REFRESH_MUTEX(snprintf(gCurrLoadingSegment.str, 256, "Loading Mods In %s Mod Path", isUserModPath ? "User" : "Local")); } // iterate char path[SYS_MAX_PATH] = { 0 };