(svn r23311) -Remove: removed the silly blitter called 8bpp-debug. You can find him at the same place as you can find CTRL+D. Sorry for those who liked to trip while playing OpenTTD; I truly am sorry :D

This commit is contained in:
truebrain 2011-11-23 19:36:11 +00:00
parent f3bed7c328
commit e271463efa
7 changed files with 0 additions and 123 deletions

View File

@ -965,8 +965,6 @@
<ClInclude Include="..\src\blitter\32bpp_simple.hpp" />
<ClCompile Include="..\src\blitter\8bpp_base.cpp" />
<ClInclude Include="..\src\blitter\8bpp_base.hpp" />
<ClCompile Include="..\src\blitter\8bpp_debug.cpp" />
<ClInclude Include="..\src\blitter\8bpp_debug.hpp" />
<ClCompile Include="..\src\blitter\8bpp_optimized.cpp" />
<ClInclude Include="..\src\blitter\8bpp_optimized.hpp" />
<ClCompile Include="..\src\blitter\8bpp_simple.cpp" />

View File

@ -2115,12 +2115,6 @@
<ClInclude Include="..\src\blitter\8bpp_base.hpp">
<Filter>Blitters</Filter>
</ClInclude>
<ClCompile Include="..\src\blitter\8bpp_debug.cpp">
<Filter>Blitters</Filter>
</ClCompile>
<ClInclude Include="..\src\blitter\8bpp_debug.hpp">
<Filter>Blitters</Filter>
</ClInclude>
<ClCompile Include="..\src\blitter\8bpp_optimized.cpp">
<Filter>Blitters</Filter>
</ClCompile>

View File

@ -3190,14 +3190,6 @@
RelativePath=".\..\src\blitter\8bpp_base.hpp"
>
</File>
<File
RelativePath=".\..\src\blitter\8bpp_debug.cpp"
>
</File>
<File
RelativePath=".\..\src\blitter\8bpp_debug.hpp"
>
</File>
<File
RelativePath=".\..\src\blitter\8bpp_optimized.cpp"
>

View File

@ -3187,14 +3187,6 @@
RelativePath=".\..\src\blitter\8bpp_base.hpp"
>
</File>
<File
RelativePath=".\..\src\blitter\8bpp_debug.cpp"
>
</File>
<File
RelativePath=".\..\src\blitter\8bpp_debug.hpp"
>
</File>
<File
RelativePath=".\..\src\blitter\8bpp_optimized.cpp"
>

View File

@ -745,8 +745,6 @@ blitter/32bpp_simple.cpp
blitter/32bpp_simple.hpp
blitter/8bpp_base.cpp
blitter/8bpp_base.hpp
blitter/8bpp_debug.cpp
blitter/8bpp_debug.hpp
blitter/8bpp_optimized.cpp
blitter/8bpp_optimized.hpp
blitter/8bpp_simple.cpp

View File

@ -1,62 +0,0 @@
/* $Id$ */
/*
* 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/>.
*/
/** @file 8bpp_debug.cpp Implementation of 8 bpp debug blitter. */
#include "../stdafx.h"
#include "../zoom_func.h"
#include "../core/random_func.hpp"
#include "8bpp_debug.hpp"
/** Instantiation of the 8bpp debug blitter factory. */
static FBlitter_8bppDebug iFBlitter_8bppDebug;
void Blitter_8bppDebug::Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom)
{
const uint8 *src, *src_line;
uint8 *dst, *dst_line;
/* Find where to start reading in the source sprite */
src_line = (const uint8 *)bp->sprite + (bp->skip_top * bp->sprite_width + bp->skip_left) * ScaleByZoom(1, zoom);
dst_line = (uint8 *)bp->dst + bp->top * bp->pitch + bp->left;
for (int y = 0; y < bp->height; y++) {
dst = dst_line;
dst_line += bp->pitch;
src = src_line;
src_line += bp->sprite_width * ScaleByZoom(1, zoom);
for (int x = 0; x < bp->width; x++) {
if (*src != 0) *dst = *src;
dst++;
src += ScaleByZoom(1, zoom);
}
assert(src <= src_line);
}
}
Sprite *Blitter_8bppDebug::Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator)
{
Sprite *dest_sprite;
dest_sprite = (Sprite *)allocator(sizeof(*dest_sprite) + sprite->height * sprite->width);
dest_sprite->height = sprite->height;
dest_sprite->width = sprite->width;
dest_sprite->x_offs = sprite->x_offs;
dest_sprite->y_offs = sprite->y_offs;
/* Write a random colour as sprite; this makes debugging really easy */
uint colour = InteractiveRandom() % 150 + 2;
for (int i = 0; i < sprite->height * sprite->width; i++) {
dest_sprite->data[i] = (sprite->data[i].m == 0) ? 0 : colour;
}
return dest_sprite;
}

View File

@ -1,35 +0,0 @@
/* $Id$ */
/*
* 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/>.
*/
/** @file 8bpp_debug.hpp A 8 bpp blitter that uses random colours to show the drawn sprites. */
#ifndef BLITTER_8BPP_DEBUG_HPP
#define BLITTER_8BPP_DEBUG_HPP
#include "8bpp_base.hpp"
#include "factory.hpp"
/** 8bpp debug blitter; colours each sprite differently. */
class Blitter_8bppDebug : public Blitter_8bppBase {
public:
/* virtual */ void Draw(Blitter::BlitterParams *bp, BlitterMode mode, ZoomLevel zoom);
/* virtual */ Sprite *Encode(SpriteLoader::Sprite *sprite, AllocatorProc *allocator);
/* virtual */ const char *GetName() { return "8bpp-debug"; }
};
/** Factory for the 8bpp debug blitter. */
class FBlitter_8bppDebug: public BlitterFactory<FBlitter_8bppDebug> {
public:
/* virtual */ const char *GetName() { return "8bpp-debug"; }
/* virtual */ const char *GetDescription() { return "8bpp Debug Blitter (testing only)"; }
/* virtual */ Blitter *CreateInstance() { return new Blitter_8bppDebug(); }
};
#endif /* BLITTER_8BPP_DEBUG_HPP */