enigma-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets


From: Tacvek
Subject: Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets
Date: Mon, 18 Feb 2008 18:02:26 -0500


----- Original Message ----- From: "Pipeline" <address@hidden>
To: "Tacvek" <address@hidden>
Sent: Saturday, February 16, 2008 12:39 PM
Subject: Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets


----- Original Message ----- From: "Tacvek" <address@hidden>
To: "Pipeline" <address@hidden>
Cc: "Ronald Lamprecht" <address@hidden>; <address@hidden>
Sent: Friday, February 15, 2008 2:28 PM
Subject: Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets


Ok. A first look at this raises only minor issues.
First one is that following change may cause some problems:
-        case SDL_MOUSEBUTTONDOWN:
+        case SDL_MOUSEBUTTONDOWN: break;

On most systems, that fall-through was important, so Enigma would know when the mouse button was released.

Second, the current code looks to have no meathod of simulating the holding down the primary mouse button feature, which allows one to avoid picking up undesireable items. I'm not sure if this would make any level unsolvable, but it can definately increase the difficulty of some levels. It would be nice to be able to properly include that ability in the port.


I will try to add workaround for this functionality for maemo. Since maemo does not have mouse1 (other than stylus down), i might look into remapping a hardware button, using keydown and keyup sdl events to simulate mouse 1 behavior... rewriting above code to conditionally short-circuit based only if is_maemo flag is set.


Indeed. That would be fine. I'm honestly not reaslly sure about the general convention in Engima code with respect to platform specific code. Obviously, ideally we like to keep it down to a minimum, but In some cases, that is not generally possible.

As for the holding the mouse button.
I would consider making the hardware button that is currently used to activate the item into a complete simulation of the main mouse button.

The trick here though is that The keyup event is not covered by the current code, as that is not otherwise important.

The key here is how best to deal with this.
The Client::update_mouse_button_state function already exists, and could be updated to check if the button is being held down, instead of the mouse button. (But only when using Maemo).

(Actually to best emulate normal Enigma, both the activate item, and rotate item buttons would be checked).

Then a call update_mouse_button_state(), could be added to the "case SDLK_F6"
and "case SDLK_F8" lines.
However, a new check on keyup is needed.
Adding the following line before the "SDL_MOUSEMOTION" line would work:
"case SDL_KEYUP: if (IS_MAEMO) update_mouse_button_state(); break;"

It would be optimized out on other platforms, but do what is needed.





It would probably preferable to have the TOUCHSCREEN_MULTIPLE macro be replaced with a user configurable variable.

Then there is a bit of stylistic cleanup to be done during integration,
as well as adding the macros to the build system.

(For example, the bFirstMove, would need to be renamed and moved into an appropriate class.)



Certainly, feel free to transpose however you like. I would imagine I could easily adapt to your conventions. Touchscreen multiple was needed for maemo touchscreen interface although i am not sure it samples 1:1 with pixels (which is rather high DPI). I would imagine this would be relevant to any 'absolute positioning?' input device.

What exactly is the need for TOUCHSCREEN_MULTIPLE anyway? My understanding is that you are basically using the screen to simulate a laptop touchpad (except it would be an unusually large touchpad). Is that incorrect?

(If it is coreect, what is the need for the large motion check? Could not the motion be ignored entirely when the screen is not "touched", paying attention only to movement that occurs *while* the screen is "touched"?)

Regardless though, wouldn't another possibiltiy be increasing the MouseSpeed value?

Thanks for your work on this project, not only is it an interesting game but an interesting simulation environment which you all have worked to create.

Well, for my part, I have actually done very little for the project, only a few small contributions. I used to compile and run the latest development versions for Windows, but I have not done that in a while.

I'm not really sure why I still read the mailing list, but I have never bothered to stop reading it. Perhaps I expect to contribute more in the future.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]