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
25 display
.set_viewport
(0,0,h
*display
.width
/display
.height
,h
)
27 zoom
= display
.height
.to_f
/ h
.to_f
28 default_mediaplayer
.looping
= true
31 redef fun input
(input_event
)
33 if input_event
isa KeyEvent then
41 redef class AndroidPointerEvent
42 redef fun is_motion
do return is_move
44 redef fun x
do return super / app
.zoom
45 redef fun y
do return super / app
.zoom