Skip to main content
gamedev.net
🔒 Locked

Procedure Request

Started by BlitX 0 replies 950+ views
Original Post
BlitX
BlitX
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
Mike85
Mike85
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;

Topic Locked

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

Sign in to reply to this topic.