File: EXAMPLE.C | Size: 634 bytes | Download file | Back to directory listing | BWPOW's homepage
#include <allegro.h>
#include "dpslib.h"
 
void end()
{
  allegro_exit();
  exit(1);
}
 
int main(void)
{
  allegro_init();
  install_timer();
  install_keyboard();
 
  install_sound(-1,0,0);
 
  printf("Loading DPS ... ");
 
  if(load_dps_stream("example.dps",1)==FALSE){
    printf("Error, maybe you have forgotten to copy example file!\n");
    end();
  }
 
  printf("OK\n");
 
  printf("Looping DPS, press Enter to stop\n");
 
  while(!key[KEY_ENTER]) poll_dps();
 
  printf("Unloading DPS stream and exiting!\n");
  unload_dps_stream();
 
  allegro_message("a");
 
  end();
  return 0;
}
END_OF_MAIN();