Advertisement
flyingfisch

Untitled

May 15th, 2012
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.03 KB | None | 0 0
  1. #include <display_syscalls.h>
  2. #include <keyboard_syscalls.h>
  3. #include <display_syscalls.h>
  4. #include <keyboard_syscalls.h>
  5. #include <display_syscalls.h>
  6. #include <display.h>
  7. #include <keyboard.hpp>
  8. #include <color.h>
  9. #include <RTC_syscalls.h>
  10. #include <CONVERT_syscalls.h>
  11.  
  12.  
  13.  
  14. int main() {
  15.     int key;
  16.     int value = 1;
  17.     int done = 0;
  18.     char buffer[10];
  19.    
  20.     while(!done) {
  21.         //Bdisp_EnableColor(1);
  22.         //Bdisp_AllClr_VRAM();
  23.         //blackbox test function here
  24.         DirectDrawRectangle( 1, 1, 100, 100, COLOR_BLACK );
  25.         FKey_Display( 1, "TEST" );
  26.  
  27.         /*strcpy(buffer,"  ");
  28.         itoa(value, buffer+2);
  29.         PrintXY( 1, 1, buffer, TEXT_MODE_NORMAL, TEXT_COLOR_BLACK);*/
  30.        
  31.         Bdisp_PutDisp_DD();
  32.         GetKey(&key);
  33.        
  34.         switch(key) {
  35.             case KEY_CTRL_UP:
  36.             value = 1+value;
  37.             break;
  38.            
  39.             case KEY_CTRL_DOWN:
  40.             value = value-1;
  41.             break;
  42.            
  43.             case KEY_CTRL_RIGHT:
  44.             value = value+10;
  45.             break;
  46.            
  47.             case KEY_CTRL_LEFT:
  48.             value = value-10;
  49.             break;
  50.            
  51.             case KEY_CTRL_MENU:
  52.             done = 1;
  53.             break;
  54.         }
  55.        
  56. /*      if(value < 0) {
  57.             value = 0;
  58.         } */
  59.     }
  60.    
  61.  
  62.     return 1;
  63. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement