You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/content/docs/client/audio.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: "Audio"
3
3
description: "Sound system in LCEMP."
4
4
---
5
5
6
-
LCEMP's audio system is built on the Miles Sound System (MSS) library, abstracted through a two-class hierarchy:`ConsoleSoundEngine` defines the platform interface, and `SoundEngine` provides the shared implementation. The system handles positional 3D audio, background music streaming, and UI sound effects.
6
+
LCEMP's audio system is built on the Miles Sound System (MSS) library, wrapped in a two-class hierarchy.`ConsoleSoundEngine` defines the platform interface, and `SoundEngine` provides the shared implementation. The system handles positional 3D audio, background music streaming, and UI sound effects.
7
7
8
8
## Architecture
9
9
@@ -117,19 +117,19 @@ Key playback methods:
117
117
|`playUI(iSound, volume, pitch)`| Play a non-positional UI sound |
118
118
|`playStreaming(name, x, y, z, volume, pitch, bMusicDelay)`| Start streaming music |
119
119
120
-
The `MAX_SAME_SOUNDS_PLAYING = 8` limit prevents the same sound effect from stacking excessively. Per-sound tracking is maintained in `CurrentSoundsPlaying[eSoundType_MAX + eSFX_MAX]`.
120
+
The `MAX_SAME_SOUNDS_PLAYING = 8` limit stops the same sound effect from stacking too much. Per-sound tracking is kept in `CurrentSoundsPlaying[eSoundType_MAX + eSFX_MAX]`.
121
121
122
122
### Sound invocation from game code
123
123
124
-
`LevelRenderer`provides the bridge between game events and audio:
124
+
`LevelRenderer`is the bridge between game events and audio:
125
125
126
126
```cpp
127
127
voidplaySound(int iSound, double x, double y, double z,
void playStreamingMusic(const wstring& name, int x, int y, int z);
130
130
```
131
131
132
-
The `fSoundClipDist` parameter (default 16 blocks) controls the maximum audible distance.
132
+
The `fSoundClipDist` parameter (default 16 blocks) controls how far away a sound can be heard.
133
133
134
134
## Music system
135
135
@@ -190,15 +190,15 @@ static int OpenStreamThreadProc(void* lpParameter);
190
190
191
191
### Music selection
192
192
193
-
`getMusicID(int iDomain)` selects a random track appropriate for the current dimension. The track ranges are configurable per texture/mash-up pack:
193
+
`getMusicID(int iDomain)` picks a random track that fits the current dimension. The track ranges are configurable per texture/mash-up pack:
194
194
195
195
```cpp
196
196
void SetStreamingSounds(int iOverworldMin, int iOverWorldMax,
197
197
int iNetherMin, int iNetherMax,
198
198
int iEndMin, int iEndMax, int iCD1);
199
199
```
200
200
201
-
`GetRandomishTrack(iStart, iEnd)` selects a track, using `m_bHeardTrackA` to avoid immediate repeats.
201
+
`GetRandomishTrack(iStart, iEnd)` selects a track, using `m_bHeardTrackA` to avoid playing the same track back to back.
202
202
203
203
### Music tick
204
204
@@ -222,23 +222,23 @@ The master volumes (`m_MasterMusicVolume`, `m_MasterEffectsVolume`) are set from
222
222
## Sound bank and driver
223
223
224
224
The Miles Sound System uses:
225
-
-**`HMSOUNDBANK m_hBank`**-- loaded sound bank containing all SFX
226
-
-**`HDIGDRIVER m_hDriver`**-- the digital audio driver
227
-
-**`HSTREAM m_hStream`**-- current streaming music handle
225
+
-**`HMSOUNDBANK m_hBank`**is the loaded sound bank containing all SFX
226
+
-**`HDIGDRIVER m_hDriver`**is the digital audio driver
227
+
-**`HSTREAM m_hStream`**is the current streaming music handle
228
228
229
-
Sound files and music files are registered through `add()`, `addMusic()`, and `addStreaming()` during initialization.
229
+
Sound files and music files get registered through `add()`, `addMusic()`, and `addStreaming()` during initialization.
230
230
231
231
## DLC audio
232
232
233
-
DLC packs (mash-up packs) can provide their own audio through `DLCAudioFile.h`. The `TexturePack::hasAudio()` method indicates whether a pack includes custom audio. When a DLC pack with audio is active, `SetStreamingSounds()` reconfigures the music track ranges.
233
+
DLC packs (mash-up packs) can provide their own audio through `DLCAudioFile.h`. The `TexturePack::hasAudio()` method tells you whether a pack includes custom audio. When a DLC pack with audio is active, `SetStreamingSounds()` reconfigures the music track ranges.
234
234
235
235
Audio resources are stored in:
236
-
-`Common/res/audio/`-- base game sound banks
237
-
-`Common/res/TitleUpdate/audio/`-- title update audio additions
236
+
-`Common/res/audio/`for base game sound banks
237
+
-`Common/res/TitleUpdate/audio/`for title update audio additions
238
238
239
239
## Platform-specific notes
240
240
241
241
-**PS3**: `initAudioHardware()` has a platform-specific implementation for Cell audio initialization
242
-
-**PS4 (Orbis)**: Uses `int32_t m_hBGMAudio` for background music audio handle
243
-
-**PS Vita**: Miles integration through Vita-specific MSS build with `updateMiles()` called during the mixer callback
242
+
-**PS4 (Orbis)**: Uses `int32_t m_hBGMAudio` for the background music audio handle
243
+
-**PS Vita**: Miles integration through a Vita-specific MSS build with `updateMiles()` called during the mixer callback
244
244
-**Xbox 360**: Uses native XAudio instead of Miles (no `mss.h` include)
Copy file name to clipboardExpand all lines: src/content/docs/client/input.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@ title: "Input System"
3
3
description: "How LCEMP handles keyboard, mouse, and controller input."
4
4
---
5
5
6
-
LCEMP supports three input methods: gamepad controllers (primary for all console platforms), keyboard/mouse (Windows 64-bit port), and touch (PS Vita). The input system is split across several classes that abstract platform differences and feed into the game's action system.
6
+
LCEMP supports three input methods: gamepad controllers (the main one for all console platforms), keyboard/mouse (Windows 64-bit port), and touch (PS Vita). The input system is spread across several classes that abstract platform differences and feed into the game's action system.
7
7
8
8
## Input class hierarchy
9
9
@@ -25,11 +25,11 @@ public:
25
25
};
26
26
```
27
27
28
-
This is the minimal interface that `LocalPlayer` uses each tick to determine movement intent. The `xa`/`ya` values drive horizontal movement, while `jumping`, `sneaking`, and `sprinting` flags trigger their respective behaviors.
28
+
This is the minimal interface that `LocalPlayer` uses each tick to figure out movement intent. The `xa`/`ya` values drive horizontal movement, while `jumping`, `sneaking`, and `sprinting` flags trigger their respective behaviors.
29
29
30
30
### KeyboardMouseInput
31
31
32
-
The `KeyboardMouseInput` class handles keyboard and mouse input for the Windows 64-bit build. It is instantiated as a global (`g_KBMInput`):
32
+
The `KeyboardMouseInput` class handles keyboard and mouse input for the Windows 64-bit build. It's set up as a global (`g_KBMInput`):
The class tracks three states per key and mouse button:
71
71
72
72
-**Down**: currently held
73
-
-**Pressed**: transitioned from up to down this tick
74
-
-**Released**: transitioned from down to up this tick
73
+
-**Pressed**: went from up to down this tick
74
+
-**Released**: went from down to up this tick
75
75
76
-
State is double-buffered with accumulators (`m_keyPressedAccum`, `m_keyReleasedAccum`) that collect events between ticks, then are transferred to the readable state arrays during `Tick()`.
76
+
State is double-buffered with accumulators (`m_keyPressedAccum`, `m_keyReleasedAccum`) that collect events between ticks, then get transferred to the readable state arrays during `Tick()`.
`HasAnyInput()` returns true when any key or mouse event has occurred, useful for detecting whether to switch between controller and keyboard/mouse input modes.
107
+
`HasAnyInput()` returns true when any key or mouse event has happened. This is handy for figuring out whether to switch between controller and keyboard/mouse input modes.
108
108
109
109
## Controller input (EControllerActions)
110
110
111
-
Controller input is mapped through the `EControllerActions` enum defined in `Common/App_enums.h`. This provides a unified action system across all console platforms.
111
+
Controller input is mapped through the `EControllerActions` enum defined in `Common/App_enums.h`. This gives you a unified action system across all console platforms.
112
112
113
113
### Menu actions
114
114
@@ -150,7 +150,7 @@ Platform-specific menu actions:
150
150
151
151
### Debug actions (created from D-pad)
152
152
153
-
These are not mapped directly to the input manager but are derived from D-pad presses in `Minecraft::run_middle()`:
153
+
These aren't mapped directly to the input manager but are derived from D-pad presses in `Minecraft::run_middle()`:
154
154
155
155
| Action | Description |
156
156
|---|---|
@@ -191,7 +191,7 @@ The `Options` class holds 14 key mappings:
191
191
|`keyPickItem`| Pick block |
192
192
|`keyToggleFog`| Toggle fog distance |
193
193
194
-
These are primarily used by the Windows 64-bit build; console builds use the `EControllerActions` system instead.
194
+
These are mainly used by the Windows 64-bit build. Console builds use the `EControllerActions` system instead.
195
195
196
196
## ConsoleInput / ConsoleInputSource
197
197
@@ -222,5 +222,5 @@ These are used for the integrated server console, not player gameplay input.
222
222
2.**Input abstraction** (`KeyboardMouseInput` or platform controller API) processes raw events into state
223
223
3.**`CMinecraftApp::HandleButtonPresses()`** reads controller state per player and translates to `EControllerActions`
224
224
4.**`Input::tick()`** converts action state into movement axes (`xa`/`ya`) and action flags (`jumping`, `sneaking`, `sprinting`)
225
-
5.**`LocalPlayer`**consumes the `Input` object each tick to update player movement and trigger actions
226
-
6.**`Screen` / `UIScene`** intercepts input when menus are active, consuming events before they reach gameplay
225
+
5.**`LocalPlayer`**reads the `Input` object each tick to update player movement and trigger actions
226
+
6.**`Screen` / `UIScene`** intercepts input when menus are active, grabbing events before they reach gameplay
Copy file name to clipboardExpand all lines: src/content/docs/client/settings.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,11 +3,11 @@ title: "Settings"
3
3
description: "Game settings and options in LCEMP."
4
4
---
5
5
6
-
LCEMP manages settings at two levels: the`Options` class handles legacy Java-style game options (graphics, controls, keybindings), while the `CMinecraftApp` game settings system manages console-specific per-player profile settings. The `Settings` class provides a simple key-value property store for server configuration.
6
+
LCEMP manages settings at two levels. The`Options` class handles legacy Java-style game options (graphics, controls, keybindings), while the `CMinecraftApp` game settings system manages console-specific per-player profile settings. The `Settings` class provides a simple key-value property store for server configuration.
7
7
8
8
## Options class
9
9
10
-
`Options` is the primary settings container, owned by the `Minecraft` instance. It manages graphics preferences, input sensitivity, key bindings, and gameplay toggles.
10
+
`Options` is the main settings container, owned by the `Minecraft` instance. It manages graphics preferences, input sensitivity, key bindings, and gameplay toggles.
11
11
12
12
### Option definitions
13
13
@@ -189,7 +189,7 @@ static const int GAME_SETTINGS_PROFILE_DATA_BYTES = 204;
189
189
staticconstint GAME_DEFINED_PROFILE_DATA_BYTES = 972; // per user (doubled for extended achievements)
190
190
```
191
191
192
-
The 204-byte limit is preserved for backward compatibility with pre-TU5 save data. The remaining profile bytes store statistics and achievement data.
192
+
The 204-byte limit is kept for backward compatibility with pre-TU5 save data. The remaining profile bytes store statistics and achievement data.
Settings changes are batched and applied through `ApplyGameSettingsChanged()`. The system checks for changes periodically (with a 5-minute timer) or on explicit request.
204
+
Settings changes are batched and applied through `ApplyGameSettingsChanged()`. The system checks for changes periodically (with a 5-minute timer) or when explicitly requested.
205
205
206
206
## Game host options (eGameHostOption)
207
207
@@ -237,7 +237,7 @@ unsigned int GetGameHostOption(eGameHostOption eVal);
237
237
238
238
### Achievement eligibility
239
239
240
-
`CanRecordStatsAndAchievements()` checks whether the current host options allow achievements. Options like creative mode, cheats, and certain debug flags disable achievement recording.
240
+
`CanRecordStatsAndAchievements()` checks whether the current host options allow achievements. Things like creative mode, cheats, and certain debug flags will disable achievement recording.
241
241
242
242
## Settings class
243
243
@@ -255,7 +255,7 @@ class Settings {
255
255
};
256
256
```
257
257
258
-
It wraps an `unordered_map<wstring, wstring>` and provides typed getters with defaults. Used by the integrated server for configuration like server name, port, max players, etc.
258
+
It wraps an `unordered_map<wstring, wstring>` and provides typed getters with defaults. The integrated server uses it for configuration like server name, port, max players, etc.
Copy file name to clipboardExpand all lines: src/content/docs/client/textures.md
+12-12Lines changed: 12 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,15 +3,15 @@ title: "Textures & Resources"
3
3
description: "Texture loading and resource management in LCEMP."
4
4
---
5
5
6
-
LCEMP manages textures through several cooperating systems: `Textures` handles loading and binding, `TextureManager` provides a name-to-ID registry, `TexturePackRepository` manages texture pack selection, and a hierarchy of `TexturePack` implementations abstracts resource sources.
6
+
LCEMP manages textures through several systems working together. `Textures` handles loading and binding, `TextureManager` provides a name-to-ID registry, `TexturePackRepository` manages texture pack selection, and a hierarchy of `TexturePack` implementations abstracts where resources come from.
7
7
8
8
## Textures
9
9
10
-
The `Textures` class is the primary texture management interface, owned by the `Minecraft` instance. It handles loading images from disk, binding textures for rendering, and managing dynamic/animated textures.
10
+
The `Textures` class is the main texture management interface, owned by the `Minecraft` instance. It handles loading images from disk, binding textures for rendering, and managing dynamic/animated textures.
11
11
12
12
### Texture name registry (TEXTURE_NAME enum)
13
13
14
-
All built-in textures are registered through the `TEXTURE_NAME` enum, which assigns a compile-time ID to each texture resource. The enum contains entries organized by version:
14
+
All built-in textures are registered through the `TEXTURE_NAME` enum, which gives a compile-time ID to each texture resource. The enum has entries organized by version:
15
15
16
16
**Original textures:**
17
17
@@ -67,7 +67,7 @@ The total count is `TN_COUNT`.
67
67
68
68
### HTTP and memory textures
69
69
70
-
For multiplayer skins and DLC content, `Textures`supports loading from remote sources:
70
+
For multiplayer skins and DLC content, `Textures`can load from remote sources:
When stereoscopic 3D is enabled, `Textures::anaglyph()` converts pixel data to the appropriate color channel separation.
90
+
When stereoscopic 3D is enabled, `Textures::anaglyph()` converts pixel data to the right color channel separation.
91
91
92
92
### Title update textures
93
93
94
-
`Textures::IsTUImage()` and `Textures::IsOriginalImage()` determine whether a texture should be loaded from the title update drive or the original game disc, enabling texture replacements through patches.
94
+
`Textures::IsTUImage()` and `Textures::IsOriginalImage()` figure out whether a texture should be loaded from the title update drive or the original game disc. This is what lets texture replacements work through patches.
95
95
96
96
## TextureManager
97
97
98
-
`TextureManager` is a singleton registry mapping string names to texture IDs and `Texture` objects:
98
+
`TextureManager` is a singleton registry that maps string names to texture IDs and `Texture` objects:
99
99
100
100
```cpp
101
101
class TextureManager {
@@ -137,11 +137,11 @@ Some textures animate each tick:
137
137
|`ClockTexture`| Clock item face rotation |
138
138
|`CompassTexture`| Compass needle direction |
139
139
140
-
These are updated during `Textures::tick()` when `tickDynamics` is true.
140
+
These get updated during `Textures::tick()` when `tickDynamics` is true.
141
141
142
142
## BufferedImage
143
143
144
-
`BufferedImage` is the CPU-side image container used for loading and manipulating texture data before uploading to the GPU. It stores pixel data as integer arrays.
144
+
`BufferedImage` is the CPU-side image container used for loading and working with texture data before uploading to the GPU. It stores pixel data as integer arrays.
145
145
146
146
## TexturePack hierarchy
147
147
@@ -220,11 +220,11 @@ res/
220
220
res/ -- updated textures
221
221
```
222
222
223
-
The `1_2_2/` subdirectory contains the original 1.2.2 version resources as a baseline.
223
+
The `1_2_2/` subdirectory has the original 1.2.2 version resources as a baseline.
224
224
225
225
## DLC texture packs
226
226
227
-
Each DLC pack under `TitleUpdate/DLC/`contains a `Data/` subdirectory with pack-specific resources. Available DLC packs in the source tree:
227
+
Each DLC pack under `TitleUpdate/DLC/`has a `Data/` subdirectory with pack-specific resources. Available DLC packs in the source tree:
228
228
229
229
- Candy
230
230
- Cartoon
@@ -247,4 +247,4 @@ DLC packs are managed through `DLCManager` and `DLCPack` in `Common/DLC/`, with
247
247
248
248
## Texture format
249
249
250
-
The static member `Textures::TEXTURE_FORMAT` controls the GPU texture format. Mipmapping is controlled by `Textures::MIPMAP`. Format selection via `setTextureFormat()` adapts to platform capabilities.
250
+
The static member `Textures::TEXTURE_FORMAT` controls the GPU texture format. Mipmapping is controlled by `Textures::MIPMAP`. Format selection via `setTextureFormat()` adapts to whatever the platform supports.
0 commit comments