Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

BlitX

Procedure Request

This topic is 6039 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello i need a procedure for delphix like Setpalette(Color : integer; R,G,B : byte); to set the palette like I did in dos pasca.. I tried to set the palette , and it was pain (and I didn''t had succes) .. where I can find this procedure? I found the PlotPixel (and it works).. Can anyone help me? thanks Blitx

Share this post


Link to post
Share on other sites
Advertisement
This should work:

procedure SetPalette(Color,R,G,B: Byte);
type
TRGB = record
Red: Byte;
Green: Byte;
Blue: Byte;
Reserved: Byte;
end;
var
RGB: TRGB;
begin
with RGB do
begin
Red := R;
Green := G;
Blue := B;
end;
Form1.DXDraw1.Palette.SetEntries(Color,1,RGB);
end;

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!