Commit Graph

344 Commits

Author SHA1 Message Date
techdragon.nguyen@gmail.com
a6b2a43188 fixed compile error. sorry, missed this one on last check in 2011-12-15 11:26:26 +00:00
techdragon.nguyen@gmail.com
dc7d52c48c added new signature for SendCommand in JGE that takes in a command string and a parameter
added native keyboard handling in iOS
TODO: add same feature for Android tablets/phones
2011-12-15 11:11:08 +00:00
techdragon.nguyen@gmail.com
8550b70e2e fixed issue with crashes on devices that only support openGL 1.1 2011-12-13 22:28:16 +00:00
wagic.the.homebrew
2e3331a0c0 - Speed improvements to the filesystem (partial fix for issue 767)
- minor speed improvement in the shop (removed a locked texture loading that wasn't necessary)
2011-12-13 15:14:47 +00:00
techdragon.nguyen@gmail.com
db664e2836 added some error handling for downloading core files. app will display a message if an error has occurred while downloading and then retry the download after user dismisses the alert.
TODO;  replace string literals with constants or static NSString objects.
2011-12-12 12:24:12 +00:00
wagic.the.homebrew
c9fd53808f - fix compilation issue on psp
- attempt at reducing loading times on the PSP: I merged a few graphics files together, removed some unused calls from the initialization functions, and moved some other ones to have a more lazy approach. The PSP version remains fairly slow in some parts (especially loading, but also entering the shop, or starting a new game), so I will try to reduce file access as much as possible in the days to come. Not a release blocker IMO though, but I4d sure love if it were faster.
- uppercased "Track1.mp3" to be in line with the actual filename. Most likely this had been broken forever on case-sensitive OSes
- I removed costly calls from the textscroller. I believe it wasn't very useful in its previous state. Now it's only "advertising" for unlockable stuff, which I think is ok (and allows to refresh it every time the menu is loaded)
- As a counterpart, added a "% complete" progress bar in the menu, something I wanted to add a while ago.
2011-12-11 13:48:24 +00:00
techdragon.nguyen@gmail.com
f8f5c24304 reverted accidental change to modrules.xml
added missing appdelegate chagnes for previous changes.(iOS only)
removed system copy of bundled Res folder with app deployment (iOS only)
2011-12-11 10:04:55 +00:00
techdragon.nguyen@gmail.com
fe78345ef7 first draft of ad code for iOS. Not adding admob/adwhirl/adSesnse libs to this commit. You will need to download them to get the port to build under XCode 2011-12-08 20:50:36 +00:00
wagic.the.homebrew
70b1879093 - [PSP] Fix for issue 768 : PSP cannot read zipped images from zipped files. This was a lowercase/uppercase issue
- [PSP] added last log message in exception log
2011-12-04 07:14:16 +00:00
Xawotihs
ae3d97dbeb Include missing JGE files from my last commit 2011-11-14 18:43:51 +00:00
Xawotihs
ad5edc224d Symbian^3 compilation fixes. 2011-11-07 23:32:02 +00:00
Xawotihs
e50fdba648 - Replaced static parts by per-instance parts of of several classes when they were not threadsafe (AIMomirPlayer, SimpleMenu, Trash, AIAction, MTGCardInstance, ATutorialMessage, MTGRules). The direct consequence is that we could consumme more memory. So, tell me if you have problems with low memory devices (PSP), there are some threadsafe optimizations that could be implemented if needed.
- Reworked the testsuite to be able to work multithreaded. This is deactivated by default everywhere except in QT_CONFIG as one testcase still refuses to pass in multithreaded mode. On my 4 cores linux desktop, the 650 tests passes now in 4 seconds (1 fails).
- Replaced usage of CardSelectorSingleton by a card selector per game observer.
- Modified the resource manager to be optionnal and per game observer instance instead of being a singleton. Two reasons here : threading AND Open Gl access. I only updated the crashing parts called from the game observer, so most of the code is still using the single instance. Beware of copy-paste concerning resources ...
- Cleaned up the game observer constructors
- Fixed several problems in action logging code while testing proliferate decks
- Cleaned up Threading implementation based on QThread
2011-11-06 17:31:44 +00:00
Xawotihs
84a074aede Added action logging during attack/block of the AI player. To do that, I wrapped some of the direct access from the player to the action layer into the game observer.
First version where I managed to finish a normal game while undoing several actions until the end. There are still some problems in direct damage spells and interruption management. I added several assert in the code to catch them.
2011-10-16 22:16:47 +00:00
techdragon.nguyen@gmail.com
28069e980b modified iOS touch algorithm to match Android deployment. 2011-10-15 13:48:57 +00:00
techdragon.nguyen@gmail.com
6f10ef8425 fixed last check in. Test suite passes. Added comments on possible null pointer exceptions.
Updated XCode project file to include AIPlayerBaka classes.
Added test suite to iOS build
2011-10-09 05:51:45 +00:00
techdragon.nguyen@gmail.com
fbe2e44814 fixed memory leak in double tap gesture
fixed some compiler warnings
removed dead and useless code
2011-10-08 00:56:07 +00:00
Xawotihs
35030ca2ce - Fixed buggy implementation of JGEGetTime on Qt
- cleanup up link between wheelmouse and scroll events
- added support for pause/resume
2011-09-25 14:20:55 +00:00
wagic.the.homebrew
fe88b747c0 - fix for ACounterTracker (this fixes the ability - it wasn't working before - as well as the memory leak)
- fix "release" build in VC++
- Let AI play creatures with ACounterTracker by making that ability a "positive" one (used for MotD)
2011-09-23 10:24:20 +00:00
Xawotihs
bb65d2dc12 - various compilations fixes for Symbian
- small cleanups of the TestSuite and Player classes
2011-09-19 19:49:45 +00:00
wagic.the.homebrew
c96d2fea55 Fix for issue 734 (creating profile on a fresh install is completely broken.) 2011-09-17 08:42:13 +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
techdragon.nguyen@gmail.com
4e963c168f added gesture recognizers for all keys.
refactored some of the initialization code
left place holder for Zoom in/out with pinch recognizer.  The idea here is to make a virtual function like OnScroll for Zoom so we can take care of the zoom features natively.
reorganized some of the method declarations.
2011-09-09 19:03:45 +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
Xawotihs
507552133d Android sound support using openSL ES. Now depends on SDK version 9. 2011-09-04 13:52:39 +00:00
techdragon.nguyen@gmail.com
ad72c0ddc3 adjusted controls for Touch interface on iOS.
* Single Tap now implemented
* Touch and Hold (2 secs) to pop up menu
* added a pan gesture to simulate flicking up/down and left/right
* removed dependency on binding keys to game for iOS devices. (perhaps extend this to all touch devices.)
* flicking motion needs to be expanded to allow for smooth scrolling. Right now every flick is equivalent to going one slot up/down/left/right.
2011-09-04 08:31:36 +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
Xawotihs
024c30d909 Added user and system path for QT_CONFIG, added meego policy file, updated meego rules file, removed now useless Meego Res.txt file 2011-08-21 18:55:16 +00:00
wagic.the.homebrew
cb0f2b373f - Fix a bug where JFileSystem would return duplicate results in function scanfolder (can lead to "card id collision" in the previous builds) 2011-08-21 12:53:57 +00:00
wagic.the.homebrew
87d60cd79e - Improper GetfileInstance calls were preventing from correctly initializing the JGEFileSystem (Todo: init earlier, prevent from calling GetfileInstance if not initialized ?)
- fixed a problem with the test suite
2011-08-21 10:04:38 +00:00
wagic.the.homebrew
37c6b06ee0 - removed broken support for non "stored" zip files for card images 2011-08-21 09:43:00 +00:00
wagic.the.homebrew
e27cf56fa2 - Support for Zip Filesystem. It is now possible to zip the entire Res folder ("store" method preferred, zip so that the root of the zip has ai, player, etc...) in one single file for read only. Write access is done in another folder (hardcoded to be User/ for now, can be updated depending on platforms, etc...
-- zipFS has several limitations...
--- in a general way, seekg doesn't work... so getting a file's size needs to be done through JFileSystem.
--- getLine on files open with zipFS doesn't work so great. Not sure if it is a normal issue because files are open in binary or not... JFileSystem therefore offers a "readIntoString" function that needs to be used instead of the usual "getline" technique. However getLine can then be used on a stream connected to the string.

-- tested on Windows and PSP, I also made sure android still works, but haven't tested zip support on Android.
-- I tried to maintain backwards compatibility, but this might break on some platforms, if I broke some platforms and you can't find a way to fix them, please contact me and we'll figure something out
-- This removes wagic::ifstream. I didn't reimplement the securities that were involved in this, apologies for that. Might be useful to reimplement such securities in JFileSystem
-- I haven't tested options/profiles in a deep way, it is possible I broke that.
2011-08-21 09:04:59 +00:00
Xawotihs
2c34a88ff0 Reuse swipe code of Android with Qt, associate "swipe left" to "other cards" in the shop. 2011-08-14 18:13:28 +00:00
Xawotihs
c188b4d104 Fixed "Werror" related compilation problems on Linux and Meego. 2011-08-14 18:09:02 +00:00
Xawotihs
30f8304918 Meego harmattan support, swipe down for cancel/interrupt, swipe up for next phase/combat assignment, tap&hold for menu, deactivate refresh when windows is not active. 2011-08-11 22:26:07 +00:00
Xawotihs
88157d7c95 Fixed compilation problems in non-PSP, non-FMOD, non-Phonon cases 2011-08-10 20:56:51 +00:00
Xawotihs
59b7432e74 Fixed builds broken in r3807 2011-07-21 19:44:52 +00:00
Xawotihs
e09fe7570e Fixed Phonon sound support. 2011-07-19 21:28:46 +00:00
Xawotihs
9dccc885d6 Updated the Qt project to work on Desktop/Maemo/Meego/Symbian. Removed all dependencies except Qt and OpenGl. 2011-07-17 18:18:17 +00:00
wagic.the.homebrew
3148a25f3a - Manual cache cleanup in the menu to help a bit with issue 693. This is unfortunately not enough, we are dealing with ram fragmentation problems here :( 2011-07-10 13:51:39 +00:00
wagic.the.homebrew
acca910248 - Fix for issue 699 (sound effects stop working after a few minutes on the PSP) 2011-07-10 07:51:03 +00:00
wagic.the.homebrew
0661918ed6 - Additional fix for issue 465
-- The problem was that the previous fix for keybindings actually fixed dead code for the PSP version... the real call to Defaultbindings was still happening in JGE's code...so the fix made the call twice.
-- Note: shouldn't we use ResetBindings instead of JGECreateDefaultBindings? The former resets the bindings before assigning the default ones...
2011-07-10 06:52:07 +00:00
jean.chalard
93d96fe52b Revert a careless change
Seems I did something wrong with SVN. Revert the changed parts
that should not have been changed.
2011-07-07 03:41:51 +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
bfa9b6c813 Fixed issue 691. 2011-07-01 21:59:35 +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