Make doc::RgbMap a regular object (don't need to be an doc::Object)

This commit is contained in:
David Capello 2020-04-10 08:58:59 -03:00
parent 2af6a0493e
commit bbb6b83905
3 changed files with 24 additions and 18 deletions

View File

@ -1,5 +1,5 @@
// Aseprite Document Library
// Copyright (C) 2019 Igara Studio S.A.
// Copyright (C) 2019-2020 Igara Studio S.A.
// Copyright (C) 2001-2017 David Capello
//
// This file is released under the terms of the MIT license.
@ -12,20 +12,25 @@
namespace doc {
enum class ObjectType {
Unknown,
Image,
Palette,
RgbMap,
Path,
Mask,
Cel,
CelData,
LayerImage,
LayerGroup,
Sprite,
Document,
Tag,
Slice,
Unknown = 0,
Image = 1,
Palette = 2,
// Deprecated values, we cannot re-use these indexes because
// backup sessions use them (check readLayer() function in
// src/app/crash/read_document.cpp).
//RgbMap = 3,
//Path = 4,
Mask = 5,
Cel = 6,
CelData = 7,
LayerImage = 8,
LayerGroup = 9,
Sprite = 10,
Document = 11,
Tag = 12,
Slice = 13,
};
} // namespace doc

View File

@ -1,4 +1,5 @@
// Aseprite Document Library
// Copyright (c) 2020 Igara Studio S.A.
// Copyright (c) 2001-2015 David Capello
//
// This file is released under the terms of the MIT license.
@ -22,8 +23,7 @@ namespace doc {
#define MAPSIZE (RSIZE*GSIZE*BSIZE*ASIZE)
RgbMap::RgbMap()
: Object(ObjectType::RgbMap)
, m_map(MAPSIZE)
: m_map(MAPSIZE)
, m_palette(NULL)
, m_modifications(0)
, m_maskIndex(0)

View File

@ -1,4 +1,5 @@
// Aseprite Document Library
// Copyright (c) 2020 Igara Studio S.A.
// Copyright (c) 2001-2016 David Capello
//
// This file is released under the terms of the MIT license.
@ -19,7 +20,7 @@ namespace doc {
class Palette;
// It acts like a cache for Palette:findBestfit() calls.
class RgbMap : public Object {
class RgbMap {
// Bit activated on m_map entries that aren't yet calculated.
const int INVALID = 256;