#149361 - HubbubJub - Sat Jan 19, 2008 1:45 am
Hi, I've just been playing around with a small game for a few days, and I've been having trouble getting it to display correctly. I've been using the swiWaitForVBlank() function that I've seen in a few tutorials, but it doesn't seem to be doing the right thing for me...
This code is at the end of my main game loop. There are a few printf functions that write at the beginning of the loop, but I never see them (I'm assuming because the console is cleared too often/quickly). Also, the top third of my main screen is always black, which I'm assuming is the fault of the background clear not being synchronized with the drawing. I've been reading a bunch of tutorial but I can't seem to figure out how to get everything to display correctly. Thanks in advance!
Code: |
swiWaitForVBlank();
// Clear console. consoleClear(); // Clear background. for(i = 0; i < SCREEN_WIDTH * SCREEN_HEIGHT; i++) VRAM_A[i] = BG_COLOR; |
This code is at the end of my main game loop. There are a few printf functions that write at the beginning of the loop, but I never see them (I'm assuming because the console is cleared too often/quickly). Also, the top third of my main screen is always black, which I'm assuming is the fault of the background clear not being synchronized with the drawing. I've been reading a bunch of tutorial but I can't seem to figure out how to get everything to display correctly. Thanks in advance!