aboutsummaryrefslogtreecommitdiff
path: root/source/nds/draw.c
diff options
context:
space:
mode:
authorNebuleon Fumika2013-03-29 05:45:39 -0400
committerNebuleon Fumika2013-03-29 05:45:39 -0400
commitefe43d2f628b636679297e3b3693f778bdbdcccf (patch)
tree9c8564d7dc9a12743f5c681fc2db4d0f59811bce /source/nds/draw.c
parent9a08a7ea4a2b4e36b753367717ddf96f9aaa15ed (diff)
downloadsnes9x2005-efe43d2f628b636679297e3b3693f778bdbdcccf.tar.gz
snes9x2005-efe43d2f628b636679297e3b3693f778bdbdcccf.tar.bz2
snes9x2005-efe43d2f628b636679297e3b3693f778bdbdcccf.zip
Stop the odd disappearing text when moving between files in recently played games.
Diffstat (limited to 'source/nds/draw.c')
-rw-r--r--source/nds/draw.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/source/nds/draw.c b/source/nds/draw.c
index e33d0c6..56d5051 100644
--- a/source/nds/draw.c
+++ b/source/nds/draw.c
@@ -418,7 +418,7 @@ static u32 scroll_string_num= 0;
* Output: the scroller's handle, to be used to scroll the text in
* draw_hscroll.
*/
-u32 draw_hscroll_init(void* screen_addr, u32 sx, u32 sy, u32 width,
+u32 hscroll_init(void* screen_addr, u32 sx, u32 sy, u32 width,
u32 color_bg, u32 color_fg, char *string)
{
u32 index, x, textWidth, num, len, i;
@@ -497,12 +497,19 @@ u32 draw_hscroll_init(void* screen_addr, u32 sx, u32 sy, u32 width,
x += BDF_render16_ucs(screenp + x, textWidth, 0, color_bg, color_fg, unicode[i++]);
}
- // 5. Draw text to the screen at its initial position (left justified).
- draw_hscroll(index, 0 /* stay on the left */);
-
return index; // (1. Which scroller?)
}
+u32 draw_hscroll_init(void* screen_addr, u32 sx, u32 sy, u32 width,
+ u32 color_bg, u32 color_fg, char *string)
+{
+ u32 ret = hscroll_init(screen_addr, sx, sy, width, color_bg, color_fg, string);
+
+ draw_hscroll(index, 0 /* stay on the left */);
+
+ return ret;
+}
+
/*
* Scrolls an initialised scroller's text.
* A scroller is never allowed to go past the beginning of the text when