private void PrepareEntryParser()
        {
            // Junk the old paragraphs
            ParserEngine.Reset();

            // Get a handle to our destination container
            DObjectCon container = CrashDebugger.ContainerByType(DObject.TObjectType.EProcess);

            // Save last thread if it looks valid
            if (iCurrentObject != null && iCurrentObject.KernelAddress != 0)
            {
                bool alreadyExists = container.Contains(iCurrentObject);
                if (!alreadyExists)
                {
                    container.Add(iCurrentObject);
                }
                //
                iCurrentObject = null;
            }

            // Create a new object which will contain the next set of parser data
            iCurrentObject = new DProcess(CrashDebugger);

            // Use the helper to prepare next paragraphs
            iHelper.CreateMonitorProcess(ParserEngine, "ENTRY [" + container.TypeDescription + "]", iCurrentObject, new SymbianParserLib.BaseStructures.ParserElementBase.ElementCompleteHandler(ProcessChunksComplete_ElementHandler));
        }
        public override void Prepare()
        {
            DObjectCon container = CrashDebugger.ContainerByType(DObject.TObjectType.EProcess);
            //
            ParserLine l1 = ParserLine.NewSymFormat("Container %d at %08x contains %d %S:\r\n");

            l1[0].SetTargetProperty(container, "Index");
            l1[1].SetTargetProperty(container, "KernelAddress");
            l1[2].SetTargetProperty(container, "ExpectedCount");
            l1.ElementComplete += new SymbianParserLib.BaseStructures.ParserElementBase.ElementCompleteHandler(HeaderLine_ElementComplete);
            //
            ParserParagraph para = new ParserParagraph("CONTAINER [" + container.TypeDescription + "]");

            para.Add(l1);
            ParserEngine.Add(para);
        }
Exemplo n.º 3
0
 private void SetThreadAddress(uint aAddress)
 {
     // Look for the thread which we're about to process...
     iCurrentThread = CrashDebugger.ThreadByAddress(aAddress);
     if (iCurrentThread != null)
     {
         // Next we must start to process code segments for this
         // thread. These lines contain additional information about
         // the run address of the code segments, relative to the process.
         ParserParagraph para = new ParserParagraph("STACK_THREAD_INFO_CODESEGS");
         //
         ParserLine l1 = ParserLine.NewSymFormat("CodeSeg[%03d/%03d] @ %08x - %08X-%08X %S");
         l1.ElementComplete += new ParserElementBase.ElementCompleteHandler(CodeSegmentLineComplete);
         //
         para.Add(l1);
         ParserEngine.Add(para);
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// LoadContent will be called once per game and is theF place to load
        /// all of your content.
        /// </summary>
        protected override void LoadContent()
        {
            SoundEffect.MasterVolume = EffectsVolume;
            MediaPlayer.Volume       = MusicVolume;

            crashDebugger = new CrashDebugger(GraphicsDevice, ContentManager, "Fonts/kootenay20", "*****@*****.**");

//            GraphicsDevice.RenderState.MultiSampleAntiAlias = true;
            //            GraphicsDevice.PresentationParameters.MultiSampleType = MultiSampleType.FourSamples;

            // Create a new SpriteBatch, which can be used to draw textures.
            spriteBatch = new SpriteBatch(GraphicsDevice);

            this.globalClock.Start();

            // initialize renderer
            renderer = new Renderer.Renderer(ContentManager, GraphicsDevice);

            // load level infos
            levels = ContentManager.Load <List <LevelInfo> >("Level/LevelInfo");
            // load list of available robots
            robots = ContentManager.Load <List <RobotInfo> >("Level/Common/RobotInfo");


#if DEBUG || TEST_RELEASE
            // initialize simulation
            LoadLevel("Level/Instances/TestLevel/Simulation", "Level/Instances/TestLevel/Renderer");
            //LoadLevel("Level/Instances/4vs4/Simulation", "Level/Instances/4vs4/Renderer");
            //LoadLevel("Level/Instances/StaircaseOfDoom/Simulation", "Level/Instances/StaircaseOfDoom/Renderer");
            //LoadLevel("Level/Instances/Stack/Simulation", "Level/Instances/Stack/Renderer");
            //LoadLevel("Level/Instances/4Noobs/Simulation", "Level/Instances/4Noobs/Renderer");

            // set default player
            Entity player1 = new Entity("player1");
            player1.AddIntAttribute(CommonNames.GamePadIndex, 0);
            player1.AddIntAttribute(CommonNames.Lives, 100);
            player1.AddStringAttribute("robot_entity", robots[0].Entity);
            player1.AddStringAttribute(CommonNames.PlayerName, robots[0].Name);

            // set default player
            Entity player2 = new Entity("player2");
            player2.AddIntAttribute(CommonNames.GamePadIndex, 1);
            player2.AddIntAttribute(CommonNames.Lives, 100);
            player2.AddStringAttribute("robot_entity", robots[1].Entity);
            player2.AddStringAttribute(CommonNames.PlayerName, robots[1].Name);
    #if ALWAYS_FOUR_PLAYERS
            // set default player
            Entity player3 = new Entity("player3");
            player3.AddIntAttribute(CommonNames.GamePadIndex, 2);
            player3.AddIntAttribute(CommonNames.Lives, 100);
            player3.AddStringAttribute("robot_entity", robots[2].Entity);
            player3.AddStringAttribute(CommonNames.PlayerName, robots[2].Name);

            // set default player
            Entity player4 = new Entity("player4");
            player4.AddIntAttribute(CommonNames.GamePadIndex, 3);
            player4.AddIntAttribute(CommonNames.Lives, 100);
            player4.AddStringAttribute("robot_entity", robots[3].Entity);
            player4.AddStringAttribute(CommonNames.PlayerName, robots[3].Name);

            AddPlayers(new Entity[] { player1, player2, player3, player4 });
#else
            AddPlayers(new Entity[] { player1, player2 });
    #endif
#else
            // initialize simulation
            LoadLevel("Level/Instances/MenuLevel/Simulation", "Level/Instances/MenuLevel/Renderer");
            //LoadLevel("Level/Instances/StaircaseOfDoom/Simulation", "Level/Instances/StaircaseOfDoom/Renderer");
#endif

            // load menu
            menu.LoadContent();

            // preload effects data
            Game.Instance.ContentManager.Load <Effect>("Effects/Sfx/ParticleSystem/Stateful/Implementations/FireExplosion");
            Game.Instance.ContentManager.Load <Effect>("Effects/Sfx/ParticleSystem/Stateful/Implementations/IceExplosion");
            Game.Instance.ContentManager.Load <Effect>("Effects/Sfx/ParticleSystem/Stateful/Implementations/IceSpike");
            Game.Instance.ContentManager.Load <Effect>("Effects/Sfx/ParticleSystem/Stateful/Implementations/LavaExplosion");
            Game.Instance.ContentManager.Load <Effect>("Effects/Sfx/ParticleSystem/Stateful/Implementations/Snow");
            Game.Instance.ContentManager.Load <Effect>("Effects/Sfx/ParticleSystem/Stateful/Implementations/Flamethrower");
            Game.Instance.ContentManager.Load <Effect>("Effects/Sfx/IceSpike");
            Game.Instance.ContentManager.Load <Texture2D>("Textures/Sfx/FireExplosion");
            Game.Instance.ContentManager.Load <Texture2D>("Textures/Sfx/IceExplosion");
            Game.Instance.ContentManager.Load <Texture2D>("Textures/Sfx/IceSpikeHead");
            Game.Instance.ContentManager.Load <Texture2D>("Textures/Sfx/IceSpikeTrail");
            Game.Instance.ContentManager.Load <Texture2D>("Textures/Sfx/LavaExplosion");
            Game.Instance.ContentManager.Load <Texture2D>("Textures/Sfx/Snow");
            Game.Instance.ContentManager.Load <Texture2D>("Textures/Sfx/respawnspot");
            Game.Instance.ContentManager.Load <MagmaModel>("Models/Sfx/IceSpike");

            // preload sounds
            Game.Instance.ContentManager.Load <SoundEffect>("Sounds/gong1");
            Game.Instance.ContentManager.Load <SoundEffect>("Sounds/punch2");
            Game.Instance.ContentManager.Load <SoundEffect>("Sounds/hit2");
            Game.Instance.ContentManager.Load <SoundEffect>("Sounds/sword-clash");
            Game.Instance.ContentManager.Load <SoundEffect>("Sounds/death");
            Game.Instance.ContentManager.Load <SoundEffect>(Menu.OkSound);
            Game.Instance.ContentManager.Load <SoundEffect>(Menu.ChangeSound);
            Game.Instance.ContentManager.Load <SoundEffect>(Menu.BackSound);

            Viewport viewport = graphics.GraphicsDevice.Viewport;

            float aspectRatio = (float)viewport.Width / (float)viewport.Height;

            // play that funky musik white boy
            //MediaPlayer.Play(Game.Instance.ContentManager.Load<Song>("Music/background_janick"));

            // get storage device => moved to the update loop
            //storageSelectionResult = Guide.BeginShowStorageDeviceSelector(PlayerIndex.One, null, null);

            // open menu
#if !DEBUG && !PROFILE && !TEST_RELEASE
            menu.Open();
#endif

            this.profiler = null;
#if PROFILING
            this.profiler = ProjectMagma.Profiler.Profiler.CreateProfiler(Game.Instance.ContentManager, "rendering_profiler");
#endif

            fpsFont = Game.Instance.ContentManager.Load <SpriteFont>("Fonts/fps");
        }