Skip to content

Commit

Permalink
GEP: Don't cache gestalt results. Closes #24
Browse files Browse the repository at this point in the history
  • Loading branch information
curiousdannii committed Jun 20, 2015
1 parent 81b0629 commit 558e73a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 57 deletions.
89 changes: 36 additions & 53 deletions Emily Short/Glulx Entry Points.i7x
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version 10/150126 of Glulx Entry Points (for Glulx only) by Emily Short begins here.
Version 10/150620 of Glulx Entry Points (for Glulx only) by Emily Short begins here.

"Provides hooks to allow the author to write specialized multimedia behavior that would normally go through HandleGlkEvent. This is a rather dull utility library that will be of most use to authors wanting to write Glulx extensions compatible with other Glulx extensions already in use."

Expand Down Expand Up @@ -47,126 +47,109 @@ Library input context is a number variable. [This describes the event context in

Section - Gestalts

The test Glulx and Glk gestalts rule is listed in the glulx zeroing-reference rules.
The test Glulx and Glk gestalts rule translates into I6 as "GEP_TestGestalts".

Include (-
Array GEP_GlulxGestaltResults --> 12;
Array GEP_GlkGestaltResults --> 23;
[ GEP_TestGestalts i res;
for ( i = 0 : i < 12 : i++ )
{
@gestalt i 0 res;
GEP_GlulxGestaltResults-->i = res;
}
for ( i = 0 : i < 23 : i++ )
{
GEP_GlkGestaltResults-->i = glk_gestalt( i, 0 );
}
rfalse;
[ GEP_GlulxGestalt sel arg res;
@gestalt sel arg res;
return res;
];
-).

To decide what number is the glulx version:
(- ( GEP_GlulxGestaltResults-->0 ) -).
(- GEP_GlulxGestalt( 0 ) -).

To decide what number is the interpreter version:
(- ( GEP_GlulxGestaltResults-->1 ) -).
(- GEP_GlulxGestalt( 1 ) -).

To decide whether glulx memory resizing is supported:
(- ( GEP_GlulxGestaltResults-->2 ) -).
(- GEP_GlulxGestalt( 2 ) -).

To decide whether glulx undo is supported:
(- ( GEP_GlulxGestaltResults-->3 ) -).
(- GEP_GlulxGestalt( 3 ) -).

To decide whether glulx memory copying is supported:
(- ( GEP_GlulxGestaltResults-->6 ) -).
(- GEP_GlulxGestalt( 6 ) -).

To decide whether glulx malloc is supported:
(- ( GEP_GlulxGestaltResults-->7 ) -).
(- GEP_GlulxGestalt( 7 ) -).

To decide whether glulx function acceleration is supported:
(- ( GEP_GlulxGestaltResults-->9 ) -).
(- GEP_GlulxGestalt( 9 ) -).

To decide whether glulx real numbers are supported:
(- ( GEP_GlulxGestaltResults-->11 ) -).
(- GEP_GlulxGestalt( 11 ) -).

To decide what number is the glk version:
(- ( GEP_GlkGestaltResults-->gestalt_Version ) -).
(- glk_gestalt( gestalt_Version, 0 ) -).

To decide whether glk/glulx character input is supported:
(- ( GEP_GlkGestaltResults-->gestalt_CharInput ) -).
(- glk_gestalt( gestalt_CharInput, 0 ) -).

To decide whether glk/glulx line input is supported:
(- ( GEP_GlkGestaltResults-->gestalt_LineInput ) -).
(- glk_gestalt( gestalt_LineInput, 0 ) -).

To decide whether glk/glulx mouse input is supported:
(- ( GEP_GlkGestaltResults-->gestalt_MouseInput ) -).
(- glk_gestalt( gestalt_MouseInput, 0 ) -).

To decide whether glk/glulx graphic-window mouse input is supported:
(- ( glk_gestalt( gestalt_MouseInput, winType_Graphics ) ) -).
(- glk_gestalt( gestalt_MouseInput, winType_Graphics ) -).

To decide whether glk/glulx text-grid mouse input is supported:
(- ( glk_gestalt( gestalt_MouseInput, winType_TextGrid ) ) -).
(- glk_gestalt( gestalt_MouseInput, winType_TextGrid ) -).

To decide whether glk/glulx timekeeping is supported:
(- ( GEP_GlkGestaltResults-->gestalt_Timer ) -).
(- glk_gestalt( gestalt_Timer, 0 ) -).

To decide whether glk/glulx graphics are/is supported:
(- ( GEP_GlkGestaltResults-->gestalt_Graphics ) -).
(- glk_gestalt( gestalt_Graphics, 0 ) -).

To decide whether glk/glulx text-buffer graphics are/is supported:
(- ( glk_gestalt( gestalt_DrawImage, winType_TextBuffer ) ) -).
(- glk_gestalt( gestalt_DrawImage, winType_TextBuffer ) -).

To decide whether glk/glulx graphic-window graphics are/is supported:
(- ( glk_gestalt( gestalt_DrawImage, winType_Graphics ) ) -).
(- glk_gestalt( gestalt_DrawImage, winType_Graphics ) -).

To decide whether glk/glulx basic/-- sounds/sound are/is supported:
(- ( GEP_GlkGestaltResults-->gestalt_Sound ) -).
(- glk_gestalt( gestalt_Sound, 0 ) -).

To decide whether glk/glulx sound volume is supported:
(- ( GEP_GlkGestaltResults-->gestalt_SoundVolume ) -).
(- glk_gestalt( gestalt_SoundVolume, 0 ) -).

To decide whether glk/glulx sound notification is supported:
(- ( GEP_GlkGestaltResults-->gestalt_SoundNotify ) -).
(- glk_gestalt( gestalt_SoundNotify, 0 ) -).

To decide whether glk/glulx hyperlinks are supported:
(- ( GEP_GlkGestaltResults-->gestalt_Hyperlinks ) -).
(- glk_gestalt( gestalt_Hyperlinks, 0 ) -).

To decide whether glk/glulx hyperlink input is supported:
(- ( GEP_GlkGestaltResults-->gestalt_HyperlinkInput ) -).
(- glk_gestalt( gestalt_HyperlinkInput, 0 ) -).

To decide whether glk/glulx mod sound is supported:
(- ( GEP_GlkGestaltResults-->gestalt_SoundMusic ) -).
(- glk_gestalt( gestalt_SoundMusic, 0 ) -).

To decide whether glk/glulx PNG transparency is supported:
(- ( GEP_GlkGestaltResults-->gestalt_GraphicsTransparency ) -).
(- glk_gestalt( gestalt_GraphicsTransparency, 0 ) -).

To decide whether glk/glulx unicode is supported:
(- ( GEP_GlkGestaltResults-->gestalt_Unicode ) -).
(- glk_gestalt( gestalt_Unicode, 0 ) -).

To decide whether glk/glulx unicode normalization is supported:
(- ( GEP_GlkGestaltResults-->gestalt_UnicodeNorm ) -).
(- glk_gestalt( gestalt_UnicodeNorm, 0 ) -).

To decide whether glk/glulx line input echo suppression is supported:
(- ( GEP_GlkGestaltResults-->gestalt_LineInputEcho ) -).
(- glk_gestalt( gestalt_LineInputEcho, 0 ) -).

To decide whether glk/glulx line input terminators are supported:
(- ( GEP_GlkGestaltResults-->gestalt_LineTerminators ) -).
(- glk_gestalt( gestalt_LineTerminators, 0 ) -).

To decide whether the/-- glk/glulx system clock is supported:
(- ( GEP_GlkGestaltResults-->gestalt_DateTime ) -).

To decide whether glk/glulx line input terminators are supported:
(- ( GEP_GlkGestaltResults-->gestalt_LineTerminators ) -).
(- glk_gestalt( gestalt_DateTime, 0 ) -).

To decide whether glk/glulx sounds are fully supported:
(- ( GEP_GlkGestaltResults-->gestalt_Sound2 ) -).
(- glk_gestalt( gestalt_Sound2, 0 ) -).

To decide whether glk/glulx resource streams supported:
(- ( GEP_GlkGestaltResults-->gestalt_ResourceStream ) -).
(- glk_gestalt( gestalt_ResourceStream, 0 ) -).



Expand Down
8 changes: 4 additions & 4 deletions Jon Ingold/Flexible Windows.i7x
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Version 15/150128 of Flexible Windows (for Glulx only) by Jon Ingold begins here.
Version 15/150620 of Flexible Windows (for Glulx only) by Jon Ingold begins here.

"Exposes the Glk windows system so authors can completely control the creation and use of windows"

Expand All @@ -23,7 +23,7 @@ input phrases
Use authorial modesty.

Include version 1/140512 of Alternative Startup Rules by Dannii Willis.
Include version 10/150124 of Glulx Entry Points by Emily Short.
Include version 10/150620 of Glulx Entry Points by Emily Short.
Include version 5/140516 of Glulx Text Effects by Emily Short.


Expand Down Expand Up @@ -949,10 +949,10 @@ Part - Input events
Chapter - Hyperlinks

To say link (N - a number):
(- if ( GEP_GlkGestaltResults-->gestalt_Hyperlinks ) { glk_set_hyperlink( {N} ); } -).
(- if ( glk_gestalt( gestalt_Hyperlinks, 0 ) ) { glk_set_hyperlink( {N} ); } -).

To say end link:
(- if ( GEP_GlkGestaltResults-->gestalt_Hyperlinks ) { glk_set_hyperlink( 0 ); } -).
(- if ( glk_gestalt( gestalt_Hyperlinks, 0 ) ) { glk_set_hyperlink( 0 ); } -).

Processing hyperlinks for something is an activity on g-windows.
The processing hyperlinks activity has a number called the hyperlink ID.
Expand Down

0 comments on commit 558e73a

Please sign in to comment.