Skip to content

Commit

Permalink
Update README and compile script once more
Browse files Browse the repository at this point in the history
  • Loading branch information
xchellx committed Aug 11, 2022
1 parent a558656 commit 51f3fc0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ are in every disc as a file entry "opening.bnr", "peningUS.bnr", "openingEU.bnr"
bnrtool can extract and create these files.

This tool has two modes: `export` and `import`.
In `export` mode, it can extract a BNR file to a TGA image and TXT document.
In `import` mode, it can create a BNR file from a TGA image and TXT document.
- In `export` mode, it can extract a BNR file to a TGA image and TXT document.
- In `import` mode, it can create a BNR file from a TGA image and TXT document in either BNR1 or BNR2 format.

bnrtool does not handle GameCube game disc files, it only works on BNR files alone. You can use Dolphin (you can get it
bnrtool does not handle game disc files, it only works on BNR files alone. You can use Dolphin (you can get it
[here](https://dolphin-emu.org/download/)) to extract the BNR file itself to work on it. For repacking the game disc
file after modifying the BNR, there are many tools but I recommend nodtool which you can find
[here](https://github.com/AxioDL/nod).
Expand All @@ -36,23 +36,23 @@ game maker (company) in long form (64 characters max, single line). Finally, the
description) (128 characters max, 2 lines max). Empty lines are accepted.

## Building
Simply run `.\compile.sh` at root directory of project. This script uses GCC to compile the sources. It also computes
comthe md5, sha1, and sha256 hash of the compiled result afterwards using `md5sum`, `sha1sum`, and `sha256sum`. You
can pass `asan` as the first argument to the script to build a debug build with AddressSanitizer (this isn't supported
on a Windows build). For building for Windows, run this script with MYS2's MinGW x64 or run `./compile.bat`.
Simply run `./compile.sh` at root directory of project. This script uses GCC to compile the sources. It also computes
the md5, sha1, and sha256 hash of the compiled result afterwards using `md5sum`, `sha1sum`, and `sha256sum`. You can
pass `asan` as the first argument to the script to build a debug build with AddressSanitizer (this isn't supported on a
Windows build). For building for Windows, run this script with MYS2's MinGW x64 or run `.\compile.bat`.

## Credits
- Custom Mario Kart Wiiki for it's documentation of the image formats of Nintendo GameCube's GX graphics system
[here](https://wiki.tockdom.com/wiki/Image_Formats#RGB5A3).
- Truevision Inc.'s documentation on the Targa (TGA) image format
[here](https://www.dca.fee.unicamp.br/~martino/disciplinas/ea978/tgaffs.pdf).
- FileFormat's documentation on the Targe (TGA) image format [here](http://www.paulbourke.net/dataformats/tga/)
- Paul Bourke's documentation on the Targe (TGA) image format [here](https://docs.fileformat.com/image/tga/)
- FileFormat's documentation on the Targe (TGA) image format [here](http://www.paulbourke.net/dataformats/tga/).
- Paul Bourke's documentation on the Targe (TGA) image format [here](https://docs.fileformat.com/image/tga/).
- Dan Cross's implementation of strsep [here](https://unixpapa.com/incnote/string.html).
*"All of the C code on this page is public domain and may be used without concern for licenses."*.
- Yet Another Gamecube Documentation for it's documentation of BNR
[here](http://hitmen.c02.at/files/yagcd/yagcd/chap14.html)
- SweetScape's 010 Editor for BNR format research [here](https://www.sweetscape.com/010editor/)
[here](http://hitmen.c02.at/files/yagcd/yagcd/chap14.html).
- SweetScape's 010 Editor for BNR format research [here](https://www.sweetscape.com/010editor/).

## License
```
Expand Down
3 changes: 2 additions & 1 deletion compile.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ elif [ $# -gt 0 ]; then
fi
fi
if [ ! -d "./dst" ]; then mkdir ./dst ; fi
gcc -std=c99 $ASAN -Wno-address-of-packed-member -Wno-stringop-overflow -Wvla -o ./dst/bnrtool$OUTEXT ./src/bnrtool.c \
gcc -std=c99 $ASAN -Wno-address-of-packed-member -Wno-stringop-overflow -Wvla -o ./dst/bnrtool$OUTEXT \
./src/bnrtool.c \
./src/tga.c \
./src/gxtexture.c \
./src/strsep.c \
Expand Down

0 comments on commit 51f3fc0

Please sign in to comment.