ScummVM API documentation
Awe::Script Struct Reference

Public Types

enum  ScriptVars {
  VAR_RANDOM_SEED = 0x3C, VAR_SCREEN_NUM = 0x67, VAR_LAST_KEYCHAR = 0xDA, VAR_HERO_POS_UP_DOWN = 0xE5,
  VAR_MUSIC_SYNC = 0xF4, VAR_SCROLL_Y = 0xF9, VAR_HERO_ACTION = 0xFA, VAR_HERO_POS_JUMP_DOWN = 0xFB,
  VAR_HERO_POS_LEFT_RIGHT = 0xFC, VAR_HERO_POS_MASK = 0xFD, VAR_HERO_ACTION_POS_MASK = 0xFE, VAR_PAUSE_SLICES = 0xFF
}
 
typedef void(Script::* OpcodeStub) ()
 

Public Member Functions

 Script (Sound *snd, Resource *res, SfxPlayer *ply, Video *vid)
 
void init ()
 
void op_movConst ()
 
void op_mov ()
 
void op_add ()
 
void op_addConst ()
 
void op_call ()
 
void op_ret ()
 
void op_yieldTask ()
 
void op_jmp ()
 
void op_installTask ()
 
void op_jmpIfVar ()
 
void op_condJmp ()
 
void op_setPalette ()
 
void op_changeTasksState ()
 
void op_selectPage ()
 
void op_fillPage ()
 
void op_copyPage ()
 
void op_updateDisplay ()
 
void op_removeTask ()
 
void op_drawString ()
 
void op_sub ()
 
void op_and ()
 
void op_or ()
 
void op_shl ()
 
void op_shr ()
 
void op_playSound ()
 
void op_updateResources ()
 
void op_playMusic ()
 
void restartAt (int part, int pos=-1)
 
void setupPart (int num)
 
void setupTasks ()
 
void runTasks ()
 
void executeTask ()
 
void updateInput ()
 
void inp_handleSpecialKeys ()
 
void snd_playSound (uint16 resNum, uint8 freq, uint8 vol, uint8 channel)
 
void snd_playMusic (uint16 resNum, uint16 delay, uint8 pos)
 
void snd_preloadSound (uint16 resNum, const uint8 *data)
 
void fixUpPalette_changeScreen (int part, int screen)
 

Public Attributes

Sound_sound
 
Resource_res
 
SfxPlayer_ply
 
Video_vid
 
SystemStub_stub = nullptr
 
int16 _scriptVars [256] = { 0 }
 
uint16 _scriptStackCalls [64] = { 0 }
 
uint16 _scriptTasks [2][64] = { { 0 } }
 
uint8 _scriptStates [2][64] = { { 0 } }
 
Ptr _scriptPtr
 
uint8 _stackPtr = 0
 
bool _scriptPaused = false
 
bool _fastMode = false
 
int _screenNum = 0
 
bool _is3DO = false
 
uint32 _startTime = 0
 
uint32 _timeStamp = 0
 

Static Public Attributes

static const OpcodeStub OPCODE_TABLE []
 
static const uint16 PERIOD_TABLE []
 
static Difficulty _difficulty
 
static bool _useRemasteredAudio
 

The documentation for this struct was generated from the following file: