   Help on Tetris (very early stage) sdl
  What i have so far is a square block that drops (user can move it left or right), and the Next block shows up (up top motion less).Two questions 1# How should i blit the first block that has reached the bottom so it doesnt get erased.2nd Question: How can i change the focus from the first block to the next block waiting. Id like to do it with this command"->" (which i dont understand that well) if you can tell me the type (BLOCK is "struct entity") i would use and maybe a small example. please ;-)// draw and move first block, show next blockvoid DrawBlock(){SDL_BlitSurface(g_Block, &BLOCK.bitmap_location, g_Window, &BLOCK.screen_location);}void MoveBlock(){// BLOCK is a structBLOCK.screen_location.y += SPEED;}void DrawNextBlock(){SDL_BlitSurface(g_Block1, &NextBlock.bitmap_location, g_Window, &NextBlock.screen_location);}[source/]
  For the first question, just make an array of boolean that representeach possible block position and set 1 to the place where there a block that cannot go down furter. And for the second question, i don't know SDL, so i cannot help you much. Good Luck!   ;  about the first question... i just didn't understand what did you mean. sorryThe -> symbol is used to access a structures member from its pointer. For instance:typedef struct {int x;int y;} p;p point;//store point s address of memory in ppoint;p *ppoint = &point//this is how you access any member of the struct:point.x = 5;//this is how you can access it by using the pointer:ppoint->y = 6;printf("%u %u\n", ppoint->x, point.y);as for your game you could put something like this:pb - is the pointer to your block structure or whatever you use. It will store the current blockso if nb is your block structure that will have everything about your next block you can do:pb = &nb//after this block gets to the bottom (will be inactive) you should just update the nb with new values for next block.BUT !! be careful not to change any values of nb because the changes will affect pb too. If you need to change nb you can use 2 structures for this.   