112 Commits

Author SHA1 Message Date
Er2
bf78dd4bf1 clang-tidy: fix many warnings 2023-12-02 21:04:21 +03:00
Er2
56ce7e8073 Input: Use SDL scancodes instead of SDLK 2023-12-02 18:40:11 +03:00
Er2
17b11a5b98 Platforms: Add FreeBSD support 2023-12-02 18:37:38 +03:00
SanyaSho
b055b37b02 HaikuOS port (#97)
* ExternalFileLevelStorageSource: add workaround for d_type on Haiku

* raknet: FileList: do not include io.h on Haiku

* raknet: SocketLayer: add sockio.h for Haiku

* cmake: link -lnetwork on Haiku

* readme: add Haiku build dependencies

* cmake: use link_libraries instead of add_link_options

* ExternalFileLevelStorageSource: use scary stdstring instead of char
2023-11-05 21:33:57 +02:00
iProgramInCpp
3b60855ad0 * Android: Determine feature availability at compile time.
Since assets are baked in to the APK, we can simply check for the existence of assets at compile time using CMake.
2023-11-05 21:30:33 +02:00
iProgramInCpp
5df07e2fc1 Add scrollable options menu (#99)
* * Add new scrollable options list.

* * Add OptionList.cpp to the CMakeLists.txt

* * Add the new stuff by @jonkadelic to the new options menu.
2023-11-05 18:40:44 +02:00
jonkadelic
e6ab1214af Biome colour and grass side tint options (#98)
* Added biome colour and grass side tint options

* Moved GrassColor and FoliageColor to client/renderer/

* * Fix some build issues.

* * Add the new files to the CMakeLists.txt

---------

Co-authored-by: iProgramInCpp <iprogramincpp@gmail.com>
2023-11-05 18:19:41 +02:00
iProgramInCpp
4877dfde6d * Fix options and screenshot saving. 2023-11-04 15:01:40 +02:00
iProgramInCpp
3e8650761b * Android: Lower SDK version to 21, like the VS project that preceded it.
A temporary solution for the navbar issue.
2023-11-03 23:56:46 +02:00
iProgramInCpp
3be8984c63 * Android: Fix bug where pointer IDs were used incorrectly. 2023-11-03 19:30:22 +02:00
iProgramInCpp
1860016fb3 * Fix gitignore errors and add Android specific CMakeLists.txt 2023-11-03 17:51:05 +02:00
iProgramInCpp
8e69df37bb * Fix SDL build. 2023-11-03 14:54:16 +02:00
iProgramInCpp
bd3348f7fe * Add Gradle-based project for Android.
* Remove Microsoft Visual Studio projects for Android build.
2023-11-03 14:46:32 +02:00
f
f83ead9f8d WIP Android Port (#79)
* WIP Android Port

Android port. Still needs touch controls and mouse turning (if that's even possible on android) and file saving and SoundSystemSL
You control the camera and movement with your controller for now. You can navigate the gui using touch.
Options.cpp,LocalPlayer.cpp,Minecraft.cpp is configured to use controller.
Blocked out some code in ControllerTurnInput.cpp,Controller.cpp that didn't make sense.

* Fix glClear

glClear is supossed to use GL_DEPTH_BUFFER_BIT (thx TheBrokenRail)

* * Fix build.

* * Ignore assets.

* * More stuff

* * Fix more build errors.

* * It finally built

What I needed to do is rebuild the debug keystore because apparently android studio created it with sha1 digest alg which isn't supported by ant

* * Clean up filters.

* * Add cramped mode to the pause screen.

* * Fix a bug with the hotbar

* * In NinecraftApp::handleBack, pause the game if there is no screen.

* * AppPlatform_android: Add placeholder SoundSystem instance till we get SoundSystemSL working

* * Add properly working touch code.

* * Oh, remove some testing things

* * Fix state resetting when going in background and back in foreground
* Fix bug where the sky isn't being regenerated on graphics reset
* Fix bug where the m_currBoundTex isn't reset in Textures::clear potentially leaving a texture with that ID unassigned and corrupted
* Fix bug in CThread where the thread is detached and then also joined.
* Don't log anything if the program isn't in debug mode.

* * Add virtual keyboard support.

The screen instance slides so that the focused text box is kept visible.

* Rename from com.minecraftcpp to com.reminecraftpe

---------

Co-authored-by: iProgramInCpp <iprogramincpp@gmail.com>
2023-11-03 12:54:39 +02:00
iProgramInCpp
8c6c5a0b39 Merge pull request #91 into master 2023-11-03 03:17:28 +02:00
iProgramInCpp
eba8f1b467 Merge pull request #82 into master 2023-11-03 03:01:59 +02:00
TheBrokenRail
f62fd3e7f5 Fix Touch In WASM 2023-11-03 02:48:47 +02:00
iProgramInCpp
65be786140 * Fix SDL related touch issues. 2023-11-03 02:47:08 +02:00
TheBrokenRail
5bf7fae0b1 Fix DoesAssetExist 2023-11-02 13:31:24 -04:00
TheBrokenRail
3b580eeed3 Reduce Number Of CMake Projects 2023-11-01 21:59:13 -04:00
TheBrokenRail
100dd1db5d Some Code Clean Up 2023-11-01 21:53:23 -04:00
TheBrokenRail
8278e2993d More CMake Clean Up 2023-11-01 21:53:23 -04:00
TheBrokenRail
bba3099b71 Clean Up CMake Build System 2023-11-01 21:48:41 -04:00
TheBrokenRail
4830a6fcab SDL Multitouch! 2023-11-01 20:54:56 -04:00
iProgramInCpp
4ff68d1f87 * Fix CMake build issues.
* Remove accidentally packed in binary.
2023-11-02 01:30:46 +02:00
iProgramInCpp
60b21356a1 Integrate touch related development. (#90)
* * Add BuildActionIntention crap

* * Set Client and World projects to use MP compilation

* asd

* * Use the new BuildActionIntention to break and place blocks.

* * Reverse engineer the IArea system.

* * Copy break logic from survival into creative conditionally

* * Reverse IBuildInput and MouseHandler
* Replace the new relative paths in the client project with $(MC_ROOT) again

* * Reverse Multitouch, MouseDevice

* * Reverse a bunch of auxiliary classes for input.

* * Use CustomInputHolder instead of holding inputs manually.

* * Reverse a whole BUNCH of things!

* * Add feedback textures to the gitignore.

* * D-pad now renders! Also loads of other work.

* * More Stuff

* * Finish touch control bug fixing.

* * Finalize work.

* * One last thing..

* * Add a "cramped" mode to the options screen and start menu.

* * Oh, forgot to do something
2023-11-02 00:49:11 +02:00
iProgramInCpp
6761e348ec * Remove PlatformDefinitions.hpp 2023-10-22 10:56:21 +03:00
iProgramInCpp
c503eccd9d * Move AppPlatform_emscripten to the sdl directory
As pointed out by #82, the behavior before this commit is unintuitive.
2023-10-22 10:52:38 +03:00
Brent
f12a3c1c61 Visual Studio Project Overhaul + Cleanup (#80)
* Visual Studio Project Overhaul + Cleanup
* SDL2 project for Windows
* Re-added game client icon to SDL2 code
* Renamed "AppPlatform_windows" to "AppPlatform_win32" (this is the name of the Windows API and is not representative of the architecture type)
* Renamed "LoggerWindows" to "LoggerWin32"
* Renamed "SoundSystemWindows to "SoundSystemDS" (DirectSound). This may be used for the 360, so it wouldn't really be Windows-specific then.
* Moved "ClientSideNetworkHandler" from "network" to "client/network". We don't need it being compiled for the server if the client's the only thing that needs it.
* I wonder if this still works on macOS...

* Bugfixes & Fixed for macOS

* Options::savePropertiesToFile Logging Bugfix

* Silence Winsock Deprecation Warnings in RakNet

* VS Project Improvements
- Replaced 50 billion relative paths with $(MC_ROOT)
- Added $(RAKNET_PATH) variable to override RakNet location
- Re-added gitignore for .vcxproj.user files
- Added debugging config to Directory.Builds.props
- Slimmed down project configurations for SDL2

* VS Project Config Bugfixes
- Fixed RakNet header path for additional includes

* RakNet Target for XCode

* XCode Project Config Fixes

* Packet logging

* Network VS Project Filter Fix

* Fix RakNet Packet ID Length
We previously didn't have consistency between old and new C++ regarding PacketType enum length. Now we do. This is required or else it completely breaks networking between the versions.

* Additional RakNet Error Handling

* Disable packet logging

* * Fix CMakeLists.txt

This reflects the relocation of ClientSideNetworkHandler.cpp.

* * Also add renderer/GL/GL.cpp to the CMakeLists.txt

* * Replace libpng with stb_image

* * Fix buggy water behavior.

* * Put the CMakeLists of the SDL project in debug mode

* Visual Studio 2010 Support

* * Change the SdlIoCallbacks from an array to a single member.

This fixes compilation of the sdl2 target on VS.

* * Fix missing _error label.

* Revert "* Fix missing _error label."

This reverts commit 99a057fc84049a16c864bd840fb439a008af5c74.

* Revert "* Replace libpng with stb_image"

* info_updateGame Tiles

---------

Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com>
Co-authored-by: iProgramInCpp <iprogramincpp@gmail.com>
2023-10-22 10:08:59 +03:00
iProgramInCpp
c67d8dc3c6 * Add DXSDK include and lib directories to the project.
DXSDK_DIR is a standard path that the DirectX SDK (June 2010) installer adds.
2023-09-04 12:23:31 +03:00
Brent
23bc51f23b Xcode project fixes (#77)
* Compiles for Snow Leopard Again

* Fix Build on Xcode 14

* Fixed Xcode Universal Build

* Update Xcode Schemas

---------

Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com>
2023-09-04 12:13:31 +03:00
Brent
3fa70ad387 vcxproj file fixes (#75)
* vcxproj file fixes
* Platform version is now 8.1
* Platform toolset is now v141_xp
* Fixed IncludePath not inheriting default paths
* Disabled ConformanceMode since it causes the "IUnknown" issue on v141_xp

* Update README.md

* Update README.md
* Includes screenshots

* Update README.md

---------

Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com>
2023-09-04 12:11:56 +03:00
Brent
2e55f99a54 Options Logic Cleanup (#71)
* Output/Logging Overhaul
* Added StandardOut class
* Renamed LOGX macros to LOG_X
* Removed LogMsg macros in favor of LOG_X
* Added console window for debug Windows builds

* Options Refactor
* Moved options loading code from AppPlatform classes to Options class
* Added AppPlatform::singleton()
* Minecraft::m_options is now only accessible via Minecraft::getOptions() (as it should be)
* Making this work with SDL2 next

* Options Cleanup for SDL2

* Added AppPlatform::hasFileSystemAccess()
* Options won't try to load if hasFileSystemAccess returns false. Emscripten build will be happy.

---------

Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com>
2023-09-04 12:11:36 +03:00
iProgramInCpp
cd4c469571 * Move the loggers into the proper filters 2023-08-28 22:04:47 +03:00
iProgramInCpp
73b5aded1b * Use concrete log levels instead of prefixing the log string.
* Remove the "info" tag.
2023-08-28 21:44:47 +03:00
iProgramInCpp
d88e0a7643 * Remove debug console - it's now behind a GameMod
* Remove log counter.
2023-08-28 20:45:05 +03:00
iProgramInCpp
6e2fffdd68 * Rename Logger_windows -> LoggerWindows
* Add logger support for SDL base
2023-08-28 11:13:57 +03:00
iProgramInCpp
8fe86fccb5 * Rename StandardOut -> Logger. 2023-08-28 11:01:12 +03:00
Brent
5c1ea03747 Logging cleanup (#69)
* Mac OS X 10.6 & More C++03 Support

* Fix SDL2 options.txt loading for C++03

* Output/Logging Overhaul
* Added StandardOut class
* Renamed LOGX macros to LOG_X
* Removed LogMsg macros in favor of LOG_X
* Added console window for debug Windows builds

* Updated Xcode Project
+ StandardOut.hpp
+ StandardOut.cpp

* StandardOut_windows
* Replaced the Windows #ifdefs in StandardOut with StandardOut_windows

---------

Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com>
2023-08-28 10:55:41 +03:00
Brent
f7915a1dab Mac OS X 10.6 & More C++03 Support (#68)
* Mac OS X 10.6 & More C++03 Support

* Fix SDL2 options.txt loading for C++03

---------

Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com>
2023-08-27 11:46:15 +03:00
iProgramInCpp
0c38c01c28 * Add option saving to main.cpp when exiting.. 2023-08-25 20:35:26 +03:00
iProgramInCpp
4d5f087ae5 I am going insane 2023-08-25 20:21:26 +03:00
iProgramInCpp
6798c7a6a5 dswgaadgssdg3t22t135 2023-08-25 20:17:09 +03:00
iProgramInCpp
71d7f00f30 asdasdasdasd 2023-08-25 20:09:03 +03:00
iProgramInCpp
c177af0ad0 * fix 2023-08-25 20:08:46 +03:00
iProgramInCpp
cbe1853144 * Add options.txt saving and loading to SDL target. 2023-08-25 19:58:18 +03:00
iProgramInCpp
3388c773f9 * Fix linux build 2023-08-23 21:45:20 +03:00
iProgramInCpp
b9373e3c03 * Fix big bad init bug in regards to window icons. 2023-08-23 20:15:47 +03:00
iProgramInCpp
282ecf85d4 * Replace the hardcoded SLASH define with an actual keybind.
This was a thing in released Minecraft
2023-08-22 19:31:15 +03:00
iProgramInCpp
bf5114e684 * Also fix support for SDL again... 2023-08-22 18:23:31 +03:00