* Fix include paths. Now it builds properly.

This commit is contained in:
iProgramInCpp 2023-08-05 15:34:07 +03:00
parent 71e700a300
commit bfdd5beb75
144 changed files with 267 additions and 212 deletions

View file

@ -6,16 +6,17 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#include "AppPlatform_windows.hpp" #define WIN32_LEAN_AND_MEAN
#include "Mouse.hpp"
#include "thirdparty/stb_image.h"
#include "thirdparty/stb_image_write.h"
#include <fstream> #include <fstream>
#include <sstream> #include <sstream>
#include <shlobj.h> #include <shlobj.h>
#include "AppPlatform_windows.hpp"
#include "client/player/input/Mouse.hpp"
#include "thirdparty/stb_image.h"
#include "thirdparty/stb_image_write.h"
extern LPCTSTR g_GameTitle; extern LPCTSTR g_GameTitle;
void AppPlatform_windows::initConsts() void AppPlatform_windows::initConsts()

View file

@ -10,8 +10,8 @@
#include "compat/GL.hpp" #include "compat/GL.hpp"
#include <ctime> #include <ctime>
#include "Utils.hpp"
#include "AppPlatform.hpp" #include "AppPlatform.hpp"
#include "client/common/Utils.hpp"
#ifdef ORIGINAL_CODE #ifdef ORIGINAL_CODE
#error "This isn't original code. You probably shouldn't try to compile this" #error "This isn't original code. You probably shouldn't try to compile this"

View file

@ -6,9 +6,9 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#define WIN32_LEAN_AND_MEAN
#include "../../source/Base/Utils.hpp" #include "SoundSystemWindows.hpp"
#include "SoundSystem_windows.hpp" #include "client/common/Utils.hpp"
SoundSystemWindows::SoundSystemWindows() SoundSystemWindows::SoundSystemWindows()
{ {
@ -105,8 +105,8 @@ void SoundSystemWindows::setListenerAngle(float degyaw, float degpitch)
return; return;
} }
float yaw = degyaw * M_PI / 180.f; float yaw = degyaw * float(M_PI) / 180.f;
float pitch = degpitch * M_PI / 180.f; float pitch = degpitch * float(M_PI) / 180.f;
float lx = cosf(pitch) * sinf(yaw); float lx = cosf(pitch) * sinf(yaw);
float ly = -sinf(pitch); float ly = -sinf(pitch);

View file

@ -21,7 +21,7 @@
#include <mmsystem.h> #include <mmsystem.h>
#include <dsound.h> #include <dsound.h>
#include "SoundData.hpp" #include "client/sound/SoundData.hpp"
class SoundSystemWindows class SoundSystemWindows
{ {

View file

@ -7,8 +7,8 @@
********************************************************************/ ********************************************************************/
#include "Minecraft.hpp" #include "Minecraft.hpp"
#include "IngameBlockSelectionScreen.hpp" #include "client/gui/screens/IngameBlockSelectionScreen.hpp"
#include "ItemRenderer.hpp" #include "client/renderer/entity/ItemRenderer.hpp"
#ifdef _WIN32 #ifdef _WIN32
#pragma warning(disable : 4244) #pragma warning(disable : 4244)

View file

@ -9,7 +9,7 @@
#include "CreateWorldScreen.hpp" #include "CreateWorldScreen.hpp"
#include "SelectWorldScreen.hpp" #include "SelectWorldScreen.hpp"
#include "ProgressScreen.hpp" #include "ProgressScreen.hpp"
#include "Util.hpp" #include "client/common/Util.hpp"
CreateWorldScreen::CreateWorldScreen() : CreateWorldScreen::CreateWorldScreen() :
m_textName(1, 0, 0, 0, 0, "", "Unnamed world"), m_textName(1, 0, 0, 0, 0, "", "Unnamed world"),

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "IngameBlockSelectionScreen.hpp" #include "IngameBlockSelectionScreen.hpp"
#include "ItemRenderer.hpp" #include "client/renderer/entity/ItemRenderer.hpp"
std::string g_sNotAvailableInDemoVersion = "Not available in the demo version"; std::string g_sNotAvailableInDemoVersion = "Not available in the demo version";

View file

@ -11,7 +11,7 @@
#include "CreateWorldScreen.hpp" #include "CreateWorldScreen.hpp"
#include "ProgressScreen.hpp" #include "ProgressScreen.hpp"
#include "StartMenuScreen.hpp" #include "StartMenuScreen.hpp"
#include "Util.hpp" #include "client/common/Util.hpp"
SelectWorldScreen::SelectWorldScreen() : SelectWorldScreen::SelectWorldScreen() :
m_btnDelete (1, "Delete"), m_btnDelete (1, "Delete"),

View file

@ -9,7 +9,8 @@
#pragma once #pragma once
#include "Cube.hpp" #include "Cube.hpp"
#include "Mob.hpp"
class Mob;
class Model class Model
{ {

View file

@ -9,9 +9,9 @@
#pragma once #pragma once
#include <utility> #include <utility>
#include "VertexPT.hpp" #include "client/renderer/VertexPT.hpp"
#include "Tesselator.hpp" #include "client/renderer/Tesselator.hpp"
#include "Utils.hpp" // to configure 1 thing #include "GameMods.hpp"
class PolygonQuad class PolygonQuad
{ {

View file

@ -6,7 +6,7 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#include "Packet.hpp" #include "../Packet.hpp"
AddPlayerPacket::AddPlayerPacket(const RakNet::RakNetGUID& guid, RakNet::RakString name, int id, float x, float y, float z) AddPlayerPacket::AddPlayerPacket(const RakNet::RakNetGUID& guid, RakNet::RakString name, int id, float x, float y, float z)
{ {

View file

@ -6,8 +6,8 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#include "Packet.hpp" #include "../Packet.hpp"
#include "LevelChunk.hpp" #include "world/level/levelgen/chunk/LevelChunk.hpp"
void ChunkDataPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback) void ChunkDataPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback)
{ {

View file

@ -6,7 +6,7 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#include "Packet.hpp" #include "../Packet.hpp"
void LoginPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback) void LoginPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback)
{ {

View file

@ -6,7 +6,7 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#include "Packet.hpp" #include "../Packet.hpp"
void MessagePacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback) void MessagePacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback)
{ {

View file

@ -6,7 +6,7 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#include "Packet.hpp" #include "../Packet.hpp"
void MovePlayerPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback) void MovePlayerPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback)
{ {

View file

@ -6,7 +6,7 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#include "Packet.hpp" #include "../Packet.hpp"
void PlaceBlockPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback) void PlaceBlockPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback)
{ {

View file

@ -6,7 +6,7 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#include "Packet.hpp" #include "../Packet.hpp"
void PlayerEquipmentPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback) void PlayerEquipmentPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback)
{ {

View file

@ -6,7 +6,7 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#include "Packet.hpp" #include "../Packet.hpp"
void RemoveBlockPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback) void RemoveBlockPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback)
{ {

View file

@ -6,7 +6,7 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#include "Packet.hpp" #include "../Packet.hpp"
void RemoveEntityPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback) void RemoveEntityPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback)
{ {

View file

@ -6,7 +6,7 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#include "Packet.hpp" #include "../Packet.hpp"
void RequestChunkPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback) void RequestChunkPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback)
{ {

View file

@ -6,7 +6,7 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#include "Packet.hpp" #include "../Packet.hpp"
void StartGamePacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback) void StartGamePacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback)
{ {

View file

@ -6,7 +6,7 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#include "Packet.hpp" #include "../Packet.hpp"
void UpdateBlockPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback) void UpdateBlockPacket::handle(const RakNet::RakNetGUID& guid, NetEventCallback* pCallback)
{ {

View file

@ -11,7 +11,8 @@
#include "NetEventCallback.hpp" #include "NetEventCallback.hpp"
#include "Minecraft.hpp" #include "Minecraft.hpp"
#include "RakNetInstance.hpp" #include "RakNetInstance.hpp"
#include "LevelListener.hpp" #include "world/level/LevelListener.hpp"
class Minecraft; class Minecraft;
class ServerSideNetworkHandler : public NetEventCallback, public LevelListener class ServerSideNetworkHandler : public NetEventCallback, public LevelListener

View file

@ -6,8 +6,8 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#include "client/common/Utils.hpp"
#include "ITurnInput.hpp" #include "ITurnInput.hpp"
#include "Utils.hpp"
float ITurnInput::getDeltaTime() float ITurnInput::getDeltaTime()
{ {

View file

@ -8,7 +8,7 @@
#pragma once #pragma once
#include "Options.hpp" #include "client/common/Options.hpp"
class KeyboardInput class KeyboardInput
{ {

View file

@ -7,8 +7,8 @@
********************************************************************/ ********************************************************************/
#include "Chunk.hpp" #include "Chunk.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
#include "Region.hpp" #include "world/level/Region.hpp"
#include "TileRenderer.hpp" #include "TileRenderer.hpp"
int Chunk::updates; int Chunk::updates;

View file

@ -8,7 +8,7 @@
#pragma once #pragma once
#include "Utils.hpp" #include "client/common/Utils.hpp"
#include "FrustumCuller.hpp" #include "FrustumCuller.hpp"
#include "RenderList.hpp" #include "RenderList.hpp"
#include "Tesselator.hpp" #include "Tesselator.hpp"

View file

@ -8,7 +8,7 @@
#pragma once #pragma once
#include "AABB.hpp" #include "client/common/AABB.hpp"
class Culler class Culler
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "DynamicTexture.hpp" #include "DynamicTexture.hpp"
#include "Utils.hpp" #include "client/common/Utils.hpp"
DynamicTexture::DynamicTexture(int a2) : m_textureIndex(a2) DynamicTexture::DynamicTexture(int a2) : m_textureIndex(a2)
{ {

View file

@ -8,8 +8,8 @@
#pragma once #pragma once
#include "Matrix.hpp" #include "client/common/Matrix.hpp"
#include "AABB.hpp" #include "client/common/AABB.hpp"
class Frustum class Frustum
{ {

View file

@ -8,7 +8,7 @@
#pragma once #pragma once
#include "Vec3.hpp" #include "client/common/Vec3.hpp"
#include "Culler.hpp" #include "Culler.hpp"
#include "Frustum.hpp" #include "Frustum.hpp"

View file

@ -8,7 +8,7 @@
#pragma once #pragma once
#include "ItemInstance.hpp" #include "world/item/ItemInstance.hpp"
#include "TileRenderer.hpp" #include "TileRenderer.hpp"
class Minecraft; class Minecraft;

View file

@ -10,9 +10,8 @@
#include <algorithm> #include <algorithm>
#include <sstream> #include <sstream>
#include "compat/GL.hpp" #include "compat/GL.hpp"
#include "LevelListener.hpp" #include "world/level/LevelListener.hpp"
#include "Textures.hpp" #include "Textures.hpp"
#include "RenderList.hpp" #include "RenderList.hpp"
#include "TileRenderer.hpp" #include "TileRenderer.hpp"

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "LightUpdate.hpp" #include "LightUpdate.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
void LightUpdate::update(Level* pLevel) void LightUpdate::update(Level* pLevel)
{ {

View file

@ -8,7 +8,6 @@
#include "compat/GL.hpp" #include "compat/GL.hpp"
#include "Tesselator.hpp" #include "Tesselator.hpp"
#include "Utils.hpp"
int dword_2514A4 = 0; int dword_2514A4 = 0;

View file

@ -8,9 +8,9 @@
#pragma once #pragma once
#include "Region.hpp" #include "world/level/Region.hpp"
#include "Chunk.hpp" #include "client/renderer/Chunk.hpp"
#include "Tesselator.hpp" #include "client/renderer/Tesselator.hpp"
#ifndef ENH_SHADE_HELD_TILES #ifndef ENH_SHADE_HELD_TILES
#define RENDER_TILE_ARG_PATCH #define RENDER_TILE_ARG_PATCH

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "DynamicTexture.hpp" #include "DynamicTexture.hpp"
#include "Tile.hpp" #include "world/tile/Tile.hpp"
WaterSideTexture::WaterSideTexture() : DynamicTexture(Tile::water->m_TextureFrame + 1) WaterSideTexture::WaterSideTexture() : DynamicTexture(Tile::water->m_TextureFrame + 1)
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "DynamicTexture.hpp" #include "DynamicTexture.hpp"
#include "Tile.hpp" #include "world/tile/Tile.hpp"
WaterTexture::WaterTexture() : DynamicTexture(Tile::water->m_TextureFrame) WaterTexture::WaterTexture() : DynamicTexture(Tile::water->m_TextureFrame)
{ {

View file

@ -7,8 +7,8 @@
********************************************************************/ ********************************************************************/
#include "EntityRenderDispatcher.hpp" #include "EntityRenderDispatcher.hpp"
#include "ItemInHandRenderer.hpp"
#include "Minecraft.hpp" #include "Minecraft.hpp"
#include "../ItemInHandRenderer.hpp"
EntityRenderDispatcher* EntityRenderDispatcher::instance; EntityRenderDispatcher* EntityRenderDispatcher::instance;
float EntityRenderDispatcher::xOff, EntityRenderDispatcher::yOff, EntityRenderDispatcher::zOff; float EntityRenderDispatcher::xOff, EntityRenderDispatcher::yOff, EntityRenderDispatcher::zOff;

View file

@ -8,8 +8,9 @@
#pragma once #pragma once
#include "HumanoidModel.hpp" #include "client/common/AABB.hpp"
#include "Font.hpp" #include "client/model/HumanoidModel.hpp"
#include "client/renderer/Font.hpp"
class EntityRenderDispatcher; class EntityRenderDispatcher;

View file

@ -6,10 +6,10 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#include "Utils.hpp" // include the utils only to let us know what enhancements we have #include "GameMods.hpp"
#if defined(ENH_ALLOW_SAND_GRAVITY) #if defined(ENH_ALLOW_SAND_GRAVITY)
#include "FallingTileRenderer.hpp" #include "FallingTileRenderer.hpp"
#include "FallingTile.hpp" #include "world/entity/FallingTile.hpp"
FallingTileRenderer::FallingTileRenderer() FallingTileRenderer::FallingTileRenderer()
{ {

View file

@ -7,10 +7,13 @@
********************************************************************/ ********************************************************************/
#pragma once #pragma once
#include "GameMods.hpp"
#if defined(ENH_ALLOW_SAND_GRAVITY) #if defined(ENH_ALLOW_SAND_GRAVITY)
#include "EntityRenderer.hpp" #include "EntityRenderer.hpp"
#include "TileRenderer.hpp" #include "../TileRenderer.hpp"
class FallingTileRenderer : public EntityRenderer class FallingTileRenderer : public EntityRenderer
{ {

View file

@ -8,10 +8,10 @@
#include "HumanoidMobRenderer.hpp" #include "HumanoidMobRenderer.hpp"
#include "EntityRenderDispatcher.hpp" #include "EntityRenderDispatcher.hpp"
#include "ItemInHandRenderer.hpp" #include "client/renderer/ItemInHandRenderer.hpp"
#include "ItemInstance.hpp" #include "client/renderer/TileRenderer.hpp"
#include "TileRenderer.hpp" #include "world/entity/Player.hpp"
#include "Player.hpp" #include "world/item/ItemInstance.hpp"
HumanoidMobRenderer::HumanoidMobRenderer(HumanoidModel* pModel, float f) : MobRenderer(pModel, f) HumanoidMobRenderer::HumanoidMobRenderer(HumanoidModel* pModel, float f) : MobRenderer(pModel, f)
{ {

View file

@ -8,11 +8,10 @@
#include <sstream> #include <sstream>
#include "ItemRenderer.hpp" #include "ItemRenderer.hpp"
#include "TileRenderer.hpp"
#include "ItemEntity.hpp"
#include "EntityRenderDispatcher.hpp" #include "EntityRenderDispatcher.hpp"
#include "client/renderer/TileRenderer.hpp"
#include "world/entity/ItemEntity.hpp"
// @TODO: ItemSpriteRenderer. Unused relative
TileRenderer* ItemRenderer::tileRenderer = new TileRenderer; TileRenderer* ItemRenderer::tileRenderer = new TileRenderer;
const uint8_t g_ItemFrames[C_MAX_TILES] = const uint8_t g_ItemFrames[C_MAX_TILES] =

View file

@ -9,8 +9,8 @@
#pragma once #pragma once
#include "EntityRenderer.hpp" #include "EntityRenderer.hpp"
#include "ItemInstance.hpp" #include "../TileRenderer.hpp"
#include "TileRenderer.hpp" #include "world/item/ItemInstance.hpp"
class ItemRenderer : public EntityRenderer class ItemRenderer : public EntityRenderer
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "TntRenderer.hpp" #include "TntRenderer.hpp"
#include "PrimedTnt.hpp" #include "world/entity/PrimedTnt.hpp"
TntRenderer::TntRenderer() TntRenderer::TntRenderer()
{ {

View file

@ -9,7 +9,7 @@
#pragma once #pragma once
#include "EntityRenderer.hpp" #include "EntityRenderer.hpp"
#include "TileRenderer.hpp" #include "../TileRenderer.hpp"
class TntRenderer : public EntityRenderer class TntRenderer : public EntityRenderer
{ {

View file

@ -9,9 +9,9 @@
#pragma once #pragma once
#include "EntityRenderer.hpp" #include "EntityRenderer.hpp"
#include "Tile.hpp" #include "client/renderer/TileRenderer.hpp"
#include "TileRenderer.hpp" #include "world/tile/Tile.hpp"
#include "TripodCamera.hpp" #include "world/entity/TripodCamera.hpp"
class TripodCameraRenderer : public EntityRenderer class TripodCameraRenderer : public EntityRenderer
{ {

View file

@ -8,15 +8,15 @@
#pragma once #pragma once
#include "client/common/Options.hpp"
#include "client/common/Random.hpp"
#include "SoundSystem.hpp" #include "SoundSystem.hpp"
#include "SoundRepository.hpp" #include "SoundRepository.hpp"
#include "Options.hpp"
#include "Random.hpp"
// Platform specific type for the sound system. // Platform specific type for the sound system.
#ifdef _WIN32 #ifdef _WIN32
#include "../../platforms/windows/SoundSystem_windows.hpp" #include "../../platforms/windows/SoundSystemWindows.hpp"
#define SOUND_SYSTEM_TYPE SoundSystemWindows #define SOUND_SYSTEM_TYPE SoundSystemWindows
#else #else
#define SOUND_SYSTEM_TYPE SoundSystem #define SOUND_SYSTEM_TYPE SoundSystem

View file

@ -7,8 +7,8 @@
********************************************************************/ ********************************************************************/
#include "SoundRepository.hpp" #include "SoundRepository.hpp"
#include "Utils.hpp" #include "client/common/Utils.hpp"
#include "Mth.hpp" #include "client/common/Mth.hpp"
void SoundRepository::add(const std::string& name, SoundDesc& sd) void SoundRepository::add(const std::string& name, SoundDesc& sd)
{ {

View file

@ -8,7 +8,7 @@
#include "Entity.hpp" #include "Entity.hpp"
#include "Player.hpp" #include "Player.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
int Entity::entityCounter; int Entity::entityCounter;
Random Entity::sharedRandom; Random Entity::sharedRandom;

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "FallingTile.hpp" #include "FallingTile.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
FallingTile::FallingTile(Level* level) : Entity(level) FallingTile::FallingTile(Level* level) : Entity(level)
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "ItemEntity.hpp" #include "ItemEntity.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
ItemEntity::ItemEntity(Level* level) : Entity(level) ItemEntity::ItemEntity(Level* level) : Entity(level)
#ifndef ORIGINAL_CODE #ifndef ORIGINAL_CODE

View file

@ -8,9 +8,9 @@
#pragma once #pragma once
#include "Player.hpp" #include "world/entity/Player.hpp"
#include "User.hpp" #include "client/player/input/KeyboardInput.hpp"
#include "KeyboardInput.hpp" #include "client/player/input/User.hpp"
class Minecraft; class Minecraft;

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "Mob.hpp" #include "Mob.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
Mob::Mob(Level* pLevel) : Entity(pLevel) Mob::Mob(Level* pLevel) : Entity(pLevel)
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "Player.hpp" #include "Player.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
Player::Player(Level* pLevel) : Mob(pLevel) Player::Player(Level* pLevel) : Mob(pLevel)
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "PrimedTnt.hpp" #include "PrimedTnt.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
PrimedTnt::PrimedTnt(Level* level) : Entity(level) PrimedTnt::PrimedTnt(Level* level) : Entity(level)
{ {

View file

@ -8,7 +8,7 @@
#include "TripodCamera.hpp" #include "TripodCamera.hpp"
#include "Player.hpp" #include "Player.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
TripodCamera::TripodCamera(Level* level, Player* player, float x, float y, float z) : Mob(level) TripodCamera::TripodCamera(Level* level, Player* player, float x, float y, float z) : Mob(level)
{ {

View file

@ -8,8 +8,8 @@
#pragma once #pragma once
#include "Level.hpp" #include "world/level/Level.hpp"
#include "ItemInstance.hpp" #include "world/item/ItemInstance.hpp"
class Minecraft; class Minecraft;

View file

@ -7,9 +7,9 @@
********************************************************************/ ********************************************************************/
#include "Item.hpp" #include "Item.hpp"
#include "TripodCamera.hpp" #include "world/level/Level.hpp"
#include "Level.hpp" #include "world/entity/TripodCamera.hpp"
#include "Player.hpp" #include "world/entity/Player.hpp"
CameraItem::CameraItem(int id) : Item(id) CameraItem::CameraItem(int id) : Item(id)
{ {

View file

@ -7,9 +7,9 @@
********************************************************************/ ********************************************************************/
#include "Item.hpp" #include "Item.hpp"
#include "Tile.hpp" #include "world/level/Level.hpp"
#include "Player.hpp" #include "world/entity/Player.hpp"
#include "Level.hpp" #include "world/tile/Tile.hpp"
DoorItem::DoorItem(int id, Material* pMtl) : Item(id) DoorItem::DoorItem(int id, Material* pMtl) : Item(id)
{ {

View file

@ -1,7 +1,8 @@
#pragma once #pragma once
#include "Player.hpp" #include <vector>
#include "ItemInstance.hpp" #include "world/item/ItemInstance.hpp"
#include "world/entity/Player.hpp"
class Player; // in case we're included from Player.hpp class Player; // in case we're included from Player.hpp

View file

@ -9,10 +9,9 @@
#pragma once #pragma once
#include <string> #include <string>
#include "Utils.hpp" #include "client/common/Utils.hpp"
#include "world/level/Material.hpp"
#include "ItemInstance.hpp" #include "ItemInstance.hpp"
#include "Material.hpp"
#define C_MAX_ITEMS (C_MAX_TILES * 2) #define C_MAX_ITEMS (C_MAX_TILES * 2)

View file

@ -8,7 +8,7 @@
#include <sstream> #include <sstream>
#include "ItemInstance.hpp" #include "ItemInstance.hpp"
#include "Tile.hpp" #include "world/tile/Tile.hpp"
void ItemInstance::init(int itemID, int amount, int auxValue) void ItemInstance::init(int itemID, int amount, int auxValue)
{ {

View file

@ -7,8 +7,8 @@
********************************************************************/ ********************************************************************/
#include "Item.hpp" #include "Item.hpp"
#include "Tile.hpp" #include "world/level/Level.hpp"
#include "Level.hpp" #include "world/tile/Tile.hpp"
TileItem::TileItem(int id) : Item(id) TileItem::TileItem(int id) : Item(id)
{ {

View file

@ -7,8 +7,8 @@
********************************************************************/ ********************************************************************/
#include "Item.hpp" #include "Item.hpp"
#include "Tile.hpp" #include "world/level/Level.hpp"
#include "Level.hpp" #include "world/tile/Tile.hpp"
TilePlanterItem::TilePlanterItem(int id, int place) : Item(id) TilePlanterItem::TilePlanterItem(int id, int place) : Item(id)
{ {

View file

@ -7,9 +7,9 @@
********************************************************************/ ********************************************************************/
#include "Dimension.hpp" #include "Dimension.hpp"
#include "TestChunkSource.hpp" #include "world/level/levelgen/chunk/TestChunkSource.hpp"
#include "RandomLevelSource.hpp" #include "world/level/levelgen/chunk/RandomLevelSource.hpp"
#include "ChunkCache.hpp" #include "world/level/levelgen/chunk/ChunkCache.hpp"
Dimension* Dimension::getNew(int type) Dimension* Dimension::getNew(int type)
{ {

View file

@ -8,10 +8,10 @@
#pragma once #pragma once
#include "Vec3.hpp" #include "client/common/Vec3.hpp"
#include "BiomeSource.hpp" #include "world/level/levelgen/biome/BiomeSource.hpp"
#include "world/level/levelgen/chunk/ChunkSource.hpp"
#include "Level.hpp" #include "Level.hpp"
#include "ChunkSource.hpp"
class Level; // if included from Level.hpp class Level; // if included from Level.hpp

View file

@ -10,7 +10,7 @@
#include <set> #include <set>
#include "Level.hpp" #include "Level.hpp"
#include "Entity.hpp" #include "world/entity/Entity.hpp"
class Explosion class Explosion
{ {

View file

@ -6,9 +6,9 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#include "client/common/Util.hpp"
#include "world/level/levelgen/chunk/ChunkCache.hpp"
#include "Level.hpp" #include "Level.hpp"
#include "ChunkCache.hpp"
#include "Util.hpp"
#include "Explosion.hpp" #include "Explosion.hpp"
#include "Region.hpp" #include "Region.hpp"

View file

@ -7,8 +7,9 @@
********************************************************************/ ********************************************************************/
#pragma once #pragma once
#include <string> #include <string>
#include "TripodCamera.hpp" #include "world/entity/TripodCamera.hpp"
class LevelListener class LevelListener
{ {

View file

@ -7,7 +7,8 @@
********************************************************************/ ********************************************************************/
#pragma once #pragma once
#include "LongHack.hpp"
#include "client/common/LongHack.hpp"
struct TickNextTickData struct TickNextTickData
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "Biome.hpp" #include "Biome.hpp"
#include "Tile.hpp" #include "world/tile/Tile.hpp"
Biome Biome
* Biome::rainForest, * Biome::rainForest,

View file

@ -9,10 +9,9 @@
#pragma once #pragma once
#include <string> #include <string>
#include "client/common/PerlinNoise.hpp"
#include "Feature.hpp" #include "client/common/Utils.hpp"
#include "PerlinNoise.hpp" #include "world/level/levelgen/feature/Feature.hpp"
#include "Utils.hpp"
class Biome class Biome
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "BiomeSource.hpp" #include "BiomeSource.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
BiomeSource::BiomeSource() BiomeSource::BiomeSource()
{ {

View file

@ -8,7 +8,7 @@
#include "LevelChunk.hpp" #include "LevelChunk.hpp"
#include "ChunkCache.hpp" #include "ChunkCache.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
ChunkCache::ChunkCache(Level* pLevel, ChunkStorage* pStor, ChunkSource* pSrc) ChunkCache::ChunkCache(Level* pLevel, ChunkStorage* pStor, ChunkSource* pSrc)
{ {

View file

@ -10,7 +10,9 @@
#include <cstring> #include <cstring>
#include "ChunkSource.hpp" #include "ChunkSource.hpp"
#include "ChunkStorage.hpp" #include "world/level/storage/ChunkStorage.hpp"
#include "world/level/Level.hpp"
class Level; class Level;
class ChunkCache : public ChunkSource class ChunkCache : public ChunkSource

View file

@ -7,7 +7,6 @@
********************************************************************/ ********************************************************************/
#include "ChunkSource.hpp" #include "ChunkSource.hpp"
#include "Level.hpp"
ChunkSource::~ChunkSource() ChunkSource::~ChunkSource()
{ {

View file

@ -6,7 +6,7 @@
SPDX-License-Identifier: BSD-1-Clause SPDX-License-Identifier: BSD-1-Clause
********************************************************************/ ********************************************************************/
#include "Level.hpp" #include "world/level/Level.hpp"
bool LevelChunk::touchedSky = false; bool LevelChunk::touchedSky = false;

View file

@ -11,9 +11,9 @@
#include <cstring> #include <cstring>
#include <vector> #include <vector>
#include <algorithm> #include <algorithm>
#include "AABB.hpp" #include "client/common/AABB.hpp"
#include "Utils.hpp" #include "client/common/Utils.hpp"
#include "LightLayer.hpp" #include "client/renderer/LightLayer.hpp"
class Level; class Level;
class Entity; class Entity;

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "PerformanceTestChunkSource.hpp" #include "PerformanceTestChunkSource.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
LevelChunk* PerformanceTestChunkSource::create(int x, int z) LevelChunk* PerformanceTestChunkSource::create(int x, int z)
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "RandomLevelSource.hpp" #include "RandomLevelSource.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
#define TEST_CAVES #define TEST_CAVES

View file

@ -14,11 +14,11 @@
#include <unordered_map> #include <unordered_map>
#include "ChunkSource.hpp" #include "ChunkSource.hpp"
#include "PerlinNoise.hpp" #include "client/common/PerlinNoise.hpp"
#include "Utils.hpp" #include "client/common/Utils.hpp"
#include "BiomeSource.hpp" #include "world/level/levelgen/biome/BiomeSource.hpp"
#include "Feature.hpp" #include "world/level/levelgen/feature/Feature.hpp"
#include "LargeCaveFeature.hpp" #include "world/level/levelgen/feature/LargeCaveFeature.hpp"
class RandomLevelSource : public ChunkSource class RandomLevelSource : public ChunkSource
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "TestChunkSource.hpp" #include "TestChunkSource.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
TestChunkSource::TestChunkSource(Level* pLevel) TestChunkSource::TestChunkSource(Level* pLevel)
{ {

View file

@ -9,8 +9,9 @@
#pragma once #pragma once
#include <cstring> #include <cstring>
#include "Utils.hpp" #include "client/common/Utils.hpp"
#include "ChunkSource.hpp" #include "ChunkSource.hpp"
class Level; class Level;
class TestChunkSource : public ChunkSource class TestChunkSource : public ChunkSource

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "Feature.hpp" #include "Feature.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
bool BirchFeature::place(Level* level, Random* random, int x, int y, int z) bool BirchFeature::place(Level* level, Random* random, int x, int y, int z)
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "Feature.hpp" #include "Feature.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
ClayFeature::ClayFeature(int id, int count) ClayFeature::ClayFeature(int id, int count)
{ {

View file

@ -8,7 +8,7 @@
#pragma once #pragma once
#include "Random.hpp" #include "client/common/Random.hpp"
class Level; class Level;

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "Feature.hpp" #include "Feature.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
FlowerFeature::FlowerFeature(int id) FlowerFeature::FlowerFeature(int id)
{ {

View file

@ -117,7 +117,7 @@ void LargeCaveFeature::addTunnel(int x, int z, TileID* tiles, float rx, float ry
{ {
float v55 = rx - v65; float v55 = rx - v65;
float v54 = rz - v64; float v54 = rz - v64;
float v53 = (x4 - x3); float v53 = float(x4 - x3);
float v52 = (x1 + 2.0f) + 16.0f; float v52 = (x1 + 2.0f) + 16.0f;
if (((((rx - v65) * (rx - v65)) if (((((rx - v65) * (rx - v65))
+ ((rz - v64) * (rz - v64))) + ((rz - v64) * (rz - v64)))
@ -172,7 +172,7 @@ void LargeCaveFeature::addTunnel(int x, int z, TileID* tiles, float rx, float ry
{ {
for (int n = v48 - 1; n >= v49; --n) for (int n = v48 - 1; n >= v49; --n)
{ {
float v35 = ((float(n) + 0.5) - ry) / v58; float v35 = ((float(n) + 0.5f) - ry) / v58;
if (v35 > -0.7f if (v35 > -0.7f
&& v40 * v40 + v35 * v35 + v38 * v38 < 1.0f) && v40 * v40 + v35 * v35 + v38 * v38 < 1.0f)
{ {

View file

@ -1,8 +1,7 @@
#pragma once #pragma once
#include "LargeFeature.hpp" #include "client/common/Random.hpp"
#include "Random.hpp" #include "world/level/Level.hpp"
#include "Level.hpp"
class LargeFeature class LargeFeature
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "Feature.hpp" #include "Feature.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
OreFeature::OreFeature(int id, int count) OreFeature::OreFeature(int id, int count)
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "Feature.hpp" #include "Feature.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
bool PineFeature::place(Level* level, Random* random, int x, int y, int z) bool PineFeature::place(Level* level, Random* random, int x, int y, int z)
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "Feature.hpp" #include "Feature.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
bool ReedsFeature::place(Level* level, Random* random, int x, int y, int z) bool ReedsFeature::place(Level* level, Random* random, int x, int y, int z)
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "Feature.hpp" #include "Feature.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
SpringFeature::SpringFeature(int id) SpringFeature::SpringFeature(int id)
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "Feature.hpp" #include "Feature.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
bool SpruceFeature::place(Level* level, Random* random, int x, int y, int z) bool SpruceFeature::place(Level* level, Random* random, int x, int y, int z)
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "Feature.hpp" #include "Feature.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
bool TreeFeature::place(Level* level, Random* random, int x, int y, int z) bool TreeFeature::place(Level* level, Random* random, int x, int y, int z)
{ {

View file

@ -7,7 +7,7 @@
********************************************************************/ ********************************************************************/
#include "ExternalFileLevelStorage.hpp" #include "ExternalFileLevelStorage.hpp"
#include "Level.hpp" #include "world/level/Level.hpp"
#include "GetTime.h" #include "GetTime.h"
#ifndef DEMO #ifndef DEMO

View file

@ -8,7 +8,7 @@
#include "ExternalFileLevelStorageSource.hpp" #include "ExternalFileLevelStorageSource.hpp"
#include "ExternalFileLevelStorage.hpp" #include "ExternalFileLevelStorage.hpp"
#include "Util.hpp" #include "client/common/Util.hpp"
#ifndef DEMO #ifndef DEMO

View file

@ -9,11 +9,10 @@
#pragma once #pragma once
#include <string> #include <string>
#include "Utils.hpp"
#include "Vec3.hpp"
#include "Inventory.hpp"
#include "BitStream.h" #include "BitStream.h"
#include "client/common/Utils.hpp"
#include "client/common/Vec3.hpp"
#include "world/item/Inventory.hpp"
struct PlayerData struct PlayerData
{ {

Some files were not shown because too many files have changed in this diff Show more