Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001377I6 LibraryGeneralpublic2014-07-29 02:152019-04-09 02:27
Assigned ToDavidG 
PlatformOSOS Version
Product Version6/11 
Target Version6/13Fixed in Version 
Summary0001377: Changing colors doesn't work as it's supposed to according to the DM4
DescriptionThis comes from auraes at [^]

On page 311 in the DM4, one of the colors available is "current colour". This has been missing from the Library since at least 6/1. This causes the SetColour() function to not work similarly to the @set_colour opcode.

Even if the program supplies this constant, the SetColour() function thwarts the correct functionality by enclosing the entire body of the function in an if statement that causes the function to do nothing if foreground and background are not both supplied.
Minimal Source Text To Reproduce
Constant CLR_CURRENT 0;
Constant COLOR;

Include "parser";  Include "verblib";
Object room "Color Room"
	description [;
		print "foreground: Yellow, background: Blue^";
		print "foreground: Red, background: Blue^";
		print "foreground: Red, background: Black^";
		print "foreground: Default, background: Default^";
         has light;
[ initialise i key; 
	clr_on = 1;
	location = room;

Include "grammar";
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
DavidG (developer)
2014-07-29 02:28

Here's the fix for Z-machine targets: [^]

A quick poke around suggests that color mode for Glulx targets never compiled. Going to have to bug Zarf about that one.
DavidG (developer)
2014-08-04 00:09
edited on: 2014-08-04 00:15

Compiling with Glulx and color now works, but is still broken. In particular, SetColour() improperly clears the screen.

See [^]

DavidG (developer)
2014-08-04 01:30
edited on: 2014-08-04 01:31

I think I understand what's going on with Glulx and screen handling for color. It seems that Glulx MUST clear the screen before allowing any color changes to take effect. This would explain why I am unable to get color changes to happen immediately or have multiple colors onscreen at once.

reference: [^]

DavidG (developer)
2019-04-09 02:19

New link for initial report: [^]
DavidG (developer)
2019-04-09 02:27

Issue filed at Gitlab: [^]

- Issue History
Date Modified Username Field Change
2014-07-29 02:15 DavidG New Issue
2014-07-29 02:15 DavidG Status new => assigned
2014-07-29 02:15 DavidG Assigned To => DavidG
2014-07-29 02:20 DavidG Steps to Reproduce Updated View Revisions
2014-07-29 02:28 DavidG Note Added: 0003012
2014-08-04 00:09 DavidG Note Added: 0003027
2014-08-04 00:15 DavidG Note Edited: 0003027 View Revisions
2014-08-04 01:30 DavidG Note Added: 0003028
2014-08-04 01:31 DavidG Note Edited: 0003028 View Revisions
2015-11-22 20:23 DavidG Target Version 6/12 => 6/13
2019-04-09 02:19 DavidG Note Added: 0004850
2019-04-09 02:27 DavidG Note Added: 0004851

Copyright © 2000 - 2010 MantisBT Group
Powered by Mantis Bugtracker