00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef CAMERAPROCESS_H
00020 #define CAMERAPROCESS_H
00021
00022 #include "Process.h"
00023 #include "intrinsics.h"
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034 class CameraProcess : public Process
00035 {
00036 public:
00037 CameraProcess();
00038 CameraProcess(uint16 itemnum);
00039 CameraProcess(sint32 x, sint32 y, sint32 z);
00040 CameraProcess(sint32 x, sint32 y, sint32 z, sint32 time);
00041
00042 virtual ~CameraProcess();
00043
00044
00045 ENABLE_RUNTIME_CLASSTYPE();
00046
00047 virtual bool run(const uint32 framenum);
00048
00049
00050 void GetLerped(sint32 &x, sint32 &y, sint32 &z, sint32 factor, bool noupdate=false);
00051
00055 uint16 FindRoof(sint32 factor);
00056
00057 INTRINSIC(I_setCenterOn);
00058 INTRINSIC(I_move_to);
00059 INTRINSIC(I_scrollTo);
00060 INTRINSIC(I_startQuake);
00061 INTRINSIC(I_stopQuake);
00062
00063 static void GetCameraLocation(sint32 &x, sint32 &y, sint32 &z);
00064 static CameraProcess* GetCameraProcess() { return camera; }
00065 static uint16 SetCameraProcess(CameraProcess *);
00066 static void ResetCameraProcess();
00067
00068 static void SetEarthquake(sint32 e) {
00069 earthquake = e;
00070 if (!e) eq_x = eq_y = 0;
00071 }
00072
00073 void ItemMoved();
00074
00075 virtual void terminate();
00076
00077 bool loadData(IDataSource* ids, uint32 version);
00078 private:
00079 virtual void saveData(ODataSource* ods);
00080
00081 sint32 sx, sy, sz;
00082 sint32 ex, ey, ez;
00083 sint32 time;
00084 sint32 elapsed;
00085 uint16 itemnum;
00086
00087 sint32 last_framenum;
00088
00089 static CameraProcess *camera;
00090 static sint32 earthquake;
00091 static sint32 eq_x, eq_y;
00092 };
00093
00094 #endif //CAMERAPROCESS_H