Subversion Repositories Kolibri OS

Rev

Rev 1522 | 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. Pause_Redraw_window:
  10.       mcall     12,1
  11.       mcall     0,200*65536+WINDOW_WIDTH,326*65536+WINDOW_HEIGHT,[window_style], ,window_title
  12.  
  13.       call      Draw_decorations
  14.       call      Draw_pause_picture
  15.       call      Draw_pause_strings
  16.  
  17.       mcall     12,2
  18.    
  19.    
  20. Pause_Wait_for_event:
  21.       mcall     10                              ; wait for event
  22.                                                 ; ok, what an event?
  23.     dec  al                                     ; has the window been moved or resized?
  24.      jz  Pause_Redraw_window
  25.     dec  al                                     ; was a key pressed?
  26.      jz  Pause_Is_key
  27.  
  28.  
  29. Pause_Is_button:                                ; a button was pressed
  30.       mcall     17                              ; get button number
  31.     shr  eax, 8                                 ; we should do it to get the real button code
  32.  
  33.     cmp  eax, 1
  34.      je  Exit
  35.  
  36.      jmp Pause_Wait_for_event
  37.  
  38.  
  39. Pause_Is_key:                                   ; a key was pressed
  40.       mcall     2                               ; get keycode
  41.    
  42.     cmp  ah,  0x1B                              ; Escape - go to menu
  43.      je  First_menu
  44.     cmp  ah,  0x20                              ; Space - resume game
  45.      je  Level_body
  46.    
  47.      jmp Pause_Wait_for_event
  48.  
  49. ;;---Pause_mode----------------------------------------------------------------------------------------------------------------
  50.  
  51.  
  52. ;;===Some_functions============================================================================================================
  53.  
  54. Draw_pause_picture:
  55.     ;;===Draw_pause_picture========================================================================================================
  56.  
  57.     mov  al,  6
  58.     mov  bh,  2
  59.     mov  ecx, picture_pause
  60.     mov  edx, [pause_picture_color]
  61.       call      Draw_picture
  62.  
  63.     ret
  64.            
  65.     ;;---Draw_pause_picture--------------------------------------------------------------------------------------------------------
  66.                
  67.            
  68. Draw_pause_strings:
  69.     ;;===Draw_pause_strings================================================================================================
  70.  
  71.       mcall     4,219*65536+BOTTOM_MIDDLE_STRINGS,[navigation_strings_color],string_resume_space ; Show 'RESUME - SPACE' string
  72.      
  73.     call    Draw_menu_esc                       ; Show 'MENU - ESC' string
  74.  
  75.  
  76.     ret
  77.  
  78.     ;;---Draw_pause_strings------------------------------------------------------------------------------------------------
  79.        
  80. ;;---Some_functions------------------------------------------------------------------------------------------------------------