Requirements Analysis
DirectDraw Related
1.	Initialize bitmaps on demand.
2.	Change from 8- to 16-bit mode and back, re-initializing every already-initialized graphic as you go
3.	Search-and-replace a colour within a bitmap to allow for effects like Frosh with different skin tones.
DirectSound Related
1.	Stream .WAV files from disk.
3.	Use an additional parameter to the Play() function to allow for volume control; Use an additional parameter to the Play() function to allow for pan control.
DirectSetup Related
1.	An install program for The Legend of the Greasepole that will create the appropriate directory structure, install DirectX 5.0 if necessary, and copy The Pole Game over to the user’s hard drive.
Requirements Analysis
After programming with the existing DirectDraw interface for several months, we’ve discovered that we need a few additional functions to provide The Pole Game with the flexibility required by the art squad.
Specifically, the code needs to be able to do the following:
DirectDraw Related
1.	Initialize bitmaps on demand.
The following changes to class frametype are necessary:
class frametype {
public: // (relunctantly)
	char szBitmap[255];	// filename the bitmap comes from
	LPDIRECTDRAWSURFACE lpDDS;	//  pointer to the DirectDraw Surface
	int nLeft;		  // Left Co-ord
	int nTop;         // Top Co-ord
	int nWidth;      //  Width of the bitmap
	int nHeight;     // Height of the bitmap
	bool bInitialized;
	bool bInMemory; // Indicates whether or not the frame’s bitmap has been loaded 
// into memory.

public:

	frametype(frametype *pNewMirror = NULL) {bInMemory = false}; // Init bInMemory false.
	void Draw(int nScrx, int nScry, bool bUseColorKey);  
// Draw should initialize the bitmaps if necessary.
	void SetFileName(char *newName);   // Sets filename of the bitmap
void InitFrame(char *s, bool bMakeMirrorImage, 
				int nNewHotSpotX, int nNewHotSpotY, 
				int nnX1, int nnZ1, int nnX2, int nnZ2, bool bLoadNow = true);
// NEW: 
// If bLoadNow is true, the bitmap should immediately be loaded into memory (Mirror, too.)
// If bLoadNow is false, everything else should be set up, but the bitmap loaded 

   void LoadIntoMemory(void);   // Load the graphic into memory NOW.  
// Load the mirror into memory too if appropriate.
   Bool IsInMemory(void);  	// Returns if the graphic is available now in memory for
				// immediate use.

	int nHotSpotX;   // X-location of the Hotspot
	int nHotSpotY;   // Y-location of the Hotspot

	int nX1;   // "Collision" Co-ordinates
	int nZ1;   //  1 *---|
int nX2;   //    |   |
	int nZ2;   //    |---* 2
  
	bool bMirrored;	// has this frame been mirrored?	
	bool bIsMirror; // is it the mirror of a frame?
	frametype *pMirror; // pointer to the mirror image
};

2.	Change from 8- to 16-bit mode and back, re-initializing every already-initialized graphic as you go
There is some concern that the existing code does not work properly at 16 bit.  Please take a look at why the alpha colour regions aren’t being clipped properly (big blue squares are the result) at 16-bit.  It is important that the game work at both modes; we will distribute the graphics for both and give the user the option to install either or both sets.
The following functions will be required:
bool DDReInitFullScreen(HWND hwnd, int nColourDepth);  // New function which switches to the mode passed in as nColourDepth (either ‘8’ or ‘16’ will be passed in).  Assume that you are in one or the other at the time it is called.  I expect you will have to sweep through the list of frames and re-initialize them all after doing this.
bool DDInitFullScreen(HWND hwnd, int nColourDepth);  // This function will need a modification to allow the Colour Depth (either ‘8’ or ‘16’) to be passed in.
3.	Search-and-replace a colour within a bitmap to allow for effects like Frosh with different skin tones.
I have no idea where to start.  All I know is that we probably won’t get the “official” go-ahead unless we make “every effort” to add racial diversity to the game.
DirectSound Related
1.	Stream .WAV files from disk.
To accomplish this, it would be most expedient to modify the existing Csound structure to enable it to handle streaming sounds as well.  Consider the following amendments:
class CSound  {
	protected:
		char sFilename[255];
	public:
		int nBuffers;
		bool bStream;
		LPDIRECTSOUNDBUFFER  lpDSBuf[MAX_BUFFERS];
		CSound(char *sFile, bool bloadSound = true, int nBufs = 1, bool bIsStreamed = true); // Default constructor
		virtual ~CSound();
		
		bool Play(bool bLoop = false, long lVolume = volDEFAULT);
// If the sound is a streamed sound, Play should in effect stream it.
		bool IsPlaying(int nBuf);
		bool Stop();
		bool LoadSound();
		bool CreateBufferFromWaveFile();
};
3.	Use an additional parameter to the Play() function to allow for volume control; Use an additional parameter to the Play() function to allow for pan control.
Make the volume in the range 0..10 and the pan in the range –5..5 if at all possible.
	bool Play(bool bLoop = false, long lVolume = volDEFAULT, long lPan = panDEFAULT);
DirectSetup Related
1.	An install program for The Legend of the Greasepole that will create the appropriate directory structure, install DirectX 5.0 if necessary, and copy The Pole Game over to the user’s hard drive.  
A sample DirectSetup application, dinstall, is included with the DirectX SDK.  I started to doctor it, but it’s a wimpy program. Maybe this should be the jurisdiction of a little VB app that taps the DirectX SDKs?  This one can wait until March.