//----------------------------------------------------------------------------
//
//                            E L I T E G R O U P
//                             we are very good.
//
// MXMPlay/Win32 v0.9 (based on MXMPlay 1.6)
// done and (C) The Artist Formerly Known As Doctor Roole in 1999
//
// -> Example source for use with Watcom C/C++
//
//----------------------------------------------------------------------------

#define WIN32_LEAN_AND_MEAN

#include <stdio.h>
#include <conio.h>
#include <windows.h>
#include "mxmplay.h"
#include "dsio.h"

extern char mxmfile[];

// it's just simple:

void main()
{

  // init DSound player and MXMPlay
  ds_init(GetForegroundWindow(),mxmfile);

  // start playing
  xmpPlay(5);

  // suck around
  printf("playing...\n");
  while (!kbhit())
  {
      unsigned short pos;
      __asm {
          call xmpGetPos;
          mov   [pos],ax;
      }

    printf("0x%04X\r",pos);    
  }
  getch();


  // stop playing
  xmpStop();

  // deinit system
  ds_close();

  printf("we are very good.\n");
}
