----- Original Message ----- From: "Pipeline" <[EMAIL PROTECTED]>
To: "Tacvek" <[EMAIL PROTECTED]>
Cc: <[email protected]>
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.




_______________________________________________
Enigma-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/enigma-devel

Reply via email to