Esempio n. 1
0
        public PalettesService(ErrorService errorService, Project project)
        {
            _errorService = errorService;
            _project      = project;

            CacheRgbPalettes();
        }
Esempio n. 2
0
 public GraphicsService(ErrorService errorService, Project project)
 {
     _errorService = errorService;
     _project      = project;
     LoadGraphics();
     LoadExtraGraphics();
 }
Esempio n. 3
0
        public RomService(ErrorService errorService, GraphicsService graphicsService, PalettesService palettesService, TileService tileService, LevelService levelService, WorldService worldService, TextService textService)
        {
            _errorService      = errorService;
            _levelIndexTable   = new Dictionary <Guid, byte>();
            _worldIndexTable   = new Dictionary <Guid, byte>();
            _paletteIndexTable = new Dictionary <Guid, byte>();
            _levelAddressTable = new Dictionary <byte, int>();
            _levelTypeTable    = new Dictionary <byte, int>();

            _graphicsService    = graphicsService;
            _palettesService    = palettesService;
            _tileService        = tileService;
            _worldService       = worldService;
            _textService        = textService;
            _levelService       = levelService;
            _compressionService = new CompressionService();
        }
Esempio n. 4
0
 public ProjectService(ErrorService errorService, Project project)
 {
     _errorService = errorService;
     _project      = project;
 }
Esempio n. 5
0
 public ProjectService(ErrorService errorService)
 {
     _errorService = errorService;
 }
Esempio n. 6
0
        public GameObjectService(ErrorService errorService, Project project)
        {
            _errorService    = errorService;
            _project         = project;
            GameObjectTable  = new GameObjectTable();
            localGameObjects = JsonConvert.DeserializeObject <GameObject[]>(JsonConvert.SerializeObject(_project.GameObjects));

            for (int i = 0; i < localGameObjects.Length; i++)
            {
                if (localGameObjects[i] == null)
                {
                    localGameObjects[i] = new GameObject()
                    {
                        Group          = "Unused",
                        GameId         = i,
                        GameObjectType = GameObjectType.Global,
                        Name           = "Unused x" + i.ToString("X"),
                        Sprites        = new List <Sprite>()
                        {
                            new Sprite()
                            {
                                Overlay = true, X = 0, Y = 0, TileValueIndex = 8
                            },
                            new Sprite()
                            {
                                Overlay = true, X = 0, Y = 0, TileValueIndex = 0x0A
                            }
                        }
                    };
                }
            }
            RefreshGameObjectTable();
            _startPointPalette = new string[4] {
                "00", "0F", "36", "16"
            };
            _startPointGameObject = new GameObject()
            {
                GameId  = 0,
                Name    = "Start Point",
                Sprites = new List <Sprite>()
                {
                    new Sprite()
                    {
                        X = 0,
                        Y = 0,
                        TileValueIndex = 0x8,
                        TileTableIndex = 4,
                        CustomPalette  = _startPointPalette,
                        Overlay        = true
                    },
                    new Sprite()
                    {
                        X = 8,
                        Y = 0,
                        TileValueIndex = 0xA,
                        TileTableIndex = 4,
                        CustomPalette  = _startPointPalette,
                        Overlay        = true
                    }
                }
            };
        }