Skip to content

Commit 58524e3

Browse files
committed
Change prettification to occur before affixes are re-added
1 parent f414752 commit 58524e3

File tree

8 files changed

+54
-68
lines changed

8 files changed

+54
-68
lines changed

.silktouch/72b687a9cceac28c.stout

0 Bytes
Binary file not shown.

.silktouch/82fde6eb3b68e085.stout

0 Bytes
Binary file not shown.

.silktouch/91c9aa14a031651f.stout

0 Bytes
Binary file not shown.

.silktouch/c8c046b328b09d23.stout

0 Bytes
Binary file not shown.

sources/OpenAL/OpenAL/al/Al.gen.cs

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -5989,7 +5989,7 @@ Ref<nint> value
59895989
RequireAll = true
59905990
)
59915991
]
5992-
public static extern void GetSourcei64VDirectSOFT(
5992+
public static extern void GetSourcei64vDirectSOFT(
59935993
ContextHandle context,
59945994
uint source,
59955995
int param2,
@@ -6013,7 +6013,7 @@ public static extern void GetSourcei64VDirectSOFT(
60136013
[MethodImpl(
60146014
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
60156015
)]
6016-
public static void GetSourcei64VDirectSOFT(
6016+
public static void GetSourcei64vDirectSOFT(
60176017
ContextHandle context,
60186018
uint source,
60196019
Constant<int, AlEnum, SourceInteger> param2,
@@ -6022,30 +6022,30 @@ Ref<nint> values
60226022
{
60236023
fixed (nint* __dsl_values = values)
60246024
{
6025-
GetSourcei64VDirectSOFT(context, source, (int)param2, __dsl_values);
6025+
GetSourcei64vDirectSOFT(context, source, (int)param2, __dsl_values);
60266026
}
60276027
}
60286028

60296029
[NativeName("alGetSourcei64vSOFT")]
60306030
[DllImport("openal", ExactSpelling = true, EntryPoint = "alGetSourcei64vSOFT")]
60316031
[SupportedApiProfile("al", ["AL_SOFT_source_latency"])]
6032-
public static extern void GetSourcei64VSOFT(uint source, int param1, nint* values);
6032+
public static extern void GetSourcei64vSOFT(uint source, int param1, nint* values);
60336033

60346034
[NativeName("alGetSourcei64vSOFT")]
60356035
[SupportedApiProfile("al", ["AL_SOFT_source_latency"])]
60366036
[NativeFunction("openal", EntryPoint = "alGetSourcei64vSOFT")]
60376037
[MethodImpl(
60386038
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
60396039
)]
6040-
public static void GetSourcei64VSOFT(
6040+
public static void GetSourcei64vSOFT(
60416041
uint source,
60426042
Constant<int, AlEnum, SourceInteger> param1,
60436043
Ref<nint> values
60446044
)
60456045
{
60466046
fixed (nint* __dsl_values = values)
60476047
{
6048-
GetSourcei64VSOFT(source, (int)param1, __dsl_values);
6048+
GetSourcei64vSOFT(source, (int)param1, __dsl_values);
60496049
}
60506050
}
60516051

@@ -13887,12 +13887,12 @@ Ref<nint> value
1388713887
[MethodImpl(
1388813888
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
1388913889
)]
13890-
public void GetSourcei64VDirectSOFT(
13890+
public void GetSourcei64vDirectSOFT(
1389113891
ContextHandle context,
1389213892
uint source,
1389313893
int param2,
1389413894
nint* values
13895-
) => T.GetSourcei64VDirectSOFT(context, source, param2, values);
13895+
) => T.GetSourcei64vDirectSOFT(context, source, param2, values);
1389613896

1389713897
[NativeName("alGetSourcei64vDirectSOFT")]
1389813898
[
@@ -13911,33 +13911,33 @@ public void GetSourcei64VDirectSOFT(
1391113911
[MethodImpl(
1391213912
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
1391313913
)]
13914-
public void GetSourcei64VDirectSOFT(
13914+
public void GetSourcei64vDirectSOFT(
1391513915
ContextHandle context,
1391613916
uint source,
1391713917
Constant<int, AlEnum, SourceInteger> param2,
1391813918
Ref<nint> values
13919-
) => T.GetSourcei64VDirectSOFT(context, source, param2, values);
13919+
) => T.GetSourcei64vDirectSOFT(context, source, param2, values);
1392013920

1392113921
[NativeName("alGetSourcei64vSOFT")]
1392213922
[SupportedApiProfile("al", ["AL_SOFT_source_latency"])]
1392313923
[NativeFunction("openal", EntryPoint = "alGetSourcei64vSOFT")]
1392413924
[MethodImpl(
1392513925
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
1392613926
)]
13927-
public void GetSourcei64VSOFT(uint source, int param1, nint* values) =>
13928-
T.GetSourcei64VSOFT(source, param1, values);
13927+
public void GetSourcei64vSOFT(uint source, int param1, nint* values) =>
13928+
T.GetSourcei64vSOFT(source, param1, values);
1392913929

1393013930
[NativeName("alGetSourcei64vSOFT")]
1393113931
[SupportedApiProfile("al", ["AL_SOFT_source_latency"])]
1393213932
[NativeFunction("openal", EntryPoint = "alGetSourcei64vSOFT")]
1393313933
[MethodImpl(
1393413934
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
1393513935
)]
13936-
public void GetSourcei64VSOFT(
13936+
public void GetSourcei64vSOFT(
1393713937
uint source,
1393813938
Constant<int, AlEnum, SourceInteger> param1,
1393913939
Ref<nint> values
13940-
) => T.GetSourcei64VSOFT(source, param1, values);
13940+
) => T.GetSourcei64vSOFT(source, param1, values);
1394113941

1394213942
[NativeName("alGetSourceiDirect")]
1394313943
[
@@ -23259,12 +23259,12 @@ Ref<nint> value
2325923259
[MethodImpl(
2326023260
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
2326123261
)]
23262-
public static void GetSourcei64VDirectSOFT(
23262+
public static void GetSourcei64vDirectSOFT(
2326323263
ContextHandle context,
2326423264
uint source,
2326523265
int param2,
2326623266
nint* values
23267-
) => Underlying.Value!.GetSourcei64VDirectSOFT(context, source, param2, values);
23267+
) => Underlying.Value!.GetSourcei64vDirectSOFT(context, source, param2, values);
2326823268

2326923269
[NativeName("alGetSourcei64vDirectSOFT")]
2327023270
[
@@ -23283,7 +23283,7 @@ public static void GetSourcei64VDirectSOFT(
2328323283
[MethodImpl(
2328423284
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
2328523285
)]
23286-
public static void GetSourcei64VDirectSOFT(
23286+
public static void GetSourcei64vDirectSOFT(
2328723287
ContextHandle context,
2328823288
uint source,
2328923289
Constant<int, AlEnum, SourceInteger> param2,
@@ -23292,7 +23292,7 @@ Ref<nint> values
2329223292
{
2329323293
fixed (nint* __dsl_values = values)
2329423294
{
23295-
GetSourcei64VDirectSOFT(context, source, (int)param2, __dsl_values);
23295+
GetSourcei64vDirectSOFT(context, source, (int)param2, __dsl_values);
2329623296
}
2329723297
}
2329823298

@@ -23302,24 +23302,24 @@ Ref<nint> values
2330223302
[MethodImpl(
2330323303
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
2330423304
)]
23305-
public static void GetSourcei64VSOFT(uint source, int param1, nint* values) =>
23306-
Underlying.Value!.GetSourcei64VSOFT(source, param1, values);
23305+
public static void GetSourcei64vSOFT(uint source, int param1, nint* values) =>
23306+
Underlying.Value!.GetSourcei64vSOFT(source, param1, values);
2330723307

2330823308
[NativeName("alGetSourcei64vSOFT")]
2330923309
[SupportedApiProfile("al", ["AL_SOFT_source_latency"])]
2331023310
[NativeFunction("openal", EntryPoint = "alGetSourcei64vSOFT")]
2331123311
[MethodImpl(
2331223312
MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization
2331323313
)]
23314-
public static void GetSourcei64VSOFT(
23314+
public static void GetSourcei64vSOFT(
2331523315
uint source,
2331623316
Constant<int, AlEnum, SourceInteger> param1,
2331723317
Ref<nint> values
2331823318
)
2331923319
{
2332023320
fixed (nint* __dsl_values = values)
2332123321
{
23322-
GetSourcei64VSOFT(source, (int)param1, __dsl_values);
23322+
GetSourcei64vSOFT(source, (int)param1, __dsl_values);
2332323323
}
2332423324
}
2332523325

@@ -37846,7 +37846,7 @@ Ref<nint> value
3784637846
]
3784737847
[NativeFunction("openal", EntryPoint = "alGetSourcei64vDirectSOFT")]
3784837848
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
37849-
void IAl.GetSourcei64VDirectSOFT(
37849+
void IAl.GetSourcei64vDirectSOFT(
3785037850
ContextHandle context,
3785137851
uint source,
3785237852
int param2,
@@ -37878,12 +37878,12 @@ _slots[195] is not null and var loadedFnPtr
3787837878
]
3787937879
[NativeFunction("openal", EntryPoint = "alGetSourcei64vDirectSOFT")]
3788037880
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
37881-
public static void GetSourcei64VDirectSOFT(
37881+
public static void GetSourcei64vDirectSOFT(
3788237882
ContextHandle context,
3788337883
uint source,
3788437884
int param2,
3788537885
nint* values
37886-
) => ThisThread.GetSourcei64VDirectSOFT(context, source, param2, values);
37886+
) => ThisThread.GetSourcei64vDirectSOFT(context, source, param2, values);
3788737887

3788837888
[NativeName("alGetSourcei64vDirectSOFT")]
3788937889
[
@@ -37900,7 +37900,7 @@ public static void GetSourcei64VDirectSOFT(
3790037900
]
3790137901
[NativeFunction("openal", EntryPoint = "alGetSourcei64vDirectSOFT")]
3790237902
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
37903-
void IAl.GetSourcei64VDirectSOFT(
37903+
void IAl.GetSourcei64vDirectSOFT(
3790437904
ContextHandle context,
3790537905
uint source,
3790637906
Constant<int, AlEnum, SourceInteger> param2,
@@ -37909,7 +37909,7 @@ Ref<nint> values
3790937909
{
3791037910
fixed (nint* __dsl_values = values)
3791137911
{
37912-
((IAl)this).GetSourcei64VDirectSOFT(context, source, (int)param2, __dsl_values);
37912+
((IAl)this).GetSourcei64vDirectSOFT(context, source, (int)param2, __dsl_values);
3791337913
}
3791437914
}
3791537915

@@ -37928,18 +37928,18 @@ Ref<nint> values
3792837928
]
3792937929
[NativeFunction("openal", EntryPoint = "alGetSourcei64vDirectSOFT")]
3793037930
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
37931-
public static void GetSourcei64VDirectSOFT(
37931+
public static void GetSourcei64vDirectSOFT(
3793237932
ContextHandle context,
3793337933
uint source,
3793437934
Constant<int, AlEnum, SourceInteger> param2,
3793537935
Ref<nint> values
37936-
) => ThisThread.GetSourcei64VDirectSOFT(context, source, param2, values);
37936+
) => ThisThread.GetSourcei64vDirectSOFT(context, source, param2, values);
3793737937

3793837938
[NativeName("alGetSourcei64vSOFT")]
3793937939
[SupportedApiProfile("al", ["AL_SOFT_source_latency"])]
3794037940
[NativeFunction("openal", EntryPoint = "alGetSourcei64vSOFT")]
3794137941
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
37942-
void IAl.GetSourcei64VSOFT(uint source, int param1, nint* values) =>
37942+
void IAl.GetSourcei64vSOFT(uint source, int param1, nint* values) =>
3794337943
(
3794437944
(delegate* unmanaged<uint, int, nint*, void>)(
3794537945
_slots[196] is not null and var loadedFnPtr
@@ -37952,34 +37952,34 @@ _slots[196] is not null and var loadedFnPtr
3795237952
[SupportedApiProfile("al", ["AL_SOFT_source_latency"])]
3795337953
[NativeFunction("openal", EntryPoint = "alGetSourcei64vSOFT")]
3795437954
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
37955-
public static void GetSourcei64VSOFT(uint source, int param1, nint* values) =>
37956-
ThisThread.GetSourcei64VSOFT(source, param1, values);
37955+
public static void GetSourcei64vSOFT(uint source, int param1, nint* values) =>
37956+
ThisThread.GetSourcei64vSOFT(source, param1, values);
3795737957

3795837958
[NativeName("alGetSourcei64vSOFT")]
3795937959
[SupportedApiProfile("al", ["AL_SOFT_source_latency"])]
3796037960
[NativeFunction("openal", EntryPoint = "alGetSourcei64vSOFT")]
3796137961
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
37962-
void IAl.GetSourcei64VSOFT(
37962+
void IAl.GetSourcei64vSOFT(
3796337963
uint source,
3796437964
Constant<int, AlEnum, SourceInteger> param1,
3796537965
Ref<nint> values
3796637966
)
3796737967
{
3796837968
fixed (nint* __dsl_values = values)
3796937969
{
37970-
((IAl)this).GetSourcei64VSOFT(source, (int)param1, __dsl_values);
37970+
((IAl)this).GetSourcei64vSOFT(source, (int)param1, __dsl_values);
3797137971
}
3797237972
}
3797337973

3797437974
[NativeName("alGetSourcei64vSOFT")]
3797537975
[SupportedApiProfile("al", ["AL_SOFT_source_latency"])]
3797637976
[NativeFunction("openal", EntryPoint = "alGetSourcei64vSOFT")]
3797737977
[MethodImpl(MethodImplOptions.AggressiveInlining | MethodImplOptions.AggressiveOptimization)]
37978-
public static void GetSourcei64VSOFT(
37978+
public static void GetSourcei64vSOFT(
3797937979
uint source,
3798037980
Constant<int, AlEnum, SourceInteger> param1,
3798137981
Ref<nint> values
37982-
) => ThisThread.GetSourcei64VSOFT(source, param1, values);
37982+
) => ThisThread.GetSourcei64vSOFT(source, param1, values);
3798337983

3798437984
[NativeName("alGetSourceiDirect")]
3798537985
[

sources/OpenAL/OpenAL/al/IAl.gen.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4211,7 +4211,7 @@ Ref<nint> value
42114211
)
42124212
]
42134213
[NativeFunction("openal", EntryPoint = "alGetSourcei64vDirectSOFT")]
4214-
static abstract void GetSourcei64VDirectSOFT(
4214+
static abstract void GetSourcei64vDirectSOFT(
42154215
ContextHandle context,
42164216
uint source,
42174217
int param2,
@@ -4232,7 +4232,7 @@ static abstract void GetSourcei64VDirectSOFT(
42324232
)
42334233
]
42344234
[NativeFunction("openal", EntryPoint = "alGetSourcei64vDirectSOFT")]
4235-
static abstract void GetSourcei64VDirectSOFT(
4235+
static abstract void GetSourcei64vDirectSOFT(
42364236
ContextHandle context,
42374237
uint source,
42384238
Constant<int, AlEnum, SourceInteger> param2,
@@ -4242,12 +4242,12 @@ Ref<nint> values
42424242
[NativeName("alGetSourcei64vSOFT")]
42434243
[SupportedApiProfile("al", ["AL_SOFT_source_latency"])]
42444244
[NativeFunction("openal", EntryPoint = "alGetSourcei64vSOFT")]
4245-
static abstract void GetSourcei64VSOFT(uint source, int param1, nint* values);
4245+
static abstract void GetSourcei64vSOFT(uint source, int param1, nint* values);
42464246

42474247
[NativeName("alGetSourcei64vSOFT")]
42484248
[SupportedApiProfile("al", ["AL_SOFT_source_latency"])]
42494249
[NativeFunction("openal", EntryPoint = "alGetSourcei64vSOFT")]
4250-
static abstract void GetSourcei64VSOFT(
4250+
static abstract void GetSourcei64vSOFT(
42514251
uint source,
42524252
Constant<int, AlEnum, SourceInteger> param1,
42534253
Ref<nint> values
@@ -9815,7 +9815,7 @@ Ref<nint> value
98159815
)
98169816
]
98179817
[NativeFunction("openal", EntryPoint = "alGetSourcei64vDirectSOFT")]
9818-
void GetSourcei64VDirectSOFT(ContextHandle context, uint source, int param2, nint* values);
9818+
void GetSourcei64vDirectSOFT(ContextHandle context, uint source, int param2, nint* values);
98199819

98209820
[NativeName("alGetSourcei64vDirectSOFT")]
98219821
[
@@ -9831,7 +9831,7 @@ Ref<nint> value
98319831
)
98329832
]
98339833
[NativeFunction("openal", EntryPoint = "alGetSourcei64vDirectSOFT")]
9834-
void GetSourcei64VDirectSOFT(
9834+
void GetSourcei64vDirectSOFT(
98359835
ContextHandle context,
98369836
uint source,
98379837
Constant<int, AlEnum, SourceInteger> param2,
@@ -9841,12 +9841,12 @@ Ref<nint> values
98419841
[NativeName("alGetSourcei64vSOFT")]
98429842
[SupportedApiProfile("al", ["AL_SOFT_source_latency"])]
98439843
[NativeFunction("openal", EntryPoint = "alGetSourcei64vSOFT")]
9844-
void GetSourcei64VSOFT(uint source, int param1, nint* values);
9844+
void GetSourcei64vSOFT(uint source, int param1, nint* values);
98459845

98469846
[NativeName("alGetSourcei64vSOFT")]
98479847
[SupportedApiProfile("al", ["AL_SOFT_source_latency"])]
98489848
[NativeFunction("openal", EntryPoint = "alGetSourcei64vSOFT")]
9849-
void GetSourcei64VSOFT(
9849+
void GetSourcei64vSOFT(
98509850
uint source,
98519851
Constant<int, AlEnum, SourceInteger> param1,
98529852
Ref<nint> values

sources/SilkTouch/SilkTouch/Mods/PrettifyNames.cs

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -397,8 +397,12 @@ private string ApplyPrettifyOnlyPipeline(
397397
}
398398
}
399399

400-
// Remove affixes, prettify, and add affixes back
401-
return ApplyAffixes(RemoveAffixes(name, container, name, affixTypes, null), container, name, affixTypes, null).Prettify();
400+
var result = name;
401+
result = RemoveAffixes(result, container, name, affixTypes, null);
402+
result = result.Prettify();
403+
result = ApplyAffixes(result, container, name, affixTypes, null);
404+
405+
return result;
402406
}
403407

404408
private void Trim(
@@ -901,11 +905,11 @@ static void CreateName(string name, Span<NameAffix> currentAffixes, ref string?
901905
{
902906
if (affix.IsPrefix)
903907
{
904-
name = PreventPrettificationHack(affix.Affix) + name;
908+
name = affix.Affix + name;
905909
}
906910
else
907911
{
908-
name += PreventPrettificationHack(affix.Affix);
912+
name += affix.Affix;
909913
}
910914
}
911915
}
@@ -919,24 +923,6 @@ static void CreateName(string name, Span<NameAffix> currentAffixes, ref string?
919923
secondary?.Add(name);
920924
}
921925
}
922-
923-
// This appends a space before every capital and after the entire affix
924-
// This ensures that capitals are preserved when the name is prettified
925-
static string PreventPrettificationHack(string affix)
926-
{
927-
var result = "";
928-
foreach (var c in affix)
929-
{
930-
if (NameUtils.Uppercase.Contains(c))
931-
{
932-
result += ' ';
933-
}
934-
935-
result += c;
936-
}
937-
938-
return result + ' ';
939-
}
940926
}
941927

942928
/// <inheritdoc />

0 commit comments

Comments
 (0)