112 Commits

Author SHA1 Message Date
iProgramInCpp
b129fd7434 Add mccpp.vcxproj.user, so the working dir is safe 2023-08-21 11:12:20 +03:00
Brent
74038329f1 Move Windows projects into platforms folders (#65)
Co-authored-by: Brent Da Mage <BrentDaMage@users.noreply.github.com>
2023-08-21 10:31:20 +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
9a238bf77a It's fixed. Sorry 2023-08-19 10:15:46 +03:00
iProgramInCpp
30f35ef724 More updates to fix stuff... 2023-08-19 10:09:49 +03:00
iProgramInCpp
919e4d8625 * Move client/common/ and client/network/ into common/ and network/ respectively. 2023-08-19 10:05:48 +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
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
Alexander Argentakis
5e8119d279 fixed some mouse related mistakes in main.cpp of the SDL build (#55) 2023-08-16 11:38:36 +03:00
iProgramInCpp
2da5c2e2fe * Add clouds! (optional feature) 2023-08-13 20:38:52 +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
f
ac4369f5b2 Fix memory leak in SoundSystemWindows (#47)
* Fix memory leak in SoundSystemWindows

Add functionality to release LPDIRECTSOUND3DBUFFER8 when sound finished playing.

* Update minecraftcpp.vcxproj

same mistake again
2023-08-10 10:05:13 +03:00
iProgramInCpp
c445c255a3 * Fix bad soundbuffer release check in the SoundSystemWindows 2023-08-09 23:12:07 +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
a7f56c5581 * Change options.txt separator from '|' to ':'.
* Move FireTexture.cpp into the correct filter.
2023-08-09 18:44:49 +03:00
iProgramInCpp
6036304087 * Add preliminary raspberry pi support.
Currently it appears to be using software acceleration, so sucks, but I'll be
working on it.
2023-08-08 14:01:01 +03:00
iProgramInCpp
0c3099a3d9 * Put the SoundSystemAL behind the USE_OPENAL define. 2023-08-08 11:15:30 +03:00
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
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
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
e7a520ba34 * Update the game title once again. 2023-08-06 14:03:33 +03:00
TheBrokenRail
4b8791100c Address Review Comments 2023-08-05 23:03:13 +03:00
TheBrokenRail
cc3310b556 Fix Loading Stereo Sound Data 2023-08-05 23:03:13 +03:00
TheBrokenRail
0fbe90752d SDL/WASM Port 2023-08-05 23:03:13 +03:00
iProgramInCpp
554c971c05 x 2023-08-05 22:17:24 +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
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
bfdd5beb75 * Fix include paths. Now it builds properly. 2023-08-05 15:34:07 +03:00
iProgramInCpp
3f8f7d7e00 * Make the game not run if a texture couldn't be loaded. 2023-08-02 23:18:46 +03:00
iProgramInCpp
cd777c1bb9 * Update game title. 2023-08-02 23:18:46 +03:00
iProgramInCpp
ec73b28e92 Merge branch 'master' into master 2023-08-02 14:05:02 +03:00
iProgramInCpp
b485071d00 * Unblock sound playback 2023-08-02 14:03:57 +03:00
iProgramInCpp
450cb190b6 * Finish level saving. 2023-08-02 13:15:25 +03:00
f
9bfec799e2 Improve and fix crash in SoundSystemWindows
Add 3D Sound Listener, Fix crash when DirectSound fails to initialize. Add second argument to setListenerAngle. Implement setListenerAngle and setListenerPos in Minecraft.cpp (Is this a good place to put it?)
2023-08-01 22:02:24 +02:00
iProgramInCpp
0cdc8e07fb Revert "Use DwmFlush to VSync instead of OpenGL VSync on supported OS" 2023-08-01 13:19:25 +03:00
Kleadron
79b4185324 Forgot to add WIN32_LEAN_AND_MEAN 2023-08-01 02:51:18 -07:00
Kleadron
10a2c09080 Merge remote-tracking branch 'upstream/master' into dwm-vsync 2023-08-01 02:46:30 -07:00
Kleadron
5535ef004c already did the todo 2023-08-01 02:37:11 -07:00
Kleadron
b4a685eba0 Add DWM VSync Code 2023-08-01 02:36:29 -07:00
iProgramInCpp
27b054a668 Merge pull request #11 from Kleadron/dsound-attenuation
DirectSound Attenuation
2023-08-01 12:15:40 +03:00
iProgramInCpp
7fd8c67f13 * Fix some more bugs. 2023-08-01 12:05:24 +03:00