| ECE291 |
Computer Engineering II
|
Spring '98
|
-
You've spent countless nights writing machine problems,
cramming for exams and pulling all-nighters.
-
Well folks, its time to whip some ass . . . so crack
open a cold one, boot up the old CPU and jack in.
Rampage 291 is based on the original arcade
game, Rampage, slightly modified to crave every ECE's natural born instinct,
DESTROY EVERITT LAB.
That's right...you get to smash Everitt Lab
into a smoking pile of rubble.
Team Members:
Jason Edla - game engine and design
Rami Moussa - "AI", player movement, Midi
Timothy Schmitt - Graphics, Intro/Concl., web page
Spencer Patrick - Sound
Description:
Rampage 291 is based on the original arcade game,
Rampage. Rampage 291 will offer 1 or 2 player selection and the opportunity
to crush Everitt Lab. Your choice of various "monsters" can move left and
right along the street, up and down along the building, and deliver devastating
blows. Little helicopters and planes will create enemy fire and destruction
will create electrical and fire disasters, all making your job harder by
draining your character's hit points. Points are scorced based on time,
dealing damage, and items picked up along the way.
Obstacles:
Your critter has a finite life span, which will be
represented by a life bar. Tanks will shoot at your critters and planes
will do bomb runs over the area in attempts to kill the critters attacking
Everitt Lab. There are also other damaging hazzards from Everitt Lab itself.
If your life bar runs out, you're out of the game.
Movement Controls:
The arrow keys control the critter for player#1,
with Right Alt for punch and Right Ctrl for jumping.
For player#2, the E,S,D and F keys control movement,
with Space_bar for punch and N for jump.
Green Street will be in front of Everitt. Critters
can move right or left on Green. If your critter is at the sides of Everitt
and facing the edge, the up arrow will start it climbing the walls. If
you're at the top of Everitt, you may use the appropriate horizontal arrow
key to walk on the roof. Down arrow makes critters climb down. Jump is
using to get your critter off of Everitt when it starts to collapse to
avoid falling damage. When the punch key is used, critters punch in the
direction they were moving last.
THE BACKGROUND
Background The background scenery will be a simple
bitmapped image which will be placed onto the ScreenBuffer first, and buildings,
characters, and bombs, will be placed over it. This will be done each time
the screen is refreshed. The PCX file containing the background scenery
will be decoded to the BackGround Segment, where it will remain unchanged.
Note: moving clouds have been added to the background.
They will be added to the background segment after the background picture
has been added, but at different locations each time the screen is updated,
giving the illusion of moving.
THE BUILDING
**All other whitespace will be filled with 'O' for Open Space.
Building Array
The building will be implemented by an array, of
varying size, in which each character of the array will represent a section
of the building. These characters will correspond to various bitmap textures
for different areas of the buildings outer surface, such as windows, doors,
brick surfaces, etc. This array will change when certain areas of the building
receive damage, and so the corresponding characters will change to represent
"damaged" textures. These damaged textures will be altered versions of
the regular building textures, edited to show the physical damage done
by the players. Also, many parts of the building will have special items,
such as bonus points or increases in health, or even harmful items, such
as live electrical wires or poison. The building textures will change to
show these special items only when that wall area has received sufficient
damage. The building will be drawn according to the array and kept in the
Building Segment where it will be copied to the ScreenBuffer after the
BackGround Segment. The entire screen will actually be represented by the
BuildingArray, with zeros to indicate "blocks" with no building segments.
This will essentially divide up the screen into blocks, with some blocks
being filled in with building segments, and most being skipped over. This
setup ensures buildings of any length and width to be usable by the game,
and drawn based simply on the BuildingArray.
Damaging the Building
As decribed in the previous paragraph, damage to
the building will be shown by replacing the building textures with damaged
replacement textures. The Damage array will have the same dimensions of
the Building Array, however, each "block" will contain an integer indicating
the strength of each part of the building. Each block of the Damage Array
will hold the value indicating the strength of the corresponding block
of the Building array. Each hit to a block will reduce the value of that
block in the respective index of the damage array by one. Checkbuilding
procedure will check the "health" of the building at each screenupdate.
If a block has a damage value of zero, the Building array will be changed
so that that particular index of the Building Array will now hold the "damaged"
version of the same texture. The total damage of the building is found
by summing the totals of the Damage array. If this level is below the predetermined
constant level for that board, CheckBuilding will instruct the program
to halt play and crash the building.
-

Crashing the Building
After the building has received enough damage to
be considered destroyed, and thus the level completed, an animated sequence
will ensue in which the building crumbles to the ground, and the sound
of the building crashing is heard. The level of damage the building has
undergone is kept by an internal variable, as is the total level of damage
that the building can stand. When the building has reached its maximum
level of damage, a procedure will be called to flip through a set of bitmapped
pictures showing the building crumbling. The gameplay is paused at this
point, as players will not be able to move and attacking people (planes,
tanks) will cease to enter the screen. If a player is on the building when
it crashes, the player recieves harm to its health level. The player putting
the finishing blow on the building will receive bonus points.
THE PLAYERS
NOTE: Identical methods will be used for both players.
Up to two players will be able to choose between
several characters in the menu screen. Each character will be represented
by 10 bitmap sprites. Two will be used for walking in both each direction.
Two will be used for climbing in each direction. Two will be used for punching.
This will help in bringing an animated look to all the characters actions.
The player can be moved left and right, jump, punch, and climb up and down.
Each player will have a designated amount of health, indicated by a bar
at the top of the screen, and a score, also at the top. A player loses
health by touching hazards in the building, or being hit by the little
shooters (planes and tanks). A players gains points by damaging the building,
killing shooters, or outlasting the other player. When a player's health
reaches zero, the player is dead, and an animated death sequence will be
called by the program. The other player still continues, and recieves bonus
points for outlasting his contemporary.
MovementProc will be responsible for controlling
most of the players movement, and will call helper functions to accomplish
jumping and climbing. MovementProc will adjust play_x and player_y which
will be used by Draw_Char to draw the player at the new position. MovementProc
will determine the new position by reading the keyboard variables.
Having the players harm each other is one of several
options that will hopefully be implemented, but not guaranteed.
THE SHOOTERS
One of the most challenging aspects of designing
the game will be implementing the shooters, also referred to as enemies
or bombers. The shooters wil be tiny human tanks and bomber planes, continuously
scurrying past the screen and shooting at the players. The tanks will attack
from the ground, and the planes will attack from the sky. If a player is
hit by a shooter, he will lose energy. The player, however, can punch the
shooters for bonus points. The shooters will be implemented by using loops
to have them move across the screen at regular intervalsm, and shoot from
predetermined destinations. Even destroying not stop this process, as new
shooters will be assumed to take their place. Having effective shooters
will be the key to making Rampage 291 a challenging game.
Here are the segments used by the program:
VIDSeg-- has the actual Screen Segment
CldSeg-- Cloud Segment
ScrSeg -- Used by LoadPCX
BGSeg -- background texture
BLDSeg -- building texture
TextSeg -- holds the score and hit points (text)
SBSeg -- ScreenBuffer
FGSeg -- holds the sprites of the various characters
and enemies
FGSeg2 -- buffer for additional sprites
Here are the general variables used by the program:
-
Cloud1spd dw
0 ; variable
to determine speed and location of cloud set 1
-
Cloud2spd dw
0 ; variable
to determine speed and location of cloud set 2
-
-
_BackGrnd dw BGSeg
; Value of Background Segment
-
MapLoc
dw 0 ; Offset
to current map array
-
WorldSize
dw 0 ; Size
of the current map
-
ShiftedBit
db ?
; used to test in keypressed routines
-
DamageNum dw 0
; block number that has been damaged by player
-
Building_Damage dw 0
; total damage of the building, certain values cause the building to show
more damage, and also to crash
-
BlockNum
dw 0 ; used
to keep track of block currently being checked
-
BonusCounter dw 0
; keeps bonus pictures on the screen for a certain amount of time
-
BonusBlockx2 dw 0
; block in which bonus is to be drawn
-
BonusPicx2 dw
0 ; bonus picture
number to draw
-
player1_x dw 0
-
player1_y dw 0
-
player2_x dw 0
-
player2_y dw 0
-
hand1_x dw 0
-
hand1_y dw 0
-
hand2_x dw 0
-
hand2_y dw 0
-
body_block1 dw 0
-
body_block2 dw 0
-
hand_block1 dw 0
-
hand_block2 dw 0
-
JUMP_1 DW 0
-
JUMP_2 DW 0
-
FALL_1 DW 0
-
FALL_2 DW 0
-
JUMPE_1 DW 0
-
JUMPE_2 DW 0
-
DIREC_1 DB 0
-
DIREC_2 DB 0
-
PUNCHING1 DW 0
-
PUNCHING2 DW 0
-
PUNCH1
DW 0
-
PUNCH2
DW 0
-
PUSHED1 DW 0
-
PUSHED2 DW 0
-
EXPLODE_1 DW 0
-
EXPLODE_2 DW 0
-
EXPLODE_H DW 0
-
EXP_HELI DW 0
-
SCORE1 DW 0
-
SCORE2 DW 0
-
HEALTH1 dw 50
-
HEALTH2 dw 50
Keyboard Interrupt Variables
-
ESC_KEY db 0 ; Set to 1 when time
to exit (ESC)
-
ENTER_KEY db 0
-
;PLAYER1
-
RIGHT_ARROW db 0 ; Right Arrow (1 = Button
is down, 0 = Button is up)
-
LEFT_ARROW db 0 ; Left Arrow
-
UP_ARROW db 0 ; Up
Arrow
-
DOWN_ARROW db 0 ; Down Arrow
-
CNTRL_KEY db 0 ; RIGHT Ctrl
JUMP
-
ALT_KEY dw 0
; RIGHT Alt PUNCH
-
OLD_ALT_KEY dw 0
-
;PLAYER2
-
F_KEY
db 0 ; Right Arrow (1 = Button is down, 0 = Button is up)
-
S_KEY
db 0 ; Left Arrow
-
E_KEY
db 0 ; Up Arrow
-
D_KEY
db 0 ; Down Arrow
-
N_KEY
db 0 ; N KEY JUMP
-
B_KEY dw 0 ;
B KEY PUNCH
-
OLD_B_KEY dw 0
-
-
-
-
-
Character dw 0,50,100,150,200,250
dw 16000,16050,16100,16150,16200,16250
dw 32000,32032,32064,32096,32132,32165,32231
dw 38400,38417,38433,38449,38465,38481,38497,38513,38529,38545,38561,38577
dw 44800,44811,44823,44834,44845,44856,44867,44878,44889,44900,44911,44922
Look Up Tables and Arrays
;offset for the pixel locations of the 16x20
blocks
BuildLoc
dw 0,16,32,48,64,80,96,112,128,144,160,176,192,208,224,240,256,272,288,304
dw 6400,6416,6432,6448,6464,6480,6496,6512,6528,6544,6560,6576,6592,6608,6624,6640,
,6672,6688,6704
dw 12800,12816,12832,12848,12864,12880,12896,12912,12928,12944,12960,12976,
12992,13008,13024,13040,13056,13072,13088,13104
dw 19200,19216,19232,19248,19264,19280,19296,19312,19328,19344,19360,
19376,19392,19408,19424,19440,19456,19472,19488,19504
dw 25600,25616,25632,25648,25664,25680,25696,25712,25728,25744,25760,
25776,25792,25808,25824,25840,25856,25872,25888,25904
dw 32000,32016,32032,32048,32064,32080,32096,32112,32128,32144,32160,
32176,32192,32208,32224,32240,32256,32272,32288,32304
dw 38400,38416,38432,38448,38464,38480,38496,38512,38528,38544,38560,
38576,38592,38608,38624,38640,38656,38672,38688,38704
dw 44800,44816,44832,44846,44864,44880,44896,44912,44928,44944,44960,
44976,44992,45008,45024,45040,45056,45072,45088,45104
dw 51200,51216,51232,51248,51264,51280,51296,51312,51328,51344,51360,
51376,51392,51404,51424,51440,51456,51472,51488,51504
dw 57600,57616,57632,57648,57664,57680,57696,57712,57728,57744,57760,
57776,57792,57808,57824,57840,57856,57872,57888,57904
;damage of the particular
blocks
Damage dw 200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200
dw 200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200
dw 200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200
dw 200,200,200,200,200,40,40,40,40,40,40,40,40,40,40,200,200,200,200,200
dw 200,200,200,200,200,40,40,40,40,40,40,40,40,40,40,200,200,200,200,200
dw 200,200,200,200,200,40,40,40,40,40,40,40,40,40,40,200,200,200,200,200
dw 200,200,200,200,200,40,40,40,40,40,40,40,40,40,40,200,200,200,200,200
dw 200,200,200,200,200,40,40,40,40,40,40,40,40,40,40,200,200,200,200,200
dw 200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200
dw 200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200
;checks to see whether the block has been damaged
before and if so, what level damage
DamageFinder dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
;original building array
Original dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
dw 0,0,0,0,0,0B4h,0,0,0,0,0,0,0,0,0B5h,0,0,0,0,0
dw 0,0,0,0,0,1,2,2,2,2,2,2,2,2,3,0,0,0,0,0
dw 0,0,0,0,0,6,5,5,5,5,5,5,5,5,7,0,0,0,0,0
dw 0,0,0,0,0,6,8,8,8,011h,012h,8,8,8,7,0,0,0,0,0
dw 0,0,0,0,0,6,9,9,9,0Fh,010h,9,9,9,7,0,0,0,0,0
dw 0,0,0,0,0,0Bh,0Ah,0Ah,0Ah,0Dh,0Eh,0Ah,0Ah,0Ah,0Ch,0,0,0,0,0
dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
dw 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
;new building array
Building dw 200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200
dw 200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200
dw 200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200
dw 200,200,200,200,200,0,1,2,3,4,5,6,7,8,9,200,200,200,200,200
dw 200,200,200,200,200,20,21,22,23,24,25,26,27,28,29,200,200,200,200,200
dw 200,200,200,200,200,40,41,42,43,44,45,46,47,48,49,200,200,200,200,200
dw 200,200,200,200,200,60,61,62,63,64,65,66,67,68,69,200,200,200,200,200
dw 200,200,200,200,200,80,81,82,83,84,85,86,87,88,89,200,200,200,200,200
dw 200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200
dw 200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200
;location of bonus prizes
Bonus dw 200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200
dw 200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200
dw 200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200
dw 200,200,200,200,200,001,200,200,200,200,200,200,200,200,002,200,200,200,200,200
dw 200,200,200,200,200,01,200,200,200,200,200,200,200,200,2,200,200,200,200,200
dw 200,200,200,200,200,01,200,200,200,200,200,200,200,200,2,200,200,200,200,200
dw 200,200,200,200,200,00,200,200,200,200,200,200,200,200,2,200,200,200,200,200
dw 200,200,200,200,200,00,200,200,200,200,200,200,200,200,2,200,200,200,200,200
dw 200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200
dw 200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200,200
BonusPicArray dw 320*(199-20),
320*(199-20)+16,320*(199-20)+32,320*(199-20)+48,320*(199-20)+64
; 1=food , 2=prize,
, 3=poison
Game Procedures:
SetupUpGameData
-
Purpose: Loads Background and Foreground Segments
and sets initial player positions
-
Inputs: player*_x, player*P_y, players
-
Outputs: sets up game data
-
Notes: This subroutine is called after the
intro and before the main game engine loop
-
Calls: LoadBackground, LoadForeground, LoadBldSeg,
LoadTextSeg
Inst_Key
-
Purpose: Install a key interrupt handler for
the game play
-
Inputs: Via Dos interrupts, the pointer to
the original handler
-
Outputs: Places the KEY_HANDLER function pointer
in the interrupt table. Also saves the old function pointer to OLD_KEY_OFFSET,
OLD_KEY_SEG
My_Inst_Key
-
Purpose: Handles the key detection for game
play
-
Inputs: ENTER_KEY, ESC_KEY, UP_ARROW, DOWN_ARROW,
RIGHT_ARROW, LEFT_ARROW, S_KEY, D_KEY, F_KEY, E_KEY, SPACE_BAR, N_KEY,
ALT_KEY, CTRL_KEY
-
Outputs: These variables are adjusted appropriately
Deinstall_Key
-
Purpose: Removes the custom key handler fxn.
pointer from the Vector table and restores the old one.
-
Inputs: OLD_KEY_OFFSET OLD_KEY_SEG
-
Outputs: Restores old handler to table.Update_Stats
Update_Stats
-
Purpose: Change each player's statistics on
the screen
-
Inputs: Player1_life, Player1_score, Player2_life,
Player2_score, SBSEG
-
Outputs: Screen statistics for each player
are changed.
ShowScreenBuffer
-
Purpose: Load the Screen Buffer to the Video
Buffer
-
Inputs: SBSeg, VIDSeg
-
Outputs: VIDSeg=SBSeg
-
Notes: This function loads the final product
onto the screens.
Load_Cloud
-
Purpose: To load cloud PCX file to the BGSeg.
-
Inputs: cloud PCX file
-
Outputs: BGSeg now contains cloud PCX file
Draw_Cloud
-
Purpose: To draw the clouds at a particular
location on the screen producing the affect of animation.
-
Inputs: none
-
Outputs: clouds at particular location
Draw_Char
Purpose: Draw a character at a particular
X and Y position
Inputs: player1_x, player1_y
Outputs: The character(s) is drawn to the
ForeGround Buffer with the correct position
Draw_Char2
Purpose: Draw a character at a particular
X and Y position
Inputs: player1_x, player1_y
Outputs: The character(s) is drawn to the
ForeGround Buffer with the correct position
Draw_Shooter
-
Purpose: Draw an enemy at a particular X and
Y position
-
Inputs: enemy*_x, enemy*_y
-
Outputs: The enemy is drawn to the ForeGround
Buffer with the correct position
-
Calls: Draw_Fire
Draw_Fire
-
Purpose: Draw a bullet being fired at a position
Bullet_X
-
Inputs: bullets*_x, bullets*_y
-
Outputs: The bullet is displayed on the screen.
-
Notes: this funcition is called by Draw_Enemy
DrawBackground
-
Purpose: moves the background bitmap from
the BGSeg to the ScreenBuffer
-
Inputs: BGSeg
-
Outputs: ScreenBuffer
DrawBuilding
-
Purpose: assembles the building on the screen
buffer based upon the setup in Building Array
-
Inputs: BuildSeg, Building array
-
Outputs: ScreenBuffer
DrawStats
-
Purpose: draws the players' current health
and scores at the top of the screen
-
Inputs: player1_life, player1_score, player2_life,
player2_score
-
Outputs: ScreenBuffer
Draw_Intro
-
Pupose: To handle the introduction of the
program
-
Inputs: All segments
-
Outputs: puts out graphics and sounds
-
Calls: StartMidi, LoadBackground, LoadForeground/2,
LoadText, Delay
DrawConcl
Purpose: To handle the conclusion of the program
Inputs: All segments
Outputs: displays a closing sequence
Calls: Delay
LoadPCX
-
Purpose: Loads and decodes a 320x200 PCX file
into memory and sets VGA Palette registers to those used by the image.
-
Inputs: ax - number of PCX file to load
-
Outputs: none
ShowScreenBuffer
-
Purpose: Move 320x200 pixels of screen data
from ScreenBuffer to the screen. Then it clears the ScreenBuffer.
-
Inputs: none
-
Outputs: none
MovementProc
-
Purpose: Checks the requested movement made
by the keys pressed and changes the x and y positions of the two players.
-
Inputs: Keyboard variables, player*_x, player*_y
-
Outputs: Modified player*_x, player*_y
-
Calls: WorldValue, Player_Jump (if applical)
-
Notes: the routine will perform special procedures
to process a jump command
WorldValue
-
Purpose: takes values of x-position and y-position
and checks the textures of the corresponding position in the WorldArray.
-
Inputs: the x and y position of the player(s),
WorldArray(s)
-
Outputs: Climb_Mov
Move_Enemy
-
Purpose: to move the x and y position of each
of the enemies on the screen
-
Inputs: enemy*_x, enemy*_y
-
Outputs: enemy*_x, enemy*_y
-
Notes: this routine is fairly straightforward,
no special "ai" will be implemented, just set procedures.
Player_Jump
-
Purpose: change the x and y positions of the
character for the jump command
-
Inputs: player*_x, player*_y
-
Outputs: modified player*_x, player*_y positions
CheckBuilding
-
Purpose: to check the status of each block
of the building array and change the array if required to do so by the
Damage array. Also to calculate the BldHealth variable, which is the total
health of the building and crash the building and end the level if the
health level is low enough.
-
Inputs: Damage array, Building Array
-
Outputs: Building Array, BldHealth variable
-
Calls: CheckDamage
CheckDamage
-
Purpose: to check whether or not the building
should reflect damage.
-
Inputs: none
-
Outputs: a change to the block pointer which
constructs the building (if damage is needed)
-
Calls: none
DrawNaked
-
Purpose: to run an animated routine for a
player that has died
-
Input: AX = player that has died, 1 or 2
-
Output: video sequence
Destroy Building
-
Purpose: to run the animated sequence in which
the building crashes, and the level ends.
-
Inputs: none
-
Outputs: none
-
Calls: DrawSmoke
Draw_Smoke
-
Purpose: to draw smoke at the foot of the
building during destruction.
-
Inputs: TextSeg
-
Outputs: smoke pcx
-
Calls: none
LoadMidi
-
Purpose: Load a Midi file
-
Inputs:
-
AX - Segment were sound is to be held in memory.
-
DI - Offset to memory location for sound storage.
-
CX - Length of sound to loaded.
-
DX - Offset to string with filename.
-
Outputs: none
-
Description: This function uses the DOS file
command to read from a specified file and load it into a specified memory
segment that contains only sound files.
RegisterXMIDI
-
Purpose: Registers XMIDI data.
-
Inputs:
-
ES - Segment address of SoundSeg.
-
SI - Offset of selected midi file.
-
Outputs: none
-
Description: This function stores the XMIDI
data to be played in Midpak's interal buffer by using the midipak driver
function 704h on INT 66h.
PlaySequence
-
Purpose: Play the currently registered midi
file.
-
Inputs:
-
ES - Segment address of SoundSeg
-
SI - Offset of selected midi file
-
Outputs: sound (midi file)
-
Description: This function starts the playing
of a selected midi file by using the midipak driver on INT 66h.
StopMidi
-
Purpose: Stops the currently playing xmidi
file.
-
Description: This function stops the playing
of the current xmidi data by use of Midpak's function 705h on INT 66h.
PlaySound
-
Purpose: Play a selected sound effect.
-
Inputs:
-
AX - Sound segment where sound data is stored
-
BX - Offset to selected sound data
-
DX - Length of the sound data to be played
-
SI - Offset of SOUND structure used by Digpak
-
Outputs: sound (wave file)
-
Description: This function first normalizes
the offset and segment of the sound effect to be played to point to the
boundary of a page in memory. This is done because Digpak uses the DMA
controller which requires the data to begin at the start of a page in memory.
Then the function "Massages" the audio data for hardware output by use
of Digpak's function 68Ah on INT 66h. Finally the fucntion plays the specified
sound effect by using Digipak's function 68Bh on INT 66h.
Last Modified On: Fri May 1 3:00:10 CDT 1998