📄 fsmidiui.h
字号:
#if 0
//00: no advitems
//01: the advsearch invalid
//02: the score menu is showwing // xlluo redefine for sjscore 04-10-15
#endif
BYTE * CurPageList[MAX_SEL_LIST]; // the current list
UINT32 uPageItemCode[MAX_SEL_LIST]; //(((MAX_SEL_LIST+3)>>2)<<2)];
#ifdef SUPPORT_MIDIUI_IME
UINT8 IsEnablePYsel ;
UINT8 uImeSelState;
UINT16 c; //dummy element
#endif
}Search_S; //when push stack , this struct copy to the top stack ;when pop ,copy to this struct
enum emMidiMULTIMenuADVItem{
MULTIMIDIADVITEM_NONE =0,
MULTIMIDIADVITEM_ADVSEARCH,
#ifdef SUPPORT_SANJING_SCORE
MULTIMIDIADVITEM_SCOREMENU,
#endif
#ifdef SUPPORT_CARDREADER_TEST
MULTIMIDIADVITEM_CARDFILEMENU,
#endif
};
EXTERN_FSMIDI_UI MidiIndexTable_S stMidiIndexTable;
EXTERN_FSMIDI_UI SongInfo_S stSongInfo;
//end MULTI_SEL_STRUCT
//OSD the song code in region 0
//important note : don't exceed 10
#if (defined(MIDI_MENU_FONT))&(!defined(JIEKE_LINEFLAG))
#define DISP_PROG_MAX (MAX_SEL_LIST) //(6)
#else
#define DISP_PROG_MAX (5)
#endif
//the max number of the ring queue ;
//important note : don't exceed 0xff ; or else moidify the element uInput and so on to UIN16
//100 ---> hold the max song code IDs == 99
#define PROG_MAX (100)
typedef struct
{
UINT8 uInput; // =0; //queue head
UINT8 uOutput ; //=0; //queue tail
UINT8 uNextPlay;// =0; //the next song that paly
// UINT8 uCurPlay;
UINT8 uCurPos; //=0; //the location of the cursor
UINT16 uDispWindowPos;
#ifdef MIDI_SONGCODE_DISCON_NO
UINT32 buf[PROG_MAX];
#else
UINT16 buf[PROG_MAX];
#endif
UINT8 uLastDispStaus;//[DISP_PROG_MAX]; uDispRecord
UINT8 uLastDispPos;
}RingBuffer_S;
#ifdef SUPPORT_MIDIDISK_TITLE //xlluo 09/17 add for the start of movie
EXTERN_FSMIDI_UI PLF_REC MidiTitle;
#endif
#ifdef SUPPORT_MIDI_VOCAL
EXTERN_FSMIDI_UI PLF_REC MidiIndex[3];//[0]:MEGIDX [1]:MEGMID [2]:MEGVOL
#else
EXTERN_FSMIDI_UI PLF_REC MidiIndex[2];
#endif
enum{//bIsShowInvalid used
NOTSHOWINVALID =0,
SHOWINVALID,
SHOWNOTHING,
};
EXTERN_FSMIDI_UI BYTE bIsShowInvalid;
EXTERN_FSMIDI_UI RingBuffer_S stRingBuffer;
EXTERN_FSMIDI_UI UINT8 gIsMidiSelMenu;
EXTERN_FSMIDI_UI UINT16 uDelayClearTips;
extern UINT32 ugMidiSelNo;
extern UINT8 ugMidiSelDegree;
extern UINT8 bIsShowProgList;
extern void MidiUI_Draw_NUM_Sel(UINT8 num);
extern void MidiUI_Draw_Prog_Sel(UINT8 num);
extern void MidiUI_Init(void);
extern UINT8 MidiUI_Play_Cmd(UINT32 msf, UINT32 len, BYTE bIsMidiFile);
extern void MidiUI_Nav_MainLoop();
extern UINT32 fsMidi_UI_callback_check(UINT32 func);
extern void InputQueueSongCode(UINT32 q);
extern void DispLine(BYTE bMove,UINT16 uDispStartPos,BYTE bDirection);
extern void MidiUI_Sel_Right(void);
extern void MidiUI_Sel_Left(void);
extern void Midi_FS_Init(void); //axelchen for check szMidiLable and iMidiKey 05-01-26
extern void SetMp3FileMsf(void);
extern void Disp_TopTip(UINT16 uTimeOut);
extern void Clear_TopTip(void);
#ifdef MIDI_SCORE_TEST
#define MAX_SCORE_NUM 100
enum{
SCORE_PF =0,//s;评分 t:蝶だ
SCORE_LTS,//s:擂台赛 t::据籓辽
SCORE_DKS,//s:对抗赛 t::癸к辽
};
EXTERN_FSMIDI_UI BYTE gb_showScore; //0:not disp score ui
EXTERN_FSMIDI_UI BYTE guc_scoreType;
EXTERN_FSMIDI_UI UINT32 gul_curScore;
EXTERN_FSMIDI_UI BYTE gcScoreRecord[10];//adv
EXTERN_FSMIDI_UI BYTE gcCurRecord;
EXTERN_FSMIDI_UI void DrawScoreUI(BYTE );
EXTERN_FSMIDI_UI inline void getNewScore(UINT32 );
EXTERN_FSMIDI_UI void setScoreStatus();
EXTERN_FSMIDI_UI void drawEndEffect(BYTE );
EXTERN_FSMIDI_UI void drawPfScore( );
EXTERN_FSMIDI_UI void drawDksScore(BYTE);
EXTERN_FSMIDI_UI void DrawLtsSpical(int );
#define INSERT_SECORERECORD(x) do { \
if (x) \
{ \
gcScoreRecord[gcCurRecord++] =x; \
if (gcCurRecord>sizeof(gcScoreRecord)) \
gcCurRecord =0; \
} \
}while(0);
#define ADVNUM_SECORERECORD(x) do { \
int i_cntadvnum; \
int cntadvnum_deno =0; \
int cntadvnum_nume =0; \
for (i_cntadvnum =0;i_cntadvnum<sizeof(gcScoreRecord);i_cntadvnum++) \
{ \
if (gcScoreRecord[i_cntadvnum]) \
{ \
cntadvnum_deno++; \
cntadvnum_nume +=gcScoreRecord[i_cntadvnum]; \
} \
} \
if (cntadvnum_deno) \
x =cntadvnum_nume/cntadvnum_deno; \
else \
x =0; \
}while(0);
#define SETINIT_SECORERECORD(x) do{ \
int i_setsoreinit; \
for (i_setsoreinit=0;i_setsoreinit<x;i_setsoreinit++) \
{ \
gcScoreRecord[i_setsoreinit] =0; \
} \
gcCurRecord =0;\
}while(0);
#endif
#endif//end #ifdef SUPPORT_MIDI_MENU_SEL
#define D printf("INFO: __%d__(%s:%s)\n",__LINE__,__FILE__,__FUNCTION__);
#if ((defined(MIDI_SONGCODE_DISCON_NO))&(defined(HDD_MODIFY_INDEX_TEST)))
#define SUPPORT_HDD_DELETEFILE
#define USER_SONGCODE_LOWERLIMIT 50000
#define USER_SONGCODE_UPPERLIMIT 60000
#define DISCONSTFLAG 0x09
#define FILEMANAGEUI_PAGEMAXITEM 5
enum{//MIDI_SONGCODE_DISCON_NO error list
ERROR_ERRORFLAG_DISCON =1,
ERROR_REPEAT_CODE,
ERROR_OVERUPPER_LIMIT,
ERROR_OVERLOWER_LIMIT,
};
//#define DEBUG_MIDI_SONGCODE_DISCON_NO
BYTE IsfailCode(int );
void SetDefaultFileInfo(int );
#endif
#ifdef SUPPORT_HDD_DELETEFILE
#define ADD_NEWFILE_SEQUENCE
int GetNextNullCell(void);
#define HDD_FILE_MANAGEERUI
void DeleteUserFile(int);
#ifdef HDD_FILE_MANAGEERUI
#define HDD_RECLAIM_CODECELL //xlluo 04-05-14
int fileManageui_IrSelect(void);
int fileManageui_IrReturn(void);
void fileManageui_close(void);
void fileManagerui_IrLeft(void);
void fileManagerui_IrRight(void);
void fileManageui_IrUp(void);
void fileManageui_IrDown(void);
void fileManageui_Init(void);
void Mageui_SetNewFile(BYTE *,int);
int fileManageui_GetSongCode(void);
void Manageui_SetNewFile(BYTE * , int );
void fileManageui_DrawProcessBar(int );
#endif
#endif
#ifdef HDD_MODIFY_INDEX_TEST
#include "HDD_info.h"
#define D printf("INFO: __%d__(%s:%s)\n",__LINE__,__FILE__,__FUNCTION__);
#define INDEXFILEPATH ("/")
#define INDEXTITLE ("MEGIDX ")
#define INDEXFILE ("/MEGIDX")
#define FONTFILE ("/FONT.FNT")
enum
{
INPUT_MENU_CLOSE =0,
INPUT_PART1,
INPUT_PART2,
INPUT_PART3,
INPUT_PART4,
INPUT_OK,
INPUT_CANCEL,
INPUT_COPYING,
};
typedef struct _stNewFileInfo
{
BYTE SongName[64+1]; //song name maxlen 64 char or 32 hz
BYTE SingerName[24+1];//init to 24 characters/12 hzs
BYTE SongLang[18+1]; //9 hz or 18 char
BYTE SongType[24+1]; //songtype name
BYTE filename[8+1]; //max is 8 character auto evaluate by program
#ifdef MIDI_SONGCODE_DISCON_NO
int songcode;
#endif
}stNewFileInfo;
EXTERN_FSMIDI_UI stNewFileInfo stFileInfo;
EXTERN_FSMIDI_UI BYTE cInputStatus;
EXTERN_FSMIDI_UI BYTE cCurSelItem;
EXTERN_FSMIDI_UI int nSingerwrd;
EXTERN_FSMIDI_UI int nSongwrd;
#ifdef MIDI_SONGCODE_DISCON_NO //wsf 20040603
#define SUPPORT_HDD_DELETEFILE
#define USER_SONGCODE_LOWERLIMIT 50000
#define USER_SONGCODE_UPPERLIMIT 55000
#define DISCONSTFLAG 0x09
enum{//MIDI_SONGCODE_DISCON_NO error list
ERROR_ERRORFLAG_DISCON =1,
ERROR_REPEAT_CODE,
ERROR_OVERUPPER_LIMIT,
ERROR_OVERLOWER_LIMIT,
};
#define DEBUG_MIDI_SONGCODE_DISCON_NO
BYTE IsfailCode(int );
void SetDefaultFileInfo(int );
#endif
extern UINT8 bMouseDown;
extern void Osd_Clear_Rect(int xx, int yy, int xlen, int ylen, BYTE colour, BYTE regNum);
extern void osd_midi_DrawHZ_Mem(int xStart, int yStart, UINT16 c, BYTE fontcolor, BYTE bgcolor, BYTE FigureColor, BYTE FontType, BYTE number, BYTE
FontBaseNo);
extern UINT8 HDD_Mount();
extern FILE_INFO *HDD_SearchFile(UINT8 * );
extern void HDD_WriteSec(UINT8 * , UINT32 , int );
void MidiUI_Sel_Prog(void);
BYTE *get_index_pos();
int SetSingerDefType(BYTE *,int *,int *);
int CountCHSWords(BYTE* );
int UpdataUIindex(void);
BYTE *GetCurStatusStrPtr(BYTE );
void ClearFineInfoMem(BYTE );
int InputChar2NewFileInfo(char *,BYTE );
void SeIdxTypeToFileInfo(BYTE );
int GetIndexStr(BYTE *,BYTE );
UINT8 HasNextItem(BYTE );
void DispName(BYTE );
void DispInputDlg(BYTE ,stNewFileInfo );
void InitInputDlg();
void ReadFontFile();
void PYIME_Disp(BYTE );
int DelOneChFromFileInfo(BYTE );
int SaveIndexFile(int );
void DeleteUserFile(int code);
//for ime
#endif //#ifdef HDD_MODIFY_INDEX_TEST
#ifdef SUPPORT_CARDREADER_TEST
extern UINT8 ReadFile(int *Res);
extern int read_card_dir();
extern int iMidiEnFLNum;
extern PLF_REC stMidiEncFile;
typedef struct{
BYTE songNum;
BYTE * fileList;
}fldecode;
typedef struct {
UINT32 songPos;
UINT32 songLen;
// BYTE songNameCnt;
// BYTE songnamelen;
BYTE songName[32];
}encSongInfo;
extern BYTE MidiCardIcon[];
EXTERN_FSMIDI_UI fldecode stMidiCardIndex;
EXTERN_FSMIDI_UI int MidiCard_FileRead(int flidx,BYTE * pbuf);
EXTERN_FSMIDI_UI void MidiCardReadInit(void);
EXTERN_FSMIDI_UI int MidiCard_GetCardFile(void);
EXTERN_FSMIDI_UI BYTE IsCardFiles(int SongNum);
#endif//SUPPORT_CARDREADER_TEST
//EXTERN_FSMIDI_UI int GetCurplaySongCode(void); //wsf 20040603
#endif //#ifndef __FS_MIDI_UI__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -