Skip to content

Commit 9c4950b

Browse files
committedMar 1, 2025
v2.1.7
1 parent e42acfa commit 9c4950b

12 files changed

+53
-22
lines changed
 

‎Dialog/English.txt

+2
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,8 @@ TAS_HELPER_USE_KEY_FRAME_TIME= Show Index of Keyfram
212212
TAS_HELPER_KEY_FRAME_FLAGS= Flags
213213
TAS_HELPER_PREDICTOR_LINE_WIDTH= Polygonal Line Width
214214
TAS_HELPER_PREDICTOR_POINT_SIZE= Dot Size
215+
TAS_HELPER_PREDICTOR_FONT_SIZE= Font Size
216+
TAS_HELPER_PREDICTOR_FONT_STROKE= Font Stroke
215217

216218
# ============================================= Other =====================================================
217219
TAS_HELPER_MORE_OPTIONS= More Options

‎Dialog/Simplified Chinese.txt

+2
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,8 @@ TAS_HELPER_USE_KEY_FRAME_TIME= 显示关键帧对应
199199
TAS_HELPER_KEY_FRAME_FLAGS= Flags
200200
TAS_HELPER_PREDICTOR_LINE_WIDTH= 折线宽度
201201
TAS_HELPER_PREDICTOR_POINT_SIZE= 点的大小
202+
TAS_HELPER_PREDICTOR_FONT_SIZE= 字体大小
203+
TAS_HELPER_PREDICTOR_FONT_STROKE= 字体描边
202204

203205

204206
# ============================================= Other =====================================================

‎Libs/MMHOOK_Celeste.dll

-7.08 MB
Binary file not shown.

‎Source/Gameplay/FrameStepBack.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public static void StepBackOneFrame() {
1414
}
1515
public static void SetupNextFastForward(int relativeMove) {
1616
// todo: fix the random camera issue
17-
if (Manager.Running && !TAS.ModInterop.TASRecorderInterop.Recording) {
17+
if (Manager.Running && !ModInterop.UnstableCelesteTasUsings.TasRecorderIsRecording) {
1818
int frame = Controller.CurrentFrameInTas + relativeMove;
1919
if (frame <= 0) {
2020
return;
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// these may depend on publicizer / is not PublicAPI / should change later
2+
// only part of them
3+
4+
namespace Celeste.Mod.TASHelper.ModInterop;
5+
internal class UnstableCelesteTasUsings {
6+
public static bool TasRecorderIsRecording => TAS.ModInterop.TASRecorderInterop.IsRecording;
7+
8+
public static bool playerUpdated {
9+
get => TAS.Gameplay.Hitboxes.ActualCollideHitbox.playerUpdated;
10+
set => TAS.Gameplay.Hitboxes.ActualCollideHitbox.playerUpdated = value;
11+
}
12+
}

‎Source/Module/Menu/PredictorMenu.cs

+7-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using Microsoft.Xna.Framework;
1+
using Celeste.Mod.TASHelper.Predictor;
2+
using Microsoft.Xna.Framework;
23
using static Celeste.Mod.TASHelper.Module.TASHelperSettings;
34
using static Celeste.TextMenuExt;
45

@@ -102,7 +103,11 @@ private static HLine CreateHLine(string text) {
102103
page.Add(fadeoutItem = new TextMenu.OnOff("Timeline FadeOut".ToDialogText(), TasHelperSettings.TimelineFadeOut).Change(value => TasHelperSettings.TimelineFadeOut = value));
103104
page.AddDescriptionOnEnter(menu, fadeoutItem, "Only Apply To Hitbox".ToDialogText());
104105
page.Add(new IntSliderExt("Predictor Line Width".ToDialogText(), 0, 20, TasHelperSettings.PredictorLineWidth).Change(value => TasHelperSettings.PredictorLineWidth = value));
105-
page.Add(new IntSliderExt("Predictor Point Size".ToDialogText(), 0, 20, TasHelperSettings.PredictorPointSize).Change(value => TasHelperSettings.PredictorPointSize = value));
106+
page.Add(new IntSliderExt("Predictor Point Size".ToDialogText(), 0, 20, TasHelperSettings.PredictorPointSize).Change(value => TasHelperSettings.PredictorPointSize = value));
107+
108+
page.Add(new IntSliderExt("Predictor Font Size".ToDialogText(), 1, 20, TasHelperSettings.PredictorHiresFontSize).Change(value => { TasHelperSettings.PredictorHiresFontSize = value; PredictorTextRenderer.UpdateSettings(); }));
109+
page.Add(new IntSliderExt("Predictor Font Stroke".ToDialogText(), 0, 20, TasHelperSettings.PredictorHiresFontStroke).Change(value => { TasHelperSettings.PredictorHiresFontStroke = value; PredictorTextRenderer.UpdateSettings(); }));
110+
106111
page.Add(CreateHLine());
107112
return page;
108113
}

‎Source/Module/TASHelperSettings.cs

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
using Celeste.Mod.TASHelper.Gameplay.Spinner;
55
using Celeste.Mod.TASHelper.Module.Menu;
66
using Celeste.Mod.TASHelper.OrderOfOperation;
7+
using Celeste.Mod.TASHelper.Predictor;
78
using Celeste.Mod.TASHelper.Utils;
89
using Microsoft.Xna.Framework;
910
using Microsoft.Xna.Framework.Input;
@@ -53,6 +54,7 @@ internal void OnLoadSettings() {
5354
keyOoO_Fastforward ??= new((Buttons)0, Keys.LeftControl, Keys.Y);
5455
keyAutoWatch ??= new((Buttons)0, Keys.LeftControl, Keys.Q);
5556
AutoWatchInitialize();
57+
PredictorTextRenderer.UpdateSettings();
5658
}
5759

5860
public bool Enabled = true;
@@ -434,6 +436,10 @@ public bool PredictFutureEnabled {
434436

435437
public int PredictorLineWidth = 3;
436438

439+
public int PredictorHiresFontSize = 8;
440+
441+
public int PredictorHiresFontStroke = 5;
442+
437443
public enum TimelineFinestStyle { NotApplied, HitboxPerFrame, PolygonLine, DottedPolygonLine };
438444

439445
public enum TimelineScales { NotApplied, _2, _5, _10, _15, _20, _25, _30, _45, _60, _100 }

‎Source/Module/WhatsNew.cs

+1
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ public static void CreateUpdateLog() {
9292
AddLog("2.1.4", "Bugfix: Fastforward makes spinner colors change. (thanks @trans_alexa)");
9393
AddLog("2.1.5", "Bugfix: fix a bug caused by CelesteTAS refactor.");
9494
AddLog("2.1.6", "Bugfix: When predictor Update-on-Tas-File-Changed enabled, and edit a line above the current frame, it'll move selection to the current frame. (thanks @richconnergmn)");
95+
AddLog("2.1.7", "Feature: Predictor now can set its own font size. (thanks @richconnergmn)");
9596
UpdateLogs.Sort((x, y) => new Version(y.Item1).CompareTo(new Version(x.Item1)));
9697
}
9798

‎Source/OrderOfOperation/OoO_Core.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ public static void Unload() {
395395
}
396396
private static void OnLevelRender(On.Celeste.Level.orig_Render orig, Level self) {
397397
if (Applied) {
398-
TAS.Gameplay.Hitboxes.ActualCollideHitbox.playerUpdated = playerUpdated; // may remove it if we change SpringBoard to IL.Monocle/Celeste hooks
398+
ModInterop.UnstableCelesteTasUsings.playerUpdated = playerUpdated; // may remove it if we change SpringBoard to IL.Monocle/Celeste hooks
399399
if (prepareToUndoAll) {
400400
UndoAll();
401401
}

‎Source/Predictor/PredictorRenderer.cs

+17-15
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,12 @@ public class PredictorRenderer : Entity {
2929

3030
public static bool UseDottedPolygonalLine => TasHelperSettings.TimelineFinestScale == TASHelperSettings.TimelineFinestStyle.DottedPolygonLine;
3131

32-
private const string textRendererLabel = "PredictorKeyframe";
33-
3432
public PredictorRenderer() {
3533
Depth = 1;
3634
}
3735
public static void ClearCachedMessage() {
3836
if (contentCached) {
39-
TempTextRenderer.Clear(textRendererLabel);
37+
PredictorTextRenderer.Clear();
4038
PolygonalLineRenderer.Clear();
4139
processedKeyframeRenderData.Clear();
4240
processedNormalframeRenderData.Clear();
@@ -113,7 +111,7 @@ private static void RenderCore() {
113111
RenderData keyframeData = data.Item1;
114112
Draw.HollowRect(keyframeData.x, keyframeData.y, keyframeData.width, keyframeData.height, data.Item2);
115113
if (!contentCached && TasHelperSettings.UseKeyFrameTime && keyframeData.addTime) {
116-
HiresLevelRenderer.Add(new TempTextRenderer(keyframeData.index.ToString(), new Vector2(keyframeData.x + keyframeData.width / 2, keyframeData.y - 1f) * 6f, textRendererLabel));
114+
HiresLevelRenderer.Add(new PredictorTextRenderer(keyframeData.index.ToString(), new Vector2(keyframeData.x + keyframeData.width / 2, keyframeData.y - 1f) * 6f));
117115
}
118116
}
119117
// render keyframes above normal frames
@@ -210,28 +208,32 @@ private static void OnLoadLevel(Level self) {
210208
}
211209

212210

213-
public class TempTextRenderer : THRenderer {
211+
public class PredictorTextRenderer : THRenderer {
214212
// use for those texts that appear and die quickly
215213

216214
public string text;
217-
public Vector2 position;
218-
public string label;
215+
public Vector2 position;
216+
public static Vector2 Scale;
217+
public static float Stroke;
219218

220-
public TempTextRenderer(string text, Vector2 position, string label) {
219+
public PredictorTextRenderer(string text, Vector2 position) {
221220
this.text = text;
222221
this.position = position;
223-
this.label = label;
222+
}
223+
224+
public static void UpdateSettings() {
225+
Scale = new Vector2(TasHelperSettings.PredictorHiresFontSize / 10f);
226+
Stroke = TasHelperSettings.PredictorHiresFontStroke * 0.4f;
227+
224228
}
225229

226230
public override void Render() {
227-
TASHelper.Entities.Message.RenderMessage(text, position, new Vector2(0.5f, 0.2f), new Vector2(TasHelperSettings.HiresFontSize / 10f), TasHelperSettings.HiresFontStroke * 0.4f);
231+
TASHelper.Entities.Message.RenderMessage(text, position, new Vector2(0.5f, 0.2f), Scale, Stroke);
228232
}
229233

230-
public static void Clear(string label) {
231-
foreach (TempTextRenderer tmp in HiresLevelRenderer.GetRenderers<TempTextRenderer>()) {
232-
if (tmp.label == label) {
233-
HiresLevelRenderer.Remove(tmp);
234-
}
234+
public static void Clear() {
235+
foreach (PredictorTextRenderer tmp in HiresLevelRenderer.GetRenderers<PredictorTextRenderer>()) {
236+
HiresLevelRenderer.Remove(tmp);
235237
}
236238
}
237239
}

‎TASHelper.csproj

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@
7777
<Publicize Include="CelesteTAS-EverestInterop:TAS.InfoHUD.InfoWatchEntity.WatchedEntities" />
7878
<Publicize Include="CelesteTAS-EverestInterop:TAS.EverestInterop.DesyncFixer.AuraHelperSharedRandom" />
7979
<Publicize Include="CelesteTAS-EverestInterop:TAS.Gameplay.BetterInvincible" />
80-
<Publicize Include="CelesteTAS-EverestInterop:TAS.Gameplay.Hitboxes.ActualCollideHitbox.playerUpdated" />
8180
<Publicize Include="CelesteTAS-EverestInterop:TAS.Savestates.SavedCurrentFrame" />
81+
<Publicize Include="CelesteTAS-EverestInterop:TAS.Gameplay.Hitboxes.ActualCollideHitbox.playerUpdated" />
82+
<Publicize Include="CelesteTAS-EverestInterop:TAS.ModInterop.TASRecorderInterop" />
8283
<Publicize Include="FNA:Microsoft.Xna.Framework.Input.GamePadButtons.buttons" />
8384
<Publicize Include="MonoMod.Utils" />
8485
<Publicize Include="MonoMod.Utils:MonoMod.Utils.DynamicData._DataMap" />

‎everest.yaml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
- Name: TASHelper
2-
Version: 2.1.6
2+
Version: 2.1.7
33
DLL: bin/Release/net7.0/TASHelper.dll
44
Dependencies:
55
- Name: EverestCore
66
Version: 1.5034.0
77
- Name: CelesteTAS
8-
Version: 3.43.4
8+
Version: 3.43.5
99
- Name: SpeedrunTool
1010
Version: 3.24.0

0 commit comments

Comments
 (0)
Please sign in to comment.