#46
|
||||
|
||||
If you'd like some help, feel free to send me the source.
|
#47
|
||||
|
||||
I will probably do that. I have got all of the major funtions down, but I could use another set of hands maybe for helping with errors or just improving the program. Do you have AIM?
|
#48
|
||||
|
||||
cooliscoolio
I noticed that whatever it's doing is incredibly slow - much, much slower than such simple processing should take. I assume you're not storing data in RAM (a byte array), rather reading a filestream sequentially, which is very slow and contributes to HDD wear. |
#49
|
||||
|
||||
Alright, take a look at it. Im still learning some C#. Could you also help me learn how to parse image formats. Im quite interested in it. For anyone else who wants to see the source too feel free to look.
Last edited by mojobojo; 26th May 2009 at 10:15 AM. |
#50
|
||||
|
||||
PLEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE EEEEEEEEEEEEEEEEEEEELS
i relly wont one so if you make one i will be so happy BUT IF YOU DON`T i will kill a small toy ok im happy...
__________________
...SNSII?...:banjo |
#51
|
||||
|
||||
I made a program that parses the talking head sprites. If that's something you're looking for, I could let you borrow the source.
|
#52
|
||||
|
||||
I would like that. Im trying to learn stuff like this as much as I can. That way some day I could help out a little more with the rom modding community.
Last edited by mojobojo; 28th June 2009 at 04:51 AM. |
#53
|
||||
|
||||
Good News. I fixed the file isolation problem. It now dose it in 7 seconds.
Here is what did it Code:
DirectoryInfo dirinfo = new DirectoryInfo(fbd.SelectedPath); FileInfo[] fi = dirinfo.GetFiles(); foreach (FileInfo fri in fi) { FileStream fs = new FileStream(fbd.SelectedPath + "\\" + fri.Name, FileMode.Open); BinaryReader br = new BinaryReader(fs); int identify = br.ReadInt16(); int confirm = br.ReadByte(); if (identify == 769 || identify == 257 && confirm != 255) File.Copy(fbd.SelectedPath + "\\" + fri.Name, fbd2.SelectedPath + "\\" + fri.Name.Substring(0, 6) + ".bkt"); br.Close(); fs.Close(); Application.DoEvents(); } Last edited by mojobojo; 6th August 2009 at 10:24 AM. |
#54
|
||||
|
||||
Make it. Please?
__________________
"We read our Holy Books, screw like bunnies, and play Banjo-Kazooie while listening to Political talk shows." ~ TwilightVestige
|
#55
|
||||
|
||||
The last time I'tried this my computer got isolated. I am not trying this again until theres no chance of that occuring.
__________________
From where you're kneeling, it must seem like an 18-carat run of bad luck. Truth is... the game was rigged from the start -Benny |
#56
|
||||
|
||||
There shouldnd be a chance of this happeneing now. I tried this on 4 different computers. The previous version used a loop witch counted up through a couple thousand numbers, wich in turn caused it to take alot of time. This new loop has no history of freezing computers and is alot faster.
|
#57
|
||||
|
||||
Sorry I havent updated in a while. I havent forgotten about the applicaion, just been busy with some other stuff. Im hoping some other coder/researcher could help me. I have this code right here. Because the text seems to be at random positions inside the file. I have needed a way of loading them. The current code works fine but dosent seem to be proper and could result in improper loading and editing. I am currently looking for some type of data pointer to guide the reader in the right poistion. I havent had any luck in it so far but maybe soomeone could help me. Id like to keep in touch maybe AIM or MSN.
Code:
banjoFile = new FileStream(filePath, FileMode.Open); for (int i = 0; i < banjoFile.Length; i++) { banjoFile.Position = i; int x = banjoFile.ReadByte(); if (x > 10) { dataBlockBox.Items.Add((i + 1).ToString("X2")); while (banjoFile.ReadByte() > 9) { i++; } } } banjoFile.Close(); To identify that when I do isoaltion I use this code to loop through and seperate the files. Code:
DirectoryInfo dirinfo = new DirectoryInfo(fbd.SelectedPath); FileInfo[] fi = dirinfo.GetFiles(); foreach (FileInfo fri in fi) { FileStream fs = new FileStream(fbd.SelectedPath + "\\" + fri.Name, FileMode.Open); BinaryReader br = new BinaryReader(fs); int identify = br.ReadInt16(); int confirm = br.ReadByte(); if (identify == 769 || identify == 257 && confirm < 3) File.Copy(fbd.SelectedPath + "\\" + fri.Name, fbd2.SelectedPath + "\\" + Path.GetFileNameWithoutExtension(fri.Name) + ".bkt"); br.Close(); fs.Close(); } AIM: The Mojobojo MSN: mojobojo@live.com FYI, I perfer AIM and Im on it more. EDIT: I figured I'd release the latest build's source for curious people and people that want to help. http://mojobojo.webs.com/Banjo%20Kaz...Editor_SRC.rar Last edited by mojobojo; 6th August 2009 at 10:59 AM. |
#58
|
||||
|
||||
Quote:
__________________
From where you're kneeling, it must seem like an 18-carat run of bad luck. Truth is... the game was rigged from the start -Benny |
#59
|
||||
|
||||
Rewrote some of it, still not finished identifying the bytecodes. When I am I'll upload the whole source.
Code:
public struct blocks { public ArrayList pos; public ArrayList len; } private byte[] dataBuffer; private blocks blockBuff; private void findBlocks() { blockBuff = new blocks(); blockBuff.pos = new ArrayList(); blockBuff.len = new ArrayList(); int def = 0; for (int i = 0; i < dataBuffer.Length-2; i+=2) { if (dataBuffer[i] == 0) // dialogue { switch (dataBuffer[i + 1]) { case 0x2: case 0x3: case 0x4: case 0x5: case 0x6: case 0x7: if (i + 8 < dataBuffer.Length) { switch (dataBuffer[i + 2]) { case 0x0: case 0x1: def = 6; break; case 0x2: case 0x6: def = 7; break; default: def = 4; break; } blockBuff.pos.Add(i + def); blockBuff.len.Add((int)dataBuffer[i + def - 1]); dataBlockBox.Items.Add("0x" + (i + def).ToString("X2")); } break; default: break; } } else // questions and answers { if (i + 10 < dataBuffer.Length) { switch (dataBuffer[i + 1]) { case 0x80: blockBuff.pos.Add(i + 3); blockBuff.len.Add((int)dataBuffer[i + 2]); dataBlockBox.Items.Add("0x" + (i + 3).ToString("X2")); break; case 0x00: blockBuff.pos.Add(i + 4); blockBuff.len.Add((int)dataBuffer[i + 3]); dataBlockBox.Items.Add("0x" + (i + 4).ToString("X2")); break; } } } } } private void readFromBlock() { try { int dataPosition = (int)blockBuff.pos[dataBlockBox.SelectedIndex] + (int)fineTune.Value; int textSize = (int)blockBuff.len[dataBlockBox.SelectedIndex]; byte[] tempBlock = new byte[textSize]; for (int i = 0; i < textSize; i++) { tempBlock[i] = dataBuffer[i + dataPosition]; } textBox1.Text = Encoding.ASCII.GetString(tempBlock); } catch { fineTune.Value = 0; } } |
#60
|
||||
|
||||
Wow, thank you a WHOLE bunch. You have all types done or just some?
Last edited by mojobojo; 8th August 2009 at 08:51 AM. |
Tags |
banjo kazooie, text |
Thread Tools | |
|
|