rage::scrProgram::AllowMismatchedGlobals@bool

script Documentation
Contents | Index
rage::scrProgram::AllowMismatchedGlobals@bool
Body Source
Show All

Disable check of globals signature (turns a quitf into an errorf)

Links
Body Source
Send comments on this topic.
Copyright (c) 2003-2008 Rockstar San Diego. All rights reserved.


rage::scrProgram::DefaultGetFullFilename@char *@int@const char *@const char *

rage::scrProgram::DefaultGetFullFilename@char *@int@const char *@const char *
Show All

Default callback for getting the fully qualified path name

Send comments on this topic.


rage::scrProgram::GetArgStructSize@const

rage::scrProgram::GetArgStructSize@const
Body Source
Show All
Returns

Arg struct size, in VM words, not bytes.

Links
Body Source
Send comments on this topic.


rage::scrProgram::GetFullFilename

rage::scrProgram::GetFullFilename
Show All

Callback for getting script file names

Send comments on this topic.


rage::scrProgram::GetProgramId@const

rage::scrProgram::GetProgramId@const
Body Source
Show All

Returns current program's hash code

Links
Body Source
Send comments on this topic.


rage::scrProgram::Init@const char *@const u8*@int@const u32 *@int@const scrValue *@int@const scrValue *@int@const char *@int@int

rage::scrProgram::Init@const char *@const u8*@int@const u32 *@int@const scrValue *@int@const scrValue *@int@const char *@int@int
Show All

Only used by script compiler

Send comments on this topic.


rage::scrProgram::Load@const char *

rage::scrProgram::Load@const char *

Loads a program, assuming the filename and program name are identical


rage::scrProgram::Load@const char *@const char *

rage::scrProgram::Load@const char *@const char *

Loads a program, assuming the filename and program name are not identical


rage::scrProgram::ResetGlobals@u32@u32

rage::scrProgram::ResetGlobals@u32@u32

Copies the "original" globals back over the actual globals - useful in a reset


rage::scrProgram::SetGlobals

rage::scrProgram::SetGlobals

Allocates memory

Send comments on this topic.


rage::scrProgram::SnapshotGlobals@u32@u32

rage::scrProgram::SnapshotGlobals@u32@u32

Allows backing up of globals to the "original" globals array after the crafty constructor has run


rage::scrProgram::Validate@scrProgramId

rage::scrProgram::Validate@scrProgramId

Validate the program

Send comments on this topic.


rage::scrThread::~scrThread

rage::scrThread::~scrThread

Destructor

Send comments on this topic.


rage::scrThread::AddThreadStack@int@int

rage::scrThread::AddThreadStack@int@int

Allocate thread stacks of a particular size. There are always twice as many possible thread stacks as there are threads in the system, although they do not all have to get allocated.

Parameters

count
Number of stacks to allocate
stackSize
Size of the stack

Send comments on this topic.


rage::scrThread::AllocateThreads@int@int

rage::scrThread::AllocateThreads@int@int

Reserve space for fixed number of threads

Parameters

count
Maximum number of threads we will support simultaneously
stackSize
Default stack size to allocate for each thread. Set to zero to allocate multiple stack sizes instead.

Notes

Reimplement this in a subclass and call that version if you subclass the script thread.


rage::scrThread::AppFaultHandler

rage::scrThread::AppFaultHandler

Allow applications to register an exception handler


rage::scrThread::CancelWait

rage::scrThread::CancelWait
Body Source
Show All

Cancel any pending wait in this thread (assuming it has already started)

Links
Body Source
Send comments on this topic.


rage::scrThread::Continue

rage::scrThread::Continue

Continue after setting a breakpoint

Send comments on this topic.


rage::scrThread::CreateThread@const char *@const void *@int@int

rage::scrThread::CreateThread@const char *@const void *@int@int
Show All

Create a new thread attached to the particular program ID.

Parameters

filename
file name to load (overload assumes they're the same)
progname
Program to attach to
argStruct
Optional pointer to a structure to copy into the script's address space
argStructSize
sizeof(*argStruct), in bytes
stackSize
Size of the stack (in words)

Returns

New thread identifier (guaranteed unique forever) or NULL if no threads available


rage::scrThread::CreateThread@scrProgramId@const void *@int@int

rage::scrThread::CreateThread@scrProgramId@const void *@int@int
Show All

Create a new thread attached to the particular program ID.

Parameters

progId
Program ID to attach to
argStruct
Optional pointer to a structure to copy into the script's address space
argStructSize
sizeof(*argStruct), in bytes
stackSize
Size of the stack (in words)

Returns

New thread identifier (guaranteed unique forever) or NULL if no threads available


rage::scrThread::Disassemble@char *@scrProgramId@int

rage::scrThread::Disassemble@char *@scrProgramId@int

Disassemble the virtual machine code for the specied program at the specified address

Parameters

dest
Destination buffer to receive disassembly test
program
Program index to disassemble
pc
program counter to disassemble at (should start with zero)

Returns

Program counter value for NEXT instruction


rage::scrThread::DisplayProfileData@void *displayfbool severe,const char*,...

rage::scrThread::DisplayProfileData@void *displayfbool severe,const char*,...
Show All

this dumps to display (via callback below), doesn't reset counters.


rage::scrThread::DumpState@void *printerconst char *fmt,...

rage::scrThread::DumpState@void *printerconst char *fmt,...
Show All

Dumps thread state to console (program counter, stack contents, etc)


rage::scrThread::enum@1

rage::scrThread::enum@1

static const causes missing symbol under gcc 4.1.1 debug builds. presume it's something to do with its use as a default parameter.


rage::scrThread::enum@2

rage::scrThread::enum@2

length of OP_NATIVE insn in case caller needs PC of *next* insn.


rage::scrThread::ExecuteNetworkCommand@u32@int@scrValue *

rage::scrThread::ExecuteNetworkCommand@u32@int@scrValue *

Execute a native command directly (for networking use)

Parameters

commandHash
Command to execute
numParameters
Number of parameters
pParameters
Parameter list

Send comments on this topic.


rage::scrThread::FaultHandlerFunc

rage::scrThread::FaultHandlerFunc

Fault handler functor for the script debugger.


rage::scrThread::GetAbortReason@const

rage::scrThread::GetAbortReason@const
Body Source
Show All
Returns

Reason this thread had aborted, if any; used by debugger.

Links
Body Source
Send comments on this topic.


rage::scrThread::GetActiveThread

rage::scrThread::GetActiveThread

Returns the currently executing thread, if any.


rage::scrThread::GetArgs@const

rage::scrThread::GetArgs@const
Body Source
Show All
Returns

Current args data structure owned by the script (was the parameters passed in and possibly subsequently modified)

Links
Body Source
Send comments on this topic.


rage::scrThread::GetArgsSize@const

rage::scrThread::GetArgsSize@const
Body Source
Show All
Returns

Size of args data structure owned by the script (was the parameters passed in and possibly subsequently modified)

Links
Body Source
Send comments on this topic.


rage::scrThread::GetCmdFromName@const char *

rage::scrThread::GetCmdFromName@const char *
Returns

Maximum amount of the stack that has been used


rage::scrThread::GetGlobal@int

rage::scrThread::GetGlobal@int

Retrieves global variable at specified offset. Used by debugger.


rage::scrThread::GetGlobalVariableAddress@int

rage::scrThread::GetGlobalVariableAddress@int

Returns the address of the global variable

Parameters

index
As returned by LookupGlobalVariable

Returns

Pointer to global storage

Send comments on this topic.


rage::scrThread::GetGlobalVariableCount

rage::scrThread::GetGlobalVariableCount
Body Source
Show All
Returns

Number of global variables

Links
Body Source
Send comments on this topic.


rage::scrThread::GetGlobalVariableType@int

rage::scrThread::GetGlobalVariableType@int
Body Source
Show All

Returns the type of a global variable

Parameters

index
As returned by LookupGlobalVariable

Returns

Variable type (scrValue enumerant)

Links
Body Source
Send comments on this topic.


rage::scrThread::GetInstructionsUsed@const

rage::scrThread::GetInstructionsUsed@const
Body Source
Show All
Returns

Number of instructions the script has used (updated during Run operation)

Links
Body Source
Send comments on this topic.


rage::scrThread::GetLocal@int

rage::scrThread::GetLocal@int

Retrieves local variable at specified offset. Used by debugger.


rage::scrThread::GetProgram@const

rage::scrThread::GetProgram@const
Body Source
Show All

Returns program currently attached to this thread.

Links
Body Source
Send comments on this topic.


rage::scrThread::GetProgramCounter@int@const

rage::scrThread::GetProgramCounter@int@const

Returns program counter value for the specified (zero-based) stack level, or -1 if it doesn't exist.


rage::scrThread::GetScriptName

rage::scrThread::GetScriptName
Body Source
Show All

Get the filename of the script that this thread is running

Notes

This needs more work to figure out how to manage these variables.

Links
Body Source
Send comments on this topic.


rage::scrThread::GetSerializedState

rage::scrThread::GetSerializedState
Body Source
Show All
Returns

Pointer to serializable state block

Links
Body Source
Send comments on this topic.


rage::scrThread::GetSerializedState@const

rage::scrThread::GetSerializedState@const
Body Source
Show All
Returns

Pointer to serializable state block

Links
Body Source
Send comments on this topic.


rage::scrThread::GetSerializedStateSize@const

rage::scrThread::GetSerializedStateSize@const
Body Source
Show All
Returns

Size of the state block, in bytes; can change because we only serialize as much of the stack as we actually use

Links
Body Source
Send comments on this topic.


rage::scrThread::GetStack@const

rage::scrThread::GetStack@const
Body Source
Show All
Returns

Current stack, for serialization

Links
Body Source
Send comments on this topic.


rage::scrThread::GetStackSize@const

rage::scrThread::GetStackSize@const
Body Source
Show All
Returns

Current stack size, for serialization

Links
Body Source
Send comments on this topic.


rage::scrThread::GetState@const

rage::scrThread::GetState@const
Body Source
Show All

Returns current VM state

Links
Body Source
Send comments on this topic.


rage::scrThread::GetStatic@int

rage::scrThread::GetStatic@int

Retrieves static variable at specified offset. Used by debugger.


rage::scrThread::GetThread@scrThreadId

rage::scrThread::GetThread@scrThreadId

Returns a pointer to a thread given a thread identifier

Parameters

id
Thread id to search for

Returns

Pointer to actual thread, if it exists; otherwise NULL.


rage::scrThread::GetThreadByIndex@int

rage::scrThread::GetThreadByIndex@int
Returns

Thread object by index

Send comments on this topic.


rage::scrThread::GetThreadCount

rage::scrThread::GetThreadCount
Returns

Number of threads allocated in AllocateThreads


rage::scrThread::GetThreadId@const

rage::scrThread::GetThreadId@const
Body Source
Show All

Access a thread's own id for reflexivity

Returns

scrThreadId

Links
Body Source
Send comments on this topic.


rage::scrThread::GetTimeStep

rage::scrThread::GetTimeStep
Body Source
Show All

Retrieve the current script timestep

Links
Body Source
Send comments on this topic.


rage::scrThread::GetTimeStepUnwarped

rage::scrThread::GetTimeStepUnwarped
Body Source
Show All

Retrieve the current script unwarped timestep

Links
Body Source
Send comments on this topic.


rage::scrThread::GetUpdateTime@const

rage::scrThread::GetUpdateTime@const
Body Source
Show All
Returns

Time it took to update last time it was called (in seconds)

Links
Body Source
Send comments on this topic.


rage::scrThread::Global::BasicType

rage::scrThread::Global::BasicType

enumerant in scrValue


rage::scrThread::Global::Hash

rage::scrThread::Global::Hash

Hashed name of this variable (as per scrComputeHash)


rage::scrThread::Global::Offset

rage::scrThread::Global::Offset

Base address of this variable

Send comments on this topic.


rage::scrThread::HasBreakpoint@int@bool *

rage::scrThread::HasBreakpoint@int@bool *

Indicates if there is any type of breakpoint at the specified address.

Parameters

offset
the address to check
local
set if there's a local breakpont
stopGame
set if the local breakpoint stops the game when hit

Returns

true or false


rage::scrThread::InitClass@int

rage::scrThread::InitClass@int

Initialize command hash table

Parameters

hashSize
Size of the command hash table. Should be a prime number for best performance. Should be roughly twice the size of the actual maximum number of commands you expect to register to minimize hash search length.


rage::scrThread::IsValidGlobal@scrValue *

rage::scrThread::IsValidGlobal@scrValue *

Allows code to validate that a reference lies in the global data section


rage::scrThread::IsValidReference@scrValue *

rage::scrThread::IsValidReference@scrValue *
Returns

True if this is a valid reference

Send comments on this topic.


rage::scrThread::IsValidStatic@scrValue *

rage::scrThread::IsValidStatic@scrValue *

Allows code to validate that a reference lies in the static data section


rage::scrThread::Kill

rage::scrThread::Kill

Virtual entry point called by KillAllThreads on each thread.

Notes

If you derive from this, don't forget to call the base class version!


rage::scrThread::KillAllThreads

rage::scrThread::KillAllThreads

Kills all running threads

Send comments on this topic.


rage::scrThread::KillThread@scrThread*

rage::scrThread::KillThread@scrThread*
Body Source
Show All

Removes a thread from the active thread list, deletes the program the thread was running

Parameters

thread
Thread to kill

Links
Body Source
Send comments on this topic.


rage::scrThread::KillThread@scrThreadId

rage::scrThread::KillThread@scrThreadId

Removes a thread from the active thread list, deletes the program the thread was running

Parameters

id
Thread to kill

Send comments on this topic.


rage::scrThread::LoadGlobalVariableInfo@const char *

rage::scrThread::LoadGlobalVariableInfo@const char *

Loads global variable information

Send comments on this topic.


rage::scrThread::LookupGlobalVariable@const char *

rage::scrThread::LookupGlobalVariable@const char *

Look up a global variable by name

Parameters

name
Name to look up

Returns

Index of global variable, or -1 if not found.


rage::scrThread::m_ProfTotals

rage::scrThread::m_ProfTotals

Totals for the thread.


rage::scrThread::OriginalPrePrintStackTrace

rage::scrThread::OriginalPrePrintStackTrace

The original sysStack::PrePrintStackTrace() function.


rage::scrThread::Pause

rage::scrThread::Pause

Pause execution

Send comments on this topic.


rage::scrThread::PrePrintStackTrace

rage::scrThread::PrePrintStackTrace

Our sysStack::PrePrintStackTrace() function that prints the stack track for the currently executing thread.


rage::scrThread::ProfEntry::CompareByInclTime@const ProfEntry &@const ProfEntry &

rage::scrThread::ProfEntry::CompareByInclTime@const ProfEntry &@const ProfEntry &
Body Source
Show All

You generally want to sort by highest value first, so these sort functions are opposite of normal.

Links
Body Source
Send comments on this topic.


rage::scrThread::RegisterBuiltinCommands

rage::scrThread::RegisterBuiltinCommands

Register all built-in commands (TIMERA, TIMERB, WAIT, etc)


rage::scrThread::Reset@scrProgramId@const void *@int

rage::scrThread::Reset@scrProgramId@const void *@int

Reset the thread to a runnable state at the top of the current program and copy initial values of all statics in from the program.

Parameters

program
Program index to attach to, or NULL to stay attached to existing program
argStruct
optional pointer to arg structure
argStructSize
optional arg structure size (in bytes)

Notes

If argStruct is used, it must match the size of the program being attached to (or else we will assert out)


rage::scrThread::Run@int

rage::scrThread::Run@int

Execute script instructions.

Parameters

insnCount
variable containing the maximum number of instructions to execute before returning. Can be zero, in which case the script does nothing.

Returns

New machine state

Send comments on this topic.


rage::scrThread::scrThread

rage::scrThread::scrThread

Constructor

Send comments on this topic.


rage::scrThread::SetBreakpoint@int@bool@bool

rage::scrThread::SetBreakpoint@int@bool@bool

Sets or unsets a local breakpoint at the specified address

Parameters

offset
the address of the breakpoint
setOrUnSet
add or remove the breakpoint
stopsGame
the breakpoint stops the game when hit


rage::scrThread::SetDebugBreakpointCallback@ThreadBreakpointFunc

rage::scrThread::SetDebugBreakpointCallback@ThreadBreakpointFunc
Body Source
Show All

Allow the script debugger to register a breakpoint callback

Parameters

del
the breakpoint callback functor

Links
Body Source
Send comments on this topic.


rage::scrThread::SetDebugFaultHandler@FaultHandlerFunc

rage::scrThread::SetDebugFaultHandler@FaultHandlerFunc
Body Source
Show All

Allow the script debugger to register an exception handler

Parameters

del
the fault handler functor

Links
Body Source
Send comments on this topic.


rage::scrThread::SetIsInNativeFunction@bool NOTFINAL_ONLY set

rage::scrThread::SetIsInNativeFunction@bool NOTFINAL_ONLY set
Body Source
Show All

Is set right before we enter a native function call and cleared right after. Indicates when our PrePrintStackTrace() function should be called for any sysStack::PrintStackTrack() calls that are made while executing the native function.

Parameters

set
true or false

Links
Body Source
Send comments on this topic.


rage::scrThread::SetIsPaused@bool

rage::scrThread::SetIsPaused@bool
Body Source
Show All

Set whether the game is paused to be used by WAITUNPAUSED.

Links
Body Source
Send comments on this topic.


rage::scrThread::SetStepRegion@int@int

rage::scrThread::SetStepRegion@int@int

Tells the thread to go into the halt state when the program counter leaves the half-open interval [minPc,maxPc). This is used to step to the next source line.


rage::scrThread::SetThreadBlockState@bool

rage::scrThread::SetThreadBlockState@bool
Body Source
Show All

Sets current thread state to BLOCKED or RUNNING (but only if it was already BLOCKED or RUNNING)

Links
Body Source
Send comments on this topic.


rage::scrThread::SetTimeStep@float

rage::scrThread::SetTimeStep@float
Body Source
Show All

Set the time step value returned by the TIMESTEP script function and used by WAIT.

Links
Body Source
Send comments on this topic.


rage::scrThread::SetTimeStepUnwarped@float

rage::scrThread::SetTimeStepUnwarped@float
Body Source
Show All

Set the time step value returned by the TIMESTEPUNWARPED script function and used by WAITUNWARPED.

Links
Body Source
Send comments on this topic.


rage::scrThread::SetUpdateTimersWhenPaused@bool

rage::scrThread::SetUpdateTimersWhenPaused@bool
Body Source
Show All

Set whether the script timers (TIMERA and TIMERB) should update when the IsPaused flag is set (true) or whether they should pause (false). DOES NOT affect WAIT (at the moment)

Links
Body Source
Send comments on this topic.


rage::scrThread::ShutdownClass

rage::scrThread::ShutdownClass

Free all memory allocated by InitClass

Send comments on this topic.


rage::scrThread::sm_IsPaused

rage::scrThread::sm_IsPaused

Whether the game is paused

Send comments on this topic.


rage::scrThread::sm_ProfileSortMethod

rage::scrThread::sm_ProfileSortMethod

Inclusive Exclusive, Native, ExclusivePeak, NativePeak


rage::scrThread::sm_ProfileSortMethodStrings

rage::scrThread::sm_ProfileSortMethodStrings

for the combo box


rage::scrThread::sm_ThreadId

rage::scrThread::sm_ThreadId

Next thread ID

Send comments on this topic.


rage::scrThread::sm_TimeStep

rage::scrThread::sm_TimeStep

Current time step

Send comments on this topic.


rage::scrThread::sm_TimeStepUnwarped

rage::scrThread::sm_TimeStepUnwarped

Current time step with no game dependant warping (bullet time/slowmo)


rage::scrThread::sm_UpdateTimersWhenPaused

rage::scrThread::sm_UpdateTimersWhenPaused

Whether TIMERA and TIMERB are updating while the IsPaused flag is set


rage::scrThread::StartNewThreadOverride

rage::scrThread::StartNewThreadOverride

Allow applications to override functionality used to start a new thread.


rage::scrThread::State

rage::scrThread::State

Current machine state; if RUNNING, the thread overran the current remaining instruction count. If BLOCKED, the thread called a function which did not complete this frame (the canonical example being the WAIT command). If ABORTED, the thread triggered some sort of serious fault condition and will never run. If HALTED, the script is being debugged.


rage::scrThread::ThreadBreakpointFunc

rage::scrThread::ThreadBreakpointFunc

Breakpoint callback functor for the script debugger.

Parameters

int
the pc of the breakpoint


rage::scrThread::Throw@int

rage::scrThread::Throw@int

Simulate the THROW command from C++ code. Cannot be called within a NATIVE function on the currently executing script.


rage::scrThread::TLS@int

rage::scrThread::TLS@int
Body Source
Show All

Access thread-local storage; intended for blocking native functions to use to preserve state. The state should only be valid

Notes

This needs more work to figure out how to manage these variables.

Links
Body Source
Send comments on this topic.


rage::scrThread::TLSMaxCount@const

rage::scrThread::TLSMaxCount@const
Body Source
Show All

Gets the max amount of local storage spaces

Links
Body Source
Send comments on this topic.


rage::scrThread::Update@int

rage::scrThread::Update@int

Update TIMERA and TIMERB values and then call Run.

Parameters

insnCount
As per scrThread::Run

Returns

New thread state as per scrThread::Run

Notes

This functionality is separated out mostly for single-stepping support


rage::scrThread::UpdateAll@int

rage::scrThread::UpdateAll@int

Updates all active script threads

Parameters

insnCount
Maximum number of instructions to execute (across all threads). If 0 is passed in here, we substitute in MAX_INT instead.

Returns

True if any threads existed and were not in the ABORTED state.

Notes

Internally tracks the last thread to run and always starts with the next thread so that it's impossible for any one thread to starve out the entire system.


rage::scrThread::Validate@scrProgram &

rage::scrThread::Validate@scrProgram &

Scans the program code and makes sure that all native function calls are registered. Also replaces hashcodes of opcodes with actual function pointers for speed.


rage::scrValue::ValueType

rage::scrValue::ValueType

Basic datatype, for globals access

Send comments on this topic.


User Manual

User Manual
Topics
Show All

The scripting language is based upon the Rockstar North GTA scripting language. It is a simple imperative language which looks a lot like BASIC.

Topics
Topic
Description
Comments
You can do comments to end-of-line with //. You can bracket multi-line comments in /* and */.
Variable Declarations
Note that our lexer is not case-sensitive. You can use GET_ACTOR_POSITION or get_actor_position interchangeably.
All variable declarations must start with a typename. The common typenames are:
Constant Declarations
You can introduce new constants into the language via the CONST_INT and CONST_FLOAT directives. CONST_INT variables in particular can be used anywhere the compiler wants a constant integer, even in CASE labels and array size declarations. You cannot declare more than one constant at a time.
Preprocessor
There is a very crude preprocessor in the script compiler. It understands #ifdef/#endif and #ifndef/#endif blocks. They may not currently be nested, and #else is not supported either. They check if the symbol (of any type) is defined. The intended use is to allow a crude form of inheritance; you can place a standard event loop in a header file, and you can put default implementations of functions that the user may have overridden (explicitly defined themselves prior to inclusion) within #ifndef blocks.
Advanced Variable Declarations
Some commands declare their own special handle types (like GUID). You can use these types to declare variables; however, you can only compare and assign them to variables of the exact same handle type. As a special case, the special variable NULL is compatible with all handle types, and is also the default value of any handle variable not explicitly initialized to something in particular.
The special handle types are declared via the NATIVE keyword, which also supports a very simple form of polymorphism.
Special Functions and Commands
The TIMERA and TIMERB variables are special INT functions available to every script. They are incremented by the current frame step whenever the script is running; for backward compatibility, they are measured in milliseconds. You can change their values directly with the SETTIMERA and SETTIMERB commands.
The TIMESTEP variable is a special FLOAT function available to all scripts; it contains the last time step (typically one or two vertical blanking intervals). The TIMESTEP variable is used by the special +@ and -@ operators which automatically multiply the right-hand side by the frame time.
The WAIT command accepts a single int parameter which is the number of milliseconds to block the currently running script. WAIT 0 will always block the script for the remainder of the current game frame.
Currently the scripting system executes 1000 instructions per frame. If your script doesnt pause then it will run round and round its main loop until these are all used up (so stopping any other scripts running until the next frame).
Text Labels
A TEXT_LABEL is a mutable string buffer which can hold up to 15 characters. Its intended use is for dynamically constructing localization label names or filenames. A TEXT_LABEL can be passed into any command that accepts a string. TEXT_LABEL variables are initialized to an empty string by default.
You can also do very limited assignments and append operations to TEXT_LABEL objects. You can assign or append strings or text labels or integer expressions directly to text labels.
Enumerations
You can introduce new enumerants into the language (as typenames):
Flow Control
Basic decision making is done with the IF statement.
Procedures and Functions
The meat of the scripting language is the suite of commands that the game supplies to the designers. These commands are broken down into procedures and functions. The only difference is that procedures don't return a value and therefore cannot be used in expressions; functions do return a value and can be used in expressions or statements.
All commands require their parameter list to be enclosed in parentheses, even if they don't take any parameters. This is to remind you that you're making a function call, because otherwise the syntax is indistiguishable from normal variable access.
Expressions
The usual arithmetic operators work: +, -, *, /. % is used for modulo.
Multiple conditions can be tested at once by using the NOT, AND, and OR operators. You can mix and match them at will, but use parentheses for clarity. ANDALSO and ORELSE are available as boolean short-circuit operators; ANDALSO does not evaluate its right-hand parameter if the left-hand parameter is already false; ORELSE does not evaluate its right-hand parameter if the left-hand parameter is already true.
Check for equality with =, and inequality with != or <>.
You can use ! for a synonym for the NOT keyword.
Vectors can appear in some arithmetic expressions: +, -, *, and /, and unary negation. If one side of a binary expression is a VECTOR, and the other side is a FLOAT, the float is implicitly converted to a VECTOR through replicating the value into x, y, and z. This allows multiplication and division to work like you'd expect, although it will lead to surprising behavior for addition and subtraction!
The COUNT_OF operator can be used on enumerant types and array variables. The SIZE_OF operator can be used on any typename or variable to return the size of the object in virtual machine words (currently four bytes per word).
The ternary (conditional) operator from C/C++ is available as well. The first parameter must be of type BOOL, and the second and third parameters must have identical type (no type promotion is currently performed other than basic int-to-float promotion if necessary).
Passing Parameters To Scripts
It is possible to pass arbitrary data to a script when starting it up. If you need more than a single parameter, you must place them all into a single STRUCT. For example:
Operator Precedence
This is mostly for people with Computer Science degrees who are curious.
All expressions are left-associative except for the unary operators, which are right-associative. From highest precedence to lowest: (all operators on the same line have equal precedence)
Why a Custom Language?
One obvious question is why do we use a custom language instead of an off-the-shelf scripting language. Lua is tiny but requires garbage collection and has untyped variables. Python is just too big. The RAGE scripting language is heavily based upon the time-proven Rockstar North scripting language. It is strongly typed, and requires no runtime memory allocation for the virtual machine itself once a thread is allocated. It is a simple, imperative language that is easy to understand and extend. The virtual machine itself is tiny, with the main loop being less than 300 lines of code.
Links
Topics
Send comments on this topic.


Comments

Comments
User Manual
Show All

You can do comments to end-of-line with //. You can bracket multi-line comments in /* and */.

Group

User Manual

Links
User Manual
Send comments on this topic.


Variable Declarations

Variable Declarations
User Manual
Show All

Note that our lexer is not case-sensitive. You can use GET_ACTOR_POSITION or get_actor_position interchangeably.

All variable declarations must start with a typename. The common typenames are:

  • INT - Basic integer type (whole numbers only).
  • FLOAT - Basic floating-point type (decimal numbers).
  • BOOL - A special variable that only holds either TRUE or FALSE. The value of any expression used in IF or WHILE should be a BOOL.
  • TEXT_LABEL - A short string up to fifteen letters long. Typically used for referencing a localized string. TEXT_LABEL_3, TEXT_LABEL_7, TEXT_LABEL_15, TEXT_LABEL_23, TEXT_LABEL_31, and TEXT_LABEL_63 also exist. When passing TEXT_LABEL variants around to functions, their size must match exactly; consider using a STRING type instead if you only need to read the text.
  • VECTOR - A structure containing X, Y, and Z fields which represent a floating-point position in space.

Any variable declared within a SCRIPT / ENDSCRIPT, PROC / ENDPROC, or FUNC / ENDFUNC block is local and is unique to that particular block (strictly speaking it is unique to the thread owning the script, so if the same script is attached to multiple objects they all have their own local variables).

Variables may be declared in a special GLOBALS / ENDGLOBALS block, in which case they are true global variables that are shared amongst all scripts. There can only be one GLOBALS block per script; it is intended to be placed inside a USING file so that all scripts can see the same master list of globals. In fact, there can only be a single GLOBALS block for all scripts in the game; this keeps all globals in a central place and allows the compiler to still assign static addresses.

Any variable declared outside any blocks and also not within a GLOBALS / ENDGLOBALS block is still unique to that copy of that script, but is available to any SCRIPT, FUNC, or PROC block after its declaration; this is like a normal member variable in C++.

The script language supports basic function and procedure pointers through the use of the TYPEDEF directive and the ampersand operator. To actually call through such a pointer, apply the CALL directive.

TYPEDEF FUNC INT callback1(INT A,INT B)

TYPEDEF PROC callback2(FLOAT C)

FUNC INT my_callback(INT A,INT B)
    RETURN A + B
ENDFUNC

PROC my_callback2(FLOAT A)
    PRINTFLOAT (A)
ENDPROC

SCRIPT
    callback1 cb1 = &my_callback

    callback2 cb2 = &my_callback2

    INT C = CALL cb1(10,20)

    PRINTINT(C)
    PRINTNL()

    CALL cb2(12.34)
ENDSCRIPT

All variables are initialized to zero on creation. You may explicitly initialize any local variable to any valid expression. You can declare more than one variable at once by separating the names with commas.

INT A, B // Declare two local variables initialize to zero
FLOAT C = 1.23 // Declare a local variable and initialize it.
VECTOR Pos = << C+2, 5, 2 >> // Note the special syntax for vector literals

Global and member variables can be initialized as well, but only to constant expressions (if they are integers) or constant numbers (if they are floating-point).

When you wish to change the value of a variable after its creation you just assign a new value:

A = A + 1
Pos.y = Pos.y + 9.8

You cannot assign directly between INT and FLOAT variables. To assign a FLOAT to an INT, call the CEIL, FLOOR, or ROUND function. To assign an INT to a FLOAT, call the TO_FLOAT function.

The ++, --, +=, -=, *=, and /= shortcuts from C are available, but they are treated as statements, not expressions. Therefore there is no distinction between preincrement or postincrement (since it is impossible to reference the value in an outer expression) and either form is accepted.

You can also use the HASH("STRING LITERAL") operator in expressions and enumerant definitions to compute the standard rage string hash of a string literal at compile time.

Group

User Manual

Links
User Manual
Send comments on this topic.


Constant Declarations

Constant Declarations
User Manual
Show All

You can introduce new constants into the language via the CONST_INT and CONST_FLOAT directives. CONST_INT variables in particular can be used anywhere the compiler wants a constant integer, even in CASE labels and array size declarations. You cannot declare more than one constant at a time.

CONST_INT MaxCount 5
CONST_FLOAT PI 3.14159

There are variations of this, TWEAK_INT and TWEAK_FLOAT, which are identical to CONST_INT and CONST_FLOAT in final builds, but turn into normal INT and FLOAT (ie modifiable) variables in debug builds. TWEAK_INT and TWEAK_FLOAT must appear at file scope but not within a GLOBALS block.

Group

User Manual

Links
User Manual
Send comments on this topic.


Preprocessor

Preprocessor
User Manual
Show All

There is a very crude preprocessor in the script compiler. It understands #ifdef/#endif and #ifndef/#endif blocks. They may not currently be nested, and #else is not supported either. They check if the symbol (of any type) is defined. The intended use is to allow a crude form of inheritance; you can place a standard event loop in a header file, and you can put default implementations of functions that the user may have overridden (explicitly defined themselves prior to inclusion) within #ifndef blocks.

Group

User Manual

Links
User Manual
Send comments on this topic.


Advanced Variable Declarations

Advanced Variable Declarations
User Manual
Show All

Some commands declare their own special handle types (like GUID). You can use these types to declare variables; however, you can only compare and assign them to variables of the exact same handle type. As a special case, the special variable NULL is compatible with all handle types, and is also the default value of any handle variable not explicitly initialized to something in particular.

The special handle types are declared via the NATIVE keyword, which also supports a very simple form of polymorphism.

NATIVE OBJECT
NATIVE ACTOR : OBJECT
NATIVE VOLUME : OBJECT

Any subprogram that accepts an OBJECT can also accept an ACTOR or VOLUME instead.

The purpose of the handle types is to protect you from passing in the wrong type of object into a command.

You can also declare multi-dimensional arrays of objects. Array elements are accessed starting at element zero. Arrays can be useful for holding lists of data such as waypoints or item prices. Arrays have their bounds checked automatically at runtime. You can also pass an array to the COUNT_OF operator to determine the number of elements in the array at runtime, even if it was a variable-length array:

FUNC INT ADDER(INT &inputs[])
    INT SUM, I
    FOR I=0 TO COUNT_OF(input)-1
        SUM += input[I]
   ENDFOR
  RETURN SUM
ENDFUNC

You can introduce new structures (like VECTOR already is) with:

STRUCT PlayerData
    INT AttackState, Health
    INT AMMO = 100
    FLOAT Chances[4]
ENDSTRUCT

Structures may contain basic types or even previously defined nested structures.

You can initialize simple INT and FLOAT members of STRUCT's and they will be constructed with that value instead of the default of zero.

I added structures in anticipation of minigames being written in the scripting language; I didn't want to see lots of parallel arrays being used everywhere.

Group

User Manual

Links
User Manual
Send comments on this topic.


Special Functions and Commands

Special Functions and Commands
User Manual
Show All

The TIMERA and TIMERB variables are special INT functions available to every script. They are incremented by the current frame step whenever the script is running; for backward compatibility, they are measured in milliseconds. You can change their values directly with the SETTIMERA and SETTIMERB commands.

The TIMESTEP variable is a special FLOAT function available to all scripts; it contains the last time step (typically one or two vertical blanking intervals). The TIMESTEP variable is used by the special +@ and -@ operators which automatically multiply the right-hand side by the frame time.

The WAIT command accepts a single int parameter which is the number of milliseconds to block the currently running script. WAIT 0 will always block the script for the remainder of the current game frame.

Currently the scripting system executes 1000 instructions per frame. If your script doesnt pause then it will run round and round its main loop until these are all used up (so stopping any other scripts running until the next frame).

script
    //Main loop
    WHILE true
        // Do My Stuff Please Mr Script Engine
        WAIT 0
    ENDWHILE
endscript

You can also wait at any other point in the script.

In order to use the TIMERA, TIMERB, SETTIMERA, SETTIMERB, and WAIT commands, you must have an appropriate USING statement in your declaration section. For RDR2 this is

USING "../../scripting/builtins.sc"

As mentioned elsewhere, NULL is a special variable which is compatible with all handle types.

Basic exception handling (one level only, intended for restarts and such) is also available. CATCH is a builtin function which returns -1 the first time you call it; internally it takes a snapshot of the current thread location (stack pointer, etc). When you later execute the THROW statement (either via THROW on its own, which does an implicit THROW(-1), or with an explicit expression passed in) the virtual machine pops back to the CATCH function except that it returns whatever THROW gave it.

This is more general than GOTO because it works even deep inside user procedures and functions, and it can also be triggered by the game engine itself. It's intended for things like event restart.

Each script can only have one active CATCH, they will not nest.

SCRIPT
    DO_INITIAL_SETUP()

    INT STATE = CATCH
    IF STATE = 123
        PRINTSTRING("Did a restart?n")
    ENDIF

    WHILE TRUE
        THROW(123)
    ENDWHILE
ENDSCRIPT
Group

User Manual

Links
User Manual
Send comments on this topic.


Text Labels

Text Labels
User Manual
Show All

A TEXT_LABEL is a mutable string buffer which can hold up to 15 characters. Its intended use is for dynamically constructing localization label names or filenames. A TEXT_LABEL can be passed into any command that accepts a string. TEXT_LABEL variables are initialized to an empty string by default.

You can also do very limited assignments and append operations to TEXT_LABEL objects. You can assign or append strings or text labels or integer expressions directly to text labels.

    TEXT_LABEL A, B
    A = "Some string"
    B = A
    A = 7
    A += B
    A += "Some string"
    A += 7

There are several variations of text labels: TEXT_LABEL_3, 7, 15, 23, 31, and 63.

Group

User Manual

Links
User Manual
Send comments on this topic.


Enumerations

Enumerations
User Manual
Show All

You can introduce new enumerants into the language (as typenames):

ENUM TypeFlag
    TF_DISABLED,
    TF_ENABLED,
    TF_READY
ENDENUM

Enumerants are all at global scope, and are only assignment- compatible with themselves. This is particularly useful for making command calls more type-safe. You can explicitly cast between enumerants and integers, although the syntax is intentionally verbose because it's dangerous if abused:

TypeFlag T
INT I = ENUM_TO_INT(T)
T = INT_TO_ENUM(TypeFlag, I)

Enumerants will usually be supplied by programmers and will match the internal C++ code values, but designers are free to define their own enumerants for clarity as well (for example, for assigning meaningful names to states). Enumerants can be used as array indices and FOR loop control variables and FOR loop initial and final values as well.

You can apply the COUNT_OF operator to an enumerant type; the value is one more than the value of the last member of the enumerant.

ENUM STATE
    WANDER,
    ACTIVE,
    DEAD
ENDENUM

In this case, COUNT_OF(STATE) will be 3.

You can also declare a parameter to a FUNC or PROC as an ENUM_TO_INT. This can avoid having to use ENUM_TO_INT in every call of the FUNC or PROC in some situations but is not done by default to preserve type-safety. Note that the only thing you can do to an ENUM_TO_INT parameter is assign it to a real INT local variable, which is what you should use from then onward. You can also declare that a function accepts a reference to any kind of enumerant or integer via ENUM_TO_INT & syntax.

PROC SomeProc(ENUM_TO_INT A)
    INT B = A   // Special case, no conversion required
ENDPROC

It is also possible to forward declare ENUMs, which is useful for native function definitions.

FORWARD ENUM SPECIAL_FLAGS

NATIVE PROC SET_SPECIAL_FLAGS(SPECIAL_FLAGS SF)

Finally, anywhere you can specify ENUM you can also specify STRICT_ENUM; this is a variation of enumerants that doesn't automatically promote to integer in many situations. In particular, you cannot use binary operators like OR on it, which is useful for cases where the enumerant does not represent a bitmask and you don't want people accidentally attempting to use it that way.

Group

User Manual

Links
User Manual
Send comments on this topic.


Flow Control

Flow Control
User Manual
Show All

Basic decision making is done with the IF statement.

IF expr
  // if expr true
ENDIF

IF expr
  // if expr true
ELSE
  // if expr not true
ENDIF

IF expr
  // if expr true
ELIF expr2
  // if expr not true but expr2 is true
ELIF expr3
  // if neither expr nor expr2 true but expr3 is true
ELSE
  // none of expr, expr2, or expr3 are true
ENDIF

There are three different looping constructs:

WHILE expr
  // do something while expression is true
ENDWHILE

Note that a WHILE statement may not execute even once if the initial value of the expression turns out to be false.

REPEAT count varname
  // do something 'count ' times
ENDREPEAT

The REPEAT statement accepts count and a variable name. The variable is initialized to zero and counts up until it reaches the value, which must be an integer literal or constant.

FOR varname = start TO finish
  // do something
ENDFOR

The FOR statement assigns varname to the value of start. While start is less than or equal to finish, it runs the body of the loop. After every iteration, it adds one to start and checks again. Note that finish is re-evaluated on every loop iteration so it may lead to unexpected behavior if it depends on something changing in the loop itself.

FOR varname = start TO finish STEP value
  // do something
ENDFOR

This form is similar, except that you can count by something other than one. You can also count backwards with a negative STEP value, in which case the loop continues as long as varname is greater than or equal to finish. The step value must be a nonzero constant integer.

The next flow control construct is the SWITCH statement.

SWITCH expr
  CASE 1  // Do something
    BREAK // Skip to ENDSWITCH
  CASE 2  // Do something else
          // ... and fall through
    FALLTHRU
  CASE 3  // Do another thing
    BREAK
  DEFAULT // Go here if no other values matched
ENDSWITCH

The expression must evaluate to an integer; CASE labels must be expressions that evaluate to integer constants (including enumerants). If the SWITCH expression is an integer, all case statements must also evaluate to integers. If the SWITCH expression is an enumerant, all case statements must evaluate to enumerants of that exact type.

You generally shouldn't declare variables within SWITCH statements, particularly at the top before the first CASE, which used to work but is now prohibited. Variables declared after CASE labels will not be usable in later CASE blocks when translated to C++ code, and therefore should be avoided.

The BREAK statement allows you to jump to the enclosing ENDSWITCH; otherwise flow will fall through any other CASE labels. The DEFAULT label, if present, is used as a catch-all if the expression didn't match any values. You can nest SWITCH statements very deep if you really want to, but that could get really confusing quickly.

The FALLTHRU statement informs the compiler that you really did mean to fall off the end of one CASE block into the next one; if the compiler will warn if it sees a block that doesn't end in a BREAK, FALLTHRU, EXIT, or RETURN statement. Its error checking isn't perfect, so it can be confused by nested blocks like an IF / ENDIF where both branches end in a RETURN -- in that case it will still want to see a BREAK statement after the IF block.

The next flow control is the RETURN statement, which simply exits the current function, returning a value to the caller:

RETURN N+1

The compiler will issue an error if it discovers any code paths out of a function that are missing a RETURN statement. In rare cases you may have to add an extra return statement to satisfy it.

The final flow control is the EXIT statement, which simply exits the current script or procedure.

EXIT
Group

User Manual

Links
User Manual
Send comments on this topic.


Procedures and Functions

Procedures and Functions
User Manual
Show All

The meat of the scripting language is the suite of commands that the game supplies to the designers. These commands are broken down into procedures and functions. The only difference is that procedures don't return a value and therefore cannot be used in expressions; functions do return a value and can be used in expressions or statements.

All commands require their parameter list to be enclosed in parentheses, even if they don't take any parameters. This is to remind you that you're making a function call, because otherwise the syntax is indistiguishable from normal variable access.

FLOAT T = TIMESTEP()
FLOAT Angle = ATAN2(Y,X)
FLOAT Mag = SQRT (X*X + Y*Y + Z*Z)
CREATE_ACTOR(SomeActor,SomePosition)

You can declare your own procedures and functions and call them from your code.

PROC MyFunction(INT A,VECTOR B,FLOAT &C)
    IF (A > 0)
        C = VMAG(B)
    ELSE
        C = 0
    ENDIF
ENDPROC

FUNC VECTOR VDIFF(VECTOR A, VECTOR B)
    VECTOR V = A - B
    RETURN V
ENDFUNC

You can pass parameters by value (like A and B) or by reference (like C). When you pass a value by reference, any changes made to the formal parameter will be immediately reflected in the actual value of the variable. When you pass a value by value, any changes made to the formal parameter affect only that copy.

When you pass an array to a function, the size of the array must match. As a special exception, if you pass the array by reference and declare the last dimension of the array in the parameter list as having no size:

FUNC INT ADDER(INT &someArray[])

or

PROC ADDERMULTI(INT &someArray[3][3][])

then the type-checking is relaxed and you can pass an arbitrarily-sized array into the command. Internally the virtual machine remembers the size of every array in a hidden count at the head of that array, so runtime range checking still works even with dynamic arrays.

You can also declare any PROC or FUNC as accepting default parameters. This should work for INT, FLOAT, ENUM, and BOOL types. Once you declare a default parameter, any parameters after it must have a default as well. This is experimental code, so the type checking isn't particularly rigorous -- you can mix up enumerant types in particular and it won't catch it.

FUNC INT ADDER(INT A,INT B = 1)
FUNC FLOAT FADDER(FLOAT A,FLOAT B = 1.0)
FUNC FLOAT FADDER(FLOAT A,FLOAT B = 1)  // BAD!

You can declare a PROC or FUNC as DEBUGONLY which will cause it to be removed from the final build of the game. If you apply this to a FUNC that returns INT, the function will act as if it simply returned zero if the value is assigned anywhere. It can only be used on a FUNC that returns something other than an INT if the value is never used.

DEBUGONLY PROC PRINT_STATUS(STRING A)
DEBUGONLY FUNC INT GET_DEBUG_STATUS()

There is also limited support for variable arguements in native functions.

NATIVE PROC PRINTLN(VARARGS)
NATIVE FUNC INT ADD_MANY(VARARGS)

Only basic types -- INT, BOOL, ENUM, STRING, text labels, and VECTORS are supported. On the C++ side, there are macros documented in rage/script/src/script/varargs.h which allow you to determine the runtime type of a given parameter. Up to 16 parameters are supported.

Group

User Manual

Links
User Manual
Send comments on this topic.


Expressions

Expressions
User Manual
Show All

The usual arithmetic operators work: +, -, *, /. % is used for modulo.

Multiple conditions can be tested at once by using the NOT, AND, and OR operators. You can mix and match them at will, but use parentheses for clarity. ANDALSO and ORELSE are available as boolean short-circuit operators; ANDALSO does not evaluate its right-hand parameter if the left-hand parameter is already false; ORELSE does not evaluate its right-hand parameter if the left-hand parameter is already true.

Check for equality with =, and inequality with != or <>.

You can use ! for a synonym for the NOT keyword.

Vectors can appear in some arithmetic expressions: +, -, *, and /, and unary negation. If one side of a binary expression is a VECTOR, and the other side is a FLOAT, the float is implicitly converted to a VECTOR through replicating the value into x, y, and z. This allows multiplication and division to work like you'd expect, although it will lead to surprising behavior for addition and subtraction!

The COUNT_OF operator can be used on enumerant types and array variables. The SIZE_OF operator can be used on any typename or variable to return the size of the object in virtual machine words (currently four bytes per word).

The ternary (conditional) operator from C/C++ is available as well. The first parameter must be of type BOOL, and the second and third parameters must have identical type (no type promotion is currently performed other than basic int-to-float promotion if necessary).

Group

User Manual

Links
User Manual
Send comments on this topic.


Passing Parameters To Scripts

Passing Parameters To Scripts
User Manual
Show All

It is possible to pass arbitrary data to a script when starting it up. If you need more than a single parameter, you must place them all into a single STRUCT. For example:

// ParamStruct.sch
STRUCT MyParam
    VECTOR Position
    TEXT_LABEL Name
ENDSTRUCT

// CalledScript.sc
USING "ParamStruct.sch"

SCRIPT(MyParam args)
  SPAWN_NAMED_ACTOR_AT_POSITION(args.Name,args.Position)
ENDSCRIPT

// CallingScript.sc
USING "ParamStruct.sch"
USING "rage_builtins.sch"

SCRIPT
  MyParam myargs
  myargs.Position = << 1, 2, 3>>
  myargs.Name = "Mailbox"
  START_NEW_SCRIPT_WITH_ARGS("CalledScript", myargs, SIZE_OF(myargs))
ENDSCRIPT

Note how the parameters are declared as a single non-reference variable to the SCRIPT block. Also note the use of the SIZE_OF operator to indicate the size of the data structure; each script remembers the size of any incoming parameter structure, and the virtual machine will assert out if you pass in a parameter structure of the wrong size. However, you are always free to invoke a script that accepts parameters without any parameters, in which case the parameter data will be initialized with zeroes like any other variable; you can use this fact to behave differently depending on whether you were invoked with parameters or not if you so choose. The parameter structure is copied into the calling script immediately at startup so there are no issues with object lifetime if the parent script terminates immediately after invoking one or more child scripts.

Group

User Manual

Links
User Manual
Send comments on this topic.


Operator Precedence

Operator Precedence
User Manual
Show All

This is mostly for people with Computer Science degrees who are curious.

All expressions are left-associative except for the unary operators, which are right-associative. From highest precedence to lowest: (all operators on the same line have equal precedence)

  • NOT and unary negation and unary address (&).
  • / %
  • + - +@ -@
  • < <= > >= = <>
  • & (bitwise and)
  • ^ (bitwise xor)
  • | (bitwise or)
  • AND
  • OR

Therefore the expression NOT A OR B AND C evaluates as (NOT A) OR (B AND C), which is probably not obvious to anybody, so make sure you use parentheses.

Note that AND and OR do not short-circuit like they do in C++.

Group

User Manual

Links
User Manual
Send comments on this topic.


Why a Custom Language?

Why a Custom Language?
User Manual
Show All

One obvious question is why do we use a custom language instead of an off-the-shelf scripting language. Lua is tiny but requires garbage collection and has untyped variables. Python is just too big. The RAGE scripting language is heavily based upon the time-proven Rockstar North scripting language. It is strongly typed, and requires no runtime memory allocation for the virtual machine itself once a thread is allocated. It is a simple, imperative language that is easy to understand and extend. The virtual machine itself is tiny, with the main loop being less than 300 lines of code.

Group

User Manual

Links
User Manual
Send comments on this topic.


Programming Manual

Programming Manual

This section is intended for use by programmers who are adding new commands to the script language itself.

You declare new commands (where a command is either a function or a procedure) using the NATIVE directive.

NATIVE FUNC FLOAT ABS(FLOAT F)
NATIVE PROC PRINTSTRING(STRING S)
NATIVE FUNC FLOAT ATAN2(FLOAT Y,FLOAT X)

You can mark a NATIVE PROC or FUNC DEBUGONLY as well, just like you can user-supplied subprograms:

NATIVE DEBUGONLY FUNC IS_DEBUG_HUD_ENABLED()
NATIVE DEBUGONLY PROC PRINTSTRING(STRING S)

You can also introduce new handle types into the language with a variant of the NATIVE syntax:

NATIVE SPRITE
NATIVE FUNC SPRITE CREATE_SPRITE(STRING Filename)

The handle types are compatible only with themselves, and help catch more potential problems at compile time.

You associate the run-time support for a script command by calling scrThread::RegisterCommand(commandName,funcPtr) where commandName should match the name of the function in the NATIVE declaration. The compiler and the RegisterCommand both use the same hashing algorithm so the names will match up.

The function should be void, accepting a reference to a non-const scrThread::Info object. See the code for specific details and examples, but you basically pull the Param values out of the array, operate on them, and then set the Return value if necessary. You can also modify the state of the thread so that it will become blocked and return immediately to higher-level code. A script that is blocked by a command will immediately re-execute that command the next time it gets scheduled.

There are also some templated wrapper functions in wrapper.h that can simplify integration.

If you want to pass parameters to a script at startup like you can with the builting START_NEW_SCRIPT_WITH_ARGS command, just pack the data into a struct matching the script engine's view of the data, and pass the structure into CreateThread. The size here should be in bytes, not virtual machine words. Keep in mind that VECTOR types in the scripting language are not aligned or padded, so you probably want to use a scrVector instead. You can use a scrTextLabel wherever a TEXT_LABEL would be used. If you want to pass in an array of objects, remember that the virtual machine has a hidden word at the start of every array which contains the count of elements in that array.

Also note that a BOOL in the scripting language is the same as an INT, so it's not compatible with a C++ bool, which is only a byte.

STRUCT MyArgs
    TEXT_LABEL Name
    VECTOR EndPoints[2]
ENDSTRUCT

would translate to:

struct c__MyArgs {
    scrTextLabel Name;
    int EndPoints_Count;
    scrVector EndPoints[2];
};

c_MyArgs args;
safecpy(args.Name,some_name,sizeof(args.Name));
args.EndPoints_Count = NELEM(args.EndPoints);
args.EndPoints[0] = some_Vector3;
args.EndPoints[1] = some_other_Vector3;


rage Namespace

rage Namespace
Namespaces | Classes | Structs | Types | Unions | Templates | Functions | Variables | Enumerations | Macros
Show All
Namespaces
Namespace | Description
rageScriptDebug |
scrWrapper |
Classes
Class | Description
scrSignature | This is a function signature for an "exported" function. It can represent functions with 1 return value and up to 9 arguments
scrThread | A scrThread encapsulates a virtual machine's state. We intentionally avoid pointers here so that load/save is simplified.
Structs
Struct | Description
scrTimingHelper |
scrVector |
scrProgram |
scrTrace |
Vector3 |
Types
Type | Description
Cmd |
s16 |
s32 |
scrTextLabel | this does NOT match TEXT_LABEL - internal use only!
scrTextLabel15 |
scrTextLabel23 |
scrTextLabel31 |
scrTextLabel63 |
scrTextLabel7 | use these for interfacing scripts with game code
scrThreadId |
u16 |
u32 |
u8 |
Unions
Union | Description
scrValue |
Templates
Template | Description
scrHash |
Functions
Function | Description
__attribute__ |
atou | hiding in device_common memory file handling code
atStringHash |
scrComputeHash |
scrValidateHash |
Variables
Variable | Description
g_PrintStackTraceFunc |
g_scrValueTypeNames |
gBaseScriptDirectory | might want to set this if you're going to set gScriptProject
gScriptProject |
s_TraceBuf |
s_TraceMax |
s_TraceNext |
scrMaxTextLabelSize | Must be a multiple of sizeof(scrValue).
scrPageMask |
scrPageShift |
scrPageSize |
Enumerations
Enumeration | Description
scrOpcode | Virtual machine opcode listing. When adding a rage_new opcode, remember to add it to the switch statement in scrThread::Run, the label array at the top of scrThread::Disassemble, and add appropriate logic to the disassembler itself.
scrProgramId |
Macros
Macro | Description
ADD_PC |
ATTR_COLD |
CHECK_PC |
DEBUG_TRACE |
DEC_CALLDEPTH |
MAX_CALLSTACK |
OPT_REGISTER_SECURE |
OPT_REGISTER_SECURE_BLOCKING |
OPT_REGISTER_SECURE_EXPORT |
SCR_MAKE_SIGNATURE | END
SCR_REGISTER_SECURE | END
SCR_REGISTER_SECURE_BLOCKING | END !__ASSERT
SCR_REGISTER_SECURE_EXPORT | END
SCR_REGISTER_UNSECURE | END
SCR_REGISTER_UNSECURE_BLOCKING | END
SCR_REGISTER_UNSECURE_EXPORT | END
SCRHASH |
SET_PC |
STREAMABLE_PROGRAMS |
THREADED_INTERPRETER | Both gcc and snc support computed goto's.
VALIDATE_PC | Pick a reasonable value that fits in a PPC compare immediate insn.
VALIDATE_PTR |
Links
Namespaces, Classes, Structs, Types, Unions, Templates, Functions, Variables, Enumerations, Macros


rage::rageScriptDebug Namespace

rage::rageScriptDebug Namespace
Functions | Variables | rage Namespace
Show All
Functions
Function | Description
Init | Initializes the script output functions
ReBindDefaults | rebinds the default script output functions.
Variables
Variable | Description
float val) |
gScriptPrintFloat |
gScriptPrintInt |
gScriptPrintNewLine |
gScriptPrintString |
gScriptPrintVector3 |
int val) |
prec |
str |
val |
width |
Namespace

rage Namespace

Links
Functions, Variables, rage Namespace
Send comments on this topic.


rage::rageScriptDebug::Init Function

rage::rageScriptDebug::Init Function
rage::rageScriptDebug Namespace
Show All

Initializes the script output functions

C++
void Init();
Namespace

rage::rageScriptDebug Namespace

File

thread.h

Links
rage::rageScriptDebug Namespace


rage::rageScriptDebug::ReBindDefaults Function

rage::rageScriptDebug::ReBindDefaults Function
rage::rageScriptDebug Namespace
Show All

rebinds the default script output functions.

C++
void ReBindDefaults();
Namespace

rage::rageScriptDebug Namespace

File

thread.h

Links
rage::rageScriptDebug Namespace


rage::rageScriptDebug::float val) Variable

rage::rageScriptDebug::float val) Variable
rage::rageScriptDebug Namespace
Show All
C++
int float val);
Namespace

rage::rageScriptDebug Namespace

File

thread.h

Links
rage::rageScriptDebug Namespace


rage::rageScriptDebug::gScriptPrintFloat Variable

rage::rageScriptDebug::gScriptPrintFloat Variable
rage::rageScriptDebug Namespace
Show All
C++
PrinterFloatFn* gScriptPrintFloat;
Namespace

rage::rageScriptDebug Namespace

File

thread.h

Links
rage::rageScriptDebug Namespace


rage::rageScriptDebug::gScriptPrintInt Variable

rage::rageScriptDebug::gScriptPrintInt Variable
rage::rageScriptDebug Namespace
Show All
C++
PrinterIntFn* gScriptPrintInt;
Namespace

rage::rageScriptDebug Namespace

File

thread.h

Links
rage::rageScriptDebug Namespace


rage::rageScriptDebug::gScriptPrintNewLine Variable

rage::rageScriptDebug::gScriptPrintNewLine Variable
rage::rageScriptDebug Namespace
Show All
C++
PrinterNewLineFn* gScriptPrintNewLine;
Namespace

rage::rageScriptDebug Namespace

File

thread.h

Links
rage::rageScriptDebug Namespace


rage::rageScriptDebug::gScriptPrintString Variable

rage::rageScriptDebug::gScriptPrintString Variable
rage::rageScriptDebug Namespace
Show All
C++
PrinterStrFn* gScriptPrintString;
Namespace

rage::rageScriptDebug Namespace

File

thread.h

Links
rage::rageScriptDebug Namespace


rage::rageScriptDebug::gScriptPrintVector3 Variable

rage::rageScriptDebug::gScriptPrintVector3 Variable
rage::rageScriptDebug Namespace
Show All
C++
PrinterVectorFn* gScriptPrintVector3;
Namespace

rage::rageScriptDebug Namespace

File

thread.h

Links
rage::rageScriptDebug Namespace


rage::rageScriptDebug::int val) Variable

rage::rageScriptDebug::int val) Variable
rage::rageScriptDebug Namespace
Show All
C++
int int val);
Namespace

rage::rageScriptDebug Namespace

File

thread.h

Links
rage::rageScriptDebug Namespace


rage::rageScriptDebug::prec Variable

rage::rageScriptDebug::prec Variable
rage::rageScriptDebug Namespace
Show All
C++
int int prec;
Namespace

rage::rageScriptDebug Namespace

File

thread.h

Links
rage::rageScriptDebug Namespace


rage::rageScriptDebug::str Variable

rage::rageScriptDebug::str Variable
rage::rageScriptDebug Namespace
Show All
C++
const char * str;
Namespace

rage::rageScriptDebug Namespace

File

thread.h

Links
rage::rageScriptDebug Namespace


rage::rageScriptDebug::val Variable

rage::rageScriptDebug::val Variable
rage::rageScriptDebug Namespace
Show All
C++
const Vector3& val;
Namespace

rage::rageScriptDebug Namespace

File

thread.h

Links
rage::rageScriptDebug Namespace


rage::rageScriptDebug::width Variable

rage::rageScriptDebug::width Variable
rage::rageScriptDebug Namespace
Show All
C++
int width;
Namespace

rage::rageScriptDebug Namespace

File

thread.h

Links
rage::rageScriptDebug Namespace


rage::scrWrapper Namespace

rage::scrWrapper Namespace
Structs | Macros | rage Namespace
Show All
Structs
Struct | Description
Arg |
Arg<bool> |
Arg<const char*> |
Arg<const scrVector&> |
Arg<const Vector3&> |
Arg<float&> |
Arg<float> |
Arg<int&> |
Arg<int> |
Arg<scrVector> |
Arg<Vector3&> |
Arg<Vector3> |
ArgType<bool> |
ArgType<char*> |
ArgType<const char*> |
ArgType<float> |
ArgType<int> |
ArgType<UnspecifiedArg> |
ArgType<void> |
SignatureGenerator<_RT (*)(_Arg0, _Arg1, _Arg2, _Arg3, _Arg4, _Arg5, _Arg6, _Arg7, _Arg8)> |
UnspecifiedArg |
Macros
Macro | Description
AssertParamMatch |
AssertParamMatchN |
SCR_DEFINE_NEW_PARAM_TYPE | END
SCR_DEFINE_NEW_POINTER_PARAM_AND_RET | END
SCR_DEFINE_TLS_TYPE_VALUE | END
SCRIPTNAME |
Namespace

rage Namespace

Links
Structs, Macros, rage Namespace
Send comments on this topic.


Arg Struct

Arg Struct
Members | Methods | rage::scrWrapper Namespace | Inheritance Hierarchy
Show All
Arg
C++
public: struct Arg {
};
Methods
Method | Description
Value |
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
Members, Methods, rage::scrWrapper Namespace, Inheritance Hierarchy


Arg::Value Method

Arg::Value Method
Arg Struct
Show All
C++
public: inline static T Value(
    scrThread::Info& s,
    int& N
);
Struct

Arg Struct

File

wrapper.h

Links
Arg Struct
Send comments on this topic.


Arg<bool> Struct

Arg<bool> Struct
Members | Methods | rage::scrWrapper Namespace | Inheritance Hierarchy
Show All
Arg<bool>
C++
public: struct Arg<bool> {
};
Methods
Method | Description
Value |
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
Members, Methods, rage::scrWrapper Namespace, Inheritance Hierarchy


Arg<bool>::Value Method

Arg<bool>::Value Method
Arg<bool> Struct
Show All
C++
public: inline static bool Value(
    scrThread::Info& info,
    int& N
);
Struct

Arg<bool> Struct

File

wrapper.h

Links
Arg<bool> Struct
Send comments on this topic.


Arg<const char*> Struct

Arg<const char*> Struct
Members | Methods | rage::scrWrapper Namespace | Inheritance Hierarchy
Show All
Arg<const char*>
C++
public: struct Arg<const char*> {
};
Methods
Method | Description
Value |
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
Members, Methods, rage::scrWrapper Namespace, Inheritance Hierarchy


Arg<const char*>::Value Method

Arg<const char*>::Value Method
Arg<const char*> Struct
Show All
C++
public: inline static const char* Value(
    scrThread::Info& info,
    int& N
);
Struct

Arg<const char*> Struct

File

wrapper.h

Links
Arg<const char*> Struct
Send comments on this topic.


Arg<const scrVector&> Struct

Arg<const scrVector&> Struct
Members | Methods | rage::scrWrapper Namespace | Inheritance Hierarchy
Show All
Arg<const scrVector&>
C++
public: struct Arg<const scrVector&> {
};
Methods
Method | Description
Value |
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
Members, Methods, rage::scrWrapper Namespace, Inheritance Hierarchy


Arg<const scrVector&>::Value Method

Arg<const scrVector&>::Value Method
Arg<const scrVector&> Struct
Show All
C++
public: inline static scrVector Value(
    scrThread::Info& info,
    int& N
);
Struct

Arg<const scrVector&> Struct

File

wrapper.h

Links
Arg<const scrVector&> Struct
Send comments on this topic.


Arg<const Vector3&> Struct

Arg<const Vector3&> Struct
Members | Methods | rage::scrWrapper Namespace | Inheritance Hierarchy
Show All
Arg<const Vector3&>
C++
public: struct Arg<const Vector3&> {
};
Methods
Method | Description
Value |
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
Members, Methods, rage::scrWrapper Namespace, Inheritance Hierarchy


Arg<const Vector3&>::Value Method

Arg<const Vector3&>::Value Method
Arg<const Vector3&> Struct
Show All
C++
public: inline static const Vector3& Value(
    scrThread::Info& info,
    int& N
);
Struct

Arg<const Vector3&> Struct

File

wrapper.h

Links
Arg<const Vector3&> Struct
Send comments on this topic.


Arg<float&> Struct

Arg<float&> Struct
Members | Methods | rage::scrWrapper Namespace | Inheritance Hierarchy
Show All
Arg<float&>
C++
public: struct Arg<float&> {
};
Methods
Method | Description
Value |
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
Members, Methods, rage::scrWrapper Namespace, Inheritance Hierarchy


Arg<float&>::Value Method

Arg<float&>::Value Method
Arg<float&> Struct
Show All
C++
public: inline static float& Value(
    scrThread::Info& info,
    int& N
);
Struct

Arg<float&> Struct

File

wrapper.h

Links
Arg<float&> Struct
Send comments on this topic.


Arg<float> Struct

Arg<float> Struct
Members | Methods | rage::scrWrapper Namespace | Inheritance Hierarchy
Show All
Arg<float>
C++
public: struct Arg<float> {
};
Methods
Method | Description
Value |
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
Members, Methods, rage::scrWrapper Namespace, Inheritance Hierarchy


Arg<float>::Value Method

Arg<float>::Value Method
Arg<float> Struct
Show All
C++
public: inline static float Value(
    scrThread::Info& info,
    int& N
);
Struct

Arg<float> Struct

File

wrapper.h

Links
Arg<float> Struct
Send comments on this topic.


Arg<int&> Struct

Arg<int&> Struct
Members | Methods | rage::scrWrapper Namespace | Inheritance Hierarchy
Show All
Arg<int&>
C++
public: struct Arg<int&> {
};
Methods
Method | Description
Value |
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
Members, Methods, rage::scrWrapper Namespace, Inheritance Hierarchy


Arg<int&>::Value Method

Arg<int&>::Value Method
Arg<int&> Struct
Show All
C++
public: inline static int& Value(
    scrThread::Info& info,
    int& N
);
Struct

Arg<int&> Struct

File

wrapper.h

Links
Arg<int&> Struct
Send comments on this topic.


Arg<int> Struct

Arg<int> Struct
Members | Methods | rage::scrWrapper Namespace | Inheritance Hierarchy
Show All
Arg<int>
C++
public: struct Arg<int> {
};
Methods
Method | Description
Value |
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
Members, Methods, rage::scrWrapper Namespace, Inheritance Hierarchy


Arg<int>::Value Method

Arg<int>::Value Method
Arg<int> Struct
Show All
C++
public: inline static int Value(
    scrThread::Info& info,
    int& N
);
Struct

Arg<int> Struct

File

wrapper.h

Links
Arg<int> Struct
Send comments on this topic.


Arg<scrVector> Struct

Arg<scrVector> Struct
Members | Methods | rage::scrWrapper Namespace | Inheritance Hierarchy
Show All
Arg<scrVector>
C++
public: struct Arg<scrVector> {
};
Methods
Method | Description
Value |
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
Members, Methods, rage::scrWrapper Namespace, Inheritance Hierarchy


Arg<scrVector>::Value Method

Arg<scrVector>::Value Method
Arg<scrVector> Struct
Show All
C++
public: inline static scrVector Value(
    scrThread::Info& info,
    int& N
);
Struct

Arg<scrVector> Struct

File

wrapper.h

Links
Arg<scrVector> Struct
Send comments on this topic.


Arg<Vector3&> Struct

Arg<Vector3&> Struct
Members | Methods | rage::scrWrapper Namespace | Inheritance Hierarchy
Show All
Arg<Vector3&>
C++
public: struct Arg<Vector3&> {
};
Methods
Method | Description
Value |
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
Members, Methods, rage::scrWrapper Namespace, Inheritance Hierarchy


Arg<Vector3&>::Value Method

Arg<Vector3&>::Value Method
Arg<Vector3&> Struct
Show All
C++
public: inline static Vector3& Value(
    scrThread::Info& info,
    int& N
);
Struct

Arg<Vector3&> Struct

File

wrapper.h

Links
Arg<Vector3&> Struct
Send comments on this topic.


Arg<Vector3> Struct

Arg<Vector3> Struct
Members | Methods | rage::scrWrapper Namespace | Inheritance Hierarchy
Show All
Arg<Vector3>
C++
public: struct Arg<Vector3> {
};
Methods
Method | Description
Value |
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
Members, Methods, rage::scrWrapper Namespace, Inheritance Hierarchy


Arg<Vector3>::Value Method

Arg<Vector3>::Value Method
Arg<Vector3> Struct
Show All
C++
public: inline static Vector3 Value(
    scrThread::Info& info,
    int& N
);
Struct

Arg<Vector3> Struct

File

wrapper.h

Links
Arg<Vector3> Struct
Send comments on this topic.


rage::scrWrapper::ArgType<bool> Struct

rage::scrWrapper::ArgType<bool> Struct
rage::scrWrapper Namespace
Show All
C++
public: struct ArgType<bool> {
  public: static const scrValue::ValueType Value = scrValue::BOOL;
};
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
rage::scrWrapper Namespace


rage::scrWrapper::ArgType<char*> Struct

rage::scrWrapper::ArgType<char*> Struct
rage::scrWrapper Namespace
Show All
C++
public: struct ArgType<char*> {
  public: static const scrValue::ValueType Value = scrValue::STRING;
};
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
rage::scrWrapper Namespace


rage::scrWrapper::ArgType<const char*> Struct

rage::scrWrapper::ArgType<const char*> Struct
rage::scrWrapper Namespace
Show All
C++
public: struct ArgType<const char*> {
  public: static const scrValue::ValueType Value = scrValue::STRING;
};
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
rage::scrWrapper Namespace


rage::scrWrapper::ArgType<float> Struct

rage::scrWrapper::ArgType<float> Struct
rage::scrWrapper Namespace
Show All
C++
public: struct ArgType<float> {
  public: static const scrValue::ValueType Value = scrValue::FLOAT;
};
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
rage::scrWrapper Namespace


rage::scrWrapper::ArgType<int> Struct

rage::scrWrapper::ArgType<int> Struct
rage::scrWrapper Namespace
Show All
C++
public: struct ArgType<int> {
  public: static const scrValue::ValueType Value = scrValue::INT;
};
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
rage::scrWrapper Namespace


rage::scrWrapper::ArgType<UnspecifiedArg> Struct

rage::scrWrapper::ArgType<UnspecifiedArg> Struct
rage::scrWrapper Namespace
Show All
C++
public: struct ArgType<UnspecifiedArg> {
  public: static const scrValue::ValueType Value = scrValue::UNKNOWN;
};
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
rage::scrWrapper Namespace


rage::scrWrapper::ArgType<void> Struct

rage::scrWrapper::ArgType<void> Struct
rage::scrWrapper Namespace
Show All
C++
public: struct ArgType<void> {
  public: static const scrValue::ValueType Value = scrValue::UNKNOWN;
};
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
rage::scrWrapper Namespace


rage::scrWrapper::SignatureGenerator<_RT (*)(_Arg0, _Arg1, _Arg2, _Arg3, _Arg4, _Arg5, _Arg6, _Arg7, _Arg8)> Struct

rage::scrWrapper::SignatureGenerator<_RT (*)(_Arg0, _Arg1, _Arg2, _Arg3, _Arg4, _Arg5, _Arg6, _Arg7, _Arg8)> Struct
rage::scrWrapper Namespace
Show All
C++
public: struct SignatureGenerator<_RT (*)(_Arg0, _Arg1, _Arg2, _Arg3, _Arg4, _Arg5, _Arg6, _Arg7, _Arg8)> {
  public: static const u32 Signature = SCR_MAKE_SIGNATURE(ArgType<_RT>::Value, ArgType<_Arg0>::Value, ArgType<_Arg1>::Value, ArgType<_Arg2>::Value, ArgType<_Arg3>::Value, ArgType<_Arg4>::Value, ArgType<_Arg5>::Value, ArgType<_Arg6>::Value, ArgType<_Arg7>::Value, ArgType<_Arg8>::Value);
};
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
rage::scrWrapper Namespace


rage::scrWrapper::UnspecifiedArg Struct

rage::scrWrapper::UnspecifiedArg Struct
rage::scrWrapper Namespace
Show All
C++
public: struct UnspecifiedArg {
};
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
rage::scrWrapper Namespace


rage::scrWrapper::AssertParamMatch Macro

rage::scrWrapper::AssertParamMatch Macro
rage::scrWrapper Namespace
Show All
C++
#define AssertParamMatch AssertParamMatchN(N)
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
rage::scrWrapper Namespace


rage::scrWrapper::AssertParamMatchN Macro

rage::scrWrapper::AssertParamMatchN Macro
rage::scrWrapper Namespace
Show All
C++
#define AssertParamMatchN(n)
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
rage::scrWrapper Namespace


rage::scrWrapper::SCR_DEFINE_NEW_PARAM_TYPE Macro

rage::scrWrapper::SCR_DEFINE_NEW_PARAM_TYPE Macro
rage::scrWrapper Namespace
Show All

END

C++
#define SCR_DEFINE_NEW_PARAM_TYPE(newType, conversionFunc) namespace rage{
namespace scrWrapper {
template<>
struct Arg<newType> { inline static newType Value(scrThread::Info& info, int& N) {return conversionFunc(info.Params[N++]);}
};
}
}
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
rage::scrWrapper Namespace


rage::scrWrapper::SCR_DEFINE_NEW_POINTER_PARAM_AND_RET Macro

rage::scrWrapper::SCR_DEFINE_NEW_POINTER_PARAM_AND_RET Macro
rage::scrWrapper Namespace
Show All

END

C++
#define SCR_DEFINE_NEW_POINTER_PARAM_AND_RET(newType) namespace rage {
namespace scrWrapper {
template<>
struct Arg<newType*> { inline static newType* Value(scrThread::Info& info, int& N) {return reinterpret_cast<newType*>(info.Params[N++].Reference);}
};
template<>
struct Arg<const newType*> { inline static const newType* Value(scrThread::Info& info, int& N) {return reinterpret_cast<const newType*>(info.Params[N++].Reference);}
};
inline static void AssignReturnValue(scrThread::Info& info, newType* p) {info.ResultPtr->Reference = reinterpret_cast<scrValue*>(const_cast<newType*>(p));}
inline static void AssignReturnValue(scrThread::Info& info, const newType* p) {info.ResultPtr->Reference = reinterpret_cast<scrValue*>(const_cast<newType*>(p));}
template<> struct ArgType<newType*> {static const scrValue::ValueType Value = scrValue::OBJECT;};
template<> struct ArgType<const newType*> {static const scrValue::ValueType Value = scrValue::OBJECT;};
}
}
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
rage::scrWrapper Namespace


rage::scrWrapper::SCR_DEFINE_TLS_TYPE_VALUE Macro

rage::scrWrapper::SCR_DEFINE_TLS_TYPE_VALUE Macro
rage::scrWrapper Namespace
Show All

END

C++
#define SCR_DEFINE_TLS_TYPE_VALUE(tlsType, value) namespace rage {
namespace scrWrapper {
template<>
struct Arg<tlsType*> { inline static tlsType* Value(scrThread::Info& , int&) {return ::rage::scrWrapper::GetTlsGlobal<tlsType, value>();}
};
}
}
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
rage::scrWrapper Namespace


rage::scrWrapper::SCRIPTNAME Macro

rage::scrWrapper::SCRIPTNAME Macro
rage::scrWrapper Namespace
Show All
C++
#define SCRIPTNAME
Namespace

rage::scrWrapper Namespace

File

wrapper.h

Links
rage::scrWrapper Namespace


scrHash Template

scrHash Template
Structs | Constructors | Destructors | Members | Methods | rage Namespace | Inheritance Hierarchy
Show All
scrHash
C++
template <class T,int initSize = 0> public: class scrHash;
Structs
Struct | Description
Slot |
Constructors
Constructor | Description
scrHash |
Destructors
Destructor | Description
~scrHash |
Methods
Method | Description
Delete |
Init |
Insert |
Kill |
Lookup |
Remove |
Namespace

rage Namespace

File

hash.h

Links
Structs, Constructors, Destructors, Members, Methods, rage Namespace, Inheritance Hierarchy


rage::scrHash::Slot Struct

rage::scrHash::Slot Struct
scrHash Template
Show All
C++
private: struct Slot {
  public: u32 code;
  public: T data;
};
Template

scrHash Template

File

hash.h

Links
scrHash Template


scrHash::scrHash Constructor

scrHash::scrHash Constructor
scrHash Template
Show All
C++
public: scrHash();
Template

scrHash Template

File

hash.h

Links
scrHash Template


scrHash::~scrHash Destructor

scrHash::~scrHash Destructor
scrHash Template
Show All
C++
public: ~scrHash();
Template

scrHash Template

File

hash.h

Links
scrHash Template


scrHash::Delete Method

scrHash::Delete Method
scrHash Template
Show All
C++
public: void Delete();
Template

scrHash Template

File

hash.h

Links
scrHash Template


scrHash::Init Method

scrHash::Init Method
scrHash Template
Show All
C++
public: void Init(
    int size
);
Template

scrHash Template

File

hash.h

Links
scrHash Template


scrHash::Insert Method

scrHash::Insert Method
scrHash Template
Show All
C++
public: bool Insert(
    u32 hashCode,
    T data
);
Template

scrHash Template

File

hash.h

Links
scrHash Template


scrHash::Kill Method

scrHash::Kill Method
scrHash Template
Show All
C++
public: void Kill();
Template

scrHash Template

File

hash.h

Links
scrHash Template


scrHash::Lookup Method

scrHash::Lookup Method
scrHash Template
Show All
C++
public: T Lookup(
    u32 hashCode
);
Template

scrHash Template

File

hash.h

Links
scrHash Template


scrHash::Remove Method

scrHash::Remove Method
scrHash Template
Show All
C++
public: bool Remove(
    u32 hashCode
);
Template

scrHash Template

File

hash.h

Links
scrHash Template


scrSignature Class

scrSignature Class
Constructors | Members | Methods | Data Members | rage Namespace | Inheritance Hierarchy
Show All

This is a function signature for an "exported" function. It can represent functions with 1 return value and up to 9 arguments

scrSignature
C++
public: class scrSignature;
Constructors
Constructor | Description
scrSignature |
Methods
Method | Description
CountNumArgs | Counts the number of arguments defined in this signature
GetArgumentType | Returns the type for argument N, or UNKNOWN if there is no argument N.
GetReturnType | Returns the return type of this signature, or UNKNOWN if there is no return value
GetState |
IsValid | Is this a valid signature?
PrettyPrint | Fills out outBuf with a rage-script style function signature
Data Members
Data Member | Description
m_Storage |
Namespace

rage Namespace

File

signature.h

Links
Constructors, Members, Methods, Data Members, rage Namespace, Inheritance Hierarchy


scrSignature::m_Storage Data Member

scrSignature::m_Storage Data Member
scrSignature Class
Show All
C++
protected: u32 m_Storage;
Class

scrSignature Class

File

signature.h

Links
scrSignature Class


scrSignature::scrSignature Constructor ()

scrSignature::scrSignature Constructor ()
scrSignature Class
Show All
C++
public: scrSignature();
Class

scrSignature Class

File

signature.h

Links
scrSignature Class


scrSignature::scrSignature Constructor (scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType)

scrSignature::scrSignature Constructor (scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType)
scrSignature Class
Show All
C++
public: inline explicit scrSignature(
    scrValue::ValueType returnValue,
    scrValue::ValueType arg0 = scrValue::UNKNOWN,
    scrValue::ValueType arg1 = scrValue::UNKNOWN,
    scrValue::ValueType arg2 = scrValue::UNKNOWN,
    scrValue::ValueType arg3 = scrValue::UNKNOWN,
    scrValue::ValueType arg4 = scrValue::UNKNOWN,
    scrValue::ValueType arg5 = scrValue::UNKNOWN,
    scrValue::ValueType arg6 = scrValue::UNKNOWN,
    scrValue::ValueType arg7 = scrValue::UNKNOWN,
    scrValue::ValueType arg8 = scrValue::UNKNOWN
);
Parameters

arg0
= scrValue::UNKNOWN
arg1
= scrValue::UNKNOWN
arg2
= scrValue::UNKNOWN
arg3
= scrValue::UNKNOWN
arg4
= scrValue::UNKNOWN
arg5
= scrValue::UNKNOWN
arg6
= scrValue::UNKNOWN
arg7
= scrValue::UNKNOWN
arg8
= scrValue::UNKNOWN

Class

scrSignature Class

File

signature.h

Links
scrSignature Class


scrSignature::scrSignature Constructor (u32)

scrSignature::scrSignature Constructor (u32)
scrSignature Class
Show All
C++
public: explicit scrSignature(
    u32 data
);
Class

scrSignature Class

File

signature.h

Links
scrSignature Class


scrSignature::CountNumArgs Method

scrSignature::CountNumArgs Method
scrSignature Class
Show All

Counts the number of arguments defined in this signature

C++
public: inline int CountNumArgs();
Returns

The number of arguments [0-8] or -1 on error

Class

scrSignature Class

File

signature.h

Links
scrSignature Class


scrSignature::GetArgumentType Method

scrSignature::GetArgumentType Method
scrSignature Class
Show All

Returns the type for argument N, or UNKNOWN if there is no argument N.

C++
public: inline scrValue::ValueType GetArgumentType(
    u32 i
);
Class

scrSignature Class

File

signature.h

Links
scrSignature Class


scrSignature::GetReturnType Method

scrSignature::GetReturnType Method
scrSignature Class
Show All

Returns the return type of this signature, or UNKNOWN if there is no return value

C++
public: inline scrValue::ValueType GetReturnType();
Class

scrSignature Class

File

signature.h

Links
scrSignature Class


scrSignature::GetState Method

scrSignature::GetState Method
scrSignature Class
Show All
C++
protected: inline u32 GetState();
Class

scrSignature Class

File

signature.h

Links
scrSignature Class


scrSignature::IsValid Method

scrSignature::IsValid Method
scrSignature Class
Show All

Is this a valid signature?

C++
public: inline bool IsValid();
Class

scrSignature Class

File

signature.h

Links
scrSignature Class


scrSignature::PrettyPrint Method

scrSignature::PrettyPrint Method
scrSignature Class
Show All

Fills out outBuf with a rage-script style function signature

C++
public: void PrettyPrint(
    char* outBuf,
    int outBufSize,
    const char* fnName
);
Class

scrSignature Class

File

signature.h

Links
scrSignature Class


scrThread Class

scrThread Class
Structs | Nested Types | Members | Methods | Data Members | rage Namespace | Inheritance Hierarchy
Show All

A scrThread encapsulates a virtual machine's state. We intentionally avoid pointers here so that load/save is simplified.

scrThread
C++
public: class scrThread;
Structs
Struct | Description
Serialized | Structure containing all thread state that is serialized. No pointers allowed!
Nested Types
Nested Type | Description
sizecheck |
Methods
Method | Description
Run |
SetIsInNativeFunction |
Data Members
Data Member | Description
MAX_CALLSTACK |
sm_InNativeFunction |
Namespace

rage Namespace

File

threadrun.cpp

Links
Structs, Nested Types, Members, Methods, Data Members, rage Namespace, Inheritance Hierarchy


scrThread::MAX_CALLSTACK Data Member

scrThread::MAX_CALLSTACK Data Member
scrThread Class
Show All
C++
public: static const int MAX_CALLSTACK = 8;
Class

scrThread Class

File

threadrun.cpp

Links
scrThread Class


scrThread::sm_InNativeFunction Data Member

scrThread::sm_InNativeFunction Data Member
scrThread Class
Show All
C++
public: static bool sm_InNativeFunction;
Class

scrThread Class

File

threadrun.cpp

Links
scrThread Class


rage::scrThread::Serialized Struct

rage::scrThread::Serialized Struct
scrThread Class
Show All

Structure containing all thread state that is serialized. No pointers allowed!

C++
private: struct Serialized {
  public: void * m_ThreadId;
  public: void * m_Prog;
  public: int m_State;
  public: int m_PC;
  public: int m_FP;
  public: int m_SP;
  public: int m_TimerA, m_TimerB;
  public: float m_Wait;
  public: int m_MinPC, m_MaxPC;
  public: scrValue m_TLS[4];
  public: int m_StackSize;
  public: int m_CatchPC, m_CatchFP, m_CatchSP;
  public: int m_CallDepth;
  public: int m_CallStack[MAX_CALLSTACK];
};
Members

m_ThreadId
0 Unique thread ID (always increasing)
m_Prog
4 Stored by hashcode rather than pointer so load/save can work
m_State
8 Current thread state
m_PC
12 Current program counter (index into program's opcodes array)
m_FP
16 Current frame pointer (anchor for local variables)
m_SP
20 Stack pointer
m_Wait
Accumulated wait timer
m_TLS
Thread-local storage for blocking functions

Class

scrThread Class

File

thread.h

Links
scrThread Class


scrThread::Run Method

scrThread::Run Method
scrThread Class
Show All
C++
public: static u32 Run(
    scrValue * __restrict stack,
    scrValue * __restrict globals,
    const scrProgram & pt,
    Serialized * __restrict ser
);
Class

scrThread Class

File

threadrun.cpp

Links
scrThread Class


scrThread::SetIsInNativeFunction Method

scrThread::SetIsInNativeFunction Method
scrThread Class
Show All
C++
public: static void SetIsInNativeFunction(
    bool f
);
Class

scrThread Class

File

threadrun.cpp

Links
scrThread Class


scrThread::sizecheck Nested Type

scrThread::sizecheck Nested Type
scrThread Class
Show All
C++
public: typedef char sizecheck[sizeof(Info)==96? 1 : -1];
Class

scrThread Class

File

threadrun.cpp

Links
scrThread Class


scrTimingHelper Struct

scrTimingHelper Struct
Constructors | Destructors | Members | Data Members | rage Namespace | Inheritance Hierarchy
Show All
scrTimingHelper
C++
public: struct scrTimingHelper {
  public: utimer_t Now;
  public: u32 Hash;
};
Constructors
Constructor | Description
scrTimingHelper |
Destructors
Destructor | Description
~scrTimingHelper |
Data Members
Data Member | Description
Hash |
Now |
Namespace

rage Namespace

File

wrapper.h

Links
Constructors, Destructors, Members, Data Members, rage Namespace, Inheritance Hierarchy


scrTimingHelper::Hash Data Member

scrTimingHelper::Hash Data Member
scrTimingHelper Struct
Show All
C++
public: u32 Hash;
Struct

scrTimingHelper Struct

File

wrapper.h

Links
scrTimingHelper Struct


scrTimingHelper::Now Data Member

scrTimingHelper::Now Data Member
scrTimingHelper Struct
Show All
C++
public: utimer_t Now;
Struct

scrTimingHelper Struct

File

wrapper.h

Links
scrTimingHelper Struct


scrTimingHelper::scrTimingHelper Constructor

scrTimingHelper::scrTimingHelper Constructor
scrTimingHelper Struct
Show All
C++
public: scrTimingHelper(
    u32 hash
);
Struct

scrTimingHelper Struct

File

wrapper.h

Links
scrTimingHelper Struct


scrTimingHelper::~scrTimingHelper Destructor

scrTimingHelper::~scrTimingHelper Destructor
scrTimingHelper Struct
Show All
C++
public: ~scrTimingHelper();
Struct

scrTimingHelper Struct

File

wrapper.h

Links
scrTimingHelper Struct


scrVector Struct

scrVector Struct
Constructors | Members | Operators | Data Members | rage Namespace | Inheritance Hierarchy
Show All
scrVector
C++
public: struct scrVector {
  public: float x, y, z;
};
Constructors
Constructor | Description
scrVector |
Operators
Operator | Description
= |
Vec3V |
Vector3 |
Vector3::Vector3Param |
Data Members
Data Member | Description
x |
y |
z |
Namespace

rage Namespace

File

thread.h

Links
Constructors, Members, Operators, Data Members, rage Namespace, Inheritance Hierarchy


scrVector::x Data Member

scrVector::x Data Member
scrVector Struct
Show All
C++
public: float x;
Struct

scrVector Struct

File

thread.h

Links
scrVector Struct


scrVector::y Data Member

scrVector::y Data Member
scrVector Struct
Show All
C++
public: float y;
Struct

scrVector Struct

File

thread.h

Links
scrVector Struct


scrVector::z Data Member

scrVector::z Data Member
scrVector Struct
Show All
C++
public: float z;
Struct

scrVector Struct

File

thread.h

Links
scrVector Struct


scrVector::scrVector Constructor ()

scrVector::scrVector Constructor ()
scrVector Struct
Show All
C++
public: scrVector();
Struct

scrVector Struct

File

thread.h

Links
scrVector Struct


scrVector::scrVector Constructor (const Vec3V &)

scrVector::scrVector Constructor (const Vec3V &)
scrVector Struct
Show All
C++
public: scrVector(
    const Vec3V & v
);
Struct

scrVector Struct

File

thread.h

Links
scrVector Struct


scrVector::scrVector Constructor (const Vector3 &)

scrVector::scrVector Constructor (const Vector3 &)
scrVector Struct
Show All
C++
public: scrVector(
    const Vector3 & v
);
Struct

scrVector Struct

File

thread.h

Links
scrVector Struct


scrVector::scrVector Constructor (float, float, float)

scrVector::scrVector Constructor (float, float, float)
scrVector Struct
Show All
C++
public: scrVector(
    float _x,
    float _y,
    float _z
);
Struct

scrVector Struct

File

thread.h

Links
scrVector Struct


scrVector::= Operator (const Vec3V&)

scrVector::= Operator (const Vec3V&)
scrVector Struct
Show All
C++
public: scrVector& operator =(
    const Vec3V& v
);
Struct

scrVector Struct

File

thread.h

Links
scrVector Struct


scrVector::= Operator (const Vector3&)

scrVector::= Operator (const Vector3&)
scrVector Struct
Show All
C++
public: scrVector& operator =(
    const Vector3& v
);
Struct

scrVector Struct

File

thread.h

Links
scrVector Struct


scrVector::Vec3V Operator

scrVector::Vec3V Operator
scrVector Struct
Show All
C++
public: operator Vec3V() const;
Struct

scrVector Struct

File

thread.h

Links
scrVector Struct


scrVector::Vector3 Operator

scrVector::Vector3 Operator
scrVector Struct
Show All
C++
public: operator Vector3() const;
Struct

scrVector Struct

File

thread.h

Links
scrVector Struct


scrVector::Vector3::Vector3Param Operator

scrVector::Vector3::Vector3Param Operator
scrVector Struct
Show All
C++
public: operator Vector3::Vector3Param() const;
Struct

scrVector Struct

File

thread.h

Links
scrVector Struct


rage::scrOpcode Enumeration

rage::scrOpcode Enumeration
rage Namespace
Show All

Virtual machine opcode listing. When adding a rage_new opcode, remember to add it to the switch statement in scrThread::Run, the label array at the top of scrThread::Disassemble, and add appropriate logic to the disassembler itself.

C++
public: enum scrOpcode {
  public: b
};
Namespace

rage Namespace

File

opcode.h

Links
rage Namespace


rage::scrProgram Struct

rage::scrProgram Struct
rage Namespace
Show All
C++
public: struct scrProgram {
  public: void * vptr;
  public: u32 * m_PageMap;
  public: u8 ** Table;
  public: u32 GlobalsHash;
  public: u32 OpcodeSize;
  public: u32 ArgStructSize;
  public: u32 StaticSize;
  public: u32 GlobalSize;
  public: u32 NativeSize;
  public: scrValue * Statics;
  public: scrValue * Globals;
  public: u32 * Natives;
  public: u32 ProcCount;
  public: const char ** ProcNames;
  public: u32 HashCode;
  public: u32 RefCount;
  public: const char * ScriptName;
  public: const char * StringHeap;
  public: u32 StringHeapSize;
};
Members

vptr
pgBase
m_PageMap
pgBase
Table
8
GlobalsHash
12
OpcodeSize
16
ArgStructSize
20
StaticSize
24
GlobalSize
28
NativeSize
32
Statics
36
Globals
40
Natives
44
ProcCount
48
ProcNames
52
HashCode
56
RefCount
60
ScriptName
64

Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::scrProgramId Enumeration

rage::scrProgramId Enumeration
rage Namespace
Show All
C++
public: enum scrProgramId {
  public: srcpidNONE
};
Namespace

rage Namespace

File

value.h

Links
rage Namespace


rage::scrTrace Struct

rage::scrTrace Struct
rage Namespace
Show All
C++
public: struct scrTrace {
  public: u32 pc : 24, opcode: 8;
};
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::scrValue Union

rage::scrValue Union
rage Namespace
Show All
C++
public: union scrValue {
  public: int Int;
  public: float Float;
  public: unsigned Uns;
  public: scrValue * Reference;
  public: const char * String;
};
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::Vector3 Struct

rage::Vector3 Struct
rage Namespace
Show All
C++
public: struct Vector3 {
  public: float x, y, z;
};
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::__attribute__ Function

rage::__attribute__ Function
rage Namespace
Show All
C++
struct Vector3 __attribute__(
    (aligned(16))
);
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::atou Function

rage::atou Function
rage Namespace
Show All

hiding in device_common memory file handling code

C++
unsigned char* atou(
    const char * s
);
Namespace

rage Namespace

File

program.cpp

Links
rage Namespace


rage::atStringHash Function

rage::atStringHash Function
rage Namespace
Show All
C++
u32 atStringHash(
    const char*,
    const u32 = 0
);
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::scrComputeHash Function

rage::scrComputeHash Function
rage Namespace
Show All
C++
u32 scrComputeHash(
    const char * name
);
Namespace

rage Namespace

File

hash.h

Links
rage Namespace


rage::scrValidateHash Function

rage::scrValidateHash Function
rage Namespace
Show All
C++
u32 scrValidateHash(
    const char * str,
    u32 hash,
    const char * file,
    int line
);
Namespace

rage Namespace

File

wrapper.h

Links
rage Namespace


rage::Cmd Type

rage::Cmd Type
rage Namespace
Show All
C++
typedef void (* Cmd)(scrThread::Info&);
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::s16 Type

rage::s16 Type
rage Namespace
Show All
C++
typedef signed short s16;
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::s32 Type

rage::s32 Type
rage Namespace
Show All
C++
typedef int s32;
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::scrTextLabel Type

rage::scrTextLabel Type
rage Namespace
Show All

this does NOT match TEXT_LABEL - internal use only!

C++
typedef char scrTextLabel[scrMaxTextLabelSize];
Namespace

rage Namespace

File

thread.h

Links
rage Namespace


rage::scrTextLabel15 Type

rage::scrTextLabel15 Type
rage Namespace
Show All
C++
typedef char scrTextLabel15[16];
Namespace

rage Namespace

File

thread.h

Links
rage Namespace


rage::scrTextLabel23 Type

rage::scrTextLabel23 Type
rage Namespace
Show All
C++
typedef char scrTextLabel23[24];
Namespace

rage Namespace

File

thread.h

Links
rage Namespace


rage::scrTextLabel31 Type

rage::scrTextLabel31 Type
rage Namespace
Show All
C++
typedef char scrTextLabel31[32];
Namespace

rage Namespace

File

thread.h

Links
rage Namespace


rage::scrTextLabel63 Type

rage::scrTextLabel63 Type
rage Namespace
Show All
C++
typedef char scrTextLabel63[64];
Namespace

rage Namespace

File

thread.h

Links
rage Namespace


rage::scrTextLabel7 Type

rage::scrTextLabel7 Type
rage Namespace
Show All

use these for interfacing scripts with game code

C++
typedef char scrTextLabel7[8];
Namespace

rage Namespace

File

thread.h

Links
rage Namespace


rage::scrThreadId Type

rage::scrThreadId Type
rage Namespace
Show All
C++
typedef struct scrThreadId__* scrThreadId;
Namespace

rage Namespace

File

thread.h

Links
rage Namespace


rage::u16 Type

rage::u16 Type
rage Namespace
Show All
C++
typedef unsigned short u16;
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::u32 Type

rage::u32 Type
rage Namespace
Show All
C++
typedef unsigned u32;
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::u8 Type

rage::u8 Type
rage Namespace
Show All
C++
typedef unsigned char u8;
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::g_PrintStackTraceFunc Variable

rage::g_PrintStackTraceFunc Variable
rage Namespace
Show All
C++
Functor0Ret<bool> g_PrintStackTraceFunc;
Namespace

rage Namespace

File

thread.cpp

Links
rage Namespace


rage::g_scrValueTypeNames Variable

rage::g_scrValueTypeNames Variable
rage Namespace
Show All
C++
char* g_scrValueTypeNames[] = { "UNKNOWN", "BOOL", "INT", "FLOAT", "VECTOR", "TEXT_LABEL", "STRING", "OBJECT", NULL };
Namespace

rage Namespace

File

signature.cpp

Links
rage Namespace


rage::gBaseScriptDirectory Variable

rage::gBaseScriptDirectory Variable
rage Namespace
Show All

might want to set this if you're going to set gScriptProject

C++
const char* gBaseScriptDirectory = NULL;
Namespace

rage Namespace

File

program.cpp

Links
rage Namespace


rage::gScriptProject Variable

rage::gScriptProject Variable
rage Namespace
Show All
C++
const char* gScriptProject = NULL;
Namespace

rage Namespace

File

program.cpp

Links
rage Namespace


rage::s_TraceBuf Variable

rage::s_TraceBuf Variable
rage Namespace
Show All
C++
scrTrace s_TraceBuf[s_TraceMax];
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::s_TraceMax Variable

rage::s_TraceMax Variable
rage Namespace
Show All
C++
const int s_TraceMax = 16;
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::s_TraceNext Variable

rage::s_TraceNext Variable
rage Namespace
Show All
C++
int s_TraceNext;
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::scrMaxTextLabelSize Variable

rage::scrMaxTextLabelSize Variable
rage Namespace
Show All

Must be a multiple of sizeof(scrValue).

C++
const int scrMaxTextLabelSize = 64;
Namespace

rage Namespace

File

value.h

Links
rage Namespace


rage::scrPageMask Variable

rage::scrPageMask Variable
rage Namespace
Show All
C++
const u32 scrPageMask = scrPageSize - 1;
Namespace

rage Namespace

File

program.h

Links
rage Namespace


rage::scrPageShift Variable

rage::scrPageShift Variable
rage Namespace
Show All
C++
const u32 scrPageShift = 14;
Namespace

rage Namespace

File

program.h

Links
rage Namespace


rage::scrPageSize Variable

rage::scrPageSize Variable
rage Namespace
Show All
C++
const u32 scrPageSize = (1 << scrPageShift);
Namespace

rage Namespace

File

program.h

Links
rage Namespace


rage::ADD_PC Macro

rage::ADD_PC Macro
rage Namespace
Show All
C++
#define ADD_PC(_r) (pc += (_r))
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::ATTR_COLD Macro

rage::ATTR_COLD Macro
rage Namespace
Show All
C++
#define ATTR_COLD
Namespace

rage Namespace

File

wrapper.h

Links
rage Namespace


rage::CHECK_PC Macro

rage::CHECK_PC Macro
rage Namespace
Show All
C++
#define CHECK_PC
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::DEBUG_TRACE Macro

rage::DEBUG_TRACE Macro
rage Namespace
Show All
C++
#define DEBUG_TRACE 0
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::DEC_CALLDEPTH Macro

rage::DEC_CALLDEPTH Macro
rage Namespace
Show All
C++
#define DEC_CALLDEPTH
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::MAX_CALLSTACK Macro

rage::MAX_CALLSTACK Macro
rage Namespace
Show All
C++
#define MAX_CALLSTACK 8
Namespace

rage Namespace

File

thread.h

Links
rage Namespace


rage::OPT_REGISTER_SECURE Macro

rage::OPT_REGISTER_SECURE Macro
rage Namespace
Show All
C++
#define OPT_REGISTER_SECURE(x,y,z)
Namespace

rage Namespace

File

wrapper.h

Links
rage Namespace


rage::OPT_REGISTER_SECURE_BLOCKING Macro

rage::OPT_REGISTER_SECURE_BLOCKING Macro
rage Namespace
Show All
C++
#define OPT_REGISTER_SECURE_BLOCKING(x,y,z)
Namespace

rage Namespace

File

wrapper.h

Links
rage Namespace


rage::OPT_REGISTER_SECURE_EXPORT Macro

rage::OPT_REGISTER_SECURE_EXPORT Macro
rage Namespace
Show All
C++
#define OPT_REGISTER_SECURE_EXPORT(x,y,z)
Namespace

rage Namespace

File

wrapper.h

Links
rage Namespace


rage::SCR_MAKE_SIGNATURE Macro

rage::SCR_MAKE_SIGNATURE Macro
rage Namespace
Show All

END

C++
#define SCR_MAKE_SIGNATURE(retV, arg0, arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8) ( (scrSignature::STATE_VALID << scrSignature::STATE_BITS) | ((retV) << scrSignature::RETV_BITS) | ((arg0) << (scrSignature::ARG0_BITS + scrSignature::TYPE_WIDTH * 0)) | ((arg1) << (scrSignature::ARG0_BITS + scrSignature::TYPE_WIDTH * 1)) | ((arg2) << (scrSignature::ARG0_BITS + scrSignature::TYPE_WIDTH * 2)) | ((arg3) << (scrSignature::ARG0_BITS + scrSignature::TYPE_WIDTH * 3)) | ((arg4) << (scrSignature::ARG0_BITS + scrSignature::TYPE_WIDTH * 4)) | ((arg5) << (scrSignature::ARG0_BITS + scrSignature::TYPE_WIDTH * 5)) | ((arg6) << (scrSignature::ARG0_BITS + scrSignature::TYPE_WIDTH * 6)) | ((arg7) << (scrSignature::ARG0_BITS + scrSignature::TYPE_WIDTH * 7)) | ((arg8) << (scrSignature::ARG0_BITS + scrSignature::TYPE_WIDTH * 8))
)
Namespace

rage Namespace

File

signature.h

Links
rage Namespace


rage::SCR_REGISTER_SECURE Macro

rage::SCR_REGISTER_SECURE Macro
rage Namespace
Show All

END

C++
#define SCR_REGISTER_SECURE(name, hashcode, fn) struct scrWrapped_ ## name { static void Call(::rage::scrThread::Info& s) ATTR_COLD { SCR_RAGE_TRACK2(name,hashcode); ::rage::scrWrapper::CallFunction(fn, s); } }; ::rage::scrThread::RegisterCommand(hashcode, scrWrapped_ ## name::Call)
Namespace

rage Namespace

File

wrapper.h

Links
rage Namespace


rage::SCR_REGISTER_SECURE_BLOCKING Macro

rage::SCR_REGISTER_SECURE_BLOCKING Macro
rage Namespace
Show All

END !__ASSERT

C++
#define SCR_REGISTER_SECURE_BLOCKING(name, hashcode, fn) struct scrWrapped_ ## name { static void Call(::rage::scrThread::Info& s) ATTR_COLD { SCR_RAGE_TRACK2(name,hashcode); ::rage::scrWrapper::CallFunctionBlocking(fn, s); } }; ::rage::scrThread::RegisterCommand(hashcode, scrWrapped_ ## name::Call)
Namespace

rage Namespace

File

wrapper.h

Links
rage Namespace


rage::SCR_REGISTER_SECURE_EXPORT Macro

rage::SCR_REGISTER_SECURE_EXPORT Macro
rage Namespace
Show All

END

C++
#define SCR_REGISTER_SECURE_EXPORT(name, hashcode, fn) struct scrWrapped_ ## name { static void Call(::rage::scrThread::Info& s) ATTR_COLD { SCR_RAGE_TRACK2(name,hashcode); ::rage::scrWrapper::CallFunction(fn, s);
}
}; ::rage::scrThread::RegisterCommandAndSignature(hashcode, scrWrapped_ ## name::Call, ::rage::scrSignature(::rage::scrWrapper::GetFunctionSignature(fn)))
Namespace

rage Namespace

File

wrapper.h

Links
rage Namespace


rage::SCR_REGISTER_UNSECURE Macro

rage::SCR_REGISTER_UNSECURE Macro
rage Namespace
Show All

END

C++
#define SCR_REGISTER_UNSECURE(name, fn) struct scrWrapped_ ## name { static void Call(::rage::scrThread::Info& s) ATTR_COLD { SCR_RAGE_TRACK(name); ::rage::scrWrapper::CallFunction(#name, fn, s); } }; ::rage::scrThread::RegisterCommand(#name, scrWrapped_ ## name::Call)
Namespace

rage Namespace

File

wrapper.h

Links
rage Namespace


rage::SCR_REGISTER_UNSECURE_BLOCKING Macro

rage::SCR_REGISTER_UNSECURE_BLOCKING Macro
rage Namespace
Show All

END

C++
#define SCR_REGISTER_UNSECURE_BLOCKING(name, fn) struct scrWrapped_ ## name { static void Call(::rage::scrThread::Info& s) ATTR_COLD { SCR_RAGE_TRACK(name); ::rage::scrWrapper::CallFunctionBlocking(#name, fn, s); } }; ::rage::scrThread::RegisterCommand(#name, scrWrapped_ ## name::Call)
Namespace

rage Namespace

File

wrapper.h

Links
rage Namespace


rage::SCR_REGISTER_UNSECURE_EXPORT Macro

rage::SCR_REGISTER_UNSECURE_EXPORT Macro
rage Namespace
Show All

END

C++
#define SCR_REGISTER_UNSECURE_EXPORT(name, fn) struct scrWrapped_ ## name { static void Call(::rage::scrThread::Info& s) ATTR_COLD { SCR_RAGE_TRACK(name); ::rage::scrWrapper::CallFunction(#name, fn, s);
}
}; ::rage::scrThread::RegisterCommandAndSignature(atStringHash(#name), scrWrapped_ ## name::Call , ::rage::scrSignature(::rage::scrWrapper::GetFunctionSignature(fn)))
Namespace

rage Namespace

File

wrapper.h

Links
rage Namespace


rage::SCRHASH Macro

rage::SCRHASH Macro
rage Namespace
Show All
C++
#define SCRHASH(str,code) (code)
Namespace

rage Namespace

File

wrapper.h

Links
rage Namespace


rage::SET_PC Macro

rage::SET_PC Macro
rage Namespace
Show All
C++
#define SET_PC(_o) (pc = opcodes + (_o))
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::STREAMABLE_PROGRAMS Macro

rage::STREAMABLE_PROGRAMS Macro
rage Namespace
Show All
C++
#define STREAMABLE_PROGRAMS 1
Namespace

rage Namespace

File

program.h

Links
rage Namespace


rage::THREADED_INTERPRETER Macro

rage::THREADED_INTERPRETER Macro
rage Namespace
Show All

Both gcc and snc support computed goto's.

C++
#define THREADED_INTERPRETER (__PS3 && !DEBUG_TRACE)
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::VALIDATE_PC Macro

rage::VALIDATE_PC Macro
rage Namespace
Show All

Pick a reasonable value that fits in a PPC compare immediate insn.

C++
#define VALIDATE_PC(target)
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rage::VALIDATE_PTR Macro

rage::VALIDATE_PTR Macro
rage Namespace
Show All
C++
#define VALIDATE_PTR(value)
Namespace

rage Namespace

File

threadrun.cpp

Links
rage Namespace


rageBankScriptBindings Namespace

rageBankScriptBindings Namespace
Functions | Variables
Show All
Functions
Function | Description
Register_BankScript |
Variables
Variable | Description
s_tempWidgetAngleVectorValue |
s_tempWidgetStringValue |
s_tempWidgetVector2Value |
s_tempWidgetVector3Value |
s_tempWidgetVector4Value |
Links
Functions, Variables
Send comments on this topic.


rageBankScriptBindings::Register_BankScript Function

rageBankScriptBindings::Register_BankScript Function
rageBankScriptBindings Namespace
Show All
C++
void Register_BankScript();
Namespace

rageBankScriptBindings Namespace

File

bankscript.h

Links
rageBankScriptBindings Namespace


rageBankScriptBindings::s_tempWidgetAngleVectorValue Variable

rageBankScriptBindings::s_tempWidgetAngleVectorValue Variable
rageBankScriptBindings Namespace
Show All
C++
static scrVector s_tempWidgetAngleVectorValue;
Namespace

rageBankScriptBindings Namespace

File

bankscript.cpp

Links
rageBankScriptBindings Namespace


rageBankScriptBindings::s_tempWidgetStringValue Variable

rageBankScriptBindings::s_tempWidgetStringValue Variable
rageBankScriptBindings Namespace
Show All
C++
static char s_tempWidgetStringValue[512];
Namespace

rageBankScriptBindings Namespace

File

bankscript.cpp

Links
rageBankScriptBindings Namespace


rageBankScriptBindings::s_tempWidgetVector2Value Variable

rageBankScriptBindings::s_tempWidgetVector2Value Variable
rageBankScriptBindings Namespace
Show All
C++
static scrVector s_tempWidgetVector2Value;
Namespace

rageBankScriptBindings Namespace

File

bankscript.cpp

Links
rageBankScriptBindings Namespace


rageBankScriptBindings::s_tempWidgetVector3Value Variable

rageBankScriptBindings::s_tempWidgetVector3Value Variable
rageBankScriptBindings Namespace
Show All
C++
static scrVector s_tempWidgetVector3Value;
Namespace

rageBankScriptBindings Namespace

File

bankscript.cpp

Links
rageBankScriptBindings Namespace


rageBankScriptBindings::s_tempWidgetVector4Value Variable

rageBankScriptBindings::s_tempWidgetVector4Value Variable
rageBankScriptBindings Namespace
Show All
C++
static scrVector s_tempWidgetVector4Value;
Namespace

rageBankScriptBindings Namespace

File

bankscript.cpp

Links
rageBankScriptBindings Namespace


Info Struct

Info Struct
Constructors | Members | Data Members | Inheritance Hierarchy
Show All
Info
C++
public: struct Info {
  public: scrValue * ResultPtr;
  public: int ParamCount;
  public: const scrValue * Params;
  public: unsigned Command;
  public: int BufferCount;
  public: enum {
    public: MAX_VECTOR3 = 4
  };
  public: float * Orig[MAX_VECTOR3];
  public: DummyVector3 Buffer[MAX_VECTOR3];
};
Constructors
Constructor | Description
Info |
Data Members
Data Member | Description
Buffer |
BufferCount | Temp storage for managing copyin/copyout of Vector3 parameters
Command | The issuing command's id (i.e. function pointer)
Orig |
ParamCount | Parameter count
Params | Pointer to parameter values
ResultPtr | Return result, if applicable
File

csupport.h

Links
Constructors, Members, Data Members, Inheritance Hierarchy


Info::Buffer Data Member

Info::Buffer Data Member
Info Struct
Show All
C++
public: DummyVector3 Buffer[MAX_VECTOR3];
Struct

Info Struct

File

csupport.h

Links
Info Struct
Send comments on this topic.


Info::BufferCount Data Member

Info::BufferCount Data Member
Info Struct
Show All

Temp storage for managing copyin/copyout of Vector3 parameters

C++
public: int BufferCount;
Struct

Info Struct

File

csupport.h

Links
Info Struct
Send comments on this topic.


Info::Command Data Member

Info::Command Data Member
Info Struct
Show All

The issuing command's id (i.e. function pointer)

C++
public: unsigned Command;
Struct

Info Struct

File

csupport.h

Links
Info Struct
Send comments on this topic.


Info::Orig Data Member

Info::Orig Data Member
Info Struct
Show All
C++
public: float * Orig[MAX_VECTOR3];
Struct

Info Struct

File

csupport.h

Links
Info Struct
Send comments on this topic.


Info::ParamCount Data Member

Info::ParamCount Data Member
Info Struct
Show All

Parameter count

C++
public: int ParamCount;
Struct

Info Struct

File

csupport.h

Links
Info Struct
Send comments on this topic.


Info::Params Data Member

Info::Params Data Member
Info Struct
Show All

Pointer to parameter values

C++
public: const scrValue * Params;
Struct

Info Struct

File

csupport.h

Links
Info Struct
Send comments on this topic.


Info::ResultPtr Data Member

Info::ResultPtr Data Member
Info Struct
Show All

Return result, if applicable

C++
public: scrValue * ResultPtr;
Struct

Info Struct

File

csupport.h

Links
Info Struct
Send comments on this topic.


Info::Info Constructor

Info::Info Constructor
Info Struct
Show All
C++
public: Info(
    scrValue * resultPtr,
    int parameterCount,
    const scrValue * params,
    unsigned cmd
);
Struct

Info Struct

File

csupport.h

Links
Info Struct
Send comments on this topic.


scrArray Struct

scrArray Struct
Nested Types | Constructors | Members | Operators | Data Members | Inheritance Hierarchy
Show All
scrArrayBase
    scrArray
C++
public: struct scrArray : public scrArrayBase<_Type> {
  public: ElementBlock Elements[_count];
};
Nested Types
Nested Type | Description
ElementBlock |
Constructors
Constructor | Description
scrArray |
scrArrayBase |
Operators
Operator | Description
[] |
[] |
Data Members
Data Member | Description
Count | _count
Elements |
File

csupport.h

Links
Nested Types, Constructors, Members, Operators, Data Members, Inheritance Hierarchy


scrArray::Elements Data Member

scrArray::Elements Data Member
scrArray Struct
Show All
C++
public: ElementBlock Elements[_count];
Struct

scrArray Struct

File

csupport.h

Links
scrArray Struct


scrArray::scrArray Constructor

scrArray::scrArray Constructor
scrArray Struct
Show All
C++
public: scrArray();
Struct

scrArray Struct

File

csupport.h

Links
scrArray Struct


scrArray::[] Operator

scrArray::[] Operator
scrArray Struct
Show All
C++
public: _Type& operator [](
    unsigned index
);
Struct

scrArray Struct

File

csupport.h

Links
scrArray Struct


scrArray::ElementBlock Nested Type

scrArray::ElementBlock Nested Type
scrArray Struct
Show All
C++
public: typedef unsigned ElementBlock[sizeof(_Type) / sizeof(unsigned)];
Struct

scrArray Struct

File

csupport.h

Links
scrArray Struct


scrArrayBase Struct

scrArrayBase Struct
Constructors | Members | Operators | Data Members | Inheritance Hierarchy
Show All

this is used by variable-length arrays (passed by reference into subprograms)

scrArrayBase
    scrArray
C++
public: struct scrArrayBase {
  public: unsigned Count;
};
Constructors
Constructor | Description
scrArrayBase |
Operators
Operator | Description
[] |
Data Members
Data Member | Description
Count | _count
File

csupport.h

Links
Constructors, Members, Operators, Data Members, Inheritance Hierarchy


scrArrayBase::Count Data Member

scrArrayBase::Count Data Member
scrArrayBase Struct
Show All

_count

C++
public: unsigned Count;
Struct

scrArrayBase Struct

File

csupport.h

Links
scrArrayBase Struct


scrArrayBase::scrArrayBase Constructor

scrArrayBase::scrArrayBase Constructor
scrArrayBase Struct
Show All
C++
public: scrArrayBase(
    unsigned _count
);
Struct

scrArrayBase Struct

File

csupport.h

Links
scrArrayBase Struct


scrArrayBase::[] Operator

scrArrayBase::[] Operator
scrArrayBase Struct
Show All
C++
public: _Type& operator [](
    unsigned index
);
Struct

scrArrayBase Struct

File

csupport.h

Links
scrArrayBase Struct


scriptNameSetter Struct

scriptNameSetter Struct
Constructors | Destructors | Members | Data Members | Inheritance Hierarchy
Show All
scriptNameSetter
C++
public: struct scriptNameSetter {
  public: const char* m_Prev;
};
Constructors
Constructor | Description
scriptNameSetter |
Destructors
Destructor | Description
~scriptNameSetter |
Data Members
Data Member | Description
m_Prev |
File

thread.cpp

Links
Constructors, Destructors, Members, Data Members, Inheritance Hierarchy


scriptNameSetter::m_Prev Data Member

scriptNameSetter::m_Prev Data Member
scriptNameSetter Struct
Show All
C++
public: const char* m_Prev;
Struct

scriptNameSetter Struct

File

thread.cpp

Links
scriptNameSetter Struct


scriptNameSetter::scriptNameSetter Constructor

scriptNameSetter::scriptNameSetter Constructor
scriptNameSetter Struct
Show All
C++
public: scriptNameSetter(
    const char* name
);
Struct

scriptNameSetter Struct

File

thread.cpp

Links
scriptNameSetter Struct


scriptNameSetter::~scriptNameSetter Destructor

scriptNameSetter::~scriptNameSetter Destructor
scriptNameSetter Struct
Show All
C++
public: ~scriptNameSetter();
Struct

scriptNameSetter Struct

File

thread.cpp

Links
scriptNameSetter Struct


scrProgramRegistry Class

scrProgramRegistry Class
Members | Methods | Inheritance Hierarchy
Show All

Can't use the "normal" script hash because it doesn't support defragmentation.

scrProgramRegistry
C++
public: class scrProgramRegistry;
Methods
Method | Description
Insert |
Lookup |
Remove |
File

program.cpp

Links
Members, Methods, Inheritance Hierarchy
Send comments on this topic.


scrProgramRegistry::Insert Method

scrProgramRegistry::Insert Method
scrProgramRegistry Class
Show All
C++
public: void Insert(
    scrProgram * p
);
Class

scrProgramRegistry Class

File

program.cpp

Links
scrProgramRegistry Class


scrProgramRegistry::Lookup Method

scrProgramRegistry::Lookup Method
scrProgramRegistry Class
Show All
C++
public: scrProgram * Lookup(
    u32 hash
);
Class

scrProgramRegistry Class

File

program.cpp

Links
scrProgramRegistry Class


scrProgramRegistry::Remove Method

scrProgramRegistry::Remove Method
scrProgramRegistry Class
Show All
C++
public: bool Remove(
    scrProgram * p
);
Class

scrProgramRegistry Class

File

program.cpp

Links
scrProgramRegistry Class


scrTextLabelN Struct

scrTextLabelN Struct
Constructors | Members | Methods | Operators | Data Members | Inheritance Hierarchy
Show All
scrTextLabelN
C++
public: struct scrTextLabelN {
  public: char text[N + 1];
};
Constructors
Constructor | Description
scrTextLabelN |
Methods
Method | Description
append_int |
append_string |
Operators
Operator | Description
= |
const char* |
Data Members
Data Member | Description
text |
File

csupport.h

Links
Constructors, Members, Methods, Operators, Data Members, Inheritance Hierarchy


scrTextLabelN::text Data Member

scrTextLabelN::text Data Member
scrTextLabelN Struct
Show All
C++
public: char text[N + 1];
Struct

scrTextLabelN Struct

File

csupport.h

Links
scrTextLabelN Struct


scrTextLabelN::scrTextLabelN Constructor ()

scrTextLabelN::scrTextLabelN Constructor ()
scrTextLabelN Struct
Show All
C++
public: scrTextLabelN();
Struct

scrTextLabelN Struct

File

csupport.h

Links
scrTextLabelN Struct


scrTextLabelN::scrTextLabelN Constructor (const char *)

scrTextLabelN::scrTextLabelN Constructor (const char *)
scrTextLabelN Struct
Show All
C++
public: scrTextLabelN(
    const char * value
);
Struct

scrTextLabelN Struct

File

csupport.h

Links
scrTextLabelN Struct


scrTextLabelN::append_int Method

scrTextLabelN::append_int Method
scrTextLabelN Struct
Show All
C++
public: void append_int(
    int value
);
Struct

scrTextLabelN Struct

File

csupport.h

Links
scrTextLabelN Struct


scrTextLabelN::append_string Method

scrTextLabelN::append_string Method
scrTextLabelN Struct
Show All
C++
public: void append_string(
    const char* value
);
Struct

scrTextLabelN Struct

File

csupport.h

Links
scrTextLabelN Struct


scrTextLabelN::= Operator (const char *)

scrTextLabelN::= Operator (const char *)
scrTextLabelN Struct
Show All
C++
public: void operator =(
    const char * value
);
Struct

scrTextLabelN Struct

File

csupport.h

Links
scrTextLabelN Struct


scrTextLabelN::= Operator (int)

scrTextLabelN::= Operator (int)
scrTextLabelN Struct
Show All
C++
public: void operator =(
    int value
);
Struct

scrTextLabelN Struct

File

csupport.h

Links
scrTextLabelN Struct


scrTextLabelN::const char* Operator

scrTextLabelN::const char* Operator
scrTextLabelN Struct
Show All
C++
public: operator const char*() const;
Struct

scrTextLabelN Struct

File

csupport.h

Links
scrTextLabelN Struct


scrVector Struct

scrVector Struct
Constructors | Members | Operators | Data Members | Inheritance Hierarchy
Show All
scrVector
C++
public: struct scrVector {
  public: float x, y, z;
};
Constructors
Constructor | Description
scrVector |
Operators
Operator | Description
- |
* |
+ |
Data Members
Data Member | Description
x |
y |
z |
File

csupport.h

Links
Constructors, Members, Operators, Data Members, Inheritance Hierarchy


scrVector::x Data Member

scrVector::x Data Member
scrVector Struct
Show All
C++
public: float x;
Struct

scrVector Struct

File

csupport.h

Links
scrVector Struct


scrVector::y Data Member

scrVector::y Data Member
scrVector Struct
Show All
C++
public: float y;
Struct

scrVector Struct

File

csupport.h

Links
scrVector Struct


scrVector::z Data Member

scrVector::z Data Member
scrVector Struct
Show All
C++
public: float z;
Struct

scrVector Struct

File

csupport.h

Links
scrVector Struct


scrVector::scrVector Constructor ()

scrVector::scrVector Constructor ()
scrVector Struct
Show All
C++
public: scrVector();
Struct

scrVector Struct

File

csupport.h

Links
scrVector Struct


scrVector::scrVector Constructor (float, float, float)

scrVector::scrVector Constructor (float, float, float)
scrVector Struct
Show All
C++
public: explicit scrVector(
    float _x,
    float _y,
    float _z
);
Struct

scrVector Struct

File

csupport.h

Links
scrVector Struct


scrVector::- Operator ()

scrVector::- Operator ()
scrVector Struct
Show All
C++
public: scrVector operator -() const;
Struct

scrVector Struct

File

csupport.h

Links
scrVector Struct


scrVector::- Operator (const scrVector)

scrVector::- Operator (const scrVector)
scrVector Struct
Show All
C++
public: scrVector operator -(
    const scrVector b
) const;
Struct

scrVector Struct

File

csupport.h

Links
scrVector Struct


scrVector::* Operator

scrVector::* Operator
scrVector Struct
Show All
C++
public: scrVector operator *(
    const scrVector b
) const;
Struct

scrVector Struct

File

csupport.h

Links
scrVector Struct


scrVector::+ Operator

scrVector::+ Operator
scrVector Struct
Show All
C++
public: scrVector operator +(
    const scrVector b
) const;
Struct

scrVector Struct

File

csupport.h

Links
scrVector Struct


__attribute__ Function

__attribute__ Function
C++
struct scrVector __attribute__(
    ( d64_abi )
);
File

csupport.h


__attribute__ Function

__attribute__ Function
C++
struct DummyVector3 __attribute__(
    (aligned(16))
);
File

csupport.h


__mftb Function

__mftb Function
C++
unsigned __int64 __mftb();
File

threadrun.cpp


atStringHash Function

atStringHash Function
C++
void atStringHash(
    const char *
);
File

csupport.h


MY_SYS_MODULE_INFO Function

MY_SYS_MODULE_INFO Function
C++
MY_SYS_MODULE_INFO(
    __BASE_FILE__,
    0,
    1,
    1
);
File

csupportentry.h


scr_append_int Function

scr_append_int Function
C++
static void scr_append_int(
    char * dst,
    unsigned siz,
    int value
);
File

csupport.h


scr_append_string Function

scr_append_string Function
C++
static void scr_append_string(
    char * dst,
    unsigned siz,
    const char * src
);
File

csupport.h


scr_assign_int Function

scr_assign_int Function
C++
static void scr_assign_int(
    char * dst,
    unsigned siz,
    int value
);
File

csupport.h


scr_assign_string Function

scr_assign_string Function
C++
static void scr_assign_string(
    char * dst,
    unsigned siz,
    const char * src
);
File

csupport.h


SYS_MODULE_START Function

SYS_MODULE_START Function
C++
SYS_MODULE_START(
    start_script
);
File

csupportentry.h


TIMESTEP Function

TIMESTEP Function
C++
float TIMESTEP();
File

csupport.h


DummyVector3 Struct

DummyVector3 Struct
C++
public: struct DummyVector3 {
  public: float x, y, z, w;
};
File

csupport.h


Header Struct

Header Struct
C++
public: struct Header {
  public: u32 Magic;
  public: u32 GlobalsHash;
  public: u32 CompressedSize;
  public: u32 EncryptionKey;
  public: u32 OpcodeSize;
  public: u32 StaticSize;
  public: u32 GlobalSize;
  public: u32 ArgStructSize;
  public: u32 NativeSize;
  public: u32 StringHeapSize;
  public: u32 Pad[2];
};
Members

Magic
SCR_MAGIC;

File

program.cpp


script_args Struct

script_args Struct
C++
public: struct script_args {
  public: script_globals * in_globals;
  public: Cmd (* in_resolver)(unsigned);
  public: void (* out_script)(script_statics*);
  public: void (* out_construct_statics)(script_statics*);
  public: unsigned out_statics_size;
};
Members

out_script
OUTPUTS

File

csupportentry.h


scrValue Union

scrValue Union
C++
public: union scrValue {
  public: int Int;
  public: float Float;
  public: bool Bool;
  public: void * Reference;
  public: const char * String;
};
File

csupport.h


State Enumeration

State Enumeration
C++
public: enum State {
  public: RUNNING,
  public: BLOCKED,
  public: ABORTED,
  public: HALTED,
  public: RESET_INSTRUCTION_COUNT
};
File

threadrun.cpp


BOOL Type

BOOL Type
C++
typedef int BOOL;
File

csupport.h


Cmd Type

Cmd Type
C++
typedef void (* Cmd)(scrThread::Info&);
File

csupport.h


scrTextLabel15 Type

scrTextLabel15 Type
C++
typedef scrTextLabelN<15> scrTextLabel15;
File

csupport.h


scrTextLabel23 Type

scrTextLabel23 Type
C++
typedef scrTextLabelN<23> scrTextLabel23;
File

csupport.h


scrTextLabel3 Type

scrTextLabel3 Type
C++
typedef scrTextLabelN<3> scrTextLabel3;
File

csupport.h


scrTextLabel31 Type

scrTextLabel31 Type
C++
typedef scrTextLabelN<31> scrTextLabel31;
File

csupport.h


scrTextLabel63 Type

scrTextLabel63 Type
C++
typedef scrTextLabelN<63> scrTextLabel63;
File

csupport.h


scrTextLabel7 Type

scrTextLabel7 Type
C++
typedef scrTextLabelN<7> scrTextLabel7;
File

csupport.h


, scrThread *) = 0 Variable

, scrThread *) = 0 Variable
C++
(voidscrThreadAppFaultHandlerconst char * , scrThread *) = 0)();
File

thread.cpp


dest, int maxBuf, const char *input, const char *ext) = DefaultGetFullFilename Variable

dest, int maxBuf, const char *input, const char *ext) = DefaultGetFullFilename Variable
Show All
C++
(voidscrProgramGetFullFilenamechar * dest, int maxBuf, const char *input, const char *ext) = DefaultGetFullFilename)();
File

program.cpp


FALSE Variable

FALSE Variable
C++
const int FALSE = 0;
File

csupport.h


g_Validate Variable

g_Validate Variable
C++
const bool g_Validate = !__RESOURCECOMPILER;
File

program.cpp


globals Variable

globals Variable
C++
rage::scrValue globals[256];
File

threadrun.cpp


MAX_LEGIT_OPS Variable

MAX_LEGIT_OPS Variable
C++
const int MAX_LEGIT_OPS = 16 * 65536;
File

thread.cpp


opcodes Variable

opcodes Variable
C++
static unsigned char opcodes[] = { OP_ENTER,0x00,SWAP_16(0x00,0x03),0x00, OP_PUSH_CONST_U8,0, OP_LOCAL_U8_STORE,2, OP_LOCAL_U8_LOAD,2, OP_PUSH_CONST_U32,SWAP_32(0x00,0x98,0x96,0x80), OP_ILE_JZ,SWAP_16(0x00,0x09), OP_LOCAL_U8_LOAD,2, OP_IADD_U8,1, OP_LOCAL_U8_STORE,2, OP_J,SWAP_16(0xFF,0xED), OP_LEAVE,0x00,0x00, };
File

threadrun.cpp


s_AllRefCount Variable

s_AllRefCount Variable
C++
static int s_AllRefCount;
File

program.cpp


s_bClearOnHit Variable

s_bClearOnHit Variable
C++
static bool s_bClearOnHit = false;
File

thread.cpp


s_bPrintOnly Variable

s_bPrintOnly Variable
C++
static bool s_bPrintOnly = false;
File

thread.cpp


s_BreakFuncName Variable

s_BreakFuncName Variable
C++
static char s_BreakFuncName[64] = {0};
File

thread.cpp


s_CommandHash Variable

s_CommandHash Variable
C++
static scrHash<Cmd> s_CommandHash;
File

thread.cpp


s_CurrentThread Variable

s_CurrentThread Variable
C++
static scrThread * s_CurrentThread;
File

thread.cpp


s_FaultOnFunc Variable

s_FaultOnFunc Variable

Function to throw a fault on

C++
static Cmd s_FaultOnFunc = 0;
File

thread.cpp


s_GlobalsHash Variable

s_GlobalsHash Variable
C++
static u32 s_GlobalsHash;
File

program.cpp


s_GlobalsScript Variable

s_GlobalsScript Variable
C++
ConstString s_GlobalsScript;
File

program.cpp


s_NameLookup Variable

s_NameLookup Variable
C++
atMap<Cmd, const char *> s_NameLookup;
File

thread.cpp


s_Null Variable

s_Null Variable
C++
static rage::scrValue s_Null;
File

thread.cpp


s_ProgHash Variable

s_ProgHash Variable

Can't use the "normal" script hash because it doesn't support defragmentation.

C++
public: class scrProgramRegistry s_ProgHash;
File

program.cpp


s_ScriptName Variable

s_ScriptName Variable

SOLELY FOR DEBUGGING, DO NOT REMOVE.

C++
const char * s_ScriptName;
File

thread.cpp


s_SignatureHash Variable

s_SignatureHash Variable

Using a stringMap instead of a scrHash because we can afford slower lookup, but want to use less memory

C++
static atStringMap<scrSignature> s_SignatureHash;
File

thread.cpp


s_STSO Variable

s_STSO Variable
C++
static char s_STSO[] = "Script thread stack overflow";
File

thread.cpp


SCR_MAGIC Variable

SCR_MAGIC Variable
C++
const int SCR_MAGIC = MAKE_MAGIC_NUMBER('S','C','R',4);
File

program.cpp


scrProgram::sm_AllowDelete Variable

scrProgram::sm_AllowDelete Variable
C++
bool scrProgram::sm_AllowDelete = true;
File

program.cpp


scrProgram::sm_AllowMismatchedGlobals Variable

scrProgram::sm_AllowMismatchedGlobals Variable
C++
bool scrProgram::sm_AllowMismatchedGlobals = false;
File

program.cpp


scrProgram::sm_Globals Variable

scrProgram::sm_Globals Variable
C++
scrValue * scrProgram::sm_Globals;
File

program.cpp


scrProgram::sm_GlobalSize Variable

scrProgram::sm_GlobalSize Variable
C++
int scrProgram::sm_GlobalSize;
File

program.cpp


scrProgram::sm_GlobalsOriginal Variable

scrProgram::sm_GlobalsOriginal Variable
C++
scrValue * scrProgram::sm_GlobalsOriginal;
File

program.cpp


scrThread::sm_EnableScriptProfiling Variable

scrThread::sm_EnableScriptProfiling Variable
C++
bool scrThread::sm_EnableScriptProfiling;
File

thread.cpp


scrThread::sm_Globals Variable

scrThread::sm_Globals Variable
C++
atArray<scrThread::Global> scrThread::sm_Globals;
File

thread.cpp


scrThread::sm_IsPaused Variable

scrThread::sm_IsPaused Variable
C++
bool scrThread::sm_IsPaused = false;
File

thread.cpp


scrThread::sm_PrintStackPrefix Variable

scrThread::sm_PrintStackPrefix Variable
C++
const char* scrThread::sm_PrintStackPrefix = ">>>";
File

thread.cpp


scrThread::sm_ProfileResetInterval Variable

scrThread::sm_ProfileResetInterval Variable
C++
u32 scrThread::sm_ProfileResetInterval = 250;
File

thread.cpp


scrThread::sm_Stacks Variable

scrThread::sm_Stacks Variable
C++
atArray<scrThread::ThreadStack> scrThread::sm_Stacks;
File

thread.cpp


scrThread::sm_ThreadId Variable

scrThread::sm_ThreadId Variable
C++
u32 scrThread::sm_ThreadId;
File

thread.cpp


scrThread::sm_Threads Variable

scrThread::sm_Threads Variable
C++
atArray<scrThread*> scrThread::sm_Threads;
File

thread.cpp


scrThread::sm_TimeStep Variable

scrThread::sm_TimeStep Variable
C++
float scrThread::sm_TimeStep = 1.0f / 60;
File

thread.cpp


scrThread::sm_TimeStepUnwarped Variable

scrThread::sm_TimeStepUnwarped Variable
C++
float scrThread::sm_TimeStepUnwarped = 1.0f / 60;
File

thread.cpp


scrThread::sm_UpdateTimersWhenPaused Variable

scrThread::sm_UpdateTimersWhenPaused Variable

if true (default) we want timerA and timerB to update while the sm_IsPaused flag is set

C++
bool scrThread::sm_UpdateTimersWhenPaused = true;
File

thread.cpp


stack Variable

stack Variable
C++
rage::scrValue stack;
File

threadrun.cpp


state Variable

state Variable
C++
scrThread::Serialized state;
File

threadrun.cpp


throw_buffer Variable

throw_buffer Variable
C++
jmp_buf throw_buffer;
File

csupport.h


TRUE Variable

TRUE Variable
C++
const int TRUE = 1;
File

csupport.h


__debugbreak Macro

__debugbreak Macro
C++
#define __debugbreak __builtin_trap()
File

csupport.h


__ignored__ Macro

__ignored__ Macro
C++
#define __ignored__(x)
File

csupport.h


_Pushi Macro

_Pushi Macro

Changelist 119020 by Matt Shepcar - scrThread optimisation - store sp in a local variable

C++
#define _Pushi Pushi
File

thread.cpp


CheckForExtraOverflow Macro

CheckForExtraOverflow Macro

if (m_Serialized.m_SP+(offset) >= m_Serialized.m_StackSize) return Fault(s_STSO); else

C++
#define CheckForExtraOverflow(offset) if (m_Serialized.m_SP+(offset) >= m_Serialized.m_StackSize) return Fault(s_STSO); else
File

thread.cpp


CheckForOverflow Macro

CheckForOverflow Macro
C++
#define CheckForOverflow CheckForExtraOverflow(0)
File

thread.cpp


count_of Macro

count_of Macro
C++
#define count_of(array) ((array).Count)
File

csupport.h


csupport_inline Macro

csupport_inline Macro
C++
#define csupport_inline __forceinline
File

csupport.h


ENCRYPT_GLOBALS Macro

ENCRYPT_GLOBALS Macro
C++
#define ENCRYPT_GLOBALS (__XENON && 0)
File

program.cpp


enum_to_int Macro

enum_to_int Macro
C++
#define enum_to_int(a) (a)
File

csupport.h


Fault Macro

Fault Macro
C++
#define Fault(string,...) do { Errorf("FAULT: " string " (%s pc = 0x%x)",##__VA_ARGS__,s_ScriptName,pc - opcodes); goto FAULT; } while (0)
File

threadrun.cpp


FULL_LOGGING Macro

FULL_LOGGING Macro
C++
#define FULL_LOGGING 0
File

thread.cpp


int_to_enum Macro

int_to_enum Macro
C++
#define int_to_enum(a) (a)
File

csupport.h


LoadImm16 Macro

LoadImm16 Macro
C++
#define LoadImm16 ((pc+=2), *(u16*)(pc-1))
File

thread.cpp


LoadImm24 Macro

LoadImm24 Macro
C++
#define LoadImm24 ((pc+=3), *(u32*)(pc-3) >> 8)
File

thread.cpp


LoadImm32 Macro

LoadImm32 Macro
C++
#define LoadImm32 ((pc+=4), *(u32*)(pc-3))
File

thread.cpp


LoadImm8 Macro

LoadImm8 Macro
C++
#define LoadImm8 (*++pc)
File

thread.cpp


LoadImmS16 Macro

LoadImmS16 Macro
C++
#define LoadImmS16 ((pc+=2), *(s16*)(pc-1))
File

thread.cpp


LoadSp Macro

LoadSp Macro

use after writes to m_Serialized.m_SP

C++
#define LoadSp
File

thread.cpp


LOCAL_STACK Macro

LOCAL_STACK Macro
C++
#define LOCAL_STACK (!SCRIPT_DEBUGGING)
File

thread.cpp


MY_SYS_MODULE_INFO Macro

MY_SYS_MODULE_INFO Macro
C++
#define MY_SYS_MODULE_INFO( name, attribute, major, minor ) SYS_LIB_TABEL_ADDRESS_DEFINE(); extern SceModuleInfo __psp_moduleinfo SYS_MODULE_INFO_SECTION = { attribute, { minor, major }, name, 0, static_cast<void*>(0), static_cast<const void*>(__begin_of_section_lib_ent+1), static_cast<const void*>(__end_of_section_lib_ent), static_cast<const void*>(__begin_of_section_lib_stub+1), static_cast<const void*>(__end_of_section_lib_stub) }; SYS_LIB_EXPORT_VAR_OTHER_NAME( module_info, __psp_moduleinfo, )
File

csupportentry.h


op_array Macro

op_array Macro
C++
#define op_array(index,base) ((base)[index])
File

csupport.h


op_catch Macro

op_catch Macro
C++
#define op_catch setjmp(throw_buffer)
File

csupport.h


op_indirectcall Macro

op_indirectcall Macro
C++
#define op_indirectcall(args,func) func args
File

csupport.h


op_store Macro

op_store Macro
C++
#define op_store(value,dest) ((dest) = (value))
File

csupport.h


op_text_label_append_int Macro

op_text_label_append_int Macro
C++
#define op_text_label_append_int(value,dest) ((dest).append_int(value))
File

csupport.h


op_text_label_append_string Macro

op_text_label_append_string Macro
C++
#define op_text_label_append_string(value,dest) ((dest).append_string(value))
File

csupport.h


op_throw Macro

op_throw Macro
C++
#define op_throw(value) longjmp(throw_buffer,(value))
File

csupport.h


Popf Macro

Popf Macro
C++
#define Popf ((sp--)->Float)
File

thread.cpp


Popi Macro

Popi Macro
C++
#define Popi ((sp--)->Int)
File

thread.cpp


Popr Macro

Popr Macro
C++
#define Popr ((sp--)->Reference)
File

thread.cpp


PROF_TALLY Macro

PROF_TALLY Macro
C++
#define PROF_TALLY(var) do { if (m_ProfStackCount) { utimer_t nowTick = sysTimer::GetTicks(); u32 tix = u32(nowTick - lastTick); lastTick = nowTick; local##var[m_ProfStack[m_ProfStackCount-1]] += tix; for (u32 i=0; i<m_ProfStackCount; i++) m_ProfBuffer[m_ProfStack[i]].InclTicks += tix; } } while (0)
File

thread.cpp


PROF_TALLY_INSNS Macro

PROF_TALLY_INSNS Macro
C++
#define PROF_TALLY_INSNS(var) do { if (m_ProfStackCount) { u32 tix = u32(lastInsns - insnCount); lastInsns = insnCount; local##var[m_ProfStack[m_ProfStackCount-1]] += tix; for (u32 i=0; i<m_ProfStackCount; i++) m_ProfBuffer[m_ProfStack[i]].InclInsns += tix; } } while (0)
File

thread.cpp


Pushf Macro

Pushf Macro
C++
#define Pushf(v) ((++sp)->Float = (v))
File

thread.cpp


Pushi Macro

Pushi Macro
C++
#define Pushi(v) ((++sp)->Int = (v))
File

thread.cpp


Pushr Macro

Pushr Macro
C++
#define Pushr(v) ((++sp)->Reference = (v))
File

thread.cpp


SCR_RAGE_TRACK Macro

SCR_RAGE_TRACK Macro
C++
#define SCR_RAGE_TRACK(n)
File

wrapper.h


SCR_RAGE_TRACK2 Macro

SCR_RAGE_TRACK2 Macro
C++
#define SCR_RAGE_TRACK2(n,h) RAGE_TRACK(n)
File

wrapper.h


scrAssertf Macro

scrAssertf Macro
C++
#define scrAssertf(cond,fmt,...) RAGE_ASSERTF(Script,cond,fmt,##__VA_ARGS__)
File

scrchannel.h


scrCondLogf Macro

scrCondLogf Macro
C++
#define scrCondLogf(cond,severity,fmt,...) RAGE_CONDLOGF(cond,Script,severity,fmt,##__VA_ARGS__)
File

scrchannel.h


scrDebugf1 Macro

scrDebugf1 Macro
C++
#define scrDebugf1(fmt,...) RAGE_DEBUGF1(Script,fmt,##__VA_ARGS__)
File

scrchannel.h


scrDebugf2 Macro

scrDebugf2 Macro
C++
#define scrDebugf2(fmt,...) RAGE_DEBUGF2(Script,fmt,##__VA_ARGS__)
File

scrchannel.h


scrDebugf3 Macro

scrDebugf3 Macro
C++
#define scrDebugf3(fmt,...) RAGE_DEBUGF3(Script,fmt,##__VA_ARGS__)
File

scrchannel.h


scrDisplayf Macro

scrDisplayf Macro
C++
#define scrDisplayf(fmt,...) RAGE_DISPLAYF(Script,fmt,##__VA_ARGS__)
File

scrchannel.h


scrErrorf Macro

scrErrorf Macro
C++
#define scrErrorf(fmt,...) RAGE_ERRORF(Script,fmt,##__VA_ARGS__)
File

scrchannel.h


scrFatalf Macro

scrFatalf Macro
C++
#define scrFatalf(fmt,...) RAGE_FATALF(Script,fmt,##__VA_ARGS__)
File

scrchannel.h


SCRIPT_DEBUGGING Macro

SCRIPT_DEBUGGING Macro
C++
#define SCRIPT_DEBUGGING (__DEV)
File

thread.h


SCRIPT_DIRECT Macro

SCRIPT_DIRECT Macro
C++
#define SCRIPT_DIRECT 0
File

thread.h


SCRIPT_PROFILING Macro

SCRIPT_PROFILING Macro
C++
#define SCRIPT_PROFILING (__BANK && __OPTIMIZED)
File

thread.h


SCRIPT_VA_BEGIN Macro

SCRIPT_VA_BEGIN Macro
C++
#define SCRIPT_VA_BEGIN(x) const scrValue *SCRIPT_VA_ARG = info.Params; int SCRIPT_VA_COUNT = info.ParamCount - 1; unsigned __t = SCRIPT_VA_ARG++->Int
File

varargs.h


SCRIPT_VA_NEXT Macro

SCRIPT_VA_NEXT Macro

Call this when you're done processing the current parameter. This updates SCRIPT_VA_ARG, SCRIPT_VA_COUNT, and SCRIPT_VA_TYPE.

C++
#define SCRIPT_VA_NEXT (++SCRIPT_VA_ARG, __t >>= 2, --SCRIPT_VA_COUNT)
File

varargs.h


SCRIPT_VA_TYPE Macro

SCRIPT_VA_TYPE Macro

Call this to get the type of the current parameter, one of the scrValue::VA_... types.

C++
#define SCRIPT_VA_TYPE (__t & 3)
File

varargs.h


scrLogf Macro

scrLogf Macro
C++
#define scrLogf(severity,fmt,...) RAGE_LOGF(Script,fmt,##__VA_ARGS__)
File

scrchannel.h


scrVerifyf Macro

scrVerifyf Macro
C++
#define scrVerifyf(cond,fmt,...) RAGE_VERIFYF(Script,cond,fmt,##__VA_ARGS__)
File

scrchannel.h


scrWarningf Macro

scrWarningf Macro
C++
#define scrWarningf(fmt,...) RAGE_WARNINGF(Script,fmt,##__VA_ARGS__)
File

scrchannel.h


SELECT_DATATABLE Macro

SELECT_DATATABLE Macro
C++
#define SELECT_DATATABLE(be,le) be
File

csupport.h


SMALL_SCRIPT_CORE Macro

SMALL_SCRIPT_CORE Macro
C++
#define SMALL_SCRIPT_CORE (!SCRIPT_DEBUGGING && !SCRIPT_PROFILING)
File

thread.cpp


StoreSp Macro

StoreSp Macro

LOCAL_STACK

C++
#define StoreSp
File

thread.cpp


STRICT Macro

STRICT Macro
C++
#define STRICT
File

threadrun.cpp


SWAP_16 Macro

SWAP_16 Macro
C++
#define SWAP_16(a,b) b,a
File

threadrun.cpp


SWAP_32 Macro

SWAP_32 Macro
C++
#define SWAP_32(a,b,c,d) d,c,b,a
File

threadrun.cpp


SYS_TIMEBASE_GET Macro

SYS_TIMEBASE_GET Macro
C++
#define SYS_TIMEBASE_GET(x) x = timeGetTime()
File

threadrun.cpp


Topf Macro

Topf Macro
C++
#define Topf (sp->Float)
File

thread.cpp


Topi Macro

Topi Macro
C++
#define Topi (sp->Int)
File

thread.cpp


Topr Macro

Topr Macro
C++
#define Topr (sp->Reference)
File

thread.cpp


TPS Macro

TPS Macro
C++
#define TPS 1000.0f
File

threadrun.cpp


TRACE_NATIVES Macro

TRACE_NATIVES Macro
C++
#define TRACE_NATIVES (__DEV && !SCRIPT_DIRECT)
File

thread.h


VALIDATE_REFERENCES Macro

VALIDATE_REFERENCES Macro
C++
#define VALIDATE_REFERENCES (SCRIPT_DEBUGGING)
File

thread.cpp


Info Struct Constructors

Info Struct Constructors
Info Struct
Constructors
Constructor | Description
Info |


Constructors

Legend
Method


Info Struct Data Members

Info Struct Data Members
Info Struct
Data Members
Data Member | Description
Buffer |
BufferCount | Temp storage for managing copyin/copyout of Vector3 parameters
Command | The issuing command's id (i.e. function pointer)
Orig |
ParamCount | Parameter count
Params | Pointer to parameter values
ResultPtr | Return result, if applicable


Data Members

Legend
Data Member


Legend

Legend
Info Struct
Legend
Data Member
Method


Info Struct Members

Info Struct Members
Info Struct
Members
Data Members
Data Member | Description
Buffer |
BufferCount | Temp storage for managing copyin/copyout of Vector3 parameters
Command | The issuing command's id (i.e. function pointer)
Orig |
ParamCount | Parameter count
Params | Pointer to parameter values
ResultPtr | Return result, if applicable
Constructors
Constructor | Description
Info |


Members

Legend
Data Member
Method


Inheritance Hierarchy

Inheritance Hierarchy
Info Struct
Inheritance Hierarchy
Info


rage Namespace Classes

rage Namespace Classes
rage Namespace
Classes
Class | Description
scrSignature | This is a function signature for an "exported" function. It can represent functions with 1 return value and up to 9 arguments
scrThread | A scrThread encapsulates a virtual machine's state. We intentionally avoid pointers here so that load/save is simplified.


rage Namespace Enumerations

rage Namespace Enumerations
rage Namespace
Enumerations
Enumeration | Description
scrOpcode | Virtual machine opcode listing. When adding a rage_new opcode, remember to add it to the switch statement in scrThread::Run, the label array at the top of scrThread::Disassemble, and add appropriate logic to the disassembler itself.
scrProgramId |


rage Namespace Functions

rage Namespace Functions
rage Namespace
Functions
Function | Description
__attribute__ |
atou | hiding in device_common memory file handling code
atStringHash |
scrComputeHash |
scrValidateHash |


rage Namespace Macros

rage Namespace Macros
rage Namespace
Macros
Macro | Description
ADD_PC |
ATTR_COLD |
CHECK_PC |
DEBUG_TRACE |
DEC_CALLDEPTH |
MAX_CALLSTACK |
OPT_REGISTER_SECURE |
OPT_REGISTER_SECURE_BLOCKING |
OPT_REGISTER_SECURE_EXPORT |
SCR_MAKE_SIGNATURE | END
SCR_REGISTER_SECURE | END
SCR_REGISTER_SECURE_BLOCKING | END !__ASSERT
SCR_REGISTER_SECURE_EXPORT | END
SCR_REGISTER_UNSECURE | END
SCR_REGISTER_UNSECURE_BLOCKING | END
SCR_REGISTER_UNSECURE_EXPORT | END
SCRHASH |
SET_PC |
STREAMABLE_PROGRAMS |
THREADED_INTERPRETER | Both gcc and snc support computed goto's.
VALIDATE_PC | Pick a reasonable value that fits in a PPC compare immediate insn.
VALIDATE_PTR |


rage Namespace Namespaces

rage Namespace Namespaces
rage Namespace
Namespaces
Namespace | Description
rageScriptDebug |
scrWrapper |


rage Namespace Structs

rage Namespace Structs
rage Namespace
Structs
Struct | Description
scrTimingHelper |
scrVector |
scrProgram |
scrTrace |
Vector3 |


rage Namespace Templates

rage Namespace Templates
rage Namespace
Templates
Template | Description
scrHash |


rage Namespace Types

rage Namespace Types
rage Namespace
Types
Type | Description
Cmd |
s16 |
s32 |
scrTextLabel | this does NOT match TEXT_LABEL - internal use only!
scrTextLabel15 |
scrTextLabel23 |
scrTextLabel31 |
scrTextLabel63 |
scrTextLabel7 | use these for interfacing scripts with game code
scrThreadId |
u16 |
u32 |
u8 |


rage Namespace Unions

rage Namespace Unions
rage Namespace
Unions
Union | Description
scrValue |


rage Namespace Variables

rage Namespace Variables
rage Namespace
Variables
Variable | Description
g_PrintStackTraceFunc |
g_scrValueTypeNames |
gBaseScriptDirectory | might want to set this if you're going to set gScriptProject
gScriptProject |
s_TraceBuf |
s_TraceMax |
s_TraceNext |
scrMaxTextLabelSize | Must be a multiple of sizeof(scrValue).
scrPageMask |
scrPageShift |
scrPageSize |


rage::rageScriptDebug Namespace Functions

rage::rageScriptDebug Namespace Functions
rage::rageScriptDebug Namespace
Functions
Function | Description
Init | Initializes the script output functions
ReBindDefaults | rebinds the default script output functions.


rage::rageScriptDebug Namespace Variables

rage::rageScriptDebug Namespace Variables
rage::rageScriptDebug Namespace
Variables
Variable | Description
float val) |
gScriptPrintFloat |
gScriptPrintInt |
gScriptPrintNewLine |
gScriptPrintString |
gScriptPrintVector3 |
int val) |
prec |
str |
val |
width |


scrHash Template Constructors

scrHash Template Constructors
scrHash Template
Constructors
Constructor | Description
scrHash |


scrHash Template Destructors

scrHash Template Destructors
scrHash Template
Destructors
Destructor | Description
~scrHash |


Destructors

Legend
Method


Legend

Legend
scrHash Template
Legend
Method


scrHash Template Members

scrHash Template Members
scrHash Template
Members
Structs
Struct | Description
Slot |
Constructors
Constructor | Description
scrHash |
Destructors
Destructor | Description
~scrHash |
Methods
Method | Description
Delete |
Init |
Insert |
Kill |
Lookup |
Remove |


Members

Legend
Method


scrHash Template Methods

scrHash Template Methods
scrHash Template
Methods
Method | Description
Delete |
Init |
Insert |
Kill |
Lookup |
Remove |


Methods

Legend
Method


scrHash Template Structs

scrHash Template Structs
scrHash Template
Structs
Struct | Description
Slot |


Inheritance Hierarchy

Inheritance Hierarchy
scrHash Template
Inheritance Hierarchy
scrHash


Body Source

Body Source
rage::scrProgram::AllowMismatchedGlobals@bool


Body Source

Body Source
rage::scrProgram::GetArgStructSize@const


Body Source

Body Source
rage::scrProgram::GetProgramId@const


scrSignature Class Constructors

scrSignature Class Constructors
scrSignature Class
Constructors
Constructor | Description
scrSignature |


scrSignature Class Data Members

scrSignature Class Data Members
scrSignature Class
Data Members
Data Member | Description
m_Storage |


Data Members

Legend
protected
Data Member


Legend

Legend
scrSignature Class
Legend
protected
Data Member
Method


scrSignature Class Members

scrSignature Class Members
scrSignature Class
Members
Data Members
Data Member | Description
m_Storage |
Constructors
Constructor | Description
scrSignature |
Methods
Method | Description
CountNumArgs | Counts the number of arguments defined in this signature
GetArgumentType | Returns the type for argument N, or UNKNOWN if there is no argument N.
GetReturnType | Returns the return type of this signature, or UNKNOWN if there is no return value
GetState |
IsValid | Is this a valid signature?
PrettyPrint | Fills out outBuf with a rage-script style function signature


Members

Legend
protected
Data Member
Method


scrSignature Class Methods

scrSignature Class Methods
scrSignature Class
Methods
Method | Description
CountNumArgs | Counts the number of arguments defined in this signature
GetArgumentType | Returns the type for argument N, or UNKNOWN if there is no argument N.
GetReturnType | Returns the return type of this signature, or UNKNOWN if there is no return value
GetState |
IsValid | Is this a valid signature?
PrettyPrint | Fills out outBuf with a rage-script style function signature


Methods

Legend
Method
protected


Inheritance Hierarchy

Inheritance Hierarchy
scrSignature Class
Inheritance Hierarchy
scrSignature


scrThread Class Data Members

scrThread Class Data Members
scrThread Class
Data Members
Data Member | Description
MAX_CALLSTACK |
sm_InNativeFunction |


Legend

Legend
scrThread Class
Legend
Data Member
Method


scrThread Class Members

scrThread Class Members
scrThread Class
Members
Data Members
Data Member | Description
MAX_CALLSTACK |
sm_InNativeFunction |
Structs
Struct | Description
Serialized | Structure containing all thread state that is serialized. No pointers allowed!
Methods
Method | Description
Run |
SetIsInNativeFunction |
Nested Types
Nested Type | Description
sizecheck |


scrThread Class Methods

scrThread Class Methods
scrThread Class
Methods
Method | Description
Run |
SetIsInNativeFunction |


scrThread Class Nested Types

scrThread Class Nested Types
scrThread Class
Nested Types
Nested Type | Description
sizecheck |


scrThread Class Structs

scrThread Class Structs
scrThread Class
Structs
Struct | Description
Serialized | Structure containing all thread state that is serialized. No pointers allowed!


Inheritance Hierarchy

Inheritance Hierarchy
scrThread Class
Inheritance Hierarchy
scrThread


Body Source

Body Source
rage::scrThread::CancelWait


Body Source

Body Source
rage::scrThread::GetAbortReason@const


Body Source

Body Source
rage::scrThread::GetArgs@const


Body Source

Body Source
rage::scrThread::GetArgsSize@const


Body Source

Body Source
rage::scrThread::GetGlobalVariableCount


Body Source

Body Source
rage::scrThread::GetGlobalVariableType@int


Body Source

Body Source
rage::scrThread::GetInstructionsUsed@const


Body Source

Body Source
rage::scrThread::GetProgram@const


Body Source

Body Source
rage::scrThread::GetScriptName


Body Source

Body Source
rage::scrThread::GetSerializedState@const


Body Source

Body Source
rage::scrThread::GetSerializedState


Body Source

Body Source
rage::scrThread::GetSerializedStateSize@const


Body Source

Body Source
rage::scrThread::GetStack@const


Body Source

Body Source
rage::scrThread::GetStackSize@const


Body Source

Body Source
rage::scrThread::GetState@const


Body Source

Body Source
rage::scrThread::GetThreadId@const


Body Source

Body Source
rage::scrThread::GetTimeStep


Body Source

Body Source
rage::scrThread::GetTimeStepUnwarped


Body Source

Body Source
rage::scrThread::GetUpdateTime@const


Body Source

Body Source
rage::scrThread::KillThread@scrThread*


Body Source

Body Source
rage::scrThread::ProfEntry::CompareByInclTime@const ProfEntry &@const ProfEntry &


Body Source

Body Source
rage::scrThread::SetDebugBreakpointCallback@ThreadBreakpointFunc


Body Source

Body Source
rage::scrThread::SetDebugFaultHandler@FaultHandlerFunc


Body Source

Body Source
rage::scrThread::SetIsInNativeFunction@bool NOTFINAL_ONLY set


Body Source

Body Source
rage::scrThread::SetIsPaused@bool


Body Source

Body Source
rage::scrThread::SetThreadBlockState@bool


Body Source

Body Source
rage::scrThread::SetTimeStep@float


Body Source

Body Source
rage::scrThread::SetTimeStepUnwarped@float


Body Source

Body Source
rage::scrThread::SetUpdateTimersWhenPaused@bool


Body Source

Body Source
rage::scrThread::TLS@int


Body Source

Body Source
rage::scrThread::TLSMaxCount@const


scrTimingHelper Struct Constructors

scrTimingHelper Struct Constructors
scrTimingHelper Struct
Constructors
Constructor | Description
scrTimingHelper |


scrTimingHelper Struct Data Members

scrTimingHelper Struct Data Members
scrTimingHelper Struct
Data Members
Data Member | Description
Hash |
Now |


scrTimingHelper Struct Destructors

scrTimingHelper Struct Destructors
scrTimingHelper Struct
Destructors
Destructor | Description
~scrTimingHelper |


Legend

Legend
scrTimingHelper Struct
Legend
Data Member
Method


scrTimingHelper Struct Members

scrTimingHelper Struct Members
scrTimingHelper Struct
Members
Data Members
Data Member | Description
Hash |
Now |
Constructors
Constructor | Description
scrTimingHelper |
Destructors
Destructor | Description
~scrTimingHelper |


Inheritance Hierarchy

Inheritance Hierarchy
scrTimingHelper Struct
Inheritance Hierarchy
scrTimingHelper


scrVector Struct Constructors

scrVector Struct Constructors
scrVector Struct
Constructors
Constructor | Description
scrVector |


scrVector Struct Data Members

scrVector Struct Data Members
scrVector Struct
Data Members
Data Member | Description
x |
y |
z |


Legend

Legend
scrVector Struct
Legend
Data Member
Method


scrVector Struct Members

scrVector Struct Members
scrVector Struct
Members
Data Members
Data Member | Description
x |
y |
z |
Constructors
Constructor | Description
scrVector |
Operators
Operator | Description
= |
Vec3V |
Vector3 |
Vector3::Vector3Param |


scrVector Struct Operators

scrVector Struct Operators
scrVector Struct
Operators
Operator | Description
= |
Vec3V |
Vector3 |
Vector3::Vector3Param |


Operators

Legend
Method


Inheritance Hierarchy

Inheritance Hierarchy
scrVector Struct
Inheritance Hierarchy
scrVector


rage::scrWrapper Namespace Macros

rage::scrWrapper Namespace Macros
rage::scrWrapper Namespace
Macros
Macro | Description
AssertParamMatch |
AssertParamMatchN |
SCR_DEFINE_NEW_PARAM_TYPE | END
SCR_DEFINE_NEW_POINTER_PARAM_AND_RET | END
SCR_DEFINE_TLS_TYPE_VALUE | END
SCRIPTNAME |


rage::scrWrapper Namespace Structs

rage::scrWrapper Namespace Structs
rage::scrWrapper Namespace
Structs
Struct | Description
Arg |
Arg<bool> |
Arg<const char*> |
Arg<const scrVector&> |
Arg<const Vector3&> |
Arg<float&> |
Arg<float> |
Arg<int&> |
Arg<int> |
Arg<scrVector> |
Arg<Vector3&> |
Arg<Vector3> |
ArgType<bool> |
ArgType<char*> |
ArgType<const char*> |
ArgType<float> |
ArgType<int> |
ArgType<UnspecifiedArg> |
ArgType<void> |
SignatureGenerator<_RT (*)(_Arg0, _Arg1, _Arg2, _Arg3, _Arg4, _Arg5, _Arg6, _Arg7, _Arg8)> |
UnspecifiedArg |


Legend

Legend
Arg Struct
Legend
Method


Arg Struct Members

Arg Struct Members
Arg Struct
Members
Methods
Method | Description
Value |


Arg Struct Methods

Arg Struct Methods
Arg Struct
Methods
Method | Description
Value |


Inheritance Hierarchy

Inheritance Hierarchy
Arg Struct
Inheritance Hierarchy
Arg


Legend

Legend
Arg<bool> Struct
Legend
Method


Arg<bool> Struct Members

Arg<bool> Struct Members
Arg<bool> Struct
Members
Methods
Method | Description
Value |


Arg<bool> Struct Methods

Arg<bool> Struct Methods
Arg<bool> Struct
Methods
Method | Description
Value |


Inheritance Hierarchy

Inheritance Hierarchy
Arg<bool> Struct
Inheritance Hierarchy
Arg<bool>


Legend

Legend
Arg<const char*> Struct
Legend
Method


Arg<const char*> Struct Members

Arg<const char*> Struct Members
Arg<const char*> Struct
Members
Methods
Method | Description
Value |


Arg<const char*> Struct Methods

Arg<const char*> Struct Methods
Arg<const char*> Struct
Methods
Method | Description
Value |


Inheritance Hierarchy

Inheritance Hierarchy
Arg<const char*> Struct
Inheritance Hierarchy
Arg<const char*>


Legend

Legend
Arg<const scrVector&> Struct
Legend
Method


Arg<const scrVector&> Struct Members

Arg<const scrVector&> Struct Members
Arg<const scrVector&> Struct
Members
Methods
Method | Description
Value |


Arg<const scrVector&> Struct Methods

Arg<const scrVector&> Struct Methods
Arg<const scrVector&> Struct
Methods
Method | Description
Value |


Inheritance Hierarchy

Inheritance Hierarchy
Arg<const scrVector&> Struct
Inheritance Hierarchy
Arg<const scrVector&>


Legend

Legend
Arg<const Vector3&> Struct
Legend
Method


Arg<const Vector3&> Struct Members

Arg<const Vector3&> Struct Members
Arg<const Vector3&> Struct
Members
Methods
Method | Description
Value |


Arg<const Vector3&> Struct Methods

Arg<const Vector3&> Struct Methods
Arg<const Vector3&> Struct
Methods
Method | Description
Value |


Inheritance Hierarchy

Inheritance Hierarchy
Arg<const Vector3&> Struct
Inheritance Hierarchy
Arg<const Vector3&>


Legend

Legend
Arg<float> Struct
Legend
Method


Arg<float> Struct Members

Arg<float> Struct Members
Arg<float> Struct
Members
Methods
Method | Description
Value |


Arg<float> Struct Methods

Arg<float> Struct Methods
Arg<float> Struct
Methods
Method | Description
Value |


Inheritance Hierarchy

Inheritance Hierarchy
Arg<float> Struct
Inheritance Hierarchy
Arg<float>


Legend

Legend
Arg<float&> Struct
Legend
Method


Arg<float&> Struct Members

Arg<float&> Struct Members
Arg<float&> Struct
Members
Methods
Method | Description
Value |


Arg<float&> Struct Methods

Arg<float&> Struct Methods
Arg<float&> Struct
Methods
Method | Description
Value |


Inheritance Hierarchy

Inheritance Hierarchy
Arg<float&> Struct
Inheritance Hierarchy
Arg<float&>


Legend

Legend
Arg<int> Struct
Legend
Method


Arg<int> Struct Members

Arg<int> Struct Members
Arg<int> Struct
Members
Methods
Method | Description
Value |


Arg<int> Struct Methods

Arg<int> Struct Methods
Arg<int> Struct
Methods
Method | Description
Value |


Inheritance Hierarchy

Inheritance Hierarchy
Arg<int> Struct
Inheritance Hierarchy
Arg<int>


Legend

Legend
Arg<int&> Struct
Legend
Method


Arg<int&> Struct Members

Arg<int&> Struct Members
Arg<int&> Struct
Members
Methods
Method | Description
Value |


Arg<int&> Struct Methods

Arg<int&> Struct Methods
Arg<int&> Struct
Methods
Method | Description
Value |


Inheritance Hierarchy

Inheritance Hierarchy
Arg<int&> Struct
Inheritance Hierarchy
Arg<int&>


Legend

Legend
Arg<scrVector> Struct
Legend
Method


Arg<scrVector> Struct Members

Arg<scrVector> Struct Members
Arg<scrVector> Struct
Members
Methods
Method | Description
Value |


Arg<scrVector> Struct Methods

Arg<scrVector> Struct Methods
Arg<scrVector> Struct
Methods
Method | Description
Value |


Inheritance Hierarchy

Inheritance Hierarchy
Arg<scrVector> Struct
Inheritance Hierarchy
Arg<scrVector>


Legend

Legend
Arg<Vector3> Struct
Legend
Method


Arg<Vector3> Struct Members

Arg<Vector3> Struct Members
Arg<Vector3> Struct
Members
Methods
Method | Description
Value |


Arg<Vector3> Struct Methods

Arg<Vector3> Struct Methods
Arg<Vector3> Struct
Methods
Method | Description
Value |


Inheritance Hierarchy

Inheritance Hierarchy
Arg<Vector3> Struct
Inheritance Hierarchy
Arg<Vector3>


Legend

Legend
Arg<Vector3&> Struct
Legend
Method


Arg<Vector3&> Struct Members

Arg<Vector3&> Struct Members
Arg<Vector3&> Struct
Members
Methods
Method | Description
Value |


Arg<Vector3&> Struct Methods

Arg<Vector3&> Struct Methods
Arg<Vector3&> Struct
Methods
Method | Description
Value |


Inheritance Hierarchy

Inheritance Hierarchy
Arg<Vector3&> Struct
Inheritance Hierarchy
Arg<Vector3&>


rageBankScriptBindings Namespace Functions

rageBankScriptBindings Namespace Functions
rageBankScriptBindings Namespace
Functions
Function | Description
Register_BankScript |


rageBankScriptBindings Namespace Variables

rageBankScriptBindings Namespace Variables
rageBankScriptBindings Namespace
Variables
Variable | Description
s_tempWidgetAngleVectorValue |
s_tempWidgetStringValue |
s_tempWidgetVector2Value |
s_tempWidgetVector3Value |
s_tempWidgetVector4Value |


scrArray Struct Constructors

scrArray Struct Constructors
scrArray Struct
Constructors
Constructor | Description
scrArray |
scrArrayBase |


scrArray Struct Data Members

scrArray Struct Data Members
scrArray Struct
Data Members
Data Member | Description
Count | _count
Elements |


Legend

Legend
scrArray Struct
Legend
Data Member
Method


scrArray Struct Members

scrArray Struct Members
scrArray Struct
Members
Data Members
Data Member | Description
Count | _count
Elements |
Constructors
Constructor | Description
scrArray |
scrArrayBase |
Operators
Operator | Description
[] |
[] |
Nested Types
Nested Type | Description
ElementBlock |


scrArray Struct Nested Types

scrArray Struct Nested Types
scrArray Struct
Nested Types
Nested Type | Description
ElementBlock |


scrArray Struct Operators

scrArray Struct Operators
scrArray Struct
Operators
Operator | Description
[] |
[] |


Inheritance Hierarchy

Inheritance Hierarchy
scrArray Struct
Inheritance Hierarchy
scrArrayBase
    scrArray


scrArrayBase Struct Constructors

scrArrayBase Struct Constructors
scrArrayBase Struct
Constructors
Constructor | Description
scrArrayBase |


scrArrayBase Struct Data Members

scrArrayBase Struct Data Members
scrArrayBase Struct
Data Members
Data Member | Description
Count | _count


Legend

Legend
scrArrayBase Struct
Legend
Data Member
Method


scrArrayBase Struct Members

scrArrayBase Struct Members
scrArrayBase Struct
Members
Data Members
Data Member | Description
Count | _count
Constructors
Constructor | Description
scrArrayBase |
Operators
Operator | Description
[] |


scrArrayBase Struct Operators

scrArrayBase Struct Operators
scrArrayBase Struct
Operators
Operator | Description
[] |


Inheritance Hierarchy

Inheritance Hierarchy
scrArrayBase Struct
Inheritance Hierarchy
scrArrayBase
    scrArray


scriptNameSetter Struct Constructors

scriptNameSetter Struct Constructors
scriptNameSetter Struct
Constructors
Constructor | Description
scriptNameSetter |


scriptNameSetter Struct Data Members

scriptNameSetter Struct Data Members
scriptNameSetter Struct
Data Members
Data Member | Description
m_Prev |


scriptNameSetter Struct Destructors

scriptNameSetter Struct Destructors
scriptNameSetter Struct
Destructors
Destructor | Description
~scriptNameSetter |


Legend

Legend
scriptNameSetter Struct
Legend
Data Member
Method


scriptNameSetter Struct Members

scriptNameSetter Struct Members
scriptNameSetter Struct
Members
Data Members
Data Member | Description
m_Prev |
Constructors
Constructor | Description
scriptNameSetter |
Destructors
Destructor | Description
~scriptNameSetter |


Inheritance Hierarchy

Inheritance Hierarchy
scriptNameSetter Struct
Inheritance Hierarchy
scriptNameSetter


Legend

Legend
scrProgramRegistry Class
Legend
Method


scrProgramRegistry Class Members

scrProgramRegistry Class Members
scrProgramRegistry Class
Members
Methods
Method | Description
Insert |
Lookup |
Remove |


scrProgramRegistry Class Methods

scrProgramRegistry Class Methods
scrProgramRegistry Class
Methods
Method | Description
Insert |
Lookup |
Remove |


Inheritance Hierarchy

Inheritance Hierarchy
scrProgramRegistry Class
Inheritance Hierarchy
scrProgramRegistry


scrTextLabelN Struct Constructors

scrTextLabelN Struct Constructors
scrTextLabelN Struct
Constructors
Constructor | Description
scrTextLabelN |


scrTextLabelN Struct Data Members

scrTextLabelN Struct Data Members
scrTextLabelN Struct
Data Members
Data Member | Description
text |


Legend

Legend
scrTextLabelN Struct
Legend
Data Member
Method


scrTextLabelN Struct Members

scrTextLabelN Struct Members
scrTextLabelN Struct
Members
Data Members
Data Member | Description
text |
Constructors
Constructor | Description
scrTextLabelN |
Methods
Method | Description
append_int |
append_string |
Operators
Operator | Description
= |
const char* |


scrTextLabelN Struct Methods

scrTextLabelN Struct Methods
scrTextLabelN Struct
Methods
Method | Description
append_int |
append_string |


scrTextLabelN Struct Operators

scrTextLabelN Struct Operators
scrTextLabelN Struct
Operators
Operator | Description
= |
const char* |


Inheritance Hierarchy

Inheritance Hierarchy
scrTextLabelN Struct
Inheritance Hierarchy
scrTextLabelN


scrVector Struct Members

scrVector Struct Members
scrVector Struct
Members
Data Members
Data Member | Description
x |
y |
z |
Constructors
Constructor | Description
scrVector |
Operators
Operator | Description
- |
* |
+ |


scrVector Struct Operators

scrVector Struct Operators
scrVector Struct
Operators
Operator | Description
- |
* |
+ |


Topics

Topics
User Manual
Topics
Topic
Description
Comments
You can do comments to end-of-line with //. You can bracket multi-line comments in /* and */.
Variable Declarations
Note that our lexer is not case-sensitive. You can use GET_ACTOR_POSITION or get_actor_position interchangeably.
All variable declarations must start with a typename. The common typenames are:
Constant Declarations
You can introduce new constants into the language via the CONST_INT and CONST_FLOAT directives. CONST_INT variables in particular can be used anywhere the compiler wants a constant integer, even in CASE labels and array size declarations. You cannot declare more than one constant at a time.
Preprocessor
There is a very crude preprocessor in the script compiler. It understands #ifdef/#endif and #ifndef/#endif blocks. They may not currently be nested, and #else is not supported either. They check if the symbol (of any type) is defined. The intended use is to allow a crude form of inheritance; you can place a standard event loop in a header file, and you can put default implementations of functions that the user may have overridden (explicitly defined themselves prior to inclusion) within #ifndef blocks.
Advanced Variable Declarations
Some commands declare their own special handle types (like GUID). You can use these types to declare variables; however, you can only compare and assign them to variables of the exact same handle type. As a special case, the special variable NULL is compatible with all handle types, and is also the default value of any handle variable not explicitly initialized to something in particular.
The special handle types are declared via the NATIVE keyword, which also supports a very simple form of polymorphism.
Special Functions and Commands
The TIMERA and TIMERB variables are special INT functions available to every script. They are incremented by the current frame step whenever the script is running; for backward compatibility, they are measured in milliseconds. You can change their values directly with the SETTIMERA and SETTIMERB commands.
The TIMESTEP variable is a special FLOAT function available to all scripts; it contains the last time step (typically one or two vertical blanking intervals). The TIMESTEP variable is used by the special +@ and -@ operators which automatically multiply the right-hand side by the frame time.
The WAIT command accepts a single int parameter which is the number of milliseconds to block the currently running script. WAIT 0 will always block the script for the remainder of the current game frame.
Currently the scripting system executes 1000 instructions per frame. If your script doesnt pause then it will run round and round its main loop until these are all used up (so stopping any other scripts running until the next frame).
Text Labels
A TEXT_LABEL is a mutable string buffer which can hold up to 15 characters. Its intended use is for dynamically constructing localization label names or filenames. A TEXT_LABEL can be passed into any command that accepts a string. TEXT_LABEL variables are initialized to an empty string by default.
You can also do very limited assignments and append operations to TEXT_LABEL objects. You can assign or append strings or text labels or integer expressions directly to text labels.
Enumerations
You can introduce new enumerants into the language (as typenames):
Flow Control
Basic decision making is done with the IF statement.
Procedures and Functions
The meat of the scripting language is the suite of commands that the game supplies to the designers. These commands are broken down into procedures and functions. The only difference is that procedures don't return a value and therefore cannot be used in expressions; functions do return a value and can be used in expressions or statements.
All commands require their parameter list to be enclosed in parentheses, even if they don't take any parameters. This is to remind you that you're making a function call, because otherwise the syntax is indistiguishable from normal variable access.
Expressions
The usual arithmetic operators work: +, -, *, /. % is used for modulo.
Multiple conditions can be tested at once by using the NOT, AND, and OR operators. You can mix and match them at will, but use parentheses for clarity. ANDALSO and ORELSE are available as boolean short-circuit operators; ANDALSO does not evaluate its right-hand parameter if the left-hand parameter is already false; ORELSE does not evaluate its right-hand parameter if the left-hand parameter is already true.
Check for equality with =, and inequality with != or <>.
You can use ! for a synonym for the NOT keyword.
Vectors can appear in some arithmetic expressions: +, -, *, and /, and unary negation. If one side of a binary expression is a VECTOR, and the other side is a FLOAT, the float is implicitly converted to a VECTOR through replicating the value into x, y, and z. This allows multiplication and division to work like you'd expect, although it will lead to surprising behavior for addition and subtraction!
The COUNT_OF operator can be used on enumerant types and array variables. The SIZE_OF operator can be used on any typename or variable to return the size of the object in virtual machine words (currently four bytes per word).
The ternary (conditional) operator from C/C++ is available as well. The first parameter must be of type BOOL, and the second and third parameters must have identical type (no type promotion is currently performed other than basic int-to-float promotion if necessary).
Passing Parameters To Scripts
It is possible to pass arbitrary data to a script when starting it up. If you need more than a single parameter, you must place them all into a single STRUCT. For example:
Operator Precedence
This is mostly for people with Computer Science degrees who are curious.
All expressions are left-associative except for the unary operators, which are right-associative. From highest precedence to lowest: (all operators on the same line have equal precedence)
Why a Custom Language?
One obvious question is why do we use a custom language instead of an off-the-shelf scripting language. Lua is tiny but requires garbage collection and has untyped variables. Python is just too big. The RAGE scripting language is heavily based upon the time-proven Rockstar North scripting language. It is strongly typed, and requires no runtime memory allocation for the virtual machine itself once a thread is allocated. It is a simple, imperative language that is easy to understand and extend. The virtual machine itself is tiny, with the main loop being less than 300 lines of code.


Contents

Contents
rage::scrProgram::AllowMismatchedGlobals@bool
rage::scrProgram::DefaultGetFullFilename@char *@int@const char *@const char *
rage::scrProgram::GetArgStructSize@const
rage::scrProgram::GetFullFilename
rage::scrProgram::GetProgramId@const
rage::scrProgram::Init@const char *@const u8*@int@const u32 *@int@const scrValue *@int@const scrValue *@int@const char *@int@int
rage::scrProgram::Load@const char *
rage::scrProgram::Load@const char *@const char *
rage::scrProgram::ResetGlobals@u32@u32
rage::scrProgram::SetGlobals
rage::scrProgram::SnapshotGlobals@u32@u32
rage::scrProgram::Validate@scrProgramId
rage::scrThread::~scrThread
rage::scrThread::AddThreadStack@int@int
rage::scrThread::AllocateThreads@int@int
rage::scrThread::AppFaultHandler
rage::scrThread::CancelWait
rage::scrThread::Continue
rage::scrThread::CreateThread@const char *@const void *@int@int
rage::scrThread::CreateThread@scrProgramId@const void *@int@int
rage::scrThread::Disassemble@char *@scrProgramId@int
rage::scrThread::DisplayProfileData@void *displayfbool severe,const char*,...
rage::scrThread::DumpState@void *printerconst char *fmt,...
rage::scrThread::enum@1
rage::scrThread::enum@2
rage::scrThread::ExecuteNetworkCommand@u32@int@scrValue *
rage::scrThread::FaultHandlerFunc
rage::scrThread::GetAbortReason@const
rage::scrThread::GetActiveThread
rage::scrThread::GetArgs@const
rage::scrThread::GetArgsSize@const
rage::scrThread::GetCmdFromName@const char *
rage::scrThread::GetGlobal@int
rage::scrThread::GetGlobalVariableAddress@int
rage::scrThread::GetGlobalVariableCount
rage::scrThread::GetGlobalVariableType@int
rage::scrThread::GetInstructionsUsed@const
rage::scrThread::GetLocal@int
rage::scrThread::GetProgram@const
rage::scrThread::GetProgramCounter@int@const
rage::scrThread::GetScriptName
rage::scrThread::GetSerializedState
rage::scrThread::GetSerializedState@const
rage::scrThread::GetSerializedStateSize@const
rage::scrThread::GetStack@const
rage::scrThread::GetStackSize@const
rage::scrThread::GetState@const
rage::scrThread::GetStatic@int
rage::scrThread::GetThread@scrThreadId
rage::scrThread::GetThreadByIndex@int
rage::scrThread::GetThreadCount
rage::scrThread::GetThreadId@const
rage::scrThread::GetTimeStep
rage::scrThread::GetTimeStepUnwarped
rage::scrThread::GetUpdateTime@const
rage::scrThread::Global::BasicType
rage::scrThread::Global::Hash
rage::scrThread::Global::Offset
rage::scrThread::HasBreakpoint@int@bool *
rage::scrThread::InitClass@int
rage::scrThread::IsValidGlobal@scrValue *
rage::scrThread::IsValidReference@scrValue *
rage::scrThread::IsValidStatic@scrValue *
rage::scrThread::Kill
rage::scrThread::KillAllThreads
rage::scrThread::KillThread@scrThread*
rage::scrThread::KillThread@scrThreadId
rage::scrThread::LoadGlobalVariableInfo@const char *
rage::scrThread::LookupGlobalVariable@const char *
rage::scrThread::m_ProfTotals
rage::scrThread::OriginalPrePrintStackTrace
rage::scrThread::Pause
rage::scrThread::PrePrintStackTrace
rage::scrThread::ProfEntry::CompareByInclTime@const ProfEntry &@const ProfEntry &
rage::scrThread::RegisterBuiltinCommands
rage::scrThread::Reset@scrProgramId@const void *@int
rage::scrThread::Run@int
rage::scrThread::scrThread
rage::scrThread::SetBreakpoint@int@bool@bool
rage::scrThread::SetDebugBreakpointCallback@ThreadBreakpointFunc
rage::scrThread::SetDebugFaultHandler@FaultHandlerFunc
rage::scrThread::SetIsInNativeFunction@bool NOTFINAL_ONLY set
rage::scrThread::SetIsPaused@bool
rage::scrThread::SetStepRegion@int@int
rage::scrThread::SetThreadBlockState@bool
rage::scrThread::SetTimeStep@float
rage::scrThread::SetTimeStepUnwarped@float
rage::scrThread::SetUpdateTimersWhenPaused@bool
rage::scrThread::ShutdownClass
rage::scrThread::sm_IsPaused
rage::scrThread::sm_ProfileSortMethod
rage::scrThread::sm_ProfileSortMethodStrings
rage::scrThread::sm_ThreadId
rage::scrThread::sm_TimeStep
rage::scrThread::sm_TimeStepUnwarped
rage::scrThread::sm_UpdateTimersWhenPaused
rage::scrThread::StartNewThreadOverride
rage::scrThread::State
rage::scrThread::ThreadBreakpointFunc
rage::scrThread::Throw@int
rage::scrThread::TLS@int
rage::scrThread::TLSMaxCount@const
rage::scrThread::Update@int
rage::scrThread::UpdateAll@int
rage::scrThread::Validate@scrProgram &
rage::scrValue::ValueType
User Manual
Comments
Variable Declarations
Constant Declarations
Preprocessor
Advanced Variable Declarations
Special Functions and Commands
Text Labels
Enumerations
Flow Control
Procedures and Functions
Expressions
Passing Parameters To Scripts
Operator Precedence
Why a Custom Language?
Programming Manual
Symbol Reference
rage Namespace
rageScriptDebug Namespace
Init Function
ReBindDefaults Function
float val) Variable
gScriptPrintFloat Variable
gScriptPrintInt Variable
gScriptPrintNewLine Variable
gScriptPrintString Variable
gScriptPrintVector3 Variable
int val) Variable
prec Variable
str Variable
val Variable
width Variable
scrWrapper Namespace
Arg Struct
Methods
Value Method
Arg<bool> Struct
Methods
Value Method
Arg<const char*> Struct
Methods
Value Method
Arg<const scrVector&> Struct
Methods
Value Method
Arg<const Vector3&> Struct
Methods
Value Method
Arg<float&> Struct
Methods
Value Method
Arg<float> Struct
Methods
Value Method
Arg<int&> Struct
Methods
Value Method
Arg<int> Struct
Methods
Value Method
Arg<scrVector> Struct
Methods
Value Method
Arg<Vector3&> Struct
Methods
Value Method
Arg<Vector3> Struct
Methods
Value Method
ArgType<bool> Struct
ArgType<char*> Struct
ArgType<const char*> Struct
ArgType<float> Struct
ArgType<int> Struct
ArgType<UnspecifiedArg> Struct
ArgType<void> Struct
SignatureGenerator<_RT (*)(_Arg0, _Arg1, _Arg2, _Arg3, _Arg4, _Arg5, _Arg6, _Arg7, _Arg8)> Struct
UnspecifiedArg Struct
AssertParamMatch Macro
AssertParamMatchN Macro
SCR_DEFINE_NEW_PARAM_TYPE Macro
SCR_DEFINE_NEW_POINTER_PARAM_AND_RET Macro
SCR_DEFINE_TLS_TYPE_VALUE Macro
SCRIPTNAME Macro
scrHash Template
Structs
Slot Struct
Constructors
scrHash Constructor
Destructors
~scrHash Destructor
Methods
Delete Method
Init Method
Insert Method
Kill Method
Lookup Method
Remove Method
scrSignature Class
Data Members
m_Storage Data Member
Constructors
scrSignature
scrSignature Constructor ()
scrSignature Constructor (scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType, scrValue::ValueType)
scrSignature Constructor (u32)
Methods
CountNumArgs Method
GetArgumentType Method
GetReturnType Method
GetState Method
IsValid Method
PrettyPrint Method
scrThread Class
Data Members
MAX_CALLSTACK Data Member
sm_InNativeFunction Data Member
Structs
Serialized Struct
Methods
Run Method
SetIsInNativeFunction Method
Nested Types
sizecheck Nested Type
scrTimingHelper Struct
Data Members
Hash Data Member
Now Data Member
Constructors
scrTimingHelper Constructor
Destructors
~scrTimingHelper Destructor
scrVector Struct
Data Members
x Data Member
y Data Member
z Data Member
Constructors
scrVector
scrVector Constructor ()
scrVector Constructor (const Vec3V &)
scrVector Constructor (const Vector3 &)
scrVector Constructor (float, float, float)
Operators
=
= Operator (const Vec3V&)
= Operator (const Vector3&)
Vec3V Operator
Vector3 Operator
Vector3::Vector3Param Operator
scrOpcode Enumeration
scrProgram Struct
scrProgramId Enumeration
scrTrace Struct
scrValue Union
Vector3 Struct
__attribute__ Function
atou Function
atStringHash Function
scrComputeHash Function
scrValidateHash Function
Cmd Type
s16 Type
s32 Type
scrTextLabel Type
scrTextLabel15 Type
scrTextLabel23 Type
scrTextLabel31 Type
scrTextLabel63 Type
scrTextLabel7 Type
scrThreadId Type
u16 Type
u32 Type
u8 Type
g_PrintStackTraceFunc Variable
g_scrValueTypeNames Variable
gBaseScriptDirectory Variable
gScriptProject Variable
s_TraceBuf Variable
s_TraceMax Variable
s_TraceNext Variable
scrMaxTextLabelSize Variable
scrPageMask Variable
scrPageShift Variable
scrPageSize Variable
ADD_PC Macro
ATTR_COLD Macro
CHECK_PC Macro
DEBUG_TRACE Macro
DEC_CALLDEPTH Macro
MAX_CALLSTACK Macro
OPT_REGISTER_SECURE Macro
OPT_REGISTER_SECURE_BLOCKING Macro
OPT_REGISTER_SECURE_EXPORT Macro
SCR_MAKE_SIGNATURE Macro
SCR_REGISTER_SECURE Macro
SCR_REGISTER_SECURE_BLOCKING Macro
SCR_REGISTER_SECURE_EXPORT Macro
SCR_REGISTER_UNSECURE Macro
SCR_REGISTER_UNSECURE_BLOCKING Macro
SCR_REGISTER_UNSECURE_EXPORT Macro
SCRHASH Macro
SET_PC Macro
STREAMABLE_PROGRAMS Macro
THREADED_INTERPRETER Macro
VALIDATE_PC Macro
VALIDATE_PTR Macro
rageBankScriptBindings Namespace
Register_BankScript Function
s_tempWidgetAngleVectorValue Variable
s_tempWidgetStringValue Variable
s_tempWidgetVector2Value Variable
s_tempWidgetVector3Value Variable
s_tempWidgetVector4Value Variable
Classes
Info Struct
Data Members
Buffer Data Member
BufferCount Data Member
Command Data Member
Orig Data Member
ParamCount Data Member
Params Data Member
ResultPtr Data Member
Constructors
Info Constructor
scrArray Struct
Data Members
Elements Data Member
Constructors
scrArray Constructor
Operators
[] Operator
Nested Types
ElementBlock Nested Type
scrArrayBase Struct
Data Members
Count Data Member
Constructors
scrArrayBase Constructor
Operators
[] Operator
scriptNameSetter Struct
Data Members
m_Prev Data Member
Constructors
scriptNameSetter Constructor
Destructors
~scriptNameSetter Destructor
scrProgramRegistry Class
Methods
Insert Method
Lookup Method
Remove Method
scrTextLabelN Struct
Data Members
text Data Member
Constructors
scrTextLabelN
scrTextLabelN Constructor ()
scrTextLabelN Constructor (const char *)
Methods
append_int Method
append_string Method
Operators
=
= Operator (const char *)
= Operator (int)
const char* Operator
scrVector Struct
Data Members
x Data Member
y Data Member
z Data Member
Constructors
scrVector
scrVector Constructor ()
scrVector Constructor (float, float, float)
Operators
-
- Operator ()
- Operator (const scrVector)
* Operator
+ Operator
Functions
__attribute__ Function (( d64_abi ))
__attribute__ Function ((aligned(16)))
__mftb Function
atStringHash Function
MY_SYS_MODULE_INFO Function
scr_append_int Function
scr_append_string Function
scr_assign_int Function
scr_assign_string Function
SYS_MODULE_START Function
TIMESTEP Function
Structs, Records, Enums
DummyVector3 Struct
Header Struct
script_args Struct
scrValue Union
State Enumeration
Types
BOOL Type
Cmd Type
scrTextLabel15 Type
scrTextLabel23 Type
scrTextLabel3 Type
scrTextLabel31 Type
scrTextLabel63 Type
scrTextLabel7 Type
Variables
, scrThread *) = 0 Variable
dest, int maxBuf, const char *input, const char *ext) = DefaultGetFullFilename Variable
FALSE Variable
g_Validate Variable
globals Variable
MAX_LEGIT_OPS Variable
opcodes Variable
s_AllRefCount Variable
s_bClearOnHit Variable
s_bPrintOnly Variable
s_BreakFuncName Variable
s_CommandHash Variable
s_CurrentThread Variable
s_FaultOnFunc Variable
s_GlobalsHash Variable
s_GlobalsScript Variable
s_NameLookup Variable
s_Null Variable
s_ProgHash Variable
s_ScriptName Variable
s_SignatureHash Variable
s_STSO Variable
SCR_MAGIC Variable
scrProgram::sm_AllowDelete Variable
scrProgram::sm_AllowMismatchedGlobals Variable
scrProgram::sm_Globals Variable
scrProgram::sm_GlobalSize Variable
scrProgram::sm_GlobalsOriginal Variable
scrThread::sm_EnableScriptProfiling Variable
scrThread::sm_Globals Variable
scrThread::sm_IsPaused Variable
scrThread::sm_PrintStackPrefix Variable
scrThread::sm_ProfileResetInterval Variable
scrThread::sm_Stacks Variable
scrThread::sm_ThreadId Variable
scrThread::sm_Threads Variable
scrThread::sm_TimeStep Variable
scrThread::sm_TimeStepUnwarped Variable
scrThread::sm_UpdateTimersWhenPaused Variable
stack Variable
state Variable
throw_buffer Variable
TRUE Variable
Macros
__debugbreak Macro
__ignored__ Macro
_Pushi Macro
CheckForExtraOverflow Macro
CheckForOverflow Macro
count_of Macro
csupport_inline Macro
ENCRYPT_GLOBALS Macro
enum_to_int Macro
Fault Macro
FULL_LOGGING Macro
int_to_enum Macro
LoadImm16 Macro
LoadImm24 Macro
LoadImm32 Macro
LoadImm8 Macro
LoadImmS16 Macro
LoadSp Macro
LOCAL_STACK Macro
MY_SYS_MODULE_INFO Macro
op_array Macro
op_catch Macro
op_indirectcall Macro
op_store Macro
op_text_label_append_int Macro
op_text_label_append_string Macro
op_throw Macro
Popf Macro
Popi Macro
Popr Macro
PROF_TALLY Macro
PROF_TALLY_INSNS Macro
Pushf Macro
Pushi Macro
Pushr Macro
SCR_RAGE_TRACK Macro
SCR_RAGE_TRACK2 Macro
scrAssertf Macro
scrCondLogf Macro
scrDebugf1 Macro
scrDebugf2 Macro
scrDebugf3 Macro
scrDisplayf Macro
scrErrorf Macro
scrFatalf Macro
SCRIPT_DEBUGGING Macro
SCRIPT_DIRECT Macro
SCRIPT_PROFILING Macro
SCRIPT_VA_BEGIN Macro
SCRIPT_VA_NEXT Macro
SCRIPT_VA_TYPE Macro
scrLogf Macro
scrVerifyf Macro
scrWarningf Macro
SELECT_DATATABLE Macro
SMALL_SCRIPT_CORE Macro
StoreSp Macro
STRICT Macro
SWAP_16 Macro
SWAP_32 Macro
SYS_TIMEBASE_GET Macro
Topf Macro
Topi Macro
Topr Macro
TPS Macro
TRACE_NATIVES Macro
VALIDATE_REFERENCES Macro


Index

Index
- | * | , | [ | _ | ~ | + | = | A | B | C | D | E | F | G | H | I | K | L | M | N | O | P | R | S | T | U | V | W | X | Y | Z
-
-
*
*
,
, scrThread *) = 0
, scrThread *) = 0 variable
[
[]
_
__attribute__
__attribute__ function
__debugbreak
__debugbreak macro
__ignored__
__ignored__ macro
__mftb
__mftb function
_Pushi
_Pushi macro
~
~scrHash
~scriptNameSetter
~scrTimingHelper
+
+
=
=
A
Advanced Variable Declarations
append_int
append_string
Arg struct
Value
Arg::Value method
Arg<bool> struct
Value
Arg<bool>::Value method
Arg<const char*> struct
Value
Arg<const char*>::Value method
Arg<const scrVector&> struct
Value
Arg<const scrVector&>::Value method
Arg<const Vector3&> struct
Value
Arg<const Vector3&>::Value method
Arg<float&> struct
Value
Arg<float&>::Value method
Arg<float> struct
Value
Arg<float>::Value method
Arg<int&> struct
Value
Arg<int&>::Value method
Arg<int> struct
Value
Arg<int>::Value method
Arg<scrVector> struct
Value
Arg<scrVector>::Value method
Arg<Vector3&> struct
Value
Arg<Vector3&>::Value method
Arg<Vector3> struct
Value
Arg<Vector3>::Value method
atStringHash
atStringHash function
B
BOOL
BOOL type
Buffer
BufferCount
C
CheckForExtraOverflow
CheckForExtraOverflow macro
CheckForOverflow
CheckForOverflow macro
Cmd
Cmd type
Command
Comments
const char*
Constant Declarations
Count
count_of
count_of macro
CountNumArgs
csupport_inline
csupport_inline macro
D
Delete
dest, int maxBuf, const char *input, const char *ext) = DefaultGetFullFilename
dest, int maxBuf, const char *input, const char *ext) = DefaultGetFullFilename variable
DummyVector3
DummyVector3 struct
E
ElementBlock
Elements
ENCRYPT_GLOBALS
ENCRYPT_GLOBALS macro
enum_to_int
enum_to_int macro
Enumerations
Expressions
F
FALSE
FALSE variable
Fault
Fault macro
Flow Control
FULL_LOGGING
FULL_LOGGING macro
G
g_Validate
g_Validate variable
GetArgumentType
GetReturnType
GetState
globals
globals variable
H
Hash
Header
Header struct
I
Info
Info struct
Buffer
BufferCount
Command
Info
Orig
ParamCount
Params
ResultPtr
Info::Buffer
Info::Buffer data member
Info::BufferCount
Info::BufferCount data member
Info::Command
Info::Command data member
Info::Info
Info::Info constructor
Info::Orig
Info::Orig data member
Info::ParamCount
Info::ParamCount data member
Info::Params
Info::Params data member
Info::ResultPtr
Info::ResultPtr data member
Init
Insert
int_to_enum
int_to_enum macro
IsValid
K
Kill
L
LoadImm16
LoadImm16 macro
LoadImm24
LoadImm24 macro
LoadImm32
LoadImm32 macro
LoadImm8
LoadImm8 macro
LoadImmS16
LoadImmS16 macro
LoadSp
LoadSp macro
LOCAL_STACK
LOCAL_STACK macro
Lookup
M
m_Prev
m_Storage
MAX_CALLSTACK
MAX_LEGIT_OPS
MAX_LEGIT_OPS variable
MY_SYS_MODULE_INFO
MY_SYS_MODULE_INFO function
MY_SYS_MODULE_INFO macro
N
Now
O
op_array
op_array macro
op_catch
op_catch macro
op_indirectcall
op_indirectcall macro
op_store
op_store macro
op_text_label_append_int
op_text_label_append_int macro
op_text_label_append_string
op_text_label_append_string macro
op_throw
op_throw macro
opcodes
opcodes variable
Operator Precedence
Orig
P
ParamCount
Params
Passing Parameters To Scripts
Popf
Popf macro
Popi
Popi macro
Popr
Popr macro
Preprocessor
PrettyPrint
Procedures and Functions
PROF_TALLY
PROF_TALLY macro
PROF_TALLY_INSNS
PROF_TALLY_INSNS macro
Programming Manual
Pushf
Pushf macro
Pushi
Pushi macro
Pushr
Pushr macro
R
rage
rage namespace
rage::__attribute__
rage::__attribute__ function
rage::ADD_PC
rage::ADD_PC macro
rage::atou
rage::atou function
rage::atStringHash
rage::atStringHash function
rage::ATTR_COLD
rage::ATTR_COLD macro
rage::CHECK_PC
rage::CHECK_PC macro
rage::Cmd
rage::Cmd type
rage::DEBUG_TRACE
rage::DEBUG_TRACE macro
rage::DEC_CALLDEPTH
rage::DEC_CALLDEPTH macro
rage::g_PrintStackTraceFunc
rage::g_PrintStackTraceFunc variable
rage::g_scrValueTypeNames
rage::g_scrValueTypeNames variable
rage::gBaseScriptDirectory
rage::gBaseScriptDirectory variable
rage::gScriptProject
rage::gScriptProject variable
rage::MAX_CALLSTACK
rage::MAX_CALLSTACK macro
rage::OPT_REGISTER_SECURE
rage::OPT_REGISTER_SECURE macro
rage::OPT_REGISTER_SECURE_BLOCKING
rage::OPT_REGISTER_SECURE_BLOCKING macro
rage::OPT_REGISTER_SECURE_EXPORT
rage::OPT_REGISTER_SECURE_EXPORT macro
rage::rageScriptDebug
rage::rageScriptDebug namespace
rage::rageScriptDebug::float val)
rage::rageScriptDebug::float val) variable
rage::rageScriptDebug::gScriptPrintFloat
rage::rageScriptDebug::gScriptPrintFloat variable
rage::rageScriptDebug::gScriptPrintInt
rage::rageScriptDebug::gScriptPrintInt variable
rage::rageScriptDebug::gScriptPrintNewLine
rage::rageScriptDebug::gScriptPrintNewLine variable
rage::rageScriptDebug::gScriptPrintString
rage::rageScriptDebug::gScriptPrintString variable
rage::rageScriptDebug::gScriptPrintVector3
rage::rageScriptDebug::gScriptPrintVector3 variable
rage::rageScriptDebug::Init
rage::rageScriptDebug::Init function
rage::rageScriptDebug::int val)
rage::rageScriptDebug::int val) variable
rage::rageScriptDebug::prec
rage::rageScriptDebug::prec variable
rage::rageScriptDebug::ReBindDefaults
rage::rageScriptDebug::ReBindDefaults function
rage::rageScriptDebug::str
rage::rageScriptDebug::str variable
rage::rageScriptDebug::val
rage::rageScriptDebug::val variable
rage::rageScriptDebug::width
rage::rageScriptDebug::width variable
rage::s_TraceBuf
rage::s_TraceBuf variable
rage::s_TraceMax
rage::s_TraceMax variable
rage::s_TraceNext
rage::s_TraceNext variable
rage::s16
rage::s16 type
rage::s32
rage::s32 type
rage::SCR_MAKE_SIGNATURE
rage::SCR_MAKE_SIGNATURE macro
rage::SCR_REGISTER_SECURE
rage::SCR_REGISTER_SECURE macro
rage::SCR_REGISTER_SECURE_BLOCKING
rage::SCR_REGISTER_SECURE_BLOCKING macro
rage::SCR_REGISTER_SECURE_EXPORT
rage::SCR_REGISTER_SECURE_EXPORT macro
rage::SCR_REGISTER_UNSECURE
rage::SCR_REGISTER_UNSECURE macro
rage::SCR_REGISTER_UNSECURE_BLOCKING
rage::SCR_REGISTER_UNSECURE_BLOCKING macro
rage::SCR_REGISTER_UNSECURE_EXPORT
rage::SCR_REGISTER_UNSECURE_EXPORT macro
rage::scrComputeHash
rage::scrComputeHash function
rage::scrHash
rage::SCRHASH
rage::SCRHASH macro
rage::scrHash::~scrHash
rage::scrHash::Delete
rage::scrHash::Init
rage::scrHash::Insert
rage::scrHash::Kill
rage::scrHash::Lookup
rage::scrHash::Remove
rage::scrHash::scrHash
rage::scrHash::Slot
rage::scrHash::Slot struct
rage::scrMaxTextLabelSize
rage::scrMaxTextLabelSize variable
rage::scrOpcode
rage::scrOpcode enumeration
rage::scrPageMask
rage::scrPageMask variable
rage::scrPageShift
rage::scrPageShift variable
rage::scrPageSize
rage::scrPageSize variable
rage::scrProgram
rage::scrProgram struct
rage::scrProgram::AllowMismatchedGlobals@bool
rage::scrProgram::DefaultGetFullFilename@char *@int@const char *@const char *
rage::scrProgram::GetArgStructSize@const
rage::scrProgram::GetFullFilename
rage::scrProgram::GetProgramId@const
rage::scrProgram::Init@const char *@const u8*@int@const u32 *@int@const scrValue *@int@const scrValue *@int@const char *@int@int
rage::scrProgram::Load@const char *
rage::scrProgram::Load@const char *@const char *
rage::scrProgram::ResetGlobals@u32@u32
rage::scrProgram::SetGlobals
rage::scrProgram::SnapshotGlobals@u32@u32
rage::scrProgram::Validate@scrProgramId
rage::scrProgramId
rage::scrProgramId enumeration
rage::scrSignature
rage::scrSignature::CountNumArgs
rage::scrSignature::GetArgumentType
rage::scrSignature::GetReturnType
rage::scrSignature::GetState
rage::scrSignature::IsValid
rage::scrSignature::m_Storage
rage::scrSignature::PrettyPrint
rage::scrSignature::scrSignature
rage::scrTextLabel
rage::scrTextLabel type
rage::scrTextLabel15
rage::scrTextLabel15 type
rage::scrTextLabel23
rage::scrTextLabel23 type
rage::scrTextLabel31
rage::scrTextLabel31 type
rage::scrTextLabel63
rage::scrTextLabel63 type
rage::scrTextLabel7
rage::scrTextLabel7 type
rage::scrThread
rage::scrThread::~scrThread
rage::scrThread::AddThreadStack@int@int
rage::scrThread::AllocateThreads@int@int
rage::scrThread::AppFaultHandler
rage::scrThread::CancelWait
rage::scrThread::Continue
rage::scrThread::CreateThread@const char *@const void *@int@int
rage::scrThread::CreateThread@scrProgramId@const void *@int@int
rage::scrThread::Disassemble@char *@scrProgramId@int
rage::scrThread::DisplayProfileData@void *displayfbool severe,const char*,...
rage::scrThread::DumpState@void *printerconst char *fmt,...
rage::scrThread::enum@1
rage::scrThread::enum@2
rage::scrThread::ExecuteNetworkCommand@u32@int@scrValue *
rage::scrThread::FaultHandlerFunc
rage::scrThread::GetAbortReason@const
rage::scrThread::GetActiveThread
rage::scrThread::GetArgs@const
rage::scrThread::GetArgsSize@const
rage::scrThread::GetCmdFromName@const char *
rage::scrThread::GetGlobal@int
rage::scrThread::GetGlobalVariableAddress@int
rage::scrThread::GetGlobalVariableCount
rage::scrThread::GetGlobalVariableType@int
rage::scrThread::GetInstructionsUsed@const
rage::scrThread::GetLocal@int
rage::scrThread::GetProgram@const
rage::scrThread::GetProgramCounter@int@const
rage::scrThread::GetScriptName
rage::scrThread::GetSerializedState
rage::scrThread::GetSerializedState@const
rage::scrThread::GetSerializedStateSize@const
rage::scrThread::GetStack@const
rage::scrThread::GetStackSize@const
rage::scrThread::GetState@const
rage::scrThread::GetStatic@int
rage::scrThread::GetThread@scrThreadId
rage::scrThread::GetThreadByIndex@int
rage::scrThread::GetThreadCount
rage::scrThread::GetThreadId@const
rage::scrThread::GetTimeStep
rage::scrThread::GetTimeStepUnwarped
rage::scrThread::GetUpdateTime@const
rage::scrThread::Global::BasicType
rage::scrThread::Global::Hash
rage::scrThread::Global::Offset
rage::scrThread::HasBreakpoint@int@bool *
rage::scrThread::InitClass@int
rage::scrThread::IsValidGlobal@scrValue *
rage::scrThread::IsValidReference@scrValue *
rage::scrThread::IsValidStatic@scrValue *
rage::scrThread::Kill
rage::scrThread::KillAllThreads
rage::scrThread::KillThread@scrThread*
rage::scrThread::KillThread@scrThreadId
rage::scrThread::LoadGlobalVariableInfo@const char *
rage::scrThread::LookupGlobalVariable@const char *
rage::scrThread::m_ProfTotals
rage::scrThread::MAX_CALLSTACK
rage::scrThread::OriginalPrePrintStackTrace
rage::scrThread::Pause
rage::scrThread::PrePrintStackTrace
rage::scrThread::ProfEntry::CompareByInclTime@const ProfEntry &@const ProfEntry &
rage::scrThread::RegisterBuiltinCommands
rage::scrThread::Reset@scrProgramId@const void *@int
rage::scrThread::Run
rage::scrThread::Run@int
rage::scrThread::scrThread
rage::scrThread::Serialized
rage::scrThread::Serialized struct
rage::scrThread::SetBreakpoint@int@bool@bool
rage::scrThread::SetDebugBreakpointCallback@ThreadBreakpointFunc
rage::scrThread::SetDebugFaultHandler@FaultHandlerFunc
rage::scrThread::SetIsInNativeFunction
rage::scrThread::SetIsInNativeFunction@bool NOTFINAL_ONLY set
rage::scrThread::SetIsPaused@bool
rage::scrThread::SetStepRegion@int@int
rage::scrThread::SetThreadBlockState@bool
rage::scrThread::SetTimeStep@float
rage::scrThread::SetTimeStepUnwarped@float
rage::scrThread::SetUpdateTimersWhenPaused@bool
rage::scrThread::ShutdownClass
rage::scrThread::sizecheck
rage::scrThread::sm_InNativeFunction
rage::scrThread::sm_IsPaused
rage::scrThread::sm_ProfileSortMethod
rage::scrThread::sm_ProfileSortMethodStrings
rage::scrThread::sm_ThreadId
rage::scrThread::sm_TimeStep
rage::scrThread::sm_TimeStepUnwarped
rage::scrThread::sm_UpdateTimersWhenPaused
rage::scrThread::StartNewThreadOverride
rage::scrThread::State
rage::scrThread::ThreadBreakpointFunc
rage::scrThread::Throw@int
rage::scrThread::TLS@int
rage::scrThread::TLSMaxCount@const
rage::scrThread::Update@int
rage::scrThread::UpdateAll@int
rage::scrThread::Validate@scrProgram &
rage::scrThreadId
rage::scrThreadId type
rage::scrTimingHelper
rage::scrTimingHelper::~scrTimingHelper
rage::scrTimingHelper::Hash
rage::scrTimingHelper::Now
rage::scrTimingHelper::scrTimingHelper
rage::scrTrace
rage::scrTrace struct
rage::scrValidateHash
rage::scrValidateHash function
rage::scrValue
rage::scrValue union
rage::scrValue::ValueType
rage::scrVector
rage::scrVector::=
rage::scrVector::scrVector
rage::scrVector::Vec3V
rage::scrVector::Vector3
rage::scrVector::Vector3::Vector3Param
rage::scrVector::x
rage::scrVector::y
rage::scrVector::z
rage::scrWrapper
rage::scrWrapper namespace
rage::scrWrapper::Arg
rage::scrWrapper::Arg::Value
rage::scrWrapper::Arg<bool>
rage::scrWrapper::Arg<bool>::Value
rage::scrWrapper::Arg<const char*>
rage::scrWrapper::Arg<const char*>::Value
rage::scrWrapper::Arg<const scrVector&>
rage::scrWrapper::Arg<const scrVector&>::Value
rage::scrWrapper::Arg<const Vector3&>
rage::scrWrapper::Arg<const Vector3&>::Value
rage::scrWrapper::Arg<float&>
rage::scrWrapper::Arg<float&>::Value
rage::scrWrapper::Arg<float>
rage::scrWrapper::Arg<float>::Value
rage::scrWrapper::Arg<int&>
rage::scrWrapper::Arg<int&>::Value
rage::scrWrapper::Arg<int>
rage::scrWrapper::Arg<int>::Value
rage::scrWrapper::Arg<scrVector>
rage::scrWrapper::Arg<scrVector>::Value
rage::scrWrapper::Arg<Vector3&>
rage::scrWrapper::Arg<Vector3&>::Value
rage::scrWrapper::Arg<Vector3>
rage::scrWrapper::Arg<Vector3>::Value
rage::scrWrapper::ArgType<bool>
rage::scrWrapper::ArgType<bool> struct
rage::scrWrapper::ArgType<char*>
rage::scrWrapper::ArgType<char*> struct
rage::scrWrapper::ArgType<const char*>
rage::scrWrapper::ArgType<const char*> struct
rage::scrWrapper::ArgType<float>
rage::scrWrapper::ArgType<float> struct
rage::scrWrapper::ArgType<int>
rage::scrWrapper::ArgType<int> struct
rage::scrWrapper::ArgType<UnspecifiedArg>
rage::scrWrapper::ArgType<UnspecifiedArg> struct
rage::scrWrapper::ArgType<void>
rage::scrWrapper::ArgType<void> struct
rage::scrWrapper::AssertParamMatch
rage::scrWrapper::AssertParamMatch macro
rage::scrWrapper::AssertParamMatchN
rage::scrWrapper::AssertParamMatchN macro
rage::scrWrapper::SCR_DEFINE_NEW_PARAM_TYPE
rage::scrWrapper::SCR_DEFINE_NEW_PARAM_TYPE macro
rage::scrWrapper::SCR_DEFINE_NEW_POINTER_PARAM_AND_RET
rage::scrWrapper::SCR_DEFINE_NEW_POINTER_PARAM_AND_RET macro
rage::scrWrapper::SCR_DEFINE_TLS_TYPE_VALUE
rage::scrWrapper::SCR_DEFINE_TLS_TYPE_VALUE macro
rage::scrWrapper::SCRIPTNAME
rage::scrWrapper::SCRIPTNAME macro
rage::scrWrapper::SignatureGenerator<_RT (*)(_Arg0, _Arg1, _Arg2, _Arg3, _Arg4, _Arg5, _Arg6, _Arg7, _Arg8)>
rage::scrWrapper::SignatureGenerator<_RT (*)(_Arg0, _Arg1, _Arg2, _Arg3, _Arg4, _Arg5, _Arg6, _Arg7, _Arg8)> struct
rage::scrWrapper::UnspecifiedArg
rage::scrWrapper::UnspecifiedArg struct
rage::SET_PC
rage::SET_PC macro
rage::STREAMABLE_PROGRAMS
rage::STREAMABLE_PROGRAMS macro
rage::THREADED_INTERPRETER
rage::THREADED_INTERPRETER macro
rage::u16
rage::u16 type
rage::u32
rage::u32 type
rage::u8
rage::u8 type
rage::VALIDATE_PC
rage::VALIDATE_PC macro
rage::VALIDATE_PTR
rage::VALIDATE_PTR macro
rage::Vector3
rage::Vector3 struct
rageBankScriptBindings
rageBankScriptBindings namespace
rageBankScriptBindings::Register_BankScript
rageBankScriptBindings::Register_BankScript function
rageBankScriptBindings::s_tempWidgetAngleVectorValue
rageBankScriptBindings::s_tempWidgetAngleVectorValue variable
rageBankScriptBindings::s_tempWidgetStringValue
rageBankScriptBindings::s_tempWidgetStringValue variable
rageBankScriptBindings::s_tempWidgetVector2Value
rageBankScriptBindings::s_tempWidgetVector2Value variable
rageBankScriptBindings::s_tempWidgetVector3Value
rageBankScriptBindings::s_tempWidgetVector3Value variable
rageBankScriptBindings::s_tempWidgetVector4Value
rageBankScriptBindings::s_tempWidgetVector4Value variable
Remove
ResultPtr
Run
S
s_AllRefCount
s_AllRefCount variable
s_bClearOnHit
s_bClearOnHit variable
s_bPrintOnly
s_bPrintOnly variable
s_BreakFuncName
s_BreakFuncName variable
s_CommandHash
s_CommandHash variable
s_CurrentThread
s_CurrentThread variable
s_FaultOnFunc
s_FaultOnFunc variable
s_GlobalsHash
s_GlobalsHash variable
s_GlobalsScript
s_GlobalsScript variable
s_NameLookup
s_NameLookup variable
s_Null
s_Null variable
s_ProgHash
s_ProgHash variable
s_ScriptName
s_ScriptName variable
s_SignatureHash
s_SignatureHash variable
s_STSO
s_STSO variable
scr_append_int
scr_append_int function
scr_append_string
scr_append_string function
scr_assign_int
scr_assign_int function
scr_assign_string
scr_assign_string function
SCR_MAGIC
SCR_MAGIC variable
SCR_RAGE_TRACK
SCR_RAGE_TRACK macro
SCR_RAGE_TRACK2
SCR_RAGE_TRACK2 macro
scrArray
scrArray struct
[]
ElementBlock
Elements
scrArray
scrArray::[]
scrArray::[] operator
scrArray::ElementBlock
scrArray::ElementBlock nested type
scrArray::Elements
scrArray::Elements data member
scrArray::scrArray
scrArray::scrArray constructor
scrArrayBase
scrArrayBase struct
[]
Count
scrArrayBase
scrArrayBase::[]
scrArrayBase::[] operator
scrArrayBase::Count
scrArrayBase::Count data member
scrArrayBase::scrArrayBase
scrArrayBase::scrArrayBase constructor
scrAssertf
scrAssertf macro
scrCondLogf
scrCondLogf macro
scrDebugf1
scrDebugf1 macro
scrDebugf2
scrDebugf2 macro
scrDebugf3
scrDebugf3 macro
scrDisplayf
scrDisplayf macro
scrErrorf
scrErrorf macro
scrFatalf
scrFatalf macro
scrHash
scrHash template
~scrHash
Delete
Init
Insert
Kill
Lookup
Remove
scrHash
scrHash::~scrHash destructor
scrHash::Delete method
scrHash::Init method
scrHash::Insert method
scrHash::Kill method
scrHash::Lookup method
scrHash::Remove method
scrHash::scrHash constructor
script_args
script_args struct
SCRIPT_DEBUGGING
SCRIPT_DEBUGGING macro
SCRIPT_DIRECT
SCRIPT_DIRECT macro
SCRIPT_PROFILING
SCRIPT_PROFILING macro
SCRIPT_VA_BEGIN
SCRIPT_VA_BEGIN macro
SCRIPT_VA_NEXT
SCRIPT_VA_NEXT macro
SCRIPT_VA_TYPE
SCRIPT_VA_TYPE macro
scriptNameSetter
scriptNameSetter struct
~scriptNameSetter
m_Prev
scriptNameSetter
scriptNameSetter::~scriptNameSetter
scriptNameSetter::~scriptNameSetter destructor
scriptNameSetter::m_Prev
scriptNameSetter::m_Prev data member
scriptNameSetter::scriptNameSetter
scriptNameSetter::scriptNameSetter constructor
scrLogf
scrLogf macro
scrProgram::sm_AllowDelete
scrProgram::sm_AllowDelete variable
scrProgram::sm_AllowMismatchedGlobals
scrProgram::sm_AllowMismatchedGlobals variable
scrProgram::sm_Globals
scrProgram::sm_Globals variable
scrProgram::sm_GlobalSize
scrProgram::sm_GlobalSize variable
scrProgram::sm_GlobalsOriginal
scrProgram::sm_GlobalsOriginal variable
scrProgramRegistry
scrProgramRegistry class
Insert
Lookup
Remove
scrProgramRegistry::Insert
scrProgramRegistry::Insert method
scrProgramRegistry::Lookup
scrProgramRegistry::Lookup method
scrProgramRegistry::Remove
scrProgramRegistry::Remove method
scrSignature
scrSignature class
CountNumArgs
GetArgumentType
GetReturnType
GetState
IsValid
m_Storage
PrettyPrint
scrSignature
scrSignature
scrSignature
scrSignature::CountNumArgs method
scrSignature::GetArgumentType method
scrSignature::GetReturnType method
scrSignature::GetState method
scrSignature::IsValid method
scrSignature::m_Storage data member
scrSignature::PrettyPrint method
scrSignature::scrSignature constructor
scrTextLabel15
scrTextLabel15 type
scrTextLabel23
scrTextLabel23 type
scrTextLabel3
scrTextLabel3 type
scrTextLabel31
scrTextLabel31 type
scrTextLabel63
scrTextLabel63 type
scrTextLabel7
scrTextLabel7 type
scrTextLabelN
scrTextLabelN struct
=
=
append_int
append_string
const char*
scrTextLabelN
scrTextLabelN
text
scrTextLabelN::=
scrTextLabelN::= operator
scrTextLabelN::append_int
scrTextLabelN::append_int method
scrTextLabelN::append_string
scrTextLabelN::append_string method
scrTextLabelN::const char*
scrTextLabelN::const char* operator
scrTextLabelN::scrTextLabelN
scrTextLabelN::scrTextLabelN constructor
scrTextLabelN::text
scrTextLabelN::text data member
scrThread class
MAX_CALLSTACK
Run
SetIsInNativeFunction
sizecheck
sm_InNativeFunction
scrThread::MAX_CALLSTACK data member
scrThread::Run method
scrThread::SetIsInNativeFunction method
scrThread::sizecheck nested type
scrThread::sm_EnableScriptProfiling
scrThread::sm_EnableScriptProfiling variable
scrThread::sm_Globals
scrThread::sm_Globals variable
scrThread::sm_InNativeFunction data member
scrThread::sm_IsPaused
scrThread::sm_IsPaused variable
scrThread::sm_PrintStackPrefix
scrThread::sm_PrintStackPrefix variable
scrThread::sm_ProfileResetInterval
scrThread::sm_ProfileResetInterval variable
scrThread::sm_Stacks
scrThread::sm_Stacks variable
scrThread::sm_ThreadId
scrThread::sm_ThreadId variable
scrThread::sm_Threads
scrThread::sm_Threads variable
scrThread::sm_TimeStep
scrThread::sm_TimeStep variable
scrThread::sm_TimeStepUnwarped
scrThread::sm_TimeStepUnwarped variable
scrThread::sm_UpdateTimersWhenPaused
scrThread::sm_UpdateTimersWhenPaused variable
scrTimingHelper
scrTimingHelper struct
~scrTimingHelper
Hash
Now
scrTimingHelper
scrTimingHelper::~scrTimingHelper destructor
scrTimingHelper::Hash data member
scrTimingHelper::Now data member
scrTimingHelper::scrTimingHelper constructor
scrValue
scrValue union
scrVector
scrVector struct
-
-
*
+
=
=
scrVector
scrVector
scrVector
scrVector
scrVector
scrVector
Vec3V
Vector3
Vector3::Vector3Param
x
x
y
y
z
z
scrVector::-
scrVector::- operator
scrVector::*
scrVector::* operator
scrVector::+
scrVector::+ operator
scrVector::= operator
scrVector::scrVector
scrVector::scrVector constructor
scrVector::Vec3V operator
scrVector::Vector3 operator
scrVector::Vector3::Vector3Param operator
scrVector::x
scrVector::x data member
scrVector::y
scrVector::y data member
scrVector::z
scrVector::z data member
scrVerifyf
scrVerifyf macro
scrWarningf
scrWarningf macro
SELECT_DATATABLE
SELECT_DATATABLE macro
SetIsInNativeFunction
sizecheck
sm_InNativeFunction
SMALL_SCRIPT_CORE
SMALL_SCRIPT_CORE macro
Special Functions and Commands
stack
stack variable
state
State
State enumeration
state variable
StoreSp
StoreSp macro
STRICT
STRICT macro
SWAP_16
SWAP_16 macro
SWAP_32
SWAP_32 macro
SYS_MODULE_START
SYS_MODULE_START function
SYS_TIMEBASE_GET
SYS_TIMEBASE_GET macro
T
text
Text Labels
throw_buffer
throw_buffer variable
TIMESTEP
TIMESTEP function
Topf
Topf macro
Topi
Topi macro
Topr
Topr macro
TPS
TPS macro
TRACE_NATIVES
TRACE_NATIVES macro
TRUE
TRUE variable
U
User Manual
V
VALIDATE_REFERENCES
VALIDATE_REFERENCES macro
Value
Variable Declarations
Vec3V
Vector3
Vector3::Vector3Param
W
Why a Custom Language?
X
x
Y
y
Z
z