00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00019 #ifndef __RT_SOUND__
00020 #define __RT_SOUND__
00021
00022 #include "robfrontend.h"
00023 #include "robmanage.h"
00024 #include "robbase.h"
00025
00026 #include <rtsystem.h>
00027
00028 using namespace lrt;
00029
00030 namespace rt {
00031
00032 class SoundPlugin : public FrontendPlugin
00033 {
00034 public:
00035 virtual FpInterpretePos getInterpretePos();
00036 virtual String getName();
00037 virtual String getHelpText();
00038 bool canPlay(bool checkSilent = true);
00039 virtual bool interpreteParams(const Array<String>& params, Array<bool>& used);
00040 virtual void fillOptions(SimOptions& options);
00041 SoundPlugin(Frontend* parent);
00042 ~SoundPlugin() {}
00043 private:
00044 bool isSoundInstalled(const String& name, bool checkSilent = true);
00045 };
00046
00047 class SoundTourDisplayer : public TourDisplayer
00048 {
00049 public:
00050 virtual void init(const TourInitInfo&);
00051 virtual TourStatusType update(const Array<TourResult>& status);
00052 virtual void exit(TourStatusType exitType, const Array<TourResult>& result);
00053 };
00054
00055 class SoundSimSupervisor : public SimSupervisor
00056 {
00057 public:
00058 SoundSimSupervisor();
00059 virtual SimSuperPosition getPreferredPosition();
00060 virtual unsigned long getStepCycles();
00061 virtual GameState exec(Simulation* const curSim);
00062 virtual void exitSim(Simulation* const curSim, const GameState& simResult);
00063 private:
00064 int cycles;
00065 static const int minMillis, maxMillis;
00066 Time lastTime;
00067 GameState retState;
00068 };
00069
00070 }
00071
00072 #endif
00073