Page 1 of 1

displaying the map preview image?

Posted: Sun Nov 18, 2007 7:02 pm
by grimdoomer
Im currently working on a Halo 2, Halo 3 app and I want to display the map preview image some where. The problem is I am having trouble reading the image. I have looked at preys menu menu menu source but he reads things a lot diffrent then i do makeing it very hard to emulate them procedure. I can translate between C3 and VB but im working with VB, I want to realy know everything i possible can about VB befor i go tp C#, then C++. But any way I need some help
Here is what I have so far,

Code: Select all

Public Sub LoadMapImage()

            'We need our Binary Reader
            Dim BR As New BinaryReader(New FileStream(MapLocation, FileMode.Open, FileAccess.Read, FileShare.Read))

            'Go to the image place and load our pics
            Dim plus As Integer = IIf(MapFilter = 0, 15812, 15820)
            MapSlotSize = IIf(MapFilter = 0, 2896, 3172)
            BR.BaseStream.Position = H2Tag(1).MetaOffset + plus

            Slots = BR.ReadInt32()
            SlotOffset = BR.ReadInt32() - MapSecondaryMagic

        End Sub
After that I am kinda stuck because of how prey loads map info its very diffrent then how my app does and i tryed to change some variables but i ended up with a huge problem with my magics. So any way I need a little help of loading these images.

Posted: Sun Nov 18, 2007 8:09 pm
by Supermodder911
I could help but not VB srry.

Posted: Mon Nov 19, 2007 11:16 am
by grimdoomer
Well I can read eather two and know what your talking about. If its in C3 Ill just do a quick translation.

Posted: Mon Nov 19, 2007 11:36 am
by Prey
C3 = C# ?..

Anyway, you can just run the parts of my source that you require through this, then you should have what you need.

Posted: Mon Nov 19, 2007 2:46 pm
by grimdoomer
yea i did helped a lot, I now know my problem Im calculating the magics wrong, once I fix it I should be able to get the map image to load.