summaryrefslogtreecommitdiff
path: root/arm9/source/textmode.c
diff options
context:
space:
mode:
authorIan C <ianc@noddybox.co.uk>2007-04-15 23:55:24 +0000
committerIan C <ianc@noddybox.co.uk>2007-04-15 23:55:24 +0000
commitf39151d7f9bf82e7295c60b89d9da02c781528eb (patch)
treeaca075f0227e1ee8f86cfa1d75dd3b1a56fdd348 /arm9/source/textmode.c
parent6701f6a9d4f979cc1eadb673e767b5c46cd2a9c8 (diff)
Development checkin -- not yet working
Diffstat (limited to 'arm9/source/textmode.c')
-rw-r--r--arm9/source/textmode.c26
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++;
}
}