Source Code
keyboard navigation using C++
#include
#include
#include
#include
void main()
{
int d=DETECT,m;
initgraph(&d,&m,"");
union REGS ii,oo;
int x,y;
x=getmaxx()/2;
y=getmaxy()/2;
while(1)
{
if(kbhit()) //scanning the keyboard hit
{
//interrupt issue to scan the ascii ans scan codes of the key hit
ii.h.ah=0;
int86(22,&ii,&oo);
//if esc key has been pressed
if(oo.h.ah==1)
{
}
//if right key has been pressed
if(oo.h.ah==77)
{
}
//if left key has been pressed
if(oo.h.ah==75)
{
}
//if upper key has been pressed
if(oo.h.ah==72)
{
}
//if lower key has been pressed
if(oo.h.ah==80)
{
}
}//kbhit
}//while 1
}
-
game design team
We have emerged as the leading online community for game development of all levels. Our expertise encases all facets for writing PC , Mobile and Online of 2D and 3D Gaming programming and applications development, for instance by using the latest 3D engines, scripting languages and animation techniques, our experienced and qualified team deals with all kind of requirements, whether it be a beginner's choice or an expert gaming action. Most importantly, we endeavor to offer compelling solution and eminent support to our growing community of prospective players and customers.
Categories:
Subscribe to:
Post Comments (Atom)
0 Response for the "source code keyboard navigation using C++"
Post a Comment