AddPaletteHeaderGroup() public méthode

public AddPaletteHeaderGroup ( PaletteHeaderGroup group, PaletteGroupType type ) : void
group PaletteHeaderGroup
type PaletteGroupType
Résultat void
Exemple #1
0
        void SetPaletteHeader(int index)
        {
            graphicsState.RemovePaletteGroupType(PaletteGroupType.Main);
            var paletteHeaderGroup =
                Project.GetIndexedDataType <PaletteHeaderGroup>(index);

            graphicsState.AddPaletteHeaderGroup(paletteHeaderGroup, PaletteGroupType.Main);
            InvalidateAllTiles();
        }
Exemple #2
0
        internal Area(Project p, int i) : base(p, i)
        {
            areaFile = Project.GetFileWithLabel("areaData");

            areaData = areaFile.GetData("areaData", Index * 8);


            // If this is Seasons, it's possible that areaData does not point to 8 bytes as
            // expected, but instead to an "m_SeasonalData" macro.
            if (areaData.CommandLowerCase == "m_seasonalarea")
            {
                int season = 0;
                areaData = Project.GetData(areaData.GetValue(0), season * 8);
            }

            // Initialize graphics state
            graphicsState = new GraphicsState();
            // Global palettes
            PaletteHeaderGroup globalPaletteHeaderGroup =
                Project.GetIndexedDataType <PaletteHeaderGroup>(0xf);

            graphicsState.AddPaletteHeaderGroup(globalPaletteHeaderGroup, PaletteGroupType.Common);

            Data data = areaData;

            flags1 = p.EvalToInt(data.GetValue(0));

            data   = data.NextData;
            flags2 = p.EvalToInt(data.GetValue(0));

            data = data.NextData;
            SetUniqueGfx(Project.EvalToInt(data.GetValue(0)));

            data = data.NextData;
            SetMainGfx(Project.EvalToInt(data.GetValue(0)));

            data = data.NextData;
            SetPaletteHeader(Project.EvalToInt(data.GetValue(0)));

            data = data.NextData;
            SetTileset(Project.EvalToInt(data.GetValue(0)));

            data        = data.NextData;
            layoutGroup = Project.EvalToInt(data.GetValue(0));

            data = data.NextData;
            SetAnimation((byte)Project.EvalToInt(data.GetValue(0)));
        }
Exemple #3
0
        internal Area(Project p, int i)
            : base(p, i)
        {
            areaFile = Project.GetFileWithLabel("areaData");

            areaData = areaFile.GetData("areaData", Index * 8);

            // Initialize graphics state
            graphicsState = new GraphicsState();
            // Global palettes
            PaletteHeaderGroup globalPaletteHeaderGroup =
                Project.GetIndexedDataType<PaletteHeaderGroup>(0xf);
            graphicsState.AddPaletteHeaderGroup(globalPaletteHeaderGroup, PaletteGroupType.Common);

            Data data = areaData;
            flags1 = p.EvalToInt(data.GetValue(0));

            data = data.NextData;
            flags2 = p.EvalToInt(data.GetValue(0));

            data = data.NextData;
            SetUniqueGfx(Project.EvalToInt(data.GetValue(0)));

            data = data.NextData;
            SetMainGfx(Project.EvalToInt(data.GetValue(0)));

            data = data.NextData;
            SetPaletteHeader(Project.EvalToInt(data.GetValue(0)));

            data = data.NextData;
            SetTileset(Project.EvalToInt(data.GetValue(0)));

            data = data.NextData;
            layoutGroup = Project.EvalToInt(data.GetValue(0));

            data = data.NextData;
            SetAnimation((byte)Project.EvalToInt(data.GetValue(0)));
        }