X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ijackson/git?a=blobdiff_plain;f=hostside%2Fmovpos.c;fp=hostside%2Fmovpos.c;h=75a139d93b73e7cfdac8615ea96ecea8631a5386;hb=fe3d5809b4a1f0b8186d3e3fb76dc36ef6d08718;hp=2d05b3c4b5de711d1c72e42d995c0f76c006cc27;hpb=2e5bec84013e42fa20460d15b1ac65bb2eb2337f;p=trains.git diff --git a/hostside/movpos.c b/hostside/movpos.c index 2d05b3c..75a139d 100644 --- a/hostside/movpos.c +++ b/hostside/movpos.c @@ -131,6 +131,11 @@ static void ouposn_feat(const Segment *move, const MovFeatInfo *feati, feati->pname, posn, m->pname); } +int movposcomb_feature_posn(const MovFeatInfo *feati, MovPosComb comb) { + /* Returns position of individual feature. */ + return (comb / feati->weight) % feati->posns; +} + MovPosComb movposcomb_feature_update(const MovFeatInfo *mfi, MovPosComb startpoint, int featpos) { MovPosComb above_weight= mfi->weight * mfi->posns;