Program Implementation:
Global Variables:
(Control Variables)
Pause
Play
Rewind
Forward
Repeat
Exit
LeftChannel
RightChannel
C code function calls:
-Open Image Files
-Initialize VESA
Assembly Procedure calls:
Proceedure: _MouseControl
Purpose: Installs mouse ISR
Inputs: None
Outputs: Modifies Cntrl*
variables
Implementation Details:
_MouseControl performs a DOS INT call to read the current status of
the mouse. If the mouse button is down at a valid location in the control
panel, it modifies that particular boolean Cntrl* variable.
Proceedure: _MouseHandler
Purpose: Updates the button states
Inputs: Global:
ButtonLP, lastButtonLP, control variables
Outputs: Modifies control variables
Implementation Details:
_MouseHandler is called every time an interrupt is generated. This
proceedure is solely responsible for setting the global control variables.
Proceedure: _OpenDoor
Purpose: Draws opening of
door
Inputs: doorBuf,screenBuf,dwidth
Outputs: screenBuf
Implementation Details:
_OpenDoor draws the door at the specified number of pixels by dwidth.
Proceedure: _UpdateControlPanel
Purpose: Draws the currents
states of each buttons
Inputs: buttonBuf,screenBuf
Outputs: screenBuf
Implementation Details:
_UpdateControlPanel calls drawnButton for each button.
Proceedure: _DrawButton
Purpose: Draws one button
to screenBuf
Inputs: buttonBuf,screenBuf
Outputs: screenBuf
Implementation Details:
Proceedure: _Intro
Purpose: Draws the background
and initial animation image from memory to screen
Inputs: doorBuf,screenBuf,dwidth,iFrame
Outputs: Update sceen
Implementation Details:
_Intro draws a specified frame in the introduction by a lookup into a table
of frame images.
Proceedure: _UpdateSpectrum
Purpose: Redraws a graph of the
magnitude of spectral frequency components of the music
Inputs: screenBuf
fMDCTCoeff - A 256 byte array that selectively contains the magnitudes
of 256 frequencies
Outputs: Moves discrete pixel
data to screen
Implementation Details:
_UpdateSpectrum intially clears it's drawing area and then draws discrete
lines of pixels with lengths proportional to the magnitudes of each element
in the array SpecComps. It does this by a simple formula that scales the
value of each entry of this array to a certain number of pixels. The number
of pixels are then drawn to screen.
Proceedure: _DispCursor
Purpose: Updates the the position
and redraws the cursor to screen
Inputs: screenBuf
Outputs: Screen
Implementation Details:
_DispCursor first refreshes the prior background masked by the cursor,
then saves the current backgroud where the new cursor will be drawn.
Finally, the cursor is drawn to screen using invisible pixel technique
described in class.
Proceedure: _DAdmin
Purpose: Redraws dancing animation
synchronized to the magnitudes of the frequency spectrum.
Inputs: screenBuf,
dBabyBuf
Outputs: Moves image data to screen
at specified address from input.
Implementation Details:
__DAdmin is passed memory location to draw image. The
actual frames of the animation will be sequentially read from the starting
location pointed to by dBabyBuf.
Proceedure: _EndAdmin
Purpose: Redraws dancing Lockwood
moving his hand
Inputs: screenBuf,
endingBuf
Outputs: Moves image data to screen
at specified address from input.
Implementation Details:
_EndAdmin draws the fianl animation that shows Lockword waving his hand
as a baby.
Proceedure: _EndAdminStatic
Purpose: Redraws frame with our
names
Inputs: screenBuf,
endingStaticBuf
Outputs: Moves image data to screen
at specified address from input.
Implementation Details:
_EndAdmin draws the fianl credits frame.
Flow Chart and Program Organization:
Last Modified 4/13/98 Brian Krejcarek