Renamed **NO_SCRIPTENGINE** to **WITH_SCRIPT_ENGINE**

This commit is contained in:
OM 2023-05-29 01:33:07 +02:00
parent 6b1da4af57
commit e45289d28b
8 changed files with 58 additions and 57 deletions

View file

@ -51,7 +51,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#endif
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
#include "scriptmaster.h"
@ -369,7 +369,7 @@ ClassDef::ClassDef()
this->prev = this;
this->next = this;
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
this->waitTillSet = NULL;
#endif
}
@ -393,7 +393,7 @@ ClassDef::ClassDef( const char *classname, const char *classID, const char *supe
this->classSize = classSize;
this->super = getClass( superclass );
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
this->waitTillSet = NULL;
#endif
@ -411,7 +411,7 @@ ClassDef::ClassDef( const char *classname, const char *classID, const char *supe
}
// Add to front of list
LL_Add( classlist, this, prev, next );
LL_AddFirst( classlist, this, prev, next );
numclasses++;
}
@ -446,7 +446,7 @@ ClassDef::~ClassDef()
}
}
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
void ClassDef::AddWaitTill( str s )
{

View file

@ -38,7 +38,7 @@ class Event;
#define isSubclassOf(classname) inheritsFrom(&classname::ClassInfo)
#define isSuperclassOf(classname) isInheritedBy(&classname::ClassInfo)
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
#define CLASS_DECLARATION(parentclass, classname, classid) \
ClassDef classname::ClassInfo(#classname, classid, #parentclass, \
@ -154,7 +154,7 @@ public:
ClassDef* next;
ClassDef* prev;
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
con_set<const_str, const_str>* waitTillSet;
#endif
@ -178,7 +178,7 @@ public:
static int compareClasses(const void* arg1, const void* arg2);
static void SortClassList(Container<ClassDef*>* sortedList);
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
void AddWaitTill(str s);
void AddWaitTill(const_str s);
void RemoveWaitTill(str s);

View file

@ -26,7 +26,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "scriptexception.h"
#include "Linklist.h"
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
#include "archive.h"
#include "scriptmaster.h"
#include "scriptthread.h"
@ -56,7 +56,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
con_map< Event *, EventDef > Event::eventDefList;
con_arrayset< command_t, command_t > Event::commandList;
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
con_map< const_str, unsigned int > Event::normalCommandList;
con_map< const_str, unsigned int > Event::returnCommandList;
@ -1435,7 +1435,7 @@ void Event::PendingEvents
EVENT_Printf( "%d pending events as of %.2f\n", num, EVENT_time );
}
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
/*
=======================
@ -1991,7 +1991,7 @@ Event::Event( str command )
#endif
}
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
/*
=======================
@ -2116,7 +2116,7 @@ void Event::AddNil( void )
variable.Clear();
}
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
/*
=======================
@ -2228,7 +2228,7 @@ bool Event::GetBoolean( int pos )
return variable.booleanNumericValue();
}
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
/*
=======================
@ -2293,7 +2293,7 @@ Listener * Event::GetListener( int pos )
}
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
/*
=======================
@ -2468,7 +2468,7 @@ qboolean Event::IsNumericAt( int pos )
return data[ pos - 1 ].IsNumeric();
}
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
/*
=======================
@ -2581,7 +2581,7 @@ Listener
*/
Listener::Listener()
{
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
m_EndList = NULL;
@ -2602,7 +2602,7 @@ Listener::~Listener()
{
CancelPendingEvents();
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
Unregister( "delete" );
Unregister( "remove" );
@ -2631,7 +2631,7 @@ void Listener::Archive( Archiver &arc )
{
Class::Archive( arc );
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
byte flag = 0;
@ -3205,7 +3205,7 @@ Listener *Listener::GetScriptOwner( void )
return NULL;
}
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
/*
=======================
@ -4092,7 +4092,7 @@ void Listener::CommandDelay( Event *ev )
PostEvent( e, ev->GetFloat( 1 ) );
}
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
/*
=======================
@ -4614,7 +4614,7 @@ CLASS_DECLARATION( Class, Listener, NULL )
{ &EV_Listener_InheritsFrom, &Listener::EventInheritsFrom },
{ &EV_Listener_IsInheritedBy, &Listener::EventIsInheritedBy },
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
{ &EV_Listener_CancelFor, &Listener::CancelFor },
{ &EV_Listener_CreateReturnThread, &Listener::CreateReturnThread },
{ &EV_Listener_CreateThread, &Listener::CreateThread },

View file

@ -235,7 +235,7 @@ inline bool operator==( const str &name, const command_t &command )
return command.command == name;
}
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
inline bool operator==( const command_t &cmd1, const command_t &cmd2 )
{
return ( cmd2.command == cmd1.command && ( cmd2.type == ( uchar )-1 || cmd2.type == cmd1.type ) );
@ -372,7 +372,7 @@ public:
class PathNode *GetPathNode( int pos );
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
SimpleEntity *GetSimpleEntity( int pos );
#endif
@ -389,7 +389,7 @@ public:
qboolean IsListenerAt( int pos );
qboolean IsNilAt( int pos );
qboolean IsNumericAt( int pos );
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
qboolean IsSimpleEntityAt( int pos );
#endif
qboolean IsStringAt( int pos );
@ -446,7 +446,7 @@ using ListenerPtr = SafePtr< Listener >;
class Listener : public Class
{
public:
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
con_set< const_str, ConList > *m_NotifyList;
con_set< const_str, ConList > *m_WaitForList;
con_set< const_str, ConList > *m_EndList;
@ -456,7 +456,7 @@ public:
static bool EventSystemStarted;
private:
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
void ExecuteScriptInternal( Event *ev, ScriptVariable& scriptVariable );
void ExecuteThreadInternal( Event *ev, ScriptVariable& returnValue );
void WaitExecuteScriptInternal( Event *ev, ScriptVariable& returnValue );
@ -468,7 +468,7 @@ private:
public:
CLASS_PROTOTYPE( Listener );
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
/* Game functions */
virtual ScriptThread *CreateThreadInternal( const ScriptVariable& label );
virtual ScriptThread *CreateScriptInternal( const ScriptVariable& label );
@ -509,7 +509,7 @@ public:
bool ProcessScriptEvent( Event &ev );
bool ProcessScriptEvent( Event *ev );
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
void CreateVars( void );
void ClearVars( void );
@ -564,7 +564,7 @@ public:
void EventIsInheritedBy( Event *ev );
void GetClassname( Event *ev );
#ifndef NO_SCRIPTENGINE
#ifdef WITH_SCRIPT_ENGINE
void CancelFor( Event *ev );
void CreateReturnThread( Event *ev );
void CreateThread( Event *ev );