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

📄 ui_pop_up_list.lst

📁 智原mp3 SDK 开发包 与巨力 有mp3 wma ogg decoder
💻 LST
字号:
C51 COMPILER V7.50   UI_POP_UP_LIST                                                        07/17/2008 14:38:51 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE UI_POP_UP_LIST
OBJECT MODULE PLACED IN ..\output\ui_pop_up_list.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\..\common\ui_pop_up_list.c LARGE OPTIMIZE(9,SIZE) BROWSE INCDIR(..\..\..
                    -\bsp\include;..\src\include;..\..\include) DEFINE(CONFIG_ASIC) DEBUG OBJECTEXTEND PRINT(.\ui_pop_up_list.lst) OBJECT(..\
                    -output\ui_pop_up_list.obj)

line level    source

   1          #include <string.h>
   2          #include "api.h"
*** WARNING C318 IN LINE 2 OF ..\..\common\ui_pop_up_list.c: can't open file 'api.h'
   3          #include "lcd.h"
*** ERROR C129 IN LINE 102 OF ..\..\INCLUDE\LCD.H: missing ';' before 'lcd_max_str'
   4          #include "key.h"
   5          #include "res_show.h"
   6          #include "res.h" 
   7          #include "ui_pop_up_list.h"
   8          #include "display.h"
*** WARNING C318 IN LINE 4 OF ..\..\INCLUDE\DISPLAY.H: can't open file 'types.h'
   9          #include "prefer.h"
  10          //#include "mp3_utile.h"
  11          
  12          
  13          code UINT8 menu_pos[6] = {POSITION_MENU2,POSITION_MENU3, 
  14                          POSITION_MENU4, POSITION_MENU5, POSITION_MENU6, POSITION_MENU7}; 
  15          
  16          UINT8 list_need_draw;
  17          UINT8 list_list_need_drawall = 1;
  18          UINT8 list_value_changed;       
  19          UINT8 list_active,list_old_active;
  20          
  21          pop_up_list_t globle_list;
  22          
  23          void show_active_list1(int old_active, int active)
  24          {
  25                  int tmp;                
  26                  tmp = active%6;
  27                  gfx_bg_rectangle(2,menu_pos[tmp], 124, 16);
  28                  bResShowPic(MENUARR, menu_ptr_x_def,menu_pos[tmp]+2);  
  29                  fg_color = COLOR_SELECT;        
  30                  ResShowMultiString(globle_list.strid[active],tUserPreference.u8LanguageId, menu_str_x_def,menu_pos[tmp]);
  31                  
  32                  tmp = old_active%6;
  33                  gfx_bg_rectangle(2,menu_pos[tmp], 124, 16);
  34                  bResShowPic(MENURDOT, menu_ptr_x_def, menu_pos[tmp]+2);                                             
  35                  fg_color = COLOR_UNSELECT;                                       
  36                  ResShowMultiString(globle_list.strid[old_active],tUserPreference.u8LanguageId, menu_str_x_def,menu
             -_pos[tmp]);
  37          }
  38          
  39          void screen_popup_list(UINT8 key)
  40          {
  41          
  42                  int i;
  43                  int max_group;  
  44                  int cur_group;  
  45                  int n;  
  46                  
  47                  //total pages   
  48                  max_group = globle_list.total / 6;
  49                  if((globle_list.total % 6) == 0) max_group--;
C51 COMPILER V7.50   UI_POP_UP_LIST                                                        07/17/2008 14:38:51 PAGE 2   

  50          
  51                  switch( key)
  52                  {
  53                      case KEY_NEXT:              
  54                          if(list_active < globle_list.total - 1)
  55                          {
  56                                  list_active++;
  57                                  if(list_active/6==cur_group)
  58                                  {
  59                                          list_old_active=list_active-1;                          
  60                                          list_value_changed=TRUE;
  61                                  }
  62                                  else 
  63                                          list_list_need_drawall = TRUE;                          
  64                          }
  65                          else 
  66                          {
  67                                  list_active = 0;
  68                                  list_list_need_drawall = TRUE;
  69                          } 
  70                          break;
  71                                  
  72                      case KEY_PREV:
  73                          if(list_active > 0)
  74                          {
  75                                  list_active--;
  76                                  if(list_active/6==cur_group)
  77                                  {
  78                                          list_old_active=list_active+1;                          
  79                                          list_value_changed=TRUE;
  80                                  }
  81                                  else 
  82                                          list_list_need_drawall = TRUE;                                                  
  83                          }
  84                          else
  85                          {
  86                                  list_active = globle_list.total - 1;
  87                                  list_list_need_drawall = TRUE;
  88                          }                                
  89                 
  90                          break;             
  91                              
  92                      case KEY_MENU:    //确认退出
  93                          //globle_list.active = list_active;
  94                          globle_list.action(list_active);
  95                          return;                 
  96                  }//while(1)
  97                  
  98                  if(list_list_need_drawall)
  99                  {
 100                          bResShowPic(MENUTWO,0,0);
 101                          bResShowPic(MENU_TOP,0,140);
 102                          fg_color = COLOR_UNSELECT;   
 103                          bg_color = 0x8B75;
 104                          gfx_set_bg(Color_MENU_def);     
 105                          ResShowMultiString(globle_list.headid, tUserPreference.u8LanguageId, 
 106                          list_str_x_def,123/*POSITION_MENU2+5*/);
 107                          list_list_need_drawall=0;
 108                          list_need_draw=1;
 109                  }
 110                  
 111                  if(list_need_draw)
C51 COMPILER V7.50   UI_POP_UP_LIST                                                        07/17/2008 14:38:51 PAGE 3   

 112                  {                                               
 113                          //bg_color = COLOR_WHITE;
 114                          bg_color = 0xF75F;
 115                          gfx_set_bg(0xF75F);             
 116                          list_old_active=list_active;
 117                          cur_group = list_active / 6;
 118                          n = cur_group*6;                
 119                          for(i=0; i<6; i++)
 120                          {
 121                                  if(n+i >= globle_list.total) break;     //处理不足5个的情况
 122                                  if(n+i==list_active)
 123                                  {
 124                                          bResShowPic(MENUARR, menu_ptr_x_def, menu_pos[i]+2);
 125                                          fg_color = COLOR_SELECT;                        
 126                                          ResShowMultiString(globle_list.strid[list_active], tUserPreference.u8LanguageId, 
 127                                          menu_str_x_def, menu_pos[i]);
 128                                  }
 129                                  else
 130                                  {
 131                                          
 132                                          bResShowPic(MENURDOT, menu_ptr_x_def, menu_pos[i]+2);
 133                                          fg_color = COLOR_UNSELECT;
 134                                          ResShowMultiString(globle_list.strid[n+i], tUserPreference.u8LanguageId, 
 135                                          menu_str_x_def, menu_pos[i]);
 136                                  }
 137                          }                                                       
 138                          list_need_draw = FALSE;
 139                  }//need draw
 140                  if(list_value_changed)
 141                  {
 142                          show_active_list1(list_old_active,list_active);
 143                          list_value_changed=FALSE;
 144                  }
 145          }
 146          
 147          void ui_list_init(void)
 148          {
 149                  list_need_draw=1;
 150                  list_list_need_drawall = 1;
 151                  list_value_changed = 0;
 152                  list_active = globle_list.active;       
 153                  bg_color = 0x0000F77F;
 154                  gfx_set_bg(0x0000F77F);         
 155                  screen_popup_list(KEY_PLAY);
 156          }

C51 COMPILATION COMPLETE.  2 WARNING(S),  1 ERROR(S)

⌨️ 快捷键说明

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