Skip to content

Commit afc7e51

Browse files
authored
Merge pull request #166 from curiousdannii/cumulative
Cumulative changes from feedback
2 parents 426e1d2 + 645dcde commit afc7e51

File tree

15 files changed

+362
-248
lines changed

15 files changed

+362
-248
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ charset = utf-8
99
trim_trailing_whitespace = false
1010
insert_final_newline = false
1111

12-
[*.{i6t,neptune,w}]
12+
[*.{i6t,i7,i7x,neptune,ni,txt,w}]
1313
indent_style = tab
1414

1515
[*.json]

inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7x

Lines changed: 45 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -156,26 +156,26 @@ First startup rule (this is the virtual machine startup rule):
156156

157157
Section - Startup A (for Glulx only)
158158

159-
The start capturing startup text rule is listed in the before starting the virtual machine rules.
160-
The start capturing startup text rule translates into Inter as "CAPTURE_STARTUP_TEXT_R".
159+
The recover Glk objects rule is listed first in the before starting the virtual machine rules. [5th]
160+
The recover Glk objects rule translates into Inter as "GGRecoverObjects".
161161

162162
Section - Startup B
163163

164-
The platform specific startup rule is listed in the before starting the virtual machine rules.
165-
The platform specific startup rule translates into Inter as "PLATFORM_SPECIFIC_STARTUP_R".
164+
The seed random number generator rule is listed first in the before starting the virtual machine rules. [4th]
165+
The seed random number generator rule translates into Inter as "SEED_RANDOM_NUMBER_GENERATOR_R".
166166

167-
The initialise memory rule is listed in the before starting the virtual machine rules.
167+
The initialise memory rule is listed first in the before starting the virtual machine rules. [3rd]
168168
The initialise memory rule translates into Inter as "INITIALISE_MEMORY_R".
169169

170-
The seed random number generator rule is listed in the before starting the virtual machine rules.
171-
The seed random number generator rule translates into Inter as "SEED_RANDOM_NUMBER_GENERATOR_R".
170+
The platform specific startup rule is listed first in the before starting the virtual machine rules. [2nd]
171+
The platform specific startup rule translates into Inter as "PLATFORM_SPECIFIC_STARTUP_R".
172172

173173
Section - Startup C (for Glulx only)
174174

175-
The recover Glk objects rule is listed in the before starting the virtual machine rules.
176-
The recover Glk objects rule translates into Inter as "GGRecoverObjects".
175+
The start capturing startup text rule is listed first in the before starting the virtual machine rules. [1st]
176+
The start capturing startup text rule translates into Inter as "CAPTURE_STARTUP_TEXT_R".
177177

178-
The set default stylehints rule is listed in the before starting the virtual machine rules.
178+
The set default stylehints rule is listed in the before starting the virtual machine rules. [6th]
179179
The set default stylehints rule translates into Inter as "SET_DEFAULT_STYLEHINTS_R".
180180

181181
The sound channel initialisation rule is listed in the for starting the virtual machine rules.
@@ -1645,6 +1645,9 @@ To fill/redraw the/-- status bar/line/window with (new status table - a table-na
16451645
To move the status bar/line/window cursor to row (row - number) column (col - number):
16461646
(- VM_MoveCursorInStatusLine({row}, {col}); -).
16471647

1648+
To set the status bar/line/window to (rows - number) row/rows:
1649+
(- VM_StatusLineHeight({rows}); -).
1650+
16481651
Chapter 10 - External Files (not for Z-machine)
16491652

16501653
Section 1 - Files of Text
@@ -1703,34 +1706,15 @@ To decide which number is the patch version of (V - version number):
17031706

17041707
Chapter - Glk and Glulx feature testing
17051708

1706-
To decide whether (F - glk feature) is/are supported
1707-
(documented at ph_glksupported):
1708-
(- Cached_Glk_Gestalts-->({F}) -).
1709+
Definition: a glk feature is supported rather than unsupported if I6 routine
1710+
"GlkFeatureTest" says so (it is supported by the interpreter).
17091711

17101712
To decide what version number is the glk version number/--
17111713
(documented at ph_glkversion):
17121714
(- VERSION_NUMBER_TY_NewFromPacked(Cached_Glk_Gestalts-->gestalt_Version) -).
17131715

1714-
To decide whether buffer window graphics are/is supported:
1715-
(- glk_gestalt(gestalt_DrawImage, wintype_TextBuffer) -).
1716-
1717-
To decide whether graphics window graphics are/is supported:
1718-
(- glk_gestalt(gestalt_DrawImage, wintype_Graphics) -).
1719-
1720-
To decide whether buffer window hyperlinks are/is supported:
1721-
(- glk_gestalt(gestalt_HyperlinkInput, wintype_TextBuffer) -).
1722-
1723-
To decide whether grid window hyperlinks are/is supported:
1724-
(- glk_gestalt(gestalt_HyperlinkInput, wintype_TextGrid) -).
1725-
1726-
To decide whether graphics window mouse input is supported:
1727-
(- glk_gestalt(gestalt_MouseInput, wintype_Graphics) -).
1728-
1729-
To decide whether grid window mouse input is supported:
1730-
(- glk_gestalt(gestalt_MouseInput, wintype_TextGrid) -).
1731-
1732-
To decide whether (F - glulx feature) is/are supported:
1733-
(- Cached_Glulx_Gestalts-->({F}) -).
1716+
Definition: a glulx feature is supported rather than unsupported if I6 routine
1717+
"GlulxFeatureTest" says so (it is supported by the interpreter).
17341718

17351719
To decide what version number is the glulx version number/--:
17361720
(- VERSION_NUMBER_TY_NewFromPacked(Cached_Glulx_Gestalts-->GLULX_GESTALT_GlulxVersion) -).
@@ -1744,26 +1728,30 @@ A glk window is a kind of abstract object.
17441728
The glk window kind is accessible to Inter as "K_Glk_Window".
17451729
The specification of a glk window is "Models the Glk window system."
17461730

1747-
A glk window has a glk window type called the type.
1748-
The type property translates into Inter as "glk_window_type".
1731+
A glk window has a glk window type called the window type.
1732+
The window type property translates into Inter as "glk_window_type".
17491733

17501734
A glk window has a number called the rock number.
17511735
The rock number property translates into Inter as "glk_rock".
17521736

1753-
A glk window has a number called the reference number.
1754-
The reference number property translates into Inter as "glk_ref".
1737+
A glk window has a number called the glk window handle.
1738+
The glk window handle property translates into Inter as "glk_ref".
17551739

1756-
The main window is a glk window.
1740+
A graphics window is a kind of glk window.
1741+
The window type of a graphics window is graphics window type.
1742+
A text buffer window is a kind of glk window.
1743+
The window type of a text buffer window is text buffer window type.
1744+
A text grid window is a kind of glk window.
1745+
The window type of a text grid window is text grid window type.
1746+
1747+
The main window is a text buffer window.
17571748
The main window object is accessible to Inter as "Main_Window".
1758-
The type of the main window is text buffer.
17591749

1760-
The status window is a glk window.
1750+
The status window is a text grid window.
17611751
The status window object is accessible to Inter as "Status_Window".
1762-
The type of the status window is text grid.
17631752

1764-
The quote window is a glk window.
1753+
The quote window is a text buffer window.
17651754
The quote window object is accessible to Inter as "Quote_Window".
1766-
The type of the quote window is text buffer.
17671755

17681756
The unknown window is a glk window.
17691757
The unknown window object is accessible to Inter as "Unknown_Glk_Window".
@@ -1772,30 +1760,28 @@ Section - Glk windows
17721760

17731761
To clear (win - a glk window)
17741762
(documented at ph_glkwindowclear):
1775-
(- glk_window_clear({win}.glk_ref); -).
1763+
(- WindowClear({win}); -).
17761764

17771765
To focus (win - a glk window)
17781766
(documented at ph_glkwindowfocus):
1779-
(- glk_set_window({win}.glk_ref); -).
1767+
(- WindowFocus({win}); -).
17801768

17811769
To decide what number is the height of (win - a glk window)
17821770
(documented at ph_glkwindowheight):
1783-
(- GetWindowSize({win}, 1) -).
1771+
(- WindowGetSize({win}, 1) -).
17841772

17851773
To decide what number is the width of (win - a glk window)
17861774
(documented at ph_glkwindowwidth):
1787-
(- GetWindowSize({win}, 0) -).
1775+
(- WindowGetSize({win}, 0) -).
17881776

17891777
To set (win - a glk window) cursor to row (row - a number) and/-- column (col - a number):
1790-
(- glk_window_move_cursor({win}.glk_ref, {col} - 1, {row} - 1); -).
1778+
(- WindowMoveCursor({win}, {col}, {row}); -).
17911779

17921780
Chapter - Glk events
17931781

17941782
The glk event handling rules is a glk event based rulebook.
17951783
The glk event handling rules is accessible to Inter as "GLK_EVENT_HANDLING_RB".
17961784

1797-
The glk event type is a glk event variable.
1798-
The glk event type variable translates into Inter as "Glk_Event_Struct_type".
17991785
The glk event window is a glk window variable.
18001786
The glk event window variable translates into Inter as "Glk_Event_Struct_win".
18011787
The glk event value 1 is a number variable.
@@ -1812,18 +1798,20 @@ Definition: a glk event is dependent on the player rather than independent of th
18121798
To set the/-- glk event type to (t - glk event):
18131799
(- SetGlkEventType({t}); -).
18141800

1801+
To say current line input of (w - glk window):
1802+
(- WindowBufferPrint({w}); -).
1803+
18151804
To decide what text is the current line input of (w - glk window):
1816-
(- CopyWindowBufferToText({w}, {-new:text}) -).
1805+
(- WindowBufferCopyToText({w}, {-new:text}) -).
18171806

18181807
To set the current line input of (w - glk window) to (t - text):
1819-
(- CopyTextToWindowBuffer({w}, {-by-reference:t}); -).
1808+
(- WindowBufferSet({w}, {-by-reference:t}); -).
18201809

1821-
First glk event handling rule (this is the update text input status rule):
1822-
if the glk event type is character event or the glk event type is line event:
1823-
now the text input status of the glk event window is inactive text input;
1824-
if the glk event type is hyperlink event:
1810+
First glk event handling rule for a glk event (called the event) (this is the update input requests rule):
1811+
[ It was too risky to set the text input status here, in case the author also sets a first glk event handling rule, so that property is reset within glk_select. ]
1812+
if the event is hyperlink event:
18251813
now the glk event window is not requesting hyperlink input;
1826-
if the glk event type is mouse event:
1814+
if the event is mouse event:
18271815
now the glk event window is not requesting mouse input;
18281816

18291817
Chapter - Suspending and resuming input
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Cannot perform this Glk window operation on a closed window
2+
3+
A Glk window function is being called on a closed window.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Cannot perform this Glk window operation on nothing
2+
3+
A Glk window function is being called on nothing. This could happen, for example, if you're assuming the `glk event window` is valid, but for timer events it is nothing.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Can't set the glk event type to a text input event when there is no glk event window
2+
3+
The glk event type cannot be changed to a text input event (character or line) if the `glk event window` is currently unset (such as in a timer event).
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Cannot set current line input of a window which has never requested line input
2+
3+
In order to use the `set the current line input` phrase, the window must previously have requested line input. For example, you cannot set the current line input of a graphics window.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Wrong window type for this Glk window operation
2+
3+
A Glk window function is being called on a window with the wrong window type, for example, setting the cursor on a buffer window, or using graphics window functions on a grid window.

0 commit comments

Comments
 (0)