Commit Graph

2413 Commits

Author SHA1 Message Date
Johannes Schickel
3f37842580 IPHONE: Directly use the game screen's texture buffer.
This gets rid of another intermediate buffer.
2012-02-23 21:52:44 +01:00
Johannes Schickel
8edcedf3b6 IPHONE: Directly use the overlay's texture buffer instead of another intermediate buffer. 2012-02-23 21:34:12 +01:00
Johannes Schickel
2ab5958c93 IPHONE: Move screen and overlay texture buffer to VideoContext. 2012-02-23 21:20:24 +01:00
Johannes Schickel
97feac5342 IPHONE: Add a constructor to VideoContext. 2012-02-23 20:59:26 +01:00
Johannes Schickel
5ae958bcf3 IPHONE: Let iPhoneView and OSystem_IPHONE share the same VideoContext.
This allows for better sharing between the current video state in the view and
the OSystem implementation.

This also gets rid of most C interface functions for calling ObjC code.
2012-02-23 03:18:00 +01:00
Johannes Schickel
e00fc73eb8 IPHONE: Silence a few signed/unsigned integer comparison warnings. 2012-02-23 02:26:54 +01:00
Johannes Schickel
99ffbfedbc IPHONE: Use VideoContext in OSystem_IPHONE. 2012-02-23 02:25:26 +01:00
Johannes Schickel
ab15435ad0 IPHONE: Move overlay visibility status to VideoContext. 2012-02-23 02:09:27 +01:00
Johannes Schickel
e1edb20fed IPHONE: Move VideoContext definition to iphone_common.h. 2012-02-23 02:04:40 +01:00
Johannes Schickel
e83e31c2cc IPHONE: Move mouse coordinate conversion code to iPhoneView. 2012-02-23 02:02:14 +01:00
Johannes Schickel
c5ccb32b48 IPHONE: Move graphics related OSystem code to a ObjC++ file. 2012-02-23 01:52:50 +01:00
Johannes Schickel
04f9fc3e18 IPHONE: Move projection setup code to its own method. 2012-02-23 01:27:38 +01:00
Johannes Schickel
174127c1dd IPHONE: Remove some more dead code. 2012-02-23 01:19:34 +01:00
Johannes Schickel
26405be48f IPHONE: Move setFilterModeForTexture to iPhoneView. 2012-02-23 01:14:39 +01:00
Johannes Schickel
def1471fff IPHONE: Slight formatting fix. 2012-02-23 01:08:48 +01:00
Johannes Schickel
833ce4f348 IPHONE: Fix scale offset addition in the mouse coordinate code.
Formerly the overlay and game screen offset was swapped.
2012-02-23 01:08:47 +01:00
Johannes Schickel
f4579aab9b IPHONE: Create a struct for shared video context variables. 2012-02-23 01:08:47 +01:00
Johannes Schickel
6c64fdf4f2 IPHONE: Very minor cleanup. 2012-02-22 02:49:14 +01:00
Johannes Schickel
0e182a9587 IPHONE: Use #include instead of #import. 2012-02-22 02:47:16 +01:00
Johannes Schickel
66199978e2 IPHONE: Silence some warnings. 2012-02-22 02:44:25 +01:00
Johannes Schickel
e79f6a6314 IPHONE: Move ObjC code files (.m) to ObjC++ files (.mm). 2012-02-22 02:30:44 +01:00
Johannes Schickel
1b26346fc8 IPHONE: Implement setShakeOffset.
This should fix bug #3374656 "IPHONE: setShakePos not implemented".
2012-02-22 01:53:20 +01:00
Johannes Schickel
80b3439817 IPHONE: Rewrite video screen rotation.
Now it should be a little bit more sane. Formerly the width and height
was swapped in rotation mode, which resulted in the x coordinate falling
into the range 0..height in landscape mode for example.

This also fixes the cursor offset in the modern theme.
2012-02-21 18:54:26 +01:00
Johannes Schickel
f6edcbde8e IPHONE: Move _overlayPortraitRatio from global scope to local scope. 2012-02-21 18:54:26 +01:00
Johannes Schickel
cc8a6cc993 IPHONE: Add _overlayRect, which describes the overlay screen rect. 2012-02-21 18:54:26 +01:00
Tarek Soliman
aa42d78658 KEYMAPPER: Remove automapping dead code 2012-02-21 08:20:40 -06:00
Johannes Schickel
6cc5b83bba IPHONE: Default to portrait mode in case the orientation could not be determined. 2012-02-20 21:17:19 +01:00
Johannes Schickel
d8531a939e IPHONE: Move OpenGL ES context generation to its own method. 2012-02-20 21:15:14 +01:00
Johannes Schickel
cf44d49d19 IPHONE: Precalculate vertex/tex coordinates for game screen/overlay. 2012-02-20 19:43:51 +01:00
Johannes Schickel
7957cc956e IPHONE: Use render buffer size instead of application frame size for video size calculations.
These match as far as I can tell, but in case they don't match, the render
buffer size should be the correct thing to use.
2012-02-20 18:39:57 +01:00
Johannes Schickel
d91268c4c1 IPHONE: Rename _screenRect to _gameScreenRect. 2012-02-20 18:39:57 +01:00
Johannes Schickel
87fb115def IPHONE: Rename _backing[Width,Height] to _renderBuffer[Width,Height]. 2012-02-20 18:39:57 +01:00
Johannes Schickel
624d5547dc IPHONE: Don't overwrite orientation when the OpenGL ES context is created. 2012-02-20 18:39:57 +01:00
Johannes Schickel
d4c167414d IPHONE: Refactor event code a bit.
Now mouse x/y coordinates are passed as int.
2012-02-20 18:39:57 +01:00
Johannes Schickel
5cc3d754f7 IPHONE: Even more slight formatting fixes. 2012-02-20 18:39:57 +01:00
Johannes Schickel
a291679445 IPHONE: Slight game screen texture related variable renaming. 2012-02-20 15:37:24 +01:00
Johannes Schickel
46e622c0fe IPHONE: Slight cleanup. 2012-02-20 15:37:24 +01:00
Johannes Schickel
76be031ed4 IPHONE: Remove some unused variables. 2012-02-20 15:37:23 +01:00
Johannes Schickel
ae992bebe3 IPHONE: More formatting fixes. 2012-02-20 13:48:09 +01:00
Johannes Schickel
d77253fbe5 IPHONE: Add support for unfiltered upscaling. 2012-02-20 02:32:10 +01:00
Johannes Schickel
8102e7e645 IPHONE: Implement cursor palette support. 2012-02-20 01:32:48 +01:00
Johannes Schickel
65cda4cd6b IPHONE: Fix some mismatching malloc/delete calls. 2012-02-20 00:36:13 +01:00
Johannes Schickel
1b9c4f3845 IPHONE: Remove some dead code. 2012-02-20 00:35:44 +01:00
Johannes Schickel
723a38c699 IPHONE: Rename screen related buffers a bit. 2012-02-20 00:35:14 +01:00
Johannes Schickel
93d80793b4 IPHONE: Implement cursor visibility change again. 2012-02-20 00:29:08 +01:00
Johannes Schickel
438bc50115 IPHONE: Fix cursor hotspots. 2012-02-20 00:25:48 +01:00
Johannes Schickel
68bbe973bd IPHONE: Always use the mouse texture.
Formerly the mouse texture was only used when the overlay was visible. When
only the game screen was visible, the code rendered the mouse cursor on the
game screen texture.

This simplifies the drawing pipeline a bit.
2012-02-20 00:08:42 +01:00
Johannes Schickel
87d85a7b20 IPHONE: Use the proper RGBA5551 palette for the mouse cursor.
Formerly the overlay cursor was using a RGB565 palette, even though the
texture is really set up as RGBA5551.
2012-02-19 22:19:38 +01:00
Johannes Schickel
ceae3dd191 IPHONE: Rename _palette to _gamePalette. 2012-02-19 22:16:38 +01:00
Johannes Schickel
6a31dadfea IPHONE: Use include instead of import for all of our headers. 2012-02-19 22:10:08 +01:00