Subversion Repositories Kolibri OS

Rev

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

Rev 2522 Rev 2956
Line 4... Line 4...
4
;;   Distributed FOR KOLIBRIOS AND ITS DIRECT BRANCHES ONLY     ;;
4
;;   Distributed FOR KOLIBRIOS AND ITS DIRECT BRANCHES ONLY     ;;
5
;;     under conditions of the GNU General Public License       ;;
5
;;     under conditions of the GNU General Public License       ;;
6
;;                                                              ;;
6
;;                                                              ;;
7
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
7
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Line 8... Line 8...
8
 
8
 
Line 9... Line 9...
9
$Revision: 2522 $
9
$Revision: 2956 $
10
 
10
 
11
align 4
11
align 4
12
dtext_asciiz_esi:			   ; for skins title out
12
dtext_asciiz_esi:			   ; for skins title out
Line 144... Line 144...
144
	sar	ebx, 16 	; ebx=x
144
	sar	ebx, 16 	; ebx=x
145
	xchg	eax, ebx	; eax=x, ebx=y
145
	xchg	eax, ebx	; eax=x, ebx=y
Line 146... Line 146...
146
 
146
 
147
	xor	ebp, ebp	; font#
147
	xor	ebp, ebp	; font#
-
 
148
	mov	[font_check_routine], ebp
Line 148... Line 149...
148
	mov	[font_check_routine], ebp
149
;        inc     ebp
149
 
150
 
150
	test	ecx, ecx
151
	test	ecx, ecx
151
	js	.checked
152
	js	.checked
Line 185... Line 186...
185
font_check_routine  dd ?
186
font_check_routine  dd ?
Line 186... Line 187...
186
 
187
 
187
 
188
 
Line 188... Line 189...
188
 
189
 
Line 189... Line 190...
189
align 8
190
align 8
Line 190... Line 191...
190
sdsh_data:
191
nsvf_data:
Line 191... Line 192...
191
 
192
 
192
diff16 "sdsh_data      : ",0,$
193
diff16 "sdsh_data      : ",0,$
193
 
194
 
194
include 'fonts/sd_data.asm'
195
include 'fonts/sd_data.asm'
Line 219... Line 220...
219
 
220
 
220
nsvf_draw_char:
221
nsvf_draw_char:
221
; eax = left side X
222
; eax = left side X
222
; ebx = bottom Y
223
; ebx = bottom Y
223
; edi = colour 0x0RRGGBB
224
; edi = colour 0x0RRGGBB
224
; ebp = font@
225
; ebp = font#
225
; ecx = ascii, zero-extended to 32bits
226
; ecx = ascii, zero-extended to 32bits
226
	push	ecx
227
	push	ecx
227
	push	edx
228
	push	edx
228
	push	ebp
229
	push	ebp
229
	shl	ebp, 4
230
	shl	ebp, 5
230
	add	ebp, sdsh_data.info
231
	add	ebp, nsvf_info
231
	call   ch_checkscreen
232
	call   ch_checkscreen
232
	jb	       .exit
233
	jb	       .exit
233
	call   ch_checkwin
234
	call   ch_checkwin
234
	jc	       .exit
235
	jc	       .exit
235
	mov	edx, [ebp + 4]		    ; chartable addr
236
	mov	edx, [ebp + 4]		    ; chartable addr
-
 
237
	mov	cx, word[edx + ecx*2]	    ; tick info
236
	mov	cx, word[edx + ecx*2]	    ; tick info
238
	and   cx, 0xFFE7		  ; bits 3,4 used for width control
237
	mov	edx, ecx
239
	mov	edx, ecx
238
	and	ecx, 7			    ; cl = number of ticks
240
	and	ecx, 7			    ; cl = number of ticks
239
	jz	.blank
241
	jz	.blank
240
	shr	edx, 4			    ; offset in the chartable
242
	shr	edx, 4			    ; offset in the chartable
241
	add	edx, sdsh_data.chars	    ; edx -> the char's ticklist
243
	add	edx, [ebp + 12] 	    ; edx -> the char's ticklist
242
.next_tick:
244
.next_tick:
243
	call	parse_tick
245
	call	parse_tick
244
	add	edx, 2
246
	add	edx, 2
245
	dec	cl
247
	dec	cl
Line 285... Line 287...
285
	jae	.gptick.2
287
	jae	.gptick.2
286
	sub	dl, 38
288
	sub	dl, 38
Line 287... Line 289...
287
 
289
 
288
.gptick.1:
290
.gptick.1:
289
	;  1-byte tickgroups .v1-v4:
291
	;  1-byte tickgroups .v1-v4:
290
	lea	esi, [sdsh_data.v1+edx]
292
	lea	esi, [nsvf.v1+edx]
291
	inc	dh		  ; dh = 1 vertex
293
	inc	dh		  ; dh = 1 vertex
292
	sub	dl, 2			; .v1 : 2 ticks only (#38, 39)
294
	sub	dl, 2			; .v1 : 2 ticks only (#38, 39)
293
	jae	.gptick.1v2v4
295
	jae	.gptick.1v2v4
294
	mov	dl, dh
296
	mov	dl, dh
Line 305... Line 307...
305
.gptick.2:
307
.gptick.2:
306
	; 2-byte tickgroups .v5-v8: 8 ticks each
308
	; 2-byte tickgroups .v5-v8: 8 ticks each
307
	cmp	dl, 112
309
	cmp	dl, 112
308
	jae	.gptick.3
310
	jae	.gptick.3
309
	sub	dl, 80
311
	sub	dl, 80
310
	lea	esi, [sdsh_data.v5 + edx*2]
312
	lea	esi, [nsvf.v5 + edx*2]
311
	mov	dh, 5
313
	mov	dh, 5
312
	shr	dl, 3
314
	shr	dl, 3
313
	jmp	.gptick.done
315
	jmp	.gptick.done
Line 314... Line 316...
314
 
316
 
315
.gptick.3:
317
.gptick.3:
316
	; 3-byte tickgroups .v9-12: 4 ticks each
318
	; 3-byte tickgroups .v9-12: 4 ticks each
317
	cmp	dl, 128
319
	cmp	dl, 128
318
	jae	.gptick.4
320
	jae	.gptick.4
319
	sub	dl, 112
321
	sub	dl, 112
320
	lea	esi, [sdsh_data.v9 + edx*2 + edx]
322
	lea	esi, [nsvf.v9 + edx*2 + edx]
321
	mov	dh, 9
323
	mov	dh, 9
322
	shr	dl, 2
324
	shr	dl, 2
Line 323... Line 325...
323
	jmp	.gptick.done
325
	jmp	.gptick.done
324
 
326
 
325
.gptick.4:
327
.gptick.4:
326
	; 4-byte tickgroups .v13-16: 4 ticks each
328
	; 4-byte tickgroups .v13-16: 4 ticks each
327
	cmp	dl, 128 		; fix this when needed
329
	cmp	dl, 128 		; fix this when needed
328
	jae	.exit			; not implemented yet!
330
	jae	.exit			; not implemented yet!
329
	sub	dl, 128
331
	sub	dl, 128
330
	lea	esi, [sdsh_data.v13 + edx*4]
332
	lea	esi, [nsvf.v13 + edx*4]
Line 331... Line 333...
331
	mov	dh, 13
333
	mov	dh, 13
332
	shr	dl, 2
334
	shr	dl, 2
Line 346... Line 348...
346
	mov	dl, 6
348
	mov	dl, 6
347
	jz	.cstick.1		; 8-pix square outline
349
	jz	.cstick.1		; 8-pix square outline
348
@@:	dec	dl
350
@@:	dec	dl
349
	jz	.cstick.2
351
	jz	.cstick.2
350
.cstick.3:
352
.cstick.3:
351
	mov	esi, sdsh_data.cs3	; 12pix-ring
353
	mov	esi, nsvf_data.cs3	; 12pix-ring
352
	mov	dl, 10
354
	mov	dl, 10
353
	jmp	.draw
355
	jmp	.draw
354
.cstick.2:
356
.cstick.2:
355
	mov	dl, 7			; 9-pix filled square
357
	mov	dl, 7			; 9-pix filled square
356
.cstick.1:
358
.cstick.1:
357
	mov	esi, sdsh_data.cs2	; the square tickfield
359
	mov	esi, nsvf_data.cs2	; the square tickfield
358
	jmp	.draw
360
	jmp	.draw
359
.cstick.0:
361
.cstick.0:
360
	mov	esi, sdsh_data.cs0	; 4pix-square
362
	mov	esi, nsvf_data.cs0	; 4pix-square
361
	mov	dl, 2
363
	mov	dl, 2
362
	jmp	.draw
364
	jmp	.draw
Line 363... Line 365...
363
 
365
 
364
.ritick:
366
.ritick:
Line 372... Line 374...
372
	shr	cl, 4		    ; x
374
	shr	cl, 4		    ; x
373
	add	eax, ecx
375
	add	eax, ecx
374
	call	ch_putpixel
376
	call	ch_putpixel
375
	jmp	.exit
377
	jmp	.exit
376
.ritick.1:
378
.ritick.1:
377
	mov	esi, sdsh_data.ri1  ; 8pix-ring
379
	mov	esi, nsvf_data.ri1  ; 8pix-ring
378
	mov	dl, 6
380
	mov	dl, 6
379
	jmp	.draw
381
	jmp	.draw
Line 380... Line 382...
380
 
382
 
381
.lntick.short:
383
.lntick.short:
Line 388... Line 390...
388
	add	dl, 8
390
	add	dl, 8
389
.lntick.both:
391
.lntick.both:
390
	sub	dl, 2		    ; num_vertice = num_points - 2
392
	sub	dl, 2		    ; num_vertice = num_points - 2
391
	and	cl, 0x18	    ; two (lower) rotation bits
393
	and	cl, 0x18	    ; two (lower) rotation bits
392
	shr	cl, 3
394
	shr	cl, 3
393
	mov	esi, sdsh_data.blank
395
	mov	esi, nsvf_data.blank
Line 394... Line 396...
394
 
396
 
395
.draw:
397
.draw:
396
; cl = rot; dl = numvert; dh = orig.xy
398
; cl = rot; dl = numvert; dh = orig.xy
397
	push	ecx
399
	push	ecx
Line 582... Line 584...
582
	mov	[edx+4], edi
584
	mov	[edx+4], edi
583
     pop    edx
585
     pop    edx
584
     ret
586
     ret
Line 585... Line 587...
585
 
587