diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5761abc --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.o diff --git a/README.md b/README.md index 8dcd39f..ef4b92f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,7 @@ An updated version of the [irrNetLite](http://irrlicht.sourceforge.net/forum/viewtopic.php?f=6&t=22658) networking library compiled against recent versions of [enet](https://github.com/lsalzman/enet) and [zlib](https://github.com/madler/zlib). + ## Compiling for Linux When cloning use the `--recurse-submodules` flag to retrieve the enet and zlib libraries needed by the project: @@ -10,6 +11,7 @@ When cloning use the `--recurse-submodules` flag to retrieve the enet and zlib l Then run `make` in the `source/` directory to build the library. + ## Building examples Navigate to `examples/` and run: @@ -23,5 +25,6 @@ or to build them with optimizations: The compiled binaries will be found in `examples/bin/` +## License -Original code by Ahmed Hilali. +Refer to `source/ReadMe.txt` diff --git a/enet b/enet index 7900e72..236e8a6 160000 --- a/enet +++ b/enet @@ -1 +1 @@ -Subproject commit 7900e72b709798ac285431bf1860014c6e1caf91 +Subproject commit 236e8a6428d8e7c85956305859f0918d75cc9964 diff --git a/examples/Example1/Makefile b/examples/01.Tutorial/Makefile similarity index 95% rename from examples/Example1/Makefile rename to examples/01.Tutorial/Makefile index f5c46fc..f26042a 100644 --- a/examples/Example1/Makefile +++ b/examples/01.Tutorial/Makefile @@ -1,5 +1,5 @@ CXX = g++ -Target := Example1 +Target := 01.Tutorial TargetPath := ../bin/ Sources := main.cpp diff --git a/examples/Tutorial/main.cpp b/examples/01.Tutorial/main.cpp similarity index 97% rename from examples/Tutorial/main.cpp rename to examples/01.Tutorial/main.cpp index 6effa23..287ab40 100644 --- a/examples/Tutorial/main.cpp +++ b/examples/01.Tutorial/main.cpp @@ -1,11 +1,10 @@ /* +Example 1: Tutorial. + Welcome to the simple, introductory tutorial for irrNetLite. This will show you the very basics of setting up a client and server, and sending and receiving packets. Because irrNetLite is so easy to use, I think you will not find many actual lines of code in this example, rather most of it is documentation. - -For much more sophisticated use of irrNetLite, I recommend taking a look in the -examples subdirectory. */ // Include the main irrNet.h header for irrNetLite. diff --git a/examples/Example2/Makefile b/examples/02.PacketIdentification/Makefile similarity index 93% rename from examples/Example2/Makefile rename to examples/02.PacketIdentification/Makefile index b8c38ed..6c025af 100644 --- a/examples/Example2/Makefile +++ b/examples/02.PacketIdentification/Makefile @@ -1,5 +1,5 @@ CXX = g++ -Target := Example2 +Target := 02.PacketIdentification TargetPath := ../bin/ Sources := main.cpp diff --git a/examples/Example1/main.cpp b/examples/02.PacketIdentification/main.cpp similarity index 98% rename from examples/Example1/main.cpp rename to examples/02.PacketIdentification/main.cpp index bfbc8ce..153b049 100644 --- a/examples/Example1/main.cpp +++ b/examples/02.PacketIdentification/main.cpp @@ -1,8 +1,8 @@ /* -Example 1: Packet Identification. +Example 2: Packet Identification. In this example I will expain the basics of packet identification. -For a more basic introduction please refer to Tutorial.cpp first. +For a more basic introduction please refer to the tutorial first. (Recommended) */ diff --git a/examples/Tutorial/Makefile b/examples/03.ClientManagement/Makefile similarity index 94% rename from examples/Tutorial/Makefile rename to examples/03.ClientManagement/Makefile index 90cc69a..77a1969 100644 --- a/examples/Tutorial/Makefile +++ b/examples/03.ClientManagement/Makefile @@ -1,5 +1,5 @@ CXX = g++ -Target := Tutorial +Target := 03.ClientManagement TargetPath := ../bin/ Sources := main.cpp diff --git a/examples/Example2/main.cpp b/examples/03.ClientManagement/main.cpp similarity index 98% rename from examples/Example2/main.cpp rename to examples/03.ClientManagement/main.cpp index 5fcc50e..f27629a 100644 --- a/examples/Example2/main.cpp +++ b/examples/03.ClientManagement/main.cpp @@ -1,8 +1,8 @@ /* -Example 2: Client management. +Example 3: Client management. In this example I will demonstrate client management. -For a more basic introduction please refer to Tutorial.cpp first. +For a more basic introduction please refer to the Tutorial first. (Recommended) */ diff --git a/examples/linux_compile_all.sh b/examples/linux_compile_all.sh index 47a9caa..1d685cf 100755 --- a/examples/linux_compile_all.sh +++ b/examples/linux_compile_all.sh @@ -1,15 +1,8 @@ #! /bin/bash [ -z $1 ] || TARGET=$1 [ -z $TARGET ] && TARGET=debug -for i in Tutorial Example* ; do +for i in [0123456789]* ; do echo "Building $i"; pushd $i && make clean $TARGET; popd; done - - - - -#g++ Tutorial.cpp -I../irrnet -L../lib -lirrnet -o Tutorial -#g++ Example1.cpp -I../irrnet -L../lib -lirrnet -o Example1 -#g++ Example2.cpp -I../irrnet -L../lib -lirrnet -o Example2 diff --git a/source/CNetManager.o b/source/CNetManager.o deleted file mode 100644 index b9ede93..0000000 Binary files a/source/CNetManager.o and /dev/null differ diff --git a/source/SPacket.o b/source/SPacket.o deleted file mode 100644 index 794917f..0000000 Binary files a/source/SPacket.o and /dev/null differ