mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-08 23:19:40 +00:00
(svn r10255) -Codechange: remove some old debug code nobody was using anymore
This commit is contained in:
parent
56eb1738ee
commit
af8a234db0
25
src/gfx.cpp
25
src/gfx.cpp
@ -22,10 +22,6 @@
|
|||||||
#include "texteff.hpp"
|
#include "texteff.hpp"
|
||||||
#include "blitter/factory.hpp"
|
#include "blitter/factory.hpp"
|
||||||
|
|
||||||
#ifdef _DEBUG
|
|
||||||
bool _dbg_screen_rect;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
byte _dirkeys; ///< 1 = left, 2 = up, 4 = right, 8 = down
|
byte _dirkeys; ///< 1 = left, 2 = up, 4 = right, 8 = down
|
||||||
bool _fullscreen;
|
bool _fullscreen;
|
||||||
CursorVars _cursor;
|
CursorVars _cursor;
|
||||||
@ -896,20 +892,6 @@ void DrawMouseCursor()
|
|||||||
_cursor.dirty = false;
|
_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)
|
void RedrawScreenRect(int left, int top, int right, int bottom)
|
||||||
{
|
{
|
||||||
assert(right <= _screen.width && bottom <= _screen.height);
|
assert(right <= _screen.width && bottom <= _screen.height);
|
||||||
@ -923,12 +905,7 @@ void RedrawScreenRect(int left, int top, int right, int bottom)
|
|||||||
}
|
}
|
||||||
UndrawTextMessage();
|
UndrawTextMessage();
|
||||||
|
|
||||||
#if defined(_DEBUG)
|
DrawOverlappedWindowForAll(left, top, right, bottom);
|
||||||
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);
|
_video_driver->make_dirty(left, top, right - left, bottom - top);
|
||||||
}
|
}
|
||||||
|
@ -302,9 +302,4 @@ enum StringColorFlags {
|
|||||||
IS_PALETTE_COLOR = 0x100, ///< color value is already a real palette color index, not an index of a StringColor
|
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 */
|
#endif /* GFX_H */
|
||||||
|
@ -77,10 +77,6 @@ extern "C" void HideMenuBar();
|
|||||||
#undef Point
|
#undef Point
|
||||||
#undef Rect
|
#undef Rect
|
||||||
|
|
||||||
/* Taken from ../gfx.h */
|
|
||||||
extern bool _dbg_screen_rect;
|
|
||||||
|
|
||||||
|
|
||||||
/* Subclass of NSWindow to fix genie effect and support resize events */
|
/* Subclass of NSWindow to fix genie effect and support resize events */
|
||||||
@interface OTTD_QuartzWindow : NSWindow
|
@interface OTTD_QuartzWindow : NSWindow
|
||||||
- (void)miniaturize:(id)sender;
|
- (void)miniaturize:(id)sender;
|
||||||
@ -740,9 +736,6 @@ static void QZ_GameLoop()
|
|||||||
|
|
||||||
_ctrl_pressed = !!(_cocoa_video_data.current_mods & NSControlKeyMask);
|
_ctrl_pressed = !!(_cocoa_video_data.current_mods & NSControlKeyMask);
|
||||||
_shift_pressed = !!(_cocoa_video_data.current_mods & NSShiftKeyMask);
|
_shift_pressed = !!(_cocoa_video_data.current_mods & NSShiftKeyMask);
|
||||||
#ifdef _DEBUG
|
|
||||||
_dbg_screen_rect = !!(_cocoa_video_data.current_mods & NSAlphaShiftKeyMask);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
GameLoop();
|
GameLoop();
|
||||||
|
|
||||||
|
@ -476,9 +476,6 @@ static void SdlVideoMainLoop()
|
|||||||
|
|
||||||
_ctrl_pressed = !!(mod & KMOD_CTRL);
|
_ctrl_pressed = !!(mod & KMOD_CTRL);
|
||||||
_shift_pressed = !!(mod & KMOD_SHIFT);
|
_shift_pressed = !!(mod & KMOD_SHIFT);
|
||||||
#ifdef _DEBUG
|
|
||||||
_dbg_screen_rect = !!(mod & KMOD_CAPS);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// determine which directional keys are down
|
// determine which directional keys are down
|
||||||
_dirkeys =
|
_dirkeys =
|
||||||
|
@ -826,9 +826,6 @@ static void Win32GdiMainLoop()
|
|||||||
next_tick = cur_ticks + 30;
|
next_tick = cur_ticks + 30;
|
||||||
_ctrl_pressed = _wnd.has_focus && GetAsyncKeyState(VK_CONTROL)<0;
|
_ctrl_pressed = _wnd.has_focus && GetAsyncKeyState(VK_CONTROL)<0;
|
||||||
_shift_pressed = _wnd.has_focus && GetAsyncKeyState(VK_SHIFT)<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
|
// determine which directional keys are down
|
||||||
if (_wnd.has_focus) {
|
if (_wnd.has_focus) {
|
||||||
|
Loading…
Reference in New Issue
Block a user