public static ResourceIndex Load(GameInfo game) { ResourceIndex index; switch (game.Version) { case 0: index = new ResourceIndex0(); break; case 1: if (game.Platform == Platform.C64) { index = new ResourceIndex0(); } else { index = new ResourceIndex2(); } break; case 2: index = new ResourceIndex2(); break; case 3: if (game.IsOldBundle) { index = new ResourceIndex3_16(); } else { index = new ResourceIndex3(); } break; case 4: index = new ResourceIndex4(); break; case 5: index = new ResourceIndex5(); break; case 6: index = new ResourceIndex6(); break; case 7: index = new ResourceIndex7(); break; case 8: index = new ResourceIndex8(); break; default: throw new NotSupportedException("The SCUMM version {0} is not supported."); } index.Game = game; index.LoadIndex(game); return index; }
public static ResourceIndex Load(GameInfo game) { ResourceIndex index; switch (game.Version) { case 0: index = new ResourceIndex0(); break; case 1: if (game.Platform == Platform.C64) { index = new ResourceIndex0(); } else { index = new ResourceIndex2(); } break; case 2: index = new ResourceIndex2(); break; case 3: if (game.IsOldBundle) { index = new ResourceIndex3_16(); } else { index = new ResourceIndex3(); } break; case 4: index = new ResourceIndex4(); break; case 5: index = new ResourceIndex5(); break; case 6: index = new ResourceIndex6(); break; case 7: index = new ResourceIndex7(); break; case 8: index = new ResourceIndex8(); break; default: throw new NotSupportedException("The SCUMM version {0} is not supported."); } index.Game = game; index.LoadIndex(game); return(index); }