E
elfenliedtopfan2
Guest
ok what i am trying to do is get this text out of a binary file i know its shown as plain text but i know its not
as you can see here by the picture

now each file im going to read in is diffent the only thing that seems to stay the same thoughout all files is colour map spec normal witch are the following hex values
coulorMap hex code = 63 6F 6C 6F 72 4D 61 70
normalmap hex code = 6E 6F 72 6D 61 6C 4D 61 70
spec map hex code = 73 70 65 63 75 6C 61 72 4D 61 70
is there a way to get the text bytes just between these values as you can see by the highlighted code in revrence picture i want to get those bytes and have noticed all of the values are seprated via .
the only diffence is that the colour map you have to go to the left up the rest are right across i have made this small program currently that starts at certin byte but each file is diffent so was wondring is there a way to scope the file and stop when it reaches like colour map hex if those bytes match stop looking
public void findmaterialname()
{
BinaryReader br = new BinaryReader(File.OpenRead(waw_path + @"\raw\materials\" + mattofind));
br.BaseStream.Position = 0xB2;
foreach (char mychar in br.ReadChars(43))
{
storedbin += mychar;
}
MessageBox.Show(storedbin);
storedbin = "";
}
because some values are less than 43 chars and some are more so needed to ask advice i hope i making sense sorry i have dyliexa so its hard to expalin sometimes.
thanks in advance elfenliedtopfan5
Continue reading...
as you can see here by the picture

now each file im going to read in is diffent the only thing that seems to stay the same thoughout all files is colour map spec normal witch are the following hex values
coulorMap hex code = 63 6F 6C 6F 72 4D 61 70
normalmap hex code = 6E 6F 72 6D 61 6C 4D 61 70
spec map hex code = 73 70 65 63 75 6C 61 72 4D 61 70
is there a way to get the text bytes just between these values as you can see by the highlighted code in revrence picture i want to get those bytes and have noticed all of the values are seprated via .
the only diffence is that the colour map you have to go to the left up the rest are right across i have made this small program currently that starts at certin byte but each file is diffent so was wondring is there a way to scope the file and stop when it reaches like colour map hex if those bytes match stop looking
public void findmaterialname()
{
BinaryReader br = new BinaryReader(File.OpenRead(waw_path + @"\raw\materials\" + mattofind));
br.BaseStream.Position = 0xB2;
foreach (char mychar in br.ReadChars(43))
{
storedbin += mychar;
}
MessageBox.Show(storedbin);
storedbin = "";
}
because some values are less than 43 chars and some are more so needed to ask advice i hope i making sense sorry i have dyliexa so its hard to expalin sometimes.
thanks in advance elfenliedtopfan5
Continue reading...