Fixed errors in function documentation xml blocks, and made some small fixes to the readme.
This commit is contained in:
parent
fd225e7bb1
commit
e6a963c3c2
@ -67,28 +67,28 @@ namespace Steamworks
|
||||
m_szGameTags = Encoding.UTF8.GetBytes(tags + '\0');
|
||||
}
|
||||
|
||||
public servernetadr_t m_NetAdr; ///< IP/Query Port/Connection Port for this server
|
||||
public int m_nPing; ///< current ping time in milliseconds
|
||||
public servernetadr_t m_NetAdr; // < IP/Query Port/Connection Port for this server
|
||||
public int m_nPing; // < current ping time in milliseconds
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
public bool m_bHadSuccessfulResponse; ///< server has responded successfully in the past
|
||||
public bool m_bHadSuccessfulResponse; // < server has responded successfully in the past
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
public bool m_bDoNotRefresh; ///< server is marked as not responding and should no longer be refreshed
|
||||
public bool m_bDoNotRefresh; // < server is marked as not responding and should no longer be refreshed
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cbMaxGameServerGameDir)]
|
||||
private byte[] m_szGameDir; ///< current game directory
|
||||
private byte[] m_szGameDir; // < current game directory
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cbMaxGameServerMapName)]
|
||||
private byte[] m_szMap; ///< current map
|
||||
private byte[] m_szMap; // < current map
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cbMaxGameServerGameDescription)]
|
||||
private byte[] m_szGameDescription; ///< game description
|
||||
public uint m_nAppID; ///< Steam App ID of this server
|
||||
public int m_nPlayers; ///< total number of players currently on the server. INCLUDES BOTS!!
|
||||
public int m_nMaxPlayers; ///< Maximum players that can join this server
|
||||
public int m_nBotPlayers; ///< Number of bots (i.e simulated players) on this server
|
||||
private byte[] m_szGameDescription; // < game description
|
||||
public uint m_nAppID; // < Steam App ID of this server
|
||||
public int m_nPlayers; // < total number of players currently on the server. INCLUDES BOTS!!
|
||||
public int m_nMaxPlayers; // < Maximum players that can join this server
|
||||
public int m_nBotPlayers; // < Number of bots (i.e simulated players) on this server
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
public bool m_bPassword; ///< true if this server needs a password to join
|
||||
public bool m_bPassword; // < true if this server needs a password to join
|
||||
[MarshalAs(UnmanagedType.I1)]
|
||||
public bool m_bSecure; ///< Is this server protected by VAC
|
||||
public uint m_ulTimeLastPlayed; ///< time (in unix time) when this server was last played on (for favorite/history servers)
|
||||
public int m_nServerVersion; ///< server version as reported to Steam
|
||||
public bool m_bSecure; // < Is this server protected by VAC
|
||||
public uint m_ulTimeLastPlayed; // < time (in unix time) when this server was last played on (for favorite/history servers)
|
||||
public int m_nServerVersion; // < server version as reported to Steam
|
||||
|
||||
// Game server name
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = Constants.k_cbMaxGameServerName)]
|
||||
|
@ -144,7 +144,7 @@ namespace MobiusEditor.Utility
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the C&C1/RA1 SHP frames.
|
||||
/// Retrieves the C&C1/RA1 SHP frames.
|
||||
/// </summary>
|
||||
/// <param name="fileData">Original file data.</param>
|
||||
/// <param name="palette">Color palette</param>
|
||||
@ -155,7 +155,7 @@ namespace MobiusEditor.Utility
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the C&C1/RA1 SHP frames.
|
||||
/// Retrieves the C&C1/RA1 SHP frames.
|
||||
/// </summary>
|
||||
/// <param name="fileData">Original file data.</param>
|
||||
/// <param name="palette">Color palette</param>
|
||||
@ -198,7 +198,7 @@ namespace MobiusEditor.Utility
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the C&C1 / RA1 SHP image data.
|
||||
/// Retrieves the C&C1 / RA1 SHP image data.
|
||||
/// </summary>
|
||||
/// <param name="fileData">File data</param>
|
||||
/// <param name="width">The width of all frames</param>
|
||||
@ -377,7 +377,7 @@ namespace MobiusEditor.Utility
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves the Dune II SHP image data. (used for mouse cursors in C&C1/RA1)
|
||||
/// Retrieves the Dune II SHP image data. (used for mouse cursors in C&C1/RA1)
|
||||
/// </summary>
|
||||
/// <param name="fileData">File data</param>
|
||||
/// <param name="widths">The widths of all frames</param>
|
||||
|
@ -21,6 +21,11 @@ using System.Text;
|
||||
|
||||
namespace MobiusEditor.Utility
|
||||
{
|
||||
/// <summary>
|
||||
/// This class reads C&C Remastered Collection strings file, and allows retrieving requested strings by text ID.
|
||||
/// Any string IDs that have no match in the Remastered files should be added in the
|
||||
/// <see cref="StartupLoader.AddMissingRemasterText(IGameTextManager)"/> function.
|
||||
/// </summary>
|
||||
public class GameTextManager: IGameTextManager
|
||||
{
|
||||
private readonly Dictionary<string, string> gameText = new Dictionary<string, string>();
|
||||
|
@ -19,6 +19,15 @@ using System.Text;
|
||||
|
||||
namespace MobiusEditor.Utility
|
||||
{
|
||||
/// <summary>
|
||||
/// <para>This class reads the classic TD/RA strings file, and allows retrieving requested strings by text ID.
|
||||
/// To accomplish this, it contains mappings of the text IDs used in the C&C Remastered Collection with the
|
||||
/// corresponding numeric indices in the classic strings file. Of course, not all classic strings are
|
||||
/// available through this system, but all strings used in the editor should be covered here. Any string
|
||||
/// IDs that have no match in the classic files should be added in the
|
||||
/// <see cref="StartupLoader.AddMissingClassicText(IGameTextManager)"/> function.</para>
|
||||
/// <para>When editing this class, always make sure none of the mappings contain duplicate keys.</para>
|
||||
/// </summary>
|
||||
public class GameTextManagerClassic : IGameTextManager
|
||||
{
|
||||
private static readonly Dictionary<string, int> StringMappingsTd = new Dictionary<string, int>
|
||||
|
@ -37,7 +37,7 @@ namespace MobiusEditor.Utility
|
||||
Number5 /**/ = 0x06,
|
||||
/// <summary>6 ^</summary>
|
||||
Number6 /**/ = 0x07,
|
||||
/// <summary>7 &</summary>
|
||||
/// <summary>7 &</summary>
|
||||
Number7 /**/ = 0x08,
|
||||
/// <summary>8 *</summary>
|
||||
Number8 /**/ = 0x09,
|
||||
|
@ -20,7 +20,7 @@ namespace MobiusEditor.Utility
|
||||
public const int SIZE_OF_ENCRYPTED_KEY = 80;
|
||||
|
||||
/// <summary>
|
||||
/// Byte length of an RSA key used in C&C.
|
||||
/// Byte length of an RSA key used in C&C.
|
||||
/// </summary>
|
||||
public const int SIZE_OF_RSA_KEY = 40;
|
||||
|
||||
@ -70,7 +70,7 @@ namespace MobiusEditor.Utility
|
||||
public const int SIZE_OF_BLOCK = 8;
|
||||
|
||||
/// <summary>
|
||||
/// Byte length of a Blowfish key used in C&C.
|
||||
/// Byte length of a Blowfish key used in C&C.
|
||||
/// </summary>
|
||||
public const int SIZE_OF_BLOWFISH_KEY = 56;
|
||||
|
||||
|
@ -2,7 +2,6 @@
|
||||
using MobiusEditor.Model;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Specialized;
|
||||
using System.Globalization;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
@ -107,7 +106,7 @@ namespace MobiusEditor.Utility
|
||||
}
|
||||
}
|
||||
|
||||
public static String GetRemasterRunPath(string gameId, bool askIfNotFound)
|
||||
public static string GetRemasterRunPath(string gameId, bool askIfNotFound)
|
||||
{
|
||||
// Do a test for CONFIG.MEG
|
||||
string runPath = null;
|
||||
@ -263,7 +262,7 @@ namespace MobiusEditor.Utility
|
||||
return true;
|
||||
}
|
||||
|
||||
private static String FindCompatibleCulture(MegafileManager mfm)
|
||||
private static string FindCompatibleCulture(MegafileManager mfm)
|
||||
{
|
||||
string currentCulture = CultureInfo.CurrentUICulture.Name.ToUpper();
|
||||
if (mfm.FileExists(String.Format(Globals.GameTextFilenameFormat, currentCulture)))
|
||||
@ -273,7 +272,7 @@ namespace MobiusEditor.Utility
|
||||
Regex stringsFileMatch = new Regex(
|
||||
String.Format(Regex.Escape(Globals.GameTextFilenameFormat).Replace(Regex.Escape("{0}"), "{0}"),
|
||||
"([a-zA-Z\\-]+)"), RegexOptions.Compiled);
|
||||
List<String> supportedCultures = new List<String>();
|
||||
List<string> supportedCultures = new List<string>();
|
||||
foreach (string filename in mfm)
|
||||
{
|
||||
Match match = stringsFileMatch.Match(filename);
|
||||
@ -310,13 +309,13 @@ namespace MobiusEditor.Utility
|
||||
// The order of load determines the file priority; only the first found occurrence of a file is used.
|
||||
GameType[] gameTypes = GameTypeFactory.GetGameTypes();
|
||||
GameInfo[] gameTypeInfo = new GameInfo[gameTypes.Length];
|
||||
Dictionary<GameType, String> gameFolders = new Dictionary<GameType, string>();
|
||||
Dictionary<GameType, string> gameFolders = new Dictionary<GameType, string>();
|
||||
foreach (GameType gi in gameTypes)
|
||||
{
|
||||
GameInfo gic = GameTypeFactory.GetGameInfo(gi);
|
||||
gameTypeInfo[(int)gic.GameType] = gic;
|
||||
String path = gic.ClassicFolder;
|
||||
String pathFull = Path.GetFullPath(Path.Combine(applicationPath, gic.ClassicFolder));
|
||||
string path = gic.ClassicFolder;
|
||||
string pathFull = Path.GetFullPath(Path.Combine(applicationPath, gic.ClassicFolder));
|
||||
if (!Directory.Exists(pathFull))
|
||||
{
|
||||
// Revert to default.
|
||||
@ -472,10 +471,15 @@ namespace MobiusEditor.Utility
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds / corrects strings that are either missing or incomplete in the Remaster for their intended use
|
||||
/// in the map editor.
|
||||
/// </summary>
|
||||
/// <param name="gtm">The game text manager to apply these changes on.</param>
|
||||
private static void AddMissingRemasterText(IGameTextManager gtm)
|
||||
{
|
||||
// == Buildings ==
|
||||
String fake = " (" + gtm["TEXT_UI_FAKE"] + ")";
|
||||
string fake = " (" + gtm["TEXT_UI_FAKE"] + ")";
|
||||
if (!gtm["TEXT_STRUCTURE_RA_WEAF"].EndsWith(fake)) gtm["TEXT_STRUCTURE_RA_WEAF"] += fake;
|
||||
if (!gtm["TEXT_STRUCTURE_RA_FACF"].EndsWith(fake)) gtm["TEXT_STRUCTURE_RA_FACF"] += fake;
|
||||
if (!gtm["TEXT_STRUCTURE_RA_SYRF"].EndsWith(fake)) gtm["TEXT_STRUCTURE_RA_SYRF"] += fake;
|
||||
@ -508,6 +512,13 @@ namespace MobiusEditor.Utility
|
||||
gtm["TEXT_SMUDGE_BIB"] = "Road Bib";
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Adds strings that are missing in the classic files. Note that unlike for Remastered text,
|
||||
/// the strings in this function cannot be composed from other strings; the actual strings files differ
|
||||
/// per game, and this function is called before any maps are opened, meaning no game is chosen yet,
|
||||
/// and no actual game files are loaded.
|
||||
/// </summary>
|
||||
/// <param name="gtm">The game text manager to apply these changes on.</param>
|
||||
private static void AddMissingClassicText(IGameTextManager gtm)
|
||||
{
|
||||
// Classic game text manager does not clear these extra strings when resetting the strings table.
|
||||
|
@ -363,7 +363,7 @@ namespace MobiusEditor.Utility
|
||||
/// <param name="libraryFolders">A list of Steam library folders.</param>
|
||||
/// <param name="steamId">Steam game ID.</param>
|
||||
/// <param name="identifyingFiles">Optional list of files that need to be present inside the found game folder.</param>
|
||||
/// <returns>The first matching game folder for that id that is found, or null if no existing match was found.<</returns>
|
||||
/// <returns>The first matching game folder for that id that is found, or null if no existing match was found.</returns>
|
||||
private static string GetGameFolder(IEnumerable<string> libraryFolders, string steamId, params string[] identifyingFiles)
|
||||
{
|
||||
if (steamId == null)
|
||||
|
10
MANUAL.md
10
MANUAL.md
@ -14,9 +14,9 @@ If the C&C Remastered Collection is not installed on your PC, a warning will be
|
||||
|
||||
The creators of the map editor have chosen to build a manual into the editor, but it might not be immediately obvious. Look at the bottom bar, and it will tell you for the currently selected editing type what your mouse buttons will do, and which modifier keys will change to different editing modes. Once you hold down such a key, the bottom bar text will change, further explaining what your mouse buttons will do in this specific mode.
|
||||
|
||||
In general, holding down \[Shift\] will activate placement mode, and in that mode, left click will place an object, and right clicking on an object will remove it. Outside placement mode, double-clicking an object will open its properties, holding down the left mouse button on an object will allow dragging it around, and right-clicking an object will copy its properties to the tool window's placement template. These controls may vary a bit from type to type; for example, the Properties window doesn't exist for all object types, and in Resources mode, placement mode is always active.
|
||||
In general, holding down \[Shift\] will activate placement mode, and in that mode, left clicking will place an object, and right clicking on an object will remove it. Outside placement mode, double-clicking an object will open its properties, holding down the left mouse button on an object will allow dragging it around, and right-clicking an object will make it the currently selected object in the tool window, including all its specifically-set properties (such as House, Strength, Trigger…). These controls may vary a bit; for example, the Properties window doesn't exist for all object types, and in Resources mode, placement mode is always active.
|
||||
|
||||
As for basic navigation, the controls are fairly straightforward: the scroll wheel and the \[Plus\] and \[Minus\] keys allow zooming in and out, arrow keys will pan around the map, and holding down either the middle mouse button or the space bar allows quickly drag-panning around the map. Some special shortcuts for zooming can be found in the View → Zoom menu; the \* key will reset the zoom to the full map, and \[Ctrl\]+\[D\] will zoom the editor to just the area of the map's configured map bounds area plus one extra cell border around it. Note that you can zoom out farther than the full map; this was done to allow placing map template pieces partially outside the map from the top and left sides of the map.
|
||||
As for basic navigation, the controls are fairly straightforward: the scroll wheel and the \[Plus\] and \[Minus\] keys allow zooming in and out, arrow keys will pan around the map, and holding down either the middle mouse button or the space bar allows quickly drag-panning around the map. Some special shortcuts for zooming can be found in the View → Zoom menu; the \[\*\] key will reset the zoom to the full map, and \[Ctrl\]+\[D\] will zoom the editor to the map's bounds area plus one extra cell border around it. Note that you can zoom out farther than the full map; this was done to allow placing map template pieces partially outside the map from the top and left sides of the map.
|
||||
|
||||
Specific options about the map and the scripting elements can be found in the "Settings" menu:
|
||||
|
||||
@ -28,9 +28,9 @@ The triggers dialog contains a "Check" button that will check if any configurati
|
||||
|
||||
### Hotkeys
|
||||
|
||||
You can switch between the different editing modes using the six first letters on the top two rows on your keyboard; Q-W-E-R-T-Y and A-S-D-F-G on classic a US qwerty keyboard. Note that these keys are interpreted positionally on the keyboard, meaning that they will work in the intended logical way on different-region keyboard, like the German 'qwertz' and French 'azerty'.
|
||||
You can switch between the different editing modes using the six first letters on the top two rows on your keyboard; Q-W-E-R-T-Y and A-S-D-F-G-H on classic a US qwerty keyboard. Note that these keys are interpreted positionally on the keyboard, meaning that they will work in the intended logical way on different-region keyboard, like the German 'qwertz' and French 'azerty'.
|
||||
|
||||
As is standard in most programs, Undo and Redo are linked to \[Ctrl\]+\[Z\] and \[Ctrl\]+\[Y\] respectivelt. Note that the Undo/Redo history includes edits to Triggers and Teamtypes, though since those are large operations, a warning will be shown before an undo on those is applied. Some actions in the Map settings, such as enabling the *Aftermath* expansion units or changing ini rules, are deemed too drastic to support in the Undo/Redo system, and will clear the current edit history.
|
||||
As is standard in most programs, Undo and Redo are linked to \[Ctrl\]+\[Z\] and \[Ctrl\]+\[Y\] respectively. Note that the Undo/Redo history includes edits to Triggers and Teamtypes, though since those are generally large operations, a warning will be shown before an Undo/Redo on those is applied. Some actions in the Map settings, such as enabling the *Aftermath* expansion units or changing INI Rules, are deemed too drastic to support in the Undo/Redo system, and will clear the current edit history.
|
||||
|
||||
Besides those, PageUp and PageDown have been universally implemented to let you switch to the previous / next item on the current editing tool's selection list, with Home and End going to the start and end of the list. This also works for increasing/decreasing the resource placement size in Resources mode. Holding down the \[Ctrl\] key and using the mouse scroll wheel has the same previous / next item function.
|
||||
|
||||
@ -40,7 +40,7 @@ Note that these hotkeys only work when the main window is selected; if you click
|
||||
|
||||
### Sole Survivor and Megamaps
|
||||
|
||||
Some of you might remember Sole Survivor; the rather obscure death match arena spinoff of Command & Conquer 1. It's a game in which you control a single unit, collect crates to upgrade that unit, and kill your enemies. The game engine is a trimmed version of the Tiberian Dawn one with the base building and harvesting parts disabled, but it has one interesting upgrade that the original game didn't have: its battle arena maps are 128x128; the same size as Red Alert's maps.
|
||||
Some of you might remember Sole Survivor; the rather obscure death match arena spinoff of Tiberian Dawn. It's a game in which you control a single unit, collect crates to upgrade that unit, and kill your enemies. The game engine is a trimmed version of the Tiberian Dawn one with the base building and harvesting parts disabled, but it has one interesting upgrade that the original game didn't have: its battle arena maps are 128x128; the same size as Red Alert's maps.
|
||||
|
||||
Some mod makers found that an interesting feature, since it means there is an official Tiberian Dawn megamap format, and so, some mods on the C&C Remastered workshop, like [CFE Patch Redux](https://steamcommunity.com/sharedfiles/filedetails/?id=2239875646), and [john_drak's updated branch of it](https://steamcommunity.com/sharedfiles/filedetails/?id=3002363531), support this format. The [Vanilla Conquer](https://github.com/TheAssemblyArmada/Vanilla-Conquer) project, which reconstructed the original Tiberian Dawn source code from the remaster code, also supports it. And so, I decided to support it in this editor too, to make larger maps and missions that are playable on these.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user