Subversion Repositories Kolibri OS

Rev

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

Rev 195 Rev 485
Line 27... Line 27...
27
  dd     0x27fff0
27
  dd     0x27fff0
28
  dd     filename ;0x0
28
  dd     filename ;0x0
29
  dd     0x0
29
  dd     0x0
Line 30... Line 30...
30
 
30
 
31
include 'lang.inc'
31
include 'lang.inc'
32
include 'macros.inc' ; decrease code size (optional)
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 52... Line 52...
52
    rep  movsb
52
    rep  movsb
53
    stosb
53
    stosb
54
openfile2:
54
openfile2:
55
    mov  eax,70
55
    mov  eax,70
56
    mov  ebx,file_info
56
    mov  ebx,file_info
57
    int  0x40
57
    mcall
58
    cmp  eax,6
58
    cmp  eax,6
59
    je   temp
59
    je   temp
60
    test eax,eax
60
    test eax,eax
61
    jnz  ok2
61
    jnz  ok2
62
temp:
62
temp:
Line 94... Line 94...
94
  .ok:
94
  .ok:
95
    mov  [imgcount],ecx
95
    mov  [imgcount],ecx
96
  ok2:
96
  ok2:
97
    and  dword[img_index],0
97
    and  dword[img_index],0
Line -... Line 98...
-
 
98
 
-
 
99
    mov  eax,48
-
 
100
    mov  ebx,3
-
 
101
    mov  ecx,sc
-
 
102
    mov  edx,sizeof.system_colors
-
 
103
    mcall
98
 
104
 
Line 99... Line 105...
99
red:
105
red:
Line 100... Line 106...
100
 
106
 
Line 107... Line 113...
107
        int     0x40
113
        int     0x40
108
        jmp     @f
114
        jmp     @f
109
.delay:
115
.delay:
110
    mov  ebx,DELAY
116
    mov  ebx,DELAY
111
    mov  eax,23
117
    mov  eax,23
112
    int  0x40
118
    mcall
113
@@:
119
@@:
114
        dec     eax
120
        dec     eax
115
        jz      red
121
        jz      red
116
        dec     eax
122
        dec     eax
117
        jz      key
123
        jz      key
Line 129... Line 135...
129
    call draw_subimage
135
    call draw_subimage
130
    jmp  still
136
    jmp  still
Line 131... Line 137...
131
 
137
 
132
  key:
138
  key:
133
    mov  eax,2
139
    mov  eax,2
134
    int  0x40
140
    mcall
135
    cmp  ah,13
141
    cmp  ah,13
136
    je   is_input
142
    je   is_input
Line 137... Line 143...
137
    jmp  still
143
    jmp  still
138
 
144
 
139
  button:
145
  button:
Line 140... Line 146...
140
    mov  eax,17
146
    mov  eax,17
141
    int  0x40
147
    mcall
142
 
148
 
143
    cmp  ah,1
149
    cmp  ah,1
144
    jne  noclose
150
    jne  noclose
Line 145... Line 151...
145
  _close:
151
  _close:
146
    or   eax,-1
152
    or   eax,-1
147
    int  0x40
153
    mcall
148
 
154
 
149
  noclose:
155
  noclose:
150
  is_input:             ; simple input line with backspace feature
156
  is_input:             ; simple input line with backspace feature
151
    inc  [entered]      ; sorry - no cursor
157
    inc  [entered]      ; sorry - no cursor
152
  wait_input:
158
  wait_input:
153
    call draw_input
159
    call draw_input
154
    mov  eax,10
160
    mov  eax,10
155
    int  0x40
161
    mcall
156
    cmp  eax,2
162
    cmp  eax,2
157
    jne  still
163
    jne  still
158
    mov  edi,[inp_pos]
164
    mov  edi,[inp_pos]
159
    mov  eax,2
165
    mov  eax,2
160
    int  0x40
166
    mcall
161
    shr  eax,8
167
    shr  eax,8
Line 189... Line 195...
189
  di_draw:
195
  di_draw:
190
    mov  eax,8
196
    mov  eax,8
191
    mov  ebx,INP_X
197
    mov  ebx,INP_X
192
    mov  ecx,INP_Y
198
    mov  ecx,INP_Y
193
    mov  edx,2
199
    mov  edx,2
194
    int  0x40
200
    mcall
195
    mov  eax,4
201
    mov  eax,4
196
    mov  ecx,0x00107a30
202
    mov  ecx,0x00107a30
197
    mov  ebx,INP_XY
203
    mov  ebx,INP_XY
198
    mov  edx,fn_input
204
    mov  edx,fn_input
199
    mov  esi,[inp_pos]
205
    mov  esi,[inp_pos]
200
    int  0x40
206
    mcall
201
    pop  edi
207
    pop  edi
202
    ret
208
    ret
Line 203... Line 209...
203
 
209
 
204
;   *********************************************
210
;   *********************************************
205
;   *******  Ž…„…‹…ˆ… ˆ Ž’ˆ‘Ž‚Š€ ŽŠ€ *******
211
;   *******  Ž…„…‹…ˆ… ˆ Ž’ˆ‘Ž‚Š€ ŽŠ€ *******
Line 206... Line 212...
206
;   *********************************************
212
;   *********************************************
Line 207... Line -...
207
 
-
 
208
draw_window:
-
 
209
 
-
 
210
    mov  eax,48
-
 
211
    mov  ebx,3
-
 
212
    mov  ecx,sc
-
 
213
    mov  edx,sizeof.system_colors
213
 
214
    int  0x40
214
draw_window:
215
 
215
 
Line 216... Line 216...
216
    mov  eax,12
216
    mov  eax,12
217
    mov  ebx,1
217
    mov  ebx,1
218
    int  0x40
218
    mcall
219
 
219
 
220
    mov  eax,0
220
    mov  eax,0
221
    mov  ebx,50*65536+700
221
    mov  ebx,50*65536+700
222
    mov  ecx,50*65536+500
222
    mov  ecx,50*65536+500
Line 223... Line 223...
223
    mov  edx,[sc.work]
223
    mov  edx,[sc.work]
Line 224... Line 224...
224
    or   edx,0x33000000
224
    or   edx,0x33000000
225
    mov  edi,header
225
    mov  edi,title
Line 235... Line 235...
235
    mov  ecx,[img_index]
235
    mov  ecx,[img_index]
236
    call draw_subimage
236
    call draw_subimage
237
  .enddraw:
237
  .enddraw:
238
    mov  eax,12
238
    mov  eax,12
239
    mov  ebx,2
239
    mov  ebx,2
240
    int  0x40
240
    mcall
241
    ret
241
    ret
Line 242... Line 242...
242
 
242
 
243
draw_subimage:
243
draw_subimage:
244
    cmp  [imgcount],0
244
    cmp  [imgcount],0
Line 257... Line 257...
257
    movzx  edx,[gif_inf.Left]
257
    movzx  edx,[gif_inf.Left]
258
    shl  edx,16
258
    shl  edx,16
259
    add  edx,eax
259
    add  edx,eax
260
    add  edx,5 shl 16 +25
260
    add  edx,5 shl 16 +25
261
    mov  eax,7
261
    mov  eax,7
262
    int  0x40
262
    mcall
263
  .enddraw:
263
  .enddraw:
264
    ret
264
    ret
Line 265... Line 265...
265
 
265
 
Line 266... Line 266...
266
; ‡¤¥áì ­ å®¤ïâáï ¤ ­­ë¥ ¯à®£à ¬¬ë:
266
; ‡¤¥áì ­ å®¤ïâáï ¤ ­­ë¥ ¯à®£à ¬¬ë:
Line 267... Line 267...
267
 
267
 
268
header db appname,0               ; áâப  § £®«®¢ª 
268
title db appname,0               ; áâப  § £®«®¢ª 
269
 
269
 
270
inp_pos    dd inp_end-fn_input
270
inp_pos    dd inp_end-fn_input