final (?) changes for version 2.03d

This commit is contained in:
zueuk 2006-04-13 16:21:32 +00:00
parent 73af4bd9d6
commit 477cad10c7
9 changed files with 72 additions and 105 deletions

View File

@ -972,7 +972,6 @@ object AdjustForm: TAdjustForm
Width = 73 Width = 73
Height = 21 Height = 21
ItemHeight = 13 ItemHeight = 13
ItemIndex = 0
TabOrder = 8 TabOrder = 8
Text = '512' Text = '512'
OnChange = txtWidthChange OnChange = txtWidthChange
@ -990,13 +989,13 @@ object AdjustForm: TAdjustForm
Width = 73 Width = 73
Height = 21 Height = 21
ItemHeight = 13 ItemHeight = 13
ItemIndex = 0
TabOrder = 9 TabOrder = 9
Text = '384' Text = '384'
OnChange = txtHeightChange OnChange = txtHeightChange
OnKeyPress = txtSizeKeyPress OnKeyPress = txtSizeKeyPress
Items.Strings = ( Items.Strings = (
'384' '384'
'400'
'480' '480'
'512' '512'
'600' '600'

View File

@ -1,7 +1,7 @@
{ {
Flame screensaver Copyright (C) 2002 Ronald Hordijk Flame screensaver Copyright (C) 2002 Ronald Hordijk
Apophysis Copyright (C) 2001-2004 Mark Townsend Apophysis Copyright (C) 2001-2004 Mark Townsend
Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Boris, Peter Sdobnov Apophysis Copyright (C) 2005-2006 Ronald Hordijk, Piotr Borys, Peter Sdobnov
This program is free software; you can redistribute it and/or modify This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by it under the terms of the GNU General Public License as published by

View File

@ -175,7 +175,10 @@ begin
Renderer.SaveImage(FileName); Renderer.SaveImage(FileName);
if PlaySoundOnRenderComplete then if PlaySoundOnRenderComplete then
sndPlaySound(PChar(RenderCompleteSoundFile), SND_FILENAME or SND_NOSTOP or SND_ASYNC); if RenderCompleteSoundFile <> '' then
sndPlaySound(PChar(RenderCompleteSoundFile), SND_FILENAME or SND_NOSTOP or SND_ASYNC)
else
sndPlaySound(pchar(SND_ALIAS_SYSTEMASTERISK), SND_ALIAS_ID or SND_NOSTOP or SND_ASYNC);
Renderer.Free; Renderer.Free;
Renderer := nil; Renderer := nil;

View File

@ -37,7 +37,7 @@ const
RS_XO = 2; RS_XO = 2;
RS_VO = 3; RS_VO = 3;
AppVersionString = 'Apophysis 2.03d pre-release 7'; AppVersionString = 'Apophysis 2.03d rc1';
type type
TMouseMoveState = (msUsual, msZoomWindow, msZoomOutWindow, msZoomWindowMove, msZoomOutWindowMove, msDrag, msDragMove, msRotate, msRotateMove); TMouseMoveState = (msUsual, msZoomWindow, msZoomOutWindow, msZoomWindowMove, msZoomOutWindowMove, msDrag, msDragMove, msRotate, msRotateMove);
@ -1292,50 +1292,68 @@ begin
end; end;
function FlameToXML(const cp1: TControlPoint; sheep: boolean; compact: boolean = false): string; function FlameToXML(const cp1: TControlPoint; sheep: boolean; exporting: boolean = false): string;
var var
t, i{, j}: integer; t, i{, j}: integer;
FileList: TStringList; FileList: TStringList;
x, y: double; x, y: double;
{varlist,} nick, url, pal, hue: string; parameters: string;
begin begin
FileList := TStringList.create; FileList := TStringList.create;
x := cp1.center[0]; x := cp1.center[0];
y := cp1.center[1]; y := cp1.center[1];
{ // not supported by flam3 any more
pal := ''; hue := ''; pal := ''; hue := '';
if sheep then begin if sheep then begin
if cp1.cmapindex >= 0 then pal := 'palette="' + IntToStr(cp1.cmapindex) + '" '; if cp1.cmapindex >= 0 then pal := 'palette="' + IntToStr(cp1.cmapindex) + '" ';
hue := 'hue="' + format('%g', [cp1.hue_rotation]) + '" '; hue := 'hue="' + format('%g', [cp1.hue_rotation]) + '" ';
end; end;
}
// if cp1.cmapindex >= 0 then pal := pal + 'gradient="' + IntToStr(cp1.cmapindex) + '" ';
if cp1.cmapindex >= 0 then { // not supported by flam3 any more
pal := pal + 'gradient="' + IntToStr(cp1.cmapindex) + '" ';
if Trim(SheepNick) <> '' then nick := 'nick="' + Trim(SheepNick) + '"'; if Trim(SheepNick) <> '' then nick := 'nick="' + Trim(SheepNick) + '"';
if Trim(SheepURL) <> '' then url := 'url="' + Trim(SheepURL) + '" '; if Trim(SheepURL) <> '' then url := 'url="' + Trim(SheepURL) + '" ';
}
try try
FileList.Add('<flame name="' + CleanXMLName(cp1.name) + format('" time="%g" ', [cp1.time]) + parameters := '';
pal + 'size="' + IntToStr(cp1.width) + ' ' + IntToStr(cp1.height) + if cp1.time <> 0 then
parameters := parameters + format('time="%g" ', [cp1.time]);
parameters := parameters +
'size="' + IntToStr(cp1.width) + ' ' + IntToStr(cp1.height) +
format('" center="%g %g" ', [x, y]) + format('" center="%g %g" ', [x, y]) +
format('scale="%g" ', [cp1.pixels_per_unit]) + format('scale="%g" ', [cp1.pixels_per_unit]);
format('angle="%g" ', [cp1.FAngle]) +
format('rotate="%g" ', [-180 * cp1.FAngle/Pi]) + if cp1.FAngle <> 0 then
format('zoom="%g" ', [cp1.zoom]) + parameters := parameters + format('angle="%g" ', [cp1.FAngle]) +
format('rotate="%g" ', [-180 * cp1.FAngle/Pi]);
if cp1.zoom <> 0 then
parameters := parameters + format('zoom="%g" ', [cp1.zoom]);
parameters := parameters +
'oversample="' + IntToStr(cp1.spatial_oversample) + 'oversample="' + IntToStr(cp1.spatial_oversample) +
format('" filter="%g" ', [cp1.spatial_filter_radius]) + format('" filter="%g" ', [cp1.spatial_filter_radius]) +
format('quality="%g" ', [cp1.sample_density]) + format('quality="%g" ', [cp1.sample_density]);
'batches="' + IntToStr(cp1.nbatches) + if cp1.nbatches <> 1 then parameters := parameters + 'batches="' + IntToStr(cp1.nbatches) + '" ';
format('" background="%g %g %g" ', [cp1.background[0] / 255, cp1.background[1] / 255, cp1.background[2] / 255]) +
parameters := parameters +
format('background="%g %g %g" ', [cp1.background[0] / 255, cp1.background[1] / 255, cp1.background[2] / 255]) +
format('brightness="%g" ', [cp1.brightness]) + format('brightness="%g" ', [cp1.brightness]) +
format('gamma="%g" ', [cp1.gamma]) + format('gamma="%g" ', [cp1.gamma]);
format('vibrancy="%g" ', [cp1.vibrancy]) +
if cp1.vibrancy <> 1 then
parameters := parameters + format('vibrancy="%g" ', [cp1.vibrancy]);
if exporting then parameters := parameters +
format('estimator_radius="%g" ', [cp1.estimator]) + format('estimator_radius="%g" ', [cp1.estimator]) +
format('estimator_minimum="%g" ', [cp1.estimator_min]) + format('estimator_minimum="%g" ', [cp1.estimator_min]) +
format('estimator_curve="%g" ', [cp1.estimator_curve]) + format('estimator_curve="%g" ', [cp1.estimator_curve]) +
format('temporal_samples="%d" ', [cp1.jitters]) + format('temporal_samples="%d" ', [cp1.jitters]) +
format('gamma_threshold="%g" ', [cp1.gamma_treshold]) + format('gamma_threshold="%g" ', [cp1.gamma_treshold]);
hue + url + nick + '>');
FileList.Add('<flame name="' + CleanXMLName(cp1.name) + '" ' + parameters + '>');
{ Write transform parameters } { Write transform parameters }
t := cp1.NumXForms; t := cp1.NumXForms;
for i := 0 to t - 1 do for i := 0 to t - 1 do
@ -1355,9 +1373,10 @@ begin
{ Write palette data } { Write palette data }
if not sheep then begin if not sheep then begin
if compact then // say no to duplicated data! (?) if exporting then
FileList.Add(ColorToXmlCompact(cp1)) FileList.Add(ColorToXml(cp1))
else FileList.Add(ColorToXml(cp1)); else
FileList.Add(ColorToXmlCompact(cp1));
end; end;
FileList.Add('</flame>'); FileList.Add('</flame>');
@ -1367,66 +1386,6 @@ begin
end; end;
end; end;
//function FlameToXMLSheep(const cp1: TControlPoint): string;
//var
// t, i, j: integer;
// FileList: TStringList;
// x, y, a, b, cc, d, e, f: double;
// varlist, pal, hue: string;
//begin
// FileList := TStringList.create;
// x := cp1.center[0];
// y := cp1.center[1];
// pal := ''; hue := '';
// pal := 'palette="' + IntToStr(cp1.cmapindex) + '" ';
//// if cp1.hue_rotation = 0 then cp1.hue_rotation := 1;
// hue := ' hue="' + format('%g', [cp1.hue_rotation]) + '"';
// try
// FileList.Add('<flame' + format(' time="%g" ', [cp1.time]) +
// pal + 'size="' + IntToStr(cp1.width) + ' ' + IntToStr(cp1.height) +
// format('" center="%g %g" ', [x, y]) +
// format('scale="%g" ', [cp1.pixels_per_unit]) +
// format('zoom="%g" ', [cp1.zoom]) +
// 'oversample="' + IntToStr(cp1.spatial_oversample) +
// format('" filter="%g" ', [cp1.spatial_filter_radius]) +
// format('quality="%g" ', [cp1.sample_density]) +
// 'batches="' + IntToStr(cp1.nbatches) +
// format('" background="%g %g %g" ', [cp1.background[0] / 255, cp1.background[1] / 255, cp1.background[2] / 255]) +
// format('brightness="%g" ', [cp1.brightness]) +
// format('gamma="%g" ', [cp1.gamma]) +
// format('vibrancy="%g"', [cp1.vibrancy]) + hue + '>');
// { Write transform parameters }
// t := NumXForms(cp1);
// for i := 0 to t - 1 do
// begin
// with cp1.xform[i] do
// begin
// a := c[0][0];
// b := c[1][0];
// cc := c[0][1];
// d := c[1][1];
// e := c[2][0];
// f := c[2][1];
// varlist := '';
// for j := 0 to NRVAR - 1 do
// begin
// if vars[j] <> 0 then
// begin
// varlist := varlist + varnames(j) + format('="%f" ', [vars[j]]);
// end;
// end;
// FileList.Add(Format(' <xform weight="%g" color="%g" symmetry="%g" ', [density, color, symmetry]) +
// varlist + Format('coefs="%g %g %g %g %g %g"/>', [a, cc, b, d, e, f]));
// end;
// end;
// FileList.Add('</flame>');
// result := FileList.text;
// finally
// FileList.free
// end;
//end;
function RemoveExt(filename: string): string; function RemoveExt(filename: string): string;
var var
ext: string; ext: string;
@ -1518,7 +1477,7 @@ begin
until (Pos('<' + Tag + '>', FileList[FileList.count - 1]) <> 0) or until (Pos('<' + Tag + '>', FileList[FileList.count - 1]) <> 0) or
(Pos('</Flames>', FileList[FileList.count - 1]) <> 0); (Pos('</Flames>', FileList[FileList.count - 1]) <> 0);
FileList.Add(Trim(FlameToXML(cp1, false, true))); FileList.Add(Trim(FlameToXML(cp1, false)));
FileList.Add('</Flames>'); FileList.Add('</Flames>');
FileList.SaveToFile(filename); FileList.SaveToFile(filename);
@ -1532,7 +1491,7 @@ begin
AssignFile(IFile, filename); AssignFile(IFile, filename);
ReWrite(IFile); ReWrite(IFile);
Writeln(IFile, '<Flames name="' + Tag + '">'); Writeln(IFile, '<Flames name="' + Tag + '">');
Write(IFile, FlameToXML(cp1, false, true)); Write(IFile, FlameToXML(cp1, false));
Writeln(IFile, '</Flames>'); Writeln(IFile, '</Flames>');
CloseFile(IFile); CloseFile(IFile);
end; end;
@ -1839,7 +1798,7 @@ begin
*) *)
MainCp.name := RandomPrefix + RandomDate + '-' + MainCp.name := RandomPrefix + RandomDate + '-' +
IntToStr(RandomIndex); IntToStr(RandomIndex);
Write(F, FlameToXML(MainCp, False, true)); Write(F, FlameToXML(MainCp, False));
// Write(F, FlameToString(Title)); // Write(F, FlameToString(Title));
// WriteLn(F, ' '); // WriteLn(F, ' ');
end; end;
@ -2486,7 +2445,7 @@ begin
AdjustForm.cmbPalette.ItemIndex := 0; AdjustForm.cmbPalette.ItemIndex := 0;
// AdjustForm.cmbPalette.Items.clear; // AdjustForm.cmbPalette.Items.clear;
ExportDialog.cmbDepth.ItemIndex := 3; ExportDialog.cmbDepth.ItemIndex := 2;
end; end;
procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction); procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction);
@ -3592,7 +3551,7 @@ procedure TMainForm.mnuCopyClick(Sender: TObject);
var var
txt: string; txt: string;
begin begin
txt := Trim(FlameToXML(Maincp, false, true)); txt := Trim(FlameToXML(Maincp, false));
Clipboard.SetTextBuf(PChar(txt)); Clipboard.SetTextBuf(PChar(txt));
mnuPaste.enabled := true; mnuPaste.enabled := true;
@ -3693,7 +3652,7 @@ begin
cp1.estimator_curve := ExportEstimatorCurve; cp1.estimator_curve := ExportEstimatorCurve;
cp1.jitters := ExportJitters; cp1.jitters := ExportJitters;
cp1.gamma_treshold := ExportGammaTreshold; cp1.gamma_treshold := ExportGammaTreshold;
FileList.Text := FlameToXML(cp1, false); FileList.Text := FlameToXML(cp1, false, true);
FileList.SaveToFile(ChangeFileExt(ExportDialog.Filename, '.flame')); FileList.SaveToFile(ChangeFileExt(ExportDialog.Filename, '.flame'));
FileList.Clear; FileList.Clear;
FileList.Add('@echo off'); FileList.Add('@echo off');

View File

@ -358,10 +358,10 @@ object OptionsForm: TOptionsForm
end end
object chkAutoEditMode: TCheckBox object chkAutoEditMode: TCheckBox
Left = 160 Left = 160
Top = 84 Top = 80
Width = 145 Width = 161
Height = 17 Height = 17
Caption = 'Prefer "Auto" edit mode' Caption = 'Prefer "Extended" edit mode'
Checked = True Checked = True
State = cbChecked State = cbChecked
TabOrder = 2 TabOrder = 2

View File

@ -717,7 +717,8 @@ end;
procedure TOptionsForm.btnBrowseSoundClick(Sender: TObject); procedure TOptionsForm.btnBrowseSoundClick(Sender: TObject);
begin begin
OpenDialog.Filter := 'Waveform files (*.wav)|*.wav|MIDI files (*.mid)|*.mid'; OpenDialog.InitialDir := ExtractFilePath(RenderCompleteSoundFile);
OpenDialog.Filter := 'Waveform files (*.wav)|*.wav';
OpenDialog.FileName := ''; OpenDialog.FileName := '';
if OpenDialog.Execute then if OpenDialog.Execute then
begin begin
@ -728,7 +729,9 @@ end;
procedure TOptionsForm.btnPlayClick(Sender: TObject); procedure TOptionsForm.btnPlayClick(Sender: TObject);
begin begin
if txtSoundFile.text <> '' then if txtSoundFile.text <> '' then
sndPlaySound(PChar(txtSoundFile.text), SND_FILENAME or SND_ASYNC); sndPlaySound(PChar(txtSoundFile.text), SND_FILENAME or SND_ASYNC)
else
sndPlaySound(pchar(SND_ALIAS_SYSTEMASTERISK), SND_ALIAS_ID or SND_NOSTOP or SND_ASYNC);
end; end;
end. end.

View File

@ -22,8 +22,8 @@ unit RenderThread;
interface interface
uses uses
Classes, windows, Messages, Graphics, Classes, Windows, Messages, Graphics,
controlPoint, Render, Render64, Render64MT, RenderMM, RenderMM_MT; ControlPoint, Render, Render64, Render64MT, RenderMM, RenderMM_MT;
const const
WM_THREAD_COMPLETE = WM_APP + 5437; WM_THREAD_COMPLETE = WM_APP + 5437;

View File

@ -97,7 +97,7 @@ type
procedure Cylinder; // var[25] procedure Cylinder; // var[25]
procedure Noise; // var[26] procedure Noise; // var[26]
procedure Blur; // var[27] procedure Blur; // var[27]
procedure Focus; // var[28] // procedure Focus; // var[28]
function Mul33(const M1, M2: TMatrix): TMatrix; function Mul33(const M1, M2: TMatrix): TMatrix;
function Identity: TMatrix; function Identity: TMatrix;
@ -1543,6 +1543,7 @@ asm
{$endif} {$endif}
end; end;
(*
//--28--/////////////////////////////////////////////////////////////////////// //--28--///////////////////////////////////////////////////////////////////////
procedure TXForm.Focus; procedure TXForm.Focus;
{$ifndef _ASM_} {$ifndef _ASM_}
@ -1580,6 +1581,7 @@ asm
fwait fwait
{$endif} {$endif}
end; end;
*)
//***************************************************************************// //***************************************************************************//
@ -1948,7 +1950,7 @@ begin
FFunctionList[25] := Cylinder; FFunctionList[25] := Cylinder;
FFunctionList[26] := Noise; FFunctionList[26] := Noise;
FFunctionList[27] := Blur; FFunctionList[27] := Blur;
FFunctionList[28] := Focus; // FFunctionList[28] := Focus;
//registered //registered
// for i := 0 to High(FRegVariations) do // for i := 0 to High(FRegVariations) do
@ -2003,7 +2005,9 @@ var
Name: string; Name: string;
Value: double; Value: double;
begin begin
result := Format(' <xform weight="%g" color="%g" symmetry="%g" ', [density, color, symmetry]); result := Format(' <xform weight="%g" color="%g" ', [density, color]);
if symmetry <> 0 then result := result + format('symmetry="%g"', [symmetry]);
for i := 0 to nrvar - 1 do begin for i := 0 to nrvar - 1 do begin
if vars[i] <> 0 then if vars[i] <> 0 then
Result := Result + varnames(i) + format('="%g" ', [vars[i]]); Result := Result + varnames(i) + format('="%g" ', [vars[i]]);

View File

@ -6,7 +6,7 @@ uses
BaseVariation; BaseVariation;
const const
NRLOCVAR = 29; NRLOCVAR = 28;
function NrVar: integer; function NrVar: integer;
function Varnames(const index: integer): String; function Varnames(const index: integer): String;
@ -62,8 +62,7 @@ const
'bubble', 'bubble',
'cylinder', 'cylinder',
'noise', 'noise',
'blur', 'blur'
'focus'
); );
begin begin
if Index < NRLOCVAR then if Index < NRLOCVAR then