Rev 7639 | Rev 7938 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 7639 | Rev 7937 | ||
---|---|---|---|
Line 21... | Line 21... | ||
21 | dd 1 ; header version |
21 | dd 1 ; header version |
22 | dd START ; start address |
22 | dd START ; start address |
23 | dd IM_END ; file size |
23 | dd IM_END ; file size |
24 | dd I_END ; memory |
24 | dd I_END ; memory |
25 | dd stacktop ; stack pointer |
25 | dd stacktop ; stack pointer |
26 | dd skin_info ; parameters |
26 | dd app_param ; parameters |
27 | dd cur_dir_path ; path to file |
27 | dd cur_dir_path ; path to file |
Line 28... | Line 28... | ||
28 | 28 | ||
29 | include 'lang.inc' |
29 | include 'lang.inc' |
30 | include '../../../proc32.inc' |
30 | include '../../../proc32.inc' |
31 | include '../../../config.inc' ;for nightbuild |
31 | include '../../../config.inc' ;for nightbuild |
- | 32 | include '../../../macros.inc' |
|
32 | include '../../../macros.inc' |
33 | include '../../../string.inc' |
33 | include '../../../dll.inc' |
34 | include '../../../dll.inc' |
34 | include 'kglobals.inc' |
35 | include 'kglobals.inc' |
35 | include 'unpacker.inc' |
36 | include 'unpacker.inc' |
36 | include '../../../develop/libraries/box_lib/load_lib.mac' |
37 | include '../../../develop/libraries/box_lib/load_lib.mac' |
Line 102... | Line 103... | ||
102 | ;if return code =-1 then exit, else nornary work |
103 | ;if return code =-1 then exit, else nornary work |
103 | inc eax |
104 | inc eax |
104 | test eax,eax |
105 | test eax,eax |
105 | jz close |
106 | jz close |
106 | ;--------------------------------------------------------------------- |
107 | ;--------------------------------------------------------------------- |
- | 108 | ; set default pathes |
|
107 | mov edi,filename_area |
109 | mov edi,skin_info |
108 | mov esi,start_temp_file_name |
110 | mov esi,default_skin |
109 | xor eax,eax |
111 | xor eax,eax |
110 | cld |
112 | cld |
111 | @@: |
113 | @@: |
112 | lodsb |
114 | lodsb |
113 | stosb |
115 | stosb |
114 | test eax,eax |
116 | test eax,eax |
115 | jnz @b |
117 | jnz @b |
Line 116... | Line -... | ||
116 | - | ||
117 | 118 | ||
118 | mov edi,fname |
119 | mov edi,dtp_name |
119 | mov esi,default_dtp |
120 | mov esi,default_dtp |
120 | xor eax,eax |
121 | xor eax,eax |
121 | cld |
122 | cld |
122 | @@: |
123 | @@: |
123 | lodsb |
124 | lodsb |
124 | stosb |
125 | stosb |
125 | test eax,eax |
126 | test eax,eax |
126 | jnz @b |
- | |
127 | 127 | jnz @b |
|
- | 128 | ;--------------------------------------------------------------------- |
|
- | 129 | ; check app param |
|
- | 130 | stdcall string.length, app_param |
|
- | 131 | add eax, app_param |
|
- | 132 | mov ecx, [eax-4] |
|
- | 133 | cmp ecx, '.skn' |
|
- | 134 | je load_skin_from_param |
|
- | 135 | cmp ecx, '.dtp' |
|
- | 136 | jne no_param |
|
- | 137 | ||
- | 138 | load_dtp_from_param: |
|
- | 139 | mov edi,dtp_name |
|
- | 140 | mov esi,app_param |
|
- | 141 | xor eax,eax |
|
- | 142 | cld |
|
- | 143 | @@: |
|
- | 144 | lodsb |
|
- | 145 | stosb |
|
- | 146 | test eax,eax |
|
- | 147 | jnz @b |
|
- | 148 | call load_dtp_file.1 |
|
- | 149 | jmp skin_path_ready |
|
- | 150 | ||
128 | ;--------------------------------------------------------------------- |
151 | load_skin_from_param: |
129 | mov edi,skin_info |
- | |
130 | cmp byte [edi], 0 |
- | |
131 | jne skin_path_ready |
152 | mov edi,skin_info |
132 | mov esi,default_skin |
153 | mov esi,app_param |
133 | xor eax,eax |
154 | xor eax,eax |
134 | cld |
155 | cld |
135 | @@: |
156 | @@: |
136 | lodsb |
157 | lodsb |
137 | stosb |
158 | stosb |
138 | test eax,eax |
159 | test eax,eax |
- | 160 | jnz @b |
|
- | 161 | call load_skin_file.2 |
|
- | 162 | jmp skin_path_ready |
|
- | 163 | ||
- | 164 | no_param: |
|
- | 165 | mcall 48,3,color_table,4*10 ; get current colors |
|
- | 166 | call load_skin_file.2 |
|
139 | jnz @b |
167 | |
140 | skin_path_ready: |
168 | skin_path_ready: |
141 | ;--------------------------------------------------------------------- |
169 | ;--------------------------------------------------------------------- |
142 | ;OpenDialog initialisation |
170 | ;OpenDialog initialisation |
143 | push dword OpenDialog_data |
171 | push dword OpenDialog_data |
Line 155... | Line 183... | ||
155 | call [PathShow_prepare] |
183 | call [PathShow_prepare] |
Line 156... | Line 184... | ||
156 | 184 | ||
157 | push dword PathShow_data_2 |
185 | push dword PathShow_data_2 |
158 | call [PathShow_prepare] |
186 | call [PathShow_prepare] |
159 | ;--------------------------------------------------------------------- |
- | |
160 | mcall 48,3,color_table,4*10 ; get current colors |
- | |
161 | call load_skin_file.2 |
- | |
162 | ;--------------------------------------------------------------------- |
187 | ;--------------------------------------------------------------------- |
163 | red: |
188 | red: |
164 | call draw_window ; at first, draw the window |
189 | call draw_window ; at first, draw the window |
165 | ;--------------------------------------------------------------------- |
190 | ;--------------------------------------------------------------------- |
166 | still: |
191 | still: |
Line 185... | Line 210... | ||
185 | mcall 17 ; get id |
210 | mcall 17 ; get id |
Line 186... | Line 211... | ||
186 | 211 | ||
187 | cmp ah,12 ; load file |
212 | cmp ah,12 ; load file |
Line 188... | Line 213... | ||
188 | jne no_load |
213 | jne no_load |
189 | 214 | ||
190 | call load_file |
215 | call load_dtp_file |
191 | call draw_window |
216 | call draw_window |
192 | jmp still |
217 | jmp still |
193 | ;-------------------------------------- |
218 | ;-------------------------------------- |
Line 289... | Line 314... | ||
289 | mcall |
314 | mcall |
290 | ;-------------------------------------- |
315 | ;-------------------------------------- |
291 | noid1: |
316 | noid1: |
292 | jmp still |
317 | jmp still |
293 | ;--------------------------------------------------------------------- |
318 | ;--------------------------------------------------------------------- |
294 | load_file: |
319 | load_dtp_file: |
295 | ;--------------------------------------------------------------------- |
320 | ;--------------------------------------------------------------------- |
296 | ; invoke OpenDialog |
321 | ; invoke OpenDialog |
297 | mov [OpenDialog_data.type],dword 0 |
322 | mov [OpenDialog_data.type],dword 0 |
298 | push dword OpenDialog_data |
323 | push dword OpenDialog_data |
299 | call [OpenDialog_Start] |
324 | call [OpenDialog_Start] |
Line 305... | Line 330... | ||
305 | push dword PathShow_data_1 |
330 | push dword PathShow_data_1 |
306 | call [PathShow_prepare] |
331 | call [PathShow_prepare] |
Line 307... | Line 332... | ||
307 | 332 | ||
308 | call draw_PathShow |
333 | call draw_PathShow |
- | 334 | ;--------------------------------------------------------------------- |
|
309 | ;--------------------------------------------------------------------- |
335 | .2: |
310 | xor eax, eax |
336 | xor eax, eax |
311 | mov ebx, read_info |
337 | mov ebx, read_info |
312 | mov dword [ebx], eax ; subfunction: read |
338 | mov dword [ebx], eax ; subfunction: read |
313 | mov dword [ebx+4], eax ; offset (low dword) |
339 | mov dword [ebx+4], eax ; offset (low dword) |