Loggy's combat sim reverse engineering notes

This is me going through a lot of stuff in no particular order. Most if it probaly won't be interesting to anyone or have info that makes someone else think "what is the significance of this", but all my past attempts at looking at chunks of the combatsim code and trying to figure out what the heck is going on have died sadly.

For some reason I find myself starting at unit deployment on the field. I actually started at the beginning of the "dobattle" function which sets up and then calls the main battle sim until it's done. This was the first bit which is nonobvious enough to feel worth making notes on…

gettarget

This is used in a few different places. Time to take a closer look…