Einzelnen Beitrag anzeigen

Red_Dragon

Registriert seit: 23. Okt 2004
Ort: Germany
51 Beiträge
 
Delphi 7 Enterprise
 
#1

Re: Mein kleiner mp3-Player... Updated 13.12.04

  Alt 15. Jan 2005, 13:33
Zitat von dizzy:
Hmmm Hast du evtl. was im Code verändert? Bei mir klappt das nämlich. Poste doch mal die ganze Funktion in der die Zeile vorkommt (ich kann's grad nicht identifizieren ).
nope keine veränderung in der GFX datei die hab ich nicht angefast

Delphi-Quellcode:
procedure TDotSphere.DrawSphere(out bmp: TBitmap32; Source: TBassplayer; color: TColor32; const xRot, yRot, zRot: Double);
var
  C: TVector;
  i: Integer;
  sinX, cosX,
  sinY, cosY,
  sinZ, cosZ : Double;
  h: Integer;
  sx, sy, sz: Double;
  fact: Double;
  ind: Integer;
  d: Double;
begin
  FFFT := Source.getfftdatalong;
  C.x := bmp.Width/2;
  C.y := bmp.Height/2;
  C.z := 0;
  sinX := sin(xRot);
  sinY := sin(yRot);
  sinZ := sin(zRot);
  cosX := cos(xRot);
  cosY := cos(yRot);
  cosZ := cos(zRot);
  d := 16*(FMaxRad-FBaseRad);
  h := (Length(FDrawDots) div 2)-1;

  for i := 0 to h do
  begin
    ind := 2*i+16;
    if FFFT[ind] < FFFTOld[ind] then
      FFFT[ind] := FFFTOld[ind]-0.001;

    fact := FFFT[ind]*d;
    FDrawDots[i].x := FDots[i].x + (FDots[i].x/FBaseRad)*fact;
    FDrawDots[i].y := FDots[i].y + (FDots[i].y/FBaseRad)*fact;
    FDrawDots[i].z := FDots[i].z + (FDots[i].z/FBaseRad)*fact;
  end;

  for i := h+1 to Length(FDrawDots)-1 do
  begin
    ind := 2*(i-h+1)+17;
    if FFFT[ind] < FFFTOld[ind] then
      FFFT[ind] := FFFTOld[ind]-0.001;

    fact := FFFT[ind]*d;
    FDrawDots[i].x := FDots[i].x + (FDots[i].x/FBaseRad)*fact;
    FDrawDots[i].y := FDots[i].y + (FDots[i].y/FBaseRad)*fact;
    FDrawDots[i].z := FDots[i].z + (FDots[i].z/FBaseRad)*fact;
  end;

  for i := 0 to Length(FDrawDots)-1 do
  begin
    sx := FDrawDots[i].x;
    sy := FDrawDots[i].y;
    sz := FDrawDots[i].z;
    FDrawDots[i].x := sx*( cosY*cosZ) - sy*(cosY*sinZ) + sz*(sinY);
    FDrawDots[i].y := sx*( sinX*sinY*cosZ+cosX*sinZ) - sy*(sinX*sinY*sinZ-cosX*cosZ) - sz*(sinX*cosY);
    FDrawDots[i].z := sx*(-cosX*sinY*cosZ+sinX*sinZ) + sy*(cosX*sinY*sinZ+sinX*cosZ) + sz*(cosX*cosY);
    FDrawDots[i].color := Lighten(color, trunc(FDrawDots[i].z*3));
    bmp.PixelFS[FDrawDots[i].x+C.x, FDrawDots[i].y+C.y] := FDrawDots[i].color;
  end;

  Move(FFFT[0], FFFTOld[0], Length(FFFT)*SizeOf(Float));
end;
Walter
  Mit Zitat antworten Zitat