Changeset - r6999:a48d4241d92d
[Not reviewed]
master
0 5 0
truelight - 17 years ago 2007-06-21 16:53:57
truelight@openttd.org
(svn r10255) -Codechange: remove some old debug code nobody was using anymore
5 files changed with 0 insertions and 41 deletions:
0 comments (0 inline, 0 general)
src/gfx.cpp
Show inline comments
 
@@ -19,16 +19,12 @@
 
#include "genworld.h"
 
#include "debug.h"
 
#include "zoom.hpp"
 
#include "texteff.hpp"
 
#include "blitter/factory.hpp"
 

	
 
#ifdef _DEBUG
 
bool _dbg_screen_rect;
 
#endif
 

	
 
byte _dirkeys;        ///< 1 = left, 2 = up, 4 = right, 8 = down
 
bool _fullscreen;
 
CursorVars _cursor;
 
bool _ctrl_pressed;   ///< Is Ctrl pressed?
 
bool _shift_pressed;  ///< Is Shift pressed?
 
byte _fast_forward;
 
@@ -893,26 +889,12 @@ void DrawMouseCursor()
 
	_video_driver->make_dirty(_cursor.draw_pos.x, _cursor.draw_pos.y, _cursor.draw_size.x, _cursor.draw_size.y);
 

	
 
	_cursor.visible = true;
 
	_cursor.dirty = false;
 
}
 

	
 
#if defined(_DEBUG)
 
static void DbgScreenRect(int left, int top, int right, int bottom)
 
{
 
	DrawPixelInfo dp;
 
	DrawPixelInfo *old;
 

	
 
	old = _cur_dpi;
 
	_cur_dpi = &dp;
 
	dp = _screen;
 
	GfxFillRect(left, top, right - 1, bottom - 1, rand() & 255);
 
	_cur_dpi = old;
 
}
 
#endif
 

	
 
void RedrawScreenRect(int left, int top, int right, int bottom)
 
{
 
	assert(right <= _screen.width && bottom <= _screen.height);
 
	if (_cursor.visible) {
 
		if (right > _cursor.draw_pos.x &&
 
				left < _cursor.draw_pos.x + _cursor.draw_size.x &&
 
@@ -920,17 +902,12 @@ void RedrawScreenRect(int left, int top,
 
				top < _cursor.draw_pos.y + _cursor.draw_size.y) {
 
			UndrawMouseCursor();
 
		}
 
	}
 
	UndrawTextMessage();
 

	
 
#if defined(_DEBUG)
 
	if (_dbg_screen_rect)
 
		DbgScreenRect(left, top, right, bottom);
 
	else
 
#endif
 
		DrawOverlappedWindowForAll(left, top, right, bottom);
 

	
 
	_video_driver->make_dirty(left, top, right - left, bottom - top);
 
}
 

	
 
void DrawDirtyBlocks()
src/gfx.h
Show inline comments
 
@@ -299,12 +299,7 @@ VARDEF byte _colour_gradient[16][8];
 
VARDEF bool _use_dos_palette;
 

	
 
enum StringColorFlags {
 
	IS_PALETTE_COLOR = 0x100, ///< color value is already a real palette color index, not an index of a StringColor
 
};
 

	
 

	
 
#ifdef _DEBUG
 
extern bool _dbg_screen_rect;
 
#endif
 

	
 
#endif /* GFX_H */
src/video/cocoa_v.mm
Show inline comments
 
@@ -74,16 +74,12 @@ extern "C" void HideMenuBar();
 
#include "../blitter/factory.hpp"
 
#include "../fileio.h"
 

	
 
#undef Point
 
#undef Rect
 

	
 
/* Taken from ../gfx.h */
 
extern bool _dbg_screen_rect;
 

	
 

	
 
/* Subclass of NSWindow to fix genie effect and support resize events  */
 
@interface OTTD_QuartzWindow : NSWindow
 
- (void)miniaturize:(id)sender;
 
- (void)display;
 
- (void)setFrame:(NSRect)frameRect display:(BOOL)flag;
 
- (void)appDidHide:(NSNotification*)note;
 
@@ -737,15 +733,12 @@ static void QZ_GameLoop()
 
		cur_ticks = GetTick();
 
		if (cur_ticks >= next_tick || (_fast_forward && !_pause_game) || cur_ticks < prev_cur_ticks) {
 
			next_tick = cur_ticks + 30;
 

	
 
			_ctrl_pressed = !!(_cocoa_video_data.current_mods & NSControlKeyMask);
 
			_shift_pressed = !!(_cocoa_video_data.current_mods & NSShiftKeyMask);
 
#ifdef _DEBUG
 
			_dbg_screen_rect = !!(_cocoa_video_data.current_mods & NSAlphaShiftKeyMask);
 
#endif
 

	
 
			GameLoop();
 

	
 
			_screen.dst_ptr = _cocoa_video_data.pixels;
 
			UpdateWindows();
 
			if (++pal_tick > 4) {
src/video/sdl_v.cpp
Show inline comments
 
@@ -473,15 +473,12 @@ static void SdlVideoMainLoop()
 
		cur_ticks = SDL_CALL SDL_GetTicks();
 
		if (cur_ticks >= next_tick || (_fast_forward && !_pause_game) || cur_ticks < prev_cur_ticks) {
 
			next_tick = cur_ticks + 30;
 

	
 
			_ctrl_pressed  = !!(mod & KMOD_CTRL);
 
			_shift_pressed = !!(mod & KMOD_SHIFT);
 
#ifdef _DEBUG
 
			_dbg_screen_rect = !!(mod & KMOD_CAPS);
 
#endif
 

	
 
			// determine which directional keys are down
 
			_dirkeys =
 
				(keys[SDLK_LEFT]  ? 1 : 0) |
 
				(keys[SDLK_UP]    ? 2 : 0) |
 
				(keys[SDLK_RIGHT] ? 4 : 0) |
src/video/win32_v.cpp
Show inline comments
 
@@ -823,15 +823,12 @@ static void Win32GdiMainLoop()
 

	
 
		cur_ticks = GetTickCount();
 
		if (cur_ticks >= next_tick || (_fast_forward && !_pause_game) || cur_ticks < prev_cur_ticks) {
 
			next_tick = cur_ticks + 30;
 
			_ctrl_pressed = _wnd.has_focus && GetAsyncKeyState(VK_CONTROL)<0;
 
			_shift_pressed = _wnd.has_focus && GetAsyncKeyState(VK_SHIFT)<0;
 
#ifdef _DEBUG
 
			_dbg_screen_rect = _wnd.has_focus && GetAsyncKeyState(VK_CAPITAL)<0;
 
#endif
 

	
 
			// determine which directional keys are down
 
			if (_wnd.has_focus) {
 
				_dirkeys =
 
					(GetAsyncKeyState(VK_LEFT) < 0 ? 1 : 0) +
 
					(GetAsyncKeyState(VK_UP) < 0 ? 2 : 0) +
0 comments (0 inline, 0 general)