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

Classes

struct  MenuButton
 
struct  StorkParam
 

Public Member Functions

 OnceUpon (GobEngine *vm)
 
- Public Member Functions inherited from Gob::PreGob
 PreGob (GobEngine *vm)
 
virtual void run ()=0
 

Static Public Attributes

static const uint kLanguageCount = 5
 

Protected Member Functions

void init ()
 
void deinit ()
 
bool doCopyProtection (const uint8 colors[7], const uint8 shapes[7 *20], const uint8 obfuscate[4])
 
void showIntro ()
 
void doStartMenu (const MenuButton *animalsButton, uint animalCount, const MenuButton *animalButtons, const char *const *animalNames)
 
void playGame ()
 
virtual const StorkParamgetStorkParameters () const =0
 
- Protected Member Functions inherited from Gob::PreGob
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
 
GCTFileloadGCT (const Common::String &gctFile) const
 

Additional Inherited Members

- Protected Types inherited from Gob::PreGob
typedef Common::Array< ANIObject * > ANIList
 
- Protected Attributes inherited from Gob::PreGob
GobEngine_vm
 
- Static Protected Attributes inherited from Gob::PreGob
static const char kLanguageSuffixShort [5]
 
static const char * kLanguageSuffixLong [5]
 

Member Function Documentation

◆ doCopyProtection()

bool Gob::OnceUpon::OnceUpon::doCopyProtection ( const uint8  colors[7],
const uint8  shapes[7 *20],
const uint8  obfuscate[4] 
)
protected

Handle the copy protection.

Parameters
colorsColors the copy protection animals can be.
shapesThe shape that's the correct answer for each animal in each color.
obfuscateExtra obfuscate table. correctShape = shapes[colors][obfuscate[animal]].
Returns
true if the user guessed the correct shape, false otherwise.

◆ showIntro()

void Gob::OnceUpon::OnceUpon::showIntro ( )
protected

Show the intro.

◆ doStartMenu()

void Gob::OnceUpon::OnceUpon::doStartMenu ( const MenuButton animalsButton,
uint  animalCount,
const MenuButton animalButtons,
const char *const *  animalNames 
)
protected

Handle the start menu.

Parameters
animalsButtonDefinition of the menu button that leads to the animal names screen. Can be 0.
animalCountNumber of animals in the animal names screen.
animalButtonsDefinition of the buttons that make up the animals in the animal names screen.
animalNamesFile prefixes for the name of each animal.

◆ playGame()

void Gob::OnceUpon::OnceUpon::playGame ( )
protected

Play the game proper.

◆ getStorkParameters()

virtual const StorkParam& Gob::OnceUpon::OnceUpon::getStorkParameters ( ) const
protectedpure virtual

Return the parameters for the stork section.

Implemented in Gob::OnceUpon::Abracadabra, and Gob::OnceUpon::BabaYaga.

Member Data Documentation

◆ kLanguageCount

const uint Gob::OnceUpon::OnceUpon::kLanguageCount = 5
static

Number of languages we support.


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