Commit Graph

25 Commits

Author SHA1 Message Date
techdragon.nguyen@gmail.com
cecf5f8060 fixed Android issues with new onscreen buttons.
fixed some stability issue with the deck viewer.
2012-02-21 12:53:11 +00:00
techdragon.nguyen@gmail.com
efd72b8fd2 udpate to scroll signature from previous commit. 2012-01-28 02:46:13 +00:00
techdragon.nguyen@gmail.com
a438c9135e vs 2010 update for deck editor changes as well as SDL update 2012-01-26 14:54:17 +00:00
wrenczes@gmail.com
f46ec14ce6 Fix for the mouse lag on windows. The issue with the mouse events lagging badly is that the while loop on SDL_WaitEventTimeout means that we'll wait consecutively 10 ms per mouse event, so we get flooded & never call onUpdate until the mouse stops moving. Replaced the gate with a simple for loop that guarantees that we call onUpdate at least once every 50 ms. We can try to tweak the value for better framerates, but this value seemed to be in the right ballpark. 2011-09-11 02:41:14 +00:00
Xawotihs
98709e661e Modified the running loop to avoid consumming 100% CPU in pause on Android. 2011-09-06 14:03:27 +00:00
wagic.the.homebrew
33691d1f13 - Added ads support for Android
- basic "message" system between JGE and java through jni 
- Fixed pause/resume on android/sdl
2011-09-04 02:45:18 +00:00
jean.chalard
c5cd81f6a1 Fix the double key bindings problem.
The problem was, the game would initialize first, reading the
keybindings from the configuration, and THEN set up the default key
bindings.
I think this affects only PSP, X, SDL and Qt. A quick scan of the
windows version code looks to me that the order is correct and the
problem should not exist, but I may be mistaken. The iPhone version
looks to me like it has no keybindings at all, though the call is
there ; I put the call in the right order so that the problem does
not happen in the future if we implement some key bindings for it.
If someone can check for windows...
2011-07-07 03:35:26 +00:00
Xawotihs
8f9619e21a Added support for wheel mouse events 2011-06-27 21:18:16 +00:00
wrenczes@gmail.com
741f662bb0 Tied in my recent Android flick gesture addition to a Scroll() function. GameState now has a virtual function OnScroll() call that, by default is a no-op; each game state can choose to override how to respond to flick gestures. I've added one such override in the Deck Editor so that a flick up/down acts like the psp button up/down for scrolling between color filters. 2011-06-15 09:52:11 +00:00
wrenczes@gmail.com
e1dc1afa74 Another usability improvement to the touch interface: added a timer for the delta between finger down/up. A 'tap' has to be under a 1/4 second for it to act as a double-click. 2011-06-15 09:01:26 +00:00
wrenczes@gmail.com
9e6154076b Added the concept of a 'flick' gesture. This uses the VelocityTracker object in Android and passes the velocity info down as an SDL joystick trackball event. We can then reinterpret this event in whatever way we like, such as up/down swipes in the deck editor (that was my initial thought, at any rate).
TBD:  right now every up finger generates this event.  We probably want to throttle it to only be an event if the velocity exceeds some arbitrary threshold;  similarly, if we generate a flick event, we probably don't want to simultaneously generate a finger up action (ie JGE_BTN_OK).
2011-06-11 10:30:38 +00:00
wrenczes@gmail.com
b2eaa3cb8d Multiple finger events now translate correctly into an SDL_MULTIGESTURE. I still haven't mapped this into anything meaningful, but all least the wiring is now present. 2011-06-11 09:03:21 +00:00
wrenczes@gmail.com
56a8bed0e3 More work on Android touch events. Fixed the issues I was having with busted float coords, and added some logic for a different way to deal with selection. Doubleclicking is no longer required; instead, if you generate a finger up event within 50 pixels of where you fingered down, this will be treated as an JGE_BTN_OK event. I think this feels more natural, as you can drag around in a menu or to various cards; then when you find your selection, simply touching it again once triggers the selection. 2011-06-11 06:59:32 +00:00
wrenczes@gmail.com
c859d35c0b More incremental work on getting touch commands on Android. I've pinpointed a nasty problem that looks possibly like a compiler bug - the float values that are passed into SDL_SendFingerDown() are coming out junk on the other end. Probably an extra push of something on the stack, as when I tried using pointers to floats instead, the y value showed up in the x position. 2011-06-07 16:43:44 +00:00
wrenczes
f7cad41013 Checkpoint on getting touch events to come through SDL. This (deliberately) breaks the mouse emulation & cripples input on Android, as those calls are being replaced with real finger down/up/motion commands instead. More to come... 2011-06-07 00:32:26 +00:00
wrenczes@gmail.com
5b8ecd0cf7 More warning cleanup - converted certain class functions to return bool instead of int where appropriate. Also fixed the sdl update() tickCount assignment that I just broke in my last checkin. 2011-06-02 07:01:42 +00:00
wrenczes@gmail.com
4018d17370 more compiler warning cleanup. 2011-06-02 05:48:37 +00:00
wrenczes
0476eaf5f3 Reimplemented the 3 way 'F' toggle for psp size / double psp size / fullscreen in the SDL code path. 2011-05-28 07:13:13 +00:00
Xawotihs
58577bb7ec Fixed SDL full screen mode. Couple of cleanups. 2011-05-27 20:56:50 +00:00
Xawotihs
3397c3f785 Aligned SDL keybindings on Windows ones. Kept a couple of other ones for
Android as well. Issue 671 is now fixed.
2011-05-26 21:38:45 +00:00
Xawotihs
7ba1ef14bb - Modified the windows project to use SDL as DLL, so that we all get mouse support now.
- I think I fixed issue 664, it's funny how the problem is visible on Windows and on some HTC devices but totally absent on Linux and some Samsung devices
- The SDL fullscreen is not working that good, it would need to be improved.
2011-05-22 21:47:31 +00:00
Xawotihs
7e4364b484 - Allows writing on sdcard
- Bound "back" key to menu, "volume down" to next phase and "volume down" to interrupt ... like on the N900 :)
2011-04-27 21:19:25 +00:00
Xawotihs
f2a52edba7 - wait for SDL events intead of pooling them, this allow very smooth CPU usage
- added texture deactivate around each renderer call implemented in opengl es 1.1. It fixes a couple of artifacts but a couple are remaining
- added a compilation switch to allow simulation of opengl es 1.1 on desktop
2011-04-25 21:26:12 +00:00
Xawotihs
137ccdf446 - Activated debug and orientation management in Android manifest
- Coded double-click and orientation change for Android
- Clean up debug code badly introduced in opengl code in r3529
- updated Qt project to link against boost on linux
2011-04-25 10:04:44 +00:00
Xawotihs
832904dce1 - Defined keys translation for SDL config
- Added boost thread files, that fixes all the threading/compiling/linking problems on Android ...
- Added opengles 1.1 code, there are still some bugs I need to tackle ... and I should realy split this file now !!!
- Added Android debug traces
- Hardcoded resources to "/sdcard/Wagic/Res" for the moment on Android
- Added a wagic SDL project for desktop, and the related SDL frontend used for Android. This frontend is currently mostly desktop based, it needs some work to be fully useable with touch and gesture on Android.
2011-04-23 21:30:36 +00:00