joy_pressed and joy_axis could be written in a more legible way. For example as follows:

Code:
// joyNum 1/2, axisNum 1-6
var joy_axis(int joyNum, int axisNum)
{
	if(joyNum == 2)
	{
		switch(axisNum)
		{
			case 1:
			return joy2_raw.x;

			case 2:
			return joy2_raw.y;

			case 3:
			return joy2_raw.z;

			case 4:
			return joy2_rot.x;
			
			case 5:
			return joy2_rot.y;

			case 6:
			return joy2_rot.z;

			default:
			return 0;
		}
	}
	// you can put this in an else case but as the function returns in the case above either way you don't need to
	// joyNum == 1 (or other (invalid) values)
	switch(axisNum)
	{
		case 1:
		return joy_raw.x;

		case 2:
		return joy_raw.y;

		case 3:
		return joy_raw.z;

		case 4:
		return joy_rot.x;
		
		case 5:
		return joy_rot.y;

		case 6:
		return joy_rot.z;
	}
	
	return 0;
}


Alternatively you could for example still use the "source" pointer array approach in my original post and then use a switch case statement (instead of the var *pv stuff).


The manual for lite-C is pretty good actually. I use the offline manual (open SED -> press F1) in "Index" mode usually - you will need to know most commands already for that (the Index approach) though.

What are you missing, speaking of detail and depth? Details about the functions themselves or more general concepts (how to write a movement/ enemy code/ menu code)?

Btw. there's a thing called the acknex user magazine, including small game samples (with a focus on the code, not the artwork): http://www.opserver.de/coni_users/web_users/pirvu/aum/aumonline_e/index.html


"Falls das Resultat nicht einfach nur dermassen gut aussieht, sollten Sie nochmal von vorn anfangen..." - Manual

Check out my new game: Pogostuck: Rage With Your Friends