Page 1 of 1

What changes during a 'state change'?

Posted: 10 Oct 2009, 06:12
by bigglesworth
What is a 'state change' and what is happening between states?

I'm using linux and the October 7 or 8, 2009 git client.

Code: Select all

milkchan@pc2-jaunty64:~$ ./tmw/bin/tmw
State change: 0 to 1
State change: 1 to 2
State change: 2 to 3
State change: 3 to 4
State change: 4 to -1
State change: -1 to 1
State change: 1 to 2
State change: 2 to 3
State change: 3 to 4
State change: 4 to -1
State change: -1 to 1
State change: 1 to 2
State change: 2 to 3
State change: 3 to 4
State change: 4 to 5
State change: 5 to 7
State change: 7 to 8
State change: 8 to 9
State change: 9 to 10
State change: 10 to 11
State change: 11 to 12
milkchan@pc2-jaunty64:~$

Re: What changes during a 'state change'?

Posted: 10 Oct 2009, 08:43
by bigglesworth
Image

I'm only a humble player. Under which sub-forum topic do you suggest is best?

Re: What changes during a 'state change'?

Posted: 10 Oct 2009, 10:21
by Ces
Well, Jaxad left in a debug message as usual. :P

Code: Select all

printf("State change: %d to %d\n", oldstate, state);
(http://gitorious.org/tmw/mainline/commi ... 0b899ba414)

Nothing you have to worry about, but if you are curious; what the numbers mean:
http://gitorious.org/tmw/mainline/blobs ... n.h#line86

Re: What changes during a 'state change'?

Posted: 10 Oct 2009, 12:31
by bigglesworth
The output was something new to me and all I needed was a clear point in the right direction.

Thank you, Ces.

Re: What changes during a 'state change'?

Posted: 12 Oct 2009, 03:24
by Jaxad0127
It's rather annoying to have to remember to comment that out before committing and uncomment it before developing again. ;)

Re: What changes during a 'state change'?

Posted: 12 Oct 2009, 15:10
by Crush
Just make it a proper log message and you can leave it in ;)

Re: What changes during a 'state change'?

Posted: 12 Oct 2009, 15:33
by Jaxad0127
Crush wrote:Just make it a proper log message and you can leave it in ;)
Rather annoying to have to reload and check the log every second to make sure states are changing appropriately. ;)

Maybe a debug flag that controls such console output....

Re: What changes during a 'state change'?

Posted: 12 Oct 2009, 15:40
by ElvenProgrammer
jaxad0127 wrote:Maybe a debug flag that controls such console output....
Indeed