Z-A: Add Street Name side-mission string

This commit is contained in:
Kurt 2025-12-20 14:49:22 -06:00
parent 6609dd210b
commit 7d1bcfa354
3 changed files with 30 additions and 0 deletions

View File

@ -158,4 +158,5 @@ public sealed class SaveBlockAccessor9ZA(SAV9ZA sav) : SCBlockAccessor
private const uint KDonuts = 0xBE007476; // object: donut[999], sizeof = 0x48
private const uint KDonutDistortionInUse = 0x25335B2A; // Inside distortion, this is the currently used donut
public const uint KHyperspaceSurveyPoints = 0x0235471C;
public const uint KStreetName = 0xBCCE00D6; // 0x26 string = 18 chars + \0
}

View File

@ -124,6 +124,8 @@ private void InitializeComponent()
L_HyperspaceSurveyPoints = new System.Windows.Forms.Label();
MT_HyperspaceSurveyPoints = new System.Windows.Forms.MaskedTextBox();
B_HyperspaceSurveyPoints = new System.Windows.Forms.Button();
TB_StreetName = new System.Windows.Forms.TextBox();
L_StreetName = new System.Windows.Forms.Label();
TC_Editor.SuspendLayout();
Tab_Overview.SuspendLayout();
Tab_MiscValues.SuspendLayout();
@ -1014,6 +1016,8 @@ private void InitializeComponent()
//
// Tab_DLC
//
Tab_DLC.Controls.Add(TB_StreetName);
Tab_DLC.Controls.Add(L_StreetName);
Tab_DLC.Controls.Add(L_HyperspaceSurveyPoints);
Tab_DLC.Controls.Add(MT_HyperspaceSurveyPoints);
Tab_DLC.Controls.Add(B_HyperspaceSurveyPoints);
@ -1056,6 +1060,27 @@ private void InitializeComponent()
B_HyperspaceSurveyPoints.Text = "+";
B_HyperspaceSurveyPoints.UseVisualStyleBackColor = true;
//
// TB_StreetName
//
TB_StreetName.Font = new System.Drawing.Font("Courier New", 8.25F);
TB_StreetName.Location = new System.Drawing.Point(254, 39);
TB_StreetName.Margin = new System.Windows.Forms.Padding(4, 3, 4, 3);
TB_StreetName.MaxLength = 18;
TB_StreetName.Name = "TB_StreetName";
TB_StreetName.Size = new System.Drawing.Size(145, 20);
TB_StreetName.TabIndex = 92;
TB_StreetName.Text = "WWWWWWWWWWWWWWWWWW";
//
// L_StreetName
//
L_StreetName.Location = new System.Drawing.Point(9, 35);
L_StreetName.Margin = new System.Windows.Forms.Padding(4, 0, 4, 0);
L_StreetName.Name = "L_StreetName";
L_StreetName.Size = new System.Drawing.Size(241, 24);
L_StreetName.TabIndex = 93;
L_StreetName.Text = "Street Name:";
L_StreetName.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
//
// SAV_Trainer9a
//
AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit;
@ -1189,5 +1214,7 @@ private void InitializeComponent()
private System.Windows.Forms.Label L_HyperspaceSurveyPoints;
private System.Windows.Forms.MaskedTextBox MT_HyperspaceSurveyPoints;
private System.Windows.Forms.Button B_HyperspaceSurveyPoints;
private System.Windows.Forms.TextBox TB_StreetName;
private System.Windows.Forms.Label L_StreetName;
}
}

View File

@ -136,6 +136,7 @@ private void GetDLC()
}
MT_HyperspaceSurveyPoints.Text = SAV.GetValue<uint>(KHyperspaceSurveyPoints).ToString();
TB_StreetName.Text = SAV.GetString(SAV.Blocks.GetBlock(KStreetName).Data);
}
private void Save()
@ -150,6 +151,7 @@ private void SaveDLC()
if (SAV.SaveRevision == 0)
return;
SAV.SetValue(KHyperspaceSurveyPoints, Util.ToUInt32(MT_HyperspaceSurveyPoints.Text));
SAV.SetString(SAV.Blocks.GetBlock(KStreetName).Data, TB_StreetName.Text, 18, StringConverterOption.ClearZero);
}
private void SaveMap()