kgoldrunner
kgrlevelplayer.h
Go to the documentation of this file.
void prepareToPlay()
Indicate that setup is complete and the human player can start playing at any time, by moving the pointer device or pressing a key.
Definition: kgrlevelplayer.cpp:360
void unstackEnemy(const int spriteId, const int gridI, const int gridJ, const int prevEnemy)
Helper function to remove an enemy from among several stacked in a cell.
Definition: kgrlevelplayer.cpp:728
bool heroCaught(const int heroX, const int heroY)
Helper function to determine whether the hero has collided with an enemy and must lose a life (unless...
Definition: kgrlevelplayer.cpp:632
void endLevel(const int result)
void enemyReappear(int &gridI, int &gridJ)
Helper function to determine where an enemy should reappear after being trapped in a brick...
Definition: kgrlevelplayer.cpp:880
Class to play, record and play back a level of a game.
Definition: kgrlevelplayer.h:65
Definition: kgrlevelgrid.h:27
void setHoldKeyOption(const int option)
Change the keyboard click/hold option during play.
Definition: kgrlevelplayer.cpp:1175
int runnerGotGold(const int spriteId, const int i, const int j, const bool hasGold, const bool lost=false)
Helper function for an enemy to pick up or drop gold or the hero to collect gold. ...
Definition: kgrlevelplayer.cpp:820
void interruptPlayback()
Stop playback of a recorded level and adjust the content of the recording so that the user can contin...
Definition: kgrlevelplayer.cpp:1065
bool bumpingFriend(const int spriteId, const Direction dirn, const int gridI, const int gridJ)
Helper function to determine whether an enemy is colliding with another enemy.
Definition: kgrlevelplayer.cpp:672
void deleteSprite(const int spriteId)
void getMousePos(int &i, int &j)
Definition: kgrrulebook.h:30
void dbgControl(int code)
Implement author's debugging aids, which are activated only if the level is paused and the KConfig fi...
Definition: kgrlevelplayer.cpp:1198
void gotGold(const int spriteId, const int i, const int j, const bool hasGold, const bool lost)
KGrRecording structure: contains a record of play in a KGoldrunner level.
Definition: kgrglobals.h:115
void setDirectionByKey(const Direction dirn, const bool pressed)
Set a direction for the hero to move or dig when using keyboard control.
Definition: kgrlevelplayer.cpp:440
void setTimeScale(const int timeScale)
Set the overall speed of gameplay.
Definition: kgrlevelplayer.cpp:1185
Definition: kgrtimer.h:25
uchar randomByte(const uchar limit)
Helper function to provide enemies with random numbers for reappearing and deciding whether to pick u...
Definition: kgrlevelplayer.cpp:925
Direction getDirection(int heroI, int heroJ)
Helper function for the hero to find his next direction when using mouse or touchpad control...
Definition: kgrlevelplayer.cpp:480
KGrLevelPlayer(QObject *parent, KRandomSequence *pRandomGen)
The constructor of KGrLevelPlayer.
Definition: kgrlevelplayer.cpp:38
int makeSprite(char spriteType, int i, int j)
void killHero()
If not in playback mode, add a code to the recording and kill the hero.
Definition: kgrlevelplayer.cpp:1154
void paintCell(int i, int j, char tileType)
Requests the view to display a particular type of tile at a particular cell, or make it empty and sho...
void setMousePos(const int i, const int j)
Definition: kgrview.h:27
void interruptDemo()
void setControlMode(const int mode)
Change the input-mode during play.
Definition: kgrlevelplayer.cpp:1165
void startAnimation(const int spriteId, const bool repeating, const int i, const int j, const int time, const Direction dirn, const AnimationType type)
Requests the view to display an animation of a dug brick at a particular cell, cancelling and superse...
QObject * parent() const
Direction getEnemyDirection(int enemyI, int enemyJ, bool leftRightSearch)
Helper function for an enemy to find his next direction, based on where the hero is and the search al...
Definition: kgrlevelplayer.cpp:621
void setTarget(int pointerI, int pointerJ)
Set a point for the hero to aim at when using mouse or touchpad control.
Definition: kgrlevelplayer.cpp:378
KGrEnemy * standOnEnemy(const int spriteId, const int x, const int y)
Helper function to determine whether the hero or an enemy is standing on an enemy's head...
Definition: kgrlevelplayer.cpp:652
void init(KGrView *view, KGrRecording *pRecording, const bool pPlayback, const bool gameFrozen)
The main initialisation of KGrLevelPlayer.
Definition: kgrlevelplayer.cpp:100
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:24 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:18:24 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.