Subversion Repositories Kolibri OS

Rev

Rev 1518 | Rev 1566 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1518 Rev 1522
Line 4... Line 4...
4
 
4
 
5
    mov  [action],  0
5
    mov  [action],  0
6
    mov  eax, [time_wait_limit]
6
    mov  eax, [time_wait_limit]
Line 7... Line 7...
7
    mov  [time_to_wait],    eax
7
    mov  [time_to_wait],    eax
8
 
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]
9
Pause_Redraw_window:
15
    shl  ecx, 16
Line 10... Line 16...
10
      mcall     12,1
16
    add  ecx, dword[window_height]
11
      mcall     0,200*65536+WINDOW_WIDTH,326*65536+WINDOW_HEIGHT,[window_style], ,window_title
17
      mcall     0, , ,[window_style], ,window_title
12
 
18
 
Line 13... Line 19...
13
      call      Draw_decorations
19
      call      Draw_decorations
Line 14... Line 20...
14
      call      Draw_pause_picture
20
      call      Draw_pause_picture
15
      call      Draw_pause_strings
21
      call      Draw_pause_strings
16
 
22
 
17
      mcall     12,2
23
      mcall     12,2
18
    
24
    
19
    
25
    
20
Pause_Wait_for_event:
26
  .still:
Line 21... Line 27...
21
      mcall     10                              ; wait for event
27
      mcall     10                              ; wait for event
22
                                                ; ok, what an event?
28
                                                ; ok, what an event?
23
    dec  al                                     ; has the window been moved or resized?
29
    dec  al                                     ; has the window been moved or resized?
Line 24... Line 30...
24
     jz  Pause_Redraw_window
30
     jz  .redraw
25
    dec  al                                     ; was a key pressed?
31
    dec  al                                     ; was a key pressed?
Line 26... Line 32...
26
     jz  Pause_Is_key
32
     jz  .key
Line 27... Line 33...
27
 
33
 
28
 
34
 
Line 29... Line 35...
29
Pause_Is_button:                                ; a button was pressed
35
  .button:                                      ; a button was pressed
30
      mcall     17                              ; get button number
36
      mcall     17                              ; get button number
31
    shr  eax, 8                                 ; we should do it to get the real button code
37
    shr  eax, 8                                 ; we should do it to get the real button code
32
 
38
 
Line 33... Line 39...
33
    cmp  eax, 1
39
    cmp  eax, 1
Line 34... Line 40...
34
     je  Exit
40
     je  Exit
Line 35... Line 41...
35
 
41
 
Line 36... Line 42...
36
     jmp Pause_Wait_for_event
42
     jmp .still
37
 
43
 
Line 38... Line -...
38
 
-
 
39
Pause_Is_key:                                   ; a key was pressed
44
 
40
      mcall     2                               ; get keycode
45
  .key:                                         ; a key was pressed
41
    
46
      mcall     2                               ; get keycode
-
 
47
    
42
    cmp  ah,  0x1B                              ; Escape - go to menu
48
    cmp  ah,  0x1B                              ; Escape - go to menu
Line 43... Line 49...
43
     je  First_menu
49
     je  First_menu
Line 44... Line 50...
44
    cmp  ah,  0x20                              ; Space - resume game
50
    cmp  ah,  0x20                              ; Space - resume game
Line 45... Line 51...
45
     je  Level_body
51
     je  Level_body
46
    
52
    
Line -... Line 53...
-
 
53
     jmp .still
-
 
54
 
-
 
55
;;---Pause_mode----------------------------------------------------------------------------------------------------------------
-
 
56
 
-
 
57
 
47
     jmp Pause_Wait_for_event
58
;;===Some_functions============================================================================================================
Line 48... Line 59...
48
 
59
 
Line 49... Line 60...
49
;;---Pause_mode----------------------------------------------------------------------------------------------------------------
60
Draw_pause_picture: