changeset 18467:a7f17306279a draft

(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
author truebrain <truebrain@openttd.org>
date Wed, 23 Nov 2011 19:36:11 +0000
parents 2c1f4522114b
children 60f69a279c7f
files projects/openttd_vs100.vcxproj projects/openttd_vs100.vcxproj.filters projects/openttd_vs80.vcproj projects/openttd_vs90.vcproj source.list src/blitter/8bpp_debug.cpp src/blitter/8bpp_debug.hpp
diffstat 7 files changed, 0 insertions(+), 123 deletions(-) [+]
line wrap: on
line diff
--- a/projects/openttd_vs100.vcxproj
+++ b/projects/openttd_vs100.vcxproj
@@ -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" />
--- a/projects/openttd_vs100.vcxproj.filters
+++ b/projects/openttd_vs100.vcxproj.filters
@@ -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>
--- a/projects/openttd_vs80.vcproj
+++ b/projects/openttd_vs80.vcproj
@@ -3191,14 +3191,6 @@
 				>
 			</File>
 			<File
-				RelativePath=".\..\src\blitter\8bpp_debug.cpp"
-				>
-			</File>
-			<File
-				RelativePath=".\..\src\blitter\8bpp_debug.hpp"
-				>
-			</File>
-			<File
 				RelativePath=".\..\src\blitter\8bpp_optimized.cpp"
 				>
 			</File>
--- a/projects/openttd_vs90.vcproj
+++ b/projects/openttd_vs90.vcproj
@@ -3188,14 +3188,6 @@
 				>
 			</File>
 			<File
-				RelativePath=".\..\src\blitter\8bpp_debug.cpp"
-				>
-			</File>
-			<File
-				RelativePath=".\..\src\blitter\8bpp_debug.hpp"
-				>
-			</File>
-			<File
 				RelativePath=".\..\src\blitter\8bpp_optimized.cpp"
 				>
 			</File>
--- a/source.list
+++ b/source.list
@@ -745,8 +745,6 @@
 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
deleted file mode 100644
--- a/src/blitter/8bpp_debug.cpp
+++ /dev/null
@@ -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;
-}
deleted file mode 100644
--- a/src/blitter/8bpp_debug.hpp
+++ /dev/null
@@ -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 */