Merge branch 'refactor/tropical-dev' into refactor/tropical-dev

This commit is contained in:
ella love 2026-03-02 23:22:50 -05:00 committed by GitHub
commit 5fdfdf9a81
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 55 additions and 3 deletions

View file

@ -9,6 +9,8 @@
#include <string>
#include <cerrno>
#include <atomic>
#include <climits>
#include <cfloat>
#include <pthread.h>
#include <fcntl.h>
#include <unistd.h>
@ -66,6 +68,12 @@ typedef unsigned char byte;
typedef short SHORT;
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 MEM_LARGE_PAGES 0x20000000
#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
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

View file

@ -1,7 +1,7 @@
#include "stdafx.h"
#include "net.minecraft.world.entity.h"
#include "net.minecraft.world.level.pathfinder.h"
#include "path.h"
#include "Path.h"
Path::~Path()
{

View file

@ -1,7 +1,7 @@
#include "stdafx.h"
#include "WoodSlabTile.h"
#include "woodtile.h"
#include "treetile.h"
#include "WoodTile.h"
#include "TreeTile.h"
#include "net.minecraft.world.level.h"
#include "net.minecraft.world.level.biome.h"
#include "net.minecraft.world.item.h"