public void Draw(SpriteBatch spriteBatch, Point position, Point textureLocation, float layer)
        {
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(Constants.GameScaler * frameWidth), (int)(Constants.GameScaler * frameHeight));
            Rectangle sourceRectangle      = new Rectangle(frameWidth * textureLocation.X, frameHeight * textureLocation.Y, frameWidth, frameHeight);

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
Example #2
0
        public void Draw(SpriteBatch spriteBatch, Point position, Point textureLocation, float layer)
        {
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(RoomConstants.SpriteMultiplier * width), (int)(RoomConstants.SpriteMultiplier * height));
            Rectangle sourceRectangle      = new Rectangle(width * textureLocation.X, height * textureLocation.Y, width, height);

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            Rectangle sourceRectangle      = new Rectangle(currentFrame * frameWidth, 0, frameWidth, frameHeight);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(RoomConstants.SpriteMultiplier * frameWidth), (int)(RoomConstants.SpriteMultiplier * frameHeight));

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, Constants.DrawLayer.MenuButtonSelector);
        }
Example #4
0
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            Rectangle destinationRectangle = new Rectangle(position, new Point((int)(sprite.Width * Constants.GameScaler), (int)(sprite.Height * Constants.GameScaler)));
            Rectangle sourceRectangle      = sprite.Bounds;

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
Example #5
0
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, RoomConstants.RoomWidth, RoomConstants.RoomHeight);
            Rectangle sourceRectangle      = new Rectangle(0, 0, sprite.Width, sprite.Height);

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White * .6f, layer);
        }
Example #6
0
        public void Draw(SpriteBatch spriteBatch, Point position, bool damaged, float layer)
        {
            int row;

            if (currentDir)
            {
                row = rightRow;
            }
            else
            {
                row = leftRow;
            }

            int column = currentFrame % numColumns;

            Rectangle sourceRectangle      = new Rectangle(width * column, height * row, width, height);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(Constants.GameScaler * width), (int)(Constants.GameScaler * height));

            if (pokemonOn)
            {
                destinationRectangle = new Rectangle(position.X, position.Y, (int)(Constants.PokemonScaler * width), (int)(Constants.PokemonScaler * height));
            }

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, flashRed && damaged ? Color.Red : Color.White, layer);
        }
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(Constants.GameScaler * sprite.Width), (int)(Constants.GameScaler * sprite.Height));
            Rectangle sourceRectangle      = new Rectangle(0, 0, sprite.Width, sprite.Height);

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            //o need to change scalar as sprite is already a good size.
            Rectangle sourceRectangle      = new Rectangle(0, 0, sprite.Width, sprite.Height);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(Constants.GameScaler * sprite.Width), (int)(Constants.GameScaler * sprite.Width));

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            int       row                  = (int)(currentFrame / (float)numColumns);
            int       column               = currentFrame % numColumns;
            Rectangle sourceRectangle      = new Rectangle(frameWidth * column, frameHeight * row, frameWidth, frameHeight);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(RoomConstants.SpriteMultiplier * frameWidth), (int)(RoomConstants.SpriteMultiplier * frameHeight));

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
Example #10
0
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            int row    = currentFrame % numRows;
            int column = 0;

            Rectangle sourceRectangle      = new Rectangle(width * column, height * row, width, height);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(Constants.GameScaler * width), (int)(Constants.GameScaler * height));

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            int currentRow    = 0;
            int currentColumn = currentFrame % totalFrames;

            Rectangle sourceRectangle      = new Rectangle(frameWidth * currentColumn, frameHeight * currentRow, frameWidth, frameHeight);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(frameWidth * Constants.GameScaler), (int)(frameHeight * Constants.GameScaler));

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
Example #12
0
        public void Draw(SpriteBatch spriteBatch, Point position, bool drawWithDamage, float layer)
        {
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(sprite.Width * Constants.GameScaler), (int)(sprite.Height * Constants.GameScaler));

            if (pokemonOn)
            {
                destinationRectangle = new Rectangle(position.X, position.Y, (int)(sprite.Width * Constants.TrainerScaler), (int)(sprite.Height * Constants.TrainerScaler));
            }
            Rectangle sourceRectangle = sprite.Bounds;

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, flashRed && drawWithDamage ? Color.Red : Color.White, layer);
        }
Example #13
0
        public void Draw(SpriteBatch spriteBatch, Point position, bool drawWithDamage, float layer)
        {
            int currentRow    = 0;
            int currentColumn = currentFrame % numColumns;

            Rectangle sourceRectangle      = new Rectangle(frameWidth * currentColumn, frameHeight * currentRow, frameWidth, frameHeight);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(frameWidth * Constants.GameScaler), (int)(frameHeight * Constants.GameScaler));

            if (pokemonOn)
            {
                destinationRectangle = new Rectangle(position.X, position.Y, (int)(frameWidth * Constants.TrainerScaler), (int)(frameHeight * Constants.TrainerScaler));
            }

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, flashRed && drawWithDamage ? Color.Red : Color.White, layer);
        }
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            int currentRow    = 0;
            int currentColumn = frameToCurrentColumnArray[currentFrame];

            Rectangle sourceRectangle      = new Rectangle(frameWidth * currentColumn, frameHeight * currentRow, frameWidth, frameHeight);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(frameWidth * Constants.GameScaler), (int)(frameHeight * Constants.GameScaler));

            if (pokemonOn)
            {
                destinationRectangle = new Rectangle(position.X, position.Y, (int)(frameWidth * Constants.TrainerScaler), (int)(frameHeight * Constants.TrainerScaler));
            }

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
Example #15
0
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            if (FinishedAnimation())
            {
                return;
            }

            int currentRow    = 0;
            int currentColumn = currentFrame % totalFrames;

            Rectangle sourceRectangle      = new Rectangle(width * currentColumn, height * currentRow, width, height);
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(width * Constants.GameScaler), (int)(height * Constants.GameScaler));

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, sourceRectangle, Color.White, layer);
        }
Example #16
0
        /// <summary>
        /// Allows the game to perform any initialization it needs to before starting to run.
        /// This is where it can query for any required services and load any non-graphic
        /// related content.  Calling base.Initialize will enumerate through any components
        /// and initialize them as well.
        /// </summary>
        protected override void Initialize()
        {
            // TODO: Add your initialization logic here
            var    current_display_mode = GraphicsAdapter.DefaultAdapter.CurrentDisplayMode;
            tCoord native_dim           = new tCoord(current_display_mode.Width, current_display_mode.Height);

            mGraphics.IsFullScreen              = false;
            mGraphics.PreferredBackBufferWidth  = native_dim.x;
            mGraphics.PreferredBackBufferHeight = native_dim.y;
            mGraphics.ApplyChanges();

            mSimpleDraw_World  = new SimpleDraw(GraphicsDevice);
            mSimpleDraw_Screen = new SimpleDraw(GraphicsDevice);

            mMouse = new RTSMouse(native_dim, mSimpleDraw_World, mSimpleDraw_Screen);

            base.Initialize();
        }
        public void Draw(SpriteBatch spriteBatch, Point position, float layer)
        {
            int width, height;
            int currentRow    = 0;
            int currentColumn = currentFrame % totalFrames;

            width  = upLeftSprite.Width / numColumns;
            height = upLeftSprite.Height / numRows;
            SimpleDraw.Draw(spriteBatch, upLeftSprite, new Rectangle(position.X - xOffset, position.Y - yOffset, (int)(width * Constants.GameScaler), (int)(height * Constants.GameScaler)), new Rectangle(width * currentColumn, height * currentRow, width, height), Color.White, layer);

            width  = downLeftSprite.Width / numColumns;
            height = downLeftSprite.Height / numRows;
            SimpleDraw.Draw(spriteBatch, downLeftSprite, new Rectangle(position.X - xOffset, position.Y + yOffset, (int)(width * Constants.GameScaler), (int)(height * Constants.GameScaler)), new Rectangle(width * currentColumn, height * currentRow, width, height), Color.White, layer);

            width  = upRightSprite.Width / numColumns;
            height = upRightSprite.Height / numRows;
            SimpleDraw.Draw(spriteBatch, upRightSprite, new Rectangle(position.X + xOffset, position.Y - yOffset, (int)(width * Constants.GameScaler), (int)(height * Constants.GameScaler)), new Rectangle(width * currentColumn, height * currentRow, width, height), Color.White, layer);

            width  = downRightSprite.Width / numColumns;
            height = downRightSprite.Height / numRows;
            SimpleDraw.Draw(spriteBatch, downRightSprite, new Rectangle(position.X + xOffset, position.Y + yOffset, (int)(width * Constants.GameScaler), (int)(height * Constants.GameScaler)), new Rectangle(width * currentColumn, height * currentRow, width, height), Color.White, layer);
        }
Example #18
0
 public RTSMouse(tCoord screen_dim, SimpleDraw simple_draw_world, SimpleDraw simple_draw_screen)
 {
     mScreenDim        = screen_dim;
     mSimpleDrawWorld  = simple_draw_world;
     mSimpleDrawScreen = simple_draw_screen;
 }
Example #19
0
 public AnimeNose()
 {
     DrawBehaviour = new SimpleDraw();
     Image         = _image;
 }
Example #20
0
 public SimpleEye()
 {
     DrawBehaviour = new SimpleDraw();
     Image         = _image;
 }
        public void Draw(SpriteBatch spriteBatch, Point position, Rectangle textureSource, float layer)
        {
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(RoomConstants.SpriteMultiplier * textureSource.Width), (int)(RoomConstants.SpriteMultiplier * textureSource.Height));

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, textureSource, Color.White, layer);
        }
Example #22
0
        public void Draw(SpriteBatch spriteBatch, Point position, Rectangle textureSource, float layer)
        {
            Rectangle destinationRectangle = new Rectangle(position.X, position.Y, (int)(textureSource.Width * Constants.GameScaler), (int)(textureSource.Height * Constants.GameScaler));

            SimpleDraw.Draw(spriteBatch, sprite, destinationRectangle, textureSource, Color.White, layer);
        }
 public SadMouse()
 {
     DrawBehaviour = new SimpleDraw();
     Image         = _image;
 }