Skip to content

Commit 05d91da

Browse files
committed
docs: rewrite MC, client, platforms, modding, world pages in casual tone
1 parent 24cd5db commit 05d91da

23 files changed

Lines changed: 553 additions & 555 deletions

src/content/docs/client/audio.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Audio"
33
description: "Sound system in LCEMP."
44
---
55

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.
77

88
## Architecture
99

@@ -117,19 +117,19 @@ Key playback methods:
117117
| `playUI(iSound, volume, pitch)` | Play a non-positional UI sound |
118118
| `playStreaming(name, x, y, z, volume, pitch, bMusicDelay)` | Start streaming music |
119119

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]`.
121121

122122
### Sound invocation from game code
123123

124-
`LevelRenderer` provides the bridge between game events and audio:
124+
`LevelRenderer` is the bridge between game events and audio:
125125

126126
```cpp
127127
void playSound(int iSound, double x, double y, double z,
128128
float volume, float pitch, float fSoundClipDist = 16.0f);
129129
void playStreamingMusic(const wstring& name, int x, int y, int z);
130130
```
131131
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.
133133
134134
## Music system
135135
@@ -190,15 +190,15 @@ static int OpenStreamThreadProc(void* lpParameter);
190190
191191
### Music selection
192192
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:
194194
195195
```cpp
196196
void SetStreamingSounds(int iOverworldMin, int iOverWorldMax,
197197
int iNetherMin, int iNetherMax,
198198
int iEndMin, int iEndMax, int iCD1);
199199
```
200200

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.
202202

203203
### Music tick
204204

@@ -222,23 +222,23 @@ The master volumes (`m_MasterMusicVolume`, `m_MasterEffectsVolume`) are set from
222222
## Sound bank and driver
223223

224224
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
228228

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.
230230

231231
## DLC audio
232232

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.
234234

235235
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
238238

239239
## Platform-specific notes
240240

241241
- **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
244244
- **Xbox 360**: Uses native XAudio instead of Miles (no `mss.h` include)

src/content/docs/client/input.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: "Input System"
33
description: "How LCEMP handles keyboard, mouse, and controller input."
44
---
55

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.
77

88
## Input class hierarchy
99

@@ -25,11 +25,11 @@ public:
2525
};
2626
```
2727
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.
2929
3030
### KeyboardMouseInput
3131
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`):
3333
3434
```cpp
3535
extern KeyboardMouseInput g_KBMInput;
@@ -70,10 +70,10 @@ extern KeyboardMouseInput g_KBMInput;
7070
The class tracks three states per key and mouse button:
7171

7272
- **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
7575

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()`.
7777

7878
#### Key methods
7979

@@ -104,11 +104,11 @@ void SetScreenCursorHidden(bool hidden);
104104
bool HasAnyInput() const;
105105
```
106106
107-
`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.
108108
109109
## Controller input (EControllerActions)
110110
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.
112112
113113
### Menu actions
114114
@@ -150,7 +150,7 @@ Platform-specific menu actions:
150150
151151
### Debug actions (created from D-pad)
152152
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()`:
154154
155155
| Action | Description |
156156
|---|---|
@@ -191,7 +191,7 @@ The `Options` class holds 14 key mappings:
191191
| `keyPickItem` | Pick block |
192192
| `keyToggleFog` | Toggle fog distance |
193193

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.
195195

196196
## ConsoleInput / ConsoleInputSource
197197

@@ -222,5 +222,5 @@ These are used for the integrated server console, not player gameplay input.
222222
2. **Input abstraction** (`KeyboardMouseInput` or platform controller API) processes raw events into state
223223
3. **`CMinecraftApp::HandleButtonPresses()`** reads controller state per player and translates to `EControllerActions`
224224
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

src/content/docs/client/settings.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ title: "Settings"
33
description: "Game settings and options in LCEMP."
44
---
55

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.
77

88
## Options class
99

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.
1111

1212
### Option definitions
1313

@@ -189,7 +189,7 @@ static const int GAME_SETTINGS_PROFILE_DATA_BYTES = 204;
189189
static const int GAME_DEFINED_PROFILE_DATA_BYTES = 972; // per user (doubled for extended achievements)
190190
```
191191

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.
193193

194194
### Access methods
195195

@@ -201,7 +201,7 @@ void CheckGameSettingsChanged(bool bOverride5MinuteTimer = false, int iPad = XUS
201201
void ApplyGameSettingsChanged(int iPad);
202202
```
203203
204-
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.
205205
206206
## Game host options (eGameHostOption)
207207
@@ -237,7 +237,7 @@ unsigned int GetGameHostOption(eGameHostOption eVal);
237237

238238
### Achievement eligibility
239239

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.
241241

242242
## Settings class
243243

@@ -255,7 +255,7 @@ class Settings {
255255
};
256256
```
257257
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.
259259
260260
## Player skin and cape settings
261261
@@ -275,7 +275,7 @@ DWORD GetPlayerCapeId(int iPad);
275275

276276
### Favorite skins
277277

278-
Players can save up to a set of favorite skins:
278+
Players can save a set of favorite skins:
279279

280280
```cpp
281281
void SetPlayerFavoriteSkin(int iPad, int iIndex, unsigned int uiSkinID);
@@ -286,7 +286,7 @@ void ValidateFavoriteSkins(int iPad); // checks DLC availability
286286
287287
## Opacity timer
288288
289-
The HUD opacity temporarily returns to full when the player changes hotbar selections:
289+
The HUD opacity temporarily goes back to full when the player changes hotbar selections:
290290
291291
```cpp
292292
void SetOpacityTimer(int iPad); // starts a 6-second (120 tick) countdown

src/content/docs/client/textures.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@ title: "Textures & Resources"
33
description: "Texture loading and resource management in LCEMP."
44
---
55

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.
77

88
## Textures
99

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.
1111

1212
### Texture name registry (TEXTURE_NAME enum)
1313

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:
1515

1616
**Original textures:**
1717

@@ -67,7 +67,7 @@ The total count is `TN_COUNT`.
6767

6868
### HTTP and memory textures
6969

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:
7171

7272
```cpp
7373
int loadHttpTexture(const wstring& url, const wstring& backup);
@@ -87,15 +87,15 @@ MemTexture* addMemTexture(const wstring& url, MemTextureProcessor* processor);
8787
8888
### Anaglyph conversion
8989
90-
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.
9191
9292
### Title update textures
9393
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.
9595
9696
## TextureManager
9797
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:
9999
100100
```cpp
101101
class TextureManager {
@@ -137,11 +137,11 @@ Some textures animate each tick:
137137
| `ClockTexture` | Clock item face rotation |
138138
| `CompassTexture` | Compass needle direction |
139139

140-
These are updated during `Textures::tick()` when `tickDynamics` is true.
140+
These get updated during `Textures::tick()` when `tickDynamics` is true.
141141

142142
## BufferedImage
143143

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.
145145

146146
## TexturePack hierarchy
147147

@@ -220,11 +220,11 @@ res/
220220
res/ -- updated textures
221221
```
222222

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.
224224

225225
## DLC texture packs
226226

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:
228228

229229
- Candy
230230
- Cartoon
@@ -247,4 +247,4 @@ DLC packs are managed through `DLCManager` and `DLCPack` in `Common/DLC/`, with
247247

248248
## Texture format
249249

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

Comments
 (0)