home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
back2roots/padua
/
padua.7z
/
padua
/
audio
/
streplay33.801.lzh
/
Demos
/
PlayOnce.c
< prev
Wrap
C/C++ Source or Header
|
1991-11-24
|
817b
|
50 lines
/* Play.c
Soundtracker-Player using "STReplay.Library"
by Olli, dem Gr÷▀ten
for Lattice C 5.02
Modified by Jonathan Potter, 24.11.91
*/
#include "streplay.h"
#include <proto/exec.h>
#include <workbench/startup.h>
#include <proto/dos.h>
extern struct WBStartup *WBenchMsg;
struct Library *STReplayBase;
long LoadModule(char *);
void UnloadModule(void);
void PlayOnce(void);
_main(line)
char *line;
{
char *temp;
if(!(STReplayBase=OpenLibrary("streplay.library",33)))
return(20);
if(!WBenchMsg)
{
while(*line!=' '&&*line) line++;
temp=line++;
while(*temp!=10) temp++;
*temp=0;
}
else
{
CurrentDir(WBenchMsg->sm_ArgList[1].wa_Lock);
line=WBenchMsg->sm_ArgList[1].wa_Name;
}
if(LoadModule(line)) UnloadModule();
else PlayOnce();
CloseLibrary(STReplayBase);
return(0);
}