void game_init() { // Graphics : one bg + one cursor (simple) blitter_init(); sampler.bg = tilemap_new (dessin_tset, 640, 480, TMAP_HEADER(64,64,TSET_16, TMAP_U8), vram); sampler.cursor = sprite_new((uint32_t *)cursor_spr,5,5,-1); sampler.cursor_x = 5; sampler.cursor_y = 5; // Filesystem : load all drumkits to table. // XXX better check those errors ! int res; f_mount(&fso,"",1); //mount now res = f_opendir(&dir, MOD_PATH); if (res != FR_OK) { die(3,res); } // MOD loadNextFile(); loadPattern(0); zap_pattern(&clipboard); // disable auto next pattern (or taken care by following) Player.follow_song = 0; // inject a loop to start of current pattern ? }
void game_snd_buffer(uint16_t *stream, int size) { for (int i=0;i<size; i++) { if (sample_in_tick++>=Player.samplesPerTick) { // check button for next song ... if (0){ loadNextFile(); } else { player(); } sample_in_tick=0; } stream[i] = mixer(stream); } }
void game_snd_buffer(uint16_t *stream, int size) { for (int i=0;i<size; i++) { if (sample_in_tick++==Player.samplesPerTick) { // check button for next song ... if (!button_state() && prev_but){ set_led(vga_frame & 64); loadNextFile(); } else { player(); } prev_but=button_state(); sample_in_tick=0; } stream[i] = mixer(stream); } }
void game_init() { // XXX better check those errors ! int res; f_mount(&fso,"",1); //mount now res = f_opendir(&dir, MOD_PATH); if (res != FR_OK) { message ("wtf no dir\n"); die(3,res); } res = f_chdir(MOD_PATH); if (res) { message ("wtf no dir\n"); die(2,res); } loadNextFile(); }
void MusicPlayer::addFiles(QStringList newFileLoadingList) { fileLoadingList = newFileLoadingList; loadNextFile(); }