Beispiel #1
0
        // Convert a scroll color to RGBA values.
        private void ScrollColorToRGBA(ScrollColor color,
                                       out byte R, out byte G, out byte B, out byte A)
        {
            R = 0x00;
            G = 0x00;
            B = 0x00;
            A = 0x80;
            switch (color)
            {
            case ScrollColor.Red:
                R = 0xFF;
                break;

            case ScrollColor.Green:
                G = 0xFF;
                break;

            case ScrollColor.Blue:
                R = 0x40;
                G = 0x40;
                B = 0xFF;
                break;

            default:
                A = 0x00;
                break;
            }
        }
Beispiel #2
0
        // Constructor
        public ScrollSet(int screenCount, ScrollColor color) : base()
        {
            MyRoomStates = new HashSet <RoomState> ();
            byte b = (byte)color;

            for (int n = 0; n < screenCount; n++)
            {
                Bytes.Add(b);
            }
        }
Beispiel #3
0
        // Renders a PLM or ASM scroll
        private void RenderScrollModification(BlitImage screenImage, int x, int y)
        {
            if (ActiveScrollData is ScrollSet || ActiveScrollData == null)
            {
                return;
            }
            ScrollColor color = ActiveScrollData [RoomWidthInScreens * y + x];

            ScrollColorToRGBA(color, out byte red, out byte green,
                              out byte blue, out byte alpha);
            screenImage.DrawRectangle(96, 96, 64, 64, red, green, blue, alpha);
        }
Beispiel #4
0
 private void ForceSelectScrollColor(int index)
 {
     if (index >= 0 && index < 4)
     {
         ScrollColorIndex  = index;
         ActiveScrollColor = (ScrollColor)ScrollColorIndex;
     }
     else
     {
         ScrollDataIndex   = IndexNone;
         ActiveScrollColor = ScrollColor.None;
     }
 }
Beispiel #5
0
 public ActiveItems(Project p)
 {
     ActiveArea        = p.AreaIndex;
     ActiveRoom        = p.ActiveRoom;
     ActiveRoomState   = p.ActiveRoomState;
     ActiveTileSet     = p.ActiveTileSet;
     ActiveDoor        = p.ActiveDoor;
     ActiveLevelData   = p.ActiveLevelData;
     ActivePlm         = p.ActivePlm;
     ActivePlmType     = p.ActivePlmType;
     ActiveEnemy       = p.ActiveEnemy;
     ActiveEnemyGfx    = p.ActiveEnemyGfx;
     ActiveEnemyType   = p.ActiveEnemyType;
     ActiveScrollData  = p.ActiveScrollData;
     ActiveScrollColor = p.ActiveScrollColor;
     ActiveFx          = p.ActiveFx;
     ActiveFxData      = p.ActiveFxData;
     ActiveBackground  = p.ActiveBackground;
 }