Fork help: Color coded Scroll text implementation

Discuss how totally awesome Bang! is here.

Moderator: Terryn

Post Reply
User avatar
Smilymzx
I hope she made lotsa spaghetti!
Posts: 182
Joined: Sat May 20, 2006 2:58 am
Location: LocacoLocacoL :LoL!

Fork help: Color coded Scroll text implementation

Post by Smilymzx »

EDIT: Forgot to mention code is wanted, so if posting, Please include some code or example of code, must be based off original reconstructions as Fork code (the Latest version)!

I just got out TP 5.5, Set it up on DOSBOX, and downloaded both the latest GIT versions of ZZT and Super ZZT reconstructions, I wanted to add color to messages (either both one/two-line and scroll message, or just scroll message.)

Here is what I intend to do, For example:

One line (ZZT):

Code: Select all

~F@1This is a White on Blue one-liner
Two Lines (SuperZZT)

Code: Select all

~F@1This is a White on
~F@1Blue one-liner
Scroll Message:

Code: Select all

This defaults to yellow
$This defaults to yellow, was white
~F@2This is a White on green message@1~E
~C@6This is a Red on brown message@1~E
The thing is: I don't know how to remake it, Is there a way to implement this without problems? After this, I think ZZT's Help needs rewriting,

Note to self: Remove SZZT's /E switch and enable editor functionality as well as remove ordering/registration stuff from both ZZT/SZZT, edit MONSTER.ANS/.BIN to show World Menu as a built in function!
Last edited by Smilymzx on Mon Mar 08, 2021 10:59 pm, edited 1 time in total.
asie
1 full minit uv 1 secend mesiges
Posts: 67
Joined: Sun Mar 17, 2019 4:55 pm

Re: Fork help: Color coded Scroll text implementation

Post by asie »

Smilymzx wrote: Sun Feb 28, 2021 5:39 am I just got out TP 5.5, Set it up on DOSBOX, and downloaded both the latest GIT versions of ZZT and Super ZZT reconstructions, I wanted to add color to messages (either both one/two-line and scroll message, or just scroll message.)
For one/two-liners, what you want to do is parse the color information in the Message Timer. For text windows, there's a line drawing procedure which already handles lines which begin with $ etc. - getting multi-color lines will be significantly trickier, though.
Note to self: Remove SZZT's /E switch and enable editor functionality as well as remove ordering/registration stuff from both ZZT/SZZT, edit MONSTER.ANS/.BIN to show World Menu as a built in function!
World Menu is actually shown as a built-in function - if you have the actual registered copy of Super ZZT, not the freeware release from 1997. There's a missing file from it called REGISTER.DOC - it can be empty, if you want.

If you want to remove the ordering/registration stuff from ZZT, I have a patch here.
wil
GABZABOOLZABBA
Posts: 105
Joined: Mon Mar 15, 2004 6:21 pm
Location: EAST SIDE
Contact:

Re: Fork help: Color coded Scroll text implementation

Post by wil »

Re Multi-color lines: For line interpolation in Kunger Binb, I set up a parallel procedure to readLineToEnd called readLineToChar(char c), which will stop when it reaches the char in question. That would allow you to change colors partway through by interrupting with an otherwise unused char (I was using '@' but you could use anything) and break the routine once you reach the end of the line.
User avatar
Smilymzx
I hope she made lotsa spaghetti!
Posts: 182
Joined: Sat May 20, 2006 2:58 am
Location: LocacoLocacoL :LoL!

Re: Fork help: Color coded Scroll text implementation

Post by Smilymzx »

wil wrote: Mon Mar 08, 2021 8:58 pm Re Multi-color lines: For line interpolation in Kunger Binb, I set up a parallel procedure to readLineToEnd called readLineToChar(char c), which will stop when it reaches the char in question. That would allow you to change colors partway through by interrupting with an otherwise unused char (I was using '@' but you could use anything) and break the routine once you reach the end of the line.
Oh, I forgot to mention this in my last post: Code would be nice when posted...

Otherwise, Nice try!
wil
GABZABOOLZABBA
Posts: 105
Joined: Mon Mar 15, 2004 6:21 pm
Location: EAST SIDE
Contact:

Re: Fork help: Color coded Scroll text implementation

Post by wil »

Post Reply