New NKIs!
[rfk-inform.git] / kitten.inf
index 72d5b9cf09b3f81c8830e755d745d1340cc532f8..d756519300226bdfa63a0146055888fc42ee99cc 100644 (file)
@@ -1,10 +1,10 @@
 ! robotfindskitten
 ! A Zen Simulation
-! Release 7 / Serial number 121119 / Inform v6.32
+! Release 8 / Serial number 220120 / Inform v6.35
 !
 !     [-]       |\_/|        http://www.robotfindskitten.org
 !     (+)=C     |o o|__      Leonard Richardson (C) 1997, 2000
-!     | |       --*--__\     David Griffith (C) 2002  (Inform Edition)
+!     | |       --*--__\     David Griffith (C) 2002-2022  (Inform Edition)
 !     OOO       C_C(____)
 !
 !
@@ -16,6 +16,9 @@
 ! Lots more information on robotfindskitten is available at
 ! http://www.robotfindskitten.org.
 !
+! This rendition of robotfindskitten is distributed under the Artistic
+! License 2.0.  See the file LICENSE in the robotfindskitten repository
+! or https://opensource.org/licenses/Artistic-2.0 for more information.
 !
 ! In this game, you are Robot (#).  Your job is to find Kitten.  This
 ! task is complicated by the existance of various things which are not
 ! not.  Move Robot with the cursor keys, the numeric keypad, or
 ! using the vi/rogue movement keys. The game ends when robotfindskitten.
 ! Alternatively, you may end the game by hitting the Esc or Q keys.
-!
-! Developed with Inform 6.21.4 as installed from NetBSD's pkgsrc tree
-! and Frotz 2.42.
-!
 ! 
 ! Notes:
 !      1) More than half of the code is taken up by non kitten items
@@ -53,8 +52,8 @@ Constant Nonkitten_Default 20;
 !
 Constant Nonkitten_Max 589;
 
-Release 7;
-Serial "121119";       ! Presumed release date
+Release 8;
+Serial "220120";
 
 !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 
@@ -87,7 +86,7 @@ Global kitten_color = 0;
 
 Global last_message = "";      ! Always show the last-encountered message.
 
-Global nonkitten_count = Nonkitten_Default;
+Global nonkitten_count;
 
 Array nonkitten_x --> Nonkitten_Max;
 Array nonkitten_y --> Nonkitten_Max;
@@ -108,10 +107,9 @@ Array already_msg --> Nonkitten_Max;
 Global Real_Release = 0;
 
 [ Main key;
-
        @set_colour Fore_def Back_def;
 
-       if (MESSAGE_NUM < Nonkitten_Max) {
+       if (MESSAGE_NUM < Nonkitten_Default) {
                nonkitten_count = MESSAGE_NUM;
        } else {
                nonkitten_count = Nonkitten_Default;
@@ -119,8 +117,8 @@ Global Real_Release = 0;
 
        Real_Release = (0-->1)&$03ff;
 
-       Width = $22-->0;
-       Height = $24-->0;
+       Width = $21->0;
+       Height = $20->0;
 
        main_menu();    
        while (true) {
@@ -136,7 +134,6 @@ Global Real_Release = 0;
                'I':    print_instructions();
                'A':    print_about();
                'T':    print_thoughts();
-               'P':    print_all_nki();        ! See print_all_nki() below.
                }
                if (key == 'Q' || key == $1b)   ! $1b == ESC
                        break;
@@ -176,7 +173,7 @@ Global Real_Release = 0;
        @set_cursor 8 30;
        print "Leonard Richardson (C) 1997, 2000";
        @set_cursor 9 30;
-       print "David Griffith (C) 2002  (Inform Edition)";
+       print "David Griffith (C) 2002-2022 (Inform Edition)";
        @set_cursor 10 30;
        print "    ", MESSAGE_NUM, " different nonkittens!";
 
@@ -214,7 +211,6 @@ Constant INBUFSIZE 80;
 Array inbuf -> INBUFSIZE;
 
 [ set_nonkitten_count maxnum val;
-
        while (true) {
                @erase_window $ffff;
                @split_window 5;
@@ -246,7 +242,6 @@ Array inbuf -> INBUFSIZE;
 
 
 [ get_number min max init inbufvar ix cx len val;
-
        while (true) {
                inbuf->0 = (INBUFSIZE-3);
                inbuf->1 = 0;
@@ -289,7 +284,6 @@ Array inbuf -> INBUFSIZE;
 
 
 [ print_about;
-
        @erase_window $ffff;
        @split_window TopBar;
        @set_window 1;
@@ -303,10 +297,10 @@ by Leonard Richardson (C) 1997, 2000.^
 Written originally for the Nerth Pork robotfindskitten contest.^
 Reimplemented in Inform by David Griffith (C) 2002.^
 ^
-This code is freely redistributable.  Do with it what you will, but
-don't go about claiming you wrote it.  I, David Griffith, retain
-copyright on this program except for the NKIs imported from the master
-(aka POSIX) port.^
+This code is distributed according to the Artistic License 2.0.  See
+https://opensource.org/licenses/Artistic-2.0 for more information. I,
+David Griffith, retain copyright on this program except for the NKIs
+imported from the master (aka POSIX) port.^
 ^
 Lots more information on robotfindskitten is available at
 http://www.robotfindskitten.org.^
@@ -354,10 +348,17 @@ Challenge release.^
 - Lots more comments in the source code.^
 - Assorted cleanups in the source code.^
 ^
-Release 7 / Serial Number 040523^
-Grammatically correct release.^
-- Grammar corrections from the POSIX port added.^
-- More NKIs added (800 total).^
+Release 7 / Serial Number 130320^
+Modular release.^
+- Synchronized NKIs and removed redundancies with the POSIX port.^
+- NKIs now generated from an external file using nki2inf.pl.^
+- NKIs reduced to 723 because of redundancies and recommended deletions.^
+^
+Release 8 / Serial Number 220120^
+- Twenty Year Anniversary release.^
+- Fixed a problem that crashed some interpreters when robotfindskitten.^
+- Fixed a potential problem of wrongly determining screen size.^
+- Now distributed under the Artistic License 2.0.^
 ^
 ^
 Known Bugs:^
@@ -409,7 +410,6 @@ Alternatively, you may end the game by hitting the Esc or Q keys.^
 
 
 [ print_thoughts;
-
        @erase_window $ffff;
        @split_window TopBar;
        @set_window 1;
@@ -454,7 +454,6 @@ frozen desert beyond. ~FIND KITTEN!~^
 
 
 [ draw_big_robot x y; 
-
        if (x == 0)
                x = 1;
        if (y == 0)
@@ -493,7 +492,6 @@ frozen desert beyond. ~FIND KITTEN!~^
 
 
 [ draw_big_kitten x y;
-
        if (x == 0)
                x = 1;
        if (y == 0)
@@ -528,7 +526,6 @@ frozen desert beyond. ~FIND KITTEN!~^
 
 
 [ draw_big_kitten_psycho x y;
-
        if (x == 0)
                x = 1;
        if (y == 0)
@@ -568,7 +565,6 @@ frozen desert beyond. ~FIND KITTEN!~^
 Global last_right = false;
 
 [ findkitten key i;
-
        @erase_window $ffff;
        @split_window TopBar;
        @set_window 1;
@@ -644,7 +640,6 @@ Global last_right = false;
 
 
 [ animate_kitten key my_last_right i j junk robot_x anim_finished;
-
        switch (key) {
        '8', 'J', 129:  player_y++;
        '2', 'K', 130:  player_y--;
@@ -699,7 +694,8 @@ Global last_right = false;
                if (anim_finished == false) {
                        j = TopBar - 1;
                        @set_cursor 1 Width;
-                       @aread junk 0 10 pause -> junk;
+                       @read_char 1 10 pause -> junk;
+                       @nop;   ! This is for padding.
                } else {
                        style reverse;
                        draw_object(player_x, player_y, '#');
@@ -823,7 +819,7 @@ Global last_right = false;
 
 [ get_random_msg num;
        num = random(MESSAGE_NUM);
-       while (is_duplicate_msg(num) == true) {
+       while (is_duplicate_msg(num) == true || num > MESSAGE_NUM || num < 1) {
                num = random(MESSAGE_NUM);
        }
        return num;
@@ -868,19 +864,3 @@ Global last_right = false;
        }
 ];
 
-
-! This function is mainly of use to members of the robotfindskitten
-! development team.
-!
-! When this function is uncommented and enabled in
-! the menu, this will cause a script file to be written which contains
-! all NKIs properly formatted.
-
-[ print_all_nki num mystring;
-       @output_stream 2; @output_stream -1;
-       for (num = 1: num <= MESSAGE_NUM: num++) {
-               mystring = lookup_msg(num);
-               print (string)lookup_msg(num), "^";
-       }
-       @output_stream -2; @output_stream 1;
-];