00001 00005 /* Copyright © 2009 James Legg. 00006 This program is free software: you can redistribute it and/or modify 00007 it under the terms of the GNU General Public License as published by 00008 the Free Software Foundation, either version 3 of the License, or 00009 (at your option) any later version. 00010 */ 00011 00012 #include "InputDeviceReplay.h" 00013 #include <Debug.h> 00014 #include "GameObjects/Car.h" 00015 00016 namespace Engine 00017 { 00018 00019 InputDeviceReplay::InputDeviceReplay() 00020 : steering(0) 00021 , acceleration(0) 00022 , slide(0) 00023 { 00024 } 00025 00026 InputDeviceReplay::~InputDeviceReplay() 00027 { 00028 } 00029 00030 int InputDeviceReplay::get_steering() 00031 { 00032 return steering; 00033 } 00034 00035 int InputDeviceReplay::get_acceleration() 00036 { 00037 return acceleration; 00038 } 00039 00040 int InputDeviceReplay::get_slide() 00041 { 00042 return slide; 00043 } 00044 00045 void InputDeviceReplay::relay(InputReport::ReportType report_type, 00046 unsigned int value) 00047 { 00048 InputReport report(this, report_type, value); 00049 if(scene) 00050 { 00051 scene->take_input(report); 00052 } 00053 if (car) 00054 { 00055 car->take_input(report); 00056 } 00057 } 00058 00059 00060 }
Generated at Mon Sep 6 00:41:12 2010 by Doxygen version 1.4.7 for Racer version svn335.