Permalink
Browse files

[Festive] HO HO HO

  • Loading branch information...
1 parent 44fcec6 commit 2dd52966db07f8b6cef45e8ea8d9bb03943c3cbe @RHY3756547 committed Nov 1, 2016
@@ -1,6 +1,8 @@

-Microsoft Visual Studio Solution File, Format Version 10.00
-# Visual C# Express 2008
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 14
+VisualStudioVersion = 14.0.25420.1
+MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GonzoNet", "GonzoNet.csproj", "{25A5DA9E-88E8-4BC2-AE80-45935276790E}"
EndProject
Global
@@ -0,0 +1,5 @@
+node_modules/
+bower_components/
+.sass-cache/
+.tmp/
+dist/
@@ -67,7 +67,7 @@ public UIHeadlineRenderer(VMRuntimeHeadline headline) : base(headline)
Sprite = Sprites.Get<SPR>((ushort)(GroupOffsets[(int)Headline.Operand.Group] + Headline.Index));
if (Headline.Operand.Type != 255 && Headline.Operand.Type != 3)
- BGSprite = Sprites.Get<SPR>((ushort)(GroupOffsets[(int)VMSetBalloonHeadlineOperandGroup.Balloon]+Headline.Operand.Type));
+ BGSprite = Sprites.Get<SPR>((ushort)(GroupOffsets[(int)VMSetBalloonHeadlineOperandGroup.Balloon] + Headline.Operand.Type));
LastZoom = WorldZoom.Near;
RecalculateTarget();
@@ -77,7 +77,11 @@ public void RecalculateTarget()
{
ZoomFrame = 3 - (int)LastZoom;
- if (Texture != null) Texture.Dispose();
+ if (Texture != null)
+ {
+ Texture.Dispose();
+ Texture = null;
+ }
if (DrawSkill)
{
@@ -88,20 +92,22 @@ public void RecalculateTarget()
if (Sprite != null)
{
SPRFrame bigFrame = (BGSprite != null) ? BGSprite.Frames[ZoomFrame] : Sprite.Frames[ZoomFrame];
- Texture = new RenderTarget2D(GameFacade.GraphicsDevice, Math.Max(1,bigFrame.Width), Math.Max(1,bigFrame.Height));
+ if (bigFrame.Width == 0) return;
+ Texture = new RenderTarget2D(GameFacade.GraphicsDevice, Math.Max(1, bigFrame.Width), Math.Max(1, bigFrame.Height));
}
else if (Headline.Operand.Group == VMSetBalloonHeadlineOperandGroup.Algorithmic && LastZoom != WorldZoom.Far)
{
- AlgTex = (Headline.IconTarget == null)?WhitePx:Headline.IconTarget.GetIcon(GameFacade.GraphicsDevice, (int)LastZoom - 1);
+ AlgTex = (Headline.IconTarget == null) ? WhitePx : Headline.IconTarget.GetIcon(GameFacade.GraphicsDevice, (int)LastZoom - 1);
Point bigFrame = (BGSprite != null) ? new Point(BGSprite.Frames[ZoomFrame].Width, BGSprite.Frames[ZoomFrame].Height) : new Point(AlgTex.Width, AlgTex.Height);
+ if (bigFrame.X == 0) return;
Texture = new RenderTarget2D(GameFacade.GraphicsDevice, bigFrame.X, bigFrame.Y);
}
else AlgTex = null;
Invalidated = true;
}
public override Texture2D DrawFrame(World world)
- {
+ {
if (LastZoom != world.State.Zoom || Texture == null)
{
Invalidated = true;
@@ -183,4 +189,4 @@ public VMHeadlineRenderer Get(VMRuntimeHeadline headline)
return new UIHeadlineRenderer(headline);
}
}
-}
+}
@@ -481,7 +481,7 @@ public Color[] SetData(Color[] px, byte[] zpx, Rectangle rect)
var palt = new Color[256];
int i = 0;
foreach (var c in colors)
- palt[i++] = new Color(c.R, c.G, c.B, 255);
+ palt[i++] = new Color(c.R, c.G, c.B, (byte)255);
return palt;
}
@@ -46,7 +46,7 @@ public class TerrainComponent : WorldComponent
public TerrainComponent(Rectangle size){
this.Size = size;
this.Effect = WorldContent.GrassEffect;
- LotType = LotTypes.Grass; //(LotTypes)(new Random()).Next(4);
+ LotType = LotTypes.Snow; //(LotTypes)(new Random()).Next(4);
UpdateLotType();
GenerateGrassStates();

0 comments on commit 2dd5296

Please sign in to comment.