From 477cad10c795c182f6d40065840512700d453f00 Mon Sep 17 00:00:00 2001 From: zueuk Date: Thu, 13 Apr 2006 16:21:32 +0000 Subject: [PATCH] final (?) changes for version 2.03d --- 2.10/Source/Adjust.dfm | 3 +- 2.10/Source/ControlPoint.pas | 2 +- 2.10/Source/FormRender.pas | 5 +- 2.10/Source/Main.pas | 135 ++++++++++++----------------------- 2.10/Source/Options.dfm | 6 +- 2.10/Source/Options.pas | 7 +- 2.10/Source/RenderThread.pas | 4 +- 2.10/Source/XForm.pas | 10 ++- 2.10/Source/XFormMan.pas | 5 +- 9 files changed, 72 insertions(+), 105 deletions(-) diff --git a/2.10/Source/Adjust.dfm b/2.10/Source/Adjust.dfm index d7f0746..14e0b69 100644 --- a/2.10/Source/Adjust.dfm +++ b/2.10/Source/Adjust.dfm @@ -972,7 +972,6 @@ object AdjustForm: TAdjustForm Width = 73 Height = 21 ItemHeight = 13 - ItemIndex = 0 TabOrder = 8 Text = '512' OnChange = txtWidthChange @@ -990,13 +989,13 @@ object AdjustForm: TAdjustForm Width = 73 Height = 21 ItemHeight = 13 - ItemIndex = 0 TabOrder = 9 Text = '384' OnChange = txtHeightChange OnKeyPress = txtSizeKeyPress Items.Strings = ( '384' + '400' '480' '512' '600' diff --git a/2.10/Source/ControlPoint.pas b/2.10/Source/ControlPoint.pas index d59803b..74b40bc 100644 --- a/2.10/Source/ControlPoint.pas +++ b/2.10/Source/ControlPoint.pas @@ -1,7 +1,7 @@ { Flame screensaver Copyright (C) 2002 Ronald Hordijk 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 it under the terms of the GNU General Public License as published by diff --git a/2.10/Source/FormRender.pas b/2.10/Source/FormRender.pas index 32480db..cb7c4b2 100644 --- a/2.10/Source/FormRender.pas +++ b/2.10/Source/FormRender.pas @@ -175,7 +175,10 @@ begin Renderer.SaveImage(FileName); 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 := nil; diff --git a/2.10/Source/Main.pas b/2.10/Source/Main.pas index 7e70a43..6490a63 100644 --- a/2.10/Source/Main.pas +++ b/2.10/Source/Main.pas @@ -37,7 +37,7 @@ const RS_XO = 2; RS_VO = 3; - AppVersionString = 'Apophysis 2.03d pre-release 7'; + AppVersionString = 'Apophysis 2.03d rc1'; type TMouseMoveState = (msUsual, msZoomWindow, msZoomOutWindow, msZoomWindowMove, msZoomOutWindowMove, msDrag, msDragMove, msRotate, msRotateMove); @@ -1292,50 +1292,68 @@ begin end; -function FlameToXML(const cp1: TControlPoint; sheep: boolean; compact: boolean = false): string; +function FlameToXML(const cp1: TControlPoint; sheep: boolean; exporting: boolean = false): string; var t, i{, j}: integer; FileList: TStringList; x, y: double; - {varlist,} nick, url, pal, hue: string; + parameters: string; begin FileList := TStringList.create; x := cp1.center[0]; y := cp1.center[1]; + +{ // not supported by flam3 any more pal := ''; hue := ''; if sheep then begin if cp1.cmapindex >= 0 then pal := 'palette="' + IntToStr(cp1.cmapindex) + '" '; hue := 'hue="' + format('%g', [cp1.hue_rotation]) + '" '; end; +} +// if cp1.cmapindex >= 0 then pal := pal + 'gradient="' + IntToStr(cp1.cmapindex) + '" '; - if cp1.cmapindex >= 0 then - pal := pal + 'gradient="' + IntToStr(cp1.cmapindex) + '" '; - +{ // not supported by flam3 any more if Trim(SheepNick) <> '' then nick := 'nick="' + Trim(SheepNick) + '"'; if Trim(SheepURL) <> '' then url := 'url="' + Trim(SheepURL) + '" '; +} try - FileList.Add(' 0 then + 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) + 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('quality="%g" ', [cp1.sample_density]); + if cp1.nbatches <> 1 then parameters := parameters + 'batches="' + IntToStr(cp1.nbatches) + '" '; + + 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('gamma="%g" ', [cp1.gamma]) + - format('vibrancy="%g" ', [cp1.vibrancy]) + + format('gamma="%g" ', [cp1.gamma]); + + 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_minimum="%g" ', [cp1.estimator_min]) + format('estimator_curve="%g" ', [cp1.estimator_curve]) + format('temporal_samples="%d" ', [cp1.jitters]) + - format('gamma_threshold="%g" ', [cp1.gamma_treshold]) + - hue + url + nick + '>'); + format('gamma_threshold="%g" ', [cp1.gamma_treshold]); + FileList.Add(''); { Write transform parameters } t := cp1.NumXForms; for i := 0 to t - 1 do @@ -1355,9 +1373,10 @@ begin { Write palette data } if not sheep then begin - if compact then // say no to duplicated data! (?) - FileList.Add(ColorToXmlCompact(cp1)) - else FileList.Add(ColorToXml(cp1)); + if exporting then + FileList.Add(ColorToXml(cp1)) + else + FileList.Add(ColorToXmlCompact(cp1)); end; FileList.Add(''); @@ -1367,66 +1386,6 @@ begin 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(''); -// { 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(' ', [a, cc, b, d, e, f])); -// end; -// end; -// FileList.Add(''); -// result := FileList.text; -// finally -// FileList.free -// end; -//end; - - function RemoveExt(filename: string): string; var ext: string; @@ -1518,7 +1477,7 @@ begin until (Pos('<' + Tag + '>', FileList[FileList.count - 1]) <> 0) or (Pos('', FileList[FileList.count - 1]) <> 0); - FileList.Add(Trim(FlameToXML(cp1, false, true))); + FileList.Add(Trim(FlameToXML(cp1, false))); FileList.Add(''); FileList.SaveToFile(filename); @@ -1532,7 +1491,7 @@ begin AssignFile(IFile, filename); ReWrite(IFile); Writeln(IFile, ''); - Write(IFile, FlameToXML(cp1, false, true)); + Write(IFile, FlameToXML(cp1, false)); Writeln(IFile, ''); CloseFile(IFile); end; @@ -1839,7 +1798,7 @@ begin *) MainCp.name := RandomPrefix + RandomDate + '-' + IntToStr(RandomIndex); - Write(F, FlameToXML(MainCp, False, true)); + Write(F, FlameToXML(MainCp, False)); // Write(F, FlameToString(Title)); // WriteLn(F, ' '); end; @@ -2486,7 +2445,7 @@ begin AdjustForm.cmbPalette.ItemIndex := 0; // AdjustForm.cmbPalette.Items.clear; - ExportDialog.cmbDepth.ItemIndex := 3; + ExportDialog.cmbDepth.ItemIndex := 2; end; procedure TMainForm.FormClose(Sender: TObject; var Action: TCloseAction); @@ -3592,7 +3551,7 @@ procedure TMainForm.mnuCopyClick(Sender: TObject); var txt: string; begin - txt := Trim(FlameToXML(Maincp, false, true)); + txt := Trim(FlameToXML(Maincp, false)); Clipboard.SetTextBuf(PChar(txt)); mnuPaste.enabled := true; @@ -3693,7 +3652,7 @@ begin cp1.estimator_curve := ExportEstimatorCurve; cp1.jitters := ExportJitters; cp1.gamma_treshold := ExportGammaTreshold; - FileList.Text := FlameToXML(cp1, false); + FileList.Text := FlameToXML(cp1, false, true); FileList.SaveToFile(ChangeFileExt(ExportDialog.Filename, '.flame')); FileList.Clear; FileList.Add('@echo off'); diff --git a/2.10/Source/Options.dfm b/2.10/Source/Options.dfm index 59335a7..dad435d 100644 --- a/2.10/Source/Options.dfm +++ b/2.10/Source/Options.dfm @@ -358,10 +358,10 @@ object OptionsForm: TOptionsForm end object chkAutoEditMode: TCheckBox Left = 160 - Top = 84 - Width = 145 + Top = 80 + Width = 161 Height = 17 - Caption = 'Prefer "Auto" edit mode' + Caption = 'Prefer "Extended" edit mode' Checked = True State = cbChecked TabOrder = 2 diff --git a/2.10/Source/Options.pas b/2.10/Source/Options.pas index 8eb846b..0b21e10 100644 --- a/2.10/Source/Options.pas +++ b/2.10/Source/Options.pas @@ -717,7 +717,8 @@ end; procedure TOptionsForm.btnBrowseSoundClick(Sender: TObject); begin - OpenDialog.Filter := 'Waveform files (*.wav)|*.wav|MIDI files (*.mid)|*.mid'; + OpenDialog.InitialDir := ExtractFilePath(RenderCompleteSoundFile); + OpenDialog.Filter := 'Waveform files (*.wav)|*.wav'; OpenDialog.FileName := ''; if OpenDialog.Execute then begin @@ -728,7 +729,9 @@ end; procedure TOptionsForm.btnPlayClick(Sender: TObject); begin 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. diff --git a/2.10/Source/RenderThread.pas b/2.10/Source/RenderThread.pas index 71e7f65..c4d858a 100644 --- a/2.10/Source/RenderThread.pas +++ b/2.10/Source/RenderThread.pas @@ -22,8 +22,8 @@ unit RenderThread; interface uses - Classes, windows, Messages, Graphics, - controlPoint, Render, Render64, Render64MT, RenderMM, RenderMM_MT; + Classes, Windows, Messages, Graphics, + ControlPoint, Render, Render64, Render64MT, RenderMM, RenderMM_MT; const WM_THREAD_COMPLETE = WM_APP + 5437; diff --git a/2.10/Source/XForm.pas b/2.10/Source/XForm.pas index 543dd20..1b9d9d8 100644 --- a/2.10/Source/XForm.pas +++ b/2.10/Source/XForm.pas @@ -97,7 +97,7 @@ type procedure Cylinder; // var[25] procedure Noise; // var[26] procedure Blur; // var[27] - procedure Focus; // var[28] +// procedure Focus; // var[28] function Mul33(const M1, M2: TMatrix): TMatrix; function Identity: TMatrix; @@ -1543,6 +1543,7 @@ asm {$endif} end; +(* //--28--/////////////////////////////////////////////////////////////////////// procedure TXForm.Focus; {$ifndef _ASM_} @@ -1580,6 +1581,7 @@ asm fwait {$endif} end; +*) //***************************************************************************// @@ -1948,7 +1950,7 @@ begin FFunctionList[25] := Cylinder; FFunctionList[26] := Noise; FFunctionList[27] := Blur; - FFunctionList[28] := Focus; +// FFunctionList[28] := Focus; //registered // for i := 0 to High(FRegVariations) do @@ -2003,7 +2005,9 @@ var Name: string; Value: double; begin - result := Format(' 0 then result := result + format('symmetry="%g"', [symmetry]); + for i := 0 to nrvar - 1 do begin if vars[i] <> 0 then Result := Result + varnames(i) + format('="%g" ', [vars[i]]); diff --git a/2.10/Source/XFormMan.pas b/2.10/Source/XFormMan.pas index 5c53b19..f05fca3 100644 --- a/2.10/Source/XFormMan.pas +++ b/2.10/Source/XFormMan.pas @@ -6,7 +6,7 @@ uses BaseVariation; const - NRLOCVAR = 29; + NRLOCVAR = 28; function NrVar: integer; function Varnames(const index: integer): String; @@ -62,8 +62,7 @@ const 'bubble', 'cylinder', 'noise', - 'blur', - 'focus' + 'blur' ); begin if Index < NRLOCVAR then