/*
	Namn		:	globdef.c
	Skapad		:	12/07/95
	Senast ändrad	:	05/02/98
	Programmerare	:	Urban Lindeskog
	Organisation	:	ProNotion SoftWare Development Group

	Funktion	:	Defines som kan användas i alla #?.c
	Kommentarer	:
	Att göra	:
*/

#define FORBID	Forbid();
#define PERMIT	Permit();
#define max(x,y) ((x)>=(y)?(x):(y))
#define min(x,y) ((x)<=(y)?(x):(y))
#define IntArg(arg,def) (Args[arg]?(*((ULONG *)(Args[arg]))):(def))
#define StrArg(arg,def) (Args[arg]?((UBYTE *)(Args[arg])):(def))
#define AryArg(arg,def) (Args[arg]?((UBYTE **)(Args[arg])):(def))

#define StrVar(num,def) (StrVarAry[num]?((UBYTE *)(StrVarAry[num])):(def))

#define PUBSCREEN (0)
#define PORTNAME (1)
#define STARTUP (2)
#define NOGUI (3)
#define SETTINGS (4)
#define DEVICE (5)
#define UNIT (6)
#define TOCPATH (7)
#define ICON_NAME (8)
#define ICON_TEXT (9)
#define ICON_X (10)
#define ICON_Y (11)
#define LYRICFONT (12)
#define LFONTSIZE (13)
#define DEBUG (14)

#define DEVNAMELENGTH 256

 //	Förteckning av StrVar:
//
#define SV_BUTTON_0	0	// play prev
#define SV_BUTTON_1	1	// play next
#define SV_BUTTON_2	2	// skip back
#define SV_BUTTON_3	3	// pause
#define SV_BUTTON_4	4	// stop
#define SV_BUTTON_5	5	// pause
#define SV_BUTTON_6	6	// eject
#define SV_IDFILE	7	// TOCPath+ID till text/lyrics-filen
#define SV_TOCPATH	8	// Enbart pathen till TOC-filerna
#define SV_PORTNAME	9	// Arexx-portens namn
#define SV_PUBSCREEN	10	// Namnet på public screen
#define SV_DEVICE	11	// scsi-devicets namn
#define SV_LYRICFONT	12	// Namnet på Lyric-fonten
#define SV_DIGITFONT	13	// Namnet på Lyric-fonten
#define SV_TEXTFONT	14	// Namnet på Lyric-fonten
#define SV_SETFILE	15	// Fullsändiga namnet på settings-filen
#define SV_TEMP		16	// Temporär lagringsplats i LoadSettings()
#define SV_TEMP2	17	// Temporär lagringsplats
#define SV_ACTION_NEWDISC 18	// Kommando som körs när en ny skiva lagts i
#define SV_MAXVAR	19	// Antal Variabler


struct	LyricNode
	{
	struct	Node	Node;
	ULONG		StartBlock;
	ULONG		EndBlock;
	ULONG		NodeSize;
	UBYTE		*IndexName;
	UBYTE		Line[4];
	};

struct	ProgramNode
	{
	struct	Node	Node;
	ULONG		StartBlock;
	ULONG		EndBlock;
	ULONG		Track;
	ULONG		Flags;
	};

struct	BulkWin
	{
	ULONG		Left;
	ULONG		Top;
	ULONG		Width;
	ULONG		Height;
	ULONG		Open;
	UBYTE		*Title;
	struct	Window	*WinPtr;
	};

#define WIN_MAIN 0
#define WIN_LYRIC 1
#define WIN_LYRICED 2
#define WIN_ABOUT 3
#define WIN_DEBUG 4
#define WIN_SETFRQ 5
#define WIN_MACFRC 6

// Compatibility flags
#define COMPAT_ACER 1
#define COMPAT_OLDTOSHIBA 2
#define COMPAT_BTC 4
#define COMPAT_NEC 8

// Status 17 - Playing
// Status 18 - Paused
// Status 19 - Inträffar direkt efter en låt är slut
// Status 21 - Stopped
//
#define CDSTAT_LIMBO 0
#define CDSTAT_EJECTED 0
#define CDSTAT_PLAYING 17
#define CDSTAT_PAUSED 18
#define CDSTAT_CHANGE 19
#define CDSTAT_STOPPED 21

