bontz-team
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bontz-team] trees, animation


From: Chuck Rickard
Subject: Re: [Bontz-team] trees, animation
Date: 12 Jul 2003 17:07:03 -0500

i was begining to do some work on our tile engine...and i have an idea
on how to have multiple build targets but only one main().  i really
don't know the proper way to do this, so if this idea seems stupid
please speak up!

i don't know if this is the accepted way to do it, but i was thinking we
could allow for multiple build targets possibly if we use function
pointers...


//the code below isn't necesarrily 100% correct
//but i believe the concept could/would work

example of the main bontz.cpp file


main(){
//shared init code here
 
//call the main for our current target...
bontz_main();

//shared destruction code here
}

now lets say we want to build fishrace

so fishrace.cpp would have something like this
//declare function pointer
void * bontz_main ();

fish_main(){
  //have fish race specific main here.
}

//set the bontz_main pointer so the main in bontz.cpp 
//can find it...
bontz_main=fish_main;





reply via email to

[Prev in Thread] Current Thread [Next in Thread]