flat assembler
Message board for the users of flat assembler.
Index
> Windows > EXE file icon |
Author |
|
ProMiNick 29 Oct 2016, 23:25
smsng like that (there bugs inside it is only idea)
Code: macro multyicon group,[label,icon_file] ; usage multyicon instead of icon: multyicon main_icon,<icon_data1_at_fileico,icon_data2_at_fileico,...>,'file.ico' { common local count count = 0 forward ;local lcount irpv lbl,label \{ local data,size,position lbl dd RVA data,size,0,0 ;virtual at 0 ; file icon_file:4,2 ; load lcount word from 0 ;end virtual ;% must be <=lcount virtual at 0 file icon_file:6+16*(%-1),16 load size dword from 8 load position dword from 12 end virtual data file icon_file:position,size count = count+1 \} common local header align 4 group dd RVA header,6+count*14,0,0 header dw 0,1,count forward irpv lbl,label \{ file icon_file:6+16*(%-1),12 dw lbl#.resid \} common align 4 } And of course you can split 1 ico file to 10 by sm progs like microangelo and use standard macro. Thou ever can split ico with fasm: Code: ; must be compiled as many times as subicons file has ; source icon should be in other folder than code or it will be overriden ; source code each time should be renamed or each previous ico will be overriden format binary as 'ico' macro extractico icon_file,num { virtual at 0 file icon_file:4,2 load count word from 0 if count<num err 'Индекс иконки превысил количество' end if end virtual file icon_file,4 dw 1 file icon_file:6+num*16,16 load size dword from $-8 load offset dword from $-4 file icon_file:offset,size } extractico 'file.ico',1 ; change that from 1 to ico count in file Thou can think how to implement 1st case, or use 2nd and don`t think. _________________ I don`t like to refer by "you" to one person. My soul requires acronim "thou" instead. |
|||
29 Oct 2016, 23:25 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.