SDL palette question...

This is a discussion on SDL palette question... within the Game Programming forums, part of the General Programming Boards category; I understand how palette manipulation in SDL is done (through the SDL_Color structure and all), but I have one problem: ...

  1. #1
    Marxist-Trotskyist
    Join Date
    May 2005
    Location
    Many, many miles from the center of the Earth.
    Posts
    31

    SDL palette question...

    I understand how palette manipulation in SDL is done (through the SDL_Color structure and all), but I have one problem: I want to load a 256 color palette ( preferably in .pal format, though I could use .act) into an SDL_Color structure, and apply it normally (through SDL_Palette).

    I don't really have any clue where to start... Any help on this would be wonderful.
    If a=b, and b=c, then a=c, except where void and prohibited by law...

  2. #2
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,048
    Try this or something similar.

    [edit]here[/edit]
    Last edited by dwks; 07-31-2005 at 10:03 PM.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

  3. #3
    Marxist-Trotskyist
    Join Date
    May 2005
    Location
    Many, many miles from the center of the Earth.
    Posts
    31
    Thanks... Feel kinda foolish (seeing as you just googled it and all), :P.
    If a=b, and b=c, then a=c, except where void and prohibited by law...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. another do while question
    By kbpsu in forum C++ Programming
    Replies: 3
    Last Post: 03-23-2009, 01:14 PM
  2. SDL questions
    By Cpro in forum C++ Programming
    Replies: 1
    Last Post: 08-09-2008, 01:26 PM
  3. SDL - IMG_Load() question
    By Stonehambey in forum Game Programming
    Replies: 1
    Last Post: 07-01-2008, 05:09 AM
  4. Question...
    By TechWins in forum A Brief History of Cprogramming.com
    Replies: 16
    Last Post: 07-28-2003, 10:47 PM
  5. opengl DC question
    By SAMSAM in forum Game Programming
    Replies: 6
    Last Post: 02-26-2003, 09:22 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21