Super Derpy: Muffin Attack
 All Classes Files Functions Variables Enumerations Macros
Public Attributes
Obstacle Struct Reference

Structure representing obstacles and power-ups flying through the level. More...

#include <main.h>

List of all members.

Public Attributes

ALLEGRO_BITMAP ** bitmap
float x
float y
float speed
float angle
int points
bool hit
int cols
int rows
int pos
int blanks
float tmp_pos
float anim_speed
void(* callback )(struct Game *, struct Obstacle *)
void * data
struct Obstacleprev
struct Obstaclenext

Detailed Description

Structure representing obstacles and power-ups flying through the level.


Member Data Documentation

float Obstacle::angle

Angle of bitmap rotation in radians.

float Obstacle::anim_speed

Speed of spritesheet animation.

ALLEGRO_BITMAP** Obstacle::bitmap

Pointer to bitmap used by obstacle.

int Obstacle::blanks

Number of blank frames at the end of the spritesheet.

void(* Obstacle::callback)(struct Game *, struct Obstacle *)

Pointer to function called to update obstacle position, animate it, etc.

int Obstacle::cols

Number of columns in spritesheet.

void* Obstacle::data

Pointer passed to callback function.

bool Obstacle::hit

Indicates if this obstacle was already hit by the player or not.

struct Obstacle* Obstacle::next

Next obstacle on the list.

int Obstacle::points

Number of points given when hit by player. Positive gives HP to power, negative takes it.

int Obstacle::pos

Current position in spritesheet.

struct Obstacle* Obstacle::prev

Previous obstacle on the list.

int Obstacle::rows

Number of rows in spritesheet.

float Obstacle::speed

Horizontal speed of obstracle.

float Obstacle::tmp_pos

Temporary counter used to slow down spritesheet animation.

float Obstacle::x

Horizontal position on the screen, in range 0-100.

float Obstacle::y

Vertical position on the screen, in range 0-100.


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