[timing] same with this one.
This commit is contained in:
+10
-9
@@ -9,22 +9,23 @@
|
|||||||
#include "NoteData.h"
|
#include "NoteData.h"
|
||||||
#include "GameManager.h"
|
#include "GameManager.h"
|
||||||
|
|
||||||
static void Serialize(const BPMSegment &seg, Json::Value &root)
|
static void Serialize(const TimingSegment *seg, Json::Value &root)
|
||||||
{
|
{
|
||||||
root["Beat"] = seg.GetBeat();
|
root["Beat"] = seg->GetBeat();
|
||||||
root["BPM"] = seg.GetBPM();
|
if (seg->GetType() == SEGMENT_BPM)
|
||||||
|
{
|
||||||
|
root["BPM"] = static_cast<BPMSegment *>(const_cast<TimingSegment *>(seg))->GetBPM();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
static void Serialize(const StopSegment &seg, Json::Value &root)
|
|
||||||
{
|
{
|
||||||
root["Beat"] = seg.GetBeat();
|
root["Seconds"] = static_cast<StopSegment *>(const_cast<TimingSegment *>(seg))->GetPause();
|
||||||
root["Seconds"] = seg.GetPause();
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Serialize(const TimingData &td, Json::Value &root)
|
static void Serialize(const TimingData &td, Json::Value &root)
|
||||||
{
|
{
|
||||||
// JsonUtil::SerializeVectorObjects( td.m_BPMSegments, Serialize, root["BpmSegments"] );
|
JsonUtil::SerializeVectorPointers( td.allTimingSegments[SEGMENT_BPM], Serialize, root["BpmSegments"] );
|
||||||
// JsonUtil::SerializeVectorObjects( td.m_StopSegments, Serialize, root["StopSegments"] );
|
JsonUtil::SerializeVectorPointers( td.allTimingSegments[SEGMENT_STOP_DELAY], Serialize, root["StopSegments"] );
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Serialize(const LyricSegment &o, Json::Value &root)
|
static void Serialize(const LyricSegment &o, Json::Value &root)
|
||||||
|
|||||||
Reference in New Issue
Block a user