The draw code is bit complex, but it boils down to drawing a mesh, then sprites over it then mesh over it, etc. It is a layered tiled map kind of thing.
The mesh drawing at lowest level is this:
public void Draw(float dt, GraphicsDeviceManager graphicsManager, Camera2D camera)
{
foreach (EffectPass pass in Effect.CurrentTechnique.Passes)
{
pass.Apply();
graphicsManager.GraphicsDevice.DrawUserIndexedPrimitives
<VertexPositionNormalTexture>(
PrimitiveType.TriangleList,
Vertices, 0, Vertices.Length,
Indexes, 0, Indexes.Length / 3);
}
}
World draw looks like this:
public void Draw(float dt, GraphicsDeviceManager graphics, SpriteBatch spriteBatch, Camera2D cam, List<IEntity> gameObjects, Player player, TiledWorld world)
{
//Debug.WriteLine(gameObjects.Count);
for(int groups = 0; groups < TiledChunk.GroupCount; groups++)
{
if (player.WorldLevel >= groups)
{
DrawGroup(groups, dt, graphics, cam);
}
else if (world.HideTopLevels == false)
{
DrawGroup(groups, dt, graphics, cam);
}
for (int j = 0; j < gameObjects.Count; j++)
{
if(gameObjects[j].GetType() == typeof(Player))
{
if (gameObjects[j].GetWorldLevel() == groups)
{
gameObjects[j].Draw(spriteBatch);
}
}
else
if (gameObjects[j].GetWorldLevel() == groups)
{
if(gameObjects[j].GetWorldLevel() > player.WorldLevel)
{
if(world.HideTopLevels == false)
{
gameObjects[j].Draw(spriteBatch);
}
}
else
{
gameObjects[j].Draw(spriteBatch);
}
}
}
}
}
I dont know why, but on my win10 when doing PrtScr, if the game is windowed, itll paste it as all white, and if it is fullscreen, it will make a screenshot of whats behind the game window at the moment.
But all there would be to see from screenshots is that tinting doesn’t work at all, for text or sprites, they are always drawn in their original colors, no matter if I pass Color.Blue or anything else to it.