Skip to content

Commit

Permalink
[HaCreator] Disable VR border on post-bb wz
Browse files Browse the repository at this point in the history
  • Loading branch information
lastbattle committed Jan 12, 2021
1 parent 355a80a commit 3e939b1
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions HaCreator/MapSimulator/MapSimulator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ public class MapSimulator : Microsoft.Xna.Framework.Game

// Etc
private readonly Board mapBoard;
private bool bBigBangUpdate = true, bBigBang2Update = true;

// Spine
private SkeletonMeshRenderer skeletonMeshRenderer;
Expand Down Expand Up @@ -240,6 +241,9 @@ protected override void LoadContent()
WzDirectory UIWZFile = Program.WzManager["ui"];
WzDirectory SoundWZFile = Program.WzManager["sound"];

this.bBigBangUpdate = UIWZFile["UIWindow2.img"]?["BigBang!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"] != null; // different rendering for pre and post-bb, to support multiple vers
this.bBigBang2Update = UIWZFile["UIWindow2.img"]?["BigBang2!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"] != null;

// BGM
if (Program.InfoManager.BGMs.ContainsKey(mapBoard.MapInfo.bgm))
{
Expand Down Expand Up @@ -401,7 +405,7 @@ protected override void LoadContent()
while (!t_tiles.IsCompleted || !t_Background.IsCompleted || !t_reactor.IsCompleted || !t_npc.IsCompleted || !t_mobs.IsCompleted || !t_portal.IsCompleted ||
!t_tooltips.IsCompleted || !t_cursor.IsCompleted || !t_spine.IsCompleted || !t_minimap.IsCompleted)
{
Thread.Sleep(50);
Thread.Sleep(100);
}

#if DEBUG
Expand Down Expand Up @@ -780,7 +784,7 @@ protected override void Draw(GameTime gameTime)
[MethodImpl(MethodImplOptions.AggressiveInlining)]
private void DrawVRFieldBorder(SpriteBatch sprite)
{
if ((vr_fieldBoundary.X == 0 && vr_fieldBoundary.Y == 0) || !bDrawVRBorderLeftRight)
if (bBigBang2Update || !bDrawVRBorderLeftRight || (vr_fieldBoundary.X == 0 && vr_fieldBoundary.Y == 0))
return;

Color borderColor = Color.Black;
Expand Down

0 comments on commit 3e939b1

Please sign in to comment.