xoreos  0.0.5
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Aurora::ActionScript::ASBuffer Class Reference

#include <asbuffer.h>

Collaboration diagram for Aurora::ActionScript::ASBuffer:
Collaboration graph
[legend]

Public Member Functions

 ASBuffer (Common::SeekableReadStream *as)
 
void run (AVM &avm)
 
void setConstantPool (std::vector< Common::UString > constantPool)
 

Private Member Functions

void execute (AVM &avm)
 
void actionStop (AVM &avm)
 
void actionToggleQuality ()
 
void actionSubtract ()
 
void actionMultiply ()
 
void actionDivide ()
 
void actionAnd ()
 
void actionOr ()
 
void actionNot ()
 
void actionPop ()
 
void actionGetVariable (AVM &avm)
 
void actionSetVariable (AVM &avm)
 
void actionTrace ()
 
void actionDefineLocal (AVM &avm)
 
void actionCallFunction ()
 
void actionReturn (AVM &avm)
 
void actionNewObject (AVM &avm)
 
void actionInitArray ()
 
void actionAdd2 ()
 
void actionLess2 ()
 
void actionEquals2 ()
 
void actionToNumber2 ()
 
void actionPushDuplicate ()
 
void actionGetMember ()
 
void actionSetMember ()
 
void actionIncrement ()
 
void actionCallMethod (AVM &avm)
 
void actionEnumerate2 ()
 
void actionExtends ()
 
void actionGetURL (AVM &avm)
 
void actionStoreRegister (AVM &avm)
 
void actionConstantPool ()
 
void actionDefineFunction2 ()
 
void actionPush (AVM &avm)
 
void actionJump ()
 
void actionGetURL2 (AVM &avm)
 
void actionDefineFunction ()
 
void actionIf ()
 
Common::UString readString ()
 

Private Attributes

size_t _currentLength
 
ptrdiff_t _seeked
 
std::vector< Common::UString_constants
 
std::stack< Variable_stack
 
Common::SeekableReadStream_script
 

Detailed Description

Definition at line 45 of file asbuffer.h.

Constructor & Destructor Documentation

◆ ASBuffer()

Aurora::ActionScript::ASBuffer::ASBuffer ( Common::SeekableReadStream as)

Definition at line 86 of file asbuffer.cpp.

Member Function Documentation

◆ actionAdd2()

void Aurora::ActionScript::ASBuffer::actionAdd2 ( )
private

Definition at line 329 of file asbuffer.cpp.

References _stack, debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionAnd()

void Aurora::ActionScript::ASBuffer::actionAnd ( )
private

Definition at line 210 of file asbuffer.cpp.

References _stack, debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionCallFunction()

void Aurora::ActionScript::ASBuffer::actionCallFunction ( )
private

Definition at line 296 of file asbuffer.cpp.

References debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionCallMethod()

void Aurora::ActionScript::ASBuffer::actionCallMethod ( AVM avm)
private

◆ actionConstantPool()

void Aurora::ActionScript::ASBuffer::actionConstantPool ( )
private

Definition at line 555 of file asbuffer.cpp.

References _constants, _script, debugC(), Common::kDebugActionScript, readString(), and Common::ReadStream::readUint16LE().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionDefineFunction()

void Aurora::ActionScript::ASBuffer::actionDefineFunction ( )
private

Definition at line 762 of file asbuffer.cpp.

References _constants, _script, _seeked, _stack, Common::UString::c_str(), debugC(), Common::kDebugActionScript, Common::ReadStream::readStream(), readString(), and Common::ReadStream::readUint16LE().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionDefineFunction2()

void Aurora::ActionScript::ASBuffer::actionDefineFunction2 ( )
private

◆ actionDefineLocal()

void Aurora::ActionScript::ASBuffer::actionDefineLocal ( AVM avm)
private

Definition at line 281 of file asbuffer.cpp.

References _stack, Aurora::ActionScript::Variable::asString(), debugC(), Aurora::ActionScript::Variable::isString(), Common::kDebugActionScript, and Aurora::ActionScript::AVM::setVariable().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionDivide()

void Aurora::ActionScript::ASBuffer::actionDivide ( )
private

Definition at line 199 of file asbuffer.cpp.

References _stack, debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionEnumerate2()

void Aurora::ActionScript::ASBuffer::actionEnumerate2 ( )
private

Definition at line 497 of file asbuffer.cpp.

References _stack, debugC(), Common::kDebugActionScript, and Aurora::ActionScript::Variable::Null().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionEquals2()

void Aurora::ActionScript::ASBuffer::actionEquals2 ( )
private

Definition at line 369 of file asbuffer.cpp.

References _stack, debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionExtends()

void Aurora::ActionScript::ASBuffer::actionExtends ( )
private

Definition at line 516 of file asbuffer.cpp.

References _stack, debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionGetMember()

void Aurora::ActionScript::ASBuffer::actionGetMember ( )
private

Definition at line 392 of file asbuffer.cpp.

References _stack, Aurora::ActionScript::Variable::asObject(), debugC(), Common::kDebugActionScript, and Common::UString::split().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionGetURL()

void Aurora::ActionScript::ASBuffer::actionGetURL ( AVM avm)
private

Definition at line 530 of file asbuffer.cpp.

References _stack, Aurora::ActionScript::Variable::asString(), Common::UString::c_str(), debugC(), Aurora::ActionScript::AVM::fsCommand(), Aurora::ActionScript::Variable::isString(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionGetURL2()

void Aurora::ActionScript::ASBuffer::actionGetURL2 ( AVM avm)
private

◆ actionGetVariable()

void Aurora::ActionScript::ASBuffer::actionGetVariable ( AVM avm)
private

Definition at line 248 of file asbuffer.cpp.

References _stack, Aurora::ActionScript::Variable::asObject(), debugC(), Aurora::ActionScript::AVM::getVariable(), Common::kDebugActionScript, and Common::UString::split().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionIf()

void Aurora::ActionScript::ASBuffer::actionIf ( )
private

Definition at line 783 of file asbuffer.cpp.

References _script, _seeked, _stack, Aurora::ActionScript::Variable::asBoolean(), debugC(), Common::kDebugActionScript, Common::SeekableReadStream::kOriginCurrent, Common::ReadStream::readSint16LE(), and Common::SeekableReadStream::seek().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionIncrement()

void Aurora::ActionScript::ASBuffer::actionIncrement ( )
private

Definition at line 427 of file asbuffer.cpp.

References _stack, debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionInitArray()

void Aurora::ActionScript::ASBuffer::actionInitArray ( )
private

Definition at line 311 of file asbuffer.cpp.

References _stack, Aurora::ActionScript::Variable::asNumber(), debugC(), Aurora::ActionScript::Variable::isNumber(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionJump()

void Aurora::ActionScript::ASBuffer::actionJump ( )
private

Definition at line 713 of file asbuffer.cpp.

References _script, _seeked, debugC(), Common::kDebugActionScript, Common::SeekableReadStream::kOriginCurrent, Common::ReadStream::readSint16LE(), and Common::SeekableReadStream::seek().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionLess2()

void Aurora::ActionScript::ASBuffer::actionLess2 ( )
private

Definition at line 357 of file asbuffer.cpp.

References _stack, debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionMultiply()

void Aurora::ActionScript::ASBuffer::actionMultiply ( )
private

Definition at line 188 of file asbuffer.cpp.

References _stack, debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionNewObject()

void Aurora::ActionScript::ASBuffer::actionNewObject ( AVM avm)
private

Definition at line 340 of file asbuffer.cpp.

References _stack, Aurora::ActionScript::AVM::createNewObject(), debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionNot()

void Aurora::ActionScript::ASBuffer::actionNot ( )
private

Definition at line 232 of file asbuffer.cpp.

References _stack, debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionOr()

void Aurora::ActionScript::ASBuffer::actionOr ( )
private

Definition at line 221 of file asbuffer.cpp.

References _stack, debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionPop()

void Aurora::ActionScript::ASBuffer::actionPop ( )
private

Definition at line 241 of file asbuffer.cpp.

References _stack, debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionPush()

void Aurora::ActionScript::ASBuffer::actionPush ( AVM avm)
private

◆ actionPushDuplicate()

void Aurora::ActionScript::ASBuffer::actionPushDuplicate ( )
private

Definition at line 386 of file asbuffer.cpp.

References _stack, debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionReturn()

void Aurora::ActionScript::ASBuffer::actionReturn ( AVM avm)
private

Definition at line 302 of file asbuffer.cpp.

References _stack, debugC(), Common::kDebugActionScript, and Aurora::ActionScript::AVM::setReturnValue().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionSetMember()

void Aurora::ActionScript::ASBuffer::actionSetMember ( )
private

Definition at line 415 of file asbuffer.cpp.

References _stack, debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionSetVariable()

void Aurora::ActionScript::ASBuffer::actionSetVariable ( AVM avm)
private

Definition at line 264 of file asbuffer.cpp.

References _stack, debugC(), Common::kDebugActionScript, and Aurora::ActionScript::AVM::setVariable().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionStop()

void Aurora::ActionScript::ASBuffer::actionStop ( AVM avm)
private

Definition at line 167 of file asbuffer.cpp.

References debugC(), Common::kDebugActionScript, and Aurora::ActionScript::AVM::setStopFlag().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionStoreRegister()

void Aurora::ActionScript::ASBuffer::actionStoreRegister ( AVM avm)
private

Definition at line 548 of file asbuffer.cpp.

References _script, _stack, debugC(), Common::kDebugActionScript, Common::ReadStream::readByte(), and Aurora::ActionScript::AVM::storeRegister().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionSubtract()

void Aurora::ActionScript::ASBuffer::actionSubtract ( )
private

Definition at line 177 of file asbuffer.cpp.

References _stack, debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionToggleQuality()

void Aurora::ActionScript::ASBuffer::actionToggleQuality ( )
private

Definition at line 173 of file asbuffer.cpp.

References debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionToNumber2()

void Aurora::ActionScript::ASBuffer::actionToNumber2 ( )
private

Definition at line 380 of file asbuffer.cpp.

References debugC(), and Common::kDebugActionScript.

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ actionTrace()

void Aurora::ActionScript::ASBuffer::actionTrace ( )
private

Definition at line 275 of file asbuffer.cpp.

References debugC(), Common::kDebugActionScript, and warning().

Referenced by execute().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ execute()

void Aurora::ActionScript::ASBuffer::execute ( AVM avm)
private

Definition at line 101 of file asbuffer.cpp.

References _currentLength, _script, _seeked, actionAdd2(), actionAnd(), actionCallFunction(), actionCallMethod(), actionConstantPool(), actionDefineFunction(), actionDefineFunction2(), actionDefineLocal(), actionDivide(), actionEnumerate2(), actionEquals2(), actionExtends(), actionGetMember(), actionGetURL(), actionGetURL2(), actionGetVariable(), actionIf(), actionIncrement(), actionInitArray(), actionJump(), actionLess2(), actionMultiply(), actionNewObject(), actionNot(), actionOr(), actionPop(), actionPush(), actionPushDuplicate(), actionReturn(), actionSetMember(), actionSetVariable(), actionStop(), actionStoreRegister(), actionSubtract(), actionToggleQuality(), actionToNumber2(), actionTrace(), debugC(), Aurora::ActionScript::kActionAdd2, Aurora::ActionScript::kActionAnd, Aurora::ActionScript::kActionCallFunction, Aurora::ActionScript::kActionCallMethod, Aurora::ActionScript::kActionConstantPool, Aurora::ActionScript::kActionDefineFunction, Aurora::ActionScript::kActionDefineFunction2, Aurora::ActionScript::kActionDefineLocal, Aurora::ActionScript::kActionDivide, Aurora::ActionScript::kActionEnumerate2, Aurora::ActionScript::kActionEquals2, Aurora::ActionScript::kActionExtends, Aurora::ActionScript::kActionGetMember, Aurora::ActionScript::kActionGetURL, Aurora::ActionScript::kActionGetURL2, Aurora::ActionScript::kActionGetVariable, Aurora::ActionScript::kActionIf, Aurora::ActionScript::kActionIncrement, Aurora::ActionScript::kActionInitArray, Aurora::ActionScript::kActionJump, Aurora::ActionScript::kActionLess2, Aurora::ActionScript::kActionMultiply, Aurora::ActionScript::kActionNewObject, Aurora::ActionScript::kActionNot, Aurora::ActionScript::kActionOr, Aurora::ActionScript::kActionPop, Aurora::ActionScript::kActionPush, Aurora::ActionScript::kActionPushDuplicate, Aurora::ActionScript::kActionReturn, Aurora::ActionScript::kActionSetMember, Aurora::ActionScript::kActionSetVariable, Aurora::ActionScript::kActionStop, Aurora::ActionScript::kActionStoreRegister, Aurora::ActionScript::kActionSubtract, Aurora::ActionScript::kActionToggleQuality, Aurora::ActionScript::kActionToNumber2, Aurora::ActionScript::kActionTrace, Common::kDebugActionScript, Common::SeekableReadStream::kOriginCurrent, Common::SeekableReadStream::pos(), Common::ReadStream::readByte(), Common::ReadStream::readUint16LE(), Common::SeekableReadStream::seek(), Common::SeekableReadStream::size(), and warning().

Referenced by run().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ readString()

Common::UString Aurora::ActionScript::ASBuffer::readString ( )
private

Definition at line 797 of file asbuffer.cpp.

References _script, and Common::ReadStream::readChar().

Referenced by actionConstantPool(), actionDefineFunction(), actionDefineFunction2(), and actionPush().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ run()

void Aurora::ActionScript::ASBuffer::run ( AVM avm)

Definition at line 92 of file asbuffer.cpp.

References _script, execute(), and Common::SeekableReadStream::seek().

Referenced by Aurora::ActionScript::ScriptedFunction::operator()().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setConstantPool()

void Aurora::ActionScript::ASBuffer::setConstantPool ( std::vector< Common::UString constantPool)

Definition at line 97 of file asbuffer.cpp.

References _constants.

Referenced by Aurora::ActionScript::ScriptedFunction::ScriptedFunction().

Here is the caller graph for this function:

Member Data Documentation

◆ _constants

std::vector<Common::UString> Aurora::ActionScript::ASBuffer::_constants
private

◆ _currentLength

size_t Aurora::ActionScript::ASBuffer::_currentLength
private

Definition at line 97 of file asbuffer.h.

Referenced by actionPush(), and execute().

◆ _script

Common::SeekableReadStream* Aurora::ActionScript::ASBuffer::_script
private

◆ _seeked

ptrdiff_t Aurora::ActionScript::ASBuffer::_seeked
private

Definition at line 98 of file asbuffer.h.

Referenced by actionDefineFunction(), actionDefineFunction2(), actionIf(), actionJump(), and execute().

◆ _stack

std::stack<Variable> Aurora::ActionScript::ASBuffer::_stack
private

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