Browse Source

Rename examples numerically

Original examples were called Tutorial/Example1/2,
and referring to them numerically is cleaner.
dev
rna88 5 years ago
parent
commit
5d4859fff3
  1. 1
      .gitignore
  2. 5
      README.md
  3. 2
      enet
  4. 2
      examples/01.Tutorial/Makefile
  5. 5
      examples/01.Tutorial/main.cpp
  6. 2
      examples/02.PacketIdentification/Makefile
  7. 4
      examples/02.PacketIdentification/main.cpp
  8. 2
      examples/03.ClientManagement/Makefile
  9. 4
      examples/03.ClientManagement/main.cpp
  10. 9
      examples/linux_compile_all.sh
  11. BIN
      source/CNetManager.o
  12. BIN
      source/SPacket.o

1
.gitignore vendored

@ -0,0 +1 @@
*.o

5
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`

2
enet

@ -1 +1 @@
Subproject commit 7900e72b709798ac285431bf1860014c6e1caf91
Subproject commit 236e8a6428d8e7c85956305859f0918d75cc9964

2
examples/Example1/Makefile → examples/01.Tutorial/Makefile

@ -1,5 +1,5 @@
CXX = g++
Target := Example1
Target := 01.Tutorial
TargetPath := ../bin/
Sources := main.cpp

5
examples/Tutorial/main.cpp → 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.

2
examples/Example2/Makefile → examples/02.PacketIdentification/Makefile

@ -1,5 +1,5 @@
CXX = g++
Target := Example2
Target := 02.PacketIdentification
TargetPath := ../bin/
Sources := main.cpp

4
examples/Example1/main.cpp → 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)
*/

2
examples/Tutorial/Makefile → examples/03.ClientManagement/Makefile

@ -1,5 +1,5 @@
CXX = g++
Target := Tutorial
Target := 03.ClientManagement
TargetPath := ../bin/
Sources := main.cpp

4
examples/Example2/main.cpp → 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)
*/

9
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

BIN
source/CNetManager.o

Binary file not shown.

BIN
source/SPacket.o

Binary file not shown.
Loading…
Cancel
Save