mirror of
https://github.com/jmarshall23/DoomRTX.git
synced 2026-08-15 07:40:44 +02:00
TypeInfoGen will now autobind doom scripts.
This commit is contained in:
@@ -29,166 +29,9 @@ If you have questions concerning this license or the applicable additional terms
|
||||
#include "precompiled.h"
|
||||
#include "../Game_local.h"
|
||||
|
||||
const idEventDef EV_Thread_Execute( "<execute>", NULL );
|
||||
const idEventDef EV_Thread_SetCallback( "<script_setcallback>", NULL );
|
||||
|
||||
// script callable events
|
||||
const idEventDef EV_Thread_TerminateThread( "terminate", "d" );
|
||||
const idEventDef EV_Thread_Pause( "pause", NULL );
|
||||
const idEventDef EV_Thread_Wait( "wait", "f" );
|
||||
const idEventDef EV_Thread_WaitFrame( "waitFrame" );
|
||||
const idEventDef EV_Thread_WaitFor( "waitFor", "e" );
|
||||
const idEventDef EV_Thread_WaitForThread( "waitForThread", "d" );
|
||||
const idEventDef EV_Thread_Print( "print", "s" );
|
||||
const idEventDef EV_Thread_PrintLn( "println", "s" );
|
||||
const idEventDef EV_Thread_Say( "say", "s" );
|
||||
const idEventDef EV_Thread_Assert( "assert", "f" );
|
||||
const idEventDef EV_Thread_Trigger( "trigger", "e" );
|
||||
const idEventDef EV_Thread_SetCvar( "setcvar", "ss" );
|
||||
const idEventDef EV_Thread_GetCvar( "getcvar", "s", 's' );
|
||||
const idEventDef EV_Thread_Random( "random", "f", 'f' );
|
||||
const idEventDef EV_Thread_GetTime( "getTime", NULL, 'f' );
|
||||
const idEventDef EV_Thread_KillThread( "killthread", "s" );
|
||||
const idEventDef EV_Thread_SetThreadName( "threadname", "s" );
|
||||
const idEventDef EV_Thread_GetEntity( "getEntity", "s", 'e' );
|
||||
const idEventDef EV_Thread_Spawn( "spawn", "s", 'e' );
|
||||
const idEventDef EV_Thread_CopySpawnArgs( "copySpawnArgs", "e" );
|
||||
const idEventDef EV_Thread_SetSpawnArg( "setSpawnArg", "ss" );
|
||||
const idEventDef EV_Thread_SpawnString( "SpawnString", "ss", 's' );
|
||||
const idEventDef EV_Thread_SpawnFloat( "SpawnFloat", "sf", 'f' );
|
||||
const idEventDef EV_Thread_SpawnVector( "SpawnVector", "sv", 'v' );
|
||||
const idEventDef EV_Thread_ClearPersistantArgs( "clearPersistantArgs" );
|
||||
const idEventDef EV_Thread_SetPersistantArg( "setPersistantArg", "ss" );
|
||||
const idEventDef EV_Thread_GetPersistantString( "getPersistantString", "s", 's' );
|
||||
const idEventDef EV_Thread_GetPersistantFloat( "getPersistantFloat", "s", 'f' );
|
||||
const idEventDef EV_Thread_GetPersistantVector( "getPersistantVector", "s", 'v' );
|
||||
const idEventDef EV_Thread_AngToForward( "angToForward", "v", 'v' );
|
||||
const idEventDef EV_Thread_AngToRight( "angToRight", "v", 'v' );
|
||||
const idEventDef EV_Thread_AngToUp( "angToUp", "v", 'v' );
|
||||
const idEventDef EV_Thread_Sine( "sin", "f", 'f' );
|
||||
const idEventDef EV_Thread_Cosine( "cos", "f", 'f' );
|
||||
const idEventDef EV_Thread_SquareRoot( "sqrt", "f", 'f' );
|
||||
const idEventDef EV_Thread_Normalize( "vecNormalize", "v", 'v' );
|
||||
const idEventDef EV_Thread_VecLength( "vecLength", "v", 'f' );
|
||||
const idEventDef EV_Thread_VecDotProduct( "DotProduct", "vv", 'f' );
|
||||
const idEventDef EV_Thread_VecCrossProduct( "CrossProduct", "vv", 'v' );
|
||||
const idEventDef EV_Thread_VecToAngles( "VecToAngles", "v", 'v' );
|
||||
const idEventDef EV_Thread_OnSignal( "onSignal", "des" );
|
||||
const idEventDef EV_Thread_ClearSignal( "clearSignalThread", "de" );
|
||||
const idEventDef EV_Thread_SetCamera( "setCamera", "e" );
|
||||
const idEventDef EV_Thread_FirstPerson( "firstPerson", NULL );
|
||||
const idEventDef EV_Thread_Trace( "trace", "vvvvde", 'f' );
|
||||
const idEventDef EV_Thread_TracePoint( "tracePoint", "vvde", 'f' );
|
||||
const idEventDef EV_Thread_GetTraceFraction( "getTraceFraction", NULL, 'f' );
|
||||
const idEventDef EV_Thread_GetTraceEndPos( "getTraceEndPos", NULL, 'v' );
|
||||
const idEventDef EV_Thread_GetTraceNormal( "getTraceNormal", NULL, 'v' );
|
||||
const idEventDef EV_Thread_GetTraceEntity( "getTraceEntity", NULL, 'e' );
|
||||
const idEventDef EV_Thread_GetTraceJoint( "getTraceJoint", NULL, 's' );
|
||||
const idEventDef EV_Thread_GetTraceBody( "getTraceBody", NULL, 's' );
|
||||
const idEventDef EV_Thread_FadeIn( "fadeIn", "vf" );
|
||||
const idEventDef EV_Thread_FadeOut( "fadeOut", "vf" );
|
||||
const idEventDef EV_Thread_FadeTo( "fadeTo", "vff" );
|
||||
const idEventDef EV_Thread_StartMusic( "music", "s" );
|
||||
const idEventDef EV_Thread_Error( "error", "s" );
|
||||
const idEventDef EV_Thread_Warning( "warning", "s" );
|
||||
const idEventDef EV_Thread_StrLen( "strLength", "s", 'd' );
|
||||
const idEventDef EV_Thread_StrLeft( "strLeft", "sd", 's' );
|
||||
const idEventDef EV_Thread_StrRight( "strRight", "sd", 's' );
|
||||
const idEventDef EV_Thread_StrSkip( "strSkip", "sd", 's' );
|
||||
const idEventDef EV_Thread_StrMid( "strMid", "sdd", 's' );
|
||||
const idEventDef EV_Thread_StrToFloat( "strToFloat", "s", 'f' );
|
||||
const idEventDef EV_Thread_RadiusDamage( "radiusDamage", "vEEEsf" );
|
||||
const idEventDef EV_Thread_IsClient( "isClient", NULL, 'f' );
|
||||
const idEventDef EV_Thread_IsMultiplayer( "isMultiplayer", NULL, 'f' );
|
||||
const idEventDef EV_Thread_GetFrameTime( "getFrameTime", NULL, 'f' );
|
||||
const idEventDef EV_Thread_GetTicsPerSecond( "getTicsPerSecond", NULL, 'f' );
|
||||
const idEventDef EV_Thread_DebugLine( "debugLine", "vvvf" );
|
||||
const idEventDef EV_Thread_DebugArrow( "debugArrow", "vvvdf" );
|
||||
const idEventDef EV_Thread_DebugCircle( "debugCircle", "vvvfdf" );
|
||||
const idEventDef EV_Thread_DebugBounds( "debugBounds", "vvvf" );
|
||||
const idEventDef EV_Thread_DrawText( "drawText", "svfvdf" );
|
||||
const idEventDef EV_Thread_InfluenceActive( "influenceActive", NULL, 'd' );
|
||||
|
||||
CLASS_DECLARATION( idClass, idThread )
|
||||
EVENT( EV_Thread_Execute, idThread::Event_Execute )
|
||||
EVENT( EV_Thread_TerminateThread, idThread::Event_TerminateThread )
|
||||
EVENT( EV_Thread_Pause, idThread::Event_Pause )
|
||||
EVENT( EV_Thread_Wait, idThread::Event_Wait )
|
||||
EVENT( EV_Thread_WaitFrame, idThread::Event_WaitFrame )
|
||||
EVENT( EV_Thread_WaitFor, idThread::Event_WaitFor )
|
||||
EVENT( EV_Thread_WaitForThread, idThread::Event_WaitForThread )
|
||||
EVENT( EV_Thread_Print, idThread::Event_Print )
|
||||
EVENT( EV_Thread_PrintLn, idThread::Event_PrintLn )
|
||||
EVENT( EV_Thread_Say, idThread::Event_Say )
|
||||
EVENT( EV_Thread_Assert, idThread::Event_Assert )
|
||||
EVENT( EV_Thread_Trigger, idThread::Event_Trigger )
|
||||
EVENT( EV_Thread_SetCvar, idThread::Event_SetCvar )
|
||||
EVENT( EV_Thread_GetCvar, idThread::Event_GetCvar )
|
||||
EVENT( EV_Thread_Random, idThread::Event_Random )
|
||||
EVENT( EV_Thread_GetTime, idThread::Event_GetTime )
|
||||
EVENT( EV_Thread_KillThread, idThread::Event_KillThread )
|
||||
EVENT( EV_Thread_SetThreadName, idThread::Event_SetThreadName )
|
||||
EVENT( EV_Thread_GetEntity, idThread::Event_GetEntity )
|
||||
EVENT( EV_Thread_Spawn, idThread::Event_Spawn )
|
||||
EVENT( EV_Thread_CopySpawnArgs, idThread::Event_CopySpawnArgs )
|
||||
EVENT( EV_Thread_SetSpawnArg, idThread::Event_SetSpawnArg )
|
||||
EVENT( EV_Thread_SpawnString, idThread::Event_SpawnString )
|
||||
EVENT( EV_Thread_SpawnFloat, idThread::Event_SpawnFloat )
|
||||
EVENT( EV_Thread_SpawnVector, idThread::Event_SpawnVector )
|
||||
EVENT( EV_Thread_ClearPersistantArgs, idThread::Event_ClearPersistantArgs )
|
||||
EVENT( EV_Thread_SetPersistantArg, idThread::Event_SetPersistantArg )
|
||||
EVENT( EV_Thread_GetPersistantString, idThread::Event_GetPersistantString )
|
||||
EVENT( EV_Thread_GetPersistantFloat, idThread::Event_GetPersistantFloat )
|
||||
EVENT( EV_Thread_GetPersistantVector, idThread::Event_GetPersistantVector )
|
||||
EVENT( EV_Thread_AngToForward, idThread::Event_AngToForward )
|
||||
EVENT( EV_Thread_AngToRight, idThread::Event_AngToRight )
|
||||
EVENT( EV_Thread_AngToUp, idThread::Event_AngToUp )
|
||||
EVENT( EV_Thread_Sine, idThread::Event_GetSine )
|
||||
EVENT( EV_Thread_Cosine, idThread::Event_GetCosine )
|
||||
EVENT( EV_Thread_SquareRoot, idThread::Event_GetSquareRoot )
|
||||
EVENT( EV_Thread_Normalize, idThread::Event_VecNormalize )
|
||||
EVENT( EV_Thread_VecLength, idThread::Event_VecLength )
|
||||
EVENT( EV_Thread_VecDotProduct, idThread::Event_VecDotProduct )
|
||||
EVENT( EV_Thread_VecCrossProduct, idThread::Event_VecCrossProduct )
|
||||
EVENT( EV_Thread_VecToAngles, idThread::Event_VecToAngles )
|
||||
EVENT( EV_Thread_OnSignal, idThread::Event_OnSignal )
|
||||
EVENT( EV_Thread_ClearSignal, idThread::Event_ClearSignalThread )
|
||||
EVENT( EV_Thread_SetCamera, idThread::Event_SetCamera )
|
||||
EVENT( EV_Thread_FirstPerson, idThread::Event_FirstPerson )
|
||||
EVENT( EV_Thread_Trace, idThread::Event_Trace )
|
||||
EVENT( EV_Thread_TracePoint, idThread::Event_TracePoint )
|
||||
EVENT( EV_Thread_GetTraceFraction, idThread::Event_GetTraceFraction )
|
||||
EVENT( EV_Thread_GetTraceEndPos, idThread::Event_GetTraceEndPos )
|
||||
EVENT( EV_Thread_GetTraceNormal, idThread::Event_GetTraceNormal )
|
||||
EVENT( EV_Thread_GetTraceEntity, idThread::Event_GetTraceEntity )
|
||||
EVENT( EV_Thread_GetTraceJoint, idThread::Event_GetTraceJoint )
|
||||
EVENT( EV_Thread_GetTraceBody, idThread::Event_GetTraceBody )
|
||||
EVENT( EV_Thread_FadeIn, idThread::Event_FadeIn )
|
||||
EVENT( EV_Thread_FadeOut, idThread::Event_FadeOut )
|
||||
EVENT( EV_Thread_FadeTo, idThread::Event_FadeTo )
|
||||
EVENT( EV_SetShaderParm, idThread::Event_SetShaderParm )
|
||||
EVENT( EV_Thread_StartMusic, idThread::Event_StartMusic )
|
||||
EVENT( EV_Thread_Warning, idThread::Event_Warning )
|
||||
EVENT( EV_Thread_Error, idThread::Event_Error )
|
||||
EVENT( EV_Thread_StrLen, idThread::Event_StrLen )
|
||||
EVENT( EV_Thread_StrLeft, idThread::Event_StrLeft )
|
||||
EVENT( EV_Thread_StrRight, idThread::Event_StrRight )
|
||||
EVENT( EV_Thread_StrSkip, idThread::Event_StrSkip )
|
||||
EVENT( EV_Thread_StrMid, idThread::Event_StrMid )
|
||||
EVENT( EV_Thread_StrToFloat, idThread::Event_StrToFloat )
|
||||
EVENT( EV_Thread_RadiusDamage, idThread::Event_RadiusDamage )
|
||||
EVENT( EV_Thread_IsClient, idThread::Event_IsClient )
|
||||
EVENT( EV_Thread_IsMultiplayer, idThread::Event_IsMultiplayer )
|
||||
EVENT( EV_Thread_GetFrameTime, idThread::Event_GetFrameTime )
|
||||
EVENT( EV_Thread_GetTicsPerSecond, idThread::Event_GetTicsPerSecond )
|
||||
EVENT( EV_CacheSoundShader, idThread::Event_CacheSoundShader )
|
||||
EVENT( EV_Thread_DebugLine, idThread::Event_DebugLine )
|
||||
EVENT( EV_Thread_DebugArrow, idThread::Event_DebugArrow )
|
||||
EVENT( EV_Thread_DebugCircle, idThread::Event_DebugCircle )
|
||||
EVENT( EV_Thread_DebugBounds, idThread::Event_DebugBounds )
|
||||
EVENT( EV_Thread_DrawText, idThread::Event_DrawText )
|
||||
EVENT( EV_Thread_InfluenceActive, idThread::Event_InfluenceActive )
|
||||
END_CLASS
|
||||
|
||||
idThread *idThread::currentThread = NULL;
|
||||
int idThread::threadIndex = 0;
|
||||
@@ -532,11 +375,11 @@ idThread::DelayedStart
|
||||
================
|
||||
*/
|
||||
void idThread::DelayedStart( int delay ) {
|
||||
CancelEvents( &EV_Thread_Execute );
|
||||
CancelEvents( &EV_idThread_Execute );
|
||||
if ( gameLocal.time <= 0 ) {
|
||||
delay++;
|
||||
}
|
||||
PostEventMS( &EV_Thread_Execute, delay );
|
||||
PostEventMS( &EV_idThread_Execute, delay );
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -547,7 +390,7 @@ idThread::Start
|
||||
bool idThread::Start( void ) {
|
||||
bool result;
|
||||
|
||||
CancelEvents( &EV_Thread_Execute );
|
||||
CancelEvents( &EV_idThread_Execute );
|
||||
result = Execute();
|
||||
|
||||
return result;
|
||||
@@ -662,9 +505,9 @@ bool idThread::Execute( void ) {
|
||||
}
|
||||
} else if ( !manualControl ) {
|
||||
if ( waitingUntil > lastExecuteTime ) {
|
||||
PostEventMS( &EV_Thread_Execute, waitingUntil - lastExecuteTime );
|
||||
PostEventMS( &EV_idThread_Execute, waitingUntil - lastExecuteTime );
|
||||
} else if ( interpreter.MultiFrameEventInProgress() ) {
|
||||
PostEventMS( &EV_Thread_Execute, gameLocal.msec );
|
||||
PostEventMS( &EV_idThread_Execute, gameLocal.msec );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1029,8 +872,11 @@ idThread::Event_Trigger
|
||||
*/
|
||||
void idThread::Event_Trigger( idEntity *ent ) {
|
||||
if ( ent ) {
|
||||
const idEventDef *activateEvent = ent->FindEventDef( "activate", "e" );
|
||||
ent->Signal( SIG_TRIGGER );
|
||||
ent->ProcessEvent( &EV_Activate, gameLocal.GetLocalPlayer() );
|
||||
if ( activateEvent ) {
|
||||
ent->ProcessEvent( activateEvent, gameLocal.GetLocalPlayer() );
|
||||
}
|
||||
ent->TriggerGuis();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user