diff options
author | dominik <dominik@openttd.org> | 2004-08-25 08:55:53 +0000 |
---|---|---|
committer | dominik <dominik@openttd.org> | 2004-08-25 08:55:53 +0000 |
commit | 7701b0a24151de04036cbf7855354a42daed5b11 (patch) | |
tree | 8292c16ffe7e31e7276050ef6b0b4e63238b4bd5 /console.c | |
parent | 5505a10b80e8f17c4a13f8793dfcdaebbe95eb29 (diff) | |
download | openttd-7701b0a24151de04036cbf7855354a42daed5b11.tar.xz |
(svn r137) Fix: console sometime didn't open (sign_de)
Diffstat (limited to 'console.c')
-rw-r--r-- | console.c | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -16,7 +16,7 @@ static byte* _iconsole_buffer[80]; static byte _iconsole_cbuffer[80]; static byte _iconsole_cmdline[255]; static byte _iconsole_cmdpos; -static byte _iconsole_mode; +static byte _iconsole_mode = ICONSOLE_CLOSED; static byte _iconsole_color_default = 1; static byte _iconsole_color_error = 3; static byte _iconsole_color_debug = 5; @@ -66,7 +66,8 @@ static void IConsoleWndProc(Window *w, WindowEvent *e) { switch(e->event) { - case WE_PAINT: + case WE_PAINT:
+
GfxFillRect(w->left,w->top,w->width,w->height-1,0); { int i=_iconsole_scroll; @@ -82,10 +83,6 @@ static void IConsoleWndProc(Window *w, WindowEvent *e) case WE_TICK: - if (_iconsole_mode==ICONSOLE_OPENING) { - _iconsole_mode=ICONSOLE_OPENED; - } - _icursor_counter++; if (_icursor_counter>_icursor_rate) { _icursor_state=!_icursor_state; @@ -223,7 +220,7 @@ void IConsoleSwitch() _iconsole_win = AllocateWindowDesc(&_iconsole_window_desc); _iconsole_win->height = _screen.height / 3; _iconsole_win->width= _screen.width; - _iconsole_mode=ICONSOLE_OPENING; + _iconsole_mode=ICONSOLE_OPENED; } else if (_iconsole_mode==ICONSOLE_OPENED) { DeleteWindow(_iconsole_win); @@ -236,7 +233,8 @@ void IConsoleSwitch() } void IConsoleClose() { -if (_iconsole_mode==ICONSOLE_OPENED) IConsoleSwitch(); +if (_iconsole_mode==ICONSOLE_OPENED) IConsoleSwitch();
+_iconsole_mode=ICONSOLE_CLOSED; } void IConsoleOpen() { @@ -1188,7 +1186,6 @@ static void IConsoleStdLibRegister() { var = IConsoleVarAlloc(ICONSOLE_VAR_UINT32); IConsoleVarInsert(var,"temp_uint32"); - var = IConsoleVarAlloc(ICONSOLE_VAR_STRING); IConsoleVarInsert(var,"temp_string"); } |