Skip to content

Commit

Permalink
Merge branch 'unstable'
Browse files Browse the repository at this point in the history
  • Loading branch information
RaphaelTetreault committed Nov 14, 2023
2 parents 914c36f + f1ce184 commit 4b76bf4
Show file tree
Hide file tree
Showing 19 changed files with 628 additions and 117 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Ignore build.bat files
[Bb]uild
[Bb]uilds
#Local files can be placed here
[Ll]ocal

##############################################################################################

Expand Down
61 changes: 54 additions & 7 deletions docs/usage-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ This document provides examples using Windows and calls the `gfz.exe` program. C
| Operating System | Program Call |
| ---------------- | ------------ |
| Windows | `gfz.exe` |
| Linux | `./gfz` |
| Linux | `gfz` |
| macOS | `gfz` |


Expand Down Expand Up @@ -74,12 +74,13 @@ gfz.exe [action] [input-path] [output-path] [other-options]

There are a few options that apply to all actions.

| Option Token | Brief Description |
| ------------------ | ------------------------------------------------------------ |
| `--overwrite` | Allow overwriting output files. Off by default. |
| `--search-pattern` | When ***input-path*** is a directory, the search pattern applied to find files in that directory. Uses single (`?`) and multi (`*`) character wildcards. |
| `--search-subdirs` | When ***input-path*** is a directory, the search pattern applies to subdirectories. Off by default. |
| `--format` | The target serialization format used. Either `ax` or `gx`. Set to `gx` by default. |
| Short Op | Long Option | Brief Description |
| -------- | ------------------ | ------------------------------------------------------------ |
| `-o` | `--overwrite` | Allow overwriting output files. Off by default. |
| `-p` | `--search-pattern` | When ***input-path*** is a directory, the search pattern applied to find files in that directory. Uses single (`?`) and multi (`*`) character wildcards. |
| `-s` | `--search-subdirs` | When ***input-path*** is a directory, the search pattern applies to subdirectories. Off by default. |
| `-f` | `--format` | The target serialization format used. Either `ax` or `gx`. Set to `gx` by default. |
| `-r` | `--region` | The target serialization region used. Options include Japan (`j`, `jp`), Europe (`p`, `eu`), and North America (`e`, `na`). Only needed when IO requires specific knowledge of region. Set to `j` by default. |



Expand Down Expand Up @@ -298,6 +299,52 @@ gfz.exe lz-decompress in/ --search-subdirs



## REL Files

Actions for managing `.rel` files.

### enemy_line line__ file

The file at path `./enemy_line/line__.bin` is an obfuscated `.rel.lz` file that contains a sizeable chunk of game data. The game does a few things to hide the nature of the file.

#### Decrypt line__.bin

To decrypt the file.

```shell
# Decrypt file at path to *.rel.lz and *.rel
gfz.exe rel-decrypt-line__ in/enemy_line/line__.bin
```

You must specify the region and serialization formats as they differ between regions.

```shell
# The default region information and search "*line__.bin"
gfz.exe rel-decrypt-line__ in/ -search-subdirs --region j
```

Right now only GX is supported. AX stores the data elsewhere.

#### Encrypt line__.rel

To encrypt the file.

```shell
# Encrypt file at path to *.rel.lz and *.bin
gfz.exe rel-encrypt-line__ in/enemy_line/line__.rel
```

You must specify the region and serialization formats as they differ between regions.

```shell
# The default region information and search "*line__.rel"
gfz.exe rel-encrypt-line__ in/enemy_line/line__.rel --search-subdirs --region j
```

Right now only GX is supported. AX stores the data elsewhere.



## TPL Texture Palettes

Actions for managing `.tpl` files.
Expand Down
2 changes: 1 addition & 1 deletion libs/GameCube.Core
Submodule GameCube.Core updated 34 files
+12 −0 src/GameCube.Common/BoundingSphere.cs
+9 −0 src/GameCube.Common/GameCube.Common.csproj
+25 −0 src/GameCube.Common/GameCube.Common.sln
+12 −0 src/GameCube.Common/Plane.cs
+1 −1 src/GameCube.DiskImage/DiskHeader.cs
+7 −1 src/GameCube.DiskImage/DiskImage.cs
+1 −1 src/GameCube.DiskImage/FileSystem.cs
+0 −26 src/GameCube.DiskImage/GameCode.cs
+120 −0 src/GameCube.DiskImage/GameID.cs
+10 −0 src/GameCube.DiskImage/Region.cs
+39 −0 src/GameCube.GCI/AnimationSpeed.cs
+18 −0 src/GameCube.GCI/BannerAndIconFlags.cs
+16 −0 src/GameCube.GCI/GameCube.GCI.csproj
+25 −0 src/GameCube.GCI/GameCube.GCI.sln
+220 −0 src/GameCube.GCI/Gci.cs
+238 −0 src/GameCube.GCI/GciHeader.cs
+21 −0 src/GameCube.GCI/GciVoid.cs
+43 −0 src/GameCube.GCI/GciWithUniqueID.cs
+10 −0 src/GameCube.GCI/ImageFormat.cs
+20 −0 src/GameCube.GCI/InvalidGciException.cs
+10 −0 src/GameCube.GCI/PermissionFlags.cs
+5 −5 src/GameCube.GX.Texture/DirectBlock.cs
+27 −2 src/GameCube.GX.Texture/Encoding.cs
+0 −4 src/GameCube.GX.Texture/EncodingCI4.cs
+0 −49 src/GameCube.GX.Texture/FixedSizeTextureRGB5A3.cs
+4 −0 src/GameCube.GX.Texture/GameCube.GX.Texture.csproj
+12 −5 src/GameCube.GX.Texture/IndirectBlock.cs
+0 −8 src/GameCube.GX.Texture/MenuBanner.cs
+0 −8 src/GameCube.GX.Texture/MenuIcon.cs
+43 −14 src/GameCube.GX.Texture/Palette.cs
+1 −1 src/GameCube.GX.Texture/PaletteIA8.cs
+1 −1 src/GameCube.GX.Texture/PaletteRGB565.cs
+1 −1 src/GameCube.GX.Texture/PaletteRGB5A3.cs
+197 −23 src/GameCube.GX.Texture/Texture.cs
2 changes: 1 addition & 1 deletion libs/GameCube.GFZ
Submodule GameCube.GFZ updated 53 files
+1 −1 src/GameCube.GFZ.CarData/MachineID.cs
+144 −0 src/GameCube.GFZ.CarData/PilotID.cs
+62 −0 src/GameCube.GFZ.CarData/PilotPosition.cs
+57 −9 src/GameCube.GFZ.Emblem/Emblem.cs
+1 −1 src/GameCube.GFZ.Emblem/EmblemBIN.cs
+9 −211 src/GameCube.GFZ.Emblem/EmblemGCI.cs
+1 −0 src/GameCube.GFZ.Emblem/GameCube.GFZ.Emblem.csproj
+14 −0 src/GameCube.GFZ.GCI/GameCube.GFZ.GCI.csproj
+151 −0 src/GameCube.GFZ.GCI/GfzGci.cs
+11 −0 src/GameCube.GFZ.GCI/GfzGciFileType.cs
+4 −0 src/GameCube.GFZ.Ghosts/GameCube.GFZ.Ghosts.csproj
+92 −0 src/GameCube.GFZ.Ghosts/GhostData.cs
+20 −0 src/GameCube.GFZ.Ghosts/GhostDataGCI.cs
+20 −0 src/GameCube.GFZ.Ghosts/GhostFlags0x00.cs
+20 −0 src/GameCube.GFZ.Ghosts/GhostFlags0x01.cs
+41 −0 src/GameCube.GFZ.Ghosts/GhostFrame.cs
+0 −48 src/GameCube.GFZ.Ghosts/StaffGhostData.cs
+32 −0 src/GameCube.GFZ.Ghosts/Time.cs
+2 −2 src/GameCube.GFZ.REL/DataBlock.cs
+1 −5 src/GameCube.GFZ.REL/EnemyLine.cs
+0 −13 src/GameCube.GFZ.REL/EnemyLineAddressLookup.cs
+0 −13 src/GameCube.GFZ.REL/EnemyLineAddressLookupGfze01.cs
+0 −13 src/GameCube.GFZ.REL/EnemyLineAddressLookupGfzj01.cs
+0 −13 src/GameCube.GFZ.REL/EnemyLineAddressLookupGfzp01.cs
+0 −15 src/GameCube.GFZ.REL/EnemyLineAddresses.cs
+40 −0 src/GameCube.GFZ.REL/EnemyLineDataBlocks.cs
+50 −0 src/GameCube.GFZ.REL/EnemyLineDataBlocksGfze01.cs
+49 −0 src/GameCube.GFZ.REL/EnemyLineDataBlocksGfzj01.cs
+50 −0 src/GameCube.GFZ.REL/EnemyLineDataBlocksGfzp01.cs
+0 −36 src/GameCube.GFZ.REL/EnemyLineInformation.cs
+0 −40 src/GameCube.GFZ.REL/EnemyLineInformationLookup.cs
+0 −50 src/GameCube.GFZ.REL/EnemyLineInformationLookupGfze01.cs
+0 −49 src/GameCube.GFZ.REL/EnemyLineInformationLookupGfzj01.cs
+0 −50 src/GameCube.GFZ.REL/EnemyLineInformationLookupGfzp01.cs
+36 −0 src/GameCube.GFZ.REL/EnemyLineLookup.cs
+387 −390 src/GameCube.GFZ.REL/EnemyLineUtility.cs
+1 −0 src/GameCube.GFZ.REL/GameCube.GFZ.REL.csproj
+48 −0 src/GameCube.GFZ.REL/MainDolDataBlocksGfzj8p.cs
+0 −49 src/GameCube.GFZ.REL/MainDolInformationLookupGfzj8p.cs
+30 −0 src/GameCube.GFZ.REL/MinimapProjection.cs
+0 −208 src/GameCube.GFZ.REL/Pilot.cs
+58 −0 src/GameCube.GFZ.Replay/Checkpoint.cs
+61 −0 src/GameCube.GFZ.Replay/CustomMachine.cs
+16 −0 src/GameCube.GFZ.Replay/GameCube.GFZ.Replay.csproj
+33 −0 src/GameCube.GFZ.Replay/Input.cs
+38 −0 src/GameCube.GFZ.Replay/RaceParticipant.cs
+72 −0 src/GameCube.GFZ.Replay/Replay.cs
+32 −0 src/GameCube.GFZ.Replay/ReplayGCI.cs
+2 −2 src/GameCube.GFZ.Stage/CourseIndexAX.cs
+2 −2 src/GameCube.GFZ.Stage/CourseIndexGX.cs
+1 −1 src/GameCube.GFZ.TPL/Tpl.cs
+4 −4 src/GameCube.GFZ/GameCode.cs
+15 −0 src/GameCube.GFZ/GameCodeFields.cs
Loading

0 comments on commit 4b76bf4

Please sign in to comment.