diff options
Diffstat (limited to 'arm9/source/textmode.c')
-rw-r--r-- | arm9/source/textmode.c | 26 |
1 files changed, 21 insertions, 5 deletions
diff --git a/arm9/source/textmode.c b/arm9/source/textmode.c index 5af7f98..866931e 100644 --- a/arm9/source/textmode.c +++ b/arm9/source/textmode.c @@ -79,10 +79,18 @@ static inline void Plot_RS(int x, int y, int c) static void Text_Put(const char *str, int x, int y) { - while(*str && x<mapw) + while(*str && x<mapw && y<maph) { - Plot_Text(x,y,*str - 32); - x++; + if (*str != '\n') + { + Plot_Text(x,y,*str - 32); + x++; + } + else + { + x=0; + y++; + } str++; } } @@ -91,8 +99,16 @@ static void RS_Put(const char *str, int x, int y) { while(*str && x<mapw) { - Plot_RS(x,y,*str - 32); - x++; + if (*str != '\n') + { + Plot_RS(x,y,*str - 32); + x++; + } + else + { + x=0; + y++; + } str++; } } |