Commit graph

307 commits

Author SHA1 Message Date
iProgramInCpp
52c9140b82 * Add CreeperModel 2023-12-05 22:35:57 +02:00
iProgramInCpp
3c433c2858 * Add ChickenRenderer 2023-12-05 21:50:03 +02:00
iProgramInCpp
efebfdd122 * Add CowRenderer 2023-12-05 21:12:05 +02:00
iProgramInCpp
5882d2dc7f * Fix a bug regarding bottom face rendering?
N.B. It's not in the original game.  Not sure how they fixed it.
2023-12-05 21:11:40 +02:00
iProgramInCpp
a59ae9cc47 * Oops! 2023-12-05 20:19:38 +02:00
iProgramInCpp
44c0beeabd * Fix CMake once again.. sigh.. 2023-12-05 20:14:55 +02:00
iProgramInCpp
ca295740dd * Add PigModel and PigRenderer 2023-12-05 20:07:20 +02:00
iProgramInCpp
166bcf708e * Add Base QuadrupedModel 2023-12-05 19:08:11 +02:00
iProgramInCpp
3fb4014dd9 * Oops, fix CMake build 2023-12-05 18:43:08 +02:00
iProgramInCpp
8b3c01b092 * Add ModelPart from 0.2.0 2023-12-05 18:27:01 +02: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
eae06f0500 * Fix one last bug in OptionsScreen. 2023-11-05 19:25:51 +02:00
iProgramInCpp
253c89a6d5 * Fix some issues with the OptionList. 2023-11-05 18:57:08 +02:00
iProgramInCpp
58e03d6758 * Save the split controls option. 2023-11-05 18:48:37 +02:00
iProgramInCpp
0d23a455ed * Add option to split controls 2023-11-05 18:47:38 +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
94d77ce887 * Improve performance in Level::updateLight. 2023-11-05 00:20:14 +02:00
iProgramInCpp
492ee48125 * Slight optimization to the Region containment 2023-11-04 13:12:35 +02:00
iProgramInCpp
5bba109b68 * Fix the "selecting the '...' slot" bug 2023-11-04 00:11:40 +02:00
iProgramInCpp
ebdb8d3576 * Fix use after free in ProgressScreen 2023-11-03 18:27:13 +02:00
iProgramInCpp
011f5e16df * Fix bad glEnable call. 2023-11-03 17:31:22 +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
f0dc1fff5c Revert "Make ZLib A Submodule"
This reverts commit 26b94524a9.
2023-11-03 03:14:06 +02:00
iProgramInCpp
2cedf13711 Merge branch 'pr/85' 2023-11-03 03:04:15 +02:00
iProgramInCpp
323e375d24 * Update scaling method a bit 2023-11-03 03:02:15 +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
c5f09f5a1c * Fix CThread in pthread mode trying to join a detached thread 2023-11-03 02:36:39 +02:00
iProgramInCpp
c9eca9e8d2 * Fix first mouse event being skipped due to reading garbage 2023-11-03 02:36:03 +02:00
TheBrokenRail
82244c9402 Fix CMake Source Ordering 2023-11-02 13:19:13 -04:00
TheBrokenRail
e3fa758be6 Fix CI Build 2023-11-01 22:12:33 -04:00
TheBrokenRail
b7d8f767ed Fix First Mosue Event Being Skipped 2023-11-01 21:59:10 -04:00
TheBrokenRail
9d4fb44a89 Add GitHub Actions 2023-11-01 21:53:23 -04:00
TheBrokenRail
6d3c1a1613 Improve GUI Scale On SDL 2023-11-01 21:53:21 -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
98d6b4e5e8 * Add an option for block outlines instead of highlights.
Fixes #83.
2023-10-22 12:17:11 +03:00
TheBrokenRail
26b94524a9 Make ZLib A Submodule 2023-10-22 05:05:46 -04:00
iProgramInCpp
2a9e12f314 * Disable sponges.
They appear to be oddly unperformant for some reason. Need to look into it.
2023-10-22 11:57:52 +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 99a057fc84.

* 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
8b0eb798cd * Fix a small issue with getQuickSlotItem 2023-10-07 09:53:46 +03:00
iProgramInCpp
4ada245c06 * Remove testing code. 2023-09-17 14:44:00 +03:00
iProgramInCpp
350100ac48
Merge devel into master (#78)
* * Turn survival back on for now.

* * Add TP command.

* * Fix fall damage reset.

* * Mob hitting works.

I've disabled entity shading though. Will get back to it at some point, promise!

* * Knockback

* * Mobs now rotate when they die.

* * Fire fix
2023-09-17 12:47:09 +03:00
iProgramInCpp
e9b00e6ba1 * Fix duplication of world items when resizing. 2023-09-04 12:38:57 +03:00
iProgramInCpp
22dc8e0338 * Fix bad options deref in sound engine init 2023-09-04 12:15:39 +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
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
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
08aadb8535 * Fix broken replacement of unordered_map -> map.
TODO: find a hash table implementation for pre-C++11 and restore it!
2023-08-28 11:20:44 +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
73b051cb9e * Fix #63. 2023-08-23 12:40:05 +03:00
iProgramInCpp
d8f900edbd * Add semi transparent glass as patch. 2023-08-22 22:48:46 +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
iProgramInCpp
d3ef629471 Big leap for key rebinding and crossplatform-ness. 2023-08-22 17:25:24 +03:00
iProgramInCpp
f3fc78e151 * Slight revamp of the options keymappings menu. 2023-08-22 13:30:13 +03:00
iProgramInCpp
01e13dcef7 * Remove inappropriate debug code. 2023-08-20 22:35:26 +03:00
Vruk
9c2a5c43c8
Added Hide GUI Keybind (#62)
F1 to hide gui
Also renamed the field for hiding the GUI to m_bDontRenderGui

I would have named it m_bRenderGui and flipped the default values and checks but I assumed that changing the least amount of stuff would be desired.
2023-08-20 21:19:24 +03:00
Alexander Argentakis
a6d05eb6f3
Added field names for Timer (#64)
* Update Timer.hpp

* Update Timer.cpp

* Fixed member names & replaced all references
2023-08-20 21:19:04 +03:00
iProgramInCpp
a35318fc7f one last horrible bug 2023-08-20 02:03:13 +03:00
iProgramInCpp
4a7be6918f nother horrible bug fix 2023-08-20 01:58:51 +03:00
iProgramInCpp
6719b151ab * Fix horrible bug with the mouse input code. 2023-08-20 01:56:51 +03:00
iProgramInCpp
f255209c84 * Fix VS2010 project. 2023-08-19 16:45:11 +03:00
iProgramInCpp
82770d3436 * Small clean ups to the project. 2023-08-19 16:12:32 +03:00
Brent Da Mage
d5ee7bfc08 Cleaned Up AppPlatform & Input Classes
* Cleaned up AppPlatform classes
* Documented & improved Keyboard & Mouse classes
* Improved input-handling code in the Windows & SDL main.cpp files
2023-08-19 15:57:50 +03:00
iProgramInCpp
30f35ef724 More updates to fix stuff... 2023-08-19 10:09:49 +03:00
iProgramInCpp
c01a627aee * Update the CMakeLists to reflect the changes 2023-08-19 10:07:10 +03:00
iProgramInCpp
919e4d8625 * Move client/common/ and client/network/ into common/ and network/ respectively. 2023-08-19 10:05:48 +03:00
iProgramInCpp
a689ee7365 Disable lighting once, globally 2023-08-18 22:41:51 +03:00
iProgramInCpp
53c586bec8 * Fix-inaccuracy: remove re-enable of GL_LIGHTING in LevelRenderer::render 2023-08-18 22:40:26 +03:00
iProgramInCpp
c4b8e48c6c * Move AABB, HitResult and Vec3 into world/phys 2023-08-18 22:33:05 +03:00
iProgramInCpp
ac0555c3fb * Move synth stuff into world/level/levelgen/synth 2023-08-18 22:29:03 +03:00
iProgramInCpp
0ed807eaf3 * Oops 2023-08-17 17:52:46 +03:00
iProgramInCpp
8a38dee562 * A couple of fixes for SDL/Emscripten build. 2023-08-17 17:49:52 +03:00
iProgramInCpp
5821a5d5ef * Final fixes for VS2010 build. 2023-08-17 16:21:42 +03:00
iProgramInCpp
acaf4aa614 * Fix WebGL build. 2023-08-17 14:26:35 +03:00
iProgramInCpp
a08478d527 * Slight refactor to the resize code. 2023-08-17 11:44:24 +03:00
iProgramInCpp
f14730d3f3 * Fix getDrawScale warning. 2023-08-17 11:21:47 +03:00
Brent
5ac3aa6d9e
macOS Support & AppPlatform Cleanup (#57)
* macOS Support & Cleanup

* Fix malformed comments in build-wasm.bat

* Emscripten Fixes

* * Add shebang to the grabsounds.py script

Since it was changed from rw- to rwx, I'll add the shebang so that it actually runs properly.

* * Re-add the patch_data and readme files.

* * Remove sound data.

* Fix some more things.

* Think it's ready to pull now...

---------

Co-authored-by: BrentDaMage <BrentDaMage@users.noreply.github.com>
Co-authored-by: iProgramInCpp <iprogramincpp@gmail.com>
2023-08-17 11:20:59 +03:00
iProgramInCpp
906b96edd8 Add zlib to the web build, fix an error in CThread... 2023-08-17 10:28:01 +03:00
iProgramInCpp
242f6f904a * Get rid of the survivalmode remnants in CreativeMode. 2023-08-16 22:52:34 +03:00
iProgramInCpp
83c94f355e * Fix bad ordering in the PlaceBlockPacket. 2023-08-16 22:47:15 +03:00
iProgramInCpp
9a24abc603
Improve Survival Mode + others (#56)
* * Undo some of the changes done in the "* Work on survival mode." commit.
* TEST_SURVIVAL_MODE is now on by default.

* * Dying no longer crashes the game.

* * Death seems to work ok.

* * Improve some of the damage code.

* x

* work

* Fixed the Makefile (#54)

* * Finally fix the crack texture appearing to flicker/restart

* * Add VS2010 as an optional target.

Fix build with VS2010 (both windows_vs and xenon_vs).

* * Disable survival mode. Getting ready to merge now!

---------

Co-authored-by: Alexander Argentakis <38327951+MFDGaming@users.noreply.github.com>
2023-08-16 22:32:09 +03:00
iProgramInCpp
1e7bedaa72 * Work on survival mode. 2023-08-13 23:01:40 +03:00
iProgramInCpp
e9f4ae6533 * Separate out the item class headers from the main Item header. 2023-08-13 22:28:07 +03:00
iProgramInCpp
49587c6f81 * Disable caves for now. 2023-08-13 22:09:34 +03:00
iProgramInCpp
f9130ba238 * Add crying obsidian. 2023-08-13 22:01:28 +03:00
iProgramInCpp
2da5c2e2fe * Add clouds! (optional feature) 2023-08-13 20:38:52 +03:00
iProgramInCpp
f4855d38b6
OpenGL vertex buffer object emulation code. (#53)
* * Make more GL vertex buffer related functions use the xgl prefix.

This allows me to later overload them in case I want to try to emulate vertex buffers in software.

* * Add (incomplete) GL VBO emulation. Works well enough but it's very slow.

* * Define USE_HARDWARE_GL_BUFFERS again.
2023-08-13 16:03:51 +03:00
iProgramInCpp
eb64faa89f * Fix an accidental memory leak in the client side loader 2023-08-12 23:28:06 +03:00