Second Gender

version 1 by Felix Larsson

  • Home page
  • Beginning
  • Previous
  • Next



  • Chapter - Changes in I6 Templates

    Section - Get Secondary GNA of Object
    [This code is adapted from Fredrik Ramsberg's Swedish translation of Inform 6.]

    [GetSecondaryGNAofObject does just the same thing as GetGNAofObject only backwards; it tests what gender an object has in reverse order compared to GetGNAofObject.]
    Include (-
    [ GetGNAOfObject obj case gender;
    if (obj hasnt animate) case = 6;

    if (obj has male) gender = male;
    if (obj has neuter) gender = neuter;
    if (obj has female) gender = female;

    if (gender == 0) {
    ! if (case == 0)
    ! gender = LanguageAnimateGender;
    ! else
    gender = LanguageInanimateGender;
    }

    if (gender == female) case = case + 1;
    if (gender == neuter) case = case + 2;
    if (obj has pluralname) case = case + 3;

    return case;

    ];

    [ GetSecondaryGNAOfObject obj case gender;
    if (obj hasnt animate) case = 6;

    if (obj has female) gender = female;
    if (obj has neuter) gender = neuter;
    if (obj has male) gender = male;

    if (gender == 0) {
    ! if (case == 0)
    ! gender = LanguageAnimateGender;
    ! else
    gender = LanguageInanimateGender;
    }

    if (gender == female) case = case + 1;
    if (gender == neuter) case = case + 2;
    if (obj has pluralname) case = case + 3;

    return case;

    ];
    -) instead of "Gender" in "Parser.i6t".