Tokenize ruleset keys. Remove MotionName.
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
using Cryville.Common.Buffers;
|
||||
using Cryville.Common;
|
||||
using Cryville.Common.Buffers;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Cryville.Crtr.Event {
|
||||
@@ -12,16 +13,16 @@ namespace Cryville.Crtr.Event {
|
||||
return new RealtimeMotionValue().Init(_reg.InitValue);
|
||||
}
|
||||
}
|
||||
static Dictionary<string, Bucket> _buckets;
|
||||
static Dictionary<Identifier, Bucket> _buckets;
|
||||
public static void Prepare() {
|
||||
_buckets = new Dictionary<string, Bucket>(ChartPlayer.motionRegistry.Count);
|
||||
_buckets = new Dictionary<Identifier, Bucket>(ChartPlayer.motionRegistry.Count);
|
||||
foreach (var reg in ChartPlayer.motionRegistry)
|
||||
_buckets.Add(reg.Key, new Bucket(reg.Key, 4096));
|
||||
}
|
||||
|
||||
readonly Dictionary<RealtimeMotionValue, string> _rented = new Dictionary<RealtimeMotionValue, string>();
|
||||
public RealtimeMotionValue Rent(MotionName name) {
|
||||
var n = name.MainName;
|
||||
public RealtimeMotionValue Rent(Identifier name) {
|
||||
var n = name;
|
||||
var obj = _buckets[n].Rent();
|
||||
_rented.Add(obj, n);
|
||||
return obj;
|
||||
|
||||
Reference in New Issue
Block a user