2 Commits

Author SHA1 Message Date
Kolyah35
7418263193 .h -> .hpp everything 2026-03-28 01:08:50 +03:00
Kolyah35
7d3257669a pragma once everywhere 2026-03-28 00:00:19 +03:00
909 changed files with 89569 additions and 90714 deletions

View File

@@ -1,8 +1,8 @@
#include "App.h" #include "App.hpp"
#include "IPlatform.h" #include "IPlatform.hpp"
#include "platform/server/PlatformServer.h" #include "platform/server/PlatformServer.hpp"
#include "platform/glfw/PlatformGlfw.h" #include "platform/glfw/PlatformGlfw.hpp"
std::unique_ptr<IPlatform> App::CreatePlatform() { std::unique_ptr<IPlatform> App::CreatePlatform() {
#if defined(STANDALONE_SERVER) #if defined(STANDALONE_SERVER)

View File

@@ -8,7 +8,7 @@
#define NO_EGL #define NO_EGL
#endif #endif
#include <IPlatform.h> #include <IPlatform.hpp>
#ifndef NO_EGL #ifndef NO_EGL
#include <EGL/egl.h> #include <EGL/egl.h>
#endif #endif

View File

@@ -1,5 +1,4 @@
#ifndef EGLCONFIGPRINTER_H__ #pragma once
#define EGLCONFIGPRINTER_H__
#include <cstdio> #include <cstdio>
#include <string> #include <string>
@@ -122,4 +121,3 @@ public:
} }
}; };
#endif /*EGLCONFIGPRINTER_H__*/

View File

@@ -1,5 +1,5 @@
#include <IPlatform.h> #include <IPlatform.hpp>
#include <App.h> #include <App.hpp>
#include <fstream> #include <fstream>
void IPlatform::runMainLoop(App& app) { void IPlatform::runMainLoop(App& app) {

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include <vector> #include <vector>
#include <string> #include <string>
#include "client/renderer/TextureData.h" #include "client/renderer/TextureData.hpp"
#include <cstdint> #include <cstdint>
typedef std::vector<std::string> StringVector; typedef std::vector<std::string> StringVector;

View File

@@ -1,5 +1,4 @@
#ifndef LICENSECODES_H__ #pragma once
#define LICENSECODES_H__
class LicenseCodes class LicenseCodes
{ {

View File

@@ -1,17 +1,17 @@
#include <Minecraft.h> #include <Minecraft.hpp>
#include "gamemode/CreativeMode.h" #include "gamemode/CreativeMode.hpp"
#include "gamemode/SurvivalMode.h" #include "gamemode/SurvivalMode.hpp"
#include "gamemode/CreatorMode.h" #include "gamemode/CreatorMode.hpp"
#include "world/entity/player/Player.h" #include "world/entity/player/Player.hpp"
#include "world/item/Item.h" #include "world/item/Item.hpp"
#include "world/item/ItemInstance.h" #include "world/item/ItemInstance.hpp"
#include "world/item/crafting/Recipes.h" #include "world/item/crafting/Recipes.hpp"
#include "world/level/Level.h" #include "world/level/Level.hpp"
#include "world/level/tile/entity/TileEntity.h" #include "world/level/tile/entity/TileEntity.hpp"
#include <string> #include <string>
#include <cstdlib> #include <cstdlib>
#include "client/gui/Screen.h" #include "client/gui/Screen.hpp"
#include "world/level/storage/ExternalFileLevelStorageSource.h" #include "world/level/storage/ExternalFileLevelStorageSource.hpp"
#if defined(APPLE_DEMO_PROMOTION) #if defined(APPLE_DEMO_PROMOTION)
#define NO_NETWORK #define NO_NETWORK
@@ -20,32 +20,32 @@
#if defined(RPI) #if defined(RPI)
#define CREATORMODE #define CREATORMODE
#endif #endif
#include "network/RakNetInstance.h" #include "network/RakNetInstance.hpp"
#include "network/ClientSideNetworkHandler.h" #include "network/ClientSideNetworkHandler.hpp"
#include "network/ServerSideNetworkHandler.h" #include "network/ServerSideNetworkHandler.hpp"
//#include "network/Packet.h" //#include "network/Packet.hpp"
#include "world/entity/player/Inventory.h" #include "world/entity/player/Inventory.hpp"
#include "world/level/tile/Tile.h" #include "world/level/tile/Tile.hpp"
#include "world/level/storage/LevelStorageSource.h" #include "world/level/storage/LevelStorageSource.hpp"
#include "world/level/storage/LevelStorage.h" #include "world/level/storage/LevelStorage.hpp"
#include "world/level/chunk/ChunkSource.h" #include "world/level/chunk/ChunkSource.hpp"
#include "platform/CThread.h" #include "platform/CThread.hpp"
#include <IPlatform.h> #include <IPlatform.hpp>
#include "util/PerfTimer.h" #include "util/PerfTimer.hpp"
#include "util/PerfRenderer.h" #include "util/PerfRenderer.hpp"
#include "world/entity/MobFactory.h" #include "world/entity/MobFactory.hpp"
#include "world/level/MobSpawner.h" #include "world/level/MobSpawner.hpp"
#include "util/Mth.h" #include "util/Mth.hpp"
#include "world/entity/MobCategory.h" #include "world/entity/MobCategory.hpp"
#include "server/ServerLevel.h" #include "server/ServerLevel.hpp"
#ifdef CREATORMODE #ifdef CREATORMODE
#include "server/CreatorLevel.h" #include "server/CreatorLevel.hpp"
#endif #endif
#include "network/command/CommandServer.h" #include "network/command/CommandServer.hpp"
/*static*/ /*static*/
const char* Minecraft::progressMessages[] = { const char* Minecraft::progressMessages[] = {

View File

@@ -1,13 +1,12 @@
#ifndef NET_MINECRAFT_CLIENT__Minecraft_H__ #pragma once
#define NET_MINECRAFT_CLIENT__Minecraft_H__
#include "client/Options.h" #include "client/Options.hpp"
#include "client/Timer.h" #include "client/Timer.hpp"
//#include "../network/RakNetInstance.h" //#include "../network/RakNetInstance.hpp"
#include "world/phys/HitResult.h" #include "world/phys/HitResult.hpp"
#include "App.h" #include "App.hpp"
#include <cstddef> #include <cstddef>
class Level; class Level;
@@ -137,4 +136,3 @@ protected:
static bool _hasInitedStatics; static bool _hasInitedStatics;
}; };
#endif /*NET_MINECRAFT_CLIENT__Minecraft_H__*/

View File

@@ -1,36 +1,36 @@
#include "Minecraft.h" #include "Minecraft.hpp"
#include "client/Options.h" #include "client/Options.hpp"
#include "client/gamemode/GameMode.h" #include "client/gamemode/GameMode.hpp"
#include "client/gui/screens/ChatScreen.h" #include "client/gui/screens/ChatScreen.hpp"
#include "client/gui/screens/ConsoleScreen.h" #include "client/gui/screens/ConsoleScreen.hpp"
#include "client/gui/screens/DeathScreen.h" #include "client/gui/screens/DeathScreen.hpp"
#include "client/gui/screens/UsernameScreen.h" #include "client/gui/screens/UsernameScreen.hpp"
#include "client/player/LocalPlayer.h" #include "client/player/LocalPlayer.hpp"
#include "client/player/input/IBuildInput.h" #include "client/player/input/IBuildInput.hpp"
#include "client/player/input/IInputHolder.h" #include "client/player/input/IInputHolder.hpp"
#include "client/player/input/KeyboardInput.h" #include "client/player/input/KeyboardInput.hpp"
#include "client/player/input/MouseBuildInput.h" #include "client/player/input/MouseBuildInput.hpp"
#include "client/player/input/MouseTurnInput.h" #include "client/player/input/MouseTurnInput.hpp"
#include "client/player/input/touchscreen/TouchscreenInput.h" #include "client/player/input/touchscreen/TouchscreenInput.hpp"
#include "client/player/input/touchscreen/TouchInputHolder.h" #include "client/player/input/touchscreen/TouchInputHolder.hpp"
#include "client/renderer/Chunk.h" #include "client/renderer/Chunk.hpp"
#include "client/renderer/EntityTileRenderer.h" #include "client/renderer/EntityTileRenderer.hpp"
#include "client/renderer/ItemInHandRenderer.h" #include "client/renderer/ItemInHandRenderer.hpp"
#include "client/renderer/Tesselator.h" #include "client/renderer/Tesselator.hpp"
#include "client/renderer/entity/EntityRenderDispatcher.h" #include "client/renderer/entity/EntityRenderDispatcher.hpp"
#include "client/renderer/entity/ItemRenderer.h" #include "client/renderer/entity/ItemRenderer.hpp"
#include "client/renderer/ptexture/DynamicTexture.h" #include "client/renderer/ptexture/DynamicTexture.hpp"
#include "network/RakNetInstance.h" #include "network/RakNetInstance.hpp"
#include "network/ServerSideNetworkHandler.h" #include "network/ServerSideNetworkHandler.hpp"
#include "network/packet/InteractPacket.h" #include "network/packet/InteractPacket.hpp"
#include "network/packet/RespawnPacket.h" #include "network/packet/RespawnPacket.hpp"
#include "platform/CThread.h" #include "platform/CThread.hpp"
#include "platform/input/Multitouch.h" #include "platform/input/Multitouch.hpp"
#include "util/PerfRenderer.h" #include "util/PerfRenderer.hpp"
#include "util/PerfTimer.h" #include "util/PerfTimer.hpp"
#include "world/level/Level.h" #include "world/level/Level.hpp"
#include "world/level/chunk/ChunkSource.h" #include "world/level/chunk/ChunkSource.hpp"
#include <MinecraftClient.h> #include <MinecraftClient.hpp>
static void checkGlError(const char* tag) { static void checkGlError(const char* tag) {
#ifdef GLDEBUG #ifdef GLDEBUG

View File

@@ -1,18 +1,18 @@
#pragma once #pragma once
#include "client/gui/Font.h" #include "client/gui/Font.hpp"
#include "client/gui/Screen.h" #include "client/gui/Screen.hpp"
#include "client/particle/ParticleEngine.h" #include "client/particle/ParticleEngine.hpp"
#include "client/player/LocalPlayer.h" #include "client/player/LocalPlayer.hpp"
#include "client/renderer/GameRenderer.h" #include "client/renderer/GameRenderer.hpp"
#include "client/renderer/Textures.h" #include "client/renderer/Textures.hpp"
#include "client/sound/SoundEngine.h" #include "client/sound/SoundEngine.hpp"
#include <Minecraft.h> #include <Minecraft.hpp>
#include <client/MouseHandler.h> #include <client/MouseHandler.hpp>
#include <client/gui/Gui.h> #include <client/gui/Gui.hpp>
#include <client/gui/screens/ScreenChooser.h> #include <client/gui/screens/ScreenChooser.hpp>
#include <client/PixelCalc.h> #include <client/PixelCalc.hpp>
#include <client/renderer/LevelRenderer.h> #include <client/renderer/LevelRenderer.hpp>
class MinecraftClient : public Minecraft { class MinecraftClient : public Minecraft {
public: public:

View File

@@ -1,6 +1,6 @@
#include "MinecraftServer.h" #include "MinecraftServer.hpp"
#include <Minecraft.h> #include <Minecraft.hpp>
#include <network/RakNetInstance.h> #include <network/RakNetInstance.hpp>
void MinecraftServer::hostMultiplayer(int port) { void MinecraftServer::hostMultiplayer(int port) {

View File

@@ -1,5 +1,5 @@
#pragma once #pragma once
#include <Minecraft.h> #include <Minecraft.hpp>
class MinecraftServer : public Minecraft { class MinecraftServer : public Minecraft {
public: public:

View File

@@ -1,4 +1,4 @@
#include "Performance.h" #include "Performance.hpp"
/*static*/ /*static*/
StopwatchHandler Performance::watches; StopwatchHandler Performance::watches;

View File

@@ -1,12 +0,0 @@
#ifndef PERFORMANCE_H__
#define PERFORMANCE_H__
#include "platform/time.h"
class Performance
{
public:
static StopwatchHandler watches;
};
#endif /*PERFORMANCE_H__*/

10
src/Performance.hpp Executable file
View File

@@ -0,0 +1,10 @@
#pragma once
#include "platform/time.hpp"
class Performance
{
public:
static StopwatchHandler watches;
};

View File

@@ -1,4 +1,4 @@
#include "SharedConstants.h" #include "SharedConstants.hpp"
namespace Common { namespace Common {

View File

@@ -1,5 +1,4 @@
#ifndef NET_MINECRAFT_SharedConstants_H__ #pragma once
#define NET_MINECRAFT_SharedConstants_H__
#include <string> #include <string>
@@ -31,4 +30,3 @@ namespace SharedConstants
//int FULLBRIGHT_LIGHTVALUE = 15 << 20 | 15 << 4; //int FULLBRIGHT_LIGHTVALUE = 15 << 20 | 15 << 4;
} }
#endif /*NET_MINECRAFT_SharedConstants_H__*/

View File

@@ -1,7 +1,7 @@
#include "IConfigListener.h" #include "IConfigListener.hpp"
#include "Minecraft.h" #include "Minecraft.hpp"
#ifndef STANDALONE_SERVER #ifndef STANDALONE_SERVER
#include "gui/Gui.h" #include "gui/Gui.hpp"
#endif /* STANDALONE_SERVER */ #endif /* STANDALONE_SERVER */
Config createConfig(Minecraft* mc) { Config createConfig(Minecraft* mc) {
Config c; Config c;

View File

@@ -1,7 +1,6 @@
#ifndef CONFIGLISTENER_H__ #pragma once
#define CONFIGLISTENER_H__
#include "PixelCalc.h" #include "PixelCalc.hpp"
class Minecraft; class Minecraft;
class Options; class Options;
@@ -45,4 +44,3 @@ public:
virtual void onConfigChanged(const Config& config) = 0; virtual void onConfigChanged(const Config& config) = 0;
}; };
#endif /*CONFIGLISTENER_H__*/

View File

@@ -1,5 +1,5 @@
#include "MouseHandler.h" #include "MouseHandler.hpp"
#include "player/input/ITurnInput.h" #include "player/input/ITurnInput.hpp"
#ifdef RPI #ifdef RPI
#include <SDL/SDL.h> #include <SDL/SDL.h>

View File

@@ -1,5 +1,4 @@
#ifndef NET_MINECRAFT_CLIENT__MouseHandler_H__ #pragma once
#define NET_MINECRAFT_CLIENT__MouseHandler_H__
//package net.minecraft.client; //package net.minecraft.client;
@@ -25,4 +24,3 @@ private:
ITurnInput* _turnInput; ITurnInput* _turnInput;
}; };
#endif /*NET_MINECRAFT_CLIENT__MouseHandler_H__*/

View File

@@ -1,4 +1,4 @@
#include "Option.h" #include "Option.hpp"
#include <sstream> #include <sstream>
#include <cstdio> #include <cstdio>

View File

@@ -1,7 +1,7 @@
#pragma once #pragma once
#include <sstream> #include <sstream>
#include <type_traits> #include <type_traits>
#include <util/Mth.h> #include <util/Mth.hpp>
/* /*
template<typename T> template<typename T>
struct is_option_type : std::false_type {}; struct is_option_type : std::false_type {};

View File

@@ -1,4 +1,4 @@
#include "OptionStrings.h" #include "OptionStrings.hpp"
const char* OptionStrings::Multiplayer_Username = "mp_username"; const char* OptionStrings::Multiplayer_Username = "mp_username";
const char* OptionStrings::Multiplayer_ServerVisible = "mp_server_visible_default"; const char* OptionStrings::Multiplayer_ServerVisible = "mp_server_visible_default";

View File

@@ -1,5 +1,4 @@
#ifndef NET_MINECRAFT_CLIENT__OptionStrings_H__ #pragma once
#define NET_MINECRAFT_CLIENT__OptionStrings_H__
class OptionStrings { class OptionStrings {
public: public:
@@ -33,4 +32,3 @@ public:
}; };
#endif /*NET_MINECRAFT_CLIENT__OptionsStrings_H__*/

View File

@@ -1,6 +1,6 @@
#include "Options.h" #include "Options.hpp"
#include "../world/Difficulty.h" #include "world/Difficulty.hpp"
#include <MinecraftClient.h> #include <MinecraftClient.hpp>
bool Options::debugGl = false; bool Options::debugGl = false;

View File

@@ -1,5 +1,4 @@
#ifndef NET_MINECRAFT_CLIENT__Options_H__ #pragma once
#define NET_MINECRAFT_CLIENT__Options_H__
#define SOUND_MIN_VALUE 0.0f #define SOUND_MIN_VALUE 0.0f
#define SOUND_MAX_VALUE 1.0f #define SOUND_MAX_VALUE 1.0f
@@ -12,13 +11,13 @@
//package net.minecraft.client; //package net.minecraft.client;
//#include "locale/Language.h" //#include "locale/Language.hpp"
#include <string> #include <string>
#include <platform/input/Keyboard.h> #include <platform/input/Keyboard.hpp>
#include <util/StringUtils.h> #include <util/StringUtils.hpp>
#include "OptionsFile.h" #include "OptionsFile.hpp"
#include "Option.h" #include "Option.hpp"
#include <array> #include <array>
enum OptionId { enum OptionId {
@@ -163,4 +162,3 @@ private:
MinecraftClient& minecraft; MinecraftClient& minecraft;
}; };
#endif /*NET_MINECRAFT_CLIENT__Options_H__*/

View File

@@ -1,8 +1,8 @@
#include "OptionsFile.h" #include "OptionsFile.hpp"
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <errno.h> #include <errno.h>
#include <platform/log.h> #include <platform/log.hpp>
#if defined(_WIN32) #if defined(_WIN32)
#include <direct.h> #include <direct.h>

View File

@@ -1,5 +1,4 @@
#ifndef NET_MINECRAFT_CLIENT__OptionsFile_H__ #pragma once
#define NET_MINECRAFT_CLIENT__OptionsFile_H__
//package net.minecraft.client; //package net.minecraft.client;
#include <string> #include <string>
@@ -18,4 +17,3 @@ private:
std::string settingsPath; std::string settingsPath;
}; };
#endif /* NET_MINECRAFT_CLIENT__OptionsFile_H__ */

View File

@@ -1,8 +1,7 @@
#ifndef NET_MINECRAFT_CLIENT__Timer_H__ #pragma once
#define NET_MINECRAFT_CLIENT__Timer_H__
//package net.minecraft.client; //package net.minecraft.client;
#include "../platform/time.h" #include "platform/time.hpp"
class Timer class Timer
{ {
@@ -121,4 +120,3 @@ private:
float adjustTime; float adjustTime;
}; };
#endif /*NET_MINECRAFT_CLIENT__Timer_H__*/

View File

@@ -1,10 +1,10 @@
#include "Font.h" #include "Font.hpp"
//#include "SharedConstants.h" //#include "SharedConstants.hpp"
#include "../Options.h" #include "client/Options.hpp"
#include "../renderer/Textures.h" #include "client/renderer/Textures.hpp"
#include "../renderer/Tesselator.h" #include "client/renderer/Tesselator.hpp"
#include "../../util/Mth.h" #include "util/Mth.hpp"
#include <cstring> #include <cstring>
Font::Font( Options* options, const std::string& name, Textures* textures ) Font::Font( Options* options, const std::string& name, Textures* textures )

View File

@@ -1,12 +1,11 @@
#ifndef NET_MINECRAFT_CLIENT_GUI__Font_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI__Font_H__
//package net.minecraft.client.gui; //package net.minecraft.client.gui;
#include <string> #include <string>
#include <cctype> #include <cctype>
#include "../renderer/gles.h" #include "client/renderer/gles.hpp"
class Textures; class Textures;
class Options; class Options;
@@ -60,4 +59,3 @@ private:
unsigned char _charOffset; unsigned char _charOffset;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI__Font_H__*/

View File

@@ -1,31 +1,31 @@
#include "Gui.h" #include "Gui.hpp"
#include "Font.h" #include "Font.hpp"
#include "MinecraftClient.h" #include "MinecraftClient.hpp"
#include "client/Options.h" #include "client/Options.hpp"
#include "platform/input/Keyboard.h" #include "platform/input/Keyboard.hpp"
#include "screens/IngameBlockSelectionScreen.h" #include "screens/IngameBlockSelectionScreen.hpp"
#include "screens/ChatScreen.h" #include "screens/ChatScreen.hpp"
#include "screens/ConsoleScreen.h" #include "screens/ConsoleScreen.hpp"
#include <Minecraft.h> #include <Minecraft.hpp>
#include "../player/LocalPlayer.h" #include "client/player/LocalPlayer.hpp"
#include "../renderer/Tesselator.h" #include "client/renderer/Tesselator.hpp"
#include "../renderer/TileRenderer.h" #include "client/renderer/TileRenderer.hpp"
#include "../renderer/LevelRenderer.h" #include "client/renderer/LevelRenderer.hpp"
#include "../renderer/GameRenderer.h" #include "client/renderer/GameRenderer.hpp"
#include "../renderer/entity/ItemRenderer.h" #include "client/renderer/entity/ItemRenderer.hpp"
#include "../player/input/IInputHolder.h" #include "client/player/input/IInputHolder.hpp"
#include "../gamemode/GameMode.h" #include "client/gamemode/GameMode.hpp"
#include "../gamemode/CreativeMode.h" #include "client/gamemode/CreativeMode.hpp"
#include "../renderer/Textures.h" #include "client/renderer/Textures.hpp"
#include "../../AppConstants.h" #include "AppConstants.hpp"
#include "../../world/entity/player/Inventory.h" #include "world/entity/player/Inventory.hpp"
#include "../../world/level/material/Material.h" #include "world/level/material/Material.hpp"
#include "../../world/item/Item.h" #include "world/item/Item.hpp"
#include "../../world/item/ItemInstance.h" #include "world/item/ItemInstance.hpp"
#include "../../platform/input/Mouse.h" #include "platform/input/Mouse.hpp"
#include "../../world/level/Level.h" #include "world/level/Level.hpp"
#include "../../world/PosTranslator.h" #include "world/PosTranslator.hpp"
#include "../../platform/time.h" #include "platform/time.hpp"
#include <cmath> #include <cmath>
#include <algorithm> #include <algorithm>
#include <sstream> #include <sstream>

View File

@@ -1,14 +1,13 @@
#ifndef NET_MINECRAFT_CLIENT_GUI__Gui_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI__Gui_H__
//package net.minecraft.client.gui; //package net.minecraft.client.gui;
#include "GuiComponent.h" #include "GuiComponent.hpp"
#include "Font.h" #include "Font.hpp"
#include "../player/input/touchscreen/TouchAreaModel.h" #include "client/player/input/touchscreen/TouchAreaModel.hpp"
#include "../renderer/RenderChunk.h" #include "client/renderer/RenderChunk.hpp"
#include "../../util/Random.h" #include "util/Random.hpp"
#include "../IConfigListener.h" #include "client/IConfigListener.hpp"
class MinecraftClient; class MinecraftClient;
class ItemInstance; class ItemInstance;
@@ -130,4 +129,3 @@ private:
bool _openInventorySlot; bool _openInventorySlot;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI__Gui_H__*/

View File

@@ -1,8 +1,8 @@
#include "GuiComponent.h" #include "GuiComponent.hpp"
#include "../renderer/Tesselator.h" #include "client/renderer/Tesselator.hpp"
#include "../renderer/gles.h" #include "client/renderer/gles.hpp"
#include "Font.h" #include "Font.hpp"
GuiComponent::GuiComponent() GuiComponent::GuiComponent()

View File

@@ -1,5 +1,4 @@
#ifndef NET_MINECRAFT_CLIENT_GUI__GuiComponent_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI__GuiComponent_H__
//package net.minecraft.client.gui; //package net.minecraft.client.gui;
@@ -31,4 +30,3 @@ protected:
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI__GuiComponent_H__*/

View File

@@ -1,12 +1,12 @@
#include "Screen.h" #include "Screen.hpp"
#include "components/Button.h" #include "components/Button.hpp"
#include "components/TextBox.h" #include "components/TextBox.hpp"
#include <Minecraft.h> #include <Minecraft.hpp>
#include "../renderer/Tesselator.h" #include "client/renderer/Tesselator.hpp"
#include "../sound/SoundEngine.h" #include "client/sound/SoundEngine.hpp"
#include "../../platform/input/Keyboard.h" #include "platform/input/Keyboard.hpp"
#include "../../platform/input/Mouse.h" #include "platform/input/Mouse.hpp"
#include "../renderer/Textures.h" #include "client/renderer/Textures.hpp"
Screen::Screen() Screen::Screen()
: passEvents(false), : passEvents(false),

View File

@@ -1,10 +1,9 @@
#ifndef NET_MINECRAFT_CLIENT_GUI__Screen_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI__Screen_H__
//package net.minecraft.client.gui; //package net.minecraft.client.gui;
#include <vector> #include <vector>
#include "GuiComponent.h" #include "GuiComponent.hpp"
class Font; class Font;
class Minecraft; class Minecraft;
@@ -80,4 +79,3 @@ private:
Button* clickedButton; Button* clickedButton;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI__Screen_H__*/

View File

@@ -1,11 +0,0 @@
#ifndef NET_MINECRAFT_CLIENT_GUI__TweenData_H__
#define NET_MINECRAFT_CLIENT_GUI__TweenData_H__
typedef struct TweenData {
float cur;
float dur;
float start;
float stop;
} TweenData;
#endif /*NET_MINECRAFT_CLIENT_GUI__TweenData_H__*/

9
src/client/gui/TweenData.hpp Executable file
View File

@@ -0,0 +1,9 @@
#pragma once
typedef struct TweenData {
float cur;
float dur;
float start;
float stop;
} TweenData;

View File

@@ -1,6 +1,6 @@
#include "Button.h" #include "Button.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include "../../renderer/Textures.h" #include "client/renderer/Textures.hpp"
Button::Button(int id, const std::string& msg) Button::Button(int id, const std::string& msg)
: GuiElement(true, true, 0, 0, 200, 24), : GuiElement(true, true, 0, 0, 200, 24),

View File

@@ -1,11 +1,10 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_COMPONENTS__Button_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_COMPONENTS__Button_H__
//package net.minecraft.client.gui; //package net.minecraft.client.gui;
#include <string> #include <string>
#include "GuiElement.h" #include "GuiElement.hpp"
#include "../../Options.h" #include "client/Options.hpp"
class Font; class Font;
class Minecraft; class Minecraft;
@@ -77,4 +76,3 @@ public:
}; };
} }
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__Button_H__*/

View File

@@ -1 +1 @@
#include "GuiElement.h" #include "GuiElement.hpp"

View File

@@ -1,6 +1,5 @@
#ifndef NET_MINECRAFT_CLIENT_GUI__GButton_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI__GButton_H__ #include "Button.hpp"
#include "Button.h"
class GButton: public Button { class GButton: public Button {
typedef Button super; typedef Button super;
@@ -52,4 +51,3 @@ private:
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI__GButton_H__*/

View File

@@ -1,4 +1,4 @@
#include "GuiElement.h" #include "GuiElement.hpp"
GuiElement::GuiElement( bool active/*=false*/, bool visible/*=true*/, int x /*= 0*/, int y /*= 0*/, int width/*=24*/, int height/*=24*/ ) GuiElement::GuiElement( bool active/*=false*/, bool visible/*=true*/, int x /*= 0*/, int y /*= 0*/, int width/*=24*/, int height/*=24*/ )
: active(active), : active(active),

View File

@@ -1,6 +1,5 @@
#ifndef NET_MINECRAFT_CLIENT_GUI__GuiElement_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI__GuiElement_H__ #include "client/gui/GuiComponent.hpp"
#include "../GuiComponent.h"
class Tesselator; class Tesselator;
class Minecraft; class Minecraft;
@@ -31,4 +30,3 @@ public:
int height; int height;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI__GuiElement_H__*/

View File

@@ -1,4 +1,4 @@
#include "GuiElementContainer.h" #include "GuiElementContainer.hpp"
#include <algorithm> #include <algorithm>
GuiElementContainer::GuiElementContainer( bool active/*=false*/, bool visible/*=true*/, int x /*= 0*/, int y /*= 0*/, int width/*=24*/, int height/*=24*/ ) GuiElementContainer::GuiElementContainer( bool active/*=false*/, bool visible/*=true*/, int x /*= 0*/, int y /*= 0*/, int width/*=24*/, int height/*=24*/ )
: GuiElement(active, visible, x, y, width, height) { : GuiElement(active, visible, x, y, width, height) {

View File

@@ -1,6 +1,5 @@
#ifndef NET_MINECRAFT_CLIENT_GUI__GuiElementContainer_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI__GuiElementContainer_H__ #include "GuiElement.hpp"
#include "GuiElement.h"
#include <vector> #include <vector>
class Tesselator; class Tesselator;
class Minecraft; class Minecraft;
@@ -25,4 +24,3 @@ protected:
std::vector<GuiElement*> children; std::vector<GuiElement*> children;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI__GuiElementContainer_H__*/

View File

@@ -1,10 +1,10 @@
#include "ImageButton.h" #include "ImageButton.hpp"
#include "../../renderer/Tesselator.h" #include "client/renderer/Tesselator.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include "../../../platform/log.h" #include "platform/log.hpp"
#include "../../../util/Mth.h" #include "util/Mth.hpp"
#include "../../renderer/Textures.h" #include "client/renderer/Textures.hpp"
#include <client/Option.h> #include <client/Option.hpp>
ImageButton::ImageButton(int id, const std::string& msg) ImageButton::ImageButton(int id, const std::string& msg)

View File

@@ -1,7 +1,6 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_COMPONENTS__ImageButton_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_COMPONENTS__ImageButton_H__
#include "Button.h" #include "Button.hpp"
typedef struct IntRectangle { typedef struct IntRectangle {
IntRectangle() IntRectangle()
@@ -94,4 +93,3 @@ private:
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__ImageButton_H__*/

View File

@@ -1,12 +1,12 @@
#include "InventoryPane.h" #include "InventoryPane.hpp"
#include "../Gui.h" #include "client/gui/Gui.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include "../../player/input/touchscreen/TouchAreaModel.h" #include "client/player/input/touchscreen/TouchAreaModel.hpp"
#include "../../renderer/entity/ItemRenderer.h" #include "client/renderer/entity/ItemRenderer.hpp"
#include "../../renderer/Tesselator.h" #include "client/renderer/Tesselator.hpp"
#include "../../renderer/Textures.h" #include "client/renderer/Textures.hpp"
#include "../../../world/item/ItemInstance.h" #include "world/item/ItemInstance.hpp"
#include "../../../world/entity/player/Inventory.h" #include "world/entity/player/Inventory.hpp"
namespace Touch { namespace Touch {

View File

@@ -1,8 +1,7 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_COMPONENTS__InventoryPane_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_COMPONENTS__InventoryPane_H__
#include "ScrollingPane.h" #include "ScrollingPane.hpp"
#include "ImageButton.h" #include "ImageButton.hpp"
class Minecraft; class Minecraft;
class ItemInstance; class ItemInstance;
@@ -59,4 +58,3 @@ public:
} }
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__InventoryPane_H__*/

View File

@@ -1,9 +1,9 @@
#include "ItemPane.h" #include "ItemPane.hpp"
#include "../Gui.h" #include "client/gui/Gui.hpp"
#include "../../renderer/gles.h" #include "client/renderer/gles.hpp"
#include "../../renderer/Tesselator.h" #include "client/renderer/Tesselator.hpp"
#include "NinePatch.h" #include "NinePatch.hpp"
#include "../../renderer/entity/ItemRenderer.h" #include "client/renderer/entity/ItemRenderer.hpp"
const int rgbActive = 0xfff0f0f0; const int rgbActive = 0xfff0f0f0;
const int rgbInactive = 0xc0635558; const int rgbInactive = 0xc0635558;

View File

@@ -1,10 +1,9 @@
#ifndef ITEMPANE_H__ #pragma once
#define ITEMPANE_H__
#include <string> #include <string>
#include <vector> #include <vector>
#include "ScrollingPane.h" #include "ScrollingPane.hpp"
#include "../../../world/item/ItemInstance.h" #include "world/item/ItemInstance.hpp"
class Font; class Font;
class Textures; class Textures;
@@ -92,4 +91,3 @@ public:
NinePatchLayer* guiSlotItemSelected; NinePatchLayer* guiSlotItemSelected;
}; };
#endif /*ITEMPANE_H__*/

View File

@@ -1,5 +1,5 @@
#include "KeyOption.h" #include "KeyOption.hpp"
#include <client/Minecraft.h> #include <client/Minecraft.hpp>
KeyOption::KeyOption(Minecraft* minecraft, OptionId optId) KeyOption::KeyOption(Minecraft* minecraft, OptionId optId)
: Touch::TButton((int)optId, Keyboard::getKeyName(minecraft->options.getIntValue(optId))) {} : Touch::TButton((int)optId, Keyboard::getKeyName(minecraft->options.getIntValue(optId))) {}

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "Button.h" #include "Button.hpp"
#include <client/Options.h> #include <client/Options.hpp>
class KeyOption : public Touch::TButton { class KeyOption : public Touch::TButton {
public: public:

View File

@@ -1,10 +1,10 @@
#include "LargeImageButton.h" #include "LargeImageButton.hpp"
#include "../../renderer/Tesselator.h" #include "client/renderer/Tesselator.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include "../../../util/Mth.h" #include "util/Mth.hpp"
#include "../../../platform/log.h" #include "platform/log.hpp"
#include "../../../util/Mth.h" #include "util/Mth.hpp"
#include "../../renderer/Textures.h" #include "client/renderer/Textures.hpp"
LargeImageButton::LargeImageButton(int id, const std::string& msg) LargeImageButton::LargeImageButton(int id, const std::string& msg)

View File

@@ -1,7 +1,6 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_COMPONENTS__LargeImageButton_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_COMPONENTS__LargeImageButton_H__
#include "ImageButton.h" #include "ImageButton.hpp"
class LargeImageButton: public ImageButton class LargeImageButton: public ImageButton
{ {
@@ -18,4 +17,3 @@ private:
float _buttonScale; float _buttonScale;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__LargeImageButton_H__*/

View File

@@ -1,4 +1,4 @@
#include "NinePatch.h" #include "NinePatch.hpp"
NinePatchDescription::NinePatchDescription( float x, float y, float x1, float x2, float x3, float y1, float y2, float y3, float w, float e, float n, float s ) : u0(x), u1(x + x1), u2(x + x2), u3(x + x3), NinePatchDescription::NinePatchDescription( float x, float y, float x1, float x2, float x3, float y1, float y2, float y3, float w, float e, float n, float s ) : u0(x), u1(x + x1), u2(x + x2), u3(x + x3),
v0(y), v1(y + y1), v2(y + y2), v3(y + y3), v0(y), v1(y + y1), v2(y + y2), v3(y + y3),

View File

@@ -1,11 +1,10 @@
#ifndef NET_MINECRAFT_CLIENT_GUI__NinePatch_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI__NinePatch_H__
#include "ImageButton.h" #include "ImageButton.hpp"
#include "../../renderer/TextureData.h" #include "client/renderer/TextureData.hpp"
#include "../../renderer/Textures.h" #include "client/renderer/Textures.hpp"
#include "../../renderer/Tesselator.h" #include "client/renderer/Tesselator.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
class Tesselator; class Tesselator;
@@ -75,4 +74,3 @@ private:
int height; int height;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI__NinePatch_H__*/

View File

@@ -1,11 +1,11 @@
#include "OptionsGroup.h" #include "OptionsGroup.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include "ImageButton.h" #include "ImageButton.hpp"
#include "OptionsItem.h" #include "OptionsItem.hpp"
#include "Slider.h" #include "Slider.hpp"
#include "../../../locale/I18n.h" #include "locale/I18n.hpp"
#include "TextOption.h" #include "TextOption.hpp"
#include "KeyOption.h" #include "KeyOption.hpp"
OptionsGroup::OptionsGroup( std::string labelID ) { OptionsGroup::OptionsGroup( std::string labelID ) {
label = I18n::get(labelID); label = I18n::get(labelID);

View File

@@ -1,12 +1,11 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_COMPONENTS__OptionsGroup_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_COMPONENTS__OptionsGroup_H__
//package net.minecraft.client.gui; //package net.minecraft.client.gui;
#include <string> #include <string>
#include "GuiElementContainer.h" #include "GuiElementContainer.hpp"
#include "ScrollingPane.h" #include "ScrollingPane.hpp"
#include "../../Options.h" #include "client/Options.hpp"
class Font; class Font;
class Minecraft; class Minecraft;
@@ -29,4 +28,3 @@ protected:
std::string label; std::string label;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__OptionsGroup_H__*/

View File

@@ -1,7 +1,7 @@
#include "OptionsItem.h" #include "OptionsItem.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include "../../../locale/I18n.h" #include "locale/I18n.hpp"
#include "../../../util/Mth.h" #include "util/Mth.hpp"
OptionsItem::OptionsItem( OptionId optionId, std::string label, GuiElement* element ) OptionsItem::OptionsItem( OptionId optionId, std::string label, GuiElement* element )
: GuiElementContainer(false, true, 0, 0, 24, 12), : GuiElementContainer(false, true, 0, 0, 24, 12),
m_optionId(optionId), m_optionId(optionId),

View File

@@ -1,11 +1,10 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_COMPONENTS__OptionsItem_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_COMPONENTS__OptionsItem_H__
#include <string> #include <string>
#include <vector> #include <vector>
#include "GuiElementContainer.h" #include "GuiElementContainer.hpp"
#include "../../../world/item/ItemInstance.h" #include "world/item/ItemInstance.hpp"
#include "../../../client/Options.h" #include "client/Options.hpp"
class Font; class Font;
class Textures; class Textures;
class NinePatchLayer; class NinePatchLayer;
@@ -24,4 +23,3 @@ private:
std::string m_label; std::string m_label;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__OptionsItem_H__*/

View File

@@ -1,11 +1,11 @@
#include "RolledSelectionListH.h" #include "RolledSelectionListH.hpp"
#include "../../renderer/Tesselator.h" #include "client/renderer/Tesselator.hpp"
#include "../../renderer/gles.h" #include "client/renderer/gles.hpp"
#include "../../../platform/input/Mouse.h" #include "platform/input/Mouse.hpp"
#include "../../../platform/input/Multitouch.h" #include "platform/input/Multitouch.hpp"
#include "../../../util/Mth.h" #include "util/Mth.hpp"
#include "../../renderer/Textures.h" #include "client/renderer/Textures.hpp"
#include "MinecraftClient.h" #include "MinecraftClient.hpp"
RolledSelectionListH::RolledSelectionListH( MinecraftClient& minecraft, int width, int height, int x0, int x1, int y0, int y1, int itemWidth ) RolledSelectionListH::RolledSelectionListH( MinecraftClient& minecraft, int width, int height, int x0, int x1, int y0, int y1, int itemWidth )

View File

@@ -1,7 +1,6 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_COMPONENTS__RolledSelectionListH_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_COMPONENTS__RolledSelectionListH_H__
#include "../GuiComponent.h" #include "client/gui/GuiComponent.hpp"
class MinecraftClient; class MinecraftClient;
class Tesselator; class Tesselator;
@@ -79,4 +78,3 @@ private:
float _lastxoo; float _lastxoo;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__RolledSelectionListH_H__*/

View File

@@ -1,10 +1,10 @@
#include "RolledSelectionListV.h" #include "RolledSelectionListV.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include "../../renderer/Tesselator.h" #include "client/renderer/Tesselator.hpp"
#include "../../renderer/gles.h" #include "client/renderer/gles.hpp"
#include "../../../platform/input/Mouse.h" #include "platform/input/Mouse.hpp"
#include "../../../util/Mth.h" #include "util/Mth.hpp"
#include "../../renderer/Textures.h" #include "client/renderer/Textures.hpp"
RolledSelectionListV::RolledSelectionListV( Minecraft* minecraft_, int width_, int height_, int x0_, int x1_, int y0_, int y1_, int itemHeight_ ) RolledSelectionListV::RolledSelectionListV( Minecraft* minecraft_, int width_, int height_, int x0_, int x1_, int y0_, int y1_, int itemHeight_ )

View File

@@ -1,7 +1,6 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_COMPONENTS__RolledSelectionListV_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_COMPONENTS__RolledSelectionListV_H__
#include "../GuiComponent.h" #include "client/gui/GuiComponent.hpp"
class Minecraft; class Minecraft;
class Tesselator; class Tesselator;
@@ -91,4 +90,3 @@ private:
float _stickPixels; float _stickPixels;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__RolledSelectionListV_H__*/

View File

@@ -1,9 +1,9 @@
#include "ScrolledSelectionList.h" #include "ScrolledSelectionList.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include "../../renderer/Tesselator.h" #include "client/renderer/Tesselator.hpp"
#include "../../renderer/gles.h" #include "client/renderer/gles.hpp"
#include "../../../platform/input/Mouse.h" #include "platform/input/Mouse.hpp"
#include "../../renderer/Textures.h" #include "client/renderer/Textures.hpp"
static int Abs(int d) { static int Abs(int d) {
return d >= 0? d : -d; return d >= 0? d : -d;

View File

@@ -1,7 +1,6 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_COMPONENTS__ScrolledSelectionList_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_COMPONENTS__ScrolledSelectionList_H__
#include "../GuiComponent.h" #include "client/gui/GuiComponent.hpp"
class Minecraft; class Minecraft;
class Tesselator; class Tesselator;
@@ -66,4 +65,3 @@ private:
int headerHeight; int headerHeight;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__ScrolledSelectionList_H__*/

View File

@@ -1,8 +1,8 @@
#include "ScrollingPane.h" #include "ScrollingPane.hpp"
#include "../../renderer/gles.h" #include "client/renderer/gles.hpp"
#include "../Gui.h" #include "client/gui/Gui.hpp"
#include "../../../util/Mth.h" #include "util/Mth.hpp"
#include "../../../SharedConstants.h" #include "SharedConstants.hpp"
#define STR(x) (x.toString().c_str()) #define STR(x) (x.toString().c_str())

View File

@@ -1,11 +1,10 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_COMPONENTS__ScrollingPane_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_COMPONENTS__ScrollingPane_H__
#include "../GuiComponent.h" #include "client/gui/GuiComponent.hpp"
#include "ImageButton.h" #include "ImageButton.hpp"
#include "../../player/input/touchscreen/TouchAreaModel.h" #include "client/player/input/touchscreen/TouchAreaModel.hpp"
#include "../../../world/phys/Vec3.h" #include "world/phys/Vec3.hpp"
#include "../../Timer.h" #include "client/Timer.hpp"
enum ScrollingPaneFlags { enum ScrollingPaneFlags {
SF_LockX = 1 << 0, SF_LockX = 1 << 0,
@@ -200,4 +199,3 @@ private:
float _ly; float _ly;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__ScrollingPane_H__*/

View File

@@ -1,9 +1,9 @@
#include "Slider.h" #include "Slider.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include "../../renderer/Textures.h" #include "client/renderer/Textures.hpp"
#include "../Screen.h" #include "client/gui/Screen.hpp"
#include "../../../locale/I18n.h" #include "locale/I18n.hpp"
#include "../../../util/Mth.h" #include "util/Mth.hpp"
#include <algorithm> #include <algorithm>
#include <assert.h> #include <assert.h>

View File

@@ -1,9 +1,8 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_COMPONENTS__Slider_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_COMPONENTS__Slider_H__
#include "GuiElement.h" #include "GuiElement.hpp"
#include "../../../client/Options.h" #include "client/Options.hpp"
#include <client/Option.h> #include <client/Option.hpp>
class Slider : public GuiElement { class Slider : public GuiElement {
typedef GuiElement super; typedef GuiElement super;
@@ -45,4 +44,3 @@ protected:
OptionInt* m_option; OptionInt* m_option;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__Slider_H__*/

View File

@@ -1,8 +1,8 @@
#include "TextBox.h" #include "TextBox.hpp"
#include "../Gui.h" #include "client/gui/Gui.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include "../../../AppPlatform.h" #include "AppPlatform.hpp"
#include "../../../platform/input/Mouse.h" #include "platform/input/Mouse.hpp"
// delegate constructors // delegate constructors
TextBox::TextBox(int id, const std::string& msg) TextBox::TextBox(int id, const std::string& msg)

View File

@@ -1,13 +1,12 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_COMPONENTS__TextBox_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_COMPONENTS__TextBox_H__
//package net.minecraft.client.gui; //package net.minecraft.client.gui;
#include <string> #include <string>
#include "GuiElement.h" #include "GuiElement.hpp"
#include "../../Options.h" #include "client/Options.hpp"
#include "../../../platform/input/Mouse.h" #include "platform/input/Mouse.hpp"
#include "../../../platform/input/Keyboard.h" #include "platform/input/Keyboard.hpp"
class Font; class Font;
class Minecraft; class Minecraft;
@@ -41,4 +40,3 @@ public:
bool blink; bool blink;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__TextBox_H__*/

View File

@@ -1,5 +1,5 @@
#include "TextOption.h" #include "TextOption.hpp"
#include <client/Minecraft.h> #include <client/Minecraft.hpp>
TextOption::TextOption(Minecraft* minecraft, OptionId optId) TextOption::TextOption(Minecraft* minecraft, OptionId optId)
: TextBox((int)optId, minecraft->options.getOpt(optId)->getStringId()) : TextBox((int)optId, minecraft->options.getOpt(optId)->getStringId())

View File

@@ -1,6 +1,6 @@
#pragma once #pragma once
#include "TextBox.h" #include "TextBox.hpp"
#include <client/Options.h> #include <client/Options.hpp>
class TextOption : public TextBox { class TextOption : public TextBox {
public: public:

View File

@@ -1,18 +1,18 @@
#include "ArmorScreen.h" #include "ArmorScreen.hpp"
#include "../Screen.h" #include "client/gui/Screen.hpp"
#include "../components/NinePatch.h" #include "client/gui/components/NinePatch.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include "../../player/LocalPlayer.h" #include "client/player/LocalPlayer.hpp"
#include "../../renderer/Tesselator.h" #include "client/renderer/Tesselator.hpp"
#include "../../renderer/entity/ItemRenderer.h" #include "client/renderer/entity/ItemRenderer.hpp"
#include "../../../world/item/Item.h" #include "world/item/Item.hpp"
#include "../../../world/item/ItemCategory.h" #include "world/item/ItemCategory.hpp"
#include "../../../world/entity/player/Inventory.h" #include "world/entity/player/Inventory.hpp"
#include "../../../world/entity/item/ItemEntity.h" #include "world/entity/item/ItemEntity.hpp"
#include "../../../world/level/Level.h" #include "world/level/Level.hpp"
#include "../../../network/RakNetInstance.h" #include "network/RakNetInstance.hpp"
#include "../../renderer/entity/EntityRenderDispatcher.h" #include "client/renderer/entity/EntityRenderDispatcher.hpp"
#include "../../../world/item/ArmorItem.h" #include "world/item/ArmorItem.hpp"
static void setIfNotSet(bool& ref, bool condition) { static void setIfNotSet(bool& ref, bool condition) {
ref = (ref || condition); ref = (ref || condition);

View File

@@ -1,10 +1,9 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_SCREENS__ArmorScreen_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_SCREENS__ArmorScreen_H__
#include "BaseContainerScreen.h" #include "BaseContainerScreen.hpp"
#include "../components/InventoryPane.h" #include "client/gui/components/InventoryPane.hpp"
#include "../components/Button.h" #include "client/gui/components/Button.hpp"
class Font; class Font;
class CItem; class CItem;
@@ -76,4 +75,3 @@ private:
Player* player; Player* player;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI_SCREENS__ArmorScreen_H__*/

View File

@@ -1,12 +1,11 @@
#ifndef NET_MINECRAFT_CLIENT_GUI__BaseContainerScreen_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI__BaseContainerScreen_H__
//package net.minecraft.client.gui.screens; //package net.minecraft.client.gui.screens;
#include <vector> #include <vector>
#include "../Screen.h" #include "client/gui/Screen.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include "../../player/LocalPlayer.h" #include "client/player/LocalPlayer.hpp"
class BaseContainerMenu; class BaseContainerMenu;
@@ -47,4 +46,3 @@ protected:
BaseContainerMenu* menu; BaseContainerMenu* menu;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI__BaseContainerScreen_H__*/

View File

@@ -1,9 +1,9 @@
#include "ChatScreen.h" #include "ChatScreen.hpp"
#include "DialogDefinitions.h" #include "DialogDefinitions.hpp"
#include "../Gui.h" #include "client/gui/Gui.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include "../../../AppPlatform.h" #include "AppPlatform.hpp"
#include "../../../platform/log.h" #include "platform/log.hpp"
void ChatScreen::init() { void ChatScreen::init() {
minecraft->platform()->createUserInput(DialogDefinitions::DIALOG_NEW_CHAT_MESSAGE); minecraft->platform()->createUserInput(DialogDefinitions::DIALOG_NEW_CHAT_MESSAGE);

View File

@@ -1,21 +0,0 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_SCREENS__ChatScreen_H__
#define NET_MINECRAFT_CLIENT_GUI_SCREENS__ChatScreen_H__
#include "../Screen.h"
class ChatScreen: public Screen
{
public:
ChatScreen() {}
virtual ~ChatScreen() {}
void init();
void render(int xm, int ym, float a);
void buttonClicked(Button* button) {};
private:
};
#endif /*NET_MINECRAFT_CLIENT_GUI_SCREENS__ChatScreen_H__*/

View File

@@ -0,0 +1,19 @@
#pragma once
#include "client/gui/Screen.hpp"
class ChatScreen: public Screen
{
public:
ChatScreen() {}
virtual ~ChatScreen() {}
void init();
void render(int xm, int ym, float a);
void buttonClicked(Button* button) {};
private:
};

View File

@@ -1,24 +1,24 @@
#include "ChestScreen.h" #include "ChestScreen.hpp"
#include "touch/TouchStartMenuScreen.h" #include "touch/TouchStartMenuScreen.hpp"
#include "../Screen.h" #include "client/gui/Screen.hpp"
#include "../components/NinePatch.h" #include "client/gui/components/NinePatch.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include "../../player/LocalPlayer.h" #include "client/player/LocalPlayer.hpp"
#include "../../renderer/Tesselator.h" #include "client/renderer/Tesselator.hpp"
#include "../../renderer/entity/ItemRenderer.h" #include "client/renderer/entity/ItemRenderer.hpp"
#include "../../../world/item/Item.h" #include "world/item/Item.hpp"
#include "../../../world/item/ItemCategory.h" #include "world/item/ItemCategory.hpp"
#include "../../../world/entity/player/Inventory.h" #include "world/entity/player/Inventory.hpp"
#include "../../../world/entity/item/ItemEntity.h" #include "world/entity/item/ItemEntity.hpp"
#include "../../../world/level/Level.h" #include "world/level/Level.hpp"
#include "../../../locale/I18n.h" #include "locale/I18n.hpp"
#include "../../../util/StringUtils.h" #include "util/StringUtils.hpp"
#include "../../../network/packet/ContainerSetSlotPacket.h" #include "network/packet/ContainerSetSlotPacket.hpp"
#include "../../../network/RakNetInstance.h" #include "network/RakNetInstance.hpp"
#include "../../../world/level/tile/entity/TileEntity.h" #include "world/level/tile/entity/TileEntity.hpp"
#include "../../../world/level/tile/entity/ChestTileEntity.h" #include "world/level/tile/entity/ChestTileEntity.hpp"
#include "../../../world/inventory/ContainerMenu.h" #include "world/inventory/ContainerMenu.hpp"
#include "../../../util/Mth.h" #include "util/Mth.hpp"
//static NinePatchLayer* guiPaneFrame = NULL; //static NinePatchLayer* guiPaneFrame = NULL;

View File

@@ -1,10 +1,9 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_SCREENS__ChestScreen_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_SCREENS__ChestScreen_H__
#include "BaseContainerScreen.h" #include "BaseContainerScreen.hpp"
#include "../components/InventoryPane.h" #include "client/gui/components/InventoryPane.hpp"
#include "../components/Button.h" #include "client/gui/components/Button.hpp"
class Font; class Font;
class CItem; class CItem;
@@ -69,4 +68,3 @@ private:
ChestTileEntity* chest; ChestTileEntity* chest;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI_SCREENS__ChestScreen_H__*/

View File

@@ -1,7 +1,7 @@
#include "ChooseLevelScreen.h" #include "ChooseLevelScreen.hpp"
#include <algorithm> #include <algorithm>
#include <set> #include <set>
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
void ChooseLevelScreen::init() { void ChooseLevelScreen::init() {
loadLevelSource(); loadLevelSource();

View File

@@ -1,21 +0,0 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_SCREENS__ChooseLevelScreen_H__
#define NET_MINECRAFT_CLIENT_GUI_SCREENS__ChooseLevelScreen_H__
#include "../Screen.h"
#include "../../../world/level/storage/LevelStorageSource.h"
class ChooseLevelScreen: public Screen
{
public:
void init();
protected:
std::string getUniqueLevelName(const std::string& level);
private:
void loadLevelSource();
LevelSummaryList levels;
};
#endif /*NET_MINECRAFT_CLIENT_GUI_SCREENS__ChooseLevelScreen_H__*/

View File

@@ -0,0 +1,19 @@
#pragma once
#include "client/gui/Screen.hpp"
#include "world/level/storage/LevelStorageSource.hpp"
class ChooseLevelScreen: public Screen
{
public:
void init();
protected:
std::string getUniqueLevelName(const std::string& level);
private:
void loadLevelSource();
LevelSummaryList levels;
};

View File

@@ -1,6 +1,6 @@
#include "ConfirmScreen.h" #include "ConfirmScreen.hpp"
#include "../components/Button.h" #include "client/gui/components/Button.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
ConfirmScreen::ConfirmScreen(Screen* parent_, const std::string& title1_, const std::string& title2_, int id_) ConfirmScreen::ConfirmScreen(Screen* parent_, const std::string& title1_, const std::string& title2_, int id_)
: parent(parent_), : parent(parent_),

View File

@@ -1,9 +1,8 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_SCREENS__ConfirmScreen_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_SCREENS__ConfirmScreen_H__
//package net.minecraft.client.gui; //package net.minecraft.client.gui;
#include "../Screen.h" #include "client/gui/Screen.hpp"
#include <string> #include <string>
class ConfirmScreen: public Screen class ConfirmScreen: public Screen
@@ -37,4 +36,3 @@ private:
Button* noButton; // 1 Button* noButton; // 1
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI_SCREENS__ConfirmScreen_H__*/

View File

@@ -1,13 +1,13 @@
#include "ConsoleScreen.h" #include "ConsoleScreen.hpp"
#include "../Gui.h" #include "client/gui/Gui.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include "../../player/LocalPlayer.h" #include "client/player/LocalPlayer.hpp"
#include "../../../platform/input/Keyboard.h" #include "platform/input/Keyboard.hpp"
#include "../../../world/level/Level.h" #include "world/level/Level.hpp"
#include "../../../network/RakNetInstance.h" #include "network/RakNetInstance.hpp"
#include "../../../network/ServerSideNetworkHandler.h" #include "network/ServerSideNetworkHandler.hpp"
#include "../../../network/packet/ChatPacket.h" #include "network/packet/ChatPacket.hpp"
#include "../../../platform/log.h" #include "platform/log.hpp"
#include <sstream> #include <sstream>
#include <cstdlib> #include <cstdlib>

View File

@@ -1,7 +1,6 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_SCREENS__ConsoleScreen_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_SCREENS__ConsoleScreen_H__
#include "../Screen.h" #include "client/gui/Screen.hpp"
#include <string> #include <string>
class ConsoleScreen: public Screen class ConsoleScreen: public Screen
@@ -31,4 +30,3 @@ private:
int _cursorBlink; // tick counter for cursor blink int _cursorBlink; // tick counter for cursor blink
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI_SCREENS__ConsoleScreen_H__*/

View File

@@ -1,10 +1,10 @@
#include "CreditsScreen.h" #include "CreditsScreen.hpp"
#include "StartMenuScreen.h" #include "StartMenuScreen.hpp"
#include "OptionsScreen.h" #include "OptionsScreen.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include "../components/Button.h" #include "client/gui/components/Button.hpp"
#include "../components/ImageButton.h" #include "client/gui/components/ImageButton.hpp"
#include "platform/input/Mouse.h" #include "platform/input/Mouse.hpp"
CreditsScreen::CreditsScreen() CreditsScreen::CreditsScreen()
: bHeader(NULL), btnBack(NULL) : bHeader(NULL), btnBack(NULL)

View File

@@ -1,8 +1,7 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_SCREENS__CreditsScreen_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_SCREENS__CreditsScreen_H__
#include "../Screen.h" #include "client/gui/Screen.hpp"
#include "../components/Button.h" #include "client/gui/components/Button.hpp"
class ImageButton; class ImageButton;
@@ -29,4 +28,3 @@ private:
float _scrollSpeed; float _scrollSpeed;
}; };
#endif /* NET_MINECRAFT_CLIENT_GUI_SCREENS__CreditsScreen_H__ */

View File

@@ -1,9 +1,9 @@
#include "DeathScreen.h" #include "DeathScreen.hpp"
#include "ScreenChooser.h" #include "ScreenChooser.hpp"
#include "../components/Button.h" #include "client/gui/components/Button.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include "../../player/LocalPlayer.h" #include "client/player/LocalPlayer.hpp"
#include "../../../platform/time.h" #include "platform/time.hpp"
static const int WAIT_TICKS = 30; static const int WAIT_TICKS = 30;

View File

@@ -1,7 +1,6 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_SCREENS__DeathScreen_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_SCREENS__DeathScreen_H__
#include "../Screen.h" #include "client/gui/Screen.hpp"
class Button; class Button;
class DeathScreen: public Screen class DeathScreen: public Screen
@@ -27,4 +26,3 @@ private:
int _tick; int _tick;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI_SCREENS__DeathScreen_H__*/

View File

@@ -1,5 +1,4 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_SCREENS__DialogDefinitions_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_SCREENS__DialogDefinitions_H__
class DialogDefinitions { class DialogDefinitions {
public: public:
@@ -10,4 +9,3 @@ public:
static const int DIALOG_DEMO_FEATURE_DISABLED = 98; static const int DIALOG_DEMO_FEATURE_DISABLED = 98;
}; };
#endif /*#ifndef NET_MINECRAFT_CLIENT_GUI_SCREENS__DialogDefinitions_H__*/

View File

@@ -1,10 +1,9 @@
#ifndef NET_MINECRAFT_CLIENT_GUI_SCREENS__DisconnectionScreen_H__ #pragma once
#define NET_MINECRAFT_CLIENT_GUI_SCREENS__DisconnectionScreen_H__
#include "../Screen.h" #include "client/gui/Screen.hpp"
#include "../Font.h" #include "client/gui/Font.hpp"
#include "../components/Button.h" #include "client/gui/components/Button.hpp"
#include "../../Minecraft.h" #include "client/Minecraft.hpp"
#include <string> #include <string>
class DisconnectionScreen: public Screen class DisconnectionScreen: public Screen
@@ -54,4 +53,3 @@ private:
Button* _back; Button* _back;
}; };
#endif /*NET_MINECRAFT_CLIENT_GUI_SCREENS__DisconnectionScreen_H__*/

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