diff options
author | Thomas White <taw@bitwiz.me.uk> | 2019-03-03 18:51:34 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2019-03-03 18:52:22 +0100 |
commit | acbec489df38e182a8e284095ccd7a0f1d84112e (patch) | |
tree | 1ad22572be6294ae761a2ecba7dea37c26f0b969 /libstorycode/narrative.c | |
parent | f2bfe89481217625f74224289947f7bcd839c55f (diff) |
Styled narrative rendering
Diffstat (limited to 'libstorycode/narrative.c')
-rw-r--r-- | libstorycode/narrative.c | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/libstorycode/narrative.c b/libstorycode/narrative.c index 81c69b1..97d4353 100644 --- a/libstorycode/narrative.c +++ b/libstorycode/narrative.c @@ -58,13 +58,31 @@ static struct narrative_item *add_item(Narrative *n) } -void narrative_add_prestitle(Narrative *n, const char *text) +void narrative_add_prestitle(Narrative *n, char *text) { + struct narrative_item *item; + + item = add_item(n); + if ( item == NULL ) return; + + item->type = NARRATIVE_ITEM_PRESTITLE; + item->text = text; + item->align = ALIGN_LEFT; + item->layout = NULL; } -void narrative_add_bp(Narrative *n, const char *text) +void narrative_add_bp(Narrative *n, char *text) { + struct narrative_item *item; + + item = add_item(n); + if ( item == NULL ) return; + + item->type = NARRATIVE_ITEM_BP; + item->text = text; + item->align = ALIGN_LEFT; + item->layout = NULL; } |