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

Public Types

enum  directions { left =0, right, up, down }
 
enum  shapes {
  shape_rect = 0, shape_tr_top_left = 1, shape_tr_top_right =-1, shape_tr_bottom_right = 2,
  shape_tr_bottom_left =-2, stape_polygon = 3
}
 
- Public Types inherited from PGE_Phys_Object
enum  Slopes { SLOPE_LEFT =-1, SLOPE_RIGHT =1 }
 
enum  CollisionType { COLLISION_NONE = 0, COLLISION_ANY = 1, COLLISION_TOP = 2, COLLISION_BOTTOM = 3 }
 
enum  types {
  LVLUnknown =0, LVLBlock, LVLBGO, LVLNPC,
  LVLPlayer, LVLEffect, LVLWarp, LVLSpecial,
  LVLPhysEnv
}
 

Public Member Functions

void init ()
 
void transformTo (long id, int type=0)
 
void transformTo_x (long id)
 
void hit (directions _dir=up)
 
void hit (bool isUp, LVL_Player *player, int numHits=1)
 
void destroy (bool playEffect=false)
 
GLdouble zIndex ()
 
void setFade (int speed, float target, float step)
 
bool isFading ()
 
bool tickFader (int ticks)
 
void fadeStep ()
 
void render (double camX, double camY)
 
bool isInited ()
 
long lua_getID ()
 
int lua_contentID_old ()
 
void lua_setContentID_old (int npcid)
 
int lua_contentID ()
 
void lua_setContentID (int npcid)
 
bool lua_invisible ()
 
void lua_setInvisible (bool iv)
 
bool lua_slippery ()
 
void lua_setSlippery (bool sl)
 
bool lua_isSolid ()
 
- Public Member Functions inherited from PGE_Phys_Object
virtual double posX ()
 Position X.
 
virtual double posY ()
 Position Y.
 
double posCenterX ()
 Centered Position X.
 
double posCenterY ()
 Centered Position Y.
 
double width ()
 
double height ()
 
double top ()
 
void setTop (double tp)
 
double bottom ()
 
void setBottom (double btm)
 
double left ()
 
void setLeft (double lf)
 
double right ()
 
void setRight (double rt)
 
void setSize (float w, float h)
 
void setWidth (float w)
 
void setHeight (float h)
 
virtual void setPos (double x, double y)
 
void setPosX (double x)
 
void setPosY (double y)
 
void setCenterPos (double x, double y)
 
void setCenterX (double x)
 
void setCenterY (double y)
 
double speedX ()
 
double speedY ()
 
double speedXsum ()
 
double speedYsum ()
 
void setSpeed (double x, double y)
 
void setSpeedX (double x)
 
void setSpeedY (double y)
 
void setDecelX (double x)
 
void applyAccel (double x, double y)
 
double gravityScale ()
 
void setGravityScale (double scl)
 
float gravityAccel ()
 
void setGravityAccel (float acl)
 
void _syncPosition ()
 
void _syncPositionAndSize ()
 
void _syncSection ()
 
void renderDebug (float _camX, float _camY)
 
void iterateStep (float ticks)
 
virtual void updateCollisions ()
 
virtual void solveCollision (PGE_Phys_Object *collided)
 
PGE_Phys_ObjectnearestBlock (QVector< PGE_Phys_Object * > &blocks)
 
PGE_Phys_ObjectnearestBlockY (QVector< PGE_Phys_Object * > &blocks)
 
bool isWall (QVector< PGE_Phys_Object * > &blocks)
 
bool isFloor (QVector< PGE_Phys_Object * > &blocks, bool *isCliff=0)
 
void setParentSection (LVL_Section *sct)
 
LVL_Sectionsct ()
 
virtual void show ()
 
virtual void hide ()
 
virtual bool isVisible ()
 
virtual void update ()
 
virtual void update (float ticks)
 
bool isPaused ()
 
void setPaused (bool p)
 

Static Public Member Functions

static luabind::scope bindToLua ()
 
- Static Public Member Functions inherited from PGE_Phys_Object
static float SMBXTicksToTime (float ticks)
 

Public Attributes

LevelBlock data
 
bool animated
 
bool sizable
 
long animator_ID
 
float offset_x
 
float offset_y
 
bool isHidden
 
bool destroyed
 
obj_blocksetup
 
int shape
 
double shape_slope_angle_ratio
 
int taskToTransform
 
int taskToTransform_t
 
directions hitDirection
 
float fadeOffset
 
float targetOffset
 
float fade_step
 
int fadeSpeed
 
int manual_ticks
 
- Public Attributes inherited from PGE_Phys_Object
double colliding_xSpeed
 
double colliding_ySpeed
 
bool collided_slope
 
float collided_slope_angle_ratio
 
bool collided_slope_celling
 
float collided_slope_angle_ratio_celling
 
PGE_Phys_Object_Phys phys_setup
 Settings of physics.
 
PGE_RectF posRect
 Real body geometry and position.
 
double _accelX
 Delta of X velocity in a second.
 
double _accelY
 Delta of Y velocity in a second.
 
double _velocityX
 current X speed (pixels per 1/65 of second)
 
double _velocityY
 current Y speed (pixels per 1/65 of second)
 
double _velocityX_prev
 X speed before last itertion step (pixels per 1/65 of second)
 
double _velocityY_prev
 Y speed before last itertion step (pixels per 1/65 of second)
 
double _velocityX_add
 additional X acceleration
 
double _velocityY_add
 additional Y acceleration
 
double _posX
 Synchronized with R-Tree position.
 
double _posY
 Synchronized with R-Tree position.
 
double _width
 Synchronized with R-Tree Width.
 
double _height
 Synchronized with R-Tree Height.
 
double _width_half
 Half of width.
 
double _height_half
 Half of height.
 
double _realWidth
 Width prepared to synchronize with R-Tree.
 
double _realHeight
 Height prepared to synchronize with R-Tree.
 
LVL_Section_parentSection
 
int type
 
int collide_player
 
int collide_npc
 
bool slippery_surface
 
bool isRectangle
 
PGE_Texture texture
 
GLuint texId
 
GLdouble z_index
 
bool _is_visible
 

Additional Inherited Members

- Static Public Attributes inherited from PGE_Phys_Object
static const float _smbxTickTime =1000.f/65.f
 

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