\n", HMML.metadata.id);
- Player.Ptr += PrintLength;
for(int AnnotationIndex = 0; AnnotationIndex < HMML.annotation_count; ++AnnotationIndex)
{
@@ -233,14 +228,23 @@ main(int ArgC, char **Args)
ClaimBuffer(MemoryArena, &ClaimedMemory, &AnnotationClass, 128);
ClaimBuffer(MemoryArena, &ClaimedMemory, &Text, 1024 * 4);
- PrintLength = sprintf(AnnotationHeader.Ptr,
+ CopyStringToBuffer(&AnnotationHeader,
"
%s ",
+StringToColourHash(HMML.annotations[AnnotationIndex].author),
+HMML.annotations[AnnotationIndex].author);
+ }
+#endif
@@ -248,46 +252,42 @@ TimecodeToSeconds(HMML.annotations[AnnotationIndex].time));
//TODO(matt): Replace this CopyStringToBuffer() with real stuff!
- CopyStringToBuffer(HMML.annotations[AnnotationIndex].text,
- &Text);
+ CopyStringToBuffer(&Text, HMML.annotations[AnnotationIndex].text);
- CopyStringToBuffer("\"", &AnnotationClass);
+ CopyStringToBuffer(&AnnotationClass, "\"");
CopyBuffer(&AnnotationClass, &AnnotationHeader);
- CopyStringToBuffer(">\n", &AnnotationHeader);
+ CopyStringToBuffer(&AnnotationHeader, ">\n");
ClaimBuffer(MemoryArena, &ClaimedMemory, &Annotation, 1024 * 4);
CopyBuffer(&AnnotationHeader, &Annotation);
- sprintf(AnnotationHeader.Location,
+ CopyStringToBuffer(&Annotation,
"
%s",
HMML.annotations[AnnotationIndex].time);
- CopyBuffer(&AnnotationHeader, &Annotation);
CopyBuffer(&Text, &Annotation);
- sprintf(AnnotationHeader.Location, "
\n"
+ CopyStringToBuffer(&Annotation, "
\n"
"
\n"
"
%s",
HMML.annotations[AnnotationIndex].time);
- CopyBuffer(&AnnotationHeader, &Annotation);
CopyBuffer(&Text, &Annotation);
- sprintf(AnnotationHeader.Location, "
\n"
+ CopyStringToBuffer(&Annotation, "
\n"
"
\n"
"
%s",
HMML.annotations[AnnotationIndex].time);
- CopyBuffer(&AnnotationHeader, &Annotation);
CopyBuffer(&Text, &Annotation);
- CopyStringToBuffer("
\n"
+ CopyStringToBuffer(&Annotation, "