// IPlugin_Visualizer public IVisualization2d Generate2d(VisDescr descr, ReadOnlyDictionary <string, object> parms) { switch (descr.Ident) { case VIS_GEN_SHAPE_TABLE: return(GenerateBitmapFromTable(parms)); case VIS_GEN_SHAPE_TABLE_SHAPE: return(GenerateBitmapFromShape(parms)); default: mAppRef.ReportError("Unknown ident " + descr.Ident); return(null); } }
// IPlugin_Visualizer public IVisualization2d Generate2d(VisDescr descr, ReadOnlyDictionary <string, object> parms) { switch (descr.Ident) { case VIS_GEN_HI_RES_SPRITE: return(GenerateHiResSprite(parms)); case VIS_GEN_MULTI_COLOR_SPRITE: return(GenerateMultiColorSprite(parms)); default: mAppRef.ReportError("Unknown ident " + descr.Ident); return(null); } }
// IPlugin_Visualizer public IVisualization2d Generate2d(VisDescr descr, ReadOnlyDictionary <string, object> parms) { switch (descr.Ident) { case VIS_CHR_ROM: return(GenerateRomChart(parms)); case VIS_TILE_GRID: return(GenerateTileGrid(parms)); default: mAppRef.ReportError("Unknown ident " + descr.Ident); return(null); } }
// IPlugin_Visualizer public IVisualization2d Generate2d(VisDescr descr, ReadOnlyDictionary <string, object> parms) { switch (descr.Ident) { case VIS_GEN_SPRITE: return(GenerateSprite(parms)); case VIS_GEN_PLAYFIELD: return(GeneratePlayfield(parms)); default: mAppRef.ReportError("Unknown ident " + descr.Ident); return(null); } }
// IPlugin_Visualizer public IVisualization2d Generate2d(VisDescr descr, ReadOnlyDictionary <string, object> parms) { switch (descr.Ident) { case VIS_GEN_BITMAP: return(GenerateBitmap(parms)); case VIS_GEN_BITMAP_FONT: return(GenerateBitmapFont(parms)); case VIS_GEN_HR_SCREEN: return(GenerateScreen(parms)); default: mAppRef.ReportError("Unknown ident " + descr.Ident); return(null); } }
/// <summary> /// Finds a plugin that provides the named visualization generator. /// </summary> /// <param name="plugins">List of plugins, from project ScriptManager.</param> /// <param name="visGenIdent">Visualization generator identifier.</param> /// <returns>A plugin that matches, or null if none found.</returns> private static IPlugin_Visualizer FindPluginByVisGenIdent( Dictionary <string, IPlugin> plugins, string visGenIdent, out VisDescr visDescr) { foreach (IPlugin chkPlug in plugins.Values) { if (!(chkPlug is IPlugin_Visualizer)) { continue; } IPlugin_Visualizer vplug = (IPlugin_Visualizer)chkPlug; foreach (VisDescr descr in vplug.GetVisGenDescrs()) { if (descr.Ident == visGenIdent) { visDescr = descr; return(vplug); } } } visDescr = null; return(null); }
// IPlugin_Visualizer public IVisualization2d Generate2d(VisDescr descr, ReadOnlyDictionary <string, object> parms) { mAppRef.ReportError("2d not supported"); return(null); }
public VisualizationItem(string scriptIdent, VisDescr descr) { ScriptIdent = scriptIdent; VisDescriptor = descr; }