/*
    box display
                      1993.6.27 v1.0
                      copyright Y.Ouchi
		in :sx,sy	start point (left top posision)
			ex,ey	end point (right bottom posision)
			col		display color
			fil		box fill or not flag
*/

#include "egb.h"

extern	char	egbwork[1536];

void box(int sx, int sy, int ex, int ey, int col, int fil)
{
	char para[10];

	EGB_color(egbwork, 0, col);
	EGB_color(egbwork, 2, col);
	if ( fil != 0 ) EGB_paintMode(egbwork, 0x22);
	else EGB_paintMode(egbwork, 0x02);
	WORD(para + 0) = sx;
	WORD(para + 2) = sy;
	WORD(para + 4) = ex;
	WORD(para + 6) = ey;
	EGB_rectangle(egbwork, para);
	return;
}

