Subversion Repositories Kolibri OS

Rev

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