git » fp-git.git » commit ccd58ee

created testing states

author ecalot
2004-10-21 04:21:32 UTC
committer ecalot
2004-10-21 04:21:32 UTC
parent 629fc3872f68d95e3b0e301a1ea0ee603c2fceed

created testing states

FP/src/conf/resources.conf +3 -0
FP/src/conf/states/main.conf +43 -10
FP/src/ker/states.c +1 -1

diff --git a/FP/src/conf/resources.conf b/FP/src/conf/resources.conf
index 2fef432..15d274a 100644
--- a/FP/src/conf/resources.conf
+++ b/FP/src/conf/resources.conf
@@ -53,6 +53,9 @@ ANIM_WALKING         IMG KID     400 534-544
 GUARD_1              IMG PRINCE  GUARD 100 101
 IMG_BACKGROUND       IMG PV      950 951
 
+#our kid
+IMG_ALL_KID          IMG KID     400-619
+
 #common environment
 ANIM_TORCH           IMG PRINCE  150-159
 ANIM_POTION          IMG PRINCE  166-172
diff --git a/FP/src/conf/states/main.conf b/FP/src/conf/states/main.conf
index 4d2137b..a013d14 100644
--- a/FP/src/conf/states/main.conf
+++ b/FP/src/conf/states/main.conf
@@ -28,15 +28,49 @@
 #  DO NOT remove this copyright notice
 #
 
-#normal:
-#	action            Start walking
-#		conditions
-#			KeyShift               pressed
-#			KeyForward             pressed
-#		next
-#			walking
-#		animation
-			
+normal:
+	action            Start walking
+		conditions
+			KeyShift               pressed
+			KeyForward             pressed
+		next
+			normal
+		steps
+			relative 10
+		animation
+			134-145	
+		level
+			1
+	action            Turn
+		conditions
+			KeyBack                pressed
+		next
+			normal
+		steps
+			relative 0
+		animation
+			45-52
+	action            Jump
+		conditions
+			KeyUp                  pressed
+			KeyForward             pressed
+		next
+			normal
+		animation
+			16-27
+			28 p
+			29-38
+		steps
+			relative 20
+	action            If there aren't more actions then the normal state is kept
+		conditions
+			none
+		next
+			normal
+		animation
+			15
+		steps
+			relative 0
 
 
 oldnormal:
@@ -55,7 +89,6 @@ oldnormal:
 			absoluteForward 0
 		level
 			0
-			1
 			2
 			4
 	action                     Start walking on normal floor
diff --git a/FP/src/ker/states.c b/FP/src/ker/states.c
index 18e3c08..a16bcb2 100644
--- a/FP/src/ker/states.c
+++ b/FP/src/ker/states.c
@@ -41,7 +41,7 @@ int evaluateCondition(int condition,tKey* key, tKid* kid, tRoom* room) {
 	int whereInTile=(kid->direction==eLeft)?(kid->location%32):32-(kid->location%32);
 	switch(c.type) {
 	case esKeyUp:
-		return inputGetUp(key->status)?
+		return inputGetUp(key->status)? /* TODO: argument notPressed isn't supported */
 			STATES_CONDRESULT_TRUE:STATES_CONDRESULT_FALSE;
 	case esKeyDown:
 		return inputGetDown(key->status)?