[docs] Replace cyrillic 'с' with latin 'c' in register names
[kolibrios.git] / programs / media / zsea / draw_win.inc
bloba5d78449e9f4566942d481f593b6aaef45ae854b
1 ;   *********************************************
2 ;   *******  WINDOW DEFINITIONS AND DRAW ********
3 ;   *********************************************
4 draw_window:
5         or      [bWasDraw],1
6         mcall   12,1
8         xor     eax,eax         ; function 0 : define and draw window
9         mov     ebx,[wnd_width]
10         mov     ecx,[wnd_height]
11         xor     esi,esi
12         mcall   ,,,0x73ffffff,,Authors_text.1
14         call    get_window_param
15         mov     eax,[procinfo+70]       ;status of window
16         test    eax,100b
17         jne     .end
18         
19         call    draw_other
21         push    dword menu_data_1
22         call    [menu_bar_draw]
23         push    dword menu_data_2
24         call    [menu_bar_draw]
25         push    dword menu_data_3
26         call    [menu_bar_draw]
27         push    dword menu_data_4
28         call    [menu_bar_draw]
29         push    dword menu_data_5
30         call    [menu_bar_draw]
31         push    dword menu_data_6
32         call    [menu_bar_draw]
34         push    dword dinamic_button_data_1
35         call    [dinamic_button_draw]
36         push    dword dinamic_button_data_2
37         call    [dinamic_button_draw]
38         push    dword dinamic_button_data_3
39         call    [dinamic_button_draw]
40         push    dword dinamic_button_data_4
41         call    [dinamic_button_draw]
42         push    dword dinamic_button_data_5
43         call    [dinamic_button_draw]
44         push    dword dinamic_button_data_6
45         call    [dinamic_button_draw]
46         push    dword dinamic_button_data_7
47         call    [dinamic_button_draw]
48         push    dword dinamic_button_data_8
49         call    [dinamic_button_draw]
50         push    dword dinamic_button_data_9
51         call    [dinamic_button_draw]
52         push    dword dinamic_button_data_10
53         call    [dinamic_button_draw]
54         push    dword dinamic_button_data_11
55         call    [dinamic_button_draw]
56         push    dword dinamic_button_data_12
57         call    [dinamic_button_draw]
58         push    dword dinamic_button_data_13
59         call    [dinamic_button_draw]
60         push    dword dinamic_button_data_14
61         call    [dinamic_button_draw]
62         push    dword dinamic_button_data_15
63         call    [dinamic_button_draw]
64         
65         mcall   13,<225,2>,<3,22>,0x677EA0 ;0x052B64
66         mcall   ,<280,2>
67         mcall   ,<410,2>
68         mcall   ,<490,2>
69         mcall   ,<545,2>
70         mcall   ,<625,2>
71         mcall   ,<720,2>
72         mcall   4,<630,3>,0x80000000, file_mount
73         mcall   13,<677,40>,<13,11>,0xe5e5e5
74         mov     ecx,[load_directory_pointer]
75         mov     ecx,[ecx+4]
76         mcall   47,0x80060000, ,<679, 15>,0
77         mcall   8,[dinamic_button_data_5.x],[dinamic_button_data_5.y],0x40000002
78 .end:
79         mcall   12,2
80         ret
81 ;---------------------------------------------------------------------
82 set_draw_scrollbar_all:
83         xor     eax,eax
84         inc     eax
85         mov     [scroll_bar_data_vertical.all_redraw],eax
86         mov     [scroll_bar_data_horizontal.all_redraw],eax
87         ret
88 ;---------------------------------------------------------------------
89 set_nodraw_scrollbar_all:
90         xor     eax,eax
91         mov     [scroll_bar_data_vertical.all_redraw],eax
92         mov     [scroll_bar_data_horizontal.all_redraw],eax
93         ret
94 ;---------------------------------------------------------------------
95 draw_other:
96         call    drawimage
97 @@:
98         xor     ebx,ebx
99         shl     ebx,16
100         add     ebx,[window_width]
101         xor     ecx,ecx
102         shl     ecx,16
103         add     ecx,28
104         mov     edx,0xffffff
105         cmp     [no_draw_window],0
106         jne     @f
107         mcall 13   ; fill top area
109         mov     eax,[soi]
110         test    eax,eax
111         jnz     @f
112         mov     ecx,[window_high]
113         sub     ecx,28
114         add     ecx,28 shl 16
115         mcall   13
117         call    draw_number_of_file
118         call    draw_zoom_factors
119         cmp     [scaling_mode],dword 0
120         jne     @f
121         ret
123         call    set_draw_scrollbar_all
124         call    draw_scrollbars
125         call    set_nodraw_scrollbar_all
126         ret
127 ;---------------------------------------------------------------------  
128 draw_number_of_file:
129         mcall   13,<630,42>,<13,11>,0xe5e5e5
130         xor     ecx,ecx
131         mov     eax,[load_directory_pointer]
132         cmp     [eax+4],dword 0
133         je      @f
134         mov     ecx,[load_file_number]
135         inc     ecx
137         mcall   47,0x80060000, ,<632, 15>,0
138         ret
139 ;---------------------------------------------------------------------
140 draw_zoom_factors:
141         mcall   13,<725,30>,<13,11>,0xe5e5e5
142         mov     ecx,[zoom_factors]
143         mov     ecx,[ecx]
144         mov     [scaling_mode],ecx
145         test    ecx,ecx
146         jnz     @f
147         mcall   4,<727,14>,0x80000000,zoom_auto_text
148         ret
150         mcall   47,0x80060000,,<727, 15>,0
151         ret
152 ;---------------------------------------------------------------------