Author Topic: Casio Usb Power Graphic 2 SDK Info  (Read 4811 times)

0 Members and 1 Guest are viewing this topic.

Offline helder7

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 185
  • Rating: +33/-1
    • View Profile
Casio Usb Power Graphic 2 SDK Info
« on: January 31, 2012, 07:42:01 pm »
The "IsKeyDown" function in "fx-9860G SDK Libraries" has been deprecated and is now
unsupported in "USB POWER GRAPHIC 2" version of "fx-9860GII(SD)",
"GRAPH75(95)" and "fx-9860G AU PLUS".
Instead of "IsKeyDown", please use "GetKey" or "Bkey_GetKeyWait"(new function)
according to the use cases illustrated below.
The following use cases are only examples, “GetKey” and “Bkey_GetKeyWait” are not
guaranteed to perform identically to “IsKeyDown”.


Case1: Poll key state until a particular key is pressed

・Code example (using "IsKeyDown")
Code: [Select]
while (1){
if (IsKeyDown(KEY_CHAR_0)) break;
}

・Code example (using "GetKey" instead of "IsKeyDown")
Code: [Select]
unsigned int key;
while (1){
GetKey(&key);
if (KEY_CHAR_0 == key) break;
}

Case2: Check to see if a key is pressed (with an optional wait/timeout)
・Code example (using "IsKeyDown")
Code: [Select]
int flag0 = 0;
if (IsKeyDown(KEY_CHAR_0))
flag0 = 1;

・Code example (using "Bkey_GetKeyWait" instead of "IsKeyDown")
Code: [Select]
int kcode1 = 0, kcode2 = 0, flag0 = 0;
short unused = 0;
if (Bkey_GetKeyWait(&kcode1, &kcode2, KEYWAIT_HALTOFF_TIMEROFF, 0,
1, &unused)==KEYREP_KEYEVENT) {
if ((kcode1==7)&&(kcode2==2)) flag0 = 1;
}

All the details in the attached pdf. Perhaps many games/applications will not work on new model fx-9860 USB POWER GRAPHIC 2

Source: Casio
« Last Edit: January 31, 2012, 07:49:10 pm by helder7 »