mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +00:00
Merge branch 'refactor/tropical-dev' into refactor/tropical-dev
This commit is contained in:
commit
5fdfdf9a81
|
|
@ -9,6 +9,8 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <cerrno>
|
#include <cerrno>
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
|
#include <climits>
|
||||||
|
#include <cfloat>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
@ -66,6 +68,12 @@ typedef unsigned char byte;
|
||||||
typedef short SHORT;
|
typedef short SHORT;
|
||||||
typedef float FLOAT;
|
typedef float FLOAT;
|
||||||
|
|
||||||
|
#define ERROR_SUCCESS 0L
|
||||||
|
#define ERROR_IO_PENDING 997L // dderror
|
||||||
|
#define ERROR_CANCELLED 1223L
|
||||||
|
//#define S_OK ((HRESULT)0x00000000L)
|
||||||
|
#define S_FALSE ((HRESULT)0x00000001L)
|
||||||
|
|
||||||
#define PAGE_READWRITE 0x04
|
#define PAGE_READWRITE 0x04
|
||||||
#define MEM_LARGE_PAGES 0x20000000
|
#define MEM_LARGE_PAGES 0x20000000
|
||||||
#define MAXULONG_PTR ((ULONG_PTR)~0UL)
|
#define MAXULONG_PTR ((ULONG_PTR)~0UL)
|
||||||
|
|
@ -648,5 +656,49 @@ static inline BOOL FileTimeToSystemTime(const FILETIME *lpFileTime, LPSYSTEMTIME
|
||||||
lpSystemTime->wMilliseconds = (WORD)(remainder100ns / 10000); // 1ms = 10000 * 100ns
|
lpSystemTime->wMilliseconds = (WORD)(remainder100ns / 10000); // 1ms = 10000 * 100ns
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
static inline DWORD GetTickCount()
|
||||||
|
{
|
||||||
|
struct timespec ts;
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
|
|
||||||
|
// milliseconds
|
||||||
|
return (long long)ts.tv_sec * 1000 + (long long)ts.tv_nsec / 1000000;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline BOOL QueryPerformanceFrequency(LARGE_INTEGER *lpFrequency)
|
||||||
|
{
|
||||||
|
// nanoseconds
|
||||||
|
lpFrequency->QuadPart = 1000000000;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static inline BOOL QueryPerformanceCounter(LARGE_INTEGER *lpPerformanceCount)
|
||||||
|
{
|
||||||
|
struct timespec ts;
|
||||||
|
clock_gettime(CLOCK_MONOTONIC, &ts);
|
||||||
|
|
||||||
|
// nanoseconds
|
||||||
|
lpPerformanceCount->QuadPart = ((long long)ts.tv_sec * 1000000000) + (long long)ts.tv_nsec;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef _FINAL_BUILD
|
||||||
|
VOID OutputDebugStringW(LPCWSTR lpOutputString)
|
||||||
|
{
|
||||||
|
fwprintf(stderr, lpOutputString);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID OutputDebugString(LPCSTR lpOutputString)
|
||||||
|
{
|
||||||
|
fprintf(stderr, lpOutputString);
|
||||||
|
}
|
||||||
|
|
||||||
|
VOID OutputDebugStringA(LPCSTR lpOutputString)
|
||||||
|
{
|
||||||
|
fprintf(stderr, lpOutputString);
|
||||||
|
}
|
||||||
|
#endif // _CONTENT_PACKAGE
|
||||||
|
|
||||||
#endif // LINUXSTUBS_H
|
#endif // LINUXSTUBS_H
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "net.minecraft.world.entity.h"
|
#include "net.minecraft.world.entity.h"
|
||||||
#include "net.minecraft.world.level.pathfinder.h"
|
#include "net.minecraft.world.level.pathfinder.h"
|
||||||
#include "path.h"
|
#include "Path.h"
|
||||||
|
|
||||||
Path::~Path()
|
Path::~Path()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include "stdafx.h"
|
#include "stdafx.h"
|
||||||
#include "WoodSlabTile.h"
|
#include "WoodSlabTile.h"
|
||||||
#include "woodtile.h"
|
#include "WoodTile.h"
|
||||||
#include "treetile.h"
|
#include "TreeTile.h"
|
||||||
#include "net.minecraft.world.level.h"
|
#include "net.minecraft.world.level.h"
|
||||||
#include "net.minecraft.world.level.biome.h"
|
#include "net.minecraft.world.level.biome.h"
|
||||||
#include "net.minecraft.world.item.h"
|
#include "net.minecraft.world.item.h"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue