- 4 Magic (ignore packets with wrong magic)
- 4 Sequence
- 4 Ack sequence
- 4 Ack bitfield
- 2 Channel ID
#include "space.h" | |
#include "shapes.h" | |
void Space::add_object(const Object& obj) | |
{ | |
objects.push_back(obj); | |
shapes.push_back(std::unique_ptr<Shape>(obj.shape)); | |
} | |
void Space::update(float dt) |
PacketPool outPool; | |
void client(Address addr) | |
{ | |
Connection conn; | |
// Request a connection | |
ConnectionRequest request(0xDEADBEEF, 2000); | |
ConnectionRequest::Status status; | |
while ((status = request.status()) == ConnectionRequest::WAITING) { |
P = send_reliable.begin(); | |
while (!send_reliable.empty()) { | |
unsigned int fragc = fragment_count(writer.write_amount(), P->packet.size()); | |
unsigned int start = 0; | |
for (unsigned int i = 0; i < fragc - 1; i++) { | |
start += add_packet(writer, P->chan, P->packet, start, fragc); | |
send_packet(writer); | |
} | |
add_packet(writer, P->chan, P->packet, start, fragc); | |
send_reliable.erase(P); |
#define _CRT_SECURE_NO_WARNINGS | |
#include <Windows.h> | |
#include <stdio.h> | |
#include <string.h> | |
typedef unsigned char uchar; | |
#define JMPSTACK_SIZE 1024 | |
#define ADDRBUF_SIZE 1024 |
class AstNode | |
{ | |
public: | |
}; | |
typedef std::unique_ptr<AstNode> AstPtr; | |
typedef std::vector<AstPtr> AstList; | |
class AstFuncImpl : public AstNode | |
{ |
#include <msp430.h> | |
#include <stdio.h> | |
int main(void) | |
{ | |
printf("Hello World\n"); | |
return 0; | |
} | |
int putchar(int c) |
var $http = require('http'); | |
var $url = require('url'); | |
var $fs = require('fs'); | |
var tick = 0; | |
var dwarves = []; | |
function rand(min, max) | |
{ |
#include "textrender.h" | |
#include <GL/glew.h> | |
#include <GL/glfw.h> | |
#include "glm/gtc/type_ptr.hpp" | |
int* font; | |
using namespace glm; |