Data Structures for Full Role Editor

 

The task for today, kiddies, is to figure out how I'm going to modify gTokenString to handle the new role editor arrangement. First I must gather up the selection equation and the individual token strings for each of the consequences. Then I must select which of these to display. This will have to be a two-pass process, for the substitution variables must be identified first.

 

Here's the problem: in previous code, I handled the sorting process at screen initialization by simply setting up the gTokenString with the appropriate values, and then turning the display code loose on it. But now I have a more complex problem: the display has to change in quick response to user input. This implies that the basic data set must be selected from in realtime. The uglier problem is, I must still convert the constant from the double-word format in the token string to the single-longword format in the displayed token string. This means that the first step is to gather all the tokens into gTokenString, converting constants in the process. Selection of assignments to display takes place from this in realtime.

 

I also need an index to tell me which of the display types we're looking at.