ADT Editor chapter III

Now the ADT class it’s a class! =D
The code that I used in the lastest post it’s only simple PHP and not POO.

Here are some examples about how to use the class:
ADT Initializacion, this is necessary before you use the function that you want to use:

//Class Example usage
$MyADT = new ADT();
$MyADT->ADT_Open("Azeroth_32_48.adt");
$MyADT->ADT_HeaderInfo();

And now, these functions will return an array that you can use to see the info of the declared chunk. You can use print_r($MyADT->ADT_Load_Textures()); to see the final result:

$MyADT->ADT_Load_Textures();
$MyADT->ADT_Load_M2_Patch();
$MyADT->ADT_Load_WMO_Patch();
$MyADT->ADT_M2_GetInfo();
$MyADT->ADT_WMO_GetInfo();

And if you want to use the All_Z feature just simply call these functions:

$MyADT->ADT_WMO_AllZ(10);
$MyADT->ADT_M2_AllZ(10);

You can use too this function to see if the map has water or not:

$MyADT->ADT_MH2O_Draw($MyADT->ADT_MH2O_info());

Leave a Reply

Your email address will not be published. Required fields are marked *