Skip to content

Commit 3da44aa

Browse files
committed
Add .wak documentation
1 parent 2fb7916 commit 3da44aa

File tree

4 files changed

+65
-5
lines changed

4 files changed

+65
-5
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SAGE Docs
2+
3+
A place where we gather knowledge around the SAGE engine, created by EA games. Feel free to contribute.
4+
5+
## File Formats
6+
7+
* [.big](file-formats/big/) - archive format, used as the container for most files in SAGE games
8+
* [.wak](file-formats/wak/) - wave definition file, used in C&C Generals to store the location and type of ocean and pond waves

ReadMe.md

Lines changed: 0 additions & 1 deletion
This file was deleted.

Big-Archive.md renamed to file-formats/big/README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
# Description:
1+
# BIG
2+
3+
## Description
4+
25
Big files are an archive format, that was used in many game titles created by EA Studios
36

4-
# Specification:
5-
## Header
7+
## Specification
8+
9+
### Header
610

711
The header has a fixed size of 16 bytes, following the table below:
812

@@ -18,7 +22,7 @@ The header has a fixed size of 16 bytes, following the table below:
1822
* NUM_ENTRIES: Number of files that were packed into this archive
1923
* OFFSET_FIRST: The offset inside the file to the first entry
2024

21-
## List of entries
25+
### List of entries
2226

2327
After the header the follows a list with NUM_ENTRIES elements, each entry looks the following:
2428

file-formats/wak/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# WAK
2+
3+
## Description
4+
5+
`.wak` files were used in C&C Generals and Zero Hour to store ocean and pond wave definitions. In later SAGE games, this data became part of the `.map` format.
6+
7+
Not all maps have accompanying `.wak` files, but those that require wave movement do.
8+
9+
## Specification
10+
11+
### File Structure
12+
13+
The file has a variable number of entries. The number of entries is stored at the end of the file.
14+
15+
| Offset | Bytes | Type | Name |
16+
|--------|-------|--------------|-------------|
17+
| 0 | N | WAVE_ENTRY[] | ENTRIES |
18+
| N | 4 | UINT | NUM_ENTRIES |
19+
20+
* WAVE_ENTRY: See below for wave entry structure
21+
* NUM_ENTRIES: Number of entries
22+
23+
### Wave Entry
24+
25+
Each WAVE_ENTRY looks like the following:
26+
27+
| Offset | Bytes | Type | Name |
28+
|--------|-------|-------|-----------|
29+
| 0 | 4 | UINT | START_X |
30+
| 4 | 4 | UINT | START_Y |
31+
| 8 | 4 | UINT | END_X |
32+
| 12 | 4 | UINT | END_Y |
33+
| 16 | 4 | UINT | WAVE_TYPE |
34+
35+
* START_X and START_Y: Specify the start position of the wave
36+
* END_X and END_Y: Specify the end position of the wave
37+
* WAVE_TYPE: Type of the wave. See WAVE_TYPE enumeration below.
38+
39+
### Enumerations
40+
41+
#### Wave Type
42+
43+
| Value | Name |
44+
|-------|--------------------|
45+
| 0 | POND |
46+
| 1 | OCEAN |
47+
| 2 | CLOSE_OCEAN |
48+
| 3 | CLOSE_OCEAN_DOUBLE |
49+
| 4 | RADIAL |

0 commit comments

Comments
 (0)