Just to make things more readable...
//Using those new coordinates, place the blocks on GRID[][]GRID[y1][x1] = 1;GRID[y2][x2] = 1;GRID[y3][x3] = 1;GRID[y4][x4] = 1;//////////////////////////////////////////////////////////////////void Render()//////////////////////////////////////////////////////////////////{ if(bTitleScreen) { //Blit the titlescreen to the back buffer lpDDSBack->BltFast(0,0,lpTitle_surf,NULL,DDBLTFAST_WAIT); } else { //Blit the playing surface to the back buffer lpDDSBack->BltFast(0,0,lpPlayWindow_surf,NULL,DDBLTFAST_WAIT); //Blit each block to the back buffer for(int i = 0; i < HEIGHT; i++) { for(int j = 0; j < WIDTH; j++) { if(GRID[j] == 1) lpDDSBack->BltFast(41+j*30,41+i*30,lpBlock_surf,NULL,DDBLTFAST_WAIT); } } }//flip to the primary surfacelpDDSPrimary->Flip(0,DDFLIP_WAIT);}
valg3, are you able to pinpoint a specific line(s) of code that gives you
an error ? You mentioned that the program "blinks in and out once" without doing anything...so there's no GPF or anything, right? It just doesn't do anything. Sounds like some test (e.g. comparison) is failing when the array is initialized to zeroes and the rendering loops are being skipped.
Edited by - Graylien on June 6, 2000 12:26:36 AM
------When thirsty for life, drink whisky. When thirsty for water, add ice.