/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////
////																																										 ////
////																					 																					 ////
////								   - Wmp.cpp -	    														  									 ////
////																					 																					 ////
////																																										 ////
////				Implémentation des fonctions SCOL de l'API WMP          										 ////
////									 Version  1.0									 																		 ////
////																					 																					 ////
////								  Nadège SONNET     																								 ////
////																																										 ////
////																																										 ////
/////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////////////////////


/****************************************************************************
* Defines
*/
/****************************************************************************
* Includes
*/

#include <stdio.h>
#include "../winuser.h"
#include "../cbmachine.h"



#define __cdecl 

#define WMP_BUFFERING 0
#define WMP_CONTACTING 0
#define WMP_ONBEGIN 0
#define WMP_ONPAUSE 0
#define WMP_ONCLOSED 0
#define WMP_ONOPENED 0



//-----------------------------------------------------------------------------
// 
//-----------------------------------------------------------------------------



//fun[Chn S S S] WmpStream
int wmpCreateEx(mmachine m)
{

  MMpull(m);
  MMpull(m);
  MMpull(m);
  MMset(m,0,NIL);
  return 0;
	
}

//fun[Chn S] WmpStream
int wmpCreate(mmachine m)
{

  MMpull(m);
  MMset(m,0,NIL);
  return 0;
  
}

//fun[Chn P] WmpStream
int wmpCreateFromFile(mmachine m)
{
	MMpull(m);
  MMset(m,0,NIL);
  return 0;
}



//fun[WmpStream] I
int wmpDestroy(mmachine m)
{
	MMset(m,0,NIL);	
	return 0;
}


//fun[ObjBitmap WmpStream] ObjBitmap
int wmpBlit(mmachine m)
{

	MMpull(m);
  MMset(m,0,NIL);
	return 0;

}


//fun[WmpStream] I
int wmpIsDone(mmachine m)
{
	
  MMset(m,0,NIL);
	return 0;

}

//fun[WmpStream] I
int wmpPause(mmachine m)
{	
  MMset(m,0,NIL);
	return 0;

}

//fun[WmpStream] I
int wmpPlay(mmachine m)
{
  MMset(m,0,NIL);
	return 0;

}

//fun[WmpStream] I
int wmpStop(mmachine m)
{
  MMset(m,0,NIL);
	return 0;

}



//fun[WmpStream I] I
int wmpSeek (mmachine m)
{
  MMpull(m);
  MMset(m, 0, NIL);
  return 0;
}


//fun[WmpStream] I
int wmpIsSeekable(mmachine m)
{

  MMset(m,0,NIL);
	return 0;


}

//fun[WmpStream I] I
int wmpSetVolume(mmachine m)
{
	MMpull(m);
  MMset(m,0,NIL);
	return 0;

}

//fun[WmpStream I] I
int wmpSetMute(mmachine m)
{
	MMpull(m);
  MMset(m,0,NIL);
	return 0;

}



//fun[WmpStream] I
int wmpGetVolume(mmachine m)
{
  MMset(m, 0, NIL);
  return 0;
}



//fun[WmpStream] I
int wmpGetMute(mmachine m)
{

  MMset(m,0,NIL);
	return 0;
	
}

//fun[WmpStream] [I I]
int wmpGetPosLength(mmachine m)
{

  MMset(m,0,NIL);
	return 0;
	
}


//fun [WmpStream fun [WmpStream u0] u1 u0] WmpStream
int wmpSetCbImage(mmachine m)
{
	MMpull(m);
	MMpull(m);
  MMset(m,0,NIL);
	return 0;

}

//fun [WmpStream fun [WmpStream u0 WmpState] u1 u0] WmpStream
int wmpSetCbState(mmachine m)
{
	MMpull(m);
	MMpull(m);
  MMset(m,0,NIL);
	return 0;  
}





#define NWMPPKG 26


char* WMPname[NWMPPKG]=
{
	"WmpState",
	"WMP_BUFFERING",
	"WMP_CONTACTING",
	"WMP_ONBEGIN",
	"WMP_ONPAUSE",
	"WMP_ONCLOSED",
	"WMP_ONOPENED",
	"WmpStream",
	"wmpCreate",
	"wmpDestroy",
	"wmpBlit",
	"wmpSetCbImage",
	"wmpIsDone",
	"wmpSetCbState",
	"wmpPause",
	"wmpPlay",
	"wmpStop",
	"wmpSeek",
	"wmpIsSeekable",
	"wmpCreateEx",
	"wmpSetVolume",
	"wmpSetMute",
	"wmpGetVolume",
	"wmpGetMute",
	"wmpGetPosLength",
	"wmpCreateFromFile"

	
};

#define bullshit int (__cdecl *)(struct Mmachine *)
int (*WMPfun[NWMPPKG])(mmachine m)=
{
  NULL,//WmpState
	(bullshit)WMP_BUFFERING,//WMP_BUFFERING
	(bullshit)WMP_CONTACTING,//WMP_CONTACTING
	(bullshit)WMP_ONBEGIN,//WMP_ONBEGIN
	(bullshit)WMP_ONPAUSE,//WMP_ONPAUSE
	(bullshit)WMP_ONCLOSED,//WMP_ONCLOSED
	(bullshit)WMP_ONOPENED,//WMP_ONOPENED
	NULL,//WmpStream
	wmpCreate,//wmpCreate
	wmpDestroy,//wmpDestroy
	wmpBlit,//wmpBlit
	wmpSetCbImage,//wmpSetCbImage
	wmpIsDone,//wmpIsDone
	wmpSetCbState,//wmpSetCbState
	wmpPause,//wmpPause
	wmpPlay,//wmpPlay
	wmpStop,//wmpStop
	wmpSeek,//wmpSeek
	wmpIsSeekable,//wmpIsSeekable
	wmpCreateEx,//wmpCreateEx
	wmpSetVolume,//wmpSetVolume
	wmpSetMute,//wmpSetMute
	wmpGetVolume,//wmpGetVolume
	wmpGetMute,//wmpGetMute
	wmpGetPosLength,//wmpGetPosLength
	wmpCreateFromFile//wmpCreateFromFile

};


int WMPnarg[NWMPPKG]=
{
	

	TYPTYPE,//WmpState
	TYPCONS0,//WMP_BUFFERING
	TYPCONS0,//WMP_CONTACTING
	TYPCONS0,//WMP_ONBEGIN
	TYPCONS0,//WMP_ONPAUSE
	TYPCONS0,//WMP_ONCLOSED
	TYPCONS0,//WMP_ONOPENED
	TYPTYPE,//WmpStream
	2,//wmpCreate
	1,//wmpDestroy
	2,//wmpBlit
	3,//wmpSetCbImage
	1,//wmpIsDone
	3,//wmpSetCbState
	1,//wmpPause
	1,//wmpPlay
	1,//wmpStop
	2,//wmpSeek
	1,//wmpIsSeekable
	4,//wmpCreateEx
	2,//wmpSetVolume
	2,//wmpSetMute
	1,//wmpGetVolume
	1,//wmpGetMute
	1,//wmpGetPosLength
	2//wmpCreateFromFile
};


char* WMPtype[NWMPPKG]=
{
	NULL, //WmpState
	"fun [] WmpState",	//WMP_BUFFERING
	"fun [] WmpState",	//WMP_CONTACTING
	"fun [] WmpState",	//WMP_ONBEGIN
	"fun [] WmpState",	//WMP_ONPAUSE	
	"fun [] WmpState",	//WMP_ONCLOSED
	"fun [] WmpState",	//WMP_ONOPENED
	NULL,	//WmpStream
	"fun[Chn S] WmpStream",	//wmpCreate
	"fun[WmpStream] I",	//wmpDestroy
	"fun[ObjBitmap WmpStream] ObjBitmap",	//wmpBlit
	"fun [WmpStream fun [WmpStream u0] u1 u0] WmpStream",	//wmpSetCbImage
	"fun[WmpStream] I",	//wmpIsDone
	"fun [WmpStream fun [WmpStream u0 WmpState] u1 u0] WmpStream",	//wmpSetCbState
	"fun[WmpStream] I",	//wmpPause
	"fun[WmpStream] I",	//wmpPlay
	"fun[WmpStream] I",	//wmpStop
	"fun[WmpStream I] I",	//wmpSeek
	"fun[WmpStream] I",	//wmpIsSeekable
	"fun[Chn S S S] WmpStream",	//wmpCreateEx
	"fun[WmpStream I] I",	//wmpSetVolume
	"fun[WmpStream I] I",	//wmpSetMute
	"fun[WmpStream] I",	//wmpGetVolume
	"fun[WmpStream] I",	//wmpGetMute
	"fun[WmpStream] [I I]",	//wmpGetPosLength
	"fun[Chn P] WmpStream"	//wmpCreateFromFile


};


extern "C" int SCOLloadWMP(mmachine m,cbmachine w)
{
	int k;

	k=PKhardpak(m,"WMP-1.0.pkg",NWMPPKG,WMPname,WMPfun,WMPnarg,WMPtype);

	return 0;
}


