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

📄 game_utile.lst

📁 智原mp3 SDK 开发包 与巨力 有mp3 wma ogg decoder
💻 LST
📖 第 1 页 / 共 3 页
字号:
C51 COMPILER V7.50   GAME_UTILE                                                            08/18/2008 14:05:03 PAGE 1   


C51 COMPILER V7.50, COMPILATION OF MODULE GAME_UTILE
OBJECT MODULE PLACED IN ..\output\output_bin\output_game2\game_utile.obj
COMPILER INVOKED BY: C:\Keil\C51\BIN\C51.EXE ..\..\code\ap_game2\src\game_utile.c LARGE OPTIMIZE(9,SIZE) BROWSE INCDIR(.
                    -.\..\..\bsp\include;..\..\code\ap_game2\src\include;..\..\code\global;..\..\code\include) DEFINE(CONFIG_ASIC,dynamic_loa
                    -d) DEBUG OBJECTEXTEND PRINT(..\output\output_bin\output_game\game_utile.lst) OBJECT(..\output\output_bin\output_game2\ga
                    -me_utile.obj)

line level    source

   1          /*********************************
   2           *    mp3_utile.c
   3           *********************************/
   4          
   5          #include <string.h>
   6          #include "api.h"
   7          #include "lcd.h"
   8          #include "common.h"
   9          #include "ap_common.h"
  10          #include "display.h" 
  11          #include "ui_menu.h"
  12          #include "ui_pop_up_list.h"
  13          #include "ui_slider.h"
  14          #include "res.h"
  15          #include "res_show.h"
  16          #include "prefer.h"
  17          #include "mine.h"
  18          
  19          INT16U num_set=0;
  20          
  21          
  22          code INT8U random1[120] ={25,12,75,65,34,32,12,40,50,60,80,79,42,31,39,22,71,61,52,43,21,10,9,78,62,51,44,
             -30,26,15,3,4,28,35,44,50,67,70,65,64,
  23                                  15,28,39,48,59,66,78,53,62,77,55,47,60,18,17,13,80,57,69,38,49,61,23,15,73,49,11,15,77,63,59,12,3,11,7,
             -5,6,33,7,9,
  24                                  25,12,11,71,73,75,69,66,50,59,33,11,23,51,67,44,59,61,71,2,3,9,4,2,5,4,4,15,7,17,4,12,4,9,3,2,4,22,4,33
             -};
  25          extern INT8 color_ran;
  26          
  27          INT8 rand()
  28          {       
  29   1              INT8U i; //color 5 种
  30   1              
  31   1              if(color_ran > 120) 
  32   1                      color_ran=0;
  33   1              i= random1[color_ran++];
  34   1              return i;
  35   1      }
  36          
  37          
  38          char mine_handle(UINT8 key)
  39          {
  40   1              mine_show_mine();
  41   1      
  42   1              switch(key)
  43   1              {
  44   2                      case    K_ENTER:        
  45   2                              switch(mine.area[mine.mine_y][mine.mine_x].init_info)
  46   2                              {
  47   3                                      
  48   3                                      case MINE_MINE:
  49   3                                              mine.area[mine.mine_y][mine.mine_x].play_info = mine.area[mine.mine_y][mi
C51 COMPILER V7.50   GAME_UTILE                                                            08/18/2008 14:05:03 PAGE 2   

             -ne.mine_x].init_info;
  50   3                                              mine.mine_flash = FALSE;
  51   3                                              mine_show_all_mine();
  52   3                                              bResShowPic(E02,58,142);
  53   3                                              mine_chk_start();
  54   3                                              break;
  55   3                                      case MINE_0:
  56   3                                              mine.area[mine.mine_y][mine.mine_x].play_info = MINE_CHK;
  57   3                                              mine_handle_null();
  58   3                                              mine_show_cursor();
  59   3                                              bResShowPic(E03,58,142);
  60   3                                              if(mine_chk_win())
  61   3                                              {
  62   4                                                      mine.mine_status = 1;
  63   4                                                      mine_chk_start();
  64   4                                              }
  65   3                                              break;
  66   3                                      
  67   3                                      case MINE_1:
  68   3                                      case MINE_2:
  69   3                                      case MINE_3:
  70   3                                      case MINE_4:
  71   3                                      case MINE_5:
  72   3                                      case MINE_6:
  73   3                                      case MINE_7:
  74   3                                      case MINE_8:
  75   3                                      case MINE_9:
  76   3                                              mine.area[mine.mine_y][mine.mine_x].play_info = mine.area[mine.mine_y][mi
             -ne.mine_x].init_info;
  77   3                                              mine_show_area(mine.mine_x, mine.mine_y, mine.area[mine.mine_y][mine.mine
             -_x].play_info);
  78   3                                              mine_show_cursor();                                
  79   3                                              if(mine_chk_win())
  80   3                                              {
  81   4                                                      mine.mine_status = 1;
  82   4                                                      mine_chk_start();
  83   4                                              }
  84   3                                     
  85   3                                              break;
  86   3                              }
  87   2                              break;  
  88   2                      case    K_DOWN:
  89   2                              mine_show_area(mine.mine_x, mine.mine_y, mine.area[mine.mine_y][mine.mine_x].play_info);
  90   2                              if (mine.mine_y)
  91   2                              {
  92   3                                      mine.mine_y --;
  93   3                                      mine_get_cur();
  94   3                                      mine_show_cursor();
  95   3                              }
  96   2                              else
  97   2                              {
  98   3                                      mine.mine_y = (MINE_HANG - 1);  
  99   3                                      mine_get_cur();
 100   3                                      mine_show_cursor();
 101   3                              }                       
 102   2                              break;
 103   2                      case    K_UP:       
 104   2                              mine_show_area(mine.mine_x, mine.mine_y, mine.area[mine.mine_y][mine.mine_x].play_info);
 105   2                              if(mine.mine_y < (MINE_HANG - 1))
 106   2                              {
 107   3                                      mine.mine_y ++;
 108   3                                      mine_get_cur();
C51 COMPILER V7.50   GAME_UTILE                                                            08/18/2008 14:05:03 PAGE 3   

 109   3                                      mine_show_cursor();
 110   3                              }
 111   2                              else
 112   2                              {
 113   3                                      mine.mine_y = 0;        
 114   3                                      mine_get_cur();
 115   3                                      mine_show_cursor();
 116   3                              }       
 117   2                              break;
 118   2                      
 119   2                      case    K_LEFT:
 120   2                              mine_show_area(mine.mine_x, mine.mine_y, mine.area[mine.mine_y][mine.mine_x].play_info);
 121   2                              if(mine.mine_x)
 122   2                              {
 123   3                                      mine.mine_x --;
 124   3                                      mine_get_cur();
 125   3                                      mine_show_cursor();
 126   3                              }
 127   2                              else
 128   2                              {   
 129   3                                      mine.mine_x = (MINE_LIE - 1); 
 130   3                                      mine_get_cur();
 131   3                                      mine_show_cursor();
 132   3                              }       
 133   2                              break;
 134   2                      case    K_RIGHT:
 135   2                              mine_show_area(mine.mine_x, mine.mine_y, mine.area[mine.mine_y][mine.mine_x].play_info);
 136   2                              if(mine.mine_x < (MINE_LIE - 1))
 137   2                              {
 138   3                                      mine.mine_x ++;
 139   3                                      mine_get_cur();
 140   3                                      mine_show_cursor();
 141   3                              }
 142   2                              else
 143   2                              {
 144   3                                      mine.mine_x = 0;        
 145   3                                      mine_get_cur();
 146   3                                      mine_show_cursor();
 147   3                              }       
 148   2                              break;        
 149   2                      case    K_QUESTION: 
 150   2                              if(mine.area[mine.mine_y][mine.mine_x].play_info == MINE_SMINE)
 151   2                              {
 152   3                                      mine.area[mine.mine_y][mine.mine_x].play_info = MINE_UNSURE;
 153   3                                      num_set ++;
 154   3                                      mine_show_mine();
 155   3                              }
 156   2                              else if (mine.area[mine.mine_y][mine.mine_x].play_info == MINE_FULL || mine.area[mine.mine_y][mi
             -ne.mine_x].play_info == MINE_UNSURE) 
 157   2                              {
 158   3                                      mine.area[mine.mine_y][mine.mine_x].play_info = MINE_SMINE;
 159   3                                      num_set --;
 160   3                                      mine_show_mine();
 161   3                                      if(mine_chk_win())
 162   3                                      {
 163   4                                              mine.mine_flash = FALSE;
 164   4                                              mine.mine_status = 1;
 165   4                                              mine_chk_start();
 166   4                                      }
 167   3                              }
 168   2                              mine_show_area(mine.mine_x, mine.mine_y, mine.area[mine.mine_y][mine.mine_x].play_info);
 169   2                              mine_show_cursor();
C51 COMPILER V7.50   GAME_UTILE                                                            08/18/2008 14:05:03 PAGE 4   

 170   2                              break;
 171   2                      default:     
 172   2                              break;
 173   2              }
 174   1      }

⌨️ 快捷键说明

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