ok. wat basically my program does it simple:
1. read a file containing (x,y,z) positions.
2. using this data i move my entities around.

Its like a playback.

And my code structure is as follows:
Code:
#include <acknex.h> 	
#include <default.c> 
#include "mtlFX.c" 	
//define vars
...
...

//Camera function

function Camera_OneFrame_Function()
{
 
   //normal contents of camera action while loop
   if(key_w)  camera.x += 5 * time_step;
   if(key_s)  camera.x -= 5 * time_step;
   if(key_a)  camera.y += 5 * time_step;
   if(key_d)  camera.y -= 5 * time_step;
   
 
} 

action Normal_Camera_Action()
{
	 while(1)
	 {
	 	//default lite-c camera
	 	Camera_OneFrame_Function();
 	  	wait(1);
	 }
	 	
}

//function pause
function pause()
{
	if(freeze_mode == 2)
		{
			freeze_mode = 0;
		
		}
	else
		{
		freeze_mode = 2;
		
		}
	while(freeze_mode==2)
	{
		
		Camera_OneFrame_Function();
		wait(1);
	}
}


//file reading and entities motion
function load_file()
{
  //read file line by line
  .. 
  .. 
  ..

  //move each entity
  .. 
  ..
  ..
}

//Main function
function main()
{

  //set video modes, mouse modes
  ...
  ...
  
  //load level
  level_load(strLevel);
  wait(2);

  Normal_Camera_Action();
  

  //create pause key
  on_p = pause;
  
  //file reading and entities motion
  load_file();
}

  



if u still need the full code, let me know ur email i forward 2 u.



A7 commercial Team / VC++ 2008 Pro
homepage | twitter | facebook