64 Commits

Author SHA1 Message Date
Er2
d6bf825c11 Entity, Renderer: Add (incomplete) pig, remake entity renderer 2023-12-04 15:34:45 +03:00
Er2
0afea4428c Resources: Describe every tile in terrain, use 0.2.0 resources 2023-12-03 12:09:55 +03:00
Er2
bf78dd4bf1 clang-tidy: fix many warnings 2023-12-02 21:04:21 +03:00
Er2
9b76709059 Debug text: Add selected block information 2023-12-02 18:46:03 +03:00
Er2
5729be0457 Renderer: Implement frontal third-person 2023-12-02 18:42:10 +03:00
iProgramInCpp
0d23a455ed * Add option to split controls 2023-11-05 18:47:38 +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
011f5e16df * Fix bad glEnable call. 2023-11-03 17:31:22 +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
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
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
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
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
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
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
d8f900edbd * Add semi transparent glass as patch. 2023-08-22 22:48:46 +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
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
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
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
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
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
d09ef3fd04 * Flip stair rendering 90 degrees, to be shaded like regular blocks do. 2023-08-12 10:18:50 +03:00
iProgramInCpp
35a63582df * Add F3 debug text. 2023-08-11 20:04:07 +03:00
iProgramInCpp
b1786eba1f * Add LevelRenderer::renderHitOutline.
Looks similar to the Java Edition version, but the lines are not antialiased and harder to tell apart. Phone users would have trouble seeing the outline, so that's why it was changed.
2023-08-11 18:43:08 +03:00
iProgramInCpp
8c82c7b53f * Render the name tag on players other than the local player. 2023-08-11 12:04:14 +03:00
Brent
b45cfc1e16 Cleaned up Cube (#48)
* Cleaned up Cube
* Refactor/cleanup & documentation of Cube
* Renamed Tesselator to Tessellator

* Revert "Tesselator" Spelling Correction

---------

Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com>
2023-08-11 11:53:50 +03:00
iProgramInCpp
66e896ad2b * Add the "lowering and raising item" behavior from Minecraft Java 2023-08-11 11:37:40 +03:00
iProgramInCpp
34fc30f08a * Outline all the Mouse and Keyboard code. 2023-08-11 11:19:26 +03:00
iProgramInCpp
d1de430d14 * Add optional 3d panorama background 2023-08-11 00:13:06 +03:00
iProgramInCpp
27a0057886 * Split every Tile class into its own header file. 2023-08-10 13:27:30 +03:00
iProgramInCpp
b768764734 * Allow the patch manager to stop loading data from a command 2023-08-10 13:06:42 +03:00
iProgramInCpp
b1c2bf946c * Allow overwriting of frame data from the patch data file. 2023-08-10 12:32:40 +03:00
iProgramInCpp
df47842c5e * Add PatchManager - Allows you to patch terrain.png and items.png on the fly.
This can be used for modding, since you don't need to share copyrighted Mojang assets alongside your texture patches.
2023-08-09 22:13:04 +03:00
iProgramInCpp
939b2b3711 * Fix grass rendering and add grass blocks to the inventory. 2023-08-09 18:01:48 +03:00
Vruk
34e0f95a8a Cleared up some fields (#41)
* Cleared up some fields

Renamed some fields
Made some statements involving those fields make more sense for their type
Renamed the parameters of SoundEngine::PlayAt to have more readable names

* Renamed master volume field

m_flMasterVolume -> m_fMasterVolume

* Made m_iPerspective -> m_bThirdPerson
2023-08-09 15:29:46 +03:00
iProgramInCpp
a2a33e7988 * Add FireTexture. 2023-08-09 12:41:27 +03:00
iProgramInCpp
476d519eee * Add LavaSideTexture. 2023-08-09 10:43:08 +03:00
iProgramInCpp
aa34a64fef * Add LavaTexture. 2023-08-09 10:43:08 +03:00
iProgramInCpp
0ab1aa0a51 * Fix SDL build. 2023-08-08 11:32:51 +03:00
iProgramInCpp
1fdd94a43e Revert "* Improve the entity ID system, and add priority system. We should no longer have clashes."
This reverts commit 1b97875dd6.
2023-08-08 10:22:13 +03:00
iProgramInCpp
1b97875dd6 * Improve the entity ID system, and add priority system. We should no longer have clashes. 2023-08-07 23:05:30 +03:00
iProgramInCpp
4c09bd2b1c * Fix bad picking logic. 2023-08-07 16:13:23 +03:00