about summary refs log tree commit diff
path: root/src/game/client/components/mapimages.cpp
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2009-10-27 14:38:53 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2009-10-27 14:38:53 +0000
commit878ede3080ab2cfb627aca505c397d9765052996 (patch)
tree98bff371070e1dca0295f0ca58d64ac4ee8042ce /src/game/client/components/mapimages.cpp
parent9b99ec0e60b60134e46f2f71d707230948f7db03 (diff)
downloadzcatch-878ede3080ab2cfb627aca505c397d9765052996.tar.gz
zcatch-878ede3080ab2cfb627aca505c397d9765052996.zip
major update with stuff
Diffstat (limited to 'src/game/client/components/mapimages.cpp')
-rw-r--r--src/game/client/components/mapimages.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/game/client/components/mapimages.cpp b/src/game/client/components/mapimages.cpp
index 7f839da0..51194853 100644
--- a/src/game/client/components/mapimages.cpp
+++ b/src/game/client/components/mapimages.cpp
@@ -1,3 +1,4 @@
+#include <engine/client/graphics.h>
 #include <game/client/component.hpp>
 #include <game/mapitems.hpp>
 
@@ -13,7 +14,7 @@ void MAPIMAGES::on_mapload()
 	// unload all textures
 	for(int i = 0; i < count; i++)
 	{
-		gfx_unload_texture(textures[i]);
+		Graphics()->UnloadTexture(textures[i]);
 		textures[i] = -1;
 	}
 	count = 0;
@@ -32,12 +33,12 @@ void MAPIMAGES::on_mapload()
 			char buf[256];
 			char *name = (char *)map_get_data(img->image_name);
 			str_format(buf, sizeof(buf), "mapres/%s.png", name);
-			textures[i] = gfx_load_texture(buf, IMG_AUTO, 0);
+			textures[i] = Graphics()->LoadTexture(buf, IMG_AUTO, 0);
 		}
 		else
 		{
 			void *data = map_get_data(img->image_data);
-			textures[i] = gfx_load_texture_raw(img->width, img->height, IMG_RGBA, data, IMG_RGBA, 0);
+			textures[i] = Graphics()->LoadTextureRaw(img->width, img->height, IMG_RGBA, data, IMG_RGBA, 0);
 			map_unload_data(img->image_data);
 		}
 	}