projects
/
projects
/
chimara
/
chimara.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Update Gargoyle interpreters to r548
[projects/chimara/chimara.git]
/
interpreters
/
frotz
/
glkscreen.c
diff --git
a/interpreters/frotz/glkscreen.c
b/interpreters/frotz/glkscreen.c
index f7c8e08b30e5b7386a542001a532187c4132c775..079373bed1162d9b13cbd4a5bfd2e097196e900f 100644
(file)
--- a/
interpreters/frotz/glkscreen.c
+++ b/
interpreters/frotz/glkscreen.c
@@
-263,8
+263,6
@@
void smartstatusline (void)
int roomlen, scorelen, scoreofs;
int len, tmp;
int roomlen, scorelen, scoreofs;
int len, tmp;
- statusline[curx - 1] = 0; /* terminate! */
-
packspaces(statusline, packed);
//strcpy(packed, statusline);
len = os_string_length(packed);
packspaces(statusline, packed);
//strcpy(packed, statusline);
len = os_string_length(packed);
@@
-351,22
+349,38
@@
void screen_char (zchar c)
else {
if (cury == 1)
{
else {
if (cury == 1)
{
- if (curx < sizeof statusline)
+ if (curx <= ((sizeof statusline / sizeof(zchar)) - 1))
+ {
statusline[curx - 1] = c;
statusline[curx - 1] = c;
- curx++;
- if (curx <= h_screen_cols)
+ statusline[curx] = 0;
+ }
+ if (curx < h_screen_cols)
+ {
glk_put_char_uni(c);
glk_put_char_uni(c);
+ }
+ else if (curx == h_screen_cols)
+ {
+ glk_put_char_uni(c);
+ glk_window_move_cursor(gos_curwin, curx-1, cury-1);
+ }
else
else
+ {
smartstatusline();
smartstatusline();
+ }
+ curx ++;
}
else
{
}
else
{
- glk_put_char_uni(c);
- curx++;
- if (curx > h_screen_cols) {
- curx = 1;
- cury++;
+ if (curx < h_screen_cols)
+ {
+ glk_put_char_uni(c);
}
}
+ else if (curx == (h_screen_cols))
+ {
+ glk_put_char_uni(c);
+ glk_window_move_cursor(gos_curwin, curx-1, cury-1);
+ }
+ curx++;
}
}
}
}
}
}