about summary refs log tree commit diff
path: root/src/game/editor
diff options
context:
space:
mode:
authorMagnus Auvinen <magnus.auvinen@gmail.com>2008-01-13 11:15:32 +0000
committerMagnus Auvinen <magnus.auvinen@gmail.com>2008-01-13 11:15:32 +0000
commitea245b969d1864441b41d25c7631beccfb39d874 (patch)
tree68fb62ef99cdd90f5dd4ec8edf11e7bb54b7f953 /src/game/editor
parent906ece7894927983b8ac69e37dd3cb82cfe7aad1 (diff)
downloadzcatch-ea245b969d1864441b41d25c7631beccfb39d874.tar.gz
zcatch-ea245b969d1864441b41d25c7631beccfb39d874.zip
new mapformat in place. continued the cleanup. some effects are gone, gonna be redone so no biggie. CTF isn't working now.
Diffstat (limited to 'src/game/editor')
-rw-r--r--src/game/editor/ed_editor.cpp25
-rw-r--r--src/game/editor/ed_layer_tiles.cpp2
2 files changed, 13 insertions, 14 deletions
diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp
index 8c6c0c73..69bf7554 100644
--- a/src/game/editor/ed_editor.cpp
+++ b/src/game/editor/ed_editor.cpp
@@ -11,7 +11,7 @@ extern "C" {
 	#include <engine/e_config.h>
 }
 
-#include <game/client/gc_mapres_image.h>
+#include <game/client/gc_map_image.h>
 #include <game/client/gc_mapres_tilemap.h>
 #include <game/client/gc_ui.h>
 //#include "game/mapres_col.h"
@@ -27,6 +27,16 @@ static int cursor_texture = 0;
 static int entities_texture = 0;
 
 
+class mapres_image
+{
+public:
+	int width;
+	int height;
+	int image_data;
+};
+
+
+
 EDITOR editor;
 
 LAYERGROUP::LAYERGROUP()
@@ -1965,17 +1975,6 @@ template<typename T>
 static int make_version(int i, const T &v)
 { return (i<<16)+sizeof(T); }
 
-enum
-{
-	MAPITEMTYPE_VERSION=0,
-	MAPITEMTYPE_INFO,
-	MAPITEMTYPE_IMAGE,
-	MAPITEMTYPE_ENVELOPE,
-	MAPITEMTYPE_GROUP,
-	MAPITEMTYPE_LAYER,
-};
-
-
 void editor_load_old(DATAFILE *df)
 {
 	// load tilemaps
@@ -2075,7 +2074,7 @@ void editor_load_old(DATAFILE *df)
 					else if(e->data[0] == ITEM_WEAPON_ROCKET) id = ENTITY_WEAPON_ROCKET;
 					else if(e->data[0] == ITEM_NINJA) id = ENTITY_POWERUP_NINJA;
 					else if(e->data[0] == ITEM_ARMOR) id = ENTITY_ARMOR_1;
-					else if(e->data[0] == ITEM_HEALTH) id = ENTITY_HEATH_1;
+					else if(e->data[0] == ITEM_HEALTH) id = ENTITY_HEALTH_1;
 				}
 						
 				if(id > 0 && x >= 0 && x < g->width && y >= 0 && y < g->height)
diff --git a/src/game/editor/ed_layer_tiles.cpp b/src/game/editor/ed_layer_tiles.cpp
index 583426e3..224343e1 100644
--- a/src/game/editor/ed_layer_tiles.cpp
+++ b/src/game/editor/ed_layer_tiles.cpp
@@ -35,7 +35,7 @@ void LAYER_TILES::render()
 	if(image >= 0 && image < editor.map.images.len())
 		tex_id = editor.map.images[image]->tex_id;
 	gfx_texture_set(tex_id);
-	render_tilemap(tiles, width, height, 32.0f);
+	render_tilemap(tiles, width, height, 32.0f, 0);
 }
 
 int LAYER_TILES::convert_x(float x) const { return (int)(x/32.0f); }