Autor Beitrag
F34r0fTh3D4rk
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Mo 21.03.05 10:57 
Hallo, ich wollte mal wieder ein kleines spiel proggen, jedoch benötigte ich dafür sprites. habe 2 proceduren dafür, die eigentlich auch funktionieren, aber nur, wenn das bild darunter leer ist, ich habs versucht anders zu lösen, schaffe es aber net.
KidPaddle
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 351

WinXP,Linux
D7 Prof, XE7
BeitragVerfasst: Mo 21.03.05 17:42 
Habe mir zwar kurz deinen Code angesehen, aber nicht ganz verstanden. Ich würde jedoch zu einer anderen Bibliothek greifen, graphics32.org/wiki/, welche Sprites und mehrere Layer bietet.

Gruß
KidPaddle
F34r0fTh3D4rk Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 5285
Erhaltene Danke: 29

Win Vista (32), Win 7 (64)
Eclipse, SciTE, Lazarus
BeitragVerfasst: Di 22.03.05 13:07 
ich habs mal mit alphamasking probiert, das bekomme ich aber auch net ganz hin:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
procedure TForm1.Button1Click(Sender: TObject);
var
  i, j: byte;
  alpha: byte;
begin
  for i:= 1 to 150 do
    for j:= 1 to 150 do
      begin
        alpha:= image3.Canvas.pixels[i, j];
        image4.canvas.pixels[i, j]:= round(((image2.Canvas.pixels[i, j] * alpha) / 255) + ((image1.Canvas.pixels[i, j] * (255 - alpha)) / 255));
      end;
end;

das problem ist, funzt net, performance zu schlecht und position nicht wählbar.