admin管理员组

文章数量:1563235


代码核心逻辑,修改配置的按键信息,配置play2,3,4 的按键返回值,然后上层传递下来,完成此游戏双人对打。

代码位置:

// Get the state (pressed = 1, not pressed = 0) of a particular input code

int SDLinpState( int nCode )

{

int pressed = 0;

__android_log_print(ANDROID_LOG_INFO,"lxm button ",“SDLinpState= %d”,nCode);

switch( nCode )

{

	case 2:

		return android_pad_start;



	case 200:

		return android_pad_up;



	case 208:

		return android_pad_down;



	case 203:

		return android_pad_left;



	case 205:

		return android_pad_right;



	case 30:

希望帮助到大家。

本文标签: 盒子四人双人街机游戏方案