Skip to main content
GameDev.net gamedev.net
🔒 Locked

DX7

Started by assaki Nov 18, 2000 at 2:08 PM 1 replies 450+ views
Original Post
assaki
assaki
Hi there i have a such question. Im trying to blit with color key. when my texture has a white as transparent and im setting colorkey as white it''s ok // ddck.dwColorSpaceHighValue=RGB(255,255,255); // and low... but with any other color its wrong e. g. grey // ddck.dwColorSpaceHighValue=RGB(125,125,125); // and low... are there other functions or macros to make a proper onemy texture is A8R8G8B8 style.
furby100
furby100
using the RGB macro is a massive nono, it returns a colorref. You need to set up your own macro.



Please state the nature of the debugging emergency.


sharewaregames.20m.com

Bloodseeker
Bloodseeker
Well, I dont know about D3D programming but there is a DDColorMatch function that, if you have a surface, returns the color index of a certain rgb value.

So if the color key does not change (i.e. it is set to a certain color space at the beginning and then stays), use DDColorMatch and assign its return value to your color key.

DDColorMatch is defined in ddutil.cpp anywhere in the mssdk/samples directory.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.