Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
31 | halyavin | 1 | ; |
51 | mikedld | 2 | ; UNIFORM WINDOW COLOURS & SKIN |
31 | halyavin | 3 | ; |
4 | ; Compile with FASM for Menuet |
||
5 | ; |
||
6 | ; < russian edition by Ivan Poddubny > |
||
51 | mikedld | 7 | ; < skin selection by Mike Semenyako > |
31 | halyavin | 8 | ; |
1611 | mario79 | 9 | ; last update: 10/09/2010 |
10 | ; written by: Marat Zakiyanov aka Mario79, aka Mario |
||
11 | ; changes: select path with OpenDialog |
||
31 | halyavin | 12 | ;****************************************************************************** |
13 | use32 |
||
14 | org 0 |
||
15 | db 'MENUET01' ; identifier |
||
16 | dd 1 ; header version |
||
17 | dd START ; start address |
||
18 | dd I_END ; file size |
||
1611 | mario79 | 19 | dd i_end ;28000h ; memory |
20 | dd stacktop ; stack pointer |
||
21 | dd skin_info ; parameters |
||
22 | dd cur_dir_path ; path to file |
||
23 | |||
24 | include 'lang.inc' |
||
1702 | Lrz | 25 | include '../../../config.inc' ;for nightbuild |
1611 | mario79 | 26 | include '../../../macros.inc' |
27 | include 'kglobals.inc' |
||
28 | include 'unpacker.inc' |
||
29 | include '../../../develop/libraries/box_lib/load_lib.mac' |
||
30 | @use_library |
||
31 | halyavin | 31 | ;****************************************************************************** |
32 | |||
33 | |||
51 | mikedld | 34 | struct SKIN_HEADER |
485 | heavyiron | 35 | ident dd ? |
36 | version dd ? |
||
37 | params dd ? |
||
38 | buttons dd ? |
||
39 | bitmaps dd ? |
||
51 | mikedld | 40 | ends |
31 | halyavin | 41 | |
51 | mikedld | 42 | struct SKIN_PARAMS |
485 | heavyiron | 43 | skin_height dd ? |
44 | margin.right dw ? |
||
45 | margin.left dw ? |
||
46 | margin.bottom dw ? |
||
47 | margin.top dw ? |
||
48 | colors.inner dd ? |
||
49 | colors.outer dd ? |
||
50 | colors.frame dd ? |
||
51 | colors_1.inner dd ? |
||
52 | colors_1.outer dd ? |
||
53 | colors_1.frame dd ? |
||
54 | dtp.size dd ? |
||
55 | dtp.data db 40 dup (?) |
||
51 | mikedld | 56 | ends |
57 | |||
58 | struct SKIN_BUTTONS |
||
485 | heavyiron | 59 | type dd ? |
60 | pos: |
||
61 | left dw ? |
||
62 | top dw ? |
||
63 | size: |
||
64 | width dw ? |
||
65 | height dw ? |
||
51 | mikedld | 66 | ends |
67 | |||
68 | struct SKIN_BITMAPS |
||
485 | heavyiron | 69 | kind dw ? |
70 | type dw ? |
||
71 | _data dd ? |
||
51 | mikedld | 72 | ends |
73 | |||
74 | |||
31 | halyavin | 75 | START: ; start of execution |
1611 | mario79 | 76 | ;--------------------------------------------------------------------- |
77 | mcall 68,11 |
||
78 | |||
79 | test eax,eax |
||
80 | jz close |
||
81 | |||
82 | load_libraries l_libs_start,end_l_libs |
||
83 | |||
84 | ;if return code =-1 then exit, else nornary work |
||
85 | ; cmp eax,-1 |
||
86 | inc eax |
||
87 | test eax,eax |
||
88 | jz close |
||
89 | |||
90 | ;--------------------------------------------------------------------- |
||
91 | mov edi,filename_area |
||
92 | mov esi,start_temp_file_name |
||
93 | xor eax,eax |
||
94 | cld |
||
95 | @@: |
||
96 | lodsb |
||
97 | stosb |
||
98 | test eax,eax |
||
99 | jnz @b |
||
100 | |||
101 | |||
102 | mov edi,fname |
||
103 | mov esi,default_dtp |
||
104 | xor eax,eax |
||
105 | cld |
||
106 | @@: |
||
107 | lodsb |
||
108 | stosb |
||
109 | test eax,eax |
||
110 | jnz @b |
||
111 | |||
112 | ;--------------------------------------------------------------------- |
||
113 | ; mov esi, param |
||
114 | ; cmp byte [esi], 0 |
||
115 | ; je @f |
||
116 | ; jnz has_param |
||
117 | ; mov esi,default_skn |
||
118 | ; mov edi,fname |
||
119 | ; mov ecx,default_skn.size |
||
120 | ; rep movsb |
||
121 | ; jmp skin_path_ready |
||
122 | ;has_param: |
||
123 | ; mov ecx, 256/4 |
||
124 | ; mov edi, fname |
||
125 | ; rep movsd |
||
126 | ; skin_path_ready |
||
127 | ;--------------------------------------------------------------------- |
||
128 | mov edi,skin_info |
||
129 | cmp byte [edi], 0 |
||
130 | jne skin_path_ready |
||
131 | mov esi,default_skin |
||
132 | xor eax,eax |
||
133 | cld |
||
134 | @@: |
||
135 | lodsb |
||
136 | stosb |
||
137 | test eax,eax |
||
138 | jnz @b |
||
139 | skin_path_ready: |
||
140 | ;--------------------------------------------------------------------- |
||
141 | ;OpenDialog initialisation |
||
142 | push dword OpenDialog_data |
||
143 | call [OpenDialog_Init] |
||
144 | |||
145 | push dword OpenDialog_data2 |
||
146 | call [OpenDialog_Init] |
||
147 | |||
148 | ; prepare for PathShow |
||
149 | push dword PathShow_data_1 |
||
150 | call [PathShow_prepare] |
||
151 | |||
152 | push dword PathShow_data_2 |
||
153 | call [PathShow_prepare] |
||
154 | ;--------------------------------------------------------------------- |
||
31 | halyavin | 155 | mov eax,48 ; get current colors |
156 | mov ebx,3 |
||
157 | mov ecx,color_table |
||
158 | mov edx,4*10 |
||
485 | heavyiron | 159 | mcall |
31 | halyavin | 160 | |
1611 | mario79 | 161 | call load_skin_file.2 |
528 | diamond | 162 | |
179 | mikedld | 163 | ; mov esi, default_dtp |
164 | ; mov edi, fname |
||
165 | ; mov ecx, default_dtp.size |
||
166 | ; rep movsb |
||
31 | halyavin | 167 | |
168 | red: |
||
169 | call draw_window ; at first, draw the window |
||
170 | |||
171 | still: |
||
172 | |||
173 | mov eax,23 ; wait here for event |
||
174 | mov ebx,5 |
||
485 | heavyiron | 175 | mcall |
31 | halyavin | 176 | |
177 | dec eax ; redraw request ? |
||
178 | jz red |
||
179 | dec eax ; key in buffer ? |
||
180 | jz key |
||
181 | dec eax ; button in buffer ? |
||
182 | jz button |
||
183 | |||
184 | call draw_cursor |
||
185 | |||
186 | jmp still |
||
187 | |||
188 | |||
189 | key: ; key |
||
205 | heavyiron | 190 | mov al,2 ; just read it and ignore |
485 | heavyiron | 191 | mcall |
31 | halyavin | 192 | jmp still |
193 | |||
194 | button: ; button |
||
205 | heavyiron | 195 | mov al,17 ; get id |
485 | heavyiron | 196 | mcall |
31 | halyavin | 197 | |
1611 | mario79 | 198 | ; cmp ah,11 ; read string |
199 | ; jne no_string |
||
200 | ; call read_string |
||
201 | ; jmp still |
||
202 | ; no_string: |
||
51 | mikedld | 203 | |
204 | cmp ah,12 ; load file |
||
205 | jne no_load |
||
206 | call load_file |
||
207 | call draw_window |
||
208 | jmp still |
||
209 | no_load: |
||
210 | |||
211 | cmp ah,13 ; save file |
||
212 | jne no_save |
||
213 | call save_file |
||
214 | jmp still |
||
215 | no_save: |
||
216 | |||
31 | halyavin | 217 | cmp ah,14 ; set 3d buttons |
218 | jne no_3d |
||
219 | mov eax,48 |
||
220 | mov ebx,1 |
||
221 | mov ecx,1 |
||
485 | heavyiron | 222 | mcall |
484 | diamond | 223 | jmp doapply |
31 | halyavin | 224 | no_3d: |
225 | |||
226 | cmp ah,15 ; set flat buttons |
||
227 | jne no_flat |
||
228 | mcall 48, 1, 0 |
||
484 | diamond | 229 | doapply: |
31 | halyavin | 230 | mcall 48, 0, 0 |
231 | jmp still |
||
232 | no_flat: |
||
233 | |||
51 | mikedld | 234 | cmp ah,16 ; apply |
31 | halyavin | 235 | jne no_apply |
51 | mikedld | 236 | apply_direct: |
31 | halyavin | 237 | mov eax,48 |
238 | mov ebx,2 |
||
239 | mov ecx,color_table |
||
240 | mov edx,10*4 |
||
485 | heavyiron | 241 | mcall |
484 | diamond | 242 | jmp doapply |
31 | halyavin | 243 | no_apply: |
244 | |||
51 | mikedld | 245 | cmp ah,17 ; load skin file |
246 | jne no_load_skin |
||
247 | call load_skin_file |
||
248 | call draw_window |
||
249 | jmp still |
||
250 | no_load_skin: |
||
251 | |||
252 | cmp ah,18 ; apply skin |
||
253 | jne no_apply_skin |
||
1611 | mario79 | 254 | cmp [skin_info],0 |
51 | mikedld | 255 | je no_apply_skin |
1611 | mario79 | 256 | mcall 48,8,skin_info |
51 | mikedld | 257 | call draw_window |
258 | jmp still |
||
259 | no_apply_skin: |
||
260 | |||
31 | halyavin | 261 | cmp ah,31 |
262 | jb no_new_colour |
||
263 | cmp ah,41 |
||
264 | jg no_new_colour |
||
265 | shr eax,8 |
||
266 | sub eax,31 |
||
267 | shl eax,2 |
||
268 | mov ebx,[color] |
||
179 | mikedld | 269 | mov [eax+color_table],ebx |
1611 | mario79 | 270 | cmp dword[not_packed_area+SKIN_HEADER.ident],'SKIN' |
179 | mikedld | 271 | jne @f |
1611 | mario79 | 272 | mov edi,[not_packed_area+SKIN_HEADER.params] |
273 | mov dword[edi+not_packed_area+SKIN_PARAMS.dtp.data+eax],ebx |
||
179 | mikedld | 274 | call draw_skin |
275 | @@: call draw_colours |
||
31 | halyavin | 276 | jmp still |
277 | no_new_colour: |
||
278 | |||
205 | heavyiron | 279 | cmp ah,1 ; terminate |
280 | jnz noid1 |
||
1611 | mario79 | 281 | close: |
205 | heavyiron | 282 | or eax,-1 |
485 | heavyiron | 283 | mcall |
31 | halyavin | 284 | noid1: |
285 | |||
286 | jmp still |
||
287 | |||
288 | |||
289 | draw_cursor: |
||
290 | |||
291 | pusha |
||
292 | mov eax,37 |
||
293 | mov ebx,2 |
||
485 | heavyiron | 294 | mcall |
31 | halyavin | 295 | |
296 | cmp eax,0 |
||
297 | jne dc1 |
||
298 | popa |
||
299 | ret |
||
300 | |||
301 | dc1: |
||
302 | |||
303 | mov eax,37 |
||
304 | mov ebx,1 |
||
485 | heavyiron | 305 | mcall |
31 | halyavin | 306 | |
307 | mov ebx,eax |
||
308 | shr ebx,16 |
||
309 | mov ecx,eax |
||
310 | and ecx,0xffff |
||
311 | |||
312 | cmp ecx,32 |
||
313 | jbe no_color |
||
314 | cmp ebx,32 |
||
315 | jbe no_color |
||
316 | |||
51 | mikedld | 317 | cmp ebx,266 ; CHANGE COLOR |
31 | halyavin | 318 | jb no_color |
51 | mikedld | 319 | cmp ebx,266+20*3 |
31 | halyavin | 320 | jg no_color |
321 | |||
322 | cmp ecx,30+128 |
||
323 | jge no_color |
||
324 | cmp ecx,30 |
||
325 | jb no_color |
||
326 | |||
51 | mikedld | 327 | sub ebx,266 |
31 | halyavin | 328 | mov eax,ebx |
329 | cdq |
||
330 | mov ebx,20 |
||
331 | div ebx |
||
332 | mov ebx,2 |
||
333 | sub ebx,eax |
||
334 | |||
335 | add ecx,-30 |
||
336 | not ecx |
||
337 | shl ecx,1 |
||
338 | |||
339 | mov byte [ebx+color],cl |
||
340 | call draw_color |
||
341 | |||
342 | popa |
||
343 | ret |
||
344 | |||
345 | no_color: |
||
346 | |||
347 | popa |
||
348 | ret |
||
349 | |||
1611 | mario79 | 350 | ;--------------------------------------------------------------------- |
351 | load_file: |
||
352 | ;--------------------------------------------------------------------- |
||
353 | ; invoke OpenDialog |
||
354 | mov [OpenDialog_data.type],dword 0 |
||
355 | push dword OpenDialog_data |
||
356 | call [OpenDialog_Start] |
||
357 | cmp [OpenDialog_data.status],1 |
||
358 | je .1 |
||
359 | ret |
||
360 | .1: |
||
361 | ; prepare for PathShow |
||
362 | push dword PathShow_data_1 |
||
363 | call [PathShow_prepare] |
||
31 | halyavin | 364 | |
1611 | mario79 | 365 | call draw_PathShow |
366 | ;--------------------------------------------------------------------- |
||
484 | diamond | 367 | xor eax, eax |
368 | mov ebx, read_info |
||
369 | mov dword [ebx], eax ; subfunction: read |
||
370 | mov dword [ebx+4], eax ; offset (low dword) |
||
371 | mov dword [ebx+8], eax ; offset (high dword) |
||
372 | mov dword [ebx+12], 40 ; read colors file: 4*10 bytes |
||
373 | mov dword [ebx+16], color_table ; address |
||
374 | mcall 70 |
||
375 | ret |
||
1611 | mario79 | 376 | ;--------------------------------------------------------------------- |
377 | load_skin_file: |
||
378 | ;--------------------------------------------------------------------- |
||
379 | ; invoke OpenDialog |
||
380 | push dword OpenDialog_data2 |
||
381 | call [OpenDialog_Start] |
||
382 | cmp [OpenDialog_data2.status],1 |
||
383 | je .1 |
||
384 | ret |
||
385 | .1: |
||
386 | ; prepare for PathShow |
||
387 | push dword PathShow_data_2 |
||
388 | call [PathShow_prepare] |
||
31 | halyavin | 389 | |
1611 | mario79 | 390 | call draw_PathShow |
391 | ;--------------------------------------------------------------------- |
||
392 | .2: |
||
484 | diamond | 393 | xor eax, eax |
1611 | mario79 | 394 | mov ebx, read_info2 |
484 | diamond | 395 | mov dword [ebx], eax ; subfunction: read |
396 | mov dword [ebx+4], eax ; offset (low dword) |
||
397 | mov dword [ebx+8], eax ; offset (high dword) |
||
398 | mov dword [ebx+12], 32*1024 ; read: max 32 KBytes |
||
1611 | mario79 | 399 | mov dword [ebx+16], file_load_area ; address |
484 | diamond | 400 | mcall 70 |
31 | halyavin | 401 | |
1611 | mario79 | 402 | mov esi, file_load_area |
179 | mikedld | 403 | |
484 | diamond | 404 | cmp dword [esi], 'KPCK' |
405 | jnz notpacked |
||
406 | cmp dword [esi+4], 32*1024 ; max 32 KBytes |
||
407 | ja doret |
||
1611 | mario79 | 408 | push unpack_area |
484 | diamond | 409 | push esi |
410 | call unpack |
||
1611 | mario79 | 411 | mov esi, unpack_area |
484 | diamond | 412 | notpacked: |
31 | halyavin | 413 | |
484 | diamond | 414 | cmp dword[esi+SKIN_HEADER.ident],'SKIN' |
415 | jne doret |
||
51 | mikedld | 416 | |
1611 | mario79 | 417 | mov edi,not_packed_area |
484 | diamond | 418 | mov ecx,0x8000/4 |
419 | rep movsd |
||
51 | mikedld | 420 | |
1611 | mario79 | 421 | ; mov esi,fname |
422 | ; mov edi,skin_info.fname |
||
423 | ; mov ecx,257 |
||
424 | ; rep movsb |
||
51 | mikedld | 425 | |
1611 | mario79 | 426 | mov ebp,not_packed_area |
51 | mikedld | 427 | mov esi,[ebp+SKIN_HEADER.params] |
428 | add esi,ebp |
||
429 | lea esi,[esi+SKIN_PARAMS.dtp.data] |
||
430 | mov edi,color_table |
||
431 | mov ecx,10 |
||
432 | rep movsd |
||
484 | diamond | 433 | doret: |
51 | mikedld | 434 | |
31 | halyavin | 435 | ret |
436 | |||
1611 | mario79 | 437 | ;--------------------------------------------------------------------- |
438 | save_file: |
||
439 | ;--------------------------------------------------------------------- |
||
440 | ; invoke OpenDialog |
||
441 | mov [OpenDialog_data.type],dword 1 |
||
442 | push dword OpenDialog_data |
||
443 | call [OpenDialog_Start] |
||
444 | cmp [OpenDialog_data.status],1 |
||
445 | je .1 |
||
446 | ret |
||
447 | .1: |
||
448 | ; prepare for PathShow |
||
449 | push dword PathShow_data_1 |
||
450 | call [PathShow_prepare] |
||
31 | halyavin | 451 | |
1611 | mario79 | 452 | call draw_PathShow |
453 | ;--------------------------------------------------------------------- |
||
484 | diamond | 454 | mov ebx, write_info |
455 | mov dword [ebx], 2 ; subfunction: write |
||
456 | and dword [ebx+4], 0 ; (reserved) |
||
457 | and dword [ebx+8], 0 ; (reserved) |
||
458 | mov dword [ebx+12], 10*4 ; bytes to write |
||
459 | mov dword [ebx+16], color_table ; address |
||
460 | mcall 70 |
||
461 | ret |
||
1611 | mario79 | 462 | ;--------------------------------------------------------------------- |
31 | halyavin | 463 | draw_color: |
464 | |||
465 | pusha |
||
466 | |||
467 | mov eax,13 |
||
51 | mikedld | 468 | mov ebx,266*65536+60 |
31 | halyavin | 469 | mov ecx,170*65536+30 |
470 | mov edx,[color] |
||
485 | heavyiron | 471 | mcall |
31 | halyavin | 472 | |
473 | ; mov eax,13 |
||
51 | mikedld | 474 | mov ebx,266*65536+60 |
31 | halyavin | 475 | mov ecx,200*65536+10 |
476 | mov edx,[w_work] |
||
485 | heavyiron | 477 | mcall |
31 | halyavin | 478 | |
479 | mov eax,47 |
||
480 | mov ebx,0+1*256+8*65536 |
||
481 | mov ecx,[color] |
||
51 | mikedld | 482 | mov edx,272*65536+201 |
31 | halyavin | 483 | mov esi,[w_work_text] |
485 | heavyiron | 484 | mcall |
31 | halyavin | 485 | |
486 | popa |
||
487 | ret |
||
2068 | mario79 | 488 | ;---------------------------------------------------------------------- |
31 | halyavin | 489 | draw_colours: |
490 | |||
491 | pusha |
||
492 | |||
493 | mov esi,color_table |
||
494 | |||
495 | mov ebx,225*65536+32 |
||
51 | mikedld | 496 | mov ecx,32*65536+12 |
31 | halyavin | 497 | newcol: |
498 | mov eax,13 |
||
499 | mov edx,[esi] |
||
485 | heavyiron | 500 | mcall |
51 | mikedld | 501 | add ecx,18*65536 |
31 | halyavin | 502 | add esi,4 |
503 | cmp esi,color_table+4*9 |
||
504 | jbe newcol |
||
505 | |||
506 | popa |
||
507 | ret |
||
2068 | mario79 | 508 | ;---------------------------------------------------------------------- |
51 | mikedld | 509 | draw_framerect: ; ebx,ecx |
510 | push ebx ecx |
||
511 | add bx,[esp+6] |
||
512 | mov cx,[esp+2] |
||
513 | dec ebx |
||
514 | mcall 38 |
||
515 | add cx,[esp] |
||
516 | rol ecx,16 |
||
517 | add cx,[esp] |
||
518 | sub ecx,0x00010001 |
||
519 | mcall |
||
520 | mov ebx,[esp+4] |
||
521 | mov ecx,[esp] |
||
522 | mov bx,[esp+6] |
||
523 | add cx,[esp+2] |
||
524 | dec ecx |
||
525 | mcall |
||
526 | add bx,[esp+4] |
||
527 | rol ebx,16 |
||
528 | add bx,[esp+4] |
||
529 | sub ebx,0x00010001 |
||
530 | mcall |
||
531 | add esp,8 |
||
532 | ret |
||
2068 | mario79 | 533 | ;---------------------------------------------------------------------- |
51 | mikedld | 534 | find_bitmap: |
535 | mov edi,[ebp+SKIN_HEADER.bitmaps] |
||
536 | add edi,ebp |
||
537 | xor ebx,ebx |
||
538 | .lp1: cmp dword[edi],0 |
||
539 | je .lp2 |
||
540 | cmp dword[edi+0],eax |
||
541 | jne @f |
||
485 | heavyiron | 542 | mov ebx,[edi+SKIN_BITMAPS._data] |
51 | mikedld | 543 | add ebx,ebp |
544 | mov ecx,[ebx-2] |
||
545 | mov cx,[ebx+4] |
||
546 | add ebx,8 |
||
547 | .lp2: ret |
||
548 | @@: add edi,8 |
||
549 | jmp .lp1 |
||
2068 | mario79 | 550 | ;---------------------------------------------------------------------- |
179 | mikedld | 551 | dec_edx: |
552 | sub dl,4 |
||
553 | jnc @f |
||
554 | xor dl,dl |
||
555 | @@: sub dh,4 |
||
556 | jnc @f |
||
557 | xor dh,dh |
||
558 | @@: rol edx,16 |
||
559 | sub dl,4 |
||
560 | jnc @f |
||
561 | xor dl,dl |
||
562 | @@: rol edx,16 |
||
563 | ret |
||
2068 | mario79 | 564 | ;---------------------------------------------------------------------- |
179 | mikedld | 565 | area: |
566 | .x = 345 |
||
567 | .y = 20 |
||
568 | .width = 206 |
||
569 | .height = 191 |
||
570 | |||
571 | wnd1: |
||
572 | .x = area.x+49 |
||
573 | .y = area.y+5 |
||
574 | .width = 150 |
||
575 | .height = 90 |
||
576 | wnd2: |
||
577 | .x = area.x+35 |
||
578 | .y = area.y+35 |
||
579 | .width = 150 |
||
580 | .height = 90 |
||
581 | wnd3: |
||
582 | .x = area.x+21 |
||
583 | .y = area.y+65 |
||
584 | .width = 150 |
||
585 | .height = 90 |
||
586 | wnd4: |
||
587 | .x = area.x+7 |
||
588 | .y = area.y+95 |
||
589 | .width = 150 |
||
590 | .height = 90 |
||
591 | |||
592 | virtual at edi+SKIN_PARAMS.dtp.data |
||
593 | dtp system_colors |
||
594 | end virtual |
||
2068 | mario79 | 595 | ;---------------------------------------------------------------------- |
51 | mikedld | 596 | draw_skin: |
205 | heavyiron | 597 | mcall 13, |
179 | mikedld | 598 | |
1611 | mario79 | 599 | mov ebp,not_packed_area |
51 | mikedld | 600 | mov edi,[ebp+SKIN_HEADER.params] |
601 | add edi,ebp |
||
179 | mikedld | 602 | mpack ebx,wnd1.x,wnd1.width |
603 | mpack ecx,wnd1.y,wnd1.height |
||
604 | mov edx,[dtp.frame] |
||
605 | call draw_framerect |
||
606 | mcall 13, |
||
607 | |||
608 | mov eax,38 |
||
609 | mpack ebx,wnd1.x+1,wnd1.x+wnd1.width-2 |
||
610 | mpack ecx,wnd1.y+1,wnd1.y+1 |
||
611 | mov edx,[dtp.grab] |
||
612 | mov esi,20 |
||
613 | @@: mcall |
||
614 | call dec_edx |
||
615 | add ecx,0x00010001 |
||
616 | dec esi |
||
617 | jnz @b |
||
618 | |||
619 | mov edi,[ebp+SKIN_HEADER.params] |
||
620 | add edi,ebp |
||
621 | mcall 4, |
||
622 | |||
623 | mcall 8, |
||
624 | mcall 4, |
||
625 | |||
626 | ;---------------------------------------------------------------------- |
||
627 | |||
628 | mov edi,[ebp+SKIN_HEADER.params] |
||
629 | add edi,ebp |
||
630 | mpack ebx,wnd2.x,wnd2.width |
||
631 | mpack ecx,wnd2.y,wnd2.height |
||
632 | mov edx,[dtp.frame] |
||
633 | shr edx,1 |
||
634 | and edx,0x007F7F7F |
||
635 | call draw_framerect |
||
636 | mpack ebx,wnd2.x+4,wnd2.width-8 |
||
637 | mpack ecx,wnd2.y+4,wnd2.height-8 |
||
638 | call draw_framerect |
||
639 | mcall 13, |
||
640 | add ecx,(wnd2.height-5)*65536 |
||
641 | mcall |
||
642 | mcall , |
||
643 | add ebx,(wnd2.width-5)*65536 |
||
644 | mcall |
||
645 | mcall , |
||
646 | |||
647 | mov eax,38 |
||
648 | mpack ebx,wnd2.x+4,wnd2.x+wnd2.width-5 |
||
649 | mpack ecx,wnd2.y+4,wnd2.y+4 |
||
650 | mov edx,[dtp.grab] |
||
651 | mov esi,16 |
||
652 | @@: mcall |
||
653 | call dec_edx |
||
654 | add ecx,0x00010001 |
||
655 | dec esi |
||
656 | jnz @b |
||
657 | |||
658 | mov edi,[ebp+SKIN_HEADER.params] |
||
659 | add edi,ebp |
||
660 | mcall 4, |
||
661 | |||
662 | mcall 8, |
||
663 | mcall 4, |
||
664 | |||
665 | ;---------------------------------------------------------------------- |
||
666 | |||
667 | mov edi,[ebp+SKIN_HEADER.params] |
||
668 | add edi,ebp |
||
669 | mpack ebx,wnd3.x,wnd3.width |
||
670 | mpack ecx,wnd3.y,wnd3.height |
||
51 | mikedld | 671 | mov edx,[edi+SKIN_PARAMS.colors_1.outer] |
672 | call draw_framerect |
||
179 | mikedld | 673 | mpack ebx,wnd3.x+4,wnd3.width-8 |
674 | mpack ecx,wnd3.y+4,wnd3.height-8 |
||
51 | mikedld | 675 | mov edx,[edi+SKIN_PARAMS.colors_1.inner] |
676 | call draw_framerect |
||
179 | mikedld | 677 | mcall 13, |
678 | add ecx,(wnd3.height-5)*65536 |
||
51 | mikedld | 679 | mcall |
179 | mikedld | 680 | mcall , |
681 | add ebx,(wnd3.width-5)*65536 |
||
51 | mikedld | 682 | mcall |
179 | mikedld | 683 | mcall , |
51 | mikedld | 684 | |
685 | mov eax,0x00000001 ; left, inactive |
||
686 | call find_bitmap |
||
179 | mikedld | 687 | mcall 7,,, |
51 | mikedld | 688 | |
689 | pushd [ebx-8] |
||
690 | mov eax,0x00000003 ; base, inactive |
||
691 | call find_bitmap |
||
692 | pop edx |
||
179 | mikedld | 693 | mov esi,wnd3.x+wnd3.width-1 |
51 | mikedld | 694 | sub esi,edx |
695 | shl edx,16 |
||
179 | mikedld | 696 | add edx,wnd3.x*65536+wnd3.y |
51 | mikedld | 697 | mcall 7 |
698 | @@: rol edx,16 |
||
699 | add dx,[ebx-8] |
||
700 | cmp dx,si |
||
701 | ja @f |
||
702 | rol edx,16 |
||
703 | mcall 7 |
||
704 | jmp @b |
||
705 | @@: |
||
706 | |||
707 | mov eax,0x00000002 ; oper, inactive |
||
708 | call find_bitmap |
||
709 | mov edx,ecx |
||
710 | shr edx,16 |
||
711 | neg edx |
||
712 | shl edx,16 |
||
179 | mikedld | 713 | add edx,(wnd3.x+wnd3.width)*65536+wnd3.y |
51 | mikedld | 714 | mcall 7 |
715 | |||
1611 | mario79 | 716 | mov ebp,not_packed_area |
51 | mikedld | 717 | mov edi,[ebp+SKIN_HEADER.params] |
718 | add edi,ebp |
||
719 | mov eax,dword[edi+SKIN_PARAMS.margin.left-2] |
||
720 | mov ax,word[edi+SKIN_PARAMS.skin_height] |
||
721 | sub ax,[edi+SKIN_PARAMS.margin.bottom] |
||
722 | shr ax,1 |
||
723 | add ax,[edi+SKIN_PARAMS.margin.top] |
||
724 | add ax,-4 |
||
725 | push eax |
||
179 | mikedld | 726 | lea ebx,[eax+wnd3.x*65536+wnd3.y] |
727 | mcall 4,,dword[dtp.grab_text],caption_text,caption_text.size |
||
51 | mikedld | 728 | |
729 | ;--------------------------------------------------------- |
||
730 | |||
731 | mov edi,[ebp+SKIN_HEADER.params] |
||
732 | add edi,ebp |
||
179 | mikedld | 733 | mpack ebx,wnd4.x,wnd4.width |
734 | mpack ecx,wnd4.y,wnd4.height |
||
51 | mikedld | 735 | mov edx,[edi+SKIN_PARAMS.colors.outer] |
736 | call draw_framerect |
||
179 | mikedld | 737 | mpack ebx,wnd4.x+4,wnd4.width-8 |
738 | mpack ecx,wnd4.y+4,wnd4.height-8 |
||
51 | mikedld | 739 | mov edx,[edi+SKIN_PARAMS.colors.inner] |
740 | call draw_framerect |
||
179 | mikedld | 741 | mcall 13, |
742 | add ecx,(wnd4.height-5)*65536 |
||
51 | mikedld | 743 | mcall |
179 | mikedld | 744 | mcall , |
745 | add ebx,(wnd4.width-5)*65536 |
||
51 | mikedld | 746 | mcall |
179 | mikedld | 747 | mcall , |
51 | mikedld | 748 | |
749 | mov eax,0x00010001 ; left, inactive |
||
750 | call find_bitmap |
||
179 | mikedld | 751 | mcall 7,,, |
51 | mikedld | 752 | |
753 | pushd [ebx-8] |
||
754 | mov eax,0x00010003 ; base, inactive |
||
755 | call find_bitmap |
||
756 | pop edx |
||
179 | mikedld | 757 | mov esi,wnd4.x+wnd4.width-1 |
51 | mikedld | 758 | sub esi,edx |
759 | shl edx,16 |
||
179 | mikedld | 760 | add edx,wnd4.x*65536+wnd4.y |
51 | mikedld | 761 | mcall 7 |
762 | @@: rol edx,16 |
||
763 | add dx,[ebx-8] |
||
764 | cmp dx,si |
||
765 | ja @f |
||
766 | rol edx,16 |
||
767 | mcall 7 |
||
768 | jmp @b |
||
769 | @@: |
||
770 | |||
771 | mov eax,0x00010002 ; oper, inactive |
||
772 | call find_bitmap |
||
773 | mov edx,ecx |
||
774 | shr edx,16 |
||
775 | neg edx |
||
776 | shl edx,16 |
||
179 | mikedld | 777 | add edx,(wnd4.x+wnd4.width)*65536+wnd4.y |
51 | mikedld | 778 | mcall 7 |
779 | |||
1611 | mario79 | 780 | mov ebp,not_packed_area |
51 | mikedld | 781 | mov edi,[ebp+SKIN_HEADER.params] |
782 | add edi,ebp |
||
783 | pop eax |
||
179 | mikedld | 784 | lea ebx,[eax+wnd4.x*65536+wnd4.y] |
785 | mcall 4,,dword[dtp.grab_text],caption_text,caption_text.size |
||
51 | mikedld | 786 | |
787 | ;---------------------------------------------------------------------- |
||
788 | |||
789 | mov edi,[ebp+SKIN_HEADER.buttons] |
||
790 | add edi,ebp |
||
791 | .lp1: cmp dword[edi],0 |
||
792 | je .lp2 |
||
793 | mov ebx,dword[edi+SKIN_BUTTONS.left-2] |
||
794 | mov bx,[edi+SKIN_BUTTONS.width] |
||
795 | mov ecx,dword[edi+SKIN_BUTTONS.top-2] |
||
796 | mov cx,[edi+SKIN_BUTTONS.height] |
||
179 | mikedld | 797 | add ebx,(wnd4.x+wnd4.width)*65536 |
798 | add ecx,wnd4.y*65536 |
||
51 | mikedld | 799 | dec ebx |
800 | dec ecx |
||
801 | mcall 8,,,0x40000000 |
||
802 | add edi,12 |
||
803 | jmp .lp1 |
||
179 | mikedld | 804 | .lp2: |
51 | mikedld | 805 | |
179 | mikedld | 806 | mov edi,[ebp+SKIN_HEADER.params] |
807 | add edi,ebp |
||
808 | mpack ebx,wnd4.x+10,wnd4.y+10 |
||
809 | add bx,word[edi+SKIN_PARAMS.skin_height] |
||
810 | mcall 4,,[dtp.work_text],window_text,window_text.size |
||
811 | |||
812 | mov ecx,[edi+SKIN_PARAMS.skin_height] |
||
813 | shl ecx,16 |
||
814 | add ecx,(wnd4.y+8)*65536+10 |
||
815 | mcall 13, |
||
816 | (wnd4.x+window_text.size*6+20)>,,[dtp.work_graph] |
||
817 | |||
818 | add ecx,25*65536+8 |
||
819 | mcall 8, |
||
820 | button_text.size*6+11>,,0,[dtp.work_button] |
||
821 | |||
822 | shr ecx,16 |
||
823 | mov bx,cx |
||
824 | add ebx,0x00060006 |
||
825 | mcall 4,,[dtp.work_button_text],button_text,button_text.size |
||
826 | |||
827 | ret |
||
1611 | mario79 | 828 | ;--------------------------------------------------------------------- |
829 | draw_PathShow: |
||
830 | pusha |
||
831 | mcall 13,<10,534>,<214,15>,0xffffff |
||
832 | mcall 13,<10,534>,<232,15>,0xffffff |
||
833 | ; draw for PathShow |
||
834 | push dword PathShow_data_1 |
||
835 | call [PathShow_draw] |
||
836 | |||
837 | push dword PathShow_data_2 |
||
838 | call [PathShow_draw] |
||
839 | popa |
||
840 | ret |
||
841 | ;--------------------------------------------------------------------- |
||
31 | halyavin | 842 | ; ********************************************* |
843 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
||
844 | ; ********************************************* |
||
845 | draw_window: |
||
2068 | mario79 | 846 | mcall 12,1 |
847 | mcall 48,3,app_colours,10*4 |
||
848 | mcall 14 |
||
849 | ; DRAW WINDOW |
||
850 | xor eax,eax ; function 0 : define and draw window |
||
851 | xor esi,esi |
||
852 | mov edx,[w_work] ; color of work area RRGGBB,8->color |
||
853 | or edx,0x14000000 |
||
854 | mcall ,<110,555>,<50,275>,,,title |
||
31 | halyavin | 855 | |
2068 | mario79 | 856 | mcall 9,procinfo,-1 |
857 | |||
858 | mov eax,[procinfo+70] ;status of window |
||
859 | test eax,100b |
||
860 | jne .end |
||
861 | |||
31 | halyavin | 862 | if lang eq ru |
51 | mikedld | 863 | load_w = (5*2+6*9) |
864 | save_w = (5*2+6*9) |
||
865 | flat_w = (5*2+6*7) |
||
866 | apply_w = (5*2+6*9) |
||
867 | else |
||
868 | load_w = (5*2+6*6) |
||
1611 | mario79 | 869 | save_w = (5*2+6*8) |
51 | mikedld | 870 | flat_w = (5*2+6*4) |
871 | apply_w = (5*2+6*7) |
||
872 | end if |
||
873 | |||
2068 | mario79 | 874 | ; LOAD BUTTON |
875 | ; mov ebx,15*65536+load_w |
||
876 | ; mov ecx,(35+18*12)*65536+14 |
||
877 | mcall 8,<15,load_w>,<35+18*12,14>,12,[w_work_button] |
||
878 | ; SAVE BUTTON |
||
879 | add ebx,(load_w+2)*65536-load_w+save_w |
||
880 | inc edx |
||
881 | mcall |
||
882 | ; 3D |
||
883 | mov ebx,(340-t1.size*6-13)*65536+(5*2+6*4) |
||
884 | inc edx |
||
885 | mcall |
||
886 | ; FLAT |
||
887 | add ebx,(5*2+6*4+2)*65536-(5*2+6*4)+flat_w |
||
888 | inc edx |
||
889 | mcall |
||
890 | ; APPLY BUTTON |
||
891 | add ebx,(flat_w+6+2)*65536-flat_w+apply_w |
||
892 | inc edx |
||
893 | mcall |
||
894 | ; LOAD SKIN BUTTON |
||
895 | mov ebx,(336+(555-335)/2-t2.size*6/2)*65536+load_w |
||
896 | inc edx |
||
897 | mcall |
||
898 | ; APPLY SKIN BUTTON |
||
899 | add ebx,(load_w+6+2)*65536-load_w+apply_w |
||
900 | inc edx |
||
901 | mcall |
||
902 | |||
903 | mov ebx,(339-t1.size*6-12)*65536+(35+18*12+4) |
||
904 | mcall 4,,[w_work_button_text],t1,t1.size |
||
905 | |||
906 | mov ebx,(336+(555-335)/2-t2.size*6/2)*65536+(35+18*12+4) |
||
907 | mcall ,,,t2,t2.size |
||
908 | |||
909 | mov ebx,(15+(load_w+save_w+2-t3.size*6)/2)*65536+(35+18*12+4) |
||
910 | mcall ,,,t3,t3.size |
||
911 | |||
912 | mov eax,38 ; R G B COLOR GLIDES |
||
913 | mov ebx,266*65536+285 |
||
914 | mov ecx,30*65536+30 |
||
915 | mov edx,0xff0000 |
||
916 | ;----------------------------------- |
||
917 | .newl: |
||
918 | mcall |
||
919 | pusha |
||
920 | add ebx,20*65536+20 |
||
921 | shr edx,8 |
||
922 | mcall |
||
923 | add ebx,20*65536+20 |
||
924 | shr edx,8 |
||
925 | mcall |
||
926 | popa |
||
927 | sub edx,0x020000 |
||
928 | add ecx,0x00010001 |
||
929 | cmp ecx,158*65536+158 |
||
930 | jnz .newl |
||
931 | ;----------------------------------- |
||
932 | call draw_color |
||
933 | |||
934 | mov edx,31 ; BUTTON ROW |
||
935 | mov ebx,15*65536+200 |
||
936 | mov ecx,30*65536+14 |
||
937 | mov esi,[w_work_button] |
||
31 | halyavin | 938 | |
2068 | mario79 | 939 | mov eax,8 |
940 | ;----------------------------------- |
||
941 | .newb: |
||
942 | mcall |
||
943 | add ecx,18*65536 |
||
944 | inc edx |
||
945 | cmp edx,40 |
||
946 | jbe .newb |
||
947 | ;----------------------------------- |
||
948 | mov ebx,15*65536+34 ; ROW OF TEXTS |
||
949 | mov ecx,[w_work_button_text] |
||
950 | mov edx,text |
||
951 | mov esi,32 |
||
31 | halyavin | 952 | |
2068 | mario79 | 953 | mov eax,4 |
954 | ;----------------------------------- |
||
955 | .newline: |
||
956 | mcall |
||
957 | add ebx,18 |
||
958 | add edx,32 |
||
959 | cmp [edx],byte 'x' |
||
960 | jne .newline |
||
961 | ;----------------------------------- |
||
962 | call draw_colours |
||
1611 | mario79 | 963 | call draw_PathShow |
2068 | mario79 | 964 | cmp dword[not_packed_area+SKIN_HEADER.ident],'SKIN' |
965 | jne @f |
||
966 | call draw_skin |
||
967 | @@: |
||
968 | .end: |
||
969 | mcall 12,2 |
||
970 | ret |
||
971 | ;--------------------------------------------------------------------- |
||
31 | halyavin | 972 | ; DATA AREA |
2068 | mario79 | 973 | ;--------------------------------------------------------------------- |
31 | halyavin | 974 | lsz text,\ |
975 | ru, ' €ŒŠ€ ŽŠ€ ',\ |
||
976 | ru, ' Ž‹Ž‘€ ‡€ƒŽ‹Ž‚Š€ ',\ |
||
977 | ru, ' ŠŽŠ€ € Ž‹Ž‘… ‡€ƒŽ‹Ž‚Š€ ',\ |
||
978 | ru, ' ’…Š‘’ € ŠŽŠ… € ‡€ƒŽ‹Ž‚Š… ',\ |
||
979 | ru, ' ’…Š‘’ ‡€ƒŽ‹Ž‚ŽŠ€ ',\ |
||
980 | ru, ' €Ž—€Ÿ Ž‹€‘’œ ',\ |
||
981 | ru, ' ŠŽŠ€ ‚ €Ž—…‰ Ž‹€‘’ˆ ',\ |
||
982 | ru, ' ’…Š‘’ € ŠŽŠ… ',\ |
||
983 | ru, ' ’…Š‘’ ‚ €Ž—…‰ Ž‹€‘’ˆ ',\ |
||
984 | ru, ' ƒ€”ˆŠ€ ‚ €Ž—…‰ Ž‹€‘’ˆ ',\ |
||
985 | ru, 'x',\ |
||
986 | en, ' WINDOW FRAME ',\ |
||
987 | en, ' WINDOW GRAB BAR ',\ |
||
988 | en, ' WINDOW GRAB BUTTON ',\ |
||
989 | en, ' WINDOW GRAB BUTTON TEXT ',\ |
||
990 | en, ' WINDOW GRAB TITLE ',\ |
||
991 | en, ' WINDOW WORK AREA ',\ |
||
992 | en, ' WINDOW WORK AREA BUTTON ',\ |
||
993 | en, ' WINDOW WORK AREA BUTTON TEXT ',\ |
||
994 | en, ' WINDOW WORK AREA TEXT ',\ |
||
995 | en, ' WINDOW WORK AREA GRAPH ',\ |
||
274 | kaitz | 996 | en, 'x',\ |
997 | et, ' AKNA RAAM ',\ |
||
998 | et, ' AKNA HAARAMISE RIBA ',\ |
||
999 | et, ' AKNA HAARAMISE NUPP ',\ |
||
1000 | et, ' AKNA HAARAMISE NUPU TEKST ',\ |
||
1001 | et, ' AKNA HAARAMISE PEALKIRI ',\ |
||
1002 | et, ' AKNA TÖÖPIIRKOND ',\ |
||
1003 | et, ' AKNA TÖÖPIIRKONNA NUPP ',\ |
||
1004 | et, ' AKNA TÖÖPIIRKONNA NUPPU TEKST ',\ |
||
1005 | et, ' AKNA TÖÖPIIRKONNA TEKST ',\ |
||
1006 | et, ' AKNA TÖÖPIIRKONNA GRAAFIKA ',\ |
||
1007 | et, 'x' |
||
31 | halyavin | 1008 | |
51 | mikedld | 1009 | lsz t1,\ |
1010 | ru, ' 3D ‹Ž‘Šˆ… ˆŒ…ˆ’œ ',\ |
||
274 | kaitz | 1011 | en, ' 3D FLAT APPLY ',\ |
1012 | et, ' 3D LAME KINNITA ' |
||
51 | mikedld | 1013 | |
31 | halyavin | 1014 | lsz t2,\ |
51 | mikedld | 1015 | ru, ' ‡€ƒ“‡ˆ’œ ˆŒ…ˆ’œ ',\ |
1016 | en, ' LOAD APPLY ',\ |
||
274 | kaitz | 1017 | et, ' LAADI KINNITA ' |
31 | halyavin | 1018 | |
1611 | mario79 | 1019 | lsz t3,\ |
1020 | ru, ' ‡€ƒ“‡ˆ’œ ‘Ž•€ˆ’œ ',\ |
||
1021 | en, ' LOAD SAVE ',\ |
||
1022 | et, ' LAADI SALVESTA',\ |
||
1023 | |||
179 | mikedld | 1024 | lsz caption_text,\ |
51 | mikedld | 1025 | ru, '‡ £®«®¢®ª',\ |
274 | kaitz | 1026 | en, 'Caption',\ |
1027 | et, 'Pealkiri' |
||
31 | halyavin | 1028 | |
179 | mikedld | 1029 | sz close_text,'x' |
1030 | |||
1031 | lsz window_text,\ |
||
1032 | ru, '’¥ªáâ ¢ ®ª¥',\ |
||
274 | kaitz | 1033 | en, 'Window text',\ |
1034 | et, 'Akna tekst' |
||
179 | mikedld | 1035 | |
1036 | lsz button_text,\ |
||
1037 | ru, '’¥ªáâ ª®¯ª¥',\ |
||
274 | kaitz | 1038 | en, 'Button text',\ |
1039 | et, 'Nupu tekst' |
||
179 | mikedld | 1040 | |
1611 | mario79 | 1041 | ;sz default_skn, '/sys/DEFAULT.SKN',0 |
31 | halyavin | 1042 | |
180 | heavyiron | 1043 | if lang eq ru |
485 | heavyiron | 1044 | title db '€‘’Ž‰Š€ ŽŠŽ',0 |
274 | kaitz | 1045 | else if lang eq et |
485 | heavyiron | 1046 | title db 'AKNA SEADED - VALI VÄRV JA VAJUTA OBJEKTILE',0 |
180 | heavyiron | 1047 | else |
485 | heavyiron | 1048 | title db 'WINDOWS SETTINGS - DEFINE COLOR AND CLICK ON TARGET',0 |
180 | heavyiron | 1049 | end if |
1050 | |||
1051 | |||
31 | halyavin | 1052 | color dd 0 |
1053 | |||
1611 | mario79 | 1054 | ;--------------------------------------------------------------------- |
1055 | l_libs_start: |
||
1056 | |||
1057 | library01 l_libs system_dir_Boxlib+9, cur_dir_path, library_path, system_dir_Boxlib, \ |
||
1058 | err_message_found_lib1, head_f_l, Box_lib_import, err_message_import1, head_f_i |
||
1059 | |||
1060 | library02 l_libs system_dir_ProcLib+9, cur_dir_path, library_path, system_dir_ProcLib, \ |
||
1061 | err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i |
||
1062 | |||
1063 | end_l_libs: |
||
1064 | ;--------------------------------------------------------------------- |
||
1065 | system_dir_Boxlib db '/sys/lib/box_lib.obj',0 |
||
1066 | system_dir_ProcLib db '/sys/lib/proc_lib.obj',0 |
||
1067 | |||
1068 | head_f_i: |
||
1069 | head_f_l db 'System error',0 |
||
1070 | |||
1071 | err_message_found_lib1 db 'box_lib.obj - Not found!',0 |
||
1072 | err_message_found_lib2 db 'proc_lib.obj - Not found!',0 |
||
1073 | |||
1074 | err_message_import1 db 'box_lib.obj - Wrong import!',0 |
||
1075 | err_message_import2 db 'proc_lib.obj - Wrong import!',0 |
||
1076 | |||
1077 | ;--------------------------------------------------------------------- |
||
1078 | align 4 |
||
1079 | ProcLib_import: |
||
1080 | OpenDialog_Init dd aOpenDialog_Init |
||
1081 | OpenDialog_Start dd aOpenDialog_Start |
||
1082 | ;OpenDialog__Version dd aOpenDialog_Version |
||
1083 | dd 0 |
||
1084 | dd 0 |
||
1085 | aOpenDialog_Init db 'OpenDialog_init',0 |
||
1086 | aOpenDialog_Start db 'OpenDialog_start',0 |
||
1087 | ;aOpenDialog_Version db 'Version_OpenDialog',0 |
||
1088 | ;--------------------------------------------------------------------- |
||
1089 | align 4 |
||
1090 | Box_lib_import: |
||
1091 | ;init_lib dd a_init |
||
1092 | ;version_lib dd a_version |
||
1093 | |||
1094 | |||
1095 | ;edit_box_draw dd aEdit_box_draw |
||
1096 | ;edit_box_key dd aEdit_box_key |
||
1097 | ;edit_box_mouse dd aEdit_box_mouse |
||
1098 | ;version_ed dd aVersion_ed |
||
1099 | |||
1100 | ;check_box_draw dd aCheck_box_draw |
||
1101 | ;check_box_mouse dd aCheck_box_mouse |
||
1102 | ;version_ch dd aVersion_ch |
||
1103 | |||
1104 | ;option_box_draw dd aOption_box_draw |
||
1105 | ;option_box_mouse dd aOption_box_mouse |
||
1106 | ;version_op dd aVersion_op |
||
1107 | |||
1108 | ;scrollbar_ver_draw dd aScrollbar_ver_draw |
||
1109 | ;scrollbar_ver_mouse dd aScrollbar_ver_mouse |
||
1110 | ;scrollbar_hor_draw dd aScrollbar_hor_draw |
||
1111 | ;scrollbar_hor_mouse dd aScrollbar_hor_mouse |
||
1112 | ;version_scrollbar dd aVersion_scrollbar |
||
1113 | |||
1114 | ;dinamic_button_draw dd aDbutton_draw |
||
1115 | ;dinamic_button_mouse dd aDbutton_mouse |
||
1116 | ;version_dbutton dd aVersion_dbutton |
||
1117 | |||
1118 | ;menu_bar_draw dd aMenu_bar_draw |
||
1119 | ;menu_bar_mouse dd aMenu_bar_mouse |
||
1120 | ;menu_bar_activate dd aMenu_bar_activate |
||
1121 | ;version_menu_bar dd aVersion_menu_bar |
||
1122 | |||
1123 | ;FileBrowser_draw dd aFileBrowser_draw |
||
1124 | ;FileBrowser_mouse dd aFileBrowser_mouse |
||
1125 | ;FileBrowser_key dd aFileBrowser_key |
||
1126 | ;Version_FileBrowser dd aVersion_FileBrowser |
||
1127 | |||
1128 | PathShow_prepare dd sz_PathShow_prepare |
||
1129 | PathShow_draw dd sz_PathShow_draw |
||
1130 | ;Version_path_show dd szVersion_path_show |
||
1131 | dd 0 |
||
1132 | dd 0 |
||
1133 | |||
1134 | ;a_init db 'lib_init',0 |
||
1135 | ;a_version db 'version',0 |
||
1136 | |||
1137 | ;aEdit_box_draw db 'edit_box',0 |
||
1138 | ;aEdit_box_key db 'edit_box_key',0 |
||
1139 | ;aEdit_box_mouse db 'edit_box_mouse',0 |
||
1140 | ;aVersion_ed db 'version_ed',0 |
||
1141 | |||
1142 | ;aCheck_box_draw db 'check_box_draw',0 |
||
1143 | ;aCheck_box_mouse db 'check_box_mouse',0 |
||
1144 | ;aVersion_ch db 'version_ch',0 |
||
1145 | |||
1146 | ;aOption_box_draw db 'option_box_draw',0 |
||
1147 | ;aOption_box_mouse db 'option_box_mouse',0 |
||
1148 | ;aVersion_op db 'version_op',0 |
||
1149 | |||
1150 | ;aScrollbar_ver_draw db 'scrollbar_v_draw',0 |
||
1151 | ;aScrollbar_ver_mouse db 'scrollbar_v_mouse',0 |
||
1152 | ;aScrollbar_hor_draw db 'scrollbar_h_draw',0 |
||
1153 | ;aScrollbar_hor_mouse db 'scrollbar_h_mouse',0 |
||
1154 | ;aVersion_scrollbar db 'version_scrollbar',0 |
||
1155 | |||
1156 | ;aDbutton_draw db 'dbutton_draw',0 |
||
1157 | ;aDbutton_mouse db 'dbutton_mouse',0 |
||
1158 | ;aVersion_dbutton db 'version_dbutton',0 |
||
1159 | |||
1160 | ;aMenu_bar_draw db 'menu_bar_draw',0 |
||
1161 | ;aMenu_bar_mouse db 'menu_bar_mouse',0 |
||
1162 | ;aMenu_bar_activate db 'menu_bar_activate',0 |
||
1163 | ;aVersion_menu_bar db 'version_menu_bar',0 |
||
1164 | |||
1165 | ;aFileBrowser_draw db 'FileBrowser_draw',0 |
||
1166 | ;aFileBrowser_mouse db 'FileBrowser_mouse',0 |
||
1167 | ;aFileBrowser_key db 'FileBrowser_key',0 |
||
1168 | ;aVersion_FileBrowser db 'version_FileBrowser',0 |
||
1169 | |||
1170 | sz_PathShow_prepare db 'PathShow_prepare',0 |
||
1171 | sz_PathShow_draw db 'PathShow_draw',0 |
||
1172 | ;szVersion_path_show db 'version_PathShow',0 |
||
1173 | ;--------------------------------------------------------------------- |
||
1174 | PathShow_data_1: |
||
1175 | .type dd 0 ;+0 |
||
1176 | .start_y dw 217 ;+4 |
||
1177 | .start_x dw 12 ;+6 |
||
1178 | .font_size_x dw 6 ;+8 ; 6 - for font 0, 8 - for font 1 |
||
1179 | .area_size_x dw 530 ;+10 |
||
1180 | .font_number dd 0 ;+12 ; 0 - monospace, 1 - variable |
||
1181 | .background_flag dd 0 ;+16 |
||
1182 | .font_color dd 0x0 ;+20 |
||
1183 | .background_color dd 0x0 ;+24 |
||
1184 | .text_pointer dd fname ;+28 |
||
1185 | .work_area_pointer dd text_work_area ;+32 |
||
1186 | .temp_text_length dd 0 ;+36 |
||
1187 | ;--------------------------------------------------------------------- |
||
1188 | PathShow_data_2: |
||
1189 | .type dd 0 ;+0 |
||
1190 | .start_y dw 235 ;+4 |
||
1191 | .start_x dw 12 ;+6 |
||
1192 | .font_size_x dw 6 ;+8 ; 6 - for font 0, 8 - for font 1 |
||
1193 | .area_size_x dw 530 ;+10 |
||
1194 | .font_number dd 0 ;+12 ; 0 - monospace, 1 - variable |
||
1195 | .background_flag dd 0 ;+16 |
||
1196 | .font_color dd 0x0 ;+20 |
||
1197 | .background_color dd 0x0 ;+24 |
||
1198 | .text_pointer dd skin_info ;+28 |
||
1199 | .work_area_pointer dd text_work_area2 ;+32 |
||
1200 | .temp_text_length dd 0 ;+36 |
||
1201 | ;--------------------------------------------------------------------- |
||
1202 | OpenDialog_data: |
||
1203 | .type dd 0 |
||
1204 | .procinfo dd procinfo ;+4 |
||
1205 | .com_area_name dd communication_area_name ;+8 |
||
1206 | .com_area dd 0 ;+12 |
||
1207 | .opendir_pach dd temp_dir_pach ;+16 |
||
1208 | .dir_default_pach dd communication_area_default_pach ;+20 |
||
1209 | .start_path dd open_dialog_path ;+24 |
||
1210 | .draw_window dd draw_window ;+28 |
||
1211 | .status dd 0 ;+32 |
||
1212 | .openfile_pach dd fname ;+36 |
||
1213 | .filename_area dd filename_area ;+40 |
||
1214 | .filter_area dd Filter |
||
1215 | .x: |
||
1216 | .x_size dw 420 ;+48 ; Window X size |
||
1217 | .x_start dw 10 ;+50 ; Window X position |
||
1218 | .y: |
||
1219 | .y_size dw 320 ;+52 ; Window y size |
||
1220 | .y_start dw 10 ;+54 ; Window Y position |
||
1221 | |||
1222 | OpenDialog_data2: |
||
1223 | .type dd 0 |
||
1224 | .procinfo dd procinfo ;+4 |
||
1225 | .com_area_name dd communication_area_name2 ;+8 |
||
1226 | .com_area dd 0 ;+12 |
||
1227 | .opendir_pach dd temp_dir_pach2 ;+16 |
||
1228 | .dir_default_pach dd communication_area_default_pach ;+20 |
||
1229 | .start_path dd open_dialog_path ;+24 |
||
1230 | .draw_window dd draw_window ;+28 |
||
1231 | .status dd 0 ;+32 |
||
1232 | .openfile_pach dd skin_info ;+36 |
||
1233 | .filename_area dd filename_area2 ;+40 |
||
1234 | .filter_area dd Filter2 |
||
1235 | .x: |
||
1236 | .x_size dw 420 ;+48 ; Window X size |
||
1237 | .x_start dw 10 ;+50 ; Window X position |
||
1238 | .y: |
||
1239 | .y_size dw 320 ;+52 ; Window y size |
||
1240 | .y_start dw 10 ;+54 ; Window Y position |
||
1241 | |||
1242 | communication_area_name2: |
||
1243 | db 'FFFFFFFF_open_dialog',0 |
||
1244 | |||
1245 | communication_area_name: |
||
1246 | db 'FFFFFFFF_open_dialog2',0 |
||
1247 | open_dialog_path: |
||
1702 | Lrz | 1248 | if __nightbuild eq yes |
1249 | db '/sys/MANAGERS/opendial',0 |
||
1250 | else |
||
1251 | db '/sys/File Managers/opendial',0 |
||
1252 | end if |
||
1611 | mario79 | 1253 | communication_area_default_pach: |
1254 | db '/sys',0 |
||
1255 | |||
1256 | Filter: |
||
1257 | dd Filter.end - Filter |
||
1258 | .1: |
||
1259 | db 'DTP',0 |
||
1260 | .end: |
||
1261 | db 0 |
||
1262 | |||
1263 | Filter2: |
||
1264 | dd Filter.end - Filter |
||
1265 | .1: |
||
1266 | db 'SKN',0 |
||
1267 | .end: |
||
1268 | db 0 |
||
1269 | |||
1270 | start_temp_file_name: db 'default.dtp',0 |
||
1271 | |||
1272 | default_skin: |
||
1273 | db '/sys/default.skn',0 |
||
1274 | default_dtp: |
||
1275 | db '/sys/default.dtp',0 |
||
1276 | ;--------------------------------------------------------------------- |
||
484 | diamond | 1277 | IncludeIGlobals |
1278 | |||
31 | halyavin | 1279 | I_END: |
1280 | |||
484 | diamond | 1281 | IncludeUGlobals |
1282 | |||
31 | halyavin | 1283 | read_info: |
1284 | .mode dd ? ; read |
||
1285 | .start_block dd ? ; first block |
||
1286 | .blocks dd ? ; 512 bytes |
||
1287 | .address dd ? |
||
1288 | .workarea dd ? |
||
1611 | mario79 | 1289 | fname rb 4096 ; filename |
31 | halyavin | 1290 | |
1291 | virtual at read_info |
||
1292 | write_info: |
||
1293 | .mode dd ? |
||
1294 | rd 1 |
||
1295 | .bytes2write dd ? |
||
1296 | .address dd ? |
||
1297 | .workarea dd ? |
||
1298 | end virtual |
||
1299 | |||
1611 | mario79 | 1300 | read_info2: |
1301 | .mode dd ? ; read |
||
1302 | .start_block dd ? ; first block |
||
1303 | .blocks dd ? ; 512 bytes |
||
1304 | .address dd ? |
||
1305 | .workarea dd ? |
||
1306 | skin_info rb 4096 |
||
51 | mikedld | 1307 | |
1611 | mario79 | 1308 | ;param rb 257 |
528 | diamond | 1309 | |
1310 | align 4 |
||
31 | halyavin | 1311 | app_colours: |
1312 | |||
1313 | w_frame dd ? |
||
1314 | w_grab dd ? |
||
1315 | w_grab_button dd ? |
||
1316 | w_grab_button_text dd ? |
||
1317 | w_grab_text dd ? |
||
1318 | w_work dd ? |
||
1319 | w_work_button dd ? |
||
1320 | w_work_button_text dd ? |
||
1321 | w_work_text dd ? |
||
1322 | w_work_graph dd ? |
||
1323 | |||
1324 | color_table: |
||
1325 | times 10 dd ? |
||
1611 | mario79 | 1326 | ;--------------------------------------------------------------------- |
1327 | align 4 |
||
1328 | cur_dir_path: |
||
1329 | rb 4096 |
||
1330 | ;--------------------------------------------------------------------- |
||
1331 | library_path: |
||
1332 | rb 4096 |
||
1333 | ;--------------------------------------------------------------------- |
||
1334 | ;fname_buf: |
||
1335 | ; rb 4096 |
||
1336 | ;--------------------------------------------------------------------- |
||
1337 | temp_dir_pach: |
||
1338 | rb 4096 |
||
1339 | ;--------------------------------------------------------------------- |
||
1340 | temp_dir_pach2: |
||
1341 | rb 4096 |
||
1342 | ;--------------------------------------------------------------------- |
||
1343 | text_work_area: |
||
1344 | rb 1024 |
||
1345 | ;--------------------------------------------------------------------- |
||
1346 | text_work_area2: |
||
1347 | rb 1024 |
||
1348 | ;--------------------------------------------------------------------- |
||
1349 | procinfo: |
||
1350 | rb 1024 |
||
1351 | ;--------------------------------------------------------------------- |
||
1352 | filename_area: |
||
1353 | rb 256 |
||
1354 | ;--------------------------------------------------------------------- |
||
1355 | filename_area2: |
||
1356 | rb 256 |
||
1357 | ;--------------------------------------------------------------------- |
||
1358 | rb 4096 |
||
1359 | stacktop: |
||
1360 | ;--------------------------------------------------------------------- |
||
1361 | file_load_area: ; old 0x10000 |
||
1362 | rb 32*1024 |
||
1363 | ;--------------------------------------------------------------------- |
||
1364 | not_packed_area: ; old 0x18000 |
||
1365 | rb 32*1024 |
||
1366 | ;--------------------------------------------------------------------- |
||
1367 | unpack_area: ; old 0x20000 |
||
1368 | rb 32*1024 |
||
1369 | ;--------------------------------------------------------------------- |
||
1370 | i_end:35+18*12,14>15,load_w>50,275>110,555>232,15>10,534>214,15>10,534> |