Vanilla Netrek Server Development Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[VANILLA-L:1183] Windows Server



I have been working on porting the Vanilla server (2.8 pl 0) to work on the
MS Windows platform and I have run up against some problems that will
require general changes to be made to make it viable.  The modifications
are minor, I think, but here they are.

1) the ERROR macro that is used to print out errors has to be renamed to
NETREKERROR or something else because ERROR is defined in the windows
header files.
2) the near function has to also be renamed because although the new
versions of VC doesn't compile to DOS it does still recognize near as a
keyword.
3) To get the messaging between daemon and ntserv to work correctly I am
using some callback functions.  Unfortunately a call to longjmp from inside
a callback function seems to cause some instability and the way I got
around this was to

A) define a global int in main(for ntserv) named bjump and set to 0. 
bjump is a boolean type variable that is 1 if we need to use longjmp,
player died or something.
B) modify input to contain this code fragment inside of the while(1) loop
    if (bjump)
	{
		bjump = 0;
		longjmp(env, 0);
	}

C) set bjump to true at the end of death() where the longjmp used to be.


None of the changes should have a major impact except for the last one in
which people will now have to wait upto 2 seconds before being able to
reenter the game when they die.  I unfortunately don't have update access
to the source so I can't make the changes.

Darryl

+
++ Vanilla-l Mailing List ++
To unsubscribe: send "unsubscribe vanilla-l" to majordomo@real-time.com
For more information: http://archives.real-time.com