예제 #1
0
// WarioWare Twisted
u32 TwistedInput(unsigned short pad) {
	// Change this to true if you want to see the screen tilt.
	TiltScreen = false;
	u32 J = StandardMovement(pad) | DecodeGamecube(pad);
#ifdef HW_RVL
	WPADData * wp = WPAD_Data(pad);

	if (wp->exp.type == WPAD_EXP_NUNCHUK) {
		TiltSideways = false;
		J |= StandardDPad(pad);
		// Pause
		if (wp->btns_h & WPAD_BUTTON_PLUS)
			J |= VBA_BUTTON_START;
		// Select and L do nothing!
		if (wp->btns_h & WPAD_BUTTON_MINUS)
			J |= VBA_BUTTON_SELECT;
		if (wp->btns_h & WPAD_BUTTON_1)
			J |= VBA_BUTTON_L | VBA_SPEED;
		if (wp->btns_h & WPAD_BUTTON_2)
			J |= VBA_BUTTON_L | VBA_SPEED;

		// A Button
		if (wp->btns_h & WPAD_BUTTON_A)
			J |= VBA_BUTTON_A;
		// B Button
		if (wp->btns_h & WPAD_BUTTON_B)
			J |= VBA_BUTTON_B;
		// Grab an icon and prevent menu from spinning
		if (wp->btns_h & WPAD_NUNCHUK_BUTTON_Z)
			J |= VBA_BUTTON_R;
		// Calibrate
		if (wp->btns_h & WPAD_NUNCHUK_BUTTON_C) {
			CalibrateWario = true;
		} else CalibrateWario = false;
	} else if (wp->exp.type == WPAD_EXP_CLASSIC) {
		TiltSideways = false;
		J |= StandardDPad(pad) | StandardClassic(pad);

	} else {
		TiltSideways = true;
		J |= StandardSideways(pad);
		if (wp->btns_h & WPAD_BUTTON_B) {
			CalibrateWario = true;
		} else CalibrateWario = false;
	}
#endif
	return J;
}
예제 #2
0
u32 ReturnOfTheKingInput(unsigned short pad) {
	// Only Nunchuk controls available
	// Wiimote, Gamecube and Classic controls depend on user configuration
	u32 J = StandardMovement(pad) | DecodeGamecube(pad) | 
	DecodeWiimote(pad) | DecodeClassic(pad);
	bool AbilityButton=0, AttackButton=0, UseButton=0, ChangeSkillButton=0, PauseButton=0,
	ItemsButton=0, SpeedButton=0;
#ifdef HW_RVL
	WPADData * wp = WPAD_Data(pad);
	// Nunchuk controls are made up
	if (wp->exp.type == WPAD_EXP_NUNCHUK) {
		J |= StandardDPad(pad);
		AbilityButton = wp->btns_h & WPAD_BUTTON_B;
		UseButton = wp->btns_h & WPAD_BUTTON_A;
		PauseButton = wp->btns_h & WPAD_BUTTON_PLUS;
		ItemsButton = wp->btns_h & WPAD_BUTTON_MINUS;
		SpeedButton = wp->btns_h & WPAD_NUNCHUK_BUTTON_C;
		ChangeSkillButton = wp->btns_h & WPAD_NUNCHUK_BUTTON_Z;
		AttackButton = (fabs(wp->gforce.x)> 1.5);
	}
#endif
	
	if (AbilityButton) J |= VBA_BUTTON_A;
	if (AttackButton) J |= VBA_BUTTON_B;
	if (ChangeSkillButton) J |= VBA_BUTTON_L;
	if (ItemsButton) J |= VBA_BUTTON_START;
	if (UseButton) J |= VBA_BUTTON_R;
	if (SpeedButton) J |= VBA_SPEED;
	if (PauseButton) J |= VBA_BUTTON_SELECT;

	return J;
}
예제 #3
0
u32 KirbyTntInput(unsigned short pad) {
	TiltScreen = false;
	u32 J = StandardMovement(pad) | DecodeGamecube(pad);
#ifdef HW_RVL
	WPADData * wp = WPAD_Data(pad);
	if (wp->exp.type == WPAD_EXP_NUNCHUK) {
		TiltSideways = false;
		J |= StandardDPad(pad);
		// Pause
		if (wp->btns_h & WPAD_BUTTON_PLUS)
			J |= VBA_BUTTON_START;
		// Select and L do nothing!
		if (wp->btns_h & WPAD_BUTTON_MINUS)
			J |= VBA_BUTTON_SELECT;
		if (wp->btns_h & WPAD_BUTTON_1)
			J |= VBA_BUTTON_B;
		if (wp->btns_h & WPAD_BUTTON_2)
			J |= VBA_BUTTON_A;

		// A Button
		if (wp->btns_h & WPAD_BUTTON_A)
			J |= VBA_BUTTON_A;
		// B Button
		if (wp->btns_h & WPAD_BUTTON_B)
			J |= VBA_BUTTON_B;
		// Speed
		if (wp->btns_h & WPAD_NUNCHUK_BUTTON_C)
			J |= VBA_SPEED;
	} else if (wp->exp.type == WPAD_EXP_CLASSIC) {
		TiltSideways = false;
		J |= StandardDPad(pad) | DecodeClassic(pad);
		if (wp->btns_h & WPAD_BUTTON_A)
			J |= VBA_BUTTON_A;
	} else {
		TiltSideways = true;
		J |= StandardSideways(pad);
		if (wp->btns_h & WPAD_BUTTON_A)
			J |= VBA_BUTTON_A;
		if (wp->btns_h & WPAD_BUTTON_B)
			J |= VBA_SPEED;
	}
#endif
	return J;
}
예제 #4
0
u32 OnePieceInput(unsigned short pad) {
	// Only Nunchuk and Gamecube controls available
	// Wiimote and Classic controls depend on user configuration
	u32 J = StandardMovement(pad) 
		    | DecodeWiimote(pad) | DecodeClassic(pad);
	static u32 LastDir = VBA_RIGHT;
	bool JumpButton=0, AttackButton=0, ViewButton=0, CharacterButton=0, PauseButton=0,
	DashButton=0, GrabButton=0, SpeedButton=0, AttackUpButton = 0;
#ifdef HW_RVL
	WPADData * wp = WPAD_Data(pad);
	// Nunchuk controls are based on One Piece: Unlimited Adventure for the Wii
	if (wp->exp.type == WPAD_EXP_NUNCHUK) {
		J |= StandardDPad(pad);
		JumpButton = wp->btns_h & WPAD_BUTTON_B;
		AttackButton = wp->btns_h & WPAD_BUTTON_A;
		CharacterButton = wp->btns_h & WPAD_BUTTON_MINUS;
		PauseButton = wp->btns_h & WPAD_BUTTON_PLUS;
		DashButton = wp->btns_h & WPAD_NUNCHUK_BUTTON_C;
		GrabButton = wp->btns_h & WPAD_NUNCHUK_BUTTON_Z;
		ViewButton = wp->btns_h & WPAD_BUTTON_1; // doesn't do anything?
		SpeedButton = wp->btns_h & WPAD_BUTTON_2;
	}
#endif
	// Gamecube controls are based on One Piece Grand Adventure
	{
		u32 gc = PAD_ButtonsHeld(pad);
		signed char gc_px = PAD_SubStickX(pad);
		if (gc_px > 70) J |= VBA_SPEED;
		JumpButton = JumpButton || gc & PAD_BUTTON_Y;
		AttackButton = AttackButton || gc & PAD_BUTTON_A;
		GrabButton = GrabButton || gc & PAD_BUTTON_B;
		AttackUpButton = AttackUpButton || gc & PAD_BUTTON_X;
		DashButton = DashButton || gc & PAD_TRIGGER_L;
		PauseButton = PauseButton || gc & PAD_BUTTON_START;
		CharacterButton = CharacterButton || gc & PAD_TRIGGER_R; // supposed to be block
	}
	
	if (JumpButton) J |= VBA_BUTTON_A;
	if (AttackButton) J |= VBA_BUTTON_B;
	if (AttackUpButton) J |= VBA_UP | VBA_BUTTON_B;
	if (CharacterButton) J |= VBA_BUTTON_L;
	if (DashButton) J |= LastDir;
	if (PauseButton) J |= VBA_BUTTON_START;
	if (GrabButton) J |= VBA_BUTTON_R;
	if (SpeedButton) J |= VBA_SPEED;
	if (ViewButton) J |= VBA_BUTTON_SELECT; // doesn't do anything?

	if (J & VBA_RIGHT) LastDir = VBA_RIGHT;
	else if (J & VBA_LEFT) LastDir = VBA_LEFT;
	
	return J;
}
예제 #5
0
u32 Boktai2Input(unsigned short pad) {
	u32 J = StandardMovement(pad) | StandardDPad(pad)
			| DecodeGamecube(pad) | DecodeClassic(pad);
#ifdef HW_RVL
	WPADData * wp = WPAD_Data(pad);
	static bool GunRaised = false;
		// Action
		if (wp->btns_h & WPAD_BUTTON_A)
			J |= VBA_BUTTON_A;
		// Hold gun or hand up to the light to recharge
		if ((-wp->orient.pitch)> 45) {
			GunRaised = true;
		} else if ((-wp->orient.pitch) < 40) {
			GunRaised = false;
		}
		if (GunRaised)
			J |= VBA_BUTTON_A;
		// Fire Gun Del Sol
		if (wp->btns_h & WPAD_BUTTON_B)
			J |= VBA_BUTTON_B;
		// Swing sword or hammer or stab spear
		if (fabs(wp->gforce.x)> 1.8)
			J |= VBA_BUTTON_B;
		// Look around or change subscreen
		if (wp->btns_h & WPAD_BUTTON_2)
			J |= VBA_BUTTON_R;
		// Start
		if (wp->btns_h & WPAD_BUTTON_PLUS)
			J |= VBA_BUTTON_START;
		// Select
		if (wp->btns_h & WPAD_BUTTON_MINUS)
			J |= VBA_BUTTON_SELECT;

	if (wp->exp.type == WPAD_EXP_NUNCHUK) {
		// Look around
		if (wp->btns_h & WPAD_NUNCHUK_BUTTON_C)
			J |= VBA_BUTTON_R;
		// Change element or change subscreen
		if (wp->btns_h & WPAD_NUNCHUK_BUTTON_Z)
			J |= VBA_BUTTON_L;

		if (wp->btns_h & WPAD_BUTTON_1)
		J |= VBA_SPEED;
	} else {
		// Change element or change subscreen
		if (wp->btns_h & WPAD_BUTTON_1)
		J |= VBA_BUTTON_L;
	}
#endif

	return J;
}
예제 #6
0
u32 HarryPotter1GBCInput(unsigned short pad) {
	u32 J = StandardMovement(pad) | StandardDPad(pad) 
			| DecodeGamecube(pad);
	//u8 ScreenMode = gbReadMemory(0xFFCF);
	//u8 CursorItem = gbReadMemory(0xFFD5);

#ifdef HW_RVL
	WPADData * wp = WPAD_Data(pad);

	// Pause Menu
	if (wp->btns_h & WPAD_BUTTON_PLUS)
		J |= VBA_BUTTON_START;
	// Map (well, it tells you where you are)
	if (wp->btns_h & WPAD_BUTTON_MINUS)
		J |= VBA_BUTTON_SELECT;

	// talk or interact
	if (wp->btns_h & WPAD_BUTTON_A)
		J |= VBA_BUTTON_A;
	// cancel
	if (wp->btns_h & WPAD_BUTTON_B)
		J |= VBA_BUTTON_B;
	// spells
	if (fabs(wp->gforce.x)> 1.5)
		J |= VBA_BUTTON_A;

	if (wp->btns_h & WPAD_BUTTON_1)
		J |= VBA_BUTTON_L;
	if (wp->btns_h & WPAD_BUTTON_1)
		J |= VBA_BUTTON_R;

	// Run (uses emulator speed button)
	if ((wp->exp.type == WPAD_EXP_NUNCHUK) && (wp->btns_h & WPAD_NUNCHUK_BUTTON_Z))
		J |= VBA_SPEED;
	// Camera, just tells you what room you are in. CAKTODO make press and release trigger it
	if ((wp->exp.type == WPAD_EXP_NUNCHUK) && (wp->btns_h & WPAD_NUNCHUK_BUTTON_C))
		J |= VBA_BUTTON_SELECT;
#endif

	// CAKTODO spell gestures

	return J;
}
예제 #7
0
u32 UniversalGravitationInput(unsigned short pad) {
	TiltScreen = true;
	u32 J = StandardMovement(pad) | DecodeGamecube(pad);
#ifdef HW_RVL
	WPADData * wp = WPAD_Data(pad);
	if (wp->exp.type == WPAD_EXP_NUNCHUK) {
		J |= StandardDPad(pad);
		TiltSideways = false;
		// Pause
		if (wp->btns_h & WPAD_BUTTON_PLUS)
			J |= VBA_BUTTON_START;
		// Select, L & R do nothing!
		if (wp->btns_h & WPAD_BUTTON_MINUS)
			J |= VBA_BUTTON_SELECT;
		if (wp->btns_h & WPAD_BUTTON_1)
			J |= VBA_BUTTON_L | VBA_SPEED;
		if (wp->btns_h & WPAD_BUTTON_2)
			J |= VBA_BUTTON_R | VBA_SPEED;

		// Jump
		if (wp->btns_h & WPAD_BUTTON_A)
			J |= VBA_BUTTON_A;
		// tongue
		if (wp->btns_h & WPAD_BUTTON_B)
			J |= VBA_BUTTON_B;
		// Crouch, butt stomp
		if (wp->btns_h & WPAD_NUNCHUK_BUTTON_Z) {
			J |= VBA_DOWN; // Crouch
			J &= ~VBA_UP;
		}
		// Camera
		if (wp->btns_h & WPAD_NUNCHUK_BUTTON_C) {
			J |= VBA_UP;
		}
	}
	else if (wp->exp.type == WPAD_EXP_CLASSIC) {
		TiltSideways = false;
		J |= StandardDPad(pad);
		// A bit stupid playing with the classic controller, but nevermind.
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_PLUS)
			J |= VBA_BUTTON_START;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_MINUS)
			J |= VBA_BUTTON_SELECT;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_X)
			J |= VBA_BUTTON_B;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_Y)
			J |= VBA_BUTTON_R;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_B || wp->btns_h & WPAD_CLASSIC_BUTTON_A)
			J |= VBA_BUTTON_A;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_FULL_L || wp->btns_h & WPAD_CLASSIC_BUTTON_ZL)
			J |= VBA_DOWN;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_FULL_R)
			J |= VBA_UP;
		if (WPAD_CLASSIC_BUTTON_ZR)
			J |= VBA_SPEED;
	} else {
		J |= StandardSideways(pad);
		TiltSideways = true;
	}
#endif
	return J;
}
예제 #8
0
u32 YoshiIslandInput(unsigned short pad)
{
	u32 J = StandardMovement(pad) | DecodeWiimote(pad) | DecodeGamecube(pad);

#ifdef HW_RVL
	WPADData * wp = WPAD_Data(pad);
	if (wp->exp.type == WPAD_EXP_NUNCHUK) {
		J |= StandardDPad(pad);
		// Pause
		if (wp->btns_h & WPAD_BUTTON_PLUS)
			J |= VBA_BUTTON_START;
		// Select
		if (wp->btns_h & WPAD_BUTTON_MINUS)
			J |= VBA_BUTTON_SELECT;

		// Jump
		if (wp->btns_h & WPAD_BUTTON_A)
			J |= VBA_BUTTON_A;
		// Run, pick up
		if (wp->btns_h & WPAD_BUTTON_B)
			J |= VBA_BUTTON_B;
		// throw
		if (wp->btns_h & WPAD_BUTTON_1 || wp->btns_h & WPAD_BUTTON_2)
			J |= VBA_BUTTON_R;

		// Crouch, lay egg
		if (wp->btns_h & WPAD_NUNCHUK_BUTTON_Z) {
			J |= VBA_DOWN; // Crouch
			J &= ~VBA_UP;
		}

		// Camera
		if (wp->btns_h & WPAD_NUNCHUK_BUTTON_C)
			J |= VBA_BUTTON_L;

	} else if (wp->exp.type == WPAD_EXP_CLASSIC) {
		J |= StandardDPad(pad);
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_PLUS)
			J |= VBA_BUTTON_START;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_MINUS)
			J |= VBA_BUTTON_SELECT;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_X)
			J |= VBA_BUTTON_B;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_Y)
			J |= VBA_BUTTON_R;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_B)
			J |= VBA_BUTTON_A;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_A || wp->btns_h & WPAD_CLASSIC_BUTTON_FULL_R)
			J |= VBA_BUTTON_R;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_FULL_L)
			J |= VBA_BUTTON_L;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_ZL || wp->btns_h & WPAD_CLASSIC_BUTTON_ZR)
		{
			J |= VBA_DOWN; // Crouch
			J &= ~VBA_UP;
		}
	}
#endif
	// Gamecube controller
	{
		u32 gc = PAD_ButtonsHeld(pad);
		if (gc & PAD_BUTTON_A)
			J |= VBA_BUTTON_A;
		if (gc & PAD_BUTTON_B)
			J |= VBA_BUTTON_B;
		if (gc & PAD_BUTTON_X)
			J |= VBA_BUTTON_R;
		if (gc & PAD_BUTTON_Y)
			J |= VBA_BUTTON_SELECT;
		if (gc & PAD_TRIGGER_R)
			J |= VBA_BUTTON_R;
		if (gc & PAD_TRIGGER_L)
			J |= VBA_BUTTON_L;
		if (gc & PAD_BUTTON_START)
			J |= VBA_BUTTON_START;
		if (gc & PAD_TRIGGER_Z) {
			J |= VBA_DOWN;
			J &= ~VBA_UP;
		}
	}
	return J;
}
예제 #9
0
u32 Mario3Input(unsigned short pad)
{
	u32 J = StandardMovement(pad) | DecodeGamecube(pad);
#ifdef HW_RVL
	WPADData * wp = WPAD_Data(pad);
	bool run = false;

	run = (wp->exp.type==WPAD_EXP_NUNCHUK && wp->exp.nunchuk.js.mag> 0.83) || (wp->exp.type==WPAD_EXP_CLASSIC && wp->exp.classic.ljs.mag> 0.83);
	run = run && ((J & VBA_LEFT) || (J & VBA_RIGHT));

	if (wp->exp.type == WPAD_EXP_NONE)
		J |= DecodeWiimote(pad);
	else if (wp->exp.type == WPAD_EXP_CLASSIC) {
		// DPad movement
		J |= StandardDPad(pad);
		// Pause
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_PLUS)
			J |= VBA_BUTTON_START;
		// Select
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_MINUS)
			J |= VBA_BUTTON_L;
		// Replay menu
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_FULL_R)
			J |= VBA_BUTTON_SELECT;
		// Jump
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_B)
			J |= VBA_BUTTON_A;
		// Run, pick up, throw, fire
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_X || wp->btns_h & WPAD_CLASSIC_BUTTON_Y || run)
			J |= VBA_BUTTON_B;
		// Spin attack (racoon costume, fire flower)
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_A)
			J |= VBA_BUTTON_B;
		// Crouch
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_ZL || wp->btns_h & WPAD_CLASSIC_BUTTON_FULL_L) {
			J |= VBA_DOWN;
			J &= ~VBA_UP;
		}
		// Speed
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_ZR)
			J |= VBA_SPEED;

	} else if (wp->exp.type == WPAD_EXP_NUNCHUK) {
		J |= StandardDPad(pad);
		// Pause
		if (wp->btns_h & WPAD_BUTTON_PLUS)
			J |= VBA_BUTTON_START;
		// Select
		if (wp->btns_h & WPAD_BUTTON_MINUS)
			J |= VBA_BUTTON_L;
		// Replay Menu
		if (wp->btns_h & WPAD_BUTTON_1)
			J |= VBA_BUTTON_SELECT;
		// Jump
		if (wp->btns_h & WPAD_BUTTON_A)
			J |= VBA_BUTTON_A;
		// Run, pick up, throw, fire
		if (wp->btns_h & WPAD_BUTTON_B || run)
			J |= VBA_BUTTON_B;
		// Spin attack (racoon, fire flower)
		if (fabs(wp->gforce.x)> 1.4)
			J |= VBA_BUTTON_B;
		// Crouch
		if (wp->btns_h & WPAD_NUNCHUK_BUTTON_Z)
		{
			J |= VBA_DOWN;
			J &= ~VBA_UP;
		}
		// Speed
		if (wp->btns_h & WPAD_BUTTON_2)
			J |= VBA_SPEED;
	}
#endif

	return J;
}
예제 #10
0
u32 MarioWorldInput(unsigned short pad) {
	u32 J = StandardMovement(pad) | DecodeGamecube(pad);
	u8 CarryState = CPUReadByte(0x3003F06); // 01 = carrying, 00 = not carrying
	u8 InYoshisMouth = CPUReadByte(0x3003F53); // FF = nothing, 00 = no level, else thing
	u8 FallState = CPUReadByte(0x3003FA1); // 0B = jump, 24 = fall
	u8 RidingYoshi = CPUReadByte(0x3004302); // 00 = not riding, 01 = riding
	static bool NeedStomp = false;
	bool dontrun = false;
	bool run = false;
	static bool dontletgo = false;
	dontrun = (InYoshisMouth != 0 && InYoshisMouth != 0xFF && RidingYoshi);
	bool BButton = false;
#ifdef HW_RVL
	WPADData * wp = WPAD_Data(pad);

	run = (wp->exp.type==WPAD_EXP_NUNCHUK && wp->exp.nunchuk.js.mag> 0.83) || (wp->exp.type==WPAD_EXP_CLASSIC && wp->exp.classic.ljs.mag> 0.83);
	BButton = (wp->exp.type == WPAD_EXP_CLASSIC && (wp->btns_h & WPAD_CLASSIC_BUTTON_X || wp->btns_h & WPAD_CLASSIC_BUTTON_Y)) || wp->btns_h & WPAD_BUTTON_B;
#endif
	u32 gc = PAD_ButtonsHeld(pad);
	BButton = BButton || gc & PAD_BUTTON_B;
	if (run && CarryState && !BButton)
		dontletgo = true;
	if (!CarryState)
		dontletgo = false;
#ifdef HW_RVL
	if (wp->exp.type == WPAD_EXP_NUNCHUK) {
		J |= StandardDPad(pad);
		// Pause
		if (wp->btns_h & WPAD_BUTTON_PLUS)
			J |= VBA_BUTTON_START;
		// Select
		if (wp->btns_h & WPAD_BUTTON_MINUS)
			J |= VBA_BUTTON_SELECT;

		// Jump
		if (wp->btns_h & WPAD_BUTTON_A)
			J |= VBA_BUTTON_A;
		// Run, pick up
		if ((run && !dontrun) || wp->btns_h & WPAD_BUTTON_B || dontletgo)
			J |= VBA_BUTTON_B;
		if (wp->btns_h & WPAD_BUTTON_B && dontletgo) {
			J = J & ~VBA_BUTTON_B;
			dontletgo = false;
		}
		// Spin attack
		if (fabs(wp->gforce.x)> 1.5)
			J |= VBA_BUTTON_R;

		// Butt stomp
		if (FallState!=0 && (wp->exp.type == WPAD_EXP_NUNCHUK) && (wp->btns_h & WPAD_NUNCHUK_BUTTON_Z) && (!RidingYoshi))
			NeedStomp = true;
		if (FallState!=0 && (wp->exp.type == WPAD_EXP_CLASSIC) && (wp->btns_h & WPAD_CLASSIC_BUTTON_ZL || wp->btns_h & WPAD_CLASSIC_BUTTON_ZR) && (!RidingYoshi))
			NeedStomp = true;
		// Crouch
		if (wp->btns_h & WPAD_NUNCHUK_BUTTON_Z) {
			J |= VBA_DOWN; // Crouch
			J &= ~VBA_UP;
		}

		// Camera
		if (wp->btns_h & WPAD_NUNCHUK_BUTTON_C) {
			if (J & VBA_DOWN || J & VBA_UP)
				J |= VBA_BUTTON_L;
			else if (J & VBA_RIGHT || J & VBA_LEFT) {
				J |= VBA_BUTTON_L;
				J &= ~VBA_RIGHT;
				J &= ~VBA_LEFT;
			}
		}
	} else if (wp->exp.type == WPAD_EXP_CLASSIC) {
		J |= StandardDPad(pad);
		// Pause
		if (wp->btns_h & WPAD_BUTTON_PLUS)
			J |= VBA_BUTTON_START;
		// Select
		if (wp->btns_h & WPAD_BUTTON_MINUS)
			J |= VBA_BUTTON_SELECT;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_PLUS)
			J |= VBA_BUTTON_START;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_MINUS)
			J |= VBA_BUTTON_SELECT;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_X || wp->btns_h & WPAD_CLASSIC_BUTTON_Y)
			J |= VBA_BUTTON_B;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_B)
			J |= VBA_BUTTON_A;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_A || wp->btns_h & WPAD_CLASSIC_BUTTON_FULL_R)
			J |= VBA_BUTTON_R;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_FULL_L)
			J |= VBA_BUTTON_L;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_ZL || wp->btns_h & WPAD_CLASSIC_BUTTON_ZR)
		{
			J |= VBA_DOWN; // Crouch
			J &= ~VBA_UP;
		}
	}

	BButton = (wp->exp.type == WPAD_EXP_CLASSIC && (wp->btns_h & WPAD_CLASSIC_BUTTON_X || wp->btns_h & WPAD_CLASSIC_BUTTON_Y)) || wp->btns_h & WPAD_BUTTON_B;
#endif
	// Gamecube controller
	if (gc & PAD_BUTTON_A)
		J |= VBA_BUTTON_A;
	if (gc & PAD_BUTTON_B)
		J |= VBA_BUTTON_B;
	if (gc & PAD_BUTTON_X)
		J |= VBA_BUTTON_R;
	if (gc & PAD_BUTTON_Y)
		J |= VBA_BUTTON_SELECT;
	if (gc & PAD_TRIGGER_R)
		J |= VBA_BUTTON_R;
	if (gc & PAD_TRIGGER_L)
		J |= VBA_BUTTON_L;
	if (gc & PAD_BUTTON_START)
		J |= VBA_BUTTON_START;
	if (gc & PAD_TRIGGER_Z) {
		J |= VBA_DOWN;
		J &= ~VBA_UP;
	}
	// if we try to use Yoshi's tongue while running, release run for one frame
	if (run && BButton && !dontrun && !dontletgo)
		J &= ~VBA_BUTTON_B;
	if (NeedStomp && FallState == 0 && !RidingYoshi) {
		J |= VBA_BUTTON_R; // spin attack only works when on ground
		NeedStomp = false;
	}

	return J;
}
예제 #11
0
u32 MarioLand2Input(unsigned short pad) {
	u32 J = StandardMovement(pad) | DecodeGamecube(pad);
#ifdef HW_RVL
	WPADData * wp = WPAD_Data(pad);
	bool run = false;

	run = (wp->exp.type==WPAD_EXP_NUNCHUK && wp->exp.nunchuk.js.mag> 0.83) || (wp->exp.type==WPAD_EXP_CLASSIC && wp->exp.classic.ljs.mag> 0.83);
	run = run && ((J & VBA_LEFT) || (J & VBA_RIGHT));

	if (wp->exp.type == WPAD_EXP_NONE)
		J |= StandardSideways(pad);
	else if (wp->exp.type == WPAD_EXP_CLASSIC) {
		J |= StandardDPad(pad);
		// Pause
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_PLUS)
			J |= VBA_BUTTON_START;
		// Select
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_MINUS)
			J |= VBA_BUTTON_SELECT;
		// Jump
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_B)
			J |= VBA_BUTTON_A;
		// Run, pick up, throw, fire
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_X || wp->btns_h & WPAD_CLASSIC_BUTTON_Y || run)
			J |= VBA_BUTTON_B;
		// Spin attack
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_A)
			J |= VBA_DOWN | VBA_BUTTON_A;
		// Camera
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_FULL_L)
			J |= VBA_DOWN | VBA_BUTTON_B;
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_FULL_R)
			J |= VBA_UP | VBA_BUTTON_B;
		// Crouch
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_ZL && (!(wp->btns_h & WPAD_CLASSIC_BUTTON_A))) {
			J |= VBA_DOWN;
			// if the run button is held down, crouching also looks down
			// which we don't want when using the Z button
			J &= ~VBA_BUTTON_B;
			J &= ~VBA_UP;
		}
		// Speed
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_ZR)
			J |= VBA_SPEED;
	} else if (wp->exp.type == WPAD_EXP_NUNCHUK) {
		// Pause
		if (wp->btns_h & WPAD_BUTTON_PLUS)
			J |= VBA_BUTTON_START;
		// Select
		if (wp->btns_h & WPAD_BUTTON_MINUS)
			J |= VBA_BUTTON_SELECT;
		// Jump
		if (wp->btns_h & WPAD_BUTTON_A)
			J |= VBA_BUTTON_A;
		// Run, pick up, throw, fire
		if (wp->btns_h & WPAD_BUTTON_B || run)
			J |= VBA_BUTTON_B;
		// Spin attack
		if (fabs(wp->gforce.x)> 1.4)
			J |= VBA_DOWN | VBA_BUTTON_A;
		// Camera
		if (wp->btns_h & WPAD_NUNCHUK_BUTTON_C)
			J |= VBA_BUTTON_B;
		if (wp->btns_h & WPAD_BUTTON_UP)
			J |= VBA_BUTTON_B | VBA_UP;
		if (wp->btns_h & WPAD_BUTTON_DOWN)
			J |= VBA_BUTTON_B | VBA_DOWN;
		if (wp->btns_h & WPAD_BUTTON_LEFT)
			J |= VBA_BUTTON_B | VBA_LEFT;
		if (wp->btns_h & WPAD_BUTTON_RIGHT)
			J |= VBA_BUTTON_B | VBA_RIGHT;
		// Crouch
		if (wp->btns_h & WPAD_NUNCHUK_BUTTON_Z && (!(wp->btns_h & WPAD_BUTTON_A))) {
			J |= VBA_DOWN;
			// if the run button is held down, crouching also looks down
			// which we don't want when using the Z button
			J &= ~VBA_BUTTON_B;
			J &= ~VBA_UP;
		}
		// Speed
		if (wp->btns_h & WPAD_BUTTON_1 || wp->btns_h & WPAD_BUTTON_2)
			J |= VBA_SPEED;
	} else
		J |= DecodeWiimote(pad);
#endif
	return J;
}
예제 #12
0
u32 TMNTGBA2Input(unsigned short pad) {
	u32 J = StandardMovement(pad) | StandardDPad(pad);
	static u32 LastDir = VBA_RIGHT;
	//static bool wait = false;
	//static int holdcount = 0;
	bool Jump=0, Attack=0, SpinKick=0, SpecialMove=0, Pause=0, Select=0, Look=0;

#ifdef HW_RVL
	WPADData * wp = WPAD_Data(pad);
	if (wp->exp.type == WPAD_EXP_NUNCHUK) {
		Jump = (wp->btns_h & WPAD_BUTTON_A);
		Attack = (fabs(wp->gforce.x)> 1.5) || (wp->btns_h & WPAD_BUTTON_B);
		SpinKick = (fabs(wp->exp.nunchuk.gforce.x)> 0.5);
		SpecialMove = (wp->btns_h & WPAD_NUNCHUK_BUTTON_Z);
		Pause = (wp->btns_h & WPAD_BUTTON_PLUS);
		Select = (wp->btns_h & WPAD_BUTTON_MINUS);
		Look = (wp->btns_h & WPAD_NUNCHUK_BUTTON_C);
		// Swap Turtles or super turtle summon
		if (wp->btns_h & WPAD_BUTTON_B) {
			//J |= VBA_BUTTON_START;
		}
	} else if (wp->exp.type == WPAD_EXP_CLASSIC) {
		Jump = (wp->btns_h & WPAD_CLASSIC_BUTTON_B);
		Attack = (wp->btns_h & WPAD_CLASSIC_BUTTON_A);
		SpinKick = (wp->btns_h & WPAD_CLASSIC_BUTTON_X);
		Pause = (wp->btns_h & WPAD_CLASSIC_BUTTON_PLUS);
		Select = (wp->btns_h & WPAD_CLASSIC_BUTTON_MINUS);
		SpecialMove = (wp->btns_h & (WPAD_CLASSIC_BUTTON_FULL_L | WPAD_CLASSIC_BUTTON_FULL_R | WPAD_CLASSIC_BUTTON_ZR));
		Look = (wp->btns_h & WPAD_CLASSIC_BUTTON_ZL);
		// Swap Turtles or super turtle summon
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_Y) {
			//J |= VBA_BUTTON_START;
		}
	} else {
		Jump = (wp->btns_h & WPAD_BUTTON_A);
		Attack = (fabs(wp->gforce.x)> 1.5) || (wp->btns_h & WPAD_BUTTON_B);
		Pause = (wp->btns_h & WPAD_BUTTON_PLUS);
		Select = (wp->btns_h & WPAD_BUTTON_MINUS);
		// Swap Turtles or super turtle summon
		if (wp->btns_h & WPAD_BUTTON_B) {
			Look = true;
		}
		SpinKick = (wp->btns_h & WPAD_BUTTON_1);
		SpecialMove = (wp->btns_h & WPAD_BUTTON_2);
	}

#endif
	u32 gc = PAD_ButtonsHeld(pad);
	// DPad moves
	if (gc & PAD_BUTTON_UP)
		J |= VBA_UP;
	if (gc & PAD_BUTTON_DOWN)
		J |= VBA_DOWN;
	if (gc & PAD_BUTTON_LEFT)
		J |= VBA_LEFT;
	if (gc & PAD_BUTTON_RIGHT)
		J |= VBA_RIGHT;
	// Jump
	if (gc & PAD_BUTTON_A) J |= VBA_BUTTON_A;
	// Swap turtles
	if (gc & PAD_BUTTON_B) {
		Look = true;
	}
	// Attack
	if (gc & PAD_BUTTON_X) Attack = true;
	// Spin kick
	if (gc & PAD_BUTTON_Y) SpinKick = true;
	// Pause
	if (gc & PAD_BUTTON_START) Pause = true;
	// Select
	if (gc & PAD_TRIGGER_Z) Select = true;
	// SpecialMove
	if (gc & PAD_TRIGGER_L || gc & PAD_TRIGGER_R) SpecialMove = true;

	if (Jump) J |= VBA_BUTTON_A;
	if (Attack) J |= VBA_BUTTON_B;
	if (SpinKick) J |= VBA_BUTTON_R;
	if (Pause) J |= VBA_BUTTON_START;
	if (Select) J |= VBA_BUTTON_SELECT;
	if (SpecialMove) {
		J |= VBA_UP | VBA_BUTTON_A; // CAKTODO, currently works for Don and Mike
	}
		
	if (J & VBA_RIGHT) LastDir = VBA_RIGHT;
	else if (J & VBA_LEFT) LastDir = VBA_LEFT;
	return J;
}
예제 #13
0
u32 TMNTInput(unsigned short pad) {
	u32 J = StandardMovement(pad) | StandardDPad(pad);
	static u32 LastDir = VBA_RIGHT;
	static bool wait = false;
	static int holdcount = 0;
	bool Jump=0, Attack=0, SpinKick=0, Roll=0, Pause=0, Select=0;

#ifdef HW_RVL
	WPADData * wp = WPAD_Data(pad);
	if (wp->exp.type == WPAD_EXP_NUNCHUK) {
		Jump = (wp->btns_h & WPAD_BUTTON_A);
		Attack = (fabs(wp->gforce.x)> 1.5);
		SpinKick = (fabs(wp->exp.nunchuk.gforce.x)> 0.5);
		Roll = (wp->btns_h & WPAD_NUNCHUK_BUTTON_Z || wp->btns_h & WPAD_NUNCHUK_BUTTON_C);
		Pause = (wp->btns_h & WPAD_BUTTON_PLUS);
		Select = (wp->btns_h & WPAD_BUTTON_MINUS);
		// Swap Turtles or super turtle summon
		if (wp->btns_h & WPAD_BUTTON_B) {
			if (wp->exp.nunchuk.orient.pitch < -35 && wp->orient.pitch < -35)
				J |= VBA_BUTTON_L | VBA_BUTTON_R;
			else J |= VBA_BUTTON_R;
		}
	} else if (wp->exp.type == WPAD_EXP_CLASSIC) {
		Jump = (wp->btns_h & WPAD_CLASSIC_BUTTON_B);
		Attack = (wp->btns_h & WPAD_CLASSIC_BUTTON_A);
		SpinKick = (wp->btns_h & WPAD_CLASSIC_BUTTON_X);
		Pause = (wp->btns_h & WPAD_CLASSIC_BUTTON_PLUS);
		Select = (wp->btns_h & WPAD_CLASSIC_BUTTON_MINUS);
		Roll = (wp->btns_h & (WPAD_CLASSIC_BUTTON_FULL_L | WPAD_CLASSIC_BUTTON_FULL_R | WPAD_CLASSIC_BUTTON_ZL | WPAD_CLASSIC_BUTTON_ZR));
		// Swap Turtles or super turtle summon
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_Y) {
			holdcount++;
			if (holdcount > 20)
				J |= VBA_BUTTON_L | VBA_BUTTON_R;
		}
		if (wp->btns_u & WPAD_CLASSIC_BUTTON_Y) {
			if (holdcount <= 20)
				J |= VBA_BUTTON_R;
			holdcount = 0;
		}
	} else {
		Jump = (wp->btns_h & WPAD_BUTTON_A);
		Attack = (fabs(wp->gforce.x)> 1.5);
		Pause = (wp->btns_h & WPAD_BUTTON_PLUS);
		Select = (wp->btns_h & WPAD_BUTTON_MINUS);
		// Swap Turtles or super turtle summon
		if (wp->btns_h & WPAD_BUTTON_B) {
			if (wp->orient.pitch < -40)
				J |= VBA_BUTTON_L | VBA_BUTTON_R;
			else J |= VBA_BUTTON_R;
		}
		SpinKick = (wp->btns_h & WPAD_BUTTON_1);
		Roll = (wp->btns_h & WPAD_BUTTON_2);
	}

#endif
	u32 gc = PAD_ButtonsHeld(pad);
	u32 released = PAD_ButtonsUp(pad);
	// DPad moves
	if (gc & PAD_BUTTON_UP)
		J |= VBA_UP;
	if (gc & PAD_BUTTON_DOWN)
		J |= VBA_DOWN;
	if (gc & PAD_BUTTON_LEFT)
		J |= VBA_LEFT;
	if (gc & PAD_BUTTON_RIGHT)
		J |= VBA_RIGHT;
	// Jump
	if (gc & PAD_BUTTON_A) J |= VBA_BUTTON_A;
	// Swap turtles, hold for super family move
	if (gc & PAD_BUTTON_B) {
		holdcount++;
		if (holdcount > 20)
			J |= VBA_BUTTON_L | VBA_BUTTON_R;
	}
	if (released & PAD_BUTTON_B) {
		if (holdcount <= 20)
			J |= VBA_BUTTON_R;
		holdcount = 0;
	}
	// Attack
	if (gc & PAD_BUTTON_X) Attack = true;
	// Spin kick
	if (gc & PAD_BUTTON_Y) SpinKick = true;
	// Pause
	if (gc & PAD_BUTTON_START) Pause = true;
	// Select
	if (gc & PAD_TRIGGER_Z) Select = true;
	// Roll
	if (gc & PAD_TRIGGER_L || gc & PAD_TRIGGER_R) Roll = true;

	if (Jump) J |= VBA_BUTTON_A;
	if (Attack) J |= VBA_BUTTON_B;
	if (SpinKick) J |= VBA_BUTTON_B | VBA_BUTTON_A;
	if (Pause) J |= VBA_BUTTON_START;
	if (Select) J |= VBA_BUTTON_SELECT;
	if (Roll) {
		if (!wait) {
			J |= LastDir; // Double tap D-Pad to roll
			wait = true;
		} else wait = false;
	}
	
		
	if (J & VBA_RIGHT) LastDir = VBA_RIGHT;
	else if (J & VBA_LEFT) LastDir = VBA_LEFT;
	return J;
}
예제 #14
0
u32 TMNT3Input(unsigned short pad) {
	u32 J = StandardMovement(pad) | StandardDPad(pad);
	static u32 LastDir = VBA_RIGHT;
	bool Jump=0, Attack=0, SpinKick=0, Roll=0, Pause=0, Select=0;

#ifdef HW_RVL
	WPADData * wp = WPAD_Data(pad);
	if (wp->exp.type == WPAD_EXP_NUNCHUK) {
		Jump = (wp->btns_h & WPAD_BUTTON_A);
		Attack = (fabs(wp->gforce.x)> 1.5);
		SpinKick = (fabs(wp->exp.nunchuk.gforce.x)> 0.5);
		Roll = (wp->btns_h & WPAD_NUNCHUK_BUTTON_Z || wp->btns_h & WPAD_NUNCHUK_BUTTON_C);
		Pause = (wp->btns_h & WPAD_BUTTON_PLUS);
		Select = (wp->btns_h & WPAD_BUTTON_MINUS);
		// Swap Turtles or super turtle summon
		if (wp->btns_h & WPAD_BUTTON_B) {
			J |= VBA_BUTTON_START;
		}
	} else if (wp->exp.type == WPAD_EXP_CLASSIC) {
		J |= StandardDPad(pad);
		Jump = (wp->btns_h & WPAD_CLASSIC_BUTTON_B);
		Attack = (wp->btns_h & WPAD_CLASSIC_BUTTON_A);
		SpinKick = (wp->btns_h & WPAD_CLASSIC_BUTTON_X);
		Pause = (wp->btns_h & WPAD_CLASSIC_BUTTON_PLUS);
		Select = (wp->btns_h & WPAD_CLASSIC_BUTTON_MINUS);
		Roll = (wp->btns_h & (WPAD_CLASSIC_BUTTON_FULL_L | WPAD_CLASSIC_BUTTON_FULL_R | WPAD_CLASSIC_BUTTON_ZL | WPAD_CLASSIC_BUTTON_ZR));
		// Swap Turtles or super turtle summon
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_Y) {
			J |= VBA_BUTTON_START;
		}
	} else {
		Jump = (wp->btns_h & WPAD_BUTTON_A);
		Attack = (fabs(wp->gforce.x)> 1.5);
		Pause = (wp->btns_h & WPAD_BUTTON_PLUS);
		Select = (wp->btns_h & WPAD_BUTTON_MINUS);
		// Swap Turtles or super turtle summon
		if (wp->btns_h & WPAD_BUTTON_B) {
			J |= VBA_BUTTON_START;
		}
		SpinKick = (wp->btns_h & WPAD_BUTTON_1);
		Roll = (wp->btns_h & WPAD_BUTTON_2);
	}

#endif
	u32 gc = PAD_ButtonsHeld(pad);
	// DPad moves
	if (gc & PAD_BUTTON_UP)
		J |= VBA_UP;
	if (gc & PAD_BUTTON_DOWN)
		J |= VBA_DOWN;
	if (gc & PAD_BUTTON_LEFT)
		J |= VBA_LEFT;
	if (gc & PAD_BUTTON_RIGHT)
		J |= VBA_RIGHT;
	// Jump
	if (gc & PAD_BUTTON_A) J |= VBA_BUTTON_A;
	// Swap turtles
	if (gc & PAD_BUTTON_B) {
		J |= VBA_BUTTON_START;
	}
	// Attack
	if (gc & PAD_BUTTON_X) Attack = true;
	// Spin kick
	if (gc & PAD_BUTTON_Y) SpinKick = true;
	// Pause
	if (gc & PAD_BUTTON_START) Pause = true;
	// Select
	if (gc & PAD_TRIGGER_Z) Select = true;
	// Roll
	if (gc & PAD_TRIGGER_L || gc & PAD_TRIGGER_R) Roll = true;

	if (Jump || Roll) J |= VBA_BUTTON_A;
	if (Attack || SpinKick) J |= VBA_BUTTON_B;
	if (Pause) J |= VBA_BUTTON_SELECT;
	if (Select) J |= VBA_BUTTON_START;
		
	if (J & VBA_RIGHT) LastDir = VBA_RIGHT;
	else if (J & VBA_LEFT) LastDir = VBA_LEFT;
	return J;
}
예제 #15
0
u32 Mario1ClassicInput(unsigned short pad) {
	u32 J = StandardMovement(pad) | DecodeGamecube(pad) | DecodeKeyboard(pad);
#ifdef HW_RVL
	WPADData * wp = WPAD_Data(pad);

	bool run = false;

	run = (wp->exp.type==WPAD_EXP_NUNCHUK && wp->exp.nunchuk.js.mag> 0.83) || (wp->exp.type==WPAD_EXP_CLASSIC && wp->exp.classic.ljs.mag> 0.83);
	run = run && ((J & VBA_LEFT) || (J & VBA_RIGHT));

	if (wp->exp.type==WPAD_EXP_NUNCHUK) {
		J |= StandardDPad(pad);
		// Pause
		if (wp->btns_h & WPAD_BUTTON_PLUS)
			J |= VBA_BUTTON_START;
		// Select
		if (wp->btns_h & WPAD_BUTTON_MINUS)
			J |= VBA_BUTTON_SELECT;

		// Jump
		if (wp->btns_h & WPAD_BUTTON_A)
			J |= VBA_BUTTON_A;
		// Run, pick up
		if (wp->btns_h & WPAD_BUTTON_B || run)
			J |= VBA_BUTTON_B;
		// Starspin shoots when using fireflower
		if (fabs(wp->gforce.x)> 1.5)
			J |= VBA_BUTTON_B;

		// Crouch
		if (wp->btns_h & WPAD_NUNCHUK_BUTTON_Z) {
			J |= VBA_DOWN;
			J &= ~VBA_UP;
		}

		// Speed
		if (wp->btns_h & WPAD_BUTTON_1 || wp->btns_h & WPAD_BUTTON_2)
			J |= VBA_SPEED;
	} else if (wp->exp.type == WPAD_EXP_CLASSIC) {
		// DPad movement
		J |= StandardDPad(pad);
		// Pause
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_PLUS)
			J |= VBA_BUTTON_START;
		// Select
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_MINUS)
			J |= VBA_BUTTON_SELECT;
		// Jump
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_B)
			J |= VBA_BUTTON_A;
		// Run, pick up, throw, fire
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_X || wp->btns_h & WPAD_CLASSIC_BUTTON_Y || run)
			J |= VBA_BUTTON_B;
		// Spin attack
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_A)
			J |= VBA_BUTTON_B;
		// Crouch
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_ZL || wp->btns_h & WPAD_CLASSIC_BUTTON_FULL_L)
		{
			J |= VBA_DOWN;
			J &= ~VBA_UP;
		}
		// Speed
		if (wp->btns_h & WPAD_CLASSIC_BUTTON_ZR)
			J |= VBA_SPEED;
	} else
		J |= StandardSideways(pad);
#endif
	return J;
}