Graphics for Drag Racing '99
Functions
Needed:
Run_Lights
Purpose:
To draw the starting lights at the beginning of the race
on the screen.
Inputs:
Pre_Stage, Stage, Yellow1, Yellow2, Yellow3, Green, Break
Outputs:
Writes to a scratch segment.
Description:
When a race starts this function will draw the starting
lights and run through all the
different light stages until the race begins.
UpdateTime
Purpose:
To draw the updated time on the screen.
Inputs:
Elapsed_Time
Outputs:
Writes directly to the screen.
Description:
Every time the entire screen is updated the elapsed time
that has gone by since the start of
the
race will be redrawn on the screen. This was done
using int 10h, 13h. This draws strings to the
screen in Graphics Mode
UpdateG
Purpose: To show which gear is in use on the
screen.
Inputs:
Gear
Outputs: Writes to a scratch segment
Description: Throughout the race the screen
will show which gear the car is in. This function
will redraw
the
appropriate part of the screen when a gear is switched.
UpdateN
Purpose:
To show which gear number is in use on the screen.
Inputs: Gear
Outputs:
Writes to a scratch segment
Description: Throughout the race the screen
will show which gear the car is in. This function
will redraw
the
appropriate part of the screen when a gear is switched.
UpdateS
Purpose: To redraw the speedometer on the
screen.
Inputs:
Speed
Outputs:
Writes to a scratch segment
Description:
Whenever the screen is redrawn the appropriate speed,
which is determined by the Speed
variable, will be drawn on the speedometer on the screen.
UpdateTach
Purpose:
To redraw the tachometer on the screen.
Inputs:
RPM
Outputs:
Writes to a scratch segment
Description:
Whenever the screen is redrawn the appropriate RMP level,
which is determined by the
RPM variable, will be drawn on the tachometer on the
screen.
UpdateT
Purpose: To draw on the screen the throttle
level.
Inputs:
Throttle
Outputs:
Writes directly to the screen.
Description:
This function will draw a throttle level on the screen
and will update this level by checking
the
throttle var and drawing the appropriate level on the
screen.
UpdateC
Purpose:
To draw on the screen a clutch light and show wheather it
is on or off
Inputs:
Gear
Outputs:
Writes to a scratch segment
Description:
Whenever the clutch is pressed the screen will be drawn
with the clutch light being on. At
all
other times it will be off.
DrawScreen
Purpose:
To draw the basicview.
Inputs:
None
Outputs:
Writes to a scratch segment.
Description:
This will draw the basic view on the screen. All
the update function will properly fix the
incorrect pictures on the basic view. After all the
functions are called the scratch segment will be
transferred to the video memory.