Page 1 of 1

[Source]Halo Map Loader

Posted: Thu Jul 04, 2013 4:43 am
by Dirk Gently
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

Re: [Source]Halo Map Loader

Posted: Sun Jul 07, 2013 5:46 pm
by WaeV
Thanks. This is not only cool, but is also helpful.

Image

Re: [Source]Halo Map Loader

Posted: Tue Jul 09, 2013 4:43 am
by Dirk Gently
forgot to mention the libxml2 dependency, but almost everything has that nowadays, so it isn't a limitation.