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

📄 ui_pop_up_list.lst

📁 智原mp3 SDK 开发包 与巨力 有mp3 wma ogg decoder
💻 LST
字号:
C51 COMPILER V7.50   UI_POP_UP_LIST                                                        09/05/2008 14:57:43 PAGE 1   


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

line level    source

   1          #include <string.h>
   2          #include "api.h"
   3          #include "lcd.h"
   4          #include "key.h"
   5          #include "res_show.h"
   6          #include "res.h" 
   7          #include "ui_pop_up_list.h"
   8          #include "display.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   1              int tmp;                
  26   1              tmp = active%6;
  27   1              gfx_bg_rectangle(2,menu_pos[tmp], 124, 16);
  28   1              bResShowPic(MENUARR, menu_ptr_x_def,menu_pos[tmp]+2);  
  29   1              fg_color = COLOR_SELECT;        
  30   1              ResShowMultiString(globle_list.strid[active],tUserPreference.u8LanguageId, menu_str_x_def,menu_pos[tmp]);
  31   1              
  32   1              tmp = old_active%6;
  33   1              gfx_bg_rectangle(2,menu_pos[tmp], 124, 16);
  34   1              bResShowPic(MENURDOT, menu_ptr_x_def, menu_pos[tmp]+2);                                             
  35   1              fg_color = COLOR_UNSELECT;                                       
  36   1              ResShowMultiString(globle_list.strid[old_active],tUserPreference.u8LanguageId, menu_str_x_def,menu
             -_pos[tmp]);
  37   1      }
  38          
  39          void screen_popup_list(UINT8 key)
  40          {
  41   1      
  42   1              int i;
  43   1              int max_group;  
  44   1              int cur_group;  
  45   1              int n;  
  46   1              
  47   1              //total pages   
  48   1              max_group = globle_list.total / 6;
  49   1              if((globle_list.total % 6) == 0) max_group--;
  50   1      
  51   1              switch( key)
C51 COMPILER V7.50   UI_POP_UP_LIST                                                        09/05/2008 14:57:43 PAGE 2   

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

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


MODULE INFORMATION:   STATIC OVERLAYABLE
   CODE SIZE        =    844    ----
   CONSTANT SIZE    =      6    ----
   XDATA SIZE       =     17      14
   PDATA SIZE       =   ----    ----
   DATA SIZE        =   ----    ----
   IDATA SIZE       =   ----    ----
   BIT SIZE         =   ----    ----
END OF MODULE INFORMATION.


C51 COMPILATION COMPLETE.  0 WARNING(S),  0 ERROR(S)

⌨️ 快捷键说明

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