Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- case 2:
- // Always comes here to check if it has Character Waiting.
- if(tr->dialogue->chr_wait)
- {
- // If so, write nothing, and move to the following state.
- // To process the text character by character.
- tr->state = 3;
- }
- else
- {
- // If there is no Character Waiting on this Dialogue
- // piece, just print the text on the box.
- tte_write(tr->chr);
- tr->state = 99;
- }
- case 3:
- // Adds the Character counter.
- tr->wait_counter++;
- // If the waiting is = to the dialogue's assigned Character
- // Waiting...
- if(tr->wait_counter == tr->dialogue->chr_wait)
- {
- // Get the remaining "unprinted" string from the
- // Dialogue Structure (tr = Text Render).
- text = tr->chr;
- // Check for a TTE command ignoring the second
- // character ('{') confirmation.
- if((*text) == '#')
- {
- // If so, move forward 2 chars on the string,
- text += 2;
- // and input the command line beyond the '{' char,
- // getting the returned continuation of the string
- text = tte_cmd_default(text+2);
- }
- // Input the present char on the remaining string,
- tte_putc((*text));
- // and move a char forward on he string
- text++;
- // Reset the Character Counter to 0
- tr->wait_counter = 0;
- // Check if it is the end of the dialogue piece,
- // to proceed into the box interaction.
- if((*text) == '\0')
- tr->state = 99;
- // Return the remaining string to the
- // Dialogue Structure.
- tr->chr = text;
- }
- break;
Add Comment
Please, Sign In to add comment