summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaurice <maurice.henke@protonmail.com>2021-07-05 23:46:50 +0200
committerMaurice <maurice.henke@protonmail.com>2021-07-05 23:46:50 +0200
commitc361e6607346810ea7adbd251697fc26e8d8b1ff (patch)
tree2c9524c81346a44263d140eb4ef915c32e605366
parent1ff3b00378d905f7d2d37705eb17578a1c21e2cf (diff)
Added custom banner & icon tools
Modified gcipack.py to only strip the header from bti files if it is present Tga2bti.exe (C) LunaBoy
-rw-r--r--GameCube/assets/banner.rawbin6144 -> 6176 bytes
-rw-r--r--GameCube/assets/banner.xcfbin0 -> 11942 bytes
-rw-r--r--GameCube/assets/banner_seed.rawbin0 -> 6176 bytes
-rw-r--r--GameCube/assets/icon.rawbin2048 -> 2080 bytes
-rw-r--r--GameCube/assets/icon.xcfbin0 -> 7912 bytes
-rw-r--r--GameCube/assets/readme.md18
-rw-r--r--GameCube/bin/Tga2bti.exebin0 -> 7680 bytes
-rw-r--r--GameCube/bin/gcipack.py18
8 files changed, 28 insertions, 8 deletions
diff --git a/GameCube/assets/banner.raw b/GameCube/assets/banner.raw
index 3f01d82d..a38d12a1 100644
--- a/GameCube/assets/banner.raw
+++ b/GameCube/assets/banner.raw
Binary files differ
diff --git a/GameCube/assets/banner.xcf b/GameCube/assets/banner.xcf
new file mode 100644
index 00000000..14fc8ebb
--- /dev/null
+++ b/GameCube/assets/banner.xcf
Binary files differ
diff --git a/GameCube/assets/banner_seed.raw b/GameCube/assets/banner_seed.raw
new file mode 100644
index 00000000..051065df
--- /dev/null
+++ b/GameCube/assets/banner_seed.raw
Binary files differ
diff --git a/GameCube/assets/icon.raw b/GameCube/assets/icon.raw
index a48b5ee6..a77c81f6 100644
--- a/GameCube/assets/icon.raw
+++ b/GameCube/assets/icon.raw
Binary files differ
diff --git a/GameCube/assets/icon.xcf b/GameCube/assets/icon.xcf
new file mode 100644
index 00000000..5a42552c
--- /dev/null
+++ b/GameCube/assets/icon.xcf
Binary files differ
diff --git a/GameCube/assets/readme.md b/GameCube/assets/readme.md
new file mode 100644
index 00000000..b512beb8
--- /dev/null
+++ b/GameCube/assets/readme.md
@@ -0,0 +1,18 @@
+# Assets
+This folder contains various assets, here is a brief explanation
+
+## LST Files
+Used for linking external symbols to memory addresses, to account for version differences there is one `.lst` file for each version (us, eu, jp)
+
+## Banner & Icon
+To use a custom banner and icon in the resulting gci you want to look at the following files:
+- banner.xcf
+- icon.xcf
+- ../bin/Tga2bti.exe (C) [Lunaboy](http://kuribo64.net/board/thread.php?id=1599)
+
+1. Edit the template files in [gimp](https://www.gimp.org/)
+2. Export as `TGA` with the following settings:
+![](https://share.aecx.cc/E1B13M)
+(No compression; Origin: Bottom Left)
+3. Execute `Tga2bti.exe -4A3 <file.tga> <file.raw>` for both files (`icon` and `banner`)
+_Note: `5A3` is _not_ supported by the tool but 4A3 seems to work just fine_ \ No newline at end of file
diff --git a/GameCube/bin/Tga2bti.exe b/GameCube/bin/Tga2bti.exe
new file mode 100644
index 00000000..320ec144
--- /dev/null
+++ b/GameCube/bin/Tga2bti.exe
Binary files differ
diff --git a/GameCube/bin/gcipack.py b/GameCube/bin/gcipack.py
index 69b74e8c..ae98934f 100644
--- a/GameCube/bin/gcipack.py
+++ b/GameCube/bin/gcipack.py
@@ -14,19 +14,21 @@ inputFile.close()
bannerFile = open(sys.argv[5], "rb")
bannerBuffer = ctypes.create_string_buffer(bannerFile.read())[:-1]
if len(bannerBuffer) != 0x1800:
- print("Warning: banner size mismatch (should be 96x32 RGB5A3)")
- bannerData = bannerBuffer[0x20:0x1820]
-
- bannerBuffer = bannerData
+ if len(bannerBuffer) == 0x1820:
+ # Remove the bti header
+ bannerBuffer = bannerBuffer[0x20:]
+ else:
+ print("Warning: banner size mismatch (should be 96x32 RGB5A3)")
bannerFile.close()
iconFile = open(sys.argv[6], "rb")
iconBuffer = ctypes.create_string_buffer(iconFile.read())[:-1]
if len(iconBuffer) != 0x800:
- print("Warning: icon size mismatch %d (should be 32x32 RGB5A3)" % len(iconBuffer))
- iconData = iconBuffer[0x20:0x820]
-
- iconBuffer = iconData
+ if len(iconBuffer) == 0x820:
+ # Remove the bti header
+ iconBuffer = iconBuffer[0x20:]
+ else:
+ print("Warning: icon size mismatch %d (should be 32x32 RGB5A3)" % len(iconBuffer))
iconFile.close()
# Comment