Engine::InputDeviceReplay Class Reference

A input device that repeats a recording. More...

#include <InputDeviceReplay.h>

Inheritance diagram for Engine::InputDeviceReplay:

Engine::InputDevice List of all members.

Public Member Functions

 InputDeviceReplay ()
 ~InputDeviceReplay ()
int get_acceleration ()
 Get a number representing the acceleration or breaking.
int get_slide ()
 Sideways force .
int get_steering ()
 Stearing angle.
void relay (InputReport::ReportType report_type, unsigned int value)
 Make an input report.

Private Attributes

int steering
int acceleration
int slide

Detailed Description

A input device that repeats a recording.

This is generally used to repeat what a different input device once did. AI should be deterministic, so that they don't need to be recorded. This should make the replays take less space.

The InputDeviceReplay doesn't do much work, since the ReplayReader reads events off a file and handles the timing and device identification stuff.

Definition at line 28 of file InputDeviceReplay.h.


Constructor & Destructor Documentation

Engine::InputDeviceReplay::InputDeviceReplay (  ) 

Definition at line 19 of file InputDeviceReplay.cpp.

Engine::InputDeviceReplay::~InputDeviceReplay (  ) 

Definition at line 26 of file InputDeviceReplay.cpp.


Member Function Documentation

int Engine::InputDeviceReplay::get_acceleration (  )  [virtual]

Get a number representing the acceleration or breaking.

Returns:
A number from -32767 to 32767 giving the amount of accelerating or breaking to do: 0 if not accelerating or braking, a negative value for breaking, a positive value for acceleration.

Implements Engine::InputDevice.

Definition at line 35 of file InputDeviceReplay.cpp.

int Engine::InputDeviceReplay::get_slide (  )  [virtual]

Sideways force .

Returns:
a number between -32767 (maximum left) and +32767 (maximum right). 0 indicates no sliding.

Implements Engine::InputDevice.

Definition at line 40 of file InputDeviceReplay.cpp.

int Engine::InputDeviceReplay::get_steering (  )  [virtual]

Stearing angle.

Returns:
a number between -32767 (maximum left) and 32767 (maximum right). 0 is straight ahead.

Implements Engine::InputDevice.

Definition at line 30 of file InputDeviceReplay.cpp.

void Engine::InputDeviceReplay::relay ( InputReport::ReportType  report_type,
unsigned int  value 
)

Make an input report.

Definition at line 45 of file InputDeviceReplay.cpp.


Member Data Documentation

int Engine::InputDeviceReplay::acceleration [private]

Definition at line 39 of file InputDeviceReplay.h.

int Engine::InputDeviceReplay::slide [private]

Definition at line 39 of file InputDeviceReplay.h.

int Engine::InputDeviceReplay::steering [private]

Definition at line 39 of file InputDeviceReplay.h.


The documentation for this class was generated from the following files:
Get Racer at SourceForge.net. Fast, secure and Free Open Source software downloads

Generated at Mon Sep 6 00:41:17 2010 by Doxygen version 1.4.7 for Racer version svn335.