2007-12-26 23:04:26 +00:00
|
|
|
/* $Id$ */
|
|
|
|
|
2009-08-21 20:21:05 +00:00
|
|
|
/*
|
|
|
|
* This file is part of OpenTTD.
|
|
|
|
* OpenTTD is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 2.
|
|
|
|
* OpenTTD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
|
|
|
* See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2007-12-26 23:04:26 +00:00
|
|
|
/** @file null.cpp A blitter that doesn't blit. */
|
|
|
|
|
2007-06-12 20:24:12 +00:00
|
|
|
#include "../stdafx.h"
|
|
|
|
#include "null.hpp"
|
|
|
|
|
2011-05-01 10:15:33 +00:00
|
|
|
/** Instantiation of the null blitter factory. */
|
2007-06-12 20:24:12 +00:00
|
|
|
static FBlitter_Null iFBlitter_Null;
|
|
|
|
|
2011-01-14 15:34:33 +00:00
|
|
|
Sprite *Blitter_Null::Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator)
|
2007-06-12 20:24:12 +00:00
|
|
|
{
|
|
|
|
Sprite *dest_sprite;
|
|
|
|
dest_sprite = (Sprite *)allocator(sizeof(*dest_sprite));
|
|
|
|
|
|
|
|
dest_sprite->height = sprite->height;
|
|
|
|
dest_sprite->width = sprite->width;
|
|
|
|
dest_sprite->x_offs = sprite->x_offs;
|
|
|
|
dest_sprite->y_offs = sprite->y_offs;
|
|
|
|
|
|
|
|
return dest_sprite;
|
|
|
|
}
|