diff options
author | frosch <frosch@openttd.org> | 2011-05-14 17:25:45 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2011-05-14 17:25:45 +0000 |
commit | 7415b9cca278e86db5ba00b84aa535057279ef37 (patch) | |
tree | 9f01e323319a68661a0ebcd8d846fdf52c70e0d3 /src/sprite.cpp | |
parent | 3183cb79079a20739e68966de2c0c0356e3c67b1 (diff) | |
download | openttd-7415b9cca278e86db5ba00b84aa535057279ef37.tar.xz |
(svn r22456) -Codechange: Derive NewGRFSpriteLayout from DrawTileSprites for spritelayouts allocated on the heap, and make use of constructors and destructors.
Diffstat (limited to 'src/sprite.cpp')
-rw-r--r-- | src/sprite.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/sprite.cpp b/src/sprite.cpp index 4e41be4f1..e9a83052c 100644 --- a/src/sprite.cpp +++ b/src/sprite.cpp @@ -110,17 +110,3 @@ void DrawCommonTileSeqInGUI(int x, int y, const DrawTileSprites *dts, int32 orig } } } - -/** Create a copy of an existing DrawTileSeqStruct array. */ -const DrawTileSeqStruct *CopyDrawTileSeqStruct(const DrawTileSeqStruct *dtss) -{ - const DrawTileSeqStruct *element; - - size_t count = 1; // 1 for the terminator - foreach_draw_tile_seq(element, dtss) count++; - - DrawTileSeqStruct *copy = MallocT<DrawTileSeqStruct>(count); - MemCpyT(copy, dtss, count); - - return copy; -} |