mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-30 06:32:42 +00:00
Remove dependency to modules/palettes.h in sprite.cpp.
This commit is contained in:
parent
1094328cc7
commit
752ffa6444
@ -31,8 +31,10 @@
|
||||
#include "app/color.h"
|
||||
#include "modules/editors.h"
|
||||
#include "modules/gui.h"
|
||||
#include "modules/palettes.h"
|
||||
#include "raster/image.h"
|
||||
#include "raster/layer.h"
|
||||
#include "raster/palette.h"
|
||||
#include "raster/sprite.h"
|
||||
#include "raster/undo.h"
|
||||
#include "util/misc.h"
|
||||
@ -191,7 +193,9 @@ static Sprite* new_sprite(Context* context, int imgtype, int w, int h, int ncolo
|
||||
ASSERT(w >= 1 && w <= 9999);
|
||||
ASSERT(h >= 1 && h <= 9999);
|
||||
|
||||
return Sprite::createWithLayer(imgtype, w, h, ncolors);
|
||||
Sprite* sprite = Sprite::createWithLayer(imgtype, w, h, ncolors);
|
||||
get_default_palette()->copyColorsTo(sprite->getCurrentPalette());
|
||||
return sprite;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "Vaca/ScopedLock.h"
|
||||
|
||||
#include "file/format_options.h"
|
||||
#include "modules/palettes.h"
|
||||
#include "raster/raster.h"
|
||||
#include "util/boundary.h"
|
||||
|
||||
@ -487,7 +486,6 @@ SpriteImpl::SpriteImpl(Sprite* sprite, int imgtype, int width, int height, int n
|
||||
// For colored images
|
||||
case IMAGE_RGB:
|
||||
case IMAGE_INDEXED:
|
||||
get_default_palette()->copyColorsTo(&pal);
|
||||
pal.resize(ncolors);
|
||||
break;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user