forked from KolibriOS/kolibrios
info3ds:
1) fixed detection of levels of blocks 2) added a signature to some units git-svn-id: svn://kolibrios.org@2080 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
parent
a157945fec
commit
337ce7e86b
@ -20,7 +20,7 @@ include 'lang.inc'
|
|||||||
debug equ 0
|
debug equ 0
|
||||||
|
|
||||||
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
@use_library_mem mem.Alloc,mem.Free,mem.ReAlloc,dll.Load
|
||||||
capt db 'info 3ds 18.08.11',0 ;¯®¤¯¨áì ®ª
|
capt db 'info 3ds 20.08.11',0 ;¯®¤¯¨áì ®ª
|
||||||
|
|
||||||
struct FileInfoBlock
|
struct FileInfoBlock
|
||||||
Function dd ?
|
Function dd ?
|
||||||
@ -45,9 +45,9 @@ image_data_toolbar dd 0
|
|||||||
TREE_ICON_SYS16_BMP_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*11+54 ;à §¬¥à bmp ä ©« á á¨á⥬묨 ¨ª®ª ¬¨
|
TREE_ICON_SYS16_BMP_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*11+54 ;à §¬¥à bmp ä ©« á á¨á⥬묨 ¨ª®ª ¬¨
|
||||||
icon_tl_sys dd 0 ;㪠§ ⥥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï á¨á⥬ëå ¨ª®®ª
|
icon_tl_sys dd 0 ;㪠§ ⥥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï á¨á⥬ëå ¨ª®®ª
|
||||||
icon_toolbar dd 0 ;㪠§ ⥥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï ¨ª®®ª ®¡ê¥ªâ®¢
|
icon_toolbar dd 0 ;㪠§ ⥥«ì ¯ ¬ïâì ¤«ï åà ¥¨ï ¨ª®®ª ®¡ê¥ªâ®¢
|
||||||
TOOLBAR_ICON_BMP_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*6+54 ;à §¬¥à bmp ä ©« á ¨ª®ª ¬¨ ®¡ê¥ªâ®¢
|
TOOLBAR_ICON_BMP_SIZE equ IMAGE_TOOLBAR_ICON_SIZE*7+54 ;à §¬¥à bmp ä ©« á ¨ª®ª ¬¨ ®¡ê¥ªâ®¢
|
||||||
;
|
;
|
||||||
IMAGE_FILE1_SIZE equ 128*144*3 ;à §¬¥à ä ©« á ¨§®¡à ¦¥¨¥¬ 640 x 480
|
IMAGE_FILE1_SIZE equ 128*144*3+54 ;à §¬¥à ä ©« á ¨§®¡à ¦¥¨¥¬
|
||||||
|
|
||||||
macro load_image_file path,buf,size { ;¬ ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥¨©
|
macro load_image_file path,buf,size { ;¬ ªà®á ¤«ï § £à㧪¨ ¨§®¡à ¦¥¨©
|
||||||
;path - ¬®¦¥â ¡ëâì ¯¥à¥¬¥®© ¨«¨ áâப®¢ë¬ ¯ à ¬¥â஬
|
;path - ¬®¦¥â ¡ëâì ¯¥à¥¬¥®© ¨«¨ áâப®¢ë¬ ¯ à ¬¥â஬
|
||||||
@ -89,13 +89,14 @@ macro load_image_file path,buf,size { ;
|
|||||||
}
|
}
|
||||||
|
|
||||||
;--------------------------------------
|
;--------------------------------------
|
||||||
sizeof.block_3ds equ 5
|
sizeof.block_3ds equ 9
|
||||||
|
|
||||||
macro block_3ds id,icon,par
|
macro block_3ds id,icon,par,caption
|
||||||
{
|
{
|
||||||
dw id ;¨¤¥â¨ä¨ª â®à ¡«®ª ¢ ä ©«¥ 3ds
|
dw id ;+0 ¨¤¥â¨ä¨ª â®à ¡«®ª ¢ ä ©«¥ 3ds
|
||||||
dw icon ;®¬¥à ¨ª®ª¨ ¤«ï ¡«®ª
|
dw icon ;+2 ®¬¥à ¨ª®ª¨ ¤«ï ¡«®ª
|
||||||
db par ;ᮤ¥à¦¨â «¨ ¡«®ª ¯®¤¡«®ª¨ (0-¤ 1-¥â)
|
db par ;+4 ᮤ¥à¦¨â «¨ ¡«®ª ¯®¤¡«®ª¨ (0-¤ 1-¥â)
|
||||||
|
dd caption+0 ;+5 ®¯¨á ¨¥ ¡«®ª
|
||||||
}
|
}
|
||||||
|
|
||||||
CHUNK_MAIN equ 0x4D4D ; [-] áæ¥
|
CHUNK_MAIN equ 0x4D4D ; [-] áæ¥
|
||||||
@ -141,7 +142,7 @@ FILE_ERROR_CHUNK_SIZE equ -3 ;
|
|||||||
|
|
||||||
align 4
|
align 4
|
||||||
type_bloks:
|
type_bloks:
|
||||||
block_3ds 0x0002,5,1 ;¨ä®à¬ æ¨ï ® ¢¥àᨨ ä ©«
|
block_3ds 0x0002,5,1,txt_0002
|
||||||
block_3ds 0x3d3e,5,1 ;mesh version
|
block_3ds 0x3d3e,5,1 ;mesh version
|
||||||
block_3ds 0xA010,4,0 ;material ambient color
|
block_3ds 0xA010,4,0 ;material ambient color
|
||||||
block_3ds 0xA020,4,0 ;material diffuse color
|
block_3ds 0xA020,4,0 ;material diffuse color
|
||||||
@ -149,22 +150,23 @@ block_3ds 0xA030,4,0 ;material specular color
|
|||||||
block_3ds CHUNK_color_1, 4,1 ; [+] 梥â rgb (byte format)
|
block_3ds CHUNK_color_1, 4,1 ; [+] 梥â rgb (byte format)
|
||||||
block_3ds CHUNK_ambient_color,3,0 ; [-] ambient color
|
block_3ds CHUNK_ambient_color,3,0 ; [-] ambient color
|
||||||
block_3ds CHUNK_OBJMESH, 3,0 ; [-] ¢áïç¥áª¨¥ ®¡ê¥ªâë
|
block_3ds CHUNK_OBJMESH, 3,0 ; [-] ¢áïç¥áª¨¥ ®¡ê¥ªâë
|
||||||
block_3ds CHUNK_OBJBLOCK, 3,1 ; [+] ®¡ê¥ªâ
|
block_3ds CHUNK_OBJBLOCK, 3,1,txt_4000
|
||||||
block_3ds CHUNK_TRIMESH, 3,0 ; [-] trimesh-®¡ê¥ªâ
|
block_3ds CHUNK_TRIMESH, 3,0 ; [-] trimesh-®¡ê¥ªâ
|
||||||
block_3ds CHUNK_VERTLIST, 3,1 ; [+] ᯨ᮪ ¢¥àè¨
|
block_3ds CHUNK_VERTLIST, 3,1,txt_4110
|
||||||
block_3ds CHUNK_FACELIST, 3,1 ; [+] ᯨ᮪ £à ¥©
|
block_3ds CHUNK_FACELIST, 3,1,txt_4120
|
||||||
block_3ds CHUNK_FACEMAT, 3,1 ; [+] ¬ â¥à¨ «ë £à ¥©
|
block_3ds CHUNK_FACEMAT, 3,1 ; [+] ¬ â¥à¨ «ë £à ¥©
|
||||||
block_3ds CHUNK_MAPLIST, 3,1 ; [+] ⥪áâãàë¥ ª®®à¤¨ âë
|
block_3ds CHUNK_MAPLIST, 3,1 ; [+] ⥪áâãàë¥ ª®®à¤¨ âë
|
||||||
block_3ds CHUNK_TRMATRIX, 3,1 ; [+] ¬ âà¨æ ¯¥à¥¢®¤
|
block_3ds CHUNK_TRMATRIX, 3,1 ; [+] ¬ âà¨æ ¯¥à¥¢®¤
|
||||||
block_3ds CHUNK_CAMERA, 3,1 ; [+] ®¡ê¥ªâ-ª ¬¥à
|
block_3ds CHUNK_CAMERA, 3,1 ; [+] ®¡ê¥ªâ-ª ¬¥à
|
||||||
block_3ds CHUNK_MATERIAL, 3,0 ; [-] ¬ â¥à¨ «
|
block_3ds 0x4600,3,1,txt_4600
|
||||||
block_3ds CHUNK_MATNAME, 3,1 ; [+] §¢ ¨¥ ¬ â¥à¨ «
|
block_3ds CHUNK_MATERIAL, 3,0,txt_afff
|
||||||
block_3ds CHUNK_TEXTURE, 3,0 ; [-] ⥪áâãà ¬ â¥à¨ «
|
block_3ds CHUNK_MATNAME, 3,1,txt_a000
|
||||||
block_3ds CHUNK_MAPFILE, 3,1 ; [+] ¨¬ï ä ©« ⥪áâãàë
|
block_3ds CHUNK_TEXTURE, 3,0,txt_a200
|
||||||
block_3ds CHUNK_KEYFRAMER, 3,0 ; [-] ¨ä®à¬ æ¨ï ®¡ ¨¬ 樨
|
block_3ds CHUNK_MAPFILE, 6,1,txt_a300
|
||||||
block_3ds CHUNK_TRACKINFO, 3,0 ; [-] ¯®¢¥¤¥¨¥ ®¡ê¥ªâ
|
block_3ds CHUNK_KEYFRAMER, 3,0,txt_b000
|
||||||
block_3ds CHUNK_TRACKOBJNAME,3,1 ; [+] §¢ ¨¥ í⮣® ®¡ê¥ªâ
|
block_3ds CHUNK_TRACKINFO, 3,0,txt_b002
|
||||||
block_3ds CHUNK_TRACKPIVOT, 3,1 ; [+] æ¥âà ¢à é¥¨ï ®¡ê¥ªâ
|
block_3ds CHUNK_TRACKOBJNAME,3,1,txt_b010
|
||||||
|
block_3ds CHUNK_TRACKPIVOT, 3,1,txt_b013
|
||||||
block_3ds CHUNK_TRACKPOS, 3,1 ; [+] âà ¥ªâ®à¨ï ®¡ê¥ªâ
|
block_3ds CHUNK_TRACKPOS, 3,1 ; [+] âà ¥ªâ®à¨ï ®¡ê¥ªâ
|
||||||
block_3ds CHUNK_TRACKROTATE, 3,1 ; [+] âà ¥ªâ®à¨ï ¢à é¥¨ï ®¡ê¥ªâ
|
block_3ds CHUNK_TRACKROTATE, 3,1 ; [+] âà ¥ªâ®à¨ï ¢à é¥¨ï ®¡ê¥ªâ
|
||||||
block_3ds CHUNK_TRACKCAMERA, 3,0 ; [-] ¯®¢¥¤¥¨¥ ª ¬¥àë
|
block_3ds CHUNK_TRACKCAMERA, 3,0 ; [-] ¯®¢¥¤¥¨¥ ª ¬¥àë
|
||||||
@ -173,13 +175,44 @@ block_3ds CHUNK_TRACKROLL, 3,1 ; [+]
|
|||||||
block_3ds CHUNK_TRACKCAMTGT, 3,0 ; [-] ¯®¢¥¤¥¨¥ "楫¨" ª ¬¥àë
|
block_3ds CHUNK_TRACKCAMTGT, 3,0 ; [-] ¯®¢¥¤¥¨¥ "楫¨" ª ¬¥àë
|
||||||
.end:
|
.end:
|
||||||
|
|
||||||
|
if lang eq ru
|
||||||
|
txt_0002 db '3ds ¢¥àá¨ï',0
|
||||||
|
txt_4000 db 'Ž¡ê¥ªâ (á ¨¬¥¥¬)',0
|
||||||
|
txt_4110 db '‘¯¨á®ª ¢¥àè¨',0
|
||||||
|
txt_4120 db '‘¯¨á®ª £à ¥©',0
|
||||||
|
txt_4600 db '‘¢¥â',0
|
||||||
|
txt_a000 db '<27> §¢ ¨¥ ¬ â¥à¨ « ',0
|
||||||
|
txt_a200 db '’¥ªáâãà ¬ â¥à¨ « 1',0
|
||||||
|
txt_a300 db 'ˆ¬ï ä ©« ⥪áâãàë',0
|
||||||
|
txt_afff db 'Œ â¥à¨ «',0
|
||||||
|
txt_b000 db 'ˆä®à¬ æ¨ï ®¡ ¨¬ 樨',0
|
||||||
|
txt_b002 db '<27>®¢¥¤¥¨¥ ®¡ê¥ªâ ',0
|
||||||
|
txt_b010 db '<27> §¢ ¨¥ ®¡ê¥ªâ ',0
|
||||||
|
txt_b013 db '–¥âà ¢à é¥¨ï ®¡ê¥ªâ ',0
|
||||||
|
else
|
||||||
|
txt_0002 db '3ds version',0
|
||||||
|
txt_4000 db 'Object (with name)',0
|
||||||
|
txt_4110 db 'Vertices list',0
|
||||||
|
txt_4120 db 'Faces description',0
|
||||||
|
txt_4600 db 'Light',0
|
||||||
|
txt_a000 db 'Material name',0
|
||||||
|
txt_a200 db 'Texture map 1',0
|
||||||
|
txt_a300 db 'Mapping filename',0
|
||||||
|
txt_afff db 'Meterial',0
|
||||||
|
txt_b000 db 'Keyframer',0
|
||||||
|
txt_b002 db 'Mesh information',0
|
||||||
|
txt_b010 db 'Object name',0
|
||||||
|
txt_b013 db 'Object pivot point',0
|
||||||
|
end if
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
file_3ds:
|
file_3ds:
|
||||||
.offs: dd 0 ;+0 㪠§ ⥫ì ç «® ¡«®ª
|
.offs: dd 0 ;+0 㪠§ ⥫ì ç «® ¡«®ª
|
||||||
.size: dd 0 ;+4 à §¬¥à ¡«®ª (¤«ï 1-£® ¯ à ¬¥âà = à §¬¥à ä ©« 3ds)
|
.size: dd 0 ;+4 à §¬¥à ¡«®ª (¤«ï 1-£® ¯ à ¬¥âà = à §¬¥à ä ©« 3ds)
|
||||||
rb 8*MAX_FILE_LEVEL+4
|
rb 8*MAX_FILE_LEVEL
|
||||||
|
|
||||||
size_one_list equ 14
|
size_one_list equ 40
|
||||||
|
list_offs_text equ 12 ;ᤢ¨£ ç « ⥪áâ ¢ «¨áâ¥
|
||||||
buffer rb size_one_list ;¡ãä¥à ¤«ï ¤®¡ ¢«¥¨ï áâàãªâãà ¢ ᯨ᮪ tree1
|
buffer rb size_one_list ;¡ãä¥à ¤«ï ¤®¡ ¢«¥¨ï áâàãªâãà ¢ ᯨ᮪ tree1
|
||||||
|
|
||||||
if lang eq ru
|
if lang eq ru
|
||||||
@ -288,6 +321,13 @@ mouse:
|
|||||||
align 4
|
align 4
|
||||||
timer_funct:
|
timer_funct:
|
||||||
pushad
|
pushad
|
||||||
|
if debug
|
||||||
|
mov eax,4
|
||||||
|
mov ebx,(5 shl 16)+8
|
||||||
|
mov ecx,0xff+0x80000000
|
||||||
|
mov edx,txt_0002
|
||||||
|
int 0x40
|
||||||
|
end if
|
||||||
mcall 26,9
|
mcall 26,9
|
||||||
mov [last_time],eax
|
mov [last_time],eax
|
||||||
|
|
||||||
@ -305,7 +345,12 @@ timer_funct:
|
|||||||
je @f
|
je @f
|
||||||
mov dword[offs_last_timer],eax
|
mov dword[offs_last_timer],eax
|
||||||
call buf_draw_beg
|
call buf_draw_beg
|
||||||
stdcall [buf2d_draw_text], buf_0, buf_1,txt_3ds_offs,5,35,0xd000
|
stdcall [buf2d_draw_text], buf_0, buf_1,txt_3ds_offs,5,35,0xb000
|
||||||
|
mov edx,dword[ebx+8]
|
||||||
|
cmp edx,0 ;ᬮâਬ ¥áâì «¨ ®¯¨á ¨¥ ¡«®ª
|
||||||
|
je .no_info
|
||||||
|
stdcall [buf2d_draw_text], buf_0, buf_1,edx,5,45,0xb000
|
||||||
|
.no_info:
|
||||||
add ecx,eax ;¯®«ãç ¥¬ à §¬¥à ¡«®ª
|
add ecx,eax ;¯®«ãç ¥¬ à §¬¥à ¡«®ª
|
||||||
stdcall buf_draw_hex_table,eax,ecx ;¤®¡ ¢«¥¨¥ 16-à¨çëå ¤ ëå
|
stdcall buf_draw_hex_table,eax,ecx ;¤®¡ ¢«¥¨¥ 16-à¨çëå ¤ ëå
|
||||||
stdcall [buf2d_draw], buf_0 ;®¡®¢«ï¥¬ ¡ãä¥à íªà ¥
|
stdcall [buf2d_draw], buf_0 ;®¡®¢«ï¥¬ ¡ãä¥à íªà ¥
|
||||||
@ -328,11 +373,11 @@ align 4
|
|||||||
proc buf_draw_hex_table, offs:dword, size_line:dword
|
proc buf_draw_hex_table, offs:dword, size_line:dword
|
||||||
pushad
|
pushad
|
||||||
locals
|
locals
|
||||||
coord_y dd 45
|
coord_y dd 55 ;ª®®à¤¨ â y ¤«ï ç « ¢ë¢®¤ â ¡«¨æë
|
||||||
endl
|
endl
|
||||||
mov esi,dword[offs]
|
mov esi,dword[offs]
|
||||||
mov edi,dword[open_file_lif]
|
mov edi,dword[open_file_lif]
|
||||||
add edi,dword[file_3ds+4] ;edi - 㪠§ â¥«ì ª®¥æ ä ©« ¢ ¯ ¬ïâ¨
|
add edi,dword[file_3ds.size] ;edi - 㪠§ â¥«ì ª®¥æ ä ©« ¢ ¯ ¬ïâ¨
|
||||||
mov dword[txt_3ds_offs.dig],0
|
mov dword[txt_3ds_offs.dig],0
|
||||||
cld
|
cld
|
||||||
.cycle_rows:
|
.cycle_rows:
|
||||||
@ -525,7 +570,7 @@ but_open_file:
|
|||||||
mov dword[level_stack],0 ;®¡ã«ï¥¬ ã஢¥ì á⥪
|
mov dword[level_stack],0 ;®¡ã«ï¥¬ ã஢¥ì á⥪
|
||||||
mov dword[offs_last_timer],0
|
mov dword[offs_last_timer],0
|
||||||
;--- ¤®¡ ¢«¥¨¥ £« ¢®£® ¡«®ª ¢ ᯨ᮪
|
;--- ¤®¡ ¢«¥¨¥ £« ¢®£® ¡«®ª ¢ ᯨ᮪
|
||||||
stdcall add_3ds_object, ID_ICON_CHUNK_MAIN,0,dword[esi+2]
|
stdcall add_3ds_object, ID_ICON_CHUNK_MAIN,0,dword[esi+2],0
|
||||||
call block_children ;¢å®¤ ¢ ¤®ç¥à¨© ¡«®ª
|
call block_children ;¢å®¤ ¢ ¤®ç¥à¨© ¡«®ª
|
||||||
|
|
||||||
mov edi,dword[file_3ds.offs]
|
mov edi,dword[file_3ds.offs]
|
||||||
@ -537,20 +582,19 @@ but_open_file:
|
|||||||
cmp esi,edi ;¥á«¨ ª®¥æ ä ©«
|
cmp esi,edi ;¥á«¨ ª®¥æ ä ©«
|
||||||
jge .end_cycle
|
jge .end_cycle
|
||||||
|
|
||||||
call block_analiz
|
|
||||||
mov edx,dword[esi+2] ;à §¬¥à ¡«®ª
|
mov edx,dword[esi+2] ;à §¬¥à ¡«®ª
|
||||||
|
call block_analiz
|
||||||
cmp dword[eax],0
|
cmp dword[bl_found],0
|
||||||
jne @f
|
jne @f
|
||||||
;®¡ê¥ªâ ¥ ¨§¢¥á⮣® ¢¨¤
|
;®¡ê¥ªâ ¥ ¨§¢¥á⮣® ¢¨¤
|
||||||
stdcall add_3ds_object, ID_ICON_CHUNK_NOT_FOUND,dword[level_stack],edx
|
stdcall add_3ds_object, ID_ICON_CHUNK_NOT_FOUND,dword[level_stack],edx,0
|
||||||
call block_next
|
call block_next
|
||||||
jmp .cycle_main
|
jmp .cycle_main
|
||||||
@@:
|
@@:
|
||||||
;®¡ê¥ªâ ¨§¢¥á⮣® ¢¨¤
|
;®¡ê¥ªâ ¨§¢¥á⮣® ¢¨¤
|
||||||
mov ecx,dword[eax]
|
mov ecx,dword[bl_found]
|
||||||
mov bx,word[ecx+2] ;®¬¥à ¨ª®ª¨ ¤«ï ®¡ê¥ªâ
|
mov bx,word[ecx+2] ;®¬¥à ¨ª®ª¨ ¤«ï ®¡ê¥ªâ
|
||||||
stdcall add_3ds_object, ebx,dword[level_stack],edx
|
stdcall add_3ds_object, ebx,dword[level_stack],edx,dword[ecx+5]
|
||||||
cmp byte[ecx+4],1
|
cmp byte[ecx+4],1
|
||||||
je .bl_data
|
je .bl_data
|
||||||
;¡«®ª ᮤ¥à¦¨â ¤®ç¥à¨¥ ¡«®ª¨
|
;¡«®ª ᮤ¥à¦¨â ¤®ç¥à¨¥ ¡«®ª¨
|
||||||
@ -559,7 +603,6 @@ but_open_file:
|
|||||||
.bl_data:
|
.bl_data:
|
||||||
;¡«®ª ᮤ¥à¦¨â ¤ ë¥
|
;¡«®ª ᮤ¥à¦¨â ¤ ë¥
|
||||||
call block_analiz_data
|
call block_analiz_data
|
||||||
call block_next
|
|
||||||
jmp .cycle_main
|
jmp .cycle_main
|
||||||
.end_cycle:
|
.end_cycle:
|
||||||
stdcall [tl_cur_beg], tree1
|
stdcall [tl_cur_beg], tree1
|
||||||
@ -574,28 +617,48 @@ but_open_file:
|
|||||||
; «¨§ ¤ ëå ¡«®ª
|
; «¨§ ¤ ëå ¡«®ª
|
||||||
;input:
|
;input:
|
||||||
; esi - memory pointer
|
; esi - memory pointer
|
||||||
|
;output:
|
||||||
|
; eax - new stack pointer
|
||||||
|
; esi - new memory pointer
|
||||||
align 4
|
align 4
|
||||||
block_analiz_data:
|
block_analiz_data:
|
||||||
pushad
|
push ebx ecx edx edi
|
||||||
mov ax,word[esi]
|
mov dx,word[esi]
|
||||||
mov ecx,dword[esi+2]
|
mov ecx,dword[esi+2]
|
||||||
sub ecx,6 ;à §¬¥à ¤ ëå ¢ ¡«®ª¥
|
sub ecx,6 ;à §¬¥à ¤ ëå ¢ ¡«®ª¥
|
||||||
add esi,6
|
add esi,6
|
||||||
mov ebx,dword[level_stack]
|
mov ebx,dword[level_stack]
|
||||||
inc ebx
|
inc ebx
|
||||||
;cmp ax,CHUNK_color_1
|
; *** «¨§ ¡«®ª®¢ á à §ë¬¨ ¤ 묨 ¨ ¢ë¤¥«¥¨¥¬ ¯®¤¡«®ª®¢
|
||||||
;jne @f
|
cmp dx,CHUNK_OBJBLOCK ;®¡ê¥ªâ
|
||||||
; .cycle_0:
|
jne @f
|
||||||
; stdcall add_3ds_object, ID_ICON_DATA,ebx,3
|
.cycle_0:
|
||||||
; add esi,3
|
push ax
|
||||||
; sub ecx,3
|
cld
|
||||||
; cmp ecx,0
|
xor al,al
|
||||||
; jg .cycle_0
|
mov edi,esi
|
||||||
; jmp .end_f
|
repne scasb
|
||||||
;@@:
|
pop ax
|
||||||
stdcall add_3ds_object, ID_ICON_DATA,ebx,ecx
|
sub edi,esi ;edi - strlen
|
||||||
|
stdcall add_3ds_object, ID_ICON_DATA,ebx,edi,0 ; §¢ ¨¥ ®¡ê¥ªâ
|
||||||
|
add esi,edi
|
||||||
|
sub ecx,edi
|
||||||
|
jmp .next_bl
|
||||||
|
@@:
|
||||||
|
; *** «¨§ ¡«®ª á ¤ 묨 ¯® 㬮«ç ¨î (¡¥§ ¢ë¤¥«¥¨ï ¯®¤¡«®ª®¢)
|
||||||
|
stdcall add_3ds_object, ID_ICON_DATA,ebx,ecx,0
|
||||||
|
sub esi,6 ;¢®ááâ ®¢«¥¨¥ esi
|
||||||
|
call block_next
|
||||||
|
jmp .end_f
|
||||||
|
.next_bl:
|
||||||
|
; *** áâனª¨ ¤«ï «¨§ ®áâ ¢è¨åáï ¯®¤¡«®ª®¢
|
||||||
|
mov dword[eax],esi ;㪠§ ⥫ì ç «® ¡«®ª
|
||||||
|
mov ebx,dword[esi+2]
|
||||||
|
mov dword[eax+4],ebx ;à §¬¥à ¡«®ª
|
||||||
|
inc dword[level_stack]
|
||||||
|
add eax,8
|
||||||
.end_f:
|
.end_f:
|
||||||
popad
|
pop edi edx ecx ebx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
;¢å®¤ ¢ 1-© ¤®ç¥à¨© ¡«®ª
|
;¢å®¤ ¢ 1-© ¤®ç¥à¨© ¡«®ª
|
||||||
@ -633,25 +696,29 @@ push ebx
|
|||||||
add esi,dword[esi+2] ;¯à®¯ã᪠¥¬ ¤ ë¥ ¡«®ª
|
add esi,dword[esi+2] ;¯à®¯ã᪠¥¬ ¤ ë¥ ¡«®ª
|
||||||
|
|
||||||
;¯à®¢¥àª à §¬¥à®¢ த¨â¥«ì᪮£® ¡«®ª , ¤«ï ¢®§¬®¦®£® ¢ë室 ¢¥à娩 ã஢¥ì ¥á«¨ ª®¥æ ¡«®ª
|
;¯à®¢¥àª à §¬¥à®¢ த¨â¥«ì᪮£® ¡«®ª , ¤«ï ¢®§¬®¦®£® ¢ë室 ¢¥à娩 ã஢¥ì ¥á«¨ ª®¥æ ¡«®ª
|
||||||
|
@@:
|
||||||
mov ebx,dword[eax-8]
|
mov ebx,dword[eax-8]
|
||||||
add ebx,dword[eax-4]
|
add ebx,dword[eax-4]
|
||||||
cmp esi,ebx
|
cmp esi,ebx
|
||||||
jl @f
|
jl @f
|
||||||
dec dword[level_stack]
|
dec dword[level_stack]
|
||||||
sub eax,8
|
sub eax,8
|
||||||
|
cmp dword[level_stack],0
|
||||||
|
jg @b
|
||||||
@@:
|
@@:
|
||||||
pop ebx
|
pop ebx
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
;äãªæ¨ï ¯®¨áª áâàãªâãàë ®¯¨áë¢ î饩 ¡«®ª
|
||||||
;input:
|
;input:
|
||||||
;eax - pointer to stack
|
|
||||||
;esi - memory pointer
|
;esi - memory pointer
|
||||||
;output:
|
;output:
|
||||||
;dword[eax] - pointer to chunk struct (= 0 if not found)
|
;dword[bl_found] - pointer to chunk struct (= 0 if not found)
|
||||||
align 4
|
align 4
|
||||||
|
bl_found dd 0
|
||||||
block_analiz:
|
block_analiz:
|
||||||
pushad
|
pushad
|
||||||
mov dword[eax],0
|
mov dword[bl_found],0
|
||||||
mov ecx,type_bloks
|
mov ecx,type_bloks
|
||||||
@@:
|
@@:
|
||||||
mov bx,word[ecx]
|
mov bx,word[ecx]
|
||||||
@ -662,7 +729,7 @@ pushad
|
|||||||
jl @b
|
jl @b
|
||||||
jmp .no_found
|
jmp .no_found
|
||||||
.found:
|
.found:
|
||||||
mov dword[eax],ecx
|
mov dword[bl_found],ecx
|
||||||
.no_found:
|
.no_found:
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
@ -670,7 +737,7 @@ popad
|
|||||||
;input:
|
;input:
|
||||||
; esi - 㪠§ â¥«ì «¨§¨àã¥¬ë¥ ¤ ë¥
|
; esi - 㪠§ â¥«ì «¨§¨àã¥¬ë¥ ¤ ë¥
|
||||||
align 4
|
align 4
|
||||||
proc add_3ds_object, icon:dword,level:dword,size_bl:dword
|
proc add_3ds_object, icon:dword,level:dword,size_bl:dword,info_bl:dword
|
||||||
pushad
|
pushad
|
||||||
mov bx,word[icon]
|
mov bx,word[icon]
|
||||||
shl ebx,16
|
shl ebx,16
|
||||||
@ -681,13 +748,27 @@ proc add_3ds_object, icon:dword,level:dword,size_bl:dword
|
|||||||
mov dword[buffer],eax ;ᬥ饨¥ ¡«®ª
|
mov dword[buffer],eax ;ᬥ饨¥ ¡«®ª
|
||||||
mov ecx,dword[size_bl]
|
mov ecx,dword[size_bl]
|
||||||
mov dword[buffer+4],ecx ;à §¬¥à ¡«®ª (¨á¯®«ì§ã¥âáï ¢ äãªæ¨¨ buf_draw_hex_table ¤«ï à¨á®¢ ¨ï «¨¨¨)
|
mov dword[buffer+4],ecx ;à §¬¥à ¡«®ª (¨á¯®«ì§ã¥âáï ¢ äãªæ¨¨ buf_draw_hex_table ¤«ï à¨á®¢ ¨ï «¨¨¨)
|
||||||
stdcall hex_in_str, buffer+8,dword[esi+1],2
|
mov ecx,dword[info_bl]
|
||||||
stdcall hex_in_str, buffer+10,dword[esi],2 ;ª®¤ 3ds ¡«®ª
|
mov dword[buffer+8],ecx
|
||||||
mov byte[buffer+12],0
|
stdcall hex_in_str, buffer+list_offs_text,dword[esi+1],2
|
||||||
|
stdcall hex_in_str, buffer+list_offs_text+2,dword[esi],2 ;ª®¤ 3ds ¡«®ª
|
||||||
|
cmp ecx,0
|
||||||
|
jne @f
|
||||||
|
mov byte[buffer+list_offs_text+4],0 ;0 - ᨬ¢®« ª®¥æ áâப¨
|
||||||
|
jmp .no_capt
|
||||||
|
@@:
|
||||||
|
mov byte[buffer+list_offs_text+4],' '
|
||||||
|
mov esi,ecx
|
||||||
|
mov edi,buffer+list_offs_text+5
|
||||||
|
mov ecx,size_one_list-(list_offs_text+5)
|
||||||
|
cld
|
||||||
|
rep movsb
|
||||||
|
mov byte[buffer+size_one_list-1],0 ;0 - ᨬ¢®« ª®¥æ áâப¨
|
||||||
|
.no_capt:
|
||||||
stdcall [tl_node_add], buffer, ebx, tree1
|
stdcall [tl_node_add], buffer, ebx, tree1
|
||||||
stdcall [tl_cur_next], tree1
|
stdcall [tl_cur_next], tree1
|
||||||
if debug
|
if debug
|
||||||
stdcall print_err,sz_add_3ds_object,buffer+8
|
stdcall print_err,sz_add_3ds_object,buffer+list_offs_text
|
||||||
end if
|
end if
|
||||||
popad
|
popad
|
||||||
ret
|
ret
|
||||||
@ -1128,8 +1209,8 @@ buf_1:
|
|||||||
db 24 ;+20 bit in pixel
|
db 24 ;+20 bit in pixel
|
||||||
|
|
||||||
el_focus dd tree1
|
el_focus dd tree1
|
||||||
tree1 tree_list size_one_list,100+2, tl_key_no_edit+tl_draw_par_line,\
|
tree1 tree_list size_one_list,200+2, tl_key_no_edit+tl_draw_par_line,\
|
||||||
16,16, 0xffffff,0xb0d0ff,0xd000ff, 5,35,195-16,250, 0,8,0, el_focus,\
|
16,16, 0xffffff,0xb0d0ff,0xd000ff, 5,35,195-16,250, 16,list_offs_text,0, el_focus,\
|
||||||
w_scr_t1,0
|
w_scr_t1,0
|
||||||
|
|
||||||
align 4
|
align 4
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.1 KiB |
Loading…
Reference in New Issue
Block a user