Compare commits
25 Commits
plugins-su
...
8be6e381d8
| Author | SHA1 | Date | |
|---|---|---|---|
| 8be6e381d8 | |||
| 3ab30eefa4 | |||
| 325ab94a64 | |||
| 9434a48ae7 | |||
| 79be815827 | |||
| c616546e1e | |||
| 92f972d320 | |||
| 980fc2ccfb | |||
| 3b82c519d0 | |||
| 002bb40aae | |||
| 6f4a07a306 | |||
| d5a3871f56 | |||
| 0c32f620af | |||
| 93bf97a15e | |||
| 0ee809daf1 | |||
| a048a51300 | |||
| 365d8a10da | |||
| 3940c9ce1b | |||
| 156849eeb6 | |||
| 6a8b192024 | |||
| ce8ca15c56 | |||
| b3561e773d | |||
| 162ec7adfa | |||
| 4cfaa43d77 | |||
|
|
f1e8932fbd |
@@ -320,6 +320,10 @@ target_link_libraries("${PROJECT_NAME}-server" ${CMAKE_THREAD_LIBS_INIT} ${EXTRA
|
|||||||
|
|
||||||
add_executable(${PROJECT_NAME} ${CLIENT_SOURCES})
|
add_executable(${PROJECT_NAME} ${CLIENT_SOURCES})
|
||||||
|
|
||||||
|
if(WIN32)
|
||||||
|
target_sources(${PROJECT_NAME} PRIVATE data/images/pe.rc)
|
||||||
|
endif()
|
||||||
|
|
||||||
target_compile_definitions(${PROJECT_NAME} PUBLIC ${PLATFORM_CPP})
|
target_compile_definitions(${PROJECT_NAME} PUBLIC ${PLATFORM_CPP})
|
||||||
|
|
||||||
target_include_directories(${PROJECT_NAME} PUBLIC
|
target_include_directories(${PROJECT_NAME} PUBLIC
|
||||||
|
|||||||
44
README.md
44
README.md
@@ -1,6 +1,6 @@
|
|||||||
# MinecraftPE
|
# MinecraftPE
|
||||||
> [!Warning]
|
> [!Warning]
|
||||||
> Github repository **isnt main**. All issues and pull requests should be send in [Gitea Repository](https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1).
|
> [Github repository](https://github.com/Minecraft-PE-0-6-1/minecraft-pe-0.6.1-on-all) **isnt main**. All issues and pull requests should be send in [Gitea Repository](https://gitea.sffempire.ru/Kolyah35/minecraft-pe-0.6.1).
|
||||||
|
|
||||||
> [!Important]
|
> [!Important]
|
||||||
> We have a discord server, where you can report bugs or send feedback https://discord.gg/c58YesBxve
|
> We have a discord server, where you can report bugs or send feedback https://discord.gg/c58YesBxve
|
||||||
@@ -9,23 +9,20 @@ Source code for **Minecraft Pocket Edition 0.6.1 alpha** with various fixes and
|
|||||||
|
|
||||||
This project aims to preserve and improve this early version of Minecraft PE.
|
This project aims to preserve and improve this early version of Minecraft PE.
|
||||||
|
|
||||||
# TODO / Roadmap
|
# Features
|
||||||
- [x] Add platform GLFW
|
- Support for modern IOS and Android, Linux, Web
|
||||||
- [x] Compile for Linux
|
- Improved Dedicated Server (Windows build, anticheat, commands, etc)
|
||||||
- [x] Compile for android aarch64
|
- Features from Beta version of Minecraft (Grass tint, Beta sky, Smooth lighting, etc) and other tweaks
|
||||||
- [x] Touch control improvements
|
|
||||||
- [ ] Screen fixes
|
# Screenshots
|
||||||
- [ ] Rewrite platform logic
|
<p align="center">
|
||||||
- [x] Fix sound
|
|
||||||
- [x] Do a server connection GUI
|
<img width="49%" alt="menu" src="https://sffempire.ru/mcpe-screenshots/menu.png" />
|
||||||
- [ ] Controller support
|
<img width="49%" alt="settings" src="https://sffempire.ru/mcpe-screenshots/settings.png" />
|
||||||
- [x] Minecraft server hosting
|
<img width="49%" alt="worlds" src="https://sffempire.ru/mcpe-screenshots/worlds.png" />
|
||||||
- [x] Screen fixess
|
<img width="49%" alt="gameplay" src="https://sffempire.ru/mcpe-screenshots/gameplay.png" />
|
||||||
- [x] Fix fog
|
|
||||||
- [x] Add sprinting
|
</p>
|
||||||
- [x] Chat (semi working) and commands
|
|
||||||
- [x] Implementing options
|
|
||||||
- [x] Better F3
|
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
|
|
||||||
@@ -79,8 +76,14 @@ cmake --build .
|
|||||||
```
|
```
|
||||||
C:\android-ndk-r14b
|
C:\android-ndk-r14b
|
||||||
```
|
```
|
||||||
|
3. Install **Build tools 35** with [SDKManager](https://dl.google.com/android/repository/commandlinetools-win-15859902_latest.zip) (build-tools should be in AppData):
|
||||||
|
|
||||||
3. Run the build script:
|
```powershell
|
||||||
|
sdkmanager "build-tools;35.0.0" --sdk_root="%LocalAppData%\Android\Sdk"
|
||||||
|
sdkmanager "build-tools;android-36" --sdk_root="%LocalAppData%\Android\Sdk"
|
||||||
|
```
|
||||||
|
|
||||||
|
4. Run the build script:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
# Full build (NDK + Java + APK + install)
|
# Full build (NDK + Java + APK + install)
|
||||||
@@ -154,7 +157,6 @@ cmake --build .
|
|||||||
|
|
||||||
```bash
|
```bash
|
||||||
35.0.0
|
35.0.0
|
||||||
33.0.2
|
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Download **Android NDK r14b**:
|
6. Download **Android NDK r14b**:
|
||||||
@@ -200,7 +202,7 @@ cmake --build .
|
|||||||
```
|
```
|
||||||
## iOS
|
## iOS
|
||||||
### Xcode
|
### Xcode
|
||||||
> [Note!]
|
> [!Note]
|
||||||
> There's a precompiled IPA artifact in the GitHub mirror under Actions for those who either don't have Macs or don't want to build themself. But if you want to build youself, you'll need a Mac with Xcode. Download Xcode from the Mac App Store.
|
> There's a precompiled IPA artifact in the GitHub mirror under Actions for those who either don't have Macs or don't want to build themself. But if you want to build youself, you'll need a Mac with Xcode. Download Xcode from the Mac App Store.
|
||||||
|
|
||||||
### 1. Clone
|
### 1. Clone
|
||||||
|
|||||||
BIN
data/images/pe.ico
Normal file
BIN
data/images/pe.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 63 KiB |
1
data/images/pe.rc
Normal file
1
data/images/pe.rc
Normal file
@@ -0,0 +1 @@
|
|||||||
|
IDI_ICON1 ICON "pe.ico"
|
||||||
@@ -47,6 +47,8 @@
|
|||||||
9D293CE816071C08000305C8 /* CreateNewWorld_iphone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9D293CE616071C08000305C8 /* CreateNewWorld_iphone.xib */; };
|
9D293CE816071C08000305C8 /* CreateNewWorld_iphone.xib in Resources */ = {isa = PBXBuildFile; fileRef = 9D293CE616071C08000305C8 /* CreateNewWorld_iphone.xib */; };
|
||||||
9D293CEB160720D6000305C8 /* worldname_iphone5_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 9D293CEA160720D6000305C8 /* worldname_iphone5_3.png */; };
|
9D293CEB160720D6000305C8 /* worldname_iphone5_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 9D293CEA160720D6000305C8 /* worldname_iphone5_3.png */; };
|
||||||
9D293CEC160720D6000305C8 /* worldname_iphone5_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 9D293CEA160720D6000305C8 /* worldname_iphone5_3.png */; };
|
9D293CEC160720D6000305C8 /* worldname_iphone5_3.png in Resources */ = {isa = PBXBuildFile; fileRef = 9D293CEA160720D6000305C8 /* worldname_iphone5_3.png */; };
|
||||||
|
BEEF202614CFF670005F0002 /* Lighting.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BEEF202614CFF670005F0001 /* Lighting.cpp */; };
|
||||||
|
BEEF202614CFF670005F0003 /* Lighting.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BEEF202614CFF670005F0001 /* Lighting.cpp */; };
|
||||||
D506D3E2161288BD0099FA65 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9D959AFF16036BEE00E23A6F /* Default-568h@2x.png */; };
|
D506D3E2161288BD0099FA65 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 9D959AFF16036BEE00E23A6F /* Default-568h@2x.png */; };
|
||||||
D51DC73614581D4E00E3D761 /* itemframe.png in Resources */ = {isa = PBXBuildFile; fileRef = D51DC73514581D4E00E3D761 /* itemframe.png */; };
|
D51DC73614581D4E00E3D761 /* itemframe.png in Resources */ = {isa = PBXBuildFile; fileRef = D51DC73514581D4E00E3D761 /* itemframe.png */; };
|
||||||
D51DC74314592B8B00E3D761 /* PVRTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = D51DC74214592B8A00E3D761 /* PVRTexture.m */; };
|
D51DC74314592B8B00E3D761 /* PVRTexture.m in Sources */ = {isa = PBXBuildFile; fileRef = D51DC74214592B8A00E3D761 /* PVRTexture.m */; };
|
||||||
@@ -1179,8 +1181,19 @@
|
|||||||
F99F0FAD2F8436CE00F2B29A /* FoliageColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F99F0FAB2F8436CE00F2B29A /* FoliageColor.cpp */; };
|
F99F0FAD2F8436CE00F2B29A /* FoliageColor.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F99F0FAB2F8436CE00F2B29A /* FoliageColor.cpp */; };
|
||||||
F99F0FAF2F8436EB00F2B29A /* Color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F99F0FAE2F8436EB00F2B29A /* Color.cpp */; };
|
F99F0FAF2F8436EB00F2B29A /* Color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F99F0FAE2F8436EB00F2B29A /* Color.cpp */; };
|
||||||
F99F0FB02F8436EB00F2B29A /* Color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F99F0FAE2F8436EB00F2B29A /* Color.cpp */; };
|
F99F0FB02F8436EB00F2B29A /* Color.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F99F0FAE2F8436EB00F2B29A /* Color.cpp */; };
|
||||||
BEEF202614CFF670005F0002 /* Lighting.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BEEF202614CFF670005F0001 /* Lighting.cpp */; };
|
F9E5A772300E7A8700164066 /* LevelConstants.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F9E5A771300E7A8700164066 /* LevelConstants.cpp */; };
|
||||||
BEEF202614CFF670005F0003 /* Lighting.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BEEF202614CFF670005F0001 /* Lighting.cpp */; };
|
F9E5A775300E7AB700164066 /* CommandManager.hpp in Sources */ = {isa = PBXBuildFile; fileRef = F9E5A773300E7AB700164066 /* CommandManager.hpp */; };
|
||||||
|
F9E5A776300E7AB700164066 /* CommandManager.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F9E5A774300E7AB700164066 /* CommandManager.cpp */; };
|
||||||
|
F9E5A779300E7AD500164066 /* CommandBan.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F9E5A777300E7AD500164066 /* CommandBan.cpp */; };
|
||||||
|
F9E5A77A300E7AD500164066 /* CommandBan.hpp in Sources */ = {isa = PBXBuildFile; fileRef = F9E5A778300E7AD500164066 /* CommandBan.hpp */; };
|
||||||
|
F9E5A77D300E7AF400164066 /* CommandHelp.hpp in Sources */ = {isa = PBXBuildFile; fileRef = F9E5A77B300E7AF400164066 /* CommandHelp.hpp */; };
|
||||||
|
F9E5A77E300E7AF400164066 /* CommandHelp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F9E5A77C300E7AF400164066 /* CommandHelp.cpp */; };
|
||||||
|
F9E5A783300E7B0B00164066 /* CommandKick.hpp in Sources */ = {isa = PBXBuildFile; fileRef = F9E5A77F300E7B0A00164066 /* CommandKick.hpp */; };
|
||||||
|
F9E5A784300E7B0B00164066 /* CommandOp.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F9E5A780300E7B0A00164066 /* CommandOp.cpp */; };
|
||||||
|
F9E5A785300E7B0B00164066 /* CommandKick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F9E5A781300E7B0B00164066 /* CommandKick.cpp */; };
|
||||||
|
F9E5A786300E7B0B00164066 /* CommandOp.hpp in Sources */ = {isa = PBXBuildFile; fileRef = F9E5A782300E7B0B00164066 /* CommandOp.hpp */; };
|
||||||
|
F9E5A789300E7B3400164066 /* Command.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F9E5A787300E7B3400164066 /* Command.cpp */; };
|
||||||
|
F9E5A78A300E7B3400164066 /* Command.hpp in Sources */ = {isa = PBXBuildFile; fileRef = F9E5A788300E7B3400164066 /* Command.hpp */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXFileReference section */
|
/* Begin PBXFileReference section */
|
||||||
@@ -1248,6 +1261,7 @@
|
|||||||
9D293CE616071C08000305C8 /* CreateNewWorld_iphone.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CreateNewWorld_iphone.xib; path = minecraftpe/dialogs/CreateNewWorld_iphone.xib; sourceTree = "<group>"; };
|
9D293CE616071C08000305C8 /* CreateNewWorld_iphone.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = CreateNewWorld_iphone.xib; path = minecraftpe/dialogs/CreateNewWorld_iphone.xib; sourceTree = "<group>"; };
|
||||||
9D293CEA160720D6000305C8 /* worldname_iphone5_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = worldname_iphone5_3.png; sourceTree = "<group>"; };
|
9D293CEA160720D6000305C8 /* worldname_iphone5_3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = worldname_iphone5_3.png; sourceTree = "<group>"; };
|
||||||
9D959AFF16036BEE00E23A6F /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
|
9D959AFF16036BEE00E23A6F /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = "<group>"; };
|
||||||
|
BEEF202614CFF670005F0001 /* Lighting.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Lighting.cpp; sourceTree = "<group>"; };
|
||||||
D51A8B01146A200000E5D720 /* minecraftpedemo-info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "minecraftpedemo-info.plist"; sourceTree = "<group>"; };
|
D51A8B01146A200000E5D720 /* minecraftpedemo-info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "minecraftpedemo-info.plist"; sourceTree = "<group>"; };
|
||||||
D51DC73514581D4E00E3D761 /* itemframe.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = itemframe.png; sourceTree = "<group>"; };
|
D51DC73514581D4E00E3D761 /* itemframe.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = itemframe.png; sourceTree = "<group>"; };
|
||||||
D51DC74114592B8A00E3D761 /* PVRTexture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PVRTexture.h; sourceTree = "<group>"; };
|
D51DC74114592B8A00E3D761 /* PVRTexture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PVRTexture.h; sourceTree = "<group>"; };
|
||||||
@@ -2468,7 +2482,19 @@
|
|||||||
F99F0FA82F84369F00F2B29A /* GrassColor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GrassColor.cpp; sourceTree = "<group>"; };
|
F99F0FA82F84369F00F2B29A /* GrassColor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = GrassColor.cpp; sourceTree = "<group>"; };
|
||||||
F99F0FAB2F8436CE00F2B29A /* FoliageColor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FoliageColor.cpp; sourceTree = "<group>"; };
|
F99F0FAB2F8436CE00F2B29A /* FoliageColor.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = FoliageColor.cpp; sourceTree = "<group>"; };
|
||||||
F99F0FAE2F8436EB00F2B29A /* Color.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Color.cpp; sourceTree = "<group>"; };
|
F99F0FAE2F8436EB00F2B29A /* Color.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; path = Color.cpp; sourceTree = "<group>"; };
|
||||||
BEEF202614CFF670005F0001 /* Lighting.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Lighting.cpp; path = Lighting.cpp; sourceTree = "<group>"; };
|
F9E5A771300E7A8700164066 /* LevelConstants.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = LevelConstants.cpp; path = ../../src/world/level/LevelConstants.cpp; sourceTree = "<group>"; };
|
||||||
|
F9E5A773300E7AB700164066 /* CommandManager.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = CommandManager.hpp; path = ../../src/commands/CommandManager.hpp; sourceTree = "<group>"; };
|
||||||
|
F9E5A774300E7AB700164066 /* CommandManager.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CommandManager.cpp; path = ../../src/commands/CommandManager.cpp; sourceTree = "<group>"; };
|
||||||
|
F9E5A777300E7AD500164066 /* CommandBan.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CommandBan.cpp; path = ../../src/commands/CommandBan.cpp; sourceTree = "<group>"; };
|
||||||
|
F9E5A778300E7AD500164066 /* CommandBan.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = CommandBan.hpp; path = ../../src/commands/CommandBan.hpp; sourceTree = "<group>"; };
|
||||||
|
F9E5A77B300E7AF400164066 /* CommandHelp.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = CommandHelp.hpp; path = ../../src/commands/CommandHelp.hpp; sourceTree = "<group>"; };
|
||||||
|
F9E5A77C300E7AF400164066 /* CommandHelp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CommandHelp.cpp; path = ../../src/commands/CommandHelp.cpp; sourceTree = "<group>"; };
|
||||||
|
F9E5A77F300E7B0A00164066 /* CommandKick.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = CommandKick.hpp; path = ../../src/commands/CommandKick.hpp; sourceTree = "<group>"; };
|
||||||
|
F9E5A780300E7B0A00164066 /* CommandOp.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CommandOp.cpp; path = ../../src/commands/CommandOp.cpp; sourceTree = "<group>"; };
|
||||||
|
F9E5A781300E7B0B00164066 /* CommandKick.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = CommandKick.cpp; path = ../../src/commands/CommandKick.cpp; sourceTree = "<group>"; };
|
||||||
|
F9E5A782300E7B0B00164066 /* CommandOp.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = CommandOp.hpp; path = ../../src/commands/CommandOp.hpp; sourceTree = "<group>"; };
|
||||||
|
F9E5A787300E7B3400164066 /* Command.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = Command.cpp; path = ../../src/commands/Command.cpp; sourceTree = "<group>"; };
|
||||||
|
F9E5A788300E7B3400164066 /* Command.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = Command.hpp; path = ../../src/commands/Command.hpp; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
@@ -4319,6 +4345,19 @@
|
|||||||
D5CF9C37144C225000E4244F = {
|
D5CF9C37144C225000E4244F = {
|
||||||
isa = PBXGroup;
|
isa = PBXGroup;
|
||||||
children = (
|
children = (
|
||||||
|
F9E5A788300E7B3400164066 /* Command.hpp */,
|
||||||
|
F9E5A787300E7B3400164066 /* Command.cpp */,
|
||||||
|
F9E5A77F300E7B0A00164066 /* CommandKick.hpp */,
|
||||||
|
F9E5A781300E7B0B00164066 /* CommandKick.cpp */,
|
||||||
|
F9E5A782300E7B0B00164066 /* CommandOp.hpp */,
|
||||||
|
F9E5A780300E7B0A00164066 /* CommandOp.cpp */,
|
||||||
|
F9E5A77B300E7AF400164066 /* CommandHelp.hpp */,
|
||||||
|
F9E5A77C300E7AF400164066 /* CommandHelp.cpp */,
|
||||||
|
F9E5A778300E7AD500164066 /* CommandBan.hpp */,
|
||||||
|
F9E5A777300E7AD500164066 /* CommandBan.cpp */,
|
||||||
|
F9E5A773300E7AB700164066 /* CommandManager.hpp */,
|
||||||
|
F9E5A774300E7AB700164066 /* CommandManager.cpp */,
|
||||||
|
F9E5A771300E7A8700164066 /* LevelConstants.cpp */,
|
||||||
F99D344D2F7372A100DC153E /* Launch Screen.storyboard */,
|
F99D344D2F7372A100DC153E /* Launch Screen.storyboard */,
|
||||||
D5E1BA9A1451C8A0007DCC4F /* Default@2x.png */,
|
D5E1BA9A1451C8A0007DCC4F /* Default@2x.png */,
|
||||||
9D959AFF16036BEE00E23A6F /* Default-568h@2x.png */,
|
9D959AFF16036BEE00E23A6F /* Default-568h@2x.png */,
|
||||||
@@ -5451,6 +5490,19 @@
|
|||||||
isa = PBXSourcesBuildPhase;
|
isa = PBXSourcesBuildPhase;
|
||||||
buildActionMask = 2147483647;
|
buildActionMask = 2147483647;
|
||||||
files = (
|
files = (
|
||||||
|
F9E5A789300E7B3400164066 /* Command.cpp in Sources */,
|
||||||
|
F9E5A78A300E7B3400164066 /* Command.hpp in Sources */,
|
||||||
|
F9E5A783300E7B0B00164066 /* CommandKick.hpp in Sources */,
|
||||||
|
F9E5A784300E7B0B00164066 /* CommandOp.cpp in Sources */,
|
||||||
|
F9E5A785300E7B0B00164066 /* CommandKick.cpp in Sources */,
|
||||||
|
F9E5A786300E7B0B00164066 /* CommandOp.hpp in Sources */,
|
||||||
|
F9E5A77D300E7AF400164066 /* CommandHelp.hpp in Sources */,
|
||||||
|
F9E5A77E300E7AF400164066 /* CommandHelp.cpp in Sources */,
|
||||||
|
F9E5A779300E7AD500164066 /* CommandBan.cpp in Sources */,
|
||||||
|
F9E5A77A300E7AD500164066 /* CommandBan.hpp in Sources */,
|
||||||
|
F9E5A775300E7AB700164066 /* CommandManager.hpp in Sources */,
|
||||||
|
F9E5A776300E7AB700164066 /* CommandManager.cpp in Sources */,
|
||||||
|
F9E5A772300E7A8700164066 /* LevelConstants.cpp in Sources */,
|
||||||
F912B8CF2F6C3D5200BC60DF /* TextBox.h in Sources */,
|
F912B8CF2F6C3D5200BC60DF /* TextBox.h in Sources */,
|
||||||
D5CF9C57144C225000E4244F /* main.mm in Sources */,
|
D5CF9C57144C225000E4244F /* main.mm in Sources */,
|
||||||
D5CF9C5B144C225000E4244F /* minecraftpeAppDelegate.mm in Sources */,
|
D5CF9C5B144C225000E4244F /* minecraftpeAppDelegate.mm in Sources */,
|
||||||
|
|||||||
@@ -65,17 +65,17 @@ OptionBool useVignette("useVignette", true);
|
|||||||
OptionBool useTouchscreen("useTouchscreen", true);
|
OptionBool useTouchscreen("useTouchscreen", true);
|
||||||
|
|
||||||
OptionBool serverVisible("servervisible", true);
|
OptionBool serverVisible("servervisible", true);
|
||||||
|
#ifndef __APPLE__
|
||||||
OptionBool foliageTint("foliagetint", true);
|
OptionBool foliageTint("foliagetint", false);
|
||||||
|
#endif
|
||||||
OptionInt fogType("fogType", 0, 0, 2);
|
OptionInt fogType("fogType", 0, 0, 2);
|
||||||
|
|
||||||
OptionBool javaHud("javaHud", false);
|
OptionBool javaHud("javaHud", false);
|
||||||
|
|
||||||
OptionBool betaSky("betaSky", false);
|
OptionBool betaSky("betaSky", false);
|
||||||
|
#ifndef __APPLE__
|
||||||
OptionBool tintedSide("tintedSide", false);
|
OptionBool tintedSide("tintedSide", false);
|
||||||
|
#endif
|
||||||
OptionBool blockOutline("blockOutline", false);
|
OptionBool blockOutline("blockOutline", false);
|
||||||
|
|
||||||
OptionBool restoredAnims("restoredAnims", true);
|
OptionBool restoredAnims("restoredAnims", true);
|
||||||
@@ -199,17 +199,18 @@ void Options::initTable() {
|
|||||||
m_options[OPTIONS_BAR_ON_TOP] = &barOnTop;
|
m_options[OPTIONS_BAR_ON_TOP] = &barOnTop;
|
||||||
m_options[OPTIONS_ALLOW_SPRINT] = &allowSprint;
|
m_options[OPTIONS_ALLOW_SPRINT] = &allowSprint;
|
||||||
m_options[OPTIONS_RPI_CURSOR] = &rpiCursor;
|
m_options[OPTIONS_RPI_CURSOR] = &rpiCursor;
|
||||||
|
#ifndef __APPLE__
|
||||||
m_options[OPTIONS_FOLIAGE_TINT] = &foliageTint;
|
m_options[OPTIONS_FOLIAGE_TINT] = &foliageTint;
|
||||||
|
#endif
|
||||||
// more options yay
|
// more options yay
|
||||||
m_options[OPTIONS_FOG_TYPE] = &fogType;
|
m_options[OPTIONS_FOG_TYPE] = &fogType;
|
||||||
|
|
||||||
m_options[OPTIONS_DEBUG_STYLE] = &debugStyle;
|
m_options[OPTIONS_DEBUG_STYLE] = &debugStyle;
|
||||||
|
|
||||||
m_options[OPTIONS_BETA_SKY] = &betaSky;
|
m_options[OPTIONS_BETA_SKY] = &betaSky;
|
||||||
|
#ifndef __APPLE__
|
||||||
m_options[OPTIONS_TINTED_SIDE] = &tintedSide;
|
m_options[OPTIONS_TINTED_SIDE] = &tintedSide;
|
||||||
|
#endif
|
||||||
m_options[OPTIONS_JAVA_HUD] = &javaHud;
|
m_options[OPTIONS_JAVA_HUD] = &javaHud;
|
||||||
|
|
||||||
m_options[OPTIONS_AUTOJUMP] = &autoJump;
|
m_options[OPTIONS_AUTOJUMP] = &autoJump;
|
||||||
|
|||||||
@@ -88,11 +88,15 @@ enum OptionId {
|
|||||||
OPTIONS_LAST_IP,
|
OPTIONS_LAST_IP,
|
||||||
|
|
||||||
OPTIONS_RPI_CURSOR,
|
OPTIONS_RPI_CURSOR,
|
||||||
|
#ifndef __APPLE__
|
||||||
OPTIONS_FOLIAGE_TINT,
|
OPTIONS_FOLIAGE_TINT,
|
||||||
|
#endif
|
||||||
OPTIONS_FOG_TYPE,
|
OPTIONS_FOG_TYPE,
|
||||||
OPTIONS_JAVA_HUD,
|
OPTIONS_JAVA_HUD,
|
||||||
OPTIONS_RESTORED_ANIMS,
|
OPTIONS_RESTORED_ANIMS,
|
||||||
|
#ifndef __APPLE__
|
||||||
OPTIONS_TINTED_SIDE,
|
OPTIONS_TINTED_SIDE,
|
||||||
|
#endif
|
||||||
OPTIONS_BETA_SKY,
|
OPTIONS_BETA_SKY,
|
||||||
OPTIONS_BEAUTIFUL_SKY,
|
OPTIONS_BEAUTIFUL_SKY,
|
||||||
OPTIONS_VIGNETTE,
|
OPTIONS_VIGNETTE,
|
||||||
|
|||||||
@@ -35,6 +35,17 @@ void GuiElementContainer::removeChild( GuiElement* element ) {
|
|||||||
children.erase(it);
|
children.erase(it);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool GuiElementContainer::containsPointInChildren(int x, int y) const {
|
||||||
|
for (auto it = children.begin(); it != children.end(); ++it) {
|
||||||
|
GuiElement* child = *it;
|
||||||
|
if (child == NULL || !child->visible) continue;
|
||||||
|
if (child->pointInside(x, y)) return true;
|
||||||
|
const GuiElementContainer* container = dynamic_cast<const GuiElementContainer*>(child);
|
||||||
|
if (container != NULL && container->containsPointInChildren(x, y)) return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
void GuiElementContainer::tick( Minecraft* minecraft ) {
|
void GuiElementContainer::tick( Minecraft* minecraft ) {
|
||||||
for(std::vector<GuiElement*>::iterator it = children.begin(); it != children.end(); ++it) {
|
for(std::vector<GuiElement*>::iterator it = children.begin(); it != children.end(); ++it) {
|
||||||
(*it)->tick(minecraft);
|
(*it)->tick(minecraft);
|
||||||
|
|||||||
@@ -13,6 +13,7 @@ public:
|
|||||||
virtual void setupPositions();
|
virtual void setupPositions();
|
||||||
virtual void addChild(GuiElement* element);
|
virtual void addChild(GuiElement* element);
|
||||||
virtual void removeChild(GuiElement* element);
|
virtual void removeChild(GuiElement* element);
|
||||||
|
bool containsPointInChildren(int x, int y) const;
|
||||||
|
|
||||||
virtual void tick( Minecraft* minecraft );
|
virtual void tick( Minecraft* minecraft );
|
||||||
|
|
||||||
|
|||||||
@@ -6,15 +6,26 @@
|
|||||||
#include "../../../locale/I18n.h"
|
#include "../../../locale/I18n.h"
|
||||||
#include "TextOption.h"
|
#include "TextOption.h"
|
||||||
#include "KeyOption.h"
|
#include "KeyOption.h"
|
||||||
|
#include <algorithm>
|
||||||
|
#include "../Gui.h"
|
||||||
|
#include "../Screen.h"
|
||||||
|
#include "../../../platform/input/Mouse.h"
|
||||||
|
#include "../../../util/Mth.h"
|
||||||
|
|
||||||
OptionsGroup::OptionsGroup( std::string labelID ) {
|
OptionsGroup::OptionsGroup( std::string labelID ) {
|
||||||
label = I18n::get(labelID);
|
label = I18n::get(labelID);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptionsGroup::setupPositions() {
|
void OptionsGroup::setupPositions() {
|
||||||
|
const int labelHeight = 18;
|
||||||
|
const int bottomPadding = 36;
|
||||||
|
const float requestedScroll = scrollOffsetY;
|
||||||
|
const int scrollOffset = (int)requestedScroll;
|
||||||
|
int curY = y + labelHeight - scrollOffset;
|
||||||
|
const int contentStartY = y + labelHeight;
|
||||||
|
|
||||||
// First we write the header and then we add the items
|
// First we write the header and then we add the items
|
||||||
int curY = y + 18;
|
for(auto it = children.begin(); it != children.end(); ++it) {
|
||||||
for(std::vector<GuiElement*>::iterator it = children.begin(); it != children.end(); ++it) {
|
|
||||||
(*it)->width = width - 5;
|
(*it)->width = width - 5;
|
||||||
|
|
||||||
(*it)->y = curY;
|
(*it)->y = curY;
|
||||||
@@ -22,16 +33,109 @@ void OptionsGroup::setupPositions() {
|
|||||||
(*it)->setupPositions();
|
(*it)->setupPositions();
|
||||||
curY += (*it)->height + 3;
|
curY += (*it)->height + 3;
|
||||||
}
|
}
|
||||||
height = curY;
|
curY += bottomPadding;
|
||||||
|
contentHeight = std::max(0, curY - contentStartY + scrollOffset);
|
||||||
|
maxScrollOffsetY = std::max(0, contentHeight - (height - labelHeight));
|
||||||
|
const float clampedScroll = Mth::clamp(requestedScroll, 0.0f, maxScrollOffsetY);
|
||||||
|
if (clampedScroll != requestedScroll) {
|
||||||
|
scrollOffsetY = clampedScroll;
|
||||||
|
setupPositions();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void OptionsGroup::render( Minecraft* minecraft, int xm, int ym ) {
|
void OptionsGroup::render( Minecraft* minecraft, int xm, int ym ) {
|
||||||
float padX = 10.0f;
|
float padX = 10.0f;
|
||||||
float padY = 5.0f;
|
float padY = 5.0f;
|
||||||
|
const int labelHeight = 18;
|
||||||
|
|
||||||
minecraft->font->draw(label, (float)x + padX, (float)y + padY, 0xffffffff, false);
|
minecraft->font->draw(label, (float)x + padX, (float)y + padY, 0xffffffff, false);
|
||||||
|
|
||||||
|
glEnable2(GL_SCISSOR_TEST);
|
||||||
|
glScissor(
|
||||||
|
Gui::GuiScale * x,
|
||||||
|
minecraft->height - Gui::GuiScale * (y + height),
|
||||||
|
Gui::GuiScale * width,
|
||||||
|
Gui::GuiScale * (height - labelHeight)
|
||||||
|
);
|
||||||
|
|
||||||
super::render(minecraft, xm, ym);
|
super::render(minecraft, xm, ym);
|
||||||
|
glDisable2(GL_SCISSOR_TEST);
|
||||||
|
}
|
||||||
|
|
||||||
|
void OptionsGroup::tick(Minecraft* minecraft) {
|
||||||
|
int xm = Mouse::getX();
|
||||||
|
int ym = Mouse::getY();
|
||||||
|
if (minecraft->screen != NULL) {
|
||||||
|
minecraft->screen->toGUICoordinate(xm, ym);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool leftDown = Mouse::isButtonDown(MouseAction::ACTION_LEFT);
|
||||||
|
|
||||||
|
if (trackingScrollGesture && leftDown) {
|
||||||
|
int dy = ym - lastDragY;
|
||||||
|
int dx = xm - dragStartX;
|
||||||
|
if (!scrollingGesture) {
|
||||||
|
int totalDx = xm - dragStartX;
|
||||||
|
int totalDy = ym - dragStartY;
|
||||||
|
if (std::abs(totalDx) >= ScrollStartThreshold || std::abs(totalDy) >= ScrollStartThreshold) {
|
||||||
|
if (std::abs(totalDy) >= std::abs(totalDx)) {
|
||||||
|
scrollingGesture = true;
|
||||||
|
} else if (!touchDispatched) {
|
||||||
|
super::mouseClicked(minecraft, touchStartX, touchStartY, MouseAction::ACTION_LEFT);
|
||||||
|
touchDispatched = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (scrollingGesture && dy != 0) {
|
||||||
|
scrollByPixels((float)dy);
|
||||||
|
}
|
||||||
|
lastDragY = ym;
|
||||||
|
}
|
||||||
|
super::tick(minecraft);
|
||||||
|
}
|
||||||
|
|
||||||
|
void OptionsGroup::mouseClicked(Minecraft* minecraft, int x, int y, int buttonNum) {
|
||||||
|
trackingScrollGesture = false;
|
||||||
|
scrollingGesture = false;
|
||||||
|
touchDispatched = false;
|
||||||
|
|
||||||
|
if (buttonNum == MouseAction::ACTION_LEFT && pointInside(x, y)) {
|
||||||
|
trackingScrollGesture = true;
|
||||||
|
dragStartX = x;
|
||||||
|
dragStartY = y;
|
||||||
|
lastDragY = y;
|
||||||
|
touchStartX = x;
|
||||||
|
touchStartY = y;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
super::mouseClicked(minecraft, x, y, buttonNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
void OptionsGroup::mouseReleased(Minecraft* minecraft, int x, int y, int buttonNum) {
|
||||||
|
bool wasScrolling = scrollingGesture;
|
||||||
|
bool wasTracking = trackingScrollGesture;
|
||||||
|
trackingScrollGesture = false;
|
||||||
|
scrollingGesture = false;
|
||||||
|
if (buttonNum == MouseAction::ACTION_LEFT && wasTracking && !touchDispatched && pointInside(touchStartX, touchStartY)) {
|
||||||
|
super::mouseClicked(minecraft, touchStartX, touchStartY, buttonNum);
|
||||||
|
touchDispatched = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!wasScrolling) {
|
||||||
|
super::mouseReleased(minecraft, x, y, buttonNum);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OptionsGroup::scrollByPixels(float deltaY) {
|
||||||
|
if (deltaY == 0.0f || maxScrollOffsetY <= 0.0f) return;
|
||||||
|
|
||||||
|
scrollOffsetY = Mth::clamp(scrollOffsetY - deltaY, 0.0f, maxScrollOffsetY);
|
||||||
|
setupPositions();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool OptionsGroup::isScrollingGestureActive() const {
|
||||||
|
return trackingScrollGesture || scrollingGesture;
|
||||||
}
|
}
|
||||||
|
|
||||||
OptionsGroup& OptionsGroup::addOptionItem(OptionId optId, Minecraft* minecraft ) {
|
OptionsGroup& OptionsGroup::addOptionItem(OptionId optId, Minecraft* minecraft ) {
|
||||||
|
|||||||
@@ -17,7 +17,12 @@ public:
|
|||||||
OptionsGroup(std::string labelID);
|
OptionsGroup(std::string labelID);
|
||||||
virtual void setupPositions();
|
virtual void setupPositions();
|
||||||
virtual void render(Minecraft* minecraft, int xm, int ym);
|
virtual void render(Minecraft* minecraft, int xm, int ym);
|
||||||
|
virtual void tick(Minecraft* minecraft);
|
||||||
|
virtual void mouseClicked(Minecraft* minecraft, int x, int y, int buttonNum);
|
||||||
|
virtual void mouseReleased(Minecraft* minecraft, int x, int y, int buttonNum);
|
||||||
OptionsGroup& addOptionItem(OptionId optId, Minecraft* minecraft);
|
OptionsGroup& addOptionItem(OptionId optId, Minecraft* minecraft);
|
||||||
|
void scrollByPixels(float deltaY);
|
||||||
|
bool isScrollingGestureActive() const;
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
void createToggle(OptionId optId, Minecraft* minecraft);
|
void createToggle(OptionId optId, Minecraft* minecraft);
|
||||||
@@ -27,6 +32,18 @@ protected:
|
|||||||
void createKey(OptionId optId, Minecraft* minecraft);
|
void createKey(OptionId optId, Minecraft* minecraft);
|
||||||
|
|
||||||
std::string label;
|
std::string label;
|
||||||
|
int contentHeight = 0;
|
||||||
|
float scrollOffsetY = 0.f;
|
||||||
|
float maxScrollOffsetY = 0.f;
|
||||||
|
bool trackingScrollGesture = false;
|
||||||
|
bool scrollingGesture = false;
|
||||||
|
bool touchDispatched = false;
|
||||||
|
int dragStartX = 0;
|
||||||
|
int dragStartY = 0;
|
||||||
|
int lastDragY = 0;
|
||||||
|
int touchStartX = 0;
|
||||||
|
int touchStartY = 0;
|
||||||
|
static const int ScrollStartThreshold = 5;
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__OptionsGroup_H__*/
|
#endif /*NET_MINECRAFT_CLIENT_GUI_COMPONENTS__OptionsGroup_H__*/
|
||||||
|
|||||||
@@ -121,6 +121,7 @@ void OptionsScreen::setupPositions() {
|
|||||||
(*it)->x = categoryButtons[0]->width;
|
(*it)->x = categoryButtons[0]->width;
|
||||||
(*it)->y = bHeader->height;
|
(*it)->y = bHeader->height;
|
||||||
(*it)->width = width - categoryButtons[0]->width;
|
(*it)->width = width - categoryButtons[0]->width;
|
||||||
|
(*it)->height = height - bHeader->height;
|
||||||
|
|
||||||
(*it)->setupPositions();
|
(*it)->setupPositions();
|
||||||
}
|
}
|
||||||
@@ -237,8 +238,10 @@ void OptionsScreen::generateOptionScreens() {
|
|||||||
.addOptionItem(OPTIONS_BAR_ON_TOP, minecraft)
|
.addOptionItem(OPTIONS_BAR_ON_TOP, minecraft)
|
||||||
.addOptionItem(OPTIONS_MENU_STYLE, minecraft)
|
.addOptionItem(OPTIONS_MENU_STYLE, minecraft)
|
||||||
.addOptionItem(OPTIONS_RPI_CURSOR, minecraft)
|
.addOptionItem(OPTIONS_RPI_CURSOR, minecraft)
|
||||||
|
#ifdef __APPLE__
|
||||||
.addOptionItem(OPTIONS_FOLIAGE_TINT, minecraft)
|
.addOptionItem(OPTIONS_FOLIAGE_TINT, minecraft)
|
||||||
.addOptionItem(OPTIONS_TINTED_SIDE, minecraft)
|
.addOptionItem(OPTIONS_TINTED_SIDE, minecraft)
|
||||||
|
#endif
|
||||||
.addOptionItem(OPTIONS_JAVA_HUD, minecraft)
|
.addOptionItem(OPTIONS_JAVA_HUD, minecraft)
|
||||||
.addOptionItem(OPTIONS_FOG_TYPE, minecraft)
|
.addOptionItem(OPTIONS_FOG_TYPE, minecraft)
|
||||||
.addOptionItem(OPTIONS_BETA_SKY, minecraft)
|
.addOptionItem(OPTIONS_BETA_SKY, minecraft)
|
||||||
@@ -261,6 +264,12 @@ void OptionsScreen::mouseReleased(int x, int y, int buttonNum) {
|
|||||||
super::mouseReleased(x, y, buttonNum);
|
super::mouseReleased(x, y, buttonNum);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OptionsScreen::mouseWheel(int dx, int dy, int xm, int ym) {
|
||||||
|
if (currentOptionsGroup != NULL && currentOptionsGroup->pointInside(xm, ym) && dy != 0) {
|
||||||
|
currentOptionsGroup->scrollByPixels((float)dy * 18.0f);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void OptionsScreen::keyPressed(int eventKey) {
|
void OptionsScreen::keyPressed(int eventKey) {
|
||||||
if (currentOptionsGroup != NULL)
|
if (currentOptionsGroup != NULL)
|
||||||
currentOptionsGroup->keyPressed(minecraft, eventKey);
|
currentOptionsGroup->keyPressed(minecraft, eventKey);
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ public:
|
|||||||
|
|
||||||
virtual void mouseClicked(int x, int y, int buttonNum);
|
virtual void mouseClicked(int x, int y, int buttonNum);
|
||||||
virtual void mouseReleased(int x, int y, int buttonNum);
|
virtual void mouseReleased(int x, int y, int buttonNum);
|
||||||
|
virtual void mouseWheel(int dx, int dy, int xm, int ym);
|
||||||
virtual void keyPressed(int eventKey);
|
virtual void keyPressed(int eventKey);
|
||||||
virtual void charPressed(char inputChar);
|
virtual void charPressed(char inputChar);
|
||||||
|
|
||||||
|
|||||||
@@ -185,11 +185,14 @@ void LevelRenderer::allChanged()
|
|||||||
|
|
||||||
lastFogType = mc->options.getIntValue(OPTIONS_FOG_TYPE);
|
lastFogType = mc->options.getIntValue(OPTIONS_FOG_TYPE);
|
||||||
|
|
||||||
|
#ifndef __APPLE__
|
||||||
bool tint = mc->options.getBooleanValue(OPTIONS_FOLIAGE_TINT);
|
bool tint = mc->options.getBooleanValue(OPTIONS_FOLIAGE_TINT);
|
||||||
|
bool sideTint = mc->options.getBooleanValue(OPTIONS_TINTED_SIDE);
|
||||||
|
#else
|
||||||
|
bool tint = false, sideTint = false;
|
||||||
|
#endif
|
||||||
FoliageColor::setUseTint(tint);
|
FoliageColor::setUseTint(tint);
|
||||||
GrassColor::setUseTint(tint);
|
GrassColor::setUseTint(tint);
|
||||||
|
|
||||||
bool sideTint = mc->options.getBooleanValue(OPTIONS_TINTED_SIDE);
|
|
||||||
TileRenderer::setUseTint(sideTint);
|
TileRenderer::setUseTint(sideTint);
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -257,7 +257,7 @@ void EntityRenderer::renderShadow(Entity* e, float x, float y, float z, float po
|
|||||||
//Textures* textures = entityRenderDispatcher->textures;
|
//Textures* textures = entityRenderDispatcher->textures;
|
||||||
//textures->bind(textures->loadTexture("%clamp%/environment/shadow.png"));
|
//textures->bind(textures->loadTexture("%clamp%/environment/shadow.png"));
|
||||||
Textures* textures = entityRenderDispatcher->textures;
|
Textures* textures = entityRenderDispatcher->textures;
|
||||||
textures->loadAndBindTexture("/misc/shadow.png");
|
textures->loadAndBindTexture("misc/shadow.png");
|
||||||
|
|
||||||
|
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
|
||||||
@@ -298,6 +298,7 @@ void EntityRenderer::renderShadow(Entity* e, float x, float y, float z, float po
|
|||||||
tt.draw();
|
tt.draw();
|
||||||
|
|
||||||
glColor4f2(1, 1, 1, 1);
|
glColor4f2(1, 1, 1, 1);
|
||||||
|
// tt.color(1.f, 1.f, 1.f, 1.f);
|
||||||
glDisable2(GL_BLEND);
|
glDisable2(GL_BLEND);
|
||||||
glDepthMask(true);
|
glDepthMask(true);
|
||||||
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT);
|
||||||
@@ -315,7 +316,7 @@ void EntityRenderer::renderTileShadow(Tile* tt, float x, float y, float z, int x
|
|||||||
float a = ((pow - (y - (yt + yo)) / 2) * 0.5f) * getLevel()->getBrightness(xt, yt, zt);
|
float a = ((pow - (y - (yt + yo)) / 2) * 0.5f) * getLevel()->getBrightness(xt, yt, zt);
|
||||||
if (a < 0) return;
|
if (a < 0) return;
|
||||||
if (a > 1) a = 1;
|
if (a > 1) a = 1;
|
||||||
// t.color(1, 1, 1, (float) a);
|
// t.color(1.f, 1.f, 1.f, (float) a);
|
||||||
glColor4f2(1, 1, 1, (float) a);
|
glColor4f2(1, 1, 1, (float) a);
|
||||||
|
|
||||||
float x0 = xt + tt->xx0 + xo;
|
float x0 = xt + tt->xx0 + xo;
|
||||||
|
|||||||
@@ -10,14 +10,11 @@
|
|||||||
static const char* errIdString = 0;
|
static const char* errIdString = 0;
|
||||||
|
|
||||||
void checkError() {
|
void checkError() {
|
||||||
|
|
||||||
while (1) {
|
|
||||||
ALenum err = alGetError();
|
ALenum err = alGetError();
|
||||||
if(err == AL_NO_ERROR) return;
|
if(err == AL_NO_ERROR) return;
|
||||||
|
|
||||||
LOGI("### SoundSystemAL error: %d ####: %s\n", err, errIdString==0?"(none)":errIdString);
|
LOGI("### SoundSystemAL error: %d ####: %s\n", err, errIdString==0?"(none)":errIdString);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
//typedef ALvoid AL_APIENTRY (*alBufferDataStaticProcPtr) (const ALint bid, ALenum format, ALvoid *data, ALsizei size, ALsizei freq);
|
//typedef ALvoid AL_APIENTRY (*alBufferDataStaticProcPtr) (const ALint bid, ALenum format, ALvoid *data, ALsizei size, ALsizei freq);
|
||||||
//ALvoid alBufferDataStaticProc(const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq)
|
//ALvoid alBufferDataStaticProc(const ALint bid, ALenum format, ALvoid* data, ALsizei size, ALsizei freq)
|
||||||
|
|||||||
Reference in New Issue
Block a user