diff options
Diffstat (limited to 'engines/mads/scene_data.cpp')
-rw-r--r-- | engines/mads/scene_data.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/engines/mads/scene_data.cpp b/engines/mads/scene_data.cpp index cec3e457a0..db2237557b 100644 --- a/engines/mads/scene_data.cpp +++ b/engines/mads/scene_data.cpp @@ -78,6 +78,19 @@ void SpriteSlots::deleteEntry(int index) { remove_at(index); } +/*------------------------------------------------------------------------*/ + +int SpriteSets::add(SpriteAsset *asset, int idx) { + if (!idx) + idx = size(); + + if (idx >= (size() + 1)) + resize(idx + 1); + delete (*this)[idx]; + (*this)[idx] = asset; + + return idx; +} /*------------------------------------------------------------------------*/ |