Inform - Support - Source

Back to List

Inventory
Complete

Backward
Forward

Plain
Coloured
Gaudy

This code
in plain text

Browsing verblibm.h

GoSub (lines 1370-1434)

1370  [ GoSub i j k df movewith thedir old_loc;
1371   
1372    if (second ~= 0 && second notin Compass
1373        && ObjectIsUntouchable(second)) return;
1374   
1375    old_loc = location;
1376    movewith=0;
1377    i=parent(player);
1378    if ((location~=thedark && i~=location)
1379        || (location==thedark && i~=real_location))
1380    {   j=location;
1381        if (location==thedark) location=real_location;
1382        k=RunRoutines(i,before); if (k~=3) location=j;
1383        if (k==1)
1384        {   movewith=i; i=parent(i);
1385        }
1386        else
1387        {   if (k==0) L__M(##Go,1,i);
1388            rtrue;
1389        }
1390    }
1391   
1392    thedir=noun.door_dir;
1393    if (ZRegion(thedir)==2) thedir=RunRoutines(noun,door_dir);
1394    
1395    j=i.thedir; k=ZRegion(j);
1396    if (k==3) { print (string) j; new_line; rfalse; }
1397    if (k==2) { j=RunRoutines(i,thedir);
1398                if (j==1) rtrue;
1399              }
1400   
1401    if (k==0 || j==0)
1402    {   if (i.cant_go ~= 0) PrintOrRun(i, cant_go);
1403        rfalse;
1404    }
1405   
1406    if (j has door)
1407    {   if (j has concealed) return L__M(##Go,2);
1408        if (j hasnt open)
1409        {   if (noun==u_obj) return L__M(##Go,3,j);
1410            if (noun==d_obj) return L__M(##Go,4,j);
1411            return L__M(##Go,5,j);
1412        }
1413        k=RunRoutines(j,door_to);
1414        if (k==0) return L__M(##Go,6,j);
1415        if (k==1) rtrue;
1416        j = k;
1417    }
1418    if (movewith==0) move player to j; else move movewith to j;
1419   
1420    location=j; MoveFloatingObjects();
1421    df=OffersLight(j);
1422    if (df~=0) { location=j; real_location=j; lightflag=1; }
1423    else
1424    {   if (old_loc == thedark)
1425        {   DarkToDark();
1426            if (deadflag~=0) rtrue;
1427        }
1428        real_location=j;
1429        location=thedark; lightflag=0;
1430    }
1431    if (AfterRoutines()==1) rtrue;
1432    if (keep_silent==1) rtrue;
1433    LookSub(1);
1434  ];


Last updated 27 February 2004. This web site has not been fully supported since April 2008. Information may be out of date. This page was originally managed by Graham Nelson (graham@gnelson.demon.co.uk) assisted by C Knight.