ScummVM API documentation
Gob::PreGob Class Referenceabstract
Inheritance diagram for Gob::PreGob:
Gob::OnceUpon::OnceUpon Gob::OnceUpon::Abracadabra Gob::OnceUpon::BabaYaga

Classes

struct  AnimProperties
 

Public Member Functions

 PreGob (GobEngine *vm)
 
virtual void run ()=0
 

Protected Types

typedef Common::Array< ANIObject * > ANIList
 

Protected Member Functions

void initScreen ()
 
void fadeOut ()
 Fade to black.
 
void fadeIn ()
 Fade to the current palette.
 
void clearScreen ()
 
void setPalette (const byte *palette, uint16 size)
 Change the palette. More...
 
void addCursor ()
 
void removeCursor ()
 
void setCursor (Surface &sprite, int16 hotspotX, int16 hotspotY)
 
void setCursor (Surface &sprite, int16 left, int16 top, int16 right, int16 bottom, int16 hotspotX, int16 hotspotY)
 
void showCursor ()
 
void hideCursor ()
 
bool isCursorVisible () const
 
void clearAnim (ANIObject &anim)
 
void drawAnim (ANIObject &anim)
 
void redrawAnim (ANIObject &anim)
 
void clearAnim (const ANIList &anims)
 
void drawAnim (const ANIList &anims)
 
void redrawAnim (const ANIList &anims)
 
void loadAnims (ANIList &anims, ANIFile &ani, uint count, const AnimProperties *props) const
 
void freeAnims (ANIList &anims) const
 
void setAnim (ANIObject &anim, const AnimProperties &props) const
 
void endFrame (bool doInput)
 
void loadSounds (const char *const *sounds, uint soundCount)
 
void freeSounds ()
 
void playSound (uint sound, int16 frequency=0, int16 repCount=0)
 
void stopSound ()
 
void playSoundFile (const Common::String &file, int16 frequency=0, int16 repCount=0, bool interruptible=true)
 
void beep (int16 frequency, int32 length)
 
int16 checkInput (int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons)
 
int16 waitInput (int16 &mouseX, int16 &mouseY, MouseButtons &mouseButtons)
 
int16 waitInput ()
 
bool hasInput ()
 
Common::String getLocFile (const Common::String &file) const
 
TXTFileloadTXT (const Common::String &txtFile, TXTFile::Format format) const
 
virtual void fixTXTStrings (TXTFile &txt) const
 
GCTFileloadGCT (const Common::String &gctFile) const
 

Protected Attributes

GobEngine_vm
 

Static Protected Attributes

static const char kLanguageSuffixShort [5]
 
static const char * kLanguageSuffixLong [5]
 

Member Function Documentation

◆ initScreen()

void Gob::PreGob::initScreen ( )
protected

Initialize the game screen.

◆ setPalette()

void Gob::PreGob::setPalette ( const byte *  palette,
uint16  size 
)
protected

Change the palette.

Change the palette.

Parameters
paletteThe palette to change to.
sizeSize of the palette in colors.

◆ addCursor()

void Gob::PreGob::addCursor ( )
protected

Add a new cursor that can be manipulated to the stack.

◆ removeCursor()

void Gob::PreGob::removeCursor ( )
protected

Remove the top-most cursor from the stack.

◆ setCursor() [1/2]

void Gob::PreGob::setCursor ( Surface sprite,
int16  hotspotX,
int16  hotspotY 
)
protected

Set the current cursor.

◆ setCursor() [2/2]

void Gob::PreGob::setCursor ( Surface sprite,
int16  left,
int16  top,
int16  right,
int16  bottom,
int16  hotspotX,
int16  hotspotY 
)
protected

Set the current cursor.

◆ showCursor()

void Gob::PreGob::showCursor ( )
protected

Show the cursor.

◆ hideCursor()

void Gob::PreGob::hideCursor ( )
protected

Hide the cursor.

◆ isCursorVisible()

bool Gob::PreGob::isCursorVisible ( ) const
protected

Is the cursor currently visible?

◆ clearAnim() [1/2]

void Gob::PreGob::clearAnim ( ANIObject anim)
protected

Remove an animation from the screen.

◆ drawAnim() [1/2]

void Gob::PreGob::drawAnim ( ANIObject anim)
protected

Draw an animation to the screen, advancing it.

◆ redrawAnim() [1/2]

void Gob::PreGob::redrawAnim ( ANIObject anim)
protected

Clear and draw an animation to the screen, advancing it.

◆ clearAnim() [2/2]

void Gob::PreGob::clearAnim ( const ANIList anims)
protected

Remove animations from the screen.

◆ drawAnim() [2/2]

void Gob::PreGob::drawAnim ( const ANIList anims)
protected

Draw animations to the screen, advancing them.

◆ redrawAnim() [2/2]

void Gob::PreGob::redrawAnim ( const ANIList anims)
protected

Clear and draw animations to the screen, advancing them.

◆ endFrame()

void Gob::PreGob::endFrame ( bool  doInput)
protected

Wait for the frame to end, handling screen updates and optionally update input.

◆ loadSounds()

void Gob::PreGob::loadSounds ( const char *const *  sounds,
uint  soundCount 
)
protected

Load all sounds that can be played interactively in the game.

◆ freeSounds()

void Gob::PreGob::freeSounds ( )
protected

Free all loaded sound.

◆ playSound()

void Gob::PreGob::playSound ( uint  sound,
int16  frequency = 0,
int16  repCount = 0 
)
protected

Play a loaded sound.

◆ stopSound()

void Gob::PreGob::stopSound ( )
protected

Stop all sound playback.

◆ playSoundFile()

void Gob::PreGob::playSoundFile ( const Common::String file,
int16  frequency = 0,
int16  repCount = 0,
bool  interruptible = true 
)
protected

Play a sound until it ends or is interrupted by a keypress.

◆ beep()

void Gob::PreGob::beep ( int16  frequency,
int32  length 
)
protected

Beep the PC speaker.

◆ checkInput()

int16 Gob::PreGob::checkInput ( int16 &  mouseX,
int16 &  mouseY,
MouseButtons &  mouseButtons 
)
protected

Check mouse and keyboard input.

◆ waitInput() [1/2]

int16 Gob::PreGob::waitInput ( int16 &  mouseX,
int16 &  mouseY,
MouseButtons &  mouseButtons 
)
protected

Wait for mouse or keyboard input.

◆ waitInput() [2/2]

int16 Gob::PreGob::waitInput ( )
protected

Wait for mouse or keyboard input, but don't care about what was done with the mouse.

◆ hasInput()

bool Gob::PreGob::hasInput ( )
protected

Did we have mouse or keyboard input?

◆ getLocFile()

Common::String Gob::PreGob::getLocFile ( const Common::String file) const
protected

Get the name of a localized file.

◆ loadTXT()

TXTFile* Gob::PreGob::loadTXT ( const Common::String txtFile,
TXTFile::Format  format 
) const
protected

Open a TXT file.

◆ fixTXTStrings()

virtual void Gob::PreGob::fixTXTStrings ( TXTFile txt) const
protectedvirtual

Called by loadTXT() to fix strings within the TXT file.


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