--- deliantra/server/include/loader.h 2007/02/01 19:40:42 1.9
+++ deliantra/server/include/loader.h 2008/05/06 16:55:26 1.17
@@ -1,126 +1,30 @@
/*
- * CrossFire, A Multiplayer game for X-windows
+ * This file is part of Deliantra, the Roguelike Realtime MMORPG.
*
- * Copyright (C) 2005, 2006, 2007 Marc Lehmann & Crossfire+ Development Team
- * Copyright (C) 2002 Mark Wedel & Crossfire Development Team
- * Copyright (C) 1992 Frank Tore Johansen
+ * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team
+ * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team
+ * Copyright (©) 1992,2007 Frank Tore Johansen
*
- * This program is free software; you can redistribute it and/or modify
+ * Deliantra 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
+ * the Free Software Foundation, either version 3 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
+ * 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., 675 Mass Ave, Cambridge, MA 02139, USA.
- *
- * The authors can be reached via e-mail to crossfire@schmorp.de
+ * along with this program. If not, see .
+ *
+ * The authors can be reached via e-mail to
*/
+#ifndef LOADER_H__
+#define LOADER_H__
-#define LL_IGNORED -1
-#define LL_EOF 0
-#define LL_MORE 1
-#define LL_NORMAL 2
-
-extern int nrofpixmaps;
-
-// resource loader pure base class
-struct loader_base
-{
- const char *filename;
-
- virtual ~loader_base ();
-
- virtual archetype *get_arch (const char *name);
- virtual void put_arch (archetype *arch);
-
- virtual object *get_object (const char *name);
- virtual void put_object (object *op);
-
- virtual player *get_player ();
- virtual void put_player (player *pl);
-
- virtual region *get_region (const char *name);
- virtual void put_region (region *rgn);
-
- virtual facetile *get_face (const char *name);
- virtual void put_face (facetile *face);
-
- virtual treasurelist *get_treasure (const char *name, bool one = false);
- virtual void put_treasure (treasurelist *treasure);
-
- virtual animation *get_animation (const char *name);
- virtual void put_animation (animation *anim);
-
- bool parse_arch (object_thawer &thawer, archetype *arch);
- bool parse_object (object_thawer &thawer, object *op);
- bool parse_player (object_thawer &thawer, player *pl);
- bool parse_region (object_thawer &thawer, region *rgn);
- bool parse_face (object_thawer &thawer, facetile *face);
- bool parse_treasure (object_thawer &thawer, treasurelist *treasure);
- bool parse_animation (object_thawer &thawer, animation *anim);
-
- bool parse (object_thawer &thawer);
-
- bool load (const char *filename);
-};
-
-// pure base class for default archetype loader
-struct loader_arch : virtual loader_base {
- archetype *get_arch (const char *name);
- void put_arch (archetype *arch);
-};
-
-// pure base class for default object loader
-struct loader_object : virtual loader_base {
- object *get_object (const char *name);
- void put_object (object *op);
-};
-
-// pure base class for default player loader
-struct loader_player : virtual loader_base {
- virtual player *get_player ();
- virtual void put_player (player *pl);
-};
-
-// pure base class for default region loader
-struct loader_region : virtual loader_base {
- region *get_region (const char *name);
- void put_region (region *rgn);
-};
-
-// pure base class for default face loader
-struct loader_face : virtual loader_base {
- facetile *get_face (const char *name);
- void put_face (facetile *face);
-};
-
-// pure base class for default treasure loader
-struct loader_treasure : virtual loader_base {
- treasurelist *get_treasure (const char *name, bool one = false);
- void put_treasure (treasurelist *treasure);
-};
-
-// pure base class for default animation loader
-struct loader_animation : virtual loader_base {
- animation *get_animation (const char *name);
- void put_animation (animation *anim);
-};
+bool load_resource_file_ (const char *filename);
-// future generic resource loader
-// handles generic stuff valid in most files, such as
-// animations, treasures, faces and so on
-struct loader_generic
-: virtual loader_base,
- loader_object, loader_player,
- loader_region, loader_face,
- loader_treasure, loader_animation
-{
-};
+#endif