Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

This "if (f && b)" stuff didn't do any good for Z-machine. I don't se…

…e it doing any good for Glulx.
  • Loading branch information...
DavidGriffith committed Aug 4, 2014
1 parent 3217bc2 commit 1edaa1ed0d63a173956bd71c92fe6d0027c35be4
Showing with 33 additions and 35 deletions.
  1. +33 −35 parserm.h
@@ -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

0 comments on commit 1edaa1e

Please sign in to comment.
You can’t perform that action at this time.