/* viDOOM - level editor for DOOM Copyright (C) 2000 Ian Cowburn (ianc@noddybox.demon.co.uk) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ------------------------------------------------------------------------- Editor LUMP manipulations */ static const char rcs_id[]="$Id$"; #include "config.h" #include "globals.h" #include "editvar.h" #include "platgui.h" #include "runcmd.h" #include "file.h" #include "mem.h" #include "util.h" #define M_CANCEL -1 #define M_SWITCH_DOOM 0 #define M_SWITCH_HEXEN 1 #define M_EDIT_MAPINFO 2 #define M_EDIT_SCRIPTS 3 #define M_MAKE_BEHAVIOR 4 static PLAT_MENU menu[6]; static int no=0; /* ---------------------------------------- PRIVATE UTILS */ static void NewMenu(void) { int f; for(f=0;ft.z=0; for(r=0;r<5;r++) t->t.args[r]=0; } for(f=0;fl.tag=0; for(r=0;r<5;r++) l->l.args[r]=0; } } break; case M_EDIT_MAPINFO: { char *new; if (!mapinfo) mapinfo=Strdup(""); if ((new=GUI_text_edit("MAPINFO lump",mapinfo))) { Release(mapinfo); mapinfo=new; } break; } case M_EDIT_SCRIPTS: { char *new; if (!scripts) scripts=Strdup(""); if ((new=GUI_text_edit("SCRIPTS lump",scripts))) { Release(scripts); scripts=new; scripts_size=strlen(scripts); } break; } case M_MAKE_BEHAVIOR: if (!scripts) GUI_alert("Error","Need to create a script by editing|" "it before it can be compiled","OK"); else MakeBehavior(); break; } if (redraw) FullRedraw(); } /* END OF FILE */