diff options
Diffstat (limited to 'src/game/editor')
| -rw-r--r-- | src/game/editor/ed_editor.cpp | 12 | ||||
| -rw-r--r-- | src/game/editor/ed_editor.hpp | 8 | ||||
| -rw-r--r-- | src/game/editor/ed_io.cpp | 8 |
3 files changed, 14 insertions, 14 deletions
diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp index 8b514c88..3632a034 100644 --- a/src/game/editor/ed_editor.cpp +++ b/src/game/editor/ed_editor.cpp @@ -139,7 +139,7 @@ int LAYERGROUP::swap_layers(int index0, int index1) return index1; } -void IMAGE::analyse_tileflags() +void EDITOR_IMAGE::analyse_tileflags() { mem_zero(tileflags, sizeof(tileflags)); @@ -1470,11 +1470,11 @@ static void extract_name(const char *filename, char *name) static void replace_image(const char *filename) { - IMAGE imginfo; + EDITOR_IMAGE imginfo; if(!gfx_load_png(&imginfo, filename)) return; - IMAGE *img = editor.map.images[editor.selected_image]; + EDITOR_IMAGE *img = editor.map.images[editor.selected_image]; gfx_unload_texture(img->tex_id); *img = imginfo; extract_name(filename, img->name); @@ -1483,11 +1483,11 @@ static void replace_image(const char *filename) static void add_image(const char *filename) { - IMAGE imginfo; + EDITOR_IMAGE imginfo; if(!gfx_load_png(&imginfo, filename)) return; - IMAGE *img = new IMAGE; + EDITOR_IMAGE *img = new EDITOR_IMAGE; *img = imginfo; img->tex_id = gfx_load_texture_raw(imginfo.width, imginfo.height, imginfo.format, imginfo.data, IMG_AUTO, 0); img->external = 1; // external by default @@ -1513,7 +1513,7 @@ static int popup_image(RECT view) RECT slot; ui_hsplit_t(&view, 2.0f, &slot, &view); ui_hsplit_t(&view, 12.0f, &slot, &view); - IMAGE *img = editor.map.images[editor.selected_image]; + EDITOR_IMAGE *img = editor.map.images[editor.selected_image]; static int external_button = 0; if(img->external) diff --git a/src/game/editor/ed_editor.hpp b/src/game/editor/ed_editor.hpp index 23dbd382..62f8871a 100644 --- a/src/game/editor/ed_editor.hpp +++ b/src/game/editor/ed_editor.hpp @@ -217,10 +217,10 @@ public: } }; -class IMAGE : public IMAGE_INFO +class EDITOR_IMAGE : public IMAGE_INFO { public: - IMAGE() + EDITOR_IMAGE() { tex_id = -1; name[0] = 0; @@ -231,7 +231,7 @@ public: format = 0; } - ~IMAGE() + ~EDITOR_IMAGE() { gfx_unload_texture(tex_id); } @@ -255,7 +255,7 @@ public: } array<LAYERGROUP*> groups; - array<IMAGE*> images; + array<EDITOR_IMAGE*> images; array<ENVELOPE*> envelopes; class LAYER_GAME *game_layer; diff --git a/src/game/editor/ed_io.cpp b/src/game/editor/ed_io.cpp index 9e0cd4a3..b27dd25e 100644 --- a/src/game/editor/ed_io.cpp +++ b/src/game/editor/ed_io.cpp @@ -133,7 +133,7 @@ void editor_load_old(DATAFILE *df, MAP *map) mapres_image *imgres = (mapres_image *)datafile_get_item(df, start+i, 0, 0); void *data = datafile_get_data(df, imgres->image_data); - IMAGE *img = new IMAGE; + EDITOR_IMAGE *img = new EDITOR_IMAGE; img->width = imgres->width; img->height = imgres->height; img->format = IMG_RGBA; @@ -213,7 +213,7 @@ int MAP::save(const char *filename) // save images for(int i = 0; i < images.len(); i++) { - IMAGE *img = images[i]; + EDITOR_IMAGE *img = images[i]; // analyse the image for when saving (should be done when we load the image) // TODO! @@ -392,7 +392,7 @@ int MAP::load(const char *filename) char *name = (char *)datafile_get_data(df, item->image_name); // copy base info - IMAGE *img = new IMAGE; + EDITOR_IMAGE *img = new EDITOR_IMAGE; img->external = item->external; if(item->external) @@ -401,7 +401,7 @@ int MAP::load(const char *filename) sprintf(buf, "data/mapres/%s.png", name); // load external - IMAGE imginfo; + EDITOR_IMAGE imginfo; if(gfx_load_png(&imginfo, buf)) { *img = imginfo; |