User Tools

Site Tools


jill:algo:stand

How player move on floor ?

When key pressed, iInfo1 set to -1 to move left, +1 to move right.
When key pressed iXD set to -1 to move left, +1 to move right if same value to iInfo1. Other set iInfo1 to 0. When key release iXD set to 0.
iInfo indicate the way of player : -1 to left, +1 to right.
iSubState indicate index picture when iXD is not set to 0.

Left

Key pressed iXD iInfo1 iSubState iStateCount Tileset Tile Comment
None 0 0 ? ++ 8 16 Wait animation going
Left 0 -1 ? ++ 8 20 Player face left
Left -1 -1 0 0 8 7 Player run left
Left -1 -1 1 0 8 6 Player run left
Left -1 -1 2 0 8 5 Player run left
Left -1 -1 3 0 8 4 Player run left
Left -1 -1 4 0 8 3 Player run left
Left -1 -1 5 0 8 2 Player run left
Left -1 -1 6 0 8 1 Player run left
Left -1 -1 7 0 8 0 Player run left
None 0 -1 ? ++ 8 20 Player face left
None 0 0 ? ++ 8 16 Wait animation going
Key pressed iXD iInfo1 iSubState iStateCount Tileset Tile Comment
None 0 0 ? ++ 8 16 Wait animation going
Right 0 1 ? ++ 8 21 Player face right
Right 1 1 0 0 8 15 Player run right
Right 1 1 1 0 8 14 Player run right
Right 1 1 2 0 8 13 Player run right
Right 1 1 3 0 8 12 Player run right
Right 1 1 4 0 8 11 Player run right
Right 1 1 5 0 8 10 Player run right
Right 1 1 6 0 8 9 Player run right
Right 1 1 7 0 8 8 Player run right
None 0 1 ? ++ 8 21 Player face right
None 0 0 ? ++ 8 16 Wait animation going

Wait animation

iStateCount iXD iInfo1 Tileset Tile Comment
19 0 1 or -1 8 16 Face return
154 0 1 or -1 8 17 Jill wait
254 0 1 or -1 8 17 Jill wait. Display message in status bar
272 0 1 or -1 8 ? Jill wait animation
301 0 1 or -1 8 16 End of animation, iStateCount set to 0
// check stateCount
stateCount == 19 && xSpeed == 0 -> face return
stateCount == 154 && xSpeed == 0 -> arm
stateCount == 254 && xSpeed == 0 -> msg
stateCount == 272 && xSpeed == 0 -> wait animation
stateCount == 301 -> end

Example

xSpeed = 1 / -1 -> indicate if move picture and if move if key pressed
ySpeed = 0
state = 0
subState = 0, 1, ,2, 3 -> run image
stateCount = 1 -> reinit at each key press
counter = 0
flags = 32768
info1 = 1 / -1 -> indicate face direction
zaphold = 0
pointer = 0

Wait animation and message

Message Animation
Have you seen Jill anywhere? Head up/down
Look, an airplane! Head up
Hey, your shoes are untied. Head down
Are you just gonna sit there? Picture with arm

Jill head up/down

iYD Tileset Tile Comment
3 (>2) 8 61 Jill squat
1 (0< iYD <3) 8 18 Head down
-3 8 19 Head up
jill/algo/stand.txt · Last modified: 2014/03/13 17:33 by emeric