Subversion Repositories Kolibri OS

Rev

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

Rev 2068 Rev 3271
Line 14... Line 14...
14
   org     0
14
	org 0
15
   db      'MENUET01'  ; identifier
15
	db 'MENUET01'	; identifier
16
   dd      1           ; header version
16
	dd 1		; header version
17
   dd      START       ; start address
17
	dd START	; start address
18
   dd      I_END       ; file size
18
	dd I_END	; file size
19
   dd      i_end ;28000h      ; memory
19
	dd i_end	; memory
20
   dd      stacktop    ; stack pointer
20
	dd stacktop	; stack pointer
21
   dd      skin_info       ; parameters
21
	dd skin_info	; parameters
22
   dd      cur_dir_path ; path to file
22
	dd cur_dir_path	; path to file
Line 23... Line 23...
23
   
23
 
Line 69... Line 69...
69
  kind  dw ?
69
  kind  dw ?
70
  type  dw ?
70
  type  dw ?
71
  _data  dd ?
71
  _data  dd ?
72
ends
72
ends
Line 73... Line -...
73
 
-
 
-
 
73
 
74
 
74
;---------------------------------------------------------------------
75
START:                          ; start of execution
75
START:		; start of execution
76
;---------------------------------------------------------------------
76
;---------------------------------------------------------------------
Line 77... Line 77...
77
	mcall	68,11
77
	mcall	68,11
78
	
78
	
Line 79... Line 79...
79
	test	eax,eax
79
	test	eax,eax
Line 80... Line 80...
80
	jz	close	
80
	jz	close	
81
 
-
 
82
load_libraries l_libs_start,end_l_libs
81
 
83
 
82
load_libraries l_libs_start,end_l_libs
84
;if return code =-1 then exit, else nornary work
83
 
85
;        cmp     eax,-1
-
 
86
	inc	eax
84
;if return code =-1 then exit, else nornary work
87
	test	eax,eax
85
	inc	eax
88
	jz	close
86
	test	eax,eax
89
 
87
	jz	close
90
;---------------------------------------------------------------------
88
;---------------------------------------------------------------------
Line 108... Line 106...
108
	stosb
106
	stosb
109
	test	eax,eax
107
	test	eax,eax
110
	jnz	@b
108
	jnz	@b
Line 111... Line 109...
111
 
109
 
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
;---------------------------------------------------------------------
110
;---------------------------------------------------------------------
128
	mov	edi,skin_info
111
	mov	edi,skin_info
129
	cmp     byte [edi], 0
112
	cmp	byte [edi], 0
130
	jne	skin_path_ready
113
	jne	skin_path_ready
131
	mov	esi,default_skin
114
	mov	esi,default_skin
Line 150... Line 133...
150
	call	[PathShow_prepare]
133
	call	[PathShow_prepare]
Line 151... Line 134...
151
	
134
	
152
	push	dword PathShow_data_2
135
	push	dword PathShow_data_2
153
	call	[PathShow_prepare]
136
	call	[PathShow_prepare]
154
;---------------------------------------------------------------------	
137
;---------------------------------------------------------------------	
155
    mov  eax,48                 ; get current colors
-
 
156
    mov  ebx,3
-
 
157
    mov  ecx,color_table
-
 
158
    mov  edx,4*10
-
 
159
    mcall
-
 
160
 
138
	mcall	48,3,color_table,4*10	; get current colors
161
    call load_skin_file.2
-
 
162
 
-
 
163
;    mov  esi, default_dtp
-
 
164
;    mov  edi, fname
139
	call	load_skin_file.2
165
;    mov  ecx, default_dtp.size
-
 
166
;    rep  movsb
-
 
167
 
140
;---------------------------------------------------------------------	
168
red:
141
red:
169
    call draw_window            ; at first, draw the window
-
 
-
 
142
	call	draw_window		; at first, draw the window
170
 
143
;---------------------------------------------------------------------	
171
still:
-
 
172
 
144
still:
173
    mov  eax,23                 ; wait here for event
-
 
174
    mov  ebx,5
-
 
Line 175... Line 145...
175
    mcall
145
	mcall	23,5	; wait here for event
176
 
146
 
177
    dec  eax                    ; redraw request ?
147
	dec	eax	; redraw request ?
178
    jz   red
148
	jz	red
Line 182... Line 152...
182
    jz   button
152
	jz	button
Line 183... Line 153...
183
 
153
 
Line 184... Line 154...
184
    call draw_cursor
154
	call	draw_cursor
185
 
-
 
186
    jmp  still
-
 
-
 
155
 
187
 
156
	jmp	still
188
 
157
;---------------------------------------------------------------------
189
  key:                          ; key
-
 
190
    mov  al,2                   ; just read it and ignore
158
key:		; key
191
    mcall
-
 
-
 
159
	mcall	2	; just read it and ignore
192
    jmp  still
160
	jmp	still
193
 
-
 
194
  button:                       ; button
-
 
195
    mov  al,17                  ; get id
-
 
196
    mcall
-
 
197
 
-
 
198
;    cmp  ah,11                  ; read string
161
;---------------------------------------------------------------------
199
;    jne  no_string
-
 
200
;    call read_string
-
 
Line 201... Line 162...
201
;    jmp  still
162
button:		; button
202
;  no_string:
163
	mcall	17	; get id
-
 
164
 
203
 
165
 	cmp	ah,12	; load file
204
    cmp  ah,12                  ; load file
166
 	jne	no_load
205
    jne  no_load
167
 
-
 
168
	call	load_file
206
    call load_file
169
	call	draw_window
207
    call draw_window
-
 
208
    jmp  still
170
 	jmp	still
209
  no_load:
171
;--------------------------------------
-
 
172
no_load:
210
 
173
 	cmp	ah,13	; save file
211
    cmp  ah,13                  ; save file
174
 	jne	no_save
-
 
175
 
212
    jne  no_save
176
	call	save_file
213
    call save_file
-
 
214
    jmp  still
177
 	jmp	still
215
  no_save:
178
;--------------------------------------
216
 
-
 
217
    cmp  ah,14                  ; set 3d buttons
179
no_save:
218
    jne  no_3d
180
 	cmp	ah,14	; set 3d buttons
219
    mov  eax,48
-
 
220
    mov  ebx,1
181
 	jne	no_3d
-
 
182
 
221
    mov  ecx,1
183
	mcall	48,1,1
222
    mcall
-
 
223
    jmp  doapply
184
 	jmp	doapply
224
   no_3d:
185
;--------------------------------------
-
 
186
no_3d:
225
 
187
 	cmp	ah,15	; set flat buttons
-
 
188
 	jne	no_flat
226
    cmp  ah,15                  ; set flat buttons
189
 
227
    jne  no_flat
190
	mcall	48, 1, 0
228
    mcall 48, 1, 0
191
;--------------------------------------
-
 
192
doapply:
229
doapply:
193
	mcall	48, 0, 0
230
    mcall 48, 0, 0
-
 
231
    jmp  still
194
 	jmp	still
232
  no_flat:
195
;--------------------------------------
-
 
196
no_flat:
233
 
197
 	cmp	ah,16	; apply
234
    cmp  ah,16                  ; apply
-
 
235
    jne  no_apply
-
 
236
  apply_direct:
198
 	jne	no_apply
237
    mov  eax,48
-
 
238
    mov  ebx,2
-
 
239
    mov  ecx,color_table
199
;--------------------------------------
-
 
200
apply_direct:
240
    mov  edx,10*4
201
	mcall	48,2,color_table,10*4
241
    mcall
-
 
242
    jmp  doapply
202
 	jmp	doapply
243
  no_apply:
203
;--------------------------------------
-
 
204
 no_apply:
244
 
205
 	cmp	ah,17	; load skin file
245
    cmp  ah,17                  ; load skin file
206
 	jne	no_load_skin
246
    jne  no_load_skin
207
 
-
 
208
	call	load_skin_file
247
    call load_skin_file
209
	call	draw_window
248
    call draw_window
-
 
249
    jmp  still
210
 	jmp	still
250
  no_load_skin:
211
;--------------------------------------
-
 
212
no_load_skin:
251
 
213
 	cmp	ah,18	; apply skin
252
    cmp   ah,18                 ; apply skin
214
 	jne	no_apply_skin
-
 
215
 
253
    jne   no_apply_skin
216
 	cmp	[skin_info],0
254
    cmp   [skin_info],0
217
 	je	no_apply_skin
255
    je    no_apply_skin
218
 
-
 
219
	mcall	48,8,skin_info
256
    mcall 48,8,skin_info
220
	call	draw_window
257
    call  draw_window
-
 
258
    jmp   still
221
 	jmp	still
259
  no_apply_skin:
222
;--------------------------------------
-
 
223
no_apply_skin:
260
 
224
	cmp	ah,31
261
    cmp  ah,31
225
	jb	no_new_colour
-
 
226
 
262
    jb   no_new_colour
227
	cmp	ah,41
263
    cmp  ah,41
228
	jg	no_new_colour
264
    jg   no_new_colour
229
	
265
    shr  eax,8
230
	shr	eax,8
266
    sub  eax,31
231
	sub	eax,31
267
    shl  eax,2
232
	shl	eax,2
268
    mov  ebx,[color]
233
	mov	ebx,[color]
-
 
234
	mov	[eax+color_table],ebx
269
    mov  [eax+color_table],ebx
235
 	cmp	dword[not_packed_area+SKIN_HEADER.ident],'SKIN'
270
    cmp  dword[not_packed_area+SKIN_HEADER.ident],'SKIN'
236
 	jne	@f
271
    jne  @f
237
 
-
 
238
	mov	edi,[not_packed_area+SKIN_HEADER.params]
-
 
239
	mov	dword[edi+not_packed_area+SKIN_PARAMS.dtp.data+eax],ebx
272
    mov  edi,[not_packed_area+SKIN_HEADER.params]
240
	call	draw_skin
273
    mov  dword[edi+not_packed_area+SKIN_PARAMS.dtp.data+eax],ebx
241
;--------------------------------------
-
 
242
@@:
274
    call draw_skin
243
	call	draw_colours
275
@@: call draw_colours
-
 
276
    jmp  still
244
 	jmp	still
277
  no_new_colour:
245
;--------------------------------------
-
 
246
no_new_colour:
278
 
247
	cmp	ah,1	; terminate
279
    cmp  ah,1                   ; terminate
248
	jnz	noid1
280
    jnz  noid1
249
;--------------------------------------
-
 
250
close:
281
close:
251
	or	eax,-1
282
    or   eax,-1
-
 
283
    mcall
252
	mcall
284
  noid1:
-
 
285
 
-
 
-
 
253
;--------------------------------------
286
    jmp  still
254
noid1:
287
 
-
 
288
 
255
 	jmp	still
289
draw_cursor:
-
 
290
 
-
 
291
    pusha
256
;---------------------------------------------------------------------
292
    mov  eax,37
-
 
293
    mov  ebx,2
257
draw_cursor:
294
    mcall
258
	pusha
295
 
259
	mcall	37,2
296
    cmp  eax,0
260
	cmp	eax,0
297
    jne  dc1
-
 
-
 
261
	jne	dc1
298
    popa
262
	popa
299
    ret
-
 
300
 
-
 
301
 dc1:
-
 
302
 
263
	ret
303
    mov  eax,37
-
 
304
    mov  ebx,1
264
;--------------------------------------
305
    mcall
265
dc1:
306
 
266
	mcall	37,1
307
    mov  ebx,eax
267
	mov	ebx,eax
308
    shr  ebx,16
-
 
309
    mov  ecx,eax
268
	shr	ebx,16
310
    and  ecx,0xffff
269
	mov	ecx,eax
-
 
270
	and	ecx,0xffff
311
 
271
	cmp	ecx,29
312
    cmp  ecx,32
272
	jbe	no_color
Line 313... Line 273...
313
    jbe  no_color
273
 
314
    cmp  ebx,32
274
 	cmp	ebx,32
-
 
275
	jbe	no_color
315
    jbe  no_color
276
 
316
 
277
	cmp	ebx,266	; CHANGE COLOR
Line 317... Line 278...
317
    cmp  ebx,266           ; CHANGE COLOR
278
	jb	no_color
318
    jb   no_color
279
 
-
 
280
	cmp	ebx,266+20*3
319
    cmp  ebx,266+20*3
281
	jg	no_color
320
    jg   no_color
282
 
Line 321... Line 283...
321
 
283
 	cmp	ecx,30+128
322
    cmp  ecx,30+128
284
	jge	no_color
323
    jge  no_color
285
 
324
    cmp  ecx,30
286
	cmp	ecx,29
325
    jb   no_color
287
	jb	no_color
326
 
288
 
327
    sub  ebx,266
289
	sub	ebx,266
328
    mov  eax,ebx
-
 
329
    cdq
290
	mov	eax,ebx
330
    mov  ebx,20
291
	cdq
331
    div  ebx
292
	mov	ebx,20
Line 332... Line 293...
332
    mov  ebx,2
293
	div	ebx
333
    sub  ebx,eax
294
	mov	ebx,2
334
 
-
 
335
    add  ecx,-30
-
 
336
    not  ecx
-
 
337
    shl  ecx,1
-
 
338
 
295
	sub	ebx,eax
339
    mov  byte [ebx+color],cl
-
 
340
    call draw_color
296
	add	ecx,-30
341
 
297
	not	ecx
342
    popa
-
 
343
    ret
298
	shl	ecx,1
344
 
299
 
345
  no_color:
300
	mov	byte [ebx+color],cl
346
 
301
	call	draw_color
347
    popa
302
no_color:
Line 401... Line 356...
401
 
356
 
Line 402... Line 357...
402
        mov     esi, file_load_area
357
	mov	esi, file_load_area
403
 
358
 
-
 
359
	cmp	dword [esi], 'KPCK'
404
        cmp     dword [esi], 'KPCK'
360
	jnz	notpacked
405
        jnz     notpacked
361
 
-
 
362
	cmp	dword [esi+4], 32*1024 ; max 32 KBytes
406
        cmp     dword [esi+4], 32*1024 ; max 32 KBytes
363
	ja	doret
407
        ja      doret
364
 
408
        push    unpack_area
365
	push	unpack_area
409
        push    esi
366
	push	esi
-
 
367
	call	unpack
410
        call    unpack
368
	mov	esi,unpack_area
411
        mov     esi, unpack_area
-
 
412
notpacked:
369
;--------------------------------------
413
 
370
notpacked:
Line 414... Line 371...
414
    cmp   dword[esi+SKIN_HEADER.ident],'SKIN'
371
 	cmp	[esi+SKIN_HEADER.ident],dword 'SKIN'
415
    jne   doret
372
 	jne	doret
416
 
373
 
Line 417... Line -...
417
    mov   edi,not_packed_area
-
 
418
    mov   ecx,0x8000/4
-
 
419
    rep   movsd
-
 
420
 
-
 
421
;    mov   esi,fname
-
 
422
;    mov   edi,skin_info.fname
374
	mov	edi,not_packed_area
423
;    mov   ecx,257
375
	mov	ecx,0x8000/4
424
;    rep   movsb
376
	rep	movsd
425
 
377
 
426
    mov   ebp,not_packed_area
378
	mov	ebp,not_packed_area
427
    mov   esi,[ebp+SKIN_HEADER.params]
379
	mov	esi,[ebp+SKIN_HEADER.params]
428
    add   esi,ebp
380
	add	esi,ebp
-
 
381
	lea	esi,[esi+SKIN_PARAMS.dtp.data]
429
    lea   esi,[esi+SKIN_PARAMS.dtp.data]
382
	mov	edi,color_table
430
    mov   edi,color_table
-
 
431
    mov   ecx,10
383
	mov	ecx,10
432
    rep   movsd
-
 
433
  doret:
384
	rep	movsd
434
 
385
;--------------------------------------
435
ret
386
doret:
436
 
387
	ret
437
;---------------------------------------------------------------------
388
;---------------------------------------------------------------------
Line 449... Line 400...
449
	push	dword PathShow_data_1
400
	push	dword PathShow_data_1
450
	call	[PathShow_prepare]
401
	call	[PathShow_prepare]
Line 451... Line 402...
451
 
402
 
452
	call	draw_PathShow
403
	call	draw_PathShow
-
 
404
;---------------------------------------------------------------------
453
;---------------------------------------------------------------------
405
	xor	eax,eax
454
        mov     ebx, write_info
406
	mov	ebx,write_info
455
        mov     dword [ebx], 2         ; subfunction: write
407
	mov	[ebx],dword 2			; subfunction: write
456
        and     dword [ebx+4], 0       ; (reserved)
408
	and	[ebx+4],eax			; (reserved)
457
        and     dword [ebx+8], 0       ; (reserved)
409
	and	[ebx+8],eax			; (reserved)
458
        mov     dword [ebx+12], 10*4   ; bytes to write
410
	mov	[ebx+12],dword 10*4		; bytes to write
459
        mov     dword [ebx+16], color_table ; address
411
	mov	[ebx+16],dword color_table	; address
460
        mcall   70
412
	mcall	70
461
        ret
413
	ret
462
;---------------------------------------------------------------------
414
;---------------------------------------------------------------------
463
draw_color:
-
 
464
 
415
draw_color:
465
    pusha
-
 
466
 
-
 
467
    mov  eax,13
-
 
468
    mov  ebx,266*65536+60
-
 
469
    mov  ecx,170*65536+30
416
	pusha
470
    mov  edx,[color]
-
 
471
    mcall
-
 
472
 
-
 
473
;   mov  eax,13
-
 
474
    mov  ebx,266*65536+60
-
 
475
    mov  ecx,200*65536+10
417
	mcall	13,<266,60>,<170,30>,[color]
476
    mov  edx,[w_work]
-
 
477
    mcall
-
 
478
 
-
 
479
    mov  eax,47
-
 
480
    mov  ebx,0+1*256+8*65536
-
 
481
    mov  ecx,[color]
-
 
482
    mov  edx,272*65536+201
418
	mcall	,,<200,10>,[w_work]
483
    mov  esi,[w_work_text]
-
 
484
    mcall
-
 
485
 
419
	mcall	47,<8,0+1*256>,[color],<272,201>,[w_work_text]
486
    popa
420
	popa
487
    ret
421
	ret
488
;----------------------------------------------------------------------
422
;----------------------------------------------------------------------
489
draw_colours:
-
 
490
 
423
draw_colours:
491
    pusha
-
 
492
 
424
	pusha
493
    mov  esi,color_table
-
 
494
 
425
	mov	esi,color_table
495
    mov  ebx,225*65536+32
426
	mov	ebx,225*65536+32
-
 
427
	mov	ecx,32*65536+12
496
    mov  ecx,32*65536+12
428
;--------------------------------------
497
  newcol:
-
 
498
    mov  eax,13
429
newcol:
499
    mov  edx,[esi]
430
	mov	edx,[esi]
500
    mcall
431
	mcall	13
501
    add  ecx,18*65536
432
	add	ecx,18*65536
502
    add  esi,4
433
	add	esi,4
503
    cmp  esi,color_table+4*9
434
 	cmp	esi,color_table+4*9
Line 533... Line 464...
533
;----------------------------------------------------------------------
464
;----------------------------------------------------------------------
534
find_bitmap:
465
find_bitmap:
535
        mov     edi,[ebp+SKIN_HEADER.bitmaps]
466
	mov	edi,[ebp+SKIN_HEADER.bitmaps]
536
        add     edi,ebp
467
	add	edi,ebp
537
        xor     ebx,ebx
468
	xor	ebx,ebx
-
 
469
;--------------------------------------
-
 
470
.lp1:
538
  .lp1: cmp     dword[edi],0
471
	cmp	dword[edi],0
539
        je      .lp2
472
	je	.lp2
-
 
473
 
540
        cmp     dword[edi+0],eax
474
	cmp	dword[edi+0],eax
541
        jne     @f
475
	jne	@f
-
 
476
;--------------------------------------
542
        mov     ebx,[edi+SKIN_BITMAPS._data]
477
	mov	ebx,[edi+SKIN_BITMAPS._data]
543
        add     ebx,ebp
478
	add	ebx,ebp
544
        mov     ecx,[ebx-2]
479
	mov	ecx,[ebx-2]
545
        mov     cx,[ebx+4]
480
	mov	cx,[ebx+4]
546
        add     ebx,8
481
	add	ebx,8
-
 
482
;--------------------------------------
547
  .lp2: ret
483
.lp2:
-
 
484
	ret
-
 
485
;--------------------------------------
-
 
486
@@:
548
    @@: add     edi,8
487
	add	edi,8
549
        jmp     .lp1
488
	jmp	.lp1
550
;----------------------------------------------------------------------
489
;----------------------------------------------------------------------
551
dec_edx:
490
dec_edx:
552
        sub     dl,4
491
	sub	dl,4
553
        jnc     @f
492
	jnc	@f
-
 
493
 
554
        xor     dl,dl
494
	xor	dl,dl
-
 
495
;--------------------------------------
-
 
496
@@:
555
    @@: sub     dh,4
497
	sub	dh,4
556
        jnc     @f
498
	jnc	@f
-
 
499
 
557
        xor     dh,dh
500
	xor	dh,dh
-
 
501
;--------------------------------------
-
 
502
@@:
558
    @@: rol     edx,16
503
	rol	edx,16
559
        sub     dl,4
504
	sub	dl,4
560
        jnc     @f
505
	jnc	@f
-
 
506
 
561
        xor     dl,dl
507
	xor	dl,dl
-
 
508
;--------------------------------------
-
 
509
@@:
562
    @@: rol     edx,16
510
	rol	edx,16
563
        ret
511
	ret
564
;----------------------------------------------------------------------
512
;----------------------------------------------------------------------
565
area:
513
area:
566
  .x      = 345
514
  .x      = 345
567
  .y      = 20
515
  .y      = 20
568
  .width  = 206
516
  .width  = 206
569
  .height = 191
517
  .height = 191
570
 
-
 
-
 
518
;--------------------------------------
571
wnd1:
519
wnd1:
572
  .x      = area.x+49
520
  .x      = area.x+49
573
  .y      = area.y+5
521
  .y      = area.y+5
574
  .width  = 150
522
  .width  = 150
575
  .height = 90
523
  .height = 90
-
 
524
;--------------------------------------
576
wnd2:
525
wnd2:
577
  .x      = area.x+35
526
  .x      = area.x+35
578
  .y      = area.y+35
527
  .y      = area.y+35
579
  .width  = 150
528
  .width  = 150
580
  .height = 90
529
  .height = 90
-
 
530
;--------------------------------------
581
wnd3:
531
wnd3:
582
  .x      = area.x+21
532
  .x      = area.x+21
583
  .y      = area.y+65
533
  .y      = area.y+65
584
  .width  = 150
534
  .width  = 150
585
  .height = 90
535
  .height = 90
-
 
536
;--------------------------------------
586
wnd4:
537
wnd4:
587
  .x      = area.x+7
538
  .x      = area.x+7
588
  .y      = area.y+95
539
  .y      = area.y+95
589
  .width  = 150
540
  .width  = 150
590
  .height = 90
541
  .height = 90
591
 
-
 
-
 
542
;--------------------------------------
592
virtual at edi+SKIN_PARAMS.dtp.data
543
virtual at edi+SKIN_PARAMS.dtp.data
593
  dtp system_colors
544
	dtp system_colors
594
end virtual
545
end virtual
595
;----------------------------------------------------------------------
546
;----------------------------------------------------------------------
596
draw_skin:
547
draw_skin:
597
        mcall   13,,,0x00FFFFFF
548
	mcall	13,,,0x00FFFFFF
598
 
-
 
599
        mov     ebp,not_packed_area
549
	mov	ebp,not_packed_area
600
        mov     edi,[ebp+SKIN_HEADER.params]
550
	mov	edi,[ebp+SKIN_HEADER.params]
601
        add     edi,ebp
551
	add	edi,ebp
602
        mpack   ebx,wnd1.x,wnd1.width
552
	mpack	ebx,wnd1.x,wnd1.width
603
        mpack   ecx,wnd1.y,wnd1.height
553
	mpack	ecx,wnd1.y,wnd1.height
604
        mov     edx,[dtp.frame]
554
	mov	edx,[dtp.frame]
605
        call    draw_framerect
555
	call	draw_framerect
606
        mcall   13,,,dword[dtp.work]
556
	mcall	13,,,dword[dtp.work]
607
 
-
 
608
        mov     eax,38
557
	mov	eax,38
609
        mpack   ebx,wnd1.x+1,wnd1.x+wnd1.width-2
558
	mpack	ebx,wnd1.x+1,wnd1.x+wnd1.width-2
610
        mpack   ecx,wnd1.y+1,wnd1.y+1
559
	mpack	ecx,wnd1.y+1,wnd1.y+1
611
        mov     edx,[dtp.grab]
560
	mov	edx,[dtp.grab]
612
        mov     esi,20
561
	mov	esi,20
-
 
562
;--------------------------------------
-
 
563
@@:
613
    @@: mcall
564
	mcall
614
        call    dec_edx
565
	call	dec_edx
615
        add     ecx,0x00010001
566
	add	ecx,0x00010001
616
        dec     esi
567
	dec	esi
617
        jnz     @b
568
	jnz	@b
Line 618... Line 569...
618
 
569
 
619
        mov     edi,[ebp+SKIN_HEADER.params]
570
	mov	edi,[ebp+SKIN_HEADER.params]
620
        add     edi,ebp
571
	add	edi,ebp
621
        mcall   4,,dword[dtp.grab_text],caption_text,caption_text.size
-
 
622
 
572
	mcall	4,,dword[dtp.grab_text],caption_text,caption_text.size
623
        mcall   8,,,0,[dtp.grab_button]
573
	mcall	8,,,0,[dtp.grab_button]
624
        mcall   4,,dword[dtp.grab_button_text],close_text,close_text.size
-
 
625
 
574
	mcall	4,,dword[dtp.grab_button_text],close_text,close_text.size
626
;----------------------------------------------------------------------
-
 
627
 
575
;----------------------------------------------------------------------
628
        mov     edi,[ebp+SKIN_HEADER.params]
576
	mov	edi,[ebp+SKIN_HEADER.params]
629
        add     edi,ebp
577
	add	edi,ebp
630
        mpack   ebx,wnd2.x,wnd2.width
578
	mpack	ebx,wnd2.x,wnd2.width
631
        mpack   ecx,wnd2.y,wnd2.height
579
	mpack	ecx,wnd2.y,wnd2.height
Line 647... Line 595...
647
        mov     eax,38
595
	mov	eax,38
648
        mpack   ebx,wnd2.x+4,wnd2.x+wnd2.width-5
596
	mpack	ebx,wnd2.x+4,wnd2.x+wnd2.width-5
649
        mpack   ecx,wnd2.y+4,wnd2.y+4
597
	mpack	ecx,wnd2.y+4,wnd2.y+4
650
        mov     edx,[dtp.grab]
598
	mov	edx,[dtp.grab]
651
        mov     esi,16
599
	mov	esi,16
-
 
600
;--------------------------------------
-
 
601
@@:
652
    @@: mcall
602
	mcall
653
        call    dec_edx
603
	call	dec_edx
654
        add     ecx,0x00010001
604
	add	ecx,0x00010001
655
        dec     esi
605
	dec	esi
656
        jnz     @b
606
	jnz	@b
Line 657... Line 607...
657
 
607
 
658
        mov     edi,[ebp+SKIN_HEADER.params]
608
	mov	edi,[ebp+SKIN_HEADER.params]
659
        add     edi,ebp
609
	add	edi,ebp
660
        mcall   4,,dword[dtp.grab_text],caption_text,caption_text.size
-
 
661
 
610
	mcall	4,,dword[dtp.grab_text],caption_text,caption_text.size
662
        mcall   8,,,0,[dtp.grab_button]
611
	mcall	8,,,0,[dtp.grab_button]
663
        mcall   4,,dword[dtp.grab_button_text],close_text,close_text.size
-
 
664
 
612
	mcall	4,,dword[dtp.grab_button_text],close_text,close_text.size
665
;----------------------------------------------------------------------
-
 
666
 
613
;----------------------------------------------------------------------
667
        mov     edi,[ebp+SKIN_HEADER.params]
614
	mov	edi,[ebp+SKIN_HEADER.params]
668
        add     edi,ebp
615
	add	edi,ebp
669
        mpack   ebx,wnd3.x,wnd3.width
616
	mpack	ebx,wnd3.x,wnd3.width
670
        mpack   ecx,wnd3.y,wnd3.height
617
	mpack	ecx,wnd3.y,wnd3.height
Line 693... Line 640...
693
        mov     esi,wnd3.x+wnd3.width-1
640
	mov	esi,wnd3.x+wnd3.width-1
694
        sub     esi,edx
641
	sub	esi,edx
695
        shl     edx,16
642
	shl	edx,16
696
        add     edx,wnd3.x*65536+wnd3.y
643
	add	edx,wnd3.x*65536+wnd3.y
697
        mcall   7
644
	mcall	7
-
 
645
;--------------------------------------
-
 
646
@@:
698
    @@: rol     edx,16
647
	rol	edx,16
699
        add     dx,[ebx-8]
648
	add	dx,[ebx-8]
700
        cmp     dx,si
649
	cmp	dx,si
701
        ja      @f
650
	ja	@f
-
 
651
 
702
        rol     edx,16
652
	rol	edx,16
703
        mcall   7
653
	mcall	7
704
        jmp     @b
654
	jmp	@b
-
 
655
;--------------------------------------
705
    @@:
656
@@:
706
 
-
 
707
        mov     eax,0x00000002 ; oper, inactive
657
	mov	eax,0x00000002 ; oper, inactive
708
        call    find_bitmap
658
	call	find_bitmap
709
        mov     edx,ecx
659
	mov	edx,ecx
710
        shr     edx,16
660
	shr	edx,16
711
        neg     edx
661
	neg	edx
Line 723... Line 673...
723
        add     ax,[edi+SKIN_PARAMS.margin.top]
673
	add	ax,[edi+SKIN_PARAMS.margin.top]
724
        add     ax,-4
674
	add	ax,-4
725
        push    eax
675
	push	eax
726
        lea     ebx,[eax+wnd3.x*65536+wnd3.y]
676
	lea	ebx,[eax+wnd3.x*65536+wnd3.y]
727
        mcall   4,,dword[dtp.grab_text],caption_text,caption_text.size
677
	mcall	4,,dword[dtp.grab_text],caption_text,caption_text.size
728
 
-
 
729
;---------------------------------------------------------
678
;---------------------------------------------------------
730
 
-
 
731
        mov     edi,[ebp+SKIN_HEADER.params]
679
	mov	edi,[ebp+SKIN_HEADER.params]
732
        add     edi,ebp
680
	add	edi,ebp
733
        mpack   ebx,wnd4.x,wnd4.width
681
	mpack	ebx,wnd4.x,wnd4.width
734
        mpack   ecx,wnd4.y,wnd4.height
682
	mpack	ecx,wnd4.y,wnd4.height
735
        mov     edx,[edi+SKIN_PARAMS.colors.outer]
683
	mov	edx,[edi+SKIN_PARAMS.colors.outer]
Line 757... Line 705...
757
        mov     esi,wnd4.x+wnd4.width-1
705
	mov	esi,wnd4.x+wnd4.width-1
758
        sub     esi,edx
706
	sub	esi,edx
759
        shl     edx,16
707
	shl	edx,16
760
        add     edx,wnd4.x*65536+wnd4.y
708
	add	edx,wnd4.x*65536+wnd4.y
761
        mcall   7
709
	mcall	7
-
 
710
;--------------------------------------
-
 
711
@@:
762
    @@: rol     edx,16
712
	rol	edx,16
763
        add     dx,[ebx-8]
713
	add	dx,[ebx-8]
764
        cmp     dx,si
714
	cmp	dx,si
765
        ja      @f
715
	ja	@f
-
 
716
 
766
        rol     edx,16
717
	rol	edx,16
767
        mcall   7
718
	mcall	7
768
        jmp     @b
719
	jmp	@b
-
 
720
;--------------------------------------
769
    @@:
721
@@:
770
 
-
 
771
        mov     eax,0x00010002 ; oper, inactive
722
	mov	eax,0x00010002 ; oper, inactive
772
        call    find_bitmap
723
	call	find_bitmap
773
        mov     edx,ecx
724
	mov	edx,ecx
774
        shr     edx,16
725
	shr	edx,16
775
        neg     edx
726
	neg	edx
Line 781... Line 732...
781
        mov     edi,[ebp+SKIN_HEADER.params]
732
	mov	edi,[ebp+SKIN_HEADER.params]
782
        add     edi,ebp
733
	add	edi,ebp
783
        pop     eax
734
	pop	eax
784
        lea     ebx,[eax+wnd4.x*65536+wnd4.y]
735
	lea	ebx,[eax+wnd4.x*65536+wnd4.y]
785
        mcall   4,,dword[dtp.grab_text],caption_text,caption_text.size
736
	mcall	4,,dword[dtp.grab_text],caption_text,caption_text.size
786
 
-
 
787
;----------------------------------------------------------------------
737
;----------------------------------------------------------------------
788
 
-
 
789
        mov     edi,[ebp+SKIN_HEADER.buttons]
738
	mov	edi,[ebp+SKIN_HEADER.buttons]
790
        add     edi,ebp
739
	add	edi,ebp
-
 
740
;--------------------------------------
-
 
741
.lp1:
791
  .lp1: cmp     dword[edi],0
742
	cmp	dword[edi],0
792
        je      .lp2
743
	je	.lp2
-
 
744
 
793
        mov     ebx,dword[edi+SKIN_BUTTONS.left-2]
745
	mov	ebx,dword[edi+SKIN_BUTTONS.left-2]
794
        mov     bx,[edi+SKIN_BUTTONS.width]
746
	mov	bx,[edi+SKIN_BUTTONS.width]
795
        mov     ecx,dword[edi+SKIN_BUTTONS.top-2]
747
	mov	ecx,dword[edi+SKIN_BUTTONS.top-2]
796
        mov     cx,[edi+SKIN_BUTTONS.height]
748
	mov	cx,[edi+SKIN_BUTTONS.height]
797
        add     ebx,(wnd4.x+wnd4.width)*65536
749
	add	ebx,(wnd4.x+wnd4.width)*65536
Line 799... Line 751...
799
        dec     ebx
751
	dec	ebx
800
        dec     ecx
752
	dec	ecx
801
        mcall   8,,,0x40000000
753
	mcall	8,,,0x40000000
802
        add     edi,12
754
	add	edi,12
803
        jmp     .lp1
755
	jmp	.lp1
-
 
756
;--------------------------------------
804
  .lp2:
757
.lp2:
805
 
-
 
806
        mov     edi,[ebp+SKIN_HEADER.params]
758
	mov	edi,[ebp+SKIN_HEADER.params]
807
        add     edi,ebp
759
	add	edi,ebp
808
        mpack   ebx,wnd4.x+10,wnd4.y+10
760
	mpack	ebx,wnd4.x+10,wnd4.y+10
809
        add     bx,word[edi+SKIN_PARAMS.skin_height]
761
	add	bx,word[edi+SKIN_PARAMS.skin_height]
810
        mcall   4,,[dtp.work_text],window_text,window_text.size
762
	mcall	4,,[dtp.work_text],window_text,window_text.size
Line 821... Line 773...
821
 
773
 
822
        shr     ecx,16
774
	shr	ecx,16
823
        mov     bx,cx
775
	mov	bx,cx
824
        add     ebx,0x00060006
776
	add	ebx,0x00060006
825
        mcall   4,,[dtp.work_button_text],button_text,button_text.size
-
 
826
 
777
	mcall	4,,[dtp.work_button_text],button_text,button_text.size
827
        ret
778
	ret
828
;---------------------------------------------------------------------
779
;---------------------------------------------------------------------
829
draw_PathShow:
780
draw_PathShow:
830
	pusha
781
	pusha
Line 870... Line 821...
870
  flat_w  = (5*2+6*4)
821
  flat_w  = (5*2+6*4)
871
  apply_w = (5*2+6*7)
822
  apply_w = (5*2+6*7)
872
end if
823
end if
Line 873... Line 824...
873
 
824
 
874
; LOAD BUTTON
-
 
875
;	mov  ebx,15*65536+load_w
-
 
876
;	mov  ecx,(35+18*12)*65536+14
825
; LOAD BUTTON
877
	mcall	8,<15,load_w>,<35+18*12,14>,12,[w_work_button]
826
	mcall	8,<15,load_w>,<35+18*12,14>,12,[w_work_button]
878
; SAVE BUTTON
827
; SAVE BUTTON
879
	add	ebx,(load_w+2)*65536-load_w+save_w
828
	add	ebx,(load_w+2)*65536-load_w+save_w
880
	inc	edx
829
	inc	edx
Line 1265... Line 1214...
1265
.1:
1214
.1:
1266
db	'SKN',0
1215
	db 'SKN',0
1267
.end:
1216
.end:
1268
db	0
1217
	db 0
Line 1269... Line 1218...
1269
 
1218
 
-
 
1219
start_temp_file_name:
Line 1270... Line 1220...
1270
start_temp_file_name:	db 'default.dtp',0
1220
	db 'default.dtp',0
1271
 
1221
 
1272
default_skin:
1222
default_skin:
1273
	db '/sys/default.skn',0
1223
	db '/sys/default.skn',0
Line 1329... Line 1279...
1329
	rb 4096
1279
	rb 4096
1330
;---------------------------------------------------------------------
1280
;---------------------------------------------------------------------
1331
library_path:
1281
library_path:
1332
	rb 4096
1282
	rb 4096
1333
;---------------------------------------------------------------------
1283
;---------------------------------------------------------------------
1334
;fname_buf:
-
 
1335
;	rb 4096
-
 
1336
;---------------------------------------------------------------------
-
 
1337
temp_dir_pach:
1284
temp_dir_pach:
1338
	rb 4096
1285
	rb 4096
1339
;---------------------------------------------------------------------
1286
;---------------------------------------------------------------------
1340
temp_dir_pach2:
1287
temp_dir_pach2:
1341
	rb 4096
1288
	rb 4096