Hi, ok, i included that and it will be in the next patchset and test versions.
We'll have to think about what's maemo specific and what's touchscreen specifc. Since F8 was unused before, i made the Mouse1 button and F8 related things into #ifdef TOUCHSCREEN and only the other F key mappings into #ifdef MAEMO's. This still isn't clean since the choice of F8 as a touchscreen mouse replacement is maemo specific and other platforms will very likely not want to use F8. Till Am Samstag 23 Februar 2008 schrieb Pipeline: > 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" <[EMAIL PROTECTED]> > To: "Pipeline" <[EMAIL PROTECTED]>; <[email protected]> > 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; _______________________________________________ Enigma-devel mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/enigma-devel
