mirror of https://github.com/sm64pc/sm64pc.git
Fixed main menu tearing and text loader
This commit is contained in:
parent
26565f76f9
commit
01563890d9
|
@ -29,12 +29,12 @@ const LevelScript level_intro_n64[] = {
|
|||
END_AREA(),
|
||||
|
||||
FREE_LEVEL_POOL(),
|
||||
//SLEEP(/*frames*/ 500),
|
||||
// SLEEP(/*frames*/ 500),
|
||||
LOAD_AREA(/*area*/ 1),
|
||||
CALL(/*arg*/ 0, /*func*/ lvl_intro_update),
|
||||
SLEEP(/*frames*/ 90),
|
||||
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 16, /*color*/ 0x00, 0x00, 0x00),
|
||||
SLEEP(/*frames*/ 16),
|
||||
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_FROM_COLOR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00),
|
||||
SLEEP(/*frames*/ 90),
|
||||
TRANSITION(/*transType*/ WARP_TRANSITION_FADE_INTO_COLOR, /*time*/ 20, /*color*/ 0x00, 0x00, 0x00),
|
||||
SLEEP(/*frames*/ 21),
|
||||
CMD2A(/*unk2*/ 1),
|
||||
CLEAR_LEVEL(),
|
||||
SLEEP(/*frames*/ 2),
|
||||
|
|
|
@ -452,6 +452,7 @@ static void optmenu_draw_opt(const struct Option *opt, s16 x, s16 y, u8 sel) {
|
|||
lbl = base;
|
||||
tmpText = get_key_string( opt->type == OPT_TOGGLE ? toggleStr[(int)*opt->bval] : opt->choices[*opt->uval]);
|
||||
|
||||
|
||||
width = (moon_get_text_width(lbl, scale, FALSE) + 8 + moon_get_text_width(tmpText, scale, FALSE)) / 2;
|
||||
optmenu_draw_scaled_text(x - width, y, lbl, -1, scale);
|
||||
optmenu_draw_scaled_text(x - width + 1 + moon_get_text_width(lbl, scale, FALSE), y, getTranslatedText(":"), -1, scale);
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
f32 moon_get_text_width(u8* text, float scale, u8 colored) {
|
||||
f32 size = 0;
|
||||
s32 strPos = 0;
|
||||
|
||||
while (text[strPos] != colored ? GLOBAR_CHAR_TERMINATOR : DIALOG_CHAR_TERMINATOR) {
|
||||
|
||||
while (text[strPos] != (colored ? GLOBAR_CHAR_TERMINATOR : DIALOG_CHAR_TERMINATOR)) {
|
||||
if(colored)
|
||||
size += (text[strPos] == GLOBAL_CHAR_SPACE ? 8.0 : 12.0) * scale;
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue