#ifdef __WIN32__
#include <windows.h>
#endif
#include <time.h>

#include "PowerPak/powerpak.h"
#include "PowerPak/powerdraw.h"

main(int argc, char *argv[])
{
   time_t time1, time2;
   int x;

   /* Initialize the library */
   PP_Init();
   PD_Init();

   /* Initialize 640x480x16bpp graphics mode */
   PD_SetGFXMode(640, 480, 16, PD_DEFAULT);

   /* Start timer */
   time(&time1);

   /* move the circle across the screen */
   for (x = 0; x < 640; x += 2){
      PD_ClearSurface(DoubleBuffer, PD_CreateColor(Screen, 0x00, 0x00, 0x00));
      PD_RectFilled(DoubleBuffer, x, 230, x+10, 250, PD_CreateColor(DoubleBuffer, 0xFF, 0x00, 0x00));
      PD_ShowDoubleBuffer();
   }

   /* Stop Timer */
   time(&time2);
  
   fprintf(stderr,"fps = %d\n", 320/(time2-time1));

   /* Cleanup */
   PD_Quit();
   PP_Quit();
}
