From Project X Wiki
Jump to: navigation, search

Environment class, controls gravity , wind, collisions.


class CEnv
  int LastObj;
  int Last44;
  int Last40;
  fixed LastX;
  fixed LastY;
  CObjList Objs;
  CObjList ObjsL;
  fixed Water;
  fixed Gravity;
  fixed Wind;
  int *Game;

Objs: List of all physical (CGObject class) objects.

ObjsL[32]: Same objects, but splitted into 32 lists by collision masks' index

Water: Physical level of water, doesn't affect visible level and borders of screen

Gravity: Gravity. Note : this variable is updated by WA sometimes. Default is 0.24, LG changes it to 0.12

Wind: Wind. Note : visible wind bar wouldn't be updated if you'll change this.


class CEnv
  CGObject CheckCollision(CGObject* Object, fixed x, fixed y);
  CGObject CheckCollisionEx(CGObject* Object, fixed x, fixed y, CColMask* mask, int  colflags);
  void PhysicsTick()
  void ObjectTick(CGObject* obj, int objIndex);