Skip to content

Commit

Permalink
If we're always requesting hyperlinks then we don't have to track it
Browse files Browse the repository at this point in the history
  • Loading branch information
curiousdannii committed Aug 11, 2024
1 parent e9b3d83 commit 28d9ba5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 39 deletions.
4 changes: 1 addition & 3 deletions inform7/Internal/Extensions/Graham Nelson/Basic Inform.i7x
Original file line number Diff line number Diff line change
Expand Up @@ -1858,7 +1858,7 @@ The handle hyperlinks rule is defined by Inter as "HANDLE_HYPERLINK_R".
To say link (T - hyperlink tag):
(- MakeTaggedHyperlink({T}); -).

To say link (T - hyperlink tag) of (V - value of kind K):
To say link (T - hyperlink tag) for/of/with (V - value of kind K):
(- MakeTaggedHyperlink({T}, {-by-reference:V}, {-strong-kind:K}); -).

To say end link:
Expand Down Expand Up @@ -1888,8 +1888,6 @@ Chapter - Suspending and resuming input

A glk window has a text input status.
The text input status property translates into Inter as "text_input_status".
A glk window can be requesting hyperlink input.
The requesting hyperlink input property translates into Inter as "requesting_hyperlink".
A glk window can be requesting mouse input.
The requesting mouse input property translates into Inter as "requesting_mouse".

Expand Down
23 changes: 1 addition & 22 deletions inform7/Internal/Inter/Architecture32Kit/Sections/Glk.i6t
Original file line number Diff line number Diff line change
Expand Up @@ -467,7 +467,7 @@ be used by |glk_select|. It also handles a few event maintenance tasks.
evtype_MouseInput:
win_obj.requesting_mouse = false;
evtype_Hyperlink:
win_obj.requesting_hyperlink = false;
glk_request_hyperlink_event(win_obj.glk_ref);
}
return ev;
];
Expand Down Expand Up @@ -610,16 +610,6 @@ requested.
return 0;
];

[ glk_cancel_hyperlink_event win win_obj;
@push win;
@glk 259 1 0;
win_obj = FindGlkWindowFromRefNum(win);
if (win_obj) {
win_obj.requesting_hyperlink = false;
}
return 0;
];

[ glk_cancel_line_event win event_struct win_obj;
if (event_struct == 0) {
event_struct = gg_arguments;
Expand Down Expand Up @@ -665,16 +655,6 @@ requested.
return 0;
];

[ glk_request_hyperlink_event win win_obj;
@push win;
@glk 258 1 0;
win_obj = FindGlkWindowFromRefNum(win);
if (win_obj) {
win_obj.requesting_hyperlink = true;
}
return 0;
];

[ glk_request_line_event win buf maxlen initlen win_obj;
@push initlen;
@push maxlen;
Expand Down Expand Up @@ -787,7 +767,6 @@ back to 32 bits.
[ HANDLE_HYPERLINK_R val;
if (current_glk_event-->GLK_EVENT_TYPE_SF == evtype_Hyperlink) {
val = current_glk_event-->GLK_EVENT_VALUE1_SF;
glk_request_hyperlink_event((current_glk_event-->GLK_EVENT_WINDOW_SF).glk_ref);
hyperlink_value = val & hyperlink_payload_mask;
if (hyperlink_value < 0) {
hyperlink_value = hyperlink_value | hyperlink_tag_mask;
Expand Down
22 changes: 11 additions & 11 deletions inform7/Internal/Inter/Architecture32Kit/Sections/InfGlk.i6t
Original file line number Diff line number Diff line change
Expand Up @@ -690,17 +690,17 @@ Constant wintype_TextGrid = 4;
return 0;
];

![ glk_request_hyperlink_event _vararg_count;
! ! glk_request_hyperlink_event(window)
! @glk 258 _vararg_count 0;
! return 0;
!];
[ glk_request_hyperlink_event _vararg_count;
! glk_request_hyperlink_event(window)
@glk 258 _vararg_count 0;
return 0;
];

![ glk_cancel_hyperlink_event _vararg_count;
! ! glk_cancel_hyperlink_event(window)
! @glk 259 _vararg_count 0;
! return 0;
!];
[ glk_cancel_hyperlink_event _vararg_count;
! glk_cancel_hyperlink_event(window)
@glk 259 _vararg_count 0;
return 0;
];

[ glk_buffer_to_lower_case_uni _vararg_count ret;
! glk_buffer_to_lower_case_uni(uintarray, arraylen, uint) => uint
Expand Down Expand Up @@ -921,4 +921,4 @@ Constant zcolor_Current = -2;
! garglk_set_reversevideo_stream(str, reverse)
@glk $1103 _vararg_count 0;
return 0;
];
];
4 changes: 1 addition & 3 deletions inform7/extensions/basic_inform/Sections/Glulx and Glk.w
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ The handle hyperlinks rule is defined by Inter as "HANDLE_HYPERLINK_R".
To say link (T - hyperlink tag):
(- MakeTaggedHyperlink({T}); -).

To say link (T - hyperlink tag) of (V - value of kind K):
To say link (T - hyperlink tag) for/of/with (V - value of kind K):
(- MakeTaggedHyperlink({T}, {-by-reference:V}, {-strong-kind:K}); -).

To say end link:
Expand Down Expand Up @@ -240,8 +240,6 @@ Chapter - Suspending and resuming input

A glk window has a text input status.
The text input status property translates into Inter as "text_input_status".
A glk window can be requesting hyperlink input.
The requesting hyperlink input property translates into Inter as "requesting_hyperlink".
A glk window can be requesting mouse input.
The requesting mouse input property translates into Inter as "requesting_mouse".

Expand Down

0 comments on commit 28d9ba5

Please sign in to comment.