/*
   CMSC 427 - Term Project Candidate
   ---------------------------------

   Beth Weinstein - bweinste@wam.umd.edu
   Ben Stewart - stewartb@wam.umd.edu
   Nawfel Tricha - Topaz@endorproductions.com

   Minimal OpenGL project using Microsoft Visual C++.
   This project is a premilinary candidate for the term 
   project required by CMSC 427.

   ABSTRACT:
      In this project, we will develop several fast 
      rendering and collision routines which would 
      require C/C++ speed and accuracy and then 
      implement a VisualJ++ interface.

   MODULE:
      Common (Flush) Engine module.
*/

#include "Global.h"

static skin_t r_floor_skin;
#define NUM_STANZAS 8
/*
   Initialization of Flush engine:
*/
void FlushInit()
{

}
/*
   Stanza change for Flush engine:
*/
void FlushStanza(int stanza)
{
	/*  BS:
		recycle the stanza variable of the engine once we've passed through
		all the stanzas
	*/
	if(stanza > NUM_STANZAS)
	{
		eng.stanza = 0;
	}
}

/*
   Main function, called from RenderFrame every frame:
*/
void FlushMain(struct winampVisModule *this_mod)
{
   vec3_t origin;
   int cr_effect = r_effect;

   glLoadIdentity();
   glTranslatef(0, 0, -4);
   if (cr_effect & EFFECT_SPECTRUM)
      {
      VectorSet(origin, -5.1, -4, 0);
      DSPRenderSpectrum(origin, this_mod);
      }

   if (cr_effect & EFFECT_FREQUENCY)
      {
      VectorSet(origin, 3.4, -4, 0);
      DSPRenderFrequency(origin, this_mod);
      }
}

