Hello.
I have this code:
#include "DarkGDK.h"
void CreateImage();
void DarkGDK ( void )
{
dbSyncOn ( );
dbSyncRate ( 60 );
CreateImage();
while ( LoopGDK ( ) )
{
dbSync ( );
}
return;
}
void CreateImage()
{
int iImageWidth = 10;
int iImageHeight = 9;
int iImageDepth = 32;
int iMemblockNumber = 1;
int iImageNumber = 1;
dbMakeMemblock(iMemblockNumber,12 + (iImageWidth*iImageHeight));
dbWriteMemblockByte(iMemblockNumber,0,iImageWidth);
dbWriteMemblockByte(iMemblockNumber,4,iImageHeight);
dbWriteMemblockByte(iMemblockNumber,8,iImageDepth);
for(int i=1;i<= (iImageWidth*iImageHeight);i++)
{
dbWriteMemblockByte(iMemblockNumber,12 + (i-1)*4,0); //B
dbWriteMemblockByte(iMemblockNumber,13 + (i-1)*4,0); //G
dbWriteMemblockByte(iMemblockNumber,14 + (i-1)*4,255);//R
dbWriteMemblockByte(iMemblockNumber,15 + (i-1)*4,255);//A
}
dbMakeImageFromMemblock(iImageNumber,iMemblockNumber);
dbPasteImage(iImageNumber,10,10);
}
Is fairly simple,it just creates a memblock,fill it with a RGBA color (red in this case) and then make an image with that memblock...
The issue is that its not working,it doesnt fill the entire image only the half or less.
Do you guys can find were i messing the code ?
Thank guys.