Results 1 to 4 of 4

Thread: SDL color dilema

  1. #1

    SDL color dilema

    Does anyone know of a fast(CPU wise) way to change the "overall" color of a Surface? I am talking 24 bit surfaces, not some palettized ones. I have 100s of 100x100x24 animations which take roughly 44Mb in RAM when loaded and I need to "recolor" them during runtime(player colors). I've done this by per-pixel changing before but it's darn slow. I need something to change the whole color scheme but something which will ignore the colorkey(transparent color)
    Feel the power of Open Source.
    <br />Feel the power of Free Pascal.

  2. #2

    SDL color dilema

    It seems my post was lost in the move. The only way I can think of is by changing the palette. Though you may want to rethink how colours are used in the game if it is too slow.
    <br /><br />There are a lot of people who are dead while they are still alive. I want to be alive until the day I die.<br />-= Paulo Coelho =-

  3. #3

    SDL color dilema

    Well this is the bottleneck. Sadly I CAN'T go 8 bits. The players themselves could but the backgrounds are too colorful. I don't think 8 bit -> 32 bit blits would be faster than per-pixel recoloring.
    Feel the power of Open Source.
    <br />Feel the power of Free Pascal.

  4. #4
    Legendary Member cairnswm's Avatar
    Join Date
    Nov 2002
    Location
    Randburg, South Africa
    Posts
    1,537

    SDL color dilema

    GLXtreem has a way of setting a color filter/template before draing a picture that basically allows the conversion of the whole piture to the new color template. I have no idea how it was done but I used it for any color Text when using GLXTreem.
    William Cairns
    My Games: http://www.cairnsgames.co.za (Currently very inactive)
    MyOnline Games: http://TheGameDeveloper.co.za (Currently very inactive)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •