cController Class Reference

#include <cController.h>

Inheritance diagram for cController:
cComputer

List of all members.

Public Types

enum  Opcodes {
  WAIT, ATTACK, FOLLOW, GOTO,
  REPEAT, OPCODE_MAX
}
 

Available opcodes of stack-machine.


Public Member Functions

 cController (cObject *entity, bool enabled=true)
 Initialises a en-/disabled controller for the given entity->.
void process (float spf=1.0f)
 Do a single Instruction step as the top frame on the stack says.
void drawHUD ()
 Currently there is no hud but needed to implement cComputer interface.
void printState ()
 Print out State and Stackinformation.
void pushWaitEvent (long mseconds=-1, bool patrol=true)
void waitEvent ()
void pushAttackEnemy (OID entity)
void attackEnemy ()
void pushFollowLeader (OID entity, bool patrol=true)
void followLeader ()
void pushGotoDestination (float *v, bool patrol=true)
void gotoDestination ()
void pushRepeatInstructions (int n)
void repeatInstructions ()

Public Attributes

bool mEnabled
cObjectmDevice
std::vector< OID > mStack

Protected Member Functions

std::string getFrameName ()
unsigned int getFrameSizeOf (int opcode)
unsigned int getFrameSize ()
void setParameter (int offset, OID value)
OID getParameter (int offset)
void push (OID value)
void pop ()

Detailed Description

Autopilot/AI object controller, controlls usualy Mechs. Implements an stack-automaton for object behavior control and plan execution.


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

Generated on Tue Feb 16 18:32:39 2010 for Linwarrior 3D by  doxygen 1.6.1