mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-10 09:12:29 +00:00
replace __debugbreak with assert, fix full build
Some checks are pending
Some checks are pending
This commit is contained in:
parent
6faa481013
commit
e4883d87fc
|
|
@ -259,7 +259,7 @@ unsigned int DLCManager::getPackIndex(DLCPack* pack, bool& found,
|
||||||
if (pack == nullptr) {
|
if (pack == nullptr) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"DLCManager: Attempting to find the index for a nullptr pack\n");
|
"DLCManager: Attempting to find the index for a nullptr pack\n");
|
||||||
//__debugbreak();
|
//assert(0);
|
||||||
return foundIndex;
|
return foundIndex;
|
||||||
}
|
}
|
||||||
if (type != e_DLCType_All) {
|
if (type != e_DLCType_All) {
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ void DLCPack::addChildPack(DLCPack* childPack) {
|
||||||
const std::uint32_t packId = childPack->GetPackId();
|
const std::uint32_t packId = childPack->GetPackId();
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
if (packId < 0 || packId > 15) {
|
if (packId < 0 || packId > 15) {
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
childPack->SetPackId((packId << 24) | m_packId);
|
childPack->SetPackId((packId << 24) | m_packId);
|
||||||
|
|
@ -302,7 +302,7 @@ unsigned int DLCPack::getFileIndexAt(DLCManager::EDLCType type,
|
||||||
if (type == DLCManager::e_DLCType_All) {
|
if (type == DLCManager::e_DLCType_All) {
|
||||||
app.DebugPrintf("Unimplemented\n");
|
app.DebugPrintf("Unimplemented\n");
|
||||||
#if !defined(__CONTENT_PACKAGE)
|
#if !defined(__CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
@ -327,7 +327,7 @@ bool DLCPack::hasPurchasedFile(DLCManager::EDLCType type,
|
||||||
if (type == DLCManager::e_DLCType_All) {
|
if (type == DLCManager::e_DLCType_All) {
|
||||||
app.DebugPrintf("Unimplemented\n");
|
app.DebugPrintf("Unimplemented\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@ Game::Game() {
|
||||||
"%d\n",
|
"%d\n",
|
||||||
sizeof(GAME_SETTINGS), GAME_SETTINGS_PROFILE_DATA_BYTES);
|
sizeof(GAME_SETTINGS), GAME_SETTINGS_PROFILE_DATA_BYTES);
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -473,7 +473,7 @@ bool GameRuleManager::readRuleFile(
|
||||||
compressedBuffer.data(), compressedSize); break; default:
|
compressedBuffer.data(), compressedSize); break; default:
|
||||||
app.DebugPrintf("Invalid compression
|
app.DebugPrintf("Invalid compression
|
||||||
type %d found\n", compressionType);
|
type %d found\n", compressionType);
|
||||||
__debugbreak();
|
assert(0);
|
||||||
|
|
||||||
[] decompressedBuffer.data(); dis.close(); bais.reset();
|
[] decompressedBuffer.data(); dis.close(); bais.reset();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -142,7 +142,7 @@ void ConsoleSchematicFile::load(DataInputStream* dis) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"ConsoleSchematicFile has read a nullptr tile "
|
"ConsoleSchematicFile has read a nullptr tile "
|
||||||
"entity\n");
|
"entity\n");
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
m_tileEntities.push_back(te);
|
m_tileEntities.push_back(te);
|
||||||
|
|
@ -675,7 +675,7 @@ void ConsoleSchematicFile::generateSchematicFile(
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
if (p != blockCount) __debugbreak();
|
if (p != blockCount) assert(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// We don't know how this will compress - just make a fixed length buffer to
|
// We don't know how this will compress - just make a fixed length buffer to
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ GameRule::ValueType GameRule::getParameter(const std::wstring& parameterName) {
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
wprintf(L"WARNING: Parameter %ls was not set before being fetched\n",
|
wprintf(L"WARNING: Parameter %ls was not set before being fetched\n",
|
||||||
parameterName.c_str());
|
parameterName.c_str());
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return m_parameters[parameterName];
|
return m_parameters[parameterName];
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ void StringTable::ProcessStringTableData(void) {
|
||||||
} else {
|
} else {
|
||||||
app.DebugPrintf("Failed to get language\n");
|
app.DebugPrintf("Failed to get language\n");
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
isStatic = false;
|
isStatic = false;
|
||||||
|
|
@ -137,7 +137,7 @@ void StringTable::getData(std::uint8_t** ppData, unsigned int* pSize) {
|
||||||
const wchar_t* StringTable::getString(const std::wstring& id) {
|
const wchar_t* StringTable::getString(const std::wstring& id) {
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
if (isStatic) {
|
if (isStatic) {
|
||||||
__debugbreak();
|
assert(0);
|
||||||
return L"";
|
return L"";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
@ -154,7 +154,7 @@ const wchar_t* StringTable::getString(const std::wstring& id) {
|
||||||
const wchar_t* StringTable::getString(int id) {
|
const wchar_t* StringTable::getString(int id) {
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
if (!isStatic) {
|
if (!isStatic) {
|
||||||
__debugbreak();
|
assert(0);
|
||||||
return L"";
|
return L"";
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@
|
||||||
#include "app/common/UI/Scenes/UIScene_FullscreenProgress.h"
|
#include "app/common/UI/Scenes/UIScene_FullscreenProgress.h"
|
||||||
#include "app/linux/LinuxGame.h"
|
#include "app/linux/LinuxGame.h"
|
||||||
#include "app/linux/Linux_UIController.h"
|
#include "app/linux/Linux_UIController.h"
|
||||||
|
#include "app/linux/Stubs/winapi_stubs.h"
|
||||||
#include "minecraft/client/Minecraft.h"
|
#include "minecraft/client/Minecraft.h"
|
||||||
#include "minecraft/client/ProgressRenderer.h"
|
#include "minecraft/client/ProgressRenderer.h"
|
||||||
#include "minecraft/client/renderer/GameRenderer.h"
|
#include "minecraft/client/renderer/GameRenderer.h"
|
||||||
|
|
|
||||||
|
|
@ -31,6 +31,7 @@
|
||||||
#include "minecraft/world/level/LevelSettings.h"
|
#include "minecraft/world/level/LevelSettings.h"
|
||||||
#include "minecraft/world/level/tile/Tile.h"
|
#include "minecraft/world/level/tile/Tile.h"
|
||||||
#include "minecraft/world/phys/AABB.h"
|
#include "minecraft/world/phys/AABB.h"
|
||||||
|
#include "platform/input/InputConstants.h"
|
||||||
#include "strings.h"
|
#include "strings.h"
|
||||||
|
|
||||||
class TutorialConstraint;
|
class TutorialConstraint;
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ std::vector<uint8_t> ArchiveFile::getFile(const std::wstring& filename) {
|
||||||
app.DebugPrintf("Failed to find file '%ls' in archive\n",
|
app.DebugPrintf("Failed to find file '%ls' in archive\n",
|
||||||
filename.c_str());
|
filename.c_str());
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
app.FatalLoadError();
|
app.FatalLoadError();
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
||||||
#include "app/linux/Stubs/iggy_stubs.h"
|
#include "app/linux/Stubs/iggy_stubs.h"
|
||||||
#endif
|
#endif
|
||||||
#include "app/linux/Iggy/include/rrCore.h"
|
#include "app/linux/Iggy/include/rrCore.h"
|
||||||
|
#include "platform/input/InputConstants.h"
|
||||||
|
|
||||||
class UILayer;
|
class UILayer;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -286,7 +286,7 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId) {
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool confirmUser = false;
|
bool confirmUser = false;
|
||||||
|
|
|
||||||
|
|
@ -307,7 +307,7 @@ void UIScene::loadMovie() {
|
||||||
app.DebugPrintf("ERROR: Could not find any iggy movie for %ls!\n",
|
app.DebugPrintf("ERROR: Could not find any iggy movie for %ls!\n",
|
||||||
moviePath.c_str());
|
moviePath.c_str());
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
app.FatalLoadError();
|
app.FatalLoadError();
|
||||||
}
|
}
|
||||||
|
|
@ -323,7 +323,7 @@ void UIScene::loadMovie() {
|
||||||
if (!swf) {
|
if (!swf) {
|
||||||
app.DebugPrintf("ERROR: Failed to load iggy scene!\n");
|
app.DebugPrintf("ERROR: Failed to load iggy scene!\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
app.FatalLoadError();
|
app.FatalLoadError();
|
||||||
}
|
}
|
||||||
|
|
@ -718,7 +718,7 @@ void UIScene::_customDrawSlotControl(CustomDrawData* region, int iPad,
|
||||||
// {
|
// {
|
||||||
// app.DebugPrintf("A scene is trying to navigate forwards, but
|
// app.DebugPrintf("A scene is trying to navigate forwards, but
|
||||||
// it's parent layer is nullptr!\n"); #ifndef _CONTENT_PACKAGE
|
// it's parent layer is nullptr!\n"); #ifndef _CONTENT_PACKAGE
|
||||||
// __debugbreak();
|
// assert(0);
|
||||||
// #endif
|
// #endif
|
||||||
// }
|
// }
|
||||||
// else
|
// else
|
||||||
|
|
@ -911,7 +911,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
"Callback for handlePress did not have the correct number of "
|
"Callback for handlePress did not have the correct number of "
|
||||||
"arguments\n");
|
"arguments\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -920,7 +920,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"Arguments for handlePress were not of the correct type\n");
|
"Arguments for handlePress were not of the correct type\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -932,7 +932,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
"Callback for handleFocusChange did not have the correct "
|
"Callback for handleFocusChange did not have the correct "
|
||||||
"number of arguments\n");
|
"number of arguments\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -942,7 +942,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
"Arguments for handleFocusChange were not of the correct "
|
"Arguments for handleFocusChange were not of the correct "
|
||||||
"type\n");
|
"type\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -955,7 +955,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
"Callback for handleInitFocus did not have the correct number "
|
"Callback for handleInitFocus did not have the correct number "
|
||||||
"of arguments\n");
|
"of arguments\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -964,7 +964,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
app.DebugPrintf(
|
app.DebugPrintf(
|
||||||
"Arguments for handleInitFocus were not of the correct type\n");
|
"Arguments for handleInitFocus were not of the correct type\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -977,7 +977,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
"Callback for handleCheckboxToggled did not have the correct "
|
"Callback for handleCheckboxToggled did not have the correct "
|
||||||
"number of arguments\n");
|
"number of arguments\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -987,7 +987,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
"Arguments for handleCheckboxToggled were not of the correct "
|
"Arguments for handleCheckboxToggled were not of the correct "
|
||||||
"type\n");
|
"type\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1000,7 +1000,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
"Callback for handleSliderMove did not have the correct number "
|
"Callback for handleSliderMove did not have the correct number "
|
||||||
"of arguments\n");
|
"of arguments\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1010,7 +1010,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
"Arguments for handleSliderMove were not of the correct "
|
"Arguments for handleSliderMove were not of the correct "
|
||||||
"type\n");
|
"type\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1023,7 +1023,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
"Callback for handleAnimationEnd did not have the correct "
|
"Callback for handleAnimationEnd did not have the correct "
|
||||||
"number of arguments\n");
|
"number of arguments\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1036,7 +1036,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
"Callback for handleSelectionChanged did not have the correct "
|
"Callback for handleSelectionChanged did not have the correct "
|
||||||
"number of arguments\n");
|
"number of arguments\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1045,7 +1045,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
"Arguments for handleSelectionChanged were not of the correct "
|
"Arguments for handleSelectionChanged were not of the correct "
|
||||||
"type\n");
|
"type\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1061,7 +1061,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
"Callback for handleRequestMoreData did not have the "
|
"Callback for handleRequestMoreData did not have the "
|
||||||
"correct number of arguments\n");
|
"correct number of arguments\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
@ -1071,7 +1071,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
|
||||||
"Arguments for handleRequestMoreData were not of the "
|
"Arguments for handleRequestMoreData were not of the "
|
||||||
"correct type\n");
|
"correct type\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1619,7 +1619,7 @@ RADDEFSTART
|
||||||
#define RR_BREAK() __builtin_trap()
|
#define RR_BREAK() __builtin_trap()
|
||||||
#define RR_CACHE_LINE_SIZE 32
|
#define RR_CACHE_LINE_SIZE 32
|
||||||
#elif defined(__RADXENON__)
|
#elif defined(__RADXENON__)
|
||||||
#define RR_BREAK() __debugbreak()
|
#define RR_BREAK() assert(0)
|
||||||
#define RR_CACHE_LINE_SIZE 128
|
#define RR_CACHE_LINE_SIZE 128
|
||||||
#elif defined(__RADANDROID__)
|
#elif defined(__RADANDROID__)
|
||||||
#define RR_BREAK() __builtin_trap()
|
#define RR_BREAK() __builtin_trap()
|
||||||
|
|
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
#ifndef STUBS_H
|
|
||||||
#define STUBS_H
|
|
||||||
|
|
||||||
#pragma once
|
|
||||||
#include "winapi_stubs.h"
|
|
||||||
#ifndef _ENABLEIGGY
|
|
||||||
#include "iggy_stubs.h"
|
|
||||||
#endif
|
|
||||||
#endif // STUBS_H
|
|
||||||
|
|
@ -9,15 +9,8 @@
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
|
|
||||||
#include <cassert>
|
|
||||||
#include <cstdio>
|
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
#include <cstdlib>
|
|
||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <cwchar>
|
|
||||||
|
|
||||||
#define __cdecl
|
|
||||||
#define _vsnprintf_s vsnprintf;
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int32_t LowPart;
|
int32_t LowPart;
|
||||||
|
|
@ -31,8 +24,6 @@ typedef struct {
|
||||||
uint64_t QuadPart;
|
uint64_t QuadPart;
|
||||||
} ULARGE_INTEGER;
|
} ULARGE_INTEGER;
|
||||||
|
|
||||||
#define __debugbreak()
|
|
||||||
|
|
||||||
#define ERROR_SUCCESS 0L
|
#define ERROR_SUCCESS 0L
|
||||||
#define ERROR_IO_PENDING 997L // dderror
|
#define ERROR_IO_PENDING 997L // dderror
|
||||||
#define ERROR_CANCELLED 1223L
|
#define ERROR_CANCELLED 1223L
|
||||||
|
|
@ -147,8 +138,6 @@ static inline bool FileTimeToSystemTime(const FILETIME* lpFileTime,
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static inline void* GetModuleHandle(const char* lpModuleName) { return 0; }
|
|
||||||
|
|
||||||
static inline void* VirtualAlloc(void* lpAddress, size_t dwSize,
|
static inline void* VirtualAlloc(void* lpAddress, size_t dwSize,
|
||||||
int32_t flAllocationType, int32_t flProtect) {
|
int32_t flAllocationType, int32_t flProtect) {
|
||||||
// MEM_COMMIT | MEM_RESERVE → mmap anonymous
|
// MEM_COMMIT | MEM_RESERVE → mmap anonymous
|
||||||
|
|
|
||||||
|
|
@ -1619,7 +1619,7 @@ RADDEFSTART
|
||||||
#define RR_BREAK() __builtin_trap()
|
#define RR_BREAK() __builtin_trap()
|
||||||
#define RR_CACHE_LINE_SIZE 32
|
#define RR_CACHE_LINE_SIZE 32
|
||||||
#elif defined(__RADXENON__)
|
#elif defined(__RADXENON__)
|
||||||
#define RR_BREAK() __debugbreak()
|
#define RR_BREAK() assert(0)
|
||||||
#define RR_CACHE_LINE_SIZE 128
|
#define RR_CACHE_LINE_SIZE 128
|
||||||
#elif defined(__RADANDROID__)
|
#elif defined(__RADANDROID__)
|
||||||
#define RR_BREAK() __builtin_trap()
|
#define RR_BREAK() __builtin_trap()
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ void ConsoleUIController::init(ID3D11Device* dev, ID3D11DeviceContext* ctx,
|
||||||
if (!gdraw_funcs) {
|
if (!gdraw_funcs) {
|
||||||
app.DebugPrintf("Failed to initialise GDraw!\n");
|
app.DebugPrintf("Failed to initialise GDraw!\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
app.FatalLoadError();
|
app.FatalLoadError();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -750,7 +750,7 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((m_falsePositives.size() > 0) || (m_falseNegatives.size() > 0)) {
|
if ((m_falsePositives.size() > 0) || (m_falseNegatives.size() > 0)) {
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
#include "java/File.h"
|
#include "java/File.h"
|
||||||
#include "minecraft/client/resources/ResourceLocation.h"
|
#include "minecraft/client/resources/ResourceLocation.h"
|
||||||
#include "minecraft/network/packet/DisconnectPacket.h"
|
#include "minecraft/network/packet/DisconnectPacket.h"
|
||||||
|
#include "platform/stubs.h"
|
||||||
|
|
||||||
class Timer;
|
class Timer;
|
||||||
class MultiPlayerLevel;
|
class MultiPlayerLevel;
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,7 @@
|
||||||
#include "minecraft/client/renderer/Textures.h"
|
#include "minecraft/client/renderer/Textures.h"
|
||||||
#include "minecraft/locale/I18n.h"
|
#include "minecraft/locale/I18n.h"
|
||||||
#include "minecraft/locale/Language.h"
|
#include "minecraft/locale/Language.h"
|
||||||
|
#include "platform/stubs.h"
|
||||||
|
|
||||||
// 4J - the Option sub-class used to be an java enumerated type, trying to
|
// 4J - the Option sub-class used to be an java enumerated type, trying to
|
||||||
// emulate that functionality here
|
// emulate that functionality here
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,7 @@
|
||||||
#include "java/JavaMath.h"
|
#include "java/JavaMath.h"
|
||||||
#include "java/Random.h"
|
#include "java/Random.h"
|
||||||
#include "java/System.h"
|
#include "java/System.h"
|
||||||
|
#include "java/Color.h"
|
||||||
#include "minecraft/client/ClientConstants.h"
|
#include "minecraft/client/ClientConstants.h"
|
||||||
#include "minecraft/client/GuiMessage.h"
|
#include "minecraft/client/GuiMessage.h"
|
||||||
#include "minecraft/client/Lighting.h"
|
#include "minecraft/client/Lighting.h"
|
||||||
|
|
@ -1084,7 +1085,7 @@ max) + "% (" + (total / 1024 / 1024) + "MB)"; drawString(font, msg, screenWidth
|
||||||
|
|
||||||
int col = 0xffffff;
|
int col = 0xffffff;
|
||||||
if (animateOverlayMessageColor) {
|
if (animateOverlayMessageColor) {
|
||||||
col = Color::HSBtoRGB(t / 50.0f, 0.7f, 0.6f) & 0xffffff;
|
col = Color::getHSBColor(t / 50.0f, 0.7f, 0.6f).getRGB() & 0xffffff;
|
||||||
}
|
}
|
||||||
// 4J-PB - this is the string displayed when cds are placed in a
|
// 4J-PB - this is the string displayed when cds are placed in a
|
||||||
// jukebox
|
// jukebox
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
|
|
||||||
#include "platform/stubs.h"
|
#include "platform/stubs.h"
|
||||||
#include "java/Random.h"
|
#include "java/Random.h"
|
||||||
|
#include "java/Color.h"
|
||||||
|
|
||||||
Random* GuiParticle::random = new Random();
|
Random* GuiParticle::random = new Random();
|
||||||
|
|
||||||
|
|
@ -17,7 +18,7 @@ GuiParticle::GuiParticle(double x, double y, double xa, double ya) {
|
||||||
this->xa = xa;
|
this->xa = xa;
|
||||||
this->ya = ya;
|
this->ya = ya;
|
||||||
|
|
||||||
int col = Color::HSBtoRGB(random->nextFloat(), 0.5f, 1);
|
int col = Color::getHSBColor(random->nextFloat(), 0.5f, 1).getRGB();
|
||||||
r = ((col >> 16) & 0xff) / 255.0;
|
r = ((col >> 16) & 0xff) / 255.0;
|
||||||
g = ((col >> 8) & 0xff) / 255.0;
|
g = ((col >> 8) & 0xff) / 255.0;
|
||||||
b = ((col) & 0xff) / 255.0;
|
b = ((col) & 0xff) / 255.0;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
#include "ChestModel.h"
|
#include "ChestModel.h"
|
||||||
|
|
||||||
|
#include "platform/renderer/renderer.h"
|
||||||
|
|
||||||
#include "minecraft/client/model/geom/ModelPart.h"
|
#include "minecraft/client/model/geom/ModelPart.h"
|
||||||
|
|
||||||
ChestModel::ChestModel() {
|
ChestModel::ChestModel() {
|
||||||
|
|
|
||||||
|
|
@ -185,7 +185,7 @@ void Particle::setTex(Textures* textures, Icon* icon) {
|
||||||
} else {
|
} else {
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
printf("Invalid call to Particle.setTex, use coordinate methods\n");
|
printf("Invalid call to Particle.setTex, use coordinate methods\n");
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
// throw new RuntimeException("Invalid call to Particle.setTex, use
|
// throw new RuntimeException("Invalid call to Particle.setTex, use
|
||||||
// coordinate methods");
|
// coordinate methods");
|
||||||
|
|
@ -197,7 +197,7 @@ void Particle::setMiscTex(int slotIndex) {
|
||||||
getParticleTexture() != ParticleEngine::DRAGON_BREATH_TEXTURE) {
|
getParticleTexture() != ParticleEngine::DRAGON_BREATH_TEXTURE) {
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
printf("Invalid call to Particle.setMixTex\n");
|
printf("Invalid call to Particle.setMixTex\n");
|
||||||
__debugbreak();
|
assert(0);
|
||||||
// throw new RuntimeException("Invalid call to Particle.setMiscTex");
|
// throw new RuntimeException("Invalid call to Particle.setMiscTex");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -523,7 +523,7 @@ void LocalPlayer::changeDimension(int i) {
|
||||||
Log::info(
|
Log::info(
|
||||||
"LocalPlayer::changeDimension from 1 to 1 but WinScreen has "
|
"LocalPlayer::changeDimension from 1 to 1 but WinScreen has "
|
||||||
"not been implemented.\n");
|
"not been implemented.\n");
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
awardStat(GenericStats::theEnd(), GenericStats::param_theEnd());
|
awardStat(GenericStats::theEnd(), GenericStats::param_theEnd());
|
||||||
|
|
|
||||||
|
|
@ -797,7 +797,7 @@ bool Chunk::isEmpty() {
|
||||||
void Chunk::setDirty() {
|
void Chunk::setDirty() {
|
||||||
// 4J - not used, but if this starts being used again then we'll need to
|
// 4J - not used, but if this starts being used again then we'll need to
|
||||||
// investigate how best to handle it.
|
// investigate how best to handle it.
|
||||||
__debugbreak();
|
assert(0);
|
||||||
levelRenderer->setGlobalChunkFlag(x, y, z, level,
|
levelRenderer->setGlobalChunkFlag(x, y, z, level,
|
||||||
LevelRenderer::CHUNK_FLAG_DIRTY);
|
LevelRenderer::CHUNK_FLAG_DIRTY);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2024,7 +2024,7 @@ void GameRenderer::setupFog(int i, float alpha) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i == 999) {
|
if (i == 999) {
|
||||||
__debugbreak();
|
assert(0);
|
||||||
// 4J TODO
|
// 4J TODO
|
||||||
/*
|
/*
|
||||||
glFog(GL_FOG_COLOR, getBuffer(0, 0, 0, 1));
|
glFog(GL_FOG_COLOR, getBuffer(0, 0, 0, 1));
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#include "MobSkinTextureProcessor.h"
|
#include "MobSkinTextureProcessor.h"
|
||||||
|
|
||||||
#include "minecraft/client/BufferedImage.h"
|
#include "minecraft/client/BufferedImage.h"
|
||||||
|
#include "platform/stubs.h"
|
||||||
|
|
||||||
BufferedImage* MobSkinTextureProcessor::process(BufferedImage* in) {
|
BufferedImage* MobSkinTextureProcessor::process(BufferedImage* in) {
|
||||||
if (in == nullptr) return nullptr;
|
if (in == nullptr) return nullptr;
|
||||||
|
|
|
||||||
|
|
@ -198,7 +198,7 @@ EntityRenderer* EntityRenderDispatcher::getRenderer(eINSTANCEOF e) {
|
||||||
if (it == renderers.end()) {
|
if (it == renderers.end()) {
|
||||||
Log::info("Couldn't find renderer for entity of type %d\n", e);
|
Log::info("Couldn't find renderer for entity of type %d\n", e);
|
||||||
// New renderer mapping required in above table
|
// New renderer mapping required in above table
|
||||||
// __debugbreak();
|
// assert(0);
|
||||||
assert(0);
|
assert(0);
|
||||||
}
|
}
|
||||||
/* 4J - not doing this hierarchical search anymore. We need to explicitly
|
/* 4J - not doing this hierarchical search anymore. We need to explicitly
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ void PreStitchedTextureMap::makeTextureAnimated(TexturePack* texturePack,
|
||||||
textureFileName.c_str(), first->getWidth(),
|
textureFileName.c_str(), first->getWidth(),
|
||||||
tex->getWidth(), first->getHeight(),
|
tex->getWidth(), first->getHeight(),
|
||||||
tex->getHeight());
|
tex->getHeight());
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
@ -196,7 +196,7 @@ void PreStitchedTextureMap::makeTextureAnimated(TexturePack* texturePack,
|
||||||
StitchedTexture* PreStitchedTextureMap::getTexture(const std::wstring& name) {
|
StitchedTexture* PreStitchedTextureMap::getTexture(const std::wstring& name) {
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
Log::info("Not implemented!\n");
|
Log::info("Not implemented!\n");
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
@ -218,7 +218,7 @@ Icon* PreStitchedTextureMap::registerIcon(const std::wstring& name) {
|
||||||
if (name.empty()) {
|
if (name.empty()) {
|
||||||
Log::info("Don't register nullptr\n");
|
Log::info("Don't register nullptr\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
result = missingPosition;
|
result = missingPosition;
|
||||||
// new RuntimeException("Don't register null!").printStackTrace();
|
// new RuntimeException("Don't register null!").printStackTrace();
|
||||||
|
|
@ -230,7 +230,7 @@ Icon* PreStitchedTextureMap::registerIcon(const std::wstring& name) {
|
||||||
if (result == nullptr) {
|
if (result == nullptr) {
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
Log::info("Could not find uv data for icon %ls\n", name.c_str());
|
Log::info("Could not find uv data for icon %ls\n", name.c_str());
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
result = missingPosition;
|
result = missingPosition;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,7 @@ void Stitcher::stitch() {
|
||||||
if (!addToStorage(textureHolder)) {
|
if (!addToStorage(textureHolder)) {
|
||||||
Log::info("Stitcher exception!\n");
|
Log::info("Stitcher exception!\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
// throw new StitcherException(textureHolder);
|
// throw new StitcherException(textureHolder);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -237,7 +237,7 @@ Icon* TextureMap::registerIcon(const std::wstring& name) {
|
||||||
if (name.empty()) {
|
if (name.empty()) {
|
||||||
Log::info("Don't register nullptr\n");
|
Log::info("Don't register nullptr\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
// new RuntimeException("Don't register null!").printStackTrace();
|
// new RuntimeException("Don't register null!").printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -214,7 +214,8 @@ void AbstractTexturePack::unloadUI() {
|
||||||
}
|
}
|
||||||
|
|
||||||
std::wstring AbstractTexturePack::getXuiRootPath() {
|
std::wstring AbstractTexturePack::getXuiRootPath() {
|
||||||
const uintptr_t c_ModuleHandle = (uintptr_t)GetModuleHandle(nullptr);
|
// const uintptr_t c_ModuleHandle = (uintptr_t)GetModuleHandle(nullptr);
|
||||||
|
const uintptr_t c_ModuleHandle = 0; // 4jcraft changed
|
||||||
|
|
||||||
// Load new skin
|
// Load new skin
|
||||||
constexpr int LOCATOR_SIZE =
|
constexpr int LOCATOR_SIZE =
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ void DLCTexturePack::loadDescription() {
|
||||||
std::wstring DLCTexturePack::getResource(const std::wstring& name) {
|
std::wstring DLCTexturePack::getResource(const std::wstring& name) {
|
||||||
// 4J Stu - We should never call this function
|
// 4J Stu - We should never call this function
|
||||||
#if !defined(__CONTENT_PACKAGE)
|
#if !defined(__CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return L"";
|
return L"";
|
||||||
}
|
}
|
||||||
|
|
@ -160,7 +160,7 @@ InputStream* DLCTexturePack::getResourceImplementation(
|
||||||
{
|
{
|
||||||
// 4J Stu - We should never call this function
|
// 4J Stu - We should never call this function
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
if (hasFile(name)) return nullptr;
|
if (hasFile(name)) return nullptr;
|
||||||
#endif
|
#endif
|
||||||
return nullptr; // resource;
|
return nullptr; // resource;
|
||||||
|
|
|
||||||
|
|
@ -33,7 +33,7 @@ CustomPayloadPacket::CustomPayloadPacket(const std::wstring& identifier,
|
||||||
if (length > std::numeric_limits<short>::max()) {
|
if (length > std::numeric_limits<short>::max()) {
|
||||||
Log::info("Payload may not be larger than 32K\n");
|
Log::info("Payload may not be larger than 32K\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
// throw new IllegalArgumentException("Payload may not be larger
|
// throw new IllegalArgumentException("Payload may not be larger
|
||||||
// than 32k");
|
// than 32k");
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ GameCommandPacket::GameCommandPacket(EGameCommand command,
|
||||||
if (length > std::numeric_limits<short>::max()) {
|
if (length > std::numeric_limits<short>::max()) {
|
||||||
Log::info("Payload may not be larger than 32K\n");
|
Log::info("Payload may not be larger than 32K\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
// throw new IllegalArgumentException("Payload may not be larger
|
// throw new IllegalArgumentException("Payload may not be larger
|
||||||
// than 32k");
|
// than 32k");
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ void MoveEntityPacket::write(DataOutputStream* dos) // throws IOException
|
||||||
if ((id < 0) || (id >= 2048)) {
|
if ((id < 0) || (id >= 2048)) {
|
||||||
// We shouln't be tracking an entity that doesn't have a short type of
|
// We shouln't be tracking an entity that doesn't have a short type of
|
||||||
// id
|
// id
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
dos->writeShort((short)id);
|
dos->writeShort((short)id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,7 @@ MoveEntityPacketSmall::MoveEntityPacketSmall(int id) {
|
||||||
if ((id < 0) || (id >= 2048)) {
|
if ((id < 0) || (id >= 2048)) {
|
||||||
// We shouln't be tracking an entity that doesn't have a short type of
|
// We shouln't be tracking an entity that doesn't have a short type of
|
||||||
// id
|
// id
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
this->id = id;
|
this->id = id;
|
||||||
|
|
@ -46,7 +46,7 @@ void MoveEntityPacketSmall::write(DataOutputStream* dos) // throws IOException
|
||||||
if ((id < 0) || (id >= 2048)) {
|
if ((id < 0) || (id >= 2048)) {
|
||||||
// We shouln't be tracking an entity that doesn't have a short type of
|
// We shouln't be tracking an entity that doesn't have a short type of
|
||||||
// id
|
// id
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
dos->writeShort((short)id);
|
dos->writeShort((short)id);
|
||||||
}
|
}
|
||||||
|
|
@ -96,7 +96,7 @@ void MoveEntityPacketSmall::PosRot::write(
|
||||||
if ((id < 0) || (id >= 2048)) {
|
if ((id < 0) || (id >= 2048)) {
|
||||||
// We shouln't be tracking an entity that doesn't have a short type of
|
// We shouln't be tracking an entity that doesn't have a short type of
|
||||||
// id
|
// id
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
short idAndRot = id | yRot << 11;
|
short idAndRot = id | yRot << 11;
|
||||||
dos->writeShort(idAndRot);
|
dos->writeShort(idAndRot);
|
||||||
|
|
@ -132,7 +132,7 @@ void MoveEntityPacketSmall::Pos::write(
|
||||||
if ((id < 0) || (id >= 2048)) {
|
if ((id < 0) || (id >= 2048)) {
|
||||||
// We shouln't be tracking an entity that doesn't have a short type of
|
// We shouln't be tracking an entity that doesn't have a short type of
|
||||||
// id
|
// id
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
short idAndY = id | ya << 11;
|
short idAndY = id | ya << 11;
|
||||||
dos->writeShort(idAndY);
|
dos->writeShort(idAndY);
|
||||||
|
|
@ -165,7 +165,7 @@ void MoveEntityPacketSmall::Rot::write(
|
||||||
if ((id < 0) || (id >= 2048)) {
|
if ((id < 0) || (id >= 2048)) {
|
||||||
// We shouln't be tracking an entity that doesn't have a short type of
|
// We shouln't be tracking an entity that doesn't have a short type of
|
||||||
// id
|
// id
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
short idAndRot = id | yRot << 11;
|
short idAndRot = id | yRot << 11;
|
||||||
dos->writeShort(idAndRot);
|
dos->writeShort(idAndRot);
|
||||||
|
|
|
||||||
|
|
@ -468,7 +468,7 @@ std::vector<uint8_t> Packet::readBytes(DataInputStream* datainputstream) {
|
||||||
if (size < 0) {
|
if (size < 0) {
|
||||||
Log::info("Key was smaller than nothing! Weird key!");
|
Log::info("Key was smaller than nothing! Weird key!");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
return std::vector<uint8_t>();
|
return std::vector<uint8_t>();
|
||||||
// throw new IOException("Key was smaller than nothing! Weird key!");
|
// throw new IOException("Key was smaller than nothing! Weird key!");
|
||||||
|
|
@ -517,7 +517,7 @@ std::shared_ptr<Packet> Packet::readPacket(
|
||||||
(!isServer &&
|
(!isServer &&
|
||||||
clientReceivedPackets.find(id) == clientReceivedPackets.end())) {
|
clientReceivedPackets.find(id) == clientReceivedPackets.end())) {
|
||||||
// Log::info("Bad packet id %d\n", id);
|
// Log::info("Bad packet id %d\n", id);
|
||||||
__debugbreak();
|
assert(0);
|
||||||
assert(false);
|
assert(false);
|
||||||
// throw new IOException(wstring(L"Bad packet id ") +
|
// throw new IOException(wstring(L"Bad packet id ") +
|
||||||
// toWString<int>(id));
|
// toWString<int>(id));
|
||||||
|
|
|
||||||
|
|
@ -43,13 +43,13 @@ SetPlayerTeamPacket::SetPlayerTeamPacket(PlayerTeam* team,
|
||||||
if (method != METHOD_JOIN && method != METHOD_LEAVE) {
|
if (method != METHOD_JOIN && method != METHOD_LEAVE) {
|
||||||
Log::info("Method must be join or leave for player constructor");
|
Log::info("Method must be join or leave for player constructor");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
if (playerNames == nullptr || playerNames->empty()) {
|
if (playerNames == nullptr || playerNames->empty()) {
|
||||||
Log::info("Players cannot be null/empty");
|
Log::info("Players cannot be null/empty");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -102,7 +102,7 @@ void EntityTracker::addEntity(std::shared_ptr<Entity> e, int range,
|
||||||
assert(false); // Entity already tracked
|
assert(false); // Entity already tracked
|
||||||
}
|
}
|
||||||
if (e->entityId >= 2048) {
|
if (e->entityId >= 2048) {
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
std::shared_ptr<TrackedEntity> te = std::shared_ptr<TrackedEntity>(
|
std::shared_ptr<TrackedEntity> te = std::shared_ptr<TrackedEntity>(
|
||||||
new TrackedEntity(e, range, updateInterval, trackDeltas));
|
new TrackedEntity(e, range, updateInterval, trackDeltas));
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@
|
||||||
#include "minecraft/util/WeighedRandom.h"
|
#include "minecraft/util/WeighedRandom.h"
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <cassert>
|
||||||
|
|
||||||
#include "app/linux/Stubs/winapi_stubs.h"
|
#include "app/linux/Stubs/winapi_stubs.h"
|
||||||
#include "java/Random.h"
|
#include "java/Random.h"
|
||||||
|
|
@ -17,7 +18,7 @@ int WeighedRandom::getTotalWeight(std::vector<WeighedRandomItem*>* items) {
|
||||||
WeighedRandomItem* WeighedRandom::getRandomItem(
|
WeighedRandomItem* WeighedRandom::getRandomItem(
|
||||||
Random* random, std::vector<WeighedRandomItem*>* items, int totalWeight) {
|
Random* random, std::vector<WeighedRandomItem*>* items, int totalWeight) {
|
||||||
if (totalWeight <= 0) {
|
if (totalWeight <= 0) {
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int selection = random->nextInt(totalWeight);
|
int selection = random->nextInt(totalWeight);
|
||||||
|
|
@ -49,7 +50,7 @@ WeighedRandomItem* WeighedRandom::getRandomItem(
|
||||||
Random* random, const std::vector<WeighedRandomItem*>& items,
|
Random* random, const std::vector<WeighedRandomItem*>& items,
|
||||||
int totalWeight) {
|
int totalWeight) {
|
||||||
if (totalWeight <= 0) {
|
if (totalWeight <= 0) {
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
int selection = random->nextInt(totalWeight);
|
int selection = random->nextInt(totalWeight);
|
||||||
|
|
|
||||||
|
|
@ -126,7 +126,7 @@ int Entity::getSmallId() {
|
||||||
}
|
}
|
||||||
|
|
||||||
Log::info("Out of small entity Ids... possible leak?\n");
|
Log::info("Out of small entity Ids... possible leak?\n");
|
||||||
__debugbreak();
|
assert(0);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -206,7 +206,7 @@ void ArmorItem::setColor(std::shared_ptr<ItemInstance> item, int color) {
|
||||||
if (armorType != ArmorMaterial::CLOTH) {
|
if (armorType != ArmorMaterial::CLOTH) {
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
printf("Can't dye non-leather!");
|
printf("Can't dye non-leather!");
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
// throw new UnsupportedOperationException("Can't dye non-leather!");
|
// throw new UnsupportedOperationException("Can't dye non-leather!");
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -2188,7 +2188,7 @@ void Level::tickEntities() {
|
||||||
if (tileEntitiesToUnload.find(*it) !=
|
if (tileEntitiesToUnload.find(*it) !=
|
||||||
tileEntitiesToUnload.end()) {
|
tileEntitiesToUnload.end()) {
|
||||||
if (isClientSide) {
|
if (isClientSide) {
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
it = tileEntityList.erase(it);
|
it = tileEntityList.erase(it);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ void BiomeDecorator::decorate(Level* level, Random* random, int xo, int zo) {
|
||||||
if (this->level != nullptr) {
|
if (this->level != nullptr) {
|
||||||
Log::info("BiomeDecorator::decorate - Already decorating!!\n");
|
Log::info("BiomeDecorator::decorate - Already decorating!!\n");
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
__debugbreak();
|
assert(0);
|
||||||
// throw new RuntimeException("Already decorating!!");
|
// throw new RuntimeException("Already decorating!!");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -956,7 +956,7 @@ void CompressedTileStorage::compress(int upgradeBlock /*=-1*/) {
|
||||||
// uint32_t lastError = GetLastError();
|
// uint32_t lastError = GetLastError();
|
||||||
// MEMORYSTATUS memStatus;
|
// MEMORYSTATUS memStatus;
|
||||||
// GlobalMemoryStatus(&memStatus);
|
// GlobalMemoryStatus(&memStatus);
|
||||||
// __debugbreak();
|
// assert(0);
|
||||||
}
|
}
|
||||||
unsigned char* pucData = newIndicesAndData + 1024;
|
unsigned char* pucData = newIndicesAndData + 1024;
|
||||||
unsigned short usDataOffset = 0;
|
unsigned short usDataOffset = 0;
|
||||||
|
|
|
||||||
|
|
@ -320,7 +320,7 @@ void RegionFile::write(int x, int z, std::uint8_t* data,
|
||||||
|
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
if (sectorNumber < 0) {
|
if (sectorNumber < 0) {
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ CustomLevelSource::CustomLevelSource(Level* level, int64_t seed,
|
||||||
path, m_heightmapOverride.data(), m_heightmapOverride.size());
|
path, m_heightmapOverride.data(), m_heightmapOverride.size());
|
||||||
if (result.status == IPlatformFilesystem::ReadStatus::TooLarge) {
|
if (result.status == IPlatformFilesystem::ReadStatus::TooLarge) {
|
||||||
Log::info("Heightmap binary is too large!!\n");
|
Log::info("Heightmap binary is too large!!\n");
|
||||||
__debugbreak();
|
assert(0);
|
||||||
} else if (result.status != IPlatformFilesystem::ReadStatus::Ok) {
|
} else if (result.status != IPlatformFilesystem::ReadStatus::Ok) {
|
||||||
gameServices().fatalLoadError();
|
gameServices().fatalLoadError();
|
||||||
assert(false);
|
assert(false);
|
||||||
|
|
@ -71,7 +71,7 @@ CustomLevelSource::CustomLevelSource(Level* level, int64_t seed,
|
||||||
m_waterheightOverride.size());
|
m_waterheightOverride.size());
|
||||||
} else if (result.status == IPlatformFilesystem::ReadStatus::TooLarge) {
|
} else if (result.status == IPlatformFilesystem::ReadStatus::TooLarge) {
|
||||||
Log::info("waterheight binary is too large!!\n");
|
Log::info("waterheight binary is too large!!\n");
|
||||||
__debugbreak();
|
assert(0);
|
||||||
} else if (result.status != IPlatformFilesystem::ReadStatus::Ok) {
|
} else if (result.status != IPlatformFilesystem::ReadStatus::Ok) {
|
||||||
gameServices().fatalLoadError();
|
gameServices().fatalLoadError();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ bool StrongholdFeature::isFeatureChunk(int x, int z, bool bIsSuperflat) {
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
if (position->x > 2560 || position->x < -2560 ||
|
if (position->x > 2560 || position->x < -2560 ||
|
||||||
position->z > 2560 || position->z < -2560) {
|
position->z > 2560 || position->z < -2560) {
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,7 @@ BiomeOverrideLayer::BiomeOverrideLayer(int seedMixup) : Layer(seedMixup) {
|
||||||
m_biomeOverride.size());
|
m_biomeOverride.size());
|
||||||
} else if (result.status == IPlatformFilesystem::ReadStatus::TooLarge) {
|
} else if (result.status == IPlatformFilesystem::ReadStatus::TooLarge) {
|
||||||
Log::info("Biomemap binary is too large!!\n");
|
Log::info("Biomemap binary is too large!!\n");
|
||||||
__debugbreak();
|
assert(0);
|
||||||
} else if (result.status != IPlatformFilesystem::ReadStatus::Ok) {
|
} else if (result.status != IPlatformFilesystem::ReadStatus::Ok) {
|
||||||
gameServices().fatalLoadError();
|
gameServices().fatalLoadError();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -91,7 +91,7 @@ ConsoleSaveFileOriginal::ConsoleSaveFileOriginal(
|
||||||
// pages committed should always be zero at this point.
|
// pages committed should always be zero at this point.
|
||||||
if (pagesCommitted != 0) {
|
if (pagesCommitted != 0) {
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -103,7 +103,7 @@ ConsoleSaveFileOriginal::ConsoleSaveFileOriginal(
|
||||||
if (pvRet == nullptr) {
|
if (pvRet == nullptr) {
|
||||||
#ifndef _CONTENT_PACKAGE
|
#ifndef _CONTENT_PACKAGE
|
||||||
// Out of physical memory
|
// Out of physical memory
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
pagesCommitted = pagesRequired;
|
pagesCommitted = pagesRequired;
|
||||||
|
|
@ -162,7 +162,7 @@ ConsoleSaveFileOriginal::ConsoleSaveFileOriginal(
|
||||||
COMMIT_ALLOCATION, PAGE_READWRITE);
|
COMMIT_ALLOCATION, PAGE_READWRITE);
|
||||||
if (pvRet == nullptr) {
|
if (pvRet == nullptr) {
|
||||||
// Out of physical memory
|
// Out of physical memory
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
pagesCommitted = pagesRequired;
|
pagesCommitted = pagesRequired;
|
||||||
}
|
}
|
||||||
|
|
@ -438,7 +438,7 @@ void ConsoleSaveFileOriginal::MoveDataBeyond(
|
||||||
COMMIT_ALLOCATION, PAGE_READWRITE);
|
COMMIT_ALLOCATION, PAGE_READWRITE);
|
||||||
if (pvRet == nullptr) {
|
if (pvRet == nullptr) {
|
||||||
// Out of physical memory
|
// Out of physical memory
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
pagesCommitted = pagesRequired;
|
pagesCommitted = pagesRequired;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,6 +15,7 @@
|
||||||
#include <thread>
|
#include <thread>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
|
#include "platform/fs/fs.h"
|
||||||
#include "platform/PlatformTypes.h"
|
#include "platform/PlatformTypes.h"
|
||||||
#include "minecraft/GameEnums.h"
|
#include "minecraft/GameEnums.h"
|
||||||
#include "app/common/BuildVer/BuildVer.h"
|
#include "app/common/BuildVer/BuildVer.h"
|
||||||
|
|
@ -469,7 +470,7 @@ void ConsoleSaveFileSplit::_init(const std::wstring& fileName, void* pvSaveData,
|
||||||
// pages committed should always be zero at this point.
|
// pages committed should always be zero at this point.
|
||||||
if (pagesCommitted != 0) {
|
if (pagesCommitted != 0) {
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -481,7 +482,7 @@ void ConsoleSaveFileSplit::_init(const std::wstring& fileName, void* pvSaveData,
|
||||||
if (pvRet == nullptr) {
|
if (pvRet == nullptr) {
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
// Out of physical memory
|
// Out of physical memory
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
pagesCommitted = pagesRequired;
|
pagesCommitted = pagesRequired;
|
||||||
|
|
@ -530,7 +531,7 @@ void ConsoleSaveFileSplit::_init(const std::wstring& fileName, void* pvSaveData,
|
||||||
COMMIT_ALLOCATION, PAGE_READWRITE);
|
COMMIT_ALLOCATION, PAGE_READWRITE);
|
||||||
if (pvRet == nullptr) {
|
if (pvRet == nullptr) {
|
||||||
// Out of physical memory
|
// Out of physical memory
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
pagesCommitted = pagesRequired;
|
pagesCommitted = pagesRequired;
|
||||||
}
|
}
|
||||||
|
|
@ -541,7 +542,7 @@ void ConsoleSaveFileSplit::_init(const std::wstring& fileName, void* pvSaveData,
|
||||||
// actually be ok
|
// actually be ok
|
||||||
Log::info("Failed to decompress save data!\n");
|
Log::info("Failed to decompress save data!\n");
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
memset(pvSaveMem, 0, fileSize);
|
memset(pvSaveMem, 0, fileSize);
|
||||||
// Clear the first 8 bytes that reference the header
|
// Clear the first 8 bytes that reference the header
|
||||||
|
|
@ -1036,7 +1037,7 @@ void ConsoleSaveFileSplit::MoveDataBeyond(FileEntry* file,
|
||||||
COMMIT_ALLOCATION, PAGE_READWRITE);
|
COMMIT_ALLOCATION, PAGE_READWRITE);
|
||||||
if (pvRet == nullptr) {
|
if (pvRet == nullptr) {
|
||||||
// Out of physical memory
|
// Out of physical memory
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
pagesCommitted = pagesRequired;
|
pagesCommitted = pagesRequired;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -284,7 +284,7 @@ void FileHeader::ReadHeader(
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
Log::info("********** Invalid save version %d\n",
|
Log::info("********** Invalid save version %d\n",
|
||||||
m_saveVersion);
|
m_saveVersion);
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ int _MapDataMappings::getDimension(int id) {
|
||||||
default:
|
default:
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
printf("Read invalid dimension from MapDataMapping\n");
|
printf("Read invalid dimension from MapDataMapping\n");
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
@ -98,7 +98,7 @@ void _MapDataMappings::setMapping(int id, PlayerUID xuid, int dimension) {
|
||||||
#if !defined(_CONTENT_PACKAGE)
|
#if !defined(_CONTENT_PACKAGE)
|
||||||
printf(
|
printf(
|
||||||
"Trinyg to set a MapDataMapping for an invalid dimension.\n");
|
"Trinyg to set a MapDataMapping for an invalid dimension.\n");
|
||||||
__debugbreak();
|
assert(0);
|
||||||
#endif
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -63,7 +63,7 @@ std::shared_ptr<SavedData> SavedDataStorage::get(const std::type_info& clazz,
|
||||||
new StructureFeatureSavedData(id)));
|
new StructureFeatureSavedData(id)));
|
||||||
} else {
|
} else {
|
||||||
// Handling of new SavedData class required
|
// Handling of new SavedData class required
|
||||||
__debugbreak();
|
assert(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ConsoleSaveFileInputStream fis =
|
ConsoleSaveFileInputStream fis =
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@ int PressurePlateTile::getSignalStrength(Level* level, int x, int y, int z) {
|
||||||
else if (sensitivity == players)
|
else if (sensitivity == players)
|
||||||
entities = level->getEntitiesOfClass(typeid(Player), &at_bb);
|
entities = level->getEntitiesOfClass(typeid(Player), &at_bb);
|
||||||
else
|
else
|
||||||
__debugbreak(); // 4J-JEV: We're going to delete something at a random
|
assert(0); // 4J-JEV: We're going to delete something at a random
|
||||||
// location.
|
// location.
|
||||||
|
|
||||||
if (entities != nullptr && !entities->empty()) {
|
if (entities != nullptr && !entities->empty()) {
|
||||||
|
|
|
||||||
|
|
@ -14,7 +14,7 @@ Objective* Scoreboard::addObjective(const std::wstring& name,
|
||||||
// if (objective != nullptr)
|
// if (objective != nullptr)
|
||||||
// {
|
// {
|
||||||
// #indef _CONTENT_PACKAGE
|
// #indef _CONTENT_PACKAGE
|
||||||
// __debugbreak();
|
// assert(0);
|
||||||
// #endif
|
// #endif
|
||||||
// //throw new IllegalArgumentException("An objective with the name
|
// //throw new IllegalArgumentException("An objective with the name
|
||||||
//'" + name + "' already exists!");
|
//'" + name + "' already exists!");
|
||||||
|
|
|
||||||
|
|
@ -300,8 +300,3 @@ public:
|
||||||
void halt() {}
|
void halt() {}
|
||||||
void forceReload() {}
|
void forceReload() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
class Color {
|
|
||||||
public:
|
|
||||||
static int HSBtoRGB(float, float, float) { return 0; }
|
|
||||||
};
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue