Well, Im afraid to say ... I deleted it all! Doh!

It was in a project that I canned due to architecture limitations.
Faulty design from the ground up. So I restarted the entire thing.
Unfortunately, I deleted the main.c that had all this diagnostics in it!!

But Ive rebuilt it from memory for you (and for me later).

Click to reveal..
Code:
#include <acknex.h>
//
void _wait(var);
void _wait_initialize()		{	_wait = wait;	dtimer();	}
#define wait(i) 	do{  char* name; engine_gettaskinfo(0,&name,NULL);  debug_wait(name);	_wait(i);  } while(0)
//
#include "everything else"
//
//
//
STRING* debug_str;
VECTOR  debug_vec;
//
//
void debug_wait(char* function_name)
{
	if(str_cmpi(_str(function_name), _str("function_1")))
	{
		diag("Leaving ");		diag(function_name);
		diag_var(" at %.0f ms\n", dtimer/1000);
	}
	//
	if(str_cmpi(_str(function_name), _str("function_2")))
	{
		diag("Leaving ");		diag(function_name);
		diag_var(" at %.0f ms\n", dtimer/1000);
		diag("targetted entity = i");	diag(_chr(debug_str));	diag("'\n");
	}
	//
	if(str_cmpi(_str(function_name), _str("function_3")))
	{
		diag("Leaving ");		diag(function_name);
		diag_var(" at %.0f ms\n", dtimer/1000);
		diag_var("Position = %.0f, ", debug_vec.x);
			diag_var("%.0f, ", debug_vec.y);		diag_var("%.0f\n", debug_vec.z);
	}
	//
	if(str_cmpi(_str(function_name), _str("function_4")))
	{
		diag("Leaving ");		diag(function_name);
		diag_var(" at %.0f ms\n", dtimer/1000);
		diag_var("Grid-Reference = %.0f, ", debug_vec.x);	diag_var("%.0f\n", debug_vec.y);
	}
	//
	dtimer();	//reset timer REGARDLESS of which function is running
}
//
//
void main()
{
   _wait_initialize();   //this MUST come before any wait's in main!
   ...


This actually contains more example code than my original had at the end.
I put it in to show what I MAY have needed in the future.

Any questions? Feel free to ask!

PS: It looks a bit hard to read here, but put it in SED and it will align nicely.


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial