Results 1 to 5 of 5

Thread: Palette shifting

  1. #1

    Thread Starter
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181

    Palette shifting

    Hi everyone
    well I know people have asked about palettes before but I am not interested in the basics of it right now.
    I am using DirectX7 and I do some palette shifting in 8 bit colors... it all works pretty nice except for that my effect sometimes looks pretty wierd. after looking through the (short and simple) code for hours I found out that my problem has to be that black always remains black.
    Has anyone ever experienced that problem?
    I set the allow256 flag...

    so does anyone know of this problem? any workarounds?
    Sanity is a full time job

    Puh das war harter Stoff!

  2. #2
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    I always thought that the Allow256 flag would give you access to ALL the colors of the palette... Look at the DDBlend sample from MS, they use all the palette colors and none of them is black

    I tried using palettes before but the problem is that it doesn't let me have, for example, a 256-colors paletted image, change its colors, and then blt it to a 24-bits surface... any idea?
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  3. #3

    Thread Starter
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    well actually that should work if you still have the palette you used to change the picture...

    you would have to create your own function to write them to the 24 bit surface though.
    Sanity is a full time job

    Puh das war harter Stoff!

  4. #4
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    Yeah, but it also doesn't let me create the 256-colors surface (it always creates it as 24-bits). Even if I manage to do it, is there a way to blt it using one of DX's functions? I've seen this in many games, I don't know why it doesn't work for me

    Btw, did you have a look at the sample I told you about?
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  5. #5

    Thread Starter
    Frenzied Member /\/\isanThr0p's Avatar
    Join Date
    Jul 2000
    Location
    They can't stop us! We're on a misson from God.
    Posts
    1,181
    hey
    well I did not see a sample that you told me about... what sample?
    well I solved my problem it was a vb thing not a DX problem...

    well I don't really get what you want to do... where's the problem with creating a 8 bit surface?
    Sanity is a full time job

    Puh das war harter Stoff!

Posting Permissions

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



Click Here to Expand Forum to Full Width