45 Commits

Author SHA1 Message Date
dhewg
f4fd9e8b50 ANDROID: Fix cursor visibility 2011-03-17 19:35:58 +01:00
dhewg
2ea6380040 ANDROID: Plug RGB cursor memleak 2011-03-17 19:35:57 +01:00
dhewg
093b74e405 ANDROID: Disable game/overlay blending
Doesn't work on some drivers, need to do it differently
2011-03-16 23:57:00 +01:00
dhewg
adef4c3f42 ANDROID: Input system overhaul
Rewritten input system with many new feature.
Fixed related bugs and shortcomings on the way.
2011-03-16 20:54:49 +01:00
dhewg
7b850c18c7 ANDROID: Cleanup 2011-03-15 00:05:59 +01:00
dhewg
d060b597c3 ANDROID: Fade out the game screen when the overlay is visible 2011-03-14 19:35:36 +01:00
dhewg
6389e70e45 ANDROID: Remove clearBuffer()
Not required. Why did i add that again?
2011-03-14 19:35:36 +01:00
dhewg
f587b6ee04 ANDROID: Implement grabOverlay() 2011-03-14 19:35:36 +01:00
dhewg
e1575e57f8 ANDROID: Extend clearScreen to take care of all cases
Hopefully that'll help me to not forget about the double buffering.
This fixes some gfx leftovers when not running games in fullscreen
mode.
2011-03-14 19:35:35 +01:00
dhewg
57635fe75c ANDROID: Update screen rects on surface changes
Fixes regression introduced with 4267011e
2011-03-14 19:35:35 +01:00
dhewg
ecd265b539 ANDROID: Center mouse on overlay visibility changes 2011-03-13 23:31:04 +01:00
dhewg
df9167c6b3 ANDROID: Add graphics mode for linear filtering 2011-03-13 23:30:17 +01:00
dhewg
c63c2a9e59 ANDROID: Fix texture clear color 2011-03-13 23:30:17 +01:00
dhewg
79d991081d ANDROID: Add support for video feature flags
kFeatureFullscreenMode and kFeatureAspectRatioCorrection are supported
now. The former prevents scaling to the full display - it scales one
axis and keeps the game AR.
2011-03-13 23:30:16 +01:00
dhewg
4267011e3a ANDROID: Some texture convinience functions 2011-03-13 23:30:15 +01:00
dhewg
2721e287e5 ANDROID: Buffer 16bit texture contents
Same issue as in the last commit: glTexSubImage2D is slow, so cache
all copyRect*() calls in a buffer, and update the dirty rect once
when drawing. Reduces CPU usage on 16bit games significantly.
Also, lockScreen() returns now pixel data for non-CLUT8 games instead
of asserting.
2011-03-13 16:50:47 +01:00
dhewg
a93229cae5 ANDROID: Don't use compressed textures for the game screen
Some GLES drivers suck so much that uploading data to the GPU takes
ages. CLUT8 games now use a faked paletted texture, which internally
uses a RGB565 hardware texture (Android's native pixel format).
This seems to be the only way to efficiently implement constant
changing textures with GLES1 - at the cost of extra buffers.
Then again, we can now use glTexSubImage2D to only update the dirty
rects, which wasn't possible before because glCompressedTexSubImage2D
is only usable on GLES2. This commit does exactly that.
Overall, the CPU usage is massively reduced for CLUT8 games.
2011-03-13 16:50:43 +01:00
dhewg
0cdaff65c1 ANDROID: Use 16bit pixel formats on CLUT8 textures
This reduces the CPU usage on 640x480 games by ~5% on my droid when
reuploading the textures to the GPU
2011-03-12 09:36:23 +01:00
dhewg
caf21a357b ANDROID: Cleanup 2011-03-12 09:36:22 +01:00
dhewg
99c0d82541 ANDROID: Cleanup paletted textures 2011-03-12 09:36:22 +01:00
dhewg
4afa2c62b9 ANDROID: Get rid of ugly casts 2011-03-12 09:36:22 +01:00
dhewg
905d5e76b4 ANDROID: Move misplaced assert
Leftover from the recently introduced 16bit support
2011-03-07 23:42:20 +01:00
dhewg
e71fb5b0eb ANDROID: Move the overlay initialization
There's no point in doing that in initSize() every time
2011-03-07 23:42:20 +01:00
dhewg
12fb817751 ANDROID: Fix 16bit cursors
I hate this code
2011-03-05 23:08:42 +01:00
dhewg
53ee7c5513 ANDROID: Proper fillBuffer() for non CLUT8 colors 2011-03-05 23:08:41 +01:00
dhewg
a2c02367f7 ANDROID: Rename function for less confusion 2011-03-05 23:08:41 +01:00
dhewg
d2dd614996 ANDROID: Clear screen on initSize() 2011-03-05 18:47:05 +01:00
dhewg
94db3403a3 ANDROID: Add initial 16bit gfx support
Supported pixel formats: 565, 5551, 4444
Missing: 555 (doesn't exist on GLES)
2011-03-05 18:47:05 +01:00
dhewg
a913d360f2 ANDROID: Clear game texture on initSize()
Gets rid of leftovers
2011-03-04 21:41:55 +01:00
dhewg
f639466ab2 ANDROID: Cleanup 2011-03-04 21:36:48 +01:00
dhewg
1b0d4724f4 ANDROID: Fix slightly off while loop
CursorMan allows to push cursors with a width/height of zero. If such a
cursor is restored, we don't need to call glTexSubImage2D() 0xffffffff
times... This fixes delays of multiple minutes when closing GMM
on groovie and sword.
Also, I want that last hour of my life back.
2011-03-04 21:35:30 +01:00
dhewg
7157454e9b ANDROID: Implement surface resizes
Split surface code into helper functions to avoid code duplication, and
distinguish between screen resizes and surface recreation. The former
happens when toggling the softkeyb, where we just have to reset the
viewport. Fixes garbled textures in those cases.
2011-03-03 21:29:15 +01:00
dhewg
2d4a64d184 ANDROID: Properly release texture resources
When calling glDeleteTextures() we need a valid surface.
2011-03-02 23:18:36 +01:00
dhewg
ccfe427eb5 ANDROID: Check for a surface in updateScreen() 2011-03-02 23:18:35 +01:00
dhewg
82a9beff2b ANDROID: Move swapBuffers to the native side 2011-03-02 23:18:34 +01:00
dhewg
bd7e3e9bb2 ANDROID: cleanup 2011-03-02 23:18:34 +01:00
dhewg
2333a32697 ANDROID: Untangle JNI interweaving
- make the startup sequence more linear
- use SurfaceHolder events
- get rid of the surface lock
- remove unnecessary JNI calls
- make the ScummVM class implement Runnable
- cleanup
2011-03-02 23:18:34 +01:00
dhewg
6b1c575d1d ANDROID: Remove another weird workaround 2011-02-27 09:04:31 +01:00
dhewg
e06b7431e8 ANDROID: Remove weird workaround in clearScreen()
This resulted in flickering all over the GUI
2011-02-25 00:10:42 +01:00
dhewg
a636d41ca8 ANDROID: Check thread origin when debugging GL 2011-02-24 23:18:34 +01:00
dhewg
d8acbc0311 ANDROID: Deuglify overlay gfx
Use the native surface resolution of the device if its not too big.
If it is, use a clean scale factor of 2 to prevent eyecancer.
2011-02-24 23:18:33 +01:00
dhewg
53b5808d4f ANDROID: Move rest of everything JNI 2011-02-24 23:18:32 +01:00
dhewg
f80d993860 ANDROID: Wrap JNI code in a class 2011-02-24 23:18:32 +01:00
dhewg
c4706733d4 ANDROID: Move the global back reference to jni.cpp 2011-02-24 23:18:32 +01:00
dhewg
257913676d ANDROID: Split code into multiple files
And get rid of unnecessary JNI calls to get a pointer to g_system
2011-02-24 23:18:31 +01:00