opentnl-cvs Mailing List for Torque Network Library (Page 5)
Brought to you by:
mark_frohnmayer,
s_alanet
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(141) |
May
(232) |
Jun
(103) |
Jul
(36) |
Aug
(35) |
Sep
(19) |
Oct
(20) |
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
|
Feb
(26) |
Mar
(2) |
Apr
(84) |
May
(5) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Mark F. <mar...@us...> - 2005-02-23 19:26:03
|
Update of /cvsroot/opentnl/tnl/master In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26138/master Modified Files: main.cpp Log Message: Updated some class derivations to make the class hierarchy prettier in Doxygen Index: main.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/master/main.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** main.cpp 21 Feb 2005 07:48:12 -0000 1.7 --- main.cpp 23 Feb 2005 19:25:36 -0000 1.8 *************** *** 33,37 **** NetInterface *gNetInterface = NULL; ! class MissionGameType : public Object { public: --- 33,37 ---- NetInterface *gNetInterface = NULL; ! class MissionGameType : public TNL::Object { public: *************** *** 599,603 **** #include <stdio.h> ! class StdoutLogConsumer : public LogConsumer { public: --- 599,603 ---- #include <stdio.h> ! class StdoutLogConsumer : public TNL::LogConsumer { public: |
From: Mark F. <mar...@us...> - 2005-02-23 18:53:28
|
Update of /cvsroot/opentnl/tnl/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16754/docs Modified Files: doxygen.html.cfg Log Message: Updated documentation version Index: doxygen.html.cfg =================================================================== RCS file: /cvsroot/opentnl/tnl/docs/doxygen.html.cfg,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** doxygen.html.cfg 29 Apr 2004 06:49:53 -0000 1.4 --- doxygen.html.cfg 23 Feb 2005 18:53:10 -0000 1.5 *************** *** 4,8 **** #--------------------------------------------------------------------------- PROJECT_NAME = TNL ! PROJECT_NUMBER = 1.1.2 OUTPUT_DIRECTORY = ./docs OUTPUT_LANGUAGE = English --- 4,8 ---- #--------------------------------------------------------------------------- PROJECT_NAME = TNL ! PROJECT_NUMBER = 1.5.0 OUTPUT_DIRECTORY = ./docs OUTPUT_LANGUAGE = English |
From: Mark F. <mar...@us...> - 2005-02-22 21:29:51
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28088/zap Modified Files: linuxInput.cpp Log Message: Updated linux master makefile and made Zap build on linux Index: linuxInput.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/linuxInput.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** linuxInput.cpp 28 Sep 2004 19:08:17 -0000 1.2 --- linuxInput.cpp 22 Feb 2005 21:29:41 -0000 1.3 *************** *** 41,45 **** } ! bool ReadJoystick(F32 axes[MaxJoystickAxes], U32 &buttonMask) { return false; --- 41,45 ---- } ! bool ReadJoystick(F32 axes[MaxJoystickAxes], U32 &buttonMask, U32 &hatMask) { return false; |
From: Mark F. <mar...@us...> - 2005-02-22 21:29:50
|
Update of /cvsroot/opentnl/tnl/master In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28088/master Modified Files: Makefile Log Message: Updated linux master makefile and made Zap build on linux Index: Makefile =================================================================== RCS file: /cvsroot/opentnl/tnl/master/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 28 Sep 2004 18:45:23 -0000 1.2 --- Makefile 22 Feb 2005 21:29:39 -0000 1.3 *************** *** 21,27 **** default: $(OBJECTS_MASTER) ! $(CC) -o master $(OBJECTS_MASTER) ../tnl/libtnl.a ../libtomcrypt/libtomcrypt.a -lstdc++ -lm clean: ! rm -f $(OBJECTS_MASTER) master --- 21,27 ---- default: $(OBJECTS_MASTER) ! $(CC) -o ../exe/master $(OBJECTS_MASTER) ../tnl/libtnl.a ../libtomcrypt/libtomcrypt.a -lstdc++ -lm clean: ! rm -f $(OBJECTS_MASTER) ../exe/master |
From: Mark F. <mar...@us...> - 2005-02-22 21:18:42
|
Update of /cvsroot/opentnl/tnl/openal/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24959/openal/linux Modified Files: libopenal.a Log Message: Updated linux openal library Index: libopenal.a =================================================================== RCS file: /cvsroot/opentnl/tnl/openal/linux/libopenal.a,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 Binary files /tmp/cvs8aS3Tt and /tmp/cvsva5eeD differ |
From: Mark F. <mar...@us...> - 2005-02-22 18:05:05
|
Update of /cvsroot/opentnl/tnl/tnl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5310/tnl Modified Files: tnlMethodDispatch.h tnlNetEvent.h tnlRPC.h Log Message: Added updated documentation for the new RPC functionality Updated NetEvent documentation Upped version number Index: tnlRPC.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlRPC.h,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** tnlRPC.h 22 Feb 2005 05:55:45 -0000 1.13 --- tnlRPC.h 22 Feb 2005 18:04:53 -0000 1.14 *************** *** 52,62 **** { public: ! TNL_DECLARE_RPC(rpcPrintHelloWorld, ()); }; ! TNL_IMPLEMENT_RPC(SimpleEventConnection, rpcPrintHelloWorld, (), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirAny, 0) { ! printf("Hello, World!"); } --- 52,64 ---- { public: ! TNL_DECLARE_RPC(rpcPrintString, (StringPtr theString, U32 messageCount)); }; ! TNL_IMPLEMENT_RPC(SimpleEventConnection, rpcPrintString, ! (StringPtr theString, messageCount), (theString, messageCount), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirAny, 0) { ! for(U32 i = 0; i < messageCount; i++) ! printf("%s", theString.getString()); } *************** *** 64,85 **** void somefunction(SimpleEventConnection *connection) { ! connection->rpcPrintHelloWorld(); } @endcode In this example the class SimpleEventConnection is declared to have ! a single RPC method named rpcPrintHelloWorld. The TNL_DECLARE_RPC macro can just be viewed as a different way of declaring a class's member functions, with the name as the first argument and the parenthesized parameter list as the second. Since RPC calls execute on a remote host, they never have ! a return value - athough a second RPC could be declared to pass messages in the other direction. The body of the RPC method is declared using the TNL_IMPLEMENT_RPC macro, ! which has some additional arguments, including which NetClassMask the RPC is valid ! in, what level of data guarantee it uses, the direction it is allowed to be called ! in the connection and a version number. The body of the function, which ! in this case prints the message "Hello, World!" to stdout, is executed on ! the remote host from which the method was originally invoked. As the somefunction code demonstrates, RPC's are invoked in the same way --- 66,87 ---- void somefunction(SimpleEventConnection *connection) { ! connection->rpcPrintString("Hello World!", 5); } @endcode In this example the class SimpleEventConnection is declared to have ! a single RPC method named rpcPrintString. The TNL_DECLARE_RPC macro can just be viewed as a different way of declaring a class's member functions, with the name as the first argument and the parenthesized parameter list as the second. Since RPC calls execute on a remote host, they never have ! a return value - although a second RPC could be declared to pass messages in the other direction. The body of the RPC method is declared using the TNL_IMPLEMENT_RPC macro, ! which has some additional arguments: the named parameter list without the types, ! which NetClassMask the RPC is valid in, what level of data guarantee it uses, ! the direction it is allowed to be called on the connection and a version number. ! The body of the function, which in this case prints the passed message "Hello, World!" 5 times ! to stdout, is executed on the remote host from which the method was originally invoked. As the somefunction code demonstrates, RPC's are invoked in the same way *************** *** 93,97 **** the body of the new RPC. ! RPC methods can take the following types as arguments: - S8, U8 - S16, U16 --- 95,102 ---- the body of the new RPC. ! Internally the RPC macros construct new NetEvent classes and encapsulate the ! function call arguments using the FunctorDecl template classes. By default ! the following types are allowed as parameters to RPC methods: ! - S8, U8 - S16, U16 *************** *** 104,112 **** - RangedU32<> - bool ! - const char * - StringTableEntry ! - ByteBufferRef ! - IPAddressRef ! - Vector<> of all the preceding types except ByteBufferRef and IPAddressRef The Int, SignedInt, Float, SignedFloat and RangedU32 template types use the --- 109,121 ---- - RangedU32<> - bool ! - StringPtr - StringTableEntry ! - ByteBufferPtr ! - IPAddress ! - Vector<> of all the preceding types ! ! New types can be supported by implementing a template override for the ! Types::read and Types::write functions. All arguments to RPCs must be ! passed by value (ie no reference or pointer types). The Int, SignedInt, Float, SignedFloat and RangedU32 template types use the Index: tnlNetEvent.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlNetEvent.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tnlNetEvent.h 20 Apr 2004 04:27:18 -0000 1.1 --- tnlNetEvent.h 22 Feb 2005 18:04:53 -0000 1.2 *************** *** 61,65 **** /// chat messages or file transfers. /// ! /// There are 6 methods that you need to implement if you want to make a /// basic NetEvent subclass, and 2 macros you need to call. /// --- 61,65 ---- /// chat messages or file transfers. /// ! /// There are 3 methods that you need to implement if you want to make a /// basic NetEvent subclass, and 2 macros you need to call. /// *************** *** 74,80 **** /// ~SimpleMessageEvent(); /// ! /// virtual void pack (NetConnection *conn, BitStream *bstream); ! /// virtual void unpack (NetConnection *conn, BitStream *bstream); ! /// virtual void process(NetConnection *conn); /// /// TNL_DECLARE_CLASS(SimpleMessageEvent); --- 74,80 ---- /// ~SimpleMessageEvent(); /// ! /// virtual void pack (EventConnection *conn, BitStream *bstream) ! /// virtual void unpack (EventConnection *conn, BitStream *bstream); ! /// virtual void process(EventConnection *conn); /// /// TNL_DECLARE_CLASS(SimpleMessageEvent); *************** *** 84,90 **** /// @endcode /// ! /// Notice the two macros which we call. The first, TNL_DECLARE_CLASS() is there ! /// to register the static class functions and NetClassRep object that will assign ! /// this class a network ID and allow instances to be construced by ID. /// /// The second, TNL_IMPLEMENT_NETEVENT(), instantiates the NetClassRep and --- 84,89 ---- /// @endcode /// ! /// The first macro called, TNL_DECLARE_CLASS() registers the static class functions and NetClassRep object that will assign ! /// this class a network ID and allow instances to be constructed by ID. /// /// The second, TNL_IMPLEMENT_NETEVENT(), instantiates the NetClassRep and *************** *** 94,100 **** /// older clients to be updated. /// ! /// In the constructor for the event, you must also specify, by way of the constructor ! /// for the base NetEvent class, what guarantee type the event has, and in which direction(s) ! /// it is allowed to travel over the connection. The guarantee type can be one of: /// - <b>NetEvent::GuaranteedOrdered</b>, for guaranteed, ordered events /// - <b>NetEvent::Guaranteed</b>, for guaranteed events --- 93,99 ---- /// older clients to be updated. /// ! /// In the constructor for the event the guarantee type of the event and the direction it will be ! /// allowed to travel over the connection, must be specified by way of the constructor ! /// for the base NetEvent class. The guarantee type can be one of: /// - <b>NetEvent::GuaranteedOrdered</b>, for guaranteed, ordered events /// - <b>NetEvent::Guaranteed</b>, for guaranteed events *************** *** 102,108 **** /// /// It is also a good idea to clearly specify which direction the event is allowed to travel. ! /// If your game has a certain set of message events that are only sent from server to client, ! /// then the network system can do some error checking for you, in order to prevent hacks that may ! /// otherwise crash or compromise your game. The valid event directions are: /// - <b>NetEvent::DirAny</b>, this event can be sent from server to client /// or from client to server --- 101,107 ---- /// /// It is also a good idea to clearly specify which direction the event is allowed to travel. ! /// If the program has a certain set of message events that are only sent from server to client, ! /// then the network system can enforce that error checking automatically, in order to prevent hacks that may ! /// otherwise crash or compromise the program. The valid event directions are: /// - <b>NetEvent::DirAny</b>, this event can be sent from server to client /// or from client to server *************** *** 115,126 **** /// /// @note TNL allows you to call NetConnection::setLastError() on the EventConnection passed to ! /// your NetEvent. You can cause the connection to abort if invalid data is received, specifying /// a reason to the user. /// ! /// Now, the 5 methods which we have above; the constructor and destructor need only do ! /// whatever book-keeping is needed for your specific implementation, in addition to calling ! /// the NetEvent constructor with the direction and type information the networking system ! /// needs to function. In our case, we just need to allocate/deallocate the space for our string, ! /// and specify the event as guaranteed ordered and bidirectional. /// /// @code --- 114,125 ---- /// /// @note TNL allows you to call NetConnection::setLastError() on the EventConnection passed to ! /// the NetEvent. This will cause the connection to abort if invalid data is received, specifying /// a reason to the user. /// ! /// Of the 5 methods declared above; the constructor and destructor need only do ! /// whatever book-keeping is needed for the specific implementation, in addition to calling ! /// the NetEvent constructor with the direction and type information that the networking system ! /// needs to function. In this case, the SimpleMessageEvent simply allocates/deallocates the space for the string, ! /// and specifies the event as guaranteed ordered and bidirectional. /// /// @code *************** *** 141,145 **** /// @endcode /// ! /// Simple as that! Now, onto pack(), unpack(), process(). /// /// <b>pack()</b> is responsible for packing the event over the wire: --- 140,144 ---- /// @endcode /// ! /// The 3 other functions that must be overridden for evern NetEvent are pack(), unpack() and process(). /// /// <b>pack()</b> is responsible for packing the event over the wire: *************** *** 181,186 **** /// @endcode /// ! /// The NetEvent is sent over the wire in a straightforward way (assuming you have a ! /// handle to an EventConnection): /// /// @code --- 180,184 ---- /// @endcode /// ! /// Posting an event to the remote host on a connection is simple: /// /// @code *************** *** 192,196 **** /// Finally, for more advanced applications, notifyPosted() is called when the event is posted /// into the send queue, notifySent() is called whenever the event is ! /// sent over the wire, in NetConnection::eventWritePacket(). notifyDelivered() is called /// when the packet is finally received or (in the case of Unguaranteed packets) dropped. /// --- 190,194 ---- /// Finally, for more advanced applications, notifyPosted() is called when the event is posted /// into the send queue, notifySent() is called whenever the event is ! /// sent over the wire, in EventConnection::eventWritePacket(). notifyDelivered() is called /// when the packet is finally received or (in the case of Unguaranteed packets) dropped. /// Index: tnlMethodDispatch.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlMethodDispatch.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tnlMethodDispatch.h 22 Feb 2005 05:55:45 -0000 1.11 --- tnlMethodDispatch.h 22 Feb 2005 18:04:52 -0000 1.12 *************** *** 55,81 **** --- 55,95 ---- }; + /// Reads a string from a BitStream. extern void read(TNL::BitStream &s, TNL::StringPtr *val); + /// Rrites a string into a BitStream. extern void write(TNL::BitStream &s, TNL::StringPtr &val); + /// Reads a ByteBuffer from a BitStream. extern void read(TNL::BitStream &s, TNL::ByteBufferPtr *val); + /// Writes a ByteBuffer into a BitStream. extern void write(TNL::BitStream &s, TNL::ByteBufferPtr &val); + /// Reads an IP address from a BitStream. extern void read(TNL::BitStream &s, TNL::IPAddress *val); + /// Writes an IP address into a BitStream. extern void write(TNL::BitStream &s, TNL::IPAddress &val); + /// Reads a StringTableEntry from a BitStream. inline void read(TNL::BitStream &s, TNL::StringTableEntry *val) { s.readStringTableEntry(val); } + /// Writes a StringTableEntry into a BitStream. inline void write(TNL::BitStream &s, TNL::StringTableEntry &val) { s.writeStringTableEntry(val); } + + /// Reads a generic object from a BitStream. This can be used for any + /// type supported by BitStream::read. template <typename T> inline void read(TNL::BitStream &s, T *val) { s.read(val); } + /// Writes a generic object into a BitStream. This can be used for any + /// type supported by BitStream::write. template <typename T> inline void write(TNL::BitStream &s, T &val) { s.write(val); } + /// Reads a Vector of objects from a BitStream. template <typename T> inline void read(TNL::BitStream &s, TNL::Vector<T> *val) { *************** *** 85,88 **** --- 99,103 ---- read(s, &((*val)[i])); } + /// Writes a Vector of objects into a BitStream. template <typename T> void write(TNL::BitStream &s, TNL::Vector<T> &val) { *************** *** 91,99 **** write(s, val[i]); } ! template <TNL::U32 BitCount> inline void read(TNL::BitStream &s, TNL::Int<BitCount> *val) { val->value = s.readInt(BitCount); } template <TNL::U32 BitCount> inline void write(TNL::BitStream &s,TNL::Int<BitCount> &val) { --- 106,115 ---- write(s, val[i]); } ! /// Reads a bit-compressed integer from a BitStream. template <TNL::U32 BitCount> inline void read(TNL::BitStream &s, TNL::Int<BitCount> *val) { val->value = s.readInt(BitCount); } + /// Writes a bit-compressed integer into a BitStream. template <TNL::U32 BitCount> inline void write(TNL::BitStream &s,TNL::Int<BitCount> &val) { *************** *** 101,108 **** --- 117,126 ---- } + /// Reads a bit-compressed signed integer from a BitStream. template <TNL::U32 BitCount> inline void read(TNL::BitStream &s, TNL::SignedInt<BitCount> *val) { val->value = s.readSignedInt(BitCount); } + /// Writes a bit-compressed signed integer into a BitStream. template <TNL::U32 BitCount> inline void write(TNL::BitStream &s,TNL::SignedInt<BitCount> &val) { *************** *** 110,137 **** } ! template <TNL::U32 T, TNL::U32 U> inline void read(TNL::BitStream &s, TNL::RangedU32<T,U> *val) { ! val->value = s.readRangedU32(T, U); } ! template <TNL::U32 T, TNL::U32 U> inline void write(TNL::BitStream &s,TNL::RangedU32<T,U> &val) { ! s.writeRangedU32(val.value, T, U); } ! template <TNL::U32 T> inline void read(TNL::BitStream &s, TNL::Float<T> *val) { ! val->value = s.readFloat(T); } ! template <TNL::U32 T> inline void write(TNL::BitStream &s,TNL::Float<T> &val) { ! s.writeFloat(val.value, T); } ! template <TNL::U32 T> inline void read(TNL::BitStream &s, TNL::SignedFloat<T> *val) { ! val->value = s.readSignedFloat(T); } ! template <TNL::U32 T> inline void write(TNL::BitStream &s,TNL::SignedFloat<T> &val) { ! s.writeSignedFloat(val.value, T); } }; --- 128,162 ---- } ! /// Reads a bit-compressed RangedU32 from a BitStream. ! template <TNL::U32 MinValue, TNL::U32 MaxValue> inline void read(TNL::BitStream &s, TNL::RangedU32<MinValue,MaxValue> *val) { ! val->value = s.readRangedU32(MinValue, MaxValue); } ! ! /// Writes a bit-compressed RangedU32 into a BitStream. ! template <TNL::U32 MinValue, TNL::U32 MaxValue> inline void write(TNL::BitStream &s,TNL::RangedU32<MinValue,MaxValue> &val) { ! s.writeRangedU32(val.value, MinValue, MaxValue); } ! /// Reads a bit-compressed SignedFloat (-1 to 1) from a BitStream. ! template <TNL::U32 BitCount> inline void read(TNL::BitStream &s, TNL::Float<BitCount> *val) { ! val->value = s.readFloat(BitCount); } ! /// Writes a bit-compressed SignedFloat (-1 to 1) into a BitStream. ! template <TNL::U32 BitCount> inline void write(TNL::BitStream &s,TNL::Float<BitCount> &val) { ! s.writeFloat(val.value, BitCount); } ! /// Reads a bit-compressed Float (0 to 1) from a BitStream. ! template <TNL::U32 BitCount> inline void read(TNL::BitStream &s, TNL::SignedFloat<BitCount> *val) { ! val->value = s.readSignedFloat(BitCount); } ! /// Writes a bit-compressed Float (0 to 1) into a BitStream. ! template <TNL::U32 BitCount> inline void write(TNL::BitStream &s,TNL::SignedFloat<BitCount> &val) { ! s.writeSignedFloat(val.value, BitCount); } }; *************** *** 139,149 **** --- 164,190 ---- namespace TNL { + /// Base class for FunctorDecl template classes. The Functor objects + /// store the parameters and member function pointer for the invocation + /// of some class member function. Functor is used in TNL by the + /// RPC mechanism, the journaling system and the ThreadQueue to store + /// a function for later transmission and dispatch, either to a remote + /// host, a journal file, or another thread in the process. struct Functor { + /// Construct the Functor. Functor() {} + /// Destruct the Functor. virtual ~Functor() {} + /// Reads this Functor from a BitStream. virtual void read(BitStream &stream) = 0; + /// Writes this Functor to a BitStream. virtual void write(BitStream &stream) = 0; + /// Dispatch the function represented by the Functor. virtual void dispatch(void *t) = 0; }; + + /// FunctorDecl template class. This class is specialized based on the + /// member function call signature of the method it represents. Other + /// specializations hold specific member function pointers and slots + /// for each of the function arguments. template <class T> struct FunctorDecl : public Functor { |
From: Mark F. <mar...@us...> - 2005-02-22 18:05:05
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5310/zap Modified Files: game.h Log Message: Added updated documentation for the new RPC functionality Updated NetEvent documentation Upped version number Index: game.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/game.h,v retrieving revision 1.71 retrieving revision 1.72 diff -C2 -d -r1.71 -r1.72 *** game.h 19 Oct 2004 19:43:58 -0000 1.71 --- game.h 22 Feb 2005 18:04:53 -0000 1.72 *************** *** 236,240 **** extern void endGame(); ! #define ZAP_GAME_STRING "ZAP 1.4.9" }; --- 236,240 ---- extern void endGame(); ! #define ZAP_GAME_STRING "ZAP 1.5.0" }; |
From: Mark F. <mar...@us...> - 2005-02-22 09:49:04
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7023/zap Modified Files: UIGame.cpp footballGame.cpp gameConnection.cpp gameConnection.h gameType.cpp gameType.h huntersGame.cpp huntersGame.h main.cpp masterConnection.cpp masterConnection.h rabbitGame.cpp rabbitGame.h ship.cpp soccerGame.cpp soccerGame.h Log Message: The Zap example now properly compiles and executes using the new RPC funcionality Index: rabbitGame.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/rabbitGame.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** rabbitGame.cpp 4 Aug 2004 18:25:27 -0000 1.10 --- rabbitGame.cpp 22 Feb 2005 09:46:37 -0000 1.11 *************** *** 37,41 **** { ! TNL_IMPLEMENT_NETOBJECT_RPC(RabbitGameType, s2cRabbitMessage, (U32 msgIndex, StringTableEntryRef clientName), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { --- 37,41 ---- { ! TNL_IMPLEMENT_NETOBJECT_RPC(RabbitGameType, s2cRabbitMessage, (U32 msgIndex, StringTableEntry clientName), (msgIndex, clientName), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { Index: main.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/main.cpp,v retrieving revision 1.74 retrieving revision 1.75 diff -C2 -d -r1.74 -r1.75 *** main.cpp 19 Oct 2004 19:43:58 -0000 1.74 --- main.cpp 22 Feb 2005 09:46:34 -0000 1.75 *************** *** 106,110 **** TNL_DECLARE_JOURNAL_ENTRYPOINT(idle, (U32 timeDelta)); TNL_DECLARE_JOURNAL_ENTRYPOINT(display, ()); ! TNL_DECLARE_JOURNAL_ENTRYPOINT(startup, (const Vector<const char *> &theArgv)); }; --- 106,110 ---- TNL_DECLARE_JOURNAL_ENTRYPOINT(idle, (U32 timeDelta)); TNL_DECLARE_JOURNAL_ENTRYPOINT(display, ()); ! TNL_DECLARE_JOURNAL_ENTRYPOINT(startup, (Vector<StringPtr> theArgv)); }; *************** *** 116,120 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, reshape, (S32 newWidth, S32 newHeight)) { UserInterface::windowWidth = newWidth; --- 116,121 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, reshape, ! (S32 newWidth, S32 newHeight), (newWidth, newHeight)) { UserInterface::windowWidth = newWidth; *************** *** 127,131 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, motion, (S32 x, S32 y)) { if(gIsCrazyBot) --- 128,133 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, motion, ! (S32 x, S32 y), (x, y)) { if(gIsCrazyBot) *************** *** 141,145 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, passivemotion, (S32 x, S32 y)) { if(gIsCrazyBot) --- 143,148 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, passivemotion, ! (S32 x, S32 y), (x, y)) { if(gIsCrazyBot) *************** *** 155,159 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, key, (U8 key)) { // check for ALT-ENTER --- 158,162 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, key, (U8 key), (key)) { // check for ALT-ENTER *************** *** 169,173 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, keyup, (U8 key)) { if(UserInterface::current) --- 172,176 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, keyup, (U8 key), (key)) { if(UserInterface::current) *************** *** 180,184 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, mouse, (S32 button, S32 state, S32 x, S32 y)) { static int mouseState[2] = { 0, }; --- 183,188 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, mouse, ! (S32 button, S32 state, S32 x, S32 y), (button, state, x, y)) { static int mouseState[2] = { 0, }; *************** *** 222,226 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, specialkey, (S32 key)) { if(UserInterface::current) --- 226,230 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, specialkey, (S32 key), (key)) { if(UserInterface::current) *************** *** 233,237 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, specialkeyup, (S32 key)) { if(UserInterface::current) --- 237,241 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, specialkeyup, (S32 key), (key)) { if(UserInterface::current) *************** *** 239,243 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, modifierkey, (U32 key)) { if(UserInterface::current) --- 243,247 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, modifierkey, (U32 key), (key)) { if(UserInterface::current) *************** *** 245,249 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, modifierkeyup, (U32 key)) { if(UserInterface::current) --- 249,253 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, modifierkeyup, (U32 key), (key)) { if(UserInterface::current) *************** *** 371,375 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, idle, (U32 integerTime)) { if(UserInterface::current) --- 375,379 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, idle, (U32 integerTime), (integerTime)) { if(UserInterface::current) *************** *** 394,398 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, display, ()) { glFlush(); --- 398,402 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, display, (), ()) { glFlush(); *************** *** 511,515 **** } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, startup, (const Vector<const char *> &argv)) { bool hasClient = true; --- 515,519 ---- } ! TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(ZapJournal, startup, (Vector<StringPtr> argv), (argv)) { bool hasClient = true; *************** *** 671,675 **** logprintf(argv[i]); ! Vector<const char *> theArgv; for(S32 i = 1; i < argc; i++) --- 675,679 ---- logprintf(argv[i]); ! Vector<StringPtr> theArgv; for(S32 i = 1; i < argc; i++) Index: gameType.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/gameType.cpp,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** gameType.cpp 18 Oct 2004 00:09:22 -0000 1.65 --- gameType.cpp 22 Feb 2005 09:46:33 -0000 1.66 *************** *** 400,404 **** } ! TNL_IMPLEMENT_NETOBJECT_RPC(GameType, s2cSetGameOver, (bool gameOver), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { --- 400,404 ---- } ! TNL_IMPLEMENT_NETOBJECT_RPC(GameType, s2cSetGameOver, (bool gameOver), (gameOver), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { *************** *** 768,772 **** } ! GAMETYPE_RPC_S2C(GameType, s2cSetLevelInfo, (StringTableEntryRef levelName, StringTableEntryRef levelDesc)) { mLevelName = levelName; --- 768,772 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cSetLevelInfo, (StringTableEntry levelName, StringTableEntry levelDesc), (levelName, levelDesc)) { mLevelName = levelName; *************** *** 775,784 **** } ! GAMETYPE_RPC_S2C(GameType, s2cSetTimeRemaining, (U32 timeLeft)) { mGameTimer.reset(timeLeft); } ! GAMETYPE_RPC_C2S(GameType, c2sChangeTeams, ()) { GameConnection *source = (GameConnection *) NetObject::getRPCSourceConnection(); --- 775,784 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cSetTimeRemaining, (U32 timeLeft), (timeLeft)) { mGameTimer.reset(timeLeft); } ! GAMETYPE_RPC_C2S(GameType, c2sChangeTeams, (), ()) { GameConnection *source = (GameConnection *) NetObject::getRPCSourceConnection(); *************** *** 805,809 **** } ! GAMETYPE_RPC_S2C(GameType, s2cAddClient, (StringTableEntryRef name, bool isMyClient)) { ClientRef *cref = allocClientRef(); --- 805,809 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cAddClient, (StringTableEntry name, bool isMyClient), (name, isMyClient)) { ClientRef *cref = allocClientRef(); *************** *** 836,840 **** } ! GAMETYPE_RPC_S2C(GameType, s2cRemoveClient, (StringTableEntryRef name)) { for(S32 i = 0; i < mClientList.size(); i++) --- 836,840 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cRemoveClient, (StringTableEntry name), (name)) { for(S32 i = 0; i < mClientList.size(); i++) *************** *** 849,853 **** } ! GAMETYPE_RPC_S2C(GameType, s2cAddTeam, (StringTableEntryRef teamName, F32 r, F32 g, F32 b)) { Team team; --- 849,853 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cAddTeam, (StringTableEntry teamName, F32 r, F32 g, F32 b), (teamName, r, g, b)) { Team team; *************** *** 859,868 **** } ! GAMETYPE_RPC_S2C(GameType, s2cSetTeamScore, (U32 teamIndex, U32 score)) { mTeams[teamIndex].score = score; } ! GAMETYPE_RPC_S2C(GameType, s2cClientJoinedTeam, (StringTableEntryRef name, U32 teamIndex)) { ClientRef *cl = findClientRef(name); --- 859,868 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cSetTeamScore, (U32 teamIndex, U32 score), (teamIndex, score)) { mTeams[teamIndex].score = score; } ! GAMETYPE_RPC_S2C(GameType, s2cClientJoinedTeam, (StringTableEntry name, U32 teamIndex), (name, teamIndex)) { ClientRef *cl = findClientRef(name); *************** *** 905,914 **** } ! GAMETYPE_RPC_S2C(GameType, s2cSyncMessagesComplete, (U32 sequence)) { c2sSyncMessagesComplete(sequence); } ! GAMETYPE_RPC_C2S(GameType, c2sSyncMessagesComplete, (U32 sequence)) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); --- 905,914 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cSyncMessagesComplete, (U32 sequence), (sequence)) { c2sSyncMessagesComplete(sequence); } ! GAMETYPE_RPC_C2S(GameType, c2sSyncMessagesComplete, (U32 sequence), (sequence)) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); *************** *** 919,923 **** } ! GAMETYPE_RPC_S2C(GameType, s2cAddBarriers, (const Vector<F32> &barrier, F32 width)) { if(!barrier.size()) --- 919,923 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cAddBarriers, (Vector<F32> barrier, F32 width), (barrier, width)) { if(!barrier.size()) *************** *** 927,931 **** } ! GAMETYPE_RPC_C2S(GameType, c2sSendChat, (bool global, const char *message)) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); --- 927,931 ---- } ! GAMETYPE_RPC_C2S(GameType, c2sSendChat, (bool global, StringPtr message), (global, message)) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); *************** *** 938,942 **** } ! GAMETYPE_RPC_C2S(GameType, c2sSendChatSTE, (bool global, StringTableEntryRef message)) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); --- 938,942 ---- } ! GAMETYPE_RPC_C2S(GameType, c2sSendChatSTE, (bool global, StringTableEntry message), (global, message)) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); *************** *** 967,978 **** extern Color gTeamChatColor; ! GAMETYPE_RPC_S2C(GameType, s2cDisplayChatMessage, (bool global, StringTableEntryRef clientName, const char *message)) { Color theColor = global ? gGlobalChatColor : gTeamChatColor; ! gGameUserInterface.displayMessage(theColor, "%s: %s", clientName.getString(), message); } ! GAMETYPE_RPC_S2C(GameType, s2cDisplayChatMessageSTE, (bool global, StringTableEntryRef clientName, StringTableEntryRef message)) { Color theColor = global ? gGlobalChatColor : gTeamChatColor; --- 967,978 ---- extern Color gTeamChatColor; ! GAMETYPE_RPC_S2C(GameType, s2cDisplayChatMessage, (bool global, StringTableEntry clientName, StringPtr message), (global, clientName, message)) { Color theColor = global ? gGlobalChatColor : gTeamChatColor; ! gGameUserInterface.displayMessage(theColor, "%s: %s", clientName.getString(), message.getString()); } ! GAMETYPE_RPC_S2C(GameType, s2cDisplayChatMessageSTE, (bool global, StringTableEntry clientName, StringTableEntry message), (global, clientName, message)) { Color theColor = global ? gGlobalChatColor : gTeamChatColor; *************** *** 981,985 **** } ! GAMETYPE_RPC_C2S(GameType, c2sRequestScoreboardUpdates, (bool updates)) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); --- 981,985 ---- } ! GAMETYPE_RPC_C2S(GameType, c2sRequestScoreboardUpdates, (bool updates), (updates)) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); *************** *** 990,994 **** } ! GAMETYPE_RPC_C2S(GameType, c2sAdvanceWeapon, ()) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); --- 990,994 ---- } ! GAMETYPE_RPC_C2S(GameType, c2sAdvanceWeapon, (), ()) { GameConnection *source = (GameConnection *) getRPCSourceConnection(); *************** *** 1020,1026 **** } ! TNL_DECLARE_MEMBER_ENUM(GameType, MaxPing); ! ! GAMETYPE_RPC_S2C(GameType, s2cScoreboardUpdate, (const Vector<RangedU32<0, GameType::MaxPing> > &pingTimes, const Vector<SignedInt<24> > &scores)) { for(S32 i = 0; i < mClientList.size(); i++) --- 1020,1024 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cScoreboardUpdate, (Vector<RangedU32<0, GameType::MaxPing> > pingTimes, Vector<SignedInt<24> > scores), (pingTimes, scores)) { for(S32 i = 0; i < mClientList.size(); i++) *************** *** 1034,1038 **** } ! GAMETYPE_RPC_S2C(GameType, s2cKillMessage, (StringTableEntryRef victim, StringTableEntryRef killer)) { gGameUserInterface.displayMessage(Color(1.0f, 1.0f, 0.8f), --- 1032,1036 ---- } ! GAMETYPE_RPC_S2C(GameType, s2cKillMessage, (StringTableEntry victim, StringTableEntry killer), (victim, killer)) { gGameUserInterface.displayMessage(Color(1.0f, 1.0f, 0.8f), *************** *** 1040,1044 **** } ! TNL_IMPLEMENT_NETOBJECT_RPC(GameType, c2sVoiceChat, (bool echo, ByteBufferRef voiceBuffer), NetClassGroupGameMask, RPCUnguaranteed, RPCToGhostParent, 0) { --- 1038,1042 ---- } ! TNL_IMPLEMENT_NETOBJECT_RPC(GameType, c2sVoiceChat, (bool echo, ByteBufferPtr voiceBuffer), (echo, voiceBuffer), NetClassGroupGameMask, RPCUnguaranteed, RPCToGhostParent, 0) { *************** *** 1059,1063 **** } ! TNL_IMPLEMENT_NETOBJECT_RPC(GameType, s2cVoiceChat, (StringTableEntryRef clientName, ByteBufferRef voiceBuffer), NetClassGroupGameMask, RPCUnguaranteed, RPCToGhost, 0) { --- 1057,1061 ---- } ! TNL_IMPLEMENT_NETOBJECT_RPC(GameType, s2cVoiceChat, (StringTableEntry clientName, ByteBufferPtr voiceBuffer), (clientName, voiceBuffer), NetClassGroupGameMask, RPCUnguaranteed, RPCToGhost, 0) { *************** *** 1065,1069 **** if(cl) { ! ByteBufferPtr playBuffer = cl->decoder->decompressBuffer(voiceBuffer); //logprintf("Decoded buffer size %d", playBuffer->getBufferSize()); --- 1063,1067 ---- if(cl) { ! ByteBufferPtr playBuffer = cl->decoder->decompressBuffer(*(voiceBuffer.getPointer())); //logprintf("Decoded buffer size %d", playBuffer->getBufferSize()); Index: soccerGame.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/soccerGame.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** soccerGame.cpp 5 Oct 2004 00:16:34 -0000 1.20 --- soccerGame.cpp 22 Feb 2005 09:46:39 -0000 1.21 *************** *** 42,46 **** TNL_IMPLEMENT_NETOBJECT(SoccerGameType); ! TNL_IMPLEMENT_NETOBJECT_RPC(SoccerGameType, s2cSoccerScoreMessage, (U32 msgIndex, StringTableEntryRef clientName, U32 teamIndex), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { --- 42,47 ---- TNL_IMPLEMENT_NETOBJECT(SoccerGameType); ! TNL_IMPLEMENT_NETOBJECT_RPC(SoccerGameType, s2cSoccerScoreMessage, ! (U32 msgIndex, StringTableEntry clientName, U32 teamIndex), (msgIndex, clientName, teamIndex), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { Index: UIGame.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/UIGame.cpp,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** UIGame.cpp 19 Oct 2004 22:19:39 -0000 1.50 --- UIGame.cpp 22 Feb 2005 09:46:25 -0000 1.51 *************** *** 828,832 **** GameType *gt = gClientGame->getGameType(); if(gt) ! gt->c2sVoiceChat(OptionsMenuUserInterface::echoVoice, *(sendBuffer.getPointer())); } } --- 828,832 ---- GameType *gt = gClientGame->getGameType(); if(gt) ! gt->c2sVoiceChat(OptionsMenuUserInterface::echoVoice, sendBuffer); } } Index: masterConnection.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/masterConnection.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** masterConnection.cpp 6 Aug 2004 00:02:47 -0000 1.13 --- masterConnection.cpp 22 Feb 2005 09:46:36 -0000 1.14 *************** *** 51,55 **** } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cQueryGameTypesResponse, (U32 queryId, const Vector<StringTableEntry> &gameTypes, const Vector<StringTableEntry> &missionTypes)) { // Ignore old queries... --- 51,55 ---- } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cQueryGameTypesResponse, (U32 queryId, Vector<StringTableEntry> gameTypes, Vector<StringTableEntry> missionTypes)) { // Ignore old queries... *************** *** 77,81 **** } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cQueryServersResponse, (U32 queryId, const Vector<IPAddress> &ipList)) { // Only process results from current query... --- 77,81 ---- } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cQueryServersResponse, (U32 queryId, Vector<IPAddress> ipList)) { // Only process results from current query... *************** *** 97,105 **** c2mRequestArrangedConnection(mCurrentQueryId, remoteAddress.toIPAddress(), getInterface()->getFirstBoundInterfaceAddress().toIPAddress(), ! ByteBuffer((U8 *) "ZAP!", 5)); } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cClientRequestedArrangedConnection, (U32 requestId, const Vector<IPAddress> &possibleAddresses, ! ByteBufferRef connectionParameters)) { if(!mIsGameServer) --- 97,105 ---- c2mRequestArrangedConnection(mCurrentQueryId, remoteAddress.toIPAddress(), getInterface()->getFirstBoundInterfaceAddress().toIPAddress(), ! new ByteBuffer((U8 *) "ZAP!", 5)); } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cClientRequestedArrangedConnection, (U32 requestId, Vector<IPAddress> possibleAddresses, ! ByteBufferPtr connectionParameters)) { if(!mIsGameServer) *************** *** 123,129 **** // Ok, let's do the arranged connection! U8 data[Nonce::NonceSize * 2 + SymmetricCipher::KeySize * 2]; - ByteBuffer b(data, sizeof(data)); Random::read(data, sizeof(data)); IPAddress localAddress = getInterface()->getFirstBoundInterfaceAddress().toIPAddress(); c2mAcceptArrangedConnection(requestId, localAddress, b); --- 123,130 ---- // Ok, let's do the arranged connection! U8 data[Nonce::NonceSize * 2 + SymmetricCipher::KeySize * 2]; Random::read(data, sizeof(data)); IPAddress localAddress = getInterface()->getFirstBoundInterfaceAddress().toIPAddress(); + ByteBufferPtr b = new ByteBuffer(data, sizeof(data)); + b->takeOwnership(); c2mAcceptArrangedConnection(requestId, localAddress, b); *************** *** 133,141 **** logprintf("Accepting arranged connection from %s", Address(fullPossibleAddresses[0]).toString()); ! logprintf(" Generated shared secret data: %s", b.encodeBase64()->getBuffer()); ByteBufferPtr theSharedData = new ByteBuffer(data + 2 * Nonce::NonceSize, sizeof(data) - 2 * Nonce::NonceSize); Nonce nonce(data); Nonce serverNonce(data + Nonce::NonceSize); conn->connectArranged(getInterface(), fullPossibleAddresses, --- 134,143 ---- logprintf("Accepting arranged connection from %s", Address(fullPossibleAddresses[0]).toString()); ! logprintf(" Generated shared secret data: %s", b->encodeBase64()->getBuffer()); ByteBufferPtr theSharedData = new ByteBuffer(data + 2 * Nonce::NonceSize, sizeof(data) - 2 * Nonce::NonceSize); Nonce nonce(data); Nonce serverNonce(data + Nonce::NonceSize); + theSharedData->takeOwnership(); conn->connectArranged(getInterface(), fullPossibleAddresses, *************** *** 143,152 **** } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cArrangedConnectionAccepted, (U32 requestId, const Vector<IPAddress> &possibleAddresses, ByteBufferRef connectionData)) { ! if(!mIsGameServer && requestId == mCurrentQueryId && connectionData.getBufferSize() >= Nonce::NonceSize * 2 + SymmetricCipher::KeySize * 2) { logprintf("Remote host accepted arranged connection."); ! logprintf(" Shared secret data: %s", connectionData.encodeBase64()->getBuffer()); Vector<Address> fullPossibleAddresses; --- 145,154 ---- } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cArrangedConnectionAccepted, (U32 requestId, Vector<IPAddress> possibleAddresses, ByteBufferPtr connectionData)) { ! if(!mIsGameServer && requestId == mCurrentQueryId && connectionData->getBufferSize() >= Nonce::NonceSize * 2 + SymmetricCipher::KeySize * 2) { logprintf("Remote host accepted arranged connection."); ! logprintf(" Shared secret data: %s", connectionData->encodeBase64()->getBuffer()); Vector<Address> fullPossibleAddresses; *************** *** 156,165 **** ByteBufferPtr theSharedData = new ByteBuffer( ! (U8 *) connectionData.getBuffer() + Nonce::NonceSize * 2, ! connectionData.getBufferSize() - Nonce::NonceSize * 2 ); ! Nonce nonce(connectionData.getBuffer()); ! Nonce serverNonce(connectionData.getBuffer() + Nonce::NonceSize); GameConnection *conn = new GameConnection(); --- 158,167 ---- ByteBufferPtr theSharedData = new ByteBuffer( ! (U8 *) connectionData->getBuffer() + Nonce::NonceSize * 2, ! connectionData->getBufferSize() - Nonce::NonceSize * 2 ); ! Nonce nonce(connectionData->getBuffer()); ! Nonce serverNonce(connectionData->getBuffer() + Nonce::NonceSize); GameConnection *conn = new GameConnection(); *************** *** 177,181 **** } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cArrangedConnectionRejected, (U32 requestId, ByteBufferRef rejectData)) { if(!mIsGameServer && requestId == mCurrentQueryId) --- 179,183 ---- } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cArrangedConnectionRejected, (U32 requestId, ByteBufferPtr rejectData)) { if(!mIsGameServer && requestId == mCurrentQueryId) *************** *** 187,191 **** } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cSetMOTD, (const char *motdString)) { gMainMenuUserInterface.setMOTD(motdString); --- 189,193 ---- } ! TNL_IMPLEMENT_RPC_OVERRIDE(MasterServerConnection, m2cSetMOTD, (StringPtr motdString)) { gMainMenuUserInterface.setMOTD(motdString); Index: huntersGame.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/huntersGame.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** huntersGame.h 8 Oct 2004 00:17:47 -0000 1.6 --- huntersGame.h 22 Feb 2005 09:46:34 -0000 1.7 *************** *** 86,90 **** TNL_DECLARE_RPC(s2cAddYardSaleWaypoint, (F32 x, F32 y)); TNL_DECLARE_RPC(s2cSetNexusTimer, (U32 nexusTime, bool canCap)); ! TNL_DECLARE_RPC(s2cHuntersMessage, (U32 msgIndex, StringTableEntryRef clientName, U32 flagCount)); TNL_DECLARE_CLASS(HuntersGameType); }; --- 86,90 ---- TNL_DECLARE_RPC(s2cAddYardSaleWaypoint, (F32 x, F32 y)); TNL_DECLARE_RPC(s2cSetNexusTimer, (U32 nexusTime, bool canCap)); ! TNL_DECLARE_RPC(s2cHuntersMessage, (U32 msgIndex, StringTableEntry clientName, U32 flagCount)); TNL_DECLARE_CLASS(HuntersGameType); }; Index: rabbitGame.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/rabbitGame.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** rabbitGame.h 4 Aug 2004 18:25:27 -0000 1.6 --- rabbitGame.h 22 Feb 2005 09:46:37 -0000 1.7 *************** *** 96,100 **** const char *getInstructionString() { return "Grab the flag and hold it for as long as you can!"; } ! TNL_DECLARE_RPC(s2cRabbitMessage, (U32 msgIndex, StringTableEntryRef clientName)); TNL_DECLARE_CLASS(RabbitGameType); }; --- 96,100 ---- const char *getInstructionString() { return "Grab the flag and hold it for as long as you can!"; } ! TNL_DECLARE_RPC(s2cRabbitMessage, (U32 msgIndex, StringTableEntry clientName)); TNL_DECLARE_CLASS(RabbitGameType); }; Index: gameConnection.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/gameConnection.cpp,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** gameConnection.cpp 6 Aug 2004 00:02:47 -0000 1.25 --- gameConnection.cpp 22 Feb 2005 09:46:33 -0000 1.26 *************** *** 93,97 **** } ! TNL_IMPLEMENT_RPC(GameConnection, c2sAdminPassword, (const char *pass), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { if(gAdminPassword && !strcmp(gAdminPassword, pass)) --- 93,97 ---- } ! TNL_IMPLEMENT_RPC(GameConnection, c2sAdminPassword, (StringPtr pass), (pass), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { if(gAdminPassword && !strcmp(gAdminPassword, pass)) *************** *** 104,108 **** } ! TNL_IMPLEMENT_RPC(GameConnection, c2sAdminPlayerAction, (StringTableEntryRef playerName, U32 actionIndex), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { if(isAdmin()) --- 104,110 ---- } ! TNL_IMPLEMENT_RPC(GameConnection, c2sAdminPlayerAction, ! (StringTableEntry playerName, U32 actionIndex), (playerName, actionIndex), ! NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { if(isAdmin()) *************** *** 157,176 **** } ! TNL_IMPLEMENT_RPC(GameConnection, s2cSetIsAdmin, (), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { setIsAdmin(true); } ! TNL_IMPLEMENT_RPC(GameConnection, c2sRequestCommanderMap, (), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { mInCommanderMap = true; } ! TNL_IMPLEMENT_RPC(GameConnection, c2sReleaseCommanderMap, (), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { mInCommanderMap = false; } ! TNL_IMPLEMENT_RPC(GameConnection, c2sRequestLoadout, (const Vector<U32> &loadout), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { mLoadout = loadout; --- 159,181 ---- } ! TNL_IMPLEMENT_RPC(GameConnection, s2cSetIsAdmin, (), (), ! NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { setIsAdmin(true); } ! TNL_IMPLEMENT_RPC(GameConnection, c2sRequestCommanderMap, (), (), ! NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { mInCommanderMap = true; } ! TNL_IMPLEMENT_RPC(GameConnection, c2sReleaseCommanderMap, (), (), ! NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { mInCommanderMap = false; } ! TNL_IMPLEMENT_RPC(GameConnection, c2sRequestLoadout, (Vector<U32> loadout), (loadout), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { mLoadout = loadout; *************** *** 180,186 **** } - TNL_DECLARE_MEMBER_ENUM(GameConnection, ColorCount); - TNL_DECLARE_ENUM(NumSFXBuffers); - static void displayMessage(U32 colorIndex, U32 sfxEnum, const char *message) { --- 185,188 ---- *************** *** 201,206 **** TNL_IMPLEMENT_RPC(GameConnection, s2cDisplayMessageESI, ! (RangedU32<0, GameConnection::ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntryRef formatString, ! const Vector<StringTableEntry> &e, const Vector<const char *> &s, const Vector<S32> &i), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { --- 203,209 ---- TNL_IMPLEMENT_RPC(GameConnection, s2cDisplayMessageESI, ! (RangedU32<0, GameConnection::ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntry formatString, ! Vector<StringTableEntry> e, Vector<StringPtr> s, Vector<S32> i), ! (color, sfx, formatString, e, s, i), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { *************** *** 221,225 **** case 's': if(index < s.size()) ! pos += dSprintf(outputBuffer + pos, 256 - pos, "%s", s[index]); break; case 'i': --- 224,228 ---- case 's': if(index < s.size()) ! pos += dSprintf(outputBuffer + pos, 256 - pos, "%s", s[index].getString()); break; case 'i': *************** *** 241,246 **** TNL_IMPLEMENT_RPC(GameConnection, s2cDisplayMessageE, ! (RangedU32<0, GameConnection::ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntryRef formatString, ! const Vector<StringTableEntry> &e), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { --- 244,249 ---- TNL_IMPLEMENT_RPC(GameConnection, s2cDisplayMessageE, ! (RangedU32<0, GameConnection::ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntry formatString, ! Vector<StringTableEntry> e), (color, sfx, formatString, e), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { *************** *** 273,277 **** TNL_IMPLEMENT_RPC(GameConnection, s2cDisplayMessage, ! (RangedU32<0, GameConnection::ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntryRef formatString), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { --- 276,281 ---- TNL_IMPLEMENT_RPC(GameConnection, s2cDisplayMessage, ! (RangedU32<0, GameConnection::ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntry formatString), ! (color, sfx, formatString), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { *************** *** 291,295 **** ! TNL_IMPLEMENT_RPC(GameConnection, s2cAddLevel, (StringTableEntryRef name, StringTableEntryRef type), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { --- 295,299 ---- ! TNL_IMPLEMENT_RPC(GameConnection, s2cAddLevel, (StringTableEntry name, StringTableEntry type), (name, type), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) { *************** *** 298,302 **** } ! TNL_IMPLEMENT_RPC(GameConnection, c2sRequestLevelChange, (S32 newLevelIndex), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { if(mIsAdmin) --- 302,306 ---- } ! TNL_IMPLEMENT_RPC(GameConnection, c2sRequestLevelChange, (S32 newLevelIndex), (newLevelIndex), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirClientToServer, 1) { if(mIsAdmin) Index: footballGame.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/footballGame.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** footballGame.cpp 5 Oct 2004 23:41:59 -0000 1.14 --- footballGame.cpp 22 Feb 2005 09:46:32 -0000 1.15 *************** *** 76,80 **** TNL_IMPLEMENT_NETOBJECT(ZoneControlGameType); ! GAMETYPE_RPC_S2C(ZoneControlGameType, s2cSetFlagTeam, (S32 flagTeam)) { mFlagTeam = flagTeam; --- 76,80 ---- TNL_IMPLEMENT_NETOBJECT(ZoneControlGameType); ! GAMETYPE_RPC_S2C(ZoneControlGameType, s2cSetFlagTeam, (S32 flagTeam), (flagTeam)) { mFlagTeam = flagTeam; Index: huntersGame.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/huntersGame.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** huntersGame.cpp 8 Oct 2004 00:17:47 -0000 1.12 --- huntersGame.cpp 22 Feb 2005 09:46:34 -0000 1.13 *************** *** 40,44 **** ! TNL_IMPLEMENT_NETOBJECT_RPC(HuntersGameType, s2cSetNexusTimer, (U32 nexusTime, bool canCap), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { --- 40,45 ---- ! TNL_IMPLEMENT_NETOBJECT_RPC(HuntersGameType, s2cSetNexusTimer, ! (U32 nexusTime, bool canCap), (nexusTime, canCap), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { *************** *** 47,51 **** } ! GAMETYPE_RPC_S2C(HuntersGameType, s2cAddYardSaleWaypoint, (F32 x, F32 y)) { YardSaleWaypoint w; --- 48,52 ---- } ! GAMETYPE_RPC_S2C(HuntersGameType, s2cAddYardSaleWaypoint, (F32 x, F32 y), (x, y)) { YardSaleWaypoint w; *************** *** 55,59 **** } ! TNL_IMPLEMENT_NETOBJECT_RPC(HuntersGameType, s2cHuntersMessage, (U32 msgIndex, StringTableEntryRef clientName, U32 flagCount), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { --- 56,61 ---- } ! TNL_IMPLEMENT_NETOBJECT_RPC(HuntersGameType, s2cHuntersMessage, ! (U32 msgIndex, StringTableEntry clientName, U32 flagCount), (msgIndex, clientName, flagCount), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) { Index: gameType.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/gameType.h,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** gameType.h 18 Oct 2004 00:09:22 -0000 1.39 --- gameType.h 22 Feb 2005 09:46:33 -0000 1.40 *************** *** 187,195 **** void onGhostAvailable(GhostConnection *theConnection); ! TNL_DECLARE_RPC(s2cSetLevelInfo, (StringTableEntryRef levelName, StringTableEntryRef levelDesc)); ! TNL_DECLARE_RPC(s2cAddBarriers, (const Vector<F32> &barrier, F32 width)); ! TNL_DECLARE_RPC(s2cAddTeam, (StringTableEntryRef teamName, F32 r, F32 g, F32 b)); ! TNL_DECLARE_RPC(s2cAddClient, (StringTableEntryRef clientName, bool isMyClient)); ! TNL_DECLARE_RPC(s2cClientJoinedTeam, (StringTableEntryRef clientName, U32 teamIndex)); TNL_DECLARE_RPC(s2cSyncMessagesComplete, (U32 sequence)); --- 187,195 ---- void onGhostAvailable(GhostConnection *theConnection); ! TNL_DECLARE_RPC(s2cSetLevelInfo, (StringTableEntry levelName, StringTableEntry levelDesc)); ! TNL_DECLARE_RPC(s2cAddBarriers, (Vector<F32> barrier, F32 width)); ! TNL_DECLARE_RPC(s2cAddTeam, (StringTableEntry teamName, F32 r, F32 g, F32 b)); ! TNL_DECLARE_RPC(s2cAddClient, (StringTableEntry clientName, bool isMyClient)); ! TNL_DECLARE_RPC(s2cClientJoinedTeam, (StringTableEntry clientName, U32 teamIndex)); TNL_DECLARE_RPC(s2cSyncMessagesComplete, (U32 sequence)); *************** *** 199,203 **** TNL_DECLARE_RPC(s2cSetTimeRemaining, (U32 timeLeft)); ! TNL_DECLARE_RPC(s2cRemoveClient, (StringTableEntryRef clientName)); void setTeamScore(S32 teamIndex, S32 newScore); --- 199,203 ---- TNL_DECLARE_RPC(s2cSetTimeRemaining, (U32 timeLeft)); ! TNL_DECLARE_RPC(s2cRemoveClient, (StringTableEntry clientName)); void setTeamScore(S32 teamIndex, S32 newScore); *************** *** 205,209 **** TNL_DECLARE_RPC(c2sRequestScoreboardUpdates, (bool updates)); ! TNL_DECLARE_RPC(s2cScoreboardUpdate, (const Vector<RangedU32<0, MaxPing> > &pingTimes, const Vector<SignedInt<24> > &scores)); virtual void updateClientScoreboard(ClientRef *theClient); --- 205,209 ---- TNL_DECLARE_RPC(c2sRequestScoreboardUpdates, (bool updates)); ! TNL_DECLARE_RPC(s2cScoreboardUpdate, (Vector<RangedU32<0, MaxPing> > pingTimes, Vector<SignedInt<24> > scores)); virtual void updateClientScoreboard(ClientRef *theClient); *************** *** 215,236 **** void sendChatDisplayEvent(ClientRef *cl, bool global, NetEvent *theEvent); ! TNL_DECLARE_RPC(c2sSendChat, (bool global, const char *message)); ! TNL_DECLARE_RPC(c2sSendChatSTE, (bool global, StringTableEntryRef ste)); ! TNL_DECLARE_RPC(s2cDisplayChatMessage, (bool global, StringTableEntryRef clientName, const char *message)); ! TNL_DECLARE_RPC(s2cDisplayChatMessageSTE, (bool global, StringTableEntryRef clientName, StringTableEntryRef message)); ! TNL_DECLARE_RPC(s2cKillMessage, (StringTableEntryRef victim, StringTableEntryRef killer)); ! TNL_DECLARE_RPC(c2sVoiceChat, (bool echo, ByteBufferRef compressedVoice)); ! TNL_DECLARE_RPC(s2cVoiceChat, (StringTableEntryRef client, ByteBufferRef compressedVoice)); TNL_DECLARE_CLASS(GameType); }; ! #define GAMETYPE_RPC_S2C(className, methodName, args) \ ! TNL_IMPLEMENT_NETOBJECT_RPC(className, methodName, args, NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) ! #define GAMETYPE_RPC_C2S(className, methodName, args) \ ! TNL_IMPLEMENT_NETOBJECT_RPC(className, methodName, args, NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhostParent, 0) --- 215,236 ---- void sendChatDisplayEvent(ClientRef *cl, bool global, NetEvent *theEvent); ! TNL_DECLARE_RPC(c2sSendChat, (bool global, StringPtr message)); ! TNL_DECLARE_RPC(c2sSendChatSTE, (bool global, StringTableEntry ste)); ! TNL_DECLARE_RPC(s2cDisplayChatMessage, (bool global, StringTableEntry clientName, StringPtr message)); ! TNL_DECLARE_RPC(s2cDisplayChatMessageSTE, (bool global, StringTableEntry clientName, StringTableEntry message)); ! TNL_DECLARE_RPC(s2cKillMessage, (StringTableEntry victim, StringTableEntry killer)); ! TNL_DECLARE_RPC(c2sVoiceChat, (bool echo, ByteBufferPtr compressedVoice)); ! TNL_DECLARE_RPC(s2cVoiceChat, (StringTableEntry client, ByteBufferPtr compressedVoice)); TNL_DECLARE_CLASS(GameType); }; ! #define GAMETYPE_RPC_S2C(className, methodName, args, argNames) \ ! TNL_IMPLEMENT_NETOBJECT_RPC(className, methodName, args, argNames, NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhost, 0) ! #define GAMETYPE_RPC_C2S(className, methodName, args, argNames) \ ! TNL_IMPLEMENT_NETOBJECT_RPC(className, methodName, args, argNames, NetClassGroupGameMask, RPCGuaranteedOrdered, RPCToGhostParent, 0) Index: gameConnection.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/gameConnection.h,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** gameConnection.h 2 Aug 2004 18:11:54 -0000 1.19 --- gameConnection.h 22 Feb 2005 09:46:33 -0000 1.20 *************** *** 93,99 **** bool isAdmin() { return mIsAdmin; } void setIsAdmin(bool admin) { mIsAdmin = admin; } ! TNL_DECLARE_RPC(c2sAdminPassword, (const char *pass)); TNL_DECLARE_RPC(s2cSetIsAdmin, ()); ! TNL_DECLARE_RPC(c2sAdminPlayerAction, (StringTableEntryRef playerName, U32 actionIndex)); bool isInCommanderMap() { return mInCommanderMap; } --- 93,99 ---- bool isAdmin() { return mIsAdmin; } void setIsAdmin(bool admin) { mIsAdmin = admin; } ! TNL_DECLARE_RPC(c2sAdminPassword, (StringPtr pass)); TNL_DECLARE_RPC(s2cSetIsAdmin, ()); ! TNL_DECLARE_RPC(c2sAdminPlayerAction, (StringTableEntry playerName, U32 actionIndex)); bool isInCommanderMap() { return mInCommanderMap; } *************** *** 101,112 **** TNL_DECLARE_RPC(c2sReleaseCommanderMap, ()); ! TNL_DECLARE_RPC(c2sRequestLoadout, (const Vector<U32> &loadout)); ! TNL_DECLARE_RPC(s2cDisplayMessageESI, (RangedU32<0, ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntryRef formatString, ! const Vector<StringTableEntry> &e, const Vector<const char *> &s, const Vector<S32> &i)); ! TNL_DECLARE_RPC(s2cDisplayMessageE, (RangedU32<0, ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntryRef formatString, ! const Vector<StringTableEntry> &e)); ! TNL_DECLARE_RPC(s2cDisplayMessage, (RangedU32<0, ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntryRef formatString)); ! TNL_DECLARE_RPC(s2cAddLevel, (StringTableEntryRef name, StringTableEntryRef type)); TNL_DECLARE_RPC(c2sRequestLevelChange, (S32 newLevelIndex)); --- 101,112 ---- TNL_DECLARE_RPC(c2sReleaseCommanderMap, ()); ! TNL_DECLARE_RPC(c2sRequestLoadout, (Vector<U32> loadout)); ! TNL_DECLARE_RPC(s2cDisplayMessageESI, (RangedU32<0, ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntry formatString, ! Vector<StringTableEntry> e, Vector<StringPtr> s, Vector<S32> i)); ! TNL_DECLARE_RPC(s2cDisplayMessageE, (RangedU32<0, ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntry formatString, ! Vector<StringTableEntry> e)); ! TNL_DECLARE_RPC(s2cDisplayMessage, (RangedU32<0, ColorCount> color, RangedU32<0, NumSFXBuffers> sfx, StringTableEntry formatString)); ! TNL_DECLARE_RPC(s2cAddLevel, (StringTableEntry name, StringTableEntry type)); TNL_DECLARE_RPC(c2sRequestLevelChange, (S32 newLevelIndex)); Index: soccerGame.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/soccerGame.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** soccerGame.h 5 Oct 2004 00:16:34 -0000 1.12 --- soccerGame.h 22 Feb 2005 09:46:39 -0000 1.13 *************** *** 63,67 **** virtual const char *getInstructionString() { return "Push the ball into the opposing team's goal."; } ! TNL_DECLARE_RPC(s2cSoccerScoreMessage, (U32 msgIndex, StringTableEntryRef clientName, U32 teamIndex)); TNL_DECLARE_CLASS(SoccerGameType); }; --- 63,67 ---- virtual const char *getInstructionString() { return "Push the ball into the opposing team's goal."; } ! TNL_DECLARE_RPC(s2cSoccerScoreMessage, (U32 msgIndex, StringTableEntry clientName, U32 teamIndex)); TNL_DECLARE_CLASS(SoccerGameType); }; Index: masterConnection.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/masterConnection.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** masterConnection.h 3 Jul 2004 20:01:47 -0000 1.4 --- masterConnection.h 22 Feb 2005 09:46:36 -0000 1.5 *************** *** 55,65 **** void requestArrangedConnection(const Address &remoteAddress); ! TNL_DECLARE_RPC_OVERRIDE(m2cQueryGameTypesResponse, (U32 queryId, const Vector<StringTableEntry> &gameTypes, const Vector<StringTableEntry> &missionTypes)); ! TNL_DECLARE_RPC_OVERRIDE(m2cQueryServersResponse, (U32 queryId, const Vector<IPAddress> &ipList)); ! TNL_DECLARE_RPC_OVERRIDE(m2cClientRequestedArrangedConnection, (U32 requestId, const Vector<IPAddress> &possibleAddresses, ! ByteBufferRef connectionParameters)); ! TNL_DECLARE_RPC_OVERRIDE(m2cArrangedConnectionAccepted, (U32 requestId, const Vector<IPAddress> &possibleAddresses, ByteBufferRef connectionData)); ! TNL_DECLARE_RPC_OVERRIDE(m2cArrangedConnectionRejected, (U32 requestId, ByteBufferRef rejectData)); ! TNL_DECLARE_RPC_OVERRIDE(m2cSetMOTD, (const char *motdString)); void writeConnectRequest(BitStream *bstream); --- 55,65 ---- void requestArrangedConnection(const Address &remoteAddress); ! TNL_DECLARE_RPC_OVERRIDE(m2cQueryGameTypesResponse, (U32 queryId, Vector<StringTableEntry> gameTypes, Vector<StringTableEntry> missionTypes)); ! TNL_DECLARE_RPC_OVERRIDE(m2cQueryServersResponse, (U32 queryId, Vector<IPAddress> ipList)); ! TNL_DECLARE_RPC_OVERRIDE(m2cClientRequestedArrangedConnection, (U32 requestId, Vector<IPAddress> possibleAddresses, ! ByteBufferPtr connectionParameters)); ! TNL_DECLARE_RPC_OVERRIDE(m2cArrangedConnectionAccepted, (U32 requestId, Vector<IPAddress> possibleAddresses, ByteBufferPtr connectionData)); ! TNL_DECLARE_RPC_OVERRIDE(m2cArrangedConnectionRejected, (U32 requestId, ByteBufferPtr rejectData)); ! TNL_DECLARE_RPC_OVERRIDE(m2cSetMOTD, (StringPtr motdString)); void writeConnectRequest(BitStream *bstream); Index: ship.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/ship.cpp,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** ship.cpp 1 Oct 2004 00:21:40 -0000 1.77 --- ship.cpp 22 Feb 2005 09:46:37 -0000 1.78 *************** *** 599,603 **** { stream->writeFlag(getGame()->getCurrentTime() - getCreationTime() < 300); ! connection->packStringTableEntry(stream, mPlayerName); stream->write(mass); stream->writeRangedU32(mTeam + 1, 0, getGame()->getTeamCount()); --- 599,603 ---- { stream->writeFlag(getGame()->getCurrentTime() - getCreationTime() < 300); ! stream->writeStringTableEntry(mPlayerName); stream->write(mass); stream->writeRangedU32(mTeam + 1, 0, getGame()->getTeamCount()); *************** *** 670,674 **** playSpawnEffect = stream->readFlag(); ! mPlayerName = connection->unpackStringTableEntry(stream); stream->read(&mass); mTeam = stream->readRangedU32(0, gClientGame->getTeamCount()) - 1; --- 670,674 ---- playSpawnEffect = stream->readFlag(); ! stream->readStringTableEntry(&mPlayerName); stream->read(&mass); mTeam = stream->readRangedU32(0, gClientGame->getTeamCount()) - 1; |
From: Mark F. <mar...@us...> - 2005-02-22 05:55:55
|
Update of /cvsroot/opentnl/tnl/tnl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19006/tnl Modified Files: tnlJournal.h tnlMethodDispatch.h tnlNetObject.h tnlRPC.h tnlThread.h Log Message: Updated for gcc compile of new template code Index: tnlRPC.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlRPC.h,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** tnlRPC.h 21 Feb 2005 07:48:14 -0000 1.12 --- tnlRPC.h 22 Feb 2005 05:55:45 -0000 1.13 *************** *** 147,151 **** public: \ TNL::FunctorDecl<void (className::*) args > mFunctorDecl;\ ! RPC_##className##_##name() : mFunctorDecl(className::name##_remote), TNL::RPCEvent(guaranteeType, eventDirection) { mFunctor = &mFunctorDecl; } \ TNL_DECLARE_CLASS( RPC_##className##_##name ); \ bool checkClassType(TNL::Object *theObject) { return dynamic_cast<className *>(theObject) != NULL; } }; \ --- 147,151 ---- public: \ TNL::FunctorDecl<void (className::*) args > mFunctorDecl;\ ! RPC_##className##_##name() : TNL::RPCEvent(guaranteeType, eventDirection), mFunctorDecl(&className::name##_remote) { mFunctor = &mFunctorDecl; } \ TNL_DECLARE_CLASS( RPC_##className##_##name ); \ bool checkClassType(TNL::Object *theObject) { return dynamic_cast<className *>(theObject) != NULL; } }; \ Index: tnlJournal.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlJournal.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tnlJournal.h 21 Feb 2005 07:48:14 -0000 1.10 --- tnlJournal.h 22 Feb 2005 05:55:45 -0000 1.11 *************** *** 102,106 **** struct Journal_##className##_##func##_er : public JournalEntryRecord { \ FunctorDecl<void (className::*) args> mFunctorDecl; \ ! Journal_##className##_##func##_er(const char *name) : JournalEntryRecord(name), mFunctorDecl(className::func##_body) { mFunctor = &mFunctorDecl; } \ } gJournal_##className##_##func##_er(#func); \ void className::func args { \ --- 102,106 ---- struct Journal_##className##_##func##_er : public JournalEntryRecord { \ FunctorDecl<void (className::*) args> mFunctorDecl; \ ! Journal_##className##_##func##_er(const char *name) : JournalEntryRecord(name), mFunctorDecl(&className::func##_body) { mFunctor = &mFunctorDecl; } \ } gJournal_##className##_##func##_er(#func); \ void className::func args { \ Index: tnlMethodDispatch.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlMethodDispatch.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** tnlMethodDispatch.h 21 Feb 2005 07:48:14 -0000 1.10 --- tnlMethodDispatch.h 22 Feb 2005 05:55:45 -0000 1.11 *************** *** 80,86 **** template <typename T> inline void read(TNL::BitStream &s, TNL::Vector<T> *val) { ! U32 size = s.readInt(VectorSizeBitSize); val->setSize(size); ! for(S32 i = 0; i < val->size(); i++) read(s, &((*val)[i])); } --- 80,86 ---- template <typename T> inline void read(TNL::BitStream &s, TNL::Vector<T> *val) { ! TNL::U32 size = s.readInt(VectorSizeBitSize); val->setSize(size); ! for(TNL::S32 i = 0; i < val->size(); i++) read(s, &((*val)[i])); } *************** *** 88,92 **** { s.writeInt(val.size(), VectorSizeBitSize); ! for(S32 i = 0; i < val.size(); i++) write(s, val[i]); } --- 88,92 ---- { s.writeInt(val.size(), VectorSizeBitSize); ! for(TNL::S32 i = 0; i < val.size(); i++) write(s, val[i]); } Index: tnlNetObject.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlNetObject.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tnlNetObject.h 21 Feb 2005 07:48:14 -0000 1.11 --- tnlNetObject.h 22 Feb 2005 05:55:45 -0000 1.12 *************** *** 409,413 **** public: \ TNL::FunctorDecl<void (className::*)args> mFunctorDecl;\ ! RPCEV_##className##_##name(TNL::NetObject *theObject = NULL) : mFunctorDecl(className::name##_remote), TNL::NetObjectRPCEvent(theObject, guaranteeType, eventDirection) { mFunctor = &mFunctorDecl; } \ TNL_DECLARE_CLASS( RPCEV_##className##_##name ); \ bool checkClassType(TNL::Object *theObject) { return dynamic_cast<className *>(theObject) != NULL; } }; \ --- 409,413 ---- public: \ TNL::FunctorDecl<void (className::*)args> mFunctorDecl;\ ! RPCEV_##className##_##name(TNL::NetObject *theObject = NULL) : TNL::NetObjectRPCEvent(theObject, guaranteeType, eventDirection), mFunctorDecl(&className::name##_remote) { mFunctor = &mFunctorDecl; } \ TNL_DECLARE_CLASS( RPCEV_##className##_##name ); \ bool checkClassType(TNL::Object *theObject) { return dynamic_cast<className *>(theObject) != NULL; } }; \ Index: tnlThread.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlThread.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tnlThread.h 21 Feb 2005 07:48:14 -0000 1.2 --- tnlThread.h 22 Feb 2005 05:55:45 -0000 1.3 *************** *** 203,207 **** #define TNL_IMPLEMENT_THREADQ_METHOD(className, func, args, argNames) \ void className::func args { \ ! FunctorDecl<void (className::*)args> *theCall = new FunctorDecl<void (className::*)args>(className::func##_body); \ theCall->set argNames; \ postCall(theCall); \ --- 203,207 ---- #define TNL_IMPLEMENT_THREADQ_METHOD(className, func, args, argNames) \ void className::func args { \ ! FunctorDecl<void (className::*)args> *theCall = new FunctorDecl<void (className::*)args>(&className::func##_body); \ theCall->set argNames; \ postCall(theCall); \ |
Update of /cvsroot/opentnl/tnl/tnl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24496/tnl Modified Files: bitStream.cpp connectionStringTable.cpp eventConnection.cpp ghostConnection.cpp journal.cpp netConnection.cpp netObject.cpp rpc.cpp thread.cpp tnlBitStream.h tnlConnectionStringTable.h tnlEventConnection.h tnlJournal.h tnlMethodDispatch.cpp tnlMethodDispatch.h tnlNetConnection.h tnlNetObject.h tnlRPC.h tnlThread.h Added Files: tnlString.h Removed Files: tnl.dsp Log Message: Added template-based RPC marshalling Updated master, masterclient and test projects to use new RPC format Removed VC6 projects due to template incompatibility Index: tnlJournal.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlJournal.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tnlJournal.h 28 Sep 2004 18:45:25 -0000 1.9 --- tnlJournal.h 21 Feb 2005 07:48:14 -0000 1.10 *************** *** 68,72 **** void load(const char *fileName); ! void callEntry(const char *funcName, MarshalledCall *theCall); void processNextJournalEntry(); --- 68,72 ---- void load(const char *fileName); ! void callEntry(const char *funcName, Functor *theCall); void processNextJournalEntry(); *************** *** 85,122 **** U32 mEntryIndex; const char *mFunctionName; - MethodArgList *mMethodArgList; JournalEntryRecord *mNext; static Vector<JournalEntryRecord *> *mEntryVector; ! JournalEntryRecord(const char *functionName, MethodArgList *methodArgList); virtual ~JournalEntryRecord(); - - virtual void getFuncPtr(MethodPointer &m) = 0; }; #ifdef TNL_ENABLE_JOURNALING #define TNL_DECLARE_JOURNAL_ENTRYPOINT(func, args) \ ! virtual void FN_CDECL func args; \ ! virtual void FN_CDECL func##_body args ! #define TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(className, func, args) \ ! TNL::MethodArgList Journal_##className##_##func(#className, #args); \ struct Journal_##className##_##func##_er : public JournalEntryRecord { \ ! void getFuncPtr(MethodPointer &m) { \ ! void (FN_CDECL className::*fptr) args; \ ! fptr = &className::func##_body; \ ! m.v1 = *((U32 *) &fptr); \ ! if(sizeof(fptr) > sizeof(U32)) m.v2 = *(((U32 *) &fptr) + 1); \ ! if(sizeof(fptr) > 2*sizeof(U32)) m.v3 = *(((U32 *) &fptr) + 2); \ ! }; \ ! Journal_##className##_##func##_er(const char *name, MethodArgList *methodArgList) : JournalEntryRecord(name, methodArgList) {} \ ! } gJournal_##className##_##func##_er(#func, &Journal_##className##_##func); \ ! void FN_CDECL className::func args { \ ! SAVE_PARAMS \ ! MarshalledCall call(&Journal_##className##_##func); \ ! call.marshall(); \ ! callEntry(#func, &call); \ } \ ! void FN_CDECL className::func##_body args class JournalToken --- 85,112 ---- U32 mEntryIndex; const char *mFunctionName; JournalEntryRecord *mNext; + Functor *mFunctor; + static Vector<JournalEntryRecord *> *mEntryVector; ! JournalEntryRecord(const char *functionName); virtual ~JournalEntryRecord(); }; #ifdef TNL_ENABLE_JOURNALING #define TNL_DECLARE_JOURNAL_ENTRYPOINT(func, args) \ ! void func args; \ ! void func##_body args ! #define TNL_IMPLEMENT_JOURNAL_ENTRYPOINT(className, func, args, argNames) \ struct Journal_##className##_##func##_er : public JournalEntryRecord { \ ! FunctorDecl<void (className::*) args> mFunctorDecl; \ ! Journal_##className##_##func##_er(const char *name) : JournalEntryRecord(name), mFunctorDecl(className::func##_body) { mFunctor = &mFunctorDecl; } \ ! } gJournal_##className##_##func##_er(#func); \ ! void className::func args { \ ! gJournal_##className##_##func##_er.mFunctorDecl.set argNames; \ ! callEntry(#func, gJournal_##className##_##func##_er.mFunctor); \ } \ ! void className::func##_body args class JournalToken Index: tnlNetConnection.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlNetConnection.h,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** tnlNetConnection.h 14 Feb 2005 06:15:28 -0000 1.9 --- tnlNetConnection.h 21 Feb 2005 07:48:14 -0000 1.10 *************** *** 44,47 **** --- 44,51 ---- #endif + #ifndef _TNL_CONNECTIONSTRINGTABLE_H_ + #include "tnlConnectionStringTable.h" + #endif + namespace TNL { *************** *** 131,137 **** --- 135,147 ---- /// to read and write packet data, as well as handle packet delivery notification. /// + /// Because string data can easily soak up network bandwidth, for + /// efficiency NetConnection implements an optional networked string table. + /// Users can then notify the connection of strings it references often, such as player names, + /// and transmit only a tag, instead of the whole string. + /// class NetConnection : public Object { friend class NetInterface; + friend class ConnectionStringTable; typedef Object Parent; *************** *** 249,256 **** virtual void readPacket(BitStream *bstream); ///< Called to read a subclass's packet data from the packet. ! virtual void prepareWritePacket(); ///< Called to prepare the connection for packet writing. ! /// ! /// Any setup work to determine if there isDataToTransmit() should happen in ! /// this function. prepareWritePacket should _always_ call the Parent:: function. virtual void writePacket(BitStream *bstream, PacketNotify *note); ///< Called to write a subclass's packet data into the packet. --- 259,266 ---- virtual void readPacket(BitStream *bstream); ///< Called to read a subclass's packet data from the packet. ! virtual void prepareWritePacket(); ///< Called to prepare the connection for packet writing. ! /// ! /// Any setup work to determine if there isDataToTransmit() should happen in ! /// this function. prepareWritePacket should _always_ call the Parent:: function. virtual void writePacket(BitStream *bstream, PacketNotify *note); ///< Called to write a subclass's packet data into the packet. *************** *** 343,346 **** --- 353,357 ---- bool rateChanged; ///< True if this packet requested a change of rate. U32 sendTime; ///< Platform::getRealMilliseconds() when packet was sent. + ConnectionStringTable::PacketList stringList; ///< List of string table entries sent in this packet PacketNotify *nextPacket; ///< Pointer to the next packet sent on this connection *************** *** 575,578 **** --- 586,594 ---- /// @} + private: + ConnectionStringTable *mStringTable; ///< Helper for managing translation between global NetStringTable ids to local ids for this connection. + public: + /// Enables string tag translation on this connection. + void setTranslatesStrings(); }; Index: thread.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/thread.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** thread.cpp 14 Feb 2005 06:15:28 -0000 1.1 --- thread.cpp 21 Feb 2005 07:48:14 -0000 1.2 *************** *** 190,194 **** void *ThreadStorage::get() { ! pthread_getspecific(mThreadKey); } --- 190,194 ---- void *ThreadStorage::get() { ! return pthread_getspecific(mThreadKey); } *************** *** 262,275 **** return; } ! ThreadQueueCall c = mThreadCalls.first(); mThreadCalls.pop_front(); unlock(); ! BitStream unmarshallData(c.c->marshalledData.getBuffer(), c.c->marshalledData.getBytePosition()); ! c.c->unmarshall(&unmarshallData); ! c.c->dispatch(this, &c.p); ! delete c.c; } ! void ThreadQueue::postCall(ThreadQueueCall &theCall) { lock(); --- 262,273 ---- return; } ! Functor *c = mThreadCalls.first(); mThreadCalls.pop_front(); unlock(); ! c->dispatch(this); ! delete c; } ! void ThreadQueue::postCall(Functor *theCall) { lock(); *************** *** 292,300 **** for(S32 i = 0; i < mResponseCalls.size(); i++) { ! ThreadQueueCall c = mResponseCalls[i]; ! BitStream unmarshallData(c.c->marshalledData.getBuffer(), c.c->marshalledData.getBytePosition()); ! c.c->unmarshall(&unmarshallData); ! c.c->dispatch(this, &c.p); ! delete c.c; } mResponseCalls.clear(); --- 290,296 ---- for(S32 i = 0; i < mResponseCalls.size(); i++) { ! Functor *c = mResponseCalls[i]; ! c->dispatch(this); ! delete c; } mResponseCalls.clear(); Index: tnlRPC.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlRPC.h,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** tnlRPC.h 28 Sep 2004 18:59:23 -0000 1.11 --- tnlRPC.h 21 Feb 2005 07:48:14 -0000 1.12 *************** *** 138,141 **** --- 138,159 ---- }; + /// Macro used to declare the implementation of an RPC method on an EventConnection subclass. + /// + /// The macro should be used in place of a member function parameter declaration, + /// with the body code (to be executed on the remote side of the RPC) immediately + /// following the TNL_IMPLEMENT_RPC macro call. + #define TNL_IMPLEMENT_RPC(className, name, args, argNames, groupMask, guaranteeType, eventDirection, rpcVersion) \ + class RPC_##className##_##name : public TNL::RPCEvent { \ + public: \ + TNL::FunctorDecl<void (className::*) args > mFunctorDecl;\ + RPC_##className##_##name() : mFunctorDecl(className::name##_remote), TNL::RPCEvent(guaranteeType, eventDirection) { mFunctor = &mFunctorDecl; } \ + TNL_DECLARE_CLASS( RPC_##className##_##name ); \ + bool checkClassType(TNL::Object *theObject) { return dynamic_cast<className *>(theObject) != NULL; } }; \ + TNL_IMPLEMENT_NETEVENT( RPC_##className##_##name, groupMask, rpcVersion ); \ + void className::name args { RPC_##className##_##name *theEvent = new RPC_##className##_##name; theEvent->mFunctorDecl.set argNames ; postNetEvent(theEvent); } \ + TNL::NetEvent * className::name##_construct args { RPC_##className##_##name *theEvent = new RPC_##className##_##name; theEvent->mFunctorDecl.set argNames ; return theEvent; } \ + void className::name##_test args { RPC_##className##_##name *theEvent = new RPC_##className##_##name; theEvent->mFunctorDecl.set argNames ; TNL::PacketStream ps; theEvent->pack(this, &ps); ps.setBytePosition(0); theEvent->unpack(this, &ps); theEvent->process(this); } \ + void className::name##_remote args + /// Base class for RPC events. /// *************** *** 144,180 **** { public: ! MarshalledCall mCall; ///< Call arguments marshalled into a buffer on the sender and represented for the stack on the receiver ! /// Constructor call from within the rpc<i>Something</i> method generated by the TNL_IMPLEMENT_RPC macro. ! RPCEvent(MethodArgList *aMarshaller, RPCGuaranteeType gType, RPCDirection dir); ! ! /// Copies the argument list into the event data. ! void marshallArguments(); ! ! /// Returns the base address of the class member function pointer for the _remote version of the RPC function ! virtual void getFuncPtr(MethodPointer &m) = 0; ! ! /// Writes the marshalled data into the BitStream. void pack(EventConnection *ps, BitStream *bstream); - - /// Unmarshalls the data from the BitStream and stores it in mData. void unpack(EventConnection *ps, BitStream *bstream); - /// Copies the unmarshalled member function arguments onto the stack and invokes the remote method. void process(EventConnection *ps); - - /// Returns true if this RPC is being sent to an object of the appropriate class. - virtual bool checkClassType(Object *theObject) = NULL; }; /// Declares an RPC method within a class declaration. Creates two method prototypes - one for the host side of the RPC call, and one for the receiver, which performs the actual method. ! #define TNL_DECLARE_RPC(name, args) virtual void FN_CDECL name args; void FN_CDECL name##_test args; virtual TNL::NetEvent * FN_CDECL name##_construct args; virtual void FN_CDECL name##_remote args /// Declares an override to an RPC method declared in a parent class. ! #define TNL_DECLARE_RPC_OVERRIDE(name, args) void FN_CDECL name##_remote args /// Macro used to declare the body of an overridden RPC method. #define TNL_IMPLEMENT_RPC_OVERRIDE(className, name, args) \ ! void FN_CDECL className::name##_remote args /// Constructs a NetEvent that will represent the specified RPC invocation. This --- 162,184 ---- { public: ! Functor *mFunctor; /// Constructor call from within the rpc<i>Something</i> method generated by the TNL_IMPLEMENT_RPC macro. ! RPCEvent(RPCGuaranteeType gType, RPCDirection dir); void pack(EventConnection *ps, BitStream *bstream); void unpack(EventConnection *ps, BitStream *bstream); + virtual bool checkClassType(Object *theObject) = 0; void process(EventConnection *ps); }; /// Declares an RPC method within a class declaration. Creates two method prototypes - one for the host side of the RPC call, and one for the receiver, which performs the actual method. ! #define TNL_DECLARE_RPC(name, args) void name args; void name##_test args; virtual TNL::NetEvent * name##_construct args; virtual void name##_remote args /// Declares an override to an RPC method declared in a parent class. ! #define TNL_DECLARE_RPC_OVERRIDE(name, args) void name##_remote args /// Macro used to declare the body of an overridden RPC method. #define TNL_IMPLEMENT_RPC_OVERRIDE(className, name, args) \ ! void className::name##_remote args /// Constructs a NetEvent that will represent the specified RPC invocation. This *************** *** 183,209 **** #define TNL_RPC_CONSTRUCT_NETEVENT(object, rpcMethod, args) (object)->rpcMethod##_construct args - /// Macro used to declare the implementation of an RPC method on an EventConnection subclass. - /// - /// The macro should be used in place of a member function parameter declaration, - /// with the body code (to be executed on the remote side of the RPC) immediately - /// following the TNL_IMPLEMENT_RPC macro call. - #define TNL_IMPLEMENT_RPC(className, name, args, groupMask, guaranteeType, eventDirection, rpcVersion) \ - extern TNL::MethodArgList RPC##className##name; \ - class RPC_##className##_##name : public TNL::RPCEvent { \ - public: \ - void (FN_CDECL className::*mFuncPtr) args; \ - RPC_##className##_##name() : TNL::RPCEvent(&RPC##className##name, guaranteeType, eventDirection) \ - { mFuncPtr = &className::name##_remote; } \ - TNL_DECLARE_CLASS( RPC_##className##_##name ); \ - bool checkClassType(TNL::Object *theObject) { return dynamic_cast<className *>(theObject) != NULL; } \ - void getFuncPtr(TNL::MethodPointer &m) { m.v1=*((TNL::U32 *) &mFuncPtr); \ - if(sizeof(mFuncPtr) > sizeof(TNL::U32)) m.v2 = *(((TNL::U32 *) &mFuncPtr) + 1); \ - if(sizeof(mFuncPtr) > 2*sizeof(TNL::U32)) m.v3 = *(((TNL::U32 *) &mFuncPtr) + 2); } }; \ - TNL_IMPLEMENT_NETEVENT( RPC_##className##_##name, groupMask, rpcVersion ); \ - TNL::MethodArgList RPC##className##name (#className, #args); \ - void FN_CDECL className::name args { SAVE_PARAMS RPC_##className##_##name *theEvent = new RPC_##className##_##name; theEvent->marshallArguments(); postNetEvent(theEvent); } \ - TNL::NetEvent * FN_CDECL className::name##_construct args { SAVE_PARAMS RPC_##className##_##name *theEvent = new RPC_##className##_##name; theEvent->marshallArguments(); return theEvent; } \ - void FN_CDECL className::name##_test args { SAVE_PARAMS RPC_##className##_##name *ev = new RPC_##className##_##name; TNL::PacketStream ps; ev->marshallArguments(); ev->pack(this, &ps); ps.setBytePosition(0); ev->unpack(this, &ps); ev->process(this); } \ - void FN_CDECL className::name##_remote args }; --- 187,190 ---- --- tnl.dsp DELETED --- Index: tnlBitStream.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlBitStream.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tnlBitStream.h 11 Jun 2004 19:16:35 -0000 1.6 --- tnlBitStream.h 21 Feb 2005 07:48:14 -0000 1.7 *************** *** 32,35 **** --- 32,39 ---- #endif + #ifndef _TNL_CONNECTIONSTRINGTABLE_H_ + #include "tnlConnectionStringTable.h" + #endif + namespace TNL { *************** *** 69,73 **** U32 maxReadBitNum; ///< Last valid read bit position. U32 maxWriteBitNum; ///< Last valid write bit position. ! /// String buffer holds the last string written into the stream for substring compression. char mStringBuffer[256]; --- 73,77 ---- U32 maxReadBitNum; ///< Last valid read bit position. U32 maxWriteBitNum; ///< Last valid write bit position. ! ConnectionStringTable *mStringTable; ///< String table used to compress StringTableEntries over the network. /// String buffer holds the last string written into the stream for substring compression. char mStringBuffer[256]; *************** *** 106,109 **** --- 110,116 ---- void clearStringBuffer() { mStringBuffer[0] = 0; } + /// sets the ConnectionStringTable for compressing string table entries across the network + void setStringTable(ConnectionStringTable *table) { mStringTable = table; } + /// clears the error state from an attempted read or write overrun void clearError() { error = false; } *************** *** 236,239 **** --- 243,252 ---- void readString(char stringBuf[256]); + /// Writes a string table entry into the stream + void writeStringTableEntry(const StringTableEntry &ste); + + /// Reads a string table entry from the stream + void readStringTableEntry(StringTableEntry *ste); + /// Writes byte data into the stream. bool write(const U32 in_numBytes, const void* in_pBuffer); *************** *** 276,294 **** //------------------------------------------------------------------------------ - - /// PacketStream provides a network interface to the BitStream for easy construction of data packets. - class PacketStream : public BitStream - { - U8 buffer[MaxPacketDataSize]; ///< internal buffer for packet data, sized to the maximum UDP packet size. - public: - /// Constructor assigns the internal buffer to the BitStream. - PacketStream(U32 targetPacketSize = MaxPacketDataSize) : BitStream(buffer, targetPacketSize, MaxPacketDataSize) {} - /// Sends this packet to the specified address through the specified socket. - NetError sendto(Socket &outgoingSocket, const Address &theAddress); - /// Reads a packet into the stream from the specified socket. - NetError recvfrom(Socket &incomingSocket, Address *recvAddress); - }; - - //------------------------------------------------------------------------------ //------------------------------------------------------------------------------ --- 289,292 ---- *************** *** 389,392 **** --- 387,405 ---- } + /// PacketStream provides a network interface to the BitStream for easy construction of data packets. + class PacketStream : public BitStream + { + typedef BitStream Parent; + U8 buffer[MaxPacketDataSize]; ///< internal buffer for packet data, sized to the maximum UDP packet size. + public: + /// Constructor assigns the internal buffer to the BitStream. + PacketStream(U32 targetPacketSize = MaxPacketDataSize) : BitStream(buffer, targetPacketSize, MaxPacketDataSize) {} + /// Sends this packet to the specified address through the specified socket. + NetError sendto(Socket &outgoingSocket, const Address &theAddress); + /// Reads a packet into the stream from the specified socket. + NetError recvfrom(Socket &incomingSocket, Address *recvAddress); + }; + + }; #endif //_TNL_BITSTREAM_H_ Index: netObject.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/netObject.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** netObject.cpp 24 Jun 2004 01:12:09 -0000 1.4 --- netObject.cpp 21 Feb 2005 07:48:14 -0000 1.5 *************** *** 261,267 **** NetObject::mRPCSourceConnection = (GhostConnection *) ps; ! MethodPointer p; ! getFuncPtr(p); ! mCall.dispatch(thisPointer, &p); NetObject::mRPCSourceConnection = NULL; } --- 261,266 ---- NetObject::mRPCSourceConnection = (GhostConnection *) ps; ! mFunctor->dispatch(thisPointer); ! NetObject::mRPCSourceConnection = NULL; } Index: rpc.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/rpc.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** rpc.cpp 19 May 2004 20:47:46 -0000 1.4 --- rpc.cpp 21 Feb 2005 07:48:14 -0000 1.5 *************** *** 30,74 **** #include "tnlNetEvent.h" #include "tnlRPC.h" - #include "tnlNetStringTable.h" #include "tnlEventConnection.h" namespace TNL { ! RPCEvent::RPCEvent(MethodArgList *aMarshaller, RPCGuaranteeType gType, RPCDirection dir) : ! NetEvent((NetEvent::GuaranteeType) gType, (NetEvent::EventDirection) dir), ! mCall(aMarshaller) ! { ! } ! ! void RPCEvent::marshallArguments() { - mCall.marshall(); } void RPCEvent::pack(EventConnection *ps, BitStream *bstream) { ! bstream->clearStringBuffer(); ! bstream->writeBits(mCall.marshalledData.getBitPosition(), mCall.marshalledData.getBuffer()); ! for(S32 i = 0; i < mCall.mSTEs.size(); i++) ! ps->packStringTableEntry(bstream, mCall.mSTEs[i]); } void RPCEvent::unpack(EventConnection *ps, BitStream *bstream) { ! bstream->clearStringBuffer(); ! mCall.unmarshall(bstream); ! bstream->clearStringBuffer(); ! for(S32 i = 0; i < mCall.mSTEs.size(); i++) ! mCall.mSTEs[i] = ps->unpackStringTableEntry(bstream); } void RPCEvent::process(EventConnection *ps) { ! if(!checkClassType(ps)) ! return; ! ! MethodPointer p; ! getFuncPtr(p); ! mCall.dispatch(ps, &p); } --- 30,56 ---- #include "tnlNetEvent.h" #include "tnlRPC.h" #include "tnlEventConnection.h" namespace TNL { ! RPCEvent::RPCEvent(RPCGuaranteeType gType, RPCDirection dir) : ! NetEvent((NetEvent::GuaranteeType) gType, (NetEvent::EventDirection) dir) { } void RPCEvent::pack(EventConnection *ps, BitStream *bstream) { ! mFunctor->write(*bstream); } void RPCEvent::unpack(EventConnection *ps, BitStream *bstream) { ! mFunctor->read(*bstream); } void RPCEvent::process(EventConnection *ps) { ! if(checkClassType(ps)) ! mFunctor->dispatch(ps); } Index: ghostConnection.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/ghostConnection.cpp,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ghostConnection.cpp 24 Jun 2004 01:12:09 -0000 1.13 --- ghostConnection.cpp 21 Feb 2005 07:48:14 -0000 1.14 *************** *** 696,701 **** } ! TNL_DECLARE_MEMBER_ENUM(GhostConnection, GhostCountBitSize); ! TNL_IMPLEMENT_RPC(GhostConnection, rpcStartGhosting, (U32 sequence), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirAny, 0) { --- 696,701 ---- } ! TNL_IMPLEMENT_RPC(GhostConnection, rpcStartGhosting, ! (U32 sequence), (sequence), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirAny, 0) { *************** *** 711,715 **** } ! TNL_IMPLEMENT_RPC(GhostConnection, rpcReadyForNormalGhosts, (U32 sequence), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirAny, 0) { --- 711,716 ---- } ! TNL_IMPLEMENT_RPC(GhostConnection, rpcReadyForNormalGhosts, ! (U32 sequence), (sequence), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirAny, 0) { *************** *** 725,729 **** } ! TNL_IMPLEMENT_RPC(GhostConnection, rpcEndGhosting, (), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirAny, 0) { --- 726,730 ---- } ! TNL_IMPLEMENT_RPC(GhostConnection, rpcEndGhosting, (), (), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirAny, 0) { Index: tnlConnectionStringTable.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlConnectionStringTable.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tnlConnectionStringTable.h 23 Apr 2004 01:49:46 -0000 1.2 --- tnlConnectionStringTable.h 21 Feb 2005 07:48:14 -0000 1.3 *************** *** 34,39 **** namespace TNL { ! class EventConnection; ! class EventPacketNotify; /// ConnectionStringTable is a helper class to EventConnection for reducing duplicated string data sends --- 34,39 ---- namespace TNL { ! class NetConnection; ! class BitStream; /// ConnectionStringTable is a helper class to EventConnection for reducing duplicated string data sends *************** *** 81,85 **** Entry mLRUHead, mLRUTail; ! EventConnection *mParent; /// Pushes an entry to the back of the LRU list. --- 81,85 ---- Entry mLRUHead, mLRUTail; ! NetConnection *mParent; /// Pushes an entry to the back of the LRU list. *************** *** 94,100 **** } public: ! ConnectionStringTable(EventConnection *parent); ! void writeStringTableEntry(BitStream *stream, StringTableEntryRef string, PacketList *note); StringTableEntry readStringTableEntry(BitStream *stream); --- 94,100 ---- } public: ! ConnectionStringTable(NetConnection *parent); ! void writeStringTableEntry(BitStream *stream, StringTableEntryRef string); StringTableEntry readStringTableEntry(BitStream *stream); --- NEW FILE: tnlString.h --- //----------------------------------------------------------------------------------- // // Torque Network Library // Copyright (C) 2004 GarageGames.com, Inc. // For more information see http://www.opentnl.org // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // For use in products that are not compatible with the terms of the GNU // General Public License, alternative licensing options are available // from GarageGames.com. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // //------------------------------------------------------------------------------------ #ifndef _TNL_STRING_H_ #define _TNL_STRING_H_ namespace TNL { struct StringData { U32 mRefCount; char mStringData[1]; }; class StringPtr { StringData *mString; void alloc(const char *string) { mString = (StringData *) malloc(sizeof(StringData) + strlen(string)); strcpy(mString->mStringData, string); mString->mRefCount = 1; } void decRef() { if(mString && !--mString->mRefCount) free(mString); } public: StringPtr() { mString = NULL; } StringPtr(const char *string) { alloc(string); } StringPtr(const StringPtr &string) { mString = string.mString; if(mString) mString->mRefCount++; } ~StringPtr() { decRef(); } StringPtr &operator=(const StringPtr &ref) { decRef(); mString = ref.mString; mString->mRefCount++; return *this; } StringPtr &operator=(const char *string) { decRef(); alloc(string); return *this; } operator const char *() const { if(mString) return mString->mStringData; else return ""; } const char *getString() const { if(mString) return mString->mStringData; else return ""; } }; }; #endif Index: eventConnection.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/eventConnection.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** eventConnection.cpp 14 Feb 2005 06:15:28 -0000 1.6 --- eventConnection.cpp 21 Feb 2005 07:48:13 -0000 1.7 *************** *** 49,53 **** mNextRecvEventSeq = FirstValidSendEventSeq; mLastAckedEventSeq = -1; - mStringTable = NULL; mEventClassCount = 0; mEventClassBitSize = 0; --- 49,52 ---- *************** *** 81,85 **** mEventNoteChunker.free(temp); } - delete mStringTable; } --- 80,83 ---- *************** *** 136,145 **** } - void EventConnection::setTranslatesStrings() - { - if(!mStringTable) - mStringTable = new ConnectionStringTable(this); - } - void EventConnection::processEvent(NetEvent *theEvent) { --- 134,137 ---- *************** *** 153,159 **** EventPacketNotify *notify = static_cast<EventPacketNotify *>(pnotify); - if(mStringTable) - mStringTable->packetDropped(¬ify->stringList); - EventNote *walk = notify->eventList; EventNote **insertList = &mSendEventQueueHead; --- 145,148 ---- *************** *** 207,213 **** EventPacketNotify *notify = static_cast<EventPacketNotify *>(pnotify); - if(mStringTable) - mStringTable->packetReceived(¬ify->stringList); - EventNote *walk = notify->eventList; EventNote **noteList = &mNotifyEventList; --- 196,199 ---- *************** *** 501,524 **** } - void EventConnection::packStringTableEntry(BitStream *stream, StringTableEntryRef h) - { - if(!mStringTable) - stream->writeString(h.getString()); - else - mStringTable->writeStringTableEntry(stream, h, &((EventPacketNotify *) getCurrentWritePacketNotify())->stringList); - } - - StringTableEntry EventConnection::unpackStringTableEntry(BitStream *stream) - { - if(!mStringTable) - { - char buf[256]; - stream->readString(buf); - return StringTableEntry(buf); - } - else - return mStringTable->readStringTableEntry(stream); - } - bool EventConnection::isDataToTransmit() { --- 487,490 ---- Index: tnlMethodDispatch.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlMethodDispatch.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** tnlMethodDispatch.cpp 14 Feb 2005 06:15:28 -0000 1.17 --- tnlMethodDispatch.cpp 21 Feb 2005 07:48:14 -0000 1.18 *************** *** 28,880 **** #include "tnlNetStringTable.h" #include "tnlThread.h" - namespace TNL - { - - struct TypeInfo - { - const char *name; - U32 size; - bool allowedAsArg; - bool allowedInVector; - }; - - enum ArgTypeId { - TypeS8, - TypeU8, - TypeS16, - TypeU16, - TypeS32, - TypeU32, - TypeF32, - TypeF64, - TypeSignedInt, - TypeInt, - TypeSignedFloat, - TypeFloat, - TypeString, - TypeRangedU32, - TypeBool, - TypeStringTableEntryRef, - TypeStringTableEntry, - TypeByteBufferPtr, - TypeIPAddressRef, - TypeIPAddress, - NumTypes, - }; ! TypeInfo gTypes[] = { ! ! { "S8", sizeof(S8), true, true }, ! { "U8", sizeof(U8), true, true }, ! { "S16", sizeof(S16), true, true }, ! { "U16", sizeof(U16), true, true }, ! { "S32", sizeof(S32), true, true }, ! { "U32", sizeof(U32), true, true }, ! { "F32", sizeof(F32), true, true }, ! { "F64", sizeof(F64), false, true }, ! { "SignedInt<", sizeof(SignedInt<32>), true, true }, ! { "Int<", sizeof(Int<32>), true, true }, ! { "SignedFloat<", sizeof(SignedFloat<32>), true, true }, ! { "Float<", sizeof(Float<32>), true, true }, ! { "const char *", sizeof(const char *), true, true }, ! { "RangedU32<", sizeof(RangedU32<0,U32_MAX>), true, true }, ! { "bool", sizeof(bool), true, true }, ! { "StringTableEntryRef", sizeof(StringTableEntry *), true, false }, ! { "StringTableEntry", sizeof(StringTableEntry), false, true }, ! { "ByteBufferRef", sizeof(ByteBuffer *), true, false }, ! { "IPAddressRef", sizeof(IPAddress *), true, false }, ! { "IPAddress", sizeof(IPAddress), false, true }, ! { 0, 0, 0, 0 }, ! }; ! ! MethodEnum *MethodEnum::mLinkedList = NULL; ! ! U32 MethodArgList::getValue(const char *buffer) { ! while(*buffer == ' ') ! buffer++; ! if(buffer[0] >= '0' && buffer[0] <= '9') ! return atoi(buffer); ! else ! { ! U32 len = 0; ! while((buffer[len] >= 'a' && buffer[len] <= 'z') || ! (buffer[len] >= 'A' && buffer[len] <= 'Z') || ! (buffer[len] == ':' || buffer[len] == '_')) ! len++; ! for(MethodEnum *walk = MethodEnum::mLinkedList; walk; walk = walk->mNext) ! { ! if(!strncmp(buffer, walk->mSymbol, len) && walk->mSymbol[len] == 0) ! return walk->mValue; ! } ! } ! TNLAssert(0, "Undeclared method enumeration! Use TNL_DECLARE_ENUM."); ! return 0; ! } ! ! typedef StringTableEntry &StringTableEntryType; ! ! MethodArgList::MethodArgList(const char *className, const char *anArgList) { ! argListSize = 0; ! argListString = anArgList; ! mClassName = className; ! ! // first strip off the leading paren. ! const char *aptr = argListString + 1; ! U32 numFloats = 0; ! ! for(;;) ! { ! U32 type = 0; ! MethodArgInfo info; ! ! // remove leading spaces ! while(*aptr == ' ') ! aptr++; ! if(*aptr == ')') ! break; ! ! info.isVector = false; ! ! // this can let some errors through - for example we don't check that ! // the vector is passed as a reference, but it has to be. ! // Ideally we should do a simple lexer/parser for the argument ! // lists in flex/bison. This would let us grow the parser a lot ! // more easily. ! if(!strncmp(aptr, "const Vector<", 13)) ! { ! info.isVector = true; ! aptr += 13; ! } ! else if(!strncmp(aptr, "const TNL::Vector<", 18)) ! { ! info.isVector = true; ! aptr += 18; ! } ! ! // strip off any TNL namespace stuff ! if(!strncmp(aptr, "TNL::", 5)) ! aptr += 5; ! ! U32 len = 0; ! // grab the type off the arg list pointer: ! for(;type < NumTypes; type++) ! { ! // figure out the base type: ! len = strlen(gTypes[type].name); ! if(!strncmp(aptr, gTypes[type].name, len)) ! break; ! } ! ! TNLAssert(type != NumTypes, "Invalid type in method declaration."); ! TNLAssert(!info.isVector || gTypes[type].allowedInVector, ("Invalid vector subtype (%s) in method declaration.", aptr)); ! TNLAssert(info.isVector || gTypes[type].allowedAsArg, ("Invalid type (%s) in method declaration.", aptr)); ! ! aptr += len; ! info.argType = type; ! ! // figure out the template arguments, if any: ! if(type == TypeSignedInt || type == TypeInt || ! type == TypeSignedFloat || type == TypeFloat || ! type == TypeRangedU32) ! { ! const char *walk = aptr; ! aptr = strchr(aptr, '>') + 1; ! ! if(type == TypeRangedU32) ! { ! info.rangeStart = getValue(walk); ! info.rangeEnd = getValue(strchr(walk, ',') + 1); ! } ! else ! info.bitCount = getValue(walk); ! } ! if(!info.isVector && (type == TypeF32 || type == TypeFloat || type == TypeSignedFloat)) ! { ! if(numFloats < 13) ! { ! floatRegOffsets[numFloats] = argList.size() * sizeof(U32); ! numFloats++; ! } ! } ! argList.push_back(info); ! ! if(gTypes[type].size > sizeof(U32)) ! argListSize += gTypes[type].size; ! else ! argListSize += sizeof(U32); ! ! // lop off the name of the var... ! aptr = strchr(aptr, ','); ! if(!aptr) ! break; ! aptr++; ! } ! if(numFloats < 13) ! floatRegOffsets[numFloats] = -1; } ! ThreadStorage gRPCThreadStorage; ! ! RPCThreadStorage &getRPCThreadStorage() { ! RPCThreadStorage *val = (RPCThreadStorage *) gRPCThreadStorage.get(); ! if(!val) ! { ! val = new RPCThreadStorage; ! gRPCThreadStorage.set(val); ! } ! return *val; } ! void MethodArgList::marshall(MarshalledCall *theEvent) { ! PacketStream bstream; ! RPCThreadStorage &sto = getRPCThreadStorage(); ! ! #if defined (TNL_CPU_PPC) ! U32 *intArg = sto.registerSaves; ! F32 *floatArg = (F32 *) (&sto.registerSaves[8]); ! void *stackPtr = (void *) sto.registerSaves[8 + 13]; ! stackPtr = (void *) (*((U8 **) stackPtr) + 24); // advance past linkage area of stack ! intArg++; // get rid of the "this" pointer. ! bool floatInRegs = true; ! #else ! U8 *ptr = (U8 *) sto.basePtr; ! ptr += 4; // get rid of the return address and saved base ptr. ! #endif ! U32 whichSTE = 0; ! ! for(S32 i = 0; i < argList.size(); i++) ! { ! #if !defined (TNL_CPU_PPC) ! void *arg = ptr; ! U32 *intArg = (U32 *) arg; ! F32 *floatArg = (F32 *) arg; ! #else ! if(!floatInRegs) ! floatArg = ((F32 *) stackPtr) + i + 1; // the +1 skips the this pointer which is an arg, but not in the arg list. ! #endif ! U32 count = 1; ! U32 *intArgSave = intArg; ! F32 *floatArgSave = floatArg; ! ! if(argList[i].isVector) ! { ! VectorRep *vector = *((VectorRep **) intArg); ! bstream.writeInt(vector->elementCount, VectorSizeBitSize); ! intArg = (U32 *) vector->array; ! floatArg = (F32 *) vector->array; ! count = vector->elementCount; ! } ! for(U32 j = 0; j < count; j++) ! { ! switch(argList[i].argType) ! { ! case TypeS8: ! #ifdef TNL_BIG_ENDIAN ! if(!argList[i].isVector) ! { ! bstream.write(((S8 *) intArg)[3]); ! } ! else ! #endif ! bstream.write(*((S8 *) intArg)); ! break; ! case TypeU8: ! #ifdef TNL_BIG_ENDIAN ! if(!argList[i].isVector) ! { ! bstream.write(((U8 *) intArg)[3]); ! } ! else ! #endif ! bstream.write(*((U8 *) intArg)); ! break; ! case TypeS16: ! #ifdef TNL_BIG_ENDIAN ! if(!argList[i].isVector) ! { ! bstream.write(((S16 *) intArg)[1]); ! } ! else ! #endif ! bstream.write(*((S16 *) intArg)); ! break; ! case TypeU16: ! #ifdef TNL_BIG_ENDIAN ! if(!argList[i].isVector) ! { ! bstream.write(((U16 *) intArg)[1]); ! } ! else ! #endif ! bstream.write(*((U16 *) intArg)); ! break; ! case TypeS32: ! bstream.write(*((S32 *) intArg)); ! break; ! case TypeU32: ! bstream.write(*((U32 *) intArg)); ! break; ! case TypeF32: ! bstream.write(*((F32 *) floatArg)); ! floatArg++; ! break; ! case TypeF64: ! bstream.write(*((F64 *) intArg)); ! break; ! case TypeSignedInt: ! bstream.writeSignedInt(((SignedInt<32> *) intArg)->value, argList[i].bitCount); ! break; ! case TypeInt: ! bstream.writeInt(((Int<32> *) intArg)->value, argList[i].bitCount); ! break; ! case TypeSignedFloat: ! bstream.writeSignedFloat(((SignedFloat<32> *) floatArg)->value, argList[i].bitCount); ! floatArg++; ! break; ! case TypeFloat: ! bstream.writeFloat(((Float<32> *) floatArg)->value, argList[i].bitCount); ! floatArg++; ! break; ! case TypeString: ! bstream.writeString(*((const char **) intArg)); ! break; ! case TypeStringTableEntryRef: ! theEvent->mSTEs.push_back(**((StringTableEntry **) intArg)); ! break; ! case TypeStringTableEntry: ! theEvent->mSTEs.push_back(*((StringTableEntry *) intArg)); ! break; ! case TypeRangedU32: ! bstream.writeRangedU32(((RangedU32<0,U32_MAX> *) intArg)->value, argList[i].rangeStart, argList[i].rangeEnd); ! break; ! case TypeBool: ! bstream.writeFlag(*((bool *) intArg)); ! break; ! case TypeByteBufferPtr: ! { ! ByteBuffer *buffer = *((ByteBuffer **) intArg); ! bstream.writeInt(buffer->getBufferSize(), ByteBufferSizeBitSize); ! bstream.write(buffer->getBufferSize(), buffer->getBuffer()); ! } ! break; ! case TypeIPAddressRef: ! bstream.write((*((IPAddress **) intArg))->netNum); ! bstream.write((*((IPAddress **) intArg))->port); ! break; ! case TypeIPAddress: ! bstream.write(((IPAddress *) intArg)->netNum); ! bstream.write(((IPAddress *) intArg)->port); ! break; ! } ! if(count != 1) ! { ! *((U8 **) &intArg) += gTypes[argList[i].argType].size; ! // float args already get incremented above ! //*((U8 **) &floatArg) += typeSizes[argList[i].argType]; ! } ! } ! if(argList[i].isVector) ! { ! intArg = intArgSave; ! floatArg = floatArgSave; ! } ! intArg++; ! #ifdef TNL_CPU_PPC ! if(i == 6) // we're on our 8th register... start reading ints from the stack: ! { ! intArg = ((U32 *) stackPtr) + 8; // skip 8 registers. ! } ! if(floatArg == (F32 *) &gRegisterSaves[8+13]) // we're on our 13th register... start reading floats from the stack: ! floatInRegs = false; ! #else ! if(argList[i].isVector || gTypes[argList[i].argType].size <= sizeof(U32)) ! ptr += sizeof(U32); ! else ! ptr += gTypes[argList[i].argType].size; ! #endif ! } ! theEvent->marshalledData.setBuffer(bstream.getBuffer(), bstream.getBytePosition()); ! theEvent->marshalledData.takeOwnership(); ! theEvent->marshalledData.setBitPosition(bstream.getBitPosition()); } ! ! inline U8 *allocSpace(U8 **offsetDest, U32 ¤tSize, U32 requestSize, RPCThreadStorage &sto) { ! if(sto.rpcNumOffsets >= MethodArgList::MaxOffsets) ! return NULL; ! ! currentSize = fourByteAlign(currentSize); ! sto.rpcReadOffsets[sto.rpcNumOffsets++] = ((U8 *) offsetDest) - sto.rpcReadData; ! ! if(requestSize + currentSize > MethodArgList::MaxRPCDataSize) ! return NULL; ! ! U8 *ret = sto.rpcReadData + currentSize; ! *offsetDest = ret; ! ! currentSize += requestSize; ! return ret; } ! ! bool MethodArgList::unmarshall(BitStream *bstream, MarshalledCall *theEvent) { ! RPCThreadStorage &sto = getRPCThreadStorage(); ! sto.rpcNumOffsets = 0; ! sto.rpcNumSTEs = 0; ! U32 rpcCurrentSTEIndex = 0; ! ! U32 currentSize = argListSize; ! #ifdef TNL_CPU_PPC ! currentSize = getMax(currentSize, U32(28)); ! #endif ! U32 whichSTE = 0; ! U8 *argPtr= sto.rpcReadData; ! for(S32 i = 0; i < argList.size(); i++) ! { ! U8 *arg = argPtr; ! U32 count = 1; ! if(argList[i].isVector) ! { ! VectorRep *vector = (VectorRep *) allocSpace((U8 **) arg, currentSize, sizeof(VectorRep), sto); ! if(!vector) ! goto errorOut; ! ! vector->arraySize = bstream->readInt(VectorSizeBitSize); ! vector->elementCount = vector->arraySize; ! ! if(argList[i].argType == TypeStringTableEntry) ! { ! sto.rpcSTEIndex[sto.rpcNumSTEs] = rpcCurrentSTEIndex; ! sto.rpcSTEOffsets[sto.rpcNumSTEs] = (U8 *) &vector->array; ! sto.rpcNumSTEs++; ! rpcCurrentSTEIndex += vector->elementCount; ! argPtr += sizeof(U32); ! continue; ! } ! else ! { ! vector->array = allocSpace(&vector->array, currentSize, vector->elementCount * gTypes[argList[i].argType].size, sto); ! if(!vector->array) ! goto errorOut; ! *((VectorRep **) arg) = vector; ! count = vector->elementCount; ! arg = vector->array; ! } ! } ! for(U32 j = 0; j < count; j++) ! { ! switch(argList[i].argType) ! { ! case TypeS8: ! #ifdef TNL_BIG_ENDIAN ! if(!argList[i].isVector) ! { ! bstream->read(((S8 *) arg) + 3); ! } ! else ! #endif ! bstream->read((S8 *) arg); ! break; ! case TypeU8: ! #ifdef TNL_BIG_ENDIAN ! if(!argList[i].isVector) ! { ! bstream->read(((U8 *) arg) + 3); ! } ! else ! #endif ! bstream->read((U8 *) arg); ! break; ! case TypeS16: ! #ifdef TNL_BIG_ENDIAN ! if(!argList[i].isVector) ! { ! bstream->read(((S16 *) arg) + 1); ! } ! else ! #endif ! bstream->read((S16 *) arg); ! break; ! case TypeU16: ! #ifdef TNL_BIG_ENDIAN ! if(!argList[i].isVector) ! { ! bstream->read(((U16 *) arg) + 1); ! } ! else ! #endif ! bstream->read((S16 *) arg); ! break; ! case TypeS32: ! bstream->read((S32 *) arg); ! break; ! case TypeU32: ! bstream->read((U32 *) arg); ! break; ! case TypeF32: ! bstream->read((F32 *) arg); ! break; ! case TypeF64: ! bstream->read((F64 *) arg); ! break; ! case TypeSignedInt: ! ((SignedInt<32> *) arg)->value = bstream->readSignedInt(argList[i].bitCount); ! break; ! case TypeInt: ! ((Int<32> *) arg)->value = bstream->readInt(argList[i].bitCount); ! break; ! case TypeSignedFloat: ! ((SignedFloat<32> *) arg)->value = bstream->readSignedFloat(argList[i].bitCount); ! break; ! case TypeFloat: ! ((Float<32> *) arg)->value = bstream->readFloat(argList[i].bitCount); ! break; ! case TypeString: ! { ! char **stringPtr = (char **) arg; ! *stringPtr = (char *) allocSpace((U8 **) arg, currentSize, 256, sto); ! if(!*stringPtr) ! goto errorOut; ! bstream->readString(*stringPtr); ! // back off the end pointer. ! currentSize -= (255 - strlen(*stringPtr)); ! } ! break; ! case TypeStringTableEntryRef: ! if(sto.rpcNumSTEs >= MethodArgList::MaxOffsets) ! goto errorOut; ! sto.rpcSTEIndex[sto.rpcNumSTEs] = rpcCurrentSTEIndex; ! sto.rpcSTEOffsets[sto.rpcNumSTEs] = arg; ! sto.rpcNumSTEs++; ! rpcCurrentSTEIndex++; ! break; ! case TypeRangedU32: ! ((RangedU32<0,U32_MAX> *) arg)->value = bstream->readRangedU32(argList[i].rangeStart, argList[i].rangeEnd); ! break; ! case TypeBool: ! *((bool *) arg) = bstream->readFlag(); ! break; ! case TypeByteBufferPtr: ! { ! ByteBuffer *buffer = (ByteBuffer *) allocSpace((U8 **) arg, currentSize, sizeof(ByteBuffer), sto); ! if(!buffer) ! goto errorOut; ! buffer->mOwnsMemory = false; ! buffer->mBufSize = bstream->readInt(ByteBufferSizeBitSize); ! buffer->mDataPtr = (U8 *) allocSpace(&buffer->mDataPtr, currentSize, buffer->mBufSize, sto); ! if(!buffer->mDataPtr) ! goto errorOut; ! bstream->read(buffer->mBufSize, buffer->mDataPtr); ! *((ByteBuffer **) arg) = buffer; ! } ! break; ! case TypeIPAddressRef: ! { ! IPAddress *ip = (IPAddress *) allocSpace((U8 **) arg, currentSize, sizeof(IPAddress), sto); ! if(!ip) ! goto errorOut; ! bstream->read(&ip->netNum); ! bstream->read(&ip->port); ! *((IPAddress **) arg) = (IPAddress *) ip; ! } ! break; ! case TypeIPAddress: ! bstream->read(&((IPAddress *) arg)->netNum); ! bstream->read(&((IPAddress *) arg)->port); ! break; ! } ! *((U8 **) &arg) += gTypes[argList[i].argType].size; ! } ! if(argList[i].isVector || gTypes[argList[i].argType].size <= sizeof(U32)) ! argPtr += sizeof(U32); ! else ! argPtr += gTypes[argList[i].argType].size; ! } ! theEvent->mSTEs.setSize(rpcCurrentSTEIndex); ! for(U32 i = 0; i < sto.rpcNumSTEs; i++) ! *((StringTableEntry **) sto.rpcSTEOffsets[i]) = &theEvent->mSTEs[sto.rpcSTEIndex[i]]; ! ! theEvent->unmarshalledData.setBuffer(sto.rpcReadData, currentSize, false); ! theEvent->unmarshalledData.takeOwnership(); ! ! U32 delta; ! U8 *data; ! data = theEvent->unmarshalledData.getBuffer(); ! delta = data - sto.rpcReadData; ! ! for(U32 i = 0; i < sto.rpcNumOffsets; i++) ! { ! *((U8 **) (data + sto.rpcReadOffsets[i])) += delta; ! } ! return true; ! errorOut: ! return false; } ! ! void MarshalledCall::dispatch(void *thisPtr, MethodPointer *method) { ! U32 func; ! U32 funcOffset; ! func = method->v1; ! funcOffset = method->v2; ! void *mptr = &method->v1; ! void *args = unmarshalledData.getBuffer(); ! ! #ifdef TNL_CPU_X86 ! S32 sz = mMarshaller->argListSize; ! U32 saveESP; ! #endif ! // CallMethod(ps, data); ! ! #if defined(TNL_SUPPORTS_VC_INLINE_X86_ASM) ! _asm ! { ! push esi ! push edi ! push ecx ! push edx ! push ebx ! mov saveESP, esp ! ! mov ecx, sz // get size of buffer ! mov esi, args // get buffer ! sub esp, ecx // allocate stack space ! mov edi, esp // start of destination stack frame ! shr ecx, 2 // make it dwords ! rep movsd // copy it ! mov ecx, thisPtr // set "this" ! push ecx ! call [func] // call the function ! mov esp, saveESP ! ! pop ebx ! pop edx ! pop ecx ! pop edi ! pop esi ! } ! ! #elif defined(TNL_SUPPORTS_MWERKS_INLINE_X86_ASM) ! _asm ! { ! push esi ! push edi ! push ecx ! push edx ! push ebx ! mov saveESP, esp ! ! mov ecx, sz // get size of buffer ! mov esi, args // get buffer ! sub esp, ecx // allocate stack space ! mov edi, esp // start of destination stack frame ! shr ecx, 2 // make it dwords ! rep movsd // copy it ! mov ecx, thisPtr // set "this" ! push ecx ! mov eax, mptr ! push eax ! call jmp_method ! mov esp, saveESP ! ! pop ebx ! pop edx ! pop ecx ! pop edi ! pop esi ! jmp jmp_continue ! ! jmp_method: ! pop eax ! pop edx ! mov ecx,dword ptr [esp] ! push eax ! add ecx,dword ptr [edx] ! mov dword ptr [esp+0x4],ecx ! cmp dword ptr [edx+0x4],0xffffffff ! je jmp_now ! mov eax,dword ptr [edx+0x8] ! mov eax,dword ptr [ecx+eax] ! add eax,dword ptr [edx+0x4] ! jmp dword ptr [eax] ! lea eax,dword ptr [eax+0x0] ! jmp_now: ! jmp dword ptr [edx+0x8] ! ! jmp_continue: } - #elif defined(TNL_SUPPORTS_GCC_INLINE_X86_ASM) - - #if defined ( TNL_GCC_3 ) - U8 *funcPtr = ((U8 *) thisPtr) + funcOffset; - funcPtr = *((U8 **) funcPtr); - funcPtr += func; - funcPtr--; - funcPtr = *((U8 **) funcPtr); - #elif defined ( TNL_GCC_2 ) - U8 *funcPtr = ((U8 *) thisPtr) + (funcOffset & 0xFFFF); - funcPtr = *((U8 **) funcPtr) + (func >> 14); - funcPtr = *((U8 **) (funcPtr - 4)); - #endif - - asm( - "mov %%esp, %0 \n" - - "mov %1, %%ecx \n" // get size of buffer - "mov %2, %%esi \n" // get buffer - "sub %%ecx, %%esp \n" // allocate stack space - "mov %%esp, %%edi \n" // start of destination stack frame - "shr $2, %%ecx \n" // make it dwords - "rep\nmovsl \n" // copy it - "mov %4, %%ecx \n" // set "this" - "push %%ecx \n" // gcc expects this pointer to be on the stack - "call *%3 \n" // call the function - - "mov %0, %%esp \n" - - : /* nothing out */ - : "m" (saveESP), "m" (sz), "m" (args), "m" (funcPtr), "m" (thisPtr) - : "ebx", "edx", "ecx", "edi", "esi" - ); - #elif defined (TNL_SUPPORTS_GCC_INLINE_PPC_ASM) - register S32 *floatOffsets = mMarshaller->floatRegOffsets; - - S32 argAreaSize = mMarshaller->argList.size() * sizeof(U32); - if(argAreaSize < 28) - argAreaSize = 28; - - S32 copySize = 28 - argAreaSize; // negative - stack grows down - - // load up the floating point registers - asm(" \n" - "mflr r0\n" - "stw r0, 8(r1)\n" // save off link register - "mr r9, %4\n" // load up the copy size - "addi r9, r9, -24-32-4\n" // 24 for linkage area, 32 for register arguments, 4 for r20 - "stw r20, -4(r1)\n" // save off r20 into the red zone - "mr r20, r9\n" // save the grow amount - - "subfic r9, r9, -24-32-4\n" // compute byte total to copy to the stack - "mr r10, %1\n" - "addi r10, r10, 28\n" - "sub r12, r1, r9\n" // write offset from stack (into red zone) - "addi r12, r12, -4\n" // skip past r20 save area. - "li r2, 0\n" - - "stackCopyLoop:\n" - "cmpw r2, r9\n" - "beq stackCopyDone\n" - "lwzx r3, r2, r10\n" - "stwx r3, r2, r12\n" - "addi r2, r2, 4\n" // increment the loop counter... - "b stackCopyLoop\n" - "stackCopyDone:\n" - - "mr r10, %1\n" - "mr r3, %3\n" - "mr r12, %2\n" - "mr r9, %0\n" - - "stwux r1, r1, r20\n" // create some stack space for us to work in - - "lwz r2, 0(r9)\n" - "subic. r2, r2, 0\n" - "blt floatsDone\n" - "lfsx f1, r2, r10\n" - - "lwz r2, 4(r9)\n" - "subic. r2, r2, 0\n" - "blt floatsDone\n" - "lfsx f2, r2, r10\n" - - "lwz r2, 8(r9)\n" - "subic. r2, r2, 0\n" - "blt floatsDone\n" - "lfsx f3, r2, r10\n" - - "lwz r2, 12(r9)\n" - "subic. r2, r2, 0\n" - "blt floatsDone\n" - "lfsx f4, r2, r10\n" - - "lwz r2, 16(r9)\n" - "subic. r2, r2, 0\n" - "blt floatsDone\n" - "lfsx f5, r2, r10\n" - - "lwz r2, 20(r9)\n" - "subic. r2, r2, 0\n" - "blt floatsDone\n" - "lfsx f6, r2, r10\n" - - "lwz r2, 24(r9)\n" - "subic. r2, r2, 0\n" - "blt floatsDone\n" - "lfsx f7, r2, r10\n" - - "lwz r2, 28(r9)\n" - "subic. r2, r2, 0\n" - "blt floatsDone\n" - "lfsx f8, r2, r10\n" - - "lwz r2, 32(r9)\n" - "subic. r2, r2, 0\n" - "blt floatsDone\n" - "lfsx f9, r2, r10\n" - - "lwz r2, 36(r9)\n" - "subic. r2, r2, 0\n" - "blt floatsDone\n" - "lfsx f10, r2, r10\n" - - "lwz r2, 40(r9)\n" - "subic. r2, r2, 0\n" - "blt floatsDone\n" - "lfsx f11, r2, r10\n" ! "lwz r2, 44(r9)\n" ! "subic. r2, r2, 0\n" ! "blt floatsDone\n" ! "lfsx f12, r2, r10\n" ! ! "lwz r2, 48(r9)\n" ! "subic. r2, r2, 0\n" ! "blt floatsDone\n" ! "lfsx f13, r2, r10\n" ! ! "floatsDone:\n" ! ! // load up the virtual function pointer ! "mr r4, %5\n" ! // r4 has funcOffset, r12 has the function index ! "add r4, r4, r3\n" ! "lwz r4, 0(r4)\n" ! "add r4, r4, r12\n" ! "addi r4, r4, -1\n" ! "lwz r12, 0(r4)\n" ! "lwz r4, 0(r10)\n" ! "lwz r5, 4(r10)\n" ! "lwz r6, 8(r10)\n" ! "lwz r7, 12(r10)\n" ! "lwz r8, 16(r10)\n" ! "lwz r9, 20(r10)\n" ! "lwz r10, 24(r10)\n" ! "mtctr r12\n" ! "bctrl\n" ! "sub r1, r1, r20\n" ! "lwz r20, -4(r1)\n" //addic r1, r1, 424\n" ! "lwz r0, 8(r1)\n" ! "mtlr r0\n" - : : "r" (floatOffsets), "r" (args), "r" (func), "r" (thisPtr), "r" (copySize), "r" (funcOffset) : "r2", "r9", "r10", "r12", "r3", "r0"); - #endif - } }; --- 28,75 ---- #include "tnlNetStringTable.h" #include "tnlThread.h" ! namespace Types { ! void read(TNL::BitStream &s, TNL::StringPtr *val) { ! char buffer[256]; ! s.readString(buffer); ! *val = buffer; } ! void write(TNL::BitStream &s, TNL::StringPtr &val) { ! s.writeString(val.getString()); } ! void read(TNL::BitStream &s, TNL::ByteBufferPtr *val) { ! TNL::U32 size = s.readInt(ByteBufferSizeBitSize); ! *val = new TNL::ByteBuffer(size); ! s.read(size, (*val)->getBuffer()); } ! void write(TNL::BitStream &s, TNL::ByteBufferPtr &val) { ! s.writeInt(val->getBufferSize(), ByteBufferSizeBitSize); ! s.write(val->getBufferSize(), val->getBuffer()); } ! void read(TNL::BitStream &s, TNL::IPAddress *val) { ! s.read(&val->netNum); ! s.read(&val->port); } ! void write(TNL::BitStream &s, TNL::IPAddress &val) { ! s.write(val.netNum); ! s.write(val.port); } ! }; ! namespace TNL ! { }; Index: journal.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/journal.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** journal.cpp 20 May 2004 20:16:07 -0000 1.6 --- journal.cpp 21 Feb 2005 07:48:14 -0000 1.7 *************** *** 97,101 **** } ! JournalEntryRecord::JournalEntryRecord(const char *functionName, MethodArgList *methodArgList) { S32 i; --- 97,101 ---- } ! JournalEntryRecord::JournalEntryRecord(const char *functionName) { S32 i; *************** *** 111,115 **** (*mEntryVector)[i] = this; mFunctionName = functionName; - mMethodArgList = methodArgList; mEntryIndex = 0; } --- 111,114 ---- *************** *** 204,208 ... [truncated message content] |
From: Mark F. <mar...@us...> - 2005-02-21 07:48:23
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24496/zap Removed Files: zap.dsp Log Message: Added template-based RPC marshalling Updated master, masterclient and test projects to use new RPC format Removed VC6 projects due to template incompatibility --- zap.dsp DELETED --- |
From: Mark F. <mar...@us...> - 2005-02-21 07:48:23
|
Update of /cvsroot/opentnl/tnl/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24496/test Modified Files: server.cpp testGame.cpp testGame.h Removed Files: TNLTest.dsp server.dsp Log Message: Added template-based RPC marshalling Updated master, masterclient and test projects to use new RPC format Removed VC6 projects due to template incompatibility Index: testGame.h =================================================================== RCS file: /cvsroot/opentnl/tnl/test/testGame.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** testGame.h 19 Aug 2004 21:20:14 -0000 1.5 --- testGame.h 21 Feb 2005 07:48:13 -0000 1.6 *************** *** 32,35 **** --- 32,36 ---- #include "../tnl/tnlLog.h" #include "../tnl/tnlRPC.h" + #include "../tnl/tnlString.h" /// TNL Graphical Test Application. *************** *** 142,146 **** /// rpcPlayerWillMove is used in TNLTest to demonstrate ghost->parent NetObject RPCs. ! TNL_DECLARE_RPC(rpcPlayerWillMove, (const char *testString)); /// rpcPlayerDidMove is used in TNLTest to demostrate a broadcast RPC from the server --- 143,147 ---- /// rpcPlayerWillMove is used in TNLTest to demonstrate ghost->parent NetObject RPCs. ! TNL_DECLARE_RPC(rpcPlayerWillMove, (TNL::StringPtr testString)); /// rpcPlayerDidMove is used in TNLTest to demostrate a broadcast RPC from the server *************** *** 263,267 **** /// that's possible using TNL's RPC. This RPC also sends bool and StringTableEntry data, /// as well as showing the use of the TNL_DECLARE_RPC_ENUM macro. ! TNL_DECLARE_RPC(rpcGotPlayerPos, (bool b1, bool b2, TNL::StringTableEntryRef string, TNL::Float<PlayerPosReplyBitSize> x, TNL::Float<PlayerPosReplyBitSize> y)); /// TNL_DECLARE_NETCONNECTION is used to declare that TestConnection is a valid connection class to the --- 264,268 ---- /// that's possible using TNL's RPC. This RPC also sends bool and StringTableEntry data, /// as well as showing the use of the TNL_DECLARE_RPC_ENUM macro. ! TNL_DECLARE_RPC(rpcGotPlayerPos, (bool b1, bool b2, TNL::StringTableEntry string, TNL::Float<PlayerPosReplyBitSize> x, TNL::Float<PlayerPosReplyBitSize> y)); /// TNL_DECLARE_NETCONNECTION is used to declare that TestConnection is a valid connection class to the Index: server.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/test/server.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** server.cpp 19 Aug 2004 21:20:14 -0000 1.3 --- server.cpp 21 Feb 2005 07:48:13 -0000 1.4 *************** *** 94,125 **** /// Test RPC function for long argument lists, especially useful in debugging architectures that pass some arguments in registers, and some on the stack. ! TNL_DECLARE_RPC(rpcLongArgChainTest, (Float<7> i1, Float<6> i2, F32 i3, F32 i4, RangedU32<0,40> i5, F32 i6, F32 i7, F32 i8, F32 i9, F32 i10, F32 i11, F32 i12, F32 i13, F32 i14, F32 i15, U32 i16, U32 i17, F32 i18, F32 i19, F32 i20, F32 i21, F32 i22)); ! TNL_DECLARE_RPC(rpcVectorTest, (IPAddressRef theIP, ByteBufferRef buf, const Vector<IPAddress> &v0, const Vector<const char *> &v1, const Vector<F32> &v2)); ! TNL_DECLARE_RPC(rpcSTETest, (StringTableEntryRef e1, const Vector<StringTableEntry> &v2)); }; ! TNL_IMPLEMENT_RPC(RPCTestConnection, rpcLongArgChainTest, (Float<7> i1, Float<6> i2, F32 i3, F32 i4, RangedU32<0,40> i5, F32 i6, F32 i7, F32 i8, F32 i9, F32 i10, F32 i11, F32 i12, F32 i13, F32 i14, F32 i15, U32 i16, U32 i17, F32 i18, F32 i19, F32 i20, F32 i21, F32 i22), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirAny, 0) { F32 fi1 = i1; F32 fi2 = i2; ! logprintf( "%g %g %g %g %d %g %g %g %g %g %g %g %g %g %g %d %d %g %g %g %g %g", ! fi1, fi2, i3, i4, U32(i5), i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22); } TNL_IMPLEMENT_RPC(RPCTestConnection, rpcVectorTest, ! (IPAddressRef theIP, ByteBufferRef buf, const Vector<IPAddress> &v0, const Vector<const char *> &v1, const Vector<F32> &v2), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirAny, 0) { logprintf("Vector 0 size: %d, Vector 1 size: %d, Vector 2 size: %d", v0.size(), v1.size(), v2.size()); Address anAddress(theIP); ! logprintf("BB: %d - %s", buf.getBufferSize(), buf.getBuffer()); logprintf("IPAddress = %s", anAddress.toString()); for(S32 i = 0; i < v0.size(); i++) logprintf("Addr: %s", Address(v0[i]).toString()); for(S32 i = 0; i < v1.size(); i++) ! logprintf("%s", v1[i]); for(S32 i = 0; i < v2.size(); i++) logprintf("%g", v2[i]); --- 94,136 ---- /// Test RPC function for long argument lists, especially useful in debugging architectures that pass some arguments in registers, and some on the stack. ! TNL_DECLARE_RPC(rpcLongArgChainTest, (Float<7> i1, Float<6> i2, F32 i3, F32 i4, RangedU32<0,40> i5, F32 i6, U32 i7, F32 i8, U32 i9)); ! TNL_DECLARE_RPC(rpcVectorTest, (IPAddress theIP, ByteBufferPtr buf, Vector<IPAddress> v0, Vector<StringPtr> v1, Vector<F32> v2)); ! TNL_DECLARE_RPC(rpcVectorTest2, (Vector<F32> v, F32 v2)); ! TNL_DECLARE_RPC(rpcSTETest, (StringTableEntry e1, Vector<StringTableEntry> v2)); }; ! TNL_IMPLEMENT_RPC(RPCTestConnection, rpcLongArgChainTest, (Float<7> i1, Float<6> i2, F32 i3, F32 i4, RangedU32<0,40> i5, F32 i6, U32 i7, F32 i8, U32 i9), ! (i1, i2, i3, i4, i5, i6, i7, i8, i9), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirAny, 0) { F32 fi1 = i1; F32 fi2 = i2; ! logprintf( "%g %g %g %g %d %g %d %g %d", ! fi1, fi2, i3, i4, U32(i5), i6, i7, i8, i9); ! } ! ! TNL_IMPLEMENT_RPC(RPCTestConnection, rpcVectorTest2, (Vector<F32> floatVec, F32 floatVal), (floatVec, floatVal), ! NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirAny, 0) ! { ! logprintf("val = %g", floatVal); ! for(S32 i = 0; i < floatVec.size(); i++) ! logprintf("floatVec[%d] = %g", i, floatVec[i]); } TNL_IMPLEMENT_RPC(RPCTestConnection, rpcVectorTest, ! (IPAddress theIP, ByteBufferPtr buf, Vector<IPAddress> v0, Vector<StringPtr> v1, Vector<F32> v2), ! (theIP, buf, v0, v1, v2), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirAny, 0) { logprintf("Vector 0 size: %d, Vector 1 size: %d, Vector 2 size: %d", v0.size(), v1.size(), v2.size()); Address anAddress(theIP); ! logprintf("BB: %d - %s", buf->getBufferSize(), buf->getBuffer()); logprintf("IPAddress = %s", anAddress.toString()); for(S32 i = 0; i < v0.size(); i++) logprintf("Addr: %s", Address(v0[i]).toString()); for(S32 i = 0; i < v1.size(); i++) ! logprintf("%s", v1[i].getString()); for(S32 i = 0; i < v2.size(); i++) logprintf("%g", v2[i]); *************** *** 127,131 **** TNL_IMPLEMENT_RPC(RPCTestConnection, rpcSTETest, ! (StringTableEntryRef e1, const Vector<StringTableEntry> &v2), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirAny, 0) { --- 138,143 ---- TNL_IMPLEMENT_RPC(RPCTestConnection, rpcSTETest, ! (StringTableEntry e1, Vector<StringTableEntry> v2), ! (e1, v2), NetClassGroupGameMask, RPCGuaranteedOrdered, RPCDirAny, 0) { *************** *** 172,177 **** fflush(stdout); ! tc->rpcLongArgChainTest_test(0.25, 0.5, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22); ! Vector<const char *> v1; Vector<IPAddress> v0; v0.push_back(Address("IP:192.168.0.1:1").toIPAddress()); --- 184,189 ---- fflush(stdout); ! tc->rpcLongArgChainTest_test(0.25, 0.5, 3, 4, 5, 6, 7, 8, 9); ! Vector<StringPtr> v1; Vector<IPAddress> v0; v0.push_back(Address("IP:192.168.0.1:1").toIPAddress()); *************** *** 189,194 **** v2.push_back(4.5); v2.push_back(5.5); Address theAddress("IP:192.168.0.23:6969"); ! ByteBuffer buf((U8 *) "Simple test buffer.", 20); Vector<StringTableEntry> v3; --- 201,208 ---- v2.push_back(4.5); v2.push_back(5.5); + + tc->rpcVectorTest2_test(v2, 50); Address theAddress("IP:192.168.0.23:6969"); ! ByteBufferPtr buf = new ByteBuffer((U8 *) "Simple test buffer.", 20); Vector<StringTableEntry> v3; Index: testGame.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/test/testGame.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** testGame.cpp 19 Aug 2004 21:20:14 -0000 1.8 --- testGame.cpp 21 Feb 2005 07:48:13 -0000 1.9 *************** *** 256,260 **** } ! TNL_IMPLEMENT_NETOBJECT_RPC(Player, rpcPlayerIsInScope, (TNL::Float<6> x, TNL::Float<6> y), TNL::NetClassGroupGameMask, TNL::RPCGuaranteedOrdered, TNL::RPCToGhost, 0) { --- 256,294 ---- } ! /* ! class RPCEV_Player_rpcPlayerIsInScope : ! public TNL::NetObjectRPCEvent ! { ! public: TNL::FunctorDecl<void (Player::*)(TNL::Float<6> x, TNL::Float<6> y)> mFunctorDecl; ! RPCEV_Player_rpcPlayerIsInScope() : ! mFunctorDecl(Player::rpcPlayerIsInScope_remote), ! RPCEvent(TNL::RPCGuaranteedOrdered, TNL::RPCToGhost) ! { mFunctor = &mFunctorDecl; } ! static TNL::NetClassRepInstance<RPCEV_Player_rpcPlayerIsInScope> dynClassRep; ! virtual TNL::NetClassRep* getClassRep() const; ! bool checkClassType(TNL::Object *theObject) ! { return dynamic_cast<Player *>(theObject) != __null; } ! }; ! TNL::NetClassRep* RPCEV_Player_rpcPlayerIsInScope::getClassRep() ! const { return &RPCEV_Player_rpcPlayerIsInScope::dynClassRep; } ! TNL::NetClassRepInstance<RPCEV_Player_rpcPlayerIsInScope> RPCEV_Player_rpcPlayerIsInScope::dynClassRep("RPCEV_Player_rpcPlayerIsInScope",TNL::NetClassGroupGameMask, TNL::NetClassTypeEvent, 0); ! void Player::rpcPlayerIsInScope (TNL::Float<6> x, TNL::Float<6> y) ! { ! RPCEV_Player_rpcPlayerIsInScope *theEvent = new RPCEV_Player_rpcPlayerIsInScope; ! theEvent->mFunctorDecl.set (x, y) ; ! postNetEvent(theEvent); ! } ! ! TNL::NetEvent * Player::rpcPlayerIsInScope_construct (TNL::Float<6> x, TNL::Float<6> y) { RPCEV_Player_rpcPlayerIsInScope *theEvent = new RPCEV_Player_rpcPlayerIsInScope; theEvent->mFunctorDecl.set (x, y) ; return theEvent; } void Player::rpcPlayerIsInScope_test (TNL::Float<6> x, TNL::Float<6> y) { RPCEV_Player_rpcPlayerIsInScope *theEvent = new RPCEV_Player_rpcPlayerIsInScope; theEvent->mFunctorDecl.set (x, y) ; TNL::PacketStream ps; theEvent->pack(this, &ps); ps.setBytePosition(0); theEvent->unpack(this, &ps); theEvent->process(this); } void Player::rpcPlayerIsInScope_remote (TNL::Float<6> x, TNL::Float<6> y) ! ! ! { ! TNL::F32 fx = x, fy = y; ! TNL::logprintf("A player is now in scope at %g, %g", fx, fy); ! } ! ! */ ! TNL_IMPLEMENT_NETOBJECT_RPC(Player, rpcPlayerIsInScope, ! (TNL::Float<6> x, TNL::Float<6> y), (x, y), TNL::NetClassGroupGameMask, TNL::RPCGuaranteedOrdered, TNL::RPCToGhost, 0) { *************** *** 263,267 **** } ! TNL_IMPLEMENT_NETOBJECT_RPC(Player, rpcPlayerWillMove, (const char *testString), TNL::NetClassGroupGameMask, TNL::RPCGuaranteedOrdered, TNL::RPCToGhostParent, 0) { --- 297,302 ---- } ! TNL_IMPLEMENT_NETOBJECT_RPC(Player, rpcPlayerWillMove, ! (TNL::StringPtr testString), (testString), TNL::NetClassGroupGameMask, TNL::RPCGuaranteedOrdered, TNL::RPCToGhostParent, 0) { *************** *** 269,273 **** } ! TNL_IMPLEMENT_NETOBJECT_RPC(Player, rpcPlayerDidMove, (TNL::Float<6> x, TNL::Float<6> y), TNL::NetClassGroupGameMask, TNL::RPCGuaranteedOrdered, TNL::RPCToGhost, 0) { --- 304,309 ---- } ! TNL_IMPLEMENT_NETOBJECT_RPC(Player, rpcPlayerDidMove, ! (TNL::Float<6> x, TNL::Float<6> y), (x, y), TNL::NetClassGroupGameMask, TNL::RPCGuaranteedOrdered, TNL::RPCToGhost, 0) { *************** *** 358,364 **** TNL_IMPLEMENT_NETCONNECTION(TestConnection, TNL::NetClassGroupGame, true); ! TNL_DECLARE_MEMBER_ENUM(TestConnection, PlayerPosReplyBitSize); ! ! TNL_IMPLEMENT_RPC(TestConnection, rpcGotPlayerPos, (bool b1, bool b2, TNL::StringTableEntryRef string, TNL::Float<TestConnection::PlayerPosReplyBitSize> x, TNL::Float<TestConnection::PlayerPosReplyBitSize> y), TNL::NetClassGroupGameMask, TNL::RPCGuaranteedOrdered, TNL::RPCDirAny, 0) { --- 394,399 ---- TNL_IMPLEMENT_NETCONNECTION(TestConnection, TNL::NetClassGroupGame, true); ! TNL_IMPLEMENT_RPC(TestConnection, rpcGotPlayerPos, ! (bool b1, bool b2, TNL::StringTableEntry string, TNL::Float<TestConnection::PlayerPosReplyBitSize> x, TNL::Float<TestConnection::PlayerPosReplyBitSize> y), (b1, b2, string, x, y), TNL::NetClassGroupGameMask, TNL::RPCGuaranteedOrdered, TNL::RPCDirAny, 0) { *************** *** 367,371 **** } ! TNL_IMPLEMENT_RPC(TestConnection, rpcSetPlayerPos, (TNL::F32 x, TNL::F32 y), TNL::NetClassGroupGameMask, TNL::RPCGuaranteedOrdered, TNL::RPCDirClientToServer, 0) { --- 402,407 ---- } ! TNL_IMPLEMENT_RPC(TestConnection, rpcSetPlayerPos, ! (TNL::F32 x, TNL::F32 y), (x, y), TNL::NetClassGroupGameMask, TNL::RPCGuaranteedOrdered, TNL::RPCDirClientToServer, 0) { --- server.dsp DELETED --- --- TNLTest.dsp DELETED --- |
From: Mark F. <mar...@us...> - 2005-02-21 07:48:22
|
Update of /cvsroot/opentnl/tnl/libtomcrypt In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24496/libtomcrypt Removed Files: libtomcrypt.dsp Log Message: Added template-based RPC marshalling Updated master, masterclient and test projects to use new RPC format Removed VC6 projects due to template incompatibility --- libtomcrypt.dsp DELETED --- |
From: Mark F. <mar...@us...> - 2005-02-21 07:48:22
|
Update of /cvsroot/opentnl/tnl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24496 Removed Files: tnl.dsw Log Message: Added template-based RPC marshalling Updated master, masterclient and test projects to use new RPC format Removed VC6 projects due to template incompatibility --- tnl.dsw DELETED --- |
From: Mark F. <mar...@us...> - 2005-02-21 07:48:22
|
Update of /cvsroot/opentnl/tnl/master In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24496/master Modified Files: main.cpp masterInterface.cpp masterInterface.h Removed Files: master.dsp Log Message: Added template-based RPC marshalling Updated master, masterclient and test projects to use new RPC format Removed VC6 projects due to template incompatibility Index: masterInterface.h =================================================================== RCS file: /cvsroot/opentnl/tnl/master/masterInterface.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** masterInterface.h 3 Jul 2004 20:01:46 -0000 1.3 --- masterInterface.h 21 Feb 2005 07:48:12 -0000 1.4 *************** *** 77,81 **** /// m2cQueryGameTypesResponse with Vectors of size 0 to indicate that no more game or mission /// types are to be added. ! TNL_DECLARE_RPC(m2cQueryGameTypesResponse, (U32 queryId, const Vector<StringTableEntry> &gameTypes, const Vector<StringTableEntry> &missionTypes)); /// c2mQueryServers is sent by the client to the master server to request a list of --- 77,81 ---- /// m2cQueryGameTypesResponse with Vectors of size 0 to indicate that no more game or mission /// types are to be added. ! TNL_DECLARE_RPC(m2cQueryGameTypesResponse, (U32 queryId, Vector<StringTableEntry> gameTypes, Vector<StringTableEntry> missionTypes)); /// c2mQueryServers is sent by the client to the master server to request a list of *************** *** 85,89 **** TNL_DECLARE_RPC(c2mQueryServers, (U32 queryId, U32 regionMask, U32 minPlayers, U32 maxPlayers, U32 infoFlags, ! U32 maxBots, U32 minCPUSpeed, StringTableEntryRef gameType, StringTableEntryRef missionType)); /// m2cQueryServersResponse is sent by the master server in response to a c2mQueryServers RPC, to --- 85,89 ---- TNL_DECLARE_RPC(c2mQueryServers, (U32 queryId, U32 regionMask, U32 minPlayers, U32 maxPlayers, U32 infoFlags, ! U32 maxBots, U32 minCPUSpeed, StringTableEntry gameType, StringTableEntry missionType)); /// m2cQueryServersResponse is sent by the master server in response to a c2mQueryServers RPC, to *************** *** 92,96 **** /// per message. The Master Server will always send a final, empty m2cQueryServersResponse to signify that the list /// is complete. ! TNL_DECLARE_RPC(m2cQueryServersResponse, (U32 queryId, const Vector<IPAddress> &ipList)); /// c2mRequestArrangedConnection is an RPC sent from the client to the master to request an arranged --- 92,96 ---- /// per message. The Master Server will always send a final, empty m2cQueryServersResponse to signify that the list /// is complete. ! TNL_DECLARE_RPC(m2cQueryServersResponse, (U32 queryId, Vector<IPAddress> ipList)); /// c2mRequestArrangedConnection is an RPC sent from the client to the master to request an arranged *************** *** 99,119 **** /// server. TNL_DECLARE_RPC(c2mRequestArrangedConnection, (U32 requestId, ! IPAddressRef remoteAddress, IPAddressRef internalAddress, ! ByteBufferRef connectionParameters)); /// m2cClientRequestedArranged connection is sent from the master to a server to notify it that /// a client has requested a connection. The possibleAddresses vector is a list of possible IP addresses /// that the server should attempt to connect to for that client if it accepts the connection request. ! TNL_DECLARE_RPC(m2cClientRequestedArrangedConnection, (U32 requestId, const Vector<IPAddress> &possibleAddresses, ! ByteBufferRef connectionParameters)); /// c2mAcceptArrangedConnection is sent by a server to notify the master that it will accept the connection /// request from a client. The requestId parameter sent by the MasterServer in m2cClientRequestedArrangedConnection /// should be sent back as the requestId field. The internalAddress is the server's self-determined IP address. ! TNL_DECLARE_RPC(c2mAcceptArrangedConnection, (U32 requestId, IPAddressRef internalAddress, ByteBufferRef connectionData)); /// c2mRejectArrangedConnection notifies the Master Server that the server is rejecting the arranged connection /// request specified by the requestId. The rejectData will be passed along to the requesting client. ! TNL_DECLARE_RPC(c2mRejectArrangedConnection, (U32 requestId, ByteBufferRef rejectData)); /// m2cArrangedConnectionAccepted is sent to a client that has previously requested a connection to a listed server --- 99,119 ---- /// server. TNL_DECLARE_RPC(c2mRequestArrangedConnection, (U32 requestId, ! IPAddress remoteAddress, IPAddress internalAddress, ! ByteBufferPtr connectionParameters)); /// m2cClientRequestedArranged connection is sent from the master to a server to notify it that /// a client has requested a connection. The possibleAddresses vector is a list of possible IP addresses /// that the server should attempt to connect to for that client if it accepts the connection request. ! TNL_DECLARE_RPC(m2cClientRequestedArrangedConnection, (U32 requestId, Vector<IPAddress> possibleAddresses, ! ByteBufferPtr connectionParameters)); /// c2mAcceptArrangedConnection is sent by a server to notify the master that it will accept the connection /// request from a client. The requestId parameter sent by the MasterServer in m2cClientRequestedArrangedConnection /// should be sent back as the requestId field. The internalAddress is the server's self-determined IP address. ! TNL_DECLARE_RPC(c2mAcceptArrangedConnection, (U32 requestId, IPAddress internalAddress, ByteBufferPtr connectionData)); /// c2mRejectArrangedConnection notifies the Master Server that the server is rejecting the arranged connection /// request specified by the requestId. The rejectData will be passed along to the requesting client. ! TNL_DECLARE_RPC(c2mRejectArrangedConnection, (U32 requestId, ByteBufferPtr rejectData)); /// m2cArrangedConnectionAccepted is sent to a client that has previously requested a connection to a listed server *************** *** 121,134 **** /// of IP addresses the client should attempt to connect to, and the connectionData buffer is the buffer sent by the /// server upon accepting the connection. ! TNL_DECLARE_RPC(m2cArrangedConnectionAccepted, (U32 requestId, const Vector<IPAddress> &possibleAddresses, ByteBufferRef connectionData)); /// m2cArrangedConnectionRejected is sent to a client when an arranged connection request is rejected by the /// server, or when the request times out because the server never responded. ! TNL_DECLARE_RPC(m2cArrangedConnectionRejected, (U32 requestId, ByteBufferRef rejectData)); /// c2mUpdateServerStatus updates the status of a server to the Master Server, specifying the current game /// and mission types, any player counts and the current info flags. TNL_DECLARE_RPC(c2mUpdateServerStatus, ( ! StringTableEntryRef gameType, StringTableEntryRef missionType, U32 botCount, U32 playerCount, U32 maxPlayers, U32 infoFlags)); --- 121,134 ---- /// of IP addresses the client should attempt to connect to, and the connectionData buffer is the buffer sent by the /// server upon accepting the connection. ! TNL_DECLARE_RPC(m2cArrangedConnectionAccepted, (U32 requestId, Vector<IPAddress> possibleAddresses, ByteBufferPtr connectionData)); /// m2cArrangedConnectionRejected is sent to a client when an arranged connection request is rejected by the /// server, or when the request times out because the server never responded. ! TNL_DECLARE_RPC(m2cArrangedConnectionRejected, (U32 requestId, ByteBufferPtr rejectData)); /// c2mUpdateServerStatus updates the status of a server to the Master Server, specifying the current game /// and mission types, any player counts and the current info flags. TNL_DECLARE_RPC(c2mUpdateServerStatus, ( ! StringTableEntry gameType, StringTableEntry missionType, U32 botCount, U32 playerCount, U32 maxPlayers, U32 infoFlags)); *************** *** 137,141 **** /// m2cSetMOTD is sent to a client when the connection is established. The /// client's game string is used to pick which MOTD will be sent. ! TNL_DECLARE_RPC(m2cSetMOTD, (const char *motdString)); }; --- 137,141 ---- /// m2cSetMOTD is sent to a client when the connection is established. The /// client's game string is used to pick which MOTD will be sent. ! TNL_DECLARE_RPC(m2cSetMOTD, (StringPtr motdString)); }; Index: masterInterface.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/master/masterInterface.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** masterInterface.cpp 3 Jul 2004 20:01:46 -0000 1.3 --- masterInterface.cpp 21 Feb 2005 07:48:12 -0000 1.4 *************** *** 30,76 **** // Since this is an interface, we implement a bunch of stubs. ! TNL_IMPLEMENT_RPC(MasterServerInterface, c2mQueryGameTypes, (U32 queryId), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirClientToServer, 0) {} ! TNL_IMPLEMENT_RPC(MasterServerInterface, m2cQueryGameTypesResponse, (U32 queryId, const Vector<StringTableEntry> &gameTypes, const Vector<StringTableEntry> &missionTypes), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirServerToClient, 0) {} ! TNL_IMPLEMENT_RPC(MasterServerInterface, c2mQueryServers, (U32 queryId, U32 regionMask, ! U32 minPlayers, U32 maxPlayers, U32 infoFlags, ! U32 maxBots, U32 minCPUSpeed, StringTableEntryRef gameType, StringTableEntryRef missionType), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirClientToServer, 0) {} ! TNL_IMPLEMENT_RPC(MasterServerInterface, m2cQueryServersResponse, (U32 queryId, ! const Vector<IPAddress> &ipList), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirServerToClient, 0) {} TNL_IMPLEMENT_RPC(MasterServerInterface, c2mRequestArrangedConnection, (U32 requestId, ! IPAddressRef remoteAddress, IPAddressRef internalAddress, ! ByteBufferRef connectionParameters), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirClientToServer, 0) {} ! TNL_IMPLEMENT_RPC(MasterServerInterface, m2cClientRequestedArrangedConnection, (U32 requestId, const Vector<IPAddress> &possibleAddresses, ! ByteBufferRef connectionParameters), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirServerToClient, 0) {} ! TNL_IMPLEMENT_RPC(MasterServerInterface, c2mAcceptArrangedConnection, (U32 requestId, IPAddressRef internalAddress, ByteBufferRef connectionData), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirClientToServer, 0) {} ! TNL_IMPLEMENT_RPC(MasterServerInterface, c2mRejectArrangedConnection, (U32 requestId, ByteBufferRef rejectData), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirClientToServer, 0) {} ! TNL_IMPLEMENT_RPC(MasterServerInterface, m2cArrangedConnectionAccepted, (U32 requestId, const Vector<IPAddress> &possibleAddresses, ByteBufferRef connectionData), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirServerToClient, 0) {} ! TNL_IMPLEMENT_RPC(MasterServerInterface, m2cArrangedConnectionRejected, (U32 requestId, ByteBufferRef rejectData), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirServerToClient, 0) {} TNL_IMPLEMENT_RPC(MasterServerInterface, c2mUpdateServerStatus, ( ! StringTableEntryRef gameType, StringTableEntryRef missionType, U32 botCount, U32 playerCount, U32 maxPlayers, U32 infoFlags), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirClientToServer, 0) {} ! // version 1 protocol messages ! ! TNL_IMPLEMENT_RPC(MasterServerInterface, m2cSetMOTD, (const char *motdString), ! NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirServerToClient, 1) {} \ No newline at end of file --- 30,86 ---- // Since this is an interface, we implement a bunch of stubs. ! TNL_IMPLEMENT_RPC(MasterServerInterface, c2mQueryGameTypes, (U32 queryId), (queryId), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirClientToServer, 0) {} ! TNL_IMPLEMENT_RPC(MasterServerInterface, m2cQueryGameTypesResponse, ! (U32 queryId, Vector<StringTableEntry> gameTypes, Vector<StringTableEntry> missionTypes), (queryId, gameTypes, missionTypes), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirServerToClient, 0) {} ! TNL_IMPLEMENT_RPC(MasterServerInterface, c2mQueryServers, ! (U32 queryId, U32 regionMask, U32 minPlayers, U32 maxPlayers, U32 infoFlags, ! U32 maxBots, U32 minCPUSpeed, StringTableEntry gameType, StringTableEntry missionType), ! (queryId, regionMask, minPlayers, maxPlayers, infoFlags, maxBots, minCPUSpeed, gameType, missionType), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirClientToServer, 0) {} ! TNL_IMPLEMENT_RPC(MasterServerInterface, m2cQueryServersResponse, ! (U32 queryId, Vector<IPAddress> ipList), (queryId, ipList), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirServerToClient, 0) {} TNL_IMPLEMENT_RPC(MasterServerInterface, c2mRequestArrangedConnection, (U32 requestId, ! IPAddress remoteAddress, IPAddress internalAddress, ByteBufferPtr connectionParameters), ! (requestId, remoteAddress, internalAddress, connectionParameters), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirClientToServer, 0) {} ! TNL_IMPLEMENT_RPC(MasterServerInterface, m2cClientRequestedArrangedConnection, ! (U32 requestId, Vector<IPAddress> possibleAddresses, ByteBufferPtr connectionParameters), ! (requestId, possibleAddresses, connectionParameters), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirServerToClient, 0) {} ! TNL_IMPLEMENT_RPC(MasterServerInterface, c2mAcceptArrangedConnection, ! (U32 requestId, IPAddress internalAddress, ByteBufferPtr connectionData), ! (requestId, internalAddress, connectionData), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirClientToServer, 0) {} ! TNL_IMPLEMENT_RPC(MasterServerInterface, c2mRejectArrangedConnection, ! (U32 requestId, ByteBufferPtr rejectData), ! (requestId, rejectData), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirClientToServer, 0) {} ! TNL_IMPLEMENT_RPC(MasterServerInterface, m2cArrangedConnectionAccepted, ! (U32 requestId, Vector<IPAddress> possibleAddresses, ByteBufferPtr connectionData), ! (requestId, possibleAddresses, connectionData), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirServerToClient, 0) {} ! TNL_IMPLEMENT_RPC(MasterServerInterface, m2cArrangedConnectionRejected, ! (U32 requestId, ByteBufferPtr rejectData), ! (requestId, rejectData), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirServerToClient, 0) {} TNL_IMPLEMENT_RPC(MasterServerInterface, c2mUpdateServerStatus, ( ! StringTableEntry gameType, StringTableEntry missionType, U32 botCount, U32 playerCount, U32 maxPlayers, U32 infoFlags), + (gameType, missionType, botCount, playerCount, maxPlayers, infoFlags), NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirClientToServer, 0) {} ! TNL_IMPLEMENT_RPC(MasterServerInterface, m2cSetMOTD, (StringPtr motdString), (motdString), ! NetClassGroupMasterMask, RPCGuaranteedOrdered, RPCDirServerToClient, 0) {} \ No newline at end of file Index: main.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/master/main.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** main.cpp 14 Jul 2004 19:19:33 -0000 1.6 --- main.cpp 21 Feb 2005 07:48:12 -0000 1.7 *************** *** 260,264 **** (U32 queryId, U32 regionMask, U32 minPlayers, U32 maxPlayers, U32 infoFlags, U32 maxBots, U32 minCPUSpeed, ! StringTableEntryRef gameType, StringTableEntryRef missionType) ) { --- 260,264 ---- (U32 queryId, U32 regionMask, U32 minPlayers, U32 maxPlayers, U32 infoFlags, U32 maxBots, U32 minCPUSpeed, ! StringTableEntry gameType, StringTableEntry missionType) ) { *************** *** 367,372 **** // server. TNL_DECLARE_RPC_OVERRIDE(c2mRequestArrangedConnection, (U32 requestId, ! IPAddressRef remoteAddress, IPAddressRef internalAddress, ! ByteBufferRef connectionParameters)) { // First, make sure that we're connected with the server that they're requesting a connection with. --- 367,372 ---- // server. TNL_DECLARE_RPC_OVERRIDE(c2mRequestArrangedConnection, (U32 requestId, ! IPAddress remoteAddress, IPAddress internalAddress, ! ByteBufferPtr connectionParameters)) { // First, make sure that we're connected with the server that they're requesting a connection with. *************** *** 374,378 **** if(!conn) { ! c2mRejectArrangedConnection(requestId, ByteBuffer((U8 *) MasterNoSuchHost, strlen(MasterNoSuchHost) + 1)); return; } --- 374,379 ---- if(!conn) { ! ByteBufferPtr ptr = new ByteBuffer((U8 *) MasterNoSuchHost, strlen(MasterNoSuchHost) + 1); ! c2mRejectArrangedConnection(requestId, ptr); return; } *************** *** 427,431 **** // Called to indicate a connect request is being accepted. ! TNL_DECLARE_RPC_OVERRIDE(c2mAcceptArrangedConnection, (U32 requestId, IPAddressRef internalAddress, ByteBufferRef connectionData)) { GameConnectRequest *req = findAndRemoveRequest(requestId); --- 428,432 ---- // Called to indicate a connect request is being accepted. ! TNL_DECLARE_RPC_OVERRIDE(c2mAcceptArrangedConnection, (U32 requestId, IPAddress internalAddress, ByteBufferPtr connectionData)) { GameConnectRequest *req = findAndRemoveRequest(requestId); *************** *** 460,464 **** // Called to indicate a connect request is being rejected. ! TNL_DECLARE_RPC_OVERRIDE(c2mRejectArrangedConnection, (U32 requestId, ByteBufferRef rejectData)) { GameConnectRequest *req = findAndRemoveRequest(requestId); --- 461,465 ---- // Called to indicate a connect request is being rejected. ! TNL_DECLARE_RPC_OVERRIDE(c2mRejectArrangedConnection, (U32 requestId, ByteBufferPtr rejectData)) { GameConnectRequest *req = findAndRemoveRequest(requestId); *************** *** 478,482 **** // Called to update the status of a game server. TNL_DECLARE_RPC_OVERRIDE(c2mUpdateServerStatus, ( ! StringTableEntryRef gameType, StringTableEntryRef missionType, U32 botCount, U32 playerCount, U32 maxPlayers, U32 infoFlags)) { --- 479,483 ---- // Called to update the status of a game server. TNL_DECLARE_RPC_OVERRIDE(c2mUpdateServerStatus, ( ! StringTableEntry gameType, StringTableEntry missionType, U32 botCount, U32 playerCount, U32 maxPlayers, U32 infoFlags)) { *************** *** 561,565 **** { gcr->initiator->removeConnectRequest(gcr); ! gcr->initiator->c2mRejectArrangedConnection(gcr->initiatorQueryId, ByteBuffer((U8 *) MasterRequestTimedOut, strlen(MasterRequestTimedOut) + 1)); } --- 562,567 ---- { gcr->initiator->removeConnectRequest(gcr); ! ByteBufferPtr reqTimeoutBuffer = new ByteBuffer((U8 *) MasterRequestTimedOut, strlen(MasterRequestTimedOut) + 1); ! gcr->initiator->c2mRejectArrangedConnection(gcr->initiatorQueryId, reqTimeoutBuffer); } --- master.dsp DELETED --- |
From: Mark F. <mar...@us...> - 2005-02-21 07:48:22
|
Update of /cvsroot/opentnl/tnl/masterclient In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24496/masterclient Modified Files: main.cpp Removed Files: masterclient.dsp Log Message: Added template-based RPC marshalling Updated master, masterclient and test projects to use new RPC format Removed VC6 projects due to template incompatibility Index: main.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/masterclient/main.cpp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** main.cpp 20 May 2004 04:30:31 -0000 1.3 --- main.cpp 21 Feb 2005 07:48:13 -0000 1.4 *************** *** 190,194 **** } ! TNL_DECLARE_RPC_OVERRIDE(m2cQueryGameTypesResponse, (U32 queryId, const Vector<StringTableEntry> &gameTypes, const Vector<StringTableEntry> &missionTypes)) { // Ignore old queries... --- 190,194 ---- } ! TNL_DECLARE_RPC_OVERRIDE(m2cQueryGameTypesResponse, (U32 queryId, Vector<StringTableEntry> gameTypes, Vector<StringTableEntry> missionTypes)) { // Ignore old queries... *************** *** 217,221 **** } ! TNL_DECLARE_RPC_OVERRIDE(m2cQueryServersResponse, (U32 queryId, const Vector<IPAddress> &ipList)) { // Only process results from current query... --- 217,221 ---- } ! TNL_DECLARE_RPC_OVERRIDE(m2cQueryServersResponse, (U32 queryId, Vector<IPAddress> ipList)) { // Only process results from current query... *************** *** 248,252 **** c2mRequestArrangedConnection(mCurrentQueryId, mIPList[index], getInterface()->getFirstBoundInterfaceAddress().toIPAddress(), ! ByteBuffer((U8 *) "Hello World!", 13)); logprintf("Requesting arranged connection with %s", Address(mIPList[index]).toString()); --- 248,252 ---- c2mRequestArrangedConnection(mCurrentQueryId, mIPList[index], getInterface()->getFirstBoundInterfaceAddress().toIPAddress(), ! new ByteBuffer((U8 *) "Hello World!", 13)); logprintf("Requesting arranged connection with %s", Address(mIPList[index]).toString()); *************** *** 260,265 **** } ! TNL_DECLARE_RPC_OVERRIDE(m2cClientRequestedArrangedConnection, (U32 requestId, const Vector<IPAddress> &possibleAddresses, ! ByteBufferRef connectionParameters)) { if(!gIsServer || Random::readF() > 0.75) --- 260,265 ---- } ! TNL_DECLARE_RPC_OVERRIDE(m2cClientRequestedArrangedConnection, (U32 requestId, Vector<IPAddress> possibleAddresses, ! ByteBufferPtr connectionParameters)) { if(!gIsServer || Random::readF() > 0.75) *************** *** 275,282 **** U8 data[Nonce::NonceSize * 2 + SymmetricCipher::KeySize * 2]; - ByteBuffer b(data, sizeof(data)); Random::read(data, sizeof(data)); IPAddress localAddress = getInterface()->getFirstBoundInterfaceAddress().toIPAddress(); c2mAcceptArrangedConnection(requestId, localAddress, b); GameConnection *conn = new GameConnection(); --- 275,283 ---- U8 data[Nonce::NonceSize * 2 + SymmetricCipher::KeySize * 2]; Random::read(data, sizeof(data)); IPAddress localAddress = getInterface()->getFirstBoundInterfaceAddress().toIPAddress(); + ByteBufferPtr b = new ByteBuffer(data, sizeof(data)); + b->takeOwnership(); c2mAcceptArrangedConnection(requestId, localAddress, b); GameConnection *conn = new GameConnection(); *************** *** 287,293 **** logprintf("Accepting arranged connection from %s", Address(fullPossibleAddresses[0]).toString()); ! logprintf(" Generated shared secret data: %s", b.encodeBase64()->getBuffer()); ByteBufferPtr theSharedData = new ByteBuffer(data + 2 * Nonce::NonceSize, sizeof(data) - 2 * Nonce::NonceSize); Nonce nonce(data); Nonce serverNonce(data + Nonce::NonceSize); --- 288,296 ---- logprintf("Accepting arranged connection from %s", Address(fullPossibleAddresses[0]).toString()); ! ! logprintf(" Generated shared secret data: %s", b->encodeBase64()->getBuffer()); ByteBufferPtr theSharedData = new ByteBuffer(data + 2 * Nonce::NonceSize, sizeof(data) - 2 * Nonce::NonceSize); + theSharedData->takeOwnership(); Nonce nonce(data); Nonce serverNonce(data + Nonce::NonceSize); *************** *** 298,307 **** } ! TNL_DECLARE_RPC_OVERRIDE(m2cArrangedConnectionAccepted, (U32 requestId, const Vector<IPAddress> &possibleAddresses, ByteBufferRef connectionData)) { ! if(!gIsServer && requestId == mCurrentQueryId && connectionData.getBufferSize() >= Nonce::NonceSize * 2 + SymmetricCipher::KeySize * 2) { logprintf("Remote host accepted arranged connection."); ! logprintf(" Shared secret data: %s", connectionData.encodeBase64()->getBuffer()); GameConnection *conn = new GameConnection(); --- 301,310 ---- } ! TNL_DECLARE_RPC_OVERRIDE(m2cArrangedConnectionAccepted, (U32 requestId, Vector<IPAddress> possibleAddresses, ByteBufferPtr connectionData)) { ! if(!gIsServer && requestId == mCurrentQueryId && connectionData->getBufferSize() >= Nonce::NonceSize * 2 + SymmetricCipher::KeySize * 2) { logprintf("Remote host accepted arranged connection."); ! logprintf(" Shared secret data: %s", connectionData->encodeBase64()->getBuffer()); GameConnection *conn = new GameConnection(); *************** *** 312,321 **** ByteBufferPtr theSharedData = new ByteBuffer( ! (U8 *) connectionData.getBuffer() + Nonce::NonceSize * 2, ! connectionData.getBufferSize() - Nonce::NonceSize * 2 ); ! Nonce nonce(connectionData.getBuffer()); ! Nonce serverNonce(connectionData.getBuffer() + Nonce::NonceSize); conn->connectArranged(getInterface(), fullPossibleAddresses, --- 315,325 ---- ByteBufferPtr theSharedData = new ByteBuffer( ! (U8 *) connectionData->getBuffer() + Nonce::NonceSize * 2, ! connectionData->getBufferSize() - Nonce::NonceSize * 2 ); + theSharedData->takeOwnership(); ! Nonce nonce(connectionData->getBuffer()); ! Nonce serverNonce(connectionData->getBuffer() + Nonce::NonceSize); conn->connectArranged(getInterface(), fullPossibleAddresses, *************** *** 324,328 **** } ! TNL_DECLARE_RPC_OVERRIDE(m2cArrangedConnectionRejected, (U32 requestId, ByteBufferRef rejectData)) { if(!gIsServer && requestId == mCurrentQueryId) --- 328,332 ---- } ! TNL_DECLARE_RPC_OVERRIDE(m2cArrangedConnectionRejected, (U32 requestId, ByteBufferPtr rejectData)) { if(!gIsServer && requestId == mCurrentQueryId) --- masterclient.dsp DELETED --- |
Update of /cvsroot/opentnl/tnl/tnl In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11782/tnl Modified Files: byteBuffer.cpp eventConnection.cpp netConnection.cpp netInterface.cpp netStringTable.cpp random.cpp symmetricCipher.cpp tnl.dsp tnl.vcproj tnlByteBuffer.h tnlDataChunker.h tnlEventConnection.h tnlMethodDispatch.cpp tnlMethodDispatch.h tnlNetBase.h tnlNetConnection.h tnlUDP.h tnlVector.h udp.cpp Added Files: thread.cpp tnlThread.h Log Message: Updated TNL with fixes from commercial version of Zap, including: Added thread-related classes - Semaphore, Mutex, ThreadStorage, Thread, ThreadQueue Added Base16 encoding and decoding to the ByteBuffer class Added MD5 hash sum computation to the ByteBuffer class Fixed NetEvent class count bug on EventConnection startup Fixed NetEvent post fail when not connected bug Added a quicker ping/ack on an adaptive connection if it has unacked sent packets Added an isLocal flag to the connection parameters for local connections Added a RefPtr<> to hang onto a connection before dispatching a packet to it in order to prevent a crash when a packet causes a disconnect Fixed net string table bug on lookup where the lookup string is longer than the lookup length Added saved hashes to improve performance of net string table Fixed NULL free list entry string table bug Fixed string not removed from hash table bug Fixed endian bug in symmetric cipher counter initialization Added double precision float capability to RPC calls Fixed vector writing bug in RPC code on PPC Made RPC call marshalling thread safe Added support for TCP socket addresses Added support for TCP streams send and recv Index: random.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/random.cpp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** random.cpp 3 Jun 2004 00:55:20 -0000 1.4 --- random.cpp 14 Feb 2005 06:15:28 -0000 1.5 *************** *** 88,91 **** --- 88,93 ---- U32 readI(U32 rangeStart, U32 rangeEnd) { + TNLAssert(rangeStart <= rangeEnd, "Random::readI - invalid range."); + return (readI() % (rangeEnd - rangeStart + 1)) + rangeStart; } Index: tnl.dsp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnl.dsp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** tnl.dsp 27 May 2004 22:41:16 -0000 1.6 --- tnl.dsp 14 Feb 2005 06:15:28 -0000 1.7 *************** *** 271,274 **** --- 271,278 ---- # Begin Source File + SOURCE=.\thread.cpp + # End Source File + # Begin Source File + SOURCE=.\tnl.h # End Source File Index: symmetricCipher.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/symmetricCipher.cpp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** symmetricCipher.cpp 20 Apr 2004 04:27:18 -0000 1.1 --- symmetricCipher.cpp 14 Feb 2005 06:15:28 -0000 1.2 *************** *** 62,69 **** void SymmetricCipher::setupCounter(U32 counterValue1, U32 counterValue2, U32 counterValue3, U32 counterValue4) { ! mCounter[0] = mInitVector[0] + counterValue1; ! mCounter[1] = mInitVector[1] + counterValue2; ! mCounter[2] = mInitVector[2] + counterValue3; ! mCounter[3] = mInitVector[3] + counterValue4; rijndael_ecb_encrypt((U8 *) mCounter, mPad, (symmetric_key *) &mSymmetricKey); --- 62,69 ---- void SymmetricCipher::setupCounter(U32 counterValue1, U32 counterValue2, U32 counterValue3, U32 counterValue4) { ! mCounter[0] = convertHostToLEndian(convertLEndianToHost(mInitVector[0]) + counterValue1); ! mCounter[1] = convertHostToLEndian(convertLEndianToHost(mInitVector[1]) + counterValue2); ! mCounter[2] = convertHostToLEndian(convertLEndianToHost(mInitVector[2]) + counterValue3); ! mCounter[3] = convertHostToLEndian(convertLEndianToHost(mInitVector[3]) + counterValue4); rijndael_ecb_encrypt((U8 *) mCounter, mPad, (symmetric_key *) &mSymmetricKey); Index: udp.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/udp.cpp,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** udp.cpp 28 Jul 2004 02:06:14 -0000 1.6 --- udp.cpp 14 Feb 2005 06:15:28 -0000 1.7 *************** *** 158,162 **** static void TNLToSocketAddress(const Address &address, SOCKADDR *sockAddr, socklen_t *addressSize) { ! if(address.transport == IPProtocol) { memset(sockAddr, 0, sizeof(SOCKADDR_IN)); --- 158,162 ---- static void TNLToSocketAddress(const Address &address, SOCKADDR *sockAddr, socklen_t *addressSize) { ! if(address.transport == IPProtocol || address.transport == TCPProtocol) { memset(sockAddr, 0, sizeof(SOCKADDR_IN)); *************** *** 215,227 **** mTransportProtocol = bindAddress.transport; if(bindAddress.transport == IPProtocol) mPlatformSocket = socket(AF_INET, SOCK_DGRAM, 0); #if !defined(NO_IPX_SUPPORT) else if(bindAddress.transport == IPXProtocol) mPlatformSocket = socket(AF_IPX, SOCK_DGRAM, NSPROTO_IPX); #endif else { ! logprintf("Attempted to create a socket bound to an invalid transport."); } if(mPlatformSocket != INVALID_SOCKET) --- 215,237 ---- mTransportProtocol = bindAddress.transport; + const char *socketType = "UDP"; + if(bindAddress.transport == IPProtocol) mPlatformSocket = socket(AF_INET, SOCK_DGRAM, 0); + else if(bindAddress.transport == TCPProtocol) + { + socketType = "TCP"; + mPlatformSocket = socket(AF_INET, SOCK_STREAM, 0); + } #if !defined(NO_IPX_SUPPORT) else if(bindAddress.transport == IPXProtocol) + { + socketType = "IPX"; mPlatformSocket = socket(AF_IPX, SOCK_DGRAM, NSPROTO_IPX); + } #endif else { ! TNLLogMessageV(LogUDP, ("Attempted to create a socket bound to an invalid transport.")); } if(mPlatformSocket != INVALID_SOCKET) *************** *** 240,244 **** SocketToTNLAddress(&address, &boundAddress); ! logprintf("Socket created - bound to address: %s", boundAddress.toString()); // set the send and receive buffer sizes --- 250,254 ---- SocketToTNLAddress(&address, &boundAddress); ! TNLLogMessageV(LogUDP, ("%s socket created - bound to address: %s", socketType, boundAddress.toString())); // set the send and receive buffer sizes *************** *** 246,265 **** if(!error) { ! logprintf("UDP receive buffer size set to %d.", recvBufferSize); error = setsockopt(mPlatformSocket, SOL_SOCKET, SO_SNDBUF, (char *) &sendBufferSize, sizeof(sendBufferSize)); } else ! logprintf("Error: unable to set the receive buffer size on UDP socket."); if(!error) { ! logprintf("UDP send buffer size set to %d.", recvBufferSize); ! // set the broadcast allowed flag ! S32 bc = acceptsBroadcast; ! error = setsockopt(mPlatformSocket, SOL_SOCKET, SO_BROADCAST, (char*)&bc, sizeof(bc)); } else ! logprintf("Error: unable to set the send buffer size on UDP socket."); --- 256,278 ---- if(!error) { ! TNLLogMessageV(LogUDP, ("%s socket receive buffer size set to %d.", socketType, recvBufferSize)); error = setsockopt(mPlatformSocket, SOL_SOCKET, SO_SNDBUF, (char *) &sendBufferSize, sizeof(sendBufferSize)); } else ! TNLLogMessageV(LogUDP, ("%s socket error: unable to set the receive buffer size on socket.", socketType)); if(!error) { ! TNLLogMessageV(LogUDP, ("%s socket send buffer size set to %d.", socketType, recvBufferSize)); ! if(mTransportProtocol != TCPProtocol) ! { ! // set the broadcast allowed flag ! S32 bc = acceptsBroadcast; ! error = setsockopt(mPlatformSocket, SOL_SOCKET, SO_BROADCAST, (char*)&bc, sizeof(bc)); ! } } else ! TNLLogMessageV(LogUDP, ("%s socket error: unable to set the send buffer size on socket.", socketType)); *************** *** 276,286 **** } else ! logprintf("Error: unable to set broadcast mode on UDP socket."); if(!error) ! logprintf("UDP socket non-blocking IO set. UDP socket initialized."); else { ! logprintf("Error prevented successful initialization of UDP."); closesocket(mPlatformSocket); mPlatformSocket = INVALID_SOCKET; --- 289,303 ---- } else ! { ! TNLLogMessageV(LogUDP, ("%s socket error: unable to set broadcast mode on socket.", socketType)); ! } if(!error) ! { ! TNLLogMessageV(LogUDP, ("%s socket non-blocking IO set. Socket initialized.", socketType)); ! } else { ! TNLLogMessageV(LogUDP, ("Error prevented successful initialization of %s socket.", socketType)); closesocket(mPlatformSocket); mPlatformSocket = INVALID_SOCKET; *************** *** 378,381 **** --- 395,424 ---- } + NetError Socket::connect(const Address &theAddress) + { + SOCKADDR destAddress; + socklen_t addressSize; + + TNLToSocketAddress(theAddress, &destAddress, &addressSize); + if(::connect(mPlatformSocket, &destAddress, addressSize) == -1) + return getLastError(); + return NoError; + } + + NetError Socket::send(const U8 *buffer, S32 bufferSize) + { + if(::send(mPlatformSocket, (const char *) buffer, bufferSize, 0) == SOCKET_ERROR) + return getLastError(); + return NoError; + } + + NetError Socket::recv(U8 *buffer, S32 bufferSize, S32 *bytesRead) + { + *bytesRead = ::recv(mPlatformSocket, (char *) buffer, bufferSize, 0); + if(*bytesRead == -1) + return getLastError(); + return NoError; + } + Address Socket::getBoundAddress() { *************** *** 395,401 **** } void Socket::getInterfaceAddresses(Vector<Address> *addressVector) { - #if defined ( TNL_OS_WIN32 ) typedef struct { DWORD dwAddr; --- 438,444 ---- } + #if defined ( TNL_OS_WIN32 ) void Socket::getInterfaceAddresses(Vector<Address> *addressVector) { typedef struct { DWORD dwAddr; *************** *** 457,463 **** } free(pIPAddrTable); - #endif } bool Address::operator ==(const Address &theAddress) const --- 500,582 ---- } free(pIPAddrTable); } + #elif defined (TNL_OS_MAC_OSX) + #include <ifaddrs.h> + + void Socket::getInterfaceAddresses(Vector<Address> *addressVector) + { + struct ifaddrs *addrs; + getifaddrs(&addrs); + + for(struct ifaddrs *walk = addrs; walk; walk = walk->ifa_next) + { + Address theAddress; + SocketToTNLAddress(walk->ifa_addr, &theAddress); + if(theAddress.netNum[0] != INADDR_ANY && theAddress.netNum[0] != 0x7F000001) + { + //logprintf("found IF address %s", theAddress.toString()); + addressVector->push_back(theAddress); + } + } + + freeifaddrs(addrs); + } + + #elif defined (TNL_OS_LINUX) + #include <stdio.h> + #include <sys/ioctl.h> + #include <arpa/inet.h> + #include <netinet/in.h> + #include <netdb.h> + #include <net/if.h> + + void Socket::getInterfaceAddresses(Vector<Address> *addressVector) + { + int sfd = socket(AF_INET, SOCK_STREAM, 0); + if(sfd < 0) + return; + + FILE *f = fopen("/proc/net/dev", "r"); + if(!f) + { + close(sfd); + return; + } + char buf[1024]; + fgets(buf, 1024, f); + fgets(buf, 1024, f); + + struct ifreq ifr; + struct sockaddr_in *sin = (struct sockaddr_in *) &ifr.ifr_addr; + memset(&ifr, 0, sizeof(ifr)); + + + while(fgets(buf, 1024, f)) + { + char *s = buf; + while(*s == ' ') + s++; + char *end = strchr(s, ':'); + if(!end) + continue; + *end = 0; + + strcpy(ifr.ifr_name, s); + sin->sin_family = AF_INET; + if(ioctl(sfd, SIOCGIFADDR, &ifr) == 0) + { + Address theAddress; + SocketToTNLAddress((struct sockaddr *) sin, &theAddress); + if(theAddress.netNum[0] != INADDR_ANY && theAddress.netNum[0] != 0x7F000001) + { + addressVector->push_back(theAddress); + } + } + } + fclose(f); + close(sfd); + } + #endif bool Address::operator ==(const Address &theAddress) const *************** *** 522,528 **** --- 641,653 ---- if(strnicmp(addressString, "ipx:", 4)) { + bool isTCP = false; // assume IP if it doesn't have ipx: at the front. if(!strnicmp(addressString, "ip:", 3)) addressString += 3; // eat off the ip: + else if(!strnicmp(addressString, "tcp:", 4)) + { + addressString += 4; + isTCP = true; + } SOCKADDR_IN ipAddr; *************** *** 565,568 **** --- 690,695 ---- ipAddr.sin_family = AF_INET; SocketToTNLAddress((SOCKADDR *) &ipAddr, this); + if(isTCP) + transport = TCPProtocol; return true; } Index: tnlByteBuffer.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlByteBuffer.h,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tnlByteBuffer.h 6 May 2004 00:33:38 -0000 1.3 --- tnlByteBuffer.h 14 Feb 2005 06:15:28 -0000 1.4 *************** *** 127,130 **** --- 127,148 ---- } + /// Appends the specified buffer to the end of the byte buffer. + /// returns false if it does not own its own memory. + bool appendBuffer(const U8 *dataBuffer, U32 bufferSize) + { + U32 start = mBufSize; + if(!resize(mBufSize + bufferSize)) + return false; + memcpy(mDataPtr + start, dataBuffer, bufferSize); + return true; + } + + /// Appends the specified ByteBuffer to the end of this byte buffer. + /// returns fals if it does not own its own memory. + bool appendBuffer(const ByteBuffer &theBuffer) + { + return appendBuffer(theBuffer.getBuffer(), theBuffer.getBufferSize()); + } + /// Copies the current buffer into a newly allocated buffer that the ByteBuffer owns. void takeOwnership() *************** *** 166,174 **** } ! /// Encode the buffer to base 64, in place. Resizes the buffer.. RefPtr<ByteBuffer> encodeBase64() const; ! /// Decode the buffer from base 64, in place. Resizes the buffer. RefPtr<ByteBuffer> decodeBase64() const; /// Returns a 32 bit CRC for the buffer. U32 calculateCRC(U32 start = 0, U32 end = 0xFFFFFFFF, U32 crcVal = 0xFFFFFFFF) const; --- 184,200 ---- } ! /// Encode the buffer to base 64, returning the encoded buffer. RefPtr<ByteBuffer> encodeBase64() const; ! /// Decode the buffer from base 64, returning the decoded buffer. RefPtr<ByteBuffer> decodeBase64() const; + /// Computes an MD5 hash and returns it in a ByteBuffer + RefPtr<ByteBuffer> computeMD5Hash(U32 len = 0) const; + + /// Converts to ascii-hex, returning the encoded buffer. + RefPtr<ByteBuffer> encodeBase16() const; + /// Decodes the buffer from base 16, returning the decoded buffer. + RefPtr<ByteBuffer> decodeBase16() const; + /// Returns a 32 bit CRC for the buffer. U32 calculateCRC(U32 start = 0, U32 end = 0xFFFFFFFF, U32 crcVal = 0xFFFFFFFF) const; Index: tnlMethodDispatch.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlMethodDispatch.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** tnlMethodDispatch.cpp 28 Sep 2004 18:45:25 -0000 1.16 --- tnlMethodDispatch.cpp 14 Feb 2005 06:15:28 -0000 1.17 *************** *** 27,37 **** #include "tnlMethodDispatch.h" #include "tnlNetStringTable.h" ! ! void *TNL_gBasePtr = NULL; ! namespace TNL { - void *gThisPtr = NULL; - void *gStackPtr = NULL; struct TypeInfo --- 27,33 ---- #include "tnlMethodDispatch.h" #include "tnlNetStringTable.h" ! #include "tnlThread.h" namespace TNL { struct TypeInfo *************** *** 51,54 **** --- 47,51 ---- TypeU32, TypeF32, + TypeF64, TypeSignedInt, TypeInt, *************** *** 75,78 **** --- 72,76 ---- { "U32", sizeof(U32), true, true }, { "F32", sizeof(F32), true, true }, + { "F64", sizeof(F64), false, true }, { "SignedInt<", sizeof(SignedInt<32>), true, true }, { "Int<", sizeof(Int<32>), true, true }, *************** *** 193,197 **** info.bitCount = getValue(walk); } ! if(type == TypeF32 || type == TypeFloat || type == TypeSignedFloat) { if(numFloats < 13) --- 191,195 ---- info.bitCount = getValue(walk); } ! if(!info.isVector && (type == TypeF32 || type == TypeFloat || type == TypeSignedFloat)) { if(numFloats < 13) *************** *** 218,238 **** } ! #ifdef TNL_CPU_PPC ! U32 gRegisterSaves[8 + 13 + 1]; ! #endif void MethodArgList::marshall(MarshalledCall *theEvent) { PacketStream bstream; #if defined (TNL_CPU_PPC) ! U32 *intArg = gRegisterSaves; ! F32 *floatArg = (F32 *) (&gRegisterSaves[8]); ! void *stackPtr = (void *) gRegisterSaves[8 + 13]; stackPtr = (void *) (*((U8 **) stackPtr) + 24); // advance past linkage area of stack intArg++; // get rid of the "this" pointer. bool floatInRegs = true; #else ! U8 *ptr = (U8 *) TNL_gBasePtr; ptr += 4; // get rid of the return address and saved base ptr. #endif --- 216,246 ---- } ! ThreadStorage gRPCThreadStorage; ! ! RPCThreadStorage &getRPCThreadStorage() ! { ! RPCThreadStorage *val = (RPCThreadStorage *) gRPCThreadStorage.get(); ! if(!val) ! { ! val = new RPCThreadStorage; ! gRPCThreadStorage.set(val); ! } ! return *val; ! } void MethodArgList::marshall(MarshalledCall *theEvent) { PacketStream bstream; + RPCThreadStorage &sto = getRPCThreadStorage(); #if defined (TNL_CPU_PPC) ! U32 *intArg = sto.registerSaves; ! F32 *floatArg = (F32 *) (&sto.registerSaves[8]); ! void *stackPtr = (void *) sto.registerSaves[8 + 13]; stackPtr = (void *) (*((U8 **) stackPtr) + 24); // advance past linkage area of stack intArg++; // get rid of the "this" pointer. bool floatInRegs = true; #else ! U8 *ptr = (U8 *) sto.basePtr; ptr += 4; // get rid of the return address and saved base ptr. #endif *************** *** 315,318 **** --- 323,329 ---- floatArg++; break; + case TypeF64: + bstream.write(*((F64 *) intArg)); + break; case TypeSignedInt: bstream.writeSignedInt(((SignedInt<32> *) intArg)->value, argList[i].bitCount); *************** *** 392,414 **** } ! static U8 rpcReadData[MethodArgList::MaxRPCDataSize]; ! static U32 rpcReadOffsets[MethodArgList::MaxOffsets]; ! static U8 *rpcSTEOffsets[MethodArgList::MaxOffsets]; ! static U32 rpcSTEIndex[MethodArgList::MaxOffsets]; ! static U32 rpcNumSTEs; ! static U32 rpcNumOffsets; ! ! inline U8 *allocSpace(U8 **offsetDest, U32 ¤tSize, U32 requestSize) { ! if(rpcNumOffsets >= MethodArgList::MaxOffsets) return NULL; currentSize = fourByteAlign(currentSize); ! rpcReadOffsets[rpcNumOffsets++] = ((U8 *) offsetDest) - rpcReadData; if(requestSize + currentSize > MethodArgList::MaxRPCDataSize) return NULL; ! U8 *ret = rpcReadData + currentSize; *offsetDest = ret; --- 403,418 ---- } ! inline U8 *allocSpace(U8 **offsetDest, U32 ¤tSize, U32 requestSize, RPCThreadStorage &sto) { ! if(sto.rpcNumOffsets >= MethodArgList::MaxOffsets) return NULL; currentSize = fourByteAlign(currentSize); ! sto.rpcReadOffsets[sto.rpcNumOffsets++] = ((U8 *) offsetDest) - sto.rpcReadData; if(requestSize + currentSize > MethodArgList::MaxRPCDataSize) return NULL; ! U8 *ret = sto.rpcReadData + currentSize; *offsetDest = ret; *************** *** 419,424 **** bool MethodArgList::unmarshall(BitStream *bstream, MarshalledCall *theEvent) { ! rpcNumOffsets = 0; ! rpcNumSTEs = 0; U32 rpcCurrentSTEIndex = 0; --- 423,429 ---- bool MethodArgList::unmarshall(BitStream *bstream, MarshalledCall *theEvent) { ! RPCThreadStorage &sto = getRPCThreadStorage(); ! sto.rpcNumOffsets = 0; ! sto.rpcNumSTEs = 0; U32 rpcCurrentSTEIndex = 0; *************** *** 428,432 **** #endif U32 whichSTE = 0; ! U8 *argPtr= rpcReadData; for(S32 i = 0; i < argList.size(); i++) { --- 433,437 ---- #endif U32 whichSTE = 0; ! U8 *argPtr= sto.rpcReadData; for(S32 i = 0; i < argList.size(); i++) { *************** *** 435,439 **** if(argList[i].isVector) { ! VectorRep *vector = (VectorRep *) allocSpace((U8 **) arg, currentSize, sizeof(VectorRep)); if(!vector) goto errorOut; --- 440,444 ---- if(argList[i].isVector) { ! VectorRep *vector = (VectorRep *) allocSpace((U8 **) arg, currentSize, sizeof(VectorRep), sto); if(!vector) goto errorOut; *************** *** 444,450 **** if(argList[i].argType == TypeStringTableEntry) { ! rpcSTEIndex[rpcNumSTEs] = rpcCurrentSTEIndex; ! rpcSTEOffsets[rpcNumSTEs] = (U8 *) &vector->array; ! rpcNumSTEs++; rpcCurrentSTEIndex += vector->elementCount; argPtr += sizeof(U32); --- 449,455 ---- if(argList[i].argType == TypeStringTableEntry) { ! sto.rpcSTEIndex[sto.rpcNumSTEs] = rpcCurrentSTEIndex; ! sto.rpcSTEOffsets[sto.rpcNumSTEs] = (U8 *) &vector->array; ! sto.rpcNumSTEs++; rpcCurrentSTEIndex += vector->elementCount; argPtr += sizeof(U32); *************** *** 453,457 **** else { ! vector->array = allocSpace(&vector->array, currentSize, vector->elementCount * gTypes[argList[i].argType].size); if(!vector->array) goto errorOut; --- 458,462 ---- else { ! vector->array = allocSpace(&vector->array, currentSize, vector->elementCount * gTypes[argList[i].argType].size, sto); if(!vector->array) goto errorOut; *************** *** 514,517 **** --- 519,525 ---- bstream->read((F32 *) arg); break; + case TypeF64: + bstream->read((F64 *) arg); + break; case TypeSignedInt: ((SignedInt<32> *) arg)->value = bstream->readSignedInt(argList[i].bitCount); *************** *** 529,533 **** { char **stringPtr = (char **) arg; ! *stringPtr = (char *) allocSpace((U8 **) arg, currentSize, 256); if(!*stringPtr) goto errorOut; --- 537,541 ---- { char **stringPtr = (char **) arg; ! *stringPtr = (char *) allocSpace((U8 **) arg, currentSize, 256, sto); if(!*stringPtr) goto errorOut; *************** *** 538,546 **** break; case TypeStringTableEntryRef: ! if(rpcNumSTEs >= MethodArgList::MaxOffsets) goto errorOut; ! rpcSTEIndex[rpcNumSTEs] = rpcCurrentSTEIndex; ! rpcSTEOffsets[rpcNumSTEs] = arg; ! rpcNumSTEs++; rpcCurrentSTEIndex++; break; --- 546,554 ---- break; case TypeStringTableEntryRef: ! if(sto.rpcNumSTEs >= MethodArgList::MaxOffsets) goto errorOut; ! sto.rpcSTEIndex[sto.rpcNumSTEs] = rpcCurrentSTEIndex; ! sto.rpcSTEOffsets[sto.rpcNumSTEs] = arg; ! sto.rpcNumSTEs++; rpcCurrentSTEIndex++; break; *************** *** 553,562 **** case TypeByteBufferPtr: { ! ByteBuffer *buffer = (ByteBuffer *) allocSpace((U8 **) arg, currentSize, sizeof(ByteBuffer)); if(!buffer) goto errorOut; buffer->mOwnsMemory = false; buffer->mBufSize = bstream->readInt(ByteBufferSizeBitSize); ! buffer->mDataPtr = (U8 *) allocSpace(&buffer->mDataPtr, currentSize, buffer->mBufSize); if(!buffer->mDataPtr) goto errorOut; --- 561,570 ---- case TypeByteBufferPtr: { ! ByteBuffer *buffer = (ByteBuffer *) allocSpace((U8 **) arg, currentSize, sizeof(ByteBuffer), sto); if(!buffer) goto errorOut; buffer->mOwnsMemory = false; buffer->mBufSize = bstream->readInt(ByteBufferSizeBitSize); ! buffer->mDataPtr = (U8 *) allocSpace(&buffer->mDataPtr, currentSize, buffer->mBufSize, sto); if(!buffer->mDataPtr) goto errorOut; *************** *** 567,571 **** case TypeIPAddressRef: { ! IPAddress *ip = (IPAddress *) allocSpace((U8 **) arg, currentSize, sizeof(IPAddress)); if(!ip) goto errorOut; --- 575,579 ---- case TypeIPAddressRef: { ! IPAddress *ip = (IPAddress *) allocSpace((U8 **) arg, currentSize, sizeof(IPAddress), sto); if(!ip) goto errorOut; *************** *** 588,595 **** } theEvent->mSTEs.setSize(rpcCurrentSTEIndex); ! for(U32 i = 0; i < rpcNumSTEs; i++) ! *((StringTableEntry **) rpcSTEOffsets[i]) = &theEvent->mSTEs[rpcSTEIndex[i]]; ! theEvent->unmarshalledData.setBuffer(rpcReadData, currentSize, false); theEvent->unmarshalledData.takeOwnership(); --- 596,603 ---- } theEvent->mSTEs.setSize(rpcCurrentSTEIndex); ! for(U32 i = 0; i < sto.rpcNumSTEs; i++) ! *((StringTableEntry **) sto.rpcSTEOffsets[i]) = &theEvent->mSTEs[sto.rpcSTEIndex[i]]; ! theEvent->unmarshalledData.setBuffer(sto.rpcReadData, currentSize, false); theEvent->unmarshalledData.takeOwnership(); *************** *** 597,605 **** U8 *data; data = theEvent->unmarshalledData.getBuffer(); ! delta = data - rpcReadData; ! for(U32 i = 0; i < rpcNumOffsets; i++) { ! *((U8 **) (data + rpcReadOffsets[i])) += delta; } return true; --- 605,613 ---- U8 *data; data = theEvent->unmarshalledData.getBuffer(); ! delta = data - sto.rpcReadData; ! for(U32 i = 0; i < sto.rpcNumOffsets; i++) { ! *((U8 **) (data + sto.rpcReadOffsets[i])) += delta; } return true; Index: tnlUDP.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlUDP.h,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** tnlUDP.h 20 Apr 2004 04:27:19 -0000 1.1 --- tnlUDP.h 14 Feb 2005 06:15:28 -0000 1.2 *************** *** 52,55 **** --- 52,56 ---- { IPProtocol, ///< The standard Internet routing protocol + TCPProtocol, ///< The standard Internet guaranteed delivery protocol IPXProtocol, ///< Novell's IPX protocol IPv6Protocol, ///< The next generation 128-bit address internet protocol (not currently supported by TNL) *************** *** 184,187 **** --- 185,192 ---- /// returns IP addresses, with the port field set to 0. static void getInterfaceAddresses(Vector<Address> *addressVector); + + NetError connect(const Address &theAddress); + NetError recv(U8 *buffer, S32 bufferSize, S32 *bytesRead); + NetError send(const U8 *buffer, S32 bufferSize); }; Index: tnlDataChunker.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlDataChunker.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tnlDataChunker.h 27 Apr 2004 23:26:15 -0000 1.2 --- tnlDataChunker.h 14 Feb 2005 06:15:28 -0000 1.3 *************** *** 125,128 **** --- 125,133 ---- freeListHead = elem; } + + void freeBlocks() + { + DataChunker::freeBlocks(); + } }; Index: netStringTable.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/netStringTable.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** netStringTable.cpp 19 May 2004 20:47:46 -0000 1.2 --- netStringTable.cpp 14 Feb 2005 06:15:28 -0000 1.3 *************** *** 45,48 **** --- 45,49 ---- StringTableEntryId masterIndex; ///< index of the Node pointer in the master list StringTableEntryId nextIndex; ///< next string in this hash bucket. + U32 hash; ///< stored hash value of this string. U16 stringLen; ///< length of string in this node. U16 refCount; ///< number of StringTableEntry's that reference this node *************** *** 154,158 **** for(U32 i = 1; i < InitialNodeListSize; i++) mNodeList[i] = (Node *) (( (i + 1) << 1) | 1); // see the doco in stringTable.h for how free list entries are coded ! mNodeList[InitialNodeListSize - 1] = 0; mNodeList[0] = (Node *) mMemPool->alloc(sizeof(Node)); mNodeList[0]->stringData[0] = 0; --- 155,160 ---- for(U32 i = 1; i < InitialNodeListSize; i++) mNodeList[i] = (Node *) (( (i + 1) << 1) | 1); // see the doco in stringTable.h for how free list entries are coded ! ! mNodeList[InitialNodeListSize - 1] = NULL; mNodeList[0] = (Node *) mMemPool->alloc(sizeof(Node)); mNodeList[0]->stringData[0] = 0; *************** *** 268,271 **** --- 270,274 ---- stringNode->masterIndex = mNodeListFreeEntry >> 1; // shift off the low bit flag for the free list stringNode->nextIndex = 0; + stringNode->hash = key; *walk = stringNode->masterIndex; *************** *** 309,313 **** StringTableEntryId *walk; Node *stringNode; ! U32 key = hashString(val); walk = &mBuckets[key % mNumBuckets]; while(*walk) --- 312,316 ---- StringTableEntryId *walk; Node *stringNode; ! U32 key = hashStringn(val, len); walk = &mBuckets[key % mNumBuckets]; while(*walk) *************** *** 357,361 **** walk = temp->nextIndex; ! key = hashString(temp->stringData); temp->nextIndex = mBuckets[key % newSize]; mBuckets[key % newSize] = temp->masterIndex; --- 360,364 ---- walk = temp->nextIndex; ! key = temp->hash; temp->nextIndex = mBuckets[key % newSize]; mBuckets[key % newSize] = temp->masterIndex; *************** *** 372,376 **** // if the low bit is set, it's an entry in the free list. ! if(((StringTableEntryId) theNode) & 1) continue; newNode = (Node *) newData->alloc(sizeof(Node) + theNode->stringLen); --- 375,381 ---- // if the low bit is set, it's an entry in the free list. ! // if it is NULL it is the last entry (see the constructor) ! // this *may* not be the best fix, but it was a crash -pw ! if(((StringTableEntryId) theNode) & 1 || theNode == NULL) continue; newNode = (Node *) newData->alloc(sizeof(Node) + theNode->stringLen); *************** *** 379,382 **** --- 384,388 ---- newNode->masterIndex = theNode->masterIndex; newNode->nextIndex = theNode->nextIndex; + newNode->hash = theNode->hash; strcpy(newNode->stringData, theNode->stringData); mNodeList[i] = newNode; *************** *** 394,399 **** void decRef(StringTableEntryId index) { ! if(--mNodeList[index]->refCount) return; mFreeStringDataSize += mNodeList[index]->stringLen + sizeof(Node); mNodeList[index] = (Node *) mNodeListFreeEntry; --- 400,421 ---- void decRef(StringTableEntryId index) { ! Node *theNode = mNodeList[index]; ! if(--theNode->refCount) return; + + // remove from the hash table first: + StringTableEntryId *walk = &mBuckets[theNode->hash % mNumBuckets]; + Node *stringNode; + while(*walk) + { + stringNode = mNodeList[*walk]; + if(stringNode == theNode) + { + *walk = theNode->nextIndex; + break; + } + walk = &(stringNode->nextIndex); + } + mFreeStringDataSize += mNodeList[index]->stringLen + sizeof(Node); mNodeList[index] = (Node *) mNodeListFreeEntry; Index: tnlNetBase.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlNetBase.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tnlNetBase.h 4 Aug 2004 18:25:27 -0000 1.4 --- tnlNetBase.h 14 Feb 2005 06:15:28 -0000 1.5 *************** *** 655,656 **** --- 655,657 ---- }; #endif + --- NEW FILE: tnlThread.h --- //----------------------------------------------------------------------------------- // // Torque Network Library // Copyright (C) 2004 GarageGames.com, Inc. // For more information see http://www.opentnl.org // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // For use in products that are not compatible with the terms of the GNU // General Public License, alternative licensing options are available // from GarageGames.com. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // //------------------------------------------------------------------------------------ #ifndef _TNLTHREAD_H_ #define _TNLTHREAD_H_ #include "tnl.h" #include "tnlNetBase.h" #include "tnlMethodDispatch.h" #if defined (TNL_OS_WIN32) #include <windows.h> #else #include <pthread.h> #include <semaphore.h> #endif namespace TNL { /// Platform independent semaphore class. /// /// The semaphore class wraps OS specific semaphore functionality for thread synchronization. class Semaphore { #ifdef TNL_OS_WIN32 HANDLE mSemaphore; #else sem_t mSemaphore; #endif public: /// Semaphore constructor - initialCount specifies how many wait calls /// will be let through before an increment is required. Semaphore(U32 initialCount = 0, U32 maximumCount = 1024); ~Semaphore(); /// Thread calling wait will block as long as the semaphore's count /// is zero. If the semaphore is incremented, one of the waiting threads /// will be awakened and the semaphore will decrement. void wait(); /// Increments the semaphore's internal count. This will wake /// count threads that are waiting on this semaphore. void increment(U32 count = 1); }; /// Platform independent Mutual Exclusion implementation class Mutex { #ifdef TNL_OS_WIN32 CRITICAL_SECTION mLock; #else pthread_mutex_t mMutex; #endif public: /// Mutex constructor Mutex(); /// Mutex destructor ~Mutex(); /// Locks the Mutex. If another thread already has this Mutex /// locked, this call will block until it is unlocked. If the lock /// method is called from a thread that has already locked this Mutex, /// the call will not block and the thread will have to unlock /// the mutex for as many calls as were made to lock before another /// thread will be allowed to lock the Mutex. void lock(); /// Unlocks the Mutex. The behavior of this method is undefined if called /// by a thread that has not previously locked this Mutex. void unlock(); /// Attempts to acquire a lock to this Mutex, without blocking. /// Returns true if the calling thread was able to lock the Mutex and /// false if the Mutex was already locked by another thread. bool tryLock(); }; /// Platform independent Thread class. class Thread : public Object { protected: U32 mReturnValue; ///< Return value from thread function #ifdef TNL_OS_WIN32 HANDLE mThread; #else pthread_t mThread; #endif public: /// run function called when thread is started. virtual U32 run() = 0; /// Thread constructor. Thread(); /// Thread destructor. ~Thread(); /// starts the thread's main run function. void start(); }; /// Platform independent per-thread storage class. class ThreadStorage { #ifdef TNL_OS_WIN32 DWORD mTlsIndex; #else pthread_key_t mThreadKey; #endif public: /// ThreadStorage constructor. ThreadStorage(); /// ThreadStorage destructor. ~ThreadStorage(); /// returns the per-thread stored void pointer for this ThreadStorage. The default value is NULL. void *get(); /// sets the per-thread stored void pointer for this ThreadStorage object. void set(void *data); }; /// Structure representing a stored call to a ThreadQueue function struct ThreadQueueCall { MarshalledCall *c; MethodPointer p; }; /// Managing object for a queue of worker threads that pass /// messages back and forth to the main thread. ThreadQueue /// methods declared with the TNL_DECLARE_THREADQ_METHOD macro /// are special -- if they are called from the main thread, /// they will be executed on one of the worker threads and vice /// versa. class ThreadQueue : public Object { class ThreadQueueThread : public Thread { ThreadQueue *mThreadQueue; public: ThreadQueueThread(ThreadQueue *); U32 run(); }; friend class ThreadQueueThread; /// list of worker threads on this ThreadQueue Vector<Thread *> mThreads; /// list of calls to be processed by the worker threads Vector<ThreadQueueCall> mThreadCalls; /// list of calls to be processed by the main thread Vector<ThreadQueueCall> mResponseCalls; /// Synchronization variable that manages worker threads Semaphore mSemaphore; /// Internal Mutex for synchronizing access to thread call vectors. Mutex mLock; /// Storage variable that tracks whether this is the main thread or a worker thread. ThreadStorage mStorage; protected: /// Locks the ThreadQueue for access to member variables. void lock() { mLock.lock(); } /// Unlocks the ThreadQueue. void unlock() { mLock.unlock(); } /// Posts a marshalled call onto either the worker thread call list or the response call list. void postCall(ThreadQueueCall &theCall); /// Dispatches the next available worker thread call. Called internally by the worker threads when they awaken from the semaphore. void dispatchNextCall(); /// helper function to determine if the currently executing thread is a worker thread or the main thread. bool isMainThread() { return (bool) mStorage.get(); } ThreadStorage &getStorage() { return mStorage; } /// called by each worker thread when it starts for subclass initialization of worker threads. virtual void threadStart() { } public: /// ThreadQueue constructor. threadCount specifies the number of worker threads that will be created. ThreadQueue(U32 threadCount); ~ThreadQueue(); /// Dispatches all ThreadQueue calls queued by worker threads. This should /// be called periodically from a main loop. void dispatchResponseCalls(); }; /// Declares a ThreadQueue method on a subclass of ThreadQueue. #define TNL_DECLARE_THREADQ_METHOD(func, args) \ virtual void FN_CDECL func args; \ virtual void FN_CDECL func##_body args /// Declares the implementation of a ThreadQueue method. #define TNL_IMPLEMENT_THREADQ_METHOD(className, func, args) \ TNL::MethodArgList ThreadQ_##className##_##func(#className, #args); \ void FN_CDECL className::func args { \ SAVE_PARAMS \ ThreadQueueCall theCall; \ theCall.c = new MarshalledCall(&ThreadQ_##className##_##func); \ theCall.c->marshall(); \ void (FN_CDECL className::*fptr) args; \ fptr = &className::func##_body; \ theCall.p.v1 = *((U32 *) &fptr); \ if(sizeof(fptr) > sizeof(U32)) theCall.p.v2 = *(((U32 *) &fptr) + 1); \ if(sizeof(fptr) > 2*sizeof(U32)) theCall.p.v3 = *(((U32 *) &fptr) + 2); \ postCall(theCall); \ }\ void FN_CDECL className::func##_body args }; #endif Index: netConnection.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/netConnection.cpp,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** netConnection.cpp 28 Sep 2004 18:45:25 -0000 1.11 --- netConnection.cpp 14 Feb 2005 06:15:28 -0000 1.12 *************** *** 159,165 **** if(isAdaptive()) { ! timeoutCount = AdaptivePingRetryCount; ! if(!mPingSendCount) ! timeout = AdaptiveInitialPingTimeout; } if((time - mLastPingSendTime) > timeout) --- 159,172 ---- if(isAdaptive()) { ! if(hasUnackedSentPackets()) ! { ! timeout = AdaptiveUnackedSentPingTimeout; ! } ! else ! { ! timeoutCount = AdaptivePingRetryCount; ! if(!mPingSendCount) ! timeout = AdaptiveInitialPingTimeout; ! } } if((time - mLastPingSendTime) > timeout) *************** *** 370,374 **** --- 377,384 ---- mSymmetricCipher->setupCounter(pkSequenceNumber, pkHighestAck, pkPacketType, 0); if(!pstream->decryptAndCheckHash(MessageSignatureBytes, PacketHeaderByteSize, mSymmetricCipher)) + { + TNLLogMessage(LogNetConnection, "Packet failed crypto"); return false; + } } *************** *** 860,863 **** --- 870,875 ---- client->setInterface(connectionInterface); client->getConnectionParameters().mIsInitiator = true; + client->getConnectionParameters().mIsLocal = true; + server->getConnectionParameters().mIsLocal = true; server->setInterface(serverInterface); Index: tnlVector.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlVector.h,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** tnlVector.h 13 May 2004 19:21:49 -0000 1.4 --- tnlVector.h 14 Feb 2005 06:15:28 -0000 1.5 *************** *** 219,222 **** --- 219,223 ---- { checkSize(mElementCount + 1); + constructInPlace(&mArray[mElementCount]); mElementCount++; Index: tnlNetConnection.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlNetConnection.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tnlNetConnection.h 28 Sep 2004 18:45:25 -0000 1.8 --- tnlNetConnection.h 14 Feb 2005 06:15:28 -0000 1.9 *************** *** 104,107 **** --- 104,108 ---- Vector<Address> mPossibleAddresses; ///< List of possible addresses for the remote host in an arranged connection. bool mIsInitiator; ///< True if this host initiated the arranged connection. + bool mIsLocal; ///< True if this is a connectLocal connection. ByteBufferPtr mArrangedSecret; ///< The shared secret as arranged by the connection intermediary. bool mDebugObjectSizes; ///< This connection's initiator requested debugging size information during packet writes. *************** *** 118,121 **** --- 119,123 ---- mDebugObjectSizes = false; #endif + mIsLocal = false; } }; *************** *** 191,197 **** --- 193,203 ---- DefaultPingTimeout = 5000, ///< Default milliseconds to wait before sending a ping packet. DefaultPingRetryCount = 10, ///< Default number of unacknowledged pings to send before timing out. + AdaptiveUnackedSentPingTimeout = 3000, }; U32 mPingTimeout; ///< Milliseconds to wait before sending a ping packet. U32 mPingRetryCount; ///< Number of unacknowledged pings to send before timing out. + + /// Returns true if this connection has sent packets that have not yet been acked by the remote host. + bool hasUnackedSentPackets() { return mLastSendSeq != mHighestAckedSeq; } public: struct PacketNotify; Index: eventConnection.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/eventConnection.cpp,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** eventConnection.cpp 28 Sep 2004 18:45:24 -0000 1.5 --- eventConnection.cpp 14 Feb 2005 06:15:28 -0000 1.6 *************** *** 124,127 **** --- 124,132 ---- stream->read(&mEventClassCount); + U32 myCount = NetClassRep::getNetClassCount(getNetClassGroup(), NetClassTypeEvent); + + if(mEventClassCount > myCount) + return false; + if(!NetClassRep::isVersionBorderCount(getNetClassGroup(), NetClassTypeEvent, mEventClassCount)) return false; *************** *** 137,140 **** --- 142,151 ---- } + void EventConnection::processEvent(NetEvent *theEvent) + { + if(getConnectionState() == NetConnection::Connected) + theEvent->process(this); + } + void EventConnection::packetDropped(PacketNotify *pnotify) { *************** *** 421,425 **** if(unguaranteedPhase) { ! evt->process(this); delete evt; if(mErrorBuffer[0]) --- 432,436 ---- if(unguaranteedPhase) { ! processEvent(evt); delete evt; if(mErrorBuffer[0]) *************** *** 450,454 **** TNLLogMessageV(LogEventConnection, ("EventConnection %s: ProcessGuaranteed %d", getNetAddressString(), temp->mSeqCount)); ! temp->mEvent->process(this); mEventNoteChunker.free(temp); if(mErrorBuffer[0]) --- 461,465 ---- TNLLogMessageV(LogEventConnection, ("EventConnection %s: ProcessGuaranteed %d", getNetAddressString(), temp->mSeqCount)); ! processEvent(temp->mEvent); mEventNoteChunker.free(temp); if(mErrorBuffer[0]) *************** *** 460,464 **** { S32 classId = theEvent->getClassId(getNetClassGroup()); ! if(U32(classId) >= mEventClassCount) return false; --- 471,475 ---- { S32 classId = theEvent->getClassId(getNetClassGroup()); ! if(U32(classId) >= mEventClassCount && getConnectionState() == Connected) return false; Index: netInterface.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/netInterface.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** netInterface.cpp 3 Jun 2004 00:55:20 -0000 1.8 --- netInterface.cpp 14 Feb 2005 06:15:28 -0000 1.9 *************** *** 434,438 **** // lookup the connection in the addressTable ! NetConnection *conn = findConnection(sourceAddress); if(conn) conn->readRawPacket(pStream); --- 434,439 ---- // lookup the connection in the addressTable ! // if this packet causes a disconnection, keep the conn around until this function exits ! RefPtr<NetConnection> conn = findConnection(sourceAddress); if(conn) conn->readRawPacket(pStream); *************** *** 900,903 **** --- 901,905 ---- stream->readString(reason); + TNLLogMessageV(LogNetInterface, ("Received Connect Reject - reason %s", reason)); // if the reason is a bad puzzle solution, try once more with a // new nonce. Index: byteBuffer.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/byteBuffer.cpp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** byteBuffer.cpp 22 Apr 2004 20:42:25 -0000 1.2 --- byteBuffer.cpp 14 Feb 2005 06:15:25 -0000 1.3 *************** *** 49,52 **** --- 49,119 ---- } + RefPtr<ByteBuffer> ByteBuffer::encodeBase16() const + { + U32 outLen = getBufferSize() * 2 + 1; + ByteBuffer *ret = new ByteBuffer(outLen); + const U8 *buffer = getBuffer(); + U8 *outBuffer = ret->getBuffer(); + + S32 size = getBufferSize(); + for(S32 i = 0; i < size; i++) + { + U8 b = *buffer++; + U32 nib1 = b >> 4; + U32 nib2 = b & 0xF; + if(nib1 > 9) + *outBuffer++ = 'a' + nib1 - 10; + else + *outBuffer++ = '0' + nib1; + if(nib2 > 9) + *outBuffer++ = 'a' + nib2 - 10; + else + *outBuffer++ = '0' + nib2; + } + *outBuffer = 0; + return ret; + } + + RefPtr<ByteBuffer> ByteBuffer::decodeBase16() const + { + U32 outLen = getBufferSize() >> 1; + ByteBuffer *ret = new ByteBuffer(outLen); + const U8 *src = getBuffer(); + U8 *dst = ret->getBuffer(); + for(U32 i = 0; i < outLen; i++) + { + U8 out = 0; + U8 nib1 = *src++; + U8 nib2 = *src++; + if(nib1 >= '0' && nib1 <= '9') + out = (nib1 - '0') << 4; + else if(nib1 >= 'a' && nib1 <= 'f') + out = (nib1 - 'a' + 10) << 4; + else if(nib1 >= 'A' && nib1 <= 'A') + out = (nib1 - 'A' + 10) << 4; + if(nib2 >= '0' && nib2 <= '9') + out |= nib2 - '0'; + else if(nib2 >= 'a' && nib2 <= 'f') + out |= nib2 - 'a' + 10; + else if(nib2 >= 'A' && nib2 <= 'A') + out |= nib2 - 'A' + 10; + *dst++ = out; + } + return ret; + } + + RefPtr<ByteBuffer> ByteBuffer::computeMD5Hash(U32 len) const + { + if(!len) + len = getBufferSize(); + + ByteBuffer *ret = new ByteBuffer(16); + hash_state md; + md5_init(&md); + md5_process(&md, (unsigned char *) getBuffer(), len); + md5_done(&md, ret->getBuffer()); + return ret; + } + U32 ByteBuffer::calculateCRC(U32 start, U32 end, U32 crcVal) const { --- NEW FILE: thread.cpp --- //----------------------------------------------------------------------------------- // // Torque Network Library // Copyright (C) 2004 GarageGames.com, Inc. // For more information see http://www.opentnl.org // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation; either version 2 of the License, or // (at your option) any later version. // // For use in products that are not compatible with the terms of the GNU // General Public License, alternative licensing options are available // from GarageGames.com. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // //------------------------------------------------------------------------------------ #include "tnlThread.h" #include "tnlLog.h" namespace TNL { #ifdef TNL_OS_WIN32 Semaphore::Semaphore(U32 initialCount, U32 maximumCount) { mSemaphore = CreateSemaphore(NULL, initialCount, maximumCount, NULL); } Semaphore::~Semaphore() { CloseHandle(mSemaphore); } void Semaphore::wait() { WaitForSingleObject(mSemaphore, INFINITE); } void Semaphore::increment(U32 count) { ReleaseSemaphore(mSemaphore, count, NULL); } Mutex::Mutex() { InitializeCriticalSection(&mLock); } Mutex::~Mutex() { DeleteCriticalSection(&mLock); } void Mutex::lock() { EnterCriticalSection(&mLock); } void Mutex::unlock() { LeaveCriticalSection(&mLock); } bool Mutex::tryLock() { return false;// return TryEnterCriticalSection(&mLock); } ThreadStorage::ThreadStorage() { mTlsIndex = TlsAlloc(); } ThreadStorage::~ThreadStorage() { TlsFree(mTlsIndex); } void *ThreadStorage::get() { return TlsGetValue(mTlsIndex); } void ThreadStorage::set(void *value) { TlsSetValue(mTlsIndex, value); } DWORD WINAPI ThreadProc( LPVOID lpParameter ) { return ((Thread *) lpParameter)->run(); } U32 Thread::run() { return 0; } void Thread::start() { mThread = CreateThread(NULL, 0, ThreadProc, this, 0, NULL); mReturnValue = 0; } Thread::Thread() { } Thread::~Thread() { CloseHandle(mThread); } #else Semaphore::Semaphore(U32 initialCount, U32 maximumCount) { sem_init(&mSemaphore, 0, initialCount); } Semaphore::~Semaphore() { sem_destroy(&mSemaphore); } void Semaphore::wait() { sem_wait(&mSemaphore); } void Semaphore::increment(U32 count) { for(U32 i = 0; i < count; i++) sem_post(&mSemaphore); } Mutex::Mutex() { pthread_mutexattr_t attr; pthread_mutexattr_init(&attr); #ifdef TNL_OS_LINUX pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); #else pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); #endif pthread_mutex_init(&mMutex, &attr); pthread_mutexattr_destroy(&attr); } Mutex::~Mutex() { pthread_mutex_destroy(&mMutex); } void Mutex::lock() { pthread_mutex_lock(&mMutex); } void Mutex::unlock() { pthread_mutex_unlock(&mMutex); } bool Mutex::tryLock() { return false;// return TryEnterCriticalSection(&mLock); } ThreadStorage::ThreadStorage() { pthread_key_create(&mThreadKey, NULL); } ThreadStorage::~ThreadStorage() { pthread_key_delete(mThreadKey); } void *ThreadStorage::get() { pthread_getspecific(mThreadKey); } void ThreadStorage::set(void *value) { pthread_setspecific(mThreadKey, value); } void *ThreadProc(void *lpParameter) { return (void *) ((Thread *) lpParameter)->run(); } Thread::Thread() { } void Thread::start() { int val = pthread_create(&mThread, NULL, ThreadProc, this); mReturnValue = 0; } Thread::~Thread() { } #endif ThreadQueue::ThreadQueueThread::ThreadQueueThread(ThreadQueue *q) { mThreadQueue = q; } U32 ThreadQueue::ThreadQueueThread::run() { mThreadQueue->threadStart(); mThreadQueue->lock(); ThreadStorage &sto = mThreadQueue->getStorage(); sto.set((void *) 0); mThreadQueue->unlock(); for(;;) mThreadQueue->dispatchNextCall(); return 0; } ThreadQueue::ThreadQueue(U32 threadCount) { mStorage.set((void *) 1); for(U32 i = 0; i < threadCount; i++) { Thread *theThread = new ThreadQueueThread(this); mThreads.push_back(theThread); theThread->start(); } } ThreadQueue::~ThreadQueue() { } void ThreadQueue::dispatchNextCall() { mSemaphore.wait(); lock(); if(mThreadCalls.size() == 0) { unlock(); return; } ThreadQueueCall c = mThreadCalls.first(); mThreadCalls.pop_front(); unlock(); BitStream unmarshallData(c.c->marshalledData.getBuffer(), c.c->marshalledData.getBytePosition()); c.c->unmarshall(&unmarshallData); c.c->dispatch(this, &c.p); delete c.c; } void ThreadQueue::postCall(ThreadQueueCall &theCall) { lock(); if(isMainThread()) { mThreadCalls.push_back(theCall); unlock(); mSemaphore.increment(); } else { mResponseCalls.push_back(theCall); unlock(); } } void ThreadQueue::dispatchResponseCalls() { lock(); for(S32 i = 0; i < mResponseCalls.size(); i++) { ThreadQueueCall c = mResponseCalls[i]; BitStream unmarshallData(c.c->marshalledData.getBuffer(), c.c->marshalledData.getBytePosition()); c.c->unmarshall(&unmarshallData); c.c->dispatch(this, &c.p); delete c.c; } mResponseCalls.clear(); unlock(); } }; Index: tnlEventConnection.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlEventConnection.h,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tnlEventConnection.h 3 Jul 2004 20:01:46 -0000 1.2 --- tnlEventConnection.h 14 Feb 2005 06:15:28 -0000 1.3 *************** *** 109,112 **** --- 109,115 ---- virtual bool isDataToTransmit(); + /// Dispatches an event + void processEvent(NetEvent *theEvent); + //---------------------------------------------------------------- Index: tnl.vcproj =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnl.vcproj,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** tnl.vcproj 30 May 2004 20:54:54 -0000 1.5 --- tnl.vcproj 14 Feb 2005 06:15:28 -0000 1.6 *************** *** 277,280 **** --- 277,283 ---- </File> <File + RelativePath=".\thread.cpp"> + </File> + <File RelativePath="tnl.h"> </File> *************** *** 367,370 **** --- 370,376 ---- </File> <File + RelativePath=".\tnlThread.h"> + </File> + <File RelativePath=".\tnlTypes.h"> </File> Index: tnlMethodDispatch.h =================================================================== RCS file: /cvsroot/opentnl/tnl/tnl/tnlMethodDispatch.h,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** tnlMethodDispatch.h 28 Sep 2004 18:59:23 -0000 1.8 --- tnlMethodDispatch.h 14 Feb 2005 06:15:28 -0000 1.9 *************** *** 146,193 **** }; ! #if defined(TNL_SUPPORTS_VC_INLINE_X86_ASM) || defined(TNL_SUPPORTS_MWERKS_INLINE_X86_ASM) }; - // VC 6.0 and Codewarrior have problems with the usage of a namespace reference inside an - // inline assembly block, so we close the namespace and add this as a global global. ! extern void *TNL_gBasePtr; ! namespace TNL { ! #define SAVE_PARAMS __asm { lea eax, this }; __asm { mov TNL_gBasePtr, eax }; #elif defined(TNL_SUPPORTS_GCC_INLINE_X86_ASM ) ! }; ! extern void *TNL_gBasePtr; ! namespace TNL { ! #define SAVE_PARAMS TNL_gBasePtr = (void *) ((TNL::U8 *) __builtin_frame_address(0) + 8); #elif defined(TNL_SUPPORTS_GCC_INLINE_PPC_ASM ) ! extern U32 gRegisterSaves[8 + 13 + 1]; ! #define SAVE_PARAMS __asm__ volatile ( \ ! "mr r2, %0\n" \ ! "stw r3, 0(r2) \n" \ ! "stw r4, 4(r2) \n" \ ! "stw r5, 8(r2) \n" \ ! "stw r6, 12(r2) \n" \ ! "stw r7, 16(r2) \n" \ ! "stw r8, 20(r2) \n" \ ! "stw r9, 24(r2) \n" \ ! "stw r10, 28(r2) \n" \ ! "stfs f1, 32(r2) \n" \ ! "stfs f2, 36(r2) \n" \ ! "stfs f3, 40(r2) \n" \ ! "stfs f4, 44(r2) \n" \ ! "stfs f5, 48(r2) \n" \ ! "stfs f6, 52(r2) \n" \ ! "stfs f7, 56(r2) \n" \ ! "stfs f8, 60(r2) \n" \ ! "stfs f9, 64(r2) \n" \ ! "stfs f10, 68(r2) \n" \ ! "stfs f11, 72(r2) \n" \ ! "stfs f12, 76(r2) \n" \ ! "stfs f13, 80(r2) \n" \ ! "stw r1, 84(r2) \n" \ ! : : "r" (TNL::gRegisterSaves) : "r2" ); #else --- 146,203 ---- }; ! struct RPCThreadStorage ! { ! void *basePtr; ! #ifdef TNL_CPU_PPC ! U32 registerSaves[8 + 13 + 1]; ! #endif ! U8 rpcReadData[MethodArgList::MaxRPCDataSize]; ! U32 rpcReadOffsets[MethodArgList::MaxOffsets]; ! U8 *rpcSTEOffsets[MethodArgList::MaxOffsets]; ! U32 rpcSTEIndex[MethodArgList::MaxOffsets]; ! U32 rpcNumSTEs; ! U32 rpcNumOffsets; }; + extern RPCThreadStorage &getRPCThreadStorage(); ! #if defined(TNL_SUPPORTS_VC_INLINE_X86_ASM) || defined(TNL_SUPPORTS_MWERKS_INLINE_X86_ASM) ! ! #define SAVE_PARAMS { void *basePtr; __asm { lea eax, this }; __asm { mov basePtr, eax }; TNL::getRPCThreadStorage().basePtr = basePtr; } #elif defined(TNL_SUPPORTS_GCC_INLINE_X86_ASM ) ! #define SAVE_PARAMS { void *basePtr = (void *) ((TNL::U8 *) __builtin_frame_address(0) + 8); TNL::getRPCThreadStorage().basePtr = basePtr; } #elif defined(TNL_SUPPORTS_GCC_INLINE_PPC_ASM ) ! ! #define SAVE_PARAMS { \ ! U32 *registerSaves = TNL::getRPCThreadStorage().registerSaves; \ ! __asm__ volatile ( \ ! "mr r2, %0\n" \ ! "stw r3, 0(r2) \n" \ ! "stw r4, 4(r2) \n" \ ! "stw r5, 8(r2) \n" \ ! "stw r6, 12(r2) \n" \ ! "stw r7, 16(r2) \n" \ ! "stw r8, 20(r2) \n" \ ! "stw r9, 24(r2) \n" \ ! "stw r10, 28(r2) \n" \ ! "stfs f1, 32(r2) \n" \ ! "stfs f2, 36(r2) \n" \ ! "stfs f3, 40(r2) \n" \ ! "stfs f4, 44(r2) \n" \ ! "stfs f5, 48(r2) \n" \ ! "stfs f6, 52(r2) \n" \ ! "stfs f7, 56(r2) \n" \ ! "stfs f8, 60(r2) \n" \ ! "stfs f9, 64(r2) \n" \ ! "stfs f10, 68(r2) \n" \ ! "stfs f11, 72(r2) \n" \ ! "stfs f12, 76(r2) \n" \ ! ... [truncated message content] |
From: Mark F. <mar...@us...> - 2004-10-19 23:57:51
|
Update of /cvsroot/opentnl/tnl/exe/levels In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4290/exe/levels Modified Files: football2.txt football3.txt Log Message: Updated more levels to have filled in areas Index: football2.txt =================================================================== RCS file: /cvsroot/opentnl/tnl/exe/levels/football2.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** football2.txt 18 Oct 2004 00:09:21 -0000 1.7 --- football2.txt 19 Oct 2004 23:57:42 -0000 1.8 *************** *** 41,54 **** BarrierMaker 50 6.1 4.5 6.1 2.5 6.8 2.5 6.9 2.6 6.2 4.5 6.1 4.5 BarrierMaker 50 7.2 2.1 7.3 2.2 8.5 2.2 9.5 1.7 9.5 1.5 10.5 1.5 11.5 0.5 10.5 -0.5 9.2 -0.5 8.2 -1.5 7.5 -1.5 6.5 -0.5 6.5 0.5 7.5 0.5 7.5 1.5 7.3 1.5 7.2 1.6 7.2 2.1 ! BarrierMaker 50 3.5 -7 3 -6.5 ! BarrierMaker 50 2.5 -6 2 -5.5 ! BarrierMaker 50 3.6 -6.4 4.1 -5.9 ! BarrierMaker 50 3.5 -5.9 3.1 -5.5 ! BarrierMaker 50 2.5 -5.4 3 -4.9 ! BarrierMaker 50 3.5 -5.2 4.1 -4.6 ! BarrierMaker 50 4.8 -6.5 4.1 -6.5 3.8 -6.2 ! BarrierMaker 50 4.4 -6.9 4.4 -6.5 ! BarrierMaker 50 4.2 -5.3 5.1 -6.2 ! BarrierMaker 50 2.9 -4 3.8 -4.9 BarrierMaker 50 -2.8 -1.9 -2.4 -1.5 -2.4 -0.5 -2.8 -0.1 BarrierMaker 50 -2.2 0.5 -1.8 0.1 -1.8 -0.199999 --- 41,54 ---- BarrierMaker 50 6.1 4.5 6.1 2.5 6.8 2.5 6.9 2.6 6.2 4.5 6.1 4.5 BarrierMaker 50 7.2 2.1 7.3 2.2 8.5 2.2 9.5 1.7 9.5 1.5 10.5 1.5 11.5 0.5 10.5 -0.5 9.2 -0.5 8.2 -1.5 7.5 -1.5 6.5 -0.5 6.5 0.5 7.5 0.5 7.5 1.5 7.3 1.5 7.2 1.6 7.2 2.1 ! BarrierMaker 15 3.7 -6.8 3.2 -6.3 ! BarrierMaker 15 2.5 -6 2 -5.5 ! BarrierMaker 15 3.7 -6.3 4.2 -5.8 ! BarrierMaker 15 3.6 -5.8 3.2 -5.4 ! BarrierMaker 15 2.7 -5.3 3.2 -4.8 ! BarrierMaker 15 3.5 -5.2 4.1 -4.6 ! BarrierMaker 15 4.9 -6.4 4.2 -6.4 3.9 -6.1 ! BarrierMaker 15 4.5 -6.8 4.5 -6.4 ! BarrierMaker 15 4.1 -5.2 4.9 -6 ! BarrierMaker 15 2.9 -4 3.8 -4.9 BarrierMaker 50 -2.8 -1.9 -2.4 -1.5 -2.4 -0.5 -2.8 -0.1 BarrierMaker 50 -2.2 0.5 -1.8 0.1 -1.8 -0.199999 *************** *** 81,82 **** --- 81,107 ---- Turret -1 11.4 -5.3 Turret -1 10.3 -6.4 + BarrierMaker 190 7.2 1.8 8.5 1.8 9.2 1.5 9.2 1.2 10.3 1.2 11.2 0.3 + BarrierMaker 225 7.9 1.5 7.9 -1.5 + BarrierMaker 215 6.5 -0.1 10.5 -0.1 10.7 0.1 10.7 0.2 10.2 0.6 8.6 0.6 8.6 1.5 + BarrierMaker 320 7 0.5 7 -0.3 7.8 -1 8 -1 8.9 -0.1 + BarrierMaker 200 7.1 -2.5 7.1 -2 + BarrierMaker 200 7.1 -3.5 7.1 -3 + BarrierMaker 200 6 -1.8 6 -1.3 + BarrierMaker 100 3.9 -3.3 3.9 -3.2 4.3 -3.2 4.3 -3.7 4.2 -3.7 3.9 -3.3 + BarrierMaker 75 4.4 -3.8 4.4 -4 + BarrierMaker 75 3.7 -3.1 3.8 -3.3 + BarrierMaker 100 6.1 -5.3 6.1 -5.4 5.7 -5.4 5.7 -4.9 5.8 -4.9 6.1 -5.3 + BarrierMaker 75 5.6 -4.8 5.6 -4.6 + BarrierMaker 75 6.3 -5.5 6.2 -5.3 + BarrierMaker 255 10 -2.5 10 -4.7 10.9 -5.6 10.5 -6 9.6 -5.1 7.9 -5.1 7.9 -4.7 8.7 -3.9 10 -3.9 + BarrierMaker 115 9.6 -4.5 8.5 -4.5 + BarrierMaker 65 -1 -1 -1.6 -1.2 -1.7 -1.2 -1.7 -0.8 -1.7 -0.8 -1.1 -1 -1.7 -1 + BarrierMaker 190 5.2 0.1 5.2 -0.4 4.1 -1.5 4.1 -2.2 3.6 -2.2 1.7 -1.4 3.8 -1.4 3.8 -1.3 5.1 0.1 5.2 0.1 + BarrierMaker 60 3.2 -1.8 3.9 -1.8 + BarrierMaker 75 1.7 -1.5 1.3 -1.3 1.3 -1.2 1.4 -1.2 1.8 -1.3 + BarrierMaker 95 6.1 1.3 6 1.3 5.8 1.5 5.8 1.6 6.3 1.6 6.3 1.5 6.1 1.3 + BarrierMaker 65 6.2 4.3 6.2 2.6 6.7 2.6 6.7 2.8 6.2 4 + BarrierMaker 85 6.5 2.8 6.3 2.8 6.3 3.5 6.6 2.9 6.5 2.8 + BarrierMaker 145 5.8 6.6 5.9 6.5 6.1 6.5 6.2 6.6 6.2 7.1 6.1 7.2 5.9 7.2 5.8 7.1 5.8 6.6 + BarrierMaker 15 4.1 -7.1 4.1 -6.8 + BarrierMaker 15 2.8 -6.5 2.8 -6.8 3.1 -7.1 3.3 -7.1 Index: football3.txt =================================================================== RCS file: /cvsroot/opentnl/tnl/exe/levels/football3.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** football3.txt 18 Oct 2004 00:09:21 -0000 1.4 --- football3.txt 19 Oct 2004 23:57:42 -0000 1.5 *************** *** 104,105 **** --- 104,124 ---- Turret -1 -3.5 9.8 ForceFieldProjector -1 -5.2 4.5 + BarrierMaker 95 7.2 8.3 7.2 8.2 6.4 7.4 6.2 7.4 6.2 7.7 5.9 8 5.9 8.4 6.3 8.8 6.4 8.8 6.9 8.3 7.2 8.3 + BarrierMaker 200 6.4 8.4 6.2 8.2 6.5 7.9 6.7 8.1 6.4 8.4 + BarrierMaker 90 1.7 7.3 1.2 6.3 1.1 6.3 1.1 6.7 1.3 6.7 1.3 6.6 + BarrierMaker 85 -2.3 8.2 -2.3 7.6 -1.7 7.6 -2.2 7.8 -2 8 + BarrierMaker 85 -2.3 6.1 -2.3 6.7 -1.7 6.7 -2.2 6.5 -2 6.3 + BarrierMaker 85 -4.5 6.1 -4.5 6.7 -5.1 6.7 -4.6 6.5 -4.8 6.3 + BarrierMaker 85 -4.5 8.2 -4.5 7.6 -5.1 7.6 -4.6 7.8 -4.8 8 + BarrierMaker 80 -3.4 7.8 -3.6 7.8 -3.6 6.1 -3.4 6.1 -3.4 7.8 + BarrierMaker 235 7.3 1.8 8.8 2.1 8.7 2.6 8.2 2.8 7.2 2.1 7.3 1.8 + BarrierMaker 95 8.7 -1.6 9.5 -2.6 10 -2.2 9.9 -2 8.9 -1.8 + BarrierMaker 125 9.3 -1.9 9.7 -2.3 + BarrierMaker 295 6.5 -0.5 6.5 -0.8 6.4 -1.1 5.8 -2 4 -3 1.7 -3 0.4 -2.2 -0.5 -0.8 + BarrierMaker 195 0.2 -1.4 0.2 -0.6 -0.1 -0.4 -0.4 -0.4 -0.7 -0.7 -0.7 -1.1 + BarrierMaker 175 5.8 -1.5 5.8 -0.7 6.1 -0.4 6.8 -0.8 + BarrierMaker 235 1.2 3.4 1.2 3.5 0.5 3.6 -0.3 4.1 -1.1 4.2 -1.7 4 -1.9 3 -0.9 1.8 0.9 1 1 1.1 0.6 1.7 0.7 2.8 1.2 3.4 + BarrierMaker 90 1.4 3.2 1.7 3.7 + BarrierMaker 90 1.3 1.1 1.7 0.7 1.7 0.6 1.6 0.5 1 0.7 + BarrierMaker 50 1.2 0.9 1.5 0.6 + BarrierMaker 510 -1.6 3.4 0.6 2.3 |
From: Mark F. <mar...@us...> - 2004-10-19 23:57:51
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4290/zap Modified Files: barrier.cpp Log Message: Updated more levels to have filled in areas Index: barrier.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/barrier.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** barrier.cpp 19 Oct 2004 22:19:39 -0000 1.18 --- barrier.cpp 19 Oct 2004 23:57:42 -0000 1.19 *************** *** 60,64 **** double cosTheta = curEdge.dot(lastEdge); ! if(cosTheta >= 0) { F32 extendAmt = width * 0.5 * tan( acos(cosTheta) / 2 ); --- 60,64 ---- double cosTheta = curEdge.dot(lastEdge); ! if(cosTheta >= -0.01) { F32 extendAmt = width * 0.5 * tan( acos(cosTheta) / 2 ); |
From: Mark F. <mar...@us...> - 2004-10-19 22:19:50
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9198/zap Modified Files: UIGame.cpp barrier.cpp loadoutSelect.cpp loadoutSelect.h quickChat.cpp quickChat.h Log Message: Added disappear timer to loadout and chat menus Lightened the internal color of barriers Index: UIGame.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/UIGame.cpp,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** UIGame.cpp 5 Oct 2004 23:41:59 -0000 1.49 --- UIGame.cpp 19 Oct 2004 22:19:39 -0000 1.50 *************** *** 111,114 **** --- 111,118 ---- } } + else if(mCurrentMode == VChatMode) + mVChat.idle(timeDelta); + else if(mCurrentMode == LoadoutMode) + mLoadout.idle(timeDelta); mVoiceRecorder.idle(timeDelta); mIdleTimeDelta[mFrameIndex % FPSAvgCount] = timeDelta; Index: loadoutSelect.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/loadoutSelect.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** loadoutSelect.h 2 Aug 2004 18:11:54 -0000 1.6 --- loadoutSelect.h 19 Oct 2004 22:19:39 -0000 1.7 *************** *** 30,33 **** --- 30,34 ---- #include "tnlTypes.h" using namespace TNL; + #include "timer.h" namespace Zap *************** *** 40,47 **** --- 41,53 ---- U32 mWeapon[3]; U32 mCurrentIndex; + Timer mIdleTimer; + enum { + MenuTimeout = 3500, + }; public: LoadoutHelper(); void render(); + void idle(U32 delta); void show(bool fromController); bool processKey(U32 key); Index: quickChat.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/quickChat.h,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** quickChat.h 30 May 2004 00:16:13 -0000 1.6 --- quickChat.h 19 Oct 2004 22:19:39 -0000 1.7 *************** *** 31,34 **** --- 31,35 ---- #include "UI.h" #include "tnlNetStringTable.h" + #include "timer.h" namespace Zap *************** *** 52,59 **** --- 53,65 ---- bool mFromController; VChatNode *mCurNode; + Timer mIdleTimer; + enum { + MenuTimeout = 3500, + }; public: VChatHelper(); + void idle(U32 delta); void render(); void show(bool fromController); Index: loadoutSelect.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/loadoutSelect.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** loadoutSelect.cpp 2 Aug 2004 18:11:54 -0000 1.14 --- loadoutSelect.cpp 19 Oct 2004 22:19:39 -0000 1.15 *************** *** 80,83 **** --- 80,84 ---- mFromController = fromController; mCurrentIndex = 0; + mIdleTimer.reset(MenuTimeout); } *************** *** 122,125 **** --- 123,132 ---- } + void LoadoutHelper::idle(U32 delta) + { + if(mIdleTimer.update(delta)) + gGameUserInterface.setPlayMode(); + } + bool LoadoutHelper::processKey(U32 key) { *************** *** 148,151 **** --- 155,159 ---- if(!list[index].text) return false; + mIdleTimer.reset(MenuTimeout); switch(mCurrentIndex) Index: quickChat.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/quickChat.cpp,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** quickChat.cpp 8 Oct 2004 00:17:47 -0000 1.18 --- quickChat.cpp 19 Oct 2004 22:19:39 -0000 1.19 *************** *** 145,148 **** --- 145,155 ---- mCurNode = &mChatTree[0]; mFromController = OptionsMenuUserInterface::joystickType != -1; + mIdleTimer.reset(MenuTimeout); + } + + void VChatHelper::idle(U32 delta) + { + if(mIdleTimer.update(delta)) + gGameUserInterface.setPlayMode(); } *************** *** 176,179 **** --- 183,187 ---- if(match && walk->depth == matchLevel) { + mIdleTimer.reset(MenuTimeout); // select it... mCurNode = walk; Index: barrier.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/barrier.cpp,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** barrier.cpp 19 Oct 2004 19:43:58 -0000 1.17 --- barrier.cpp 19 Oct 2004 22:19:39 -0000 1.18 *************** *** 204,208 **** void Barrier::render(U32 layerIndex) { ! Color b(0,0,0.075), f(0,0,1); //Color b(0.0,0.0,0.075), f(.3 ,0.3,0.8); --- 204,208 ---- void Barrier::render(U32 layerIndex) { ! Color b(0,0,0.15), f(0,0,1); //Color b(0.0,0.0,0.075), f(.3 ,0.3,0.8); |
From: Mark F. <mar...@us...> - 2004-10-19 19:44:11
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2987/zap Modified Files: UIEditor.cpp barrier.cpp game.h main.cpp point.h Log Message: Fixed bugs with barrier width display in editor Index: UIEditor.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/UIEditor.cpp,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** UIEditor.cpp 18 Oct 2004 22:41:02 -0000 1.21 --- UIEditor.cpp 19 Oct 2004 19:43:58 -0000 1.22 *************** *** 42,45 **** --- 42,46 ---- void EditorUserInterface::setEditName(const char *name) { + mGridSize = Game::DefaultGridSize; mGameType[0] = 0; char fileBuffer[256]; *************** *** 59,63 **** mCreatingPoly = false; mCurrentTeam = 0; - mGridSize = Game::DefaultGridSize; strcpy(mEditFileName, name); --- 60,63 ---- *************** *** 169,178 **** mTeams.push_back(t); } - else if(!strcmp(argv[0], "GridSize") && argc == 2) - { - mGridSize = atof(argv[1]); - } else { Vector<const char *> item; for(S32 i = 0; i < argc; i++) --- 169,177 ---- mTeams.push_back(t); } else { + if(!strcmp(argv[0], "GridSize") && argc == 2) + mGridSize = atof(argv[1]); + Vector<const char *> item; for(S32 i = 0; i < argc; i++) *************** *** 310,313 **** --- 309,314 ---- } + extern void constructBarrierPoints(const Vector<Point> &vec, F32 width, Vector<Point> &barrierEnds ); + void EditorUserInterface::renderItem(S32 index) { *************** *** 364,378 **** else if(gGameItemRecs[i.index].isPoly) { if(i.selected) ! glColor3f(1,1,0); else if(i.index == ItemBarrierMaker) ! glColor3f(0,0,1); else if(i.team == -1) ! glColor3f(0.7, 0.7, 0.7); else { Color c = mTeams[i.team].color; ! glColor(c); } if(i.index != ItemBarrierMaker) --- 365,381 ---- else if(gGameItemRecs[i.index].isPoly) { + Color theColor; if(i.selected) ! theColor.set(1,1,0); else if(i.index == ItemBarrierMaker) ! theColor.set(0,0,1); else if(i.team == -1) ! theColor.set(0.7, 0.7, 0.7); else { Color c = mTeams[i.team].color; ! theColor = c; } + glColor(theColor); if(i.index != ItemBarrierMaker) *************** *** 389,418 **** else { glLineWidth(3); renderPoly(i); glLineWidth(1); - Point first = convertLevelToCanvasCoord(i.verts[0]); - for(S32 j = 1; j < i.verts.size(); j++) - { - Point v = convertLevelToCanvasCoord(i.verts[j]); - F32 width = i.width * mCurrentScale / mGridSize; - - Point dir = v - first; - if(dir.len() > 0) - { - dir.normalize(); - Point crs(dir.y, -dir.x); - crs *= width * 0.5; - - glBegin(GL_LINE_LOOP); - glColor3f(0.5, 0.5, 1); - glVertex(first + crs); - glVertex(first - crs); - glVertex(v - crs); - glVertex(v + crs); - glEnd(); - } - first = v; - } } for(S32 j = 0; j < i.verts.size(); j++) --- 392,415 ---- else { + Vector<Point> barPoints; + constructBarrierPoints(i.verts, i.width / mGridSize, barPoints ); + + for(S32 j = 0; j < barPoints.size(); j += 2) + { + Point dir = barPoints[j+1] - barPoints[j]; + Point crossVec(dir.y, -dir.x); + crossVec.normalize(i.width * 0.5 / mGridSize); + glBegin(GL_POLYGON); + glColor3f(0.5, 0.5, 1); + glVertex(convertLevelToCanvasCoord(barPoints[j] + crossVec)); + glVertex(convertLevelToCanvasCoord(barPoints[j] - crossVec)); + glVertex(convertLevelToCanvasCoord(barPoints[j+1] - crossVec)); + glVertex(convertLevelToCanvasCoord(barPoints[j+1] + crossVec)); + glEnd(); + } + glColor(theColor); glLineWidth(3); renderPoly(i); glLineWidth(1); } for(S32 j = 0; j < i.verts.size(); j++) Index: main.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/main.cpp,v retrieving revision 1.73 retrieving revision 1.74 diff -C2 -d -r1.73 -r1.74 *** main.cpp 8 Oct 2004 21:26:41 -0000 1.73 --- main.cpp 19 Oct 2004 19:43:58 -0000 1.74 *************** *** 602,605 **** --- 602,606 ---- else if(!stricmp(argv[i], "-window")) { + i--; OptionsMenuUserInterface::fullscreen = false; } Index: barrier.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/barrier.cpp,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** barrier.cpp 15 Oct 2004 18:01:15 -0000 1.16 --- barrier.cpp 19 Oct 2004 19:43:58 -0000 1.17 *************** *** 41,59 **** U32 Barrier::mBarrierChangeIndex = 1; ! void constructBarriers(Game *theGame, const Vector<F32> &barrier, F32 width) { ! Vector<Point> vec; ! bool loop; ! ! for(S32 i = 1; i < barrier.size(); i += 2) ! { ! float x = barrier[i-1]; ! float y = barrier[i]; ! vec.push_back(Point(x,y)); ! } ! if(vec.size() <= 1) ! return; ! ! loop = vec[0] == vec[vec.size() - 1]; Vector<Point> edgeVector; --- 41,47 ---- U32 Barrier::mBarrierChangeIndex = 1; ! void constructBarrierPoints(const Vector<Point> &vec, F32 width, Vector<Point> &barrierEnds ) { ! bool loop = vec[0] == vec[vec.size() - 1]; Vector<Point> edgeVector; *************** *** 71,75 **** Point curEdge = edgeVector[i]; double cosTheta = curEdge.dot(lastEdge); ! if(cosTheta >= 0) { --- 59,63 ---- Point curEdge = edgeVector[i]; double cosTheta = curEdge.dot(lastEdge); ! if(cosTheta >= 0) { *************** *** 97,101 **** Point start = vec[i] - edgeVector[i] * extendBack; Point end = vec[i+1] + edgeVector[i] * extendForward; ! Barrier *b = new Barrier(start, end, width); b->addToGame(theGame); } --- 85,111 ---- Point start = vec[i] - edgeVector[i] * extendBack; Point end = vec[i+1] + edgeVector[i] * extendForward; ! barrierEnds.push_back(start); ! barrierEnds.push_back(end); ! } ! } ! ! void constructBarriers(Game *theGame, const Vector<F32> &barrier, F32 width) ! { ! Vector<Point> vec; ! ! for(S32 i = 1; i < barrier.size(); i += 2) ! { ! float x = barrier[i-1]; ! float y = barrier[i]; ! vec.push_back(Point(x,y)); ! } ! if(vec.size() <= 1) ! return; ! ! Vector<Point> barrierEnds; ! constructBarrierPoints(vec, width, barrierEnds); ! for(S32 i = 0; i < barrierEnds.size(); i += 2) ! { ! Barrier *b = new Barrier(barrierEnds[i], barrierEnds[i+1], width); b->addToGame(theGame); } Index: game.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/game.h,v retrieving revision 1.70 retrieving revision 1.71 diff -C2 -d -r1.70 -r1.71 *** game.h 8 Oct 2004 21:19:28 -0000 1.70 --- game.h 19 Oct 2004 19:43:58 -0000 1.71 *************** *** 236,240 **** extern void endGame(); ! #define ZAP_GAME_STRING "ZAP 1.4.8" }; --- 236,240 ---- extern void endGame(); ! #define ZAP_GAME_STRING "ZAP 1.4.9" }; Index: point.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/point.h,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** point.h 1 Oct 2004 00:21:40 -0000 1.10 --- point.h 19 Oct 2004 19:43:58 -0000 1.11 *************** *** 57,61 **** Point &operator=(const Point &pt) { x = pt.x; y = pt.y; return *this; } ! bool operator==(const Point &pt) { return x == pt.x && y == pt.y; } member_type len() const { return (member_type) sqrt(x * x + y * y); } --- 57,61 ---- Point &operator=(const Point &pt) { x = pt.x; y = pt.y; return *this; } ! bool operator==(const Point &pt) const { return x == pt.x && y == pt.y; } member_type len() const { return (member_type) sqrt(x * x + y * y); } |
From: Mark F. <mar...@us...> - 2004-10-19 19:44:09
|
Update of /cvsroot/opentnl/tnl/exe/levels In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2987/exe/levels Modified Files: football1.txt Log Message: Fixed bugs with barrier width display in editor Index: football1.txt =================================================================== RCS file: /cvsroot/opentnl/tnl/exe/levels/football1.txt,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** football1.txt 18 Oct 2004 00:09:21 -0000 1.8 --- football1.txt 19 Oct 2004 19:43:58 -0000 1.9 *************** *** 25,29 **** BarrierMaker 50 3 -2 4 -0.5 4 -0.4 2.5 0.5 1.5 0 1.5 -0.1 2.9 -2 3 -2 BarrierMaker 50 4.5 -1 5 0.5 6 1.5 7.5 1 7.5 -1 7.4 -1.1 7.3 -1.1 6.5 0 6.4 0 5.5 -1.5 4.5 -1 ! BarrierMaker 50 5.5 2.5 5.5 4 5 4.5 5.5 5 6.5 4 7 4.5 8 4 8 3.9 7.5 3.5 7 2.5 7 2 6.9 2 6.5 3 6 3 6 2.5 5.5 2.5 BarrierMaker 165 4.1 5 3.5 5.7 3.7 5.9 4.4 5.7 4.5 6 4.4 6.2 3.9 6.3 3 6.1 3 6 3.3 5.5 3.7 5.1 4 4.9 4.1 5 BarrierMaker 115 6.2 6 6.2 6.3 6.4 6.3 6.8 5.6 6.6 5.4 6.5 5.4 6.2 6 --- 25,29 ---- BarrierMaker 50 3 -2 4 -0.5 4 -0.4 2.5 0.5 1.5 0 1.5 -0.1 2.9 -2 3 -2 BarrierMaker 50 4.5 -1 5 0.5 6 1.5 7.5 1 7.5 -1 7.4 -1.1 7.3 -1.1 6.5 0 6.4 0 5.5 -1.5 4.5 -1 ! BarrierMaker 60 5.5 2.5 5.5 4 5 4.5 5.5 5 6.5 4 7 4.5 8 4 8 3.9 7.5 3.5 7 2.5 7 2 6.9 2 6.5 3 6 3 6 2.5 5.5 2.5 BarrierMaker 165 4.1 5 3.5 5.7 3.7 5.9 4.4 5.7 4.5 6 4.4 6.2 3.9 6.3 3 6.1 3 6 3.3 5.5 3.7 5.1 4 4.9 4.1 5 BarrierMaker 115 6.2 6 6.2 6.3 6.4 6.3 6.8 5.6 6.6 5.4 6.5 5.4 6.2 6 *************** *** 57,58 **** --- 57,71 ---- LoadoutZone 0 4.5 2.1 4.3 2 4.3 3 4.5 2.9 BarrierMaker 50 4.3 1.8 4.7 2 4.7 3 4.3 3.2 + BarrierMaker 205 5.3 4.7 6.3 3.6 6.7 3.6 7.1 4.1 7.4 3.9 7.4 3.8 7 3.4 6.8 2.9 + BarrierMaker 75 5.7 2.6 5.8 2.6 5.8 3.2 6.5 3.2 6.5 3.3 5.9 3.4 5.7 3.9 5.7 2.6 + BarrierMaker 85 6.7 3.1 6.9 2.2 6.9 2.7 7 2.9 6.8 2.8 6.8 2.7 + BarrierMaker 50 7.7 3.8 7.7 4 7.9 3.9 7.7 3.8 + BarrierMaker 320 5 -1.2 5.6 0.4 5.9 0.2 5.1 -1.3 + BarrierMaker 75 7.3 -1 7.3 0.8 6.2 0.8 7.4 -1 + BarrierMaker 125 7.2 -0.4 7.2 0.6 6.7 0.6 7.2 -0.5 + BarrierMaker 235 5.3 0.2 6.1 1 7 0.7 6.5 0 + BarrierMaker 145 6.9 0.9 7.4 0.7 + BarrierMaker 130 2.9 -1.7 3 -1.7 3.7 -0.6 3.7 -0.5 2.5 0.3 1.8 -0.1 1.8 -0.2 2.9 -1.7 + BarrierMaker 285 2.2 0 3.3 -1.1 + BarrierMaker 130 -0.3 4.8 -0.2 4.8 -0.2 4.2 0.6 4.2 1.2 4.8 1.2 5.3 1.3 5.3 1.3 4.6 0.4 3.3 -0.8 3.7 -0.8 3.9 -0.3 4.4 -0.3 4.8 + BarrierMaker 170 -0.6 4 0.6 3.7 |
From: Mark F. <mar...@us...> - 2004-10-18 22:41:14
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28494/zap Modified Files: UIEditor.cpp Log Message: Added editor code to display the width of barriers Index: UIEditor.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/UIEditor.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** UIEditor.cpp 18 Oct 2004 00:09:22 -0000 1.20 --- UIEditor.cpp 18 Oct 2004 22:41:02 -0000 1.21 *************** *** 392,395 **** --- 392,418 ---- renderPoly(i); glLineWidth(1); + Point first = convertLevelToCanvasCoord(i.verts[0]); + for(S32 j = 1; j < i.verts.size(); j++) + { + Point v = convertLevelToCanvasCoord(i.verts[j]); + F32 width = i.width * mCurrentScale / mGridSize; + + Point dir = v - first; + if(dir.len() > 0) + { + dir.normalize(); + Point crs(dir.y, -dir.x); + crs *= width * 0.5; + + glBegin(GL_LINE_LOOP); + glColor3f(0.5, 0.5, 1); + glVertex(first + crs); + glVertex(first - crs); + glVertex(v - crs); + glVertex(v + crs); + glEnd(); + } + first = v; + } } for(S32 j = 0; j < i.verts.size(); j++) |
From: Mark F. <mar...@us...> - 2004-10-18 00:09:35
|
Update of /cvsroot/opentnl/tnl/exe/levels In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32370/exe/levels Modified Files: ctf1.txt ctf2.txt ctf3.txt ctf4.txt football1.txt football2.txt football3.txt football4.txt football5.txt hunters1.txt hunters2.txt rabbit1.txt rabbit2.txt retrieve1.txt retrieve2.txt retrieve3.txt soccer1.txt soccer2.txt zm1.txt Log Message: Added width field to barriers for variable-width barriers Index: hunters1.txt =================================================================== RCS file: /cvsroot/opentnl/tnl/exe/levels/hunters1.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** hunters1.txt 8 Oct 2004 00:17:47 -0000 1.4 --- hunters1.txt 18 Oct 2004 00:09:21 -0000 1.5 *************** *** 6,10 **** Teleporter -0.5 5.5 0 11.5 Teleporter 2 12.1 8.8 2.7 ! BarrierMaker 0.5 9 1.2 8.6 1.2 8.5 0.6 8.5 -0.2 8.8 -0.5 9.8 -0.3 10.2 0.4 9.9 0.5 9.8 0.3 9.4 0.5 9 RepairItem -0.5 8.9 Spawn 0 2.6 1.7 --- 6,10 ---- Teleporter -0.5 5.5 0 11.5 Teleporter 2 12.1 8.8 2.7 ! BarrierMaker 50 0.5 9 1.2 8.6 1.2 8.5 0.6 8.5 -0.2 8.8 -0.5 9.8 -0.3 10.2 0.4 9.9 0.5 9.8 0.3 9.4 0.5 9 RepairItem -0.5 8.9 Spawn 0 2.6 1.7 *************** *** 13,45 **** Spawn 0 6.2 3.2 Spawn 0 0.5 4.5 ! BarrierMaker 4.2 2 3.9 2.4 ! BarrierMaker 3.9 2.7 4.3 3 ! BarrierMaker 4.5 2 4.9 2.3 ! BarrierMaker 4.9 2.6 4.6 3 ! BarrierMaker 2 1.6 1 2 -1 5 -1 6 -0.1 6 -0.1 5.6 0.1 5.6 1 6.5 1.2 6.5 2.3 5 2.5 5 3.5 6 3.9 6.5 3.9 6.9 4 7.5 4.4 7.7 5.1 7.5 5.5 7.2 5.9 7.1 6.6 7.3 7.2 7.4 7.8 7.4 8.4 6.9 8.6 6 8.6 5.5 8.9 4.9 9.6 4.5 10 3.8 10 3.5 9.4 3.2 9.3 2.9 9.3 2.4 8.8 2.1 8.2 2.4 8 3.2 7.5 4.2 7.3 4.3 7.2 4.2 7.2 4 7.4 2.9 7.2 2 6.7 1.6 6.2 1.6 6 1 6 0.2 5.5 -0.3 5 -0.5 4.2 -0.4 3.3 0.3 2.7 1.1 2 1.6 ! BarrierMaker 0.7 4.8 0.4 5.1 0.5 5.4 1.1 5.2 1.9 4.6 1.8 4.4 0.7 4.8 ! BarrierMaker 1.1 4.1 0.7 4 0.7 3.4 1.6 2.8 2.3 3.3 2.3 3.4 1.1 4.1 ! BarrierMaker 3.5 4.4 3.1 4 3.2 3.5 ! BarrierMaker 8.7 4 8 4.2 7.9 4.4 8 5 8.1 5 8.8 4.2 8.7 4 ! BarrierMaker 6.8 4.5 6.3 3.6 6.1 3.7 6.3 5.2 6.4 5.3 6.8 5.2 6.8 4.5 ! BarrierMaker 4.5 5.2 4.4 5.3 4.9 6.2 5.1 6.2 5.8 5.7 5.8 5.6 4.5 5.2 ! BarrierMaker 5.2 4.8 4.6 4.8 4.6 4.5 ! BarrierMaker 5 4.4 5 4 4.3 4 4 4.4 ! BarrierMaker 4.2 0.7 5.2 1 5.3 0.9 5.4 0.3 5.3 0.2 4.2 0.5 4.2 0.7 ! BarrierMaker 5.7 1.8 5.7 2.8 6.3 2.8 ! BarrierMaker 6.3 2.2 6.8 2.2 6.8 3.4 ! BarrierMaker 7.4 5.3 7.4 6.2 6.7 6.6 6.7 6.8 7.3 7 7.8 6.4 Teleporter 4.8 -4.76837e-007 3.9 9.3 Teleporter 4.7 7.1 1.8 10.6 RepairItem 6 2.5 RepairItem 7.3 6.6 ! BarrierMaker 3.3 4.9 3.9 4.9 3.9 5.5 ! BarrierMaker 5 3.5 5.2 3.5 5.5 4.2 5.7 4.2 ! BarrierMaker 5.5 5.1 5.9 4.7 ! BarrierMaker 5.7 6.3 6.3 6 ! BarrierMaker 6.7 5.8 7 5.7 ! BarrierMaker -0.2 11.9 -0.5 10.9 -1 9.9 -0.8 8.7 0.1 7.9 1.2 8 1.8 8.3 1.8 8.8 0.9 9.3 0.9 9.4 1.1 9.6 1.2 9.6 2.7 9 3.5 9.2 4 9 4.1 9 4.3 9.4 4.3 9.5 3.7 9.7 3.2 11 2.7 11.8 2.7 11.9 3.2 12.1 3.2 12.2 2.8 12.6 1.7 12.5 1.4 11.5 1.8 11.2 2.2 11.5 2.3 11.5 2.8 10.4 3.1 9.9 2.9 9.6 2.3 9.7 1.4 10 1.4 10.1 1.6 10.3 1.7 10.3 1.9 10.1 2.5 9.9 2.6 9.9 2.7 10.1 2.2 11.1 2.1 11.1 1.8 10.9 1.2 11.3 1.1 11.2 0.8 10.3 0.5 10.3 0.1 10.7 0.5 11.6 0.4 11.7 -0.1 11.9 -0.2 11.9 ! BarrierMaker 8.4 3 8.8 3.2 ! BarrierMaker 8.4 3.6 8 3.8 ! BarrierMaker 8.7 3.6 9.2 3.7 ! BarrierMaker 2.1 2.5 2.2 2.7 2.6 2.9 3 2.8 3.1 2.4 3.1 2 3.3 1.6 3.8 1.5 4.4 1.5 4.5 1.4 4.4 1.2 3.9 1.1 3.7 0.9 3.5 0.9 3.3 1 3 1.5 2.7 2.1 2.5 2.1 2.3 2.2 2.1 2.4 2.1 2.5 --- 13,45 ---- Spawn 0 6.2 3.2 Spawn 0 0.5 4.5 ! BarrierMaker 50 4.2 2 3.9 2.4 ! BarrierMaker 50 3.9 2.7 4.3 3 ! BarrierMaker 50 4.5 2 4.9 2.3 ! BarrierMaker 50 4.9 2.6 4.6 3 ! BarrierMaker 50 2 1.6 1 2 -1 5 -1 6 -0.1 6 -0.1 5.6 0.1 5.6 1 6.5 1.2 6.5 2.3 5 2.5 5 3.5 6 3.9 6.5 3.9 6.9 4 7.5 4.4 7.7 5.1 7.5 5.5 7.2 5.9 7.1 6.6 7.3 7.2 7.4 7.8 7.4 8.4 6.9 8.6 6 8.6 5.5 8.9 4.9 9.6 4.5 10 3.8 10 3.5 9.4 3.2 9.3 2.9 9.3 2.4 8.8 2.1 8.2 2.4 8 3.2 7.5 4.2 7.3 4.3 7.2 4.2 7.2 4 7.4 2.9 7.2 2 6.7 1.6 6.2 1.6 6 1 6 0.2 5.5 -0.3 5 -0.5 4.2 -0.4 3.3 0.3 2.7 1.1 2 1.6 ! BarrierMaker 50 0.7 4.8 0.4 5.1 0.5 5.4 1.1 5.2 1.9 4.6 1.8 4.4 0.7 4.8 ! BarrierMaker 50 1.1 4.1 0.7 4 0.7 3.4 1.6 2.8 2.3 3.3 2.3 3.4 1.1 4.1 ! BarrierMaker 50 3.5 4.4 3.1 4 3.2 3.5 ! BarrierMaker 50 8.7 4 8 4.2 7.9 4.4 8 5 8.1 5 8.8 4.2 8.7 4 ! BarrierMaker 50 6.8 4.5 6.3 3.6 6.1 3.7 6.3 5.2 6.4 5.3 6.8 5.2 6.8 4.5 ! BarrierMaker 50 4.5 5.2 4.4 5.3 4.9 6.2 5.1 6.2 5.8 5.7 5.8 5.6 4.5 5.2 ! BarrierMaker 50 5.2 4.8 4.6 4.8 4.6 4.5 ! BarrierMaker 50 5 4.4 5 4 4.3 4 4 4.4 ! BarrierMaker 50 4.2 0.7 5.2 1 5.3 0.9 5.4 0.3 5.3 0.2 4.2 0.5 4.2 0.7 ! BarrierMaker 50 5.7 1.8 5.7 2.8 6.3 2.8 ! BarrierMaker 50 6.3 2.2 6.8 2.2 6.8 3.4 ! BarrierMaker 50 7.4 5.3 7.4 6.2 6.7 6.6 6.7 6.8 7.3 7 7.8 6.4 Teleporter 4.8 -4.76837e-007 3.9 9.3 Teleporter 4.7 7.1 1.8 10.6 RepairItem 6 2.5 RepairItem 7.3 6.6 ! BarrierMaker 50 3.3 4.9 3.9 4.9 3.9 5.5 ! BarrierMaker 50 5 3.5 5.2 3.5 5.5 4.2 5.7 4.2 ! BarrierMaker 50 5.5 5.1 5.9 4.7 ! BarrierMaker 50 5.7 6.3 6.3 6 ! BarrierMaker 50 6.7 5.8 7 5.7 ! BarrierMaker 50 -0.2 11.9 -0.5 10.9 -1 9.9 -0.8 8.7 0.1 7.9 1.2 8 1.8 8.3 1.8 8.8 0.9 9.3 0.9 9.4 1.1 9.6 1.2 9.6 2.7 9 3.5 9.2 4 9 4.1 9 4.3 9.4 4.3 9.5 3.7 9.7 3.2 11 2.7 11.8 2.7 11.9 3.2 12.1 3.2 12.2 2.8 12.6 1.7 12.5 1.4 11.5 1.8 11.2 2.2 11.5 2.3 11.5 2.8 10.4 3.1 9.9 2.9 9.6 2.3 9.7 1.4 10 1.4 10.1 1.6 10.3 1.7 10.3 1.9 10.1 2.5 9.9 2.6 9.9 2.7 10.1 2.2 11.1 2.1 11.1 1.8 10.9 1.2 11.3 1.1 11.2 0.8 10.3 0.5 10.3 0.1 10.7 0.5 11.6 0.4 11.7 -0.1 11.9 -0.2 11.9 ! BarrierMaker 50 8.4 3 8.8 3.2 ! BarrierMaker 50 8.4 3.6 8 3.8 ! BarrierMaker 50 8.7 3.6 9.2 3.7 ! BarrierMaker 50 2.1 2.5 2.2 2.7 2.6 2.9 3 2.8 3.1 2.4 3.1 2 3.3 1.6 3.8 1.5 4.4 1.5 4.5 1.4 4.4 1.2 3.9 1.1 3.7 0.9 3.5 0.9 3.3 1 3 1.5 2.7 2.1 2.5 2.1 2.3 2.2 2.1 2.4 2.1 2.5 Index: retrieve2.txt =================================================================== RCS file: /cvsroot/opentnl/tnl/exe/levels/retrieve2.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** retrieve2.txt 3 Aug 2004 22:48:43 -0000 1.3 --- retrieve2.txt 18 Oct 2004 00:09:21 -0000 1.4 *************** *** 15,36 **** GoalZone 1 5.9 6.4 6.1 6.4 6.1 6.6 5.9 6.6 LoadoutZone 1 3.6 9.2 3.2 9.2 3.2 7.8 3.6 7.8 ! BarrierMaker 4.3 8.9 4.3 8.1 ! BarrierMaker 6.5 8.1 6.5 8.9 Spawn 1 4 8.8 Spawn 1 4 9.2 Spawn 1 4 8.4 FlagItem -1 6.5 2.5 ! BarrierMaker 1.5 4 3.5 6 3.5 7 2.5 8 2.5 9 4.5 10 6.5 10 8.5 9 8.5 8 7.5 7 7.5 6 9.5 4 ! BarrierMaker 4 6.5 3.5 6.5 ! BarrierMaker 7 6.5 7.5 6.5 ! BarrierMaker 5.5 5.5 5.5 6.5 ! BarrierMaker 5.5 7 5.5 7.5 ! BarrierMaker 4.9 8.1 6.1 8.1 6.1 8.4 5.8 8.7 5.2 8.7 4.9 8.4 4.9 8.1 ! BarrierMaker 3.3 4.6 4 5.3 4.4 5.3 4.8 4.9 4.8 4.6 4.2 4 3.4 4 3.3 4.1 3.3 4.6 ! BarrierMaker 5.1 4 5.6 4.5 6 4.7 ! BarrierMaker 6.2 4.1 6.6 4.3 7.1 4.7 7.2 4.9 7.5 4.9 7.9 4.5 ! BarrierMaker 6.2 5.5 6.2 5.4 6.5 5 6.6 5 6.9 5.4 6.9 5.5 6.7 5.9 6.6 5.9 6.2 5.5 ForceFieldProjector 1 8.1 5.3 ! BarrierMaker 4.7 9.2 5 9.4 6 9.4 6.3 9.2 ForceFieldProjector 1 3.1 5.3 Turret 1 6.9 6.5 --- 15,36 ---- GoalZone 1 5.9 6.4 6.1 6.4 6.1 6.6 5.9 6.6 LoadoutZone 1 3.6 9.2 3.2 9.2 3.2 7.8 3.6 7.8 ! BarrierMaker 50 4.3 8.9 4.3 8.1 ! BarrierMaker 50 6.5 8.1 6.5 8.9 Spawn 1 4 8.8 Spawn 1 4 9.2 Spawn 1 4 8.4 FlagItem -1 6.5 2.5 ! BarrierMaker 50 1.5 4 3.5 6 3.5 7 2.5 8 2.5 9 4.5 10 6.5 10 8.5 9 8.5 8 7.5 7 7.5 6 9.5 4 ! BarrierMaker 50 4 6.5 3.5 6.5 ! BarrierMaker 50 7 6.5 7.5 6.5 ! BarrierMaker 50 5.5 5.5 5.5 6.5 ! BarrierMaker 50 5.5 7 5.5 7.5 ! BarrierMaker 50 4.9 8.1 6.1 8.1 6.1 8.4 5.8 8.7 5.2 8.7 4.9 8.4 4.9 8.1 ! BarrierMaker 50 3.3 4.6 4 5.3 4.4 5.3 4.8 4.9 4.8 4.6 4.2 4 3.4 4 3.3 4.1 3.3 4.6 ! BarrierMaker 50 5.1 4 5.6 4.5 6 4.7 ! BarrierMaker 50 6.2 4.1 6.6 4.3 7.1 4.7 7.2 4.9 7.5 4.9 7.9 4.5 ! BarrierMaker 50 6.2 5.5 6.2 5.4 6.5 5 6.6 5 6.9 5.4 6.9 5.5 6.7 5.9 6.6 5.9 6.2 5.5 ForceFieldProjector 1 8.1 5.3 ! BarrierMaker 50 4.7 9.2 5 9.4 6 9.4 6.3 9.2 ForceFieldProjector 1 3.1 5.3 Turret 1 6.9 6.5 *************** *** 45,65 **** GoalZone 2 9.29947 -1.0263 9.19947 -1.1995 9.37268 -1.29951 9.47268 -1.1263 LoadoutZone 2 12.8743 -0.434441 13.0743 -0.0880313 11.8619 0.611967 11.6619 0.26556 ! BarrierMaker 12.2645 -0.890658 11.5717 -0.490659 ! BarrierMaker 10.4717 -2.39592 11.1645 -2.79592 Spawn 2 12.3279 -0.580852 Spawn 2 12.6743 -0.780854 Spawn 2 11.9815 -0.380853 ! BarrierMaker 9.5 4 10.1531 1.25216 11.0191 0.752162 12.3851 1.11819 13.2511 0.618185 13.1172 -1.61386 12.1172 -3.34591 10.2511 -4.57797 9.38511 -4.07797 9.01908 -2.71194 8.15306 -2.21194 5.4 -3 ! BarrierMaker 10.3361 0.569148 10.5861 1.00216 ! BarrierMaker 8.83607 -2.02893 8.58607 -2.46194 ! BarrierMaker 8.72005 -0.229891 9.58607 -0.72989 ! BarrierMaker 10.0191 -0.979889 10.4521 -1.22989 ! BarrierMaker 11.2717 -1.01027 10.6717 -2.04951 10.9315 -2.19951 11.3413 -2.0897 11.6413 -1.57008 11.5315 -1.16028 11.2717 -1.01027 ! BarrierMaker 9.04062 2.12537 9.29684 1.16915 9.09684 0.822739 8.55043 0.676331 8.29062 0.826327 8.07101 1.64594 8.47101 2.33876 8.60761 2.37536 9.04062 2.12537 ! BarrierMaker 7.62101 0.866518 7.80402 0.183506 7.77723 -0.262901 ! BarrierMaker 7.15761 -0.136106 7.13082 -0.582516 7.22722 -1.21553 7.35043 -1.40213 7.20043 -1.66194 6.65402 -1.80835 ! BarrierMaker 8.37004 -0.836107 8.28344 -0.78611 7.78703 -0.845917 7.73703 -0.932518 7.93344 -1.39233 8.02005 -1.44233 8.46646 -1.46912 8.51646 -1.38252 8.37004 -0.836107 ForceFieldProjector 2 7.24684 -2.38155 ! BarrierMaker 12.3243 -1.38707 12.3475 -1.74688 11.8475 -2.6129 11.5243 -2.77271 ForceFieldProjector 2 9.74684 1.94857 Turret 2 8.88607 -1.94233 --- 45,65 ---- GoalZone 2 9.29947 -1.0263 9.19947 -1.1995 9.37268 -1.29951 9.47268 -1.1263 LoadoutZone 2 12.8743 -0.434441 13.0743 -0.0880313 11.8619 0.611967 11.6619 0.26556 ! BarrierMaker 50 12.2645 -0.890658 11.5717 -0.490659 ! BarrierMaker 50 10.4717 -2.39592 11.1645 -2.79592 Spawn 2 12.3279 -0.580852 Spawn 2 12.6743 -0.780854 Spawn 2 11.9815 -0.380853 ! BarrierMaker 50 9.5 4 10.1531 1.25216 11.0191 0.752162 12.3851 1.11819 13.2511 0.618185 13.1172 -1.61386 12.1172 -3.34591 10.2511 -4.57797 9.38511 -4.07797 9.01908 -2.71194 8.15306 -2.21194 5.4 -3 ! BarrierMaker 50 10.3361 0.569148 10.5861 1.00216 ! BarrierMaker 50 8.83607 -2.02893 8.58607 -2.46194 ! BarrierMaker 50 8.72005 -0.229891 9.58607 -0.72989 ! BarrierMaker 50 10.0191 -0.979889 10.4521 -1.22989 ! BarrierMaker 50 11.2717 -1.01027 10.6717 -2.04951 10.9315 -2.19951 11.3413 -2.0897 11.6413 -1.57008 11.5315 -1.16028 11.2717 -1.01027 ! BarrierMaker 50 9.04062 2.12537 9.29684 1.16915 9.09684 0.822739 8.55043 0.676331 8.29062 0.826327 8.07101 1.64594 8.47101 2.33876 8.60761 2.37536 9.04062 2.12537 ! BarrierMaker 50 7.62101 0.866518 7.80402 0.183506 7.77723 -0.262901 ! BarrierMaker 50 7.15761 -0.136106 7.13082 -0.582516 7.22722 -1.21553 7.35043 -1.40213 7.20043 -1.66194 6.65402 -1.80835 ! BarrierMaker 50 8.37004 -0.836107 8.28344 -0.78611 7.78703 -0.845917 7.73703 -0.932518 7.93344 -1.39233 8.02005 -1.44233 8.46646 -1.46912 8.51646 -1.38252 8.37004 -0.836107 ForceFieldProjector 2 7.24684 -2.38155 ! BarrierMaker 50 12.3243 -1.38707 12.3475 -1.74688 11.8475 -2.6129 11.5243 -2.77271 ForceFieldProjector 2 9.74684 1.94857 Turret 2 8.88607 -1.94233 *************** *** 74,109 **** GoalZone 0 1.21811 -0.365793 1.11811 -0.192588 0.944902 -0.292589 1.0449 -0.465794 LoadoutZone 0 -0.0567617 -3.75765 0.14324 -4.10406 1.35567 -3.40406 1.15567 -3.05765 ! BarrierMaker -0.146954 -3.00143 0.545867 -2.60143 ! BarrierMaker -0.554137 -0.696176 -1.24695 -1.09618 Spawn 0 0.0896502 -3.21124 Spawn 0 -0.256763 -3.41124 Spawn 0 0.436058 -3.01124 ! BarrierMaker 5.4 -3 2.76452 -2.24425 1.89849 -2.74426 1.53247 -4.11028 0.666444 -4.61028 -1.19958 -3.37823 -2.19958 -1.64618 -2.33356 0.585871 -1.46753 1.08587 -0.101507 0.719848 0.764518 1.21985 1.5 4 ! BarrierMaker 2.08151 -2.06124 2.33151 -2.49425 ! BarrierMaker 0.581508 0.536836 0.331509 0.969848 ! BarrierMaker 2.19753 -0.262203 1.33151 -0.762203 ! BarrierMaker 0.898495 -1.0122 0.465481 -1.2622 ! BarrierMaker 0.245867 -2.08182 -0.354134 -1.04259 -0.613945 -1.19259 -0.723751 -1.6024 -0.42375 -2.12201 -0.0139427 -2.23182 0.245867 -2.08182 ! BarrierMaker 4.07695 -1.71746 3.12074 -1.46124 2.92074 -1.11483 3.06715 -0.568422 3.32695 -0.418421 4.14657 -0.638035 4.54657 -1.33086 4.50996 -1.46746 4.07695 -1.71746 ! BarrierMaker 3.69657 0.141389 3.01356 0.3244 2.64035 0.570809 ! BarrierMaker 3.05997 1.04401 2.68676 1.29042 2.09035 1.52344 1.86715 1.51004 1.71715 1.76985 1.86356 2.31626 ! BarrierMaker 1.84753 0.344017 1.93413 0.394016 2.13054 0.853821 2.08055 0.940425 1.58413 1.00023 1.49753 0.950233 1.25112 0.577027 1.30112 0.490426 1.84753 0.344017 ForceFieldProjector 0 1.07074 2.08946 ! BarrierMaker -0.60676 -2.80502 -0.929967 -2.64522 -1.42996 -1.77919 -1.40676 -1.41938 ForceFieldProjector 0 3.57073 -2.24066 Turret 0 0.631507 0.450234 Turret 0 0.0324669 -1.5122 ! BarrierMaker 4 2.5 4.5 3 ! BarrierMaker 5.2 2.2 5.5 1.6 5.1 1.2 4.5 1.2 4 1.6 4 2.1 ! BarrierMaker 6.1 2 5.7 2.3 5.7 3 6.4 3.3 ! BarrierMaker 5.7 0.2 6.3 0.8 6.3 1.1 6.1 1.2 ! BarrierMaker 6.5 1.5 6.9 1.5 7.3 1.9 7.2 2.2 7.3 2.3 ! BarrierMaker 8.1 2.7 8.4 3.3 8.9 3.5 9.6 3.6 ! BarrierMaker 5.4 -1.3 5.5 -1.9 5.2 -2.3 4.8 -2.7 4.8 -2.8 ! BarrierMaker 5.1 -0.5 5.8 -0.5 6.3 -0.8 6.5 -1.1 ! BarrierMaker 3 3.5 2.5 3.5 2.3 3.4 2.1 3.4 2 3.5 2 3.8 1.7 4.2 ! BarrierMaker 3.6 3.2 4.3 2.8 ! BarrierMaker 2.6 2.7 3.4 2.3 ! BarrierMaker 4.6 0.2 4.6 0.6 4.9 0.6 5 0.5 4.8 0.2 4.6 0.2 Turret -1 8.2 3.1 Turret -1 4 3.1 --- 74,109 ---- GoalZone 0 1.21811 -0.365793 1.11811 -0.192588 0.944902 -0.292589 1.0449 -0.465794 LoadoutZone 0 -0.0567617 -3.75765 0.14324 -4.10406 1.35567 -3.40406 1.15567 -3.05765 ! BarrierMaker 50 -0.146954 -3.00143 0.545867 -2.60143 ! BarrierMaker 50 -0.554137 -0.696176 -1.24695 -1.09618 Spawn 0 0.0896502 -3.21124 Spawn 0 -0.256763 -3.41124 Spawn 0 0.436058 -3.01124 ! BarrierMaker 50 5.4 -3 2.76452 -2.24425 1.89849 -2.74426 1.53247 -4.11028 0.666444 -4.61028 -1.19958 -3.37823 -2.19958 -1.64618 -2.33356 0.585871 -1.46753 1.08587 -0.101507 0.719848 0.764518 1.21985 1.5 4 ! BarrierMaker 50 2.08151 -2.06124 2.33151 -2.49425 ! BarrierMaker 50 0.581508 0.536836 0.331509 0.969848 ! BarrierMaker 50 2.19753 -0.262203 1.33151 -0.762203 ! BarrierMaker 50 0.898495 -1.0122 0.465481 -1.2622 ! BarrierMaker 50 0.245867 -2.08182 -0.354134 -1.04259 -0.613945 -1.19259 -0.723751 -1.6024 -0.42375 -2.12201 -0.0139427 -2.23182 0.245867 -2.08182 ! BarrierMaker 50 4.07695 -1.71746 3.12074 -1.46124 2.92074 -1.11483 3.06715 -0.568422 3.32695 -0.418421 4.14657 -0.638035 4.54657 -1.33086 4.50996 -1.46746 4.07695 -1.71746 ! BarrierMaker 50 3.69657 0.141389 3.01356 0.3244 2.64035 0.570809 ! BarrierMaker 50 3.05997 1.04401 2.68676 1.29042 2.09035 1.52344 1.86715 1.51004 1.71715 1.76985 1.86356 2.31626 ! BarrierMaker 50 1.84753 0.344017 1.93413 0.394016 2.13054 0.853821 2.08055 0.940425 1.58413 1.00023 1.49753 0.950233 1.25112 0.577027 1.30112 0.490426 1.84753 0.344017 ForceFieldProjector 0 1.07074 2.08946 ! BarrierMaker 50 -0.60676 -2.80502 -0.929967 -2.64522 -1.42996 -1.77919 -1.40676 -1.41938 ForceFieldProjector 0 3.57073 -2.24066 Turret 0 0.631507 0.450234 Turret 0 0.0324669 -1.5122 ! BarrierMaker 50 4 2.5 4.5 3 ! BarrierMaker 50 5.2 2.2 5.5 1.6 5.1 1.2 4.5 1.2 4 1.6 4 2.1 ! BarrierMaker 50 6.1 2 5.7 2.3 5.7 3 6.4 3.3 ! BarrierMaker 50 5.7 0.2 6.3 0.8 6.3 1.1 6.1 1.2 ! BarrierMaker 50 6.5 1.5 6.9 1.5 7.3 1.9 7.2 2.2 7.3 2.3 ! BarrierMaker 50 8.1 2.7 8.4 3.3 8.9 3.5 9.6 3.6 ! BarrierMaker 50 5.4 -1.3 5.5 -1.9 5.2 -2.3 4.8 -2.7 4.8 -2.8 ! BarrierMaker 50 5.1 -0.5 5.8 -0.5 6.3 -0.8 6.5 -1.1 ! BarrierMaker 50 3 3.5 2.5 3.5 2.3 3.4 2.1 3.4 2 3.5 2 3.8 1.7 4.2 ! BarrierMaker 50 3.6 3.2 4.3 2.8 ! BarrierMaker 50 2.6 2.7 3.4 2.3 ! BarrierMaker 50 4.6 0.2 4.6 0.6 4.9 0.6 5 0.5 4.8 0.2 4.6 0.2 Turret -1 8.2 3.1 Turret -1 4 3.1 Index: football1.txt =================================================================== RCS file: /cvsroot/opentnl/tnl/exe/levels/football1.txt,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** football1.txt 3 Aug 2004 22:48:43 -0000 1.7 --- football1.txt 18 Oct 2004 00:09:21 -0000 1.8 *************** *** 1,6 **** ZoneControlGameType 10 32 - LevelName "Diamond" Team Blue 0 0 1 Team Red 1 0 0 GridSize 300 GoalZone -1 -1.9 2.1 -1.1 2.1 -1.1 2.9 -1.9 2.9 --- 1,6 ---- ZoneControlGameType 10 32 Team Blue 0 0 1 Team Red 1 0 0 + LevelName Diamond GridSize 300 GoalZone -1 -1.9 2.1 -1.1 2.1 -1.1 2.9 -1.9 2.9 *************** *** 9,13 **** GoalZone -1 3.1 -2.9 3.9 -2.9 3.9 -2.1 3.1 -2.1 LoadoutZone 0 9.9 -2.4 11.1 -2.4 10.9 -2 10.1 -2 ! BarrierMaker -2.5 4.5 -2.5 0.5 1.5 -3.5 5.5 -3.5 9.5 0.5 9.5 4.5 5.5 8.5 1.5 8.5 -2.5 4.5 FlagItem -1 3.5 2.5 Spawn 0 10.3 -2.6 --- 9,13 ---- GoalZone -1 3.1 -2.9 3.9 -2.9 3.9 -2.1 3.1 -2.1 LoadoutZone 0 9.9 -2.4 11.1 -2.4 10.9 -2 10.1 -2 ! BarrierMaker 50 -2.5 4.5 -2.5 0.5 1.5 -3.5 5.5 -3.5 9.5 0.5 9.5 4.5 5.5 8.5 1.5 8.5 -2.5 4.5 FlagItem -1 3.5 2.5 Spawn 0 10.3 -2.6 *************** *** 23,36 **** Turret -1 9.4 2.5 Turret -1 -2.4 2.5 ! BarrierMaker 3 -2 4 -0.5 4 -0.4 2.5 0.5 1.5 0 1.5 -0.1 2.9 -2 3 -2 ! BarrierMaker 4.5 -1 5 0.5 6 1.5 7.5 1 7.5 -1 7.4 -1.1 7.3 -1.1 6.5 0 6.4 0 5.5 -1.5 4.5 -1 ! BarrierMaker 5.5 2.5 5.5 4 5 4.5 5.5 5 6.5 4 7 4.5 8 4 8 3.9 7.5 3.5 7 2.5 7 2 6.9 2 6.5 3 6 3 6 2.5 5.5 2.5 ! BarrierMaker 4.5 4.5 4 5.5 4.1 5.6 4.5 5.5 5 6 4.9 6.2 4 6.5 2.5 6.1 2.5 6 3 5.5 3.5 5 4.4 4.4 4.5 4.5 ! BarrierMaker 6 6 6 6.5 6.5 6.5 7 5.5 6.6 5 6.5 5 6 6 ! BarrierMaker 0.5 3 1.5 4.5 1.5 5.5 1 5.5 1 5 0.5 4.5 0 4.5 0 5 -0.5 5 -0.5 4.5 -1 4 -1 3.5 0.5 3 ! BarrierMaker 2 6.5 2 7 1 7 ! BarrierMaker -1 2 -0.5 1 ! BarrierMaker 0 1 -0.5 2 ! BarrierMaker 0.5 2 0.5 1 0 0 ForceFieldProjector -1 6.4 1.5 ForceFieldProjector -1 4 -0.7 --- 23,36 ---- Turret -1 9.4 2.5 Turret -1 -2.4 2.5 ! BarrierMaker 50 3 -2 4 -0.5 4 -0.4 2.5 0.5 1.5 0 1.5 -0.1 2.9 -2 3 -2 ! BarrierMaker 50 4.5 -1 5 0.5 6 1.5 7.5 1 7.5 -1 7.4 -1.1 7.3 -1.1 6.5 0 6.4 0 5.5 -1.5 4.5 -1 ! BarrierMaker 50 5.5 2.5 5.5 4 5 4.5 5.5 5 6.5 4 7 4.5 8 4 8 3.9 7.5 3.5 7 2.5 7 2 6.9 2 6.5 3 6 3 6 2.5 5.5 2.5 ! BarrierMaker 165 4.1 5 3.5 5.7 3.7 5.9 4.4 5.7 4.5 6 4.4 6.2 3.9 6.3 3 6.1 3 6 3.3 5.5 3.7 5.1 4 4.9 4.1 5 ! BarrierMaker 115 6.2 6 6.2 6.3 6.4 6.3 6.8 5.6 6.6 5.4 6.5 5.4 6.2 6 ! BarrierMaker 50 0.5 3 1.5 4.5 1.5 5.5 1 5.5 1 5 0.5 4.5 0 4.5 0 5 -0.5 5 -0.5 4.5 -1 4 -1 3.5 0.5 3 ! BarrierMaker 50 2 6.5 2 7 1 7 ! BarrierMaker 50 -1 2 -0.5 1 ! BarrierMaker 50 0 1 -0.5 2 ! BarrierMaker 50 0.5 2 0.5 1 0 0 ForceFieldProjector -1 6.4 1.5 ForceFieldProjector -1 4 -0.7 *************** *** 38,42 **** Turret -1 1.6 5 ForceFieldProjector -1 5.2 4.9 ! BarrierMaker 10 -1.5 10.2 -1.5 10.3 -1.3 10.7 -1.3 10.8 -1.5 11 -1.5 11.5 -2.5 12 -2.5 12 -3.5 9 -3.5 9 -2.5 9.5 -2.5 10 -1.5 Teleporter 10.5 -1.7 3.5 1.7 LoadoutZone 1 -2.9 7.4 -4.1 7.4 -3.9 7 -3.1 7 --- 38,42 ---- Turret -1 1.6 5 ForceFieldProjector -1 5.2 4.9 ! BarrierMaker 50 10 -1.5 10.2 -1.5 10.3 -1.3 10.7 -1.3 10.8 -1.5 11 -1.5 11.5 -2.5 12 -2.5 12 -3.5 9 -3.5 9 -2.5 9.5 -2.5 10 -1.5 Teleporter 10.5 -1.7 3.5 1.7 LoadoutZone 1 -2.9 7.4 -4.1 7.4 -3.9 7 -3.1 7 *************** *** 51,58 **** Spawn 1 -2.9 8.3 Spawn 1 -2.4 8 ! BarrierMaker -3 6.5 -3.2 6.5 -3.3 6.3 -3.7 6.3 -3.8 6.5 -4 6.5 -4.5 7.5 -5 7.5 -5 8.5 -2 8.5 -2 7.5 -2.5 7.5 -3 6.5 Teleporter -3.5 6.7 3.5 3.3 LoadoutZone 1 2.5 2.1 2.7 2 2.7 3 2.5 2.9 ! BarrierMaker 2.7 1.8 2.3 2 2.3 3 2.7 3.2 LoadoutZone 0 4.5 2.1 4.3 2 4.3 3 4.5 2.9 ! BarrierMaker 4.3 1.8 4.7 2 4.7 3 4.3 3.2 --- 51,58 ---- Spawn 1 -2.9 8.3 Spawn 1 -2.4 8 ! BarrierMaker 50 -3 6.5 -3.2 6.5 -3.3 6.3 -3.7 6.3 -3.8 6.5 -4 6.5 -4.5 7.5 -5 7.5 -5 8.5 -2 8.5 -2 7.5 -2.5 7.5 -3 6.5 Teleporter -3.5 6.7 3.5 3.3 LoadoutZone 1 2.5 2.1 2.7 2 2.7 3 2.5 2.9 ! BarrierMaker 50 2.7 1.8 2.3 2 2.3 3 2.7 3.2 LoadoutZone 0 4.5 2.1 4.3 2 4.3 3 4.5 2.9 ! BarrierMaker 50 4.3 1.8 4.7 2 4.7 3 4.3 3.2 Index: soccer2.txt =================================================================== RCS file: /cvsroot/opentnl/tnl/exe/levels/soccer2.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** soccer2.txt 20 Jul 2004 18:31:42 -0000 1.3 --- soccer2.txt 18 Oct 2004 00:09:21 -0000 1.4 *************** *** 4,18 **** Team Red 1 0 0 GridSize 280 ! BarrierMaker 0 1 5 1 5.5 0 6.5 0 7 1 12 1 12 4 9 6 9 10 12 12 12 15 7 15 6.5 16 5.5 16 5 15 0 15 0 12 3 10 3 6 0 4 0 1 ! BarrierMaker 5 13 5 12.5 4 12.5 4 12.6 4.9 13 5 13 ! BarrierMaker 4 12 5 12 5 10.7 5.1 10.7 5.5 11 ! BarrierMaker 8 13 7 13 7 11 ! BarrierMaker 3.5 11.5 3.5 10.5 3.8 10.2 ! BarrierMaker 4.5 10.2 4.5 11 4 11.5 ! BarrierMaker 3.5 14 4 14 ! BarrierMaker 1.5 14 3 14 3 12.5 2.9 12.5 1.5 13.9 1.5 14 ! BarrierMaker 1 13.5 1.1 13.6 2.5 12.2 2.5 11.8 2.3 11.8 1 12.8 1 13.5 ! BarrierMaker 7 14 7.5 14 7.5 13.9 7.1 13.5 7 13.5 7 14 ! BarrierMaker 7.5 12 8 12 8 11 7.5 11 7.5 12 Spawn 1 -0.5 8.6 Spawn 1 -0.5 8 --- 4,18 ---- Team Red 1 0 0 GridSize 280 ! BarrierMaker 50 0 1 5 1 5.5 0 6.5 0 7 1 12 1 12 4 9 6 9 10 12 12 12 15 7 15 6.5 16 5.5 16 5 15 0 15 0 12 3 10 3 6 0 4 0 1 ! BarrierMaker 50 5 13 5 12.5 4 12.5 4 12.6 4.9 13 5 13 ! BarrierMaker 50 4 12 5 12 5 10.7 5.1 10.7 5.5 11 ! BarrierMaker 50 8 13 7 13 7 11 ! BarrierMaker 50 3.5 11.5 3.5 10.5 3.8 10.2 ! BarrierMaker 50 4.5 10.2 4.5 11 4 11.5 ! BarrierMaker 50 3.5 14 4 14 ! BarrierMaker 50 1.5 14 3 14 3 12.5 2.9 12.5 1.5 13.9 1.5 14 ! BarrierMaker 50 1 13.5 1.1 13.6 2.5 12.2 2.5 11.8 2.3 11.8 1 12.8 1 13.5 ! BarrierMaker 50 7 14 7.5 14 7.5 13.9 7.1 13.5 7 13.5 7 14 ! BarrierMaker 50 7.5 12 8 12 8 11 7.5 11 7.5 12 Spawn 1 -0.5 8.6 Spawn 1 -0.5 8 *************** *** 24,28 **** SoccerBallItem 6 8 GoalZone 0 5.2 15 6.8 15 6.4 15.8 5.6 15.8 ! BarrierMaker 1 7.4 0 7.4 -0.2 7 -0.8 7 -1 7.4 -2 7.4 -2 7.6 -2.4 7.8 -2.4 8.2 -2 8.4 -2 8.6 -1 8.6 -0.8 9 -0.2 9 0 8.6 1 8.6 1 8.4 1.4 8.2 1.4 7.8 1 7.6 1 7.4 Teleporter -2 8 4.3 6.3 Teleporter 1 8 7.7 6.3 --- 24,28 ---- SoccerBallItem 6 8 GoalZone 0 5.2 15 6.8 15 6.4 15.8 5.6 15.8 ! BarrierMaker 50 1 7.4 0 7.4 -0.2 7 -0.8 7 -1 7.4 -2 7.4 -2 7.6 -2.4 7.8 -2.4 8.2 -2 8.4 -2 8.6 -1 8.6 -0.8 9 -0.2 9 0 8.6 1 8.6 1 8.4 1.4 8.2 1.4 7.8 1 7.6 1 7.4 Teleporter -2 8 4.3 6.3 Teleporter 1 8 7.7 6.3 *************** *** 36,71 **** Spawn 0 12.8 7.7 Spawn 0 12.8 8.3 ! BarrierMaker 14 7.4 13 7.4 12.8 7 12.2 7 12 7.4 11 7.4 11 7.6 10.6 7.8 10.6 8.2 11 8.4 11 8.6 12 8.6 12.2 9 12.8 9 13 8.6 14 8.6 14 8.4 14.4 8.2 14.4 7.8 14 7.6 14 7.4 LoadoutZone 0 11.4 8.5 11.4 7.5 11.8 7.5 11.8 8.5 LoadoutZone 0 13.2 8.5 13.2 7.5 13.6 7.5 13.6 8.5 Teleporter 11 8 4.3 9.7 Teleporter 14 8 7.7 9.7 ! BarrierMaker 5.2 6.5 5 6.5 4.5 7 4 7 ! BarrierMaker 5.2 9.5 5 9.5 4.5 9 4 9 ! BarrierMaker 7 10 7 9.5 7.5 9 8 9 ! BarrierMaker 7 6 7 6.5 7.5 7 8 7 Turret 0 5.2 15 Turret 0 6.8 15 ! BarrierMaker 9.7 11.5 9.1 12.1 9.6 12.6 10.6 12.6 10.6 12.1 9.7 11.5 ! BarrierMaker 11.3 12.5 11.3 13 9.9 14.4 9.3 14.4 ! BarrierMaker 11.2 13.9 11.3 13.9 11.6 14.3 11.6 14.4 11 14.5 10.9 14.5 10.9 14.4 11.2 13.9 Turret -1 5.1 9.7 ForceFieldProjector 0 5.6 11.1 ! BarrierMaker 5 3 5 3.5 4 3.5 4 3.4 4.9 3 5 3 ! BarrierMaker 4 4 5 4 5 5.3 5.1 5.3 5.5 5 ! BarrierMaker 8 3 7 3 7 5 ! BarrierMaker 3.5 4.5 3.5 5.5 3.8 5.8 ! BarrierMaker 4.5 5.8 4.5 5 4 4.5 ! BarrierMaker 3.5 2 4 2 ! BarrierMaker 1.5 2 3 2 3 3.5 2.9 3.5 1.5 2.1 1.5 2 ! BarrierMaker 1 2.5 1.1 2.4 2.5 3.8 2.5 4.2 2.3 4.2 1 3.2 1 2.5 ! BarrierMaker 7 2 7.5 2 7.5 2.1 7.1 2.5 7 2.5 7 2 ! BarrierMaker 7.5 4 8 4 8 5 7.5 5 7.5 4 GoalZone 1 5.2 0.999999 6.8 0.999999 6.4 0.2 5.6 0.2 Turret 1 5.2 0.999998 Turret 1 6.8 0.999998 ! BarrierMaker 9.7 4.5 9.1 3.9 9.6 3.4 10.6 3.4 10.6 3.9 9.7 4.5 ! BarrierMaker 11.3 3.5 11.3 3 9.9 1.6 9.3 1.6 ! BarrierMaker 11.2 2.1 11.3 2.1 11.6 1.7 11.6 1.6 11 1.5 10.9 1.5 10.9 1.6 11.2 2.1 Turret -1 5.1 6.3 ForceFieldProjector 1 5.6 4.9 --- 36,71 ---- Spawn 0 12.8 7.7 Spawn 0 12.8 8.3 ! BarrierMaker 50 14 7.4 13 7.4 12.8 7 12.2 7 12 7.4 11 7.4 11 7.6 10.6 7.8 10.6 8.2 11 8.4 11 8.6 12 8.6 12.2 9 12.8 9 13 8.6 14 8.6 14 8.4 14.4 8.2 14.4 7.8 14 7.6 14 7.4 LoadoutZone 0 11.4 8.5 11.4 7.5 11.8 7.5 11.8 8.5 LoadoutZone 0 13.2 8.5 13.2 7.5 13.6 7.5 13.6 8.5 Teleporter 11 8 4.3 9.7 Teleporter 14 8 7.7 9.7 ! BarrierMaker 50 5.2 6.5 5 6.5 4.5 7 4 7 ! BarrierMaker 50 5.2 9.5 5 9.5 4.5 9 4 9 ! BarrierMaker 50 7 10 7 9.5 7.5 9 8 9 ! BarrierMaker 50 7 6 7 6.5 7.5 7 8 7 Turret 0 5.2 15 Turret 0 6.8 15 ! BarrierMaker 50 9.7 11.5 9.1 12.1 9.6 12.6 10.6 12.6 10.6 12.1 9.7 11.5 ! BarrierMaker 50 11.3 12.5 11.3 13 9.9 14.4 9.3 14.4 ! BarrierMaker 50 11.2 13.9 11.3 13.9 11.6 14.3 11.6 14.4 11 14.5 10.9 14.5 10.9 14.4 11.2 13.9 Turret -1 5.1 9.7 ForceFieldProjector 0 5.6 11.1 ! BarrierMaker 50 5 3 5 3.5 4 3.5 4 3.4 4.9 3 5 3 ! BarrierMaker 50 4 4 5 4 5 5.3 5.1 5.3 5.5 5 ! BarrierMaker 50 8 3 7 3 7 5 ! BarrierMaker 50 3.5 4.5 3.5 5.5 3.8 5.8 ! BarrierMaker 50 4.5 5.8 4.5 5 4 4.5 ! BarrierMaker 50 3.5 2 4 2 ! BarrierMaker 50 1.5 2 3 2 3 3.5 2.9 3.5 1.5 2.1 1.5 2 ! BarrierMaker 50 1 2.5 1.1 2.4 2.5 3.8 2.5 4.2 2.3 4.2 1 3.2 1 2.5 ! BarrierMaker 50 7 2 7.5 2 7.5 2.1 7.1 2.5 7 2.5 7 2 ! BarrierMaker 50 7.5 4 8 4 8 5 7.5 5 7.5 4 GoalZone 1 5.2 0.999999 6.8 0.999999 6.4 0.2 5.6 0.2 Turret 1 5.2 0.999998 Turret 1 6.8 0.999998 ! BarrierMaker 50 9.7 4.5 9.1 3.9 9.6 3.4 10.6 3.4 10.6 3.9 9.7 4.5 ! BarrierMaker 50 11.3 3.5 11.3 3 9.9 1.6 9.3 1.6 ! BarrierMaker 50 11.2 2.1 11.3 2.1 11.6 1.7 11.6 1.6 11 1.5 10.9 1.5 10.9 1.6 11.2 2.1 Turret -1 5.1 6.3 ForceFieldProjector 1 5.6 4.9 Index: rabbit2.txt =================================================================== RCS file: /cvsroot/opentnl/tnl/exe/levels/rabbit2.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** rabbit2.txt 4 Aug 2004 18:25:26 -0000 1.3 --- rabbit2.txt 18 Oct 2004 00:09:21 -0000 1.4 *************** *** 4,20 **** FlagItem 4.7 4.7 GridSize 300 ! BarrierMaker 1 1 3 3 ! BarrierMaker 5 3 7 1 ! BarrierMaker 5 5 7 7 ! BarrierMaker 3 5 1 7 ! BarrierMaker 3 1 4 0.3 5 1 ! BarrierMaker 7 3 8.3 4 7 5 ! BarrierMaker 5 7 4 7.7 3 7 ! BarrierMaker 1 5 -0.3 4 1 3 Spawn 0 1 6 Spawn 0 1 2 Spawn 0 6 1 Spawn 0 2 1 ! BarrierMaker 5 9 4 10 3 9 1 9 0 8 -1 6 -3 5 -4 4 -3 3 -1 2 0 0 1 -1 3 -1 4 -2 5 -1 7 -1 8 0 9 2 11 3 12 4 11 5 9 6 8 8 7 9 5 9 Teleporter -3 4 10 4 Teleporter 11 4 -2 4 --- 4,20 ---- FlagItem 4.7 4.7 GridSize 300 ! BarrierMaker 50 1 1 3 3 ! BarrierMaker 50 5 3 7 1 ! BarrierMaker 50 5 5 7 7 ! BarrierMaker 50 3 5 1 7 ! BarrierMaker 50 3 1 4 0.3 5 1 ! BarrierMaker 50 7 3 8.3 4 7 5 ! BarrierMaker 50 5 7 4 7.7 3 7 ! BarrierMaker 50 1 5 -0.3 4 1 3 Spawn 0 1 6 Spawn 0 1 2 Spawn 0 6 1 Spawn 0 2 1 ! BarrierMaker 50 5 9 4 10 3 9 1 9 0 8 -1 6 -3 5 -4 4 -3 3 -1 2 0 0 1 -1 3 -1 4 -2 5 -1 7 -1 8 0 9 2 11 3 12 4 11 5 9 6 8 8 7 9 5 9 Teleporter -3 4 10 4 Teleporter 11 4 -2 4 Index: retrieve3.txt =================================================================== RCS file: /cvsroot/opentnl/tnl/exe/levels/retrieve3.txt,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** retrieve3.txt 5 Oct 2004 23:41:59 -0000 1.4 --- retrieve3.txt 18 Oct 2004 00:09:21 -0000 1.5 *************** *** 10,49 **** GoalZone 0 4.5 -5.9 4.7 -5.9 4.7 -6.1 4.5 -6.1 FlagItem -1 -3.9 -3.4 ! BarrierMaker -6.5 0 -6.5 -2 -4.5 -4 -2.5 -4 -1.5 -3 0.5 -3 1.5 -5 3.5 -7 6.5 -7 8.5 -5 8.5 -3 6.5 -1 6.5 0 ! BarrierMaker 4.5 -6.3 5.5 -6.3 5.8 -6 5.8 -5.6 GoalZone 0 5.3 -5.9 5.5 -5.9 5.5 -6.1 5.3 -6.1 GoalZone 0 4.9 -5.5 5.1 -5.5 5.1 -5.7 4.9 -5.7 GoalZone 0 5.3 -5.1 5.5 -5.1 5.5 -5.3 5.3 -5.3 GoalZone 0 4.5 -5.1 4.7 -5.1 4.7 -5.3 4.5 -5.3 ! BarrierMaker 3.9 -5.7 3.9 -5 4.3 -4.6 4.5 -4.6 ! BarrierMaker 6.6 -6 6.6 -5.4 6 -4.8 5.6 -4.8 ! BarrierMaker 4.4 -4.2 6.2 -4.2 6.5 -4.5 ! BarrierMaker 6.1 -6.3 6.1 -6.6 5.9 -6.8 5.6 -6.8 5.4 -7 ! BarrierMaker 3.8 -6.5 3.2 -5.9 3.2 -5.3 2.7 -4.9 2.7 -4.5 3.2 -4 ! BarrierMaker 3.4 -4.6 3.8 -4.2 3.8 -3.7 Spawn 0 8.2 -3.7 Spawn 0 8.2 -3.4 ! BarrierMaker 7.8 -5 7.6 -4.8 7.6 -3.2 7.8 -3 ! BarrierMaker 7.1 -4.7 7.1 -4 6.5 -3.4 5.9 -3.4 ! BarrierMaker 4.6 -3.6 4.4 -3.6 4 -3.1 4 -2.9 4.1 -2.8 4.8 -2.8 5 -3 5 -3.1 4.6 -3.6 ! BarrierMaker 5.5 -3.6 5.5 -3 6 -2.5 6.5 -2.5 6.6 -2.6 6.9 -2.6 7.1 -2.8 ! BarrierMaker -4.2 -2.7 -4.5 -2.7 -4.8 -2.4 -4.8 -1.9 -4.5 -1.6 -4.2 -1.6 -3.9 -1.9 -3.9 -2.4 -4.2 -2.7 ! BarrierMaker -2.7 -1.9 -3 -1.9 -3.3 -1.6 -3.3 -1.1 -3 -0.8 -2.7 -0.8 -2.4 -1.1 -2.4 -1.6 -2.7 -1.9 ! BarrierMaker -2.8 -3.5 -3.1 -3.5 -3.4 -3.2 -3.4 -2.7 -3.1 -2.4 -2.8 -2.4 -2.5 -2.7 -2.5 -3.2 -2.8 -3.5 ! BarrierMaker -1.2 -2.3 -1.5 -2.3 -1.8 -2 -1.8 -1.5 -1.5 -1.2 -1.2 -1.2 -0.9 -1.5 -0.9 -2 -1.2 -2.3 ! BarrierMaker -4 -1.1 -4.3 -1.1 -4.6 -0.8 -4.6 -0.3 -4.3 -5.96046e-008 -4 -5.96046e-008 -3.7 -0.3 -3.7 -0.8 -4 -1.1 ! BarrierMaker -5.5 -1.7 -5.8 -1.7 -6.1 -1.4 -6.1 -0.9 -5.8 -0.6 -5.5 -0.6 -5.2 -0.9 -5.2 -1.4 -5.5 -1.7 FlagItem -1 0 -9.68575e-008 ! BarrierMaker 2 -4 3 -3 3 -2.6 3.6 -2 5 -2 5.8 -1.3 5.8 -1 ! BarrierMaker 1.7 -3 1.5 -3 1.1 -2.4 1.1 -2.2 1.2 -2.1 1.9 -2.1 2 -2.2 2 -2.4 1.7 -3 ! BarrierMaker 1.4 -0.8 1.6 -0.8 2 -1.4 2 -1.6 1.9 -1.7 1.2 -1.7 1.1 -1.6 1.1 -1.4 1.4 -0.8 ! BarrierMaker 3.4 -1.6 3.4 -1.4 2.8 -1 2.6 -1 2.5 -1.1 2.5 -1.8 2.6 -1.9 2.8 -1.9 3.4 -1.6 ! BarrierMaker 3.6 -1 3.1 -0.5 2.6 -0.5 ! BarrierMaker 4 0 3.3 -0.7 ! BarrierMaker 4 -0.6 4.5 -1.1 4.9 -0.7 ! BarrierMaker 4 -1.2 4 -1.6 4.4 -1.6 ! BarrierMaker 4.5 -0.4 4.9 0 5.1 0 5.5 -0.4 ! BarrierMaker -0.4 -2.3 -0.4 -0.6 -0.2 -0.6 -0.2 -2.3 -0.4 -2.3 ! BarrierMaker 0.6 -2.3 0.5 -2.3 0.3 -2.1 0.3 -1.7 0.7 -1.3 0.7 -0.8 0.3 -0.4 0.3 -0.2 0.5 0 1.1 0 1.4 -0.3 1.8 -0.3 2.1 0 2.5 0 FlagItem -1 6 0 Turret 0 5.1 -4.1 --- 10,49 ---- GoalZone 0 4.5 -5.9 4.7 -5.9 4.7 -6.1 4.5 -6.1 FlagItem -1 -3.9 -3.4 ! BarrierMaker 50 -6.5 0 -6.5 -2 -4.5 -4 -2.5 -4 -1.5 -3 0.5 -3 1.5 -5 3.5 -7 6.5 -7 8.5 -5 8.5 -3 6.5 -1 6.5 0 ! BarrierMaker 50 4.5 -6.3 5.5 -6.3 5.8 -6 5.8 -5.6 GoalZone 0 5.3 -5.9 5.5 -5.9 5.5 -6.1 5.3 -6.1 GoalZone 0 4.9 -5.5 5.1 -5.5 5.1 -5.7 4.9 -5.7 GoalZone 0 5.3 -5.1 5.5 -5.1 5.5 -5.3 5.3 -5.3 GoalZone 0 4.5 -5.1 4.7 -5.1 4.7 -5.3 4.5 -5.3 ! BarrierMaker 50 3.9 -5.7 3.9 -5 4.3 -4.6 4.5 -4.6 ! BarrierMaker 50 6.6 -6 6.6 -5.4 6 -4.8 5.6 -4.8 ! BarrierMaker 50 4.4 -4.2 6.2 -4.2 6.5 -4.5 ! BarrierMaker 50 6.1 -6.3 6.1 -6.6 5.9 -6.8 5.6 -6.8 5.4 -7 ! BarrierMaker 50 3.8 -6.5 3.2 -5.9 3.2 -5.3 2.7 -4.9 2.7 -4.5 3.2 -4 ! BarrierMaker 50 3.4 -4.6 3.8 -4.2 3.8 -3.7 Spawn 0 8.2 -3.7 Spawn 0 8.2 -3.4 ! BarrierMaker 50 7.8 -5 7.6 -4.8 7.6 -3.2 7.8 -3 ! BarrierMaker 50 7.1 -4.7 7.1 -4 6.5 -3.4 5.9 -3.4 ! BarrierMaker 50 4.6 -3.6 4.4 -3.6 4 -3.1 4 -2.9 4.1 -2.8 4.8 -2.8 5 -3 5 -3.1 4.6 -3.6 ! BarrierMaker 50 5.5 -3.6 5.5 -3 6 -2.5 6.5 -2.5 6.6 -2.6 6.9 -2.6 7.1 -2.8 ! BarrierMaker 50 -4.2 -2.7 -4.5 -2.7 -4.8 -2.4 -4.8 -1.9 -4.5 -1.6 -4.2 -1.6 -3.9 -1.9 -3.9 -2.4 -4.2 -2.7 ! BarrierMaker 50 -2.7 -1.9 -3 -1.9 -3.3 -1.6 -3.3 -1.1 -3 -0.8 -2.7 -0.8 -2.4 -1.1 -2.4 -1.6 -2.7 -1.9 ! BarrierMaker 50 -2.8 -3.5 -3.1 -3.5 -3.4 -3.2 -3.4 -2.7 -3.1 -2.4 -2.8 -2.4 -2.5 -2.7 -2.5 -3.2 -2.8 -3.5 ! BarrierMaker 50 -1.2 -2.3 -1.5 -2.3 -1.8 -2 -1.8 -1.5 -1.5 -1.2 -1.2 -1.2 -0.9 -1.5 -0.9 -2 -1.2 -2.3 ! BarrierMaker 50 -4 -1.1 -4.3 -1.1 -4.6 -0.8 -4.6 -0.3 -4.3 -5.96046e-008 -4 -5.96046e-008 -3.7 -0.3 -3.7 -0.8 -4 -1.1 ! BarrierMaker 50 -5.5 -1.7 -5.8 -1.7 -6.1 -1.4 -6.1 -0.9 -5.8 -0.6 -5.5 -0.6 -5.2 -0.9 -5.2 -1.4 -5.5 -1.7 FlagItem -1 0 -9.68575e-008 ! BarrierMaker 50 2 -4 3 -3 3 -2.6 3.6 -2 5 -2 5.8 -1.3 5.8 -1 ! BarrierMaker 50 1.7 -3 1.5 -3 1.1 -2.4 1.1 -2.2 1.2 -2.1 1.9 -2.1 2 -2.2 2 -2.4 1.7 -3 ! BarrierMaker 50 1.4 -0.8 1.6 -0.8 2 -1.4 2 -1.6 1.9 -1.7 1.2 -1.7 1.1 -1.6 1.1 -1.4 1.4 -0.8 ! BarrierMaker 50 3.4 -1.6 3.4 -1.4 2.8 -1 2.6 -1 2.5 -1.1 2.5 -1.8 2.6 -1.9 2.8 -1.9 3.4 -1.6 ! BarrierMaker 50 3.6 -1 3.1 -0.5 2.6 -0.5 ! BarrierMaker 50 4 0 3.3 -0.7 ! BarrierMaker 50 4 -0.6 4.5 -1.1 4.9 -0.7 ! BarrierMaker 50 4 -1.2 4 -1.6 4.4 -1.6 ! BarrierMaker 50 4.5 -0.4 4.9 0 5.1 0 5.5 -0.4 ! BarrierMaker 50 -0.4 -2.3 -0.4 -0.6 -0.2 -0.6 -0.2 -2.3 -0.4 -2.3 ! BarrierMaker 50 0.6 -2.3 0.5 -2.3 0.3 -2.1 0.3 -1.7 0.7 -1.3 0.7 -0.8 0.3 -0.4 0.3 -0.2 0.5 0 1.1 0 1.4 -0.3 1.8 -0.3 2.1 0 2.5 0 FlagItem -1 6 0 Turret 0 5.1 -4.1 *************** *** 62,100 **** GoalZone 1 -4.5 5.9 -4.7 5.9 -4.7 6.1 -4.5 6.1 FlagItem -1 3.9 3.4 ! BarrierMaker 6.5 0 6.5 2 4.5 4 2.5 4 1.5 3 -0.5 3 -1.5 5 -3.5 7 -6.5 7 -8.5 5 -8.5 3 -6.5 1 -6.5 0 ! BarrierMaker -4.5 6.3 -5.5 6.3 -5.8 6 -5.8 5.6 GoalZone 1 -5.3 5.9 -5.5 5.9 -5.5 6.1 -5.3 6.1 GoalZone 1 -4.9 5.5 -5.1 5.5 -5.1 5.7 -4.9 5.7 GoalZone 1 -5.3 5.1 -5.5 5.1 -5.5 5.3 -5.3 5.3 GoalZone 1 -4.5 5.1 -4.7 5.1 -4.7 5.3 -4.5 5.3 ! BarrierMaker -3.9 5.7 -3.9 5 -4.3 4.6 -4.5 4.6 ! BarrierMaker -6.6 6 -6.6 5.4 -6 4.8 -5.6 4.8 ! BarrierMaker -4.4 4.2 -6.2 4.2 -6.5 4.5 ! BarrierMaker -6.1 6.3 -6.1 6.6 -5.9 6.8 -5.6 6.8 -5.4 7 ! BarrierMaker -3.8 6.5 -3.2 5.9 -3.2 5.3 -2.7 4.9 -2.7 4.5 -3.2 4 ! BarrierMaker -3.4 4.6 -3.8 4.2 -3.8 3.7 Spawn 1 -8.2 3.7 Spawn 1 -8.2 3.4 ! BarrierMaker -7.8 5 -7.6 4.8 -7.6 3.2 -7.8 3 ! BarrierMaker -7.1 4.7 -7.1 4 -6.5 3.4 -5.9 3.4 ! BarrierMaker -4.6 3.6 -4.4 3.6 -4 3.1 -4 2.9 -4.1 2.8 -4.8 2.8 -5 3 -5 3.1 -4.6 3.6 ! BarrierMaker -5.5 3.6 -5.5 3 -6 2.5 -6.5 2.5 -6.6 2.6 -6.9 2.6 -7.1 2.8 ! BarrierMaker 4.2 2.7 4.5 2.7 4.8 2.4 4.8 1.9 4.5 1.6 4.2 1.6 3.9 1.9 3.9 2.4 4.2 2.7 ! BarrierMaker 2.7 1.9 3 1.9 3.3 1.6 3.3 1.1 3 0.8 2.7 0.8 2.4 1.1 2.4 1.6 2.7 1.9 ! BarrierMaker 2.8 3.5 3.1 3.5 3.4 3.2 3.4 2.7 3.1 2.4 2.8 2.4 2.5 2.7 2.5 3.2 2.8 3.5 ! BarrierMaker 1.2 2.3 1.5 2.3 1.8 2 1.8 1.5 1.5 1.2 1.2 1.2 0.9 1.5 0.9 2 1.2 2.3 ! BarrierMaker 4 1.1 4.3 1.1 4.6 0.8 4.6 0.3 4.3 0 4 0 3.7 0.3 3.7 0.8 4 1.1 ! BarrierMaker 5.5 1.7 5.8 1.7 6.1 1.4 6.1 0.9 5.8 0.6 5.5 0.6 5.2 0.9 5.2 1.4 5.5 1.7 ! BarrierMaker -2 4 -3 3 -3 2.6 -3.6 2 -5 2 -5.8 1.3 -5.8 1 ! BarrierMaker -1.7 3 -1.5 3 -1.1 2.4 -1.1 2.2 -1.2 2.1 -1.9 2.1 -2 2.2 -2 2.4 -1.7 3 ! BarrierMaker -1.4 0.8 -1.6 0.8 -2 1.4 -2 1.6 -1.9 1.7 -1.2 1.7 -1.1 1.6 -1.1 1.4 -1.4 0.8 ! BarrierMaker -3.4 1.6 -3.4 1.4 -2.8 1 -2.6 1 -2.5 1.1 -2.5 1.8 -2.6 1.9 -2.8 1.9 -3.4 1.6 ! BarrierMaker -3.6 1 -3.1 0.5 -2.6 0.5 ! BarrierMaker -4 0 -3.3 0.7 ! BarrierMaker -4 0.6 -4.5 1.1 -4.9 0.7 ! BarrierMaker -4 1.2 -4 1.6 -4.4 1.6 ! BarrierMaker -4.5 0.4 -4.9 0 -5.1 0 -5.5 0.4 ! BarrierMaker 0.4 2.3 0.4 0.6 0.2 0.6 0.2 2.3 0.4 2.3 ! BarrierMaker -0.6 2.3 -0.5 2.3 -0.3 2.1 -0.3 1.7 -0.7 1.3 -0.7 0.8 -0.3 0.4 -0.3 0.2 -0.5 0 -1.1 0 -1.4 0.3 -1.8 0.3 -2.1 0 -2.5 0 FlagItem -1 -6 0 Turret 1 -5.1 4.1 --- 62,100 ---- GoalZone 1 -4.5 5.9 -4.7 5.9 -4.7 6.1 -4.5 6.1 FlagItem -1 3.9 3.4 ! BarrierMaker 50 6.5 0 6.5 2 4.5 4 2.5 4 1.5 3 -0.5 3 -1.5 5 -3.5 7 -6.5 7 -8.5 5 -8.5 3 -6.5 1 -6.5 0 ! BarrierMaker 50 -4.5 6.3 -5.5 6.3 -5.8 6 -5.8 5.6 GoalZone 1 -5.3 5.9 -5.5 5.9 -5.5 6.1 -5.3 6.1 GoalZone 1 -4.9 5.5 -5.1 5.5 -5.1 5.7 -4.9 5.7 GoalZone 1 -5.3 5.1 -5.5 5.1 -5.5 5.3 -5.3 5.3 GoalZone 1 -4.5 5.1 -4.7 5.1 -4.7 5.3 -4.5 5.3 ! BarrierMaker 50 -3.9 5.7 -3.9 5 -4.3 4.6 -4.5 4.6 ! BarrierMaker 50 -6.6 6 -6.6 5.4 -6 4.8 -5.6 4.8 ! BarrierMaker 50 -4.4 4.2 -6.2 4.2 -6.5 4.5 ! BarrierMaker 50 -6.1 6.3 -6.1 6.6 -5.9 6.8 -5.6 6.8 -5.4 7 ! BarrierMaker 50 -3.8 6.5 -3.2 5.9 -3.2 5.3 -2.7 4.9 -2.7 4.5 -3.2 4 ! BarrierMaker 50 -3.4 4.6 -3.8 4.2 -3.8 3.7 Spawn 1 -8.2 3.7 Spawn 1 -8.2 3.4 ! BarrierMaker 50 -7.8 5 -7.6 4.8 -7.6 3.2 -7.8 3 ! BarrierMaker 50 -7.1 4.7 -7.1 4 -6.5 3.4 -5.9 3.4 ! BarrierMaker 50 -4.6 3.6 -4.4 3.6 -4 3.1 -4 2.9 -4.1 2.8 -4.8 2.8 -5 3 -5 3.1 -4.6 3.6 ! BarrierMaker 50 -5.5 3.6 -5.5 3 -6 2.5 -6.5 2.5 -6.6 2.6 -6.9 2.6 -7.1 2.8 ! BarrierMaker 50 4.2 2.7 4.5 2.7 4.8 2.4 4.8 1.9 4.5 1.6 4.2 1.6 3.9 1.9 3.9 2.4 4.2 2.7 ! BarrierMaker 50 2.7 1.9 3 1.9 3.3 1.6 3.3 1.1 3 0.8 2.7 0.8 2.4 1.1 2.4 1.6 2.7 1.9 ! BarrierMaker 50 2.8 3.5 3.1 3.5 3.4 3.2 3.4 2.7 3.1 2.4 2.8 2.4 2.5 2.7 2.5 3.2 2.8 3.5 ! BarrierMaker 50 1.2 2.3 1.5 2.3 1.8 2 1.8 1.5 1.5 1.2 1.2 1.2 0.9 1.5 0.9 2 1.2 2.3 ! BarrierMaker 50 4 1.1 4.3 1.1 4.6 0.8 4.6 0.3 4.3 0 4 0 3.7 0.3 3.7 0.8 4 1.1 ! BarrierMaker 50 5.5 1.7 5.8 1.7 6.1 1.4 6.1 0.9 5.8 0.6 5.5 0.6 5.2 0.9 5.2 1.4 5.5 1.7 ! BarrierMaker 50 -2 4 -3 3 -3 2.6 -3.6 2 -5 2 -5.8 1.3 -5.8 1 ! BarrierMaker 50 -1.7 3 -1.5 3 -1.1 2.4 -1.1 2.2 -1.2 2.1 -1.9 2.1 -2 2.2 -2 2.4 -1.7 3 ! BarrierMaker 50 -1.4 0.8 -1.6 0.8 -2 1.4 -2 1.6 -1.9 1.7 -1.2 1.7 -1.1 1.6 -1.1 1.4 -1.4 0.8 ! BarrierMaker 50 -3.4 1.6 -3.4 1.4 -2.8 1 -2.6 1 -2.5 1.1 -2.5 1.8 -2.6 1.9 -2.8 1.9 -3.4 1.6 ! BarrierMaker 50 -3.6 1 -3.1 0.5 -2.6 0.5 ! BarrierMaker 50 -4 0 -3.3 0.7 ! BarrierMaker 50 -4 0.6 -4.5 1.1 -4.9 0.7 ! BarrierMaker 50 -4 1.2 -4 1.6 -4.4 1.6 ! BarrierMaker 50 -4.5 0.4 -4.9 0 -5.1 0 -5.5 0.4 ! BarrierMaker 50 0.4 2.3 0.4 0.6 0.2 0.6 0.2 2.3 0.4 2.3 ! BarrierMaker 50 -0.6 2.3 -0.5 2.3 -0.3 2.1 -0.3 1.7 -0.7 1.3 -0.7 0.8 -0.3 0.4 -0.3 0.2 -0.5 0 -1.1 0 -1.4 0.3 -1.8 0.3 -2.1 0 -2.5 0 FlagItem -1 -6 0 Turret 1 -5.1 4.1 Index: zm1.txt =================================================================== RCS file: /cvsroot/opentnl/tnl/exe/levels/zm1.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** zm1.txt 17 Sep 2004 00:14:34 -0000 1.1 --- zm1.txt 18 Oct 2004 00:09:21 -0000 1.2 *************** *** 9,20 **** Team Blue 0 0 1 ! BarrierMaker 0 0 5 0 6 1 7 0 10 0 10 10 0 10 0 0 ! BarrierMaker 8 4 8 4.5 ! BarrierMaker 8 5 8.5 6 7.5 6 8 5 ! BarrierMaker 7 7 9 7 9 9 7 9 7 7 ! BarrierMaker 5 8 6 7.5 6 8.5 5 8 ! BarrierMaker 11 8 10 8.5 10 7.5 11 8 ! BarrierMaker 8 11 7.5 10 8.5 10 8 11 ! BarrierMaker 8 11.5 8 12 Spawn 0 1 6 --- 9,20 ---- Team Blue 0 0 1 ! BarrierMaker 50 0 0 5 0 6 1 7 0 10 0 10 10 0 10 0 0 ! BarrierMaker 50 8 4 8 4.5 ! BarrierMaker 50 8 5 8.5 6 7.5 6 8 5 ! BarrierMaker 50 7 7 9 7 9 9 7 9 7 7 ! BarrierMaker 50 5 8 6 7.5 6 8.5 5 8 ! BarrierMaker 50 11 8 10 8.5 10 7.5 11 8 ! BarrierMaker 50 8 11 7.5 10 8.5 10 8 11 ! BarrierMaker 50 8 11.5 8 12 Spawn 0 1 6 Index: football2.txt =================================================================== RCS file: /cvsroot/opentnl/tnl/exe/levels/football2.txt,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** football2.txt 3 Aug 2004 22:48:43 -0000 1.6 --- football2.txt 18 Oct 2004 00:09:21 -0000 1.7 *************** *** 17,21 **** Spawn 0 16.4 -7.3 Spawn 0 15.9 -7 ! BarrierMaker 16.5 -5.5 16.7 -5.5 16.8 -5.3 17.2 -5.3 17.3 -5.5 17.5 -5.5 18 -6.5 18.5 -6.5 18.5 -7.5 15.5 -7.5 15.5 -6.5 16 -6.5 16.5 -5.5 Teleporter 17 -5.7 6 -3.8 LoadoutZone 1 -1.4 7.4 -2.6 7.4 -2.4 7 -1.6 7 --- 17,21 ---- Spawn 0 16.4 -7.3 Spawn 0 15.9 -7 ! BarrierMaker 50 16.5 -5.5 16.7 -5.5 16.8 -5.3 17.2 -5.3 17.3 -5.5 17.5 -5.5 18 -6.5 18.5 -6.5 18.5 -7.5 15.5 -7.5 15.5 -6.5 16 -6.5 16.5 -5.5 Teleporter 17 -5.7 6 -3.8 LoadoutZone 1 -1.4 7.4 -2.6 7.4 -2.4 7 -1.6 7 *************** *** 30,73 **** Spawn 1 -1.4 8.3 Spawn 1 -0.9 8 ! BarrierMaker -1.5 6.5 -1.7 6.5 -1.8 6.3 -2.2 6.3 -2.3 6.5 -2.5 6.5 -3 7.5 -3.5 7.5 -3.5 8.5 -0.5 8.5 -0.5 7.5 -1 7.5 -1.5 6.5 Teleporter -2 6.7 6 -2.2 LoadoutZone 0 7.4 -4.2 6.6 -4.2 6.6 -3.8 7.4 -3.8 ! BarrierMaker 4.5 -7.5 1.5 -7.5 1.5 -5.5 2.5 -4.5 1.5 -2.5 -0.5 -1.5 -1.5 -2.5 -3.5 -2.5 -3.5 0.5 -1.5 0.5 -0.5 -0.5 2.5 -0.5 5.5 2.5 5.5 5.5 4.5 6.5 4.5 8.5 7.5 8.5 7.5 6.5 6.5 5.5 7.5 3.5 9.5 2.5 10.5 3.5 12.5 3.5 12.5 0.5 11.5 -0.5 11.5 -4.5 12.5 -5.5 12.5 -7.5 10.5 -7.5 9.5 -6.5 5.5 -6.5 4.5 -7.5 ! BarrierMaker 9.5 -5.5 7.5 -5.5 7.5 -4.5 8.5 -3.5 9.5 -3.5 9.5 -2.5 10.5 -2.5 10.5 -4.5 11.5 -5.5 10.5 -6.5 9.5 -5.5 GoalZone -1 11.7 2.7 12.3 2.7 12.3 3.3 11.7 3.3 GoalZone -1 1.7 -7.3 2.3 -7.3 2.3 -6.7 1.7 -6.7 GoalZone -1 -3.3 -1.3 -2.7 -1.3 -2.7 -0.700001 -3.3 -0.700001 GoalZone -1 5.7 7.7 6.3 7.7 6.3 8.3 5.7 8.3 ! BarrierMaker 6.1 4.5 6.1 2.5 6.8 2.5 6.9 2.6 6.2 4.5 6.1 4.5 ! BarrierMaker 7.2 2.1 7.3 2.2 8.5 2.2 9.5 1.7 9.5 1.5 10.5 1.5 11.5 0.5 10.5 -0.5 9.2 -0.5 8.2 -1.5 7.5 -1.5 6.5 -0.5 6.5 0.5 7.5 0.5 7.5 1.5 7.3 1.5 7.2 1.6 7.2 2.1 ! BarrierMaker 3.5 -7 3 -6.5 ! BarrierMaker 2.5 -6 2 -5.5 ! BarrierMaker 3.6 -6.4 4.1 -5.9 ! BarrierMaker 3.5 -5.9 3.1 -5.5 ! BarrierMaker 2.5 -5.4 3 -4.9 ! BarrierMaker 3.5 -5.2 4.1 -4.6 ! BarrierMaker 4.8 -6.5 4.1 -6.5 3.8 -6.2 ! BarrierMaker 4.4 -6.9 4.4 -6.5 ! BarrierMaker 4.2 -5.3 5.1 -6.2 ! BarrierMaker 2.9 -4 3.8 -4.9 ! BarrierMaker -2.8 -1.9 -2.4 -1.5 -2.4 -0.5 -2.8 -0.1 ! BarrierMaker -2.2 0.5 -1.8 0.1 -1.8 -0.199999 ! BarrierMaker -2.2 -2.5 -1.8 -2.1 -1.8 -1.8 ! BarrierMaker -1.8 -1.3 -1.8 -0.700001 -1.7 -0.699999 -1 -0.9 -1 -1.1 -1.7 -1.3 -1.8 -1.3 ! BarrierMaker 1.1 -1.4 1.1 -1.1 3.5 -1.1 5.1 0.5 5.5 0.5 5.5 -0.5 4.5 -1.5 4.5 -2.5 3.5 -2.5 1.1 -1.4 ! BarrierMaker 6.5 1.5 6.1 1.1 6 1.1 5.6 1.5 5.6 1.6 5.7 1.7 6.4 1.7 6.5 1.6 6.5 1.5 ! BarrierMaker 6.5 6.5 6.5 7.2 6.2 7.5 5.8 7.5 5.5 7.2 5.5 6.5 5.8 6.2 6.2 6.2 6.5 6.5 ! BarrierMaker 7 7.5 7 8.1 ! BarrierMaker 5 7.5 5 8.1 ! BarrierMaker 3.5 -3.1 4.5 -3.1 4.5 -4.1 4.4 -4.1 3.5 -3.2 3.5 -3.1 ! BarrierMaker 6.5 -5.5 5.5 -5.5 5.5 -4.5 5.6 -4.5 6.5 -5.4 6.5 -5.5 ! BarrierMaker 6.8 -3.5 6.8 -3 7.5 -3 7.5 -3.5 6.8 -3.5 ! BarrierMaker 6.8 -2.5 6.8 -2 7.5 -2 7.5 -2.5 6.8 -2.5 ! BarrierMaker 5.7 -1.8 5.7 -1.3 6.4 -1.3 6.4 -1.8 5.7 -1.8 LoadoutZone 1 5.4 -2.2 4.6 -2.2 4.6 -1.8 5.4 -1.8 ! BarrierMaker 9 -2.5 8.5 -2.5 8.5 -2 ! BarrierMaker 8.5 -3.5 8.5 -3 ! BarrierMaker 9.5 -2 9 -2 9 -1.5 ! BarrierMaker 10 -1.5 9.5 -1.5 9.5 -1 Turret -1 6.1 4.6 ForceFieldProjector -1 5.2 5.9 --- 30,73 ---- Spawn 1 -1.4 8.3 Spawn 1 -0.9 8 ! BarrierMaker 50 -1.5 6.5 -1.7 6.5 -1.8 6.3 -2.2 6.3 -2.3 6.5 -2.5 6.5 -3 7.5 -3.5 7.5 -3.5 8.5 -0.5 8.5 -0.5 7.5 -1 7.5 -1.5 6.5 Teleporter -2 6.7 6 -2.2 LoadoutZone 0 7.4 -4.2 6.6 -4.2 6.6 -3.8 7.4 -3.8 ! BarrierMaker 50 4.5 -7.5 1.5 -7.5 1.5 -5.5 2.5 -4.5 1.5 -2.5 -0.5 -1.5 -1.5 -2.5 -3.5 -2.5 -3.5 0.5 -1.5 0.5 -0.5 -0.5 2.5 -0.5 5.5 2.5 5.5 5.5 4.5 6.5 4.5 8.5 7.5 8.5 7.5 6.5 6.5 5.5 7.5 3.5 9.5 2.5 10.5 3.5 12.5 3.5 12.5 0.5 11.5 -0.5 11.5 -4.5 12.5 -5.5 12.5 -7.5 10.5 -7.5 9.5 -6.5 5.5 -6.5 4.5 -7.5 ! BarrierMaker 50 9.5 -5.5 7.5 -5.5 7.5 -4.5 8.5 -3.5 9.5 -3.5 9.5 -2.5 10.5 -2.5 10.5 -4.5 11.5 -5.5 10.5 -6.5 9.5 -5.5 GoalZone -1 11.7 2.7 12.3 2.7 12.3 3.3 11.7 3.3 GoalZone -1 1.7 -7.3 2.3 -7.3 2.3 -6.7 1.7 -6.7 GoalZone -1 -3.3 -1.3 -2.7 -1.3 -2.7 -0.700001 -3.3 -0.700001 GoalZone -1 5.7 7.7 6.3 7.7 6.3 8.3 5.7 8.3 ! BarrierMaker 50 6.1 4.5 6.1 2.5 6.8 2.5 6.9 2.6 6.2 4.5 6.1 4.5 ! BarrierMaker 50 7.2 2.1 7.3 2.2 8.5 2.2 9.5 1.7 9.5 1.5 10.5 1.5 11.5 0.5 10.5 -0.5 9.2 -0.5 8.2 -1.5 7.5 -1.5 6.5 -0.5 6.5 0.5 7.5 0.5 7.5 1.5 7.3 1.5 7.2 1.6 7.2 2.1 ! BarrierMaker 50 3.5 -7 3 -6.5 ! BarrierMaker 50 2.5 -6 2 -5.5 ! BarrierMaker 50 3.6 -6.4 4.1 -5.9 ! BarrierMaker 50 3.5 -5.9 3.1 -5.5 ! BarrierMaker 50 2.5 -5.4 3 -4.9 ! BarrierMaker 50 3.5 -5.2 4.1 -4.6 ! BarrierMaker 50 4.8 -6.5 4.1 -6.5 3.8 -6.2 ! BarrierMaker 50 4.4 -6.9 4.4 -6.5 ! BarrierMaker 50 4.2 -5.3 5.1 -6.2 ! BarrierMaker 50 2.9 -4 3.8 -4.9 ! BarrierMaker 50 -2.8 -1.9 -2.4 -1.5 -2.4 -0.5 -2.8 -0.1 ! BarrierMaker 50 -2.2 0.5 -1.8 0.1 -1.8 -0.199999 ! BarrierMaker 50 -2.2 -2.5 -1.8 -2.1 -1.8 -1.8 ! BarrierMaker 50 -1.8 -1.3 -1.8 -0.700001 -1.7 -0.699999 -1 -0.9 -1 -1.1 -1.7 -1.3 -1.8 -1.3 ! BarrierMaker 50 1.1 -1.4 1.1 -1.1 3.5 -1.1 5.1 0.5 5.5 0.5 5.5 -0.5 4.5 -1.5 4.5 -2.5 3.5 -2.5 1.1 -1.4 ! BarrierMaker 50 6.5 1.5 6.1 1.1 6 1.1 5.6 1.5 5.6 1.6 5.7 1.7 6.4 1.7 6.5 1.6 6.5 1.5 ! BarrierMaker 50 6.5 6.5 6.5 7.2 6.2 7.5 5.8 7.5 5.5 7.2 5.5 6.5 5.8 6.2 6.2 6.2 6.5 6.5 ! BarrierMaker 50 7 7.5 7 8.1 ! BarrierMaker 50 5 7.5 5 8.1 ! BarrierMaker 50 3.5 -3.1 4.5 -3.1 4.5 -4.1 4.4 -4.1 3.5 -3.2 3.5 -3.1 ! BarrierMaker 50 6.5 -5.5 5.5 -5.5 5.5 -4.5 5.6 -4.5 6.5 -5.4 6.5 -5.5 ! BarrierMaker 50 6.8 -3.5 6.8 -3 7.5 -3 7.5 -3.5 6.8 -3.5 ! BarrierMaker 50 6.8 -2.5 6.8 -2 7.5 -2 7.5 -2.5 6.8 -2.5 ! BarrierMaker 50 5.7 -1.8 5.7 -1.3 6.4 -1.3 6.4 -1.8 5.7 -1.8 LoadoutZone 1 5.4 -2.2 4.6 -2.2 4.6 -1.8 5.4 -1.8 ! BarrierMaker 50 9 -2.5 8.5 -2.5 8.5 -2 ! BarrierMaker 50 8.5 -3.5 8.5 -3 ! BarrierMaker 50 9.5 -2 9 -2 9 -1.5 ! BarrierMaker 50 10 -1.5 9.5 -1.5 9.5 -1 Turret -1 6.1 4.6 ForceFieldProjector -1 5.2 5.9 Index: ctf1.txt =================================================================== RCS file: /cvsroot/opentnl/tnl/exe/levels/ctf1.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** ctf1.txt 20 Jul 2004 18:09:51 -0000 1.3 --- ctf1.txt 18 Oct 2004 00:09:21 -0000 1.4 *************** *** 33,60 **** RepairItem 11.5 15.12 RepairItem 4.5 12.88 ! BarrierMaker 1 0 2 0 3 1 4 1 4.2 0.5 4.8 0.5 5 1 6 1 7 0 9 0 10 1 10 2 11 2 11.2 1.5 11.8 1.5 12 2 13 2 14 1 14 0 16 0 16 2 15 3 16 4 16 11 15 12 15 13 16 14 16 15 15 16 14 16 13 15 12 15 11.8 15.5 11.2 15.5 11 15 10 15 9 16 7 16 6 15 6 14 5 14 4.8 14.5 4.2 14.5 4 14 3 14 2 15 2 16 0 16 0 14 1 13 0 12 0 5 1 4 1 3 0 2 0 1 1 0 ! BarrierMaker 3 2 4 2 4.2 2.5 4.8 2.5 5 2 6 2 6 3 7 4 7 5 6 6 4 7 4 8.5 3.5 8.5 3.5 6 4 6 5 5 5 4 3 4 3 8.5 1 8.5 1 7 2 6 2 3 3 2 ! BarrierMaker 1 9 3 9 3 10 1 10 1 9 ! BarrierMaker 8 4 8 5 ! BarrierMaker 8 5 8.5 6 7.5 6 8 5 ! BarrierMaker 7 7 9 7 9 9 7 9 7 7 ! BarrierMaker 5 8 6 7.5 6 8.5 5 8 ! BarrierMaker 11 8 10 8.5 10 7.5 11 8 ! BarrierMaker 8 11 7.5 10 8.5 10 8 11 ! BarrierMaker 8 11 8 12 TestItem 8 6.5 TestItem 8 9.5 TestItem 6.5 8 TestItem 9.5 8 ! BarrierMaker 1 10.5 1 11 2 12 2 13 4 13 4.2 12.5 4.8 12.5 5 13 6 13 7 12 7 11 6 10 4 9 3.5 9 3.5 10.5 1 10.5 ! BarrierMaker 9 4 10 3 11 3 11.2 3.5 11.8 3.5 12 3 14 3 14 4 15 5 15 5.5 12.5 5.5 12.5 7 12 7 10 6 9 5 9 4 ! BarrierMaker 10 14 10 13 9 12 9 11 10 10 12 9 12 7.5 12.5 7.5 12.5 10 12 10 11 11 11 12 13 12 13 7.5 15 7.5 15 9 14 10 14 13 13 14 12 14 11.8 13.5 11.2 13.5 11 14 10 14 ! BarrierMaker 13 6 15 6 15 7 13 7 13 6 ! BarrierMaker 7 1.7 7 1.5 7.5 1 7.7 1 ! BarrierMaker 8.3 1 8.5 1 9 1.5 9 1.7 ! BarrierMaker 7 2.3 7 2.5 7.5 3 8.5 3 9 2.5 9 2.3 ! BarrierMaker 7 14.3 7 14.5 7.5 15 7.7 15 ! BarrierMaker 8.3 15 8.5 15 9 14.5 9 14.3 ! BarrierMaker 7 13.7 7 13.5 7.5 13 8.5 13 9 13.5 9 13.7 Teleporter 11.5 11.5 1.5 1.5 Teleporter 4.5 4.5 14.5 14.5 --- 33,60 ---- RepairItem 11.5 15.12 RepairItem 4.5 12.88 ! BarrierMaker 50 1 0 2 0 3 1 4 1 4.2 0.5 4.8 0.5 5 1 6 1 7 0 9 0 10 1 10 2 11 2 11.2 1.5 11.8 1.5 12 2 13 2 14 1 14 0 16 0 16 2 15 3 16 4 16 11 15 12 15 13 16 14 16 15 15 16 14 16 13 15 12 15 11.8 15.5 11.2 15.5 11 15 10 15 9 16 7 16 6 15 6 14 5 14 4.8 14.5 4.2 14.5 4 14 3 14 2 15 2 16 0 16 0 14 1 13 0 12 0 5 1 4 1 3 0 2 0 1 1 0 ! BarrierMaker 50 3 2 4 2 4.2 2.5 4.8 2.5 5 2 6 2 6 3 7 4 7 5 6 6 4 7 4 8.5 3.5 8.5 3.5 6 4 6 5 5 5 4 3 4 3 8.5 1 8.5 1 7 2 6 2 3 3 2 ! BarrierMaker 50 1 9 3 9 3 10 1 10 1 9 ! BarrierMaker 50 8 4 8 5 ! BarrierMaker 50 8 5 8.5 6 7.5 6 8 5 ! BarrierMaker 50 7 7 9 7 9 9 7 9 7 7 ! BarrierMaker 50 5 8 6 7.5 6 8.5 5 8 ! BarrierMaker 50 11 8 10 8.5 10 7.5 11 8 ! BarrierMaker 50 8 11 7.5 10 8.5 10 8 11 ! BarrierMaker 50 8 11 8 12 TestItem 8 6.5 TestItem 8 9.5 TestItem 6.5 8 TestItem 9.5 8 ! BarrierMaker 50 1 10.5 1 11 2 12 2 13 4 13 4.2 12.5 4.8 12.5 5 13 6 13 7 12 7 11 6 10 4 9 3.5 9 3.5 10.5 1 10.5 ! BarrierMaker 50 9 4 10 3 11 3 11.2 3.5 11.8 3.5 12 3 14 3 14 4 15 5 15 5.5 12.5 5.5 12.5 7 12 7 10 6 9 5 9 4 ! BarrierMaker 50 10 14 10 13 9 12 9 11 10 10 12 9 12 7.5 12.5 7.5 12.5 10 12 10 11 11 11 12 13 12 13 7.5 15 7.5 15 9 14 10 14 13 13 14 12 14 11.8 13.5 11.2 13.5 11 14 10 14 ! BarrierMaker 50 13 6 15 6 15 7 13 7 13 6 ! BarrierMaker 50 7 1.7 7 1.5 7.5 1 7.7 1 ! BarrierMaker 50 8.3 1 8.5 1 9 1.5 9 1.7 ! BarrierMaker 50 7 2.3 7 2.5 7.5 3 8.5 3 9 2.5 9 2.3 ! BarrierMaker 50 7 14.3 7 14.5 7.5 15 7.7 15 ! BarrierMaker 50 8.3 15 8.5 15 9 14.5 9 14.3 ! BarrierMaker 50 7 13.7 7 13.5 7.5 13 8.5 13 9 13.5 9 13.7 Teleporter 11.5 11.5 1.5 1.5 Teleporter 4.5 4.5 14.5 14.5 Index: football3.txt =================================================================== RCS file: /cvsroot/opentnl/tnl/exe/levels/football3.txt,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** football3.txt 3 Aug 2004 22:48:43 -0000 1.3 --- football3.txt 18 Oct 2004 00:09:21 -0000 1.4 *************** *** 20,24 **** Spawn 0 12.9 -5.8 Spawn 0 12.4 -5.5 ! BarrierMaker 13 -4 13.2 -4 13.3 -3.8 13.7 -3.8 13.8 -4 14 -4 14.5 -5 15 -5 15 -6 12 -6 12 -5 12.5 -5 13 -4 Teleporter 13.5 -4.2 3.5 1.7 LoadoutZone 1 -7.9 8.9 -9.1 8.9 -8.9 8.5 -8.1 8.5 --- 20,24 ---- Spawn 0 12.9 -5.8 Spawn 0 12.4 -5.5 ! BarrierMaker 50 13 -4 13.2 -4 13.3 -3.8 13.7 -3.8 13.8 -4 14 -4 14.5 -5 15 -5 15 -6 12 -6 12 -5 12.5 -5 13 -4 Teleporter 13.5 -4.2 3.5 1.7 LoadoutZone 1 -7.9 8.9 -9.1 8.9 -8.9 8.5 -8.1 8.5 *************** *** 33,95 **** Spawn 1 -7.9 9.8 Spawn 1 -7.4 9.5 ! BarrierMaker -8 8 -8.2 8 -8.3 7.8 -8.7 7.8 -8.8 8 -9 8 -9.5 9 -10 9 -10 10 -7 10 -7 9 -7.5 9 -8 8 Teleporter -8.5 8.2 3.5 3.3 LoadoutZone 1 2.5 2.1 2.7 2 2.7 3 2.5 2.9 ! BarrierMaker 2.7 1.8 2.3 2 2.3 3 2.7 3.2 LoadoutZone 0 4.5 2.1 4.3 2 4.3 3 4.5 2.9 ! BarrierMaker 4.3 1.8 4.7 2 4.7 3 4.3 3.2 ! BarrierMaker -5.5 3.5 -5.5 -1.5 -2 -5 2.5 -5 3.5 -6 7.5 -6 11 -2.5 11 1 10 2 10 7 7 10 3 10 1 8 -1 8 -3 10 -4 10 -6 8 -6 4 -5.5 3.5 GoalZone -1 7.6 6.6 8.4 6.6 8.4 7.4 7.6 7.4 GoalZone -1 7.6 -3.9 8.4 -3.9 8.4 -3.1 7.6 -3.1 GoalZone -1 -4.4 3.6 -3.6 3.6 -3.6 4.4 -4.4 4.4 GoalZone -1 -3.9 8.2 -3.1 8.2 -3.1 9 -3.9 9 ! BarrierMaker 7.4 8.2 6.4 7.2 6.1 7.2 6 7.3 6 7.6 5.7 7.9 5.7 8.5 6.2 9 6.5 9 7 8.5 7.4 8.5 7.4 8.2 ! BarrierMaker 9 6 4.4 6 ! BarrierMaker 5.3 6.6 4.6 7.3 ! BarrierMaker 3.4 7.7 2.1 6.4 ! BarrierMaker 3.4 6.5 4 6.8 ! BarrierMaker 2.6 5.8 3.8 5.2 ! BarrierMaker 4.1 4.2 5.5 5 ! BarrierMaker 5.2 3.6 4.8 4.6 ! BarrierMaker 7.1 3.7 6.1 2.7 ! BarrierMaker 6.3 4.8 7.9 4.3 ! BarrierMaker 8.1 5.4 9.3 4 ! BarrierMaker 8.2 3.3 6.7 2.3 7.1 1.4 9.2 1.8 9.1 2.8 8.2 3.3 ! BarrierMaker 8.2 0.6 10.7 1.3 ! BarrierMaker 8.2 -0.8 11 -1.3 ! BarrierMaker 9.3 -2.7 8.6 -1.6 8.7 -1.5 10.1 -1.9 10.2 -2.2 9.4 -2.8 9.3 -2.7 ! BarrierMaker 2.2 7.8 1.9 8.1 ! BarrierMaker 1.3 6.9 1.6 7.3 1.8 7.3 1.8 7 1.3 6.1 1 6.1 1 6.9 1.3 6.9 ! BarrierMaker 0 6.7 0 8 ! BarrierMaker 0.5 6.4 -0.5 5.4 ! BarrierMaker 0.8 5 0 5.9 ! BarrierMaker 2.1 4.6 1.2 5.4 ! BarrierMaker 2.3 5.2 1.9 4.8 ! BarrierMaker 2.6 4 3.2 4.8 ! BarrierMaker 6 -2.5 4 -3.5 1.5 -3.5 0 -2.5 -1 -1 -1 -0.5 -0.5 0 0 0 0.5 -0.5 0.5 -1.5 1 -2 2 -2.5 4 -2.5 5.5 -1.5 5.5 -0.5 6 0 7 -0.5 7 -1 6 -2.5 ! BarrierMaker -3.3 -2.8 -3.8 -3.2 ! BarrierMaker -2.8 -2.5 -2.3 -2.1 -2.7 -1.4 ! BarrierMaker -1.6 -1.6 -0.8 -1.3 ! BarrierMaker -3.9 -2.3 -3.2 -1.7 ! BarrierMaker -3.1 -0.5 -2 -0.5 -2 -1 ! BarrierMaker -1.4 0 -2.4 0.6 -2.8 0.1 ! BarrierMaker -2.4 7.5 -2.4 8.3 -2.3 8.3 -1.6 7.6 -1.6 7.5 -2.4 7.5 ! BarrierMaker -4.4 7.5 -4.4 8.3 -4.5 8.3 -5.2 7.6 -5.2 7.5 -4.4 7.5 ! BarrierMaker -4.4 6.8 -4.4 6 -4.5 6 -5.2 6.7 -5.2 6.8 -4.4 6.8 ! BarrierMaker -2.4 6.8 -2.4 6 -2.3 6 -1.6 6.7 -1.6 6.8 -2.4 6.8 ! BarrierMaker -3.8 5.9 -3.8 8 -3.2 8 -3.2 5.9 -3.8 5.9 ! BarrierMaker -5 5.4 -6 6.4 ! BarrierMaker -4.3 5.3 -3.3 5.1 -2.8 5.1 ! BarrierMaker -2 5.3 -1 6.2 -0.7 7.2 ! BarrierMaker -5.1 4.1 -5.1 4.8 -4.5 4.8 ! BarrierMaker -2.9 3.8 -2.9 3.1 -3.5 3.1 ! BarrierMaker -1.2 1.5 -2.3 3 -2 4.3 -1.1 4.6 -0.1 4.5 0.7 4 1.6 3.9 1.8 3.5 1.1 2.6 1 1.7 1.9 0.8 1.8 0.4 1.2 0.4 -1.2 1.5 ! BarrierMaker 7.6 -4.5 7 -3.8 7 -3 7.7 -2.2 ! BarrierMaker 6.7 -4.5 5.9 -5 ! BarrierMaker 6 -4.5 5.7 -4 ! BarrierMaker 5.4 -4.2 4.6 -4.4 ! BarrierMaker 4.1 -4.5 3.5 -3.9 ! BarrierMaker 3.2 -4.3 2.3 -4.3 0.9 -4.1 -0.2 -3.9 -1 -4.2 -1.8 -4.2 ! BarrierMaker -4.9 2.8 -3.7 2 -3.2 2.4 -2.7 2.3 -2.2 1.5 Turret -1 -3.2 -0.5 Turret -1 -0.4 -2.1 --- 33,95 ---- Spawn 1 -7.9 9.8 Spawn 1 -7.4 9.5 ! BarrierMaker 50 -8 8 -8.2 8 -8.3 7.8 -8.7 7.8 -8.8 8 -9 8 -9.5 9 -10 9 -10 10 -7 10 -7 9 -7.5 9 -8 8 Teleporter -8.5 8.2 3.5 3.3 LoadoutZone 1 2.5 2.1 2.7 2 2.7 3 2.5 2.9 ! BarrierMaker 50 2.7 1.8 2.3 2 2.3 3 2.7 3.2 LoadoutZone 0 4.5 2.1 4.3 2 4.3 3 4.5 2.9 ! BarrierMaker 50 4.3 1.8 4.7 2 4.7 3 4.3 3.2 ! BarrierMaker 50 -5.5 3.5 -5.5 -1.5 -2 -5 2.5 -5 3.5 -6 7.5 -6 11 -2.5 11 1 10 2 10 7 7 10 3 10 1 8 -1 8 -3 10 -4 10 -6 8 -6 4 -5.5 3.5 GoalZone -1 7.6 6.6 8.4 6.6 8.4 7.4 7.6 7.4 GoalZone -1 7.6 -3.9 8.4 -3.9 8.4 -3.1 7.6 -3.1 GoalZone -1 -4.4 3.6 -3.6 3.6 -3.6 4.4 -4.4 4.4 GoalZone -1 -3.9 8.2 -3.1 8.2 -3.1 9 -3.9 9 ! BarrierMaker 50 7.4 8.2 6.4 7.2 6.1 7.2 6 7.3 6 7.6 5.7 7.9 5.7 8.5 6.2 9 6.5 9 7 8.5 7.4 8.5 7.4 8.2 ! BarrierMaker 50 9 6 4.4 6 ! BarrierMaker 50 5.3 6.6 4.6 7.3 ! BarrierMaker 50 3.4 7.7 2.1 6.4 ! BarrierMaker 50 3.4 6.5 4 6.8 ! BarrierMaker 50 2.6 5.8 3.8 5.2 ! BarrierMaker 50 4.1 4.2 5.5 5 ! BarrierMaker 50 5.2 3.6 4.8 4.6 ! BarrierMaker 50 7.1 3.7 6.1 2.7 ! BarrierMaker 50 6.3 4.8 7.9 4.3 ! BarrierMaker 50 8.1 5.4 9.3 4 ! BarrierMaker 50 8.2 3.3 6.7 2.3 7.1 1.4 9.2 1.8 9.1 2.8 8.2 3.3 ! BarrierMaker 50 8.2 0.6 10.7 1.3 ! BarrierMaker 50 8.2 -0.8 11 -1.3 ! BarrierMaker 50 9.3 -2.7 8.6 -1.6 8.7 -1.5 10.1 -1.9 10.2 -2.2 9.4 -2.8 9.3 -2.7 ! BarrierMaker 50 2.2 7.8 1.9 8.1 ! BarrierMaker 50 1.3 6.9 1.6 7.3 1.8 7.3 1.8 7 1.3 6.1 1 6.1 1 6.9 1.3 6.9 ! BarrierMaker 50 0 6.7 0 8 ! BarrierMaker 50 0.5 6.4 -0.5 5.4 ! BarrierMaker 50 0.8 5 0 5.9 ! BarrierMaker 50 2.1 4.6 1.2 5.4 ! BarrierMaker 50 2.3 5.2 1.9 4.8 ! BarrierMaker 50 2.6 4 3.2 4.8 ! BarrierMaker 50 6 -2.5 4 -3.5 1.5 -3.5 0 -2.5 -1 -1 -1 -0.5 -0.5 0 0 0 0.5 -0.5 0.5 -1.5 1 -2 2 -2.5 4 -2.5 5.5 -1.5 5.5 -0.5 6 0 7 -0.5 7 -1 6 -2.5 ! BarrierMaker 50 -3.3 -2.8 -3.8 -3.2 ! BarrierMaker 50 -2.8 -2.5 -2.3 -2.1 -2.7 -1.4 ! BarrierMaker 50 -1.6 -1.6 -0.8 -1.3 ! BarrierMaker 50 -3.9 -2.3 -3.2 -1.7 ! BarrierMaker 50 -3.1 -0.5 -2 -0.5 -2 -1 ! BarrierMaker 50 -1.4 0 -2.4 0.6 -2.8 0.1 ! BarrierMaker 50 -2.4 7.5 -2.4 8.3 -2.3 8.3 -1.6 7.6 -1.6 7.5 -2.4 7.5 ! BarrierMaker 50 -4.4 7.5 -4.4 8.3 -4.5 8.3 -5.2 7.6 -5.2 7.5 -4.4 7.5 ! BarrierMaker 50 -4.4 6.8 -4.4 6 -4.5 6 -5.2 6.7 -5.2 6.8 -4.4 6.8 ! BarrierMaker 50 -2.4 6.8 -2.4 6 -2.3 6 -1.6 6.7 -1.6 6.8 -2.4 6.8 ! BarrierMaker 50 -3.8 5.9 -3.8 8 -3.2 8 -3.2 5.9 -3.8 5.9 ! BarrierMaker 50 -5 5.4 -6 6.4 ! BarrierMaker 50 -4.3 5.3 -3.3 5.1 -2.8 5.1 ! BarrierMaker 50 -2 5.3 -1 6.2 -0.7 7.2 ! BarrierMaker 50 -5.1 4.1 -5.1 4.8 -4.5 4.8 ! BarrierMaker 50 -2.9 3.8 -2.9 3.1 -3.5 3.1 ! BarrierMaker 50 -1.2 1.5 -2.3 3 -2 4.3 -1.1 4.6 -0.1 4.5 0.7 4 1.6 3.9 1.8 3.5 1.1 2.6 1 1.7 1.9 0.8 1.8 0.4 1.2 0.4 -1.2 1.5 ! BarrierMaker 50 7.6 -4.5 7 -3.8 7 -3 7.7 -2.2 ! BarrierMaker 50 6.7 -4.5 5.9 -5 ! BarrierMaker 50 6 -4.5 5.7 -4 ! BarrierMaker 50 5.4 -4.2 4.6 -4.4 ! BarrierMaker 50 4.1 -4.5 3.5 -3.9 ! BarrierMaker 50 3.2 -4.3 2.3 -4.3 0.9 -4.1 -0.2 -3.9 -1 -4.2 -1.8 -4.2 ! BarrierMaker 50 -4.9 2.8 -3.7 2 -3.2 2.4 -2.7 2.3 -2.2 1.5 Turret -1 -3.2 -0.5 Turret -1 -0.4 -2.1 Index: football4.txt =================================================================== RCS file: /cvsroot/opentnl/tnl/exe/levels/football4.txt,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** football4.txt 6 Aug 2004 00:02:47 -0000 1.1 --- football4.txt 18 Oct 2004 00:09:21 -0000 1.2 *************** *** 16,32 **** Spawn 0 -0.6 8 Spawn 0 -1.1 7.7 ! BarrierMaker 0 9.1 -0.2 9.1 -0.3 9 -1 9 -3 8 -5 8 -6 9 -8 9 -9 8 -9 6 -7 5 -6 3 -3 1 -3 0 ! BarrierMaker 0 9.1 0.2 9.1 0.3 9 1 9 3 8 5 8 6 9 8 9 9 8 9 6 7 5 6 3 3 1 3 0 GoalZone -1 -7.4 7.4 -6.6 7.4 -6.6 6.6 -7.4 6.6 GoalZone -1 -0.4 5.4 0.4 5.4 0.4 4.6 -0.4 4.6 GoalZone -1 6.6 7.4 7.4 7.4 7.4 6.6 6.6 6.6 GoalZone -1 -0.4 2.4 0.4 2.4 0.4 1.6 -0.4 1.6 ! BarrierMaker -2 7 -1 6 -0.5 6 ! BarrierMaker 0.5 6 1 6 2 7 ! BarrierMaker 3 7 3 6.5 3.4 6.1 4 6.1 4.5 5.6 4.5 5.1 5 4.6 5.6 4.6 ! BarrierMaker 3.9 7.3 4.3 6.9 5.2 6.9 ! BarrierMaker 6 6.3 6 5.5 6.2 5.3 ! BarrierMaker 8.2 6.7 8.2 7.5 7.8 7.9 7.4 7.9 ! BarrierMaker 5.9 7.6 6.6 8.3 Turret 0 6.1 6.1 Turret 0 1.6 6.5 --- 16,32 ---- Spawn 0 -0.6 8 Spawn 0 -1.1 7.7 ! BarrierMaker 50 0 9.1 -0.2 9.1 -0.3 9 -1 9 -3 8 -5 8 -6 9 -8 9 -9 8 -9 6 -7 5 -6 3 -3 1 -3 0 ! BarrierMaker 50 0 9.1 0.2 9.1 0.3 9 1 9 3 8 5 8 6 9 8 9 9 8 9 6 7 5 6 3 3 1 3 0 GoalZone -1 -7.4 7.4 -6.6 7.4 -6.6 6.6 -7.4 6.6 GoalZone -1 -0.4 5.4 0.4 5.4 0.4 4.6 -0.4 4.6 GoalZone -1 6.6 7.4 7.4 7.4 7.4 6.6 6.6 6.6 GoalZone -1 -0.4 2.4 0.4 2.4 0.4 1.6 -0.4 1.6 ! BarrierMaker 50 -2 7 -1 6 -0.5 6 ! BarrierMaker 50 0.5 6 1 6 2 7 ! BarrierMaker 50 3 7 3 6.5 3.4 6.1 4 6.1 4.5 5.6 4.5 5.1 5 4.6 5.6 4.6 ! BarrierMaker 50 3.9 7.3 4.3 6.9 5.2 6.9 ! BarrierMaker 50 6 6.3 6 5.5 6.2 5.3 ! BarrierMaker 50 8.2 6.7 8.2 7.5 7.8 7.9 7.4 7.9 ! BarrierMaker 50 5.9 7.6 6.6 8.3 Turret 0 6.1 6.1 Turret 0 1.6 6.5 *************** *** 34,66 **** Turret 0 -0.6 5.9 Turret 0 -1.6 6.5 ! BarrierMaker 2.2 5.1 2.8 5.1 2.9 5.2 2.9 5.4 3 5.5 3.2 5.5 3.9 4.8 3.9 4.6 3.8 4.5 2.5 4.5 2.3 4.4 2.1 4.4 2 4.5 2 4.9 2.2 5.1 ! BarrierMaker 4 3.6 4 3.7 4.3 4 4.5 4 4.8 3.7 4.8 3.6 4.7 3.5 4.1 3.5 4 3.6 ! BarrierMaker 3.4 3.5 3.4 3.7 3.3 3.8 2.8 3.8 2.7 3.9 2 3.9 1.8 3.7 1.6 3.7 1 3.1 ! BarrierMaker 0.6 4 0.1 3.5 -1.9 3.5 -2.9 2.5 -3.4 2.5 -3.7 2.8 -3.7 3.7 -4.2 4.2 -4.2 4.3 ! BarrierMaker -0.5 -0.8 -0.5 0.8 ! BarrierMaker 0.5 -0.8 0.5 0.8 ! BarrierMaker -2.1 0.5 -1.3 0.8 -1 0.8 ! BarrierMaker 1.3 0.8 2 0.8 2 1.4 3 2 3 2.6 2 2.6 1.8 2.4 1.8 2 1 1.6 1 1.4 1.3 0.8 Turret -1 1.5 0.7 Turret 0 -0.4 3.4 ForceFieldProjector 0 1 3.2 ForceFieldProjector 0 2.2 4.3 ! BarrierMaker -0.699999 4.4 -0.699999 4.8 ! BarrierMaker 0.6 4.6 0.6 5 0.700001 5.1 1.2 5.1 1.3 5 1.3 4.9 0.9 4.5 0.700001 4.5 0.6 4.6 ! BarrierMaker 1.9 5.7 2.3 5.7 2.6 6 ! BarrierMaker -3 5.9 -3 7 -3.5 7 ! BarrierMaker -4 6.5 -3.5 6 -3.5 5 ! BarrierMaker -4.2 5.5 -5.2 5.5 ! BarrierMaker -4.8 6.6 -4.8 5.5 ! BarrierMaker -4.7 7.2 -4 7.2 ! BarrierMaker -6.4 5.9 -6 6.3 -6 6.7 -5.7 7 -5.3 7 ! BarrierMaker -6.1 5.2 -5.6 4.2 -5.2 3.8 -4.8 3.6 -4.7 3.6 -4.7 3.7 -4.4 3.7 ! BarrierMaker -6 7.7 -6.4 8.1 ! BarrierMaker -6.9 8.2 -7.5 8.2 ! BarrierMaker -6.5 8.6 -6.5 9 ! BarrierMaker -8.6 7.4 -8.2 7 -8.1 7 -8 7.8 -8.1 7.9 -8.6 7.6 -8.6 7.4 ! BarrierMaker -8.3 6.5 -7.5 6.1 -7 6.1 -6.9 6 -6.9 5.6 -6.6 5.4 ! BarrierMaker -0.4 8.3 -0.4 9 ! BarrierMaker 0.4 8.3 0.4 9 Teleporter 0 8.7 1 0 ForceFieldProjector 0 -0.299999 8.4 --- 34,66 ---- Turret 0 -0.6 5.9 Turret 0 -1.6 6.5 ! BarrierMaker 50 2.2 5.1 2.8 5.1 2.9 5.2 2.9 5.4 3 5.5 3.2 5.5 3.9 4.8 3.9 4.6 3.8 4.5 2.5 4.5 2.3 4.4 2.1 4.4 2 4.5 2 4.9 2.2 5.1 ! BarrierMaker 50 4 3.6 4 3.7 4.3 4 4.5 4 4.8 3.7 4.8 3.6 4.7 3.5 4.1 3.5 4 3.6 ! BarrierMaker 50 3.4 3.5 3.4 3.7 3.3 3.8 2.8 3.8 2.7 3.9 2 3.9 1.8 3.7 1.6 3.7 1 3.1 ! BarrierMaker 50 0.6 4 0.1 3.5 -1.9 3.5 -2.9 2.5 -3.4 2.5 -3.7 2.8 -3.7 3.7 -4.2 4.2 -4.2 4.3 ! BarrierMaker 50 -0.5 -0.8 -0.5 0.8 ! BarrierMaker 50 0.5 -0.8 0.5 0.8 ! BarrierMaker 50 -2.1 0.5 -1.3 0.8 -1 0.8 ! BarrierMaker 50 1.3 0.8 2 0.8 2 1.4 3 2 3 2.6 2 2.6 1.8 2.4 1.8 2 1 1.6 1 1.4 1.3 0.8 Turret -1 1.5 0.7 Turret 0 -0.4 3.4 ForceFieldProjector 0 1 3.2 ForceFieldProjector 0 2.2 4.3 ! BarrierMaker 50 -0.699999 4.4 -0.699999 4.8 ! BarrierMaker 50 0.6 4.6 0.6 5 0.700001 5.1 1.2 5.1 1.3 5 1.3 4.9 0.9 4.5 0.700001 4.5 0.6 4.6 ! BarrierMaker 50 1.9 5.7 2.3 5.7 2.6 6 ! BarrierMaker 50 -3 5.9 -3 7 -3.5 7 ! BarrierMaker 50 -4 6.5 -3.5 6 -3.5 5 ! BarrierMaker 50 -4.2 5.5 -5.2 5.5 ! BarrierMaker 50 -4.8 6.6 -4.8 5.5 ! BarrierMaker 50 -4.7 7.2 -4 7.2 ! BarrierMaker 50 -6.4 5.9 -6 6.3 -6 6.7 -5.7 7 -5.3 7 ! BarrierMaker 50 -6.1 5.2 -5.6 4.2 -5.2 3.8 -4.8 3.6 -4.7 3.6 -4.7 3.7 -4.4 3.7 ! BarrierMaker 50 -6 7.7 -6.4 8.1 ! BarrierMaker 50 -6.9 8.2 -7.5 8.2 ! BarrierMaker 50 -6.5 8.6 -6.5 9 ! BarrierMaker 50 -8.6 7.4 -8.2 7 -8.1 7 -8 7.8 -8.1 7.9 -8.6 7.6 -8.6 7.4 ! BarrierMaker 50 -8.3 6.5 -7.5 6.1 -7 6.1 -6.9 6 -6.9 5.6 -6.6 5.4 ! BarrierMaker 50 -0.4 8.3 -0.4 9 ! BarrierMaker 50 0.4 8.3 0.4 9 Teleporter 0 8.7 1 0 ForceFieldProjector 0 -0.299999 8.4 *************** *** 76,92 **** Spawn 1 0.6 -8 Spawn 1 1.1 -7.7 ! BarrierMaker 0 -9.1 0.2 -9.1 0.3 -9 1 -9 3 -8 5 -8 6 -9 8 -9 9 -8 9 -6 7 -5 6 -3 3 -1 3 0 ! BarrierMaker 0 -9.1 -0.2 -9.1 -0.3 -9 -1 -9 -3 -8 -5 -8 -6 -9 -8 -9 -9 -8 -9 -6 -7 -5 -6 -3 -3 -1 -3 0 GoalZone -1 7.4 -7.4 6.6 -7.4 6.6 -6.6 7.4 -6.6 GoalZone -1 0.4 -5.4 -0.4 -5.4 -0.4 -4.6 0.4 -4.6 GoalZone -1 -6.6 -7.4 -7.4 -7.4 -7.4 -6.6 -6.6 -6.6 GoalZone -1 0.4 -2.4 -0.4 -2.4 -0.4 -1.6 0.4 -1.6 ! BarrierMaker 2 -7 1 -6 0.5 -6 ! BarrierMaker -0.5 -6 -1 -6 -2 -7 ! BarrierMaker -3 -7 -3 -6.5 -3.4 -6.1 -4 -6.1 -4.5 -5.6 -4.5 -5.1 -5 -4.6 -5.6 -4.6 ! BarrierMaker -3.9 -7.3 -4.3 -6.9 -5.2 -6.9 ! BarrierMaker -6 -6.3 -6 -5.5 -6.2 -5.3 ! BarrierMaker -8.2 -6.7 -8.2 -7.5 -7.8 -7.9 -7.4 -7.9 ! BarrierMaker -5.9 -7.6 -6.6 -8.3 Turret 1 -6.1 -6.1 Turret 1 -1.6 -6.5 --- 76,92 ---- Spawn 1 0.6 -8 Spawn 1 1.1 -7.7 ! BarrierMaker 50 0 -9.1 0.2 -9.1 0.3 -9 1 -9 3 -8 5 -8 6 -9 8 -9 9 -8 9 -6 7 -5 6 -3 3 -1 3 0 ! BarrierMaker 50 0 -9.1 -0.2 -9.1 -0.3 -9 -1 -9 -3 -8 -5 -8 -6 -9 -8 -9 -9 -8 -9 -6 -7 -5 -6 -3 -3 -1 -3 0 GoalZone -1 7.4 -7.4 6.6 -7.4 6.6 -6.6 7.4 -6.6 GoalZone -1 0.4 -5... [truncated message content] |
From: Mark F. <mar...@us...> - 2004-10-18 00:09:33
|
Update of /cvsroot/opentnl/tnl/zap In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32370/zap Modified Files: UIEditor.cpp UIEditor.h ZAP.vcproj gameType.cpp gameType.h Log Message: Added width field to barriers for variable-width barriers Index: UIEditor.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/UIEditor.cpp,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** UIEditor.cpp 2 Aug 2004 21:01:30 -0000 1.19 --- UIEditor.cpp 18 Oct 2004 00:09:22 -0000 1.20 *************** *** 31,34 **** --- 31,35 ---- #include <ctype.h> #include "gameObjectRender.h" + #include "barrier.h" namespace Zap *************** *** 58,61 **** --- 59,63 ---- mCreatingPoly = false; mCurrentTeam = 0; + mGridSize = Game::DefaultGridSize; strcpy(mEditFileName, name); *************** *** 66,69 **** --- 68,72 ---- { const char *name; + bool hasWidth; bool hasTeam; bool canHaveNoTeam; *************** *** 89,105 **** GameItemRec gGameItemRecs[] = { ! { "Spawn", true, false, false, 'S' }, ! { "SoccerBallItem", false, false, false, 'B' }, ! { "FlagItem", true, true, false, 0 }, ! { "BarrierMaker", false, false, true, 0 }, ! { "Teleporter", false, false, true, 'T' }, ! { "RepairItem", false, false, false, 'R' }, ! { "TestItem", false, false, false, 't' }, ! { "ResourceItem", false, false, false, 'r' }, ! { "LoadoutZone", true, true, true, 0 }, ! { "Turret", true, true, false, 'N' }, ! { "ForceFieldProjector", true, true, false, 'P' }, ! { "GoalZone", true, false, true, 0 }, ! { NULL, false, false, false, 0 }, }; --- 92,108 ---- GameItemRec gGameItemRecs[] = { ! { "Spawn", false, true, false, false, 'S' }, ! { "SoccerBallItem", false, false, false, false, 'B' }, ! { "FlagItem", false, true, true, false, 0 }, ! { "BarrierMaker", true, false, false, true, 0 }, ! { "Teleporter", false, false, false, true, 'T' }, ! { "RepairItem", false, false, false, false, 'R' }, ! { "TestItem", false, false, false, false, 't' }, ! { "ResourceItem", false, false, false, false, 'r' }, ! { "LoadoutZone", false, true, true, true, 0 }, ! { "Turret", false, true, true, false, 'N' }, ! { "ForceFieldProjector", false, true, true, false, 'P' }, ! { "GoalZone", false, true, false, true, 0 }, ! { NULL, false, false, false, false, 0 }, }; *************** *** 129,132 **** --- 132,141 ---- i.team = -1; i.selected = false; + i.width = 0; + if(gGameItemRecs[index].hasWidth) + { + i.width = atof(argv[arg]); + arg++; + } if(gGameItemRecs[index].hasTeam) { *************** *** 160,163 **** --- 169,176 ---- mTeams.push_back(t); } + else if(!strcmp(argv[0], "GridSize") && argc == 2) + { + mGridSize = atof(argv[1]); + } else { *************** *** 261,264 **** --- 274,289 ---- mNewItem.verts.erase_fast(mNewItem.verts.size() - 1); } + else + { + for(S32 i = 0; i < mItems.size(); i++) + { + if(mItems[i].selected && mItems[i].index == ItemBarrierMaker) + { + glColor3f(1,1,1); + drawStringf(680, 5, 20, "Width: %g", mItems[i].width); + break; + } + } + } if(mDragSelecting) { *************** *** 793,796 **** --- 818,822 ---- mNewItem.verts.clear(); mNewItem.index = ItemBarrierMaker; + mNewItem.width = Barrier::BarrierWidth; mNewItem.team = -1; mNewItem.selected = false; *************** *** 850,853 **** --- 876,897 ---- } + void EditorUserInterface::incBarrierWidth() + { + for(S32 i = 0; i < mItems.size(); i++) + { + if(mItems[i].index == ItemBarrierMaker && mItems[i].selected) + mItems[i].width += 5; + } + } + + void EditorUserInterface::decBarrierWidth() + { + for(S32 i = 0; i < mItems.size(); i++) + { + if(mItems[i].index == ItemBarrierMaker && mItems[i].selected && mItems[i].width >= 9) + mItems[i].width -= 5; + } + } + void EditorUserInterface::constructItem(U32 itemIndex) { *************** *** 948,951 **** --- 992,1003 ---- deleteSelection(); break; + case '+': + case '=': + incBarrierWidth(); + break; + case '-': + case '_': + decBarrierWidth(); + break; case 27: gEditorMenuUserInterface.activate(); *************** *** 1076,1079 **** --- 1128,1133 ---- WorldItem &p = mItems[i]; fprintf(f, "%s ", gGameItemRecs[mItems[i].index].name); + if(gGameItemRecs[mItems[i].index].hasWidth) + fprintf(f, "%g ", mItems[i].width); if(gGameItemRecs[mItems[i].index].hasTeam) fprintf(f, "%d ", mItems[i].team); Index: gameType.cpp =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/gameType.cpp,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** gameType.cpp 15 Oct 2004 18:01:15 -0000 1.64 --- gameType.cpp 18 Oct 2004 00:09:22 -0000 1.65 *************** *** 49,53 **** mGameOver = false; mTeamScoreLimit = DefaultTeamScoreLimit; - mBarrierWidth = Barrier::BarrierWidth; } --- 49,52 ---- *************** *** 441,455 **** { BarrierRec barrier; ! for(S32 i = 1; i < argc; i++) barrier.verts.push_back(atof(argv[i]) * getGame()->getGridSize()); if(barrier.verts.size() > 3) { - barrier.width = mBarrierWidth; mBarriers.push_back(barrier); ! constructBarriers(getGame(), barrier.verts, mBarrierWidth); } } - else if(!stricmp(argv[0], "BarrierWidth")) - mBarrierWidth = atof(argv[1]); else if(!stricmp(argv[0], "LevelName") && argc > 1) mLevelName.set(argv[1]); --- 440,454 ---- { BarrierRec barrier; ! if(argc < 2) ! return false; ! barrier.width = atof(argv[1]); ! for(S32 i = 2; i < argc; i++) barrier.verts.push_back(atof(argv[i]) * getGame()->getGridSize()); if(barrier.verts.size() > 3) { mBarriers.push_back(barrier); ! constructBarriers(getGame(), barrier.verts, barrier.width); } } else if(!stricmp(argv[0], "LevelName") && argc > 1) mLevelName.set(argv[1]); Index: UIEditor.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/UIEditor.h,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** UIEditor.h 15 Jul 2004 00:13:35 -0000 1.5 --- UIEditor.h 18 Oct 2004 00:09:22 -0000 1.6 *************** *** 41,44 **** --- 41,45 ---- U32 index; S32 team; + F32 width; Vector<Point> verts; bool selected; *************** *** 68,71 **** --- 69,73 ---- Point mMouseDownPos; S32 mCurrentTeam; + F32 mGridSize; bool mCreatingPoly; *************** *** 106,109 **** --- 108,114 ---- void rotateSelection(F32 angle); + void incBarrierWidth(); + void decBarrierWidth(); + void saveLevel(); void testLevel(); Index: gameType.h =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/gameType.h,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** gameType.h 15 Oct 2004 18:01:15 -0000 1.38 --- gameType.h 18 Oct 2004 00:09:22 -0000 1.39 *************** *** 77,81 **** }; - F32 mBarrierWidth; struct BarrierRec { --- 77,80 ---- Index: ZAP.vcproj =================================================================== RCS file: /cvsroot/opentnl/tnl/zap/ZAP.vcproj,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** ZAP.vcproj 29 Sep 2004 23:53:21 -0000 1.40 --- ZAP.vcproj 18 Oct 2004 00:09:22 -0000 1.41 *************** *** 139,145 **** --- 139,157 ---- </File> <File + RelativePath="..\exe\levels\football3.txt"> + </File> + <File + RelativePath="..\exe\levels\football4.txt"> + </File> + <File + RelativePath="..\exe\levels\football5.txt"> + </File> + <File RelativePath="..\exe\levels\hunters1.txt"> </File> <File + RelativePath="..\exe\levels\hunters2.txt"> + </File> + <File RelativePath="..\exe\levels\level2.txt"> </File> *************** *** 160,163 **** --- 172,181 ---- </File> <File + RelativePath="..\exe\levels\retrieve2.txt"> + </File> + <File + RelativePath="..\exe\levels\retrieve3.txt"> + </File> + <File RelativePath="..\exe\levels\soccer1.txt"> </File> *************** *** 165,168 **** --- 183,189 ---- RelativePath="..\exe\levels\soccer2.txt"> </File> + <File + RelativePath="..\exe\levels\zm1.txt"> + </File> </Filter> <Filter |