diff options
Diffstat (limited to 'src/game/client')
| -rw-r--r-- | src/game/client/game_client.cpp | 12 | ||||
| -rw-r--r-- | src/game/client/mapres_image.cpp | 2 | ||||
| -rw-r--r-- | src/game/client/menu.cpp | 58 |
3 files changed, 35 insertions, 37 deletions
diff --git a/src/game/client/game_client.cpp b/src/game/client/game_client.cpp index f510e00e..99a04b06 100644 --- a/src/game/client/game_client.cpp +++ b/src/game/client/game_client.cpp @@ -653,12 +653,12 @@ static particle_system temp_system; void modc_init() { // load textures - texture_weapon = gfx_load_texture_tga("data/tileset_weapons.tga"); - texture_game = gfx_load_texture_tga("data/game_main.tga"); - texture_char_default = gfx_load_texture_tga("data/char_teefault.tga"); - texture_sun = gfx_load_texture_tga("data/sun.tga"); - texture_particles = gfx_load_texture_tga("data/tileset_particles.tga"); - font_texture = gfx_load_texture_tga("data/debug_font.tga"); + texture_weapon = gfx_load_texture("data/tileset_weapons.png"); + texture_game = gfx_load_texture("data/game_main.png"); + texture_char_default = gfx_load_texture("data/char_teefault.png"); + texture_sun = gfx_load_texture("data/sun.png"); + texture_particles = gfx_load_texture("data/tileset_particles.png"); + font_texture = gfx_load_texture("data/debug_font.png"); // load sounds diff --git a/src/game/client/mapres_image.cpp b/src/game/client/mapres_image.cpp index 1c81b309..e56a7c6a 100644 --- a/src/game/client/mapres_image.cpp +++ b/src/game/client/mapres_image.cpp @@ -24,7 +24,7 @@ int img_init() { mapres_image *img = (mapres_image *)map_get_item(start+i, 0, 0); void *data = map_get_data(img->image_data); - map_textures[i] = gfx_load_texture_raw(img->width, img->height, data); + map_textures[i] = gfx_load_texture_raw(img->width, img->height, IMG_BGRA, data); } return count; diff --git a/src/game/client/menu.cpp b/src/game/client/menu.cpp index 88c87526..5d0cc473 100644 --- a/src/game/client/menu.cpp +++ b/src/game/client/menu.cpp @@ -216,7 +216,7 @@ int do_scroll_bar(void *id, float x, float y, float height, int steps, int last_ float pos = ui_mouse_y() - y - 8; float perc = pos / (height - 16); - r = (steps + 1) * perc; + r = (int)((steps + 1) * perc); if (r < 0) r = 0; else if (r > steps) @@ -327,7 +327,6 @@ void refresh_list(server_list *list) { char data[256]; int total_received = 0; - int pointer = 0; int received; int master_server_version = -1; @@ -352,7 +351,6 @@ void refresh_list(server_list *list) // TODO: handle master server version O.o const int server_info_size = 212; - const int wanted_data_count = server_count * server_info_size; list->active_count = 0; @@ -489,42 +487,42 @@ void modmenu_init() keys::enable_char_cache(); keys::enable_key_cache(); - current_font->font_texture = gfx_load_texture_tga("data/big_font.tga"); - background_texture = gfx_load_texture_tga("data/gui_bg.tga"); - not_empty_item_texture = gfx_load_texture_tga("data/gui/game_list_item_not_empty.tga"); - empty_item_texture = gfx_load_texture_tga("data/gui/game_list_item_empty.tga"); - active_item_texture = gfx_load_texture_tga("data/gui/game_list_item_active.tga"); - selected_item_texture = gfx_load_texture_tga("data/gui/game_list_item_selected.tga"); + current_font->font_texture = gfx_load_texture("data/big_font.png"); + background_texture = gfx_load_texture("data/gui_bg.png"); + not_empty_item_texture = gfx_load_texture("data/gui/game_list_item_not_empty.png"); + empty_item_texture = gfx_load_texture("data/gui/game_list_item_empty.png"); + active_item_texture = gfx_load_texture("data/gui/game_list_item_active.png"); + selected_item_texture = gfx_load_texture("data/gui/game_list_item_selected.png"); - join_button_texture = gfx_load_texture_tga("data/gui/join_button.tga"); - join_button_hot_texture = gfx_load_texture_tga("data/gui/join_button_hot.tga"); - join_button_active_texture = gfx_load_texture_tga("data/gui/join_button_active.tga"); - join_button_grey_texture = gfx_load_texture_tga("data/gui/join_button_greyed.tga"); + join_button_texture = gfx_load_texture("data/gui/join_button.png"); + join_button_hot_texture = gfx_load_texture("data/gui/join_button_hot.png"); + join_button_active_texture = gfx_load_texture("data/gui/join_button_active.png"); + join_button_grey_texture = gfx_load_texture("data/gui/join_button_greyed.png"); -// button_not_hilighted_texture = gfx_load_texture_tga("data/gui/game_list_join_button.tga"); -// button_hilighted_texture = gfx_load_texture_tga("data/gui/button_hilighted.tga"); -// button_active_texture = gfx_load_texture_tga("data/gui/button_active.tga"); +// button_not_hilighted_texture = gfx_load_texture("data/gui/game_list_join_button.png"); +// button_hilighted_texture = gfx_load_texture("data/gui/button_hilighted.png"); +// button_active_texture = gfx_load_texture("data/gui/button_active.png"); - quit_button_texture = gfx_load_texture_tga("data/gui/quit_button.tga"); - quit_button_hot_texture = gfx_load_texture_tga("data/gui/quit_button_hot.tga"); - quit_button_active_texture = gfx_load_texture_tga("data/gui/quit_button_active.tga"); + quit_button_texture = gfx_load_texture("data/gui/quit_button.png"); + quit_button_hot_texture = gfx_load_texture("data/gui/quit_button_hot.png"); + quit_button_active_texture = gfx_load_texture("data/gui/quit_button_active.png"); - up_button_texture = gfx_load_texture_tga("data/gui/scroll_arrow_up.tga"); - up_button_active_texture = gfx_load_texture_tga("data/gui/scroll_arrow_up_active.tga"); + up_button_texture = gfx_load_texture("data/gui/scroll_arrow_up.png"); + up_button_active_texture = gfx_load_texture("data/gui/scroll_arrow_up_active.png"); - down_button_texture = gfx_load_texture_tga("data/gui/scroll_arrow_down.tga"); - down_button_active_texture = gfx_load_texture_tga("data/gui/scroll_arrow_down_active.tga"); + down_button_texture = gfx_load_texture("data/gui/scroll_arrow_down.png"); + down_button_active_texture = gfx_load_texture("data/gui/scroll_arrow_down_active.png"); - teewars_banner_texture = gfx_load_texture_tga("data/gui_logo.tga"); - scroll_indicator_texture = gfx_load_texture_tga("data/gui/scroll_drag.tga"); - connect_localhost_texture = gfx_load_texture_tga("data/gui/game_list_connect_localhost.tga"); + teewars_banner_texture = gfx_load_texture("data/gui_logo.png"); + scroll_indicator_texture = gfx_load_texture("data/gui/scroll_drag.png"); + connect_localhost_texture = gfx_load_texture("data/gui/game_list_connect_localhost.png"); - refresh_button_texture = gfx_load_texture_tga("data/gui/refresh_button.tga"); - refresh_button_hot_texture = gfx_load_texture_tga("data/gui/refresh_button_hot.tga"); - refresh_button_active_texture = gfx_load_texture_tga("data/gui/refresh_button_active.tga"); + refresh_button_texture = gfx_load_texture("data/gui/refresh_button.png"); + refresh_button_hot_texture = gfx_load_texture("data/gui/refresh_button_hot.png"); + refresh_button_active_texture = gfx_load_texture("data/gui/refresh_button_active.png"); - input_box_texture = gfx_load_texture_tga("data/gui/input_box.tga"); + input_box_texture = gfx_load_texture("data/gui/input_box.png"); music_menu = snd_load_wav("data/audio/Music_Menu.wav"); } |