diff options
author | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-02 16:31:19 +0000 |
---|---|---|
committer | Bjørn Lindeijer <bjorn@lindeijer.nl> | 2005-01-02 16:31:19 +0000 |
commit | e76a6e3d2cc40e382e2ca1c7348e36a4082a221b (patch) | |
tree | 5608d032613e083d86923ad7b339352e9f157498 /src/main.cpp | |
parent | 40b4ecacd44bd3040d9600d6304422bdd7e2e4c4 (diff) | |
download | mana-e76a6e3d2cc40e382e2ca1c7348e36a4082a221b.tar.gz mana-e76a6e3d2cc40e382e2ca1c7348e36a4082a221b.tar.bz2 mana-e76a6e3d2cc40e382e2ca1c7348e36a4082a221b.tar.xz mana-e76a6e3d2cc40e382e2ca1c7348e36a4082a221b.zip |
Got rid of hairset.dat and playerset.dat.
Diffstat (limited to 'src/main.cpp')
-rw-r--r-- | src/main.cpp | 34 |
1 files changed, 22 insertions, 12 deletions
diff --git a/src/main.cpp b/src/main.cpp index a73f65eb..eb36e171 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -72,7 +72,8 @@ char sex, n_server, n_character; SERVER_INFO *server_info; PLAYER_INFO *char_info = new PLAYER_INFO; -BITMAP *playerset, *hairset, *login_wallpaper; +Spriteset *hairset, *playerset; +BITMAP *login_wallpaper; char username[LEN_USERNAME]; char password[LEN_PASSWORD]; @@ -266,21 +267,30 @@ void init_engine() { error("Not enough memory to create buffer"); } - login_wallpaper = load_bitmap("./data/graphic/login.bmp", NULL); + 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"); - - 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"); - } + BITMAP *playerbitmap = load_bitmap("data/graphic/playerset.bmp", NULL); + if (!playerbitmap) error("Couldn't load playerset.bmp"); + // Stretch the bitmap while it hasn't been replaced with higher res yet + BITMAP *playerbitmap2 = create_bitmap( + playerbitmap->w * 2, playerbitmap->h * 2); + stretch_blit(playerbitmap, playerbitmap2, + 0, 0, playerbitmap->w, playerbitmap->h, + 0, 0, playerbitmap2->w, playerbitmap2->h); + playerset = new Spriteset(playerbitmap2, 160, 120, 0, 0); + + BITMAP *hairbitmap = load_bitmap("data/graphic/hairset.bmp", NULL); + if (!hairbitmap) error("Couldn't load hairset.bmp"); + // Stretch the bitmap while it hasn't been replaced with higher res yet + BITMAP *hairbitmap2 = create_bitmap(hairbitmap->w * 2, hairbitmap->h * 2); + stretch_blit(hairbitmap, hairbitmap2, + 0, 0, hairbitmap->w, hairbitmap->h, + 0, 0, hairbitmap2->w, hairbitmap2->h); + hairset = new Spriteset(hairbitmap2, 40, 40, 0, 0); // TODO: Remove Allegro config file usage from GUI look - init_gui(buffer, "./data/Skin/aqua.skin"); + init_gui(buffer, "data/Skin/aqua.skin"); state = LOGIN; } |