diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/game.h | 4 | ||||
-rw-r--r-- | src/graphic/graphic.cpp | 6 | ||||
-rw-r--r-- | src/gui/char_select.cpp | 4 | ||||
-rw-r--r-- | src/gui/char_server.cpp | 2 | ||||
-rw-r--r-- | src/gui/login.cpp | 2 | ||||
-rw-r--r-- | src/main.cpp | 16 | ||||
-rw-r--r-- | src/main.h | 4 |
7 files changed, 19 insertions, 19 deletions
@@ -18,8 +18,7 @@ * along with The Mana World; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * By ElvenProgrammer aka Eugenio Favalli (umperio@users.upagiro.net) - * kth5 aka Alexander Baldeck + * $Id$ */ #ifdef WIN32 @@ -67,7 +66,6 @@ extern char map_path[480]; extern DIALOG skill_dialog[]; -extern DIALOG stats_dialog[]; extern int fps, frame, current_npc; extern char walk_status; extern unsigned short src_x, src_y, x, y; diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp index b00f602f..7b29ea66 100644 --- a/src/graphic/graphic.cpp +++ b/src/graphic/graphic.cpp @@ -163,8 +163,6 @@ GraphicEngine::GraphicEngine() { guiTop->add(chatInput); - chatInput->requestFocus(); - // Create dialogs statusWindow = new StatusWindow(guiTop); @@ -192,6 +190,10 @@ GraphicEngine::GraphicEngine() { skill_player = init_dialog(skill_dialog, -1); skill_list_player = init_dialog(skill_list_dialog, -1); + // Give focus to the chat input + chatInput->requestFocus(); + + // SDL probably doesn't need this buffer, it'll buffer for us. buffer = create_bitmap(SCREEN_W, SCREEN_H); if (!buffer) { error("Not enough memory to create buffer"); diff --git a/src/gui/char_select.cpp b/src/gui/char_select.cpp index 04fa5317..eaada80d 100644 --- a/src/gui/char_select.cpp +++ b/src/gui/char_select.cpp @@ -225,7 +225,7 @@ void charSelect() } // Draw background - blit((BITMAP *)graphic[LOGIN_BMP].dat, buffer, 0, 0, 0, 0, 800, 600); + blit(login_wallpaper, buffer, 0, 0, 0, 0, 800, 600); gui_update(NULL); @@ -312,7 +312,7 @@ void charCreate() state != CHAR_SELECT) { // Draw background - blit((BITMAP *)graphic[LOGIN_BMP].dat, buffer, 0, 0, 0, 0, 800, 600); + blit(login_wallpaper, buffer, 0, 0, 0, 0, 800, 600); gui_update(NULL); diff --git a/src/gui/char_server.cpp b/src/gui/char_server.cpp index 6fcb98d1..38fb0595 100644 --- a/src/gui/char_server.cpp +++ b/src/gui/char_server.cpp @@ -108,7 +108,7 @@ void char_server() { showServerList = 1; while (showServerList) { - blit((BITMAP *)graphic[LOGIN_BMP].dat, buffer, 0, 0, 0, 0, 800, 600); + blit(login_wallpaper, buffer, 0, 0, 0, 0, 800, 600); gui_update(NULL); blit(buffer, screen, 0, 0, 0, 0, 800, 600); } diff --git a/src/gui/login.cpp b/src/gui/login.cpp index 45968c25..bf294c32 100644 --- a/src/gui/login.cpp +++ b/src/gui/login.cpp @@ -127,7 +127,7 @@ void login() { LoginDialog *dialog = new LoginDialog(guiTop); while (state == LOGIN) { - blit((BITMAP *)graphic[LOGIN_BMP].dat, buffer, 0, 0, 0, 0, 800, 600); + blit(login_wallpaper, buffer, 0, 0, 0, 0, 800, 600); gui_update(NULL); blit(buffer, screen, 0, 0, 0, 0, 800, 600); if (key[KEY_ESC]) { diff --git a/src/main.cpp b/src/main.cpp index 583e90d6..c6690fea 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -72,8 +72,8 @@ char sex, n_server, n_character; SERVER_INFO *server_info; PLAYER_INFO *char_info = new PLAYER_INFO; -BITMAP *playerset, *hairset; -DATAFILE *graphic, *weaponset; +BITMAP *playerset, *hairset, *login_wallpaper; +DATAFILE *weaponset; char username[LEN_USERNAME]; char password[LEN_PASSWORD]; @@ -267,14 +267,14 @@ void init_engine() { error("Not enough memory to create buffer"); } - // TODO: Remove datafile usage - graphic = load_datafile("./data/graphic/graphic.dat"); - if (graphic == NULL) { - error("Unable to load graphic datafile"); - } + login_wallpaper = load_bitmap("./data/graphic/login.bmp", NULL); + if (!login_wallpaper) error("Couldn't load login.bmp"); + + playerset = load_bitmap("./data/graphic/playerset.bmp", NULL); + if (!playerset) error("Couldn't load playerset.bmp"); - playerset = (BITMAP*)graphic[PLAYERSET_BMP].dat; hairset = load_bitmap("./data/graphic/hairset.bmp", NULL); + if (!hairset) error("Couldn't load hairset.bmp"); if (hairset == NULL) { error("Unable to load hairset bitmap"); @@ -84,8 +84,8 @@ typedef struct { short weapon; } PLAYER_INFO; -extern BITMAP *playerset; -extern DATAFILE *graphic, *emotions, *weaponset; +extern BITMAP *playerset, *login_wallpaper; +extern DATAFILE *emotions, *weaponset; extern char username[25]; extern char password[25]; extern int map_address, char_ID; |