use hard tabs

This commit is contained in:
Menche 2015-02-06 16:05:12 -08:00 committed by darkrose
parent 5334cabad8
commit 0b25fee660
21 changed files with 307 additions and 313 deletions

View File

@ -42,10 +42,8 @@ const uint64_t PRIV_BUILD = 1; // Can build - i.e. modify the world
const uint64_t PRIV_TELEPORT = 2; // Can teleport
const uint64_t PRIV_SETTIME = 4; // Can set the time
const uint64_t PRIV_PRIVS = 8; // Can grant and revoke privileges
const uint64_t PRIV_SERVER = 16; // Can manage the server (e.g. shutodwn
// ,settings)
const uint64_t PRIV_SHOUT = 32; // Can broadcast chat messages to all
// players
const uint64_t PRIV_SERVER = 16; // Can manage the server (e.g. shutodwn, settings)
const uint64_t PRIV_SHOUT = 32; // Can broadcast chat messages to all players
const uint64_t PRIV_BAN = 64; // Can ban players
// Default privileges - these can be overriden for new players using the

View File

@ -22,7 +22,6 @@
3. This notice may not be removed or altered from any source distribution.
René Nyffenegger rene.nyffenegger@adp-gmbh.ch
*/
#include "base64.h"
@ -80,15 +79,9 @@ std::string base64_encode(unsigned char const* bytes_to_encode, unsigned int in_
for (j = 0; (j < i + 1); j++)
ret += base64_chars[char_array_4[j]];
// Don't pad it with =
/*while((i++ < 3))
ret += '=';*/
}
return ret;
}
std::string base64_decode(std::string const& encoded_string) {
@ -131,3 +124,4 @@ std::string base64_decode(std::string const& encoded_string) {
return ret;
}

View File

@ -31,15 +31,13 @@
#include "mapnode.h"
/*
Some planning
-------------
* Some planning
*
* Client receives a network packet with information of added objects
in it
* in it
*
* Client supplies the information to its ClientEnvironment
* The environment adds the specified objects to itself
*/
class ClientEnvironment;

View File

@ -38,8 +38,7 @@
#define PROTOCOL_ID 0x4f457403
#define PASSWORD_SIZE 28 // Maximum password length. Allows for
// base64-encoded SHA-1 (27+\0).
#define PASSWORD_SIZE 28 // Maximum password length. Allows for base64-encoded SHA-1 (27+\0).
enum ToClientCommand
{

View File

@ -238,31 +238,35 @@ checking at all.
#define TYPE_ORIGINAL 1
#define ORIGINAL_HEADER_SIZE 1
/*
SPLIT: These are sequences of packets forming one bigger piece of
data.
- When processed and all the packet_nums 0...packet_count-1 are
present (this should be buffered), the resulting data shall be
directly handed to the user.
- If the data fails to come up in a reasonable time, the buffer shall
be silently discarded.
- These can be sent as-is or atop of a RELIABLE packet stream.
Header (7 bytes):
[0] u8 type
[1] u16 seqnum
[3] u16 chunk_count
[5] u16 chunk_num
* SPLIT: These are sequences of packets forming one bigger piece of
* data.
*
* When processed and all the packet_nums 0...packet_count-1 are
* present (this should be buffered), the resulting data shall be
* directly handed to the user.
*
* If the data fails to come up in a reasonable time, the buffer shall
* be silently discarded.
*
* These can be sent as-is or atop of a RELIABLE packet stream.
* Header (7 bytes):
* [0] u8 type
* [1] u16 seqnum
* [3] u16 chunk_count
* [5] u16 chunk_num
*/
#define TYPE_SPLIT 2
/*
RELIABLE: Delivery of all RELIABLE packets shall be forced by ACKs,
and they shall be delivered in the same order as sent. This is done
with a buffer in the receiving and transmitting end.
- When this is processed, the contents of each packet is recursively
processed as packets.
Header (3 bytes):
[0] u8 type
[1] u16 seqnum
* RELIABLE: Delivery of all RELIABLE packets shall be forced by ACKs,
* and they shall be delivered in the same order as sent. This is done
* with a buffer in the receiving and transmitting end.
*
* When this is processed, the contents of each packet is recursively
* processed as packets.
*
* Header (3 bytes):
* [0] u8 type
* [1] u16 seqnum
*/
#define TYPE_RELIABLE 3
#define RELIABLE_HEADER_SIZE 3

View File

@ -42,14 +42,15 @@ Some planning
-------------
* Server environment adds an active object, which gets the id 1
*
* The active object list is scanned for each client once in a while,
and it finds out what objects have been added that are not known
by the client yet. This scan is initiated by the Server class and
the result ends up directly to the server.
* and it finds out what objects have been added that are not known
* by the client yet. This scan is initiated by the Server class and
* the result ends up directly to the server.
*
* A network packet is created with the info and sent to the client.
* Environment converts objects to static data and static data to
objects, based on how close players are to them.
* objects, based on how close players are to them.
*/
class ServerEnvironment;

View File

@ -688,7 +688,7 @@ ColorContainer::ColorContainer()
colors["azure"] = 0xf0ffff;
colors["beige"] = 0xf5f5dc;
colors["bisque"] = 0xffe4c4;
colors["black"] = 00000000;
colors["black"] = 0x000000;
colors["blanchedalmond"] = 0xffebcd;
colors["blue"] = 0x0000ff;
colors["blueviolet"] = 0x8a2be2;