Link all the page references to their correct places.
[ibg.git] / chapters / 05.rst
index 1c0c62396f310105634978c41322d8be6ca65716..c730e1be39966294a4157d6e85987e5ec1f2ec2a 100644 (file)
@@ -304,15 +304,16 @@ fortunately all of that complexity is hidden: there's a standard
 :term:`library routine` to do the job, not one that we've written, but one
 that's provided as part of the Inform system.
 
-You'll remember that, when we first mentioned routines (see "Standalone
-routines" on page 57), we used the example of ``Initialise()`` and said
-that "the routine's name followed by opening and closing parentheses is all
-that it takes to call a routine".  That was true for ``Initialise()``, but
-not quite the whole story.  To move the player character, we've got to
-specify where we want her to go, and we do that by supplying the internal
-ID of the destination room within the opening and closing parentheses.
-That is, instead of just ``PlayerTo()`` we call ``PlayerTo(top_of_tree)``,
-and we describe ``top_of_tree`` as the routine's :term:`argument`.
+You'll remember that, when we first mentioned routines (see
+:ref:`standalone-routines`), we used the example of ``Initialise()`` and
+said that "the routine's name followed by opening and closing parentheses
+is all that it takes to call a routine".  That was true for
+``Initialise()``, but not quite the whole story.  To move the player
+character, we've got to specify where we want her to go, and we do that by
+supplying the internal ID of the destination room within the opening and
+closing parentheses.  That is, instead of just ``PlayerTo()`` we call
+``PlayerTo(top_of_tree)``, and we describe ``top_of_tree`` as the routine's
+:term:`argument`.
 
 Although we've moved the player character to another room, we're still in
 the middle of the intercepted ``Climb`` action.  As previously, we need to
@@ -484,7 +485,8 @@ when you're telling the player "sorry, you can't do that".
 
 The new topics that we've encountered here include these:
 
-.. rubric:: Object properties
+Object properties
+-----------------
 
 Objects can have a ``before`` property -- if there is one, the interpreter
 looks at it *before* performing an action which in some way involves that
@@ -515,11 +517,14 @@ explicitly listed::
     in_to "It's such a lovely day -- much too nice to go inside.",
     cant_go "The only path lies to the east.",
 
-.. rubric:: Routines and arguments
+.. _routines-args:
+
+Routines and arguments
+----------------------
 
 The library includes a number of useful routines, available to perform
-certain common tasks if you require them; there's a list in "Library
-routines" on page 264.  We used the ``PlayerTo`` routine, which moves the
+certain common tasks if you require them; there's a list in
+:ref:`library-routines`.  We used the ``PlayerTo`` routine, which moves the
 player character from her current room to another one -- not necessarily
 adjacent to the first room.
 
@@ -540,7 +545,8 @@ a second argument::
 In this example, the effect of the ``1`` is to prevent the description
 being displayed.
 
-.. rubric:: Statements
+Statements
+----------
 
 We encountered several new statements:
 
@@ -609,11 +615,11 @@ PUT NEST ON BRANCH                 PutOn      nest      branch
 
 The value ``nothing`` is a built-in constant (like ``true`` and ``false``)
 which means, well, there isn't any object to refer to.  There's a list of
-standard library actions in "Group 1 actions" on page 270, "Group 2
-actions" on page 271 and "Group 3 actions" on page 271.
+standard library actions in :ref:`group-1-actions`, :ref:`group-2-actions`
+and :ref:`group-3-actions`.
 
 We've now reached the end of our first game.  In these three chapters we've
 shown you the basic principles on which almost all games are based, and
 introduced you to many of the components that you'll need when creating
 more interesting IF.  We suggest that you take one last look at the source
-code (see "Heidi" story on page 213), and then move on to the next stage.
+code (see :doc:`/appendices/b`), and then move on to the next stage.