Rev 3951 | Rev 6342 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 3951 | Rev 6328 | ||
---|---|---|---|
Line 162... | Line 162... | ||
162 | call [OpenDialog_Start] |
162 | call [OpenDialog_Start] |
Line 163... | Line 163... | ||
163 | 163 | ||
164 | cmp [OpenDialog_data.status],1 |
164 | cmp [OpenDialog_data.status],1 |
165 | jne still |
165 | jne still |
166 | ;--------------------------------------------------------------------- |
166 | ;--------------------------------------------------------------------- |
167 | open_1: |
167 | ;open_1: |
Line 168... | Line -... | ||
168 | mcall 40,0x80000027 ; 100111b |
- | |
169 | - | ||
170 | mov eax,file_path |
168 | mcall 40,0x80000027 ; 100111b |
Line 171... | Line -... | ||
171 | mov ebx,[ScreenPointer] |
- | |
172 | add ebx,0x10000 |
- | |
173 | - | ||
174 | call load_heading_of_file |
- | |
175 | - | ||
176 | mov esi,[ScreenPointer] |
- | |
177 | add esi,0x10000 |
- | |
178 | ;-------------is this BMP file ?---------------- |
- | |
179 | xor eax,eax |
- | |
180 | mov ax,[esi] |
- | |
181 | mov [type],ax |
- | |
182 | - | ||
183 | cmp [type],word 'BM' |
- | |
184 | jne no_bmp_file |
- | |
185 | - | ||
186 | xor eax,eax |
- | |
187 | xor ebx,ebx |
- | |
188 | mov eax,[esi+18] |
- | |
189 | mov ebx,[esi+22] |
- | |
190 | mov [Picture_SizeX],eax |
- | |
191 | mov [Picture_SizeY],ebx |
- | |
192 | jmp exit_type |
- | |
193 | ;--------------------------------------------------------------------- |
- | |
194 | no_bmp_file: |
- | |
195 | ;-------------is this GIF file ?---------------- |
- | |
196 | xor eax,eax |
- | |
197 | mov ax,[esi] |
- | |
198 | mov [type],ax |
- | |
199 | - | ||
200 | cmp [type],'GI' |
- | |
201 | jne no_gif_file |
- | |
202 | - | ||
203 | add esi,6 |
- | |
204 | xor eax,eax |
- | |
205 | xor ebx,ebx |
- | |
206 | mov ax,word[esi] |
- | |
207 | mov bx,word[esi+2] |
- | |
208 | mov [Picture_SizeX],eax |
- | |
209 | mov [Picture_SizeY],ebx |
- | |
210 | jmp exit_type |
- | |
211 | ;--------------------------------------------------------------------- |
- | |
212 | no_gif_file: |
- | |
213 | jmp no_unpakcing_file |
- | |
214 | ;--------------------------------------------------------------------- |
- | |
215 | exit_type: |
- | |
216 | ;---------------------------------------------------------- |
- | |
217 | ;Get momory for unpacking picture and for picture's bufers |
- | |
218 | ;---------------------------------------------------------- |
- | |
219 | call GetMemory |
- | |
220 | ;---------------------------------------------------------- |
- | |
221 | ;--------------------Load file in memory------------------- |
- | |
222 | ;---------------------------------------------------------- |
- | |
223 | mov eax,file_path |
- | |
224 | mov ebx,[PointerToCopyPicture] |
- | |
225 | add ebx,1000 |
- | |
226 | call load_file |
- | |
227 | ;---------------------------------------------------------- |
- | |
228 | ;-------------------Unpacking picture---------------------- |
- | |
229 | ;---------------------------------------------------------- |
- | |
230 | mov esi,[PointerToCopyPicture] |
- | |
231 | add esi,1000 |
- | |
232 | mov edi,[PointerToPicture] |
- | |
233 | mov eax,[ScreenPointer] |
- | |
234 | - | ||
235 | cmp [type],'BM' |
- | |
236 | jne no_unpakcing_bmp_file |
- | |
237 | ;BMP DECODER |
- | |
238 | - | ||
239 | call bmptoimg |
- | |
240 | - | ||
241 | mov [save_flag],1 |
- | |
242 | jmp draw_1 |
- | |
243 | ;--------------------------------------------------------------------- |
- | |
244 | no_unpakcing_bmp_file: |
- | |
245 | cmp [type],'GI' |
- | |
246 | jne no_unpakcing_file |
- | |
247 | ;GIF DECODER |
- | |
248 | sub edi,8 |
- | |
249 | - | ||
250 | call ReadGIF |
- | |
251 | - | ||
252 | mov [save_flag],1 |
- | |
253 | jmp draw_1 |
169 | |
254 | ;--------------------------------------------------------------------- |
- | |
255 | no_unpakcing_file: |
170 | call load_picture |
256 | call load_icons |
171 | |
257 | draw_1: |
172 | call load_icons |
258 | call drawwin |
173 | call drawwin |
259 | open_2: |
174 | |
260 | mov [Scroll1CoordinatX],9 |
175 | mov [Scroll1CoordinatX],9 |
261 | mov [Scroll2CoordinatY],89 |
176 | mov [Scroll2CoordinatY],89 |