diff options
author | Thomas White <taw@bitwiz.me.uk> | 2019-03-28 15:05:10 +0100 |
---|---|---|
committer | Thomas White <taw@bitwiz.me.uk> | 2019-03-28 15:05:10 +0100 |
commit | 6b60cafe0c2689531459f1cffd704da16ed2aec3 (patch) | |
tree | e41af753bb798e8b955434696c843c04dccf6bc5 /libstorycode/narrative.c | |
parent | 47764e46296e8c6921bbc00b95c05ff153699dc2 (diff) |
Restore slideshow and clock
Diffstat (limited to 'libstorycode/narrative.c')
-rw-r--r-- | libstorycode/narrative.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libstorycode/narrative.c b/libstorycode/narrative.c index 81b55f0..c0ae0d7 100644 --- a/libstorycode/narrative.c +++ b/libstorycode/narrative.c @@ -248,3 +248,17 @@ void narrative_split_item(Narrative *n, int i1, size_t o1) item2->type = NARRATIVE_ITEM_TEXT; } + + +int narrative_get_num_items(Narrative *n) +{ + return n->n_items; +} + + +Slide *narrative_get_slide(Narrative *n, int para) +{ + if ( para >= n->n_items ) return NULL; + if ( n->items[para].type != NARRATIVE_ITEM_SLIDE ) return NULL; + return n->items[para].slide; +} |