OpenFusion/src/CNStructs.hpp

43 lines
985 B
C++
Raw Normal View History

2020-08-18 20:42:30 +00:00
/*
CNStructs.hpp - defines some basic structs & useful methods for packets used by FusionFall
NOTE: this is missing the vast majority of packets, I have also ommitted the ERR & FAIL packets for simplicity
*/
#ifndef _CNS_HPP
#define _CNS_HPP
#include <iostream>
#include <stdio.h>
#include <stdint.h>
#include <sys/time.h>
#include <cstring>
#include <string>
#include <locale>
#include <codecvt>
// TODO: rewrite U16toU8 & U8toU16 to not use codecvt
std::string U16toU8(char16_t* src);
// returns number of char16_t that was written at des
int U8toU16(std::string src, char16_t* des);
uint64_t getTime();
//#define CNPROTO_VERSION_0728
2020-08-19 20:00:39 +00:00
#define CNPROTO_VERSION_0104
2020-08-18 20:42:30 +00:00
#ifdef CNPROTO_VERSION_0728
#define AEQUIP_COUNT 12
#else
#define AEQUIP_COUNT 9
#endif
2020-08-19 20:00:39 +00:00
// ========================================================[[ beta-20100104 ]]========================================================
#ifdef CNPROTO_VERSION_0104
2020-08-19 20:07:11 +00:00
#include "structs/0104.hpp"
2020-08-19 20:00:39 +00:00
#endif
#endif