Rev 1611 | Go to most recent revision | Details | Compare with Previous | 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 | ;--------------------------------------------------------------------- |
463 | ;read_string: |
||
464 | ; |
||
465 | ; pusha |
||
466 | ; |
||
467 | ; mov edi,fname |
||
468 | ; mov al,'_' |
||
469 | ; mov ecx,87 |
||
470 | ; cld |
||
471 | ; rep stosb |
||
472 | ; |
||
473 | ; call print_text |
||
474 | ; |
||
475 | ; mov edi,fname |
||
476 | ; |
||
477 | ; f11: |
||
478 | ; mov eax,10 |
||
479 | ; mcall |
||
480 | ; cmp eax,2 |
||
481 | ; jne read_done |
||
482 | ;; mov eax,2 |
||
483 | ; mcall |
||
484 | ; shr eax,8 |
||
485 | ; cmp eax,13 |
||
486 | ; je read_done |
||
487 | ; cmp eax,8 |
||
488 | ; jne nobsl |
||
489 | ; cmp edi,fname |
||
490 | ; je f11 |
||
491 | ; dec edi |
||
492 | ; mov [edi],byte '_' |
||
493 | ; call print_text |
||
494 | ; jmp f11 |
||
495 | ; nobsl: |
||
496 | ; mov [edi],al |
||
497 | ; |
||
498 | ; call print_text |
||
499 | ; |
||
500 | ; inc edi |
||
501 | ; cmp edi, fname+87 |
||
502 | ; jne f11 |
||
503 | ; |
||
504 | ; read_done: |
||
505 | ; |
||
506 | ; mov ecx, fname+88 |
||
507 | ; sub ecx, edi |
||
508 | ; mov eax, 0 |
||
509 | ; cld |
||
510 | ; rep stosb |
||
511 | ; |
||
512 | ; call print_text |
||
513 | ; |
||
514 | ; popa |
||
515 | ; |
||
516 | ; ret |
||
31 | halyavin | 517 | |
518 | |||
1611 | mario79 | 519 | ;print_text: |
520 | ; pushad |
||
521 | ; |
||
522 | ; mpack ebx,15,6*87+4 |
||
523 | ; mpack ecx,(30+18*10+2),11 |
||
524 | ; mcall 13,,,[w_work] |
||
525 | ; |
||
526 | ; mpack ebx,17,(30+18*10+4) |
||
527 | ; mcall 4,,[w_work_text],fname,87 |
||
528 | ; |
||
529 | ; popad |
||
530 | ;ret |
||
31 | halyavin | 531 | |
532 | |||
533 | draw_color: |
||
534 | |||
535 | pusha |
||
536 | |||
537 | mov eax,13 |
||
51 | mikedld | 538 | mov ebx,266*65536+60 |
31 | halyavin | 539 | mov ecx,170*65536+30 |
540 | mov edx,[color] |
||
485 | heavyiron | 541 | mcall |
31 | halyavin | 542 | |
543 | ; mov eax,13 |
||
51 | mikedld | 544 | mov ebx,266*65536+60 |
31 | halyavin | 545 | mov ecx,200*65536+10 |
546 | mov edx,[w_work] |
||
485 | heavyiron | 547 | mcall |
31 | halyavin | 548 | |
549 | mov eax,47 |
||
550 | mov ebx,0+1*256+8*65536 |
||
551 | mov ecx,[color] |
||
51 | mikedld | 552 | mov edx,272*65536+201 |
31 | halyavin | 553 | mov esi,[w_work_text] |
485 | heavyiron | 554 | mcall |
31 | halyavin | 555 | |
556 | popa |
||
557 | |||
558 | ret |
||
559 | |||
560 | |||
561 | draw_colours: |
||
562 | |||
563 | pusha |
||
564 | |||
565 | mov esi,color_table |
||
566 | |||
567 | mov ebx,225*65536+32 |
||
51 | mikedld | 568 | mov ecx,32*65536+12 |
31 | halyavin | 569 | newcol: |
570 | mov eax,13 |
||
571 | mov edx,[esi] |
||
485 | heavyiron | 572 | mcall |
51 | mikedld | 573 | add ecx,18*65536 |
31 | halyavin | 574 | add esi,4 |
575 | cmp esi,color_table+4*9 |
||
576 | jbe newcol |
||
577 | |||
578 | popa |
||
579 | |||
580 | ret |
||
581 | |||
582 | |||
51 | mikedld | 583 | draw_framerect: ; ebx,ecx |
584 | push ebx ecx |
||
585 | add bx,[esp+6] |
||
586 | mov cx,[esp+2] |
||
587 | dec ebx |
||
588 | mcall 38 |
||
589 | add cx,[esp] |
||
590 | rol ecx,16 |
||
591 | add cx,[esp] |
||
592 | sub ecx,0x00010001 |
||
593 | mcall |
||
594 | mov ebx,[esp+4] |
||
595 | mov ecx,[esp] |
||
596 | mov bx,[esp+6] |
||
597 | add cx,[esp+2] |
||
598 | dec ecx |
||
599 | mcall |
||
600 | add bx,[esp+4] |
||
601 | rol ebx,16 |
||
602 | add bx,[esp+4] |
||
603 | sub ebx,0x00010001 |
||
604 | mcall |
||
605 | add esp,8 |
||
606 | ret |
||
31 | halyavin | 607 | |
51 | mikedld | 608 | find_bitmap: |
609 | mov edi,[ebp+SKIN_HEADER.bitmaps] |
||
610 | add edi,ebp |
||
611 | xor ebx,ebx |
||
612 | .lp1: cmp dword[edi],0 |
||
613 | je .lp2 |
||
614 | cmp dword[edi+0],eax |
||
615 | jne @f |
||
485 | heavyiron | 616 | mov ebx,[edi+SKIN_BITMAPS._data] |
51 | mikedld | 617 | add ebx,ebp |
618 | mov ecx,[ebx-2] |
||
619 | mov cx,[ebx+4] |
||
620 | add ebx,8 |
||
621 | .lp2: ret |
||
622 | @@: add edi,8 |
||
623 | jmp .lp1 |
||
624 | |||
179 | mikedld | 625 | dec_edx: |
626 | sub dl,4 |
||
627 | jnc @f |
||
628 | xor dl,dl |
||
629 | @@: sub dh,4 |
||
630 | jnc @f |
||
631 | xor dh,dh |
||
632 | @@: rol edx,16 |
||
633 | sub dl,4 |
||
634 | jnc @f |
||
635 | xor dl,dl |
||
636 | @@: rol edx,16 |
||
637 | ret |
||
638 | |||
639 | area: |
||
640 | .x = 345 |
||
641 | .y = 20 |
||
642 | .width = 206 |
||
643 | .height = 191 |
||
644 | |||
645 | wnd1: |
||
646 | .x = area.x+49 |
||
647 | .y = area.y+5 |
||
648 | .width = 150 |
||
649 | .height = 90 |
||
650 | wnd2: |
||
651 | .x = area.x+35 |
||
652 | .y = area.y+35 |
||
653 | .width = 150 |
||
654 | .height = 90 |
||
655 | wnd3: |
||
656 | .x = area.x+21 |
||
657 | .y = area.y+65 |
||
658 | .width = 150 |
||
659 | .height = 90 |
||
660 | wnd4: |
||
661 | .x = area.x+7 |
||
662 | .y = area.y+95 |
||
663 | .width = 150 |
||
664 | .height = 90 |
||
665 | |||
666 | virtual at edi+SKIN_PARAMS.dtp.data |
||
667 | dtp system_colors |
||
668 | end virtual |
||
669 | |||
51 | mikedld | 670 | draw_skin: |
205 | heavyiron | 671 | mcall 13, |
179 | mikedld | 672 | |
1611 | mario79 | 673 | mov ebp,not_packed_area |
51 | mikedld | 674 | mov edi,[ebp+SKIN_HEADER.params] |
675 | add edi,ebp |
||
179 | mikedld | 676 | mpack ebx,wnd1.x,wnd1.width |
677 | mpack ecx,wnd1.y,wnd1.height |
||
678 | mov edx,[dtp.frame] |
||
679 | call draw_framerect |
||
680 | mcall 13, |
||
681 | |||
682 | mov eax,38 |
||
683 | mpack ebx,wnd1.x+1,wnd1.x+wnd1.width-2 |
||
684 | mpack ecx,wnd1.y+1,wnd1.y+1 |
||
685 | mov edx,[dtp.grab] |
||
686 | mov esi,20 |
||
687 | @@: mcall |
||
688 | call dec_edx |
||
689 | add ecx,0x00010001 |
||
690 | dec esi |
||
691 | jnz @b |
||
692 | |||
693 | mov edi,[ebp+SKIN_HEADER.params] |
||
694 | add edi,ebp |
||
695 | mcall 4, |
||
696 | |||
697 | mcall 8, |
||
698 | mcall 4, |
||
699 | |||
700 | ;---------------------------------------------------------------------- |
||
701 | |||
702 | mov edi,[ebp+SKIN_HEADER.params] |
||
703 | add edi,ebp |
||
704 | mpack ebx,wnd2.x,wnd2.width |
||
705 | mpack ecx,wnd2.y,wnd2.height |
||
706 | mov edx,[dtp.frame] |
||
707 | shr edx,1 |
||
708 | and edx,0x007F7F7F |
||
709 | call draw_framerect |
||
710 | mpack ebx,wnd2.x+4,wnd2.width-8 |
||
711 | mpack ecx,wnd2.y+4,wnd2.height-8 |
||
712 | call draw_framerect |
||
713 | mcall 13, |
||
714 | add ecx,(wnd2.height-5)*65536 |
||
715 | mcall |
||
716 | mcall , |
||
717 | add ebx,(wnd2.width-5)*65536 |
||
718 | mcall |
||
719 | mcall , |
||
720 | |||
721 | mov eax,38 |
||
722 | mpack ebx,wnd2.x+4,wnd2.x+wnd2.width-5 |
||
723 | mpack ecx,wnd2.y+4,wnd2.y+4 |
||
724 | mov edx,[dtp.grab] |
||
725 | mov esi,16 |
||
726 | @@: mcall |
||
727 | call dec_edx |
||
728 | add ecx,0x00010001 |
||
729 | dec esi |
||
730 | jnz @b |
||
731 | |||
732 | mov edi,[ebp+SKIN_HEADER.params] |
||
733 | add edi,ebp |
||
734 | mcall 4, |
||
735 | |||
736 | mcall 8, |
||
737 | mcall 4, |
||
738 | |||
739 | ;---------------------------------------------------------------------- |
||
740 | |||
741 | mov edi,[ebp+SKIN_HEADER.params] |
||
742 | add edi,ebp |
||
743 | mpack ebx,wnd3.x,wnd3.width |
||
744 | mpack ecx,wnd3.y,wnd3.height |
||
51 | mikedld | 745 | mov edx,[edi+SKIN_PARAMS.colors_1.outer] |
746 | call draw_framerect |
||
179 | mikedld | 747 | mpack ebx,wnd3.x+4,wnd3.width-8 |
748 | mpack ecx,wnd3.y+4,wnd3.height-8 |
||
51 | mikedld | 749 | mov edx,[edi+SKIN_PARAMS.colors_1.inner] |
750 | call draw_framerect |
||
179 | mikedld | 751 | mcall 13, |
752 | add ecx,(wnd3.height-5)*65536 |
||
51 | mikedld | 753 | mcall |
179 | mikedld | 754 | mcall , |
755 | add ebx,(wnd3.width-5)*65536 |
||
51 | mikedld | 756 | mcall |
179 | mikedld | 757 | mcall , |
51 | mikedld | 758 | |
759 | mov eax,0x00000001 ; left, inactive |
||
760 | call find_bitmap |
||
179 | mikedld | 761 | mcall 7,,, |
51 | mikedld | 762 | |
763 | pushd [ebx-8] |
||
764 | mov eax,0x00000003 ; base, inactive |
||
765 | call find_bitmap |
||
766 | pop edx |
||
179 | mikedld | 767 | mov esi,wnd3.x+wnd3.width-1 |
51 | mikedld | 768 | sub esi,edx |
769 | shl edx,16 |
||
179 | mikedld | 770 | add edx,wnd3.x*65536+wnd3.y |
51 | mikedld | 771 | mcall 7 |
772 | @@: rol edx,16 |
||
773 | add dx,[ebx-8] |
||
774 | cmp dx,si |
||
775 | ja @f |
||
776 | rol edx,16 |
||
777 | mcall 7 |
||
778 | jmp @b |
||
779 | @@: |
||
780 | |||
781 | mov eax,0x00000002 ; oper, inactive |
||
782 | call find_bitmap |
||
783 | mov edx,ecx |
||
784 | shr edx,16 |
||
785 | neg edx |
||
786 | shl edx,16 |
||
179 | mikedld | 787 | add edx,(wnd3.x+wnd3.width)*65536+wnd3.y |
51 | mikedld | 788 | mcall 7 |
789 | |||
1611 | mario79 | 790 | mov ebp,not_packed_area |
51 | mikedld | 791 | mov edi,[ebp+SKIN_HEADER.params] |
792 | add edi,ebp |
||
793 | mov eax,dword[edi+SKIN_PARAMS.margin.left-2] |
||
794 | mov ax,word[edi+SKIN_PARAMS.skin_height] |
||
795 | sub ax,[edi+SKIN_PARAMS.margin.bottom] |
||
796 | shr ax,1 |
||
797 | add ax,[edi+SKIN_PARAMS.margin.top] |
||
798 | add ax,-4 |
||
799 | push eax |
||
179 | mikedld | 800 | lea ebx,[eax+wnd3.x*65536+wnd3.y] |
801 | mcall 4,,dword[dtp.grab_text],caption_text,caption_text.size |
||
51 | mikedld | 802 | |
803 | ;--------------------------------------------------------- |
||
804 | |||
805 | mov edi,[ebp+SKIN_HEADER.params] |
||
806 | add edi,ebp |
||
179 | mikedld | 807 | mpack ebx,wnd4.x,wnd4.width |
808 | mpack ecx,wnd4.y,wnd4.height |
||
51 | mikedld | 809 | mov edx,[edi+SKIN_PARAMS.colors.outer] |
810 | call draw_framerect |
||
179 | mikedld | 811 | mpack ebx,wnd4.x+4,wnd4.width-8 |
812 | mpack ecx,wnd4.y+4,wnd4.height-8 |
||
51 | mikedld | 813 | mov edx,[edi+SKIN_PARAMS.colors.inner] |
814 | call draw_framerect |
||
179 | mikedld | 815 | mcall 13, |
816 | add ecx,(wnd4.height-5)*65536 |
||
51 | mikedld | 817 | mcall |
179 | mikedld | 818 | mcall , |
819 | add ebx,(wnd4.width-5)*65536 |
||
51 | mikedld | 820 | mcall |
179 | mikedld | 821 | mcall , |
51 | mikedld | 822 | |
823 | mov eax,0x00010001 ; left, inactive |
||
824 | call find_bitmap |
||
179 | mikedld | 825 | mcall 7,,, |
51 | mikedld | 826 | |
827 | pushd [ebx-8] |
||
828 | mov eax,0x00010003 ; base, inactive |
||
829 | call find_bitmap |
||
830 | pop edx |
||
179 | mikedld | 831 | mov esi,wnd4.x+wnd4.width-1 |
51 | mikedld | 832 | sub esi,edx |
833 | shl edx,16 |
||
179 | mikedld | 834 | add edx,wnd4.x*65536+wnd4.y |
51 | mikedld | 835 | mcall 7 |
836 | @@: rol edx,16 |
||
837 | add dx,[ebx-8] |
||
838 | cmp dx,si |
||
839 | ja @f |
||
840 | rol edx,16 |
||
841 | mcall 7 |
||
842 | jmp @b |
||
843 | @@: |
||
844 | |||
845 | mov eax,0x00010002 ; oper, inactive |
||
846 | call find_bitmap |
||
847 | mov edx,ecx |
||
848 | shr edx,16 |
||
849 | neg edx |
||
850 | shl edx,16 |
||
179 | mikedld | 851 | add edx,(wnd4.x+wnd4.width)*65536+wnd4.y |
51 | mikedld | 852 | mcall 7 |
853 | |||
1611 | mario79 | 854 | mov ebp,not_packed_area |
51 | mikedld | 855 | mov edi,[ebp+SKIN_HEADER.params] |
856 | add edi,ebp |
||
857 | pop eax |
||
179 | mikedld | 858 | lea ebx,[eax+wnd4.x*65536+wnd4.y] |
859 | mcall 4,,dword[dtp.grab_text],caption_text,caption_text.size |
||
51 | mikedld | 860 | |
861 | ;---------------------------------------------------------------------- |
||
862 | |||
863 | mov edi,[ebp+SKIN_HEADER.buttons] |
||
864 | add edi,ebp |
||
865 | .lp1: cmp dword[edi],0 |
||
866 | je .lp2 |
||
867 | mov ebx,dword[edi+SKIN_BUTTONS.left-2] |
||
868 | mov bx,[edi+SKIN_BUTTONS.width] |
||
869 | mov ecx,dword[edi+SKIN_BUTTONS.top-2] |
||
870 | mov cx,[edi+SKIN_BUTTONS.height] |
||
179 | mikedld | 871 | add ebx,(wnd4.x+wnd4.width)*65536 |
872 | add ecx,wnd4.y*65536 |
||
51 | mikedld | 873 | dec ebx |
874 | dec ecx |
||
875 | mcall 8,,,0x40000000 |
||
876 | add edi,12 |
||
877 | jmp .lp1 |
||
179 | mikedld | 878 | .lp2: |
51 | mikedld | 879 | |
179 | mikedld | 880 | mov edi,[ebp+SKIN_HEADER.params] |
881 | add edi,ebp |
||
882 | mpack ebx,wnd4.x+10,wnd4.y+10 |
||
883 | add bx,word[edi+SKIN_PARAMS.skin_height] |
||
884 | mcall 4,,[dtp.work_text],window_text,window_text.size |
||
885 | |||
886 | mov ecx,[edi+SKIN_PARAMS.skin_height] |
||
887 | shl ecx,16 |
||
888 | add ecx,(wnd4.y+8)*65536+10 |
||
889 | mcall 13, |
||
890 | (wnd4.x+window_text.size*6+20)>,,[dtp.work_graph] |
||
891 | |||
892 | add ecx,25*65536+8 |
||
893 | mcall 8, |
||
894 | button_text.size*6+11>,,0,[dtp.work_button] |
||
895 | |||
896 | shr ecx,16 |
||
897 | mov bx,cx |
||
898 | add ebx,0x00060006 |
||
899 | mcall 4,,[dtp.work_button_text],button_text,button_text.size |
||
900 | |||
901 | ret |
||
1611 | mario79 | 902 | ;--------------------------------------------------------------------- |
903 | draw_PathShow: |
||
904 | pusha |
||
905 | mcall 13,<10,534>,<214,15>,0xffffff |
||
906 | mcall 13,<10,534>,<232,15>,0xffffff |
||
907 | ; draw for PathShow |
||
908 | push dword PathShow_data_1 |
||
909 | call [PathShow_draw] |
||
910 | |||
911 | push dword PathShow_data_2 |
||
912 | call [PathShow_draw] |
||
913 | popa |
||
914 | ret |
||
915 | ;--------------------------------------------------------------------- |
||
31 | halyavin | 916 | ; ********************************************* |
917 | ; ******* WINDOW DEFINITIONS AND DRAW ******** |
||
918 | ; ********************************************* |
||
919 | |||
920 | |||
921 | draw_window: |
||
922 | |||
923 | mov eax,12 ; function 12:tell os about windowdraw |
||
924 | mov ebx,1 ; 1, start of draw |
||
485 | heavyiron | 925 | mcall |
31 | halyavin | 926 | |
927 | mov eax,48 |
||
928 | mov ebx,3 |
||
929 | mov ecx,app_colours |
||
930 | mov edx,10*4 |
||
485 | heavyiron | 931 | mcall |
31 | halyavin | 932 | |
933 | mov eax,14 |
||
485 | heavyiron | 934 | mcall |
31 | halyavin | 935 | |
180 | heavyiron | 936 | ; DRAW WINDOW |
31 | halyavin | 937 | mov eax,0 ; function 0 : define and draw window |
51 | mikedld | 938 | mov ebx,110*65536+555 ; [x start] *65536 + [x size] |
1611 | mario79 | 939 | mov ecx,50*65536+275 ; [y start] *65536 + [y size] |
31 | halyavin | 940 | mov edx,[w_work] ; color of work area RRGGBB,8->color |
551 | spraid | 941 | or edx,0x14000000 |
485 | heavyiron | 942 | mov edi,title ; WINDOW LABEL |
943 | mcall |
||
31 | halyavin | 944 | |
945 | if lang eq ru |
||
51 | mikedld | 946 | load_w = (5*2+6*9) |
947 | save_w = (5*2+6*9) |
||
948 | flat_w = (5*2+6*7) |
||
949 | apply_w = (5*2+6*9) |
||
950 | else |
||
951 | load_w = (5*2+6*6) |
||
1611 | mario79 | 952 | save_w = (5*2+6*8) |
51 | mikedld | 953 | flat_w = (5*2+6*4) |
954 | apply_w = (5*2+6*7) |
||
955 | end if |
||
956 | |||
1611 | mario79 | 957 | ; mov eax,8 ; FILENAME BUTTON |
958 | ; mov ebx,5*65536+545 |
||
959 | ; mov ecx,212*65536+10 |
||
960 | ; mov edx,0x4000000B |
||
961 | ; mov esi,[w_grab_button] ; button color RRGGBB |
||
962 | ; mcall |
||
31 | halyavin | 963 | |
1611 | mario79 | 964 | mov eax,8 ; LOAD BUTTON |
51 | mikedld | 965 | mov ebx,15*65536+load_w |
1611 | mario79 | 966 | mov ecx,(35+18*12)*65536+14 |
31 | halyavin | 967 | mov edx,12 |
51 | mikedld | 968 | mov esi,[w_work_button] |
485 | heavyiron | 969 | mcall |
31 | halyavin | 970 | |
51 | mikedld | 971 | ; mov eax,8 ; SAVE BUTTON |
972 | add ebx,(load_w+2)*65536-load_w+save_w |
||
31 | halyavin | 973 | inc edx |
485 | heavyiron | 974 | mcall |
31 | halyavin | 975 | |
976 | ; mov eax,8 ; 3D |
||
179 | mikedld | 977 | ; mov ebx,15*65536+35 |
978 | ; mov ecx,(30+18*12)*65536+14 |
||
51 | mikedld | 979 | mov ebx,(340-t1.size*6-13)*65536+(5*2+6*4) |
31 | halyavin | 980 | inc edx |
485 | heavyiron | 981 | mcall |
179 | mikedld | 982 | |
31 | halyavin | 983 | ; mov eax,8 ; FLAT |
51 | mikedld | 984 | add ebx,(5*2+6*4+2)*65536-(5*2+6*4)+flat_w |
31 | halyavin | 985 | inc edx |
485 | heavyiron | 986 | mcall |
31 | halyavin | 987 | |
51 | mikedld | 988 | ; mov eax,8 ; APPLY BUTTON |
989 | add ebx,(flat_w+6+2)*65536-flat_w+apply_w |
||
990 | inc edx |
||
485 | heavyiron | 991 | mcall |
31 | halyavin | 992 | |
51 | mikedld | 993 | ; mov eax,8 ; LOAD SKIN BUTTON |
994 | mov ebx,(336+(555-335)/2-t2.size*6/2)*65536+load_w |
||
995 | inc edx |
||
485 | heavyiron | 996 | mcall |
51 | mikedld | 997 | |
998 | ; mov eax,8 ; APPLY SKIN BUTTON |
||
999 | add ebx,(load_w+6+2)*65536-load_w+apply_w |
||
1000 | inc edx |
||
485 | heavyiron | 1001 | mcall |
51 | mikedld | 1002 | |
31 | halyavin | 1003 | mov eax, 4 |
1611 | mario79 | 1004 | mov ebx, (339-t1.size*6-12)*65536+(35+18*12+4) |
31 | halyavin | 1005 | mov ecx, [w_work_button_text] |
1006 | mov edx, t1 |
||
1007 | mov esi, t1.size |
||
485 | heavyiron | 1008 | mcall |
31 | halyavin | 1009 | |
1611 | mario79 | 1010 | mov ebx,(336+(555-335)/2-t2.size*6/2)*65536+(35+18*12+4) |
51 | mikedld | 1011 | mov edx,t2 |
1012 | mov esi,t2.size |
||
485 | heavyiron | 1013 | mcall |
31 | halyavin | 1014 | |
1611 | mario79 | 1015 | mov ebx,(15+(load_w+save_w+2-t3.size*6)/2)*65536+(35+18*12+4) |
1016 | mov edx,t3 |
||
1017 | mov esi,t3.size |
||
1018 | mcall |
||
1019 | |||
179 | mikedld | 1020 | ; mov eax, 4 |
1021 | ; mov ebx, 277*65536+(30+18*12+4) |
||
1022 | ; mov edx, t2 |
||
1023 | ; mov esi, t2.size |
||
485 | heavyiron | 1024 | ; mcall |
51 | mikedld | 1025 | |
31 | halyavin | 1026 | mov eax,38 ; R G B COLOR GLIDES |
51 | mikedld | 1027 | mov ebx,266*65536+285 |
31 | halyavin | 1028 | mov ecx,30*65536+30 |
1029 | mov edx,0xff0000 |
||
1030 | .newl: |
||
485 | heavyiron | 1031 | mcall |
31 | halyavin | 1032 | pusha |
1033 | add ebx,20*65536+20 |
||
1034 | shr edx,8 |
||
485 | heavyiron | 1035 | mcall |
31 | halyavin | 1036 | add ebx,20*65536+20 |
1037 | shr edx,8 |
||
485 | heavyiron | 1038 | mcall |
31 | halyavin | 1039 | popa |
1040 | sub edx,0x020000 |
||
1041 | add ecx,0x00010001 |
||
1042 | cmp ecx,158*65536+158 |
||
1043 | jnz .newl |
||
1044 | |||
1045 | call draw_color |
||
1046 | |||
1047 | mov edx,31 ; BUTTON ROW |
||
1048 | mov ebx,15*65536+200 |
||
51 | mikedld | 1049 | mov ecx,30*65536+14 |
31 | halyavin | 1050 | mov esi,[w_work_button] |
1051 | newb: |
||
1052 | mov eax,8 |
||
485 | heavyiron | 1053 | mcall |
51 | mikedld | 1054 | add ecx,18*65536 |
31 | halyavin | 1055 | inc edx |
1056 | cmp edx,40 |
||
1057 | jbe newb |
||
1058 | |||
51 | mikedld | 1059 | mov ebx,15*65536+34 ; ROW OF TEXTS |
31 | halyavin | 1060 | mov ecx,[w_work_button_text] |
1061 | mov edx,text |
||
1062 | mov esi,32 |
||
1063 | newline: |
||
1064 | mov eax,4 |
||
485 | heavyiron | 1065 | mcall |
51 | mikedld | 1066 | add ebx,18 |
31 | halyavin | 1067 | add edx,32 |
1068 | cmp [edx],byte 'x' |
||
1069 | jne newline |
||
1070 | |||
1071 | call draw_colours |
||
1072 | |||
1611 | mario79 | 1073 | call draw_PathShow |
1074 | |||
1075 | ; mcall 13,<5,546>,<212,11>,[w_work] |
||
1076 | ; mcall 13,<337,7>,<2,250>,[w_frame] |
||
1077 | ; shr edx,1 |
||
1078 | ; and edx,0x007F7F7F |
||
1079 | ; mcall 38,<336,336>,<20,250> |
||
1080 | ; add ebx,0x00080008 |
||
1081 | ; mcall |
||
1082 | ; sub ebx,0x00040004 |
||
1083 | ; mcall ,,<0,255> |
||
1084 | ; mcall ,<5,550>,<211,211> |
||
1085 | ; add ecx,0x000C000C |
||
1086 | ; mcall |
||
51 | mikedld | 1087 | |
1611 | mario79 | 1088 | ; call print_text |
31 | halyavin | 1089 | |
1611 | mario79 | 1090 | cmp dword[not_packed_area+SKIN_HEADER.ident],'SKIN' |
51 | mikedld | 1091 | jne @f |
1092 | call draw_skin |
||
1093 | @@: |
||
1094 | |||
31 | halyavin | 1095 | mov eax,12 ; function 12:tell os about windowdraw |
1096 | mov ebx,2 ; 2, end of draw |
||
485 | heavyiron | 1097 | mcall |
31 | halyavin | 1098 | |
1099 | ret |
||
1100 | |||
1101 | |||
1102 | ; DATA AREA |
||
1103 | |||
1104 | lsz text,\ |
||
1105 | ru, ' €ŒŠ€ ŽŠ€ ',\ |
||
1106 | ru, ' Ž‹Ž‘€ ‡€ƒŽ‹Ž‚Š€ ',\ |
||
1107 | ru, ' ŠŽŠ€ € Ž‹Ž‘… ‡€ƒŽ‹Ž‚Š€ ',\ |
||
1108 | ru, ' ’…Š‘’ € ŠŽŠ… € ‡€ƒŽ‹Ž‚Š… ',\ |
||
1109 | ru, ' ’…Š‘’ ‡€ƒŽ‹Ž‚ŽŠ€ ',\ |
||
1110 | ru, ' €Ž—€Ÿ Ž‹€‘’œ ',\ |
||
1111 | ru, ' ŠŽŠ€ ‚ €Ž—…‰ Ž‹€‘’ˆ ',\ |
||
1112 | ru, ' ’…Š‘’ € ŠŽŠ… ',\ |
||
1113 | ru, ' ’…Š‘’ ‚ €Ž—…‰ Ž‹€‘’ˆ ',\ |
||
1114 | ru, ' ƒ€”ˆŠ€ ‚ €Ž—…‰ Ž‹€‘’ˆ ',\ |
||
1115 | ru, 'x',\ |
||
1116 | en, ' WINDOW FRAME ',\ |
||
1117 | en, ' WINDOW GRAB BAR ',\ |
||
1118 | en, ' WINDOW GRAB BUTTON ',\ |
||
1119 | en, ' WINDOW GRAB BUTTON TEXT ',\ |
||
1120 | en, ' WINDOW GRAB TITLE ',\ |
||
1121 | en, ' WINDOW WORK AREA ',\ |
||
1122 | en, ' WINDOW WORK AREA BUTTON ',\ |
||
1123 | en, ' WINDOW WORK AREA BUTTON TEXT ',\ |
||
1124 | en, ' WINDOW WORK AREA TEXT ',\ |
||
1125 | en, ' WINDOW WORK AREA GRAPH ',\ |
||
274 | kaitz | 1126 | en, 'x',\ |
1127 | et, ' AKNA RAAM ',\ |
||
1128 | et, ' AKNA HAARAMISE RIBA ',\ |
||
1129 | et, ' AKNA HAARAMISE NUPP ',\ |
||
1130 | et, ' AKNA HAARAMISE NUPU TEKST ',\ |
||
1131 | et, ' AKNA HAARAMISE PEALKIRI ',\ |
||
1132 | et, ' AKNA TÖÖPIIRKOND ',\ |
||
1133 | et, ' AKNA TÖÖPIIRKONNA NUPP ',\ |
||
1134 | et, ' AKNA TÖÖPIIRKONNA NUPPU TEKST ',\ |
||
1135 | et, ' AKNA TÖÖPIIRKONNA TEKST ',\ |
||
1136 | et, ' AKNA TÖÖPIIRKONNA GRAAFIKA ',\ |
||
1137 | et, 'x' |
||
31 | halyavin | 1138 | |
51 | mikedld | 1139 | lsz t1,\ |
1140 | ru, ' 3D ‹Ž‘Šˆ… ˆŒ…ˆ’œ ',\ |
||
274 | kaitz | 1141 | en, ' 3D FLAT APPLY ',\ |
1142 | et, ' 3D LAME KINNITA ' |
||
51 | mikedld | 1143 | |
31 | halyavin | 1144 | lsz t2,\ |
51 | mikedld | 1145 | ru, ' ‡€ƒ“‡ˆ’œ ˆŒ…ˆ’œ ',\ |
1146 | en, ' LOAD APPLY ',\ |
||
274 | kaitz | 1147 | et, ' LAADI KINNITA ' |
31 | halyavin | 1148 | |
1611 | mario79 | 1149 | lsz t3,\ |
1150 | ru, ' ‡€ƒ“‡ˆ’œ ‘Ž•€ˆ’œ ',\ |
||
1151 | en, ' LOAD SAVE ',\ |
||
1152 | et, ' LAADI SALVESTA',\ |
||
1153 | |||
179 | mikedld | 1154 | lsz caption_text,\ |
51 | mikedld | 1155 | ru, '‡ £®«®¢®ª',\ |
274 | kaitz | 1156 | en, 'Caption',\ |
1157 | et, 'Pealkiri' |
||
31 | halyavin | 1158 | |
179 | mikedld | 1159 | sz close_text,'x' |
1160 | |||
1161 | lsz window_text,\ |
||
1162 | ru, '’¥ªáâ ¢ ®ª¥',\ |
||
274 | kaitz | 1163 | en, 'Window text',\ |
1164 | et, 'Akna tekst' |
||
179 | mikedld | 1165 | |
1166 | lsz button_text,\ |
||
1167 | ru, '’¥ªáâ ª®¯ª¥',\ |
||
274 | kaitz | 1168 | en, 'Button text',\ |
1169 | et, 'Nupu tekst' |
||
179 | mikedld | 1170 | |
1611 | mario79 | 1171 | ;sz default_skn, '/sys/DEFAULT.SKN',0 |
31 | halyavin | 1172 | |
180 | heavyiron | 1173 | if lang eq ru |
485 | heavyiron | 1174 | title db '€‘’Ž‰Š€ ŽŠŽ',0 |
274 | kaitz | 1175 | else if lang eq et |
485 | heavyiron | 1176 | title db 'AKNA SEADED - VALI VÄRV JA VAJUTA OBJEKTILE',0 |
180 | heavyiron | 1177 | else |
485 | heavyiron | 1178 | title db 'WINDOWS SETTINGS - DEFINE COLOR AND CLICK ON TARGET',0 |
180 | heavyiron | 1179 | end if |
1180 | |||
1181 | |||
31 | halyavin | 1182 | color dd 0 |
1183 | |||
1611 | mario79 | 1184 | ;--------------------------------------------------------------------- |
1185 | l_libs_start: |
||
1186 | |||
1187 | library01 l_libs system_dir_Boxlib+9, cur_dir_path, library_path, system_dir_Boxlib, \ |
||
1188 | err_message_found_lib1, head_f_l, Box_lib_import, err_message_import1, head_f_i |
||
1189 | |||
1190 | library02 l_libs system_dir_ProcLib+9, cur_dir_path, library_path, system_dir_ProcLib, \ |
||
1191 | err_message_found_lib2, head_f_l, ProcLib_import, err_message_import2, head_f_i |
||
1192 | |||
1193 | end_l_libs: |
||
1194 | ;--------------------------------------------------------------------- |
||
1195 | system_dir_Boxlib db '/sys/lib/box_lib.obj',0 |
||
1196 | system_dir_ProcLib db '/sys/lib/proc_lib.obj',0 |
||
1197 | |||
1198 | head_f_i: |
||
1199 | head_f_l db 'System error',0 |
||
1200 | |||
1201 | err_message_found_lib1 db 'box_lib.obj - Not found!',0 |
||
1202 | err_message_found_lib2 db 'proc_lib.obj - Not found!',0 |
||
1203 | |||
1204 | err_message_import1 db 'box_lib.obj - Wrong import!',0 |
||
1205 | err_message_import2 db 'proc_lib.obj - Wrong import!',0 |
||
1206 | |||
1207 | ;--------------------------------------------------------------------- |
||
1208 | align 4 |
||
1209 | ProcLib_import: |
||
1210 | OpenDialog_Init dd aOpenDialog_Init |
||
1211 | OpenDialog_Start dd aOpenDialog_Start |
||
1212 | ;OpenDialog__Version dd aOpenDialog_Version |
||
1213 | dd 0 |
||
1214 | dd 0 |
||
1215 | aOpenDialog_Init db 'OpenDialog_init',0 |
||
1216 | aOpenDialog_Start db 'OpenDialog_start',0 |
||
1217 | ;aOpenDialog_Version db 'Version_OpenDialog',0 |
||
1218 | ;--------------------------------------------------------------------- |
||
1219 | align 4 |
||
1220 | Box_lib_import: |
||
1221 | ;init_lib dd a_init |
||
1222 | ;version_lib dd a_version |
||
1223 | |||
1224 | |||
1225 | ;edit_box_draw dd aEdit_box_draw |
||
1226 | ;edit_box_key dd aEdit_box_key |
||
1227 | ;edit_box_mouse dd aEdit_box_mouse |
||
1228 | ;version_ed dd aVersion_ed |
||
1229 | |||
1230 | ;check_box_draw dd aCheck_box_draw |
||
1231 | ;check_box_mouse dd aCheck_box_mouse |
||
1232 | ;version_ch dd aVersion_ch |
||
1233 | |||
1234 | ;option_box_draw dd aOption_box_draw |
||
1235 | ;option_box_mouse dd aOption_box_mouse |
||
1236 | ;version_op dd aVersion_op |
||
1237 | |||
1238 | ;scrollbar_ver_draw dd aScrollbar_ver_draw |
||
1239 | ;scrollbar_ver_mouse dd aScrollbar_ver_mouse |
||
1240 | ;scrollbar_hor_draw dd aScrollbar_hor_draw |
||
1241 | ;scrollbar_hor_mouse dd aScrollbar_hor_mouse |
||
1242 | ;version_scrollbar dd aVersion_scrollbar |
||
1243 | |||
1244 | ;dinamic_button_draw dd aDbutton_draw |
||
1245 | ;dinamic_button_mouse dd aDbutton_mouse |
||
1246 | ;version_dbutton dd aVersion_dbutton |
||
1247 | |||
1248 | ;menu_bar_draw dd aMenu_bar_draw |
||
1249 | ;menu_bar_mouse dd aMenu_bar_mouse |
||
1250 | ;menu_bar_activate dd aMenu_bar_activate |
||
1251 | ;version_menu_bar dd aVersion_menu_bar |
||
1252 | |||
1253 | ;FileBrowser_draw dd aFileBrowser_draw |
||
1254 | ;FileBrowser_mouse dd aFileBrowser_mouse |
||
1255 | ;FileBrowser_key dd aFileBrowser_key |
||
1256 | ;Version_FileBrowser dd aVersion_FileBrowser |
||
1257 | |||
1258 | PathShow_prepare dd sz_PathShow_prepare |
||
1259 | PathShow_draw dd sz_PathShow_draw |
||
1260 | ;Version_path_show dd szVersion_path_show |
||
1261 | dd 0 |
||
1262 | dd 0 |
||
1263 | |||
1264 | ;a_init db 'lib_init',0 |
||
1265 | ;a_version db 'version',0 |
||
1266 | |||
1267 | ;aEdit_box_draw db 'edit_box',0 |
||
1268 | ;aEdit_box_key db 'edit_box_key',0 |
||
1269 | ;aEdit_box_mouse db 'edit_box_mouse',0 |
||
1270 | ;aVersion_ed db 'version_ed',0 |
||
1271 | |||
1272 | ;aCheck_box_draw db 'check_box_draw',0 |
||
1273 | ;aCheck_box_mouse db 'check_box_mouse',0 |
||
1274 | ;aVersion_ch db 'version_ch',0 |
||
1275 | |||
1276 | ;aOption_box_draw db 'option_box_draw',0 |
||
1277 | ;aOption_box_mouse db 'option_box_mouse',0 |
||
1278 | ;aVersion_op db 'version_op',0 |
||
1279 | |||
1280 | ;aScrollbar_ver_draw db 'scrollbar_v_draw',0 |
||
1281 | ;aScrollbar_ver_mouse db 'scrollbar_v_mouse',0 |
||
1282 | ;aScrollbar_hor_draw db 'scrollbar_h_draw',0 |
||
1283 | ;aScrollbar_hor_mouse db 'scrollbar_h_mouse',0 |
||
1284 | ;aVersion_scrollbar db 'version_scrollbar',0 |
||
1285 | |||
1286 | ;aDbutton_draw db 'dbutton_draw',0 |
||
1287 | ;aDbutton_mouse db 'dbutton_mouse',0 |
||
1288 | ;aVersion_dbutton db 'version_dbutton',0 |
||
1289 | |||
1290 | ;aMenu_bar_draw db 'menu_bar_draw',0 |
||
1291 | ;aMenu_bar_mouse db 'menu_bar_mouse',0 |
||
1292 | ;aMenu_bar_activate db 'menu_bar_activate',0 |
||
1293 | ;aVersion_menu_bar db 'version_menu_bar',0 |
||
1294 | |||
1295 | ;aFileBrowser_draw db 'FileBrowser_draw',0 |
||
1296 | ;aFileBrowser_mouse db 'FileBrowser_mouse',0 |
||
1297 | ;aFileBrowser_key db 'FileBrowser_key',0 |
||
1298 | ;aVersion_FileBrowser db 'version_FileBrowser',0 |
||
1299 | |||
1300 | sz_PathShow_prepare db 'PathShow_prepare',0 |
||
1301 | sz_PathShow_draw db 'PathShow_draw',0 |
||
1302 | ;szVersion_path_show db 'version_PathShow',0 |
||
1303 | ;--------------------------------------------------------------------- |
||
1304 | PathShow_data_1: |
||
1305 | .type dd 0 ;+0 |
||
1306 | .start_y dw 217 ;+4 |
||
1307 | .start_x dw 12 ;+6 |
||
1308 | .font_size_x dw 6 ;+8 ; 6 - for font 0, 8 - for font 1 |
||
1309 | .area_size_x dw 530 ;+10 |
||
1310 | .font_number dd 0 ;+12 ; 0 - monospace, 1 - variable |
||
1311 | .background_flag dd 0 ;+16 |
||
1312 | .font_color dd 0x0 ;+20 |
||
1313 | .background_color dd 0x0 ;+24 |
||
1314 | .text_pointer dd fname ;+28 |
||
1315 | .work_area_pointer dd text_work_area ;+32 |
||
1316 | .temp_text_length dd 0 ;+36 |
||
1317 | ;--------------------------------------------------------------------- |
||
1318 | PathShow_data_2: |
||
1319 | .type dd 0 ;+0 |
||
1320 | .start_y dw 235 ;+4 |
||
1321 | .start_x dw 12 ;+6 |
||
1322 | .font_size_x dw 6 ;+8 ; 6 - for font 0, 8 - for font 1 |
||
1323 | .area_size_x dw 530 ;+10 |
||
1324 | .font_number dd 0 ;+12 ; 0 - monospace, 1 - variable |
||
1325 | .background_flag dd 0 ;+16 |
||
1326 | .font_color dd 0x0 ;+20 |
||
1327 | .background_color dd 0x0 ;+24 |
||
1328 | .text_pointer dd skin_info ;+28 |
||
1329 | .work_area_pointer dd text_work_area2 ;+32 |
||
1330 | .temp_text_length dd 0 ;+36 |
||
1331 | ;--------------------------------------------------------------------- |
||
1332 | OpenDialog_data: |
||
1333 | .type dd 0 |
||
1334 | .procinfo dd procinfo ;+4 |
||
1335 | .com_area_name dd communication_area_name ;+8 |
||
1336 | .com_area dd 0 ;+12 |
||
1337 | .opendir_pach dd temp_dir_pach ;+16 |
||
1338 | .dir_default_pach dd communication_area_default_pach ;+20 |
||
1339 | .start_path dd open_dialog_path ;+24 |
||
1340 | .draw_window dd draw_window ;+28 |
||
1341 | .status dd 0 ;+32 |
||
1342 | .openfile_pach dd fname ;+36 |
||
1343 | .filename_area dd filename_area ;+40 |
||
1344 | .filter_area dd Filter |
||
1345 | .x: |
||
1346 | .x_size dw 420 ;+48 ; Window X size |
||
1347 | .x_start dw 10 ;+50 ; Window X position |
||
1348 | .y: |
||
1349 | .y_size dw 320 ;+52 ; Window y size |
||
1350 | .y_start dw 10 ;+54 ; Window Y position |
||
1351 | |||
1352 | OpenDialog_data2: |
||
1353 | .type dd 0 |
||
1354 | .procinfo dd procinfo ;+4 |
||
1355 | .com_area_name dd communication_area_name2 ;+8 |
||
1356 | .com_area dd 0 ;+12 |
||
1357 | .opendir_pach dd temp_dir_pach2 ;+16 |
||
1358 | .dir_default_pach dd communication_area_default_pach ;+20 |
||
1359 | .start_path dd open_dialog_path ;+24 |
||
1360 | .draw_window dd draw_window ;+28 |
||
1361 | .status dd 0 ;+32 |
||
1362 | .openfile_pach dd skin_info ;+36 |
||
1363 | .filename_area dd filename_area2 ;+40 |
||
1364 | .filter_area dd Filter2 |
||
1365 | .x: |
||
1366 | .x_size dw 420 ;+48 ; Window X size |
||
1367 | .x_start dw 10 ;+50 ; Window X position |
||
1368 | .y: |
||
1369 | .y_size dw 320 ;+52 ; Window y size |
||
1370 | .y_start dw 10 ;+54 ; Window Y position |
||
1371 | |||
1372 | communication_area_name2: |
||
1373 | db 'FFFFFFFF_open_dialog',0 |
||
1374 | |||
1375 | communication_area_name: |
||
1376 | db 'FFFFFFFF_open_dialog2',0 |
||
1377 | open_dialog_path: |
||
1702 | Lrz | 1378 | if __nightbuild eq yes |
1379 | db '/sys/MANAGERS/opendial',0 |
||
1380 | else |
||
1381 | db '/sys/File Managers/opendial',0 |
||
1382 | end if |
||
1611 | mario79 | 1383 | communication_area_default_pach: |
1384 | db '/sys',0 |
||
1385 | |||
1386 | Filter: |
||
1387 | dd Filter.end - Filter |
||
1388 | .1: |
||
1389 | db 'DTP',0 |
||
1390 | .end: |
||
1391 | db 0 |
||
1392 | |||
1393 | Filter2: |
||
1394 | dd Filter.end - Filter |
||
1395 | .1: |
||
1396 | db 'SKN',0 |
||
1397 | .end: |
||
1398 | db 0 |
||
1399 | |||
1400 | start_temp_file_name: db 'default.dtp',0 |
||
1401 | |||
1402 | default_skin: |
||
1403 | db '/sys/default.skn',0 |
||
1404 | default_dtp: |
||
1405 | db '/sys/default.dtp',0 |
||
1406 | ;--------------------------------------------------------------------- |
||
484 | diamond | 1407 | IncludeIGlobals |
1408 | |||
31 | halyavin | 1409 | I_END: |
1410 | |||
484 | diamond | 1411 | IncludeUGlobals |
1412 | |||
31 | halyavin | 1413 | read_info: |
1414 | .mode dd ? ; read |
||
1415 | .start_block dd ? ; first block |
||
1416 | .blocks dd ? ; 512 bytes |
||
1417 | .address dd ? |
||
1418 | .workarea dd ? |
||
1611 | mario79 | 1419 | fname rb 4096 ; filename |
31 | halyavin | 1420 | |
1421 | virtual at read_info |
||
1422 | write_info: |
||
1423 | .mode dd ? |
||
1424 | rd 1 |
||
1425 | .bytes2write dd ? |
||
1426 | .address dd ? |
||
1427 | .workarea dd ? |
||
1428 | end virtual |
||
1429 | |||
1611 | mario79 | 1430 | read_info2: |
1431 | .mode dd ? ; read |
||
1432 | .start_block dd ? ; first block |
||
1433 | .blocks dd ? ; 512 bytes |
||
1434 | .address dd ? |
||
1435 | .workarea dd ? |
||
1436 | skin_info rb 4096 |
||
51 | mikedld | 1437 | |
1611 | mario79 | 1438 | ;param rb 257 |
528 | diamond | 1439 | |
1440 | align 4 |
||
31 | halyavin | 1441 | app_colours: |
1442 | |||
1443 | w_frame dd ? |
||
1444 | w_grab dd ? |
||
1445 | w_grab_button dd ? |
||
1446 | w_grab_button_text dd ? |
||
1447 | w_grab_text dd ? |
||
1448 | w_work dd ? |
||
1449 | w_work_button dd ? |
||
1450 | w_work_button_text dd ? |
||
1451 | w_work_text dd ? |
||
1452 | w_work_graph dd ? |
||
1453 | |||
1454 | color_table: |
||
1455 | times 10 dd ? |
||
1611 | mario79 | 1456 | ;--------------------------------------------------------------------- |
1457 | align 4 |
||
1458 | cur_dir_path: |
||
1459 | rb 4096 |
||
1460 | ;--------------------------------------------------------------------- |
||
1461 | library_path: |
||
1462 | rb 4096 |
||
1463 | ;--------------------------------------------------------------------- |
||
1464 | ;fname_buf: |
||
1465 | ; rb 4096 |
||
1466 | ;--------------------------------------------------------------------- |
||
1467 | temp_dir_pach: |
||
1468 | rb 4096 |
||
1469 | ;--------------------------------------------------------------------- |
||
1470 | temp_dir_pach2: |
||
1471 | rb 4096 |
||
1472 | ;--------------------------------------------------------------------- |
||
1473 | text_work_area: |
||
1474 | rb 1024 |
||
1475 | ;--------------------------------------------------------------------- |
||
1476 | text_work_area2: |
||
1477 | rb 1024 |
||
1478 | ;--------------------------------------------------------------------- |
||
1479 | procinfo: |
||
1480 | rb 1024 |
||
1481 | ;--------------------------------------------------------------------- |
||
1482 | filename_area: |
||
1483 | rb 256 |
||
1484 | ;--------------------------------------------------------------------- |
||
1485 | filename_area2: |
||
1486 | rb 256 |
||
1487 | ;--------------------------------------------------------------------- |
||
1488 | rb 4096 |
||
1489 | stacktop: |
||
1490 | ;--------------------------------------------------------------------- |
||
1491 | file_load_area: ; old 0x10000 |
||
1492 | rb 32*1024 |
||
1493 | ;--------------------------------------------------------------------- |
||
1494 | not_packed_area: ; old 0x18000 |
||
1495 | rb 32*1024 |
||
1496 | ;--------------------------------------------------------------------- |
||
1497 | unpack_area: ; old 0x20000 |
||
1498 | rb 32*1024 |
||
1499 | ;--------------------------------------------------------------------- |
||
1500 | i_end:211,211>5,550>0,255>20,250>336,336>2,250>337,7>212,11>5,546>232,15>10,534>214,15>10,534> |