Subversion Repositories Kolibri OS

Rev

Rev 1717 | Go to most recent revision | Only display areas with differences | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1717 Rev 1720
1
;
1
;
2
; ¢ í⮬ ä ©«¥ ᮡ࠭ë ä㭪樨 à¨áãî騥 ®ª­® ª®­áâàãªâ®à 
2
; ¢ í⮬ ä ©«¥ ᮡ࠭ë ä㭪樨 à¨áãî騥 ®ª­® ª®­áâàãªâ®à 
3
;
3
;
4
 
4
 
5
macro move_to_skin coord_x,coord_y
5
macro move_to_skin coord_x,coord_y
6
{
6
{
7
	add coord_x,SKIN_W1
7
	add coord_x,SKIN_W1
8
	add coord_y,SKIN_H
8
	add coord_y,SKIN_H
9
}
9
}
10
 
10
 
11
;¯¥à¥à¨á®¢ª  ®ª­  ª®­áâàãªâ®à 
11
;¯¥à¥à¨á®¢ª  ®ª­  ª®­áâàãªâ®à 
12
align 4
12
align 4
13
draw_constructor:
13
draw_constructor:
14
	stdcall [buf2d_clear], buf_fon,0xffffff
14
	stdcall [buf2d_clear], buf_fon,0xffffff
15
 
15
 
16
pushad
16
pushad
17
	cmp [err_ini1],1
17
	cmp [err_ini1],1
18
	jne @f
18
	jne @f
19
		stdcall [buf2d_draw_text], buf_fon, buf_font,txtErrIni1,10,10,\
19
		stdcall [buf2d_draw_text], buf_fon, buf_font,txtErrIni1,10,10,\
20
			0xff0000 ;à¨á㥬 áâபã á ⥪á⮬
20
			0xff0000 ;à¨á㥬 áâபã á ⥪á⮬
21
		stdcall [buf2d_draw_text], buf_fon, buf_font,fp_obj_opt,10,20,\
21
		stdcall [buf2d_draw_text], buf_fon, buf_font,fp_obj_opt,10,20,\
22
			0xff0000 ;à¨á㥬 áâபã á ⥪á⮬
22
			0xff0000 ;à¨á㥬 áâபã á ⥪á⮬
23
		jmp .end_draw
23
		jmp .end_draw
24
	@@:
24
	@@:
25
 
25
 
26
	mov edx,C_WND
26
	mov edx,C_WND
27
	stdcall find_obj_in_file,edx ;eax - 㪠§ â¥«ì ­  áâàãªâãàã ®ª­ 
27
	stdcall find_obj_in_file,edx ;eax - 㪠§ â¥«ì ­  áâàãªâãàã ®ª­ 
28
	cmp eax,0
28
	cmp eax,0
29
	je .end_draw
29
	je .end_draw
30
	mov dword[obj_m_win],eax
30
	mov dword[obj_m_win],eax
31
 
31
 
32
	;4-width
32
	;4-width
33
	stdcall get_obj_text_col,[obj_m_win],4 ;edx = offset
33
	stdcall get_obj_text_col,[obj_m_win],4 ;edx = offset
34
	stdcall conv_str_to_int,edx
34
	stdcall conv_str_to_int,edx
35
	mov ecx,eax ;ecx=width
35
	mov ecx,eax ;ecx=width
36
 
36
 
37
	;5-height
37
	;5-height
38
	stdcall get_obj_text_col,[obj_m_win],5 ;edx = offset
38
	stdcall get_obj_text_col,[obj_m_win],5 ;edx = offset
39
	stdcall conv_str_to_int,edx
39
	stdcall conv_str_to_int,edx
40
	;eax=height
40
	;eax=height
41
 
41
 
42
	stdcall [buf2d_rect_by_size], buf_fon, 0,0,ecx,eax, dword[sc.frame] ;à¨á㥬 ¢­¥è­îî à ¬ªã ®ª­ 
42
	stdcall [buf2d_rect_by_size], buf_fon, 0,0,ecx,eax, dword[sc.frame] ;à¨á㥬 ¢­¥è­îî à ¬ªã ®ª­ 
43
	sub eax,2
43
	sub eax,2
44
	sub ecx,2
44
	sub ecx,2
45
	stdcall [buf2d_filled_rect_by_size], buf_fon, 1,1,ecx,eax, dword[sc.grab] ;à¨á㥬 ä®­ à ¬ª¨ ®ª­ 
45
	stdcall [buf2d_filled_rect_by_size], buf_fon, 1,1,ecx,eax, dword[sc.grab] ;à¨á㥬 ä®­ à ¬ª¨ ®ª­ 
46
 
46
 
47
	sub eax,6
47
	sub eax,6
48
	sub ecx,6
48
	sub ecx,6
49
	stdcall [buf2d_rect_by_size], buf_fon, 4,4,ecx,eax, dword[sc.frame] ;à¨á㥬 ¢­ãâ७­îî à ¬ªã ®ª­ 
49
	stdcall [buf2d_rect_by_size], buf_fon, 4,4,ecx,eax, dword[sc.frame] ;à¨á㥬 ¢­ãâ७­îî à ¬ªã ®ª­ 
50
	sub eax,2
50
	sub eax,2
51
	sub ecx,2
51
	sub ecx,2
52
	stdcall [buf2d_filled_rect_by_size], buf_fon, 5,5,ecx,eax, dword[sc.work] ;à¨á㥬 ä®­ ®ª­ 
52
	stdcall [buf2d_filled_rect_by_size], buf_fon, 5,5,ecx,eax, dword[sc.work] ;à¨á㥬 ä®­ ®ª­ 
53
 
53
 
54
;---;---;---
54
;---;---;---
55
;jmp .end_skin
55
;jmp .end_skin
56
;---;---;---
56
;---;---;---
57
 
57
 
58
	stdcall get_obj_text_col,[obj_m_win],1
58
	stdcall get_obj_text_col,[obj_m_win],1
59
	stdcall conv_str_to_int,edx ;eax = window style
59
	stdcall conv_str_to_int,edx ;eax = window style
60
	cmp eax,3
60
	cmp eax,3
61
	jl .end_skin
61
	jl .end_skin
62
		stdcall [buf2d_bit_blt], buf_fon, 0,0, buf_skin1 ;«¥¢ë© ᪨­
62
		stdcall [buf2d_bit_blt], buf_fon, 0,0, buf_skin1 ;«¥¢ë© ᪨­
63
		mov edi,buf_skin1
63
		mov edi,buf_skin1
64
		mov eax,buf2d_w ;eax - ¯®§¨æ¨ï ¤«ï à¨á®¢ ­¨ï á।­¥£® ᪨­ 
64
		mov eax,buf2d_w ;eax - ¯®§¨æ¨ï ¤«ï à¨á®¢ ­¨ï á।­¥£® ᪨­ 
65
		mov edi,buf_skin2
65
		mov edi,buf_skin2
66
		mov ebx,buf2d_w ;ebx - è¨à¨­  «¥¢®£® ᪨­ 
66
		mov ebx,buf2d_w ;ebx - è¨à¨­  «¥¢®£® ᪨­ 
67
		sub ecx,ebx ;®â­¨¬ ¥¬ ®â è¨à¨­ë ®ª­  è¨à¨­ã á।­¥£® ᪨­ 
67
		sub ecx,ebx ;®â­¨¬ ¥¬ ®â è¨à¨­ë ®ª­  è¨à¨­ã á।­¥£® ᪨­ 
68
		@@:
68
		@@:
69
			stdcall [buf2d_bit_blt], buf_fon, eax,0, buf_skin2 ;¯à®à¨á®¢ª  á।­¥£® ᪨­ 
69
			stdcall [buf2d_bit_blt], buf_fon, eax,0, buf_skin2 ;¯à®à¨á®¢ª  á।­¥£® ᪨­ 
70
			add eax,ebx
70
			add eax,ebx
71
			cmp eax,ecx ;áà ¢­¨¢ ¥¬ ¯®§¨æ¨î á।­¥£® ᪨­  á è¨à¨­®© ®ª­ 
71
			cmp eax,ecx ;áà ¢­¨¢ ¥¬ ¯®§¨æ¨î á।­¥£® ᪨­  á è¨à¨­®© ®ª­ 
72
			jl @b
72
			jl @b
73
 
73
 
74
		;4-width
74
		;4-width
75
		stdcall get_obj_text_col,[obj_m_win],4 ;edx = offset
75
		stdcall get_obj_text_col,[obj_m_win],4 ;edx = offset
76
		stdcall conv_str_to_int,edx
76
		stdcall conv_str_to_int,edx
77
		mov edi,buf_skin3
77
		mov edi,buf_skin3
78
		sub eax,buf2d_w ;®â­¨¬ ¥¬ è¨à¨­ã ¯à ¢®£® ᪨­ 
78
		sub eax,buf2d_w ;®â­¨¬ ¥¬ è¨à¨­ã ¯à ¢®£® ᪨­ 
79
		stdcall [buf2d_bit_blt], buf_fon, eax,0, buf_skin3 ;¯à®à¨á®¢ª  ¯à ¢®£® ᪨­ 
79
		stdcall [buf2d_bit_blt], buf_fon, eax,0, buf_skin3 ;¯à®à¨á®¢ª  ¯à ¢®£® ᪨­ 
80
	.end_skin:
80
	.end_skin:
81
 
81
 
82
	;à¨á㥬 £à ä¨ç¥áª¨¥ í«¥¬¥­âë
82
	;à¨á㥬 £à ä¨ç¥áª¨¥ í«¥¬¥­âë
83
	mov edx,C_BUT
83
	mov edx,C_BUT
84
	stdcall draw_arr_objects, edx,draw_obj_but
84
	stdcall draw_arr_objects, edx,draw_obj_but
85
	mov edx,C_EDB
85
	mov edx,C_EDB
86
	stdcall draw_arr_objects, edx,draw_obj_edit
86
	stdcall draw_arr_objects, edx,draw_obj_edit
87
	mov edx,C_CHB
87
	mov edx,C_CHB
88
	stdcall draw_arr_objects, edx,draw_obj_check
88
	stdcall draw_arr_objects, edx,draw_obj_check
89
	mov edx,C_DTT
89
	mov edx,C_DTT
90
	stdcall draw_arr_objects, edx,draw_obj_text
90
	stdcall draw_arr_objects, edx,draw_obj_text
91
	mov edx,C_REC
91
	mov edx,C_REC
92
	stdcall draw_arr_objects, edx,draw_obj_rect_f13
92
	stdcall draw_arr_objects, edx,draw_obj_rect_f13
93
 
93
 
94
	.end_draw:
94
	.end_draw:
95
popad
95
popad
96
	ret
96
	ret
97
 
97
 
98
;äã­ªæ¨ï à¨áã¥â ¬ áá¨¢ë ®¯à¥¤¥«¥­­ëå í«¥¬¥­â®¢
98
;äã­ªæ¨ï à¨áã¥â ¬ áá¨¢ë ®¯à¥¤¥«¥­­ëå í«¥¬¥­â®¢
99
align 4
99
align 4
100
proc draw_arr_objects, obj_t:dword,p_fun_draw:dword
100
proc draw_arr_objects, obj_t:dword,p_fun_draw:dword
101
push eax ebx
101
push eax ebx
102
	stdcall find_obj_in_file,[obj_t] ;eax - 㪠§ â¥«ì ­  áâàãªâãàã ®¡ê¥ªâ 
102
	stdcall find_obj_in_file,[obj_t] ;eax - 㪠§ â¥«ì ­  áâàãªâãàã ®¡ê¥ªâ 
103
	cmp eax,0
103
	cmp eax,0
104
	je .end_draw_o
104
	je .end_draw_o
105
		mov ebx,[p_fun_draw]
105
		mov ebx,[p_fun_draw]
106
		stdcall ebx,eax
106
		stdcall ebx,eax
107
		@@:
107
		@@:
108
			stdcall find_obj_in_file_next,[obj_t] ;eax - 㪠§ â¥«ì ­  áâàãªâãàã ®¡ê¥ªâ 
108
			stdcall find_obj_in_file_next,[obj_t] ;eax - 㪠§ â¥«ì ­  áâàãªâãàã ®¡ê¥ªâ 
109
			cmp eax,0
109
			cmp eax,0
110
			je .end_draw_o
110
			je .end_draw_o
111
				stdcall ebx,eax
111
				stdcall ebx,eax
112
		jmp @b
112
		jmp @b
113
	.end_draw_o:
113
	.end_draw_o:
114
pop ebx eax
114
pop ebx eax
115
	ret
115
	ret
116
endp
116
endp
117
 
117
 
118
;äã­ªæ¨ï à¨áã¥â ®¡ê¥ªâ ª­®¯ª¨, ¢ ®ª­¥ ª®­áâàãªâ®à 
118
;äã­ªæ¨ï à¨áã¥â ®¡ê¥ªâ ª­®¯ª¨, ¢ ®ª­¥ ª®­áâàãªâ®à 
119
align 4
119
align 4
120
proc draw_obj_but, p_obj:dword
120
proc draw_obj_but, p_obj:dword
121
locals
121
locals
122
	coor_x dd ?
122
	coor_x dd ?
123
	coor_y dd ?
123
	coor_y dd ?
124
endl
124
endl
125
	pushad
125
	pushad
126
		mov ebx,dword[p_obj]
126
		mov ebx,dword[p_obj]
127
		;1,2,3,4,5 - x,y,w,h,color
127
		;1,2,3,4,5 - x,y,w,h,color
128
 
128
 
129
		stdcall get_obj_text_col,ebx,1
129
		stdcall get_obj_text_col,ebx,1
130
		stdcall conv_str_to_int,edx
130
		stdcall conv_str_to_int,edx
131
		mov [coor_x],eax
131
		mov [coor_x],eax
132
		stdcall get_obj_text_col,ebx,2
132
		stdcall get_obj_text_col,ebx,2
133
		stdcall conv_str_to_int,edx
133
		stdcall conv_str_to_int,edx
134
		mov [coor_y],eax
134
		mov [coor_y],eax
135
		move_to_skin [coor_x],[coor_y]
135
		move_to_skin [coor_x],[coor_y]
136
		stdcall get_obj_text_col,ebx,3
136
		stdcall get_obj_text_col,ebx,3
137
		stdcall conv_str_to_int,edx
137
		stdcall conv_str_to_int,edx
138
		mov edi,eax
138
		mov edi,eax
139
		stdcall get_obj_text_col,ebx,4
139
		stdcall get_obj_text_col,ebx,4
140
		stdcall conv_str_to_int,edx
140
		stdcall conv_str_to_int,edx
141
		mov ecx,eax
141
		mov ecx,eax
142
		stdcall get_obj_text_col,ebx,5
142
		stdcall get_obj_text_col,ebx,5
143
		stdcall conv_str_to_int,edx
143
		stdcall conv_str_to_int,edx
144
		test_bool_prop ebx,BIT_MOD_BUT_NFON
144
		test_bool_prop ebx,BIT_MOD_BUT_NFON
145
		jc .no_draw_fon
145
		jc .no_draw_fon
146
			stdcall [buf2d_filled_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],edi,ecx,eax
146
			stdcall [buf2d_filled_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],edi,ecx,eax
147
			jmp @f
147
			jmp @f
148
		.no_draw_fon: ;­¥ ¯à®à¨á®¢ë¢ ¥¬ ª­®¯ªã
148
		.no_draw_fon: ;­¥ ¯à®à¨á®¢ë¢ ¥¬ ª­®¯ªã
149
			stdcall [buf2d_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],edi,ecx,eax
149
			stdcall [buf2d_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],edi,ecx,eax
150
		@@:
150
		@@:
151
	popad
151
	popad
152
	ret
152
	ret
153
endp
153
endp
154
 
154
 
155
;äã­ªæ¨ï à¨áã¥â ®¡ê¥ªâ ⥪á⮢®£® ¯®«ï, ¢ ®ª­¥ ª®­áâàãªâ®à 
155
;äã­ªæ¨ï à¨áã¥â ®¡ê¥ªâ ⥪á⮢®£® ¯®«ï, ¢ ®ª­¥ ª®­áâàãªâ®à 
156
align 4
156
align 4
157
proc draw_obj_edit, p_obj:dword
157
proc draw_obj_edit, p_obj:dword
158
locals
158
locals
159
	coor_x dd ?
159
	coor_x dd ?
160
	coor_y dd ?
160
	coor_y dd ?
161
	col_txt dd ? ;梥â ⥪âá 
161
	col_txt dd ? ;梥â ⥪âá 
162
endl
162
endl
163
	pushad
163
	pushad
164
		mov ebx,dword[p_obj]
164
		mov ebx,dword[p_obj]
165
		;1,2,3,4,...,6,...8,...,10 - w,x,y,col_fon,...,col_frame,...,col_txt,...,txt
165
		;1,2,3,4,...,6,...8,...,10 - w,x,y,col_fon,...,col_frame,...,col_txt,...,txt
166
 
166
 
167
		stdcall get_obj_text_col,ebx,2
167
		stdcall get_obj_text_col,ebx,2
168
		stdcall conv_str_to_int,edx
168
		stdcall conv_str_to_int,edx
169
		mov [coor_x],eax
169
		mov [coor_x],eax
170
		stdcall get_obj_text_col,ebx,3
170
		stdcall get_obj_text_col,ebx,3
171
		stdcall conv_str_to_int,edx
171
		stdcall conv_str_to_int,edx
172
		mov [coor_y],eax
172
		mov [coor_y],eax
173
		move_to_skin [coor_x],[coor_y]
173
		move_to_skin [coor_x],[coor_y]
174
		stdcall get_obj_text_col,ebx,1
174
		stdcall get_obj_text_col,ebx,1
175
		stdcall conv_str_to_int,edx
175
		stdcall conv_str_to_int,edx
176
		mov ecx,eax
176
		mov ecx,eax
177
		stdcall get_obj_text_col,ebx,6
177
		stdcall get_obj_text_col,ebx,6
178
		stdcall conv_str_to_int,edx
178
		stdcall conv_str_to_int,edx
179
		stdcall [buf2d_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],\
179
		stdcall [buf2d_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],\
180
			ecx,15, eax
180
			ecx,15, eax
181
 
181
 
182
		inc dword[coor_x]
182
		inc dword[coor_x]
183
		inc dword[coor_y]
183
		inc dword[coor_y]
184
		sub ecx,2
184
		sub ecx,2
185
		stdcall get_obj_text_col,ebx,4
185
		stdcall get_obj_text_col,ebx,4
186
		stdcall conv_str_to_int,edx
186
		stdcall conv_str_to_int,edx
187
		stdcall [buf2d_filled_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],\
187
		stdcall [buf2d_filled_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],\
188
			ecx,13, eax
188
			ecx,13, eax
189
 
189
 
190
		stdcall get_obj_text_col,ebx,8
190
		stdcall get_obj_text_col,ebx,8
191
		stdcall conv_str_to_int,edx
191
		stdcall conv_str_to_int,edx
192
		mov [col_txt],eax
192
		mov [col_txt],eax
193
		add [coor_x],2-1 ;ᬥ頥¬ ª®®à¤¨­ âã, çâ®-¡ë
193
		add [coor_x],2-1 ;ᬥ頥¬ ª®®à¤¨­ âã, çâ®-¡ë
194
		add [coor_y],4-1 ;⥪áâ ¡ë« ¢ ¯®«¥ ¢ë஢­¥­
194
		add [coor_y],4-1 ;⥪áâ ¡ë« ¢ ¯®«¥ ¢ë஢­¥­
195
		stdcall get_obj_text_col,ebx,10
195
		stdcall get_obj_text_col,ebx,10
196
		stdcall [buf2d_draw_text], buf_fon, buf_font,edx,dword[coor_x],dword[coor_y],\
196
		stdcall [buf2d_draw_text], buf_fon, buf_font,edx,dword[coor_x],dword[coor_y],\
197
			dword[col_txt] ;à¨á㥬 áâபã á ⥪á⮬
197
			dword[col_txt] ;à¨á㥬 áâபã á ⥪á⮬
198
 
198
 
199
	popad
199
	popad
200
	ret
200
	ret
201
endp
201
endp
202
 
202
 
203
;äã­ªæ¨ï à¨áã¥â ®¡ê¥ªâ ä« ¦ª , ¢ ®ª­¥ ª®­áâàãªâ®à 
203
;äã­ªæ¨ï à¨áã¥â ®¡ê¥ªâ ä« ¦ª , ¢ ®ª­¥ ª®­áâàãªâ®à 
204
align 4
204
align 4
205
proc draw_obj_check, p_obj:dword
205
proc draw_obj_check, p_obj:dword
206
locals
206
locals
207
	coor_x dd ?
207
	coor_x dd ?
208
	coor_y dd ?
208
	coor_y dd ?
209
	ot_txt dd ? ;®âáâ㯠¤«ï ⥪áâ 
209
	ot_txt dd ? ;®âáâ㯠¤«ï ⥪áâ 
-
 
210
	size_w dd ? ;à §¬¥à ª¢ ¤à â¨ª  w
210
	size_wh dd ? ;à §¬¥à ª¢ ¤à â¨ª 
211
	size_h dd ? ;à §¬¥à ª¢ ¤à â¨ª  h
211
	col_txt dd ? ;梥â ⥪âá 
212
	col_txt dd ? ;梥â ⥪âá 
212
endl
213
endl
213
	pushad
214
	pushad
214
		mov ebx,dword[p_obj]
215
		mov ebx,dword[p_obj]
215
		;1,2,3, 4,5,6, 7,8 - x,y,txt, col_fon,col_frame,col_txt, w_txt,w_h
216
		;1,2,3,4,5, 6,7,8, 9 - ot_x,ot_y,w,h,ot_w_txt, col_fon,col_frame,col_txt, txt
216
 
217
 
217
		stdcall get_obj_text_col,ebx,1
218
		stdcall get_obj_text_col,ebx,1 ;ot_x
218
		stdcall conv_str_to_int,edx
219
		stdcall conv_str_to_int,edx
219
		mov [coor_x],eax
220
		mov [coor_x],eax
220
		stdcall get_obj_text_col,ebx,2
221
		stdcall get_obj_text_col,ebx,2 ;ot_y
221
		stdcall conv_str_to_int,edx
222
		stdcall conv_str_to_int,edx
222
		mov [coor_y],eax
223
		mov [coor_y],eax
223
		move_to_skin [coor_x],[coor_y]
224
		move_to_skin [coor_x],[coor_y]
224
		stdcall get_obj_text_col,ebx,7
225
		stdcall get_obj_text_col,ebx,5 ;ot_w_txt
225
		stdcall conv_str_to_int,edx
226
		stdcall conv_str_to_int,edx
226
		mov [ot_txt],eax
227
		mov [ot_txt],eax
227
		stdcall get_obj_text_col,ebx,8
228
		stdcall get_obj_text_col,ebx,3 ;w
228
		stdcall conv_str_to_int,edx
229
		stdcall conv_str_to_int,edx
229
		dec eax ;à §¬¥à ¬¥­ìè¥ ­  1 ¯¨ªá¥«ì
230
		dec eax ;à §¬¥à ¬¥­ìè¥ ­  1 ¯¨ªá¥«ì
230
		mov [size_wh],eax
231
		mov [size_w],eax
231
		stdcall get_obj_text_col,ebx,5
232
		stdcall get_obj_text_col,ebx,4 ;h
-
 
233
		stdcall conv_str_to_int,edx
-
 
234
		dec eax ;à §¬¥à ¬¥­ìè¥ ­  1 ¯¨ªá¥«ì
-
 
235
		mov [size_h],eax
-
 
236
		stdcall get_obj_text_col,ebx,7 ;col_frame
232
		stdcall conv_str_to_int,edx
237
		stdcall conv_str_to_int,edx
233
		stdcall [buf2d_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],\
238
		stdcall [buf2d_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],\
234
			dword[size_wh],dword[size_wh], eax
239
			dword[size_w],dword[size_h], eax
-
 
240
 
235
 
241
		;§ «¨¢ª  ä®­  checkbox- 
236
		inc dword[coor_x]
242
		inc dword[coor_x]
-
 
243
		inc dword[coor_y]
237
		inc dword[coor_y]
244
		sub dword[size_w],2
238
		sub dword[size_wh],2
245
		sub dword[size_h],2
239
		stdcall get_obj_text_col,ebx,4
246
		stdcall get_obj_text_col,ebx,6 ;col_fon
240
		stdcall conv_str_to_int,edx
247
		stdcall conv_str_to_int,edx
241
		stdcall [buf2d_filled_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],\
248
		stdcall [buf2d_filled_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],\
-
 
249
			dword[size_w],dword[size_h], eax
-
 
250
 
-
 
251
		test_bool_prop ebx,BIT_MOD_CHE
-
 
252
		jnc @f
-
 
253
			;à¨á®¢ ­¨¥ ®â¬¥âª¨ ¢ checkbox-¥
-
 
254
			inc dword[coor_x]
-
 
255
			inc dword[coor_y]
-
 
256
			sub dword[size_w],2
-
 
257
			sub dword[size_h],2
-
 
258
			stdcall get_obj_text_col,ebx,7 ;col_frame
-
 
259
			stdcall conv_str_to_int,edx
-
 
260
			stdcall [buf2d_filled_rect_by_size], buf_fon, dword[coor_x],dword[coor_y],\
-
 
261
				dword[size_w],dword[size_h], eax
-
 
262
		@@:
-
 
263
 
-
 
264
		;¢®áâ ­ ¢«¨¢ ¥¬ ¯®«®¦¥­¨¥ ¨ à §¬¥àë
-
 
265
		stdcall get_obj_text_col,ebx,1 ;ot_x
-
 
266
		stdcall conv_str_to_int,edx
-
 
267
		mov [coor_x],eax
-
 
268
		stdcall get_obj_text_col,ebx,2 ;ot_y
-
 
269
		stdcall conv_str_to_int,edx
-
 
270
		mov [coor_y],eax
-
 
271
		move_to_skin [coor_x],[coor_y]
-
 
272
		stdcall get_obj_text_col,ebx,3 ;w
-
 
273
		stdcall conv_str_to_int,edx
242
			dword[size_wh],dword[size_wh], eax
274
		dec eax ;à §¬¥à ¬¥­ìè¥ ­  1 ¯¨ªá¥«ì
-
 
275
		mov [size_w],eax
-
 
276
		stdcall get_obj_text_col,ebx,4 ;h
-
 
277
		stdcall conv_str_to_int,edx
-
 
278
		dec eax ;à §¬¥à ¬¥­ìè¥ ­  1 ¯¨ªá¥«ì
-
 
279
		mov [size_h],eax
243
 
280
 
244
		stdcall get_obj_text_col,ebx,6
281
		stdcall get_obj_text_col,ebx,8 ;col_txt
245
		stdcall conv_str_to_int,edx
282
		stdcall conv_str_to_int,edx
246
		mov [col_txt],eax
283
		mov [col_txt],eax
-
 
284
		mov eax,[coor_x]
-
 
285
		add eax,[size_w]
-
 
286
		add eax,[ot_txt] ;¢ëç¨á«ï¥¬ ª®®à¤¨­ âë ¤«ï ⥪á⮢®© ¯®¤¯¨á¨
-
 
287
 
-
 
288
		test_bool_prop ebx,BIT_MOD_CHE_T
-
 
289
		jc .end_txt_align ;if text aligment = top
-
 
290
 
-
 
291
		test_bool_prop ebx,BIT_MOD_CHE_M
-
 
292
		jnc @f
247
		mov eax,[ot_txt]
293
			shl [coor_y],1 ;㬭®¦ ¥¬ ­  2
-
 
294
			mov ecx,[size_h]
248
		add eax,[size_wh]
295
			add [coor_y],ecx ;¤®¡ ¢«ï¥¬ ¢ëá®âã checkbox
-
 
296
			sub [coor_y],9 ;®â­¨¬ ¥¬ ¢ëá®âã ᨬ¢®« 
-
 
297
			shr [coor_y],1 ;¤¥«¨¬ ­  ¯®«ã稢襥áï 2, ¯®«ãç ¥¬ ®âáâ㯠¤«ï áâ®ï饣® ¯® 業âàã ⥪áâ 
-
 
298
			jmp .end_txt_align
249
		add eax,2-1 ;sub dword[size_wh],2 ;inc dword[coor_x]
299
		@@:
-
 
300
 
-
 
301
		test_bool_prop ebx,BIT_MOD_CHE_B
-
 
302
		jnc @f
-
 
303
			mov ecx,[size_h]
-
 
304
			add [coor_y],ecx ;¤®¡ ¢«ï¥¬ ¢ëá®âã checkbox
-
 
305
			sub [coor_y],9 ;®â­¨¬ ¥¬ ¢ëá®âã ᨬ¢®« 
-
 
306
				;¯®«ãç ¥¬ ®âáâ㯠¤«ï áâ®ï饣® á­¨§ã ⥪áâ 
-
 
307
		@@:
250
		add [coor_x],eax ;¢ëç¨á«ï¥¬ ª®®à¤¨­ âë ¤«ï ⥪á⮢®© ¯®¤¯¨á¨
308
		.end_txt_align:
251
		add [coor_y],5-1 ;inc dword[coor_y]
309
 
252
		stdcall get_obj_text_col,ebx,3
310
		stdcall get_obj_text_col,ebx,9 ;txt
253
		stdcall [buf2d_draw_text], buf_fon, buf_font,edx,dword[coor_x],dword[coor_y],\
311
		stdcall [buf2d_draw_text], buf_fon, buf_font,edx,eax,dword[coor_y],\
254
			dword[col_txt] ;à¨á㥬 áâபã á ⥪á⮬
312
			dword[col_txt] ;à¨á㥬 áâபã á ⥪á⮬
255
	popad
313
	popad
256
	ret
314
	ret
257
endp
315
endp
258
 
316
 
259
;äã­ªæ¨ï à¨áã¥â ®¡ê¥ªâ ⥪á⮢®© ¯®¤¯¨á¨, ¢ ®ª­¥ ª®­áâàãªâ®à 
317
;äã­ªæ¨ï à¨áã¥â ®¡ê¥ªâ ⥪á⮢®© ¯®¤¯¨á¨, ¢ ®ª­¥ ª®­áâàãªâ®à 
260
align 4
318
align 4
261
proc draw_obj_text, p_obj:dword
319
proc draw_obj_text, p_obj:dword
262
locals
320
locals
263
	coor_x dd ?
321
	coor_x dd ?
264
	coor_y dd ?
322
	coor_y dd ?
265
	col_txt dd ? ;梥â ⥪âá 
323
	col_txt dd ? ;梥â ⥪âá 
266
endl
324
endl
267
	pushad
325
	pushad
268
		mov ebx,dword[p_obj]
326
		mov ebx,dword[p_obj]
269
		;0,1,2,3,... - txt,x,y,col_txt,...
327
		;0,1,2,3,... - txt,x,y,col_txt,...
270
 
328
 
271
		stdcall get_obj_text_col,ebx,1
329
		stdcall get_obj_text_col,ebx,1
272
		stdcall conv_str_to_int,edx
330
		stdcall conv_str_to_int,edx
273
		mov [coor_x],eax
331
		mov [coor_x],eax
274
		stdcall get_obj_text_col,ebx,2
332
		stdcall get_obj_text_col,ebx,2
275
		stdcall conv_str_to_int,edx
333
		stdcall conv_str_to_int,edx
276
		mov [coor_y],eax
334
		mov [coor_y],eax
277
		move_to_skin [coor_x],[coor_y]
335
		move_to_skin [coor_x],[coor_y]
278
 
336
 
279
		stdcall get_obj_text_col,ebx,3
337
		stdcall get_obj_text_col,ebx,3
280
		stdcall conv_str_to_int,edx
338
		stdcall conv_str_to_int,edx
281
		mov [col_txt],eax
339
		mov [col_txt],eax
282
 
340
 
283
		stdcall get_obj_text_col,ebx,0
341
		stdcall get_obj_text_col,ebx,0
284
		stdcall [buf2d_draw_text], buf_fon, buf_font,edx,dword[coor_x],dword[coor_y],\
342
		stdcall [buf2d_draw_text], buf_fon, buf_font,edx,dword[coor_x],dword[coor_y],\
285
			dword[col_txt] ;à¨á㥬 áâபã á ⥪á⮬
343
			dword[col_txt] ;à¨á㥬 áâபã á ⥪á⮬
286
	popad
344
	popad
287
	ret
345
	ret
288
endp
346
endp
289
 
347
 
290
;äã­ªæ¨ï à¨áã¥â ®¡ê¥ªâ ¯àאַ㣮«ì­¨ª  (á¨á¨â. ä. 13)
348
;äã­ªæ¨ï à¨áã¥â ®¡ê¥ªâ ¯àאַ㣮«ì­¨ª  (á¨á¨â. ä. 13)
291
align 4
349
align 4
292
proc draw_obj_rect_f13, p_obj:dword
350
proc draw_obj_rect_f13, p_obj:dword
293
locals
351
locals
294
	coor_x dd ?
352
	coor_x dd ?
295
	coor_y dd ?
353
	coor_y dd ?
296
	color dd ? ;梥â ⥪âá 
354
	color dd ? ;梥â ⥪âá 
297
endl
355
endl
298
	pushad
356
	pushad
299
		mov ebx,dword[p_obj]
357
		mov ebx,dword[p_obj]
300
		;0,1,2,3,4 - color,x,y,w,h
358
		;0,1,2,3,4 - color,x,y,w,h
301
 
359
 
302
		stdcall get_obj_text_col,ebx,1
360
		stdcall get_obj_text_col,ebx,1
303
		stdcall conv_str_to_int,edx
361
		stdcall conv_str_to_int,edx
304
		mov [coor_x],eax
362
		mov [coor_x],eax
305
		stdcall get_obj_text_col,ebx,2
363
		stdcall get_obj_text_col,ebx,2
306
		stdcall conv_str_to_int,edx
364
		stdcall conv_str_to_int,edx
307
		mov [coor_y],eax
365
		mov [coor_y],eax
308
		move_to_skin [coor_x],[coor_y]
366
		move_to_skin [coor_x],[coor_y]
309
 
367
 
310
		stdcall get_obj_text_col,ebx,0
368
		stdcall get_obj_text_col,ebx,0
311
		stdcall conv_str_to_int,edx
369
		stdcall conv_str_to_int,edx
312
		mov [color],eax
370
		mov [color],eax
313
 
371
 
314
		stdcall get_obj_text_col,ebx,3
372
		stdcall get_obj_text_col,ebx,3
315
		stdcall conv_str_to_int,edx
373
		stdcall conv_str_to_int,edx
316
		mov ecx,eax
374
		mov ecx,eax
317
 
375
 
318
		stdcall get_obj_text_col,ebx,4
376
		stdcall get_obj_text_col,ebx,4
319
		stdcall conv_str_to_int,edx
377
		stdcall conv_str_to_int,edx
320
		mov esi,eax
378
		mov esi,eax
321
 
379
 
322
		stdcall [buf2d_filled_rect_by_size], buf_fon,\
380
		stdcall [buf2d_filled_rect_by_size], buf_fon,\
323
			dword[coor_x],dword[coor_y],ecx,esi,dword[color]
381
			dword[coor_x],dword[coor_y],ecx,esi,dword[color]
324
	popad
382
	popad
325
	ret
383
	ret
326
endp
384
endp