equal
deleted
inserted
replaced
33 procedure DrawWorldStereo(Lag: LongInt; RM: TRenderMode); |
33 procedure DrawWorldStereo(Lag: LongInt; RM: TRenderMode); |
34 procedure ShowMission(caption, subcaption, text: ansistring; icon, time : LongInt); |
34 procedure ShowMission(caption, subcaption, text: ansistring; icon, time : LongInt); |
35 procedure HideMission; |
35 procedure HideMission; |
36 procedure ShakeCamera(amount: LongInt); |
36 procedure ShakeCamera(amount: LongInt); |
37 procedure InitCameraBorders; |
37 procedure InitCameraBorders; |
|
38 procedure InitTouchInterface; |
38 procedure MoveCamera; |
39 procedure MoveCamera; |
39 procedure onFocusStateChanged; |
40 procedure onFocusStateChanged; |
40 |
41 |
41 implementation |
42 implementation |
42 uses |
43 uses |
195 |
196 |
196 //aligns it to the bottom of the screen, minus the border |
197 //aligns it to the bottom of the screen, minus the border |
197 SkyOffset:= 0; |
198 SkyOffset:= 0; |
198 HorizontOffset:= 0; |
199 HorizontOffset:= 0; |
199 |
200 |
|
201 InitTouchInterface(); |
|
202 end; |
|
203 |
|
204 procedure InitCameraBorders; |
|
205 begin |
|
206 cGearScrEdgesDist:= min(2 * cScreenHeight div 5, 2 * cScreenWidth div 5); |
|
207 end; |
|
208 |
|
209 procedure InitTouchInterface; |
|
210 begin |
200 {$IFDEF USE_TOUCH_INTERFACE} |
211 {$IFDEF USE_TOUCH_INTERFACE} |
201 //positioning of the buttons |
212 //positioning of the buttons |
202 buttonScale:= 1.5/cDefaultZoomLevel; |
213 buttonScale:= 1.5/cDefaultZoomLevel; |
203 firebuttonX:= (cScreenWidth shr 1) - Round(spritesData[sprFireButton].Texture^.h * buttonScale); |
214 firebuttonX:= (cScreenWidth shr 1) - Round(spritesData[sprFireButton].Texture^.h * buttonScale); |
204 firebuttonY:= -Round(spritesData[sprFireButton].Texture^.h* buttonScale) + cScreenHeight; |
215 firebuttonY:= -Round(spritesData[sprFireButton].Texture^.h* buttonScale) + cScreenHeight; |
232 |
243 |
233 arrowDownX:= -(cScreenWidth shr 1) + Round(spritesData[sprArrowUp].Texture^.h * buttonScale); |
244 arrowDownX:= -(cScreenWidth shr 1) + Round(spritesData[sprArrowUp].Texture^.h * buttonScale); |
234 arrowDownY:= -Round(spritesData[sprArrowDown].Texture^.h*buttonscale) + cScreenHeight; |
245 arrowDownY:= -Round(spritesData[sprArrowDown].Texture^.h*buttonscale) + cScreenHeight; |
235 arrowDownW:= Round(spritesData[sprArrowDown].Texture^.w * buttonScale); |
246 arrowDownW:= Round(spritesData[sprArrowDown].Texture^.w * buttonScale); |
236 arrowDownH:= Round(spritesData[sprArrowDown].Texture^.h * buttonScale); |
247 arrowDownH:= Round(spritesData[sprArrowDown].Texture^.h * buttonScale); |
237 |
248 {$ENDIF} |
238 |
|
239 {$ENDIF} |
|
240 end; |
|
241 |
|
242 procedure InitCameraBorders; |
|
243 begin |
|
244 cGearScrEdgesDist:= min(2 * cScreenHeight div 5, 2 * cScreenWidth div 5); |
|
245 end; |
249 end; |
246 |
250 |
247 // for uStore texture resetting |
251 // for uStore texture resetting |
248 procedure ResetWorldTex; |
252 procedure ResetWorldTex; |
249 begin |
253 begin |