コード例 #1
0
ファイル: VisShapeTable.cs プロジェクト: retroric/6502bench
        // 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);
            }
        }
コード例 #2
0
        // 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);
            }
        }
コード例 #3
0
ファイル: VisNES.cs プロジェクト: markdavidlong/6502bench
        // 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);
            }
        }
コード例 #4
0
        // 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);
            }
        }
コード例 #5
0
ファイル: VisHiRes.cs プロジェクト: MarcSchoenefeld/6502bench
        // 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);
            }
        }
コード例 #6
0
 /// <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);
 }
コード例 #7
0
 // IPlugin_Visualizer
 public IVisualization2d Generate2d(VisDescr descr,
                                    ReadOnlyDictionary <string, object> parms)
 {
     mAppRef.ReportError("2d not supported");
     return(null);
 }
コード例 #8
0
 public VisualizationItem(string scriptIdent, VisDescr descr)
 {
     ScriptIdent   = scriptIdent;
     VisDescriptor = descr;
 }