Hi, it's me again.
I'm having a problem with dbMakeImageFromMemblock() and using a color key. Basically, if an image is created by using this function, the dbSetImageColorKey() function doesn't seem to work. The code below generates an image which is a white box with a grey bar across it. The color key is set to grey but when the sprite is displayed, so is the grey bar where I was expecting to see the background.
#include "DarkGDK.h"
void DarkGDK(void)
{
dbSyncOn();
dbSyncRate(60);
dbDisableEscapeKey();
dbMakeMemblock(1,12+(64*64*4));
dbWriteMemblockDword(1,0,64);
dbWriteMemblockDword(1,4,64);
dbWriteMemblockDword(1,8,32);
for (int i=0;i<16384;i+=4) {
dbWriteMemblockByte(1,i+12,255);
dbWriteMemblockByte(1,i+13,0);
dbWriteMemblockByte(1,i+14,255);
dbWriteMemblockByte(1,i+15,255);
}
for (int i=2048;i<4096;i+=4) {
dbWriteMemblockByte(1,i+12,128);
dbWriteMemblockByte(1,i+13,128);
dbWriteMemblockByte(1,i+14,128);
dbWriteMemblockByte(1,i+15,255);
}
dbSetImageColorKey(128,128,128);
dbMakeImageFromMemblock(1,1);
dbSprite(1,100,100,1);
while (LoopGDK())
{
if(dbEscapeKey())
break;
dbSync();
}
}
Any thoughts on this?
Of all the things I've lost .. I miss my marbles most of all.