Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

hero.h File Reference

Hero-related stuff. More...


Enumerations

enum  {
  MODE_NORMAL = 0,
  MODE_JUMPING
}
 Hero movement modes.

enum  EJump {
  JUMP_NORMAL,
  JUMP_POWERBOOTS
}
 Jump modes.


Functions

void HeroSetJumpMode (EJump eJump)
 Set hero's current jump mode (i.e. normal height jump, or higher jump with powerboots).

void HeroStartJump ()
 Start hero jump.

void HeroCancelJump ()
 Cancel an in-progress jump (e.g. if hero gets hurt).

void HeroUpdateJump ()
 Update one frame of hero's jump.

void HeroUpdate ()
void HeroFreeze (int n)
 "Freeze" hero's movement for next n frames (e.g. if teleporting or exit activated).

void HeroUnfreeze ()
 Unfreeze hero's movement.

bool HeroIsFrozen ()
 Test if hero is currently frozen.

void HeroReset ()
 Reset hero state on start of level.

void relocate_hero (int xnew, int ynew)
 Set the hero's position in level block coordinates.

int move_hero (int xdiff, int ydiff, bool bChangeLookDirection=true)
 Attempt to move the hero.


Variables

int hero_mode
 Hero movement mode.

int nHurtCounter
 When hero is hurt, this is set to a positive "framecount" that counts down. Can't get hurt again until it reaches 0.

int x
 Hero's absolute x position, in level block coordinates.

int y
 Hero's absolute y position, in level block coordinates.

int x_small
 x_small == 0 ? hero at x : hero at x + 8 pixels.

int xo
 xo,yo = top-left corner of view for scrolling.

int hero_picoffs
 hero animation image index offset.

int hero_dir
 hero direction, left==0, right==1.

int yo
 xo,yo = top-left corner of view for scrolling.

int xo_small
 View offset by 8 pixels?

int foocount
 Some sort of disgusting hack that must be fixed (fixme).


Detailed Description

Hero-related stuff.

Author:
David Joffe

Copyright (C) 2001 David Joffe

License: GNU GPL Version 2 (*not* "later versions")


http://www.scorpioncity.com/djgame.html
Copyright (C) David Joffe. Generated: 23 Sep 2001