362 Commits

Author SHA1 Message Date
Vruk
3447669f04 OpenAL Seperation and Adjustments (#34)
* OpenAL adjustments and improvements mk.1

Seperated SoundSystemAl from the sdl section and into platform/openal.
Made PlatformDefinitions.hpp require a "USE_OPENAL" definition instead of "USE_SDL" definition for OpenAL
Added SoundSystemAl.cpp  and SoundSystemAL.hpp files to the actual solution file so it can be compiled properly.
Made the SoundSystemAl use headers from thirdparty/OpenAL/include folder.
Made the SoundSystemAl use #pragma comment(lib, "OpenAL32.lib") to include the library if needed without adding it to the linker input value in the solution file.
Added thirdparty/OpenAL/libs/Win64/thirdparty/OpenAL/libs/Win32 to the additional libraries so that it can find the OpenAL32.lib library.

* OpenAL adjustments and improvements mk.2

Removed specific USE_SDL preprocessor definitions related to OpenAL which were unhelpful/unneeded for multi-platform use.
Made the OpenAl sound system inherit from the SoundSystem class and implement the functions properly without requiring a custom update function.
Fixed an error that would happen when closing the game related to OpenAl closing the sound device.
Removed unnecessary is_ui check in OpenAL sound system, UI sounds work just fine without it.
Adjusted rolloff factor, not sure if this is just placebo but it felt a bit better?

* Update sdl/CMakeLists.txt for new OpenAL stuff

* CMakeLists name fix

* Minor fixes for SDL compatibility

* Added check for absolute zero position

Made the OpenAL sound system consider any sound that is at absolute zero non-spatial

Also removed unneeded ORIGINAL_CODE check in SoundSystem.hpp and SoundSystem.cpp

* Fixed OpenAL popping strangeness

OpenAL apparently makes weird popping noises when the gain of a sound is below 0, so I added a check to see if the distance is too far (for the new updated settings)

I did some graphing and the previous settings for OpenAL were limiting the sound distance to 8 blocks (which was causing popping when sounds were between 8-16 blocks away as the gain was 0 or below) so I changed the rolloff factor to 1.0f to make sounds falloff at 16 blocks instead which seems reasonable/like the original intention.

* Minor Fix to solution additional includes

* Forgot an sdl compat change
2023-08-08 11:12:08 +03:00
iProgramInCpp
c0ef625972 * Revert to the old system, don't remove clashing ID entities, prioritize players over other entities. 2023-08-08 10:52:45 +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
57c2b339ea Revert "Fix new entity ID system (#39)"
This reverts commit ef9df3f9de.
2023-08-08 10:22:05 +03:00
Epix
ef9df3f9de Fix new entity ID system (#39) 2023-08-08 08:34:28 +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
e028fc6495 * Move the quit button to the bottom of the list. 2023-08-07 22:01:18 +03:00
iProgramInCpp
d5a733466d * Allow usage of / to start a command quickly.
* Allow usage of escape key to get out of chat screen.
2023-08-07 21:59:18 +03:00
iProgramInCpp
4c09bd2b1c * Fix bad picking logic. 2023-08-07 16:13:23 +03:00
Brent
a0f71c7b27 C++03 Support & Partial Xbox 360 Support (#37)
* WIP C++03 + Xbox 360 Support

* math.h & _USE_MATH_DEFINES on Level.hpp
Updated Xenon vcxproj file for new file structure.

* * Fix bad GUI scale setup.

* * Gui: Use ratios instead of hardcoded sub-1 floating point values, to make the mechanism more clear.

* Add Direct Connect Button and Screen (#30)

* Add Direct Connect Button and Screen

* Remove accidental extra build directories for wasm

* Add DirectConnectScreen.cpp to the CMake

* Use Hungarian coding style notation

* * Fix errors caused by #30

* * Improve the Chat Screen

* * Improve the DirectConnectScreen, among other things.

* * Update the game title once again.

* * Add build-wasm.bat.

* * Add info about compiling for wasm

* * Fix send to specific GUID actually broadcasting to everyone

* * Add command manager.

* * Add writeable configuration.

* * Allow dynamic screen size change on windows

* * Allow the same thing on the emscripten version.

* WIP C++03 + Xbox 360 Support

* Fixed a possible merging issue that broke RakNet?

* Additional Xbox 360 compatability fixes

---------

Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com>
Co-authored-by: iProgramInCpp <iprogramincpp@gmail.com>
Co-authored-by: ts <124226059+uniformization@users.noreply.github.com>
2023-08-07 15:48:52 +03:00
iProgramInCpp
6c1a54e3f0 * Bring back the cube shading, but with fixed lighting. 2023-08-07 12:21:32 +03:00
Brent
b77d42b04a Fixed rendering bugs & crashes (#36)
* Fixed rendering bugs & crashes
* Fixed shading of cubes (includes Steve & Camera head)
* Fixed crash from rendering of Air item in hand
* Fixed crash from right-clicking with Air item in-hand
* TripodCameraRenderer no longer uses Cube::renderHorrible

---------

Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com>
2023-08-07 12:02:35 +03:00
iProgramInCpp
0c8b22d36b * Hide the in-wall screen effect if fly hacks are on. 2023-08-07 11:38:36 +03:00
iProgramInCpp
8a8422f70b * Allow saving of the autojump option. 2023-08-07 11:33:52 +03:00
ts
2114a57a4b Auto Jump Option (#35) 2023-08-07 11:30:54 +03:00
ts
e51edbff06 Implement /seed command using the new Command Manager (#33) 2023-08-07 11:30:42 +03:00
iProgramInCpp
9cb3f1849b * Remove and ignore options.txt 2023-08-07 11:29:41 +03:00
iProgramInCpp
14562fc8ce * Allow the same thing on the emscripten version. 2023-08-06 22:48:09 +03:00
iProgramInCpp
88d68cf21e * Allow dynamic screen size change on windows 2023-08-06 22:45:15 +03:00
iProgramInCpp
9ef72164bb * Add writeable configuration. 2023-08-06 22:21:18 +03:00
iProgramInCpp
56c2d55c5c * Add command manager. 2023-08-06 21:49:14 +03:00
iProgramInCpp
ae3d87c5bf * Fix send to specific GUID actually broadcasting to everyone 2023-08-06 21:15:41 +03:00
iProgramInCpp
936d854452 * Add info about compiling for wasm 2023-08-06 15:25:55 +03:00
iProgramInCpp
2376b4b820 * Add build-wasm.bat. 2023-08-06 15:14:05 +03:00
iProgramInCpp
e7a520ba34 * Update the game title once again. 2023-08-06 14:03:33 +03:00
iProgramInCpp
6d8693ada5 * Improve the DirectConnectScreen, among other things. 2023-08-06 13:50:17 +03:00
iProgramInCpp
bc407fda47 * Improve the Chat Screen 2023-08-06 13:19:37 +03:00
iProgramInCpp
2b105fe1eb * Fix errors caused by #30 2023-08-06 12:59:46 +03:00
ts
9e9d2110e3 Add Direct Connect Button and Screen (#30)
* Add Direct Connect Button and Screen

* Remove accidental extra build directories for wasm

* Add DirectConnectScreen.cpp to the CMake

* Use Hungarian coding style notation
2023-08-06 12:09:06 +03:00
iProgramInCpp
e073665644 * Gui: Use ratios instead of hardcoded sub-1 floating point values, to make the mechanism more clear. 2023-08-06 12:03:06 +03:00
iProgramInCpp
31a3d5f7c1 * Fix bad GUI scale setup. 2023-08-06 12:02:32 +03:00
iProgramInCpp
a9568f1e96 * Add emsdk to the gitignore, seems like it wasn't before 2023-08-05 23:09:12 +03:00
iProgramInCpp
c002b41ba6 * Use the GitHub mirror of TheBrokenRail's GLES compatibility layer
* Add `assets/` to the gitignore.
2023-08-05 23:08:05 +03:00
TheBrokenRail
4b8791100c Address Review Comments 2023-08-05 23:03:13 +03:00
TheBrokenRail
af74761c97 Disable Multiplayer Buttons On WASM 2023-08-05 23:03:13 +03:00
TheBrokenRail
cc3310b556 Fix Loading Stereo Sound Data 2023-08-05 23:03:13 +03:00
TheBrokenRail
b985edac32 Put Textures.cpp Changes In ORIGINAL_CODE Block 2023-08-05 23:03:13 +03:00
TheBrokenRail
0fbe90752d SDL/WASM Port 2023-08-05 23:03:13 +03:00
iProgramInCpp
0b16b2843a * Do the same large cave feature changes in the master post change thing. 2023-08-05 22:27:12 +03:00
iProgramInCpp
554c971c05 x 2023-08-05 22:17:24 +03:00
iProgramInCpp
5b1aaf7e99 * Update the user's name. 2023-08-05 21:15:33 +03:00
f
eaa90a6f95 * SoundSystemWindows: Fix low volume on 3D Sounds, remove useless calloc. (#27)
* SoundSystemWindows: Fix low volume on 3D Sounds, remove useless calloc.

Mojang made the volume on 3D sounds very quiet so i multiplied it by 5 and it seems to match better to the 2D sounds now. The calloc crap was not needed i dont know what i was thinking there

* Update minecraftcpp.vcxproj -- undoes an accidental change
2023-08-05 18:49:09 +03:00
iProgramInCpp
9d88bfb962 * Rename screen related fields in Minecraft class 2023-08-05 16:26:02 +03:00
iProgramInCpp
0ceef907c0 * Allow handling of WM_CHAR in the case of Windows. 2023-08-05 16:13:11 +03:00
iProgramInCpp
386fac3ff6 * Add platform definitions file thanks to @Vruk11
Fixes #13
2023-08-05 15:55:04 +03:00
iProgramInCpp
90d72ac7e2 * Add quit button to the start menu. 2023-08-05 15:48:09 +03:00
iProgramInCpp
1cc6dba1b5 Merge pull request #25 from ReMinecraftPE/break-core-master
Re-organize the source code paths.
2023-08-05 15:40:50 +03:00
iProgramInCpp
b333c2ab22 Merge branch 'master' into break-core-master 2023-08-05 15:40:43 +03:00
iProgramInCpp
bfdd5beb75 * Fix include paths. Now it builds properly. 2023-08-05 15:34:07 +03:00
iProgramInCpp
71e700a300 * More work getting this shit to compile again 2023-08-05 14:57:18 +03:00