Add Clouds

This commit is contained in:
TheBrokenRail 2020-10-02 11:01:40 -04:00
parent 91f46576d9
commit 32acee05fc
2 changed files with 9 additions and 2 deletions

View File

@ -4,7 +4,7 @@ set -e
# Ensure Features Are Selected # Ensure Features Are Selected
if [ -z "${MCPI_SUBSHELL}" ]; then if [ -z "${MCPI_SUBSHELL}" ]; then
MCPI_FEATURES="$(zenity --class minecraft-pi --list --checklist --column 'Enabled' --column 'Feature' FALSE 'Touch GUI' FALSE 'Survival Mode' FALSE 'Fix Bow & Arrow' FALSE 'Fix Attacking' FALSE 'Mob Spawning')" MCPI_FEATURES="$(zenity --class minecraft-pi --list --checklist --column 'Enabled' --column 'Feature' FALSE 'Touch GUI' FALSE 'Survival Mode' FALSE 'Fix Bow & Arrow' FALSE 'Fix Attacking' FALSE 'Mob Spawning' FALSE 'Show Clouds')"
fi fi
export MCPI_FEATURES export MCPI_FEATURES

View File

@ -85,7 +85,8 @@ static int has_feature(const char *name) {
} }
// Defined In extra.cpp // Defined In extra.cpp
extern void readAssetFile(unsigned char *target, unsigned char *app_platform, unsigned char *path); extern unsigned char *readAssetFile(unsigned char *app_platform, unsigned char *path);
extern void openTextEdit(unsigned char *local_player, unsigned char *sign);
__attribute__((constructor)) static void init() { __attribute__((constructor)) static void init() {
if (has_feature("Touch GUI")) { if (has_feature("Touch GUI")) {
@ -142,4 +143,10 @@ __attribute__((constructor)) static void init() {
// Implement AppPlatform::readAssetFile So Translations Work // Implement AppPlatform::readAssetFile So Translations Work
overwrite((void *) 0x12b10, readAssetFile); overwrite((void *) 0x12b10, readAssetFile);
if (has_feature("Show Clouds")) {
// Show Clouds
unsigned char patch_data_8[4] = {0x01, 0x30, 0xa0, 0xe3};
patch((void *) 0x49fcc, patch_data_8);
}
} }