Skip to content

Commit

Permalink
5.7.5 upload for #12 and XWA Message limit
Browse files Browse the repository at this point in the history
  • Loading branch information
MikeG621 committed Jan 16, 2023
1 parent 6ac5174 commit 4c4e353
Show file tree
Hide file tree
Showing 11 changed files with 43 additions and 28 deletions.
10 changes: 6 additions & 4 deletions BaseMessage.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
/*
* Idmr.Platform.dll, X-wing series mission library file, XW95-XWA
* Copyright (C) 2009-2022 Michael Gaisser ([email protected])
* Copyright (C) 2009-2023 Michael Gaisser ([email protected])
* Licensed under the MPL v2.0 or later
*
* Full notice in ../help/Idmr.Platform.chm
* Version: 5.7.3
* Version: 5.7.5
*/

/* CHANGELOG
* v5.7.5, 230116
* [UPD] LengthLimit now public
* v5.7.3, 220619
* [UPD] length limit pulled out to a variable
* v4.0, 200809
Expand All @@ -30,14 +32,14 @@ public abstract class BaseMessage

/// <summary>The length of <see cref="MessageString"/>.</summary>
/// <remarks>Defaults to <b>64</b>.</remarks>
protected int _lengthLimit = 0x40;
public static int LengthLimit { get; internal set; } = 0x40;

/// <summary>Gets or sets the in-flight message string</summary>
/// <remarks>Restricted to 64 characters for TIE/XvT, 68 for XWA, defaults to <b>"New Message"</b></remarks>
public string MessageString
{
get { return _messageString; }
set { _messageString = Common.StringFunctions.GetTrimmed(value, _lengthLimit); }
set { _messageString = Common.StringFunctions.GetTrimmed(value, LengthLimit); }
}
/// <summary>Gets or sets the message color index</summary>
public byte Color { get; set; }
Expand Down
8 changes: 5 additions & 3 deletions Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Idmr.Platform.dll, X-wing series mission library file, XW95-XWA
* Copyright (C) 2009-2022 Michael Gaisser ([email protected])
* Copyright (C) 2009-2023 Michael Gaisser ([email protected])
* Licensed under the MPL v2.0 or later
*
* Full notice in ../help/Idmr.Platform.chm
Expand All @@ -16,8 +16,10 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Imperial Department of Military Research")]
[assembly: AssemblyProduct("Idmr.Platform.dll")]
[assembly: AssemblyCopyright("Copyright © Michael Gaisser 2009-2022")]
[assembly: AssemblyCopyright("Copyright © Michael Gaisser 2009-2023")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

[assembly: AssemblyVersion("5.7.4.*")]
[assembly: AssemblyVersion("5.7.5.*")]
[assembly: AssemblyFileVersion("5.7.5.0")]
[assembly: AssemblyInformationalVersion("5.7.5 final")]
6 changes: 4 additions & 2 deletions Readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ Idmr.Platform.dll

Author: Michael Gaisser ([email protected])
Contributors: Random Starfighter (JB)
Version: 5.7.4
Date: 2022.08.27
Version: 5.7.5
Date: 2023.01.16

Library for editing LucasArts *.XWI and *.TIE mission files for Xwing95, TIE95, XvT and XWA

=========
Version History

v5.7.5, 16 Jan 2023
- (XWA) Fixed Message reading after length increased in 5.7.3
- Updates for TIE. Deleted items are those confirmed to have zero effect in the exectuable. [Issue #12]
- "Captured on Ejection" and "Secret Goals" removed
- Trigger "Unknown (arrive?)" now "cannon subsystem disabled"
Expand Down
5 changes: 3 additions & 2 deletions Tie/FlightGroup.FGGoals.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/*
* Idmr.Platform.dll, X-wing series mission library file, TIE95-XWA
* Copyright (C) 2009-2022 Michael Gaisser ([email protected])
* Copyright (C) 2009-2023 Michael Gaisser ([email protected])
* Licensed under the MPL v2.0 or later
*
* Full notice in ../help/Idmr.Platform.chm
* Version: 2.1+
* Version: 5.7.5
*/

/* CHANGELOG
* v5.7.5, 230116
* [DEL #12] SecretCondition and Secret amount, still accesible via the Indexer
* v2.1, 141214
* [UPD] change to MPL
Expand Down
5 changes: 3 additions & 2 deletions Tie/FlightGroup.Order.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/*
* Idmr.Platform.dll, X-wing series mission library file, XW95-XWA
* Copyright (C) 2009-2022 Michael Gaisser ([email protected])
* Copyright (C) 2009-2023 Michael Gaisser ([email protected])
* Licensed under the MPL v2.0 or later
*
* Full notice in ../help/Idmr.Platform.chm
* Version: 5.7+
* Version: 5.7.5
*/

/* CHANGELOG
* v5.7.5, 230116
* [UPD #12] Importing order values past Board to Repair (0x20) will reset to zero to match TIE behavior
* v5.7, 220127
* [NEW] cloning ctor [JB]
Expand Down
7 changes: 4 additions & 3 deletions Tie/Mission.Trigger.cs
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
/*
* Idmr.Platform.dll, X-wing series mission library file, XW95-XWA
* Copyright (C) 2009-2022 Michael Gaisser ([email protected])
* Copyright (C) 2009-2023 Michael Gaisser ([email protected])
* Licensed under the MPL v2.0 or later
*
* Full notice in ../help/Idmr.Platform.chm
* Version: 5.7+
* Version: 5.7.5
*/

/* CHANGELOG
* [UPD #12] ToString update for Ai Rating, Status and All Craft
* v5.7.5, 230116
* [UPD #12] ToString update for AI Rating, Status and All Craft
* v5.7, 220127
* [NEW] cloning ctor [JB]
* v4.0, 200809
Expand Down
5 changes: 3 additions & 2 deletions Tie/Mission.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/*
* Idmr.Platform.dll, X-wing series mission library file, XW95-XWA
* Copyright (C) 2009-2022 Michael Gaisser ([email protected])
* Copyright (C) 2009-2023 Michael Gaisser ([email protected])
* Licensed under the MPL v2.0 or later
*
* Full notice in ../help/Idmr.Platform.chm
* Version: 4.0+
* Version: 5.7.5
*/

/* CHANGELOG
* v5.7.5, 230116
* [DEL #12] CapturedOnEjection
* [UPD #12] Status reset if out of bounds during load
* v4.0, 200809
Expand Down
5 changes: 3 additions & 2 deletions Tie/Strings.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/*
* Idmr.Platform.dll, X-wing series mission library file, XW95-XWA
* Copyright (C) 2009-2022 Michael Gaisser ([email protected])
* Copyright (C) 2009-2023 Michael Gaisser ([email protected])
* Licensed under the MPL v2.0 or later
*
* Full notice in ../help/Idmr.Platform.chm
* Version: 4.0+
* Version: 5.7.5
*/

/* CHANGELOG
* v5.7.5, 230116
* [UPD #12] Trigger 0x18 now "have cannon subsystem disabled"
* [UPD #12] TriggerType Misc now "Adjusted AI Skill"
* [DEL #12] Misc array
Expand Down
2 changes: 1 addition & 1 deletion Xwa/FlightGroup.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* Idmr.Platform.dll, X-wing series mission library file, XW95-XWA
* Copyright (C) 2009-3030 Michael Gaisser ([email protected])
* Copyright (C) 2009-2020 Michael Gaisser ([email protected])
* Licensed under the MPL v2.0 or later
*
* Full notice in ../help/Idmr.Platform.chm
Expand Down
8 changes: 5 additions & 3 deletions Xwa/Message.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
/*
* Idmr.Platform.dll, X-wing series mission library file, XW95-XWA
* Copyright (C) 2009-2022 Michael Gaisser ([email protected])
* Copyright (C) 2009-2023 Michael Gaisser ([email protected])
* Licensed under the MPL v2.0 or later
*
* Full notice in ../help/Idmr.Platform.chm
* Version: 5.7.3
* Version: 5.7.5
*/

/* CHANGELOG
* v5.7.5, 230116
* [UPD] LengthLimit name
* v5.7.3, 220619
* [UPD] length limit to 68
* v4.0, 200809
Expand Down Expand Up @@ -35,7 +37,7 @@ public class Message : BaseMessage
/// <remarks>Sent to Team 1 by default</remarks>
public Message()
{
_lengthLimit = 0x44;
LengthLimit = 0x44;
for (int i = 0; i < 6; i++) Triggers[i] = new Mission.Trigger();
SentTo[0] = true;
}
Expand Down
10 changes: 6 additions & 4 deletions Xwa/Mission.cs
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
/*
* Idmr.Platform.dll, X-wing series mission library file, XW95-XWA
* Copyright (C) 2009-2022 Michael Gaisser ([email protected])
* Copyright (C) 2009-2023 Michael Gaisser ([email protected])
* Licensed under the MPL v2.0 or later
*
* Full notice in ../help/Idmr.Platform.chm
* Version: 5.7.2
* Version: 5.7.5
*/

/* CHANGELOG
* v5.7.5, 230116
* [FIX] Message read now uses LengthLimit
* v5.7.2, 220225
* [FIX] Missing squadron values from LogoEnum
* v5.7.1, 220208
Expand Down Expand Up @@ -433,9 +435,9 @@ public void LoadFromStream(FileStream stream)
for (i=0;i<numMessages;i++)
{
stream.Position += 2;
Messages[i].MessageString = new string(br.ReadChars(0x40));
Messages[i].MessageString = new string(br.ReadChars(Message.LengthLimit));
if (Messages[i].MessageString.IndexOf('\0') != -1) Messages[i].MessageString = Messages[i].MessageString.Substring(0, Messages[i].MessageString.IndexOf('\0'));
stream.Position += 0x10;
stream.Position += 0x0C;
stream.Read(buffer, 0, 0xA);
for (j=0;j<10;j++) Messages[i].SentTo[j] = Convert.ToBoolean(buffer[j]);
stream.Read(buffer, 0, 0x20);
Expand Down

0 comments on commit 4c4e353

Please sign in to comment.