Tuesday, December 21, 2010

Another embarassing error

So I finally found someone that had an error that I could play with. Armorvil was kind enough to send me his kernel2.bin that wasn't loading correctly. Well, WM wasn't loading it correctly at any rate. He thought it was weird that once WM failed to load it, the original text would still be displayed. Indeed it is a bit strange, but that's because it's already loaded the text from the KERNEL.BIN that the PSX uses. So if it tries to load kernel2.bin and fails, WM will use the KERNEL.BIN text that it keeps handy. Pretty neat, huh? :)

Anyway, what the problem really was is that the buffer I had allocated for uncompressed file size wasn't large enough for the text he had compressed. I try to dynamically allocate memory so not to use too much or too little so I just set the uncompressed buffer to twice the compressed file's size. Not a bad theory, but his compression ratio was GREATER than 2:1! That means the resultant uncompressed file is MORE than twice the size of the compressed one so the buffer I had allocated to hold it was no longer large enough. Bummer. Since I know now that the normal limit for uncompressed text in FFVII.exe is 27K (refer to previous entry) then I set the size to 32K (since I know that Aali's customizations allow for larger text sizes).

Also, I've been getting complaints that after lots of editing, sometimes the text will get jumbled and confused with other texts. I believe this is a problem with the way I'm compressing text on listboxes. So if you had.....something like... aww, heck with it. I have no idea what it thinks it's doing. It changed

Cotton Dress
Satin Dress
Silk Dress
Wig
Dyed Wig
Blonde Wig
Glass Tiara
Ruby Tiara
Diamond Tiara
Cologne
Flower cologne
Sexy Cologne
Member's Card

into:

Cotton Dress
Satin Dress
Silk Dress
Wig
Dyed Wig
Blonde Wig
Glass Tiara
Ruby Tiara
Diamond Tiara
Colog lower colog Sexy Colog Member's Card
lower colog Sexy Colog Member's Card
Sexy Cologne Member's Card
Member's Card

If anyone has an explanation or theory as to how "ne\n" gets changed into " " let me know.

Friday, December 10, 2010

NEW UPDATE!!!

Rejoice! I actually did something! DLBP from qhimm contacted me two days ago and requested that enemies be able to be synced across the scene.bin. So I did. Since I was able to copy/paste enemies already (although they should really be called "actors") I just used that to copy the enemy data and AI and replace others using the same model. THAT'S THE TRICK, THOUGH. Every enemy uses a different model number even if the contents of the models are identical. There are at least six different Chocobo models alone and all of them are identical except for the files that contain them. Obviously you wouldn't want to replace the Wonderful Chocobo with the Poor one, so I'm going to have to restrict it by model ID. Characters of the same model ID can be synced with its copies. For example, Grunt (model ID of 0013h) exists in eight different scenes. I want to modify all of them, but to keep it straight I can now just modify one and say "sync all enemies with model ID 0013h". It's actually a rather quick process and I'm pleased with it's performance.

If another custom enemy is using that model it will be replaced, name and all! The way to prevent that is set the custom enemy to some bogus model number (which is being moved to the new stat editing screen) and then do the replacement then switch the custom enemy back.

Thursday, December 9, 2010

Long overdue news

You ready for this? I got nothing. Really. This has been a tough last quarter-year for me and I haven't had the chance to even look at the code for either WM or PrC. I was taking a class that just ended today, I had two (sort of, it's complicated) deaths in the immediate family within a week of each other, my lappy's finally hit the big one, and I got a new laptop at work which won't take my external backup of my older one that had all my FFVII reversing info on it.

I'm not back to square one or anything, but I haven't had IRL time to devote thought to these projects. Hopefully, come the new year I'll be less constrained and have a new laptop.

I haven't given up on or lost motivation any of this. There just technically isn't time to do anything with it.