The
TDx_DrawSurface::SetPalette
method
attaches
a
palette
to
a
surface.
The
change
will
be
immediate,
without
regard
to
refresh
timing.
The
initial
call
to
this
method
will
increment
the
palette's
reference
count
but
further
calls
associating
it
with
the
same
surface
will
not
further
affect
the
reference
count.
Passing
NULL
to
the
Palette
parameter
removes
the
palette
and
decrements
the
palettes
reference
count.
If
the
surface
is
released
before
the
palette
is
removed,
the
palettes
reference
count
will
automatically
be
decremented.
It
is
the
applications
responsibility
to
release
further
references
to
the
palette
if
it
is
no
longer
needed.