#include <stdio.h>
#include <stdlib.h>
#include <winb.h>
#include <te.h>
#include <fntb.h>
#include <gui.h>

extern int	levelDialogId ;
extern int	levelOkBtnId ;
extern int	levelOkchk() ;
extern int	levelPlayBtnId ;
extern int	levelPlay() ;
extern int	levelUndoBtnId ;
extern int	levelUndo() ;
extern int	levelFixBtnId ;
extern int	levelFix() ;
extern int	levelCanBtnId ;
extern int	levelCanchk() ;
extern int	levelMesId[34] ;
extern int	levelSubDialogId ;
extern int	levelMulVolumeIdL ;
extern int	levelMulSetL() ;
extern int	levelMulNumIdL ;
extern int	levelMulVolumeIdR ;
extern int	levelMulSetR() ;
extern int	levelMulNumIdR ;
extern int	levelInfBtnId ;
extern int	levelInf() ;

#define ALIGN	4
#define OFFSET(type) (sizeof(MMIPACKET) + (sizeof(type)+ALIGN-1)/ALIGN*ALIGN)

/*	MMI_init 用データ	*/

/*	ヘッダ	*/

MMIINIT	initDataIWVLEV = { "MmiInit",  46, 0 } ;

/* levelDialogId */

static MMIPACKET d001 = {	&levelDialogId,
							NULL,
							&MJ_ALERTL40,
							OFFSET(ALERTL40),
							MS_NONE
						} ;
static ALERTL40	d001d = {	MS_BTLEFTL40 | MS_EVMOVEL40 | MS_EVMOSONL40 | MS_EVKEYONL40,
							  34, 118, 607, 379, 8, 4, 8,
							MS_PANELL40 | MS_UFRAMEL40 | MS_FRAMEL40,
							NULL,   0,   0,
							   0,   0,   0,   0
						} ;

/* levelOkBtnId */

static MMIPACKET d002 = {	&levelOkBtnId,
							&levelDialogId,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d002d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							  40, 340, 101, 363,12, 4, 8,
							MS_PANELL40 | MS_FRAMEL40,
							levelOkchk,
							0x0000
						} ;

/* levelPlayBtnId */

static MMIPACKET d003 = {	&levelPlayBtnId,
							&levelDialogId,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d003d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 110, 340, 171, 363, 7, 4, 8,
							MS_PANELL40 | MS_FRAMEL40,
							levelPlay,
							0x0000
						} ;

/* levelUndoBtnId */

static MMIPACKET d004 = {	&levelUndoBtnId,
							&levelDialogId,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d004d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 180, 340, 241, 363, 7, 4, 8,
							MS_PANELL40 | MS_FRAMEL40,
							levelUndo,
							0x0000
						} ;

/* levelFixBtnId */

static MMIPACKET d005 = {	&levelFixBtnId,
							&levelDialogId,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d005d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 250, 340, 311, 363, 7, 4, 8,
							MS_PANELL40 | MS_FRAMEL40,
							levelFix,
							0x0000
						} ;

/* levelCanBtnId */

static MMIPACKET d006 = {	&levelCanBtnId,
							&levelDialogId,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d006d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 540, 340, 601, 363,10, 4, 8,
							MS_PANELL40 | MS_FRAMEL40,
							levelCanchk,
							0x0000
						} ;

/* levelMesId[0] */

static MMIPACKET d007 = {	&levelMesId[0],
							&levelDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d007d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							  50, 343,  93, 360, 8,15, 8,
							MS_NONEL40,
							"実  行",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[1] */

static MMIPACKET d008 = {	&levelMesId[1],
							&levelDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d008d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 118, 343, 164, 360, 8,15, 8,
							MS_NONEL40,
							"再  生",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[2] */

static MMIPACKET d009 = {	&levelMesId[2],
							&levelDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d009d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 186, 343, 237, 360, 8,15, 8,
							MS_NONEL40,
							"アンドゥ",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[3] */

static MMIPACKET d010 = {	&levelMesId[3],
							&levelDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d010d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 255, 343, 306, 360, 8,15, 8,
							MS_NONEL40,
							"定  着",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[4] */

static MMIPACKET d011 = {	&levelMesId[4],
							&levelDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d011d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 547, 343, 593, 360, 8,15, 8,
							MS_NONEL40,
							"取  消",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[5] */

static MMIPACKET d012 = {	&levelMesId[5],
							&levelDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d012d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							  66, 125, 187, 143, 8,15, 8,
							MS_NONEL40,
							"レベルコントロール",
							   1,  12,  12,
							MS_BOLDL40,
							   0,   0
						} ;

/* levelSubDialogId */

static MMIPACKET d013 = {	&levelSubDialogId,
							&levelDialogId,
							&MJ_DIALOGL40,
							OFFSET(DIALOGL40),
							MS_NONE
						} ;
static DIALOGL40	d013d = {	MS_BTLEFTL40 | MS_EVMOSONL40 | MS_FIXEDL40,
							  40, 150, 601, 323, 8, 4, 8,
							MS_DFRAMEL40 | MS_FRAMEL40,
							NULL,   0,   0
						} ;

/* levelMulVolumeIdL */

static MMIPACKET d014 = {	&levelMulVolumeIdL,
							&levelSubDialogId,
							&MJ_SCRLL40,
							OFFSET(SCRLL40),
							MS_NONE
						} ;
static SCRLL40	d014d = 	{	MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_HORIL40,
							  80, 215, 511, 230, 8, 4, 7,
							MS_PANELL40 | MS_DFRAMEL40 | MS_FRAMEL40,
							levelMulSetL,
							  60,-160, 160,   1,   8,
							 265, 266
						} ;

/* levelMulNumIdL */

static MMIPACKET d015 = {	&levelMulNumIdL,
							&levelSubDialogId,
							&MJ_NUMBOXL40,
							OFFSET(NUMBOXL40),
							MS_NONE
						} ;
static NUMBOXL40	d015d = 	{	MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_RIGHTL40,
							 527, 211, 582, 234, 8, 4, 8,
							MS_PANELL40 | MS_DFRAMEL40 | MS_FRAMEL40,
							levelMulSetL,
							   1,  12,  12,
							MS_NONEL40,
							   0,   0,
							  60,-160, 160,   1,   1,
							 263, 264
						} ;

/* levelMesId[6] */

static MMIPACKET d016 = {	&levelMesId[6],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d016d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 273, 157, 322, 174, 0,15, 8,
							MS_NONEL40,
							"音  量",
							   1,  12,  12,
							MS_BOLDL40,
							   0,   0
						} ;

/* levelMesId[7] */

static MMIPACKET d017 = {	&levelMesId[7],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d017d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 131, 179, 168, 193, 0,15, 8,
							MS_NONEL40,
							"-12dB",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[8] */

static MMIPACKET d018 = {	&levelMesId[8],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d018d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 204, 179, 241, 193, 0,15, 8,
							MS_NONEL40,
							"-6dB",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[9] */

static MMIPACKET d019 = {	&levelMesId[9],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d019d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 288, 179, 306, 193, 0,15, 8,
							MS_NONEL40,
							"0dB",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[10] */

static MMIPACKET d020 = {	&levelMesId[10],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d020d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 356, 179, 383, 193, 0,15, 8,
							MS_NONEL40,
							"6dB",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[11] */

static MMIPACKET d021 = {	&levelMesId[11],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d021d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 427, 179, 454, 193, 0,15, 8,
							MS_NONEL40,
							"12dB",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[12] */

static MMIPACKET d022 = {	&levelMesId[12],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d022d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 102, 201, 301, 215, 0,15, 8,
							MS_NONEL40,
							"| | | | | | | | | | | | | | | | ",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[13] */

static MMIPACKET d023 = {	&levelMesId[13],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d023d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 294, 201, 493, 215, 0,15, 8,
							MS_NONEL40,
							"| | | | | | | | | | | | | | | | |",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[14] */

static MMIPACKET d024 = {	&levelMesId[14],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d024d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 150, 195, 168, 209, 0,15, 8,
							MS_NONEL40,
							"|",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[15] */

static MMIPACKET d025 = {	&levelMesId[15],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d025d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 222, 195, 240, 209, 0,15, 8,
							MS_NONEL40,
							"|",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[16] */

static MMIPACKET d026 = {	&levelMesId[16],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d026d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 294, 195, 313, 209, 0,15, 8,
							MS_NONEL40,
							"|",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[17] */

static MMIPACKET d027 = {	&levelMesId[17],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d027d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 366, 195, 385, 209, 0,15, 8,
							MS_NONEL40,
							"|",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[18] */

static MMIPACKET d028 = {	&levelMesId[18],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d028d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 438, 195, 457, 209, 0,15, 8,
							MS_NONEL40,
							"|",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[20] */

static MMIPACKET d029 = {	&levelMesId[20],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d029d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 131, 243, 168, 257, 0,15, 8,
							MS_NONEL40,
							"-12dB",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[21] */

static MMIPACKET d030 = {	&levelMesId[21],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d030d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 204, 243, 241, 257, 0,15, 8,
							MS_NONEL40,
							"-6dB",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[22] */

static MMIPACKET d031 = {	&levelMesId[22],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d031d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 288, 243, 306, 257, 0,15, 8,
							MS_NONEL40,
							"0dB",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[23] */

static MMIPACKET d032 = {	&levelMesId[23],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d032d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 356, 243, 383, 257, 0,15, 8,
							MS_NONEL40,
							"6dB",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[24] */

static MMIPACKET d033 = {	&levelMesId[24],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d033d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 427, 243, 454, 257, 0,15, 8,
							MS_NONEL40,
							"12dB",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[25] */

static MMIPACKET d034 = {	&levelMesId[25],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d034d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 102, 265, 301, 279, 0,15, 8,
							MS_NONEL40,
							"| | | | | | | | | | | | | | | | ",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[26] */

static MMIPACKET d035 = {	&levelMesId[26],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d035d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 294, 265, 493, 279, 0,15, 8,
							MS_NONEL40,
							"| | | | | | | | | | | | | | | | |",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[27] */

static MMIPACKET d036 = {	&levelMesId[27],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d036d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 150, 259, 168, 273, 0,15, 8,
							MS_NONEL40,
							"|",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[28] */

static MMIPACKET d037 = {	&levelMesId[28],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d037d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 222, 259, 240, 273, 0,15, 8,
							MS_NONEL40,
							"|",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[29] */

static MMIPACKET d038 = {	&levelMesId[29],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d038d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 294, 259, 313, 273, 0,15, 8,
							MS_NONEL40,
							"|",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[30] */

static MMIPACKET d039 = {	&levelMesId[30],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d039d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 366, 259, 385, 273, 0,15, 8,
							MS_NONEL40,
							"|",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMesId[31] */

static MMIPACKET d040 = {	&levelMesId[31],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d040d = 	{	MS_LEFTL40 | MS_DSPONLYL40,
							 438, 259, 457, 273, 0,15, 8,
							MS_NONEL40,
							"|",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

/* levelMulVolumeIdR */

static MMIPACKET d041 = {	&levelMulVolumeIdR,
							&levelSubDialogId,
							&MJ_SCRLL40,
							OFFSET(SCRLL40),
							MS_NONE
						} ;
static SCRLL40	d041d = 	{	MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_HORIL40,
							  80, 279, 511, 294, 8, 4, 7,
							MS_PANELL40 | MS_DFRAMEL40 | MS_FRAMEL40,
							levelMulSetR,
							  60,-160, 160,   1,   8,
							 265, 266
						} ;

/* levelMulNumIdR */

static MMIPACKET d042 = {	&levelMulNumIdR,
							&levelSubDialogId,
							&MJ_NUMBOXL40,
							OFFSET(NUMBOXL40),
							MS_NONE
						} ;
static NUMBOXL40	d042d = 	{	MS_BTLEFTL40 | MS_REPEATL40 | MS_EVMOSONL40 | MS_EVKEYONL40 | MS_RIGHTL40,
							 527, 275, 582, 298, 8, 4, 8,
							MS_PANELL40 | MS_DFRAMEL40 | MS_FRAMEL40,
							levelMulSetR,
							   1,  12,  12,
							MS_NONEL40,
							   0,   0,
							  60,-160, 160,   1,   1,
							 263, 264
						} ;

/* levelMesId[19] */

static MMIPACKET d043 = {	&levelMesId[19],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d043d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							  54, 214,  74, 231, 0,15, 8,
							MS_NONEL40,
							"左",
							   1,  12,  12,
							MS_BOLDL40,
							   0,   0
						} ;

/* levelMesId[32] */

static MMIPACKET d044 = {	&levelMesId[32],
							&levelSubDialogId,
							&MJ_MSGL40,
							OFFSET(MSGL40),
							MS_NONE
						} ;
static MSGL40	d044d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							  54, 278,  74, 295, 0,15, 8,
							MS_NONEL40,
							"右",
							   1,  12,  12,
							MS_BOLDL40,
							   0,   0
						} ;

/* levelInfBtnId */

static MMIPACKET d045 = {	&levelInfBtnId,
							&levelDialogId,
							&MJ_DBUTTONL40,
							OFFSET(DBUTTONL40),
							MS_NONE
						} ;
static DBUTTONL40	d045d = {	MS_BTLEFTL40 | MS_EVMOSOFFL40 | MS_EVKEYONL40,
							 320, 340, 381, 363, 7, 4, 8,
							MS_PANELL40 | MS_FRAMEL40,
							levelInf,
							0x0000
						} ;

/* levelMesId[33] */

static MMIPACKET d046 = {	&levelMesId[33],
							&levelDialogId,
							&MJ_MSGL40,
							0,
							MS_NONE
						} ;
static MSGL40	d046d = 	{	MS_CENTERL40 | MS_DSPONLYL40,
							 325, 343, 376, 360, 8,15, 8,
							MS_NONEL40,
							"情  報",
							   1,  12,  12,
							MS_NONEL40,
							   0,   0
						} ;

