Drag[en]gine Game Engine  1.0
deBaseScriptingModule Class Referenceabstract

Base Scripting Module. More...

#include <deBaseScriptingModule.h>

Inheritance diagram for deBaseScriptingModule:
deBaseModule

Public Member Functions

Constructors and Destructors
 deBaseScriptingModule (deLoadableModule &loadableModule)
 
virtual ~deBaseScriptingModule ()
 
Modeul Management
virtual const char * GetSharedDataDir () const
 Directory relative to the module share directory where shared module data is located. More...
 
virtual bool Init (const char *scriptDirectory, const char *gameObject)=0
 
virtual void ShutDown ()=0
 
Management
virtual deBaseScriptingColliderCreateCollider (deCollider *collider)=0
 
virtual deBaseScriptingServerCreateServer (deServer *server)=0
 
virtual deBaseScriptingConnectionCreateConnection (deConnection *connection)=0
 
virtual deBaseScriptingNetworkStateCreateNetworkState (deNetworkState *state)=0
 
virtual deBaseScriptingAICreateAI (deAI *ai)=0
 
virtual deBaseScriptingTouchSensorCreateTouchSensor (deTouchSensor *touchSensor)=0
 
virtual deBaseScriptingPropFieldCreatePropField (dePropField *propField)=0
 
virtual deBaseScriptingParticleEmitterInstanceCreateParticleEmitterInstance (deParticleEmitterInstance *instance)
 
virtual bool InitGame ()=0
 
virtual bool ExitGame ()=0
 
virtual bool OnFrameUpdate ()=0
 
virtual bool OnResizeRenderWindow ()=0
 
virtual bool PaintScreen ()=0
 
virtual bool SendEvent (deInputEvent *event)=0
 
- Public Member Functions inherited from deBaseModule
 deBaseModule (deLoadableModule &loadableModule)
 Creates a new base module. More...
 
virtual ~deBaseModule ()
 Cleans up the base module. More...
 
virtual int GetParameterCount () const
 Retrieves the count of parameters. More...
 
virtual void GetParameterInfo (int index, deModuleParameter *parameter) const
 Retrieves the informations about the given indexec parameter. More...
 
virtual int FindParameter (const char *name) const
 Retrieves the index of the parameter with the given name or -1 if not found. More...
 
virtual float GetParameterValue (int index) const
 Retrieves the value of the parameter at the given index. More...
 
virtual void SetParameterValue (int index, float value)
 Sets the parameter of the parameter at the given index. More...
 
virtual void SendCommand (const decUnicodeArgumentList &command, decUnicodeString &answer)
 Sends a command to the module and retrieves an answer from it. More...
 
void LogInfo (const char *message)
 Outputs an information message on the console. More...
 
void LogInfoFormat (const char *message,...)
 Outputs a formated information message on the console. More...
 
void LogInfoFormatUsing (const char *message, va_list args)
 Outputs a formated information message on the console. More...
 
void LogWarn (const char *message)
 Outputs a warning message on the console. More...
 
void LogWarnFormat (const char *message,...)
 Outputs a formated warning message on the console. More...
 
void LogWarnFormatUsing (const char *message, va_list args)
 Outputs a formated warning message on the console. More...
 
void LogError (const char *message)
 Outputs an error message on the console. More...
 
void LogErrorFormat (const char *message,...)
 Outputs a formated error message on the console. More...
 
void LogErrorFormatUsing (const char *message, va_list args)
 Outputs a formated error message on the console. More...
 
void LogException (const deException &exception)
 Outputs an exception as error message on the console. More...
 
deEngineGetGameEngine () const
 Retrieves the game engine object. More...
 
deLoadableModuleGetLoadableModule () const
 Retrieves the loadable module. More...
 
deOSGetOS () const
 Retrieves the os object from the game engine. More...
 
deVirtualFileSystemGetVFS () const
 Retrieves the module virtual file system. More...
 
deErrorTracePointSetErrorTrace (const char *error, const char *sourceFunc, int sourceLine)
 Adds a new trace point and sets the error if the trace is empty. More...
 
deErrorTracePointSetErrorTrace (const deException &exception)
 Adds a new trace point and sets the error if the trace is empty. More...
 
deErrorTracePointAddErrorTracePoint (const char *sourceFunc, int sourceLine)
 Adds a new trace point to the engine error trace with an empty error. More...
 

Detailed Description

Base Scripting Module.

The scripting module provides the interface of the engine systems to a scripting or programming language. The scripting module defines also how much of the power of the engine is exposed to the scripter.

Author
Pl├╝ss Roland
Version
1.0
Date
2008

Constructor & Destructor Documentation

◆ deBaseScriptingModule()

deBaseScriptingModule::deBaseScriptingModule ( deLoadableModule loadableModule)

Creates a new module.

◆ ~deBaseScriptingModule()

virtual deBaseScriptingModule::~deBaseScriptingModule ( )
virtual

Cleans up the module.

Member Function Documentation

◆ CreateAI()

virtual deBaseScriptingAI* deBaseScriptingModule::CreateAI ( deAI ai)
pure virtual

Creates a peer for the given ai object.

◆ CreateCollider()

virtual deBaseScriptingCollider* deBaseScriptingModule::CreateCollider ( deCollider collider)
pure virtual

Creates a peer for the given collider object.

◆ CreateConnection()

virtual deBaseScriptingConnection* deBaseScriptingModule::CreateConnection ( deConnection connection)
pure virtual

Creates a peer for the given connection object.

◆ CreateNetworkState()

virtual deBaseScriptingNetworkState* deBaseScriptingModule::CreateNetworkState ( deNetworkState state)
pure virtual

Creates a peer for the given network state object.

◆ CreateParticleEmitterInstance()

virtual deBaseScriptingParticleEmitterInstance* deBaseScriptingModule::CreateParticleEmitterInstance ( deParticleEmitterInstance instance)
virtual

Creates a peer for the given particle emitter instance object or NULL if not used.

◆ CreatePropField()

virtual deBaseScriptingPropField* deBaseScriptingModule::CreatePropField ( dePropField propField)
pure virtual

Creates a peer for the given prop field object.

◆ CreateServer()

virtual deBaseScriptingServer* deBaseScriptingModule::CreateServer ( deServer server)
pure virtual

Creates a peer for the given server object.

◆ CreateTouchSensor()

virtual deBaseScriptingTouchSensor* deBaseScriptingModule::CreateTouchSensor ( deTouchSensor touchSensor)
pure virtual

Creates a peer for the given touch sensor object.

◆ ExitGame()

virtual bool deBaseScriptingModule::ExitGame ( )
pure virtual

Exits the game scripts. This usually involves calling exit functions and freeing game objects.

◆ GetSharedDataDir()

virtual const char* deBaseScriptingModule::GetSharedDataDir ( ) const
virtual

Directory relative to the module share directory where shared module data is located.

Returns
NULL if no such directory is used.

◆ Init()

virtual bool deBaseScriptingModule::Init ( const char *  scriptDirectory,
const char *  gameObject 
)
pure virtual

Prepares the scripting module to operate the game by checking the specified script directory to contain suitable scripts and allocates needed objects or memory. A startable package usually needs certain classes or functions to be present to be startable. See the individual manuals of the scripting modules to learn about those requirements. After the Init function has exited the scripting module is ready to operate the game.

◆ InitGame()

virtual bool deBaseScriptingModule::InitGame ( )
pure virtual

Initializes the game scripts. This usually involves creating the game objects and calling init functions on them.

◆ OnFrameUpdate()

virtual bool deBaseScriptingModule::OnFrameUpdate ( )
pure virtual

Called at the beginning of each update cycle. This gives the game scripts the chance to do frame update related tasks that do not involve updating the screen. You can update skins or offscreen render targets but you should not update the screen itself.

Returns
true if the call has been successfull or false otherwise

◆ OnResizeRenderWindow()

virtual bool deBaseScriptingModule::OnResizeRenderWindow ( )
pure virtual

Called after the render window changed size.

◆ PaintScreen()

virtual bool deBaseScriptingModule::PaintScreen ( )
pure virtual

The screen has to be painted. The screen is considered invalid before the call of this function and fully valid after it.

Returns
true if the call has been successfull or false otherwise

◆ SendEvent()

virtual bool deBaseScriptingModule::SendEvent ( deInputEvent event)
pure virtual

Send the given event to game scripts.

Returns
true if the call has been successfull or false otherwise

◆ ShutDown()

virtual void deBaseScriptingModule::ShutDown ( )
pure virtual

Shuts down the scripting module and frees all resources.


The documentation for this class was generated from the following file: