replace __debugbreak with assert, fix full build
Some checks are pending
Build (Linux, x86-64) / build-linux-amalgamate (push) Waiting to run
Build (Linux, x86-64) / build-linux-full (push) Waiting to run
Format Check / clang-format (push) Waiting to run
Release Nightly (Linux, x86-64) / release-linux (push) Waiting to run

This commit is contained in:
Tropical 2026-04-07 18:58:49 -05:00
parent 6faa481013
commit e4883d87fc
60 changed files with 105 additions and 120 deletions

View file

@ -259,7 +259,7 @@ unsigned int DLCManager::getPackIndex(DLCPack* pack, bool& found,
if (pack == nullptr) {
app.DebugPrintf(
"DLCManager: Attempting to find the index for a nullptr pack\n");
//__debugbreak();
//assert(0);
return foundIndex;
}
if (type != e_DLCType_All) {

View file

@ -84,7 +84,7 @@ void DLCPack::addChildPack(DLCPack* childPack) {
const std::uint32_t packId = childPack->GetPackId();
#if !defined(_CONTENT_PACKAGE)
if (packId < 0 || packId > 15) {
__debugbreak();
assert(0);
}
#endif
childPack->SetPackId((packId << 24) | m_packId);
@ -302,7 +302,7 @@ unsigned int DLCPack::getFileIndexAt(DLCManager::EDLCType type,
if (type == DLCManager::e_DLCType_All) {
app.DebugPrintf("Unimplemented\n");
#if !defined(__CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return 0;
}
@ -327,7 +327,7 @@ bool DLCPack::hasPurchasedFile(DLCManager::EDLCType type,
if (type == DLCManager::e_DLCType_All) {
app.DebugPrintf("Unimplemented\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return false;
}

View file

@ -119,7 +119,7 @@ Game::Game() {
"%d\n",
sizeof(GAME_SETTINGS), GAME_SETTINGS_PROFILE_DATA_BYTES);
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
}

View file

@ -473,7 +473,7 @@ bool GameRuleManager::readRuleFile(
compressedBuffer.data(), compressedSize); break; default:
app.DebugPrintf("Invalid compression
type %d found\n", compressionType);
__debugbreak();
assert(0);
[] decompressedBuffer.data(); dis.close(); bais.reset();

View file

@ -142,7 +142,7 @@ void ConsoleSchematicFile::load(DataInputStream* dis) {
app.DebugPrintf(
"ConsoleSchematicFile has read a nullptr tile "
"entity\n");
__debugbreak();
assert(0);
#endif
} else {
m_tileEntities.push_back(te);
@ -675,7 +675,7 @@ void ConsoleSchematicFile::generateSchematicFile(
}
#ifndef _CONTENT_PACKAGE
if (p != blockCount) __debugbreak();
if (p != blockCount) assert(0);
#endif
// We don't know how this will compress - just make a fixed length buffer to

View file

@ -34,7 +34,7 @@ GameRule::ValueType GameRule::getParameter(const std::wstring& parameterName) {
#ifndef _CONTENT_PACKAGE
wprintf(L"WARNING: Parameter %ls was not set before being fetched\n",
parameterName.c_str());
__debugbreak();
assert(0);
#endif
}
return m_parameters[parameterName];

View file

@ -115,7 +115,7 @@ void StringTable::ProcessStringTableData(void) {
} else {
app.DebugPrintf("Failed to get language\n");
#ifdef _DEBUG
__debugbreak();
assert(0);
#endif
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) {
#ifndef _CONTENT_PACKAGE
if (isStatic) {
__debugbreak();
assert(0);
return L"";
}
#endif
@ -154,7 +154,7 @@ const wchar_t* StringTable::getString(const std::wstring& id) {
const wchar_t* StringTable::getString(int id) {
#ifndef _CONTENT_PACKAGE
if (!isStatic) {
__debugbreak();
assert(0);
return L"";
}
#endif

View file

@ -6,6 +6,7 @@
#include "app/common/UI/Scenes/UIScene_FullscreenProgress.h"
#include "app/linux/LinuxGame.h"
#include "app/linux/Linux_UIController.h"
#include "app/linux/Stubs/winapi_stubs.h"
#include "minecraft/client/Minecraft.h"
#include "minecraft/client/ProgressRenderer.h"
#include "minecraft/client/renderer/GameRenderer.h"

View file

@ -31,6 +31,7 @@
#include "minecraft/world/level/LevelSettings.h"
#include "minecraft/world/level/tile/Tile.h"
#include "minecraft/world/phys/AABB.h"
#include "platform/input/InputConstants.h"
#include "strings.h"
class TutorialConstraint;

View file

@ -102,7 +102,7 @@ std::vector<uint8_t> ArchiveFile::getFile(const std::wstring& filename) {
app.DebugPrintf("Failed to find file '%ls' in archive\n",
filename.c_str());
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
app.FatalLoadError();
} else {

View file

@ -13,6 +13,7 @@
#include "app/linux/Stubs/iggy_stubs.h"
#endif
#include "app/linux/Iggy/include/rrCore.h"
#include "platform/input/InputConstants.h"
class UILayer;

View file

@ -286,7 +286,7 @@ void UIScene_MainMenu::handlePress(F64 controlId, F64 childId) {
} break;
default:
__debugbreak();
assert(0);
}
bool confirmUser = false;

View file

@ -307,7 +307,7 @@ void UIScene::loadMovie() {
app.DebugPrintf("ERROR: Could not find any iggy movie for %ls!\n",
moviePath.c_str());
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
app.FatalLoadError();
}
@ -323,7 +323,7 @@ void UIScene::loadMovie() {
if (!swf) {
app.DebugPrintf("ERROR: Failed to load iggy scene!\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
app.FatalLoadError();
}
@ -718,7 +718,7 @@ void UIScene::_customDrawSlotControl(CustomDrawData* region, int iPad,
// {
// app.DebugPrintf("A scene is trying to navigate forwards, but
// it's parent layer is nullptr!\n"); #ifndef _CONTENT_PACKAGE
// __debugbreak();
// assert(0);
// #endif
// }
// else
@ -911,7 +911,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
"Callback for handlePress did not have the correct number of "
"arguments\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return;
}
@ -920,7 +920,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
app.DebugPrintf(
"Arguments for handlePress were not of the correct type\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return;
}
@ -932,7 +932,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
"Callback for handleFocusChange did not have the correct "
"number of arguments\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return;
}
@ -942,7 +942,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
"Arguments for handleFocusChange were not of the correct "
"type\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return;
}
@ -955,7 +955,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
"Callback for handleInitFocus did not have the correct number "
"of arguments\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return;
}
@ -964,7 +964,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
app.DebugPrintf(
"Arguments for handleInitFocus were not of the correct type\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return;
}
@ -977,7 +977,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
"Callback for handleCheckboxToggled did not have the correct "
"number of arguments\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return;
}
@ -987,7 +987,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
"Arguments for handleCheckboxToggled were not of the correct "
"type\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return;
}
@ -1000,7 +1000,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
"Callback for handleSliderMove did not have the correct number "
"of arguments\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return;
}
@ -1010,7 +1010,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
"Arguments for handleSliderMove were not of the correct "
"type\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return;
}
@ -1023,7 +1023,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
"Callback for handleAnimationEnd did not have the correct "
"number of arguments\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return;
}
@ -1036,7 +1036,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
"Callback for handleSelectionChanged did not have the correct "
"number of arguments\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return;
}
@ -1045,7 +1045,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
"Arguments for handleSelectionChanged were not of the correct "
"type\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return;
}
@ -1061,7 +1061,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
"Callback for handleRequestMoreData did not have the "
"correct number of arguments\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return;
}
@ -1071,7 +1071,7 @@ void UIScene::externalCallback(IggyExternalFunctionCallUTF16* call) {
"Arguments for handleRequestMoreData were not of the "
"correct type\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return;
}

View file

@ -1619,7 +1619,7 @@ RADDEFSTART
#define RR_BREAK() __builtin_trap()
#define RR_CACHE_LINE_SIZE 32
#elif defined(__RADXENON__)
#define RR_BREAK() __debugbreak()
#define RR_BREAK() assert(0)
#define RR_CACHE_LINE_SIZE 128
#elif defined(__RADANDROID__)
#define RR_BREAK() __builtin_trap()

View file

@ -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

View file

@ -9,15 +9,8 @@
#include <sys/time.h>
#include <unistd.h>
#include <cassert>
#include <cstdio>
#include <cstdint>
#include <cstdlib>
#include <ctime>
#include <cwchar>
#define __cdecl
#define _vsnprintf_s vsnprintf;
typedef struct {
int32_t LowPart;
@ -31,8 +24,6 @@ typedef struct {
uint64_t QuadPart;
} ULARGE_INTEGER;
#define __debugbreak()
#define ERROR_SUCCESS 0L
#define ERROR_IO_PENDING 997L // dderror
#define ERROR_CANCELLED 1223L
@ -147,8 +138,6 @@ static inline bool FileTimeToSystemTime(const FILETIME* lpFileTime,
return true;
}
static inline void* GetModuleHandle(const char* lpModuleName) { return 0; }
static inline void* VirtualAlloc(void* lpAddress, size_t dwSize,
int32_t flAllocationType, int32_t flProtect) {
// MEM_COMMIT | MEM_RESERVE → mmap anonymous

View file

@ -1619,7 +1619,7 @@ RADDEFSTART
#define RR_BREAK() __builtin_trap()
#define RR_CACHE_LINE_SIZE 32
#elif defined(__RADXENON__)
#define RR_BREAK() __debugbreak()
#define RR_BREAK() assert(0)
#define RR_CACHE_LINE_SIZE 128
#elif defined(__RADANDROID__)
#define RR_BREAK() __builtin_trap()

View file

@ -25,7 +25,7 @@ void ConsoleUIController::init(ID3D11Device* dev, ID3D11DeviceContext* ctx,
if (!gdraw_funcs) {
app.DebugPrintf("Failed to initialise GDraw!\n");
#ifndef _CONTENT_PACKAGE
__debugbreak();
assert(0);
#endif
app.FatalLoadError();
}

View file

@ -750,7 +750,7 @@ public:
}
if ((m_falsePositives.size() > 0) || (m_falseNegatives.size() > 0)) {
__debugbreak();
assert(0);
}
}
};

View file

@ -11,6 +11,7 @@
#include "java/File.h"
#include "minecraft/client/resources/ResourceLocation.h"
#include "minecraft/network/packet/DisconnectPacket.h"
#include "platform/stubs.h"
class Timer;
class MultiPlayerLevel;

View file

@ -16,6 +16,7 @@
#include "minecraft/client/renderer/Textures.h"
#include "minecraft/locale/I18n.h"
#include "minecraft/locale/Language.h"
#include "platform/stubs.h"
// 4J - the Option sub-class used to be an java enumerated type, trying to
// emulate that functionality here

View file

@ -17,6 +17,7 @@
#include "java/JavaMath.h"
#include "java/Random.h"
#include "java/System.h"
#include "java/Color.h"
#include "minecraft/client/ClientConstants.h"
#include "minecraft/client/GuiMessage.h"
#include "minecraft/client/Lighting.h"
@ -1084,7 +1085,7 @@ max) + "% (" + (total / 1024 / 1024) + "MB)"; drawString(font, msg, screenWidth
int col = 0xffffff;
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
// jukebox

View file

@ -2,6 +2,7 @@
#include "platform/stubs.h"
#include "java/Random.h"
#include "java/Color.h"
Random* GuiParticle::random = new Random();
@ -17,7 +18,7 @@ GuiParticle::GuiParticle(double x, double y, double xa, double ya) {
this->xa = xa;
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;
g = ((col >> 8) & 0xff) / 255.0;
b = ((col) & 0xff) / 255.0;

View file

@ -1,7 +1,6 @@
#include "ChestModel.h"
#include "platform/renderer/renderer.h"
#include "minecraft/client/model/geom/ModelPart.h"
ChestModel::ChestModel() {

View file

@ -185,7 +185,7 @@ void Particle::setTex(Textures* textures, Icon* icon) {
} else {
#if !defined(_CONTENT_PACKAGE)
printf("Invalid call to Particle.setTex, use coordinate methods\n");
__debugbreak();
assert(0);
#endif
// throw new RuntimeException("Invalid call to Particle.setTex, use
// coordinate methods");
@ -197,7 +197,7 @@ void Particle::setMiscTex(int slotIndex) {
getParticleTexture() != ParticleEngine::DRAGON_BREATH_TEXTURE) {
#if !defined(_CONTENT_PACKAGE)
printf("Invalid call to Particle.setMixTex\n");
__debugbreak();
assert(0);
// throw new RuntimeException("Invalid call to Particle.setMiscTex");
#endif
}

View file

@ -523,7 +523,7 @@ void LocalPlayer::changeDimension(int i) {
Log::info(
"LocalPlayer::changeDimension from 1 to 1 but WinScreen has "
"not been implemented.\n");
__debugbreak();
assert(0);
#endif
} else {
awardStat(GenericStats::theEnd(), GenericStats::param_theEnd());

View file

@ -797,7 +797,7 @@ bool Chunk::isEmpty() {
void Chunk::setDirty() {
// 4J - not used, but if this starts being used again then we'll need to
// investigate how best to handle it.
__debugbreak();
assert(0);
levelRenderer->setGlobalChunkFlag(x, y, z, level,
LevelRenderer::CHUNK_FLAG_DIRTY);
}

View file

@ -2024,7 +2024,7 @@ void GameRenderer::setupFog(int i, float alpha) {
}
if (i == 999) {
__debugbreak();
assert(0);
// 4J TODO
/*
glFog(GL_FOG_COLOR, getBuffer(0, 0, 0, 1));

View file

@ -1,6 +1,7 @@
#include "MobSkinTextureProcessor.h"
#include "minecraft/client/BufferedImage.h"
#include "platform/stubs.h"
BufferedImage* MobSkinTextureProcessor::process(BufferedImage* in) {
if (in == nullptr) return nullptr;

View file

@ -198,7 +198,7 @@ EntityRenderer* EntityRenderDispatcher::getRenderer(eINSTANCEOF e) {
if (it == renderers.end()) {
Log::info("Couldn't find renderer for entity of type %d\n", e);
// New renderer mapping required in above table
// __debugbreak();
// assert(0);
assert(0);
}
/* 4J - not doing this hierarchical search anymore. We need to explicitly

View file

@ -178,7 +178,7 @@ void PreStitchedTextureMap::makeTextureAnimated(TexturePack* texturePack,
textureFileName.c_str(), first->getWidth(),
tex->getWidth(), first->getHeight(),
tex->getHeight());
__debugbreak();
assert(0);
}
#endif
@ -196,7 +196,7 @@ void PreStitchedTextureMap::makeTextureAnimated(TexturePack* texturePack,
StitchedTexture* PreStitchedTextureMap::getTexture(const std::wstring& name) {
#if !defined(_CONTENT_PACKAGE)
Log::info("Not implemented!\n");
__debugbreak();
assert(0);
#endif
return nullptr;
}
@ -218,7 +218,7 @@ Icon* PreStitchedTextureMap::registerIcon(const std::wstring& name) {
if (name.empty()) {
Log::info("Don't register nullptr\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
result = missingPosition;
// new RuntimeException("Don't register null!").printStackTrace();
@ -230,7 +230,7 @@ Icon* PreStitchedTextureMap::registerIcon(const std::wstring& name) {
if (result == nullptr) {
#if !defined(_CONTENT_PACKAGE)
Log::info("Could not find uv data for icon %ls\n", name.c_str());
__debugbreak();
assert(0);
#endif
result = missingPosition;
}

View file

@ -84,7 +84,7 @@ void Stitcher::stitch() {
if (!addToStorage(textureHolder)) {
Log::info("Stitcher exception!\n");
#ifndef _CONTENT_PACKAGE
__debugbreak();
assert(0);
#endif
// throw new StitcherException(textureHolder);
}

View file

@ -237,7 +237,7 @@ Icon* TextureMap::registerIcon(const std::wstring& name) {
if (name.empty()) {
Log::info("Don't register nullptr\n");
#ifndef _CONTENT_PACKAGE
__debugbreak();
assert(0);
#endif
// new RuntimeException("Don't register null!").printStackTrace();
}

View file

@ -214,7 +214,8 @@ void AbstractTexturePack::unloadUI() {
}
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
constexpr int LOCATOR_SIZE =

View file

@ -150,7 +150,7 @@ void DLCTexturePack::loadDescription() {
std::wstring DLCTexturePack::getResource(const std::wstring& name) {
// 4J Stu - We should never call this function
#if !defined(__CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return L"";
}
@ -160,7 +160,7 @@ InputStream* DLCTexturePack::getResourceImplementation(
{
// 4J Stu - We should never call this function
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
if (hasFile(name)) return nullptr;
#endif
return nullptr; // resource;

View file

@ -33,7 +33,7 @@ CustomPayloadPacket::CustomPayloadPacket(const std::wstring& identifier,
if (length > std::numeric_limits<short>::max()) {
Log::info("Payload may not be larger than 32K\n");
#ifndef _CONTENT_PACKAGE
__debugbreak();
assert(0);
#endif
// throw new IllegalArgumentException("Payload may not be larger
// than 32k");

View file

@ -26,7 +26,7 @@ GameCommandPacket::GameCommandPacket(EGameCommand command,
if (length > std::numeric_limits<short>::max()) {
Log::info("Payload may not be larger than 32K\n");
#ifndef _CONTENT_PACKAGE
__debugbreak();
assert(0);
#endif
// throw new IllegalArgumentException("Payload may not be larger
// than 32k");

View file

@ -40,7 +40,7 @@ void MoveEntityPacket::write(DataOutputStream* dos) // throws IOException
if ((id < 0) || (id >= 2048)) {
// We shouln't be tracking an entity that doesn't have a short type of
// id
__debugbreak();
assert(0);
}
dos->writeShort((short)id);
}

View file

@ -23,7 +23,7 @@ MoveEntityPacketSmall::MoveEntityPacketSmall(int id) {
if ((id < 0) || (id >= 2048)) {
// We shouln't be tracking an entity that doesn't have a short type of
// id
__debugbreak();
assert(0);
}
this->id = id;
@ -46,7 +46,7 @@ void MoveEntityPacketSmall::write(DataOutputStream* dos) // throws IOException
if ((id < 0) || (id >= 2048)) {
// We shouln't be tracking an entity that doesn't have a short type of
// id
__debugbreak();
assert(0);
}
dos->writeShort((short)id);
}
@ -96,7 +96,7 @@ void MoveEntityPacketSmall::PosRot::write(
if ((id < 0) || (id >= 2048)) {
// We shouln't be tracking an entity that doesn't have a short type of
// id
__debugbreak();
assert(0);
}
short idAndRot = id | yRot << 11;
dos->writeShort(idAndRot);
@ -132,7 +132,7 @@ void MoveEntityPacketSmall::Pos::write(
if ((id < 0) || (id >= 2048)) {
// We shouln't be tracking an entity that doesn't have a short type of
// id
__debugbreak();
assert(0);
}
short idAndY = id | ya << 11;
dos->writeShort(idAndY);
@ -165,7 +165,7 @@ void MoveEntityPacketSmall::Rot::write(
if ((id < 0) || (id >= 2048)) {
// We shouln't be tracking an entity that doesn't have a short type of
// id
__debugbreak();
assert(0);
}
short idAndRot = id | yRot << 11;
dos->writeShort(idAndRot);

View file

@ -468,7 +468,7 @@ std::vector<uint8_t> Packet::readBytes(DataInputStream* datainputstream) {
if (size < 0) {
Log::info("Key was smaller than nothing! Weird key!");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
return std::vector<uint8_t>();
// throw new IOException("Key was smaller than nothing! Weird key!");
@ -517,7 +517,7 @@ std::shared_ptr<Packet> Packet::readPacket(
(!isServer &&
clientReceivedPackets.find(id) == clientReceivedPackets.end())) {
// Log::info("Bad packet id %d\n", id);
__debugbreak();
assert(0);
assert(false);
// throw new IOException(wstring(L"Bad packet id ") +
// toWString<int>(id));

View file

@ -43,13 +43,13 @@ SetPlayerTeamPacket::SetPlayerTeamPacket(PlayerTeam* team,
if (method != METHOD_JOIN && method != METHOD_LEAVE) {
Log::info("Method must be join or leave for player constructor");
#ifndef _CONTENT_PACKAGE
__debugbreak();
assert(0);
#endif
}
if (playerNames == nullptr || playerNames->empty()) {
Log::info("Players cannot be null/empty");
#ifndef _CONTENT_PACKAGE
__debugbreak();
assert(0);
#endif
}

View file

@ -102,7 +102,7 @@ void EntityTracker::addEntity(std::shared_ptr<Entity> e, int range,
assert(false); // Entity already tracked
}
if (e->entityId >= 2048) {
__debugbreak();
assert(0);
}
std::shared_ptr<TrackedEntity> te = std::shared_ptr<TrackedEntity>(
new TrackedEntity(e, range, updateInterval, trackDeltas));

View file

@ -2,6 +2,7 @@
#include "minecraft/util/WeighedRandom.h"
#include <vector>
#include <cassert>
#include "app/linux/Stubs/winapi_stubs.h"
#include "java/Random.h"
@ -17,7 +18,7 @@ int WeighedRandom::getTotalWeight(std::vector<WeighedRandomItem*>* items) {
WeighedRandomItem* WeighedRandom::getRandomItem(
Random* random, std::vector<WeighedRandomItem*>* items, int totalWeight) {
if (totalWeight <= 0) {
__debugbreak();
assert(0);
}
int selection = random->nextInt(totalWeight);
@ -49,7 +50,7 @@ WeighedRandomItem* WeighedRandom::getRandomItem(
Random* random, const std::vector<WeighedRandomItem*>& items,
int totalWeight) {
if (totalWeight <= 0) {
__debugbreak();
assert(0);
}
int selection = random->nextInt(totalWeight);

View file

@ -126,7 +126,7 @@ int Entity::getSmallId() {
}
Log::info("Out of small entity Ids... possible leak?\n");
__debugbreak();
assert(0);
return -1;
}

View file

@ -206,7 +206,7 @@ void ArmorItem::setColor(std::shared_ptr<ItemInstance> item, int color) {
if (armorType != ArmorMaterial::CLOTH) {
#ifndef _CONTENT_PACKAGE
printf("Can't dye non-leather!");
__debugbreak();
assert(0);
#endif
// throw new UnsupportedOperationException("Can't dye non-leather!");
}

View file

@ -2188,7 +2188,7 @@ void Level::tickEntities() {
if (tileEntitiesToUnload.find(*it) !=
tileEntitiesToUnload.end()) {
if (isClientSide) {
__debugbreak();
assert(0);
}
it = tileEntityList.erase(it);
} else {

View file

@ -37,7 +37,7 @@ void BiomeDecorator::decorate(Level* level, Random* random, int xo, int zo) {
if (this->level != nullptr) {
Log::info("BiomeDecorator::decorate - Already decorating!!\n");
#ifndef _CONTENT_PACKAGE
__debugbreak();
assert(0);
// throw new RuntimeException("Already decorating!!");
#endif
}

View file

@ -956,7 +956,7 @@ void CompressedTileStorage::compress(int upgradeBlock /*=-1*/) {
// uint32_t lastError = GetLastError();
// MEMORYSTATUS memStatus;
// GlobalMemoryStatus(&memStatus);
// __debugbreak();
// assert(0);
}
unsigned char* pucData = newIndicesAndData + 1024;
unsigned short usDataOffset = 0;

View file

@ -320,7 +320,7 @@ void RegionFile::write(int x, int z, std::uint8_t* data,
#ifndef _CONTENT_PACKAGE
if (sectorNumber < 0) {
__debugbreak();
assert(0);
}
#endif

View file

@ -51,7 +51,7 @@ CustomLevelSource::CustomLevelSource(Level* level, int64_t seed,
path, m_heightmapOverride.data(), m_heightmapOverride.size());
if (result.status == IPlatformFilesystem::ReadStatus::TooLarge) {
Log::info("Heightmap binary is too large!!\n");
__debugbreak();
assert(0);
} else if (result.status != IPlatformFilesystem::ReadStatus::Ok) {
gameServices().fatalLoadError();
assert(false);
@ -71,7 +71,7 @@ CustomLevelSource::CustomLevelSource(Level* level, int64_t seed,
m_waterheightOverride.size());
} else if (result.status == IPlatformFilesystem::ReadStatus::TooLarge) {
Log::info("waterheight binary is too large!!\n");
__debugbreak();
assert(0);
} else if (result.status != IPlatformFilesystem::ReadStatus::Ok) {
gameServices().fatalLoadError();
}

View file

@ -159,7 +159,7 @@ bool StrongholdFeature::isFeatureChunk(int x, int z, bool bIsSuperflat) {
#ifndef _CONTENT_PACKAGE
if (position->x > 2560 || position->x < -2560 ||
position->z > 2560 || position->z < -2560) {
__debugbreak();
assert(0);
}
#endif

View file

@ -24,7 +24,7 @@ BiomeOverrideLayer::BiomeOverrideLayer(int seedMixup) : Layer(seedMixup) {
m_biomeOverride.size());
} else if (result.status == IPlatformFilesystem::ReadStatus::TooLarge) {
Log::info("Biomemap binary is too large!!\n");
__debugbreak();
assert(0);
} else if (result.status != IPlatformFilesystem::ReadStatus::Ok) {
gameServices().fatalLoadError();
}

View file

@ -91,7 +91,7 @@ ConsoleSaveFileOriginal::ConsoleSaveFileOriginal(
// pages committed should always be zero at this point.
if (pagesCommitted != 0) {
#ifndef _CONTENT_PACKAGE
__debugbreak();
assert(0);
#endif
}
@ -103,7 +103,7 @@ ConsoleSaveFileOriginal::ConsoleSaveFileOriginal(
if (pvRet == nullptr) {
#ifndef _CONTENT_PACKAGE
// Out of physical memory
__debugbreak();
assert(0);
#endif
}
pagesCommitted = pagesRequired;
@ -162,7 +162,7 @@ ConsoleSaveFileOriginal::ConsoleSaveFileOriginal(
COMMIT_ALLOCATION, PAGE_READWRITE);
if (pvRet == nullptr) {
// Out of physical memory
__debugbreak();
assert(0);
}
pagesCommitted = pagesRequired;
}
@ -438,7 +438,7 @@ void ConsoleSaveFileOriginal::MoveDataBeyond(
COMMIT_ALLOCATION, PAGE_READWRITE);
if (pvRet == nullptr) {
// Out of physical memory
__debugbreak();
assert(0);
}
pagesCommitted = pagesRequired;
}

View file

@ -15,6 +15,7 @@
#include <thread>
#include <utility>
#include "platform/fs/fs.h"
#include "platform/PlatformTypes.h"
#include "minecraft/GameEnums.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.
if (pagesCommitted != 0) {
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
}
@ -481,7 +482,7 @@ void ConsoleSaveFileSplit::_init(const std::wstring& fileName, void* pvSaveData,
if (pvRet == nullptr) {
#if !defined(_CONTENT_PACKAGE)
// Out of physical memory
__debugbreak();
assert(0);
#endif
}
pagesCommitted = pagesRequired;
@ -530,7 +531,7 @@ void ConsoleSaveFileSplit::_init(const std::wstring& fileName, void* pvSaveData,
COMMIT_ALLOCATION, PAGE_READWRITE);
if (pvRet == nullptr) {
// Out of physical memory
__debugbreak();
assert(0);
}
pagesCommitted = pagesRequired;
}
@ -541,7 +542,7 @@ void ConsoleSaveFileSplit::_init(const std::wstring& fileName, void* pvSaveData,
// actually be ok
Log::info("Failed to decompress save data!\n");
#if !defined(_CONTENT_PACKAGE)
__debugbreak();
assert(0);
#endif
memset(pvSaveMem, 0, fileSize);
// Clear the first 8 bytes that reference the header
@ -1036,7 +1037,7 @@ void ConsoleSaveFileSplit::MoveDataBeyond(FileEntry* file,
COMMIT_ALLOCATION, PAGE_READWRITE);
if (pvRet == nullptr) {
// Out of physical memory
__debugbreak();
assert(0);
}
pagesCommitted = pagesRequired;
}

View file

@ -284,7 +284,7 @@ void FileHeader::ReadHeader(
#if !defined(_CONTENT_PACKAGE)
Log::info("********** Invalid save version %d\n",
m_saveVersion);
__debugbreak();
assert(0);
#endif
break;
}

View file

@ -70,7 +70,7 @@ int _MapDataMappings::getDimension(int id) {
default:
#if !defined(_CONTENT_PACKAGE)
printf("Read invalid dimension from MapDataMapping\n");
__debugbreak();
assert(0);
#endif
break;
}
@ -98,7 +98,7 @@ void _MapDataMappings::setMapping(int id, PlayerUID xuid, int dimension) {
#if !defined(_CONTENT_PACKAGE)
printf(
"Trinyg to set a MapDataMapping for an invalid dimension.\n");
__debugbreak();
assert(0);
#endif
break;
}

View file

@ -63,7 +63,7 @@ std::shared_ptr<SavedData> SavedDataStorage::get(const std::type_info& clazz,
new StructureFeatureSavedData(id)));
} else {
// Handling of new SavedData class required
__debugbreak();
assert(0);
}
ConsoleSaveFileInputStream fis =

View file

@ -43,7 +43,7 @@ int PressurePlateTile::getSignalStrength(Level* level, int x, int y, int z) {
else if (sensitivity == players)
entities = level->getEntitiesOfClass(typeid(Player), &at_bb);
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.
if (entities != nullptr && !entities->empty()) {

View file

@ -14,7 +14,7 @@ Objective* Scoreboard::addObjective(const std::wstring& name,
// if (objective != nullptr)
// {
// #indef _CONTENT_PACKAGE
// __debugbreak();
// assert(0);
// #endif
// //throw new IllegalArgumentException("An objective with the name
//'" + name + "' already exists!");

View file

@ -300,8 +300,3 @@ public:
void halt() {}
void forceReload() {}
};
class Color {
public:
static int HSBtoRGB(float, float, float) { return 0; }
};