Author Topic: Colours and curses  (Read 5480 times)

chooseusername

  • Rogueliker
  • ***
  • Posts: 329
  • Karma: +0/-0
    • View Profile
    • Email
Colours and curses
« on: January 10, 2015, 04:19:53 AM »
I'm experimenting with porting Incursion to use curses, specifically PDCurses, which enables a DOS console on Windows to be used with the curses API.

One difficult to use part of the curses API, is the colour of characters, which uses a colour pair index.  Does anyone with experience using it have any good suggestions about how to use it to for dynamically encountered colour pairs?

As I do not know what colour pairs will be used, until the codebase tries to render them, this is somewhat difficult to set up in advance.  Perhaps also links to specific implementations of colour pair handling code which you know are not wastes of time?