I Create 4 colours blue, yellow, green, red then made 4 boxes to get 4 colours image but it seems that only the blue colour gets accepted and no other one.
// Project: sprites
// Created: 2015-02-02
// set window properties
SetWindowTitle( "sprites" )
SetWindowSize( 1024, 768, 0 )
// set display properties
SetVirtualResolution( 1024, 768 )
_Blue = MakeColor(0,0,175)
_Yellow = MakeColor(175,175,0)
_Green = MakeColor(0,175,0)
_Red = MakeCOlor(175,0,0)
swap()
DrawBox(0,0,255,63,_Blue, _Blue, _Blue, _Blue, 1)
DrawBox(0,64,255,127,_Yellow, _Yellow, _Yellow, _Yellow, 1)
DrawBox(0,128,255,191,_Green, _Green, _Green, _Green, 1)
DrawBox(0,192,255,255,_Red, _Red, _Red, _Red, 1)
Render()
SpriteNo = GetImage(0,0,256,256)
ClearScreen()
_Sprite(SpriteNo, SpriteNo, 512,384,256, 0,0,175,255)
SetClearColor(75,75,75)
do
DrawBox(0,0,255,63,_Blue, _Blue, _Blue, _Blue, 1)
DrawBox(0,64,255,127,_Yellow, _Yellow, _Yellow, _Yellow, 1)
DrawBox(0,128,255,191,_Green, _Green, _Green, _Green, 1)
DrawBox(0,192,255,255,_Red, _Red, _Red, _Red, 1)
Sync()
loop
function _Sprite(num, img, x#, y#, size#, Cr, Cg, Cb, Ca)
CreateSprite(num, img)
SetSpritePositionByOffset(num, x#, y#)
SetSpriteColor(num, Cr, Cg, Cb, Ca)
setSpriteSize(num, size#, size#)
Endfunction