fsGUI_new.c
资源名称:8202s.rar [点击查看]
上传用户:poi891205
上传日期:2013-07-15
资源大小:9745k
文件大小:29k
源码类别:
DVD
开发平台:
C/C++
- /**************************************************************
- ** FILE
- ** fsGUI_new.c
- **
- ** DESCRIPTION
- ** On the base of fsGUI1.c, build a new GUI for MP3/JPEG/GAME.
- **
- **
- ** Creator: zhaoyanhua
- ** Date: 3-7-10 13:24
- ****************************************************************/
- #include "global.h"
- #include "func.h"
- #include "memmap.h"
- #include "util.h"
- #include "graph.h"
- #include "memcfg.h"
- #include "framebuf.h"
- #include "macro.h"
- #include "stc.h"
- #include "cfont.h"
- #include "vfdfunc.h"
- #include "osd.h"
- #include "image.h"
- #include "nesinit.h"
- #include "fs96602.h"
- #include "fsNAV.h"
- #include "fsGUI.h"
- #include "fsGUI1.h"
- //#include "user_if.h"
- //zhaoyanhua add 3-7-25 15:08
- #include "fsGUI1.h"
- //#include "fsGUI_new.h"
- #ifdef JPG_EFFECT
- #include "jpegeffect.h"
- #endif
- #include "fsGUIX.h"
- //extern const UINT8 pic_cd_str[17];//terry,2004/1/8 06:25PM
- #ifdef FAT_FILE_MODE//liweihua 2004-10-25 20:15
- extern FSJPEGDATA *pFsJpegbuf;
- extern UINT32 iso9660buf;
- #endif
- #ifdef IDE_CF_SW
- extern UINT8 max_part;
- #endif//#ifdef IDE_CF_SW
- #ifdef CARD_SETUP_TYPE_5
- extern UINT8 PMP_CF_Card_Insert;
- #endif
- #ifdef FILE_MODE_WRITE
- extern BYTE *mediaStr[];
- extern BYTE srceType_flag;
- extern FSJPEGDATA *pFsJpeg_des_buf;
- extern UINT32 iso9660buf_src;
- extern UINT32 iso9660buf_des;
- void Draw_File_Mode_Button(void);
- #endif
- /*
- * FUNC: draw slot.
- */
- void DrawScroll(void)
- {
- int x, y, xSize, ySize;
- x = fsArea[FS_AREA_SLOT].xStart;
- y = fsArea[FS_AREA_SLOT].yStart;
- xSize = fsArea[FS_AREA_SLOT].xSize;
- ySize = fsArea[FS_AREA_SLOT].ySize;
- FSGUI_FillFrameBuf(x, y+ARROW_SIZE, xSize, ySize-2*ARROW_SIZE, WHITE_Y-0x05, WHITE_CRCB);//terry,2004/1/30 06:54PM
- /*
- FSGUI_FillFrameBuf(x, y, xSize, 1, BLACK_Y, BLACK_CRCB);//top
- FSGUI_FillFrameBuf(x, y, 1, ySize, WHITE_Y, WHITE_CRCB);//left
- FSGUI_FillFrameBuf(x + xSize - 1, y + 1, 1, ySize - 1, WHITE_Y, WHITE_CRCB);//right
- FSGUI_FillFrameBuf(x + 1, y + ySize - 1, xSize - 1, 1 ,WHITE_Y, WHITE_CRCB);//bottom
- */
- }
- void MoveScroll(UINT16 locate)
- {
- int y;
- DrawScroll();
- //draw up and down arrow.
- DrawArrow(fsArea[FS_AREA_MOVEBAR].xStart,fsArea[FS_AREA_MOVEBAR].yStart-ARROW_SIZE,2);
- DrawArrow(fsArea[FS_AREA_MOVEBAR].xStart,fsArea[FS_AREA_MOVEBAR].yStart +fsArea[FS_AREA_MOVEBAR].ySize,1);
- if ((fsArea[FS_AREA_MOVEBAR].ySize - pFsJpeg->scroll_len) >= (pFsJpeg->file_specify_in_dir - 1))
- y = fsArea[FS_AREA_MOVEBAR].yStart + locate * pFsJpeg->scroll_step;
- else
- y = fsArea[FS_AREA_MOVEBAR].yStart + locate * pFsJpeg->scroll_step / 10;
- DrawRect(fsArea[FS_AREA_MOVEBAR].xStart, y, fsArea[FS_AREA_MOVEBAR].xSize, pFsJpeg->scroll_len, 0,
- YELLOW_Y, YELLOW_CRCB);
- //return;//tw 20040201
- }
- void SelectHL()
- {
- int iFiles;
- #ifdef MP3_DIRECT_SELECT
- iFiles = pFsJpeg->count_file[pFsJpeg->gifsFuncBtn - FS_FUNC_MP3];
- #else
- iFiles = pFsJpeg->file_specify_in_dir;
- #endif
- // 2004/04/20 yltseng, to make HL wider for Chinse Font and Joliet
- #if defined (SUPPORT_CHINESE_FONT) || defined (SUPPORT_JOLIET_FORMAT)
- HL_Width = 116;
- #else
- if (iFiles>999)
- HL_Width = 116;
- else if (iFiles>99)
- HL_Width = 108;
- else
- HL_Width = 100;
- #endif
- //ShowHL();//move to the last of SelectHL() zhaoyanhua 2004-2-2 17:13
- #ifdef MP3_TXT_DISPLAY //zhaoyanhua add 2003-9-2 9:40
- if ( ( (JPEG_Preview_drawed == DIR_LIST_IN_DIR_AREA)
- &&(pFsJpeg->gifsFuncBtn != FS_FUNC_MP3) )
- || ( (MP3_Lyrics_Drawed == DIR_LIST_IN_DIR_AREA)
- &&(pFsJpeg->gifsFuncBtn == FS_FUNC_MP3)))//zhaoyanhua modify 2003-8-28 13:29
- #else
- //to avoid the bug : when play JPEG, BUTTON->FILE (RIGHT) or(UP) ,not draw DIR playing again.
- //zhaoyanhua modify 2003-12-27 11:10
- if ( ((JPEG_Preview_drawed == DIR_LIST_IN_DIR_AREA) &&(!(pFsJpeg->gifsbPreview))
- &&(pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG))//for JPEG
- ||((JPEG_Preview_drawed == DIR_LIST_IN_DIR_AREA) && (pFsJpeg->gifsFuncBtn != FS_FUNC_JPEG))//for MP3/OTHER
- )
- #endif
- ShowCurrentDirPlaying();
- ShowCurrentFilePlaying();
- ShowHL();//zhaoyanhua move here 2004-2-2 17:13
- }
- void ShowHL(void)
- {
- #ifdef AUDIO_SHOW_SAVER
- if (bDisableGUI) return;
- #endif
- #if defined(FAT_FILE_MODE)||defined(FILE_MODE_WRITE)
- UINT32 addr1,addr2;
- BYTE j;
- #endif
- // clear last HL
- switch (old_ControlArea)
- {
- case CNT_AREA_FILE:
- //zhaoyanhua add 2004-2-2 16:54
- //make some changes for the GUI not blink .
- if(HL_show == fsnav_file_HL)
- ShowCurrentFilePlaying();
- else
- {
- ClearRectArea(Rect[FILE_RECT], FILE_STEP, FILE_AREA_BKGROUND_CRCB,FS_AREA_FILEITEM, HL_show);
- FSShowFileItem(HL_show, iso9660_file[pFsJpeg->file_array[HL_show]].name);//resume the last HL
- }
- break;
- case CNT_AREA_DIR:
- //zhaoyanhua add 2004-2-2 16:54
- //make some changes for the GUI not blink .
- if(HL_show == fsnav_dir_HL)
- ShowCurrentDirPlaying();
- else
- {
- ClearRectArea(Rect[DIR_RECT], DIR_STEP, DIR_AREA_BKGROUND_CRCB, FS_AREA_DIRITEM, HL_show);
- ShowDirItem(HL_show,iso9660_dir[pFsJpeg->dir_array[HL_show]].name);//resume the last HL
- }
- break;
- case CNT_AREA_MP3BUTTON:
- {
- DrawRect(fsArea[FS_AREA_BUTTON].xStart, fsArea[FS_AREA_BUTTON].yStart,
- 25, 25,
- pFsJpeg->gifsFuncBtn == FS_FUNC_MP3 ? 1 : 0, BK_GROUNDY, BK_GROUNDCRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 6, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_MP3BUTTON - 2);
- }
- break;
- case CNT_AREA_JPEGBUTTON:
- {
- //FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart + 3+ 27-1, fsArea[FS_AREA_BUTTON].yStart + 3, 24,24, BK_GROUNDY,BK_GROUNDCRCB);
- DrawRect(fsArea[FS_AREA_BUTTON].xStart+27, fsArea[FS_AREA_BUTTON].yStart,
- 25, 25,
- pFsJpeg->gifsFuncBtn == FS_FUNC_JPEG ? 1 : 0, BK_GROUNDY, BK_GROUNDCRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 33, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_JPEGBUTTON - 2);
- }
- break;
- #ifdef SUPPORT_NESGAME
- case CNT_AREA_GAMEBUTTON:
- {
- DrawRect(fsArea[FS_AREA_BUTTON].xStart+54, fsArea[FS_AREA_BUTTON].yStart,
- 25, 25,
- pFsJpeg->gifsFuncBtn == FS_FUNC_GAME ? 1 : 0, BK_GROUNDY, BK_GROUNDCRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 60, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_GAMEBUTTON - 2);
- }
- break;
- #endif
- #ifdef SUPPORT_FILE_SYSTEM_MODE
- case CNT_AREA_OTHERBUTTON:
- {
- #ifdef SUPPORT_NESGAME
- //FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart + 3+81, fsArea[FS_AREA_BUTTON].yStart + 3, 19,19, BK_GROUNDY,BK_GROUNDCRCB);
- DrawRect(fsArea[FS_AREA_BUTTON].xStart+81, fsArea[FS_AREA_BUTTON].yStart,
- 25, 25,
- pFsJpeg->gifsFuncBtn == FS_FUNC_GAME ? 1 : 0, BK_GROUNDY, BK_GROUNDCRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 87, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_OTHERBUTTON - 2);
- #else
- DrawRect(fsArea[FS_AREA_BUTTON].xStart+54, fsArea[FS_AREA_BUTTON].yStart,
- 25, 25,
- pFsJpeg->gifsFuncBtn == FS_FUNC_OTHER ? 1 : 0, BK_GROUNDY, BK_GROUNDCRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 60, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_OTHERBUTTON - 2);
- #endif
- }
- break;
- #endif
- #ifdef SUPPORT_MIDI
- case CNT_AREA_MIDIBUTTON:
- {
- #ifdef SUPPORT_FILE_SYSTEM_MODE
- #ifdef SUPPORT_NESGAME
- DrawRect(fsArea[FS_AREA_BUTTON].xStart+108, fsArea[FS_AREA_BUTTON].yStart,
- 25, 25,
- pFsJpeg->gifsFuncBtn == FS_FUNC_MIDI ? 1 : 0, BK_GROUNDY, BK_GROUNDCRCB);
- //FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart + 3+108, fsArea[FS_AREA_BUTTON].yStart + 3, 19,19, BK_GROUNDY,BK_GROUNDCRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 114, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_MIDIBUTTON - 2);
- #else //SUPPORT_NESGAME
- DrawRect(fsArea[FS_AREA_BUTTON].xStart+81, fsArea[FS_AREA_BUTTON].yStart,
- 25, 25,
- pFsJpeg->gifsFuncBtn == FS_FUNC_MIDI ? 1 : 0, BK_GROUNDY, BK_GROUNDCRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 87, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_MIDIBUTTON - 2);
- #endif //SUPPORT_NESGAME
- #else //SUPPORT_FILE_SYSTEM_MODE
- #ifdef SUPPORT_NESGAME
- DrawRect(fsArea[FS_AREA_BUTTON].xStart+81, fsArea[FS_AREA_BUTTON].yStart,
- 25, 25,
- pFsJpeg->gifsFuncBtn == FS_FUNC_MIDI ? 1 : 0, BK_GROUNDY, BK_GROUNDCRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 87, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_MIDIBUTTON - 2);
- #else //SUPPORT_NESGAME
- DrawRect(fsArea[FS_AREA_BUTTON].xStart+54, fsArea[FS_AREA_BUTTON].yStart,
- 25, 25,
- pFsJpeg->gifsFuncBtn == FS_FUNC_MIDI ? 1 : 0, BK_GROUNDY, BK_GROUNDCRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 60, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_MIDIBUTTON - 2);
- #endif //SUPPORT_NESGAME
- #endif //SUPPORT_FILE_SYSTEM_MODE
- }
- break;
- #endif
- #ifdef SUPPORT_MULTI_PARTITION
- case CNT_AREA_MULTI_PART:
- if(pFsJpeg->gifsState == FS_STATE_HDD)
- {
- if(HL_show == pFsJpeg->part_will)
- {
- ShowCurrentMultiPart();
- }
- else
- {
- ClearRectArea(Rect[6], DIR_STEP, DIR_AREA_BKGROUND_CRCB, FS_AREA_DIRITEM, HL_show);
- if((HL_show == max_part)&&PMP_CF_Card_IsPlugIn())//liweihua mod 2004-11-30
- ShowHDDItem(fsArea[FS_AREA_DIRITEM].xStart,HL_show, "CF CARD",0);
- else
- ShowHDDItem(fsArea[FS_AREA_DIRITEM].xStart,HL_show, "LOCAL DISK",0);
- }
- }
- #ifdef PMP_UI //liweihua 2004-12-30 9:55
- else if(pFsJpeg->gifsState == FS_STATE_INIT)
- {
- ClearRectArea(Rect[6], DIR_STEP, DIR_AREA_BKGROUND_CRCB, FS_AREA_DIRITEM, HL_show);
- ShowItemHL(HL_show);
- }
- #endif
- break;
- #ifdef FAT_FILE_MODE//liweihua 2004-10-10 22:10
- case CNT_AREA_DISK:
- {
- addr1 = pFsJpeg;
- addr2 = _fs9660_buf;
- pFsJpeg = &(share_data.JPEG);
- _fs9660_buf = SDRAM_BASE + HD_FS_STRUCTURE_YA * 1024;
- ClearRectArea(Rect[FS_AREA_DIRITEM], DIR_STEP, DIR_AREA_BKGROUND_CRCB, FS_AREA_DIRITEM, HL_show);
- //draw the selected rec,liweihua add 2004-11-17
- if(((HL_show == pFsJpeg->part_current-1)&&(pFsJpeg->gifsState == FS_STATE_HDD))
- ||((HL_show == pFsJpeg->file_current_in_page)&&(pFsJpeg->gifsState != FS_STATE_HDD))
- )
- ShowPlayFrame(fsArea[FS_AREA_DIRITEM].xStart-2,fsArea[FS_AREA_DIRITEM].yStart + 16*HL_show,78,14);
- if(pFsJpeg->gifsState == FS_STATE_HDD)
- ShowHDDItem(fsArea[FS_AREA_DIRITEM].xStart,HL_show, "DISK",0);
- else
- ShowItem(HL_show);
- pFsJpeg = addr1;
- _fs9660_buf = addr2;
- }
- break;
- case CNT_AREA_CARD:
- {
- BYTE width;
- addr1 = pFsJpeg;
- addr2 = _fs9660_buf;
- pFsJpeg = pFsJpegbuf;
- _fs9660_buf = iso9660buf;
- if(pFsJpeg->gifsState == FS_STATE_HDD)//liweihua mod 2004-11-30
- width = 94;
- else
- width = 78;
- ClearRectArea(Rect[FILE_RECT], FILE_STEP, FILE_AREA_BKGROUND_CRCB,FS_AREA_FILEITEM, HL_show);
- //draw the selected rec,liweihua add 2004-11-17
- if(((HL_show == pFsJpeg->part_current)&&(pFsJpeg->gifsState == FS_STATE_HDD))
- ||((HL_show == pFsJpeg->file_current_in_page)&&(pFsJpeg->gifsState != FS_STATE_HDD))
- )
- ShowPlayFrame(fsArea[FS_AREA_FILEITEM].xStart-2,fsArea[FS_AREA_FILEITEM].yStart + 16*HL_show,width,14);
- if(pFsJpeg->gifsState == FS_STATE_HDD)
- ShowCardItem(HL_show,"CF CARD",0);
- else
- ShowItem(HL_show);
- pFsJpeg = addr1;
- _fs9660_buf = addr2;
- }
- break;
- case CNT_AREA_WARNING:
- {
- ClearRectArea(Rect[FS_AREA_DIRITEM], DIR_STEP, DIR_AREA_BKGROUND_CRCB, FS_AREA_DIRITEM, HL_show);
- ShowWarning("TESTTEST");
- }
- break;
- #endif//#ifdef FAT_FILE_MODE
- #endif
- #ifdef FILE_MODE_WRITE //sunzhh 2005-01-06
- case CNT_AREA_SRCE:
- {
- int j;
- addr1 = pFsJpeg;
- addr2 = _fs9660_buf;
- pFsJpeg = &(share_data.JPEG);
- _fs9660_buf = SDRAM_BASE + FS9660YA * 1024;
- if(pFsJpeg->gifsState == FS_STATE_MEDIA)
- j = 1;
- else
- j = 0;
- ClearRectArea(Rect[FS_AREA_DIRITEM], DIR_STEP, DIR_AREA_BKGROUND_CRCB, FS_AREA_DIRITEM, HL_show-j);
- if(((HL_show == pFsJpeg->media_current)&&(pFsJpeg->gifsState == FS_STATE_MEDIA))
- ||((HL_show == pFsJpeg->file_current_in_page)&&(pFsJpeg->gifsState != FS_STATE_MEDIA))
- )
- ShowPlayFrame(fsArea[FS_AREA_DIRITEM].xStart-2,fsArea[FS_AREA_DIRITEM].yStart + 16*(HL_show-j),94,14);
- if(pFsJpeg->gifsState == FS_STATE_MEDIA)
- FSGUI_ShowString( FS_DIRLIST_XSTART,(FS_DIRLIST_YSTART+ FS_FILELIST_YSTEP * (HL_show-1) ), mediaStr[HL_show], FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
- else
- ShowFileItem(FS_DIRLIST_XSTART, HL_show);
- // FSShowFatIcon(fsArea[FS_AREA_DIRICON].xStart,HL_show-1);
- }
- pFsJpeg = addr1;
- _fs9660_buf = addr2;
- break;
- case CNT_AREA_DEST:
- {
- addr1 = pFsJpeg;
- addr2 = _fs9660_buf;
- pFsJpeg = pFsJpeg_des_buf;
- _fs9660_buf = iso9660buf_des;
- if((!srceType_flag)&&(pFsJpeg->gifsState == FS_STATE_MEDIA))
- j = 1;
- else if((srceType_flag == 1)&&(pFsJpeg->gifsState == FS_STATE_MEDIA))
- j = 2;
- else
- j = 0;
- ClearRectArea(Rect[FILE_RECT], FILE_STEP, FILE_AREA_BKGROUND_CRCB,FS_AREA_FILEITEM, HL_show-j);
- if(((HL_show == pFsJpeg->media_current)&&(pFsJpeg->gifsState == FS_STATE_MEDIA))
- ||((HL_show == pFsJpeg->file_current_in_page)&&(pFsJpeg->gifsState != FS_STATE_MEDIA))
- )
- ShowPlayFrame(fsArea[FS_AREA_FILEITEM].xStart+2,fsArea[FS_AREA_FILEITEM].yStart + 16*(HL_show-j),94,14);
- if(pFsJpeg->gifsState == FS_STATE_MEDIA)
- FSGUI_ShowString( fsArea[FS_AREA_FILEITEM].xStart+4,(FS_DIRLIST_YSTART+ FS_FILELIST_YSTEP * (HL_show-j) ), mediaStr[HL_show], FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
- // FSShowFatIcon(FS_AREA_FILEICON,HL_show-j);
- else
- ShowFileItem( fsArea[FS_AREA_FILEITEM].xStart+4, HL_show);
- pFsJpeg = addr1;
- _fs9660_buf = addr2;
- }
- break;
- case CNT_AREA_COPYBUTTON:
- case CNT_AREA_DELETEBUTTON:
- case CNT_AREA_NEWBUTTON:
- case CNT_AREA_RENAMEBUTTON:
- case CNT_AREA_FORMATBUTTON:
- case CNT_AREA_CAPACITYBUTTON:
- Draw_File_Mode_Button();
- break;
- #endif
- default: break;
- }
- // draw current HL
- switch (pFsJpeg->ControlArea)
- {
- case CNT_AREA_FILE:
- {
- HL_show = pFsJpeg->file_will;
- old_ControlArea = CNT_AREA_FILE;
- FSGUI_FillFrameBuf(fsArea[FS_AREA_FILEITEM].xStart - 2, FS_DIRLIST_YSTART + HL_show * FS_FILELIST_YSTEP, HL_Width, HL_Heighth, HL_Y, HL_CRCB);
- FSShowFileItem(HL_show , iso9660_file[pFsJpeg->file_array[HL_show]].name);//resume the last HL
- /// NOTE:
- // These code are put here ,for they will used by FSGUI_Refresh()/FSGUI_CmdLeft/FSGUI_CmdRight()
- // if MP3_Lyrics_Drawed is 1,then show lyrics.
- //zhaoyanhua add 2003-9-1 17:49
- #ifdef MP3_TXT_DISPLAY
- ShowLyricsWhileHL();
- #endif
- }
- break;
- case CNT_AREA_DIR:
- {
- HL_show = pFsJpeg->dir_current;
- old_ControlArea = CNT_AREA_DIR;
- FSGUI_FillFrameBuf(fsArea[FS_AREA_DIRITEM].xStart - 2, FS_DIRLIST_YSTART + HL_show * FS_FILELIST_YSTEP, HL_Width, HL_Heighth, HL_Y, HL_CRCB);
- ShowDirItem(HL_show,iso9660_dir[pFsJpeg->dir_array[HL_show]].name);//resume the last HL
- }
- break;
- case CNT_AREA_MP3BUTTON:
- {
- old_ControlArea = CNT_AREA_MP3BUTTON;
- FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart , fsArea[FS_AREA_BUTTON].yStart , 25,25,HL_Y,HL_CRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 6, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_MP3BUTTON - 2);
- }
- break;
- case CNT_AREA_JPEGBUTTON:
- {
- old_ControlArea = CNT_AREA_JPEGBUTTON;
- FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart+27 , fsArea[FS_AREA_BUTTON].yStart , 25,25, HL_Y,HL_CRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 33, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_JPEGBUTTON - 2);
- }
- break;
- #ifdef SUPPORT_NESGAME
- case CNT_AREA_GAMEBUTTON:
- {
- old_ControlArea = CNT_AREA_GAMEBUTTON;
- FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart +54, fsArea[FS_AREA_BUTTON].yStart , 25,25,HL_Y,HL_CRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 60, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_GAMEBUTTON - 2);
- }
- break;
- #endif
- #ifdef SUPPORT_FILE_SYSTEM_MODE
- case CNT_AREA_OTHERBUTTON:
- {
- old_ControlArea = CNT_AREA_OTHERBUTTON;
- #ifdef SUPPORT_NESGAME
- FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart +81, fsArea[FS_AREA_BUTTON].yStart , 25,25, HL_Y,HL_CRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 87, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_OTHERBUTTON - 2);
- #else
- FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart +54, fsArea[FS_AREA_BUTTON].yStart , 25,25, HL_Y,HL_CRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 60, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_OTHERBUTTON - 2);
- #endif
- }
- break;
- #endif
- #ifdef SUPPORT_MIDI
- case CNT_AREA_MIDIBUTTON:
- {
- old_ControlArea = CNT_AREA_MIDIBUTTON;
- #ifdef SUPPORT_FILE_SYSTEM_MODE
- #ifdef SUPPORT_NESGAME
- FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart +108, fsArea[FS_AREA_BUTTON].yStart , 25,25, HL_Y,HL_CRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 114, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_MIDIBUTTON - 2);
- #else //SUPPORT_NESGAME
- FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart +81, fsArea[FS_AREA_BUTTON].yStart , 25,25, HL_Y,HL_CRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 87, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_MIDIBUTTON - 2);
- #endif //SUPPORT_NESGAME
- #else //SUPPORT_FILE_SYSTEM_MODE
- #ifdef SUPPORT_NESGAME
- FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart +81, fsArea[FS_AREA_BUTTON].yStart , 25,25, HL_Y,HL_CRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 87, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_MIDIBUTTON - 2);
- #else //SUPPORT_NESGAME
- FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart +54, fsArea[FS_AREA_BUTTON].yStart , 25,25, HL_Y,HL_CRCB);
- DrawFileIcon(fsArea[FS_AREA_BUTTON].xStart + 60, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_MIDIBUTTON - 2);
- #endif //SUPPORT_NESGAME
- #endif //SUPPORT_FILE_SYSTEM_MODE
- }
- break;
- #endif
- #ifdef SUPPORT_MULTI_PARTITION
- case CNT_AREA_MULTI_PART:
- if(pFsJpeg->gifsState == FS_STATE_HDD)
- {
- HL_show = pFsJpeg->part_will;//liweihua mod 2004-11-30
- old_ControlArea = CNT_AREA_MULTI_PART;
- FSGUI_FillFrameBuf((fsArea[FS_AREA_DIRITEM].xStart - 2), (FS_DIRLIST_YSTART + HL_show * FS_FILELIST_YSTEP), 118, 14, 0x9a, 0xbb2f);
- if((HL_show == max_part)&&PMP_CF_Card_IsPlugIn())//liweihua mod 2004-11-30
- ShowHDDItem(fsArea[FS_AREA_DIRITEM].xStart,HL_show, "CF CARD",0);
- else
- ShowHDDItem(fsArea[FS_AREA_DIRITEM].xStart,HL_show, "LOCAL DISK",0);
- }
- #ifdef PMP_UI//liweihua 2004-12-30 9:56
- else
- {
- HL_show = pFsJpeg->file_current_in_page;
- FSGUI_FillFrameBuf((fsArea[FS_AREA_DIRITEM].xStart - 2), (FS_DIRLIST_YSTART + HL_show * FS_FILELIST_YSTEP), 98, 14, 0x9a,0xbb2f);//0xa1, 0xb266);
- ShowItemHL(HL_show);
- }
- #endif
- break;
- #ifdef FAT_FILE_MODE
- case CNT_AREA_DISK:
- {
- addr1 = pFsJpeg;
- addr2 = _fs9660_buf;
- pFsJpeg = &(share_data.JPEG);
- _fs9660_buf = SDRAM_BASE + HD_FS_STRUCTURE_YA * 1024;
- if(pFsJpeg->gifsState == FS_STATE_HDD)
- HL_show = pFsJpeg->part_will;//liweihua mod 2004-11-30
- else
- HL_show = pFsJpeg->file_current_in_page;
- old_ControlArea = CNT_AREA_DISK;
- FSGUI_FillFrameBuf((fsArea[FS_AREA_DIRITEM].xStart - 2), (FS_DIRLIST_YSTART + HL_show * FS_FILELIST_YSTEP), 78, 14, 0xa1, 0xb266);
- if(pFsJpeg->gifsState == FS_STATE_HDD)
- ShowHDDItem(fsArea[FS_AREA_DIRITEM].xStart,HL_show, "DISK",0);
- else
- ShowItem(HL_show);
- pFsJpeg = addr1;
- _fs9660_buf = addr2;
- }
- break;
- case CNT_AREA_CARD:
- {
- BYTE width;//liweihua 2004-11-30
- addr1 = pFsJpeg;
- addr2 = _fs9660_buf;
- pFsJpeg = pFsJpegbuf;
- _fs9660_buf = iso9660buf;
- if(pFsJpeg->gifsState == FS_STATE_HDD)
- {
- HL_show = pFsJpeg->part_current;
- width = 94;
- }
- else
- {
- HL_show = pFsJpeg->file_current_in_page;
- width = 78;
- }
- old_ControlArea = CNT_AREA_CARD;
- FSGUI_FillFrameBuf((fsArea[FS_AREA_FILEITEM].xStart - 2), (FS_DIRLIST_YSTART + HL_show * FS_FILELIST_YSTEP), width, 14, 0xa1, 0xb266);
- if(pFsJpeg->gifsState == FS_STATE_HDD)
- ShowCardItem(HL_show,"CF CARD",0);
- else
- ShowItem(HL_show);
- pFsJpeg = addr1;
- _fs9660_buf = addr2;
- }
- break;
- case CNT_AREA_WARNING:
- {
- HL_show = pFsJpeg->part_current;
- old_ControlArea = CNT_AREA_MULTI_PART;
- FSGUI_FillFrameBuf((fsArea[FS_AREA_DIRITEM].xStart - 2), (FS_DIRLIST_YSTART + HL_show * FS_FILELIST_YSTEP), 118, 14, 0xa1, 0xb266);
- }
- break;
- #endif//#ifdef FAT_FILE_MODE
- #endif//#ifdef SUPPORT_MULTI_PARTITION
- #ifdef FILE_MODE_WRITE //sunzhh 2005-01-06
- case CNT_AREA_SRCE:
- {
- int j;
- addr1 = pFsJpeg;
- addr2 = _fs9660_buf;
- pFsJpeg = &(share_data.JPEG);
- _fs9660_buf = SDRAM_BASE + FS9660YA * 1024;
- if(pFsJpeg->gifsState == FS_STATE_MEDIA)
- {
- HL_show = pFsJpeg->media_will;
- j = 1;
- }
- else
- {
- HL_show = pFsJpeg->file_current_in_page;
- j = 0;
- }
- FSGUI_FillFrameBuf((fsArea[FS_AREA_DIRITEM].xStart - 2), (FS_DIRLIST_YSTART + (HL_show-j) * FS_FILELIST_YSTEP), 94, 14, HL_Y,HL_CRCB);
- if(pFsJpeg->gifsState == FS_STATE_MEDIA)
- FSGUI_ShowString( FS_DIRLIST_XSTART,(FS_DIRLIST_YSTART+ FS_FILELIST_YSTEP * (HL_show-1) ), mediaStr[HL_show], FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
- else
- ShowFileItem(FS_DIRLIST_XSTART, HL_show);
- old_ControlArea = CNT_AREA_SRCE;
- pFsJpeg = addr1;
- _fs9660_buf = addr2;
- }
- break;
- case CNT_AREA_DEST:
- {
- addr1 = pFsJpeg;
- addr2 = _fs9660_buf;
- pFsJpeg = pFsJpeg_des_buf;
- _fs9660_buf = iso9660buf_des;
- if((!srceType_flag)&&(pFsJpeg->gifsState == FS_STATE_MEDIA))
- j = 1;
- else if((srceType_flag == 1)&&(pFsJpeg->gifsState == FS_STATE_MEDIA))
- j = 2;
- else
- j = 0;
- if(pFsJpeg->gifsState == FS_STATE_MEDIA)
- HL_show = pFsJpeg->media_will;
- else
- HL_show = pFsJpeg->file_current_in_page;
- old_ControlArea = CNT_AREA_DEST;
- FSGUI_FillFrameBuf((fsArea[FS_AREA_FILEITEM].xStart + 2), (FS_DIRLIST_YSTART + (HL_show-j) * FS_FILELIST_YSTEP), 94, 14, HL_Y,HL_CRCB);
- if(pFsJpeg->gifsState == FS_STATE_MEDIA)
- {
- FSGUI_ShowString( fsArea[FS_AREA_FILEITEM].xStart + 4,(FS_DIRLIST_YSTART+ FS_FILELIST_YSTEP * (HL_show-j) ), mediaStr[HL_show], FS_FONTCOLOR_FILE_Y, FS_FONTCOLOR_FILE_CrCb);
- // FSShowFatIcon(fsArea[FS_AREA_FILEICON].xStart,HL_show-j);
- }
- else
- ShowFileItem(fsArea[FS_AREA_FILEITEM].xStart + 4, HL_show);
- pFsJpeg = addr1;
- _fs9660_buf = addr2;
- }
- break;
- case CNT_AREA_COPYBUTTON:
- {
- old_ControlArea = CNT_AREA_COPYBUTTON;
- FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart, fsArea[FS_AREA_BUTTON].yStart, 25,25,HL_Y,HL_CRCB);
- DrawFileIconX(fsArea[FS_AREA_BUTTON].xStart+6, fsArea[FS_AREA_BUTTON].yStart + 6, 2,0);
- }
- break;
- case CNT_AREA_DELETEBUTTON:
- {
- old_ControlArea = CNT_AREA_DELETEBUTTON;
- FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart+30, fsArea[FS_AREA_BUTTON].yStart, 25,25,HL_Y,HL_CRCB);
- DrawFileIconX(fsArea[FS_AREA_BUTTON].xStart + 30 +6, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_MP3BUTTON - 2,0);
- }
- break;
- case CNT_AREA_NEWBUTTON:
- {
- old_ControlArea = CNT_AREA_NEWBUTTON;
- FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart+60, fsArea[FS_AREA_BUTTON].yStart, 25,25,HL_Y,HL_CRCB);
- DrawFileIconX(fsArea[FS_AREA_BUTTON].xStart + 60 +6, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_MP3BUTTON - 2,0);
- }
- break;
- case CNT_AREA_RENAMEBUTTON:
- {
- old_ControlArea = CNT_AREA_RENAMEBUTTON;
- FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart+90, fsArea[FS_AREA_BUTTON].yStart, 25,25,HL_Y,HL_CRCB);
- DrawFileIconX(fsArea[FS_AREA_BUTTON].xStart + 90 +6, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_MP3BUTTON - 2,0);
- }
- break;
- case CNT_AREA_FORMATBUTTON:
- {
- old_ControlArea = CNT_AREA_FORMATBUTTON;
- FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart+120, fsArea[FS_AREA_BUTTON].yStart, 25,25,HL_Y,HL_CRCB);
- DrawFileIconX(fsArea[FS_AREA_BUTTON].xStart + 120 +6, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_MP3BUTTON - 2,0);
- }
- break;
- case CNT_AREA_CAPACITYBUTTON:
- {
- old_ControlArea = CNT_AREA_CAPACITYBUTTON;
- FSGUI_FillFrameBuf(fsArea[FS_AREA_BUTTON].xStart+150, fsArea[FS_AREA_BUTTON].yStart, 25,25,HL_Y,HL_CRCB);
- DrawFileIconX(fsArea[FS_AREA_BUTTON].xStart + 150 +6, fsArea[FS_AREA_BUTTON].yStart + 6, CNT_AREA_MP3BUTTON - 2,0);
- }
- break;
- #endif//#ifdef FILE_MODE_WRITE
- default: break;
- }
- }