How to find a tiles name?


I wonder how to find a tiles name in the doOutput function?

Where has a tiles name info?

Good question.

The current method is very hack-y and is quite likely to change soon.

At the moment, a tiled data packet carries its tile name in its nametag, retrievable by WMPacket::GetNameTag().

Thus during a tiled build, you can follow the current user-specified tile naming convention by creating your output filename with a printf-style formatting string as follows:

const char *filetitle = “myfiletitle”; // filename without extension
const char *fileext = “.hf”;
const char *tilename = hf->GetNameTag();
sprintf( final_name, “%s%s.%s”, filetitle , tilename , fileext );

The tilename specified in GetNameTag() has already been filled out with the proper information (X,Y location, resolution, etc)