Author: krazylegodrummer56
Posted: 10 Jan 2013 12:22:36 am (GMT -5)
If I press F1 nothing happens and I don't know why.
Code:
_________________
Projects: Learn how to program in Prizm C
I got a new Classpad!!!
![]()
![]()
![]()
![]()
![]()
![]()
Posted: 10 Jan 2013 12:22:36 am (GMT -5)
If I press F1 nothing happens and I don't know why.
Code:
#include <fxcg/app.h>
#include <fxcg/display.h>
#include <fxcg/file.h>
#include <fxcg/heap.h>
#include <fxcg/keyboard.h>
#include <fxcg/serial.h>
#include <fxcg/system.h>
int PRGM_GetKey(){
unsigned char buffer[12];
PRGM_GetKey_OS( buffer );
return ( buffer[1] & 0x0F ) * 10 + ( ( buffer[2] & 0xF0 ) >> 4 );
}
int main() {
PrintXY(4,1,"--Tic", TEXT_MODE_NORMAL, TEXT_COLOR_RED);
PrintXY(7,1,"-- -", TEXT_MODE_NORMAL, TEXT_COLOR_BLACK);
PrintXY(9,1,"-- Tac", TEXT_MODE_NORMAL, TEXT_COLOR_GREEN);
PrintXY(13,1,"-- -", TEXT_MODE_NORMAL, TEXT_COLOR_BLACK);
PrintXY(15,1,"-- Toe", TEXT_MODE_NORMAL, TEXT_COLOR_BLUE);
PrintXY(7,2,"--(In-Dev.)", TEXT_MODE_NORMAL, TEXT_COLOR_CYAN);
PrintXY(6,4,"--F1: 1 Player", TEXT_MODE_NORMAL, TEXT_COLOR_BLACK);
PrintXY(6,6,"--F2: 2 Players", TEXT_MODE_NORMAL, TEXT_COLOR_BLACK);
int key = PRGM_GetKey();
if(key == KEY_PRGM_F1)
{
PrintXY(4,1,"--Yes it worked!", TEXT_MODE_NORMAL, TEXT_COLOR_RED);
}
while(1)
GetKey(&key);
return 0;
}
_________________
Projects: Learn how to program in Prizm C
I got a new Classpad!!!




