* Disable all enhancements, and fix some errors.

This commit is contained in:
iProgramInCpp 2023-08-03 21:54:02 +03:00
parent fddd3aef6c
commit e1366a0a1f
5 changed files with 33 additions and 25 deletions

View file

@ -10,26 +10,26 @@
#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
#define ENH_ALLOW_SCROLL_WHEEL // Allow use of the scroll wheel to change selected inventory slots
#define ENH_DISABLE_TURN_ACCEL // Disable the turn acceleration mechanism. It should only be used on Xperia Play
#define ENH_3D_INVENTORY_TILES // Uses 3D rendered inventory tiles, use with ENH_SHADE_HELD_TILES to render correctly.
#define ENH_IMPROVED_SAVING // Improve world saving. The original Minecraft doesn't always really save for some reason
//#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
//#define ENH_ALLOW_SCROLL_WHEEL // Allow use of the scroll wheel to change selected inventory slots
//#define ENH_DISABLE_TURN_ACCEL // Disable the turn acceleration mechanism. It should only be used on Xperia Play
//#define ENH_3D_INVENTORY_TILES // Uses 3D rendered inventory tiles, use with ENH_SHADE_HELD_TILES to render correctly.
//#define ENH_IMPROVED_SAVING // Improve world saving. The original Minecraft doesn't always really save for some reason
// Mods
//#define MOD_USE_FLAT_WORLD // Use a flat world instead of the regular world generation
@ -40,7 +40,7 @@
//#define TEST_DROPPED_ITEMS // Allow dropped items to be dropped and collected.
// Toggle Demo Mode
//#define DEMO
#define DEMO
// Enable Debug Mode
#define MC_DEBUG

View file

@ -5,12 +5,8 @@ via binary reverse engineering. This project is similar in terms of goals to [Mi
An Android build will come soon.
### The default build is **enhanced**. If you want the original experience, comment every define and uncomment the demo define from GameMods.hpp.
* Note: The original mcpe01_canada.apk does not work on newer Android devices. A port of this likely will.
Eventually, I plan on creating a new repository, `mcpe01_canada`, which will include just the port of the Canada demo.
### This is the original decompilation version. For the main modified version, see [ReMinecraftPE/mcpe](https://github.com/ReMinecraftPE/mcpe)
## WANT TO HELP?

View file

@ -179,6 +179,8 @@ void ChunkCache::saveAll()
m_pChunkStorage->saveAll(m_pLevel, chunksToSave);
}
#ifdef ENH_IMPROVED_SAVING
void ChunkCache::saveUnsaved()
{
if (!m_pChunkStorage) return;
@ -200,6 +202,8 @@ void ChunkCache::saveUnsaved()
m_pChunkStorage->saveAll(m_pLevel, chunksToSave);
}
#endif
bool ChunkCache::shouldSave()
{
return true;

View file

@ -10,6 +10,8 @@
#include "Level.hpp"
#include "GetTime.h"
#ifndef DEMO
#define C_CHUNKS_TO_SAVE_PER_TICK (2)
ExternalFileLevelStorage::ExternalFileLevelStorage(const std::string& a, const std::string& path) :
@ -312,3 +314,5 @@ bool ExternalFileLevelStorage::writeLevelData(const std::string& path, LevelData
return true;
}
#endif

View file

@ -10,6 +10,8 @@
#include "ExternalFileLevelStorage.hpp"
#include "Util.hpp"
#ifndef DEMO
ExternalFileLevelStorageSource::ExternalFileLevelStorageSource(const std::string& path)
{
m_worldsPath = path;
@ -162,3 +164,5 @@ void ExternalFileLevelStorageSource::addLevelSummaryIfExists(std::vector<LevelSu
ls.field_34 = ld.field_18;
vls.push_back(ls);
}
#endif