Subversion Repositories Kolibri OS

Rev

Rev 1522 | Rev 1677 | Go to most recent revision | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

  1. ;;===Pause_mode================================================================================================================
  2.  
  3. Pause_mode:
  4.  
  5.       call      Show_cursor
  6.     mov  [action],  0
  7.     mov  eax, [time_wait_limit]
  8.     mov  [time_to_wait],    eax
  9.  
  10.   .redraw:
  11.       mcall     12,1
  12.     mov  ebx, [wp_x]
  13.     shl  ebx, 16
  14.     add  ebx, dword[window_width]
  15.     mov  ecx, [wp_y]
  16.     shl  ecx, 16
  17.     add  ecx, dword[window_height]
  18.       mcall     0, , ,[window_style], ,window_title
  19.  
  20.       call      Draw_decorations
  21.       call      Draw_pause_picture
  22.       call      Draw_pause_strings
  23.  
  24.       mcall     12,2
  25.    
  26.    
  27.   .still:
  28.       mcall     10                              ; wait for event
  29.                                                 ; ok, what an event?
  30.     dec  al                                     ; has the window been moved or resized?
  31.      jz  .redraw
  32.     dec  al                                     ; was a key pressed?
  33.      jz  .key
  34.  
  35.  
  36.   .button:                                      ; a button was pressed
  37.       mcall     17                              ; get button number
  38.     shr  eax, 8                                 ; we should do it to get the real button code
  39.  
  40.     cmp  eax, 1
  41.      je  Save_do_smth_else_and_exit
  42.  
  43.      jmp .still
  44.  
  45.  
  46.   .key:                                         ; a key was pressed
  47.       mcall     2                               ; get keycode
  48.    
  49.     cmp  ah,  0x1B                              ; Escape - go to menu
  50.      je  First_menu
  51.     cmp  ah,  0x20                              ; Space - resume game
  52.      je  Level_body
  53.    
  54.      jmp .still
  55.  
  56. ;;---Pause_mode----------------------------------------------------------------------------------------------------------------
  57.  
  58.  
  59. ;;===Some_functions============================================================================================================
  60.  
  61. Draw_pause_picture:
  62.     ;;===Draw_pause_picture========================================================================================================
  63.  
  64.     mov  ax,  2*0x100+24
  65.     mov  cx,  4*0x100+6
  66.     mov  edx, [pause_picture_color]
  67.     mov  esi, picture_pause
  68.       call      Draw_picture
  69.  
  70.     ret
  71.            
  72.     ;;---Draw_pause_picture--------------------------------------------------------------------------------------------------------
  73.                
  74.            
  75. Draw_pause_strings:
  76.     ;;===Draw_pause_strings================================================================================================
  77.  
  78.     mov  ebx, [window_width]
  79.     shr  ebx, 1
  80.     sub  ebx, string_resume_space.size*3+6
  81.     shl  ebx, 16
  82.     add  ebx, dword[bottom_middle_strings]
  83.       mcall     4, ,[navigation_strings_color],string_resume_space ; Show 'RESUME - SPACE' string
  84.      
  85.     call    Draw_menu_esc                       ; Show 'MENU - ESC' string
  86.  
  87.  
  88.     ret
  89.  
  90.     ;;---Draw_pause_strings------------------------------------------------------------------------------------------------
  91.        
  92. ;;---Some_functions------------------------------------------------------------------------------------------------------------