delphigamedev.com Skip to page content

showing you how to make games with delphi since noah was a boy

why is my graphic doing this

Feel free to discuss whatever you want here (within reason).

why is my graphic doing this

Postby dterbeest » Mon Apr 26, 2010 7:28 pm

HI Guys,

i've been fooling around with sprite animation in delphi. been using the flickerless animation tut on this site for that! (thnx btw)
anyhow, i've got a problem with some transparency things. cant show pic here, but can mail it to someone who thinks of an answer..

here's some code:
Code: Select all
procedure TForm2.TimBackTimer(Sender: TObject);
begin
  PaintBox1.Canvas.CopyMode:=cmSrcCopy;
  PaintBox1.Canvas.CopyRect(Rect(0,0,800,600),backgrndimg.Canvas,Rect(0,0,800,600));

  PaintBox1.Canvas.CopyMode:=cmSrcAnd;
  PaintBox1.Canvas.CopyRect(SpriteRect,maskimg.Canvas,RectArrBack[TelBack]);

  PaintBox1.Canvas.CopyMode:=cmSrcPaint;
  PaintBox1.Canvas.CopyRect(SpriteRect,Image1.Canvas,RectArrBack[TelBack]);
  if TelBack<3 then
    Inc(TelBack)
  else
    TelBack:=0;
  Inc(StartY,SprSpeed);
end;


all sugestions are very welcome! thanx in advance!
dterbeest
 

Return to The Lounge

Who is online

Users browsing this forum: No registered users and 1 guest

cron

Subscribe to the feed delphigamedev.com NEWS Feed
archived news | mailing list

[ all tutorials found at delphigamedev.com are Copyright © 2008 Ben Watt ]