Skip to content
This repository has been archived by the owner on Jul 9, 2018. It is now read-only.

Commit

Permalink
This "if (f && b)" stuff didn't do any good for Z-machine. I don't se…
Browse files Browse the repository at this point in the history
…e it doing any good for Glulx.
  • Loading branch information
DavidGriffith committed Aug 4, 2014
1 parent 3217bc2 commit 1edaa1e
Showing 1 changed file with 33 additions and 35 deletions.
68 changes: 33 additions & 35 deletions parserm.h
Expand Up @@ -6093,46 +6093,44 @@ Object InformLibrary "(Inform Library)"

#Ifdef COLOUR;
[ SetColour f b window doclear i fwd bwd swin;
if (f && b) {
if (window) swin = 5-window; ! 4 for TextGrid, 3 for TextBuffer

if (clr_on) {
fwd = MakeColourWord(f);
bwd = MakeColourWord(b);
for (i=0 : i<=10: i++) {
if (f == CLR_DEFAULT || b == CLR_DEFAULT) { ! remove style hints
glk($00B1, swin, i, 7);
glk($00B1, swin, i, 8);
}
else {
glk($00B0, swin, i, 7, fwd);
glk($00B0, swin, i, 8, bwd);
}
if (window) swin = 5-window; ! 4 for TextGrid, 3 for TextBuffer

if (clr_on) {
fwd = MakeColourWord(f);
bwd = MakeColourWord(b);
for (i=0 : i<=10: i++) {
if (f == CLR_DEFAULT || b == CLR_DEFAULT) { ! remove style hints
glk($00B1, swin, i, 7);
glk($00B1, swin, i, 8);
}
! Now re-open the windows to apply the hints
if (gg_statuswin) glk($0024, gg_statuswin, 0); ! close_window

if (doclear || ( window ~= 1 && (clr_fg ~= f || clr_bg ~= b) ) ) {
glk($0024, gg_mainwin, 0);
gg_mainwin = glk($0023, 0, 0, 0, 3, GG_MAINWIN_ROCK); ! window_open
if (gg_scriptstr ~= 0)
glk($002D, gg_mainwin, gg_scriptstr); ! window_set_echo_stream
else {
glk($00B0, swin, i, 7, fwd);
glk($00B0, swin, i, 8, bwd);
}

gg_statuswin = glk($0023, gg_mainwin, $12, gg_statuswin_cursize,
4, GG_STATUSWIN_ROCK); ! window_open
if (statuswin_current && gg_statuswin)
MoveCursor(); else MainWindow();
}
! Now re-open the windows to apply the hints
if (gg_statuswin) glk($0024, gg_statuswin, 0); ! close_window

if (window ~= 2) {
clr_fgstatus = f;
clr_bgstatus = b;
}
if (window ~= 1) {
clr_fg = f;
clr_bg = b;
if (doclear || ( window ~= 1 && (clr_fg ~= f || clr_bg ~= b) ) ) {
glk($0024, gg_mainwin, 0);
gg_mainwin = glk($0023, 0, 0, 0, 3, GG_MAINWIN_ROCK); ! window_open
if (gg_scriptstr ~= 0)
glk($002D, gg_mainwin, gg_scriptstr); ! window_set_echo_stream
}

gg_statuswin = glk($0023, gg_mainwin, $12, gg_statuswin_cursize,
4, GG_STATUSWIN_ROCK); ! window_open
if (statuswin_current && gg_statuswin)
MoveCursor(); else MainWindow();
}

if (window ~= 2) {
clr_fgstatus = f;
clr_bgstatus = b;
}
if (window ~= 1) {
clr_fg = f;
clr_bg = b;
}
];
#Endif; ! COLOUR
Expand Down

0 comments on commit 1edaa1e

Please sign in to comment.