2009-09-14 18:17:49 +02:00
; Copyright (c) 2009, <Lrz>
; All rights reserved.
;
; Redistribution and use in source and binary forms, with or without
; modification, are permitted provided that the following conditions are met:
; * Redistributions of source code must retain the above copyright
; notice, this list of conditions and the following disclaimer.
; * Redistributions in binary form must reproduce the above copyright
; notice, this list of conditions and the following disclaimer in the
; documentation and/or other materials provided with the distribution.
; * Neither the name of the <organization> nor the
; names of its contributors may be used to endorse or promote products
; derived from this software without specific prior written permission.
;
; THIS SOFTWARE IS PROVIDED BY Alexey Teplov nickname <Lrz> ''AS IS'' AND ANY
; EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
; WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
; DISCLAIMED. IN NO EVENT SHALL <copyright holder> BE LIABLE FOR ANY
; DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
; (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
; ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
; SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
;*****************************************************************************
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ਫ<EFBFBD> <E0A8AB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2010-01-09 23:01:26 +01:00
use32 ; <20> ࠭<EFBFBD> <E0A0AD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> ᯮ<EFBFBD> <E1AFAE> <EFBFBD> <EFBFBD> <EFBFBD> 騩 32 ࠧ<> 來<EFBFBD> <EFA4AD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
org 0x0 ; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> , <20> ᥣ<EFBFBD> <E1A5A3> 0x0
db 'MENUET01' ; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 䨪<EFBFBD> <E4A8AA> <EFBFBD> <EFBFBD> <20> ᯮ<EFBFBD> <E1AFAE> 塞<EFBFBD> <EFA5AC> <EFBFBD> 䠩<> <E4A0A9> (8 <20> <> <EFBFBD> <EFBFBD> )
dd 0x1 ; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ଠ <EFBFBD> <E0ACA0> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ᯮ<EFBFBD> <E1AFAE> 塞<EFBFBD> <EFA5AC> <EFBFBD> 䠩<> <E4A0A9>
dd start ; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> ⥬<EFBFBD> <20> <> ।<EFBFBD> <E0A5A4> <EFBFBD> <20> <> ࠢ<EFBFBD> <E0A0A2> <EFBFBD> <EFBFBD> <EFBFBD>
; <20> <> <20> <> <EFBFBD> <EFBFBD> 㧪<EFBFBD> <20> ਫ<EFBFBD> <E0A8AB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
dd mem ; ࠧ<> <E0A0A7> <EFBFBD> <20> ਫ<EFBFBD> <E0A8AB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
dd mem ; <20> <> ꥬ <20> ᯮ<EFBFBD> <E1AFAE> <EFBFBD> 㥬<EFBFBD> <E3A5AC> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> <> <EFBFBD> <20> ⥪<EFBFBD> <20> ⢥<EFBFBD> <E2A2A5> <EFBFBD> 0<> 100 <20> <> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <E0AEA2> <EFBFBD> <20> <> <20> ୨ <EFBFBD> <E0ADA8> 4 <20> <> <EFBFBD> <EFBFBD> <EFBFBD>
dd mem ; <20> <> ᯮ<EFBFBD> <E1AFAE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> ⥪<EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , <20> ࠧ<EFBFBD> <20> <> ⥫<> <E2A5AB> <20> ணࠬ<E0AEA3> <E0A0AC> . <20> <> <EFBFBD> 設<EFBFBD> <20> ⥪<EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> , 㪠<> <E3AAA0> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
dd 0x0 ; 㪠<> <E3AAA0> ⥫<EFBFBD> <20> <> <20> <> ப<EFBFBD> <20> <20> <> ࠬ<EFBFBD> <E0A0AC> ࠬ<EFBFBD> .
2009-09-14 18:17:49 +02:00
dd way_of_ini
include '../../../../macros.inc'
2010-01-09 23:01:26 +01:00
include '../../box_lib/trunk/box_lib.mac'
2009-09-14 18:17:49 +02:00
include '../../box_lib/load_lib.mac'
2010-01-09 23:01:26 +01:00
@ use_library ;use load lib macros
2009-09-14 18:17:49 +02:00
start:
;universal load library/librarys
sys_load_libraries l_libs_start , end_l_libs
;if return code =-1 then exit, else nornary work
2010-01-09 23:01:26 +01:00
cmp eax , - 1
jz exit
mcall 40 , 0x27 ;<3B> <> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᮡ<> ⨩
mov eax , 48
mov ebx , 3
mov ecx , sc
mov edx , si zeof.system_colors
mcall
mov eax , dword [ sc.work ]
mov dword [ con_colors + 4 ], eax
2009-09-14 18:17:49 +02:00
; mcall 66,1,0
2010-01-09 23:01:26 +01:00
call [ initialization_font ] ; <20> <> <EFBFBD> 樠<EFBFBD> <E6A8A0> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᯨ᪠ <20> <> <EFBFBD> <EFBFBD> ⮢
push dword ( 8 shl 16 + 16 ) ; <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> 㦭<EFBFBD> <E3A6AD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⮢ (<28> <> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> 㯥<EFBFBD> ⮫쪮 8<> 16)
2009-09-14 18:17:49 +02:00
call [ get_font ]
2010-01-09 23:01:26 +01:00
test eax , eax ;<3B> <> 諨 ?
jnz exit
2009-09-14 18:17:49 +02:00
;;;;;;;;;;;;;;;;;;;;
2010-01-09 23:01:26 +01:00
mcall 40 , 0x27 ;<3B> <> ⠭<EFBFBD> <E2A0AD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᮡ<> ⨩
2009-09-14 18:17:49 +02:00
red_win:
2010-01-09 23:01:26 +01:00
call draw_window ;<3B> <> ࢮ<EFBFBD> <E0A2AE> 砫쭮 <20> <> <EFBFBD> <EFBFBD> 室<EFBFBD> <E5AEA4> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>
2009-09-14 18:17:49 +02:00
align 4
2010-01-09 23:01:26 +01:00
still: ;<3B> ᭮<EFBFBD> <E1ADAE> <EFBFBD> <EFBFBD> <20> <> ࠡ<EFBFBD> <E0A0A1> 稪
mcall 10 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᮡ<> <E1AEA1> <EFBFBD> <EFBFBD>
dec eax
jz red_win
dec eax
jz key
dec eax
jz button
push dword edi t1
call [ edi t_box_mouse ]
jmp still ;<3B> <20> <> 祣<EFBFBD> <20> <> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <E1ABA5> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> ᭮<> <E1ADAE> <20> 横<>
2009-09-14 18:17:49 +02:00
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
button:
2010-01-09 23:01:26 +01:00
mcall 17 ;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> 䨪<EFBFBD> <E4A8AA> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⮩ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
test ah , ah ;<3B> <20> ah 0, <20> <> <20> <> ३<EFBFBD> <E0A5A9> <20> <> <20> <> ࠡ<EFBFBD> <E0A0A1> 稪 ᮡ<> ⨩ still
jz still
exit:
call [ free_fulder_info ]
call [ free_font ]
mcall - 1
2009-09-14 18:17:49 +02:00
key:
2010-01-09 23:01:26 +01:00
mcall 2 ;<3B> <> <EFBFBD> <EFBFBD> 㧨<EFBFBD> <20> <> <EFBFBD> 祭<EFBFBD> <E7A5AD> 2 <20> ॣ<> <E0A5A3> <EFBFBD> <EFBFBD> <EFBFBD> eax <20> <20> <> <EFBFBD> <EFBFBD> 稬 <20> <> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⮩ <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2009-09-14 18:17:49 +02:00
2010-01-09 23:01:26 +01:00
push dword edi t1
call [ edi t_box_key ]
2009-09-14 18:17:49 +02:00
2010-01-09 23:01:26 +01:00
mcall 13 , < 20 , 650 > , < 40 , 16 > , dword [ con_colors + 4 ]
2009-09-14 18:17:49 +02:00
2010-01-09 23:01:26 +01:00
push dword 20 shl 16 + 40 ; esp+12= dd x shl 16 + y x- <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <20> , y - <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> Y
push dword con_colors ; esp+8 = dd point to color of background and font
push dword text ; esp+4 = dd point to ASCIIZ
2009-09-14 18:17:49 +02:00
; esp+0 = dd back
2010-01-09 23:01:26 +01:00
call [ font_draw_on_string ] ; <20> 뢥<EFBFBD> <EBA2A5> <EFBFBD> <20> <> <20> <> <EFBFBD> 䠬 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
2009-09-14 18:17:49 +02:00
2010-01-09 23:01:26 +01:00
jmp still
2009-09-14 18:17:49 +02:00
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
align 4
2010-01-09 23:01:26 +01:00
draw_window: ;<3B> <> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> ਫ<EFBFBD> <E0A8AB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mcall 12 , 1
xor eax , eax ;<3B> <> <EFBFBD> 㫨<EFBFBD> <E3ABA8> eax
mov ebx , 50 * 65536 + 680 ;[<5B> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> x]*65536 + [ࠧ<> <E0A0A7> <EFBFBD> <20> <> <20> <> <EFBFBD> x]
mov ecx , 30 * 65536 + 200 ;[<5B> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <20> <> <EFBFBD> y]*65536 + [ࠧ<> <E0A0A7> <EFBFBD> <20> <> <20> <> <EFBFBD> y]
mov edx ,[ sc.work ] ; color of work area RRGGBB,8->color gl
or edx , 0x34000000
mov edi , hed
mcall ;<3B> <> <EFBFBD> <EFBFBD> ᮢ<EFBFBD> <E1AEA2> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <20> ਫ<EFBFBD> <E0A8AB> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
push dword edi t1
call [ edi t_box_draw ]
2009-09-14 18:17:49 +02:00
;
2010-01-09 23:01:26 +01:00
push dword 20 shl 16 + 40 ; esp+12= dd x shl 16 + y x- <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> <20> , y - <20> <> <EFBFBD> न<EFBFBD> <E0A4A8> <EFBFBD> <EFBFBD> <20> <> Y
push dword con_colors ; esp+8 = dd point to color of background and font
push dword text ; esp+4 = dd point to ASCIIZ
2009-09-14 18:17:49 +02:00
; esp+0 = dd back
2010-01-09 23:01:26 +01:00
call [ font_draw_on_string ] ; <20> 뢥<EFBFBD> <EBA2A5> <EFBFBD> <20> <> <20> <> <EFBFBD> 䠬 <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
mov eax , 12 ;<3B> 㭪<EFBFBD> <E3ADAA> <EFBFBD> 12 - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> /<2F> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᮢ<EFBFBD> <E1AEA2> <20> <> <EFBFBD> <EFBFBD> .
mov ebx , 2 ;<3B> <> <EFBFBD> <EFBFBD> 㭪<EFBFBD> <E3ADAA> <EFBFBD> 2 - <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ᮢ<EFBFBD> <E1AEA2> <20> <> <EFBFBD> <EFBFBD> .
mcall
ret
2009-09-14 18:17:49 +02:00
;;;;;;;;;;;;
;>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
;DATA <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD>
l_libs_start:
library 01 l_libs library_name , way_of_ini , library_path , system_path , err_message_found_lib , head_f_l , font_import , err_message_import , head_f_i
library 02 l_libs library_name1 , way_of_ini , library_path , system_path1 , err_message_found_lib1 , head_f_l , import_box_lib , err_message_import1 , head_f_i
end_l_libs:
;
2010-01-09 23:01:26 +01:00
system_path db '/sys/lib/'
library _name db 'fonts_lib.obj' , 0
2009-09-14 18:17:49 +02:00
2010-01-09 23:01:26 +01:00
system_path1 db '/sys/lib/'
library _name1 db 'box_lib.obj' , 0
2009-09-14 18:17:49 +02:00
2010-01-09 23:01:26 +01:00
err_message_found_lib db 'Sorry I cannot load library fonts_lib.obj' , 0
err_message_found_lib1 db 'Sorry I cannot load library box_lib.obj' , 0
2009-09-14 18:17:49 +02:00
head_f_i:
2010-01-09 23:01:26 +01:00
head_f_l db 'System error' , 0
err_message_import db 'Error on load import library fonts_lib.obj' , 0
err_message_import1 db 'Error on load import library box_lib.obj' , 0
2009-09-14 18:17:49 +02:00
align 4
import_box_lib:
2010-01-09 23:01:26 +01:00
edit_box_draw dd aEdit_box_draw
edit_box_key dd aEdit_box_key
edit_box_mouse dd aEdit_box_mouse
version_ed dd aVersion_ed
2009-09-14 18:17:49 +02:00
2010-01-09 23:01:26 +01:00
dd 0
dd 0
2009-09-14 18:17:49 +02:00
2010-01-09 23:01:26 +01:00
aEdit_box_draw db 'edit_box' , 0
aEdit_box_key db 'edit_box_key' , 0
2009-09-14 18:17:49 +02:00
aEdit_box_mouse db 'edit_box_mouse' , 0
2010-01-09 23:01:26 +01:00
aVersion_ed db 'version_ed' , 0
2009-09-14 18:17:49 +02:00
font_import:
2010-01-09 23:01:26 +01:00
initialization_font dd a_initialization_font
get_font dd a_get_font
free_fulder_info dd a_free_fulder_info
free_font dd a_free_font
font_draw_on_string dd a_font_draw_on_string
show_all_glif dd a_show_all_glif
Version_fn dd a_Version_fn
dd 0 , 0
2009-09-14 18:17:49 +02:00
2010-01-09 23:01:26 +01:00
a_initialization_font db 'initialization_font' , 0
a_get_font db 'get_font' , 0
a_free_fulder_info db 'free_fulder_info' , 0
a_free_font db 'free_font' , 0
a_font_draw_on_string db 'font_draw_on_string' , 0
a_show_all_glif db 'show_all_glif' , 0
a_Version_fn db 'version_fn' , 0
2009-09-14 18:17:49 +02:00
edit1 edi t_box 350 , 175 , 5 , 0xffffff , 0x6f9480 , 0 , 0xAABBCC , 0 , test_leght , text , ed_focus , text_end - text - 1 , text_end - text - 1
text db '<27> ਬ<EFBFBD> <E0A8AC> <20> ᯮ<EFBFBD> 짮<EFBFBD> <ECA7AE> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD> <EFBFBD> <EFBFBD> ⥪<EFBFBD> <20> <> <EFBFBD> <EFBFBD> ⮢ fonts_lib.obj' , 0
text_end:
rb 256
test_leght = ( $ - text ) - 1
2010-01-09 23:01:26 +01:00
hed db "Font's demo <Lrz>" , 0
2009-09-14 18:17:49 +02:00
align 4
2010-01-09 23:01:26 +01:00
con_colors dd 0x1E1EFF , 0x96FFCF
2009-09-14 18:17:49 +02:00
align 4
sc system_colors
2010-01-09 23:01:26 +01:00
way_of_ini rb 4096
library _path rb 4096
2009-09-14 18:17:49 +02:00
align 4
i_end:
rb 1024
mem:
2010-01-09 23:01:26 +01:00
;<3B> <> <EFBFBD> <EFBFBD> <EFBFBD> <20> <> <EFBFBD> <EFBFBD>