***************************************************************************** Virtual Presence Engine API ***************************************************************************** These functions are used by the main program to access the engine. The calls should be done in the following order (VGA 320x200 assumed, 70 Hz timer): VPE_Init(); VPE_Config(320,200); VPE_SetRate(INT_FIX(70)); VPE_Start(); while() { VPE_Update(); VPE_Render(); } VPE_Stop(); VPE_Shut(); All the functions in the general API a part of the engine so they should not be altered unless you know what you are doing. This is just layout of calls to API, no hardware dependent calls. ============================================================================= void VPE_Init(void); ----------------------------------------------------------------------------- Description: Initialize the engine. The first VPE function to call. Parameters: None Return: None ============================================================================= ============================================================================= void VPE_Config(int ScrWidth, int ScrHeight); ----------------------------------------------------------------------------- Description: Gives VPE info about the output device. Parameters: ScrWidth - width in pixels of the output device ScrHeight - height in pixels of the output device Return: None ============================================================================= ============================================================================= void VPE_Shut(void); ----------------------------------------------------------------------------- Description: Shut down the engine Parameters: None Return: None ============================================================================= ============================================================================= void VPE_Start(void); ----------------------------------------------------------------------------- Description: Prepare for the rendering process. Must be called before the actual rendering starts. VPE_Stop(), VPE_Start() pair should be used when the engine is to be paused. Parameters: None Return: None ============================================================================= ============================================================================= void VPE_Stop(void); ----------------------------------------------------------------------------- Description: Stops the engine. For more info look at VPE_Start(). Parameters: None Return: None ============================================================================= ============================================================================= void VPE_Update(void); ----------------------------------------------------------------------------- Description: Updates all the zone info and prepares for rendering of the next frame. Usually used in pair with VPE_Render(). This function uses the time counter to calculate the frame-rate and adjust all movements. Must be called after VPE_Start(). Parameters: None Return: None ============================================================================= ============================================================================= void VPE_Render(void); ----------------------------------------------------------------------------- Description: Renders a complete frame to the output device. This function must be called only after VPE_Update(). Parameters: None Return: None ============================================================================= ============================================================================= void VPE_SetRate(FIXED TimerRate); ----------------------------------------------------------------------------- Description: Sets the rate of the external timer routine. Used for real-time speed adjustment. This rate determines the max fps that can be achieved. Parameters: TimerRate - Ticks per seconds (Hz) of the timer counter Return: None =============================================================================