示例#1
0
void VerticalBlank()
{
    // update sprites
    ham_CopyObjToOAM();

    // update controller
    UpdateController();

    // update count
    g_vertBlankCount = (g_vertBlankCount == 60) ? 0 : g_vertBlankCount + 1;

    // signal vertical blank proc done
    g_vertBlankState = TRUE;
}
示例#2
0
//********************** =================================================================
// Function: vbl_func()
// Purpose: VBL function
//**********************
// VBL function
void vbl_func()
{
  // update background
  newframe = 1;

  // Copy dk sprite to hardware
  ham_CopyObjToOAM();

  // Process the following every VBL
  query_buttons(); // Query for user input
  update_dk_gfx(); // Apply dk's new graphic
  update_dk_pos(); // Apply dk's new position

  ++frames; // Increment the frame counter
  frameCounter += 4096; // increment frame bits counter

	return;
} // End of vbl_func()