More ffi for choices and the like
This commit is contained in:
@@ -35,6 +35,12 @@ int main() {
|
||||
storybook_advance_nooption(book);
|
||||
break;
|
||||
case (FOOTER_CHOICES):
|
||||
int n = storybook_get_num_choices(book);
|
||||
for (int i = 1; i <= n; i++) {
|
||||
Choice* choice = storybook_get_choice(book, i);
|
||||
printf("%d) %s\n", choice->option, choice->flavor);
|
||||
storybook_free_choice(choice);
|
||||
}
|
||||
uint32_t option;
|
||||
printf("Make a choice: ");
|
||||
scanf("%d", &option);
|
||||
|
||||
Reference in New Issue
Block a user