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 world_init(struct World *self) { self->components = componentStore_new(); self->entities = entitypool_new(); self->tilemap = tilemap_new(1024, 1024); }