[Source]Halo Map Loader

Halo modding and gaming related applications.
Post Reply
Dirk Gently
Commando
Posts: 2047
Joined: Sun Oct 21, 2007 2:34 pm
Location: 3C0E9056
Contact:

[Source]Halo Map Loader

Post by Dirk Gently » Thu Jul 04, 2013 4:43 am

Last week I got a bit bored so I wrote a basic Halo retail/full map parser and setup the editor code for it. Much of the scenario loading I based off swordedit code and then rewrote to be at least 2x faster than swordedit and a magnitude more memory efficient. I have also added code to this that will parse entity plugins and allow you to use them to map out the metadata of tags in a loaded map file. This was written with speed in mind, it is very fast, and allows you to load different plugins per map you choose.

How to use:

Code: Select all

HaloMap *myMap = ParseHaloMapFromFileWithPlugins("/path/to/a/map/file/bloodgulch.map", "/path/to/the/folder/with/entity/plugins/in/it");

If something doesn't seem to work, check that you are supplying a valid halo full/retail map and the plugin directory is the one containing all the plugins, it doesn't go looking so you need to provide the immediate folder. To access tags, they are are an array in the struct HaloMap called "struct MapTags *tags;"

Code: Select all

myMap->tags[tagnumber]
and the total tag count is accessed like so:

Code: Select all

myMap->index->tagCount
Code: https://github.com/samdmarshall/SDMHaloMapLoader

WaeV
Peon
Posts: 126
Joined: Tue Aug 28, 2012 11:21 pm
Contact:

Re: [Source]Halo Map Loader

Post by WaeV » Sun Jul 07, 2013 5:46 pm

Thanks. This is not only cool, but is also helpful.

Image
Image

Dirk Gently
Commando
Posts: 2047
Joined: Sun Oct 21, 2007 2:34 pm
Location: 3C0E9056
Contact:

Re: [Source]Halo Map Loader

Post by Dirk Gently » Tue Jul 09, 2013 4:43 am

forgot to mention the libxml2 dependency, but almost everything has that nowadays, so it isn't a limitation.

Post Reply

Who is online

Users browsing this forum: Yandex [Bot] and 1 guest