Gah!

xezno

Member
I've been trying for a while now. I'm trying to read from the spr2 code and I keep getting errors. My code so far:
Code:
Dim ifffile As New SimsLib.IFF.Iff("C:\Program Files\Maxis\The Sims Online\TSOClient\objectdata\objects\computerslaptop.spf")

        Dim imgconv As New ImageConverter



        PictureBox1.Image = imgconv.ConvertFrom(ifffile.GetSprite(1))
and it won't convert the image. GAH!
 
NotSupportedException was unhandled:
ImageConverter cannot convert from SimsLib.IFF.SPR2Parser.
 
The IFF reader has been drastically rewritten for PD, so I can't provide much insight into how the old one works.

However, from the error I can see that "ifffile.GetSprite(1)" is returning the type SPR2Parser, which obviously cannot be converted to an image. Not to mention that SPR2s can contain multiple frames, and that each frame has 3 images (z, alpha, colour), so you'd need to select the correct image by using the DRGPs, which you need to select by implementing OBJD and using BaseGraphic, and you'll only get animation if you implement the entire vm...

So there's no easy way around this! You need to read and understand everything, and if it's old simslib you'll need to implement a lot.
 
Yeah, the SPR2Parser should be able to get you DGRPs.
SimsLib supports frames with z-buffers, but the OBJD is incomplete.
 
May I just say, Xezno, I've looked over your code briefly (and run it, it seems to be very unstable, it crashed when I tried logging in) - why do you have a loading screen?
Right now it just seems like you're freezing the current thread and throwing messages to the screen (that aren't even centered).
All of this may seem very harsh, but the point is: If you're not loading anything, there's no point in a loading screen. You should save yourself the headache until you're actually loading something! :)
 
May I just say, Xezno, I've looked over your code briefly (and run it, it seems to be very unstable, it crashed when I tried logging in) - why do you have a loading screen?
Right now it just seems like you're freezing the current thread and throwing messages to the screen (that aren't even centered).
All of this may seem very harsh, but the point is: If you're not loading anything, there's no point in a loading screen. You should save yourself the headache until you're actually loading something! :)
I think I may have found what crashes it
EDIT: May have been fixed.
 
Last edited:
Back
Top