diff options
Diffstat (limited to 'globals.h')
-rw-r--r-- | globals.h | 211 |
1 files changed, 211 insertions, 0 deletions
diff --git a/globals.h b/globals.h new file mode 100644 index 0000000..8109dd6 --- /dev/null +++ b/globals.h @@ -0,0 +1,211 @@ +/* + + 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 + + ------------------------------------------------------------------------- + + Global data - just about all from INI file + + $Id$ + +*/ + +#ifndef _GLOBALS_H + +#define _GLOBALS_H + + +#define MAX_PRELOAD_LEN 4096 + +/* ------------------------------ Game type +*/ + +typedef enum game_type { + DOOM, + ULTIMATE_DOOM, + DOOM_2, + FINAL_TNT, + FINAL_PLUTONIA, + ZDOOM + } GameType; + +typedef enum lev_style { + DOOM_LEVELS, + ULTIMATE_DOOM_LEVELS, + DOOM_2_LEVELS + } LevelStyle; + +/* These are set by LoadGlobalsGameSection() +*/ +extern GameType game; +extern int ask_for_game_type; +extern int disp_width; +extern int disp_height; + + +/* This and everthing from here on is set by LoadGlobalsOtherSections() +*/ +extern LevelStyle level_style; +extern char *game_name; + + +/* ------------------------------ Paths +*/ +extern char IWAD_path[]; +extern char PWAD_dir[]; +extern char PWAD_preload[]; + + +/* ------------------------------ Editor configuration +*/ +typedef enum hover { + HOVER_NONE, + HOVER_ADD, + HOVER_SINGLE + } Hover; + +typedef enum smovemode { + MOVE_ALL, + MOVE_RIGHT, + MOVE_LEFT + } SectorMoveMode; + +typedef enum newselect { + NEWSELECT_NEVER, + NEWSELECT_ASK, + NEWSELECT_SELECT + } NewSelect; + +typedef enum ldefmerge { + MERGE_ALWAYS, + MERGE_ASK, + MERGE_NEVER + } LinedefMerge; + +typedef enum defedit { + EDIT_SECTOR, + EDIT_VERTEX, + EDIT_LINEDEF, + EDIT_THING, + EDIT_MULTI + } DefaultEdit; + +extern int grid_onoff; +extern int grid_lock; +extern int grid_size; +extern double gfx_brighten; +extern int vertex_rad; +extern Hover hover_select; +extern int clear_on_move; +extern int clear_on_menu; +extern Hover insert_select; +extern SectorMoveMode sector_move; +extern int ask_middle_on_2sided; +extern int default_light_level; +extern int default_floor_height; +extern int default_ceiling_height; +extern NewSelect new_2sided_select; +extern LinedefMerge merge_linedef; +extern int auto_block_linedefs; +extern int default_scale; +extern DefaultEdit default_edit_mode; +extern int linedef_select; +extern int tag_highlight; +extern int show_full_linedef_info; + + +/* ------------------------------ viDOOM configuration +*/ +extern int sort_textures; +extern int sort_flats; +extern int show_titlepic; +extern int load_textures; +extern int load_flats; +extern int load_sprites; +extern int map_warn; +extern int map_exit_warn; +extern int initial_empty_map; +extern int overwrite_warning; + +/* ------------------------------ Required linedef flags bit and mask +*/ +extern int side2_bit; +extern int side2_mask; +extern int block_bit; +extern int block_mask; +extern int lower_peg_bit; +extern int lower_peg_mask; +extern int upper_peg_bit; +extern int upper_peg_mask; + + +/* ------------------------------ Normal values +*/ +extern int normal_linedef; +extern int normal_sector; + + +/* ------------------------------ LINEDEF checking +*/ +extern int check_line_assume_yes; +extern int check_1side_lower; +extern int check_1side_middle; +extern int check_1side_upper; +extern int check_2side_lower; +extern int check_2side_middle; +extern int check_2side_same_sector; +extern int check_2side_upper; + + +/* ------------------------------ Node Builder config +*/ +extern int use_build; +extern char build_cmd[]; +extern char build_ignore[]; +extern char build_in[]; +extern char build_out[]; +extern int build_in_before_out; +extern int build_always_view; + + +/* ------------------------------ Texture names +*/ +extern char empty_texture[]; +extern char linedef_check_default[]; + +/* ------------------------------ Interfaces +*/ + +/* Save and load global data to INI file +*/ +void LoadGlobalsPart1(void); +void LoadGlobalsPart2(void); + +void SaveGlobals(void); + +/* Read config file. This must be done once the default IWAD and any patch + PWADs have been read. +*/ +void LoadConfig(void); + + +#endif + + +/* END OF FILE */ |