I am still trying to resolve issues with some of the memblock commands.
I can't get this command to work:
dbMakeImageFromMemblock
I am confused about how to use the data bits properly.
And I can't seem to get anything into the image.
As if the memblock is empty when I convert it.
I paste the image on screen and nothing.
#include "DarkGDK.h"
void DarkGDK ( void )
{
//dbSetWindowOff( );
dbSetDisplayModeEx ( 800, 600, 32 );
dbHideMouse( );
dbSyncOn ( );
dbSyncRate ( 0 );
dbDisableEscapeKey ( );
dbRandomize ( dbTimer ( ) );
dbMakeMemblock ( 1 , 262156 );
dbWriteMemblockDWORD (1, 0, 256 );
dbWriteMemblockDWORD (1, 4, 256 );
dbWriteMemblockDWORD (1, 8, 32 );
bool bitch = 0;
int i, j, x, y;
signed long int color;
j = 0;
while ( LoopGDK ( ) )
{
j++;
i = 12;
for (y=0; y<256; y++)
{
for (x=0; x < 256 * 4 ; x++)
{
bitch = 1 - bitch;
dbWriteMemblockByte ( 1 , i , bitch * 255 );
i++;
}
}
if ( dbEscapeKey ( ) )
break;
dbMakeImageFromMemblock ( 1 , 1 );
dbPasteImage ( 1 , 0 , 0 );
//dbCopyMemblock ( 1, 0, 0, dbGetPixelsPointer( ), 1920000 );
dbDot ( j , j , 200);
dbSync ( );
}
return;
What I am planning to do, is get data into memblock, put the data in the memblock on the screen, have an option to save the data.
I want to make functions that generate textures for D DGK games.
Meaning, creating a new texture from scratch.
Please help me.
I have gotten zero results until now.