mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-01-21 13:10:04 -05:00
--Bug fixes
-EmberAnimate.exe was using 1-based indexing for filenames, but Fractorium and all of the documentation was using 0-based indexing. Make all use 0-based indexing.
This commit is contained in:
parent
27a9767316
commit
efa9dc072d
@ -190,8 +190,10 @@ bool EmberAnimate(int argc, _TCHAR* argv[], EmberOptions& opt)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
opt.FirstFrame(opt.Frame());
|
if (opt.Frame())
|
||||||
opt.LastFrame(opt.Frame() + 1);
|
opt.FirstFrame(opt.Frame() - 1);
|
||||||
|
|
||||||
|
opt.LastFrame(opt.FirstFrame() + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
//Prep all embers, by ensuring they:
|
//Prep all embers, by ensuring they:
|
||||||
@ -513,7 +515,7 @@ bool EmberAnimate(int argc, _TCHAR* argv[], EmberOptions& opt)
|
|||||||
|
|
||||||
if (opt.WriteGenome())
|
if (opt.WriteGenome())
|
||||||
{
|
{
|
||||||
auto flameName = MakeAnimFilename(inputPath, opt.Prefix(), opt.Suffix(), ".flame", padding, ftime);
|
auto flameName = MakeAnimFilename(inputPath, opt.Prefix(), opt.Suffix(), ".flame", padding, size_t(localTime));
|
||||||
|
|
||||||
if (opt.Verbose())
|
if (opt.Verbose())
|
||||||
{
|
{
|
||||||
@ -548,7 +550,7 @@ bool EmberAnimate(int argc, _TCHAR* argv[], EmberOptions& opt)
|
|||||||
//when running with OpenCL. Call join() to ensure the previous thread call has completed.
|
//when running with OpenCL. Call join() to ensure the previous thread call has completed.
|
||||||
Join(writeThread);
|
Join(writeThread);
|
||||||
auto threadVecIndex = finalImageIndex;//Cache before launching thread.
|
auto threadVecIndex = finalImageIndex;//Cache before launching thread.
|
||||||
auto baseFilename = MakeAnimFilename(inputPath, opt.Prefix(), opt.Suffix(), "", padding, ftime);
|
auto baseFilename = MakeAnimFilename(inputPath, opt.Prefix(), opt.Suffix(), "", padding, size_t(localTime));
|
||||||
|
|
||||||
if (opt.ThreadedWrite())//Copies of all but the first parameter are passed to saveFunc(), to avoid conflicting with those values changing when starting the render for the next image.
|
if (opt.ThreadedWrite())//Copies of all but the first parameter are passed to saveFunc(), to avoid conflicting with those values changing when starting the render for the next image.
|
||||||
{
|
{
|
||||||
|
@ -46,29 +46,23 @@ namespace apoconv
|
|||||||
{ "sinh(", "std::sinh(" },
|
{ "sinh(", "std::sinh(" },
|
||||||
{ "asin(", "std::asin(" },
|
{ "asin(", "std::asin(" },
|
||||||
{ "asinh(", "std::asinh(" },
|
{ "asinh(", "std::asinh(" },
|
||||||
|
|
||||||
{ "cos(", "std::cos(" },
|
{ "cos(", "std::cos(" },
|
||||||
{ "cosh(", "std::cosh(" },
|
{ "cosh(", "std::cosh(" },
|
||||||
{ "acos(", "std::acos(" },
|
{ "acos(", "std::acos(" },
|
||||||
{ "acosh(", "std::acosh(" },
|
{ "acosh(", "std::acosh(" },
|
||||||
|
|
||||||
{ "tan(", "std::tan(" },
|
{ "tan(", "std::tan(" },
|
||||||
{ "tanh(", "std::tanh(" },
|
{ "tanh(", "std::tanh(" },
|
||||||
{ "atan(", "std::atan(" },
|
{ "atan(", "std::atan(" },
|
||||||
{ "atan2(", "std::atan2(" },
|
{ "atan2(", "std::atan2(" },
|
||||||
{ "atanh(", "std::atanh(" },
|
{ "atanh(", "std::atanh(" },
|
||||||
|
|
||||||
{ "sqrt(", "std::sqrt(" },
|
{ "sqrt(", "std::sqrt(" },
|
||||||
{ "pow(", "std::pow(" },
|
{ "pow(", "std::pow(" },
|
||||||
{ "fabs(", "std::abs(" },
|
{ "fabs(", "std::abs(" },
|
||||||
{ "abs(", "std::abs(" },
|
{ "abs(", "std::abs(" },
|
||||||
{ "log(", "std::log(" },
|
{ "log(", "std::log(" },
|
||||||
{ "exp(", "std::exp(" },
|
{ "exp(", "std::exp(" },
|
||||||
|
|
||||||
{ "sqr(", "Sqr(" },
|
{ "sqr(", "Sqr(" },
|
||||||
|
|
||||||
{ "random01()", "rand.Frand01<T>()" },
|
{ "random01()", "rand.Frand01<T>()" },
|
||||||
|
|
||||||
{ "M_E", "T(M_E)" },
|
{ "M_E", "T(M_E)" },
|
||||||
{ "M_LOG2E", "T(M_LOG2E)" },
|
{ "M_LOG2E", "T(M_LOG2E)" },
|
||||||
{ "M_LOG10E", "T(M_LOG10E)" },
|
{ "M_LOG10E", "T(M_LOG10E)" },
|
||||||
@ -82,7 +76,6 @@ namespace apoconv
|
|||||||
{ "M_2_SQRTPI", "T(M_2_SQRTPI)" },
|
{ "M_2_SQRTPI", "T(M_2_SQRTPI)" },
|
||||||
{ "M_SQRT2", "T(M_SQRT2)" },
|
{ "M_SQRT2", "T(M_SQRT2)" },
|
||||||
{ "M_SQRT1_2", "T(M_SQRT1_2)" },
|
{ "M_SQRT1_2", "T(M_SQRT1_2)" },
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
public Form1()
|
public Form1()
|
||||||
@ -98,7 +91,6 @@ namespace apoconv
|
|||||||
return "";
|
return "";
|
||||||
|
|
||||||
//doexport = false;
|
//doexport = false;
|
||||||
|
|
||||||
bool isparvar = false;
|
bool isparvar = false;
|
||||||
string pluginname = "";
|
string pluginname = "";
|
||||||
string varclassname = "";
|
string varclassname = "";
|
||||||
@ -107,7 +99,6 @@ namespace apoconv
|
|||||||
m_PrecalcFuncLines.Clear();
|
m_PrecalcFuncLines.Clear();
|
||||||
m_CalcFuncLines.Clear();
|
m_CalcFuncLines.Clear();
|
||||||
m_FinalCalcFuncLines.Clear();
|
m_FinalCalcFuncLines.Clear();
|
||||||
|
|
||||||
bool structstart = false;
|
bool structstart = false;
|
||||||
|
|
||||||
foreach (var line in lines)
|
foreach (var line in lines)
|
||||||
@ -150,7 +141,6 @@ namespace apoconv
|
|||||||
Name = split.Trim(),
|
Name = split.Trim(),
|
||||||
MemberName = "m_" + split.RemoveFirst(pluginname + "_").FirstCharToUpper().Replace("_", "").Trim(),
|
MemberName = "m_" + split.RemoveFirst(pluginname + "_").FirstCharToUpper().Replace("_", "").Trim(),
|
||||||
});
|
});
|
||||||
|
|
||||||
isparvar = true;
|
isparvar = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -383,7 +373,6 @@ namespace apoconv
|
|||||||
|
|
||||||
final += "\t\thelper.Out.z = DefaultZ(helper);\r\n";
|
final += "\t\thelper.Out.z = DefaultZ(helper);\r\n";
|
||||||
final += "\t}\r\n";
|
final += "\t}\r\n";
|
||||||
|
|
||||||
final += "\r\n\tvirtual string OpenCLString() const override\r\n";
|
final += "\r\n\tvirtual string OpenCLString() const override\r\n";
|
||||||
final += "\t{\r\n";
|
final += "\t{\r\n";
|
||||||
final += "\t ostringstream ss, ss2;\r\n";
|
final += "\t ostringstream ss, ss2;\r\n";
|
||||||
@ -477,7 +466,6 @@ namespace apoconv
|
|||||||
|
|
||||||
if (isparvar)
|
if (isparvar)
|
||||||
{
|
{
|
||||||
|
|
||||||
final += "\r\nprotected:\r\n";
|
final += "\r\nprotected:\r\n";
|
||||||
final += "\tvoid Init()\r\n";
|
final += "\tvoid Init()\r\n";
|
||||||
final += "\t{\r\n";
|
final += "\t{\r\n";
|
||||||
@ -539,7 +527,6 @@ namespace apoconv
|
|||||||
private void textBox1_TextChanged(object sender, EventArgs e)
|
private void textBox1_TextChanged(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
textBox2.Text = Apo2Fractorium(textBox1.Lines, true);
|
textBox2.Text = Apo2Fractorium(textBox1.Lines, true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void textBox1_DragDrop(object sender, DragEventArgs e)
|
private void textBox1_DragDrop(object sender, DragEventArgs e)
|
||||||
@ -557,6 +544,13 @@ namespace apoconv
|
|||||||
var lines = File.ReadAllLines(file);
|
var lines = File.ReadAllLines(file);
|
||||||
tb1lines.AddRange(lines.ToList());
|
tb1lines.AddRange(lines.ToList());
|
||||||
final += Apo2Fractorium(lines, true);
|
final += Apo2Fractorium(lines, true);
|
||||||
|
/*
|
||||||
|
var guid = Guid.NewGuid();
|
||||||
|
var fileonly = System.IO.Path.GetFileName(file);
|
||||||
|
final += "<Component Id=\"" + fileonly + "\" Guid=\"" + guid + "\">\n";
|
||||||
|
final += "\t<File Id=\"" + fileonly + "\" Source = \"$(var.SolutionDir)..\\..\\..\\Data\\" + fileonly + "\" KeyPath=\"yes\" Checksum=\"yes\" ReadOnly=\"yes\"/>\n";
|
||||||
|
final += "</Component>\n\n";
|
||||||
|
*/
|
||||||
}
|
}
|
||||||
|
|
||||||
textBox1.Lines = tb1lines.ToArray();
|
textBox1.Lines = tb1lines.ToArray();
|
||||||
|
Loading…
Reference in New Issue
Block a user