ww-tedit-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ww-tedit-dev] General palette handling


From: Tzvetan Mikov
Subject: [ww-tedit-dev] General palette handling
Date: Wed, 5 Nov 2003 13:55:44 -0800

Attributes should simpply be an index into an abstract
platform-dependant palette. A platform dependant function for palette
lookup should be provided:

typedef struct palette_entry_t * attr_t;
attr_t PalLookup ( pal_index_t index );

Note that PalLookup returns an opaque pointer to a platform dependant
color/attribute representation. All output functions should accept is
a parameter.

A slight modification of this could allow for somewhat more optimized
implementation on some platforms:

typedef uintptr_t attr_t;
attr_t PalLookup ( pal_index_t index );

Under DOS or Win32 console the color could go directly in attr_t
instead of returning a pointer to it.

-tz





reply via email to

[Prev in Thread] Current Thread [Next in Thread]