From 82023866ab4c7483652e9d4605290e39ced3bec3 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Thu, 24 May 2007 20:54:08 +0000 Subject: large change. moved around all source. splitted server and client into separate files --- src/game/mapres_image.cpp | 41 ----------------------------------------- 1 file changed, 41 deletions(-) delete mode 100644 src/game/mapres_image.cpp (limited to 'src/game/mapres_image.cpp') diff --git a/src/game/mapres_image.cpp b/src/game/mapres_image.cpp deleted file mode 100644 index baf7f09b..00000000 --- a/src/game/mapres_image.cpp +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include "../interface.h" -#include "mapres_image.h" -#include "mapres.h" - -static int map_textures[64] = {0}; -static int count = 0; - -int img_init() -{ - int start, count; - map_get_type(MAPRES_IMAGE, &start, &count); - dbg_msg("mapres_image", "start=%d count=%d", start, count); - for(int i = 0; i < 64; i++) - { - if(map_textures[i]) - { - gfx_unload_texture(map_textures[i]); - map_textures[i] = 0; - } - } - - for(int i = 0; i < count; i++) - { - 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); - } - - return count; -} - -int img_num() -{ - return count; -} - -int img_get(int index) -{ - return map_textures[index]; -} -- cgit 1.4.1