2011-02-22 10:33:14 +00:00
|
|
|
/*
|
2008-04-16 22:40:48 +00:00
|
|
|
* ***** BEGIN GPL LICENSE BLOCK *****
|
2002-10-12 11:37:38 +00:00
|
|
|
*
|
|
|
|
* 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
|
2008-04-16 22:40:48 +00:00
|
|
|
* of the License, or (at your option) any later version.
|
2002-10-12 11:37:38 +00:00
|
|
|
*
|
|
|
|
* 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,
|
2010-02-12 13:34:04 +00:00
|
|
|
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
2002-10-12 11:37:38 +00:00
|
|
|
*
|
|
|
|
* The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
|
|
|
|
* All rights reserved.
|
|
|
|
*
|
|
|
|
* The Original Code is: all of this file.
|
|
|
|
*
|
|
|
|
* Contributor(s): none yet.
|
|
|
|
*
|
2008-04-16 22:40:48 +00:00
|
|
|
* ***** END GPL LICENSE BLOCK *****
|
2002-10-12 11:37:38 +00:00
|
|
|
*/
|
2011-02-22 10:33:14 +00:00
|
|
|
|
|
|
|
/** \file SCA_IScene.h
|
|
|
|
* \ingroup gamelogic
|
|
|
|
*/
|
|
|
|
|
2002-10-12 11:37:38 +00:00
|
|
|
#ifndef __KX_ISCENE_H
|
|
|
|
#define __KX_ISCENE_H
|
|
|
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "STR_String.h"
|
2010-03-06 21:22:09 +00:00
|
|
|
#include "RAS_2DFilterManager.h"
|
2002-10-12 11:37:38 +00:00
|
|
|
|
2009-08-18 15:37:31 +00:00
|
|
|
#ifdef WITH_CXX_GUARDEDALLOC
|
|
|
|
#include "MEM_guardedalloc.h"
|
|
|
|
#endif
|
|
|
|
|
2002-10-12 11:37:38 +00:00
|
|
|
struct SCA_DebugProp
|
|
|
|
{
|
|
|
|
class CValue* m_obj;
|
|
|
|
STR_String m_name;
|
2008-04-01 20:46:20 +00:00
|
|
|
SCA_DebugProp();
|
|
|
|
~SCA_DebugProp();
|
2002-10-12 11:37:38 +00:00
|
|
|
};
|
|
|
|
|
2004-06-07 11:03:12 +00:00
|
|
|
class SCA_IScene
|
2002-10-12 11:37:38 +00:00
|
|
|
{
|
|
|
|
std::vector<SCA_DebugProp*> m_debugList;
|
|
|
|
public:
|
|
|
|
SCA_IScene();
|
|
|
|
virtual ~SCA_IScene();
|
|
|
|
virtual class SCA_IObject* AddReplicaObject(class CValue* gameobj,
|
|
|
|
class CValue* locationobj,
|
|
|
|
int lifespan=0)=0;
|
|
|
|
virtual void RemoveObject(class CValue* gameobj)=0;
|
|
|
|
virtual void DelayedRemoveObject(class CValue* gameobj)=0;
|
2009-05-10 20:53:58 +00:00
|
|
|
//virtual void DelayedReleaseObject(class CValue* gameobj)=0;
|
2006-05-22 21:03:43 +00:00
|
|
|
|
2002-10-12 11:37:38 +00:00
|
|
|
virtual void ReplaceMesh(class CValue* gameobj,
|
2009-07-26 01:32:37 +00:00
|
|
|
void* meshobj, bool use_gfx, bool use_phys)=0;
|
2002-10-12 11:37:38 +00:00
|
|
|
std::vector<SCA_DebugProp*>& GetDebugProperties();
|
|
|
|
void AddDebugProperty(class CValue* debugprop,
|
|
|
|
const STR_String &name);
|
2008-04-19 21:15:37 +00:00
|
|
|
void RemoveAllDebugProperties();
|
2010-03-06 21:22:09 +00:00
|
|
|
virtual void Update2DFilter(vector<STR_String>& propNames, void* gameObj,
|
|
|
|
RAS_2DFilterManager::RAS_2DFILTER_MODE filtermode,
|
|
|
|
int pass, STR_String& text) {}
|
2009-08-18 15:37:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef WITH_CXX_GUARDEDALLOC
|
|
|
|
public:
|
2010-06-06 01:15:44 +00:00
|
|
|
void *operator new(size_t num_bytes) { return MEM_mallocN(num_bytes, "GE:SCA_IScene"); }
|
2009-08-18 15:37:31 +00:00
|
|
|
void operator delete( void *mem ) { MEM_freeN(mem); }
|
|
|
|
#endif
|
2002-10-12 11:37:38 +00:00
|
|
|
};
|
2002-10-30 02:07:20 +00:00
|
|
|
|
2002-10-12 11:37:38 +00:00
|
|
|
#endif //__KX_ISCENE_H
|
2002-10-30 02:07:20 +00:00
|
|
|
|