22 #ifndef BLADERUNNER_ESPER_H 23 #define BLADERUNNER_ESPER_H 25 #include "common/array.h" 26 #include "common/rect.h" 28 #include "graphics/surface.h" 32 class BladeRunnerEngine;
42 enum EsperMainStates {
43 kEsperMainStateOpening = 0,
44 kEsperMainStateList = 1,
45 kEsperMainStatePhotoOpening = 2,
46 kEsperMainStateClear = 3,
47 kEsperMainStatePhoto = 5
50 enum EsperPhotoStates {
51 kEsperPhotoStateShow = 0,
52 kEsperPhotoStateOpening = 1,
53 kEsperPhotoStateScrolling = 2,
54 kEsperPhotoStateSelectionZooming = 3,
55 kEsperPhotoStateSelectionBlinking = 4,
56 kEsperPhotoStatePhotoZooming = 5,
57 kEsperPhotoStatePhotoSharpening = 6,
58 kEsperPhotoStatePhotoZoomOut = 7,
59 kEsperPhotoStateVideoZooming = 8,
60 kEsperPhotoStateVideoShow = 9,
61 kEsperPhotoStateVideoZoomOut = 10
65 static const int kPhotoCount = 12;
66 static const int kRegionCount = 6;
67 static const int kPhotoWidth = 1280;
68 static const int kPhotoHeight = 960;
69 static const int kSelectionZoomSteps = 6;
106 const Shape *_shapeThumbnail;
108 Photo _photos[kPhotoCount];
109 int _photoIdSelected;
111 Region _regions[kRegionCount];
113 bool _regionSelectedAck;
115 EsperMainStates _stateMain;
116 EsperPhotoStates _statePhoto;
118 bool _isDrawingSelection;
120 int _mouseOverScroll;
122 float _zoomHorizontal;
131 uint32 _timeZoomNextDiff;
132 uint32 _timeZoomNextStart;
135 uint32 _timeZoomOutNextStart;
141 int _viewportPositionX;
142 int _viewportPositionY;
143 float _viewportPositionXCurrent;
144 float _viewportPositionYCurrent;
145 int _viewportPositionXTarget;
146 int _viewportPositionYTarget;
147 float _viewportPositionXDelta;
148 float _viewportPositionYDelta;
152 int _screenHalfWidth;
153 int _screenHalfHeight;
160 int _selectionCrosshairX;
161 int _selectionCrosshairY;
163 int _selectionBlinkingCounter;
164 int _selectionBlinkingStyle;
165 uint32 _timeSelectionBlinkingNextStart;
167 int _selectionZoomStep;
168 uint32 _timeSelectionZoomNextStart;
170 int _photoOpeningWidth;
171 int _photoOpeningHeight;
172 uint32 _timePhotoOpeningNextDiff;
173 uint32 _timePhotoOpeningNextStart;
176 int _scrollingDirection;
177 uint32 _timeScrollNextStart;
185 int _ambientVolumeFactorOutsideEsper;
195 void handleMouseUp(
int x,
int y,
bool buttonLeft);
196 void handleMouseDown(
int x,
int y,
bool buttonLeft);
200 void addPhoto(
const char *name,
int photoId,
int shapeId);
204 static void mouseDownCallback(
int,
void *);
205 static void mouseUpCallback(
int,
void *);
211 void resetViewport();
212 void resetSelectionRect();
213 void resetSelectionBlinking();
214 void resetPhotoZooming();
215 void resetPhotoOpening();
217 void updateViewport();
219 void activate(
bool withOpening);
220 void setStateMain(EsperMainStates state);
221 void setStatePhoto(EsperPhotoStates state);
223 void wait(uint32 timeout);
224 void playSound(
int soundId,
int volume);
245 void flashViewport();
254 int findEmptyPhoto();
255 void selectPhoto(
int photoId);
258 int findEmptyRegion();
265 void scrollingStart(
int direction);
266 void scrollingStop();
276 void updateSelection();
278 int viewportXToScreenX(
int x);
279 int viewportYToScreenY(
int y);
Definition: esper_script.h:31
Definition: vqa_player.h:45
Definition: ui_image_picker.h:40
Definition: bladerunner.h:113