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: Sun, 24 Feb 2008 15:16:41 -0500





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


This is primarily for Till and/or Tacvek :

Revisiting the previous control keymapping issue, I did some simple changes
which i think work fairly well.  I've attached a diff file for client.cc
changes.




I implemented a workaround button toggle to avoid picking up items.  I was
unable to get a single button to simulate the Mouse1, however it could be
the logic just needs to be refined (pressing the button would continue to
drop items when traveling over empty tiles.  I reworked the
SDL_MOUSEBUTTONDOWN and UP events to conditionally break on if IS_MAEMO.


Hmm...
I was thinking that the following changes should have worked:

--BEGIN FRAGMENT--
case SDL_KEYUP:
   if (IS_MAEMO) {update_mouse_button_state(); } break;
--END FRAGMENT--

--BEGIN FRAGMENT--
case SDLK_F6: if (IS_MAEMO) {update_mouse_button_state(); server::Msg_ActivateItem (); } else Msg_JumpBack(); break;
--END FRAGMENT

--BEGIN FRAGMENT--
void Client::update_mouse_button_state()
{
    if (IS_MAEMO)
    {
      int* keystate=SDL_GetKeyState(NULL);
      player::InhibitPickup(keystate[SDLK_F6]);
    }
    else
    {
      int b=bMouse1:SDL_GetMouseState(0, 0);
      player::InhibitPickup((b & SDL_BUTTON(1)) || (b & SDL_BUTTON(3)));
    }
}
--END FRAGMENT--

However, it is preferable to have at least one key that can be held down to inhibit pickup that does not cause an item to be dropped when initially pushed.






reply via email to

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