jpdm2011 / garglk

Automatically exported from code.google.com/p/garglk
0 stars 0 forks source link

Potential bug in garglk_set_zcolors() #149

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
The following applies to Bocfel and Frotz, which is what leads me to believe it 
is a function of garglk rather than an interpreter--although both interpreters 
could, of course, be implementing the code incorrectly.

Consider the following Inform 6 program:
[Rout;
  rtrue;
];

[Main i;
  print "no color";
  @set_colour 4 5;
  @read_char 0 10 Rout -> i;
  print "color";
  @set_colour 1 1;
];

As written, this causes the entire screen to go yellow, with "no color" written 
in green on yellow.  After @read_char returns, the screen, including the "no 
color" text, flips back to what's expected (black on white, or at least default 
on default), and then "color" is properly printed in green on yellow.

It appears that reading input after setting colors results in the colors being 
applied to the entire window, at least until another color change is requested.

I believe this is causing the background to incorrectly change color when 
running SameGame 
(http://mirror.ifarchive.org/if-archive/games/zcode/SameGame.z5); it changes in 
neither Zoom nor Windows Frotz.

Original issue reported on code.google.com by cspiegel@gmail.com on 4 Jun 2011 at 11:01

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Can you compile this sample code for me?

Original comment by bcressey@gmail.com on 1 Jul 2011 at 6:46

GoogleCodeExporter commented 8 years ago
Sure; here it is.

Original comment by cspiegel@gmail.com on 2 Jul 2011 at 6:17

Attachments: