freg
0.3
Free-Roaming Elementary Game
|
This class provides base for all screens for freg. More...
#include <VirtScreen.h>
Public Slots | |
virtual void | Notify (QString) const =0 |
This is called for a notification to be displayed. More... | |
virtual void | PassString (QString &) const =0 |
This is called when string is needed to be received from input. More... | |
virtual void | Update (int x, int y, int z)=0 |
This is called when block at (x, y, z) should be updated in screen. More... | |
virtual void | UpdateAll ()=0 |
This is called when all world should be updated in sceen. More... | |
virtual void | Move (int)=0 |
Called when world loaded zone is moved to update world in screen. More... | |
virtual void | UpdatePlayer ()=0 |
Called when some player property needs to be updated in screen. More... | |
virtual void | UpdateAround (int x, int y, int z, int rng)=0 |
Called when area around xyz with range needs to be updated. More... | |
virtual void | UpdatesEnd () |
This is called when current group of updates is ended. More... | |
void | DeathScreen () |
This is called when player is dead, and displayed until respawn. More... | |
virtual void | ActionXyz (int *x, int *y, int *z) const |
Used to get player focus coordinates from screen. More... | |
virtual void | DisplayFile (QString path) |
This shows a file by path. More... | |
Signals | |
void | ExitReceived () |
This is emitted when input receives exit key. More... | |
Public Member Functions | |
VirtScreen (World *, Player *) | |
Constructor makes player and world connections. More... | |
VirtScreen (VirtScreen &)=delete | |
virtual | ~VirtScreen () |
Static Public Member Functions | |
static char | CharName (int kind, int sub) |
static int | Color (int kind, int sub) |
Protected Member Functions | |
World * | GetWorld () const |
Protected Attributes | |
World *const | w |
Player *const | player |
QSettings | settings |
QString | previousCommand |
Private Slots | |
virtual void | Print ()=0 |
Prints world. Should not be called not within screen. More... | |
Private Member Functions | |
VirtScreen (const VirtScreen &)=delete | |
VirtScreen & | operator= (const VirtScreen &)=delete |
This class provides base for all screens for freg.
It provides interface for world-screen and player-screen communications by its slots and signals.
Definition at line 104 of file VirtScreen.h.
Constructor makes player and world connections.
Constructor of non-virtual screen should contain this code to connect to player for sending input: connect(this, SIGNAL(InputReceived(int, int)), player, SLOT(Act(int, int)), Qt::DirectConnection);
Definition at line 29 of file VirtScreen.cpp.
|
delete |
|
virtual |
Definition at line 66 of file VirtScreen.cpp.
|
privatedelete |
|
virtualslot |
Used to get player focus coordinates from screen.
x, y, z are coordinates where player will make action. May be reimplemented in derivative class to get xyz other than world direction-based focus.
Definition at line 70 of file VirtScreen.cpp.
|
static |
Definition at line 131 of file VirtScreen.cpp.
|
static |
Definition at line 76 of file VirtScreen.cpp.
|
slot |
This is called when player is dead, and displayed until respawn.
Definition at line 27 of file VirtScreen.cpp.
|
virtualslot |
This shows a file by path.
Standard (non-reimpemented) version does nothing.
Definition at line 68 of file VirtScreen.cpp.
|
signal |
This is emitted when input receives exit key.
This is connected to application exit.
|
protected |
Definition at line 74 of file VirtScreen.cpp.
|
pure virtualslot |
Called when world loaded zone is moved to update world in screen.
When implemented, this should work fast. It is connected to world in constructor.
Definition at line 197 of file VirtScreen.cpp.
|
pure virtualslot |
This is called for a notification to be displayed.
Definition at line 201 of file VirtScreen.cpp.
|
privatedelete |
|
pure virtualslot |
This is called when string is needed to be received from input.
It is connected to world in constructor.
Definition at line 202 of file VirtScreen.cpp.
|
privatepure virtualslot |
Prints world. Should not be called not within screen.
Definition at line 200 of file VirtScreen.cpp.
|
pure virtualslot |
This is called when block at (x, y, z) should be updated in screen.
When implemented, this should work fast. It is connected to world in constructor.
Definition at line 195 of file VirtScreen.cpp.
|
pure virtualslot |
This is called when all world should be updated in sceen.
When implemented, this should work fast. It is connected to world in constructor.
Definition at line 196 of file VirtScreen.cpp.
|
pure virtualslot |
Called when area around xyz with range needs to be updated.
When implemented, this should work fast. It is connected to world in constructor.
Definition at line 199 of file VirtScreen.cpp.
|
pure virtualslot |
Called when some player property needs to be updated in screen.
When implemented, this should work fast. It is connected to world in constructor.
Definition at line 198 of file VirtScreen.cpp.
|
virtualslot |
This is called when current group of updates is ended.
This is called from world when pack of world changing is ended. ( Can be used in screen optimization. )
Definition at line 26 of file VirtScreen.cpp.
|
protected |
Definition at line 190 of file VirtScreen.h.
|
protected |
Definition at line 192 of file VirtScreen.h.
|
protected |
Definition at line 191 of file VirtScreen.h.
|
protected |
Definition at line 189 of file VirtScreen.h.