Esempio n. 1
0
        public static bool Init()
        {
            decodeStream = File.OpenRead("/Application/apple.psmvideo");

            graphics = new GraphicsContext();
            SampleDraw.Init(graphics);
            bgm       = new Bgm("/Application/apple.mp3");
            bgmPlayer = bgm.CreatePlayer();
            FrameImg  = new Image(ImageMode.Rgba, new ImageSize(480, 360), new ImageColor(0, 0, 0, 255));

            tex = createTexture(FrameImg);
            spr = new SampleSprite(tex, ((960 / 2) - 480), ((544 / 2) - 360));

            timer = new Stopwatch();
            bgmPlayer.Play();


            return(true);
        }
Esempio n. 2
0
        void DrawDirectories()
        {
            int x = 0;
            int y = 0;

            DrawRectangle(5, 5, 470, 534, 0xffffffff);

            int selection = dirselection;

            DrawRectangle(x + 5, 5 + (selection * 40), 470, 40, 0xffffff00);

            foreach (string s in directories)
            {
                int textheight = SampleDraw.CurrentFont.Metrics.Height;
                int valign     = VAlign("center", textheight, 40);
                SampleDraw.DrawText(Path.GetFileName(s), 0xffffffff, 10, y + valign);
                y += 40;
            }
        }
Esempio n. 3
0
        public static bool Update()
        {
            timer.Reset();
            timer.Start();
            NextFrame();


            while (bgmPlayer.Time <= 0.001)
            {
            }
            ;

            if (frameCount == 6571)
            {
                loop = false;
            }

            SampleDraw.Update();

            return(true);
        }
Esempio n. 4
0
 /// Terminate
 public static void Term()
 {
     SampleDraw.Term();
     graphics.Dispose();
 }
Esempio n. 5
0
 void DrawImages()
 {
     SampleDraw.DrawSprite(sprite);
 }
Esempio n. 6
0
 void DrawPageNumber()
 {
     SampleDraw.DrawText((page + 1).ToString() + "/" + Pages.Count.ToString(), 0xff000000, 0, 0);
 }