mirror of
https://bitbucket.org/mfeemster/fractorium.git
synced 2025-07-15 20:54:53 -04:00
--User changes
-Remove the option --intpalette to format the palette in the xml as ints. If they are not hex formatted, then they should always be float. This option was pointless. -Cleanup some options text for the command line programs. -Allow for dragging around flames in the library tab. This is useful for setting up the order of an animation. -Make the opening of large files in Fractorium much more efficient when not-appending. -Make the opening of large files in all EmberRender and EmberAnimate more efficient. -Better error reporting when opening files. --Bug fixes -Get rid of leftover artifacts that would appear on preview thumbnails when either switching SP/DP or re-rendering previews. -Filename extension was not being appended on Linux when saving as Xml, thus making it impossible to drag that file back in becase drop is filtered on extension. --Code changes -Move GCC compiler spec to C++14. Building with 5.3 now on linux. -Use inline member data initializers. -Make a #define for static for use in Utils.h to make things a little cleaner. -Make various functions able to take arbitrary collections as their parameters rather than just vectors. -Make library collection a list rather than vector. This alleviates the need to re-sync pointers whenever the collection changes. -Subclass QTreeWidget for the library tree. Two new files added for this. -Remove all usage of #ifdef ROW_ONLY_DE in DEOpenCLKernelCreator, it was never used. -Add move constructor and assignment operator to EmberFile. -Add the ability to use a pointer to outside memory in the renderer for the vector of Ember<T>. -Make a lot more functions const where they should be.
This commit is contained in:
@ -25,8 +25,6 @@ public:
|
||||
/// </summary>
|
||||
Palette()
|
||||
{
|
||||
m_Name = "-";
|
||||
m_Index = -1;
|
||||
m_Entries.resize(COLORMAP_LENGTH);
|
||||
Clear();
|
||||
}
|
||||
@ -119,12 +117,9 @@ public:
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Empty destructor.
|
||||
/// Needed to eliminate warnings about inlining.
|
||||
/// </summary>
|
||||
~Palette()
|
||||
{
|
||||
}
|
||||
~Palette() = default;
|
||||
|
||||
/// <summary>
|
||||
/// Default assignment operator.
|
||||
@ -149,7 +144,7 @@ public:
|
||||
m_Index = palette.m_Index;
|
||||
m_Name = palette.m_Name;
|
||||
m_Filename = palette.m_Filename;
|
||||
CopyVec(m_Entries, palette.m_Entries);
|
||||
CopyCont(m_Entries, palette.m_Entries);
|
||||
return *this;
|
||||
}
|
||||
|
||||
@ -163,6 +158,16 @@ public:
|
||||
return m_Entries[i];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convenience [] operator to index into the color entries vector in a const context.
|
||||
/// </summary>
|
||||
/// <param name="i">The index to get</param>
|
||||
/// <returns>The color value at the specified index</returns>
|
||||
const v4T& operator[] (size_t i) const
|
||||
{
|
||||
return m_Entries[i];
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Convenience * operator to get a pointer to the beginning of the color entries vector.
|
||||
/// </summary>
|
||||
@ -421,7 +426,7 @@ public:
|
||||
/// </summary>
|
||||
/// <param name="rgb">The RGB buffer</param>
|
||||
/// <param name="hsv">The HSV buffer</param>
|
||||
static void RgbToHsv(T* rgb, T* hsv)
|
||||
static void RgbToHsv(const T* rgb, T* hsv)
|
||||
{
|
||||
RgbToHsv(rgb[0], rgb[1], rgb[2], hsv[0], hsv[1], hsv[2]);
|
||||
}
|
||||
@ -576,9 +581,9 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
int m_Index;//Index in the xml palette file of this palette, use -1 for random.
|
||||
string m_Name;//Name of this palette.
|
||||
int m_Index = -1;//Index in the xml palette file of this palette, use -1 for random.
|
||||
string m_Name = "-";//Name of this palette.
|
||||
shared_ptr<string> m_Filename;//Name of the parent file this palette came from, can be empty.
|
||||
vector<v4T> m_Entries;//Storage for the color values.
|
||||
vector<v4T> m_Entries;
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user