PGE Engine
 All Classes Namespaces Files Functions Variables Enumerations Enumerator Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
LevelScene Class Reference
Inheritance diagram for LevelScene:
Scene

Public Types

enum  NpcSpawnType { GENERATOR_APPEAR =0, GENERATOR_WARP, GENERATOR_PROJECTILE }
 
enum  NpcSpawnDirection { SPAWN_LEFT =2, SPAWN_RIGHT =4, SPAWN_UP =1, SPAWN_DOWN =3 }
 
typedef QVector< LVL_Player * > LVL_PlayersArray
 
typedef QVector< LVL_Block * > LVL_BlocksArray
 
typedef QVector< LVL_Bgo * > LVL_BgosArray
 
typedef QVector< LVL_Npc * > LVL_NpcsArray
 
typedef QVector< LVL_Warp * > LVL_WarpsArray
 
typedef QVector< LVL_PhysEnv * > LVL_PhysEnvsArray
 
typedef double RPoint [2]
 
- Public Types inherited from Scene
enum  TypeOfScene {
  _Unknown =0, Loading, Title, Level,
  World, Credits, GameOver
}
 
typedef QList< Scene_EffectSceneEffectsArray
 

Public Member Functions

bool init ()
 
bool init_items ()
 
bool loadFile (QString filePath)
 
bool loadFileIP ()
 Load data via interprocessing.
 
bool setEntrance (int entr)
 
PlayerPoint getStartLocation (int playerID)
 
bool loadConfigs ()
 
void onKeyboardPressedSDL (SDL_Keycode sdl_key, Uint16 modifier)
 Triggering when pressed any key on keyboard.
 
void onMousePressed (SDL_MouseButtonEvent &mbevent)
 
void onMouseMoved (SDL_MouseMotionEvent &mvevent)
 
void onMouseReleased (SDL_MouseButtonEvent &mvevent)
 
LuaEnginegetLuaEngine ()
 
void update ()
 
void processEvents ()
 
void render ()
 
int exec ()
 
void tickAnimations (float ticks)
 
QString getLastError ()
 
int findNearestSection (long x, long y)
 
bool isExit ()
 
int exitType ()
 
void setExiting (int delay, int reason)
 
QString toAnotherLevel ()
 
int toAnotherEntrance ()
 
PGE_Point toWorldXY ()
 
void collectGarbageNPCs ()
 
void collectGarbagePlayers ()
 
void drawLoader ()
 
void setLoaderAnimation (int speed)
 
void stopLoaderAnimation ()
 
void destroyLoaderTexture ()
 
void loaderTick ()
 
void loaderStep ()
 
LevelDatalevelData ()
 
void toggleSwitch (int switch_id)
 
void placeBlock (LevelBlock blockData)
 
void placeBGO (LevelBGO bgoData)
 
void placeNPC (LevelNPC npcData)
 
void addPlayer (PlayerPoint playerData, bool byWarp=false, int warpType=0, int warpDirect=0)
 
LVL_BlockspawnBlock (LevelBlock blockData)
 
LVL_BgospawnBGO (LevelBGO bgoData)
 
LVL_NpcspawnNPC (LevelNPC npcData, NpcSpawnType sp_type, NpcSpawnDirection sp_dir, bool reSpawnable=false)
 
void process_InterprocessCommands ()
 
void drawPlacingItem ()
 
void placeItemByMouse (int x, int y)
 
void destroyBlock (LVL_Block *&_block)
 
void setGameState (EpisodeState *_gameState)
 
LVL_SectiongetSection (int sct)
 
EpisodeStategetGameState ()
 
bool isVizibleOnScreen (PGE_RectF &rect)
 
bool isVizibleOnScreen (double x, double y, double w, double h)
 
void processPhysics (float ticks)
 
void registerElement (PGE_Phys_Object *item)
 
void unregisterElement (PGE_Phys_Object *item)
 
void queryItems (PGE_RectF &zone, QVector< PGE_Phys_Object * > *resultList)
 
void queryItems (double x, double y, QVector< PGE_Phys_Object * > *resultList)
 
LVL_PlayersArray & getPlayers ()
 
LVL_NpcsArray & getNpcs ()
 
LVL_NpcsArray & getActiveNpcs ()
 
- Public Member Functions inherited from Scene
void updateTickValue ()
 
 Scene (TypeOfScene _type)
 
virtual void onKeyInput (int key)
 Triggering when pressed game specific key.
 
virtual void onKeyboardPressed (SDL_Scancode scancode)
 Triggering when pressed any key on keyboard.
 
virtual void onKeyboardReleased (SDL_Scancode scancode)
 Triggering when pressed any key on keyboard.
 
virtual void onKeyboardReleasedSDL (SDL_Keycode sdl_key, Uint16 modifier)
 Triggering when pressed any key on keyboard.
 
virtual void onMouseWheel (SDL_MouseWheelEvent &wheelevent)
 
virtual void updateLua ()
 
virtual void renderMouse ()
 
TypeOfScene type ()
 
void addRenderFunction (const std::function< void()> &renderFunc)
 
void clearRenderFunctions ()
 
bool isExiting ()
 
bool doShutDown ()
 
bool isOpacityFadding ()
 
void setFade (int speed, float target, float step)
 
void launchStaticEffect (long effectID, float startX, float startY, int animationLoops, int delay, float velocityX, float velocityY, float gravity, int direction=0, Scene_Effect_Phys phys=Scene_Effect_Phys())
 launchStaticEffect Starts static effect by ID at position X,Y relative to left-top corner of effect picture More...
 
void launchStaticEffectC (long effectID, float startX, float startY, int animationLoops, int delay, float velocityX, float velocityY, float gravity, int direction=0, Scene_Effect_Phys phys=Scene_Effect_Phys())
 launchStaticEffectC Starts static effect by ID at position X,Y relative to center of effect picture More...
 
void processEffects (float ticks)
 
QString errorString ()
 

Static Public Member Functions

static int init_thread (void *self)
 
static unsigned int nextLoadAniFrame (unsigned int x, void *p)
 

Public Attributes

SDL_Thread * initializer_thread
 
QHash< int, LVL_PlayerDefplayer_defs
 
PGE_Texture TextureBuffer [3]
 
bool isTimeStopped
 
bool isLevelContinues
 
QString warpToLevelFile
 
long lastWarpID
 
int warpToArrayID
 
bool warpToWorld
 
PGE_Point warpToWorldXY
 
float exitLevelDelay
 
int exitLevelCode
 
int numberOfPlayers
 
Controllerplayer1Controller
 
Controllerplayer2Controller
 
int loaderSpeed
 
bool IsLoaderWorks
 
bool doLoaderStep
 
SDL_TimerID loader_timer_id
 
QQueue< transformTask_blockblock_transforms
 
QHash< int, QList< LVL_Block * > > switch_blocks
 
QVector< LVL_Npc * > active_npcs
 
QVector< LVL_Npc * > dead_npcs
 
QVector< LVL_Player * > dead_players
 
QVector< LVL_Block * > fading_blocks
 
bool placingMode
 
int placingMode_item_type
 
LevelBlock placingMode_block
 
LevelBGO placingMode_bgo
 
LevelNPC placingMode_npc
 
PGE_PointF placingMode_renderAt
 
PGE_PointF placingMode_renderOffset
 
PGE_PointF placingMode_drawSize
 
bool placingMode_sizableBlock
 
bool placingMode_rect_draw
 
PGE_PointF placingMode_drawBegin
 
PGE_PointF placingMode_drawEnd
 
bool placingMode_animated
 
int placingMode_animatorID
 
PGE_Texture placingMode_texture
 
EventQueue< LevelScenesystem_events
 
LVL_LayerEngine layers
 
LVL_EventEngine events
 
LVL_PlayersArray players
 
LVL_BlocksArray blocks
 
LVL_BgosArray bgos
 
LVL_NpcsArray npcs
 
LVL_WarpsArray warps
 
LVL_PhysEnvsArray physenvs
 
float globalGravity
 
- Public Attributes inherited from Scene
PGE_Fader fader
 
SceneEffectsArray WorkingEffects
 

Static Public Attributes

static double zCounter =0
 
static const double Z_backImage = -1000
 
static const double Z_BGOBack2 = -160
 
static const double Z_blockSizable = -150
 
static const double Z_BGOBack1 = -100
 
static const double Z_npcBack = -10
 
static const double Z_Block = 1
 
static const double Z_npcStd = 30
 
static const double Z_Player = 35
 
static const double Z_BGOFore1 = 50
 
static const double Z_BlockFore = 100
 
static const double Z_npcFore = 150
 
static const double Z_BGOFore2 = 160
 
static const double Z_sys_PhysEnv = 500
 
static const double Z_sys_door = 700
 
static const double Z_sys_interspace1 = 1000
 
static const double Z_sys_sctBorder = 1020
 

Friends

class LVL_EventEngine
 

Additional Inherited Members

- Protected Types inherited from Scene
typedef
std::chrono::high_resolution_clock 
StClock
 
typedef
std::chrono::high_resolution_clock::time_point 
StTimePt
 
- Protected Member Functions inherited from Scene
void wait (float ms)
 
- Protected Attributes inherited from Scene
bool running
 
bool _doShutDown
 
bool doExit
 
int uTick
 
float uTickf
 
QString _errorString
 

Member Function Documentation

bool LevelScene::init_items ( )

< quit from game if window was closed

< quit from game if window was closed

< quit from game if window was closed

< quit from game if window was closed

< quit from game if window was closed

< quit from game if window was closed

bool LevelScene::loadConfigs ( )

< Blocks

< BGO

< NPC

< Backgrounds

< Effects


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