| summaryrefslogtreecommitdiff |
diff options
| author | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2020-12-28 02:59:31 +0100 |
|---|---|---|
| committer | Nathanael Sensfelder <SpamShield0@MultiAgentSystems.org> | 2020-12-28 02:59:31 +0100 |
| commit | 3b820907588131712bd2991dc751329530df8a6a (patch) | |
| tree | 315563874910ff1325f36341daaf1b4faded5fb7 /content | |
| parent | b5b30786abdb77dc0c1f9ed1be6d9c594b398b1a (diff) | |
Some "rich text" -> "text"; new sequence stuff.
Diffstat (limited to 'content')
| -rw-r--r-- | content/fate_v1/_index.md | 4 | ||||
| -rw-r--r-- | content/fate_v1/computations/_index.md | 6 | ||||
| -rw-r--r-- | content/fate_v1/computations/text/_index.md (renamed from content/fate_v1/computations/rich_text/_index.md) | 8 | ||||
| -rw-r--r-- | content/fate_v1/declarations/events/_index.md | 2 | ||||
| -rw-r--r-- | content/fate_v1/declarations/text_effects/_index.md | 4 | ||||
| -rw-r--r-- | content/fate_v1/declarations/types/_index.md | 8 | ||||
| -rw-r--r-- | content/fate_v1/instructions/_index.md | 20 | ||||
| -rw-r--r-- | content/wyrd_v1/_index.md | 4 | ||||
| -rw-r--r-- | content/wyrd_v1/computations/_index.md | 10 | ||||
| -rw-r--r-- | content/wyrd_v1/instructions/_index.md | 20 |
10 files changed, 50 insertions, 36 deletions
diff --git a/content/fate_v1/_index.md b/content/fate_v1/_index.md index 50d24f6..29e595d 100644 --- a/content/fate_v1/_index.md +++ b/content/fate_v1/_index.md @@ -140,7 +140,7 @@ see what events are available. #### Types The basic `string`, `int`, `float`, and `bool` types are what one would expect. -`rich_text` corresponds to text decorations, see the text effect sub-section. +`text` corresponds to text with decorations, see the text effect sub-section. Two collection types are available: `(list [TYPE])` is a list of `[TYPE]` elements, and `(set [COMPARABLE])` is a set of `[COMPARABLE]` elements. @@ -155,7 +155,7 @@ issue](https://github.com/nsensfel/tonkadur/issues/6)). #### Player Choices Inputs from the players are limited to the `(player_choice ...)` instruction. -It presents the player with `rich text` options to choose from, which execute +It presents the player with `text` options to choose from, which execute an associated list of instructions if chosen. More complicated inputs, such as retrieving a `string` or an `int` from the diff --git a/content/fate_v1/computations/_index.md b/content/fate_v1/computations/_index.md index b9c4291..4eed307 100644 --- a/content/fate_v1/computations/_index.md +++ b/content/fate_v1/computations/_index.md @@ -16,6 +16,12 @@ Returns a `text` node containing the text representation of `C0` ... `CN`. Returns the value of the variable `{String}`, or a reference to it if applicable. Structure members can be accessed by using `.` in `{String}`. +### SEQUENCE | PROCEDURE +{{< fatecode >}}(sequence {String}){{< /fatecode >}} + +Returns a `[SEQUENCE]` value corresponding to the sequence named `{String}`. +Said sequence can be defined at a later point. + ### STRUCTURE FIELD ACCESS {{< fatecode >}}{Structure Var Name}.{Field Name}{{< /fatecode >}} {{< fatecode >}}(field {String} [STRUCTURE VAR]){{< /fatecode >}} diff --git a/content/fate_v1/computations/rich_text/_index.md b/content/fate_v1/computations/text/_index.md index 7351a5c..b91a75f 100644 --- a/content/fate_v1/computations/rich_text/_index.md +++ b/content/fate_v1/computations/text/_index.md @@ -1,11 +1,11 @@ --- -title: Rich Text +title: Text --- -### RICH TEXT -{{< fatecode >}}(rich_text [TEXT]){{< /fatecode >}} +### TEXT +{{< fatecode >}}(text [TEXT]){{< /fatecode >}} ### ADD TEXT EFFECT -{{< fatecode >}}(add_text_effect ({String} [P0 = COMPUTATION] ... [PN = COMPUTATION]) [RICH TEXT]){{< /fatecode >}} +{{< fatecode >}}(add_text_effect ({String} [P0 = COMPUTATION] ... [PN = COMPUTATION]) [TEXT]){{< /fatecode >}} ### NEW LINE {{< fatecode >}}(newline){{< /fatecode >}} diff --git a/content/fate_v1/declarations/events/_index.md b/content/fate_v1/declarations/events/_index.md index 5493cd7..0c00d52 100644 --- a/content/fate_v1/declarations/events/_index.md +++ b/content/fate_v1/declarations/events/_index.md @@ -12,7 +12,7 @@ event type must be declared before use. `[C0]`, ..., `[CN]` can be used. ## Examples -* `(declare_event_type user_string_input rich_text (ptr string))` +* `(declare_event_type user_string_input text (ptr string))` * `(declare_event_type wait int)` * `(declare_event_type set_background_to string)` * `(declare_event_type rumble)` diff --git a/content/fate_v1/declarations/text_effects/_index.md b/content/fate_v1/declarations/text_effects/_index.md index 3bf7a08..fd3742d 100644 --- a/content/fate_v1/declarations/text_effects/_index.md +++ b/content/fate_v1/declarations/text_effects/_index.md @@ -1,10 +1,10 @@ --- title: Text Effects --- -Text effects are attributes that can be given to rich text elements. The +Text effects are attributes that can be given to text elements. The effects themselves can take parameters. To avoid errors that would be difficult to detect, Tonkadur expects text effects to be declared before being used. -Note that multiple text effects can be applied to the same rich text elements, +Note that multiple text effects can be applied to the same text elements, so there is no need to create text effects that combine other text effects. Two text effects cannot have the same name, even if their parameter types diff --git a/content/fate_v1/declarations/types/_index.md b/content/fate_v1/declarations/types/_index.md index 81f295b..5844895 100644 --- a/content/fate_v1/declarations/types/_index.md +++ b/content/fate_v1/declarations/types/_index.md @@ -33,11 +33,15 @@ Lambda computations are available: to a lambda function returning a value of type `R` and taking parameters of types `A0` ... `AN`. +Procedures/sequences can be stored for future reference: +* `(sequence ([A0 = TYPE] ... [AN = TYPE]))` is a type corresponding + to a procedure/sequence taking parameters of types `A0` ... `AN`. + ### Common Type Groupings * `[NUMBER]` corresponds to `int`, `float`. * `[COLLECTION]` corresponds to `(list [TYPE])` and `(set [COMPARABLE TYPE])`. -* `[PRIMITIVE]` `int`, `float`, `bool`, `string`, `rich_text`. -* `[COMPARABLE]` corresponds to `int`, `float`, `bool`, `string`, `rich_text`, +* `[PRIMITIVE]` `int`, `float`, `bool`, `string`, `text`. +* `[COMPARABLE]` corresponds to `int`, `float`, `bool`, `string`, `text`, and `(ptr [TYPE])`. This indicates types for which operators such as `<` are defined. diff --git a/content/fate_v1/instructions/_index.md b/content/fate_v1/instructions/_index.md index ec5b413..95ee992 100644 --- a/content/fate_v1/instructions/_index.md +++ b/content/fate_v1/instructions/_index.md @@ -30,18 +30,22 @@ Gives the value `[COMPUTATION]` to `[REFERENCE]`. ### VISIT SEQUENCE {{< fatecode >}}(visit {String} [C0 = COMPUTATION] ... [CN = COMPUTATION]){{< /fatecode >}} -Visits the sequence named `{String}`, with `C0` ... `CN` as arguments. That -sequence does not need to already have been defined. Visiting a sequence means -that the execution of the current sequence continues once the visited sequence -has completed. +{{< fatecode >}}(visit [SEQUENCE] [C0 = COMPUTATION] ... [CN = COMPUTATION]){{< /fatecode >}} + +Visits the sequence named `{String}` (or stored in `[SEQUENCE]`), with `C0` ... +`CN` as arguments. That sequence does not need to already have been defined. +Visiting a sequence means that the execution of the current sequence continues +once the visited sequence has completed. ### JUMP TO SEQUENCE {{< fatecode >}}(jump_to {String} [C0 = COMPUTATION] ... [CN = COMPUTATION]){{< /fatecode >}} -Jumps to the sequence named `{String}`, with `C0` ... `CN` as arguments. That -sequence does not need to already have been defined. Jumping to a sequence means -that the execution of the current sequence is replaced by that of the target -sequence. +{{< fatecode >}}(jump_to [SEQUENCE] [C0 = COMPUTATION] ... [CN = COMPUTATION]){{< /fatecode >}} + +Jumps to the sequence named `{String}` (or stored in `[SEQUENCE]`), with `C0` +... `CN` as arguments. That sequence does not need to already have been +defined. Jumping to a sequence means that the execution of the current sequence +is replaced by that of the target sequence. ### INSTRUCTION LIST {{< fatecode >}}([C0 = INSTRUCTION] ... [CN = INSTRUCTION]){{< /fatecode >}} diff --git a/content/wyrd_v1/_index.md b/content/wyrd_v1/_index.md index 9bc38a3..c6e6e97 100644 --- a/content/wyrd_v1/_index.md +++ b/content/wyrd_v1/_index.md @@ -43,7 +43,7 @@ Lambda functions are stored as an `INT` corresponding to a line in the program. * `[SOMETHING] COLLECTION`, table mapping `STRING` to `[SOMETHING]`. * `FLOAT`. * `INT`. -* `RICH TEXT`, a list of `STRINGS` with attributes attached. +* `TEXT`, a list of `STRINGS` with attributes attached. * `STRING`. * `STRUCTURE` (or `DICTIONARY`), table mapping `STRING` to values of any type. * `{String}`, a hard-coded string. @@ -51,7 +51,7 @@ Lambda functions are stored as an `INT` corresponding to a line in the program. #### Aliases sometimes used to refer to types * `? ADDRESS`: an `ADDRESS` pointing to a particular type. * `BASE TYPE`: `INT`, `FLOAT`, `BOOL`, `STRING`. -* `COMPARABLE`: `INT`, `FLOAT`, `BOOL`, `STRING`, `RICH TEXT`, `ADDRESS`. +* `COMPARABLE`: `INT`, `FLOAT`, `BOOL`, `STRING`, `TEXT`, `ADDRESS`. * `COLLECTION`: any `? COLLECTION`. * `COMPUTATION`: any type. * `NUMBER`: `INT` or `FLOAT`. diff --git a/content/wyrd_v1/computations/_index.md b/content/wyrd_v1/computations/_index.md index 62ddd41..bf7992d 100644 --- a/content/wyrd_v1/computations/_index.md +++ b/content/wyrd_v1/computations/_index.md @@ -84,15 +84,15 @@ Returns the value held at the memory location `[ADDRESS]`. Returns an `[TYPE] ADDRESS` to a newly allocated memory element of type `[TYPE]`. -## RICH TEXT +## TEXT {{< fatecode >}}(newline){{< /fatecode >}} -Returns a `RICH TEXT` value corresponding to a newline. +Returns a `TEXT` value corresponding to a newline. {{< fatecode >}}(rich_text [S0 = STRING] ... [SN = STRING]){{< /fatecode >}} -Returns a single value `RICH TEXT` representing the elements `S0` ... `S1`. +Returns a single value `[TEXT]` representing the elements `S0` ... `S1`. -{{< fatecode >}}(add_rich_text_effect ({string} [V0 = COMPUTATION] ... [VN = COMPUTATION]) [RICH TEXT]){{< /fatecode >}} -Returns a `RICH TEXT` value of `[RICH TEXT]` with the given effect enabled. +{{< fatecode >}}(add_rich_text_effect ({string} [V0 = COMPUTATION] ... [VN = COMPUTATION]) [TEXT]){{< /fatecode >}} +Returns a `[TEXT]` value of `[TEXT]` with the given effect enabled. ## LAST USER CHOICE {{< fatecode >}}(get_last_user_choice){{< /fatecode >}} diff --git a/content/wyrd_v1/instructions/_index.md b/content/wyrd_v1/instructions/_index.md index cda4fec..500f884 100644 --- a/content/wyrd_v1/instructions/_index.md +++ b/content/wyrd_v1/instructions/_index.md @@ -8,31 +8,31 @@ the Program Counter by 1. ## ADD CHOICE -{{< fatecode >}}(add_choice [RICH TEXT]){{< /fatecode >}} +{{< fatecode >}}(add_choice [TEXT]){{< /fatecode >}} Adds a new option for the next `resolve_choices` instruction. The new option -presents the player with `[RICH TEXT]`. +presents the player with `[TEXT]`. ## INTEGER PROMPT -{{< fatecode >}}(prompt_integer [INT REFERENCE] [MIN = INT] [MAX = INT] [RICH TEXT]){{< /fatecode >}} +{{< fatecode >}}(prompt_integer [INT REFERENCE] [MIN = INT] [MAX = INT] [TEXT]){{< /fatecode >}} Prompts the user for an integer between `[MIN]` and `[MAX]` by displaying the -message `[RICH TEXT]`. The result is stored in `[INT REFERENCE]`. +message `[TEXT]`. The result is stored in `[INT REFERENCE]`. ## STRING PROMPT -{{< fatecode >}}(prompt_string [STRING REFERENCE] [MIN = INT] [MAX = INT] [RICH TEXT]){{< /fatecode >}} +{{< fatecode >}}(prompt_string [STRING REFERENCE] [MIN = INT] [MAX = INT] [TEXT]){{< /fatecode >}} Prompts the user for a string of size between `[MIN]` and `[MAX]` by displaying -the message `[RICH TEXT]`. The result is stored in `[STRING REFERENCE]`. +the message `[TEXT]`. The result is stored in `[STRING REFERENCE]`. ## ASSERT -{{< fatecode >}}(assert [BOOL] [RICH TEXT]){{< /fatecode >}} -If `[BOOL]` isn't _true_, raise a runtime error containing `[RICH TEXT]`. +{{< fatecode >}}(assert [BOOL] [TEXT]){{< /fatecode >}} +If `[BOOL]` isn't _true_, raise a runtime error containing `[TEXT]`. ## DISPLAY -{{< fatecode >}}(display [RICH TEXT]){{< /fatecode >}} -Displays `[RICH TEXT]` to the player. +{{< fatecode >}}(display [TEXT]){{< /fatecode >}} +Displays `[TEXT]` to the player. ## END |


