[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets
From: |
Pipeline |
Subject: |
Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets |
Date: |
Sat, 23 Feb 2008 16:29:18 -0500 |
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.
----- Original Message -----
From: "Tacvek" <address@hidden>
To: "Pipeline" <address@hidden>; <address@hidden>
Sent: Monday, February 18, 2008 6:02 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 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.
So the controls on Nokia are three buttons at top F8, F6, and F7 (ordered
F6, F8, F7 on 810)
F8 : Toggle Mouse1 (Nonactivate)
F6 : Activate Item
F7 : Next Level (Advance strictly)
DPAD Left/right continues default mouse speed
DPAD Up/Down cycles inventory
ESC : Unchanged from default
Menu : Help Screen (will need to modify to display appropriate keymappings)
Any alternate suggestions would be welcome, however the only other new
mapping i could think of is restart_level or kill and that would make for a
dangerous/frustrating accidental press, and restart can be done via menu.
Since diff file is based off of trunk, I'll outline the -new- changes below
Dave-
---
Added global variable to top
+int bMouse1=0;
Added SDK_KEYUP handler to client::handle_events() :
+ case SDL_KEYUP:
+ if (IS_MAEMO && bMouse1) { bMouse1 = 0; update_mouse_button_state(); }
break;
Revised (in same function) :
- case SDL_MOUSEBUTTONDOWN:
+ case SDL_MOUSEBUTTONDOWN: if (IS_MAEMO) break;
Revised Client::update_mouse_button_state() :
- int b = SDL_GetMouseState(0, 0);
+ int b=(IS_MAEMO)?bMouse1:SDL_GetMouseState(0, 0);
Revised client::on_keydown() :
- case SDLK_F6: Msg_JumpBack(); break;
+ case SDLK_F6: if (IS_MAEMO) { server::Msg_ActivateItem (); } else
Msg_JumpBack(); break;
+ case SDLK_F7: if (IS_MAEMO) Msg_AdvanceLevel(lev::ADVANCE_STRICTLY);
break;
+ case SDLK_F8: if (IS_MAEMO) { bMouse1 = 1; update_mouse_button_state(); }
break;
- case SDLK_UP: user_input_previous(); break;
- case SDLK_DOWN: user_input_next(); break;
+ case SDLK_UP: if (IS_MAEMO) { rotate_inventory(-1); } else
user_input_previous(); break;
+ case SDLK_DOWN: if (IS_MAEMO) { rotate_inventory(+1); } else
user_input_next(); break;
clientcc-changes.diff
Description: Binary data
- [Enigma-devel] Maemo Port for Nokia Internet Tablets, Pipeline, 2008/02/10
- Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets, Tacvek, 2008/02/10
- Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets, Ronald Lamprecht, 2008/02/10
- Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets, Pipeline, 2008/02/14
- Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets, Pipeline, 2008/02/14
- Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets, Tacvek, 2008/02/15
- Message not available
- Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets, Tacvek, 2008/02/18
- Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets,
Pipeline <=
- Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets, Till Harbaum / Lists, 2008/02/24
- Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets, Till Harbaum / Lists, 2008/02/24
- Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets, Andreas Lochmann, 2008/02/24
- Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets, Pipeline, 2008/02/25
- Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets, Till Harbaum / Lists, 2008/02/26
- [Enigma-devel] SVN revision number, Till Harbaum / Lists, 2008/02/26
- Re: [Enigma-devel] SVN revision number, Ronald Lamprecht, 2008/02/26
- Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets, Tacvek, 2008/02/24
- Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets, Till Harbaum / Lists, 2008/02/15
- Re: [Enigma-devel] Maemo Port for Nokia Internet Tablets, Ronald Lamprecht, 2008/02/16