// load JSON game definition and all files for RUN public static bool LoadData(string cartridgeName) { uRetroConfig.cartridgeName = cartridgeName; string path = GetRoot() + "/" + uRetroConfig.cartridgesFolder + "/" + uRetroConfig.cartridgeName; if (!Directory.Exists(path)) { uRetroConsole.PrintError("Cartridge folder with name '" + cartridgeName + "' missing!"); return(false); } path = GetRoot() + "/" + uRetroConfig.cartridgesFolder + "/" + uRetroConfig.cartridgeName + "/"; // CONFIG uRetroSystem.LoadRetroEngineConfig(); // COLORS Texture2D colors = PNG.LoadPNG(path + uRetroConfig.fileColors); uRetroColors.CreatePalette(colors); // SPRITES Texture2D sprites = PNG.LoadPNG(path + uRetroConfig.fileSprites); uRetroSprites.CreateSprites(sprites); // FONTS Texture2D fonts = PNG.LoadPNG(path + uRetroConfig.fileFont); uRetroText.CreateFont(fonts); // Tilemaps uRetroTilemap.Load(); // Create Display uRetroDisplay.CreateDisplay(GameObject.FindGameObjectWithTag("uRetroDisplay")); // Set Resolution uRetroDisplay.SetResolution(uRetroConfig.screen_width, uRetroConfig.screen_height, 0); uRetroLua.fromCart = false; return(true); }