diff --git a/Minecraft.Client/Linux/LinuxStubs.h b/Minecraft.Client/Linux/LinuxStubs.h index 0b3d2445c..eb751d246 100644 --- a/Minecraft.Client/Linux/LinuxStubs.h +++ b/Minecraft.Client/Linux/LinuxStubs.h @@ -9,6 +9,8 @@ #include #include #include +#include +#include #include #include #include @@ -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 \ No newline at end of file diff --git a/Minecraft.World/Path.cpp b/Minecraft.World/Path.cpp index 538917f6f..ff8a641ad 100644 --- a/Minecraft.World/Path.cpp +++ b/Minecraft.World/Path.cpp @@ -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() { diff --git a/Minecraft.World/WoodSlabTile.cpp b/Minecraft.World/WoodSlabTile.cpp index ba3a98e50..d7a0e9e10 100644 --- a/Minecraft.World/WoodSlabTile.cpp +++ b/Minecraft.World/WoodSlabTile.cpp @@ -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"