From ea245b969d1864441b41d25c7631beccfb39d874 Mon Sep 17 00:00:00 2001 From: Magnus Auvinen Date: Sun, 13 Jan 2008 11:15:32 +0000 Subject: new mapformat in place. continued the cleanup. some effects are gone, gonna be redone so no biggie. CTF isn't working now. --- src/game/editor/ed_editor.cpp | 25 ++++++++++++------------- src/game/editor/ed_layer_tiles.cpp | 2 +- 2 files changed, 13 insertions(+), 14 deletions(-) (limited to 'src/game/editor') 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 } -#include +#include #include #include //#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 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); } -- cgit 1.4.1