mirror of
https://github.com/aseprite/aseprite.git
synced 2025-04-01 01:20:25 +00:00
Merge branch 'main' into beta
This commit is contained in:
commit
54a6ef5eb7
@ -892,7 +892,8 @@ void DocExporter::captureSamples(Samples& samples,
|
||||
.outerTagName(outerTag ? outerTag->name(): "")
|
||||
.frame(outputFrame)
|
||||
.tagFrame(innerTag ? frame - innerTag->fromFrame():
|
||||
outputFrame);
|
||||
outputFrame)
|
||||
.duration(sprite->frameDuration(frame));
|
||||
++outputFrame;
|
||||
|
||||
std::string filename = filename_formatter(format, fnInfo);
|
||||
|
@ -613,7 +613,8 @@ static void ase_file_write_start_chunk(FILE* f, dio::AsepriteFrameHeader* frame_
|
||||
chunk->type = type;
|
||||
chunk->start = ftell(f);
|
||||
|
||||
fseek(f, chunk->start+6, SEEK_SET);
|
||||
fputl(0, f);
|
||||
fputw(0, f);
|
||||
}
|
||||
|
||||
static void ase_file_write_close_chunk(FILE* f, dio::AsepriteChunk* chunk)
|
||||
|
@ -112,6 +112,7 @@ std::string filename_formatter(
|
||||
base::replace_string(output, "{layer}", info.layerName());
|
||||
base::replace_string(output, "{group}", info.groupName());
|
||||
base::replace_string(output, "{slice}", info.sliceName());
|
||||
base::replace_string(output, "{duration}", std::to_string(info.duration()));
|
||||
|
||||
if (replaceFrame) {
|
||||
base::replace_string(output, "{tag}", info.innerTagName());
|
||||
|
@ -24,6 +24,7 @@ namespace app {
|
||||
const std::string& sliceName() const { return m_sliceName; }
|
||||
int frame() const { return m_frame; }
|
||||
int tagFrame() const { return m_tagFrame; }
|
||||
int duration() const { return m_duration; }
|
||||
|
||||
FilenameInfo& filename(const std::string& value) {
|
||||
m_filename = value;
|
||||
@ -65,6 +66,11 @@ namespace app {
|
||||
return *this;
|
||||
}
|
||||
|
||||
FilenameInfo& duration(int value) {
|
||||
m_duration = value;
|
||||
return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string m_filename;
|
||||
std::string m_layerName;
|
||||
@ -74,6 +80,7 @@ namespace app {
|
||||
std::string m_sliceName;
|
||||
int m_frame;
|
||||
int m_tagFrame;
|
||||
int m_duration;
|
||||
};
|
||||
|
||||
// Returns the information inside {frame} tag.
|
||||
|
@ -630,10 +630,19 @@ void BrushPreview::createCrosshairCursor(ui::Graphics* g,
|
||||
}
|
||||
}
|
||||
if (requireLittleCenterDot) {
|
||||
if (m_type & CROSSHAIR) {
|
||||
if (k & (0x100 | 0x200)) { // 0x100 or 0x200
|
||||
cursorSurface->putPixel(
|
||||
(k == 0x100 || k == 0x300 ? black: white),
|
||||
(k & 0x100 ? black: white),
|
||||
cursorBounds.w/2, cursorBounds.h/2);
|
||||
}
|
||||
}
|
||||
else { // 0x300 or 0x301
|
||||
cursorSurface->putPixel(
|
||||
(k == 0x300 ? black: white),
|
||||
cursorBounds.w/2, cursorBounds.h/2);
|
||||
}
|
||||
}
|
||||
|
||||
cursor = g_bwCursors[k] =
|
||||
os::instance()->makeCursor(
|
||||
|
Loading…
x
Reference in New Issue
Block a user