Explorar o código

Fix example for TI-92+/V200 calculators (thanks Wazabbe).

git-svn-id: file:///var/svn/tigccpp/trunk@42 9552661e-59e3-4036-b4f2-dbe53926924f
kevinkofler %!s(int64=19) %!d(string=hai) anos
pai
achega
299bd206ae
Modificáronse 1 ficheiros con 4 adicións e 3 borrados
  1. 4 3
      tigcc/examples/Bitmap Test.c

+ 4 - 3
tigcc/examples/Bitmap Test.c

@@ -5,6 +5,7 @@
 #define USE_V200              // Compile for V200
 
 #define OPTIMIZE_ROM_CALLS    // Use ROM Call Optimization
+
 #define MIN_AMS 100           // Compile for AMS 1.00 or higher
 
 #include <tigcclib.h>         // Include All Header Files
@@ -12,12 +13,12 @@
 // Main Function
 void _main(void)
 {
-  SCR_RECT full_screen = {{0, 0, 159, 99}};
-  char buffer [BITMAP_HDR_SIZE + 160*100/8]; // or 2004 if you like it more
+  SCR_RECT full_screen = {{0, 0, LCD_WIDTH - 1, LCD_HEIGHT - 1}};
+  char buffer [BITMAP_HDR_SIZE + LCD_WIDTH*LCD_HEIGHT/8]; // or 2004 for a TI-89 and 3844 for a TI-92+/V200 if you like it more
   BitmapGet (&full_screen, buffer);          // store screen in buffer
   clrscr ();
   printf ("Press any key to\nrestore screen...");
   ngetchx ();
   BitmapPut (0, 0, buffer, &full_screen, A_REPLACE);
   ngetchx ();
-}
+}