Support ZL/ZR

This commit is contained in:
simon.kagstrom 2009-01-11 12:57:52 +00:00
parent 5bc645cfb5
commit 776b82c126
3 changed files with 12 additions and 0 deletions

View File

@ -311,6 +311,8 @@ void C64::bind_key(Prefs *np)
bind_key_messages[CLASSIC_B] = "Bind to classic B"; bind_key_messages[CLASSIC_B] = "Bind to classic B";
bind_key_messages[CLASSIC_L] = "Bind to classic L"; bind_key_messages[CLASSIC_L] = "Bind to classic L";
bind_key_messages[CLASSIC_R] = "Bind to classic R"; bind_key_messages[CLASSIC_R] = "Bind to classic R";
bind_key_messages[CLASSIC_ZL] = "Bind to classic ZL";
bind_key_messages[CLASSIC_ZR] = "Bind to classic ZR";
} }
menu_init(&bind_key_menu, this->menu_font, bind_key_messages, menu_init(&bind_key_menu, this->menu_font, bind_key_messages,
@ -675,6 +677,8 @@ uint8 C64::poll_joystick(int port)
extra_keys[CLASSIC_B] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_B; extra_keys[CLASSIC_B] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_B;
extra_keys[CLASSIC_L] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_FULL_L; extra_keys[CLASSIC_L] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_FULL_L;
extra_keys[CLASSIC_R] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_FULL_R; extra_keys[CLASSIC_R] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_FULL_R;
extra_keys[CLASSIC_ZL] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_ZL;
extra_keys[CLASSIC_ZR] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_ZR;
extra_keys[WIIMOTE_PLUS] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_PLUS; extra_keys[WIIMOTE_PLUS] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_PLUS;
extra_keys[WIIMOTE_MINUS] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_MINUS; extra_keys[WIIMOTE_MINUS] = (held_classic | held_classic_other) & CLASSIC_CTRL_BUTTON_MINUS;

View File

@ -145,6 +145,8 @@ bool Prefs::operator==(const Prefs &rhs) const
&& this->JoystickKeyBinding[8] == rhs.JoystickKeyBinding[8] && this->JoystickKeyBinding[8] == rhs.JoystickKeyBinding[8]
&& this->JoystickKeyBinding[9] == rhs.JoystickKeyBinding[9] && this->JoystickKeyBinding[9] == rhs.JoystickKeyBinding[9]
&& this->JoystickKeyBinding[10] == rhs.JoystickKeyBinding[10] && this->JoystickKeyBinding[10] == rhs.JoystickKeyBinding[10]
&& this->JoystickKeyBinding[11] == rhs.JoystickKeyBinding[11]
&& this->JoystickKeyBinding[12] == rhs.JoystickKeyBinding[12]
&& this->DisplayOption == rhs.DisplayOption && this->DisplayOption == rhs.DisplayOption
#endif #endif
); );
@ -334,6 +336,10 @@ void Prefs::Load(char *filename)
JoystickKeyBinding[9] = atoi(value); JoystickKeyBinding[9] = atoi(value);
else if (!strcmp(keyword, "JoystickKeyBinding10")) else if (!strcmp(keyword, "JoystickKeyBinding10"))
JoystickKeyBinding[10] = atoi(value); JoystickKeyBinding[10] = atoi(value);
else if (!strcmp(keyword, "JoystickKeyBinding11"))
JoystickKeyBinding[11] = atoi(value);
else if (!strcmp(keyword, "JoystickKeyBinding12"))
JoystickKeyBinding[12] = atoi(value);
else if (!strcmp(keyword, "DisplayOption")) else if (!strcmp(keyword, "DisplayOption"))
DisplayOption = atoi(value); DisplayOption = atoi(value);
#endif #endif

View File

@ -51,6 +51,8 @@ enum {
CLASSIC_B, CLASSIC_B,
CLASSIC_L, CLASSIC_L,
CLASSIC_R, CLASSIC_R,
CLASSIC_ZR,
CLASSIC_ZL,
N_WIIMOTE_BINDINGS N_WIIMOTE_BINDINGS
}; };