Team Members:
Mike Basil – Graphics
and Game-play
Preston White – Graphics
and Game-play
Jon Moeller – Sound
FX
Mark Smith - Networking
Introduction:
We plan to implement a Multi-Player Racing Game
as viewed from above. Game-play will involve the player's car
being able to rotate isometrically in the center of the screen as the racetrack
scrolls in the background according to the orientation and acceleration
of the car. Unlike other such games, ours will be a multi-player game over
a network connection.
Main Features:
We will be implementing a smooth-scrolling screen for 16 different directions. We will do this with mode 13h VGA graphics. The game map will consist of tiles from a PCX file that will be loaded into the Tile Segment of our program. In order to accomplish scrolling, we keep track of the current player's car position as the center of the screen and map the viewable portion of the game map to the screen.
The network feature of the game will be based upon a server-client relationship. Each player client will receive the positions and orientations of the other players from the server, and will reply by sending its updated movements. All player clients will then have up-to-date information about the other players in the game to refer to when updating their screen. Information will be sent in small packets via NetBios at a fast enough rate so that variations in player speeds will be accurately reflected in the game.
We will implement sound functions for various events in the game. Small
noises such as crashes will be handled as short WAV files, and general
background music will be played as MIDI files. We may also attempt to directly
program the DSP with a value modulated by the current car speed that would
represent a crude engine noise. This would need to be tied into both our
timer and keyboard handlers.
Writing the game-play code will be the most difficult part of this
project. Modularity will be especially important since the network feature
will require a smooth exchange of data between the different clients. Another
challenge will be the implementation of acceleration. We will need to write
a complex keyboard handler that will be able to ramp car speed from zero
to a maximum value as a key is held down. Sound processing for the engine
noise will be tied directly to this feature. Lastly, we will need to handle
a variety of boundary conditions such as sliding on the edge of the track,
collisions, and orientation-based speed calculations.
Constants
| SBRESET | EQU | 06h |
| SBREAD | EQU | 0Ah |
| SBWRITE | EQU | 0Ch |
| SBSTATUS | EQU | 0Ch |
| SBAVAIL | EQU | 0Eh |
| SBACK | EQU | 0Fh |
| SCREECH | EQU | 0 |
| ENGINE | EQU | 1 |
| HORN | EQU | 2 |
| OW | EQU | 3 |
| BUILD | EQU | 4 |
| SPEED | EQU | 5 |
| HARLEY | EQU | 6 |
| TAP | EQU | 7 |
| TONE1 | EQU | 8 |
| TONE2 | EQU | 9 |
| TONE3 | EQU | 10 |
| BREATHE | EQU | 0 |
| PULPFICTION | EQU | 1 |
| KNIGHTRIDER | EQU | 2 |
| MIAMIVICE | EQU | 3 |
| MISSIONIMP | EQU | 4 |
| ECCOSONG | EQU | 5 |
| SMELLS | EQU | 6 |
| SPYHUNTER | EQU | 7 |
| JUNGLE | EQU | 8 |
| SWEETCHILD | EQU | 9 |
| VIDSEG | EQU | 0A000h |
| VIDTEXTSEG | EQU | 0B800h |
| CR | EQU | 13 |
| LF | EQU | 10 |
| MAXSPEED | EQU | 2 | |
| MINSPEED | EQU | 10 | |
| TURNMAXWAIT | EQU | 50 | Amount of time waiting before next turn |
| NUMDIR | EQU | 15 | |
| FRICMAX | EQU | 15 | Max time sliding |
| SLIDEMAX | EQU | 15 | Number of gameloop turns before tires "Catch" |
| MAXIMPACT | EQU | 2 | how much impact a collision has |
| DRAWSPEED | EQU | 3 | how often we draw to the screen |
| NETSPEED | EQU | 0 | how often we send our info to the net |
| CARSPACEX | EQU | 18 | Range for impact |
| CARSPACEY | EQU | 18 |
| TURN_L | EQU | 75 | '4' On Number Pad |
| TURN_R | EQU | 77 | '6' On Number Pad |
| ACCELERATE | EQU | 29 | 'Ctrl |
| NITROUS | EQU | 56 | 'Alt' |
| NO_TURN | EQU | 0 |
| LEFT | EQU | 1 |
| RIGHT | EQU | 2 |
| TILEWIDTH | EQU | 16 | Tile Sizes |
| TILEHEIGHT | EQU | 14 | |
| SCREENWIDTH | EQU | 319 | Width of printable screen |
| SCREENHEIGHT | EQU | 167 | Height of printable screen (depends on Console) |
| SCREENTHRUY | EQU | 15 | used with the map editor to know when to scroll the map |
| SCREENTHRLY | EQU | 152 | |
| SCREENTHRLX | EQU | 15 | |
| SCREENTHRRX | EQU | 305 | |
| CAROFFSETUL | EQU | 22544 | |
| NUMCOLS | EQU | 320 | Number of columns we are using in drawtile |
| NUMROWS | EQU | 168 | Number of Rows we are usig in drawtile |
| DEFAULTTILE | EQU | 00 | what to print when off map |
| XCARSCREEN | EQU | 160 | where car starts X |
| XOFFSET | EQU | 176 | offset for easy calculations |
| XTILEOFFSET | EQU | 11 | |
| YCARSCREEN | EQU | 84 | similar to X |
| YOFFSET | EQU | 98 | |
| YTILEOFFSET | EQU | 07 | |
| HORZTILES | EQU | 80 | how many tiles in X direction of map |
| HTILESSCRN | EQU | 20 | how many tiles in 1 viewable screen X |
| VERTTILES | EQU | 60 | similar to X |
| VTILESSCRN | EQU | 13 | |
| MAPFILEOFFSET | EQU | 03 | |
| MAPBYTES | EQU | 4800 | |
| XCARMAPTH | EQU | HORZTILES*TILEWIDTH | XCarMap can't go past this |
| YCARMAPTH | EQU | VERTTILES*TILEHEIGHT | YCarMap can't go past thi |
| PALTILE0ULX | EQU | 1 |
| PALTILE0ULY | EQU | 170 |
| PALTILE1ULX | EQU | 18 |
| PALTILE1ULY | EQU | 170 |
| PALTILE2ULX | EQU | 170 |
| PALTILE2ULY | EQU | 35 |
| PALTILE3ULX | EQU | 170 |
| PALTILE3ULY | EQU | 52 |
| PALTILE4ULX | EQU | 170 |
| PALTILE4ULY | EQU | 69 |
| PALTILE5ULX | EQU | 170 |
| PALTILE5ULY | EQU | 86 |
| PALTILE6ULX | EQU | 170 |
| PALTILE6ULY | EQU | 103 |
| PALTILE7ULX | EQU | 170 |
| PALTILE7ULY | EQU | 120 |
| PALTILE8ULX | EQU | 170 |
| PALTILE8ULY | EQU | 154 |
| PALTILE9ULX | EQU | 170 |
| PALTILE9ULY | EQU | 137 |
| PALTILE10ULX | EQU | 170 |
| PALTILE10ULY | EQU | 171 |
| PALTILE11ULX | EQU | 170 |
| PALTILE11ULY | EQU | 188 |
| PALTILE12ULX | EQU | 170 |
| PALTILE12ULY | EQU | 205 |
| PALTILE13ULX | EQU | 222 |
| PALTILE13ULY | EQU | 170 |
| PALTILE14ULX | EQU | 239 |
| PALTILE14ULY | EQU | 170 |
| PALTILE15ULX | EQU | 256 |
| PALTILE15ULY | EQU | 170 |
| PALTILE16ULX | EQU | 001 |
| PALTILE16ULY | EQU | 185 |
| PALTILE17ULX | EQU | 018 |
| PALTILE17ULY | EQU | 185 |
| PALTILE18ULX | EQU | 035 |
| PALTILE18ULY | EQU | 185 |
| PALTILE19ULX | EQU | 052 |
| PALTILE19ULY | EQU | 185 |
| PALTILE20ULX | EQU | 069 |
| PALTILE20ULY | EQU | 185 |
| PALTILE21ULX | EQU | 086 |
| PALTILE21ULY | EQU | 185 |
| PALTILE22ULX | EQU | 103 |
| PALTILE22ULY | EQU | 185 |
| PALTILE23ULX | EQU | 120 |
| PALTILE23ULY | EQU | 185 |
| PALTILE24ULX | EQU | 137 |
| PALTILE24ULY | EQU | 185 |
| PALTILE25ULX | EQU | 154 |
| PALTILE25ULY | EQU | 185 |
| PALTILE26ULX | EQU | 171 |
| PALTILE26ULY | EQU | 185 |
| PALTILE27ULX | EQU | 188 |
| PALTILE27ULY | EQU | 185 |
| PALTILE28ULX | EQU | 205 |
| PALTILE28ULY | EQU | 185 |
| PALTILE29ULX | EQU | 222 |
| PALTILE29ULY | EQU | 185 |
| PALTILE30ULX | EQU | 239 |
| PALTILE30ULY | EQU | 185 |
| PALTILE31ULX | EQU | 256 |
| PALTILE31ULY | EQU | 185 |
| PALTILEEULX | EQU | 285 |
| PALTILEEULY | EQU | 170 |
| PALTILESULX | EQU | 302 |
| PALTILESULY | EQU | 170 |
| PUDDLETILE | EQU | 28 |
| FINISHLINE1 | EQU | 25 |
| FINISHLINE3 | EQU | 27 |
| TURBOTILE1 | EQU | 98 |
| TURBOTILE2 | EQU | 99 |
| TURBOTILE3 | EQU | 30 |
| TURBOTILE4 | EQU | 31 |
| OILTILE | EQU | 100 |
| CONSOLEOFFSET | EQU | (320*96) |
| CONSOLEHEIGHT | EQU | 32 |
| SMALLMAPOFFSET | EQU | (320*97)+140 |
| SMALLMAPXOS | EQU | 140 |
| SMALLMAPYOS | EQU | 169 |
| DIGIT0ULX | EQU | 052 |
| DIGIT0ULY | EQU | 182 |
| DIGIT1ULX | EQU | 036 |
| DIGIT1ULY | EQU | 182 |
| DIGIT2ULX | EQU | 020 |
| DIGIT2ULY | EQU | 182 |
| NITROULX | EQU | 093 |
| NITROULY | EQU | 182 |
| LAPULX | EQU | 220 |
| LAPULY | EQU | 182 |
| LAPOFULX | EQU | 217 |
| LAPOFULY | EQU | 182 |
| POINTS0ULX | EQU | 283 |
| POINTS0ULY | EQU | 182 |
| POINTS1ULX | EQU | 267 |
| POINTS1ULY | EQU | 182 |
| STARTULX | EQU | 90 | the box coordinates for "Start" choice |
| STARTULY | EQU | 54 | |
| STARTLRX | EQU | 202 | |
| STARTLRY | EQU | 78 | |
| STARTCHOSEN | EQU | 0 | |
| EDITULX | EQU | 90 | for "Edit" |
| EDITULY | EQU | 84 | |
| EDITLRX | EQU | 202 | |
| EDITLRY | EQU | 108 | |
| EDITCHOSEN | EQU | 1 | |
| CONTULX | EQU | 78 | for "Controls" |
| CONTULY | EQU | 116 | |
| CONTLRX | EQU | 214 | |
| CONTLRY | EQU | 140 | |
| CONTCHOSEN | EQU | 2 | |
| CREDITULX | EQU | 110 | |
| CREDITULY | EQU | 144 | for "Credits" |
| CREDITLRX | EQU | 184 | |
| CREDITLRY | EQU | 168 | |
| CREDITCHOSEN | EQU | 3 | |
| EXITULX | EQU | 95 | for "Exit" |
| EXITULY | EQU | 174 | |
| EXITLRX | EQU | 198 | |
| EXITLRY | EQU | 196 | |
| EXITCHOSEN | EQU | 4 |
| MAP0ULX | EQU | 30 | for "Map 0" |
| MAP0ULY | EQU | 42 | |
| MAP0LRX | EQU | 80 | |
| MAP0LRY | EQU | 63 | |
| MAP0CHOSEN | EQU | 0 | |
| MAP1ULX | EQU | 30 | for "Map 1" |
| MAP1ULY | EQU | 66 | |
| MAP1LRX | EQU | 80 | |
| MAP1LRY | EQU | 87 | |
| EQU | 1 | ||
| MAP2ULX | EQU | 30 | for "Map2" |
| MAP2ULY | EQU | 90 | |
| MAP2LRX | EQU | 80 | |
| MAP2LRY | EQU | 110 | |
| MAP2CHOSEN | EQU | 2 | |
| MAP3ULX | EQU | 30 | for "Map3" |
| MAP3ULY | EQU | 113 | |
| MAP3LRX | EQU | 80 | |
| MAP3LRY | EQU | 135 | |
| MAP3CHOSEN | EQU | 3 | |
| MAP4ULX | EQU | 30 | for "Map 4" |
| MAP4ULY | EQU | 138 | |
| MAP4LRX | EQU | 80 | |
| MAP4LRY | EQU | 160 | |
| MAP4CHOSEN | EQU | 4 | |
| MAP5ULX | EQU | 151 | for Map "5" |
| MAP5ULY | EQU | 42 | |
| MAP5LRX | EQU | 200 | |
| MAP5LRY | EQU | 63 | |
| MAP5CHOSEN | EQU | 5 | |
| MAP6ULX | EQU | 151 | for Map "6" |
| MAP6ULY | EQU | 66 | |
| MAP6LRX | EQU | 200 | |
| MAP6LRY | EQU | 87 | |
| MAP6CHOSEN | EQU | 6 | |
| MAP7ULX | EQU | 151 | for Map 7 |
| MAP7ULY | EQU | 90 | |
| MAP7LRX | EQU | 200 | |
| MAP7LRY | EQU | 110 | |
| EQU | 7 | ||
| MAP8ULX | EQU | 151 | for Map 8 |
| MAP8ULY | EQU | 113 | |
| MAP8LRX | EQU | 200 | |
| MAP8LRY | EQU | 135 | |
| MAP8CHOSEN | EQU | 8 | |
| MAP9ULX | EQU | 151 | for Map 9 |
| MAP9ULY | EQU | 138 | |
| MAP9LRX | EQU | 200 | |
| MAP9LRY | EQU | 160 | |
| MAP9CHOSEN | EQU | 9 | |
| UPDATEULX | EQU | 30 | for "Update" |
| UPDATEULY | EQU | 171 | |
| UPDATELRX | EQU | 85 | |
| UPDATELRY | EQU | 190 | |
| UPDATECHOSEN | EQU | 10 | |
| BACKULX | EQU | 151 | |
| BACKULYfor "Back" in the map editor menu | EQU | 171 | |
| BACKLRX | EQU | 200 | |
| BACKLRY | EQU | 189 | |
| BACKCHOSEN | EQU | 11 | |
| BACKPRACULX | EQU | 90 | for "Back" in the practice menu |
| BACKPRACULY | EQU | 170 | |
| BACKPRACLRX | EQU | 132 | |
| BACKPRACLRY | EQU | 190 | |
| BACKPRACCHOSEN | EQU | 12 |
| PRACULX | EQU | 82 | for "Practice |
| PRACULY | EQU | 44 | |
| PRACLRX | EQU | 169 | |
| PRACLRY | EQU | 66 | |
| PRACCHOSEN | EQU | 0 | |
| SINGLEULX | EQU | 64 | for "Single Player" |
| SINGLEULY | EQU | 70 | |
| SINGLELRX | EQU | 196 | |
| SINGLELRY | EQU | 95 | |
| SINGLECHOSEN | EQU | 1 | |
| NETULX | EQU | 75 | for "Networking" |
| NETULY | EQU | 100 | |
| NETLRX | EQU | 188 | |
| NETLRY | EQU | 125 | |
| NETCHOSEN | EQU | 2 | |
| BACKGTULX | EQU | 194 | for "Back" |
| BACKGTULY | EQU | 134 | |
| BACKGTLRX | EQU | 240 | |
| BACKGTLRY | EQU | 154 | |
| BACKGTCHOSEN | EQU | 3 |
| NONECHOSEN | EQU | -1 |
| BLUE | EQU | 01 |
| BLACK | EQU | 00 |
| GREY | EQU | 21 |
| WHITE | EQU | 15 |
| VIDSEG | EQU | 0A000h | where VGA video memory starts |
| FADEMAXWAIT | EQU | 40 | time delay for a fade |
Data Structures:
Packet struc
Player_Num
db ?
Player_X
dw ?
Player_Y
dw ?
Player_Lap
db ?
Player_Dir
db ?
Player_SpcPressed
db ?
Packet ENDS
Sound Data Structures
XMIFILE Structure-
Holds pertinent information needed
to play
a specific .XMI file
XMIFILE STRUCT
FName
db 20 dup(0)
; string max 20 chars.
FLength
dw ?
; total file length
SequenceNum dw ?
XMIFILE ends
XMIList Array
An Array of XMIFILE structures
which holds
all available .XMI file information.
XMIList XMIFILE {'breathe.xmi',47442,0},
{'pulp.xmi',19814,0},
{'knightrd.xmi',8024,0},
{'miamivic.xmi',9374,0},
{'missimp.xmi',29066,0},
{'ecco.xmi',21746,0},
{'smells.xmi',25618,0},
{'shunter.xmi',9648,0},
{'jungle.xmi',14420,0},
{'schild.xmi',28262,0}
XMINum dw 0 ; Specifies index for desired XMIFILE.
DMAC Structure
Holds the I/O port values for
DMA Controller
registers.
DMAC STRUCT
AddReg dw
? ; 2
PageReg dw
? ; 83h
LengthReg dw
? ; 3
MaskReg dw
? ; 0Ah
ModeReg dw
? ; 0Bh
ClrbReg dw
? ; 0Ch
DMAC ends
SBC Structure
Holds the settings of the SoundBlaster
card
configuration.
SBC STRUCT
DMAChannel db
? ; 1
BaseAdd
dw ?
; 220h
IRQ
db ?
; 07h
SBC ends
WAVFILE Structure
Holds pertinent information needed
to play
a specific .WAV file
WAVFILE STRUCT
FileName
db 20 dup(0)
; string max 20 chars.
FileLength
dw ?
; total file length
BufLength
dw ?
; length minus header
TimeConstant db
?
; timeconstant of data
WAVFILE ends
WAVList Array
An Array of WAVFILE structures
which holds
all available .WAV file information.
WAVList WAVFILE {'screech.wav',2200,,165},
{'engine.wav' ,42266,,211},
{'carhn.wav',2000,,165},
{'ow!.wav',4012,,165},
{'build.wav',14314,,225},
{'speed.wav',20000,,190},
{'hd.wav',65535,,200},
{'tap.wav',2331,,165},
{'tone.wav',5242,,175},
{'tone.wav',5242,,165},
{'tone.wav',5242,,185}
Variables:
BetweenMaps db 'Between.pcx',0
filename of pcx with screen for when between maps
TileFile
db 'tiles.pcx',0
pcx with tiles for game
MenuFile
db 'nMenu.pcx',0 pcx with main menu screen
MapEditorMenu db 'mapwe.pcx',0
pcx with map editor screen
PracticeMenu
db 'mapne.pcx',0 pcx with practice
menu screen
GameTypeMenu db 'gtype.pcx',0
pcx with game type menu screen
ControlsScreen db 'controls.pcx',0
pcx with controls screen
CreditScreen1 db 'credits1.pcx',0
pcxs with credit screens
CreditScreen2 db 'credits2.pcx',0
WinPic
db 'win.pcx',0
pcxs for screens with win, lose, or tie
LosePic
db 'lose.pcx',0
messages
TiePic
db 'tied.pcx',0
CurrentSpeed
db MINSPEED ; variable to hold speed
DisplaySpeed0 db 0
a BCD representation of the speed
DisplaySpeed1 db 0
DisplaySpeed2 db 0
CurrentDir
db 0 Starting direction
(0-15)
CollisionDir
db 0 A separate direction
variable for collisions
SpeedStatus
db 0 Value for control
of iteration of direction
NitroStatus
dw 0 Variable to
take care of duration of nitroboost
CollisionWord
dw 0 Initialized
for 0 colision directions.
FrictionStatus
dw 0 keeps a count
for friction when sliding on rails
SlideStatus
dw 0 keeps a count
for how far to slide
SlideDirection
db 0 direction you
are sliding, even though you appear to
face a different direction
ImpactDir
db 0 Direction after
car impact
ImpactEffect
db 0 Amount fo time
to move in the impact direction
MapCounter
db 0 counter for
which map you are in
General Opponent Vars. For either AI or Network
OppXScreen
dw 0
for holding a value of X for calculation
OppYScreen
dw 0
for holding a value of Y for calculation
OppDir
db 0
direction of opponent
OppLap
db 0
number of laps opponent has completed
OppYMap
dw 0 Opp Y coord
OppXMap
dw 0 Opp X Coord
AIVariables
AISpeed
db MINSPEED ;Variable for AISpeed
AISpeedStatus
db 0 Used for acceleration
in AI
AIMapOff
dw 0 Map[] offset
for AI car
AICountL
db 0 Counting varibles
for how many safe tiles
AICountR
db 0 there are in
five directions for decision making
AICountF
db 0
AICountFL
db 0
AICountFR
db 0
AITotalCount
dw 0 Variable that
holds the number of moves the AI will
make before it recalculates its turn.
AILapFlag
db 0 Used for
lap counter for AI
Table holds the values for offsets
in Map[] needed to 'Look' in these directions
AILookStupid
dw -80 North
dw 0
dw -79 Northwest
dw 0
dw +1 East
dw 0
dw +81 Southeast
dw 0
dw +80 South
dw 0
dw +79 SouthWest
dw 0
dw -1 West
dw 0
dw -81 NorthWest
dw 0
OppSpcPressed db 0
did the opponent (networked player) press
his space bar
OppWins
db 0
opponent's score
OppNumP
db ?
opponents (network) id
OppCarColor
db 1
CarColor
db 1
myWins
db 0
my score
TileTable dw (320*000)+(16*00)
; grass tile
dw (320*000)+(16*01)
; road tile
dw (320*000)+(16*02)
; road/grass
dw (320*000)+(16*03)
; road/grass
dw (320*000)+(16*04)
; road/grass
dw (320*000)+(16*05)
; road/grass
dw (320*000)+(16*06)
; road/curb
dw (320*000)+(16*07)
; road/curb
dw (320*000)+(16*08)
; road/curb
dw (320*000)+(16*09)
; road/curb
dw (320*000)+(16*10)
; road/curb
dw (320*000)+(16*11)
; road/curb
dw (320*000)+(16*12)
; road/curb
dw (320*000)+(16*13)
; road/curb
dw (320*000)+(16*14)
; grass/curb
dw (320*000)+(16*15)
; grass/curb
dw (320*000)+(16*16)
; grass/curb
dw (320*000)+(16*17)
; grass/curb
dw (320*000)+(16*18)
; water
dw (320*000)+(16*19)
; water/grass
dw (320*014)+(16*00)
; water/grass
dw (320*014)+(16*01)
; tree
dw (320*014)+(16*02)
; tree
dw (320*014)+(16*03)
; tree
dw (320*014)+(16*04)
; tree
dw (320*014)+(16*05)
; finish line
dw (320*014)+(16*06)
; finish line
dw (320*014)+(16*07)
; finish line
dw (320*014)+(16*08)
; puddle
dw (320*014)+(16*09)
dw (320*014)+(16*10)
dw (320*014)+(16*11)
dw (320*129)+(16*00)
; digit 0
dw (320*129)+(16*01)
; digit 1
dw (320*129)+(16*02)
; digit 2
dw (320*129)+(16*03)
; digit 3
dw (320*129)+(16*04)
; digit 4
dw (320*129)+(16*05)
; digit 5
dw (320*129)+(16*06)
; digit 6
dw (320*129)+(16*07)
; digit 7
dw (320*129)+(16*08)
; digit 8
dw (320*129)+(16*09)
; digit 9
dw (320*129)+(16*10)
; exit tile
dw (320*129)+(16*11)
; save tile
dw (320*129)+(16*12)
; 'G' tile
dw (320*129)+(16*13)
; '0' tile
dw (320*28)+(16*0)
dw (320*28)+(16*1)
; '291 Pro-Am'
dw (320*28)+(16*2)
dw (320*28)+(16*3)
dw (320*28)+(16*4)
dw (320*28)+(16*5)
dw (320*28)+(16*6)
dw (320*28)+(16*7)
dw (320*28)+(16*8)
dw (320*28)+(16*9)
dw (320*28)+(16*10)
dw (320*28)+(16*11)
dw (320*28)+(16*12)
dw (320*28)+(16*13)
dw (320*42)+(16*0)
dw (320*42)+(16*1)
; '291 Pro-Am'
dw (320*42)+(16*2)
dw (320*42)+(16*3)
dw (320*42)+(16*4)
dw (320*42)+(16*5)
dw (320*42)+(16*6)
dw (320*42)+(16*7)
dw (320*42)+(16*8)
dw (320*42)+(16*9)
dw (320*42)+(16*10)
dw (320*42)+(16*11)
dw (320*42)+(16*12)
dw (320*42)+(16*13)
dw (320*56)+(16*0)
dw (320*56)+(16*1)
; '291 Pro-Am'
dw (320*56)+(16*2)
dw (320*56)+(16*3)
dw (320*56)+(16*4)
dw (320*56)+(16*5)
dw (320*56)+(16*6)
dw (320*56)+(16*7)
dw (320*56)+(16*8)
dw (320*56)+(16*9)
dw (320*56)+(16*10)
dw (320*56)+(16*11)
dw (320*56)+(16*12)
dw (320*56)+(16*13)
dw (320*56)+(16*14)
dw (320*80)+(16*0) ; 'Press
Space Bar'
dw (320*80)+(16*1)
dw (320*80)+(16*2)
dw (320*80)+(16*3)
dw (320*80)+(16*4)
dw (320*80)+(16*5)
dw (320*80)+(16*6)
dw (320*80)+(16*7)
dw (320*80)+(16*8)
dw (320*014)+192 ; turbo
tile
dw (320*014)+208 ; turbo
tile
dw (320*014)+224 ; oil
slick
CarTable dw (320*144)+(32*00)
car in direction 0
dw (320*144)+(32*01)
car in direction 1...
dw (320*144)+(32*02)
dw (320*144)+(32*03)
dw (320*144)+(32*04)
dw (320*144)+(32*05)
dw (320*144)+(32*06)
dw (320*144)+(32*07)
dw (320*172)+(32*00)
dw (320*172)+(32*01)
dw (320*172)+(32*02)
dw (320*172)+(32*03)
dw (320*172)+(32*04)
dw (320*172)+(32*05)
dw (320*172)+(32*06)
dw (320*172)+(32*07)
XCrop dw 0
Value of X for cropping in DrawTile
YCrop dw 0
Value of Y for cropping in DrawTile
EffWidth dw 0
Value for counting width on cropped Tiles
EffHeight dw 0
Value for counting height on cropped Tiles
Map db 4800 dup (1) ; will hold current map
MapFile db
'MapX.map',0 ; X to be filled in later
MapFileOrg db 'MapXOrg.map',0
fileHandle dw
?
XScrLC dw
0 where
to start printing tiles
YScrLC dw
0
MapTileX dw
0 where
tile you are trying to draw
MapTileY dw
0
XCarMap dw
0 where the
car is on the map
YCarMap dw
0
PMXCnt dw
0 count variable
for Print Map
TileSelected db 0
which tile to update map with (editor)
UACount db
0
SMCount db
0
Lap
db 1
which lap the car is on
lapStatus db
0
has car gone over start line?
lapStatus1 db
0
has car passed checkpoints?
NumLapsTable db 3
for map 0
db 3
map 1
db 3
map 2
db 3
map 3
db 3
map 4
db 3
map 5
db 3
map 6
db 3
map 7
db 3
map 8
db 3
map 9
CarMaxSpeed dw
291 impossible speed
dw 291 Nitro
speed
dw 110 MAXSPEED
dw 85
dw 65
dw 50
dw 40
dw 30
dw 20
dw 10
dw 0
MINSPEED
displaySpeed dw 0
nitro
db 9
how many nitros the player has
turbo
db 0
is a player over a turbo strip?
oil
db 0
is a player over an oil strip?
puddle
db 0
is a player over a puddle?
mapNumber db 0
which map is the current map
CurTile
db 0
Procedures:
Sound Functions - Written by
Jon Moeller
DSPRead
InstSBInt
DeInstSBInt
SBIntHandler
LoadSound
PlayWAV
GetSettings Procedure
RegisterXMI
PlaySequenceXMI
StopXMI
ResumeXMI
CheckXMI
PlayXMI
Networking Functions - Written
by Mark Smith
ServerMain
CreditPicture
DrawAnima
DrawRight
MenuPractice
GetMGTSelection
GetPSelection
GetPSelection
MenuGameType
NetMain
Graphics Functions - Written by Preston White
DrawTile
InitBuf
LookAround
CarPerspective
AILocal
DrawTile
DrawScreen
DrawSplash
DrawCar
InstKey
DeInstKey
MyKeyHandler
InstTimer
DeInstTimer
MyTimerHandler
StartMain
InitBotBuf
GetLeftCornter