author | ecalot
<ecalot> 2004-10-16 04:06:44 UTC |
committer | ecalot
<ecalot> 2004-10-16 04:06:44 UTC |
parent | a6a72592e3162d9703b9d7b73c247b8363eab965 |
FP/src/Makefile | +13 | -11 |
FP/src/include/states.h | +7 | -7 |
diff --git a/FP/src/Makefile b/FP/src/Makefile index 4cddabc..6a09cef 100644 --- a/FP/src/Makefile +++ b/FP/src/Makefile @@ -53,10 +53,10 @@ OBJFILES = main.o kernel.o resources.o dat.o disk.o compress.o \ input.o kid.o EXEFILE = bin/freeprince -GENERATEDHEADERS = include/res_conf_parts.h include/res_conf_files.h\ - include/res_conf_types.h include/res_conf_mods.h\ - include/res_conf_resources.h include/states_static.h\ - include/states_properties.h +GENERATEDRESHEADERS = include/res_conf_parts.h include/res_conf_files.h\ + include/res_conf_types.h include/res_conf_mods.h\ + include/res_conf_resources.h +GENERATEDSTAHEADERS = include/states_conf_static.h include/states_conf_properties.h #Use this to temporary remove an option OPTIONS = $(INCLUDE) $(DEFINES) $(RELEASE) @@ -79,7 +79,7 @@ $(EXEFILE): $(OBJFILES) clean: $(INFO) Erasing temporary object files... - $(REMOVER) $(OBJFILES) $(EXEFILE) $(GENERATEDHEADERS) + $(REMOVER) $(OBJFILES) $(EXEFILE) $(GENERATEDRESHEADERS) $(GENERATEDSTAHEADERS) build: clean $(EXEFILE) @@ -153,7 +153,7 @@ config.o: res/config.c include/resources.h include/res_conf.h $(CC) -c res/config.c $(OPTIONS) #AWK scripts: header generation -include/res_conf.h: $(GENERATEDHEADERS) +include/res_conf.h: $(GENERATEDRESHEADERS) include/res_conf_parts.h: conf/parts.conf conf/awk/res_conf_parts.awk $(INFO) Creating resource id parts configuration file... @@ -175,11 +175,13 @@ include/res_conf_resources.h: conf/resources.conf conf/awk/res_conf_resources.aw $(INFO) Creating resource list configuration file... $(GREP) conf/resources.conf|$(AWK) -f conf/awk/res_conf_resources.awk >include/res_conf_resources.h -include/states_conf_static.h: conf/states.conf conf/awk/states_static.awk +include/states_conf.h: $(GENERATEDSTAHEADERS) + +include/states_conf_static.h: conf/states.conf conf/awk/states_conf_static.awk $(INFO) Creating states list configuration file... - $(GREP) conf/states.conf|sed -e 's/^\t\t\t/- - - /g' -e 's/^\t\t/- - /g' -e 's/^\t/- /g' -e 's/:$$//g'|$(AWK) -f conf/awk/states_static.awk>include/states_static.h + $(GREP) conf/states.conf|sed -e 's/^\t\t\t/- - - /g' -e 's/^\t\t/- - /g' -e 's/^\t/- /g' -e 's/:$$//g'|$(AWK) -f conf/awk/states_conf_static.awk>include/states_conf_static.h -include/states_conf_properties.h: conf/statesproperties.conf conf/awk/states_properties.awk - $(INFO) Creating states properties configuration file... - $(GREP) conf/statesproperties.conf|$(AWK) -f conf/awk/states_properties.awk >include/states_properties.h: +include/states_conf_properties.h: conf/statesproperties.conf conf/awk/states_conf_properties.awk + $(INFO) Creating states condition properties configuration file... + $(GREP) conf/statesproperties.conf|$(AWK) -f conf/awk/states_conf_properties.awk >include/states_conf_properties.h: diff --git a/FP/src/include/states.h b/FP/src/include/states.h index d1ff817..9dbe619 100644 --- a/FP/src/include/states.h +++ b/FP/src/include/states.h @@ -1,19 +1,17 @@ - +/* tsCondition stateGetCondition(tsState state, int number); -/* Returns a condition number "number" or NULL if there are no more conditions */ +* Returns a condition number "number" or NULL if there are no more conditions * tsConditionType stateGetConditionType(tsCondition condition); -/* returns condition type */ +* returns condition type * int stateEvaluateKeyCondition(tKey* keyState); int stateEvaluateMapCondition(tRoom* room,int x, int y); -/* returns 0 if the condition if false for the current position or keys */ + returns 0 if the condition if false for the current position or keys tsAction stateGetAction(tsCondition condition); -/* get the action related to the given condition to be performed in case that it is true */ - - + get the action related to the given condition to be performed in case that it is true */ /* Start here */ @@ -31,6 +29,8 @@ void updateState(tState* current,tKid* kid,tMap* map,tKey* key); /* This functio /* privates */ +#include "states_conf.h" + tsAction createInitialState(tKid* kid,tMap* map); tsAction evaluateState(tState* current,tKid* kid,tMap* map);