You can use VK_LEFT etc./.. here VK stands for virtual key.. With this you can even get inputs like ctrl + some key etc etc...
You can use VK_LEFT etc./.. here VK stands for virtual key.. With this you can even get inputs like ctrl + some key etc etc...
none of thta makes much sense to me.
how can i find out if the user pressed the UP arrow key if it has the same ASCII value as one of the letters?
AOL: GrNxxDaY
IDE: Dev-C++ Beta 5 (v4.9.4.1)
Project: Eye of Sahjz (text-RPG)
If you think I may need help, please IM me.
Are you making a Windows API app, or a console-based app? I have no clue if you're making a console-based app, but for Windows I think each key has a unique virtual-key code.
Just Google It. √
(\ /)
( . .)
c(")(") This is bunny. Copy and paste bunny into your signature to help him gain world domination.
Very nice game but I believe the name of the game is in copyright violation.
Error in game play.
The pieces that look like this:
Code:XXXX X XXXX
can be turned in an improper direction. In Tetris this is 2 peices. In your game it is 1 peice that can be played in 2 ways. This makes your game much too easy.
This should be a seperate peice.
I think you could implement this with little difficulty.Code:XXXX X XXXX
Best Regards,
Bonkey
Yea it is actually, it can't be a following blocks game with the name 'trisOriginally posted by Disguised
Very nice game but I believe the name of the game is in copyright violation.
I don't care though, I'm not working on it anymore, it was an experiment really
(yes, I am d00b, I re-registered)
hey, umm, you know in your code where there's something like this:
that's in cgamematrix.hCode:// Do the search // I tried, and I tried to get this to work in a loop but couldn't so I gave up and did this int blank_line = 0; for (int row = line-2; row > 0; row--) if (!gmatrix[row][0] && !gmatrix[row][1] && !gmatrix[row][2] && !gmatrix[row][3] && !gmatrix[row][4] && !gmatrix[row][5] && !gmatrix[row][6] && !gmatrix[row][7] && !gmatrix[row][8] && !gmatrix[row][9] && !gmatrix[row][10] && !gmatrix[row][11] && !gmatrix[row][12] && !gmatrix[row][13] && !gmatrix[row][14] && !gmatrix[row][15] && !gmatrix[row][16] && !gmatrix[row][17] && !gmatrix[row][18] && !gmatrix[row][19] && !gmatrix[row][20] && !gmatrix[row][21] && !gmatrix[row][22] && !gmatrix[row][23] && !gmatrix[row][24] && !gmatrix[row][25] && !gmatrix[row][26] && !gmatrix[row][27] && !gmatrix[row][28] && !gmatrix[row][29] && !gmatrix[row][30] && !gmatrix[row][31] && !gmatrix[row][32] && !gmatrix[row][33] && !gmatrix[row][34] && !gmatrix[row][35] && !gmatrix[row][36] && !gmatrix[row][37] && !gmatrix[row][38] && !gmatrix[row][39] && !gmatrix[row][40] && !gmatrix[row][41] && !gmatrix[row][42] && !gmatrix[row][43]) { blank_line = row; break; } // Put the walls back
You can EASILY shorten that up with a for loop
this is how you'd do it:
that theoretically works, I haven't tried compiling itCode:// Do the search // I tried, and I tried to get this to work in a loop but couldn't so I gave up and did this int blank_line = 0; bool goahead; //Add this as a "trigger" for (int row = line-2; row > 0; row--) {//proper coding to have brackets on your blocks of code :) goahead=true; //Got to reset the trigger each time for(int a=0;a<44;a++) { if(gmatrix[row] [a]) goahead=false; } if(goahead) { blank_line = row; break; } } // Put the walls back
Last edited by jverkoey; 02-16-2003 at 12:30 PM.
the reason it has the same value is because when you do getch(); you have to do it twice, here is the code is used back when I was developing in Dos consoles:Originally posted by GrNxxDaY
none of thta makes much sense to me.
how can i find out if the user pressed the UP arrow key if it has the same ASCII value as one of the letters?
and you can see which key the user pressed that way....k? I didn't do any testing for the keys, because I forgot which key was which, heheCode:int a=getch(); cout << a << endl; if(a==224) //224 means the arrow keys and some other stuff { int b=getch(); cout << b << endl; }
hope that helps
-EDIT-
lmao, the rest of you guys really know how to confuse a noob, lol
Last edited by jverkoey; 02-16-2003 at 12:36 PM.
Yep, It worked first time flawlessly on my XP machine, and it is good.
Liked it.
Such is life.