author | ecalot
<ecalot> 2004-10-24 03:53:05 UTC |
committer | ecalot
<ecalot> 2004-10-24 03:53:05 UTC |
parent | 3adf7245e561a6d236daf669b6652157b6c4332c |
FP/src/conf/awk/states_conf_static.awk | +35 | -27 |
FP/src/conf/states/main.conf | +2 | -2 |
diff --git a/FP/src/conf/awk/states_conf_static.awk b/FP/src/conf/awk/states_conf_static.awk index 836751b..bcba3d1 100644 --- a/FP/src/conf/awk/states_conf_static.awk +++ b/FP/src/conf/awk/states_conf_static.awk @@ -136,39 +136,47 @@ BEGIN { } #1 tab (action) /^\t[^\t# ].*$/ { - if (first) { - actionArray[currentAction,"description"]=rememberAction - actionArray[currentAction,"isFirstInState"]=currentState - actionArray[currentAction,"animationStart"]=startAnimation - actionArray[currentAction,"animationSize"]=currentAnimation-startAnimation - actionArray[currentAction,"conditionStart"]=conditions - actionArray[currentAction,"nextState"]=nextState - actionArray[currentAction,"moveType"]=moveType - actionArray[currentAction,"moveOffset"]=moveOffset - actionArray[currentAction,"lastComma"]="," - currentAction++ - currentState="" - } else { - first=1 - } + if (first) { + actionArray[currentAction,"description"]=rememberAction + if (currentState) { + actionArray[currentAction,"isFirstInState"]=currentState + } else { + actionArray[currentAction,"isFirstInState"]=priorState + priorState="" + } + actionArray[currentAction,"animationStart"]=startAnimation + actionArray[currentAction,"animationSize"]=currentAnimation-startAnimation + actionArray[currentAction,"conditionStart"]=conditions + actionArray[currentAction,"nextState"]=nextState + actionArray[currentAction,"moveType"]=moveType + actionArray[currentAction,"moveOffset"]=moveOffset + actionArray[currentAction,"lastComma"]="," + currentAction++ + currentState="" + } else { + first=1 + } - startAnimation=currentAnimation - listType="" - conditions=0 - if (tolower($1) != "action") { - printf("Error! \"%s\" should be an action.\n",$0)>"/dev/stderr" - } - $1="" - rememberAction=substr($0,2) + startAnimation=currentAnimation + listType="" + conditions=0 + if (tolower($1) != "action") { + printf("Error! \"%s\" should be an action.\n",$0)>"/dev/stderr" + } + $1="" + rememberAction=substr($0,2) } #no tabs (states) /^[^\t# ].*$/ { listType="" - if ($1 ~ /:$/ ) $1=substr($1,1,length($1)-1) - priorState=currentState #TODO fix that!!! - currentState=tolower($1) - stateList[currentState]=currentAction+1 + if ($1 ~ /:$/) $1=substr($1,1,length($1)-1) + if (currentState) { + priorState=tolower($1) + } else { + currentState=tolower($1) + } + stateList[tolower($1)]=currentAction } END { diff --git a/FP/src/conf/states/main.conf b/FP/src/conf/states/main.conf index 22173ae..b2ae4fe 100644 --- a/FP/src/conf/states/main.conf +++ b/FP/src/conf/states/main.conf @@ -128,7 +128,7 @@ running: #title animations titlesjaffar: - action + action Say hi to the princess conditions none next @@ -152,7 +152,7 @@ oldnormal: KeyForward pressed KeyShift pressed next - normalNearToFall + oldnormalNearToFall animation 0-10 steps