about summary refs log tree commit diff
path: root/src/game
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-03-29 11:55:42 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-03-29 11:55:42 +0000
commit1f246d9dcbc32e1049f4a8a6ac1777b313d9e547 (patch)
tree4a4e025a6211fedf7732d837e0027aa37e6e4d1a /src/game
parent7a3874745ca370a799d95b5f86e85fcc8eadefbb (diff)
downloadzcatch-1f246d9dcbc32e1049f4a8a6ac1777b313d9e547.tar.gz
zcatch-1f246d9dcbc32e1049f4a8a6ac1777b313d9e547.zip
fixed protection so that the fonts doesn't get resampled
Diffstat (limited to 'src/game')
-rw-r--r--src/game/client/gc_hooks.cpp2
-rw-r--r--src/game/client/gc_map_image.cpp4
-rw-r--r--src/game/client/gc_skin.cpp4
-rw-r--r--src/game/editor/ed_editor.cpp12
-rw-r--r--src/game/editor/ed_io.cpp6
5 files changed, 14 insertions, 14 deletions
diff --git a/src/game/client/gc_hooks.cpp b/src/game/client/gc_hooks.cpp
index ab63442c..4a0a0ecc 100644
--- a/src/game/client/gc_hooks.cpp
+++ b/src/game/client/gc_hooks.cpp
@@ -98,7 +98,7 @@ extern "C" void modc_init()
 	for(int i = 0; i < data->num_images; i++)
 	{
 		render_loading(load_current/load_total);
-		data->images[i].id = gfx_load_texture(data->images[i].filename, IMG_AUTO);
+		data->images[i].id = gfx_load_texture(data->images[i].filename, IMG_AUTO, 0);
 		load_current++;
 	}
 
diff --git a/src/game/client/gc_map_image.cpp b/src/game/client/gc_map_image.cpp
index 664a867a..65cb0608 100644
--- a/src/game/client/gc_map_image.cpp
+++ b/src/game/client/gc_map_image.cpp
@@ -111,12 +111,12 @@ int img_init()
 			char buf[256];
 			char *name = (char *)map_get_data(img->image_name);
 			str_format(buf, sizeof(buf), "data/mapres/%s.png", name);
-			map_textures[i] = gfx_load_texture(buf, IMG_AUTO);
+			map_textures[i] = gfx_load_texture(buf, IMG_AUTO, 0);
 		}
 		else
 		{
 			void *data = map_get_data(img->image_data);
-			map_textures[i] = gfx_load_texture_raw(img->width, img->height, IMG_RGBA, data, IMG_RGBA);
+			map_textures[i] = gfx_load_texture_raw(img->width, img->height, IMG_RGBA, data, IMG_RGBA, 0);
 			map_unload_data(img->image_data);
 		}
 	}
diff --git a/src/game/client/gc_skin.cpp b/src/game/client/gc_skin.cpp
index e7fd1fba..a876c960 100644
--- a/src/game/client/gc_skin.cpp
+++ b/src/game/client/gc_skin.cpp
@@ -32,7 +32,7 @@ static void skinscan(const char *name, int is_dir, void *user)
 		return;
 	}
 	
-	skins[num_skins].org_texture = gfx_load_texture_raw(info.width, info.height, info.format, info.data, info.format);
+	skins[num_skins].org_texture = gfx_load_texture_raw(info.width, info.height, info.format, info.data, info.format, 0);
 	
 	int body_size = 96; // body size
 	unsigned char *d = (unsigned char *)info.data;
@@ -105,7 +105,7 @@ static void skinscan(const char *name, int is_dir, void *user)
 			}
 	}
 	
-	skins[num_skins].color_texture = gfx_load_texture_raw(info.width, info.height, info.format, info.data, info.format);
+	skins[num_skins].color_texture = gfx_load_texture_raw(info.width, info.height, info.format, info.data, info.format, 0);
 	mem_free(info.data);
 
 	// set skin data	
diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp
index 7ae46f0b..a7ef9576 100644
--- a/src/game/editor/ed_editor.cpp
+++ b/src/game/editor/ed_editor.cpp
@@ -1478,7 +1478,7 @@ static void replace_image(const char *filename)
 	gfx_unload_texture(img->tex_id);
 	*img = imginfo;
 	extract_name(filename, img->name);
-	img->tex_id = gfx_load_texture_raw(imginfo.width, imginfo.height, imginfo.format, imginfo.data, IMG_AUTO);
+	img->tex_id = gfx_load_texture_raw(imginfo.width, imginfo.height, imginfo.format, imginfo.data, IMG_AUTO, 0);
 }
 
 static void add_image(const char *filename)
@@ -1489,7 +1489,7 @@ static void add_image(const char *filename)
 
 	IMAGE *img = new IMAGE;
 	*img = imginfo;
-	img->tex_id = gfx_load_texture_raw(imginfo.width, imginfo.height, imginfo.format, imginfo.data, IMG_AUTO);
+	img->tex_id = gfx_load_texture_raw(imginfo.width, imginfo.height, imginfo.format, imginfo.data, IMG_AUTO, 0);
 	img->external = 1; // external by default
 	extract_name(filename, img->name);
 	editor.map.images.add(img);
@@ -2369,10 +2369,10 @@ void MAP::create_default(int entities_texture)
 
 extern "C" void editor_init()
 {
-	checker_texture = gfx_load_texture("data/editor/checker.png", IMG_AUTO);
-	background_texture = gfx_load_texture("data/editor/background.png", IMG_AUTO);
-	cursor_texture = gfx_load_texture("data/editor/cursor.png", IMG_AUTO);
-	entities_texture = gfx_load_texture("data/editor/entities.png", IMG_AUTO);
+	checker_texture = gfx_load_texture("data/editor/checker.png", IMG_AUTO, 0);
+	background_texture = gfx_load_texture("data/editor/background.png", IMG_AUTO, 0);
+	cursor_texture = gfx_load_texture("data/editor/cursor.png", IMG_AUTO, 0);
+	entities_texture = gfx_load_texture("data/editor/entities.png", IMG_AUTO, 0);
 	
 	tileset_picker.make_palette();
 	tileset_picker.readonly = true;
diff --git a/src/game/editor/ed_io.cpp b/src/game/editor/ed_io.cpp
index 3fd4fcac..9e0cd4a3 100644
--- a/src/game/editor/ed_io.cpp
+++ b/src/game/editor/ed_io.cpp
@@ -141,7 +141,7 @@ void editor_load_old(DATAFILE *df, MAP *map)
 			// copy image data
 			img->data = mem_alloc(img->width*img->height*4, 1);
 			mem_copy(img->data, data, img->width*img->height*4);
-			img->tex_id = gfx_load_texture_raw(img->width, img->height, img->format, img->data, IMG_AUTO);
+			img->tex_id = gfx_load_texture_raw(img->width, img->height, img->format, img->data, IMG_AUTO, 0);
 			map->images.add(img);
 			
 			// unload image
@@ -405,7 +405,7 @@ int MAP::load(const char *filename)
 					if(gfx_load_png(&imginfo, buf))
 					{
 						*img = imginfo;
-						img->tex_id = gfx_load_texture_raw(imginfo.width, imginfo.height, imginfo.format, imginfo.data, IMG_AUTO);
+						img->tex_id = gfx_load_texture_raw(imginfo.width, imginfo.height, imginfo.format, imginfo.data, IMG_AUTO, 0);
 						img->external = 1;
 					}
 				}
@@ -419,7 +419,7 @@ int MAP::load(const char *filename)
 					void *data = datafile_get_data(df, item->image_data);
 					img->data = mem_alloc(img->width*img->height*4, 1);
 					mem_copy(img->data, data, img->width*img->height*4);
-					img->tex_id = gfx_load_texture_raw(img->width, img->height, img->format, img->data, IMG_AUTO);
+					img->tex_id = gfx_load_texture_raw(img->width, img->height, img->format, img->data, IMG_AUTO, 0);
 				}
 
 				// copy image name