static ETgMODULE_STATE s_enExecute_State = ETgMODULE_STATE_FREED;
TgASSERT(ETgMODULE_STATE_FREED == s_enExecute_State);
s_enExecute_State = ETgMODULE_STATE_INITIALIZING;
s_enExecute_State = ETgMODULE_STATE_INITIALIZED;
TgASSERT(ETgMODULE_STATE_INITIALIZED == s_enExecute_State);
s_enExecute_State = ETgMODULE_STATE_BOOTING;
TgLOGF( ETgCON_CHANEL_MESSAGE, TgT("%-16.16s(%-32.32s): %-48.48s % 14d\n"), TgT("Execute"), TgT("Boot_Module"),
TgT("Static Memory Size"), tgEX_Query_Fixed_Memory() );
s_enExecute_State = ETgMODULE_STATE_BOOTED;
TgASSERT(ETgMODULE_STATE_BOOTED == s_enExecute_State);
s_enExecute_State = ETgMODULE_STATE_STOPPING;
s_enExecute_State = ETgMODULE_STATE_STOPPED;
TgASSERT(ETgMODULE_STATE_STOPPED == s_enExecute_State || ETgMODULE_STATE_INITIALIZED == s_enExecute_State);
s_enExecute_State = ETgMODULE_STATE_FREEING;
s_enExecute_State = ETgMODULE_STATE_FREED;
TgRESULT tgEX_Update_Module( C_TgFLOAT32 fDt )
tgIN_Update_Module( fDt );
tgKN_Update_Module( fDt );
//// Camera is updated at the start of the game loop so that render image queries done by the game systems are valid for the
//// resulting image produced by the render. This way game code can test for visibility in the image and other image specific
//// queries when attempting to load balance.
////tgST_Update_Camera( fDt );
//// Update the scripting system. Scripting has to be done before actor processing so that render changes can correctly
//// be taken into account during actor processing.
////tgSC_Update_Module( fDt ); //« Update Script System
//// TBD: Elements of the set may need updating. This may allow for some dynamic actions in the static set without having
//// to turn the element into a loaded object.
//// Update the primary AI system. A master AI controller can be very useful in dispatching deferred AI tasks. As well
//// this can allow for an over watch of multiple AIs to provide higher order behaviors. This is the last mechanism by
//// which input is passed into a game object/actor.
////tgAI_Update_AI( fDt ); //« Primary AI Loop
//// Build the current list of all the processing and rendering objects. Objects may have their desired processing state
//// changed by either the input systems or set logic. If this request is approved by the object and the system then at
//// the end of this frame the object will have its state changed. This may cause resources to be released and is not
//// considered to be a light-weight change.
//// Movement and Animation //
//// This section is set up to be pipelined to allow for maximum concurrency.
//// The animation system processes the active entities given the animation state to determine a predictive motion. This
//// is done by calculating the movement of only the "pivot" bone - as set by the controlling actor code.
//// Update the pathing system with the desired motion computed from the animation system or set by higher level logic.
//// Objects that are not contained by the normal motion execution update their desired physical volumes. This is also
//// where those physical volumes that are not swept but need to be warped/slammed to their location should verify that
//// the desired location is valid. This would also be the point where any external non simulated factors can apply
//// physical affects to the world. For instance this would be the location where a wind object may influence the world
//// or a gravity controller can alter the force field.
////tgST_Update_Simulation( fDt );
//// The primary physics loop is performed synchronously with the game loop. This is required to provide some of the desired
//// final reactions in the game. For instance, use of the rag doll system in physical animation blends require the system
//// to be update with the animation system to reduce the amount of possible popping that may occur. However, it is possible
//// and is quite likely that the effects physical world will be processed asynchronously and at a lower frequency than the
//// primary loop for load balancing reasons.
//// The position of the actors is updated based on the final positions as determined by the physics system. The resulting
//// position may be reprocessed by the actor code to allow for possible animation changes. It is up to the programmer to
//// make sure that any changes done at this point to the animation and/or the actor is a legal change. The primary use of
//// this reprocessing is to prevent the character from doing illogical animation action (like walking against a wall).
////tgST_Update_Movement( fDt );
//// Now that the final animation state has been determined it is necessary to generate all of the animation blends and
//// calculate the final skeleton.
////tgAM_Update_Animation( fDt );
//// Update the sound module.
////tgSN_Update( fDt );
//// With a data buffer the following two functions could be threaded off for multi-core
return (ETgMODULE_STATE_INITIALIZED <= s_enExecute_State && s_enExecute_State <= ETgMODULE_STATE_STOPPED);
return (ETgMODULE_STATE_BOOTED == s_enExecute_State);