/* 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 ------------------------------------------------------------------------- Returns the constant names for the game and the map names */ static const char rcs_id[]="$Id$"; #include "config.h" #include "names.h" #include "globals.h" #include "file.h" typedef struct { char *map; char *name; } MapNameList; static MapNameList doom_maps[]= { {"E1M1","Hangar"}, {"E1M2","Nuclear Plant"}, {"E1M3","Toxin Refinery"}, {"E1M4","Command Control"}, {"E1M5","Phobos Lab"}, {"E1M6","Central Processing"}, {"E1M7","Computer Station"}, {"E1M8","Phobos Anomaly"}, {"E1M9","Military Base"}, {"E2M1","Deimos Anomaly"}, {"E2M2","Containment Area"}, {"E2M3","Refinery"}, {"E2M4","Deimos Lab"}, {"E2M5","Command Center"}, {"E2M6","Halls of the Damned"}, {"E2M7","Spawning Vats"}, {"E2M8","Tower of Babel"}, {"E2M9","Fortress of Mystery"}, {"E3M1","Hell Keep"}, {"E3M2","Slough of Despair"}, {"E3M3","Pandemonium"}, {"E3M4","House of Pain"}, {"E3M5","Unholy Cathedral"}, {"E3M6","Mt. Erebus"}, {"E3M7","Limbo"}, {"E3M8","Dis"}, {"E3M9","Warrens"}, {"E4M1","Hell Beneath"}, {"E4M2","Perfect Hatred"}, {"E4M3","Sever The Wicked"}, {"E4M4","Unruly Evil"}, {"E4M5","They Will Repent"}, {"E4M6","Against Thee Wickedly"}, {"E4M7","And Hell Followed"}, {"E4M8","Unto The Cruel"}, {"E4M9","Fear"}, {NULL,NULL} }; static MapNameList doom2_maps[]= { {"MAP01","Entryway"}, {"MAP02","Underhalls"}, {"MAP03","The Gantlet"}, {"MAP04","The Focus"}, {"MAP05","The Waste Tunnels"}, {"MAP06","The Crusher"}, {"MAP07","Dead Simple"}, {"MAP08","Tricks and Traps"}, {"MAP09","The Pit"}, {"MAP10","Refueling Base"}, {"MAP11","'O' of Destruction!"}, {"MAP12","The Factory"}, {"MAP13","Downtown"}, {"MAP14","The Inmost Dens"}, {"MAP15","Industrial Zone"}, {"MAP16","Suburbs"}, {"MAP17","Tenements"}, {"MAP18","The Courtyard"}, {"MAP19","The Citadel"}, {"MAP20","Gotcha!"}, {"MAP21","Nirvana"}, {"MAP22","The catacombs"}, {"MAP23","Barrels O' Fun"}, {"MAP24","The Chasm"}, {"MAP25","Bloodfalls"}, {"MAP26","The Abandoned Mines"}, {"MAP27","Monster Condo"}, {"MAP28","The Spirit World"}, {"MAP29","The Living End"}, {"MAP30","Icon Of Sin"}, {"MAP31","Wolfenstein"}, {"MAP32","Grosse"}, {NULL,NULL} }; static MapNameList plut_maps[]= { {"MAP01","Congo"}, {"MAP02","Well of Souls"}, {"MAP03","Aztec"}, {"MAP04","Caged"}, {"MAP05","Ghost Town"}, {"MAP06","Baron's Lair"}, {"MAP07","Caughtyard"}, {"MAP08","Realm"}, {"MAP09","Abattoire"}, {"MAP10","Onslaught"}, {"MAP11","Hunted"}, {"MAP12","Speed"}, {"MAP13","The Crypt"}, {"MAP14","Genesis"}, {"MAP15","The Twilight"}, {"MAP16","The Omen"}, {"MAP17","Compound"}, {"MAP18","Neurosphere"}, {"MAP19","NME"}, {"MAP20","The Death Domain"}, {"MAP21","Slayer"}, {"MAP22","Impossible Mission"}, {"MAP23","Tombstone"}, {"MAP24","The Final Frontier"}, {"MAP25","The Temple of Darkness"}, {"MAP26","Bunker"}, {"MAP27","Anti-Christ"}, {"MAP28","The Sewers"}, {"MAP29","Odyssey of Noises"}, {"MAP30","The Gateway of Hell"}, {"MAP31","Cyberden"}, {"MAP32","Go 2 It"}, {NULL,NULL} }; static MapNameList tnt_maps[]= { {"MAP01","System Control"}, {"MAP02","Human BBQ"}, {"MAP03","Power Control"}, {"MAP04","Wormhole"}, {"MAP05","Hanger"}, {"MAP06","Open Season"}, {"MAP07","Prison"}, {"MAP08","Metal"}, {"MAP09","Stronghold"}, {"MAP10","Redemption"}, {"MAP11","Storage Facility"}, {"MAP12","Crater"}, {"MAP13","Nukage Processing"}, {"MAP14","Steel Works"}, {"MAP15","Dead Zone"}, {"MAP16","Deepest Reaches"}, {"MAP17","Processing Area"}, {"MAP18","Mill"}, {"MAP19","Shipping/Respawning"}, {"MAP20","Central Processing"}, {"MAP21","Administration Center"}, {"MAP22","Habitat"}, {"MAP23","Lunar Mining Project"}, {"MAP24","Quarry"}, {"MAP25","Baron's Den"}, {"MAP26","Ballistyx"}, {"MAP27","Mount Pain"}, {"MAP28","Heck"}, {"MAP29","River Styx"}, {"MAP30","Last Call"}, {"MAP31","Pharaoh"}, {"MAP32","Caribbean"}, {NULL,NULL} }; /* ---------------------------------------- */ static char *FindName(MapNameList *nl, char *map) { int f; f=0; while(nl[f].map) { if (STREQ(map,nl[f].map)) return(nl[f].name); f++; } return ("Unknown map!"); } /* ---------------------------------------- */ char *GameName(void) { switch(game) { case DOOM: return ("Doom - Knee Deep in The Dead"); break; case ULTIMATE_DOOM: return ("Ultimate Doom - Thy Flesh Consumed"); break; case DOOM_2: return ("Doom 2 - Hell On Earth"); break; case FINAL_TNT: return ("Final Doom - TNT:Evilution"); break; case FINAL_PLUTONIA: return ("Final Doom - The Plutonia Experiment"); break; case ZDOOM: return ("ZDoom/BOOM extensions to Doom"); break; } return ("Game type undefined!"); } char *MapName(char *map) { if (STREQ(Basename(IWAD_path),"doom.wad")) return (FindName(doom_maps,map)); else if (STREQ(Basename(IWAD_path),"doom2.wad")) return (FindName(doom2_maps,map)); else if (STREQ(Basename(IWAD_path),"tnt.wad")) return (FindName(tnt_maps,map)); else if (STREQ(Basename(IWAD_path),"plutonia.wad")) return (FindName(plut_maps,map)); return ("Unknown IWAD - no map names!"); } /* END OF FILE */