/*FILE HEADER**************************************************************
 *
 *  File name		: $Id$
 *  RCS Revision Number	: $Revision: 1.1 $
 *  Last Modified	: $Date: 94/10/28 09:23:29 $
 *  CSCI name		: Real-Time Graphics System - Applications Interface
 *  CSC name		: All functions
 *  Notes:
 *      This file contains code used to debug and test the SVME-770 RTGS.
 *      This code is provided as an example of how to call the RTGS functions
 *      from a host application.
 *  History		:
 *      Created 94/01/17 by Jeff Sanderson
 *
 *END FILE HEADER*********************************************************/

#include "dy4std.h"
#include "es.h"
#include "css.h"

#include "rtgs_ai.h"
#include "video.h"
#include "colours.h"

#include "test.h"


void test_colourrep( void );
/*-----------------------------------------------------------------------*/

void test_colourrep( void )
{
    int i, j, k;
    int x, y; 

    init( "Colour representation test" );

    i = 0;
    for( y = 0; y <= ( RES_Y - ( RES_Y / 16 )); y += (RES_Y / 16) )
    {
	for( x = 0; x <= ( RES_X - ( RES_X / 16 )); x += (RES_X / 16) )
        {
            Set_foreground_colour( i++ );
            Draw_filled_rectangle(x,y,(x + (RES_X /16)),(y + (RES_Y /16)));
	}
    }

    x = 0;
    Set_foreground_colour( 1 );
    Printf("Calling set colour rep\n");
    for( i = 0 ; i < 0xff ; i += 0x4 )
    {
        for( j = 0 ; j < 0xff ; j += 0x4 )
        {
            for( k = 0 ; k < 0xff ; k += 0x4 )
            {
                Set_colour_representation(0, ( x++ % 0x100), i, j, k );
            }
        }
    }
}

/*-----------------------------------------------------------------------*/
