/* * celbase.h - author Matze Braun * * Copyright (C) 2001 Atomic Blue (info@planeshift.it, http://www.atomicblue.org) * * * 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 (version 2 of the License) * 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. * */ #ifndef __CELBASE_H__ #define __CELBASE_H__ #include #include // This list of includes means that any source which uses CEL only has to // include one file->this one. #include #include #include #include #include //#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include struct iObjectRegistry; /** * Base Class for cel managers in server and client. * This class mainly handles loading of cel plugins and managing of common cel * resources */ class CelBase { public: CelBase(); virtual ~CelBase(); virtual bool Initialize (iObjectRegistry* object_reg); /// Remove the entity from the actors list inventory. bool RemoveActor(iCelEntity* actor); /// Removes the entity from the world's inventory. bool RemoveItem( iCelEntity* item); //XXX: this should be protected bool LoadTextures(); iCelPlLayer* GetPlLayer() { return pl; } iObjectRegistry* GetObjectReg() { return object_reg; } bool LoadTexture(const char* txtname, const char* filename); protected: bool LoadPlugin (const char* pcfactname); bool LoadTextureDir(const char *dir); iObjectRegistry* object_reg; csRef pl; csRef txtmgr; csRef pluginMgr; csRef loader; csRef engine; csRef actors; csRef vfs; }; #endif