magiblot / tvision

A modern port of Turbo Vision 2.0, the classical framework for text-based user interfaces. Now cross-platform and with Unicode support.
Other
1.99k stars 150 forks source link

palette demo is broken #158

Closed Solbeziel closed 3 months ago

Solbeziel commented 5 months ago

Hi, I just noticed that the palette demo is broken. In palette.cc, we have

#define cpTestWindow "\x40\x41\x42\x43\x44\x45"

but the application palette is much bigger than 0x40 colours, so the demo window palette will be appended at position 0x88, thus

#define cpTestWindow "\x88\x89\x8A\x8B\x8C\x8D"

causes the demo window to display the intended colours.

magiblot commented 3 months ago

Hi @Solbeziel!

Excuse me for the late reply.

Nice find! I overlooked the fact that this example had been written for Turbo Vision 1.03, which did in fact use an application palette of 0x3F colors:

https://github.com/magiblot/tvision/blob/adb6e3af5dad6fa123adda52a7e78a3cd6e50321/include/app.h#L137-L143

Thank you very much for the contribution!