#include <shinobi.h>
#include <kamui2.h>
#include <km2util.h>
#include <string.h>
#include "dispstrex.h"
#include "command.h"
#include "filename.h"
#include "filesys.h"
#include "ctype.h"

int BGID = -1;
int BGLOOP = 0;

extern KMSURFACEDESC gTextureList[];
extern void Invalidate(void);
/*----------------------------------------------------------------------------------*/
void BgCommand(int argc, char *argv[])
{
	int id;
	if (argc==1) {
		PRINTOUT(("bg <texture id> [-l]\n"));
		return;
	}
	BGID = atoi( argv[1] );
	BGLOOP = 0;
	if (strcmp(argv[2],"-l")==0) BGLOOP=1;

	Invalidate();
}
/*----------------------------------------------------------------------------------*/
void InitBgCommand(void)
{
	RegisterCommand(BgCommand, NULL, NULL, "bg", PROCESSTYPE_WO_DRAW);
}
/*----------------------------------------------------------------------------------*/