mirror of
https://github.com/Oibaf66/fbzx-wii.git
synced 2024-11-01 06:45:05 +01:00
Mouse pointer moved by joystick if auto vk option is off, more keys to bind to buttons in windows port
This commit is contained in:
parent
e0c62da7a6
commit
513da5147c
2
README
2
README
@ -7,7 +7,7 @@ The code has been ported to Wii and largely improved with many new features by O
|
||||
|
||||
FBZX Wii can be found on Github at github.com/Oibaf66/fbzx-wii.
|
||||
|
||||
There is also a gamecube port.
|
||||
There are also a windows and a gamecube port.
|
||||
|
||||
The program uses the SDL Wii library.
|
||||
|
||||
|
@ -1,5 +1,6 @@
|
||||
FBZX Wii was written to run on WII, for testing purpose FBZX Wii was adapted
|
||||
to run also on Windows even if some WII features cannot be used.
|
||||
to run also on Windows. Even if some WII features cannot be used (i.e. rumble),
|
||||
the emulator is fully usable.
|
||||
|
||||
These are the basic instructions:
|
||||
|
||||
@ -11,39 +12,29 @@ You can try with higher values for turbo until you hear cracked sound.
|
||||
|
||||
The wiimote pointer is emulated by the mouse pointer.
|
||||
|
||||
FBZX Wii has two GUIs: one is derived from FBZX and the other one is Wii specific.
|
||||
FBZX Wii has two GUIs: one is derived from the original FBZX and the other one is Wii specific.
|
||||
|
||||
|
||||
*************
|
||||
FBZX WII Menu
|
||||
*************
|
||||
|
||||
Menu key (it is the key near CTRL Rigth) or gamepad 7 key to access FBZX Wii menu.
|
||||
Menu key (it is the key near CTRL Rigth) or gamepad button 7 to access FBZX Wii menu.
|
||||
Left ALT key to toggle Full Screen.
|
||||
The virtual keyboard is accessed passing the mouse on the screen or through CTRL Rigth
|
||||
or gamepad button 6 (it depends on the auto virtual ketboard option).
|
||||
|
||||
* In menu
|
||||
Gamepad pad or keyboard keys for menu navigation.
|
||||
Gamepad joystick or keyboard keys for menu navigation.
|
||||
Gamepad button 1 or Enter key to select.
|
||||
Gamepad button 1 button 2 or ESC key to step back.
|
||||
Gamepad button 2 or ESC key to step back.
|
||||
|
||||
* In Game
|
||||
Gamepad pad for the yostick emulation.
|
||||
Gamepad joystick for the yostick emulation.
|
||||
Gamepad button 1 for fire.
|
||||
Gamepad button 5 for pause.
|
||||
Gamepad button 1-4 and 8-12 are configurable.
|
||||
|
||||
These are the associations between gamepad and Wii controllers keys:
|
||||
|
||||
Gamepad -------- WII
|
||||
1 Wiimote A Button
|
||||
2 Wiimote B Button
|
||||
3 Wiimote 1 Button
|
||||
4 Wiimote 2 Button
|
||||
5 Wiimote - Button
|
||||
6 Wiimote + Button
|
||||
7 Wiimote HOME Button
|
||||
8 Nunchuck Z Button
|
||||
9 Nunchuck C Button
|
||||
|
||||
******************
|
||||
Original FBZX Menu
|
||||
|
@ -108,10 +108,14 @@ void computer_init () { //Called only on start-up
|
||||
ordenador.joypad_as_joystick[1]= 1;
|
||||
#ifdef HW_RVL
|
||||
ordenador.vk_auto = 1; //auto Vk
|
||||
#else //HW_DOL - WIN
|
||||
ordenador.vk_auto = 0; //Vk called by +
|
||||
#endif
|
||||
ordenador.vk_rumble = 1; //enabled
|
||||
#elif defined(HW_DOL)
|
||||
ordenador.vk_auto = 0; //Vk called by +
|
||||
ordenador.vk_rumble = 0; //disabled
|
||||
#else //WIN
|
||||
ordenador.vk_auto = 1; //auto Vk
|
||||
ordenador.vk_rumble = 0; //disabled
|
||||
#endif
|
||||
ordenador.rumble[0] = 0;
|
||||
ordenador.rumble[1] = 0;
|
||||
ordenador.turbo = 1; //auto turbo
|
||||
@ -1275,7 +1279,7 @@ inline void read_keyboard () {
|
||||
#ifdef HW_DOL
|
||||
if (SDL_JoystickGetButton(ordenador.joystick_sdl[0], 7)) //Gamecube button "Start"
|
||||
{if (ordenador.vk_is_active) virtkey_ir_deactivate();main_menu(); }
|
||||
if (SDL_JoystickGetButton(ordenador.joystick_sdl[0], 4) //Gamecube button "Z"
|
||||
if (SDL_JoystickGetButton(ordenador.joystick_sdl[0], 4)) //Gamecube button "Z"
|
||||
pause();
|
||||
#else //HW_RVL - WIN
|
||||
if (SDL_JoystickGetButton(ordenador.joystick_sdl[0], 6) ||//Wii button "Home"
|
||||
@ -1286,12 +1290,15 @@ inline void read_keyboard () {
|
||||
pause();
|
||||
#endif
|
||||
|
||||
#ifdef HW_DOL
|
||||
#if defined(HW_RVL) || defined(HW_DOL)
|
||||
if (!ordenador.vk_auto)
|
||||
{
|
||||
int SDL_PrivateMouseMotion(Uint8 buttonstate, int relative, Sint16 x, Sint16 y);
|
||||
if (SDL_JoystickGetAxis(ordenador.joystick_sdl[0], 2) > 16384) SDL_PrivateMouseMotion(0,1,4/RATIO,0); //C-stick Horizontal axix
|
||||
if (SDL_JoystickGetAxis(ordenador.joystick_sdl[0], 2) < -16384) SDL_PrivateMouseMotion(0,1,-4/RATIO,0); //C-stick Horizontal axix
|
||||
if (SDL_JoystickGetAxis(ordenador.joystick_sdl[0], 3) > 16384) SDL_PrivateMouseMotion(0,1,0,4/RATIO); //C-stick vertical axix
|
||||
if (SDL_JoystickGetAxis(ordenador.joystick_sdl[0], 3) < -16384) SDL_PrivateMouseMotion(0,1,0,-4/RATIO); //C-stick vertical axix
|
||||
}
|
||||
#endif
|
||||
|
||||
for(joy_n=0;joy_n<ordenador.joystick_number;joy_n++)
|
||||
@ -1315,7 +1322,7 @@ inline void read_keyboard () {
|
||||
SDL_JoystickGetButton(ordenador.joystick_sdl[joy_n], joybutton_n);
|
||||
}
|
||||
|
||||
#ifdef HW_RVL
|
||||
#ifndef HW_DOL // HW_RVL - WIN
|
||||
for(joybutton_n=7;joybutton_n<17;joybutton_n++)
|
||||
{
|
||||
joybutton_matrix[joy_n][(ordenador.joybuttonkey[joy_n][joybutton_n])] =
|
||||
|
@ -168,13 +168,21 @@ static const char *input_messages[] = {
|
||||
/*05*/ "^|Z|C",
|
||||
/*06*/ "Bind key to Classic",
|
||||
/*07*/ "^|a|b|x|y|L|R|Zl|Zr|+",
|
||||
#else //HW_DOL - WIN
|
||||
/*02*/ "Bind key to Controller",
|
||||
#elif defined(HW_DOL)
|
||||
/*02*/ "Bind key to button",
|
||||
/*03*/ "^|A|B|X|Y",
|
||||
/*04*/ "Unused",
|
||||
/*05*/ "^|----",
|
||||
/*06*/ "Unused",
|
||||
/*07*/ "^|----",
|
||||
#else // WIN
|
||||
/*02*/ "Bind key to button",
|
||||
/*03*/ "^|1|2|3|4",
|
||||
/*04*/ "Bind key to button",
|
||||
/*05*/ "^|8|9",
|
||||
/*06*/ "Bind key to button",
|
||||
/*07*/ "^|10|11|12",
|
||||
|
||||
#endif
|
||||
/*08*/ "Bind key to D-pad",
|
||||
/*09*/ "^|Up|Down|Left|Right",
|
||||
@ -205,7 +213,7 @@ static const char *tools_messages[] = {
|
||||
/*04*/ "Files source",
|
||||
#ifdef HW_RVL
|
||||
/*05*/ "^|default|sd|usb|smb|wos",
|
||||
#else //HW_DOL - Wii
|
||||
#else //HW_DOL - WIN
|
||||
/*05*/ "^|default",
|
||||
#endif
|
||||
/*06*/ "Manage files",
|
||||
@ -213,11 +221,11 @@ static const char *tools_messages[] = {
|
||||
#ifdef HW_DOL
|
||||
/*08*/ "Unused",
|
||||
/*09*/ "^|----",
|
||||
#else //HW_RVL - Wii
|
||||
#else //HW_RVL - WIN
|
||||
/*08*/ "Auto virtual keyboard",
|
||||
/*09*/ "^|on|off",
|
||||
#endif
|
||||
/*10*/ "Keyboard rumble",
|
||||
/*10*/ "Virtual keyboard rumble",
|
||||
/*11*/ "^|on|off",
|
||||
/*12*/ "Load poke file",
|
||||
/*13*/ "Insert poke",
|
||||
|
@ -1159,12 +1159,15 @@ uint32_t menu_wait_key_press()
|
||||
static int joy_bottons_last[2][8];
|
||||
SDL_JoystickUpdate();
|
||||
|
||||
#ifdef HW_DOL
|
||||
#if defined(HW_RVL) || defined(HW_DOL)
|
||||
if (!ordenador.vk_auto)
|
||||
{
|
||||
int SDL_PrivateMouseMotion(Uint8 buttonstate, int relative, Sint16 x, Sint16 y);
|
||||
if (SDL_JoystickGetAxis(ordenador.joystick_sdl[0], 2) > 16384) SDL_PrivateMouseMotion(0,1,4/RATIO,0); //C-stick Horizontal axix
|
||||
if (SDL_JoystickGetAxis(ordenador.joystick_sdl[0], 2) < -16384) SDL_PrivateMouseMotion(0,1,-4/RATIO,0); //C-stick Horizontal axix
|
||||
if (SDL_JoystickGetAxis(ordenador.joystick_sdl[0], 3) > 16384) SDL_PrivateMouseMotion(0,1,0,4/RATIO); //C-stick vertical axix
|
||||
if (SDL_JoystickGetAxis(ordenador.joystick_sdl[0], 3) < -16384) SDL_PrivateMouseMotion(0,1,0,-4/RATIO); //C-stick vertical axix
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Wii-specific, sorry */
|
||||
|
Loading…
Reference in New Issue
Block a user