reading .map files

Post here about scripting and programming for HaloPC (audio, network, ai, etc.)
Post Reply
soten355





Posts: 29
Joined: Sun May 16, 2004 8:25 am

reading .map files

Post by soten355 »

okay, first off, when reading from a map file, how do you find a line of text in c++ that matches a char variable you've already initilized.(like a warthog's thingy)
kyboren





Posts: 58
Joined: Thu Feb 12, 2004 8:49 pm

Post by kyboren »

A single char or a character array?

For a single char, strchar(), for arrays, strstr().

You'll need to read in the file chunk by chunk into a buffer and use those.
kaptainkommie




Wordewatician 500

Posts: 732
Joined: Wed Nov 26, 2003 11:59 pm
Location: Raleigh, NC, USA

Post by kaptainkommie »

Regular Expressions are fun fun fun too!
DarkBrute





Posts: 157
Joined: Wed Aug 11, 2004 12:08 pm
Location: Installation 07 Library Trying to reason with a flood about not eating me.

Post by DarkBrute »

Actually, a .map file is a C++ inline file. It means that the section gets pasted into the Halo application. Bungie probably encrypted the map file further so that there is barely any native C++ code inside. Most of it is scripting. Plus, machine code auto changes any variables into var1 and var2 and etc. In other words if you crack the .map file parsing algorithm, then you can build an application to log funcion calls... then you literally have the halo map source code.
SunnySharma




Wordewatician 250

Posts: 405
Joined: Sat Jan 29, 2005 10:33 pm

Post by SunnySharma »

A Halo map is a compilation of tags (.string, .bitmap, .scenerio, etc) using Halo's Scripting Language, that's really it.
kyboren





Posts: 58
Joined: Thu Feb 12, 2004 8:49 pm

Post by kyboren »

IIRC the Halo Scripting Language is similar to LISP and is parsed at run-time.
Post Reply