From 5d6c55d4c7dfd9ba3587f6a7794adbd30df06c24 Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Sun, 21 Feb 2010 07:31:28 +0000 Subject: [PATCH] Cleanup old unused stuff and use GUI status string --- Src/Display.cpp | 36 ------------------------------------ Src/Display.h | 5 ----- Src/NetworkWii.h | 2 +- 3 files changed, 1 insertion(+), 42 deletions(-) diff --git a/Src/Display.cpp b/Src/Display.cpp index 399cb66..f3f38a7 100644 --- a/Src/Display.cpp +++ b/Src/Display.cpp @@ -202,9 +202,6 @@ C64Display::C64Display(C64 *the_c64) : TheC64(the_c64) quit_requested = false; speedometer_string[0] = 0; networktraffic_string[0] = 0; - this->on_screen_message = NULL; - this->on_screen_message_start_time = 0; - this->on_screen_message_time = 0; memset(this->text_message, 0, sizeof(this->text_message)); this->text_message_idx = 0; this->entering_text_message = false; @@ -409,43 +406,10 @@ SDL_Surface *C64Display::SurfaceFromC64Display() return out; } -void C64Display::display_status_string(char *str, int seconds) -{ - Uint32 time_now = SDL_GetTicks(); - - this->on_screen_message = str; - this->on_screen_message_start_time = time_now; - this->on_screen_message_time = seconds; -} - /* * Draw string into surface using the C64 ROM font */ -void C64Display::draw_string(SDL_Surface *s, int x, int y, const char *str, uint8 front_color, uint8 back_color) -{ - uint8 *pb = (uint8 *)s->pixels + s->pitch*y + x; - char c; - while ((c = *str++) != 0) { - uint8 *q = TheC64->Char + c*8 + 0x800; - uint8 *p = pb; - for (int y=0; y<8; y++) { - uint8 v = *q++; - p[0] = (v & 0x80) ? front_color : back_color; - p[1] = (v & 0x40) ? front_color : back_color; - p[2] = (v & 0x20) ? front_color : back_color; - p[3] = (v & 0x10) ? front_color : back_color; - p[4] = (v & 0x08) ? front_color : back_color; - p[5] = (v & 0x04) ? front_color : back_color; - p[6] = (v & 0x02) ? front_color : back_color; - p[7] = (v & 0x01) ? front_color : back_color; - p += s->pitch; - } - pb += 8; - } -} - - /* * Draw speedometer */ diff --git a/Src/Display.h b/Src/Display.h index 2cd9fa8..952cdfa 100644 --- a/Src/Display.h +++ b/Src/Display.h @@ -127,7 +127,6 @@ public: #if defined(__unix) || defined(GEKKO) bool quit_requested; #endif - void display_status_string(char *str, int seconds); private: int led_state[4]; @@ -163,14 +162,10 @@ private: #ifdef HAVE_SDL char speedometer_string[16]; // Speedometer text char networktraffic_string[80]; // Speedometer text - void draw_string(SDL_Surface *s, int x, int y, const char *str, uint8 front_color, uint8 back_color); char text_message[80]; char *text_message_send; int text_message_idx; bool entering_text_message; - char *on_screen_message; - Uint32 on_screen_message_start_time; - int on_screen_message_time; #endif #ifdef __unix diff --git a/Src/NetworkWii.h b/Src/NetworkWii.h index ae47e84..3b361b3 100644 --- a/Src/NetworkWii.h +++ b/Src/NetworkWii.h @@ -90,7 +90,7 @@ void Network::InitNetwork() /* Try twice */ if (if_config(myIP, NULL, NULL, true) < 0) { if (if_config(myIP, NULL, NULL, true) < 0) - TheC64->TheDisplay->display_status_string((char*)"NO DHCP ANSWER", 1); + Gui::gui->status_bar->queueMessage("No DHCP reply"); } }