Update to 1.10.0-beta1
This commit is contained in:
@@ -18,15 +18,15 @@
|
||||
|
||||
#include "../safeguards.h"
|
||||
|
||||
extern SmallVector<TileIndex, 256> _animated_tiles;
|
||||
extern std::vector<TileIndex> _animated_tiles;
|
||||
|
||||
/**
|
||||
* Save the ANIT chunk.
|
||||
*/
|
||||
static void Save_ANIT()
|
||||
{
|
||||
SlSetLength(_animated_tiles.Length() * sizeof(*_animated_tiles.Begin()));
|
||||
SlArray(_animated_tiles.Begin(), _animated_tiles.Length(), SLE_UINT32);
|
||||
SlSetLength(_animated_tiles.size() * sizeof(_animated_tiles.front()));
|
||||
SlArray(_animated_tiles.data(), _animated_tiles.size(), SLE_UINT32);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -42,15 +42,15 @@ static void Load_ANIT()
|
||||
|
||||
for (int i = 0; i < 256; i++) {
|
||||
if (anim_list[i] == 0) break;
|
||||
*_animated_tiles.Append() = anim_list[i];
|
||||
_animated_tiles.push_back(anim_list[i]);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
uint count = (uint)SlGetFieldLength() / sizeof(*_animated_tiles.Begin());
|
||||
_animated_tiles.Clear();
|
||||
_animated_tiles.Append(count);
|
||||
SlArray(_animated_tiles.Begin(), count, SLE_UINT32);
|
||||
uint count = (uint)SlGetFieldLength() / sizeof(_animated_tiles.front());
|
||||
_animated_tiles.clear();
|
||||
_animated_tiles.resize(_animated_tiles.size() + count);
|
||||
SlArray(_animated_tiles.data(), count, SLE_UINT32);
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -58,5 +58,5 @@ static void Load_ANIT()
|
||||
* the animated tile table.
|
||||
*/
|
||||
extern const ChunkHandler _animated_tile_chunk_handlers[] = {
|
||||
{ 'ANIT', Save_ANIT, Load_ANIT, NULL, NULL, CH_RIFF | CH_LAST},
|
||||
{ 'ANIT', Save_ANIT, Load_ANIT, nullptr, nullptr, CH_RIFF | CH_LAST},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user