Skip to content

Commit

Permalink
Merge branch 'Albeoris:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
SamsamTS authored Feb 23, 2024
2 parents fc75034 + 394c1ba commit 334e701
Show file tree
Hide file tree
Showing 45 changed files with 660 additions and 224 deletions.
1 change: 0 additions & 1 deletion Assembly-CSharp/Antlr3/BitSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ public BitSet()
}

/** <summary>Construction from a static array of longs</summary> */
[CLSCompliant( false )]
public BitSet( ulong[] bits )
{
_bits = bits;
Expand Down
2 changes: 0 additions & 2 deletions Assembly-CSharp/Antlr3/BufferedTokenStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@ public class BufferedTokenStream : ITokenStream, ITokenStreamInformation
* as its moving window moves through the input. This list captures
* everything so we can access complete input text.
*/
[CLSCompliant(false)]
protected List<IToken> _tokens = new List<IToken>(100);

/** Track the last mark() call result value for use in rewind(). */
Expand All @@ -72,7 +71,6 @@ public class BufferedTokenStream : ITokenStream, ITokenStreamInformation
* to initialize with first token. The ctor doesn't get a token.
* First call to LT(1) or whatever gets the first token and sets p=0;
*/
[CLSCompliant(false)]
protected int _p = -1;

public BufferedTokenStream()
Expand Down
1 change: 0 additions & 1 deletion Assembly-CSharp/Antlr3/RecognizerSharedState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ public class RecognizerSharedState
*/
//public List<BitSet> following;
public BitSet[] following;
[CLSCompliant( false )]
public int _fsp;

/** <summary>
Expand Down
1 change: 0 additions & 1 deletion Assembly-CSharp/Antlr3/UnbufferedTokenStream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ namespace Antlr.Runtime
*/
public class UnbufferedTokenStream : LookaheadStream<IToken>, ITokenStream, ITokenStreamInformation
{
[CLSCompliant(false)]
protected ITokenSource tokenSource;
protected int tokenIndex; // simple counter to set token index in tokens

Expand Down
3 changes: 2 additions & 1 deletion Assembly-CSharp/Assembly-CSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@
<AssemblyName>Assembly-CSharp</AssemblyName>
<TargetFrameworkVersion>v3.5</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<TargetFrameworkProfile>Client</TargetFrameworkProfile>
<TargetFrameworkProfile>
</TargetFrameworkProfile>
<FrameworkPathOverride>$(SolutionDir)\References\</FrameworkPathOverride>
<LangVersion>latest</LangVersion>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion Assembly-CSharp/Global/BGSCENE_DEF.cs
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ public void ExportMemoriaBGX(String bgxExportPath)
{
Color firstPixel = this.atlas.GetPixel(0, 0);
}
catch (Exception err)
catch (Exception)
{
atlasIsReadable = false;
}
Expand Down
29 changes: 18 additions & 11 deletions Assembly-CSharp/Global/Field/Map/FieldMap.cs
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,23 @@ public void CenterCameraOnPlayer()
break;
}
}
if (Configuration.Graphics.ScreenIs16to10())
{
switch (map) // offsets for scrolling maps stretched to WS
{
case 456: // Dali Mountain/Summit
localPosition.x = 160 + 35;
break;
case 505: // Cargo ship offset
localPosition.x = 105 - 35;
break;
case 1153: // Rose Rouge cockpit offset
localPosition.x = 175 - 35;
break;
default:
break;
}
}
}

camera.transform.localPosition = localPosition;
Expand All @@ -743,6 +760,7 @@ public void CenterCameraOnPlayer()
//{mapNo,pixels on each side to crop because of scrollable}
{1051,8},
{1057,16},
{1058,16},
{1060,16},
{1652,16},
{1653,16},
Expand Down Expand Up @@ -980,13 +998,6 @@ public void ff9fieldInternalBattleEncountStart()
FieldMap.FF9FieldAttr.field[0, 2] = 6425;
}

private void PSVSet(ref ff9.SVECTOR vRot, Int16 thetaX, Int32 b, Int16 thetaZ)
{
vRot.vx = thetaX;
vRot.vy = (Int16)b;
vRot.vz = thetaZ;
}

private void EBG_init()
{
this.EBG_stateInit();
Expand Down Expand Up @@ -1599,10 +1610,6 @@ private void UpdateOverlay(Int32 ovrNdx, BGOVERLAY_DEF overlayPtr, Vector2 realV
overlayPtr.scrY = num2;
}

public void UpdateSortingOrder(BGOVERLAY_DEF overlayPtr, BGSPRITE_LOC_DEF sprite, Int32 i)
{
}

public void EBG_scene2DScroll(Int16 destX, Int16 destY, UInt16 frameCount, UInt32 scrollType)
{
if (!IsActive)
Expand Down
149 changes: 147 additions & 2 deletions Assembly-CSharp/Global/Field/Map/NarrowMapList.cs
Original file line number Diff line number Diff line change
@@ -1,10 +1,23 @@
using System;
using System.Collections.Generic;

using System.Linq;
using Memoria;
public static class NarrowMapList
{
public static Boolean IsCurrentMapNarrow() => IsNarrowMap(FF9StateSystem.Common.FF9.fldMapNo, PersistenSingleton<EventEngine>.Instance?.fieldmap?.camIdx ?? -1);
public static Boolean IsNarrowMap(Int32 mapId, Int32 camId) => ListFullNarrow.Contains(mapId) || (ListPartialNarrow.TryGetValue(mapId, out HashSet<Int32> narrowCams) && narrowCams.Contains(camId));
public static Boolean IsNarrowMap(Int32 mapId, Int32 camId)
{
if (_ScreenIs16to10 && ListWideWhen16to10.Contains(mapId))
return false;
if (ListFullNarrow.Contains(mapId))
return true;

if (ListPartialNarrow.TryGetValue(mapId, out HashSet<Int32> narrowCams) && narrowCams.Contains(camId))
return true;
return false;
}

private static readonly Boolean _ScreenIs16to10 = Configuration.Graphics.ScreenIs16to10();

private static readonly Dictionary<Int32, HashSet<Int32>> ListPartialNarrow = new Dictionary<Int32, HashSet<Int32>>()
{
Expand Down Expand Up @@ -419,4 +432,136 @@ public static class NarrowMapList
3058, // Mage Village/Water Mil
3100,
};

private static readonly HashSet<Int32> ListWideWhen16to10 = new HashSet<Int32>()
{
55,
60,
102,
109,
150,
157,
161,
162,
201,
206,
207,
251,
252,
262,
405,
407,
456,
505,
553,
556,
561,
565,
566,
568,
569,
571,
613,
656,
657,
658,
659,
663,
705,
751,
753,
755,
806,
813,
851,
855,
901,
911,
913,
950,
1017,
1018,
1054,
1058,
1104,
1108,
1153,
1201,
1205,
1210,
1213,
1218,
1222,
1251,
1254,
1303,
1312,
1313,
1363,
1403,
1404,
1408,
1414,
1424,
1452,
1453,
1456,
1509,
1600,
1601,
1602,
1656,
1700,
1701,
1702,
1803,
1810,
1814,
1817,
1820,
1852,
1858,
1901,
1911,
1913,
1953,
2002,
2004,
2006,
2052,
2103,
2112,
2113,
2163,
2200,
2212,
2213,
2222,
2352,
2353,
2355,
2400,
2406,
2451,
2502,
2503,
2551,
2601,
2650,
2657,
2658,
2706,
2851,
2855,
2856,
2904,
2906,
2913,
2915,
2928,
3005,
3052,
3055,
3100,
};
}
5 changes: 3 additions & 2 deletions Assembly-CSharp/Global/Hono/Behavior/HonoBehaviorSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,9 @@ private void Update()

private void LateUpdate()
{
// Dummied: the FPSManager always handles the regularity of the main loop
return;
/* //Dummied: the FPSManager always handles the regularity of the main loop
if (!HonoBehaviorSystem.FrameSkipEnabled)
return;
Single deltaTime = Time.deltaTime;
Expand All @@ -227,7 +228,7 @@ private void LateUpdate()
{
HonoBehaviorSystem._cumulativeTime -= HonoBehaviorSystem.TargetFrameTime * (Single)num;
HonoBehaviorSystem.ExtraLoopCount = num - 1;
}
}*/
}

private void OnGUI()
Expand Down
4 changes: 2 additions & 2 deletions Assembly-CSharp/Global/SFXRender/SFXRender.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ public static void SaveSFXDataMeshes()
foreach (Int32 sfxFrameNum in data.frameMesh.Keys)
if (lastFrame < sfxFrameNum)
lastFrame = sfxFrameNum;
if (false) // last 2 saves: from camera above with units far away (y) and bone positions artificially splitted (x), find where pieces are placed wrt. caster and target
/*if (false) // last 2 saves: from camera above with units far away (y) and bone positions artificially splitted (x), find where pieces are placed wrt. caster and target
{
data.SwitchToWorldCoordinates();
foreach (SFXDataMeshConverter.Frame sfxFrame in data.frameMesh.Values)
Expand Down Expand Up @@ -179,7 +179,7 @@ public static void SaveSFXDataMeshes()
data.TryFixDepth();
data.SwitchToWorldCoordinates();
//data.ComputePositionInformations();
}
}*/
//if (File.Exists(outputFName))
//{
// SFXDataMeshConverter previousCaption = new SFXDataMeshConverter();
Expand Down
6 changes: 5 additions & 1 deletion Assembly-CSharp/Global/Sound/Lib/SoundLib.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,10 @@ public static void PlayMovieMusic(String movieName, Int32 offsetTimeMSec = 0)
Int32 movieSoundIndex = SoundLib.GetMovieSoundIndex(movieName);
if (movieSoundIndex != -1)
{
SoundLib.MovieAudioPlayer.PlayMusic(movieSoundIndex, offsetTimeMSec, SoundProfileType.MovieAudio);
//if (movieName == "FMV000")
// SoundLib.MovieAudioPlayer.PlayMusic(movieSoundIndex, offsetTimeMSec, SoundProfileType.MovieAudio);
//else
SoundLib.MovieAudioPlayer.PlayMusic(movieSoundIndex, offsetTimeMSec, SoundProfileType.MovieAudio);
}
else
{
Expand All @@ -40,6 +43,7 @@ public static Int32 GetMovieSoundIndex(String movieName)
if (String.Equals(movieName, "FMV000"))
{
soundName = "Sounds01/BGM_/music033";
//return SoundMetaData.GetSoundIndex(soundName, SoundProfileType.Music);
}
else if (String.Equals(movieName, "FMV059"))
{
Expand Down
2 changes: 1 addition & 1 deletion Assembly-CSharp/Global/TileSystem/TileSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ public Overlay GetOverlay(int num)
{
return _overlays[num];
}
catch (Exception e)
catch (Exception)
{
return null;
}
Expand Down
4 changes: 2 additions & 2 deletions Assembly-CSharp/Global/ff9/ff9.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3878,8 +3878,8 @@ public static void w_effectUpdate()
}
else if (no == 25)
{
if (worldSPS.frame >= 3)
;
//if (worldSPS.frame >= 3)
// ;
}
else if (no == 32)
{
Expand Down
4 changes: 2 additions & 2 deletions Assembly-CSharp/Memoria/Assets/Text/AudioResources.cs
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public static Boolean TryAppendDisplayName(String relativePath, out String direc
fileName = relativePath.Substring(index + 1);
}

bool skipRename = false;
//bool skipRename = false;
// Find a display name
String displayName;
if (fileName.Length == 8 && fileName.StartsWith("music")) // music???
Expand All @@ -96,7 +96,7 @@ public static Boolean TryAppendDisplayName(String relativePath, out String direc
{
string[] pathParts = directoryPath.Split(new char[] { '/' });
displayName = fileName;
skipRename = true;
//skipRename = true;
}
// TODO: FMV, SE, Songs
else
Expand Down
Loading

0 comments on commit 334e701

Please sign in to comment.