Hello,
I recently beta tested a game with inline diagram maps that I really liked. It is written in punyinform. Trying to make it work in TADS/Adv3lite has been challenging but I am close.
One character that I want to use but isn’t working is the vertical bar or pipe for a north/south connector. I have tried \u007C, \124 and \x7C. I have also tried a lowercase ‘l’ as an alternate but if the player is using a serif font, it looks funny.
Also, the output works with the typographicalOutputFilter active or deactivated. I may be misunderstanding it’s purpose.
Any help is appreciated!
Below is what I have tried along with several variations. If I omit the pipe character line, the diagram looks pretty close to what I want. This is only a partial diagram. Desired result is attached (ignore the gray tab lines and git status). I also omitted the square brackets in the code.
#charset "UTF-8"
#include <tads.h>
#include "advlite.h"
//modifies the output filter
modify typographicalOutputFilter
isActive = true
activate() { isActive = true; }
deactivate() { isActive = nil; }
filterText(ostr, val) { return isActive ? inherited(ostr, val) : val; }
;
DefineIAction(Diagram)
execAction(cmd)
{
//typographicalOutputFilter.deactivate();
"\t\t\t\t\t\t\t\t\t\tN\n";
"\t\t\t\t\t\t\t\tParents Room\n";
"\t\t\t\t\t\t\t\t\t\t\x7C\n"; <--- This is the vertical pipe \x7c or \u007C or \124
"\t\t\t\t\t\t\t\t\t\t\n";
"W\t\tBoys Room - - - - - - Hall - - - - - - - Girls Room\t\tE\n";
"\t\t\t\t\t\t\t\t\t\t\n";
"\t\t\t\t\t\t\t\t\t\t\n";
//typographicalOutputFilter.activate();
}
;
VerbRule(Diagram)
'diagram'
: VerbProduction
action = Diagram
verbPhrase = 'diagram'
;
