mirror of
https://github.com/aseprite/aseprite.git
synced 2025-03-14 04:19:12 +00:00
Remove CliOpenFile argument from CliDelegate::loadPalette()
It wasn't used.
This commit is contained in:
parent
768773bb3a
commit
5309991d0d
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2018-2019 Igara Studio S.A.
|
||||
// Copyright (C) 2018-2022 Igara Studio S.A.
|
||||
// Copyright (C) 2016-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -30,7 +30,7 @@ namespace app {
|
||||
virtual void beforeOpenFile(const CliOpenFile& cof) { }
|
||||
virtual void afterOpenFile(const CliOpenFile& cof) { }
|
||||
virtual void saveFile(Context* ctx, const CliOpenFile& cof) { }
|
||||
virtual void loadPalette(Context* ctx, const CliOpenFile& cof, const std::string& filename) { }
|
||||
virtual void loadPalette(Context* ctx, const std::string& filename) { }
|
||||
virtual void exportFiles(Context* ctx, DocExporter& exporter) { }
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
virtual int execScript(const std::string& filename,
|
||||
|
@ -437,7 +437,7 @@ int CliProcessor::process(Context* ctx)
|
||||
ASSERT(cof.document == lastDoc);
|
||||
|
||||
std::string filename = value.value();
|
||||
m_delegate->loadPalette(ctx, cof, filename);
|
||||
m_delegate->loadPalette(ctx, filename);
|
||||
}
|
||||
else {
|
||||
console.printf("You need to load a document to change its palette with --palette\n");
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2018-2020 Igara Studio S.A.
|
||||
// Copyright (C) 2018-2022 Igara Studio S.A.
|
||||
// Copyright (C) 2016-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -103,7 +103,6 @@ void DefaultCliDelegate::saveFile(Context* ctx, const CliOpenFile& cof)
|
||||
}
|
||||
|
||||
void DefaultCliDelegate::loadPalette(Context* ctx,
|
||||
const CliOpenFile& cof,
|
||||
const std::string& filename)
|
||||
{
|
||||
std::unique_ptr<doc::Palette> palette(load_palette(filename.c_str()));
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2018-2019 Igara Studio S.A.
|
||||
// Copyright (C) 2018-2022 Igara Studio S.A.
|
||||
// Copyright (C) 2016-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -19,7 +19,7 @@ namespace app {
|
||||
void showVersion() override;
|
||||
void afterOpenFile(const CliOpenFile& cof) override;
|
||||
void saveFile(Context* ctx, const CliOpenFile& cof) override;
|
||||
void loadPalette(Context* ctx, const CliOpenFile& cof, const std::string& filename) override;
|
||||
void loadPalette(Context* ctx, const std::string& filename) override;
|
||||
void exportFiles(Context* ctx, DocExporter& exporter) override;
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
int execScript(const std::string& filename,
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2018-2020 Igara Studio S.A.
|
||||
// Copyright (C) 2018-2022 Igara Studio S.A.
|
||||
// Copyright (C) 2016-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -167,14 +167,9 @@ void PreviewCliDelegate::saveFile(Context* ctx, const CliOpenFile& cof)
|
||||
}
|
||||
|
||||
void PreviewCliDelegate::loadPalette(Context* ctx,
|
||||
const CliOpenFile& cof,
|
||||
const std::string& filename)
|
||||
{
|
||||
ASSERT(cof.document);
|
||||
ASSERT(cof.document->sprite());
|
||||
|
||||
std::cout << "- Load palette:\n"
|
||||
<< " - Sprite: '" << cof.filename << "'\n"
|
||||
<< " - Palette: '" << filename << "'\n";
|
||||
}
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
// Aseprite
|
||||
// Copyright (C) 2018-2019 Igara Studio S.A.
|
||||
// Copyright (C) 2018-2022 Igara Studio S.A.
|
||||
// Copyright (C) 2016-2018 David Capello
|
||||
//
|
||||
// This program is distributed under the terms of
|
||||
@ -29,9 +29,7 @@ namespace app {
|
||||
void beforeOpenFile(const CliOpenFile& cof) override;
|
||||
void afterOpenFile(const CliOpenFile& cof) override;
|
||||
void saveFile(Context* ctx, const CliOpenFile& cof) override;
|
||||
void loadPalette(Context* ctx,
|
||||
const CliOpenFile& cof,
|
||||
const std::string& filename) override;
|
||||
void loadPalette(Context* ctx, const std::string& filename) override;
|
||||
void exportFiles(Context* ctx, DocExporter& exporter) override;
|
||||
#ifdef ENABLE_SCRIPTING
|
||||
int execScript(const std::string& filename,
|
||||
|
Loading…
x
Reference in New Issue
Block a user