Skip to content

Commit 6175d47

Browse files
committed
remove some hyphens
1 parent 4647631 commit 6175d47

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

content/posts/building-a-minimal-doom-wad-loader.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ draft: false
77

88
I wanted to learn how Doom’s WAD files work, so I wrote a simple loader in C++.
99
My goal was just to open a WAD, read its contents, and understand how it’s structured.
10-
The code isn’t fancy or optimized — it’s just a clean, minimal implementation that does the job.
1110

1211
---
1312

@@ -68,7 +67,7 @@ struct Wad {
6867
- `directoryMap` lets me look up lumps by name.
6968
- `data` holds the entire WAD file in memory.
7069
71-
Keeping the full file in memory simplifies things I can slice directly from it when I need lump data, without reopening or seeking through the file again.
70+
Keeping the full file in memory simplifies things, I can slice directly from it when I need lump data, without reopening or seeking through the file again.
7271
7372
---
7473
@@ -97,7 +96,7 @@ This function does three things:
9796
2. Allocates a buffer large enough to hold the whole file and reads it.
9897
3. Seeks back to the beginning for the next read.
9998

100-
Resetting the cursor is importantotherwise, the next read (for the header) will start at the end of the file and return garbage.
99+
Resetting the cursor is important, otherwise the next read (for the header) will start at the end of the file and return garbage.
101100

102101
---
103102

@@ -369,7 +368,7 @@ This version does a few useful things:
369368
- Prints the WAD header information for quick verification.
370369
- Lists all lumps and their positions and sizes.
371370
- Looks up a specific lump (in this case, `PLAYPAL`) and reads it into a vector.
372-
- Prints the first 32 bytes in hexadecimal a quick sanity check that I’m reading real data and not zeroes or garbage.
371+
- Prints the first 32 bytes in hexadecimal: a quick sanity check that I’m reading real data and not zeroes or garbage.
373372

374373
It’s not polished, but it’s practical and also very temporary.
375374

@@ -384,7 +383,7 @@ The loader now:
384383
- Handles padded 8-character names without breaking map keys.
385384
- Provides direct access to lump data by name.
386385

387-
From here I can start building on it parsing palettes, maps, textures, or even writing tools that inspect and modify WAD contents.
386+
From here I can start building on it: parsing palettes, maps, textures, or even writing tools that inspect and modify WAD contents.
388387
The code is intentionally simple so it’s easy to extend.
389388

390389
---

0 commit comments

Comments
 (0)