home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1994 #1
/
monster.zip
/
monster
/
PROG_GEN
/
FACETV.ZIP
/
KORBUTT.CPP
< prev
next >
Wrap
C/C++ Source or Header
|
1994-01-05
|
2KB
|
63 lines
/************************************************************************
**
** @(#)korbutt.cpp 01/05/94 Chris Ahlstrom
**
** This module interfaces C++ with code for handling various kinds
** of button devices; the substrate is Borland's Turbo Vision.
**
*************************************************************************/
#define KORBUTT_cpp
#include <conio.h> // inp() declaration
#include "korbutt.h" // KoalaResponseButton class
/************************************************************************
** KoalaResponseButton constructor
*************************************************************************/
KoalaResponseButton::KoalaResponseButton ()
:
ResponseButton(KOALA_RESPONSE)
{
}
KoalaResponseButton::~KoalaResponseButton ()
{
}
/************************************************************************
** readKey() override
**
** Function to read the Koala-pad buttons.
**
** See the Response typedef in rbuttons.h.
**
*************************************************************************/
int
KoalaResponseButton::readKey ()
{
int button = (int) NO_BUTTON;
button = (int) inp(GAME_PORT); // check game port
button = BOTH_BUTTONS - ((button>>4) % 4);
return button;
}
/************************************************************************
** waitKey()
** checkAbort()
** getLastResponse()
**
** These functions don't need overriding.
**
*************************************************************************/