⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 redbaron.c

📁 这个是延伸mame的在wince平台下的游戏模拟器的代码
💻 C
字号:
#include "driver.h"

/*

	Red Baron sound notes:
	$fx - $5x = explosion volume
	$08 = disable all sounds? led?
	$04 = machine gun sound
	$02 = nosedive sound

*/

/* Constants for the sound names in the redbaron sample array */
#define kFire			0
#define kNosedive		1
#define kExplode		2

/* used in drivers/redbaron.c to select joystick pot */
extern int rb_input_select;


void redbaron_sounds_w (int offset,int data)
{
	static int lastValue = 0;

	rb_input_select = (data & 0x01);

	if (lastValue == data) return;
	lastValue = data;

	/* Enable explosion output */
	if (data & 0xf0)
		sample_start (0, kExplode, 0);

	/* Enable nosedive output */
	if (data & 0x02)
		sample_start (0, kNosedive, 0);

	/* Enable firing output */
	if (data & 0x04)
		sample_start (1, kFire, 0);

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -