GameScreen::GameScreen(const Rect& frame, int playerCount, std::string trackPath) : Screen(frame), mGameRunning(false), mGameFinished(false) { createTracks(playerCount, trackPath); restart(); }
int main(int argc, char *argv[]) { #pragma unused(argc, argv) DRDeviceRef device = NULL; DRBurnRef burn = NULL; CFArrayRef trackLayout = NULL; /* Hello world! */ printf("Welcome to the audio burn sample code!\n\n"); /* First, let's use DRU to prompt the user to pick a device. If there's only one device to choose, the selection is automatic. */ device = druPromptForDevice(NULL,druFilter_AnyBurner); /* We know we're going to burn to this device - acquire blank media reservations just in case the user inserts something. Just because we ask for a shot at blank media doesn't mean that we'll get it. Some other app might not be willing to give up the blank media for our use. */ DRDeviceAcquireMediaReservation(device); /* create the AIFF tracks we'll be burning to CD. */ trackLayout = createTracks(); /* Next, use DRU to prompt the user to insert blank media. */ druPromptForBlankMediaInDevice(device); /* Check to see if we have the media reservation. If we don't have it that means that some other application has it and won't give it up. We might not get it if, for instance, if the Finder has claimed the media for it's CD proxy and the user has placed files onto that proxy image. In this case the Finder wouldn't want to unmount the proxy image since the user's intention is to burn that information to the inserted disc. */ if (druMediaIsReserved(device)) { /* We've got blank media, and a folder to burn ... now set up the burn objects. */ burn = DRBurnCreate(device); /* Use DRU to run the burn and report progress. */ druBurn(burn,trackLayout); } else { printf("The media in the selected device is reserved for use by another application.\n"); } /* Clean up after ourselves. */ if (burn != NULL) CFRelease(burn); if (trackLayout != NULL) CFRelease(trackLayout); if (device != NULL) { DRDeviceReleaseMediaReservation(device); CFRelease(device); } return 0; }