diff --git a/hmml_to_html/hmml.a b/hmml_to_html/hmml.a index 0d4e751..a45b16c 100644 Binary files a/hmml_to_html/hmml.a and b/hmml_to_html/hmml.a differ diff --git a/hmml_to_html/hmml_to_html.c b/hmml_to_html/hmml_to_html.c index 4f2f180..f1ef54a 100644 --- a/hmml_to_html/hmml_to_html.c +++ b/hmml_to_html/hmml_to_html.c @@ -23,6 +23,12 @@ typedef struct int Size; } buffer; +typedef struct +{ + char *Source; + char *RefTitle; +} ref_info; + void ClaimBuffer(char *MemoryArena, int *ClaimedMemory, buffer *Buffer, int Size) { @@ -32,6 +38,30 @@ ClaimBuffer(char *MemoryArena, int *ClaimedMemory, buffer *Buffer, int Size) Buffer->Ptr = Buffer->Location; } +ref_info +ParseRef(HMML_Reference RefInput) +{ + ref_info Info; + if(RefInput.author) + { + Info.Source = RefInput.author; + Info.RefTitle = RefInput.title; + return Info; + } + else if(RefInput.page) + { + Info.Source = RefInput.site; + Info.RefTitle = RefInput.page; + return Info; + } + else + { + Info.Source = ""; + Info.RefTitle = RefInput.site; + return Info; + } +} + int TimecodeToSeconds(char *Timecode) { @@ -207,6 +237,7 @@ main(int ArgC, char **Args) { for(int i = 0; i < HMML.annotations[AnnotationIndex].reference_count; ++i) { + HMML_Reference *CurrentRef = HMML.annotations[AnnotationIndex].references + i; // NOTE(matt): Consider removing the ref_index class if it ain't needed sprintf(Working.Location, " \n" @@ -222,9 +253,9 @@ main(int ArgC, char **Args) " \n" " \n", AnnotationIndex, -HMML.annotations[AnnotationIndex].references[i].url, -HMML.annotations[AnnotationIndex].references[i].site ? HMML.annotations[AnnotationIndex].references[i].site : HMML.annotations[AnnotationIndex].references[i].author, -HMML.annotations[AnnotationIndex].references[i].page ? HMML.annotations[AnnotationIndex].references[i].page : HMML.annotations[AnnotationIndex].references[i].title, +CurrentRef->url, +ParseRef(*CurrentRef).Source, +ParseRef(*CurrentRef).RefTitle, TimecodeToSeconds(HMML.annotations[AnnotationIndex].time), ReferenceIndex, HMML.annotations[AnnotationIndex].time); @@ -275,7 +306,7 @@ HMML.annotations[AnnotationIndex].time); { for(int MarkerIndex = 0; MarkerIndex < HMML.annotations[AnnotationIndex].marker_count; ++MarkerIndex) { - if(!StringsDiffer("blackboard", HMML.annotations[AnnotationIndex].markers[MarkerIndex].text) && + if(!StringsDiffer("blackboard", HMML.annotations[AnnotationIndex].markers[MarkerIndex].marker) && HMML.annotations[AnnotationIndex].markers[MarkerIndex].type == HMML_CATEGORY) { sprintf(Working.Location, " blackboard"); diff --git a/hmml_to_html/hmmlib.h b/hmml_to_html/hmmlib.h index 0841fa3..acf637a 100644 --- a/hmml_to_html/hmmlib.h +++ b/hmml_to_html/hmmlib.h @@ -40,7 +40,8 @@ typedef enum { typedef struct { HMML_MarkerType type; - char* text; + char* marker; + char* parameter; int offset; } HMML_Marker; diff --git a/hmml_to_html/style.css b/hmml_to_html/style.css index c44de88..84cffe4 100644 --- a/hmml_to_html/style.css +++ b/hmml_to_html/style.css @@ -84,6 +84,27 @@ font-style: oblique; } +.marker .content .categories { + display: inline-block; +} + +.marker .content .categories .category { + border: 1px; + border-radius: 50%; + height: 6px; + width: 6px; +} + +.category.memory { + border-color: #3399FF; + background: #3399FF; +} + +.category.hardware { + border-color: #FF3333; + background: #FF3333; +} + /* MANDATORY */ .player_container {