From 0c902e2ff5fb455ab5803309ed0276a9235aa97e Mon Sep 17 00:00:00 2001 From: Victor Chelaru Date: Sun, 25 Feb 2024 08:09:13 -0700 Subject: [PATCH] Added repro case for GameScreen state generating invalid Variant code. --- .../Content/GumProject/GumProject.gumx | 10 + .../GumProject/Screens/GameScreenGum.gusx | 8 + .../Content/GumProject/Screens/Level1Gum.gusx | 8 + .../Content/Screens/Level1/Level1Map.tmx | 12 + .../GlueTestProjectDesktopGl.csproj | 30 ++ .../GlueTestProjectDesktopGl.glux | 388 ++++++++++++++++++ .../GumRuntimes/GameScreenGumRuntime.cs | 13 + .../GumRuntimes/Level1GumRuntime.cs | 13 + .../Screens/GameScreen.cs | 50 +++ .../Screens/Level1.cs | 50 +++ 10 files changed, 582 insertions(+) create mode 100644 Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Content/GumProject/Screens/GameScreenGum.gusx create mode 100644 Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Content/GumProject/Screens/Level1Gum.gusx create mode 100644 Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Content/Screens/Level1/Level1Map.tmx create mode 100644 Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/GumRuntimes/GameScreenGumRuntime.cs create mode 100644 Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/GumRuntimes/Level1GumRuntime.cs create mode 100644 Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Screens/GameScreen.cs create mode 100644 Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Screens/Level1.cs diff --git a/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Content/GumProject/GumProject.gumx b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Content/GumProject/GumProject.gumx index 2175f1f69..9cc7873ef 100644 --- a/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Content/GumProject/GumProject.gumx +++ b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Content/GumProject/GumProject.gumx @@ -36,6 +36,11 @@ Screen ReferenceOriginal + + GameScreenGum + Screen + ReferenceOriginal + GumScreenLayeredGum Screen @@ -51,6 +56,11 @@ Screen ReferenceOriginal + + Level1Gum + Screen + ReferenceOriginal + RenderTargetScreenGum Screen diff --git a/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Content/GumProject/Screens/GameScreenGum.gusx b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Content/GumProject/Screens/GameScreenGum.gusx new file mode 100644 index 000000000..73819b549 --- /dev/null +++ b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Content/GumProject/Screens/GameScreenGum.gusx @@ -0,0 +1,8 @@ + + + GameScreenGum + + Default + + + \ No newline at end of file diff --git a/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Content/GumProject/Screens/Level1Gum.gusx b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Content/GumProject/Screens/Level1Gum.gusx new file mode 100644 index 000000000..d7502261f --- /dev/null +++ b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Content/GumProject/Screens/Level1Gum.gusx @@ -0,0 +1,8 @@ + + + Level1Gum + + Default + + + \ No newline at end of file diff --git a/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Content/Screens/Level1/Level1Map.tmx b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Content/Screens/Level1/Level1Map.tmx new file mode 100644 index 000000000..f2ce5a1f4 --- /dev/null +++ b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Content/Screens/Level1/Level1Map.tmx @@ -0,0 +1,12 @@ + + + + + + + + + H4sIAAAAAAAACuzXwQkAAAhCUd1/6bbIyws8B1H5bZKOtSr9zd/+uT//x//lP/wXf+Av/Im/5Q/56zN/LnUAAAD//wMAQZZTxQAQAAA= +1024 + + \ No newline at end of file diff --git a/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl.csproj b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl.csproj index 8aaa7b7dd..f513e91a8 100644 --- a/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl.csproj +++ b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl.csproj @@ -829,6 +829,7 @@ FormsScreenGumForms.cs + GumScreenLayeredGumForms.cs @@ -841,6 +842,7 @@ InputScreenGumForms.cs + RenderTargetScreenGumForms.cs @@ -1011,6 +1013,10 @@ FormsScreenGumRuntime.cs + + + GameScreenGumRuntime.cs + @@ -1028,6 +1034,10 @@ InputScreenGumRuntime.cs + + + Level1GumRuntime.cs + NineSliceButtonRuntime.cs @@ -1218,6 +1228,10 @@ FormsScreen.cs + + + GameScreen.cs + GlobalContentScreen.cs @@ -1258,6 +1272,10 @@ LayerScreen.cs + + + Level1.cs + ListScreen.cs @@ -2108,6 +2126,10 @@ PreserveNewest FormsScreenGum + + PreserveNewest + GameScreenGum + PreserveNewest gumscreenlayeredgum @@ -2120,6 +2142,10 @@ PreserveNewest inputscreengum + + PreserveNewest + Level1Gum + PreserveNewest rendertargetscreengum @@ -2364,6 +2390,10 @@ PreserveNewest SceneFile + + PreserveNewest + Level1Map + PreserveNewest SceneFile diff --git a/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl.glux b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl.glux index 6973d6cbc..88c1019b1 100644 --- a/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl.glux +++ b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl.glux @@ -2955,6 +2955,201 @@ Screens\FileScreen + + + GLUE + + GLUE + false + + + gumproject/Screens/GameScreenGum.gusx + true + GlueTestProject.GumRuntimes.GameScreenGumRuntime + + false + + + false + + + + + Type + GameScreenCategory + String + + + CurrentGameScreenCategoryState + true + + + + + Map + FlatRedBall.TileGraphics.LayeredTileMap + + + AssociateWithFactory + true + bool + + + + bool + CreateEntitiesFromTiles + true + + + bool + ShiftMapToMoveGameplayLayerToZ0 + true + + FlatRedBallType + FlatRedBall.TileGraphics.LayeredTileMap + true + true + true + false + + + SolidCollision + FlatRedBall.TileCollisions.TileShapeCollection + + + AssociateWithFactory + true + bool + + + CollisionCreationOptions + 4 + int + + + CollisionTileSize + 16 + float + + + CollisionFillWidth + 32 + int + + + CollisionFillHeight + 1 + int + + + InnerSizeWidth + 800 + float + + + InnerSizeHeight + 600 + float + + + SourceTmxName + Map + String + + + CollisionTileTypeName + SolidCollision + String + + + FlatRedBallType + FlatRedBall.TileCollisions.TileShapeCollection + true + true + true + true + false + + + CloudCollision + FlatRedBall.TileCollisions.TileShapeCollection + + + AssociateWithFactory + true + bool + + + CollisionCreationOptions + 4 + int + + + CollisionTileSize + 16 + float + + + CollisionFillWidth + 32 + int + + + CollisionFillHeight + 1 + int + + + InnerSizeWidth + 800 + float + + + InnerSizeHeight + 600 + float + + + SourceTmxName + Map + String + + + CollisionTileTypeName + CloudCollision + String + + + FlatRedBallType + FlatRedBall.TileCollisions.TileShapeCollection + true + true + true + true + false + + + + + GameScreenCategory + + + State1 + + + + State2 + + + + + CurrentGameScreenCategoryState + + + + Screens\GameScreen + + GLUE @@ -3920,6 +4115,199 @@ Screens\LocalizationScreen + + + GLUE + + GLUE + false + + + GumProject/Screens/Level1Gum.gusx + true + GlueTestProject.GumRuntimes.Level1GumRuntime + + false + + + Screens/Level1/Level1Map.tmx + + + CreationOptions + {"IncludeDefaultTileset":true,"IncludeGameplayLayer":true,"SolidCollisionCheckBoxVisibility":0,"IsSolidCollisionBorderChecked":true,"ShouldAddCollisionBorder":true} + + + true + FlatRedBall.TileGraphics.LayeredTileMap + + false + + + false + + + + + Type + GameScreenCategory + String + + + CurrentGameScreenCategoryState + true + true + + + + + Map + FlatRedBall.TileGraphics.LayeredTileMap + + + AssociateWithFactory + true + bool + + + + bool + CreateEntitiesFromTiles + true + + + bool + ShiftMapToMoveGameplayLayerToZ0 + true + + File + Screens/Level1/Level1Map.tmx + Entire File (LayeredTileMap) + true + true + true + false + + + SolidCollision + FlatRedBall.TileCollisions.TileShapeCollection + + + AssociateWithFactory + true + bool + + + CollisionCreationOptions + 4 + int + + + CollisionTileSize + 16 + float + + + CollisionFillWidth + 32 + int + + + CollisionFillHeight + 1 + int + + + InnerSizeWidth + 800 + float + + + InnerSizeHeight + 600 + float + + + SourceTmxName + Map + String + + + CollisionTileTypeName + SolidCollision + String + + + FlatRedBallType + FlatRedBall.TileCollisions.TileShapeCollection + true + true + true + true + false + + + CloudCollision + FlatRedBall.TileCollisions.TileShapeCollection + + + AssociateWithFactory + true + bool + + + CollisionCreationOptions + 4 + int + + + CollisionTileSize + 16 + float + + + CollisionFillWidth + 32 + int + + + CollisionFillHeight + 1 + int + + + InnerSizeWidth + 800 + float + + + InnerSizeHeight + 600 + float + + + SourceTmxName + Map + String + + + CollisionTileTypeName + CloudCollision + String + + + FlatRedBallType + FlatRedBall.TileCollisions.TileShapeCollection + true + true + true + true + false + + + Screens\Level1 + + Screens\GameScreen + GLUE diff --git a/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/GumRuntimes/GameScreenGumRuntime.cs b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/GumRuntimes/GameScreenGumRuntime.cs new file mode 100644 index 000000000..2c43de481 --- /dev/null +++ b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/GumRuntimes/GameScreenGumRuntime.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace GlueTestProject.GumRuntimes +{ + public partial class GameScreenGumRuntime + { + partial void CustomInitialize () + { + } + } +} diff --git a/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/GumRuntimes/Level1GumRuntime.cs b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/GumRuntimes/Level1GumRuntime.cs new file mode 100644 index 000000000..dcf1b15ae --- /dev/null +++ b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/GumRuntimes/Level1GumRuntime.cs @@ -0,0 +1,13 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +namespace GlueTestProject.GumRuntimes +{ + public partial class Level1GumRuntime + { + partial void CustomInitialize () + { + } + } +} diff --git a/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Screens/GameScreen.cs b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Screens/GameScreen.cs new file mode 100644 index 000000000..531e43d8c --- /dev/null +++ b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Screens/GameScreen.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; + +using FlatRedBall; +using FlatRedBall.Input; +using FlatRedBall.Instructions; +using FlatRedBall.AI.Pathfinding; +using FlatRedBall.Graphics.Animation; +using FlatRedBall.Gui; +using FlatRedBall.Math; +using FlatRedBall.Math.Geometry; +using FlatRedBall.Localization; +using Microsoft.Xna.Framework; + +using GlueTestProject.Entities; + + +namespace GlueTestProject.Screens +{ + public partial class GameScreen + { + + void CustomInitialize() + { + + + } + + void CustomActivity(bool firstTimeCalled) + { + + + } + + void CustomDestroy() + { + + + } + + static void CustomLoadStaticContent(string contentManagerName) + { + + + } + + } +} diff --git a/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Screens/Level1.cs b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Screens/Level1.cs new file mode 100644 index 000000000..46f505424 --- /dev/null +++ b/Tests/GlueTestProjectDesktopGl/GlueTestProjectDesktopGl/Screens/Level1.cs @@ -0,0 +1,50 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Linq; + +using FlatRedBall; +using FlatRedBall.Input; +using FlatRedBall.Instructions; +using FlatRedBall.AI.Pathfinding; +using FlatRedBall.Graphics.Animation; +using FlatRedBall.Gui; +using FlatRedBall.Math; +using FlatRedBall.Math.Geometry; +using FlatRedBall.Localization; +using Microsoft.Xna.Framework; + +using GlueTestProject.Entities; + + +namespace GlueTestProject.Screens +{ + public partial class Level1 + { + + void CustomInitialize() + { + + + } + + void CustomActivity(bool firstTimeCalled) + { + + + } + + void CustomDestroy() + { + + + } + + static void CustomLoadStaticContent(string contentManagerName) + { + + + } + + } +}