diff --git a/Assembly-CSharp/Assembly-CSharp.csproj b/Assembly-CSharp/Assembly-CSharp.csproj
index 03ba1e83f..ea2cf667c 100644
--- a/Assembly-CSharp/Assembly-CSharp.csproj
+++ b/Assembly-CSharp/Assembly-CSharp.csproj
@@ -12,7 +12,7 @@
Assembly-CSharp
v3.5
512
- Unity Full v3.5
+ Client
$(SolutionDir)\References\
latest
diff --git a/Assembly-CSharp/Assets/Sources/Scripts/EventEngine/Utils/CalcStack.cs b/Assembly-CSharp/Assets/Sources/Scripts/EventEngine/Utils/CalcStack.cs
index aaa00a788..a1b6efe50 100644
--- a/Assembly-CSharp/Assets/Sources/Scripts/EventEngine/Utils/CalcStack.cs
+++ b/Assembly-CSharp/Assets/Sources/Scripts/EventEngine/Utils/CalcStack.cs
@@ -1,67 +1,79 @@
using System;
+using System.Collections.Generic;
using Memoria.Prime;
namespace Assets.Sources.Scripts.EventEngine.Utils
{
public class CalcStack
{
- public Boolean push(Int32 arg0)
+ public Boolean push(Int32 val)
{
- if (this.topOfStackID >= this.stack.Length - 1)
- return false;
- this.stack[this.topOfStackID] = arg0;
- this.topOfStackID++;
+ while (topOfStackID >= stack.Count)
+ stack.Add(0);
+ stack[topOfStackID++] = val;
return true;
}
public Boolean pop(out Int32 output)
{
- if (this.topOfStackID == 0)
+ if (topOfStackID == 0)
{
- Log.Error($"[{nameof(CalcStack)}.{nameof(pop)}] this.topOfStackID == 0");
+ Log.Error($"[{nameof(CalcStack)}.{nameof(pop)}] topOfStackID == 0");
output = default;
return false;
}
- output = this.stack[this.topOfStackID - 1];
- this.topOfStackID--;
+ output = stack[--topOfStackID];
return true;
}
public Boolean advanceTopOfStack()
{
- if (this.topOfStackID >= this.stack.Length - 1)
- return false;
- this.topOfStackID++;
+ topOfStackID++;
+ while (topOfStackID > stack.Count)
+ stack.Add(0);
return true;
}
public Boolean retreatTopOfStack()
{
- if (this.topOfStackID == 0)
+ if (topOfStackID == 0)
return false;
- this.topOfStackID--;
+ topOfStackID--;
return true;
}
public void emptyCalcStack()
{
- for (Int32 i = 0; i < this.stack.Length; i++)
- this.stack[i] = 0;
- this.topOfStackID = 0;
+ substack.Clear();
+ for (Int32 i = 0; i < stack.Count; i++)
+ stack[i] = 0;
+ topOfStackID = 0;
}
public Int32 getTopOfStackID()
{
- return this.topOfStackID;
+ return topOfStackID;
}
public Int32 getValueAtOffset(Int32 offset)
{
- return this.stack[this.topOfStackID + offset];
+ return stack[topOfStackID + offset];
+ }
+
+ public void pushSubs(params Int32[] val)
+ {
+ substack[topOfStackID] = new List(val);
+ }
+
+ public List getSubs()
+ {
+ if (substack.TryGetValue(topOfStackID, out List result))
+ return result;
+ return new List();
}
- private const Int32 STACK_SIZE = 16;
- private Int32[] stack = new Int32[STACK_SIZE];
+ private Dictionary> substack = new Dictionary>();
+ private List stack = new List(16);
private Int32 topOfStackID;
}
}
diff --git a/Assembly-CSharp/Global/EBin.cs b/Assembly-CSharp/Global/EBin.cs
index dabd40cca..472c3e941 100644
--- a/Assembly-CSharp/Global/EBin.cs
+++ b/Assembly-CSharp/Global/EBin.cs
@@ -1,6 +1,7 @@
using System;
using System.IO;
using System.Linq;
+using System.Collections.Generic;
using Assets.Sources.Scripts.EventEngine.Utils;
using FF9;
using Memoria;
@@ -414,28 +415,28 @@ private void expr_customSubCommand()
args[i] = EvaluateValueExpression();
_v0 = 0;
switch (commandId)
- {
- case flexible_varfunc.ITEM_REGULAR_TO_ID:
- _v0 = ff9item.GetItemIdFromRegularId((RegularItem)args[0]);
- break;
+ {
+ case flexible_varfunc.ITEM_REGULAR_TO_ID:
+ _v0 = ff9item.GetItemIdFromRegularId((RegularItem)args[0]);
+ break;
case flexible_varfunc.ITEM_ID_TO_REGULAR:
_v0 = (Int32)ff9item.GetRegularIdFromItemId(args[0]);
break;
case flexible_varfunc.ITEM_KEY_TO_ID:
- _v0 = ff9item.GetItemIdFromImportantId(args[0]);
- break;
+ _v0 = ff9item.GetItemIdFromImportantId(args[0]);
+ break;
case flexible_varfunc.ITEM_ID_TO_KEY:
_v0 = (Int32)ff9item.GetImportantIdFromItemId(args[0]);
break;
case flexible_varfunc.ITEM_CARD_TO_ID:
- _v0 = ff9item.GetItemIdFromCardId((TetraMasterCardId)args[0]);
- break;
+ _v0 = ff9item.GetItemIdFromCardId((TetraMasterCardId)args[0]);
+ break;
case flexible_varfunc.ITEM_ID_TO_CARD:
_v0 = (Int32)ff9item.GetCardIdFromItemId(args[0]);
break;
case flexible_varfunc.ABILITY_ACTIVE_TO_ID:
- _v0 = ff9abil.GetAbilityIdFromActiveAbility((BattleAbilityId)args[0]);
- break;
+ _v0 = ff9abil.GetAbilityIdFromActiveAbility((BattleAbilityId)args[0]);
+ break;
case flexible_varfunc.ABILITY_ID_TO_ACTIVE:
_v0 = (Int32)ff9abil.GetActiveAbilityFromAbilityId(args[0]);
break;
@@ -443,20 +444,20 @@ private void expr_customSubCommand()
_v0 = ff9abil.GetAbilityIdFromSupportAbility((SupportAbility)args[0]);
break;
case flexible_varfunc.ABILITY_ID_TO_SUPPORT:
- _v0 = (Int32)ff9abil.GetSupportAbilityFromAbilityId(args[0]);
- break;
- case flexible_varfunc.PARTY_MEMBER:
- _v0 = (Int32)ff9play.CharacterIDToOldIndex(FF9StateSystem.Common.FF9.party.GetCharacterId(args[0]));
- break;
- case flexible_varfunc.ITEM_FULL_COUNT:
- _v0 = ff9item.FF9Item_GetAnyCount((RegularItem)args[0]);
- break;
- case flexible_varfunc.PLAYER_EQUIP:
- _v0 = (Int32)(FF9StateSystem.Common.FF9.GetPlayer(ff9play.CharacterOldIndexToID((CharacterOldIndex)args[0]))?.equip[args[1]] ?? RegularItem.NoItem);
- break;
- case flexible_varfunc.PLAYER_LEVEL:
- _v0 = FF9StateSystem.Common.FF9.GetPlayer(ff9play.CharacterOldIndexToID((CharacterOldIndex)args[0]))?.level ?? 0;
- break;
+ _v0 = (Int32)ff9abil.GetSupportAbilityFromAbilityId(args[0]);
+ break;
+ case flexible_varfunc.PARTY_MEMBER:
+ _v0 = (Int32)ff9play.CharacterIDToOldIndex(FF9StateSystem.Common.FF9.party.GetCharacterId(args[0]));
+ break;
+ case flexible_varfunc.ITEM_FULL_COUNT:
+ _v0 = ff9item.FF9Item_GetAnyCount((RegularItem)args[0]);
+ break;
+ case flexible_varfunc.PLAYER_EQUIP:
+ _v0 = (Int32)(FF9StateSystem.Common.FF9.GetPlayer(ff9play.CharacterOldIndexToID((CharacterOldIndex)args[0]))?.equip[args[1]] ?? RegularItem.NoItem);
+ break;
+ case flexible_varfunc.PLAYER_LEVEL:
+ _v0 = FF9StateSystem.Common.FF9.GetPlayer(ff9play.CharacterOldIndexToID((CharacterOldIndex)args[0]))?.level ?? 0;
+ break;
case flexible_varfunc.PLAYER_EXP:
_v0 = (Int32)(FF9StateSystem.Common.FF9.GetPlayer(ff9play.CharacterOldIndexToID((CharacterOldIndex)args[0]))?.exp ?? 0);
break;
@@ -468,7 +469,7 @@ private void expr_customSubCommand()
else
_v0 = (Int32)ff9level.CharacterLevelUps[args[0] - 1].ExperienceToLevel;
break;
- case flexible_varfunc.PLAYER_ABILITY_LEARNT:
+ case flexible_varfunc.PLAYER_ABILITY_LEARNT:
{
PLAYER player = FF9StateSystem.Common.FF9.GetPlayer(ff9play.CharacterOldIndexToID((CharacterOldIndex)args[0]));
if (player == null || !ff9abil.FF9Abil_HasAp(new Character(player)))
@@ -483,19 +484,31 @@ private void expr_customSubCommand()
_v0 = 1;
break;
}
- case flexible_varfunc.PLAYER_SUPPORT_ENABLED:
+ case flexible_varfunc.PLAYER_SUPPORT_ENABLED:
{
PLAYER player = FF9StateSystem.Common.FF9.GetPlayer(ff9play.CharacterOldIndexToID((CharacterOldIndex)args[0]));
_v0 = player != null && player.saExtended.Contains((SupportAbility)args[1]) ? 1 : 0;
break;
}
- case flexible_varfunc.SHOP_ITEM:
+ case flexible_varfunc.SHOP_ITEM:
_v0 = ff9buy.ShopItems.ContainsKey(args[0]) && ff9buy.ShopItems[args[0]].ItemIds.Contains((RegularItem)args[1]) ? 1 : 0;
break;
- case flexible_varfunc.SHOP_SYNTH:
+ case flexible_varfunc.SHOP_SYNTH:
_v0 = ff9mix.SynthesisData.ContainsKey(args[1]) && ff9mix.SynthesisData[args[1]].Shops.Contains(args[0]) ? 1 : 0;
break;
- }
+ case flexible_varfunc.VECTOR:
+ _s7.pushSubs(args[0], args[1]);
+ _s7.push(encodeTypeAndVarClass(VariableSource.Null, VariableType.Vector));
+ return;
+ case flexible_varfunc.VECTOR_SIZE:
+ _s7.pushSubs(args[0]);
+ _s7.push(encodeTypeAndVarClass(VariableSource.Null, VariableType.VectorSize));
+ return;
+ case flexible_varfunc.DICTIONARY:
+ _s7.pushSubs(args[0], args[1]);
+ _s7.push(encodeTypeAndVarClass(VariableSource.Null, VariableType.Dictionary));
+ return;
+ }
expr_Push_v0_Int24();
}
@@ -524,7 +537,7 @@ public Int32 setVarManually(Int32 varOperation, Int32 value)
varCode |= varArrayIndex;
_s7.push(varCode);
SetVariableValue(value);
- varCode |= encodeTypeAndVarClass(7);
+ varCode |= encodeVarClass(VariableSource.Int26);
_s7.push(varCode);
return varCode;
@@ -684,7 +697,7 @@ private void expr_jumpToSubCommand(op_binary arg0)
_v0 = EvaluateValueExpression();
if (t3 == 0)
{
- expr_adZ();
+ expr_Push_v0_Int24();
}
else
{
@@ -699,7 +712,7 @@ private void expr_jumpToSubCommand(op_binary arg0)
_v0 = EvaluateValueExpression();
if (t3 == 0)
{
- expr_adZ();
+ expr_Push_v0_Int24();
}
else
{
@@ -891,8 +904,7 @@ private void expr_jumpToSubCommand(op_binary arg0)
{
Int32 a0 = s1.getByteIP();
s1.ip++;
- int a1 = encodeTypeAndVarClass(6);
- a0 |= a1;
+ a0 |= encodeVarClass(VariableSource.Member);
_s7.push(a0);
break;
}
@@ -977,7 +989,7 @@ private void expr_jumpToSubCommand(op_binary arg0)
_s7.advanceTopOfStack();
if (t3 == 0)
{
- expr_adZ();
+ expr_Push_v0_Int24();
}
else
{
@@ -996,7 +1008,7 @@ private void expr_jumpToSubCommand(op_binary arg0)
_s7.advanceTopOfStack();
if (t3 == 0)
{
- expr_adZ();
+ expr_Push_v0_Int24();
}
else
{
@@ -1236,54 +1248,33 @@ private void expr_jumpToSubCommand(op_binary arg0)
}
case op_binary.B_OBJSPECA:
{
- Int32 a0 = s1.getByteIP();
- int a1 = s1.getByteIP(1);
+ _s7.push(s1.getByteIP(1) | (s1.getByteIP() << 8) | encodeVarClass(VariableSource.Object));
s1.ip += 2;
- a0 <<= 8;
- a0 |= a1;
- a1 = encodeTypeAndVarClass(4);
- a0 |= a1;
- _s7.push(a0);
break;
}
case op_binary.B_SYSLIST:
{
- Int32 a0 = s1.getByteIP();
+ _s7.push(s1.getByteIP() | encodeVarClass(VariableSource.System));
s1.ip++;
- int a1 = encodeTypeAndVarClass(5);
- a0 |= a1;
- _s7.push(a0);
break;
}
case op_binary.B_SYSVAR:
{
- Int32 a0 = s1.getByteIP();
+ _v0 = _eventEngine.GetSysvar(s1.getByteIP());
s1.ip++;
- _v0 = _eventEngine.GetSysvar(a0);
- a0 = 0x3FFFFFF; // 26 bit (unsigned?)
- a0 = _v0 & a0;
- int a1 = encodeTypeAndVarClass(7);
- a0 |= a1;
- _s7.push(a0);
+ _s7.push((_v0 & 0x3FFFFFF) | encodeVarClass(VariableSource.Int26)); // 26 bit (signed)
break;
}
case op_binary.B_CONST:
{
- Int32 a0 = s1.getShortIP();
+ _s7.push((Int32)s1.getShortIP() | encodeVarClass(VariableSource.Int26));
s1.ip += 2;
- int a1 = encodeTypeAndVarClass(7);
- a0 |= a1;
- _s7.push(a0);
break;
}
case op_binary.B_CONST4:
{
- Int32 a0 = s1.getIntIP();
+ _s7.push((s1.getIntIP() & 0x3FFFFFF) | encodeVarClass(VariableSource.Int26)); // 26 bit (signed)
s1.ip += 4;
- a0 &= 0x3FFFFFF; // 26 bit (unsigned?)
- int a1 = encodeTypeAndVarClass(7);
- a0 |= a1;
- _s7.push(a0);
break;
}
case op_binary.B_EXPR_END:
@@ -1311,16 +1302,10 @@ private static Int32 ConvertFloatAngleToFixedPoint(Single floatAngle)
private void expr_Push_v0_Int24()
{
- int a1 = encodeTypeAndVarClass(7);
- _v0 |= a1;
+ _v0 |= encodeVarClass(VariableSource.Int26);
_s7.push(_v0);
}
- private void expr_adZ()
- {
- expr_Push_v0_Int24();
- }
-
public Int32 bra()
{
Int16 shortIP = s1.getShortIP();
@@ -1677,8 +1662,8 @@ public Int32 CollisionAngle(PosObj po, PosObj pot, Single myrot)
public Int32 EvaluateValueExpression()
{
_s7.pop(out var t0);
- VariableType varType = (VariableType)((getTypeAndVarClass(t0) >> 3) & 7);
- VariableSource cls = (VariableSource)getVarClass(t0);
+ VariableType varType = getVarType(t0);
+ VariableSource cls = getVarClass(t0);
switch (cls)
{
case VariableSource.Global:
@@ -1688,8 +1673,43 @@ public Int32 EvaluateValueExpression()
case VariableSource.Instance:
return GetVariableValueInternal(_instance, t0 & 0xFFFF, varType, _instanceVOfs);
case VariableSource.Null:
- if (varType == VariableType.SBit)
- return GetMemoriaCustomVariable((memoria_variable)(t0 & 0xFFFF));
+ switch (varType)
+ {
+ case VariableType.Any:
+ return GetMemoriaCustomVariable((memoria_variable)(t0 & 0xFFFF));
+ case VariableType.Vector:
+ {
+ List subs = _s7.getSubs();
+ if (subs.Count < 2)
+ return 0;
+ Int32 vectID = subs[0];
+ Int32 arrayIndex = subs[1];
+ if (FF9StateSystem.EventState.gScriptVector.TryGetValue(vectID, out List vect) && arrayIndex >= 0 && arrayIndex < vect.Count)
+ return vect[arrayIndex];
+ return 0;
+ }
+ case VariableType.VectorSize:
+ {
+ List subs = _s7.getSubs();
+ if (subs.Count < 1)
+ return 0;
+ Int32 vectID = subs[0];
+ if (FF9StateSystem.EventState.gScriptVector.TryGetValue(vectID, out List vect))
+ return vect.Count;
+ return 0;
+ }
+ case VariableType.Dictionary:
+ {
+ List subs = _s7.getSubs();
+ if (subs.Count < 2)
+ return 0;
+ Int32 dictID = subs[0];
+ Int32 entryID = subs[1];
+ if (FF9StateSystem.EventState.gScriptDictionary.TryGetValue(dictID, out Dictionary dict) && dict.TryGetValue(entryID, out Int32 val))
+ return val;
+ return 0;
+ }
+ }
return 0;
case VariableSource.Object:
_v0 = getvobj(_eventEngine.GetObjUID((t0 >> 8) & 0xFF), t0 & 0xFF);
@@ -1890,8 +1910,8 @@ public Int32 SetVariableValue(Int32 arg0)
{
_s7.pop(out var t0);
Int32 varValue = arg0;
- VariableType varType = (VariableType)((getTypeAndVarClass(t0) >> 3) & 7);
- VariableSource cls = (VariableSource)getVarClass(t0);
+ VariableType varType = getVarType(t0);
+ VariableSource cls = getVarClass(t0);
switch (cls)
{
case VariableSource.Global:
@@ -1904,8 +1924,74 @@ public Int32 SetVariableValue(Int32 arg0)
SetVariableValueInternal(_instance, t0 & 0xFFFF, varType, varValue, _instanceVOfs);
break;
case VariableSource.Null:
- if (varType == VariableType.SBit)
- SetMemoriaCustomVariable((memoria_variable)(t0 & 0xFFFF), varValue);
+ switch (varType)
+ {
+ case VariableType.Any:
+ SetMemoriaCustomVariable((memoria_variable)(t0 & 0xFFFF), varValue);
+ break;
+ case VariableType.Vector:
+ {
+ List subs = _s7.getSubs();
+ if (subs.Count < 2)
+ break;
+ Int32 vectID = subs[0];
+ Int32 arrayIndex = subs[1];
+ if (FF9StateSystem.EventState.gScriptVector.TryGetValue(vectID, out List vect))
+ {
+ if (arrayIndex == vect.Count)
+ vect.Add(varValue);
+ else if (arrayIndex >= 0 && arrayIndex < vect.Count)
+ vect[arrayIndex] = varValue;
+ }
+ else if (arrayIndex == 0)
+ {
+ vect = new List();
+ vect.Add(varValue);
+ FF9StateSystem.EventState.gScriptVector.Add(vectID, vect);
+ }
+ break;
+ }
+ case VariableType.VectorSize:
+ {
+ List subs = _s7.getSubs();
+ if (subs.Count < 1 || varValue < 0)
+ break;
+ Int32 vectID = subs[0];
+ if (FF9StateSystem.EventState.gScriptVector.TryGetValue(vectID, out List vect))
+ {
+ if (varValue > vect.Count)
+ vect.AddRange(Enumerable.Repeat(0, varValue - vect.Count));
+ else if (varValue < vect.Count)
+ vect.RemoveRange(varValue, vect.Count - varValue);
+ }
+ else
+ {
+ vect = new List(varValue);
+ vect.AddRange(Enumerable.Repeat(0, varValue));
+ FF9StateSystem.EventState.gScriptVector.Add(vectID, vect);
+ }
+ break;
+ }
+ case VariableType.Dictionary:
+ {
+ List subs = _s7.getSubs();
+ if (subs.Count < 2)
+ break;
+ Int32 dictID = subs[0];
+ Int32 entryID = subs[1];
+ if (FF9StateSystem.EventState.gScriptDictionary.TryGetValue(dictID, out Dictionary dict))
+ {
+ dict[entryID] = varValue;
+ }
+ else
+ {
+ dict = new Dictionary();
+ dict[entryID] = varValue;
+ FF9StateSystem.EventState.gScriptDictionary.Add(dictID, dict);
+ }
+ break;
+ }
+ }
break;
case VariableSource.System:
_eventEngine.SetSysList(t0 & 0xFF, varValue);
@@ -1993,20 +2079,24 @@ public Int32 putv(Int32 a)
return _v0;
}
- private Int32 getVarClass(Int32 value)
+ private VariableSource getVarClass(Int32 value)
+ {
+ return (VariableSource)((value >> 26) & 7);
+ }
+
+ private VariableType getVarType(Int32 value)
{
- Int32 typeAndVarClass = getTypeAndVarClass(value);
- return typeAndVarClass & 7;
+ return (VariableType)((value >> 29) & 7);
}
- private Int32 getTypeAndVarClass(Int32 value)
+ private Int32 encodeTypeAndVarClass(VariableSource varSrc, VariableType varType)
{
- return value >> 26;
+ return ((Int32)varSrc << 26) | ((Int32)varType << 29);
}
- private Int32 encodeTypeAndVarClass(Int32 typeAndClass)
+ private Int32 encodeVarClass(VariableSource varSrc)
{
- return typeAndClass << 26;
+ return (Int32)varSrc << 26;
}
public enum event_code_binary
@@ -2294,6 +2384,8 @@ public enum event_code_binary
MOVE_EX,
TURN_OBJ_EX,
AANIM_EX,
+ VECTOR_CLEAR,
+ DICTIONARY_CLEAR,
}
public enum flexible_varfunc : ushort
@@ -2319,6 +2411,9 @@ public enum flexible_varfunc : ushort
PLAYER_SUPPORT_ENABLED,
SHOP_ITEM,
SHOP_SYNTH,
+ VECTOR,
+ VECTOR_SIZE,
+ DICTIONARY,
}
public enum memoria_variable : ushort
@@ -2481,5 +2576,9 @@ public enum VariableType
Byte = 5,
Int16 = 6,
UInt16 = 7,
+ Any = 0,
+ Vector = 1,
+ VectorSize = 2,
+ Dictionary = 3,
}
}
\ No newline at end of file
diff --git a/Assembly-CSharp/Global/Event/Engine/EventEngine.DoEventCode.cs b/Assembly-CSharp/Global/Event/Engine/EventEngine.DoEventCode.cs
index 855fb61f8..4abc79b5c 100644
--- a/Assembly-CSharp/Global/Event/Engine/EventEngine.DoEventCode.cs
+++ b/Assembly-CSharp/Global/Event/Engine/EventEngine.DoEventCode.cs
@@ -2853,6 +2853,20 @@ public Int32 DoEventCode()
AnimationFactory.AddAnimWithAnimatioName(actor.go, FF9DBAll.AnimationDB.GetValue(anim));
return 0;
}
+ case EBin.event_code_binary.VECTOR_CLEAR:
+ {
+ Int32 vectID = this.getv3();
+ if (FF9StateSystem.EventState.gScriptVector.TryGetValue(vectID, out List vect))
+ vect.Clear();
+ return 0;
+ }
+ case EBin.event_code_binary.DICTIONARY_CLEAR:
+ {
+ Int32 dictID = this.getv3();
+ if (FF9StateSystem.EventState.gScriptDictionary.TryGetValue(dictID, out Dictionary dict))
+ dict.Clear();
+ return 0;
+ }
default:
{
switch (this.gMode)
diff --git a/Assembly-CSharp/Global/Event/Engine/EventEngine.Initialize.cs b/Assembly-CSharp/Global/Event/Engine/EventEngine.Initialize.cs
index 1a19dffc6..1bfc90466 100644
--- a/Assembly-CSharp/Global/Event/Engine/EventEngine.Initialize.cs
+++ b/Assembly-CSharp/Global/Event/Engine/EventEngine.Initialize.cs
@@ -42,6 +42,9 @@ public void NewGame()
{
FF9StateSystem.EventState.gStepCount = 0;
FF9StateSystem.EventState.gEventGlobal = new Byte[2048];
+ FF9StateSystem.EventState.gAbilityUsage.Clear();
+ FF9StateSystem.EventState.gScriptVector.Clear();
+ FF9StateSystem.EventState.gScriptDictionary.Clear();
FF9StateSystem.Common.FF9.fldMapNo = (Int16)70; // Opening-For FMV
FF9StateSystem.Common.FF9.fldLocNo = (Int16)EventEngineUtils.eventIDToMESID[70];
FF9StateSystem.Settings.time = 0.0;
diff --git a/Assembly-CSharp/Global/Event/EventState.cs b/Assembly-CSharp/Global/Event/EventState.cs
index b42d45bec..89372c205 100644
--- a/Assembly-CSharp/Global/Event/EventState.cs
+++ b/Assembly-CSharp/Global/Event/EventState.cs
@@ -10,6 +10,8 @@ public class EventState : MonoBehaviour
public Byte[] gEventGlobal = new Byte[2048];
public Dictionary gAbilityUsage = new Dictionary();
+ public Dictionary> gScriptVector = new Dictionary>();
+ public Dictionary> gScriptDictionary = new Dictionary>();
public Int32 ScenarioCounter
{
diff --git a/Assembly-CSharp/Global/Field/Map/NarrowMapList.cs b/Assembly-CSharp/Global/Field/Map/NarrowMapList.cs
index 2e4607530..4bb4a8343 100644
--- a/Assembly-CSharp/Global/Field/Map/NarrowMapList.cs
+++ b/Assembly-CSharp/Global/Field/Map/NarrowMapList.cs
@@ -347,7 +347,6 @@ public static class NarrowMapList
2501, // I. Castle/Entrance
2502, // I. Castle/Hall
2503,
- 2504, // I. Castle/Small Room
2505, // I. Castle/Inverted Roo
2510, // I. Castle/Mural Room
2512, // I. Castle/Mural Room
diff --git a/Assembly-CSharp/Global/JsonParser.cs b/Assembly-CSharp/Global/JsonParser.cs
index c2382341b..ea296443b 100644
--- a/Assembly-CSharp/Global/JsonParser.cs
+++ b/Assembly-CSharp/Global/JsonParser.cs
@@ -512,6 +512,8 @@ private void ParseEventJsonToData(JSONNode jsonData, Boolean oldSaveFormat = tru
if (jsonData["gEventGlobal"] != null)
eventState.gEventGlobal = Convert.FromBase64String(jsonData["gEventGlobal"].Value);
eventState.gAbilityUsage.Clear();
+ eventState.gScriptVector.Clear();
+ eventState.gScriptDictionary.Clear();
if (jsonData["gAbilityUsage"] != null)
{
for (Int32 i = 0; i < jsonData["gAbilityUsage"].Count; i++)
@@ -527,6 +529,38 @@ private void ParseEventJsonToData(JSONNode jsonData, Boolean oldSaveFormat = tru
for (Int32 i = 1; i < 192; i++)
eventState.gAbilityUsage[(BattleAbilityId)i] = eventState.gEventGlobal[1100 + i];
}
+ if (jsonData["gScriptVector"] != null)
+ {
+ for (Int32 i = 0; i < jsonData["gScriptVector"].Count; i++)
+ {
+ JSONClass vectorClass = jsonData["gScriptVector"][i].AsObject;
+ if (vectorClass != null && vectorClass["id"] != null && vectorClass["entries"] != null && vectorClass["entries"].Count > 0)
+ {
+ List vect = new List();
+ for (Int32 j = 0; j < vectorClass["entries"].Count; j++)
+ vect.Add(vectorClass["entries"][j].AsInt);
+ eventState.gScriptVector[vectorClass["id"].AsInt] = vect;
+ }
+ }
+ }
+ if (jsonData["gScriptDictionary"] != null)
+ {
+ for (Int32 i = 0; i < jsonData["gScriptDictionary"].Count; i++)
+ {
+ JSONClass dictionaryClass = jsonData["gScriptDictionary"][i].AsObject;
+ if (dictionaryClass != null && dictionaryClass["id"] != null && dictionaryClass["entries"] != null && dictionaryClass["entries"].Count > 0)
+ {
+ Dictionary dict = new Dictionary();
+ for (Int32 j = 0; j < dictionaryClass["entries"].Count; j++)
+ {
+ JSONClass entry = dictionaryClass["entries"][j].AsObject;
+ if (entry != null && entry["id"] != null && entry["value"] != null)
+ dict[entry["id"].AsInt] = entry["value"].AsInt;
+ }
+ eventState.gScriptDictionary[dictionaryClass["id"].AsInt] = dict;
+ }
+ }
+ }
}
private void ParseEventDataToJson(EventState data, JSONClass dataNode, JSONClass schemaNode, Boolean oldSaveFormat = true)
@@ -546,6 +580,38 @@ private void ParseEventDataToJson(EventState data, JSONClass dataNode, JSONClass
});
}
dataProfileClass.Add("gAbilityUsage", abilArray);
+ JSONArray vectorArray = new JSONArray();
+ foreach (KeyValuePair> kp in data.gScriptVector)
+ {
+ JSONArray entryArray = new JSONArray();
+ foreach (Int32 entry in kp.Value)
+ entryArray.Add(entry.ToString());
+ vectorArray.Add(new JSONClass
+ {
+ { "id", kp.Key.ToString() },
+ { "entries", entryArray }
+ });
+ }
+ dataProfileClass.Add("gScriptVector", vectorArray);
+ JSONArray dictionaryArray = new JSONArray();
+ foreach (KeyValuePair> kp in data.gScriptDictionary)
+ {
+ JSONArray entryArray = new JSONArray();
+ foreach (KeyValuePair entry in kp.Value)
+ {
+ entryArray.Add(new JSONClass
+ {
+ { "id", entry.Key.ToString() },
+ { "value", entry.Value.ToString() }
+ });
+ }
+ dictionaryArray.Add(new JSONClass
+ {
+ { "id", kp.Key.ToString() },
+ { "entries", entryArray }
+ });
+ }
+ dataProfileClass.Add("gScriptDictionary", dictionaryArray);
}
dataNode.Add("20000_Event", dataProfileClass);
if (!oldSaveFormat)
diff --git a/Memoria.Launcher/Catalogs/MemoriaCatalog.xml b/Memoria.Launcher/Catalogs/MemoriaCatalog.xml
index 916a69d61..3812bdc7b 100644
--- a/Memoria.Launcher/Catalogs/MemoriaCatalog.xml
+++ b/Memoria.Launcher/Catalogs/MemoriaCatalog.xml
@@ -21,14 +21,15 @@ Note: this mod doesn't support automatic installation yet. Download it from its
https://sites.google.com/view/moguri-mod
In most situations, it is better to keep 'MoguriFiles' at the lowest priority
+ https://i.imgur.com/nddT44g.jpg
Alternate Fantasy
- 6.1
+ 6.2
AlternateFantasy
Tirlititi
- 11 Jun 2023
+ 28 Sep 2023
Requires Memoria v2023.06.11
This mod aims at increasing the difficulty and, above all, to give a new fresh experience of FF9 for those who already know the game well.
It includes:
@@ -103,7 +104,7 @@ This is actually a lighter version of Alternate Fantasy, to benefit from its add
Garnet is Main Character
GarnetIsMainCharacter
piano221
- 5 Apr 2021
+ 2021-04-05
This mod allow you to change Zidane for Garnet as the field main character.
Character Swap
https://forums.qhimm.com/index.php?topic=20605.0
@@ -116,7 +117,7 @@ This is actually a lighter version of Alternate Fantasy, to benefit from its add
0.5
FreyaGamePlus
ChikoLad
- 30 Jul 2020
+ 2020-07-30
Freya Game+ is a Final Fantasy IX mod that allows you to have Freya in your party at almost all times throughout the game.
This mod removes the need to do any save editing or setting personal restrictions if you want to do a Freya Solo Run.
@@ -133,7 +134,7 @@ Note: this mod doesn't support automatic installation yet. Download it from its
0.1
PlayAsKuja
Tirlititi
- 17 Apr 2021
+ 2021-04-17
Requires Memoria between v2021.05.10 and v2022.09.09 to work in battles
Turn Zidane's 3D model on the field and in battles into Kuja's 3D model.
The animations on the field are messed up.
@@ -146,10 +147,10 @@ You should better use the Playable Characters Pack instead. This later one doesn
Playable Character Pack
- 1.0
+ 1.1
PlayableCharacterPack
Tirlititi
- 11 Jun 2023
+ 2023-09-28
Requires Memoria v2023.06.11
Add Kuja, Fratley and Lani as playable characters.
You can press Alt+F2 in-game to access the party menu (changing the party at any time is a feature of Memoria, not related to this mod).
@@ -175,7 +176,7 @@ You should set the priority of this mod to be higher than the priority of the Mo
David Bowie Edition
DavidBowie
Clem Fandango
- 18 Mar 2020
+ 2020-03-18
Final Fantasy IX: David Bowie Edition (DBE) is a gameplay mod that is meant to function as a rebalance, or better yet a remix of the original game. This mod includes new skills, items, enemy behavior, Chocograph rewards and a number of smaller tweaks.
Gameplay
https://forums.qhimm.com/index.php?topic=19499.0
@@ -184,34 +185,40 @@ You should set the priority of this mod to be higher than the priority of the Mo
Mog Add-ons
- 3.1
+ 3.3
MogAddons
- 28 July 2023, 12:32PM
+ 2023-12-01
faospark
- UI, Buttons , Portraits, and more... an Easy to install collection of enhancements for Final Fantasy IX Steam.
-:: Requirements ::
-- Memoria version v2022.11.11 or higher
-
+ UI, Buttons , Portraits, Tweaks and more... an Easy to install collection of enhancements for Final Fantasy IX Steam.
:: Features ::
Default : FFXI Darker/Sane UI , Opera Omnia Style Portraits , PlayStation Gloss prompts
+Tweaks : AP GAIN , EXP GAIN and Requirements
Portrait options : Default with extended cast, Opera Omnia and Upscaled PS1 Portrait Artwork
Button Prompts Options: PS Gloss , PS5 , Pixel Style, PlayStation Vanilla prompts,
UI : Default , Darker UI and Flat
:: Submod activation ::
-Use the Mod Manager UI to activate each submods you like
-
-:: 3.0 and 3.1 Log ::
-- Added 1 Gem Compatibility with Alternate Fantasy
-- Replaced Amaranth's Opera Omnia Portrait
-- Split default feature of halved EXP and 1 Gem passive ability to ech submod
-
-- Bump compatibility to the recent version of memoria
+Use the Mod Manager UI to activate each submods you like and pick
:: Compatibility ::
- Compatible with Alternate Fantasy
- Not compatible for older versions of the game and repacks.
+Requires Memoria v2023.06.11
+ ::3.3 ::
+-Added 4x AP gain
+-Added 99 AP gain
+-Added 2x+ EXP gain
+-Added 4x+ EXP gain
+-Added NO EXP AND AP GAIN
+::3.2 ::
+-Added double exp and halved ability gems
+:: 3.0 and 3.1 Log ::
+- Added 1 Gem Compatibility with Alternate Fantasy
+- Replaced Amaranth's Opera Omnia Portrait
+- Split default feature of halved EXP and 1 Gem passive ability to ech submod
+- Bump compatibility to the recent version of memoria
+
Visual
https://www.nexusmods.com/finalfantasy9/mods/31
https://www.dropbox.com/s/o1wjflgm0s3dicx/Mog%20Add-ons%20Mod%20FFIX.zip?dl=1
@@ -284,21 +291,63 @@ Use the Mod Manager UI to activate each submods you like
1
- Tweak Enable : 1 Gem Ability
+ Tweak: 1 Gem Ability
Features/Tweaks/Ability
Enables 1 gem for passive abilities to be enabled
1
- Tweak Enable : 1 Gem Ability for Alternate Fantasy
+ Tweak: Halved Gem Ability
+ Features/Tweaks/AbilityHalf
+ Cuts ability gems to half for passive abilities to be enabled
+ 1
+
+
+ Tweak: 1 Gem Ability for Alternate Fantasy
Features/Tweaks/AF Ability
Enables 1 gem for passive abilities to be enabled for alternate fantasy
1
- Tweak Enable : Halved EXP
- Features/Tweaks/Exp
- Cuts the EXP requirement feature to level up by Half
+ Tweak: 4x AP Gain
+ Features/Tweaks/AP4x
+ Gains 4x AP after battle
+ 1
+
+
+ Tweak: 99 AP Gain
+ Features/Tweaks/AP99
+ Gains 99 AP after battle
+ 1
+
+
+ Tweak: 2x+ EXP Gain
+ Features/Tweaks/EXP2x
+ Gains 2x+ EXP after battle
+ 1
+
+
+ Tweak: 4x+ EXP Gain
+ Features/Tweaks/EXP4x
+ Gains 4x+ EXP after battle
+ 1
+
+
+ Tweak: No / Zero AP and EXP Gain
+ Features/Tweaks/EXPAP0
+ If you like things hard.
+ 1
+
+
+ Tweak: Halved EXP
+ Features/Tweaks/ExpHalf
+ Cuts the EXP requirement to level up faster
+ 1
+
+
+ Tweak: Doubled EXP
+ Features/Tweaks/ExpX2
+ Doubles EXP requirement so you level up slower
1
@@ -307,21 +356,21 @@ Use the Mod Manager UI to activate each submods you like
High-Res Chocographs
HDChocographs
Caledor
- 12 May 2021
+ 2021-05-12
Chocographs remade from scratch by taking actual screenshots in FF9 Steam modded with Moguri Mod 8.2.
(English layout only)
Visual
https://forums.qhimm.com/index.php?topic=20657.0
https://i.imgur.com/tpdfrUQ.png
SingleFileWithPath:FF9_Data/EmbeddedAsset/UI/Atlas/Chocograph Atlas
- https://i.imgur.com/M4ce7hE.png
+ https://i.imgur.com/RCVuINt.png
Tweaked Portraits
TweakedPortraits
Lykon
- 16 May 2020
+ 2020-05-16
This is a simple mod that slightly tweaks the portrait shown in the main menu.
Visual
https://forums.qhimm.com/index.php?topic=19964.0
@@ -335,17 +384,16 @@ Use the Mod Manager UI to activate each submods you like
0.2.13
TranceSeek
DVlad666
-
- A hard mod that allows you to experience a new whole adventure! All the monsters and bosses have been redesigned (not only a stats boost but all the AIs are revisited), new skills, mechanics and many other things!
- A multitude of additional fights/bosses are also introduced.
- (This is not an very hardcore difficult mod: it only adds a higher difficulty than the original version while keeping a constant progression.)
+ A hard mod that allows you to experience a new whole adventure! All the monsters and bosses have been redesigned (not only a stats boost but all the AIs are revisited), new skills, mechanics and many other things!
+A multitude of additional fights/bosses are also introduced.
+(This is not an very hardcore difficult mod: it only adds a higher difficulty than the original version while keeping a constant progression.)
- It's currently a demo : CD1 and CD2 only available, CD3 WIP.
- Don't hesitate to try!
+It's currently a demo : CD1 and CD2 only available, CD3 WIP.
+Don't hesitate to try!
Gameplay
https://steamcommunity.com/app/377840/discussions/0/5362100202713255072/
- https://drive.google.com/uc?export=download&id=1ONGayLWtVctUgM33aYWVvzSGqDBEsOIE&confirm=t
+ https://www.dropbox.com/scl/fi/6dz48odlx0hn1b2o0hp9w/TranceSeek-Demo-CD3-by-DV.zip?rlkey=dxnyl6me6d1cbatkkdjcvkowo&dl=1
@@ -353,13 +401,12 @@ Use the Mod Manager UI to activate each submods you like
2.0
PlaystationSounds
DVlad666
-
- Replace the sound assets by the PSX sounds (specially Battle + Tetra Master + Miscellaneous).
- More than 1540 sound files fixed!
+ Replace the sound assets by the PSX sounds (specially Battle + Tetra Master + Miscellaneous).
+More than 1540 sound files fixed!
Audio
https://steamcommunity.com/app/377840/discussions/0/3189117724409401717/
- https://drive.google.com/uc?export=download&id=1RLcIQ9M6AB19IPGDXskoBGcC3siVbLQQ&confirm=t
+ https://www.dropbox.com/scl/fi/mm4tc5k1g2admrl5klw3g/FF9_Sounds_Fix-by-DV.zip?rlkey=d2q5gk289coixe9s4kcdat1ir&dl=1
@@ -367,12 +414,11 @@ Use the Mod Manager UI to activate each submods you like
1.0
TripleTriad
DVlad666
-
- Change the music and background to the Triple Triad FF8 version (based on Tripod !)
- Change some card textures (add boss + characters)
+ Change the music and background to the Triple Triad FF8 version (based on Tripod !)
+Change some card textures (add boss + characters)
Visual
- https://drive.google.com/uc?export=download&id=1H2Z-a656qBdjht2h7UfhujzfW1znpJdU&confirm=t
+ https://www.dropbox.com/scl/fi/tgs1ivzinnhivry5zxac7/TripleTriad-by-DV.zip?rlkey=nnebxpvw10ovvk516xzr6xdcx&dl=1
@@ -391,12 +437,27 @@ many download links should be changed and several ones use the "[Import] Text" f
Brazilian-Portuguese Translation
BrazilianTranslation
- P.O.B.R.E. / Brigandier
- Tradução do jogo em português do Brasil.
+ Harleyquinn / dkPsycho / JonasJTG
+ Tradução totalmente revisada e atualizada para ser usada somente com o Mod Moguri. O jogo está completamente traduzido, incluindo história principal, diálogos secundários, sidequests, informações e outras coisas.
+
+Informações Importantes
+- Não foram traduzidos os nomes dos Itens, equipamentos e magias. Fiz essa escolha para melhor experiência dos veteranos e iniciantes.
+- Ao baixar a tradução existe duas opções na pasta de instalação: 30 FPS e 60 FPS. Instale somente a versão correspondente que queira usar.
+- Alguns mods são imcompatíveis com a tradução pois susbstituem os arquivos de texto ou de textura. Então verifique bem antes de instala-los.
+- Para jogar a versão 60 FPS basta baixar e executar a útima versão do Memoria, encontrada aqui: (https://github.com/Albeoris/Memoria/releases/tag/v2023.06.11)
+
+Para ver o tutorial de como instalar a tradução e acompanhar atualizações e conteúdos de FFIX entrem no meu canal.
+(https://www.youtube.com/@dkpsycho/videos)
+
+Créditos:
+- Harleyquinn: Porte para versão Moguri
+- dkPsycho: Toda parte de tradução, revisão e melhoria
+- JonasJTG: Edição dos Gráficos
Note: this mod doesn't support automatic installation yet. Download it from its website.
Translation
https://steamcommunity.com/sharedfiles/filedetails/?id=2111796362
+ https://i.imgur.com/wYsiAog.jpeg
diff --git a/Memoria.Launcher/Images/btnActivateAllimg.png b/Memoria.Launcher/Images/btnActivateAllimg.png
new file mode 100644
index 000000000..98075285d
Binary files /dev/null and b/Memoria.Launcher/Images/btnActivateAllimg.png differ
diff --git a/Memoria.Launcher/Images/btnActivateAllimg.psd b/Memoria.Launcher/Images/btnActivateAllimg.psd
new file mode 100644
index 000000000..cc00e2972
Binary files /dev/null and b/Memoria.Launcher/Images/btnActivateAllimg.psd differ
diff --git a/Memoria.Launcher/Images/btnCancelimg.png b/Memoria.Launcher/Images/btnCancelimg.png
new file mode 100644
index 000000000..f2cebe70e
Binary files /dev/null and b/Memoria.Launcher/Images/btnCancelimg.png differ
diff --git a/Memoria.Launcher/Images/btnCancelimg.psd b/Memoria.Launcher/Images/btnCancelimg.psd
new file mode 100644
index 000000000..274414c2c
Binary files /dev/null and b/Memoria.Launcher/Images/btnCancelimg.psd differ
diff --git a/Memoria.Launcher/Images/btnCheckCompatibilityimg.png b/Memoria.Launcher/Images/btnCheckCompatibilityimg.png
new file mode 100644
index 000000000..aeca7c166
Binary files /dev/null and b/Memoria.Launcher/Images/btnCheckCompatibilityimg.png differ
diff --git a/Memoria.Launcher/Images/btnCheckCompatibilityimg.psd b/Memoria.Launcher/Images/btnCheckCompatibilityimg.psd
new file mode 100644
index 000000000..f409ea318
Binary files /dev/null and b/Memoria.Launcher/Images/btnCheckCompatibilityimg.psd differ
diff --git a/Memoria.Launcher/Images/btnDeactivateAllimg.png b/Memoria.Launcher/Images/btnDeactivateAllimg.png
new file mode 100644
index 000000000..822c9b53d
Binary files /dev/null and b/Memoria.Launcher/Images/btnDeactivateAllimg.png differ
diff --git a/Memoria.Launcher/Images/btnDeactivateAllimg.psd b/Memoria.Launcher/Images/btnDeactivateAllimg.psd
new file mode 100644
index 000000000..c0e5a2052
Binary files /dev/null and b/Memoria.Launcher/Images/btnDeactivateAllimg.psd differ
diff --git a/Memoria.Launcher/Images/btnDownloadimg.png b/Memoria.Launcher/Images/btnDownloadimg.png
new file mode 100644
index 000000000..3d2aa0df9
Binary files /dev/null and b/Memoria.Launcher/Images/btnDownloadimg.png differ
diff --git a/Memoria.Launcher/Images/btnDownloadimg.psd b/Memoria.Launcher/Images/btnDownloadimg.psd
new file mode 100644
index 000000000..f32047570
Binary files /dev/null and b/Memoria.Launcher/Images/btnDownloadimg.psd differ
diff --git a/Memoria.Launcher/Images/btnMoveDownimg.png b/Memoria.Launcher/Images/btnMoveDownimg.png
new file mode 100644
index 000000000..c8758e5e1
Binary files /dev/null and b/Memoria.Launcher/Images/btnMoveDownimg.png differ
diff --git a/Memoria.Launcher/Images/btnMoveDownimg.psd b/Memoria.Launcher/Images/btnMoveDownimg.psd
new file mode 100644
index 000000000..bdf0898fc
Binary files /dev/null and b/Memoria.Launcher/Images/btnMoveDownimg.psd differ
diff --git a/Memoria.Launcher/Images/btnMoveUpimg.png b/Memoria.Launcher/Images/btnMoveUpimg.png
new file mode 100644
index 000000000..92c84fefa
Binary files /dev/null and b/Memoria.Launcher/Images/btnMoveUpimg.png differ
diff --git a/Memoria.Launcher/Images/btnMoveUpimg.psd b/Memoria.Launcher/Images/btnMoveUpimg.psd
new file mode 100644
index 000000000..6e24141ea
Binary files /dev/null and b/Memoria.Launcher/Images/btnMoveUpimg.psd differ
diff --git a/Memoria.Launcher/Images/btnUninstallimg.png b/Memoria.Launcher/Images/btnUninstallimg.png
new file mode 100644
index 000000000..8d60dc0a6
Binary files /dev/null and b/Memoria.Launcher/Images/btnUninstallimg.png differ
diff --git a/Memoria.Launcher/Images/btnUninstallimg.psd b/Memoria.Launcher/Images/btnUninstallimg.psd
new file mode 100644
index 000000000..c1a3ea0d3
Binary files /dev/null and b/Memoria.Launcher/Images/btnUninstallimg.psd differ
diff --git a/Memoria.Launcher/Images/new_launcher_bg.bak.png b/Memoria.Launcher/Images/new_launcher_bg.bak.png
new file mode 100644
index 000000000..73eb52f5a
Binary files /dev/null and b/Memoria.Launcher/Images/new_launcher_bg.bak.png differ
diff --git a/Memoria.Launcher/Images/new_launcher_bg.png b/Memoria.Launcher/Images/new_launcher_bg.png
index 73eb52f5a..5481761c0 100644
Binary files a/Memoria.Launcher/Images/new_launcher_bg.png and b/Memoria.Launcher/Images/new_launcher_bg.png differ
diff --git a/Memoria.Launcher/Images/new_launcher_bg.psd b/Memoria.Launcher/Images/new_launcher_bg.psd
new file mode 100644
index 000000000..bf26905e9
Binary files /dev/null and b/Memoria.Launcher/Images/new_launcher_bg.psd differ
diff --git a/Memoria.Launcher/Languages/Lang.cs b/Memoria.Launcher/Languages/Lang.cs
index a0976103c..3692cdabf 100644
--- a/Memoria.Launcher/Languages/Lang.cs
+++ b/Memoria.Launcher/Languages/Lang.cs
@@ -163,6 +163,7 @@ private static String GetSettings(string name)
public static readonly string BattleInterfaceType2 = GetSettings(nameof(BattleInterfaceType2));
public static readonly string BattleInterfaceTooltip = GetSettings(nameof(BattleInterfaceTooltip));
public static readonly string SkipIntrosToMainMenu = GetSettings(nameof(SkipIntrosToMainMenu));
+ public static readonly string SkipBattleSwirl = GetSettings(nameof(SkipBattleSwirl));
public static readonly string SkipBattleLoading = GetSettings(nameof(SkipBattleLoading));
public static readonly string HideCardsBubbles = GetSettings(nameof(HideCardsBubbles));
public static readonly string HideSteamBubbles = GetSettings(nameof(HideSteamBubbles));
diff --git a/Memoria.Launcher/Languages/en.xml b/Memoria.Launcher/Languages/en.xml
index 056d202ff..005cb853b 100644
--- a/Memoria.Launcher/Languages/en.xml
+++ b/Memoria.Launcher/Languages/en.xml
@@ -23,11 +23,11 @@
Rollback = "Cancel"
Inject = "Inject"
SaveAs = "Save as..."
- Exit = "E X I T"
+ Exit = "EXIT"
Exiting = "Exiting..."
- Launch = "P L A Y"
+ Launch = "PLAY"
Launching = "Launching..."
- ModManager = "Install Mods"
+ ModManager = "MOD MANAGER"
/>
+ />
+ ModManager = "MOD MANAGER"
+ />
+ />
+ />
+ Title = "Settings"
+ Description = "Various settings of the application."
+ NewTitle = "New"
+ NewDescription = "Initialize all settings default values."
+ FileTitle = "From file"
+ FileDescription = "Reads the application configuration file {0}"
+ />
+ Title = "Game Directory"
+ Description = "Location of the game files."
+ ConfigurationTitle = "Settings"
+ ConfigurationDescription = "Uses the information stored in the configuration file."
+ SteamRegistryTitle = "From registry (Steam)"
+ SteamRegistryDescription = "Retrieves information from Windows registry, using data from Steam."
+ UserTitle = "Manual"
+ UserDescription = "Allows you to manually select the directory to which you have installed the game."
+ />
+ Title = "Working Directory"
+ Description = "The directory to store the results of the application."
+ ConfigurationTitle = "Settings"
+ ConfigurationDescription = "Uses the information stored in the configuration file."
+ UserTitle = "Manual"
+ UserDescription = "Allows you to manually select a working directory."
+ />
+ Title = "Encoding"
+ Description = "Encoding for unpacking and packing the game text."
+ NewTitle = "New"
+ NewDescription = "Initializes the standard encoding based on the Windows-1252 encoding."
+ WorkingLocationTitle = "Working directory"
+ WorkingLocationDescription = "Reads the encoding from the working directory."
+ UserTitle = "Edit"
+ UserDescription = "Change the current encoding."
+ />
+ Title="Audio Settings"
+ Description="Settings of audio device."
+ NewTitle="New"
+ NewDescription="Initialize all settings default values."
+ />
@@ -169,137 +170,113 @@
+ Header = "Game Resources"
+ Unpack = "Unpack"
+ Pack = "Pack"
+ ArchivesNode ="Archives"
+ />
-
-
-
+ Header="Preview" >
+
-
-
-
-
+ Name = "Name"
+ Pattern = "Pattern"
+ Encoding = "Encoding"
+ Font = "Font"
+ Edit = "Edit"
+ />
+ Title = "Choose the encoding"
+ Watermark = "Enter the encoding name..."
+ ConfirmMessageFormat = "You have chosen [{0}]. Right?"
+ ErrorMessageFormat = "Failed to recognize the encoding [{0}]."
+ />
-
+ Title = "Encoding edit"
+ />
-
+ Before = "Before:"
+ Width = "Width:"
+ After = "After:"
+ FromText = "From text:"
+ ToText = "To text:"
+ />
-
+ Row = "Row:"
+ Column = "Column:"
+ FromText = "From text:"
+ ToText = "To text:"
+ />
-
-
-
+
-
-
+ Title = "Save as..."
+ />
-
-
-
+ Title = "Done!"
+ ExtractionCompleteFormat = "Extraction complete for {0:hh\:mm\:ss}."
+ InjectionCompleteFormat = "Injection complete for {0:hh\:mm\:ss}."
+ />
-
+ Title = "Question"
+ AreYouSureTitle = "Are you sure?"
+ NewVersionIsAvailable = "A new version is available, download now?"
+ />
-
+ Title = "Error!"
+ />
-
-
-
+ UnknownFormat = "Unknown file format."
+ />
+ CannotGetExecutablePath = "Cannot get a path of the executable assembly."
+ />
-
+ TooLongTagNameFormat = "Too long name of tag: {0}"
+ />
-
\ No newline at end of file
diff --git a/Memoria.Launcher/Languages/ru.xml b/Memoria.Launcher/Languages/ru.xml
index 14240edf5..7cfa13773 100644
--- a/Memoria.Launcher/Languages/ru.xml
+++ b/Memoria.Launcher/Languages/ru.xml
@@ -49,6 +49,7 @@
BattleInterfaceType2 = "Модель PSX"
BattleInterfaceTooltip = "Вы можете настроить интерфейс в игре, нажав Alt+F1"
SkipIntrosToMainMenu = " Пропуск заставки"
+ SkipBattleSwirl = " Время загрузки битвы"
SkipBattleLoading = "Время загрузки битвы"
HideCardsBubbles = " Скрыть пузыри карт"
HideSteamBubbles = " Только пузыри PSX"
@@ -67,9 +68,9 @@
TripleTriadType1 = "Tetra Triad"
TripleTriadType2 = "Triple Triad"
Volume = "Громкость:"
- SoundVolume = "Звука"
- MusicVolume = "Музыки"
- MovieVolume = "Фильма"
+ SoundVolume = "🔊Звука"
+ MusicVolume = "🔊Музыки"
+ MovieVolume = "🔊Фильма"
IniCheats = "Читы"
MaxStealRate = " 100% кража"
DisableCantConcentrate = " Гарнет не теряет концентрацию"
diff --git a/Memoria.Launcher/MainWindow.cs b/Memoria.Launcher/MainWindow.cs
index 77d8796f7..e7b3ab849 100644
--- a/Memoria.Launcher/MainWindow.cs
+++ b/Memoria.Launcher/MainWindow.cs
@@ -50,6 +50,8 @@ private void OnLoaded(Object sender, RoutedEventArgs e)
// Hotfix for the Moguri mod
if (Directory.Exists("MoguriFiles") && !File.Exists("MoguriFiles/Memoria.ini"))
File.WriteAllText("MoguriFiles/Memoria.ini", "[Graphics]\nEnabled = 1\nTileSize = 64\n");
+ if (Directory.Exists("MoguriFiles") && File.Exists("MoguriFiles/StreamingAssets/ma/mbg116.bytes"))
+ File.Move("MoguriFiles/StreamingAssets/ma/mbg116.bytes", "MoguriFiles/StreamingAssets/ma/mbg116 - bugged.bytes");
if (GameSettings.AutoRunGame)
PlayButton.Click();
}
diff --git a/Memoria.Launcher/MainWindow.xaml b/Memoria.Launcher/MainWindow.xaml
index 5647d0aeb..dee098f0a 100644
--- a/Memoria.Launcher/MainWindow.xaml
+++ b/Memoria.Launcher/MainWindow.xaml
@@ -1,36 +1,81 @@
-
+
-
+
-
-
-
-
-
-
- Zone of Games
-
-
-
-
-
-
-
- FFRTT
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
\ No newline at end of file
diff --git a/Memoria.Launcher/Memoria.Launcher.csproj b/Memoria.Launcher/Memoria.Launcher.csproj
index 373bc8026..c30e85bb4 100644
--- a/Memoria.Launcher/Memoria.Launcher.csproj
+++ b/Memoria.Launcher/Memoria.Launcher.csproj
@@ -1,157 +1,171 @@
-
- Debug
- AnyCPU
- {95BC3C2C-0C8B-41B6-92E8-49D301119BE8}
- WinExe
- Memoria.Launcher
- v4.6.1
- 512
-
- latest
- false
- publish\
- true
- Disk
- false
- Foreground
- 7
- Days
- false
- false
- true
- 0
- 1.0.0.0
- false
- true
-
-
- AnyCPU
- true
- full
- false
- ..\Output\Launcher\
- DEBUG;TRACE
- prompt
- 4
- CS1998
-
-
- AnyCPU
- pdbonly
- true
- ..\Output\Launcher\
- TRACE
- prompt
- 4
-
-
- ff9.ico
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- UiLauncherButton.xaml
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- MSBuild:Compile
- Designer
-
-
- MSBuild:Compile
- Designer
-
-
- Designer
- MSBuild:Compile
-
-
- Designer
- MSBuild:Compile
-
-
-
-
-
-
- PreserveNewest
- Memoria.ini
-
-
-
-
-
-
-
-
-
-
-
- False
- Microsoft .NET Framework 4.6.1 %28x86 et x64%29
- true
-
-
- False
- .NET Framework 3.5 SP1
- false
-
-
-
-
+
+ Debug
+ AnyCPU
+ {95BC3C2C-0C8B-41B6-92E8-49D301119BE8}
+ WinExe
+ Memoria.Launcher
+ v4.6.1
+ 512
+
+ latest
+ false
+ publish\
+ true
+ Disk
+ false
+ Foreground
+ 7
+ Days
+ false
+ false
+ true
+ 0
+ 1.0.0.0
+ false
+ true
+
+
+ AnyCPU
+ true
+ full
+ false
+ ..\Output\Launcher\
+ DEBUG;TRACE
+ prompt
+ 4
+ CS1998
+
+
+ AnyCPU
+ pdbonly
+ true
+ ..\Output\Launcher\
+ TRACE
+ prompt
+ 4
+
+
+ ff9.ico
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UiModManagerButton.xaml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ UiLauncherButton.xaml
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ MSBuild:Compile
+ Designer
+
+
+ Designer
+ MSBuild:Compile
+
+
+ Designer
+ MSBuild:Compile
+
+
+
+
+
+
+ PreserveNewest
+ Memoria.ini
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ False
+ Microsoft .NET Framework 4.6.1 %28x86 et x64%29
+ true
+
+
+ False
+ .NET Framework 3.5 SP1
+ false
+
+
+
+
\ No newline at end of file
diff --git a/Memoria.Launcher/Memoria/GameSettingsControl.cs b/Memoria.Launcher/Memoria/GameSettingsControl.cs
index 54a7e7151..c6d251f40 100644
--- a/Memoria.Launcher/Memoria/GameSettingsControl.cs
+++ b/Memoria.Launcher/Memoria/GameSettingsControl.cs
@@ -44,35 +44,35 @@ public GameSettingsControl()
_validSamplingFrequency.Add(frequency);
SetRows(28);
- SetCols(4);
+ SetCols(8);
- Width = 200;
+ Width = 240;
VerticalAlignment = VerticalAlignment.Top;
HorizontalAlignment = HorizontalAlignment.Left;
Margin = new Thickness(5);
DataContext = this;
- Thickness rowMargin = new Thickness(0, 7, 0, 3);
+ Thickness rowMargin = new Thickness(0, 7, 0, 5);
- AddUiElement(UiTextBlockFactory.Create(Lang.Settings.ActiveMonitor), row: 0, col: 0, rowSpan: 3, colSpan: 4).Margin = rowMargin;
- UiComboBox monitor = AddUiElement(UiComboBoxFactory.Create(), row: 2, col: 0, rowSpan: 3, colSpan: 4);
+ AddUiElement(UiTextBlockFactory.Create(Lang.Settings.ActiveMonitor), row: 0, col: 0, rowSpan: 3, colSpan: 8).Margin = rowMargin;
+ UiComboBox monitor = AddUiElement(UiComboBoxFactory.Create(), row: 2, col: 0, rowSpan: 3, colSpan: 8);
monitor.ItemsSource = GetAvailableMonitors();
monitor.SetBinding(Selector.SelectedItemProperty, new Binding(nameof(ActiveMonitor)) {Mode = BindingMode.TwoWay});
monitor.Margin = rowMargin;
- AddUiElement(UiTextBlockFactory.Create(Lang.Settings.WindowMode), row: 5, col: 0, rowSpan: 3, colSpan: 4).Margin = rowMargin;
- UiComboBox windowMode = AddUiElement(UiComboBoxFactory.Create(), row: 7, col: 0, rowSpan: 3, colSpan: 4);
+ AddUiElement(UiTextBlockFactory.Create(Lang.Settings.WindowMode), row: 5, col: 0, rowSpan: 3, colSpan: 8).Margin = rowMargin;
+ UiComboBox windowMode = AddUiElement(UiComboBoxFactory.Create(), row: 7, col: 0, rowSpan: 3, colSpan: 8);
windowMode.ItemsSource = EnumerateWindowModeSettings().ToArray();
windowMode.SetBinding(Selector.SelectedItemProperty, new Binding(nameof(WindowMode)) { Mode = BindingMode.TwoWay });
windowMode.Margin = rowMargin;
- AddUiElement(UiTextBlockFactory.Create(Lang.Settings.Resolution), row: 10, col: 0, rowSpan: 3, colSpan: 2).Margin = rowMargin;
- UiComboBox resolution = AddUiElement(UiComboBoxFactory.Create(), row: 10, col: 2, rowSpan: 3, colSpan: 2);
- resolution.ItemsSource = EnumerateDisplaySettings().ToArray();
+ AddUiElement(UiTextBlockFactory.Create(Lang.Settings.Resolution), row: 10, col: 0, rowSpan: 3, colSpan: 3).Margin = rowMargin;
+ UiComboBox resolution = AddUiElement(UiComboBoxFactory.Create(), row: 10, col: 3, rowSpan: 3, colSpan: 5);
+ resolution.ItemsSource = EnumerateDisplaySettings().OrderByDescending(x => Convert.ToInt32(x.Split('x')[0])).ToArray();
resolution.SetBinding(Selector.SelectedItemProperty, new Binding(nameof(ScreenResolution)) {Mode = BindingMode.TwoWay});
resolution.Margin = rowMargin;
- UiTextBlock _audioText = UiTextBlockFactory.Create(Lang.Settings.AudioSamplingFrequency);
+ /*UiTextBlock _audioText = UiTextBlockFactory.Create(Lang.Settings.AudioSamplingFrequency);
_audioText.FontSize *= 0.8;
_audioText.TextWrapping = TextWrapping.WrapWithOverflow;
AddUiElement(_audioText, row: 13, col: 0, rowSpan: 3, colSpan: 2).Margin = rowMargin;
@@ -81,22 +81,22 @@ public GameSettingsControl()
audio.ItemsSource = EnumerateAudioSettings().ToArray();
audio.SetBinding(Selector.SelectedItemProperty, new Binding(nameof(AudioFrequency)) {Mode = BindingMode.TwoWay});
audio.SetBinding(Selector.IsEnabledProperty, new Binding(nameof(AudioFrequencyEnabled)) {Mode = BindingMode.TwoWay});
- audio.Margin = rowMargin;
+ audio.Margin = rowMargin;*/
- UiCheckBox x64 = AddUiElement(UiCheckBoxFactory.Create(" X64", null), 16, 0, 3, 2);
+ UiCheckBox x64 = AddUiElement(UiCheckBoxFactory.Create(" X64", null), 16, 0, 3, 4);
x64.Margin = rowMargin;
x64.SetBinding(ToggleButton.IsCheckedProperty, new Binding(nameof(IsX64)) {Mode = BindingMode.TwoWay});
x64.SetBinding(ToggleButton.IsEnabledProperty, new Binding(nameof(IsX64Enabled)) {Mode = BindingMode.TwoWay});
- UiCheckBox debuggableCheckBox = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.Debuggable, null), 16, 1, 3, 3);
+ UiCheckBox debuggableCheckBox = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.Debuggable, null), 16, 3, 3, 5);
debuggableCheckBox.Margin = rowMargin;
debuggableCheckBox.SetBinding(ToggleButton.IsCheckedProperty, new Binding(nameof(IsDebugMode)) {Mode = BindingMode.TwoWay});
- UiCheckBox checkUpdates = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.CheckUpdates, null), 18, 0, 3, 4);
+ UiCheckBox checkUpdates = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.CheckUpdates, null), 18, 0, 3, 8);
checkUpdates.Margin = rowMargin;
checkUpdates.SetBinding(ToggleButton.IsCheckedProperty, new Binding(nameof(CheckUpdates)) { Mode = BindingMode.TwoWay });
- UiCheckBox steamOverlayFix = AddUiElement(UiCheckBoxFactory.Create(Lang.SteamOverlay.OptionLabel, null), 20, 0, 3, 4);
+ UiCheckBox steamOverlayFix = AddUiElement(UiCheckBoxFactory.Create(Lang.SteamOverlay.OptionLabel, null), 20, 0, 3, 8);
steamOverlayFix.Margin = rowMargin;
steamOverlayFix.SetBinding(ToggleButton.IsCheckedProperty, new Binding(nameof(SteamOverlayFix)) { Mode = BindingMode.TwoWay });
@@ -390,7 +390,7 @@ private async void OnPropertyChanged([CallerMemberName] String propertyName = nu
private String _resolution = "1280x960";
private String _activeMonitor = "";
private String _windowMode = "";
- private UInt16 _audioFrequency = 32000;
+ private UInt16 _audioFrequency = 44100;
private Boolean _audioFrequencyEnabled = true;
private Boolean _isX64 = true;
private Boolean _isX64Enabled = true;
@@ -403,11 +403,11 @@ private void LoadSettings()
try
{
IniFile iniFile = new IniFile(IniPath);
+ String resolutionBest = EnumerateDisplaySettings().OrderByDescending(x => Convert.ToInt32(x.Split('x')[0])).ToArray()[0];
String value = iniFile.ReadValue("Settings", nameof(ScreenResolution));
if (String.IsNullOrEmpty(value))
- value = "1280x960";
- _resolution = value;
+ _resolution = resolutionBest ?? "1280x960";
value = iniFile.ReadValue("Settings", nameof(ActiveMonitor));
if (!String.IsNullOrEmpty(value))
@@ -442,7 +442,7 @@ private void LoadSettings()
Boolean? x86SamplingReaded = TryReadAudioSamplingFrequency(@"x86\FF9_Data\Plugins\SdLib.dll", out x86SamplingFrequency);
if (x64SamplingReaded != true && x86SamplingReaded != true)
{
- _audioFrequency = 32000;
+ _audioFrequency = 44100;
_audioFrequencyEnabled = false;
}
else
@@ -692,6 +692,10 @@ private IEnumerable EnumerateDisplaySettings()
if (devMode.dmPelsWidth >= 640 && devMode.dmPelsHeight >= 480)
{
String result = $"{devMode.dmPelsWidth.ToString(CultureInfo.InvariantCulture)}x{devMode.dmPelsHeight.ToString(CultureInfo.InvariantCulture)}";
+ if ((devMode.dmPelsWidth / 16) == (devMode.dmPelsHeight / 9))
+ {
+ result = $"{devMode.dmPelsWidth.ToString(CultureInfo.InvariantCulture)}x{devMode.dmPelsHeight.ToString(CultureInfo.InvariantCulture)} (HD)";
+ }
if (set.Add(result))
yield return result;
}
diff --git a/Memoria.Launcher/Memoria/MemoriaIniCheatControl.cs b/Memoria.Launcher/Memoria/MemoriaIniCheatControl.cs
index d05e884a3..76e677b6a 100644
--- a/Memoria.Launcher/Memoria/MemoriaIniCheatControl.cs
+++ b/Memoria.Launcher/Memoria/MemoriaIniCheatControl.cs
@@ -29,7 +29,7 @@ public MemoriaIniCheatControl()
SetRows(15);
SetCols(8);
- Width = 200;
+ Width = 240;
VerticalAlignment = VerticalAlignment.Top;
HorizontalAlignment = HorizontalAlignment.Left;
Margin = new Thickness(0);
@@ -38,35 +38,48 @@ public MemoriaIniCheatControl()
Thickness rowMargin = new Thickness(8, 2, 3, 2);
- UiTextBlock cheatOptionsText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.IniCheats), 0, 0, 2, 8);
- cheatOptionsText.Padding = new Thickness(0, 4, 0, 0);
+ Int32 row = 0;
+
+ UiTextBlock cheatOptionsText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.IniCheats), row, 0, 2, 8);
+ cheatOptionsText.Padding = new Thickness(0, 4, 0, 2);
cheatOptionsText.Foreground = Brushes.White;
cheatOptionsText.FontSize = 14;
cheatOptionsText.FontWeight = FontWeights.Bold;
cheatOptionsText.Margin = rowMargin;
- Int32 row = 2;
+
+ row++;
+ row++;
+ /*
+ AddUiElement(UiTextBlockFactory.Create("──────────────────────────────────────"), row, 0, 1, 8).Foreground = Brushes.White;
+ */
- UiCheckBox stealingAlwaysWorks = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.MaxStealRate, null), row++, 0, 1, 8);
+ UiCheckBox stealingAlwaysWorks = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.MaxStealRate, null), row, 0, 1, 8);
stealingAlwaysWorks.SetBinding(ToggleButton.IsCheckedProperty, new Binding(nameof(StealingAlwaysWorks)) { Mode = BindingMode.TwoWay });
stealingAlwaysWorks.Foreground = Brushes.White;
stealingAlwaysWorks.Margin = rowMargin;
- UiCheckBox garnetConcentrate = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.DisableCantConcentrate, null), row++, 0, 1, 8);
+ row++;
+
+ UiCheckBox garnetConcentrate = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.DisableCantConcentrate, null), row, 0, 1, 8);
garnetConcentrate.SetBinding(ToggleButton.IsCheckedProperty, new Binding(nameof(GarnetConcentrate)) { Mode = BindingMode.TwoWay });
garnetConcentrate.Foreground = Brushes.White;
garnetConcentrate.Margin = rowMargin;
- UiCheckBox breakDamageLimit = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.BreakDamageLimit, null), row++, 0, 1, 8);
+ row++;
+
+ UiCheckBox breakDamageLimit = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.BreakDamageLimit, null), row, 0, 1, 8);
breakDamageLimit.SetBinding(ToggleButton.IsCheckedProperty, new Binding(nameof(BreakDamageLimit)) { Mode = BindingMode.TwoWay });
breakDamageLimit.Foreground = Brushes.White;
breakDamageLimit.Margin = rowMargin;
- UiTextBlock accessBattleMenuText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.AccessBattleMenu), row, 0, 2, 3);
+ row++;
+
+ UiTextBlock accessBattleMenuText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.AccessBattleMenu), row, 0, 2, 4);
accessBattleMenuText.ToolTip = Lang.Settings.AccessBattleMenuTooltip;
accessBattleMenuText.Foreground = Brushes.White;
accessBattleMenuText.Margin = rowMargin;
accessBattleMenuText.TextWrapping = TextWrapping.WrapWithOverflow;
- UiComboBox accessBattleMenuBox = AddUiElement(UiComboBoxFactory.Create(), row, 3, 2, 5);
+ UiComboBox accessBattleMenuBox = AddUiElement(UiComboBoxFactory.Create(), row, 4, 2, 4);
accessBattleMenuBox.ItemsSource = new String[]{
Lang.Settings.AccessBattleMenuType0,
Lang.Settings.AccessBattleMenuType1,
@@ -75,24 +88,26 @@ public MemoriaIniCheatControl()
};
accessBattleMenuBox.SetBinding(Selector.SelectedIndexProperty, new Binding(nameof(AccessBattleMenu)) { Mode = BindingMode.TwoWay });
accessBattleMenuBox.ToolTip = Lang.Settings.AccessBattleMenuTooltip;
- accessBattleMenuBox.Height = 22;
+ accessBattleMenuBox.Height = 20;
accessBattleMenuBox.Margin = rowMargin;
- row += 2;
- UiCheckBox speedMode = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.SpeedMode, null), row++, 0, 1, 8);
+ row++;
+ row++;
+
+ UiCheckBox speedMode = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.SpeedMode, null), row, 0, 1, 8);
speedMode.SetBinding(ToggleButton.IsCheckedProperty, new Binding(nameof(SpeedMode)) { Mode = BindingMode.TwoWay });
speedMode.Foreground = Brushes.White;
speedMode.Margin = rowMargin;
+ row++;
+
UiTextBlock speedFactorText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.SpeedFactor), row, 0, 1, 2);
speedFactorText.Foreground = Brushes.White;
speedFactorText.Margin = rowMargin;
-
UiTextBlock speedFactorTextindex = AddUiElement(UiTextBlockFactory.Create(""), row, 2, 1, 1);
speedFactorTextindex.SetBinding(TextBlock.TextProperty, new Binding(nameof(SpeedFactor)) { Mode = BindingMode.TwoWay });
speedFactorTextindex.Foreground = Brushes.White;
-
- Slider speedFactor = AddUiElement(UiSliderFactory.Create(0), row++, 3, 1, 5);
+ Slider speedFactor = AddUiElement(UiSliderFactory.Create(0), row, 3, 1, 5);
speedFactor.SetBinding(Slider.ValueProperty, new Binding(nameof(SpeedFactor)) { Mode = BindingMode.TwoWay });
speedFactor.TickFrequency = 1;
speedFactor.IsSnapToTickEnabled = true;
@@ -100,44 +115,36 @@ public MemoriaIniCheatControl()
speedFactor.Maximum = 12;
speedFactor.Margin = new Thickness(0, 0, 3, 0);
- UiCheckBox battleAssistance = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.BattleAssistance, null), row++, 0, 1, 8);
+ row++;
+
+ UiCheckBox battleAssistance = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.BattleAssistance, null), row, 0, 1, 8);
battleAssistance.SetBinding(ToggleButton.IsCheckedProperty, new Binding(nameof(BattleAssistance)) { Mode = BindingMode.TwoWay });
battleAssistance.Foreground = Brushes.White;
battleAssistance.Margin = rowMargin;
+ row++;
+
/*UiCheckBox attack9999 = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.MaxDamage, null), row++, 0, 1, 8);
attack9999.SetBinding(ToggleButton.IsCheckedProperty, new Binding(nameof(Attack9999)) { Mode = BindingMode.TwoWay });
attack9999.Foreground = Brushes.White;
attack9999.Margin = rowMargin;*/
- UiCheckBox noRandomEncounter = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.NoRandomBattles, null), row++, 0, 1, 8);
+ UiCheckBox noRandomEncounter = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.NoRandomBattles, null), row, 0, 1, 8);
noRandomEncounter.SetBinding(ToggleButton.IsCheckedProperty, new Binding(nameof(NoRandomEncounter)) { Mode = BindingMode.TwoWay });
noRandomEncounter.Foreground = Brushes.White;
noRandomEncounter.Margin = rowMargin;
- UiCheckBox masterSkill = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.PermanentCheats, null), row++, 0, 1, 8);
+ row++;
+
+ UiCheckBox masterSkill = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.PermanentCheats, null), row, 0, 1, 8);
masterSkill.SetBinding(ToggleButton.IsCheckedProperty, new Binding(nameof(MasterSkill)) { Mode = BindingMode.TwoWay });
masterSkill.Foreground = Brushes.White;
masterSkill.Margin = rowMargin;
- AddUiElement(UiTextBlockFactory.Create("──────────────────────────────────────"), row++, 0, 1, 8).Foreground = Brushes.White;
- UiTextBlock sharedFpsText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.SharedFPS), row++, 0, 1, 8);
- sharedFpsText.Foreground = Brushes.White;
- sharedFpsText.Margin = rowMargin;
+ /*AddUiElement(UiTextBlockFactory.Create("──────────────────────────────────────"), row++, 0, 1, 8).Foreground = Brushes.White;*/
- UiTextBlock sharedFpsIndex = AddUiElement(UiTextBlockFactory.Create(""), row, 0, 1, 2);
- sharedFpsIndex.SetBinding(TextBlock.TextProperty, new Binding(nameof(SharedFPS)) { Mode = BindingMode.TwoWay });
- sharedFpsIndex.Foreground = Brushes.White;
- sharedFpsIndex.Margin = rowMargin;
- Slider sharedFps = AddUiElement(UiSliderFactory.Create(0), row++, 2, 1, 6);
- sharedFps.SetBinding(Slider.ValueProperty, new Binding(nameof(SharedFPS)) { Mode = BindingMode.TwoWay });
- sharedFps.TickFrequency = 1;
- sharedFps.IsSnapToTickEnabled = true;
- sharedFps.Minimum = 15;
- sharedFps.Maximum = 120;
- sharedFps.Margin = new Thickness(0, 0, 3, 0);
LoadSettings();
}
@@ -264,20 +271,9 @@ public Int16 MasterSkill
}
}
- public Int16 SharedFPS
- {
- get { return _sharedfps; }
- set
- {
- if (_sharedfps != value)
- {
- _sharedfps = value;
- OnPropertyChanged();
- }
- }
- }
+
- private Int16 _stealingalwaysworks, _garnetconcentrate, _breakDamageLimit, _accessBattleMenu, _speedmode, _speedfactor, _battleassistance, _attack9999, _norandomencounter, _masterskill, _sharedfps;
+ private Int16 _stealingalwaysworks, _garnetconcentrate, _breakDamageLimit, _accessBattleMenu, _speedmode, _speedfactor, _battleassistance, _attack9999, _norandomencounter, _masterskill;
private readonly String _iniPath = AppDomain.CurrentDomain.BaseDirectory + "\\Memoria.ini";
@@ -291,7 +287,7 @@ private void LoadSettings()
String value = iniFile.ReadValue("Hacks", nameof(StealingAlwaysWorks));
if (String.IsNullOrEmpty(value))
{
- value = "0";
+ value = " 0";
OnPropertyChanged(nameof(StealingAlwaysWorks));
}
if (!Int16.TryParse(value, out _stealingalwaysworks))
@@ -300,7 +296,7 @@ private void LoadSettings()
value = iniFile.ReadValue("Battle", nameof(GarnetConcentrate));
if (String.IsNullOrEmpty(value))
{
- value = "0";
+ value = " 0";
OnPropertyChanged(nameof(GarnetConcentrate));
}
if (!Int16.TryParse(value, out _garnetconcentrate))
@@ -309,7 +305,7 @@ private void LoadSettings()
value = iniFile.ReadValue("Battle", nameof(BreakDamageLimit));
if (String.IsNullOrEmpty(value))
{
- value = "0";
+ value = " 0";
OnPropertyChanged(nameof(BreakDamageLimit));
}
if (!Int16.TryParse(value, out _breakDamageLimit))
@@ -318,7 +314,7 @@ private void LoadSettings()
value = iniFile.ReadValue("Battle", "AccessMenus");
if (String.IsNullOrEmpty(value))
{
- value = "0";
+ value = " 0";
OnPropertyChanged(nameof(AccessBattleMenu));
}
if (!Int16.TryParse(value, out _accessBattleMenu))
@@ -327,7 +323,7 @@ private void LoadSettings()
value = iniFile.ReadValue("Cheats", nameof(SpeedMode));
if (String.IsNullOrEmpty(value))
{
- value = "0";
+ value = " 0";
OnPropertyChanged(nameof(SpeedMode));
}
if (!Int16.TryParse(value, out _speedmode))
@@ -336,7 +332,7 @@ private void LoadSettings()
value = iniFile.ReadValue("Cheats", nameof(SpeedFactor));
if (String.IsNullOrEmpty(value))
{
- value = "2";
+ value = " 2";
OnPropertyChanged(nameof(SpeedFactor));
}
if (!Int16.TryParse(value, out _speedfactor))
@@ -345,7 +341,7 @@ private void LoadSettings()
value = iniFile.ReadValue("Cheats", nameof(BattleAssistance));
if (String.IsNullOrEmpty(value))
{
- value = "0";
+ value = " 0";
OnPropertyChanged(nameof(BattleAssistance));
}
if (!Int16.TryParse(value, out _battleassistance))
@@ -354,7 +350,7 @@ private void LoadSettings()
value = iniFile.ReadValue("Cheats", nameof(Attack9999));
if (String.IsNullOrEmpty(value))
{
- value = "0";
+ value = " 0";
OnPropertyChanged(nameof(Attack9999));
}
if (!Int16.TryParse(value, out _attack9999))
@@ -363,7 +359,7 @@ private void LoadSettings()
value = iniFile.ReadValue("Cheats", nameof(NoRandomEncounter));
if (String.IsNullOrEmpty(value))
{
- value = "0";
+ value = " 0";
OnPropertyChanged(nameof(NoRandomEncounter));
}
if (!Int16.TryParse(value, out _norandomencounter))
@@ -372,7 +368,7 @@ private void LoadSettings()
value = iniFile.ReadValue("Cheats", nameof(MasterSkill));
if (String.IsNullOrEmpty(value))
{
- value = "0";
+ value = " 0";
OnPropertyChanged(nameof(MasterSkill));
}
if (!Int16.TryParse(value, out _masterskill))
@@ -385,13 +381,6 @@ private void LoadSettings()
if (!String.IsNullOrEmpty(value))
break;
}
- if (String.IsNullOrEmpty(value))
- {
- value = "30";
- //OnPropertyChanged(nameof(SharedFPS));
- }
- if (!Int16.TryParse(value, out _sharedfps))
- _sharedfps = 30;
Refresh(nameof(StealingAlwaysWorks));
Refresh(nameof(GarnetConcentrate));
@@ -403,7 +392,6 @@ private void LoadSettings()
Refresh(nameof(Attack9999));
Refresh(nameof(NoRandomEncounter));
Refresh(nameof(MasterSkill));
- Refresh(nameof(SharedFPS));
}
catch (Exception ex){ UiHelper.ShowError(Application.Current.MainWindow, ex); }
}
@@ -432,70 +420,64 @@ private async void OnPropertyChanged([CallerMemberName] String propertyName = nu
switch (propertyName)
{
case nameof(StealingAlwaysWorks):
- iniFile.WriteValue("Hacks", propertyName, " " + StealingAlwaysWorks);
+ iniFile.WriteValue("Hacks", propertyName + " ", " " + StealingAlwaysWorks);
if (StealingAlwaysWorks == 0)
{
- iniFile.WriteValue("Hacks", propertyName, " 0");
+ iniFile.WriteValue("Hacks", propertyName + " ", " 0");
}
else if (StealingAlwaysWorks == 1)
{
- iniFile.WriteValue("Hacks", "Enabled", " 1");
- iniFile.WriteValue("Hacks", propertyName, " 2");
+ iniFile.WriteValue("Hacks", "Enabled ", " 1");
+ iniFile.WriteValue("Hacks", propertyName + " ", " 2");
}
break;
case nameof(GarnetConcentrate):
- iniFile.WriteValue("Battle", propertyName, " " + GarnetConcentrate);
+ iniFile.WriteValue("Battle", propertyName + " ", " " + GarnetConcentrate);
if (GarnetConcentrate == 1)
- iniFile.WriteValue("Battle", "Enabled", " 1");
+ iniFile.WriteValue("Battle", "Enabled ", " 1");
break;
case nameof(BreakDamageLimit):
- iniFile.WriteValue("Battle", propertyName, " " + BreakDamageLimit);
+ iniFile.WriteValue("Battle", propertyName + " ", " " + BreakDamageLimit);
if (BreakDamageLimit == 1)
- iniFile.WriteValue("Battle", "Enabled", " 1");
+ iniFile.WriteValue("Battle", "Enabled ", " 1");
break;
case nameof(AccessBattleMenu):
- iniFile.WriteValue("Battle", "AccessMenus", " " + AccessBattleMenu);
- iniFile.WriteValue("Battle", "AvailableMenus", AvailableBattleMenus);
+ iniFile.WriteValue("Battle", "AccessMenus ", " " + AccessBattleMenu);
+ iniFile.WriteValue("Battle", "AvailableMenus ", AvailableBattleMenus);
if (AccessBattleMenu > 0)
- iniFile.WriteValue("Battle", "Enabled", " 1");
+ iniFile.WriteValue("Battle", "Enabled ", " 1");
break;
case nameof(SpeedMode):
- iniFile.WriteValue("Cheats", propertyName, " " + SpeedMode);
+ iniFile.WriteValue("Cheats", propertyName + " ", " " + SpeedMode);
if (SpeedMode == 1)
- iniFile.WriteValue("Cheats", "Enabled", " 1");
+ iniFile.WriteValue("Cheats", "Enabled ", " 1");
break;
case nameof(SpeedFactor):
if (SpeedFactor < 13)
- iniFile.WriteValue("Cheats", propertyName, " " + SpeedFactor);
+ iniFile.WriteValue("Cheats", propertyName + " ", " " + SpeedFactor);
break;
case nameof(BattleAssistance):
- iniFile.WriteValue("Cheats", propertyName, " " + BattleAssistance);
- iniFile.WriteValue("Cheats", "Attack9999", " " + BattleAssistance); // Merged
+ iniFile.WriteValue("Cheats", propertyName + " ", " " + BattleAssistance);
+ iniFile.WriteValue("Cheats", "Attack9999 ", " " + BattleAssistance); // Merged
if (BattleAssistance == 1)
- iniFile.WriteValue("Cheats", "Enabled", " 1");
+ iniFile.WriteValue("Cheats", "Enabled ", " 1");
break;
case nameof(Attack9999):
- iniFile.WriteValue("Cheats", propertyName, " " + Attack9999);
+ iniFile.WriteValue("Cheats", propertyName + " ", " " + Attack9999);
if (Attack9999 == 1)
- iniFile.WriteValue("Cheats", "Enabled", " 1");
+ iniFile.WriteValue("Cheats", "Enabled ", " 1");
break;
case nameof(NoRandomEncounter):
- iniFile.WriteValue("Cheats", propertyName, " " + NoRandomEncounter);
+ iniFile.WriteValue("Cheats", propertyName + " ", " " + NoRandomEncounter);
if (NoRandomEncounter == 1)
- iniFile.WriteValue("Cheats", "Enabled", " 1");
+ iniFile.WriteValue("Cheats", "Enabled ", " 1");
break;
case nameof(MasterSkill):
- iniFile.WriteValue("Cheats", propertyName, " " + MasterSkill);
- iniFile.WriteValue("Cheats", "LvMax", " " + MasterSkill);
- iniFile.WriteValue("Cheats", "GilMax", " " + MasterSkill);
+ iniFile.WriteValue("Cheats", propertyName + " ", " " + MasterSkill);
+ iniFile.WriteValue("Cheats", "LvMax ", " " + MasterSkill);
+ iniFile.WriteValue("Cheats", "GilMax ", " " + MasterSkill);
if (MasterSkill == 1)
- iniFile.WriteValue("Cheats", "Enabled", " 1");
- break;
- case nameof(SharedFPS):
- iniFile.WriteValue("Graphics", "BattleFPS", " " + SharedFPS);
- iniFile.WriteValue("Graphics", "FieldFPS", " " + SharedFPS);
- iniFile.WriteValue("Graphics", "WorldFPS", " " + SharedFPS);
- iniFile.WriteValue("Graphics", "Enabled", " 1");
+ iniFile.WriteValue("Cheats", "Enabled ", " 1");
break;
}
}
diff --git a/Memoria.Launcher/Memoria/MemoriaIniControl.cs b/Memoria.Launcher/Memoria/MemoriaIniControl.cs
index 70da45492..87d8db4ab 100644
--- a/Memoria.Launcher/Memoria/MemoriaIniControl.cs
+++ b/Memoria.Launcher/Memoria/MemoriaIniControl.cs
@@ -31,7 +31,7 @@ public MemoriaIniControl()
{
PsxFontInstalled = true || IsOptionPresentInIni("Graphics", "UseGarnetFont");
SBUIInstalled = false && IsOptionPresentInIni("Graphics", "ScaledBattleUI");
- Int16 numberOfRows = 12;
+ Int16 numberOfRows = 15;
if (PsxFontInstalled)
numberOfRows += 1;
if (SBUIInstalled)
@@ -40,7 +40,7 @@ public MemoriaIniControl()
SetRows(numberOfRows);
SetCols(8);
- Width = 200;
+ Width = 240;
VerticalAlignment = VerticalAlignment.Top;
HorizontalAlignment = HorizontalAlignment.Left;
Margin = new Thickness(0);
@@ -49,24 +49,46 @@ public MemoriaIniControl()
Thickness rowMargin = new Thickness(8, 2, 3, 2);
- UiTextBlock optionsText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.IniOptions), 0, 0, 2, 8);
+ /*UiTextBlock optionsText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.IniOptions), 0, 0, 2, 8);
optionsText.Padding = new Thickness(0, 4, 0, 0);
optionsText.Foreground = Brushes.White;
optionsText.FontSize = 14;
optionsText.FontWeight = FontWeights.Bold;
- optionsText.Margin = rowMargin;
- Int32 row = 2;
+ optionsText.Margin = rowMargin;*/
+ Int32 row = 0;
- UiCheckBox isWidescreenSupport = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.Widescreen, null), row++, 0, 1, 8);
+ UiCheckBox isWidescreenSupport = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.Widescreen, null), row, 0, 1, 8);
isWidescreenSupport.SetBinding(ToggleButton.IsCheckedProperty, new Binding(nameof(WidescreenSupport)) { Mode = BindingMode.TwoWay });
isWidescreenSupport.Foreground = Brushes.White;
isWidescreenSupport.Margin = rowMargin;
- UiTextBlock battleInterfaceText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.BattleInterface), row, 0, 1, 3);
+ row++;
+
+ UiTextBlock sharedFpsText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.SharedFPS), row, 0, 1, 8);
+ sharedFpsText.Foreground = Brushes.White;
+ sharedFpsText.Margin = rowMargin;
+
+ row++;
+
+ UiTextBlock sharedFpsIndex = AddUiElement(UiTextBlockFactory.Create(""), row, 0, 1, 1);
+ sharedFpsIndex.SetBinding(TextBlock.TextProperty, new Binding(nameof(SharedFPS)) { Mode = BindingMode.TwoWay });
+ sharedFpsIndex.Foreground = Brushes.White;
+ sharedFpsIndex.Margin = rowMargin;
+ Slider sharedFps = AddUiElement(UiSliderFactory.Create(0), row, 1, 1, 7);
+ sharedFps.SetBinding(Slider.ValueProperty, new Binding(nameof(SharedFPS)) { Mode = BindingMode.TwoWay });
+ sharedFps.TickFrequency = 5;
+ sharedFps.IsSnapToTickEnabled = true;
+ sharedFps.Minimum = 15;
+ sharedFps.Maximum = 120;
+ sharedFps.Margin = new Thickness(0, 0, 3, 0);
+
+ row++;
+
+ UiTextBlock battleInterfaceText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.BattleInterface), row, 0, 1, 4);
battleInterfaceText.ToolTip = Lang.Settings.BattleInterfaceTooltip;
battleInterfaceText.Foreground = Brushes.White;
battleInterfaceText.Margin = rowMargin;
- UiComboBox battleInterfaceBox = AddUiElement(UiComboBoxFactory.Create(), row++, 3, 1, 5);
+ UiComboBox battleInterfaceBox = AddUiElement(UiComboBoxFactory.Create(), row, 4, 1, 4);
battleInterfaceBox.ItemsSource = new String[]{
Lang.Settings.BattleInterfaceType0,
Lang.Settings.BattleInterfaceType1,
@@ -74,18 +96,30 @@ public MemoriaIniControl()
};
battleInterfaceBox.SetBinding(Selector.SelectedIndexProperty, new Binding(nameof(BattleInterface)) { Mode = BindingMode.TwoWay });
battleInterfaceBox.ToolTip = Lang.Settings.BattleInterfaceTooltip;
- battleInterfaceBox.Height = 22;
+ battleInterfaceBox.Height = 20;
battleInterfaceBox.FontSize = 10;
battleInterfaceBox.Margin = rowMargin;
- UiCheckBox isSkipIntros = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.SkipIntrosToMainMenu, null), row++, 0, 1, 8);
+ row++;
+
+ UiCheckBox isSkipIntros = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.SkipIntrosToMainMenu, null), row, 0, 1, 8);
isSkipIntros.SetBinding(ToggleButton.IsCheckedProperty, new Binding(nameof(SkipIntros)) { Mode = BindingMode.TwoWay });
isSkipIntros.Foreground = Brushes.White;
isSkipIntros.Margin = rowMargin;
- /*UiTextBlock battleSwirlFramesText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.SkipBattleLoading), row++, 0, 1, 8);
+ row++;
+
+ UiCheckBox isSkipBattleSwirl = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.SkipBattleSwirl, null), row, 0, 1, 8);
+ isSkipBattleSwirl.SetBinding(ToggleButton.IsCheckedProperty, new Binding(nameof(BattleSwirlFrames)) { Mode = BindingMode.TwoWay });
+ isSkipBattleSwirl.Foreground = Brushes.White;
+ isSkipBattleSwirl.Margin = rowMargin;
+
+ row++;
+ /*
+ UiTextBlock battleSwirlFramesText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.SkipBattleLoading), row, 0, 1, 8);
battleSwirlFramesText.Foreground = Brushes.White;
battleSwirlFramesText.Margin = rowMargin;
+ row++;
UiTextBlock battleSwirlFramesTextindex = AddUiElement(UiTextBlockFactory.Create(""), row, 0, 1, 2);
battleSwirlFramesTextindex.SetBinding(TextBlock.TextProperty, new Binding(nameof(BattleSwirlFrames)) { Mode = BindingMode.TwoWay });
battleSwirlFramesTextindex.Foreground = Brushes.White;
@@ -93,24 +127,30 @@ public MemoriaIniControl()
Slider battleSwirlFrames = AddUiElement(UiSliderFactory.Create(0), row++, 1, 1, 6);
battleSwirlFrames.SetBinding(Slider.ValueProperty, new Binding(nameof(BattleSwirlFrames)) { Mode = BindingMode.TwoWay });
battleSwirlFrames.TickFrequency = 5;
+ */
+
+ /*
//soundVolumeSlider.TickPlacement = TickPlacement.BottomRight;
battleSwirlFrames.IsSnapToTickEnabled = true;
battleSwirlFrames.Minimum = 0;
battleSwirlFrames.Maximum = 120;
battleSwirlFrames.Margin = rowMargin;
- //soundVolumeSlider.Height = 4;*/
+ //soundVolumeSlider.Height = 4;
+ */
- UiCheckBox isHideCards = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.HideSteamBubbles, null), row++, 0, 1, 8);
+ UiCheckBox isHideCards = AddUiElement(UiCheckBoxFactory.Create(Lang.Settings.HideSteamBubbles, null), row, 0, 1, 8);
isHideCards.SetBinding(ToggleButton.IsCheckedProperty, new Binding(nameof(HideCards)) { Mode = BindingMode.TwoWay });
isHideCards.ToolTip = Lang.Settings.HideSteamBubblesTooltip;
isHideCards.Foreground = Brushes.White;
isHideCards.Margin = rowMargin;
+ row++;
+
UiTextBlock speedChoiceText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.SpeedChoice), row, 0, 1, 3);
speedChoiceText.ToolTip = Lang.Settings.SpeedChoiceTooltip;
speedChoiceText.Foreground = Brushes.White;
speedChoiceText.Margin = rowMargin;
- UiComboBox speedChoiceBox = AddUiElement(UiComboBoxFactory.Create(), row++, 3, 1, 5);
+ UiComboBox speedChoiceBox = AddUiElement(UiComboBoxFactory.Create(), row, 3, 1, 5);
speedChoiceBox.ItemsSource = new String[]{
Lang.Settings.SpeedChoiceType0,
Lang.Settings.SpeedChoiceType1,
@@ -121,75 +161,86 @@ public MemoriaIniControl()
};
speedChoiceBox.SetBinding(Selector.SelectedIndexProperty, new Binding(nameof(Speed)) { Mode = BindingMode.TwoWay });
speedChoiceBox.ToolTip = Lang.Settings.SpeedChoiceTooltip;
- speedChoiceBox.Height = 22;
+ speedChoiceBox.Height = 20;
speedChoiceBox.FontSize = 10;
speedChoiceBox.Margin = rowMargin;
+ row++;
+
UiTextBlock tripleTriadText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.TripleTriad), row, 0, 1, 3);
tripleTriadText.Foreground = Brushes.White;
tripleTriadText.Margin = rowMargin;
- UiComboBox tripleTriadBox = AddUiElement(UiComboBoxFactory.Create(), row++, 3, 1, 5);
+ UiComboBox tripleTriadBox = AddUiElement(UiComboBoxFactory.Create(), row, 3, 1, 5);
tripleTriadBox.ItemsSource = new String[]{
Lang.Settings.TripleTriadType0,
Lang.Settings.TripleTriadType1,
Lang.Settings.TripleTriadType2
};
tripleTriadBox.SetBinding(Selector.SelectedIndexProperty, new Binding(nameof(TripleTriad)) { Mode = BindingMode.TwoWay });
- tripleTriadBox.Height = 22;
+ tripleTriadBox.Height = 20;
tripleTriadBox.FontSize = 10;
tripleTriadBox.Margin = rowMargin;
- UiTextBlock volumeText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.Volume), row++, 0, 1, 8);
+ row++;
+
+ /*UiTextBlock volumeText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.Volume), row++, 0, 1, 8);
volumeText.Foreground = Brushes.White;
volumeText.Margin = rowMargin;
+ volumeText.TextAlignment = TextAlignment.Center;*/
UiTextBlock soundVolumeText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.SoundVolume), row, 0, 1, 3);
soundVolumeText.Foreground = Brushes.White;
soundVolumeText.Margin = rowMargin;
- UiTextBlock soundVolumeTextIndex = AddUiElement(UiTextBlockFactory.Create(""), row, 1, 1, 2);
- soundVolumeTextIndex.SetBinding(TextBlock.TextProperty, new Binding(nameof(SoundVolume)) { Mode = BindingMode.TwoWay });
- soundVolumeTextIndex.Foreground = Brushes.White;
- soundVolumeTextIndex.Margin = rowMargin;
- soundVolumeTextIndex.TextAlignment = TextAlignment.Right;
- Slider soundVolumeSlider = AddUiElement(UiSliderFactory.Create(0), row++, 3, 1, 6);
+ Slider soundVolumeSlider = AddUiElement(UiSliderFactory.Create(0), row, 3, 1, 6);
soundVolumeSlider.SetBinding(Slider.ValueProperty, new Binding(nameof(SoundVolume)) { Mode = BindingMode.TwoWay });
soundVolumeSlider.TickFrequency = 5;
soundVolumeSlider.IsSnapToTickEnabled = true;
soundVolumeSlider.Minimum = 0;
soundVolumeSlider.Maximum = 100;
soundVolumeSlider.Margin = rowMargin;
+ UiTextBlock soundVolumeTextIndex = AddUiElement(UiTextBlockFactory.Create(""), row, 1, 1, 2);
+ soundVolumeTextIndex.SetBinding(TextBlock.TextProperty, new Binding(nameof(SoundVolume)) { Mode = BindingMode.TwoWay });
+ soundVolumeTextIndex.Foreground = Brushes.White;
+ soundVolumeTextIndex.Margin = rowMargin;
+ soundVolumeTextIndex.TextAlignment = TextAlignment.Right;
+
+ row++;
UiTextBlock musicVolumeText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.MusicVolume), row, 0, 1, 3);
musicVolumeText.Foreground = Brushes.White;
musicVolumeText.Margin = rowMargin;
- UiTextBlock musicVolumeTextIndex = AddUiElement(UiTextBlockFactory.Create(""), row, 1, 1, 2);
- musicVolumeTextIndex.SetBinding(TextBlock.TextProperty, new Binding(nameof(MusicVolume)) { Mode = BindingMode.TwoWay });
- musicVolumeTextIndex.Foreground = Brushes.White;
- musicVolumeTextIndex.Margin = rowMargin;
- musicVolumeTextIndex.TextAlignment = TextAlignment.Right;
- Slider musicVolumeSlider = AddUiElement(UiSliderFactory.Create(0), row++, 3, 1, 6);
+ Slider musicVolumeSlider = AddUiElement(UiSliderFactory.Create(0), row, 3, 1, 6);
musicVolumeSlider.SetBinding(Slider.ValueProperty, new Binding(nameof(MusicVolume)) { Mode = BindingMode.TwoWay });
musicVolumeSlider.TickFrequency = 5;
musicVolumeSlider.IsSnapToTickEnabled = true;
musicVolumeSlider.Minimum = 0;
musicVolumeSlider.Maximum = 100;
- musicVolumeSlider.Margin = rowMargin;
+ musicVolumeSlider.Margin = rowMargin;
+ UiTextBlock musicVolumeTextIndex = AddUiElement(UiTextBlockFactory.Create(""), row, 1, 1, 2);
+ musicVolumeTextIndex.SetBinding(TextBlock.TextProperty, new Binding(nameof(MusicVolume)) { Mode = BindingMode.TwoWay });
+ musicVolumeTextIndex.Foreground = Brushes.White;
+ musicVolumeTextIndex.Margin = rowMargin;
+ musicVolumeTextIndex.TextAlignment = TextAlignment.Right;
+
+ row++;
UiTextBlock movieVolumeText = AddUiElement(UiTextBlockFactory.Create(Lang.Settings.MovieVolume), row, 0, 1, 6);
movieVolumeText.Foreground = Brushes.White;
movieVolumeText.Margin = rowMargin;
- UiTextBlock movieVolumeTextIndex = AddUiElement(UiTextBlockFactory.Create(""), row, 1, 1, 2);
- movieVolumeTextIndex.SetBinding(TextBlock.TextProperty, new Binding(nameof(MovieVolume)) { Mode = BindingMode.TwoWay });
- movieVolumeTextIndex.Foreground = Brushes.White;
- movieVolumeTextIndex.Margin = rowMargin;
- movieVolumeTextIndex.TextAlignment = TextAlignment.Right;
- Slider movieVolumeSlider = AddUiElement(UiSliderFactory.Create(0), row++, 3, 1, 6);
+ Slider movieVolumeSlider = AddUiElement(UiSliderFactory.Create(0), row, 3, 1, 6);
movieVolumeSlider.SetBinding(Slider.ValueProperty, new Binding(nameof(MovieVolume)) { Mode = BindingMode.TwoWay });
movieVolumeSlider.TickFrequency = 5;
movieVolumeSlider.IsSnapToTickEnabled = true;
movieVolumeSlider.Minimum = 0;
movieVolumeSlider.Maximum = 100;
movieVolumeSlider.Margin = rowMargin;
+ UiTextBlock movieVolumeTextIndex = AddUiElement(UiTextBlockFactory.Create(""), row, 1, 1, 2);
+ movieVolumeTextIndex.SetBinding(TextBlock.TextProperty, new Binding(nameof(MovieVolume)) { Mode = BindingMode.TwoWay });
+ movieVolumeTextIndex.Foreground = Brushes.White;
+ movieVolumeTextIndex.Margin = rowMargin;
+ movieVolumeTextIndex.TextAlignment = TextAlignment.Right;
+
+ row++;
if (PsxFontInstalled)
{
@@ -205,7 +256,7 @@ public MemoriaIniControl()
fontNames[fontindex+2] = installedFonts.Families[fontindex].Name;
_fontChoiceBox.ItemsSource = fontNames;
_fontChoiceBox.SetBinding(Selector.SelectedItemProperty, new Binding(nameof(FontChoice)) { Mode = BindingMode.TwoWay });
- _fontChoiceBox.Height = 22;
+ _fontChoiceBox.Height = 20;
_fontChoiceBox.FontSize = 10;
_fontChoiceBox.Margin = rowMargin;
}
@@ -248,6 +299,19 @@ public Int16 WidescreenSupport
}
}
}
+
+ public Int16 SharedFPS
+ {
+ get { return _sharedfps; }
+ set
+ {
+ if (_sharedfps != value)
+ {
+ _sharedfps = value;
+ OnPropertyChanged();
+ }
+ }
+ }
public Int16 BattleInterface
{
get { return _battleInterface; }
@@ -309,6 +373,18 @@ public Int16 SkipIntros
}
}
}
+ public Int16 BattleSwirlFrames
+ {
+ get { return _battleswirlframes; }
+ set
+ {
+ if (_battleswirlframes != value)
+ {
+ _battleswirlframes = value;
+ OnPropertyChanged();
+ }
+ }
+ }
public Int16 HideCards
{
get { return _ishidecards; }
@@ -345,7 +421,7 @@ public Int16 TripleTriad
}
}
}
- public Int16 BattleSwirlFrames
+ /*public Int16 BattleSwirlFrames
{
get { return _battleswirlframes; }
set
@@ -356,7 +432,7 @@ public Int16 BattleSwirlFrames
OnPropertyChanged();
}
}
- }
+ }*/
public Int16 SoundVolume
{
get { return _soundvolume; }
@@ -454,7 +530,7 @@ public bool IsOptionPresentInIni(String category, String option)
}
return false;
}
- private Int16 _iswidescreensupport, _battleInterface, _isskipintros, _ishidecards, _speed, _tripleTriad, _battleswirlframes, _soundvolume, _musicvolume, _movievolume, _usegarnetfont, _scaledbattleui;
+ private Int16 _iswidescreensupport, _battleInterface, _isskipintros, _ishidecards, _speed, _tripleTriad, _battleswirlframes, _soundvolume, _musicvolume, _movievolume, _usegarnetfont, _scaledbattleui, _sharedfps;
private double _scaledbattleuiscale;
private String _fontChoice;
private UiComboBox _fontChoiceBox;
@@ -478,12 +554,19 @@ private void LoadSettings()
String value = iniFile.ReadValue("Graphics", nameof(WidescreenSupport));
if (String.IsNullOrEmpty(value))
{
- value = "1";
+ value = " 1";
OnPropertyChanged(nameof(WidescreenSupport));
}
if (!Int16.TryParse(value, out _iswidescreensupport))
_iswidescreensupport = 1;
-
+ value = null;
+ if (String.IsNullOrEmpty(value))
+ {
+ value = " 30";
+ OnPropertyChanged(nameof(SharedFPS));
+ }
+ if (!Int16.TryParse(value, out _sharedfps))
+ _sharedfps = 30;
String valueMenuPos = iniFile.ReadValue("Interface", "BattleMenuPosX");
String valuePSXMenu = iniFile.ReadValue("Interface", "PSXBattleMenu");
Int32 menuPosX = -400;
@@ -504,16 +587,25 @@ private void LoadSettings()
value = iniFile.ReadValue("Graphics", nameof(SkipIntros));
if (String.IsNullOrEmpty(value))
{
- value = "0";
+ value = " 0";
OnPropertyChanged(nameof(SkipIntros));
}
if (!Int16.TryParse(value, out _isskipintros))
_isskipintros = 0;
+ value = iniFile.ReadValue("Graphics", nameof(BattleSwirlFrames));
+ if (String.IsNullOrEmpty(value))
+ {
+ value = " 1";
+ OnPropertyChanged(nameof(BattleSwirlFrames));
+ }
+ if (!Int16.TryParse(value, out _battleswirlframes))
+ _battleswirlframes = 1;
+
value = iniFile.ReadValue("Icons", nameof(HideCards));
if (String.IsNullOrEmpty(value))
{
- value = "0";
+ value = " 0";
OnPropertyChanged(nameof(HideCards));
}
if (!Int16.TryParse(value, out _ishidecards))
@@ -522,7 +614,7 @@ private void LoadSettings()
value = iniFile.ReadValue("Battle", nameof(Speed));
if (String.IsNullOrEmpty(value))
{
- value = "0";
+ value = " 0";
OnPropertyChanged(nameof(Speed));
}
if (!Int16.TryParse(value, out _speed))
@@ -533,25 +625,25 @@ private void LoadSettings()
value = iniFile.ReadValue("TetraMaster", nameof(TripleTriad));
if (String.IsNullOrEmpty(value))
{
- value = "0";
+ value = " 0";
OnPropertyChanged(nameof(TripleTriad));
}
if (!Int16.TryParse(value, out _tripleTriad))
_tripleTriad = 0;
- value = iniFile.ReadValue("Graphics", nameof(BattleSwirlFrames));
+ /*value = iniFile.ReadValue("Graphics", nameof(BattleSwirlFrames));
if (String.IsNullOrEmpty(value))
{
- value = "115";
+ value = " 115";
OnPropertyChanged(nameof(BattleSwirlFrames));
}
if (!Int16.TryParse(value, out _battleswirlframes))
_battleswirlframes = 115;
-
+ */
value = iniFile.ReadValue("Audio", nameof(SoundVolume));
if (String.IsNullOrEmpty(value))
{
- value = "100";
+ value = " 100";
OnPropertyChanged(nameof(SoundVolume));
}
if (!Int16.TryParse(value, out _soundvolume))
@@ -560,7 +652,7 @@ private void LoadSettings()
value = iniFile.ReadValue("Audio", nameof(MusicVolume));
if (String.IsNullOrEmpty(value))
{
- value = "100";
+ value = " 100";
OnPropertyChanged(nameof(MusicVolume));
}
if (!Int16.TryParse(value, out _musicvolume))
@@ -569,13 +661,14 @@ private void LoadSettings()
value = iniFile.ReadValue("Audio", nameof(MovieVolume));
if (String.IsNullOrEmpty(value))
{
- value = "100";
+ value = " 100";
OnPropertyChanged(nameof(MovieVolume));
}
if (!Int16.TryParse(value, out _movievolume))
_movievolume = 100;
Refresh(nameof(WidescreenSupport));
+ Refresh(nameof(SharedFPS));
Refresh(nameof(BattleInterface));
Refresh(nameof(SkipIntros));
Refresh(nameof(HideCards));
@@ -615,7 +708,7 @@ private void LoadSettings()
value = iniFile.ReadValue("Graphics", nameof(ScaledBattleUI));
if (String.IsNullOrEmpty(value))
{
- value = "1";
+ value = " 1";
OnPropertyChanged(nameof(ScaledBattleUI));
}
if (!Int16.TryParse(value, out _scaledbattleui))
@@ -625,7 +718,7 @@ private void LoadSettings()
value = iniFile.ReadValue("Graphics", nameof(ScaleUIFactor));
if (String.IsNullOrEmpty(value))
{
- value = "0.6";
+ value = " 0.6";
OnPropertyChanged(nameof(ScaleUIFactor));
}
if (!double.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out _scaledbattleuiscale))
@@ -660,65 +753,83 @@ private async void OnPropertyChanged([CallerMemberName] String propertyName = nu
switch (propertyName)
{
case nameof(WidescreenSupport):
- iniFile.WriteValue("Graphics", propertyName, " " + WidescreenSupport.ToString());
+ iniFile.WriteValue("Graphics", propertyName + " ", " " + WidescreenSupport.ToString());
if (WidescreenSupport == 1)
- iniFile.WriteValue("Graphics", "Enabled", " 1");
+ iniFile.WriteValue("Graphics", "Enabled ", " 1");
+ break;
+ case nameof(SharedFPS):
+ iniFile.WriteValue("Graphics", "BattleFPS ", " " + SharedFPS);
+ iniFile.WriteValue("Graphics", "FieldFPS ", " " + SharedFPS);
+ iniFile.WriteValue("Graphics", "WorldFPS ", " " + SharedFPS);
+ iniFile.WriteValue("Graphics", "Enabled ", " 1");
break;
case nameof(BattleInterface):
- iniFile.WriteValue("Interface", "BattleMenuPosX", " " + (Int32)BattleInterfaceMenu.X);
- iniFile.WriteValue("Interface", "BattleMenuPosY", " " + (Int32)BattleInterfaceMenu.Y);
- iniFile.WriteValue("Interface", "BattleMenuWidth", " " + (Int32)BattleInterfaceMenu.Width);
- iniFile.WriteValue("Interface", "BattleMenuHeight", " " + (Int32)BattleInterfaceMenu.Height);
- iniFile.WriteValue("Interface", "BattleDetailPosX", " " + (Int32)BattleInterfaceDetail.X);
- iniFile.WriteValue("Interface", "BattleDetailPosY", " " + (Int32)BattleInterfaceDetail.Y);
- iniFile.WriteValue("Interface", "BattleDetailWidth", " " + (Int32)BattleInterfaceDetail.Width);
- iniFile.WriteValue("Interface", "BattleDetailHeight", " " + (Int32)BattleInterfaceDetail.Height);
- iniFile.WriteValue("Interface", "BattleRowCount", " " + (BattleInterface == 2 ? 4 : 5));
- iniFile.WriteValue("Interface", "BattleColumnCount", " " + (BattleInterface == 2 ? 1 : 1));
- iniFile.WriteValue("Interface", "PSXBattleMenu", " " + (BattleInterface == 2 ? 1 : 0));
+ iniFile.WriteValue("Interface", "BattleMenuPosX ", " " + (Int32)BattleInterfaceMenu.X);
+ iniFile.WriteValue("Interface", "BattleMenuPosY ", " " + (Int32)BattleInterfaceMenu.Y);
+ iniFile.WriteValue("Interface", "BattleMenuWidth ", " " + (Int32)BattleInterfaceMenu.Width);
+ iniFile.WriteValue("Interface", "BattleMenuHeight ", " " + (Int32)BattleInterfaceMenu.Height);
+ iniFile.WriteValue("Interface", "BattleDetailPosX ", " " + (Int32)BattleInterfaceDetail.X);
+ iniFile.WriteValue("Interface", "BattleDetailPosY ", " " + (Int32)BattleInterfaceDetail.Y);
+ iniFile.WriteValue("Interface", "BattleDetailWidth ", " " + (Int32)BattleInterfaceDetail.Width);
+ iniFile.WriteValue("Interface", "BattleDetailHeight ", " " + (Int32)BattleInterfaceDetail.Height);
+ iniFile.WriteValue("Interface", "BattleRowCount ", " " + (BattleInterface == 2 ? 4 : 5));
+ iniFile.WriteValue("Interface", "BattleColumnCount ", " " + (BattleInterface == 2 ? 1 : 1));
+ iniFile.WriteValue("Interface", "PSXBattleMenu ", " " + (BattleInterface == 2 ? 1 : 0));
break;
case nameof(SkipIntros):
if (SkipIntros == 3)
{
- iniFile.WriteValue("Graphics", propertyName, " 3");
+ iniFile.WriteValue("Graphics", propertyName + " ", " 3");
iniFile.WriteValue("Graphics", "Enabled ", " 1");
}
else if (SkipIntros == 0)
{
- iniFile.WriteValue("Graphics", propertyName, " 0");
+ iniFile.WriteValue("Graphics", propertyName + " ", " 0");
}
break;
case nameof(HideCards):
- iniFile.WriteValue("Icons", propertyName, " " + HideCards);
- iniFile.WriteValue("Icons", "HideBeach", " " + HideCards); // Merged
- iniFile.WriteValue("Icons", "HideSteam", " " + HideCards); // Merged
+ iniFile.WriteValue("Icons", propertyName + " ", " " + HideCards);
+ iniFile.WriteValue("Icons", "HideBeach ", " " + HideCards); // Merged
+ iniFile.WriteValue("Icons", "HideSteam ", " " + HideCards); // Merged
if (HideCards == 1)
iniFile.WriteValue("Icons", "Enabled ", " 1");
break;
case nameof(Speed):
- iniFile.WriteValue("Battle", propertyName, " " + (Speed < 3 ? Speed : 5));
+ iniFile.WriteValue("Battle", propertyName + " ", " " + (Speed < 3 ? Speed : 5));
if (Speed != 0)
iniFile.WriteValue("Battle", "Enabled ", " 1");
break;
case nameof(TripleTriad):
- iniFile.WriteValue("TetraMaster", propertyName, " " + TripleTriad);
+ iniFile.WriteValue("TetraMaster", propertyName + " ", " " + TripleTriad);
if (TripleTriad > 0)
- iniFile.WriteValue("TetraMaster", "Enabled", " 1");
+ iniFile.WriteValue("TetraMaster", "Enabled ", " 1");
break;
case nameof(BattleSwirlFrames):
- iniFile.WriteValue("Graphics", propertyName, " " + BattleSwirlFrames);
+ if (BattleSwirlFrames == 1)
+ {
+ iniFile.WriteValue("Graphics", propertyName + " ", " 0");
+ iniFile.WriteValue("Graphics", "Enabled ", " 1");
+ }
+ else if (BattleSwirlFrames == 0)
+ {
+ iniFile.WriteValue("Graphics", propertyName + " ", " 90");
+ }
break;
+ /*case nameof(BattleSwirlFrames):
+ iniFile.WriteValue("Graphics", propertyName + " ", " " + BattleSwirlFrames);
+ iniFile.WriteValue("Graphics", "Enabled ", " 1");
+ break;*/
case nameof(SoundVolume):
- iniFile.WriteValue("Audio", propertyName, " " + SoundVolume);
+ iniFile.WriteValue("Audio", propertyName + " ", " " + SoundVolume);
break;
case nameof(MusicVolume):
- iniFile.WriteValue("Audio", propertyName, " " + MusicVolume);
+ iniFile.WriteValue("Audio", propertyName + " ", " " + MusicVolume);
break;
case nameof(MovieVolume):
- iniFile.WriteValue("Audio", propertyName, " " + MovieVolume);
+ iniFile.WriteValue("Audio", propertyName + " ", " " + MovieVolume);
break;
case nameof(UseGarnetFont):
- iniFile.WriteValue("Graphics", propertyName, " " + UseGarnetFont);
+ iniFile.WriteValue("Graphics", propertyName + " ", " " + UseGarnetFont);
if (UseGarnetFont == 1)
iniFile.WriteValue("Graphics", "Enabled ", " 1");
break;
@@ -728,21 +839,21 @@ private async void OnPropertyChanged([CallerMemberName] String propertyName = nu
else if (FontChoice.CompareTo(_fontDefaultPSX) == 0)
{
iniFile.WriteValue("Font", "Enabled ", " 1");
- iniFile.WriteValue("Font", "Names", " \"Alexandria\", \"Garnet\"");
+ iniFile.WriteValue("Font", "Names ", " \"Alexandria\", \"Garnet\"");
}
else
{
iniFile.WriteValue("Font", "Enabled ", " 1");
- iniFile.WriteValue("Font", "Names", " \"" + FontChoice + "\", \"Times Bold\"");
+ iniFile.WriteValue("Font", "Names ", " \"" + FontChoice + "\", \"Times Bold\"");
}
break;
case nameof(ScaledBattleUI):
- iniFile.WriteValue("Graphics", propertyName, " " + ScaledBattleUI);
+ iniFile.WriteValue("Graphics", propertyName + " ", " " + ScaledBattleUI);
if (ScaledBattleUI == 1)
iniFile.WriteValue("Graphics", "Enabled ", " 1");
break;
case nameof(ScaleUIFactor):
- iniFile.WriteValue("Graphics", propertyName, " " + ScaleUIFactor.ToString().Replace(',', '.'));
+ iniFile.WriteValue("Graphics", propertyName + " ", " " + ScaleUIFactor.ToString().Replace(',', '.'));
break;
}
}
diff --git a/Memoria.Launcher/Memoria/UiLauncherButton.xaml b/Memoria.Launcher/Memoria/UiLauncherButton.xaml
index e9814f78b..cbeb843df 100644
--- a/Memoria.Launcher/Memoria/UiLauncherButton.xaml
+++ b/Memoria.Launcher/Memoria/UiLauncherButton.xaml
@@ -1,35 +1,50 @@
-
+
-
+
-
+
-
-
+
+
-
diff --git a/Memoria.Launcher/Memoria/UiLauncherExitButton.cs b/Memoria.Launcher/Memoria/UiLauncherExitButton.cs
deleted file mode 100644
index 99687e951..000000000
--- a/Memoria.Launcher/Memoria/UiLauncherExitButton.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-using System;
-using System.Threading.Tasks;
-using System.Windows;
-
-namespace Memoria.Launcher
-{
- public sealed class UiLauncherExitButton : UiLauncherButton
- {
- public UiLauncherExitButton()
- {
- Label = Lang.Button.Exit;
- }
-
- protected override async Task DoAction()
- {
- Label = Lang.Button.Exiting;
- try
- {
- ((Window)this.GetRootElement()).Close();
- }
- finally
- {
- Label = Lang.Button.Exit;
- }
- }
- }
-}
\ No newline at end of file
diff --git a/Memoria.Launcher/Memoria/UiLauncherModManagerButton.cs b/Memoria.Launcher/Memoria/UiLauncherModManagerButton.cs
index d360303c8..71c430b2a 100644
--- a/Memoria.Launcher/Memoria/UiLauncherModManagerButton.cs
+++ b/Memoria.Launcher/Memoria/UiLauncherModManagerButton.cs
@@ -4,7 +4,7 @@
namespace Memoria.Launcher
{
- public sealed class UiLauncherModManagerButton : UiLauncherButton
+ public sealed class UiLauncherModManagerButton : UiModManagerButton
{
public UiLauncherModManagerButton()
{
diff --git a/Memoria.Launcher/Memoria/UiLauncherPlayButton.cs b/Memoria.Launcher/Memoria/UiLauncherPlayButton.cs
index f31c9f11e..7eb4d51dd 100644
--- a/Memoria.Launcher/Memoria/UiLauncherPlayButton.cs
+++ b/Memoria.Launcher/Memoria/UiLauncherPlayButton.cs
@@ -63,7 +63,7 @@ protected override async Task DoAction()
return;
}
- String[] strArray = GameSettings.ScreenResolution.Split('x');
+ String[] strArray = GameSettings.ScreenResolution.Split(' ')[0].Split('x');
Int32 screenWidth;
Int32 screenHeight;
if (strArray.Length < 2 || !Int32.TryParse(strArray[0], NumberStyles.Integer, CultureInfo.InvariantCulture, out screenWidth) || !Int32.TryParse(strArray[1], NumberStyles.Integer, CultureInfo.InvariantCulture, out screenHeight))
diff --git a/Memoria.Launcher/Memoria/UiModManagerButton.xaml b/Memoria.Launcher/Memoria/UiModManagerButton.xaml
new file mode 100644
index 000000000..c783fa2e0
--- /dev/null
+++ b/Memoria.Launcher/Memoria/UiModManagerButton.xaml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Memoria.Launcher/Memoria/UiModManagerButton.xaml.cs b/Memoria.Launcher/Memoria/UiModManagerButton.xaml.cs
new file mode 100644
index 000000000..b6876153b
--- /dev/null
+++ b/Memoria.Launcher/Memoria/UiModManagerButton.xaml.cs
@@ -0,0 +1,75 @@
+using System;
+using System.Threading.Tasks;
+using System.Windows;
+using System.Windows.Media;
+
+
+namespace Memoria.Launcher
+{
+ public abstract partial class UiModManagerButton
+ {
+ protected UiModManagerButton()
+ {
+ InitializeComponent();
+ }
+
+ public void Click()
+ {
+ if (!IsEnabled)
+ return;
+
+ OnClick();
+ }
+
+ protected abstract Task DoAction();
+
+ protected override async void OnClick()
+ {
+ try
+ {
+ IsEnabled = false;
+
+ String label = Label;
+ try
+ {
+ await DoAction();
+ }
+ finally
+ {
+ Label = label;
+ }
+ }
+ catch (Exception ex)
+ {
+ UiHelper.ShowError(this, ex);
+ }
+ finally
+ {
+ IsEnabled = true;
+ }
+ }
+
+ public static readonly DependencyProperty BlueRectVisibilityProperty = DependencyProperty.Register("BlueRectVisibility", typeof(Visibility), typeof(UiModManagerButton), new PropertyMetadata(Visibility.Visible));
+ public static readonly DependencyProperty LabelProperty = DependencyProperty.Register("Label", typeof(String), typeof(UiModManagerButton), new PropertyMetadata("Button Label"));
+ public static readonly DependencyProperty SubLabelProperty = DependencyProperty.Register("SubLabel", typeof(String), typeof(UiModManagerButton), new PropertyMetadata(null));
+ public static readonly DependencyProperty SubLabelColorProperty = DependencyProperty.Register("SubLabelColor", typeof(Brush), typeof(UiModManagerButton), new PropertyMetadata(Brushes.DarkGray));
+
+ public String Label
+ {
+ get { return (String)GetValue(LabelProperty); }
+ set { SetValue(LabelProperty, value); }
+ }
+
+ public String SubLabel
+ {
+ get { return (String)GetValue(SubLabelProperty); }
+ set { SetValue(SubLabelProperty, value); }
+ }
+
+ public Brush SubLabelColor
+ {
+ get { return (Brush)GetValue(SubLabelColorProperty); }
+ set { SetValue(SubLabelColorProperty, value); }
+ }
+ }
+}
\ No newline at end of file
diff --git a/Memoria.Launcher/ModManagerWindow.cs b/Memoria.Launcher/ModManagerWindow.cs
index c8547667a..bdc286b2d 100644
--- a/Memoria.Launcher/ModManagerWindow.cs
+++ b/Memoria.Launcher/ModManagerWindow.cs
@@ -267,7 +267,7 @@ private void OnClickCatalogHeader(Object sender, EventArgs e)
private void OnPreviewFileDownloaded(Object sender, EventArgs e)
{
if (PreviewModImage.Source == sender)
- PreviewModImageMissing.Text = String.Empty;
+ return;
}
private void DownloadStart(Mod mod)
@@ -571,7 +571,7 @@ private void UpdateModListInstalled()
private Boolean GenerateAutomaticDescriptionFile(String folderName)
{
- if (!Directory.Exists(folderName) || File.Exists(folderName + "/" + Mod.DESCRIPTION_FILE))
+ if (!Directory.Exists(folderName))
return false;
Mod catalogVersion = Mod.SearchWithPath(modListCatalog, folderName);
if (catalogVersion != null)
@@ -580,6 +580,9 @@ private Boolean GenerateAutomaticDescriptionFile(String folderName)
return true;
}
String name = null;
+ String description = null;
+ String author = null;
+ String category = null;
if (folderName == "MoguriFiles")
name = "Moguri Mod";
else if (folderName == "MoguriSoundtrack")
@@ -616,7 +619,7 @@ private void UpdateModDetails(Mod mod)
{
Boolean hasSubMod = mod.SubMod != null && mod.SubMod.Count > 0;
PreviewModName.Text = mod.Name;
- PreviewModVersion.Text = mod.CurrentVersion?.ToString() ?? "Unknown version";
+ PreviewModVersion.Text = mod.CurrentVersion?.ToString() ?? "";
PreviewModRelease.Text = mod.ReleaseDate ?? "Unknown date";
PreviewModAuthor.Text = mod.Author ?? "Unknown author";
PreviewModDescription.Text = mod.Description ?? "No description.";
@@ -624,6 +627,7 @@ private void UpdateModDetails(Mod mod)
PreviewModCategory.Text = mod.Category ?? "Unknown";
PreviewModWebsite.ToolTip = mod.Website ?? String.Empty;
PreviewModWebsite.IsEnabled = !String.IsNullOrEmpty(mod.Website);
+ PreviewModWebsite.Visibility = PreviewModWebsite.IsEnabled ? Visibility.Visible : Visibility.Collapsed;
PreviewSubModPanel.Visibility = hasSubMod ? Visibility.Visible : Visibility.Collapsed;
if (hasSubMod)
{
@@ -665,17 +669,14 @@ private void UpdateModDetails(Mod mod)
}
if (mod.PreviewImage == null)
{
- PreviewModImageMissing.Text = Lang.ModEditor.PreviewImageMissing;
PreviewModImage.Source = null;
}
else if (mod.PreviewImage.IsDownloading)
{
- PreviewModImageMissing.Text = "🔄";
PreviewModImage.Source = mod.PreviewImage;
}
else
{
- PreviewModImageMissing.Text = String.Empty;
PreviewModImage.Source = mod.PreviewImage;
}
}
@@ -820,14 +821,10 @@ private void SetupFrameLang()
Title = Lang.ModEditor.WindowTitle + " - " + ((MainWindow)this.Owner).MemoriaAssemblyCompileDate.ToString("Y", CultureInfo.GetCultureInfo(Lang.LangName));
GroupModInfo.Header = Lang.ModEditor.ModInfos;
PreviewModWebsite.Content = Lang.ModEditor.Website;
- CaptionModName.Text = Lang.ModEditor.Name + ":";
CaptionModAuthor.Text = Lang.ModEditor.Author + ":";
- CaptionModRelease.Text = Lang.ModEditor.Release + ":";
CaptionModCategory.Text = Lang.ModEditor.Category + ":";
- CaptionModVersion.Text = Lang.ModEditor.Version + ":";
CaptionModDescription.Text = Lang.ModEditor.Description + ":";
CaptionModReleaseNotes.Text = Lang.ModEditor.ReleaseNotes + ":";
- PreviewModImageMissing.Text = Lang.ModEditor.PreviewImageMissing;
PreviewSubModActive.Content = Lang.ModEditor.Active;
CaptionSubModPanel.Text = Lang.ModEditor.SubModPanel + ":";
tabMyMods.Text = Lang.ModEditor.TabMyMods;
diff --git a/Memoria.Launcher/ModManagerWindow.xaml b/Memoria.Launcher/ModManagerWindow.xaml
index 5508f0fd7..c33c3eede 100644
--- a/Memoria.Launcher/ModManagerWindow.xaml
+++ b/Memoria.Launcher/ModManagerWindow.xaml
@@ -1,606 +1,1084 @@
-
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
-
+
+
+
+
+
+
-
-
+
+
-
-
+
-
-
-
-
-
+
-
-
-
+
+
+
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
+
-
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+ IsTabStop="False" />
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
+
-
+
-
+
-
-
-
+
+
-
-
+
-
-
+
+
-
+
-
-
-
+
+
+
+
+
-
-
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
+
-
-
-
-
+
+