2006-11-02 15:18:23 +01:00
|
|
|
|
save_file:
|
|
|
|
|
pusha
|
|
|
|
|
bt dword [flags],0
|
|
|
|
|
jnc .not_shooted
|
|
|
|
|
|
|
|
|
|
cmp byte [ed_buffer.1],0
|
|
|
|
|
je .no_file_name
|
|
|
|
|
|
|
|
|
|
mov edi,sign_n_input
|
|
|
|
|
call zstr_to_int
|
|
|
|
|
mov [sign_n],al
|
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㥬 <EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD>
|
|
|
|
|
xor eax,eax
|
|
|
|
|
mov ecx,1056
|
|
|
|
|
mov edi,file_name
|
|
|
|
|
rep stosb ; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 <EFBFBD><EFBFBD><EFBFBD>ﬨ
|
|
|
|
|
|
|
|
|
|
mov esi,ed_buffer.1
|
|
|
|
|
mov edi,file_name
|
|
|
|
|
.next:
|
|
|
|
|
mov ah,[esi]
|
|
|
|
|
test ah,ah
|
|
|
|
|
jz .str_end
|
|
|
|
|
cmp ah,'*'
|
|
|
|
|
jne .no_insert_number
|
|
|
|
|
jmp .insert_number
|
|
|
|
|
.no_insert_number:
|
|
|
|
|
mov [edi],ah
|
|
|
|
|
inc edi
|
|
|
|
|
inc esi
|
|
|
|
|
jmp .next
|
|
|
|
|
.insert_number:
|
|
|
|
|
bt word [ch6.flags],1
|
|
|
|
|
jnc @f
|
|
|
|
|
mov eax,[cur_number]
|
|
|
|
|
;mov ebx,4
|
|
|
|
|
movsx ebx,byte [sign_n]
|
|
|
|
|
push ebx
|
|
|
|
|
call int_to_str
|
|
|
|
|
pop ebx
|
|
|
|
|
add edi,ebx
|
|
|
|
|
@@:
|
|
|
|
|
inc esi
|
|
|
|
|
jmp .next
|
|
|
|
|
.str_end:
|
|
|
|
|
|
2007-02-01 10:46:48 +01:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞, <EFBFBD>쪮 <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>㦭<EFBFBD> <EFBFBD>ਡ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD>,
|
|
|
|
|
; <EFBFBD>⮡<EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD>뫠 <EFBFBD><EFBFBD>ࠢ<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> 4 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>.
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD>頥<EFBFBD> <EFBFBD> edi.
|
|
|
|
|
xor edx,edx
|
|
|
|
|
movzx eax,word [scr_buf.width] ; eax = <EFBFBD><EFBFBD>ਭ<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>⨭<EFBFBD><EFBFBD>
|
|
|
|
|
lea eax,[eax*3] ; eax = <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>⨭<EFBFBD><EFBFBD>
|
|
|
|
|
movr ebx,4 ; ebx = 4
|
|
|
|
|
mov edi,ebx ; edi = 4
|
|
|
|
|
div ebx ; eax = <EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD> <EFBFBD><EFBFBD>ப<EFBFBD> <EFBFBD><EFBFBD><EFBFBD>⨭<EFBFBD><EFBFBD> div 4 edx = <EFBFBD><EFBFBD><EFBFBD><EFBFBD>... mod 4
|
|
|
|
|
sub edi,edx ; edi = <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>⢮ <EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
test edx,edx
|
|
|
|
|
jnz @f
|
|
|
|
|
xor edi,edi
|
|
|
|
|
@@:
|
|
|
|
|
|
2006-11-02 15:18:23 +01:00
|
|
|
|
; <EFBFBD>뤥<EFBFBD>塞 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov ecx,[scr_buf.end_ptr]
|
|
|
|
|
mov [sf_buf.bmp_header],ecx
|
|
|
|
|
add ecx,0x36
|
|
|
|
|
mov [sf_buf.bmp_area],ecx
|
|
|
|
|
movsx ebx,word [scr_buf.width]
|
|
|
|
|
movsx edx,word [scr_buf.height]
|
2007-02-01 10:46:48 +01:00
|
|
|
|
;imul ebx,edx
|
2006-11-02 15:18:23 +01:00
|
|
|
|
lea ebx,[ebx*3]
|
2007-02-01 10:46:48 +01:00
|
|
|
|
add ebx,edi
|
|
|
|
|
imul ebx,edx
|
2006-11-02 15:18:23 +01:00
|
|
|
|
add ecx,ebx
|
|
|
|
|
mov [sf_buf.end],ecx
|
|
|
|
|
add ecx,4096
|
|
|
|
|
xor ebx,ebx
|
|
|
|
|
inc ebx
|
|
|
|
|
movr eax,64
|
|
|
|
|
int 0x40
|
|
|
|
|
|
2007-02-01 10:46:48 +01:00
|
|
|
|
push edi
|
2006-11-02 15:18:23 +01:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>࠭<EFBFBD><EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD>
|
|
|
|
|
mov edi,fs_struc
|
|
|
|
|
mov [edi],dword 2
|
|
|
|
|
mov eax,[sf_buf.bmp_header]
|
|
|
|
|
mov ebx,[sf_buf.end]
|
|
|
|
|
sub ebx,eax
|
|
|
|
|
mov [edi+12],ebx
|
|
|
|
|
mov [edi+16],eax
|
|
|
|
|
mov [edi+21],dword file_name
|
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>塞 <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> bmp
|
|
|
|
|
mov edi,[sf_buf.bmp_header]
|
|
|
|
|
mov [edi],word 'BM'
|
|
|
|
|
mov ebx,[sf_buf.end]
|
|
|
|
|
sub ebx,[sf_buf.bmp_area]
|
|
|
|
|
mov [edi+34],ebx ; ࠧ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD>⨭<EFBFBD><EFBFBD>
|
|
|
|
|
mov [edi+10],dword 0x36 ; ࠧ<EFBFBD><EFBFBD><EFBFBD> <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
add ebx,0x36
|
|
|
|
|
mov [edi+2],ebx ; ࠧ<EFBFBD><EFBFBD><EFBFBD> 䠩<EFBFBD><EFBFBD>
|
|
|
|
|
mov [edi+14],dword 0x28
|
2007-02-01 10:46:48 +01:00
|
|
|
|
movzx eax,word [scr_buf.width]
|
2006-11-02 15:18:23 +01:00
|
|
|
|
mov [edi+18],eax ; <EFBFBD><EFBFBD>ਧ<EFBFBD><EFBFBD>⠫<EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠧ<EFBFBD><EFBFBD><EFBFBD>
|
2007-02-01 10:46:48 +01:00
|
|
|
|
movzx eax,word [scr_buf.height]
|
2006-11-02 15:18:23 +01:00
|
|
|
|
mov [edi+22],eax ; <EFBFBD><EFBFBD><EFBFBD>⨪<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ࠧ<EFBFBD><EFBFBD><EFBFBD>
|
|
|
|
|
mov [edi+26],word 1
|
|
|
|
|
mov [edi+28],word 24
|
|
|
|
|
|
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>㥬 <EFBFBD> <EFBFBD><EFBFBD>ॢ<EFBFBD><EFBFBD><EFBFBD>稢<EFBFBD><EFBFBD><EFBFBD>
|
2007-02-01 10:46:48 +01:00
|
|
|
|
; mov esi,[scr_buf.ptr]
|
|
|
|
|
; mov edi,[sf_buf.bmp_area]
|
|
|
|
|
; mov edx,[sf_buf.end]
|
|
|
|
|
; sub edx,edi
|
|
|
|
|
; movsx ecx,word [scr_buf.height]
|
|
|
|
|
;.next_str:
|
|
|
|
|
;push ecx
|
|
|
|
|
;
|
|
|
|
|
; movsx ecx,word [scr_buf.width]
|
|
|
|
|
; lea ecx,[ecx*3]
|
|
|
|
|
; mov ebx,ecx
|
|
|
|
|
;.next_byte:
|
|
|
|
|
; mov ah,[esi+ebx]
|
|
|
|
|
; mov [edi+edx],ah
|
|
|
|
|
; dec ebx
|
|
|
|
|
; dec edx
|
|
|
|
|
; loop .next_byte
|
|
|
|
|
; movsx ecx,word [scr_buf.width]
|
|
|
|
|
; lea ecx,[ecx*3]
|
|
|
|
|
; add esi,ecx
|
|
|
|
|
;pop ecx
|
|
|
|
|
; loop .next_str
|
|
|
|
|
|
|
|
|
|
mov esi,[scr_buf.end_ptr]
|
2006-11-02 15:18:23 +01:00
|
|
|
|
mov edi,[sf_buf.bmp_area]
|
2007-02-01 10:46:48 +01:00
|
|
|
|
movzx ecx,word [scr_buf.height]
|
|
|
|
|
movzx ebx,word [scr_buf.width]
|
|
|
|
|
lea ebx,[ebx*3]
|
|
|
|
|
add edi,ebx
|
2006-11-02 15:18:23 +01:00
|
|
|
|
.next_str:
|
2007-02-01 10:46:48 +01:00
|
|
|
|
mov edx,ebx
|
|
|
|
|
.next_pixel:
|
|
|
|
|
mov ah,[esi]
|
|
|
|
|
mov [edi],ah
|
|
|
|
|
dec esi
|
|
|
|
|
dec edi
|
2006-11-02 15:18:23 +01:00
|
|
|
|
dec edx
|
2007-02-01 10:46:48 +01:00
|
|
|
|
jnz .next_pixel
|
|
|
|
|
lea edi,[2*ebx+edi]
|
|
|
|
|
add edi,[esp]
|
2006-11-02 15:18:23 +01:00
|
|
|
|
loop .next_str
|
|
|
|
|
|
2007-02-01 10:46:48 +01:00
|
|
|
|
pop edi
|
|
|
|
|
|
2006-11-02 15:18:23 +01:00
|
|
|
|
; <EFBFBD><EFBFBD><EFBFBD>࠭塞
|
|
|
|
|
draw_status saving
|
|
|
|
|
mov eax,70
|
|
|
|
|
mov ebx,fs_struc
|
|
|
|
|
int 0x40
|
|
|
|
|
|
|
|
|
|
test eax,eax
|
|
|
|
|
jne save_error
|
|
|
|
|
|
|
|
|
|
inc dword [cur_number]
|
|
|
|
|
call draw_number
|
|
|
|
|
|
|
|
|
|
draw_status saved_ok
|
2007-02-01 10:46:48 +01:00
|
|
|
|
|
2006-11-02 15:18:23 +01:00
|
|
|
|
popa
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.no_file_name:
|
|
|
|
|
draw_status no_file_name
|
|
|
|
|
popa
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
.not_shooted:
|
|
|
|
|
draw_status not_shooted
|
|
|
|
|
popa
|
|
|
|
|
ret
|
|
|
|
|
|
|
|
|
|
save_error:
|
|
|
|
|
cmp al,5
|
|
|
|
|
jne @f
|
|
|
|
|
mov [status.text],dword bad_file_name
|
|
|
|
|
@@:
|
|
|
|
|
cmp al,8
|
|
|
|
|
jne @f
|
|
|
|
|
mov [status.text],dword disk_filled
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
cmp al,9
|
|
|
|
|
jne @f
|
|
|
|
|
mov [status.text],dword bad_fat_table
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
cmp al,10
|
|
|
|
|
jne @f
|
|
|
|
|
mov [status.text],dword ac_den
|
|
|
|
|
@@:
|
|
|
|
|
|
|
|
|
|
cmp al,11
|
|
|
|
|
jne @f
|
|
|
|
|
mov [status.text],dword device_er
|
|
|
|
|
@@:
|
|
|
|
|
call send_draw_status
|
|
|
|
|
popa
|
|
|
|
|
ret
|