ScummVM
Kyra::EMCInterpreter Class Reference

#include <script.h>

Collaboration diagram for Kyra::EMCInterpreter:

Classes

struct  OpcodeEntry
 

Public Member Functions

 EMCInterpreter (KyraEngine_v1 *vm)
 
bool load (const char *filename, EMCData *data, const Common::Array< const Opcode *> *opcodes)
 
void unload (EMCData *data)
 
void init (EMCState *scriptState, const EMCData *data)
 
bool start (EMCState *script, int function)
 
bool isValid (EMCState *script)
 
bool run (EMCState *script)
 

Protected Types

typedef void(EMCInterpreter::* OpcodeProc) (EMCState *)
 

Protected Member Functions

bool callback (Common::IFFChunk &chunk)
 

Protected Attributes

KyraEngine_v1_vm
 
int16 _parameter
 
const char * _filename
 
EMCData_scriptData
 
const OpcodeEntry_opcodes
 

Private Member Functions

void op_jmp (EMCState *)
 
void op_setRetValue (EMCState *)
 
void op_pushRetOrPos (EMCState *)
 
void op_push (EMCState *)
 
void op_pushReg (EMCState *)
 
void op_pushBPNeg (EMCState *)
 
void op_pushBPAdd (EMCState *)
 
void op_popRetOrPos (EMCState *)
 
void op_popReg (EMCState *)
 
void op_popBPNeg (EMCState *)
 
void op_popBPAdd (EMCState *)
 
void op_addSP (EMCState *)
 
void op_subSP (EMCState *)
 
void op_sysCall (EMCState *)
 
void op_ifNotJmp (EMCState *)
 
void op_negate (EMCState *)
 
void op_eval (EMCState *)
 
void op_setRetAndJmp (EMCState *)
 

Detailed Description

Definition at line 108 of file script.h.

Member Typedef Documentation

◆ OpcodeProc

typedef void(EMCInterpreter::* Kyra::EMCInterpreter::OpcodeProc) (EMCState *)
protected

Definition at line 130 of file script.h.

Constructor & Destructor Documentation

◆ EMCInterpreter()

Kyra::EMCInterpreter::EMCInterpreter ( KyraEngine_v1 vm)

Definition at line 30 of file script.cpp.

Member Function Documentation

◆ callback()

bool Kyra::EMCInterpreter::callback ( Common::IFFChunk chunk)
protected

Definition at line 62 of file script.cpp.

◆ init()

void Kyra::EMCInterpreter::init ( EMCState scriptState,
const EMCData data 
)

Definition at line 147 of file script.cpp.

◆ isValid()

bool Kyra::EMCInterpreter::isValid ( EMCState script)

Definition at line 175 of file script.cpp.

◆ load()

bool Kyra::EMCInterpreter::load ( const char *  filename,
EMCData data,
const Common::Array< const Opcode *> *  opcodes 
)

Definition at line 98 of file script.cpp.

◆ op_addSP()

void Kyra::EMCInterpreter::op_addSP ( EMCState script)
private

Definition at line 291 of file script.cpp.

◆ op_eval()

void Kyra::EMCInterpreter::op_eval ( EMCState script)
private

Definition at line 344 of file script.cpp.

◆ op_ifNotJmp()

void Kyra::EMCInterpreter::op_ifNotJmp ( EMCState script)
private

Definition at line 313 of file script.cpp.

◆ op_jmp()

void Kyra::EMCInterpreter::op_jmp ( EMCState script)
private

Definition at line 218 of file script.cpp.

◆ op_negate()

void Kyra::EMCInterpreter::op_negate ( EMCState script)
private

Definition at line 320 of file script.cpp.

◆ op_popBPAdd()

void Kyra::EMCInterpreter::op_popBPAdd ( EMCState script)
private

Definition at line 287 of file script.cpp.

◆ op_popBPNeg()

void Kyra::EMCInterpreter::op_popBPNeg ( EMCState script)
private

Definition at line 283 of file script.cpp.

◆ op_popReg()

void Kyra::EMCInterpreter::op_popReg ( EMCState script)
private

Definition at line 279 of file script.cpp.

◆ op_popRetOrPos()

void Kyra::EMCInterpreter::op_popRetOrPos ( EMCState script)
private

Definition at line 259 of file script.cpp.

◆ op_push()

void Kyra::EMCInterpreter::op_push ( EMCState script)
private

Definition at line 243 of file script.cpp.

◆ op_pushBPAdd()

void Kyra::EMCInterpreter::op_pushBPAdd ( EMCState script)
private

Definition at line 255 of file script.cpp.

◆ op_pushBPNeg()

void Kyra::EMCInterpreter::op_pushBPNeg ( EMCState script)
private

Definition at line 251 of file script.cpp.

◆ op_pushReg()

void Kyra::EMCInterpreter::op_pushReg ( EMCState script)
private

Definition at line 247 of file script.cpp.

◆ op_pushRetOrPos()

void Kyra::EMCInterpreter::op_pushRetOrPos ( EMCState script)
private

Definition at line 226 of file script.cpp.

◆ op_setRetAndJmp()

void Kyra::EMCInterpreter::op_setRetAndJmp ( EMCState script)
private

Definition at line 435 of file script.cpp.

◆ op_setRetValue()

void Kyra::EMCInterpreter::op_setRetValue ( EMCState script)
private

Definition at line 222 of file script.cpp.

◆ op_subSP()

void Kyra::EMCInterpreter::op_subSP ( EMCState script)
private

Definition at line 295 of file script.cpp.

◆ op_sysCall()

void Kyra::EMCInterpreter::op_sysCall ( EMCState script)
private

Definition at line 299 of file script.cpp.

◆ run()

bool Kyra::EMCInterpreter::run ( EMCState script)

Definition at line 181 of file script.cpp.

◆ start()

bool Kyra::EMCInterpreter::start ( EMCState script,
int  function 
)

Definition at line 155 of file script.cpp.

◆ unload()

void Kyra::EMCInterpreter::unload ( EMCData data)

Definition at line 135 of file script.cpp.

Member Data Documentation

◆ _filename

const char* Kyra::EMCInterpreter::_filename
protected

Definition at line 125 of file script.h.

◆ _opcodes

const OpcodeEntry* Kyra::EMCInterpreter::_opcodes
protected

Definition at line 136 of file script.h.

◆ _parameter

int16 Kyra::EMCInterpreter::_parameter
protected

Definition at line 123 of file script.h.

◆ _scriptData

EMCData* Kyra::EMCInterpreter::_scriptData
protected

Definition at line 126 of file script.h.

◆ _vm

KyraEngine_v1* Kyra::EMCInterpreter::_vm
protected

Definition at line 122 of file script.h.


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