From 5e739f3d5bfe3083e52bddfabfae376707048268 Mon Sep 17 00:00:00 2001 From: iProgramInCpp Date: Mon, 31 Jul 2023 10:11:32 +0300 Subject: [PATCH] * Rename Options.hpp -> GameMods.hpp, to fix some errors --- GameMods.hpp | 41 +++++++++++++++++++++++++++++++++ Options.hpp | 41 --------------------------------- source/Base/Utils.hpp | 2 +- windows_vs/minecraftcpp.vcxproj | 12 +++++----- 4 files changed, 48 insertions(+), 48 deletions(-) create mode 100644 GameMods.hpp delete mode 100644 Options.hpp diff --git a/GameMods.hpp b/GameMods.hpp new file mode 100644 index 0000000..ea46645 --- /dev/null +++ b/GameMods.hpp @@ -0,0 +1,41 @@ +#pragma once + +// Here is a list of options that you can enable when building the project: + +// ORIGINAL_CODE - Unpatches all bugs and allows building for Xperia Play only. (TODO) +// #define ORIGINAL_CODE + +#ifdef ORIGINAL_CODE +#define DEMO +#else + +// Enhancements +#define ENH_ENTITY_SHADING // Allows shading of entities +#define ENH_SHADE_HELD_TILES // Allows shading of the item in hand +#define ENH_FIX_INVIS_STAIRS // Fixes a bug wherein a 16x16x16 chunk in the world that contains only stairs is invisible +#define ENH_ALLOW_AO // Allows using the F4 key to toggle ambient occlusion (buggy) +#define ENH_TRANSPARENT_HOTBAR // Allows the hotbar to be transparent. Due to a bug in the code, it is not. +#define ENH_INSTA_BREAK // Allows instant breaking of blocks. @TODO: Fix the mode without this +#define ENH_CAMERA_NO_PARTICLES // Hide particles from the view of a camera, such as smoke, that would otherwise render the resulting image useless. +#define ENH_USE_JAVA_LIGHT_RAMP // Use Java Beta 1.3 light ramp instead of flawed PE one +#define ENH_RUN_DAY_NIGHT_CYCLE // Allow the day/night cycle to run. +#define ENH_ENABLE_9TH_SLOT // Enable the 9th hotbar slot, instead of it being a "..." placeholder +#define ENH_USE_OWN_AO // Use own ambient occlusion engine - looks pretty much the same except it fixes the corners +#define ENH_ADD_OPTIONS_PAUSE // Add an 'options' button in the pause menu +#define ENH_EXTRA_ITEMS_IN_INV // Add extra items in a new 5th row in the inventory. +#define ENH_HIGHLIGHT_BY_HOVER // Highlight buttons by hovering them instead of the usual way. +#define ENH_ALLOW_SAND_GRAVITY // Allow sand to fall. +#define ENH_USE_GUI_SCALE_2 // Use a 2x GUI scale instead of 3x. Looks better on PC + +// Mods +//#define MOD_USE_FLAT_WORLD // Use a flat world instead of the regular world generation +//#define MOD_USE_BIGGER_SCREEN_SIZE // Use a bigger screen size instead of 854x480 +//#define MOD_DONT_COLOR_GRASS // Don't give the top of grass tiles a different color. (like Classic) + +// Tests +//#define TEST_DROPPED_ITEMS // Allow dropped items to be dropped and collected. + +// Toggle Demo Mode +#define DEMO + +#endif diff --git a/Options.hpp b/Options.hpp deleted file mode 100644 index 386bf92..0000000 --- a/Options.hpp +++ /dev/null @@ -1,41 +0,0 @@ -#pragma once - -// Here is a list of options that you can enable when building the project: - -// ORIGINAL_CODE - Unpatches all bugs and allows building for Xperia Play only. (TODO) -// #define ORIGINAL_CODE - -#ifdef ORIGINAL_CODE -#define DEMO -#else - -// Enhancements -//#define ENH_ENTITY_SHADING // Allows shading of entities -//#define ENH_SHADE_HELD_TILES // Allows shading of the item in hand -//#define ENH_FIX_INVIS_STAIRS // Fixes a bug wherein a 16x16x16 chunk in the world that contains only stairs is invisible -//#define ENH_ALLOW_AO // Allows using the F4 key to toggle ambient occlusion (buggy) -//#define ENH_TRANSPARENT_HOTBAR // Allows the hotbar to be transparent. Due to a bug in the code, it is not. -//#define ENH_INSTA_BREAK // Allows instant breaking of blocks. @TODO: Fix the mode without this -//#define ENH_CAMERA_NO_PARTICLES // Hide particles from the view of a camera, such as smoke, that would otherwise render the resulting image useless. -//#define ENH_USE_JAVA_LIGHT_RAMP // Use Java Beta 1.3 light ramp instead of flawed PE one -//#define ENH_RUN_DAY_NIGHT_CYCLE // Allow the day/night cycle to run. -//#define ENH_ENABLE_9TH_SLOT // Enable the 9th hotbar slot, instead of it being a "..." placeholder -//#define ENH_USE_OWN_AO // Use own ambient occlusion engine - looks pretty much the same except it fixes the corners -//#define ENH_ADD_OPTIONS_PAUSE // Add an 'options' button in the pause menu -//#define ENH_EXTRA_ITEMS_IN_INV // Add extra items in a new 5th row in the inventory. -//#define ENH_HIGHLIGHT_BY_HOVER // Highlight buttons by hovering them instead of the usual way. -//#define ENH_ALLOW_SAND_GRAVITY // Allow sand to fall. -//#define ENH_USE_GUI_SCALE_2 // Use a 2x GUI scale instead of 3x. Looks better on PC - -// Mods -//#define MOD_USE_FLAT_WORLD // Use a flat world instead of the regular world generation -//#define MOD_USE_BIGGER_SCREEN_SIZE // Use a bigger screen size instead of 854x480 -//#define MOD_DONT_COLOR_GRASS // Don't give the top of grass tiles a different color. (like Classic) - -// Tests -//#define TEST_DROPPED_ITEMS // Allow dropped items to be dropped and collected. - -// Toggle Demo Mode -#define DEMO - -#endif diff --git a/source/Base/Utils.hpp b/source/Base/Utils.hpp index d2f7697..1e3923c 100644 --- a/source/Base/Utils.hpp +++ b/source/Base/Utils.hpp @@ -25,7 +25,7 @@ #include "compat/AKeyCodes.hpp" // options: -#include "../Options.hpp" +#include "GameMods.hpp" // don't know where to declare these: diff --git a/windows_vs/minecraftcpp.vcxproj b/windows_vs/minecraftcpp.vcxproj index c5f21ff..4ac0808 100644 --- a/windows_vs/minecraftcpp.vcxproj +++ b/windows_vs/minecraftcpp.vcxproj @@ -702,32 +702,32 @@ - $(ProjectDir)/../thirdparty;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../thirdparty/raknet;$(ProjectDir);$(ProjectDir)/..;$(ProjectDir)/../source;$(ProjectDir)/../source/Network;$(ProjectDir)/../source/Sound;$(ProjectDir)/../source/GameMode;$(ProjectDir)/../source/App;$(ProjectDir)/../source/Base;$(ProjectDir)/../source/GUI;$(ProjectDir)/../source/GUI/Screen;$(ProjectDir)/../source/Renderer;$(ProjectDir)/../source/UserInput;$(ProjectDir)/../source/World;$(ProjectDir)/../source/World/Generator;$(ProjectDir)/../source/World/Item;$(ProjectDir)/../source/World/Tile;$(ProjectDir)/../source/World/Renderer;$(ProjectDir)/../source/World/Entity;$(ProjectDir)/../source/World/Entity/Models;$(ProjectDir)/../source/World/Particle;$(ProjectDir)/../source/World/Storage;$(VC_IncludePath);$(WindowsSDK_IncludePath) + $(ProjectDir)/..;$(ProjectDir)/../thirdparty;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../thirdparty/raknet;$(ProjectDir);$(ProjectDir)/..;$(ProjectDir)/../source;$(ProjectDir)/../source/Network;$(ProjectDir)/../source/Sound;$(ProjectDir)/../source/GameMode;$(ProjectDir)/../source/App;$(ProjectDir)/../source/Base;$(ProjectDir)/../source/GUI;$(ProjectDir)/../source/GUI/Screen;$(ProjectDir)/../source/Renderer;$(ProjectDir)/../source/UserInput;$(ProjectDir)/../source/World;$(ProjectDir)/../source/World/Generator;$(ProjectDir)/../source/World/Item;$(ProjectDir)/../source/World/Tile;$(ProjectDir)/../source/World/Renderer;$(ProjectDir)/../source/World/Entity;$(ProjectDir)/../source/World/Entity/Models;$(ProjectDir)/../source/World/Particle;$(ProjectDir)/../source/World/Storage;$(VC_IncludePath);$(WindowsSDK_IncludePath) $(SolutionDir)bin\$(Configuration)\ obj\$(Configuration)\ - $(ProjectDir)/../thirdparty;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../thirdparty/raknet;$(ProjectDir);$(ProjectDir)/..;$(ProjectDir)/../source;$(ProjectDir)/../source/Network;$(ProjectDir)/../source/Sound;$(ProjectDir)/../source/GameMode;$(ProjectDir)/../source/App;$(ProjectDir)/../source/Base;$(ProjectDir)/../source/GUI;$(ProjectDir)/../source/GUI/Screen;$(ProjectDir)/../source/Renderer;$(ProjectDir)/../source/UserInput;$(ProjectDir)/../source/World;$(ProjectDir)/../source/World/Generator;$(ProjectDir)/../source/World/Item;$(ProjectDir)/../source/World/Tile;$(ProjectDir)/../source/World/Renderer;$(ProjectDir)/../source/World/Entity;$(ProjectDir)/../source/World/Entity/Models;$(ProjectDir)/../source/World/Particle;$(ProjectDir)/../source/World/Storage;$(VC_IncludePath);$(WindowsSDK_IncludePath) + $(ProjectDir)/..;$(ProjectDir)/../thirdparty;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../thirdparty/raknet;$(ProjectDir);$(ProjectDir)/..;$(ProjectDir)/../source;$(ProjectDir)/../source/Network;$(ProjectDir)/../source/Sound;$(ProjectDir)/../source/GameMode;$(ProjectDir)/../source/App;$(ProjectDir)/../source/Base;$(ProjectDir)/../source/GUI;$(ProjectDir)/../source/GUI/Screen;$(ProjectDir)/../source/Renderer;$(ProjectDir)/../source/UserInput;$(ProjectDir)/../source/World;$(ProjectDir)/../source/World/Generator;$(ProjectDir)/../source/World/Item;$(ProjectDir)/../source/World/Tile;$(ProjectDir)/../source/World/Renderer;$(ProjectDir)/../source/World/Entity;$(ProjectDir)/../source/World/Entity/Models;$(ProjectDir)/../source/World/Particle;$(ProjectDir)/../source/World/Storage;$(VC_IncludePath);$(WindowsSDK_IncludePath) $(SolutionDir)bin\$(Configuration)\ obj\$(Configuration)\ - $(ProjectDir)/../thirdparty;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../thirdparty/raknet;$(ProjectDir);$(ProjectDir)/..;$(ProjectDir)/../source;$(ProjectDir)/../source/Network;$(ProjectDir)/../source/Sound;$(ProjectDir)/../source/GameMode;$(ProjectDir)/../source/App;$(ProjectDir)/../source/Base;$(ProjectDir)/../source/GUI;$(ProjectDir)/../source/GUI/Screen;$(ProjectDir)/../source/Renderer;$(ProjectDir)/../source/UserInput;$(ProjectDir)/../source/World;$(ProjectDir)/../source/World/Generator;$(ProjectDir)/../source/World/Item;$(ProjectDir)/../source/World/Tile;$(ProjectDir)/../source/World/Renderer;$(ProjectDir)/../source/World/Entity;$(ProjectDir)/../source/World/Entity/Models;$(ProjectDir)/../source/World/Particle;$(ProjectDir)/../source/World/Storage;$(VC_IncludePath);$(WindowsSDK_IncludePath) + $(ProjectDir)/..;$(ProjectDir)/../thirdparty;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../thirdparty/raknet;$(ProjectDir);$(ProjectDir)/..;$(ProjectDir)/../source;$(ProjectDir)/../source/Network;$(ProjectDir)/../source/Sound;$(ProjectDir)/../source/GameMode;$(ProjectDir)/../source/App;$(ProjectDir)/../source/Base;$(ProjectDir)/../source/GUI;$(ProjectDir)/../source/GUI/Screen;$(ProjectDir)/../source/Renderer;$(ProjectDir)/../source/UserInput;$(ProjectDir)/../source/World;$(ProjectDir)/../source/World/Generator;$(ProjectDir)/../source/World/Item;$(ProjectDir)/../source/World/Tile;$(ProjectDir)/../source/World/Renderer;$(ProjectDir)/../source/World/Entity;$(ProjectDir)/../source/World/Entity/Models;$(ProjectDir)/../source/World/Particle;$(ProjectDir)/../source/World/Storage;$(VC_IncludePath);$(WindowsSDK_IncludePath) $(SolutionDir)bin\$(Configuration)\ obj\$(Configuration)\ - $(ProjectDir)/../thirdparty;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../thirdparty/raknet;$(ProjectDir);$(ProjectDir)/..;$(ProjectDir)/../source;$(ProjectDir)/../source/Network;$(ProjectDir)/../source/Sound;$(ProjectDir)/../source/GameMode;$(ProjectDir)/../source/App;$(ProjectDir)/../source/Base;$(ProjectDir)/../source/GUI;$(ProjectDir)/../source/GUI/Screen;$(ProjectDir)/../source/Renderer;$(ProjectDir)/../source/UserInput;$(ProjectDir)/../source/World;$(ProjectDir)/../source/World/Generator;$(ProjectDir)/../source/World/Item;$(ProjectDir)/../source/World/Tile;$(ProjectDir)/../source/World/Renderer;$(ProjectDir)/../source/World/Entity;$(ProjectDir)/../source/World/Entity/Models;$(ProjectDir)/../source/World/Particle;$(ProjectDir)/../source/World/Storage;$(VC_IncludePath);$(WindowsSDK_IncludePath) + $(ProjectDir)/..;$(ProjectDir)/../thirdparty;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../thirdparty/raknet;$(ProjectDir);$(ProjectDir)/..;$(ProjectDir)/../source;$(ProjectDir)/../source/Network;$(ProjectDir)/../source/Sound;$(ProjectDir)/../source/GameMode;$(ProjectDir)/../source/App;$(ProjectDir)/../source/Base;$(ProjectDir)/../source/GUI;$(ProjectDir)/../source/GUI/Screen;$(ProjectDir)/../source/Renderer;$(ProjectDir)/../source/UserInput;$(ProjectDir)/../source/World;$(ProjectDir)/../source/World/Generator;$(ProjectDir)/../source/World/Item;$(ProjectDir)/../source/World/Tile;$(ProjectDir)/../source/World/Renderer;$(ProjectDir)/../source/World/Entity;$(ProjectDir)/../source/World/Entity/Models;$(ProjectDir)/../source/World/Particle;$(ProjectDir)/../source/World/Storage;$(VC_IncludePath);$(WindowsSDK_IncludePath) $(SolutionDir)bin\$(Platform)\$(Configuration)\ obj\$(Platform)\$(Configuration)\ - $(ProjectDir)/../thirdparty;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../thirdparty/raknet;$(ProjectDir);$(ProjectDir)/..;$(ProjectDir)/../source;$(ProjectDir)/../source/Network;$(ProjectDir)/../source/Sound;$(ProjectDir)/../source/GameMode;$(ProjectDir)/../source/App;$(ProjectDir)/../source/Base;$(ProjectDir)/../source/GUI;$(ProjectDir)/../source/GUI/Screen;$(ProjectDir)/../source/Renderer;$(ProjectDir)/../source/UserInput;$(ProjectDir)/../source/World;$(ProjectDir)/../source/World/Generator;$(ProjectDir)/../source/World/Item;$(ProjectDir)/../source/World/Tile;$(ProjectDir)/../source/World/Renderer;$(ProjectDir)/../source/World/Entity;$(ProjectDir)/../source/World/Entity/Models;$(ProjectDir)/../source/World/Particle;$(ProjectDir)/../source/World/Storage;$(VC_IncludePath);$(WindowsSDK_IncludePath) + $(ProjectDir)/..;$(ProjectDir)/../thirdparty;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../thirdparty/raknet;$(ProjectDir);$(ProjectDir)/..;$(ProjectDir)/../source;$(ProjectDir)/../source/Network;$(ProjectDir)/../source/Sound;$(ProjectDir)/../source/GameMode;$(ProjectDir)/../source/App;$(ProjectDir)/../source/Base;$(ProjectDir)/../source/GUI;$(ProjectDir)/../source/GUI/Screen;$(ProjectDir)/../source/Renderer;$(ProjectDir)/../source/UserInput;$(ProjectDir)/../source/World;$(ProjectDir)/../source/World/Generator;$(ProjectDir)/../source/World/Item;$(ProjectDir)/../source/World/Tile;$(ProjectDir)/../source/World/Renderer;$(ProjectDir)/../source/World/Entity;$(ProjectDir)/../source/World/Entity/Models;$(ProjectDir)/../source/World/Particle;$(ProjectDir)/../source/World/Storage;$(VC_IncludePath);$(WindowsSDK_IncludePath) $(SolutionDir)bin\$(Platform)\$(Configuration)\ obj\$(Platform)\$(Configuration)\ - $(ProjectDir)/../thirdparty;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../thirdparty/raknet;$(ProjectDir);$(ProjectDir)/..;$(ProjectDir)/../source;$(ProjectDir)/../source/Network;$(ProjectDir)/../source/Sound;$(ProjectDir)/../source/GameMode;$(ProjectDir)/../source/App;$(ProjectDir)/../source/Base;$(ProjectDir)/../source/GUI;$(ProjectDir)/../source/GUI/Screen;$(ProjectDir)/../source/Renderer;$(ProjectDir)/../source/UserInput;$(ProjectDir)/../source/World;$(ProjectDir)/../source/World/Generator;$(ProjectDir)/../source/World/Item;$(ProjectDir)/../source/World/Tile;$(ProjectDir)/../source/World/Renderer;$(ProjectDir)/../source/World/Entity;$(ProjectDir)/../source/World/Entity/Models;$(ProjectDir)/../source/World/Particle;$(ProjectDir)/../source/World/Storage;$(VC_IncludePath);$(WindowsSDK_IncludePath) + $(ProjectDir)/..;$(ProjectDir)/../thirdparty;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../platforms/windows;$(ProjectDir)/../thirdparty/raknet;$(ProjectDir);$(ProjectDir)/..;$(ProjectDir)/../source;$(ProjectDir)/../source/Network;$(ProjectDir)/../source/Sound;$(ProjectDir)/../source/GameMode;$(ProjectDir)/../source/App;$(ProjectDir)/../source/Base;$(ProjectDir)/../source/GUI;$(ProjectDir)/../source/GUI/Screen;$(ProjectDir)/../source/Renderer;$(ProjectDir)/../source/UserInput;$(ProjectDir)/../source/World;$(ProjectDir)/../source/World/Generator;$(ProjectDir)/../source/World/Item;$(ProjectDir)/../source/World/Tile;$(ProjectDir)/../source/World/Renderer;$(ProjectDir)/../source/World/Entity;$(ProjectDir)/../source/World/Entity/Models;$(ProjectDir)/../source/World/Particle;$(ProjectDir)/../source/World/Storage;$(VC_IncludePath);$(WindowsSDK_IncludePath) $(SolutionDir)bin\$(Platform)\$(Configuration)\ obj\$(Platform)\$(Configuration)\