4 * This file is part of OpenTTD.
5 * 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.
6 * 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.
7 * 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/>.
10 /** @file 32bpp_base.cpp Implementation of base for 32 bpp blitters. */
12 #include "../stdafx.h"
13 #include "32bpp_base.hpp"
15 void *Blitter_32bppBase::Surface::move (void *video
, int x
, int y
)
17 return this->movep
<uint32
> (video
, x
, y
);
20 void Blitter_32bppBase::Surface::export_lines (void *dst
, uint dst_pitch
, uint y
, uint height
)
22 uint32
*udst
= (uint32
*)dst
;
23 const uint32
*src
= this->movep
<const uint32
> (this->ptr
, 0, y
);
25 for (; height
> 0; height
--) {
26 memcpy(udst
, src
, width
* sizeof(uint32
));
32 void Blitter_32bppBase::Surface::scroll (int left
, int top
, int width
, int height
, int dx
, int dy
)
34 this->Blitter::Surface::scroll
<uint32
> (this->ptr
, left
, top
, width
, height
, dx
, dy
);