Subversion Repositories Kolibri OS

Rev

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

Rev 135 Rev 195
Line 6... Line 6...
6
; Created:      August 31, 2004
6
; Created:      August 31, 2004
7
; Last changed: August 25, 2006
7
; Last changed: August 25, 2006
8
;
8
;
9
; COMPILE WITH FASM
9
; COMPILE WITH FASM
Line 10... Line 10...
10
 
10
 
-
 
11
appname equ 'GIF  VIEWER'
11
WND_COLOR equ 0x02aabbcc
12
 
12
; input line dimensions
13
; input line dimensions
13
INP_X equ 10 shl 16+680
14
INP_X equ 5 shl 16+680
14
INP_Y equ 25 shl 16+16
15
INP_Y equ 5 shl 16+16
Line 15... Line 16...
15
INP_XY equ 15 shl 16+30
16
INP_XY equ 10 shl 16+10
Line 16... Line 17...
16
 
17
 
Line 27... Line 28...
27
  dd     filename ;0x0
28
  dd     filename ;0x0
28
  dd     0x0
29
  dd     0x0
Line 29... Line 30...
29
 
30
 
30
include 'lang.inc'
31
include 'lang.inc'
31
include 'macros.inc' ; decrease code size (optional)
-
 
32
;include '/hd/1/meos/debug.inc'
32
include 'macros.inc' ; decrease code size (optional)
33
include 'debug.inc'
33
include 'debug.inc'
Line 34... Line 34...
34
COLOR_ORDER equ MENUETOS
34
COLOR_ORDER equ MENUETOS
Line 180... Line 180...
180
;****************************************
180
;****************************************
181
draw_input:
181
draw_input:
182
    push edi
182
    push edi
183
    cmp  [entered],0
183
    cmp  [entered],0
184
    jne  highlight
184
    jne  highlight
185
    mov  esi,WND_COLOR
185
    mov  esi,0x00aabbcc
186
    jmp  di_draw
186
    jmp  di_draw
187
  highlight:
187
  highlight:
188
    mov  esi,0xe0e0e0
188
    mov  esi,0xe0e0e0
189
  di_draw:
189
  di_draw:
190
    mov  eax,8
190
    mov  eax,8
191
    mov  ebx,INP_X
191
    mov  ebx,INP_X
192
    mov  ecx,INP_Y
192
    mov  ecx,INP_Y
193
    mov  edx,2
193
    mov  edx,2
194
    int  0x40
194
    int  0x40
195
    mov  eax,4
195
    mov  eax,4
196
    mov  ecx,0x00107a30            ; èà¨äâ 1 ¨ 梥â ( 0xF0RRGGBB )
196
    mov  ecx,0x00107a30
197
    mov  ebx,INP_XY
197
    mov  ebx,INP_XY
198
    mov  edx,fn_input
198
    mov  edx,fn_input
199
    mov  esi,[inp_pos]
199
    mov  esi,[inp_pos]
200
    int  0x40
200
    int  0x40
201
    pop  edi
201
    pop  edi
Line 205... Line 205...
205
;   *******  Ž…„…‹…ˆ… ˆ Ž’ˆ‘Ž‚Š€ ŽŠ€ *******
205
;   *******  Ž…„…‹…ˆ… ˆ Ž’ˆ‘Ž‚Š€ ŽŠ€ *******
206
;   *********************************************
206
;   *********************************************
Line 207... Line 207...
207
 
207
 
Line -... Line 208...
-
 
208
draw_window:
-
 
209
 
-
 
210
    mov  eax,48
-
 
211
    mov  ebx,3
-
 
212
    mov  ecx,sc
-
 
213
    mov  edx,sizeof.system_colors
208
draw_window:
214
    int  0x40
209
 
215
 
210
    mov  eax,12
216
    mov  eax,12
Line 211... Line 217...
211
    mov  ebx,1
217
    mov  ebx,1
212
    int  0x40
218
    int  0x40
213
 
219
 
214
    mov  eax,0
220
    mov  eax,0
215
    mov  ebx,50*65536+700
-
 
216
    mov  ecx,50*65536+500
221
    mov  ebx,50*65536+700
217
    mov  edx,WND_COLOR
-
 
218
    mov  esi,0x805080d0
-
 
219
    mov  edi,0x005080d0
-
 
220
    int  0x40
-
 
221
 
-
 
222
 
-
 
223
    mov  eax,4
-
 
224
    mov  ebx,8*65536+8
-
 
225
    mov  ecx,0x10ddeeff
-
 
226
    mov  edx,zagolovok
-
 
227
    mov  esi,zag_konets-zagolovok
-
 
228
    int  0x40
-
 
229
 
-
 
230
    mov  eax,8
222
    mov  ecx,50*65536+500
231
    mov  ebx,(700-19)*65536+12
-
 
232
    mov  ecx,5*65536+12
223
    mov  edx,[sc.work]
Line 233... Line 224...
233
    mov  edx,1
224
    or   edx,0x33000000
Line 234... Line 225...
234
    mov  esi,0x6688dd
225
    mov  edi,header
Line 264... Line 255...
264
    mov  ebx,eax
255
    mov  ebx,eax
265
    movzx  eax,[gif_inf.Top]
256
    movzx  eax,[gif_inf.Top]
266
    movzx  edx,[gif_inf.Left]
257
    movzx  edx,[gif_inf.Left]
267
    shl  edx,16
258
    shl  edx,16
268
    add  edx,eax
259
    add  edx,eax
269
    add  edx,10 shl 16 +45
260
    add  edx,5 shl 16 +25
270
    mov  eax,7
261
    mov  eax,7
271
    int  0x40
262
    int  0x40
272
  .enddraw:
263
  .enddraw:
273
    ret
264
    ret
Line 274... Line 265...
274
 
265
 
Line 275... Line -...
275
; ‡¤¥áì ­ å®¤ïâáï ¤ ­­ë¥ ¯à®£à ¬¬ë:
-
 
276
 
-
 
277
; ¨­â¥àä¥©á ¯à®£à ¬¬ë ¤¢ãï§ëç­ë© - § ¤ ©â¥ ï§ëª ¢ macros.inc
266
; ‡¤¥áì ­ å®¤ïâáï ¤ ­­ë¥ ¯à®£à ¬¬ë:
278
 
-
 
279
zagolovok:               ; áâப  § £®«®¢ª 
-
 
280
if lang eq ru
-
 
281
     db   'Ž‘ŒŽ’ GIF'
-
 
282
else
-
 
283
     db   'GIF  VIEWER'
-
 
Line 284... Line 267...
284
end if
267
 
285
zag_konets:              ; ¨ ¥ñ ª®­¥æ
268
header db appname,0               ; áâப  § £®«®¢ª 
286
 
269
 
287
inp_pos    dd inp_end-fn_input
270
inp_pos    dd inp_end-fn_input
Line 307... Line 290...
307
;   db '/hd/1/gif/tapeta.gif',0
290
;   db '/hd/1/gif/tapeta.gif',0
308
;   db '/hd/1/gif/meos.gif',0
291
;   db '/hd/1/gif/meos.gif',0
309
   rb 257
292
   rb 257
310
;filename_len dd 0
293
;filename_len dd 0
311
entered    rd 1
294
entered    rd 1
-
 
295
sc system_colors
Line 312... Line 296...
312
 
296
 
313
imgcount  rd 1
297
imgcount  rd 1
314
img_index  rd 1
298
img_index  rd 1