Skip to content

Commit

Permalink
Better loading of background image
Browse files Browse the repository at this point in the history
  • Loading branch information
kaczy93 committed Dec 23, 2023
1 parent b5cb891 commit 2e5375a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CentrED/Map/MapManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,12 @@ public MapManager(GraphicsDevice gd)
DepthFormat.Depth24
);
_spriteBatch = new SpriteBatch(gd);
_background = CEDGame.Content.Load<Texture2D>("background");


using (var fileStream = File.OpenRead("background.png"))
{
_background = Texture2D.FromStream(gd, fileStream);
}

Client = CEDClient;
Client.LandTileReplaced += (tile, newId) => { LandTiles[tile.X, tile.Y].UpdateId(newId); };
Client.LandTileElevated += (tile, newZ) =>
Expand Down

0 comments on commit 2e5375a

Please sign in to comment.