Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
31 halyavin 1
;--------------------------------------------------------------
2
; DRAW_TABLE
3
;--------------------------------------------------------------
4
draw_table:	mov esi,table_tetris+LEN_X*BORDER_TOP+BORDER_LEFT
5
 
6
		mov ebx,X_LOCATION*65536+ADOBE_SIZE
7
		mov ecx,Y_LOCATION*65536+ADOBE_SIZE
8
		mov edi,LEN_Y-BORDER_TOP-BORDER_BOTTOM
9
y_draw: 	push edi
10
 
11
		mov edi,LEN_X-BORDER_LEFT-BORDER_RIGHT
12
x_draw: 	push edi
13
		mov ax,13
14
		movzx edx,byte [esi]
15
		mov edx,[color_table+edx*4]
16
		int 0x40
17
		call draw_frames
18
		inc esi
19
		add ebx,65536*ADOBE_SIZE
20
		pop edi
21
		dec edi
22
		jnz x_draw
23
 
24
		add esi,BORDER_LEFT+BORDER_RIGHT
25
		mov ebx,X_LOCATION*65536+ADOBE_SIZE
26
		add ecx,65536*ADOBE_SIZE
27
		pop edi
28
		dec edi
29
		jnz y_draw
30
 
31
		ret
32
 
33
;--------------------------------------------------------------
34
 
35
clear_table_tetris:
36
		cld
37
		mov al,1
38
		mov edi,table_tetris
39
		mov ecx,LEN_X*BORDER_TOP
40
		rep stosb
41
 
42
		mov edx,LEN_Y-BORDER_TOP-BORDER_BOTTOM
43
adr300: 	mov cl,BORDER_LEFT
44
		rep stosb
45
		dec ax	;AL=0
46
		mov cl,LEN_X-BORDER_LEFT-BORDER_RIGHT
47
		rep stosb
48
		inc ax	;AL=1
49
		mov cl,BORDER_RIGHT
50
		rep stosb
51
		dec dx
52
		jne adr300
53
 
54
		mov ecx,LEN_X*BORDER_BOTTOM
55
		rep stosb
56
		ret