ScummVM API documentation
Prince::Hero Class Reference

Public Types

enum  State {
  kHeroStateStay, kHeroStateTurn, kHeroStateMove, kHeroStateBore,
  kHeroStateSpec, kHeroStateTalk, kHeroStateMvan, kHeroStateTran,
  kHeroStateRun, kHeroStateDelayMove
}
 
enum  Direction { kHeroDirLeft = 1, kHeroDirRight = 2, kHeroDirUp = 3, kHeroDirDown = 4 }
 
enum  MoveSet {
  kMove_SL, kMove_SR, kMove_SU, kMove_SD,
  kMove_ML, kMove_MR, kMove_MU, kMove_MD,
  kMove_TL, kMove_TR, kMove_TU, kMove_TD,
  kMove_MLU, kMove_MLD, kMove_MLR, kMove_MRU,
  kMove_MRD, kMove_MRL, kMove_MUL, kMove_MUR,
  kMove_MUD, kMove_MDL, kMove_MDR, kMove_MDU,
  kMove_BORED1, kMove_BORED2
}
 
enum  AttrId { kHeroLastDir = 26, kHeroAnimSet = 120 }
 

Public Member Functions

uint16 getData (AttrId dataId)
 
 Hero (PrinceEngine *vm, GraphicsMan *graph)
 
bool loadAnimSet (uint32 heroAnimNumber)
 
Graphics::SurfacegetSurface ()
 
void setPos (int16 x, int16 y)
 
void setVisible (bool flag)
 
void showHero ()
 
void drawHero ()
 
void freeZoomedSurface ()
 
void heroStanding ()
 
void heroMoveGotIt (int x, int y, int dir)
 
int rotateHero (int oldDirection, int newDirection)
 
void scrollHero ()
 
void setScale (int8 zoomBitmapValue)
 
int getScaledValue (int size)
 
void selectZoom ()
 
void countDrawPosition ()
 
Graphics::SurfacezoomSprite (Graphics::Surface *heroFrame)
 
void line (int x1, int y1, int x2, int y2)
 
void plotPoint (int x, int y)
 
void drawHeroShadow (Graphics::Surface *heroFrame)
 
void freeOldMove ()
 
void freeHeroAnim ()
 

Static Public Member Functions

static void showHeroShadow (Graphics::Surface *screen, DrawNode *drawNode)
 

Public Attributes

uint16 _number
 
uint16 _visible
 
int16 _state
 
int16 _middleX
 
int16 _middleY
 
int16 _moveSetType
 
int16 _frameXSize
 
int16 _frameYSize
 
int16 _scaledFrameXSize
 
int16 _scaledFrameYSize
 
int16 _drawX
 
int16 _drawY
 
int16 _drawZ
 
byte * _coords
 
byte * _dirTab
 
byte * _currCoords
 
byte * _currDirTab
 
int16 _lastDirection
 
int16 _destDirection
 
int16 _leftRightMainDir
 
int16 _upDownMainDir
 
int32 _phase
 
int16 _step
 
int16 _maxBoredom
 
int16 _boredomTime
 
uint16 _boreNum
 
int16 _talkTime
 
Animation_specAnim
 
Graphics::Surface_zoomedHeroSurface
 
uint16 _currHeight
 
Common::Array< byte > _inventory
 
Common::Array< byte > _inventory2
 
int _color
 
uint32 _animSetNr
 
Common::Array< Animation * > _moveSet
 
uint32 _moveDelay
 
uint32 _shadMinus
 

Static Public Attributes

static const uint32 kMoveSetSize = 26
 
static const int16 kStepLeftRight = 8
 
static const int16 kStepUpDown = 4
 
static const int16 kHeroShadowZ = 2
 

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