Subversion Repositories Kolibri OS

Rev

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

Rev 1584 Rev 1592
1
;Ž£à®¬­ ï ¡« £®¤ à­®áâì Maxxxx32, Diamond, Heavyiron
1
;Ž£à®¬­ ï ¡« £®¤ à­®áâì Maxxxx32, Diamond, Heavyiron
2
;¨ ¤à㣨¬ ¯à®£à ¬¬¨áâ ¬,   â ª¦¥
2
;¨ ¤à㣨¬ ¯à®£à ¬¬¨áâ ¬,   â ª¦¥
3
;’¥¯«®¢ã €«¥ªá¥î ( www.lrz.land.ru)
3
;’¥¯«®¢ã €«¥ªá¥î ( www.lrz.land.ru)
4
use32
4
use32
5
  org 0x0
5
  org 0x0
6
  db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
6
  db 'MENUET01' ;¨¤¥­â¨ä. ¨á¯®«­ï¥¬®£® ä ©«  ¢á¥£¤  8 ¡ ©â
7
  dd 0x1
7
  dd 0x1
8
  dd start
8
  dd start
9
  dd i_end ; à §¬¥à ¯à¨«®¦¥­¨ï
9
  dd i_end ; à §¬¥à ¯à¨«®¦¥­¨ï
10
  dd mem
10
  dd mem
11
  dd stacktop
11
  dd stacktop
12
  dd 0x0
12
  dd 0x0
13
  dd sys_path
13
  dd sys_path
14
 
14
 
15
include '../../proc32.inc'
15
include '../../proc32.inc'
16
include '../../macros.inc'
16
include '../../macros.inc'
17
include 'mem.inc'
17
include 'mem.inc'
18
include 'dll.inc'
18
include 'dll.inc'
19
 
19
 
20
include '../../develop/libraries/box_lib/load_lib.mac'
20
include '../../develop/libraries/box_lib/load_lib.mac'
21
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
21
include '../../develop/libraries/box_lib/trunk/box_lib.mac'
22
 
22
 
23
min_window_w equ 485 ;¬¨­¨¬ «ì­ ï è¨à¨­  ®ª­ 
23
min_window_w equ 485 ;¬¨­¨¬ «ì­ ï è¨à¨­  ®ª­ 
24
min_window_h equ 325 ;¬¨­¨¬ «ì­ ï ¢ëá®â  ®ª­ 
24
min_window_h equ 325 ;¬¨­¨¬ «ì­ ï ¢ëá®â  ®ª­ 
25
otst_panel_left equ 265
25
otst_panel_left equ 265
26
 
26
 
27
include 'tile_fun.inc'
27
include 'tile_fun.inc'
28
include 'pl_import.inc'
28
include 'pl_import.inc'
29
 
29
 
30
  @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load
30
  @use_library_mem mem.Alloc,mem.Free,mem.ReAlloc, dll.Load
31
 
31
 
32
struct FileInfoBlock
32
struct FileInfoBlock
33
	Function dd ?
33
	Function dd ?
34
	Position dd ?
34
	Position dd ?
35
	Flags	 dd ?
35
	Flags	 dd ?
36
	Count	 dd ?
36
	Count	 dd ?
37
	Buffer	 dd ?
37
	Buffer	 dd ?
38
		db ?
38
		db ?
39
	FileName dd ?
39
	FileName dd ?
40
ends
40
ends
41
 
41
 
42
fn_metki db 'pl_metki.lst',0
42
fn_metki db 'pl_metki.lst',0
43
fn_icon1 db 'tl_sys_16.png',0
43
fn_icon1 db 'tl_sys_16.png',0
44
fn_icon2 db 'tl_nod_16.bmp',0
44
fn_icon2 db 'tl_nod_16.bmp',0
45
 
45
 
46
ini_name db 'planet_v.ini',0
46
ini_name db 'planet_v.ini',0
47
ini_sec  db 'Map',0
47
ini_sec  db 'Map',0
48
ini_k_cache db 'Cache',0
48
ini_k_cache db 'Cache',0
49
ini_def_cache db '/cache/sat',0
49
ini_def_cache db '/cache/sat',0
50
ini_ext  db 'ext'
50
ini_ext  db 'ext'
51
.number  db '?'
51
.number  db '?'
52
.def db 0 ;à áè¨à¥­¨¥ ¯® 㬮«ç ­¨î
52
.def db 0 ;à áè¨à¥­¨¥ ¯® 㬮«ç ­¨î
53
 
53
 
54
 
54
 
55
align 4
55
align 4
56
start:
56
start:
57
  load_libraries l_libs_start,load_lib_end
57
  load_libraries l_libs_start,load_lib_end
58
 
58
 
59
;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ­ è  «¨¡ 
59
;¯à®¢¥àª  ­  ᪮«ìª® 㤠筮 § £ã§¨« áì ­ è  «¨¡ 
60
	mov	ebp,lib0
60
	mov	ebp,lib0
61
	cmp	dword [ebp+ll_struc_size-4],0
61
	cmp	dword [ebp+ll_struc_size-4],0
62
	jz	@f
62
	jz	@f
63
	mcall	-1	;exit not correct
63
	mcall	-1	;exit not correct
64
@@:
64
@@:
65
	mov	ebp,lib1
65
	mov	ebp,lib1
66
	cmp	dword [ebp+ll_struc_size-4],0
66
	cmp	dword [ebp+ll_struc_size-4],0
67
	jz	@f
67
	jz	@f
68
	mcall	-1	;exit not correct
68
	mcall	-1	;exit not correct
69
@@:
69
@@:
70
	mov	ebp,lib2
70
	mov	ebp,lib2
71
	cmp	dword [ebp+ll_struc_size-4],0
71
	cmp	dword [ebp+ll_struc_size-4],0
72
	jz	@f
72
	jz	@f
73
	mcall	-1	;exit not correct
73
	mcall	-1	;exit not correct
74
@@:
74
@@:
75
	mov	ebp,lib3
75
	mov	ebp,lib3
76
	cmp	dword [ebp+ll_struc_size-4],0
76
	cmp	dword [ebp+ll_struc_size-4],0
77
	jz	@f
77
	jz	@f
78
	mcall	-1	;exit not correct
78
	mcall	-1	;exit not correct
79
@@:
79
@@:
80
 
80
 
81
  copy_path ini_name,sys_path,file_name,0x0
81
  copy_path ini_name,sys_path,file_name,0x0
82
  stdcall dword[ini_get_str],file_name,ini_sec,ini_k_cache,dword[edit1.text],dword[edit1.max],ini_def_cache
82
  stdcall dword[ini_get_str],file_name,ini_sec,ini_k_cache,dword[edit1.text],dword[edit1.max],ini_def_cache
83
  stdcall [str_len],dword[edit1.text],dword[edit1.max]
83
  stdcall [str_len],dword[edit1.text],dword[edit1.max]
84
  mov dword[edit1.size],eax
84
  mov dword[edit1.size],eax
85
  mov dword[edit1.pos],eax
85
  mov dword[edit1.pos],eax
86
 
86
 
87
  stdcall dword[tl_data_init], tree1
87
  stdcall dword[tl_data_init], tree1
88
  stdcall dword[tl_data_init], tree2
88
  stdcall dword[tl_data_init], tree2
89
 
89
 
90
;áç¨â뢠¥¬ à áè¨à¥­¨ï ª àâ ¨§ *.ini ä ©« 
90
;áç¨â뢠¥¬ à áè¨à¥­¨ï ª àâ ¨§ *.ini ä ©« 
91
  mov byte[ini_ext.number],'0'
91
  mov byte[ini_ext.number],'0'
92
@@: ;áç¨â뢠¥¬ ¯ à ¬¥âàë ®â ext1 ¤® ext9
92
@@: ;áç¨â뢠¥¬ ¯ à ¬¥âàë ®â ext1 ¤® ext9
93
  inc byte[ini_ext.number]
93
  inc byte[ini_ext.number]
94
  stdcall dword[ini_get_str],file_name,ini_sec,ini_ext,txt_tile_type_0,dword[tree1.info_capt_len],ini_ext.def
94
  stdcall dword[ini_get_str],file_name,ini_sec,ini_ext,txt_tile_type_0,dword[tree1.info_capt_len],ini_ext.def
95
  cmp byte[txt_tile_type_0],0
95
  cmp byte[txt_tile_type_0],0
96
  je @f
96
  je @f
97
    stdcall dword[tl_node_add], txt_tile_type_0, 0, tree1
97
    stdcall dword[tl_node_add], txt_tile_type_0, 0, tree1
98
  jmp @b
98
  jmp @b
99
@@:
99
@@:
100
  mov byte[ini_ext.number],'0' ;áç¨â뢠¥¬ ¯ à ¬¥âà ®â ext0 ª®â®àë© ¡ã¤¥â ¢ë¡à ­ ¢ ᯨ᪥
100
  mov byte[ini_ext.number],'0' ;áç¨â뢠¥¬ ¯ à ¬¥âà ®â ext0 ª®â®àë© ¡ã¤¥â ¢ë¡à ­ ¢ ᯨ᪥
101
  stdcall dword[ini_get_str],file_name,ini_sec,ini_ext,txt_tile_type_0,dword[tree1.info_capt_len],ini_ext.def
101
  stdcall dword[ini_get_str],file_name,ini_sec,ini_ext,txt_tile_type_0,dword[tree1.info_capt_len],ini_ext.def
102
  cmp byte[txt_tile_type_0],0
102
  cmp byte[txt_tile_type_0],0
103
  jne @f
103
  jne @f
104
    mov dword[txt_tile_type_0],'.bmp' ;¥á«¨ ¢ *.ini ä ©«¥ ­¨ç¥£® ­¥â ¤®¡ ¢«ï¥¬ à áè¨à¥­¨¥ .bmp
104
    mov dword[txt_tile_type_0],'.bmp' ;¥á«¨ ¢ *.ini ä ©«¥ ­¨ç¥£® ­¥â ¤®¡ ¢«ï¥¬ à áè¨à¥­¨¥ .bmp
105
  @@:
105
  @@:
106
  stdcall dword[tl_node_add], txt_tile_type_0, 0, tree1
106
  stdcall dword[tl_node_add], txt_tile_type_0, 0, tree1
107
 
107
 
108
; init bmp file
108
; init bmp file
109
  stdcall mem.Alloc, dword RGB_TILE_SIZE+300 ;300 - § ¯ á­ë¥ ¡ ©âë á ãç¥â®¬ § £®«®¢ª  bmp ä ©« 
109
  stdcall mem.Alloc, dword RGB_TILE_SIZE+300 ;300 - § ¯ á­ë¥ ¡ ©âë á ãç¥â®¬ § £®«®¢ª  bmp ä ©« 
110
  mov [bmp_icon],eax
110
  mov [bmp_icon],eax
111
 
111
 
112
  stdcall array_tile_function, tile_00,max_tiles_count,tile_init
112
  stdcall array_tile_function, tile_00,max_tiles_count,tile_init
113
  stdcall tiles_init_grid, tile_00,max_tiles_count,max_tiles_cols
113
  stdcall tiles_init_grid, tile_00,max_tiles_count,max_tiles_cols
114
 
114
 
115
  stdcall mem.Alloc, dword TREE_ICON_SYS16_BMP_SIZE
115
  stdcall mem.Alloc, dword TREE_ICON_SYS16_BMP_SIZE
116
  mov [tree_sys_icon],eax
116
  mov [tree_sys_icon],eax
117
 
117
 
118
  stdcall mem.Alloc, dword TREE_ICON_NOD16_BMP_SIZE
118
  stdcall mem.Alloc, dword TREE_ICON_NOD16_BMP_SIZE
119
  mov [tree_nod_icon],eax
119
  mov [tree_nod_icon],eax
120
 
120
 
121
  copy_path fn_icon1,sys_path,file_name,0x0
121
  copy_path fn_icon1,sys_path,file_name,0x0
122
  mov eax,70 ;load icon file
122
  mov eax,70 ;load icon file
123
  mov [run_file_70.Function], 0
123
  mov [run_file_70.Function], 0
124
  mov [run_file_70.Position], 0
124
  mov [run_file_70.Position], 0
125
  mov [run_file_70.Flags], 0
125
  mov [run_file_70.Flags], 0
126
  mov [run_file_70.Count], TREE_ICON_SYS16_BMP_SIZE
126
  mov [run_file_70.Count], TREE_ICON_SYS16_BMP_SIZE
127
  m2m [run_file_70.Buffer], [tree_sys_icon]
127
  m2m [run_file_70.Buffer], [tree_sys_icon]
128
  mov byte[run_file_70+20], 0
128
  mov byte[run_file_70+20], 0
129
  mov [run_file_70.FileName], file_name
129
  mov [run_file_70.FileName], file_name
130
  mov ebx,run_file_70
130
  mov ebx,run_file_70
131
  int 0x40
131
  int 0x40
132
  cmp ebx,0xffffffff
132
  cmp ebx,0xffffffff
133
  je @f
133
  je @f
134
    stdcall dword[img_decode], dword[tree_sys_icon],ebx,0
134
    stdcall dword[img_decode], dword[tree_sys_icon],ebx,0
135
    mov dword[data_icon],eax
135
    mov dword[data_icon],eax
136
    stdcall dword[img_to_rgb2], dword[data_icon],dword[tree_sys_icon]
136
    stdcall dword[img_to_rgb2], dword[data_icon],dword[tree_sys_icon]
137
    stdcall dword[img_destroy], dword[data_icon]
137
    stdcall dword[img_destroy], dword[data_icon]
138
 
138
 
139
    m2m dword[tree1.data_img_sys],dword[tree_sys_icon]
139
    m2m dword[tree1.data_img_sys],dword[tree_sys_icon]
140
    m2m dword[tree2.data_img_sys],dword[tree_sys_icon]
140
    m2m dword[tree2.data_img_sys],dword[tree_sys_icon]
141
  @@:
141
  @@:
142
 
142
 
143
 
143
 
144
  copy_path fn_icon2,sys_path,file_name,0x0
144
  copy_path fn_icon2,sys_path,file_name,0x0
145
  mov eax,70 ;load icon file
145
  mov eax,70 ;load icon file
146
  mov [run_file_70.Count], TREE_ICON_NOD16_BMP_SIZE
146
  mov [run_file_70.Count], TREE_ICON_NOD16_BMP_SIZE
147
  m2m [run_file_70.Buffer], [tree_nod_icon]
147
  m2m [run_file_70.Buffer], [tree_nod_icon]
148
  mov ebx,run_file_70
148
  mov ebx,run_file_70
149
  int 0x40
149
  int 0x40
150
  cmp ebx,0xffffffff
150
  cmp ebx,0xffffffff
151
  je @f
151
  je @f
152
    stdcall dword[img_decode], dword[tree_nod_icon],ebx,0
152
    stdcall dword[img_decode], dword[tree_nod_icon],ebx,0
153
    mov dword[data_icon],eax
153
    mov dword[data_icon],eax
154
    stdcall dword[img_to_rgb2], dword[data_icon],dword[tree_nod_icon]
154
    stdcall dword[img_to_rgb2], dword[data_icon],dword[tree_nod_icon]
155
    stdcall dword[img_destroy], dword[data_icon]
155
    stdcall dword[img_destroy], dword[data_icon]
156
 
156
 
157
    m2m dword[tree1.data_img],dword[tree_nod_icon]
157
    m2m dword[tree1.data_img],dword[tree_nod_icon]
158
    m2m dword[tree2.data_img],dword[tree_nod_icon]
158
    m2m dword[tree2.data_img],dword[tree_nod_icon]
159
  @@:
159
  @@:
160
 
160
 
161
  mcall 40,0x27
161
  mcall 40,0x27
162
 
162
 
163
  mcall 48,3,sc,sizeof.system_colors
163
  mcall 48,3,sc,sizeof.system_colors
164
  ;ãáâ ­®¢ª  á¨á⥬­ëå 梥⮢
164
  ;ãáâ ­®¢ª  á¨á⥬­ëå 梥⮢
165
  edit_boxes_set_sys_color edit1,editboxes_end,sc
165
  edit_boxes_set_sys_color edit1,editboxes_end,sc
166
  check_boxes_set_sys_color ch1,checkboxes_end,sc
166
  check_boxes_set_sys_color ch1,checkboxes_end,sc
167
 
167
 
168
  mov byte[file_name],0
168
  mov byte[file_name],0
169
 
169
 
170
  ; OpenDialog initialisation
170
  ; OpenDialog initialisation
171
  stdcall [OpenDialog_Init],OpenDialog_data
171
  stdcall [OpenDialog_Init],OpenDialog_data
172
 
172
 
173
align 4
173
align 4
174
red_win:
174
red_win:
175
  call draw_window
175
  call draw_window
176
  call but_MetLoad
176
  call but_MetLoad
177
 
177
 
178
align 4
178
align 4
179
still:
179
still:
180
  mov eax,10
180
  mov eax,10
181
  mcall
181
  mcall
182
 
182
 
183
  cmp al,0x1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­ 
183
  cmp al,0x1 ;¨§¬. ¯®«®¦¥­¨¥ ®ª­ 
184
  jz red_win
184
  jz red_win
185
  cmp al,0x2
185
  cmp al,0x2
186
  jz key
186
  jz key
187
  cmp al,0x3
187
  cmp al,0x3
188
  jz button
188
  jz button
189
 
189
 
190
  push dword ch2
190
  push dword ch2
191
  call [check_box_mouse]
191
  call [check_box_mouse]
192
  push dword ch1
192
  push dword ch1
193
  call [check_box_mouse]
193
  call [check_box_mouse]
194
 
194
 
195
  stdcall [edit_box_mouse], edit1
195
  stdcall [edit_box_mouse], edit1
196
  stdcall [edit_box_mouse], edit2
196
  stdcall [edit_box_mouse], edit2
197
 
197
 
198
  stdcall [tl_mouse], tree1
198
  stdcall [tl_mouse], tree1
199
  stdcall [tl_mouse], tree2
199
  stdcall [tl_mouse], tree2
200
 
200
 
201
  jmp still
201
  jmp still
202
 
202
 
203
align 4
203
align 4
204
key:
204
key:
205
  push eax ebx
205
  push eax ebx
206
  mcall 2
206
  mcall 2
207
  stdcall [edit_box_key], edit1
207
  stdcall [edit_box_key], edit1
208
  stdcall [edit_box_key], edit2
208
  stdcall [edit_box_key], edit2
209
 
209
 
210
  push dword tree1
210
  push dword tree1
211
  call [tl_key]
211
  call [tl_key]
212
  push dword tree2
212
  push dword tree2
213
  call [tl_key]
213
  call [tl_key]
214
 
214
 
215
  mov ebx,dword[el_focus] ;çâ®-¡ë ª àâ  ­¥ ¤¢¨£ « áì ¥á«¨ ®ª­  treelist ¢ 䮪ãá¥
215
  mov ebx,dword[el_focus] ;çâ®-¡ë ª àâ  ­¥ ¤¢¨£ « áì ¥á«¨ ®ª­  treelist ¢ 䮪ãá¥
216
  cmp ebx, dword tree1
216
  cmp ebx, dword tree1
217
  je .end_f
217
  je .end_f
218
  cmp ebx, dword tree2
218
  cmp ebx, dword tree2
219
  je .end_f
219
  je .end_f
220
 
220
 
221
  ;çâ®-¡ë ª àâ  ­¥ ¤¢¨£ « áì ¥á«¨ ⥪áâ®¢ë¥ ¯®«ï ¢ 䮪ãá¥
221
  ;çâ®-¡ë ª àâ  ­¥ ¤¢¨£ « áì ¥á«¨ ⥪áâ®¢ë¥ ¯®«ï ¢ 䮪ãá¥
222
  test word[edit1.flags],10b ;ed_focus
222
  test word[edit1.flags],10b ;ed_focus
223
  jne .end_f
223
  jne .end_f
224
  test word[edit2.flags],10b ;ed_focus
224
  test word[edit2.flags],10b ;ed_focus
225
  jne .end_f
225
  jne .end_f
226
 
226
 
227
    cmp ah,179 ;Right
227
    cmp ah,179 ;Right
228
    jne @f
228
    jne @f
229
      call CursorMoveRight
229
      call CursorMoveRight
230
    @@:
230
    @@:
231
    cmp ah,176 ;Left
231
    cmp ah,176 ;Left
232
    jne @f
232
    jne @f
233
    cmp dword[map.coord_x],0
233
    cmp dword[map.coord_x],0
234
    je @f
234
    je @f
235
      dec dword[map.coord_x]
235
      dec dword[map.coord_x]
236
      ;ᤢ¨£ ¥¬ á¥âªã â ©«®¢ ¢¯à ¢®, çâ®-¡ë ç áâì â ©«®¢ ᮢ¯ «¨ ¨ ¯à¨è«®áì ¬¥­ìè¥ § £à㦠âì ­®¢ëå
236
      ;ᤢ¨£ ¥¬ á¥âªã â ©«®¢ ¢¯à ¢®, çâ®-¡ë ç áâì â ©«®¢ ᮢ¯ «¨ ¨ ¯à¨è«®áì ¬¥­ìè¥ § £à㦠âì ­®¢ëå
237
      stdcall tiles_grid_move_right, tile_00,max_tiles_count,max_tiles_cols
237
      stdcall tiles_grid_move_right, tile_00,max_tiles_count,max_tiles_cols
238
      call but_Refresh
238
      call but_Refresh
239
    @@:
239
    @@:
240
    cmp ah,177 ;Down
240
    cmp ah,177 ;Down
241
    jne @f
241
    jne @f
242
      call CursorMoveDown
242
      call CursorMoveDown
243
    @@:
243
    @@:
244
    cmp ah,178 ;Up
244
    cmp ah,178 ;Up
245
    jne @f
245
    jne @f
246
    cmp dword[map.coord_y],0
246
    cmp dword[map.coord_y],0
247
    je @f
247
    je @f
248
      dec dword[map.coord_y]
248
      dec dword[map.coord_y]
249
      ;ᤢ¨£ ¥¬ á¥âªã â ©«®¢ ¢­¨§
249
      ;ᤢ¨£ ¥¬ á¥âªã â ©«®¢ ¢­¨§
250
      stdcall tiles_grid_move_down, tile_00,max_tiles_count,max_tiles_rows
250
      stdcall tiles_grid_move_down, tile_00,max_tiles_count,max_tiles_rows
251
      call but_Refresh
251
      call but_Refresh
252
    @@:
252
    @@:
253
 
253
 
254
    cmp ah,45 ;-
254
    cmp ah,45 ;-
255
    jne @f
255
    jne @f
256
      call but_ZoomM
256
      call but_ZoomM
257
    @@:
257
    @@:
258
    cmp ah,61 ;+
258
    cmp ah,61 ;+
259
    jne @f
259
    jne @f
260
      call but_ZoomP
260
      call but_ZoomP
261
    @@:
261
    @@:
262
 
262
 
263
  .end_f:
263
  .end_f:
264
  pop ebx eax
264
  pop ebx eax
265
  jmp still
265
  jmp still
266
 
266
 
267
 
267
 
268
align 4
268
align 4
269
draw_window:
269
draw_window:
270
pushad
270
pushad
271
  mcall 12,1
271
  mcall 12,1
272
 
272
 
273
  xor eax,eax
273
  xor eax,eax
274
  mov ebx,20*65536+min_window_w
274
  mov ebx,20*65536+min_window_w
275
  mov ecx,20*65536+min_window_h
275
  mov ecx,20*65536+min_window_h
276
  mov edx,[sc.work]
276
  mov edx,[sc.work]
277
  or  edx,0x33000000
277
  or  edx,0x33000000
278
  mov edi,hed
278
  mov edi,hed
279
  mcall
279
  mcall
280
 
280
 
281
  mcall 9,procinfo,-1
281
  mcall 9,procinfo,-1
282
 
282
 
283
  cmp dword[procinfo.box.width],min_window_w ; ¯à®¢¥à塞 è¨à¨­ã ®ª­ 
283
  cmp dword[procinfo.box.width],min_window_w ; ¯à®¢¥à塞 è¨à¨­ã ®ª­ 
284
  jge @f
284
  jge @f
285
    mov dword[procinfo.box.width],min_window_w ; ¥á«¨ ®ª­® ®ç¥­ì 㧪®¥, 㢥«¨ç¨¢ ¥¬ è¨à¨­ã ¤«ï ¨§¡¥¦ ­¨ï £«îª®¢
285
    mov dword[procinfo.box.width],min_window_w ; ¥á«¨ ®ª­® ®ç¥­ì 㧪®¥, 㢥«¨ç¨¢ ¥¬ è¨à¨­ã ¤«ï ¨§¡¥¦ ­¨ï £«îª®¢
286
  @@:
286
  @@:
287
 
287
 
288
  mov edi,dword[procinfo.box.width]
288
  mov edi,dword[procinfo.box.width]
289
  sub edi,min_window_w-otst_panel_left
289
  sub edi,min_window_w-otst_panel_left
290
  mov dword[tree1.box_left],edi
290
  mov dword[tree1.box_left],edi
291
  mov dword[tree2.box_left],edi
291
  mov dword[tree2.box_left],edi
292
 
292
 
293
  mov eax,dword[tree2.box_left] ;¤¢¨£ ¥¬ áªà®««¨­£
293
  mov eax,dword[tree2.box_left] ;¤¢¨£ ¥¬ áªà®««¨­£
294
  add eax,dword[tree2.box_width]
294
  add eax,dword[tree2.box_width]
295
  mov ebx,dword[tree2.p_scrol]
295
  mov ebx,dword[tree2.p_scrol]
296
  mov word[ebx+2],ax
296
  mov word[ebx+2],ax
297
 
297
 
298
  mov dword[edit2.left],edi
298
  mov dword[edit2.left],edi
299
  add dword[edit2.left],370-otst_panel_left
299
  add dword[edit2.left],370-otst_panel_left
300
 
300
 
301
  stdcall dword[tl_draw],dword tree1
301
  stdcall dword[tl_draw],dword tree1
302
  stdcall dword[tl_draw],dword tree2
302
  stdcall dword[tl_draw],dword tree2
303
  mov dword[wScrMetki.all_redraw],1
303
  mov dword[wScrMetki.all_redraw],1
304
  stdcall [scrollbar_ver_draw], dword wScrMetki
304
  stdcall [scrollbar_ver_draw], dword wScrMetki
305
 
305
 
306
  mov eax,8 ;ª­®¯ª 
306
  mov eax,8 ;ª­®¯ª 
307
  mov ebx,145*65536+20
307
  mov ebx,145*65536+20
308
  mov ecx,5*65536+25
308
  mov ecx,5*65536+25
309
  mov edx,6
309
  mov edx,6
310
  mov esi,[sc.work_button]
310
  mov esi,[sc.work_button]
311
  int 0x40
311
  int 0x40
312
 
312
 
313
  mov ebx,100*65536+20
313
  mov ebx,100*65536+20
314
  mov ecx,5*65536+25
314
  mov ecx,5*65536+25
315
  mov edx,5
315
  mov edx,5
316
  int 0x40
316
  int 0x40
317
 
317
 
318
  mov ebx,170*65536+40 ;ª­®¯ª  ¢ë§®¢  ¤¨ «®£  OpenDial
318
  mov ebx,170*65536+40 ;ª­®¯ª  ¢ë§®¢  ¤¨ «®£  OpenDial
319
  ;mov ecx,5*65536+25
319
  ;mov ecx,5*65536+25
320
  mov edx,13
320
  mov edx,13
321
  int 0x40
321
  int 0x40
322
 
322
 
323
  mov bx,di
323
  mov bx,di
324
  shl ebx,16
324
  shl ebx,16
325
  mov bx,100
325
  mov bx,100
326
  mov ecx,265*65536+25
326
  mov ecx,265*65536+25
327
  mov edx,9
327
  mov edx,9
328
  int 0x40
328
  int 0x40
329
 
329
 
330
  ;ebx ...
330
  ;ebx ...
331
  mov ecx,235*65536+25
331
  mov ecx,235*65536+25
332
  mov edx,8
332
  mov edx,8
333
  int 0x40
333
  int 0x40
334
 
334
 
335
  mov bx,di
335
  mov bx,di
336
  add bx,410-otst_panel_left
336
  add bx,410-otst_panel_left
337
  shl ebx,16
337
  shl ebx,16
338
  mov bx,55
338
  mov bx,55
339
  ;mov ebx,410*65536+55
339
  ;mov ebx,410*65536+55
340
  mov ecx,5*65536+25
340
  mov ecx,5*65536+25
341
  mov edx,7
341
  mov edx,7
342
  int 0x40
342
  int 0x40
343
 
343
 
344
  mov bx,di
344
  mov bx,di
345
  add bx,440-otst_panel_left
345
  add bx,440-otst_panel_left
346
  shl ebx,16
346
  shl ebx,16
347
  mov bx,30
347
  mov bx,30
348
  ;mov ebx,440*65536+30
348
  ;mov ebx,440*65536+30
349
  mov ecx,265*65536+25
349
  mov ecx,265*65536+25
350
  mov edx,12
350
  mov edx,12
351
  int 0x40
351
  int 0x40
352
 
352
 
353
  mov bx,di
353
  mov bx,di
354
  add bx,405-otst_panel_left
354
  add bx,405-otst_panel_left
355
  shl ebx,16
355
  shl ebx,16
356
  mov bx,30
356
  mov bx,30
357
  ;mov ebx,405*65536+30
357
  ;mov ebx,405*65536+30
358
  ;mov ecx,265*65536+25
358
  ;mov ecx,265*65536+25
359
  mov edx,11
359
  mov edx,11
360
  int 0x40
360
  int 0x40
361
 
361
 
362
  mov bx,di
362
  mov bx,di
363
  add bx,370-otst_panel_left
363
  add bx,370-otst_panel_left
364
  shl ebx,16
364
  shl ebx,16
365
  mov bx,30
365
  mov bx,30
366
  ;mov ebx,370*65536+30
366
  ;mov ebx,370*65536+30
367
  ;mov ecx,265*65536+25
367
  ;mov ecx,265*65536+25
368
  mov edx,10
368
  mov edx,10
369
  int 0x40
369
  int 0x40
370
 
370
 
371
  mov eax,4 ;à¨á®¢ ­¨¥ ⥪áâ 
371
  mov eax,4 ;à¨á®¢ ­¨¥ ⥪áâ 
372
  mov ebx,152*65536+13
372
  mov ebx,152*65536+13
373
  mov ecx,[sc.work_button_text]
373
  mov ecx,[sc.work_button_text]
374
  or  ecx,0x80000000
374
  or  ecx,0x80000000
375
  mov edx,txt_zoom_p
375
  mov edx,txt_zoom_p
376
  mcall
376
  mcall
377
 
377
 
378
  mov ebx,107*65536+13
378
  mov ebx,107*65536+13
379
  mov edx,txt_zoom_m
379
  mov edx,txt_zoom_m
380
  int 0x40
380
  int 0x40
381
 
381
 
382
  mov bx,di
382
  mov bx,di
383
  add bx,270-otst_panel_left
383
  add bx,270-otst_panel_left
384
  shl ebx,16
384
  shl ebx,16
385
  mov bx,243
385
  mov bx,243
386
  ;mov ebx,270*65536+243
386
  ;mov ebx,270*65536+243
387
  mov edx,txt151
387
  mov edx,txt151
388
  int 0x40
388
  int 0x40
389
 
389
 
390
  mov bx,di
390
  mov bx,di
391
  add bx,270-otst_panel_left
391
  add bx,270-otst_panel_left
392
  shl ebx,16
392
  shl ebx,16
393
  mov bx,273
393
  mov bx,273
394
  ;mov ebx,270*65536+273
394
  ;mov ebx,270*65536+273
395
  mov edx,txt152
395
  mov edx,txt152
396
  int 0x40
396
  int 0x40
397
 
397
 
398
  mov bx,di
398
  mov bx,di
399
  add bx,415-otst_panel_left
399
  add bx,415-otst_panel_left
400
  shl ebx,16
400
  shl ebx,16
401
  mov bx,13
401
  mov bx,13
402
  ;mov ebx,415*65536+13
402
  ;mov ebx,415*65536+13
403
  mov edx,txt_but_refresh
403
  mov edx,txt_but_refresh
404
  int 0x40
404
  int 0x40
405
 
405
 
406
  mov bx,di
406
  mov bx,di
407
  add bx,380-otst_panel_left
407
  add bx,380-otst_panel_left
408
  shl ebx,16
408
  shl ebx,16
409
  mov bx,275
409
  mov bx,275
410
  ;mov ebx,380*65536+275
410
  ;mov ebx,380*65536+275
411
  mov edx,txt_met_up
411
  mov edx,txt_met_up
412
  int 0x40
412
  int 0x40
413
 
413
 
414
  mov bx,di
414
  mov bx,di
415
  add bx,415-otst_panel_left
415
  add bx,415-otst_panel_left
416
  shl ebx,16
416
  shl ebx,16
417
  mov bx,275
417
  mov bx,275
418
  ;mov ebx,415*65536+275
418
  ;mov ebx,415*65536+275
419
  mov edx,txt_met_dn
419
  mov edx,txt_met_dn
420
  int 0x40
420
  int 0x40
421
 
421
 
422
 
422
 
423
  mov bx,di
423
  mov bx,di
424
  add bx,450-otst_panel_left
424
  add bx,450-otst_panel_left
425
  shl ebx,16
425
  shl ebx,16
426
  mov bx,275
426
  mov bx,275
427
  ;mov ebx,450*65536+275
427
  ;mov ebx,450*65536+275
428
  mov edx,txt_met_sh
428
  mov edx,txt_met_sh
429
  int 0x40
429
  int 0x40
430
 
430
 
431
  mov ecx,[sc.work_text]
431
  mov ecx,[sc.work_text]
432
  or  ecx,0x80000000
432
  or  ecx,0x80000000
433
 
433
 
434
  mov ebx,175*65536+13
434
  mov ebx,175*65536+13
435
  mov edx,txt_cache
435
  mov edx,txt_cache
436
  int 0x40
436
  int 0x40
437
 
437
 
438
  mov bx,di
438
  mov bx,di
439
  ;add bx,450-otst_panel_left
439
  ;add bx,450-otst_panel_left
440
  shl ebx,16
440
  shl ebx,16
441
  mov bx,35
441
  mov bx,35
442
  ;mov ebx,265*65536+35
442
  ;mov ebx,265*65536+35
443
  mov edx,txt141
443
  mov edx,txt141
444
  int 0x40
444
  int 0x40
445
 
445
 
446
  mov bx,135
446
  mov bx,135
447
  ;mov ebx,265*65536+135
447
  ;mov ebx,265*65536+135
448
  mov edx,txt142
448
  mov edx,txt142
449
  int 0x40
449
  int 0x40
450
 
450
 
451
  call draw_tiles
451
  call draw_tiles
452
 
452
 
453
  stdcall [check_box_draw], dword ch1
453
  stdcall [check_box_draw], dword ch1
454
  stdcall [check_box_draw], dword ch2
454
  stdcall [check_box_draw], dword ch2
455
  stdcall [edit_box_draw], edit1
455
  stdcall [edit_box_draw], edit1
456
  stdcall [edit_box_draw], edit2
456
  stdcall [edit_box_draw], edit2
457
 
457
 
458
  mcall 12,2
458
  mcall 12,2
459
popad
459
popad
460
  ret
460
  ret
461
 
461
 
462
  head_f_i:
462
  head_f_i:
463
  head_f_l  db '‘¨á⥬­ ï ®è¨¡ª ',0
463
  head_f_l  db '‘¨á⥬­ ï ®è¨¡ª ',0
464
  err_message_found_lib0 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  box_lib.obj',0
464
  err_message_found_lib0 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  box_lib.obj',0
465
  err_message_import0 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ box_lib.obj',0
465
  err_message_import0 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ box_lib.obj',0
466
  err_message_found_lib1 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  libimg.obj',0
466
  err_message_found_lib1 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  libimg.obj',0
467
  err_message_import1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ libimg.obj',0
467
  err_message_import1 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ libimg.obj',0
468
  err_message_found_lib2 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  str.obj',0
468
  err_message_found_lib2 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  str.obj',0
469
  err_message_import2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ str.obj',0
469
  err_message_import2 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ str.obj',0
470
  err_message_found_lib3 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  libini.obj',0
470
  err_message_found_lib3 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  libini.obj',0
471
  err_message_import3 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ libini.obj',0
471
  err_message_import3 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ libini.obj',0
472
  err_message_found_lib4 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  proc_lib.obj',0
472
  err_message_found_lib4 db '¥ ­ ©¤¥­  ¡¨¡«¨®â¥ª  proc_lib.obj',0
473
  err_message_import4 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ proc_lib.obj',0
473
  err_message_import4 db 'Žè¨¡ª  ¯à¨ ¨¬¯®à⥠¡¨¡«¨®â¥ª¨ proc_lib.obj',0
474
 
474
 
475
system_dir0 db '/sys/lib/'
475
system_dir0 db '/sys/lib/'
476
lib0_name db 'box_lib.obj',0
476
lib0_name db 'box_lib.obj',0
477
 
477
 
478
system_dir1 db '/sys/lib/'
478
system_dir1 db '/sys/lib/'
479
lib1_name db 'libimg.obj',0
479
lib1_name db 'libimg.obj',0
480
 
480
 
481
system_dir2 db '/sys/lib/'
481
system_dir2 db '/sys/lib/'
482
lib2_name db 'str.obj',0
482
lib2_name db 'str.obj',0
483
 
483
 
484
system_dir3 db '/sys/lib/'
484
system_dir3 db '/sys/lib/'
485
lib3_name db 'libini.obj',0
485
lib3_name db 'libini.obj',0
486
 
486
 
487
system_dir4 db '/sys/lib/'
487
system_dir4 db '/sys/lib/'
488
lib4_name db 'proc_lib.obj',0
488
lib4_name db 'proc_lib.obj',0
489
 
489
 
490
;library structures
490
;library structures
491
l_libs_start:
491
l_libs_start:
492
  lib0 l_libs lib0_name, sys_path, file_name, system_dir0, err_message_found_lib0, head_f_l, boxlib_import,err_message_import0, head_f_i
492
  lib0 l_libs lib0_name, sys_path, file_name, system_dir0, err_message_found_lib0, head_f_l, boxlib_import,err_message_import0, head_f_i
493
  lib1 l_libs lib1_name, sys_path, file_name, system_dir1, err_message_found_lib1, head_f_l, libimg_import, err_message_import1, head_f_i
493
  lib1 l_libs lib1_name, sys_path, file_name, system_dir1, err_message_found_lib1, head_f_l, libimg_import, err_message_import1, head_f_i
494
  lib2 l_libs lib2_name, sys_path, file_name, system_dir2, err_message_found_lib2, head_f_l, strlib_import, err_message_import2, head_f_i
494
  lib2 l_libs lib2_name, sys_path, file_name, system_dir2, err_message_found_lib2, head_f_l, strlib_import, err_message_import2, head_f_i
495
  lib3 l_libs lib3_name, sys_path, file_name, system_dir3, err_message_found_lib3, head_f_l, libini_import, err_message_import3, head_f_i
495
  lib3 l_libs lib3_name, sys_path, file_name, system_dir3, err_message_found_lib3, head_f_l, libini_import, err_message_import3, head_f_i
496
  lib4 l_libs lib4_name, sys_path, file_name, system_dir4, err_message_found_lib4, head_f_l, proclib_import, err_message_import4, head_f_i
496
  lib4 l_libs lib4_name, sys_path, file_name, system_dir4, err_message_found_lib4, head_f_l, proclib_import, err_message_import4, head_f_i
497
load_lib_end:
497
load_lib_end:
498
 
498
 
499
align 4
499
align 4
500
button:
500
button:
501
  mcall 17 ;¯®«ãç¨âì ª®¤ ­ ¦ â®© ª­®¯ª¨
501
  mcall 17 ;¯®«ãç¨âì ª®¤ ­ ¦ â®© ª­®¯ª¨
502
  cmp ah,5
502
  cmp ah,5
503
  jne @f
503
  jne @f
504
    call but_ZoomM
504
    call but_ZoomM
505
  @@:
505
  @@:
506
  cmp ah,6
506
  cmp ah,6
507
  jne @f
507
  jne @f
508
    call but_ZoomP
508
    call but_ZoomP
509
  @@:
509
  @@:
510
  cmp ah,7
510
  cmp ah,7
511
  jne @f
511
  jne @f
512
    call but_Refresh
512
    call but_Refresh
513
  @@:
513
  @@:
514
 
514
 
515
  cmp ah,9
515
  cmp ah,9
516
  jz  but_MetSave
516
  jz  but_MetSave
517
  cmp ah,8
517
  cmp ah,8
518
  jz  but_MetAdd
518
  jz  but_MetAdd
519
 
519
 
520
  cmp ah,10
520
  cmp ah,10
521
  jne @f
521
  jne @f
522
    call but_met_up
522
    call but_met_up
523
  @@:
523
  @@:
524
  cmp ah,11
524
  cmp ah,11
525
  jne @f
525
  jne @f
526
    call but_met_dn
526
    call but_met_dn
527
  @@:
527
  @@:
528
  cmp ah,12
528
  cmp ah,12
529
  jne @f
529
  jne @f
530
    call fun_goto_met
530
    call fun_goto_met
531
  @@:
531
  @@:
532
  cmp ah,13 ;¤¨ «®£ OpenDialog ¤«ï ¯®¨áª  ¯ ¯ª¨
532
  cmp ah,13 ;¤¨ «®£ OpenDialog ¤«ï ¯®¨áª  ¯ ¯ª¨
533
  jne @f
533
  jne @f
534
    call fun_opn_dlg
534
    call fun_opn_dlg
535
  @@:
535
  @@:
536
  cmp ah,1
536
  cmp ah,1
537
  jne still
537
  jne still
538
 
538
 
539
.exit:
539
.exit:
540
  push dword[bmp_icon]
540
  push dword[bmp_icon]
541
  call mem.Free
541
  call mem.Free
542
  stdcall array_tile_function, tile_00,max_tiles_count,tile_destroy
542
  stdcall array_tile_function, tile_00,max_tiles_count,tile_destroy
543
 
543
 
544
  stdcall dword[tl_data_clear], tree1
544
  stdcall dword[tl_data_clear], tree1
545
  mov dword[tree2.data_img_sys],0 ;ç¨á⨬ 㪠§ â¥«ì ­  á¨á⥬­ë¥ ¨ª®­ª¨,
545
  mov dword[tree2.data_img_sys],0 ;ç¨á⨬ 㪠§ â¥«ì ­  á¨á⥬­ë¥ ¨ª®­ª¨,
546
    ;â. ª. ®­¨ ¡ë«¨ 㤠«¥­ë ¢¥àå­¥© ä㭪樥© tl_data_clear
546
    ;â. ª. ®­¨ ¡ë«¨ 㤠«¥­ë ¢¥àå­¥© ä㭪樥© tl_data_clear
547
    ;¯®¢â®à­ë© ¢ë§®¢ tl_data_clear ¡¥§ ç¨á⪨ 㪠§ â¥«ï ¢ë§¢¥â ®è¨¡ªã
547
    ;¯®¢â®à­ë© ¢ë§®¢ tl_data_clear ¡¥§ ç¨á⪨ 㪠§ â¥«ï ¢ë§¢¥â ®è¨¡ªã
548
  mov dword[tree2.data_img],0 ;ç¨á⨬ 㪠§ â¥«ì ­  ¨ª®­ª¨ 㧫®¢
548
  mov dword[tree2.data_img],0 ;ç¨á⨬ 㪠§ â¥«ì ­  ¨ª®­ª¨ 㧫®¢
549
  stdcall dword[tl_data_clear], tree2
549
  stdcall dword[tl_data_clear], tree2
550
 
550
 
551
;  stdcall dword[img_destroy], dword[data_icon]
551
;  stdcall dword[img_destroy], dword[data_icon]
552
  mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë
552
  mcall -1 ;¢ë室 ¨§ ¯à®£à ¬¬ë
553
 
553
 
554
 
554
 
555
;input:
555
;input:
556
;data_rgb - pointer to rgb data
556
;data_rgb - pointer to rgb data
557
;size - count img pixels (size img data / 3(rgb) )
557
;size - count img pixels (size img data / 3(rgb) )
558
align 4
558
align 4
559
proc img_rgb_wdiv2 data_rgb:dword, size:dword
559
proc img_rgb_wdiv2 data_rgb:dword, size:dword
560
  push eax ebx ecx edx
560
  push eax ebx ecx edx
561
  mov eax,dword[data_rgb]
561
  mov eax,dword[data_rgb]
562
  mov ecx,dword[size] ;ecx = size
562
  mov ecx,dword[size] ;ecx = size
563
  imul ecx,3
563
  imul ecx,3
564
  @@: ;§ â¥¬­¥­¨¥ æ¢¥â  ¯¨ªá¥«¥©
564
  @@: ;§ â¥¬­¥­¨¥ æ¢¥â  ¯¨ªá¥«¥©
565
    shr byte[eax],1
565
    shr byte[eax],1
566
    and byte[eax],0x7f
566
    and byte[eax],0x7f
567
    inc eax
567
    inc eax
568
    loop @b
568
    loop @b
569
 
569
 
570
  mov eax,dword[data_rgb]
570
  mov eax,dword[data_rgb]
571
  mov ecx,dword[size] ;ecx = size
571
  mov ecx,dword[size] ;ecx = size
572
  shr ecx,1
572
  shr ecx,1
573
  @@: ;á«®¦¥­¨¥ 梥⮢ ¯¨ªá¥«¥©
573
  @@: ;á«®¦¥­¨¥ 梥⮢ ¯¨ªá¥«¥©
574
    mov ebx,dword[eax+3] ;ª®¯¨à㥬 梥â á®á¥¤­¥£® ¯¨ªá¥«ï
574
    mov ebx,dword[eax+3] ;ª®¯¨à㥬 梥â á®á¥¤­¥£® ¯¨ªá¥«ï
575
    add word[eax],bx
575
    add word[eax],bx
576
    shr ebx,16
576
    shr ebx,16
577
    add byte[eax+2],bl
577
    add byte[eax+2],bl
578
 
578
 
579
    add eax,6 ;=2*3
579
    add eax,6 ;=2*3
580
    loop @b
580
    loop @b
581
 
581
 
582
  mov eax,dword[data_rgb]
582
  mov eax,dword[data_rgb]
583
  add eax,3
583
  add eax,3
584
  mov ebx,eax
584
  mov ebx,eax
585
  add ebx,3
585
  add ebx,3
586
  mov ecx,dword[size] ;ecx = size
586
  mov ecx,dword[size] ;ecx = size
587
  shr ecx,1
587
  shr ecx,1
588
  dec ecx ;«¨è­¨© ¯¨ªá¥«ì
588
  dec ecx ;«¨è­¨© ¯¨ªá¥«ì
589
  @@: ;¯®¤¦ â¨¥ ¯¨ªá¥«¥©
589
  @@: ;¯®¤¦ â¨¥ ¯¨ªá¥«¥©
590
    mov edx,dword[ebx]
590
    mov edx,dword[ebx]
591
    mov word[eax],dx
591
    mov word[eax],dx
592
    shr edx,16
592
    shr edx,16
593
    mov byte[eax+2],dl
593
    mov byte[eax+2],dl
594
 
594
 
595
    add eax,3
595
    add eax,3
596
    add ebx,6
596
    add ebx,6
597
    loop @b
597
    loop @b
598
 
598
 
599
  pop edx ecx ebx eax
599
  pop edx ecx ebx eax
600
  ret
600
  ret
601
endp
601
endp
602
 
602
 
603
;input:
603
;input:
604
;data_rgb - pointer to rgb data
604
;data_rgb - pointer to rgb data
605
;size - count img pixels (size img data / 3(rgb) )
605
;size - count img pixels (size img data / 3(rgb) )
606
;size_w - width img in pixels
606
;size_w - width img in pixels
607
align 4
607
align 4
608
proc img_rgb_hdiv2, data_rgb:dword, size:dword, size_w:dword
608
proc img_rgb_hdiv2, data_rgb:dword, size:dword, size_w:dword
609
  pushad
609
  pushad
610
 
610
 
611
  mov eax,dword[data_rgb] ;eax =
611
  mov eax,dword[data_rgb] ;eax =
612
  mov ecx,dword[size]	  ;ecx = size
612
  mov ecx,dword[size]	  ;ecx = size
613
  imul ecx,3
613
  imul ecx,3
614
  @@: ;§ â¥¬­¥­¨¥ æ¢¥â  ¯¨ªá¥«¥©
614
  @@: ;§ â¥¬­¥­¨¥ æ¢¥â  ¯¨ªá¥«¥©
615
    shr byte[eax],1
615
    shr byte[eax],1
616
    and byte[eax],0x7f
616
    and byte[eax],0x7f
617
    inc eax
617
    inc eax
618
    loop @b
618
    loop @b
619
 
619
 
620
  mov eax,dword[data_rgb] ;eax =
620
  mov eax,dword[data_rgb] ;eax =
621
  mov edi,dword[size_w]
621
  mov edi,dword[size_w]
622
  lea esi,[edi+edi*2] ;esi = width*3(rgb)
622
  lea esi,[edi+edi*2] ;esi = width*3(rgb)
623
  mov ebx,esi
623
  mov ebx,esi
624
  add ebx,eax
624
  add ebx,eax
625
  mov ecx,dword[size]  ;ecx = size
625
  mov ecx,dword[size]  ;ecx = size
626
  shr ecx,1
626
  shr ecx,1
627
  xor edi,edi
627
  xor edi,edi
628
  @@: ;á«®¦¥­¨¥ 梥⮢ ¯¨ªá¥«¥©
628
  @@: ;á«®¦¥­¨¥ 梥⮢ ¯¨ªá¥«¥©
629
    mov edx,dword[ebx] ;ª®¯¨à㥬 梥⠭¨¦­¥£® ¯¨ªá¥«ï
629
    mov edx,dword[ebx] ;ª®¯¨à㥬 梥⠭¨¦­¥£® ¯¨ªá¥«ï
630
    add word[eax],dx
630
    add word[eax],dx
631
    shr edx,16
631
    shr edx,16
632
    add byte[eax+2],dl
632
    add byte[eax+2],dl
633
 
633
 
634
    add eax,3
634
    add eax,3
635
    add ebx,3
635
    add ebx,3
636
    inc edi
636
    inc edi
637
    cmp edi,dword[size_w]
637
    cmp edi,dword[size_w]
638
    jl .old_line
638
    jl .old_line
639
      add eax,esi
639
      add eax,esi
640
      add ebx,esi
640
      add ebx,esi
641
      xor edi,edi
641
      xor edi,edi
642
    .old_line:
642
    .old_line:
643
    loop @b
643
    loop @b
644
 
644
 
645
 
645
 
646
  mov eax,dword[data_rgb] ;eax =
646
  mov eax,dword[data_rgb] ;eax =
647
  add eax,esi ;esi = width*3(rgb)
647
  add eax,esi ;esi = width*3(rgb)
648
  mov ebx,esi
648
  mov ebx,esi
649
  add ebx,eax
649
  add ebx,eax
650
  mov ecx,dword[size] ;ecx = size
650
  mov ecx,dword[size] ;ecx = size
651
  shr ecx,1
651
  shr ecx,1
652
  sub ecx,dword[size_w] ;«¨è­ïï áâப  ¯¨ªá¥«¥©
652
  sub ecx,dword[size_w] ;«¨è­ïï áâப  ¯¨ªá¥«¥©
653
  xor edi,edi
653
  xor edi,edi
654
  @@: ;¯®¤¦ â¨¥ ¯¨ªá¥«¥©
654
  @@: ;¯®¤¦ â¨¥ ¯¨ªá¥«¥©
655
    mov edx,dword[ebx] ;ª®¯¨à㥬 梥⠭¨¦­¥£® ¯¨ªá¥«ï
655
    mov edx,dword[ebx] ;ª®¯¨à㥬 梥⠭¨¦­¥£® ¯¨ªá¥«ï
656
    mov word[eax],dx
656
    mov word[eax],dx
657
    shr edx,16
657
    shr edx,16
658
    mov byte[eax+2],dl
658
    mov byte[eax+2],dl
659
 
659
 
660
    add eax,3
660
    add eax,3
661
    add ebx,3
661
    add ebx,3
662
    inc edi
662
    inc edi
663
    cmp edi,dword[size_w]
663
    cmp edi,dword[size_w]
664
    jl .old_line_2
664
    jl .old_line_2
665
      add ebx,esi
665
      add ebx,esi
666
      xor edi,edi
666
      xor edi,edi
667
    .old_line_2:
667
    .old_line_2:
668
    loop @b
668
    loop @b
669
 
669
 
670
  popad
670
  popad
671
  ret
671
  ret
672
endp
672
endp
673
 
673
 
674
;input:
674
;input:
675
;data_rgb - pointer to rgb data
675
;data_rgb - pointer to rgb data
676
;size - count img pixels (size img data / 3(rgb) )
676
;size - count img pixels (size img data / 3(rgb) )
677
align 4
677
align 4
678
proc img_rgb_wmul2, data_rgb:dword, size:dword
678
proc img_rgb_wmul2, data_rgb:dword, size:dword
679
  push eax ebx ecx edx
679
  push eax ebx ecx edx
680
  ;eax - source
680
  ;eax - source
681
  ;ebx - destination
681
  ;ebx - destination
682
  mov ecx,dword[size] ;ecx = size
682
  mov ecx,dword[size] ;ecx = size
683
  mov eax,ecx
683
  mov eax,ecx
684
  dec eax
684
  dec eax
685
  lea eax,[eax+eax*2] ;eax = (size-1)*3
685
  lea eax,[eax+eax*2] ;eax = (size-1)*3
686
  mov ebx,eax ;ebx = size*3
686
  mov ebx,eax ;ebx = size*3
687
  add eax,dword[data_rgb] ;eax = pointer + size*3
687
  add eax,dword[data_rgb] ;eax = pointer + size*3
688
  add ebx,eax ;ebx = pointer + 2*size*3
688
  add ebx,eax ;ebx = pointer + 2*size*3
689
  @@:
689
  @@:
690
    mov edx,dword[eax] ;edx = pixel color
690
    mov edx,dword[eax] ;edx = pixel color
691
    mov word[ebx],dx
691
    mov word[ebx],dx
692
    mov word[ebx+3],dx
692
    mov word[ebx+3],dx
693
    shr edx,16
693
    shr edx,16
694
    mov byte[ebx+2],dl
694
    mov byte[ebx+2],dl
695
    mov byte[ebx+3+2],dl
695
    mov byte[ebx+3+2],dl
696
    sub eax,3
696
    sub eax,3
697
    sub ebx,6
697
    sub ebx,6
698
    loop @b
698
    loop @b
699
  pop edx ecx ebx eax
699
  pop edx ecx ebx eax
700
  ret
700
  ret
701
endp
701
endp
702
 
702
 
703
;äã­ªæ¨ï ¤«ï à áâ¢ ­¨ï ¨§®¡à ¦¥­¨ï ¯® ¢ëá®â¥ ¢ 2 à § 
703
;äã­ªæ¨ï ¤«ï à áâ¢ ­¨ï ¨§®¡à ¦¥­¨ï ¯® ¢ëá®â¥ ¢ 2 à § 
704
;¢ 㪠§ â¥«¥ data_rgb ¯ ¬ï⨠¤®«¦­® ¡ëâì ¢ 2 à §  ¡®«ìè¥ ç¥¬ size*3
704
;¢ 㪠§ â¥«¥ data_rgb ¯ ¬ï⨠¤®«¦­® ¡ëâì ¢ 2 à §  ¡®«ìè¥ ç¥¬ size*3
705
;¨­ ç¥ ¯à¨ à áâ¢ ­¨¨ ¡ã¤¥â ®è¨¡ª , ¢ë室  ­  çã¦ãî ¯ ¬ïâì
705
;¨­ ç¥ ¯à¨ à áâ¢ ­¨¨ ¡ã¤¥â ®è¨¡ª , ¢ë室  ­  çã¦ãî ¯ ¬ïâì
706
;input:
706
;input:
707
;data_rgb - pointer to rgb data
707
;data_rgb - pointer to rgb data
708
;size - count img pixels (size img data / 3(rgb) )
708
;size - count img pixels (size img data / 3(rgb) )
709
;size_w - width img in pixels
709
;size_w - width img in pixels
710
align 4
710
align 4
711
proc img_rgb_hmul2, data_rgb:dword, size:dword, size_w:dword
711
proc img_rgb_hmul2, data_rgb:dword, size:dword, size_w:dword
712
  pushad
712
  pushad
713
 
713
 
714
  mov esi,dword[size_w]
714
  mov esi,dword[size_w]
715
  lea esi,[esi+esi*2] ;esi = width * 3(rgb)
715
  lea esi,[esi+esi*2] ;esi = width * 3(rgb)
716
  mov eax,dword[size]
716
  mov eax,dword[size]
717
  lea eax,[eax+eax*2]
717
  lea eax,[eax+eax*2]
718
  mov edi,eax
718
  mov edi,eax
719
  shl edi,1
719
  shl edi,1
720
  add eax,dword[data_rgb] ;eax = pointer to end pixel (old image) + 1
720
  add eax,dword[data_rgb] ;eax = pointer to end pixel (old image) + 1
721
  add edi,dword[data_rgb] ;edi = pointer to end pixel (new image) + 1
721
  add edi,dword[data_rgb] ;edi = pointer to end pixel (new image) + 1
722
  mov ebx,edi
722
  mov ebx,edi
723
  sub ebx,esi
723
  sub ebx,esi
724
 
724
 
725
  .beg_line:
725
  .beg_line:
726
  mov ecx,dword[size_w]
726
  mov ecx,dword[size_w]
727
  @@:
727
  @@:
728
    sub eax,3
728
    sub eax,3
729
    sub ebx,3
729
    sub ebx,3
730
    sub edi,3
730
    sub edi,3
731
 
731
 
732
    mov edx,dword[eax] ;edx = pixel color
732
    mov edx,dword[eax] ;edx = pixel color
733
    mov word[ebx],dx
733
    mov word[ebx],dx
734
    mov word[edi],dx
734
    mov word[edi],dx
735
    shr edx,16
735
    shr edx,16
736
    mov byte[ebx+2],dl
736
    mov byte[ebx+2],dl
737
    mov byte[edi+2],dl
737
    mov byte[edi+2],dl
738
 
738
 
739
    loop @b
739
    loop @b
740
 
740
 
741
  sub ebx,esi
741
  sub ebx,esi
742
  sub edi,esi
742
  sub edi,esi
743
 
743
 
744
  cmp eax,dword[data_rgb]
744
  cmp eax,dword[data_rgb]
745
  jg .beg_line
745
  jg .beg_line
746
 
746
 
747
  popad
747
  popad
748
  ret
748
  ret
749
endp
749
endp
750
 
750
 
751
;input:
751
;input:
752
;data_rgb - pointer to rgb data
752
;data_rgb - pointer to rgb data
753
;size - count img pixels (size img data / 3(rgb) )
753
;size - count img pixels (size img data / 3(rgb) )
754
;size_w - width img in pixels
754
;size_w - width img in pixels
755
align 4
755
align 4
756
proc img_rgb_hoffs, data_rgb:dword, size:dword, size_w:dword, hoffs:dword
756
proc img_rgb_hoffs, data_rgb:dword, size:dword, size_w:dword, hoffs:dword
757
  push eax ebx ecx edx esi
757
  push eax ebx ecx edx esi
758
 
758
 
759
  mov esi,dword[size_w]
759
  mov esi,dword[size_w]
760
  lea esi,[esi+esi*2] ;esi = width * 3(rgb)
760
  lea esi,[esi+esi*2] ;esi = width * 3(rgb)
761
  imul esi,dword[hoffs]
761
  imul esi,dword[hoffs]
762
 
762
 
763
  mov eax,dword[size]
763
  mov eax,dword[size]
764
  lea eax,[eax+eax*2]
764
  lea eax,[eax+eax*2]
765
  add eax,dword[data_rgb] ;eax = pointer to end pixel + 1
765
  add eax,dword[data_rgb] ;eax = pointer to end pixel + 1
766
  sub eax,3
766
  sub eax,3
767
  mov ebx,eax
767
  mov ebx,eax
768
  add ebx,esi
768
  add ebx,esi
769
 
769
 
770
  mov ecx,dword[size]
770
  mov ecx,dword[size]
771
  dec ecx
771
  dec ecx
772
  @@:
772
  @@:
773
    mov edx,dword[eax] ;edx = pixel color
773
    mov edx,dword[eax] ;edx = pixel color
774
    mov word[ebx],dx
774
    mov word[ebx],dx
775
    shr edx,16
775
    shr edx,16
776
    mov byte[ebx+2],dl
776
    mov byte[ebx+2],dl
777
 
777
 
778
    sub eax,3
778
    sub eax,3
779
    sub ebx,3
779
    sub ebx,3
780
    loop @b
780
    loop @b
781
  pop esi edx ecx ebx eax
781
  pop esi edx ecx ebx eax
782
  ret
782
  ret
783
endp
783
endp
784
 
784
 
785
 
785
 
786
;input:
786
;input:
787
;data_rgb - pointer to rgb data
787
;data_rgb - pointer to rgb data
788
;size_w_old - width img in pixels
788
;size_w_old - width img in pixels
789
;size_w_new - new width img in pixels
789
;size_w_new - new width img in pixels
790
;size_h - height img in pixels
790
;size_h - height img in pixels
791
align 4
791
align 4
792
proc img_rgb_wcrop, data_rgb:dword, size_w_old:dword, size_w_new:dword, size_h:dword
792
proc img_rgb_wcrop, data_rgb:dword, size_w_old:dword, size_w_new:dword, size_h:dword
793
  pushad
793
  pushad
794
    mov eax, dword[size_w_old]
794
    mov eax, dword[size_w_old]
795
    lea eax, dword[eax+eax*2] ;eax = width(old) * 3(rgb)
795
    lea eax, dword[eax+eax*2] ;eax = width(old) * 3(rgb)
796
    mov ebx, dword[size_w_new]
796
    mov ebx, dword[size_w_new]
797
    lea ebx, dword[ebx+ebx*2] ;ebx = width(new) * 3(rgb)
797
    lea ebx, dword[ebx+ebx*2] ;ebx = width(new) * 3(rgb)
798
    mov edx, dword[size_h]
798
    mov edx, dword[size_h]
799
    ;dec edx
799
    ;dec edx
800
    mov edi, dword[data_rgb] ;edi - ¯®«ã砥⠤ ­­ë¥
800
    mov edi, dword[data_rgb] ;edi - ¯®«ã砥⠤ ­­ë¥
801
    mov esi, edi
801
    mov esi, edi
802
    add edi, ebx
802
    add edi, ebx
803
    add esi, eax
803
    add esi, eax
804
    cld
804
    cld
805
  @@:
805
  @@:
806
    dec edx ;㬥­ìè ¥¬ áç¥â稪 ®áâ ¢è¨åáï áâப ­  1
806
    dec edx ;㬥­ìè ¥¬ áç¥â稪 ®áâ ¢è¨åáï áâப ­  1
807
    cmp edx,0
807
    cmp edx,0
808
    jle @f
808
    jle @f
809
 
809
 
810
    mov ecx, ebx
810
    mov ecx, ebx
811
    rep movsb ;¯¥à¥­®á (ª®¯¨à®¢ ­¨¥) áâப¨ ¯¨ªá¥«¥©
811
    rep movsb ;¯¥à¥­®á (ª®¯¨à®¢ ­¨¥) áâப¨ ¯¨ªá¥«¥©
812
;stdcall mem_copy,esi,edi,ebx
812
;stdcall mem_copy,esi,edi,ebx
813
 
813
 
814
    add esi,eax ;¯¥à¥å®¤ ­  ­®¢ãî áâà®çªã ¨§®¡à ¦¥­¨ï
814
    add esi,eax ;¯¥à¥å®¤ ­  ­®¢ãî áâà®çªã ¨§®¡à ¦¥­¨ï
815
    sub esi,ebx
815
    sub esi,ebx
816
;add esi,eax
816
;add esi,eax
817
;add edi,ebx
817
;add edi,ebx
818
    jmp @b
818
    jmp @b
819
  @@:
819
  @@:
820
 
820
 
821
  popad
821
  popad
822
  ret
822
  ret
823
endp
823
endp
824
 
824
 
825
align 4
825
align 4
826
proc mem_copy, source:dword, destination:dword, len:dword
826
proc mem_copy, source:dword, destination:dword, len:dword
827
  push ecx esi edi
827
  push ecx esi edi
828
    cld
828
    cld
829
    mov esi, dword[source]
829
    mov esi, dword[source]
830
    mov edi, dword[destination]
830
    mov edi, dword[destination]
831
    mov ecx, dword[len]
831
    mov ecx, dword[len]
832
    rep movsb
832
    rep movsb
833
  pop edi esi ecx
833
  pop edi esi ecx
834
  ret
834
  ret
835
endp
835
endp
836
 
836
 
837
align 4
837
align 4
838
proc mem_clear, mem:dword, len:dword
838
proc mem_clear, mem:dword, len:dword
839
  push eax ecx edi
839
  push eax ecx edi
840
    cld
840
    cld
841
    xor al,al
841
    xor al,al
842
    mov edi, dword[mem]
842
    mov edi, dword[mem]
843
    mov ecx, dword[len]
843
    mov ecx, dword[len]
844
    repne stosb
844
    repne stosb
845
  pop edi ecx eax
845
  pop edi ecx eax
846
  ret
846
  ret
847
endp
847
endp
848
 
848
 
849
align 4
849
align 4
850
fun_opn_dlg: ;äã­ªæ¨ï ¤«ï ¢ë§®¢  OpenFile ¤¨ «®£ 
850
fun_opn_dlg: ;äã­ªæ¨ï ¤«ï ¢ë§®¢  OpenFile ¤¨ «®£ 
851
	pushad
851
	pushad
852
	copy_path open_dialog_name,communication_area_default_path,file_name,0
852
	copy_path open_dialog_name,communication_area_default_path,file_name,0
853
	mov [OpenDialog_data.type],2
853
	mov [OpenDialog_data.type],2
854
	mov dword[plugin_path],0 ;çâ®-¡ë ¯à¨ ®âªàë⨨ ¤¨ «®£®¢®£® ®ª­  ¯ãâì ¢á¥£¤  ¡à «áï ¨§ OpenDialog_data.dir_default_path
854
	mov dword[plugin_path],0 ;çâ®-¡ë ¯à¨ ®âªàë⨨ ¤¨ «®£®¢®£® ®ª­  ¯ãâì ¢á¥£¤  ¡à «áï ¨§ OpenDialog_data.dir_default_path
855
 
855
 
856
	stdcall [OpenDialog_Start],OpenDialog_data
856
	stdcall [OpenDialog_Start],OpenDialog_data
857
	cmp [OpenDialog_data.status],2
857
	cmp [OpenDialog_data.status],2
858
	je @f
858
	je @f
859
		mov esi,[OpenDialog_data.openfile_path]
859
		mov esi,[OpenDialog_data.openfile_path]
860
		stdcall [str_len],dword[edit1.text],dword[edit1.max]
860
		stdcall [str_len],dword[edit1.text],dword[edit1.max]
861
		mov [edit1.size],eax
861
		mov [edit1.size],eax
862
		mov [edit1.pos],eax
862
		mov [edit1.pos],eax
863
		stdcall [edit_box_draw], edit1
863
		stdcall [edit_box_draw], edit1
864
	@@:
864
	@@:
865
	popad
865
	popad
866
	ret
866
	ret
867
 
867
 
868
  txt_met_up db 24,0
868
  txt_met_up db 24,0
869
  txt_met_dn db 25,0
869
  txt_met_dn db 25,0
870
  txt_met_sh db '*',0
870
  txt_met_sh db '*',0
871
  txt_zoom_m db '-',0
871
  txt_zoom_m db '-',0
872
  txt_zoom_p db '+',0
872
  txt_zoom_p db '+',0
873
  txt151 db '„®¡ ¢¨âì ¬¥âªã',0
873
  txt151 db '„®¡ ¢¨âì ¬¥âªã',0
874
  txt152 db '‘®åà ­¨âì ¬¥âª¨',0
874
  txt152 db '‘®åà ­¨âì ¬¥âª¨',0
875
  txt_but_refresh db 'Ž¡­®¢¨âì',0
875
  txt_but_refresh db 'Ž¡­®¢¨âì',0
876
  txt_cache db 'Cache:',0
876
  txt_cache db 'Cache:',0
877
  txt141 db '‚¨¤ ª àâë',0
877
  txt141 db '‚¨¤ ª àâë',0
878
  txt142 db '‚ë¡®à ¬¥âª¨',0
878
  txt142 db '‚ë¡®à ¬¥âª¨',0
879
 
879
 
880
; check_boxes
880
; check_boxes
881
ch1 check_box 5,  5, 6, 12, 0xffffd0, 0x800000, 0, ch_text1, 12,ch_flag_en
881
ch1 check_box 5,  5, 6, 12, 0xffffd0, 0x800000, 0, ch_text1, 12,ch_flag_en
882
ch2 check_box 5, 20, 6, 12, 0xffffd0, 0x800000, 0, ch_text2, 11,ch_flag_en
882
ch2 check_box 5, 20, 6, 12, 0xffffd0, 0x800000, 0, ch_text2, 11,ch_flag_en
883
checkboxes_end:
883
checkboxes_end:
884
 
884
 
885
ch_text1 db '¡à âì ᢥàåã'
885
ch_text1 db '¡à âì ᢥàåã'
886
ch_text2 db '¡à âì á­¨§ã'
886
ch_text2 db '¡à âì á­¨§ã'
887
 
887
 
888
edit1 edit_box 190, 215,  10, 0xd0ffff, 0xff, 0x80ff, 0, 0xa000, 4090, openfile_path, mouse_dd, 0
888
edit1 edit_box 190, 215,  10, 0xd0ffff, 0xff, 0x80ff, 0, 0xa000, 4090, openfile_path, mouse_dd, 0
889
edit2 edit_box 100, 370, 240, 0xd0ffff, 0xff, 0x80ff, 0, 0xa000,  30, ed_buffer.2, mouse_dd, 0
889
edit2 edit_box 100, 370, 240, 0xd0ffff, 0xff, 0x80ff, 0, 0xa000,  30, ed_buffer.2, mouse_dd, 0
890
editboxes_end:
890
editboxes_end:
891
 
891
 
892
tree1 tree_list 10,10, tl_list_box_mode+tl_key_no_edit, 16,16,\
892
tree1 tree_list 10,10, tl_list_box_mode+tl_key_no_edit, 16,16,\
893
    0x8080ff,0x0000ff,0xffffff, 265,45,90,85, 0,0,0,\
893
    0x8080ff,0x0000ff,0xffffff, 265,45,90,85, 0,0,0,\
894
    el_focus, 0,fun_new_map_type
894
    el_focus, 0,fun_new_map_type
895
tree2 tree_list 32,300, tl_draw_par_line, 16,16,\
895
tree2 tree_list 32,300, tl_draw_par_line, 16,16,\
896
    0x8080ff,0x0000ff,0xffffff, 265,145,190,85, 0,12,0,\
896
    0x8080ff,0x0000ff,0xffffff, 265,145,190,85, 0,12,0,\
897
    el_focus, wScrMetki,fun_goto_met
897
    el_focus, wScrMetki,fun_goto_met
898
 
898
 
899
align 4
899
align 4
900
wScrMetki:
900
wScrMetki:
901
.x:
901
.x:
902
.size_x     dw 16 ;+0
902
.size_x     dw 16 ;+0
903
.start_x    dw 0 ;+2
903
.start_x    dw 0 ;+2
904
.y:
904
.y:
905
.size_y     dw 100 ;+4
905
.size_y     dw 100 ;+4
906
.start_y    dw 0 ;+6
906
.start_y    dw 0 ;+6
907
.btn_high   dd 15 ;+8
907
.btn_high   dd 15 ;+8
908
.type	    dd 1  ;+12
908
.type	    dd 1  ;+12
909
.max_area   dd 100  ;+16
909
.max_area   dd 100  ;+16
910
.cur_area   dd 30  ;+20
910
.cur_area   dd 30  ;+20
911
.position   dd 0  ;+24
911
.position   dd 0  ;+24
912
.bckg_col   dd 0xeeeeee ;+28
912
.bckg_col   dd 0xeeeeee ;+28
913
.frnt_col   dd 0xbbddff ;+32
913
.frnt_col   dd 0xbbddff ;+32
914
.line_col   dd 0  ;+36
914
.line_col   dd 0  ;+36
915
.redraw     dd 0  ;+40
915
.redraw     dd 0  ;+40
916
.delta	    dw 0  ;+44
916
.delta	    dw 0  ;+44
917
.delta2     dw 0  ;+46
917
.delta2     dw 0  ;+46
918
.run_x:
918
.run_x:
919
.r_size_x   dw 0  ;+48
919
.r_size_x   dw 0  ;+48
920
.r_start_x  dw 0  ;+50
920
.r_start_x  dw 0  ;+50
921
.run_y:
921
.run_y:
922
.r_size_y   dw 0 ;+52
922
.r_size_y   dw 0 ;+52
923
.r_start_y  dw 0 ;+54
923
.r_start_y  dw 0 ;+54
924
.m_pos	    dd 0 ;+56
924
.m_pos	    dd 0 ;+56
925
.m_pos_2    dd 0 ;+60
925
.m_pos_2    dd 0 ;+60
926
.m_keys     dd 0 ;+64
926
.m_keys     dd 0 ;+64
927
.run_size   dd 0 ;+68
927
.run_size   dd 0 ;+68
928
.position2  dd 0 ;+72
928
.position2  dd 0 ;+72
929
.work_size  dd 0 ;+76
929
.work_size  dd 0 ;+76
930
.all_redraw dd 0 ;+80
930
.all_redraw dd 0 ;+80
931
.ar_offset  dd 1 ;+84
931
.ar_offset  dd 1 ;+84
932
 
932
 
933
ed_buffer: ;òåêñò äëÿ edit
933
ed_buffer: ;òåêñò äëÿ edit
934
  .2: rb 32
934
  .2: rb 32
935
 
935
 
936
el_focus dd tree1
936
el_focus dd tree1
937
 
937
 
938
tree_sys_icon dd 0
938
tree_sys_icon dd 0
939
tree_nod_icon dd 0
939
tree_nod_icon dd 0
940
 
940
 
941
bmp_icon   dd 0 ;¯ ¬ïâì ¤«ï § £à㧪¨ ¨§®¡à ¦¥­¨ï
941
bmp_icon   dd 0 ;¯ ¬ïâì ¤«ï § £à㧪¨ ¨§®¡à ¦¥­¨ï
942
data_icon  dd 0 ;¯ ¬ïâì ¤«ï ¯à¥®¡à §®¢ ­¨ï ª à⨭ª¨ äã­ªæ¨ï¬¨ libimg
942
data_icon  dd 0 ;¯ ¬ïâì ¤«ï ¯à¥®¡à §®¢ ­¨ï ª à⨭ª¨ äã­ªæ¨ï¬¨ libimg
943
 
943
 
944
run_file_70 FileInfoBlock
944
run_file_70 FileInfoBlock
945
 
945
 
946
 
946
 
947
txt_tile_path db 'tile path',0
947
txt_tile_path db 'tile path',0
948
  rb 300
948
  rb 300
949
txt_tile_type dd txt_tile_type_0 ;㪠§ â¥«ì ­  ¢ë¡à ­­ë© ⨯ ä ©«®¢
949
txt_tile_type dd txt_tile_type_0 ;㪠§ â¥«ì ­  ¢ë¡à ­­ë© ⨯ ä ©«®¢
950
txt_tile_type_0 db 0
950
txt_tile_type_0 db 0
951
  rb 10
951
  rb 10
952
 
952
 
953
;---------------------------------------------------------------------
953
;---------------------------------------------------------------------
954
align 4
954
align 4
955
OpenDialog_data:
955
OpenDialog_data:
956
.type			dd 2
956
.type			dd 2
957
.procinfo		dd procinfo	;+4
957
.procinfo		dd procinfo	;+4
958
.com_area_name		dd communication_area_name	;+8
958
.com_area_name		dd communication_area_name	;+8
959
.com_area		dd 0	;+12
959
.com_area		dd 0	;+12
960
.opendir_path		dd plugin_path	;+16
960
.opendir_path		dd plugin_path	;+16
961
.dir_default_path	dd openfile_path ;+20
961
.dir_default_path	dd default_dir ;+20
962
.start_path		dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
962
.start_path		dd file_name ;+24 ¯ãâì ª ¤¨ «®£ã ®âªàëâ¨ï ä ©«®¢
963
.draw_window		dd draw_window	;+28
963
.draw_window		dd draw_window	;+28
964
.status 		dd 0	;+32
964
.status 		dd 0	;+32
965
.openfile_path		dd openfile_path	;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
965
.openfile_path		dd openfile_path	;+36 ¯ãâì ª ®âªà뢠¥¬®¬ã ä ©«ã
966
.filename_area		dd filename_area	;+40
966
.filename_area		dd filename_area	;+40
967
.filter_area		dd Filter
967
.filter_area		dd Filter
968
.x:
968
.x:
969
.x_size 		dw 420 ;+48 ; Window X size
969
.x_size 		dw 420 ;+48 ; Window X size
970
.x_start		dw 10 ;+50 ; Window X position
970
.x_start		dw 10 ;+50 ; Window X position
971
.y:
971
.y:
972
.y_size 		dw 320 ;+52 ; Window y size
972
.y_size 		dw 320 ;+52 ; Window y size
973
.y_start		dw 10 ;+54 ; Window Y position
973
.y_start		dw 10 ;+54 ; Window Y position
-
 
974
 
-
 
975
default_dir db '/rd/1',0 ;¤¨à¥ªâ®à¨ï ¯® 㬮«ç ­¨î
974
 
976
 
975
communication_area_name:
977
communication_area_name:
976
	db 'FFFFFFFF_open_dialog',0
978
	db 'FFFFFFFF_open_dialog',0
977
open_dialog_name:
979
open_dialog_name:
978
	db 'opendial',0
980
	db 'opendial',0
979
communication_area_default_path:
981
communication_area_default_path:
980
	db '/rd/1/File managers/',0
982
	db '/rd/1/File managers/',0
981
 
983
 
982
Filter:
984
Filter:
983
dd Filter.end - Filter.1
985
dd Filter.end - Filter.1
984
.1:
986
.1:
985
db 'TXT',0
987
db 'TXT',0
986
.end:
988
.end:
987
db 0
989
db 0
988
 
990
 
989
align 4
991
align 4
990
map: ;ª®®à¤¨­ âë ª àâë
992
map: ;ª®®à¤¨­ âë ª àâë
991
  .coord_x dd 0 ;ª®®à¤¨­ â  x
993
  .coord_x dd 0 ;ª®®à¤¨­ â  x
992
  .coord_y dd 0 ;ª®®à¤¨­ â  y
994
  .coord_y dd 0 ;ª®®à¤¨­ â  y
993
  .zoom    db 1 ;¬ áèâ ¡
995
  .zoom    db 1 ;¬ áèâ ¡
994
 
996
 
995
align 4
997
align 4
996
tile_00 rb size_tile_struc * max_tiles_count
998
tile_00 rb size_tile_struc * max_tiles_count
997
 
999
 
998
;íâ®â ª®¤ ­¥ ¬®©, ®­ ¯à¥®¡à §ã¥â ç¨á«® ¢ áâபã
1000
;íâ®â ª®¤ ­¥ ¬®©, ®­ ¯à¥®¡à §ã¥â ç¨á«® ¢ áâபã
999
;input:
1001
;input:
1000
; eax = value
1002
; eax = value
1001
; edi = string buffer
1003
; edi = string buffer
1002
;output:
1004
;output:
1003
; edi =
1005
; edi =
1004
align 4
1006
align 4
1005
tl_convert_to_str:
1007
tl_convert_to_str:
1006
  pushad
1008
  pushad
1007
    mov dword[edi+1],0;0x20202020
1009
    mov dword[edi+1],0;0x20202020
1008
    call .str
1010
    call .str
1009
  popad
1011
  popad
1010
  ret
1012
  ret
1011
 
1013
 
1012
align 4
1014
align 4
1013
.str:
1015
.str:
1014
  mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬  áç¨á«¥­¨ï ¨§¬¥­ïîâáï ॣ¨áâàë ebx,eax,ecx,edx ¢å®¤­ë¥ ¯ à ¬¥âàë eax - ç¨á«®
1016
  mov ecx,0x0a ;§ ¤ ¥âáï á¨á⥬  áç¨á«¥­¨ï ¨§¬¥­ïîâáï ॣ¨áâàë ebx,eax,ecx,edx ¢å®¤­ë¥ ¯ à ¬¥âàë eax - ç¨á«®
1015
    ;¯à¥à¥¢®¤ ç¨á«  ¢ ASCII áâப㠢§®¤­ë¥ ¤ ­­ë¥ ecx=á¨á⥬  áç¨á«¥­ï edi  ¤à¥á ªã¤  § ¯¨á뢠âì, ¡ã¤¥¬ áâபã, ¯à¨ç¥¬ ª®­¥æ ¯¥à¥¬¥­­®© 
1017
    ;¯à¥à¥¢®¤ ç¨á«  ¢ ASCII áâப㠢§®¤­ë¥ ¤ ­­ë¥ ecx=á¨á⥬  áç¨á«¥­ï edi  ¤à¥á ªã¤  § ¯¨á뢠âì, ¡ã¤¥¬ áâபã, ¯à¨ç¥¬ ª®­¥æ ¯¥à¥¬¥­­®© 
1016
  cmp eax,ecx  ;áà ¢­¨âì ¥á«¨ ¢ eax ¬¥­ìè¥ ç¥¬ ¢ ecx â® ¯¥à¥©â¨ ­  @@-1 â.¥. ­  pop eax
1018
  cmp eax,ecx  ;áà ¢­¨âì ¥á«¨ ¢ eax ¬¥­ìè¥ ç¥¬ ¢ ecx â® ¯¥à¥©â¨ ­  @@-1 â.¥. ­  pop eax
1017
  jb @f
1019
  jb @f
1018
  xor edx,edx  ;®ç¨áâ¨âì edx
1020
  xor edx,edx  ;®ç¨áâ¨âì edx
1019
  div ecx      ;à §¤¥«¨âì - ®áâ â®ª ¢ edx
1021
  div ecx      ;à §¤¥«¨âì - ®áâ â®ª ¢ edx
1020
  push edx     ;¯®«®¦¨âì ¢ á⥪
1022
  push edx     ;¯®«®¦¨âì ¢ á⥪
1021
  ;dec edi             ;ᬥ饭¨¥ ­¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®­æ  áâப¨
1023
  ;dec edi             ;ᬥ饭¨¥ ­¥®¡å®¤¨¬®¥ ¤«ï § ¯¨á¨ á ª®­æ  áâப¨
1022
  call .str;¯¥à¥©â¨ ­  á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx
1024
  call .str;¯¥à¥©â¨ ­  á ¬ã ᥡï â.¥. ¢ë§¢ âì á ¬ã á¥¡ï ¨ â ª ¤® ⮣® ¬®¬¥­â  ¯®ª  ¢ eax ­¥ áâ ­¥â ¬¥­ìè¥ ç¥¬ ¢ ecx
1023
  pop eax
1025
  pop eax
1024
  @@: ;cmp al,10 ;¯à®¢¥à¨âì ­¥ ¬¥­ìè¥ «¨ §­ ç¥­¨¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥­ï 10 ¤ ­­ ï ª®¬ ­¤  - «¨è­ ï))
1026
  @@: ;cmp al,10 ;¯à®¢¥à¨âì ­¥ ¬¥­ìè¥ «¨ §­ ç¥­¨¥ ¢ al 祬 10 (¤«ï á¨á⥬ë áç¨á«¥­ï 10 ¤ ­­ ï ª®¬ ­¤  - «¨è­ ï))
1025
  or al,0x30  ;¤ ­­ ï ª®¬ ­¤  ª®à®ç¥  祬 ¤¢¥ ¢ëè¥
1027
  or al,0x30  ;¤ ­­ ï ª®¬ ­¤  ª®à®ç¥  祬 ¤¢¥ ¢ëè¥
1026
  stosb       ;§ ¯¨á âì í«¥¬¥­â ¨§ ॣ¨áâà  al ¢ ï祪㠯 ¬ï⨠es:edi
1028
  stosb       ;§ ¯¨á âì í«¥¬¥­â ¨§ ॣ¨áâà  al ¢ ï祪㠯 ¬ï⨠es:edi
1027
  ret	      ;¢¥à­ãâìáï ç¥­ì ¨­â¥à¥á­ë© 室 â.ª. ¯®ª  ¢ á⥪¥ åà ­¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï
1029
  ret	      ;¢¥à­ãâìáï ç¥­ì ¨­â¥à¥á­ë© 室 â.ª. ¯®ª  ¢ á⥪¥ åà ­¨âìáï ª®«-¢® ¢ë§®¢®¢ â® á⮫쪮 à § ¬ë ¨ ¡ã¤¥¬ ¢ë§ë¢ âìáï
1028
 
1030
 
1029
 
1031
 
1030
hed db 'Planet viewer 24.08.10',0 ;¯®¤¯¨áì ®ª­ 
1032
hed db 'Planet viewer 24.08.10',0 ;¯®¤¯¨áì ®ª­ 
1031
 
1033
 
1032
sc system_colors  ;á¨á⥬­ë¥ 梥â 
1034
sc system_colors  ;á¨á⥬­ë¥ 梥â 
1033
mouse_dd dd 0 ;­ã¦­® ¤«ï Shift-  ¢ editbox
1035
mouse_dd dd 0 ;­ã¦­® ¤«ï Shift-  ¢ editbox
1034
i_end:
1036
i_end:
1035
	rb 1024
1037
	rb 1024
1036
	align 16
1038
	align 16
1037
	procinfo process_information
1039
	procinfo process_information
1038
stacktop:
1040
stacktop:
1039
	sys_path rb 4096
1041
	sys_path rb 4096
1040
	file_name:
1042
	file_name:
1041
		rb 4096
1043
		rb 4096
1042
	plugin_path:
1044
	plugin_path:
1043
		rb 4096
1045
		rb 4096
1044
	openfile_path:
1046
	openfile_path:
1045
		rb 4096
1047
		rb 4096
1046
	filename_area:
1048
	filename_area:
1047
		rb 256
1049
		rb 256
1048
mem:
1050
mem: