1 # Monsterz - Chains of Friends
3 # 2010-2014 (c) Jean Privat <jean@pryen.org>
5 # This program is free software; you can redistribute it and/or
6 # modify it under the terms of the Do What The Fuck You Want To
7 # Public License, Version 2, as published by Sam Hocevar. See
8 # http://sam.zoy.org/projects/COPYING.WTFPL for more details.
10 # android version of the game
11 module friendz_android
15 import android
::landscape
18 # Zoom applied for the device display from the game logic coordinates
21 redef fun window_created
26 display
.set_viewport
(0,0,h
*display
.width
/display
.height
,h
)
28 zoom
= display
.height
.to_f
/ h
.to_f
32 redef class AndroidPointerEvent
33 redef fun is_motion
do return not just_went_down
35 redef fun x
do return super / app
.zoom
36 redef fun y
do return super / app
.zoom