瀏覽代碼

update titlescreen palettes, fixes #2

SBird1337 6 年之前
父節點
當前提交
de5f42f0c2
共有 6 個檔案被更改,包括 88 行新增3 行删除
  1. 14
    0
      hex2rgba.py
  2. 2
    2
      patches/graphics/title.asm
  3. 二進制
      pkmn_sots.dmp
  4. 1
    1
      sots-private
  5. 70
    0
      src/game_engine/title_screen.c
  6. 1
    0
      test.txt

+ 14
- 0
hex2rgba.py 查看文件

@@ -0,0 +1,14 @@
1
+import struct
2
+
3
+with open("pkmn_sots.dmp", "rb") as f:
4
+    output = ""
5
+    while True:
6
+        s = f.read(2)
7
+        if not s:
8
+            break
9
+        col = struct.unpack("<H", s)[0]
10
+        r = col & 0x1F
11
+        g = (col >> 5) & 0x1F
12
+        b = (col >> 10) & 0x1F
13
+        output = output + "rgb82rgb5(0x{:02x},0x{:02x},0x{:02x}), ".format(r*8,g*8,b*8)
14
+    print(output)

+ 2
- 2
patches/graphics/title.asm 查看文件

@@ -24,10 +24,10 @@
24 24
 .word title_tileset_logo_nameTiles
25 25
 
26 26
 .org 0x08078A94
27
-.word ts_pals
27
+.word titlescreen_palette
28 28
 
29 29
 .org 0x080796C0
30
-.word ts_pals
30
+.word titlescreen_palette
31 31
 
32 32
 .org 0x08078A9C
33 33
 .word title_tileset_logo_nameMap

二進制
pkmn_sots.dmp 查看文件


+ 1
- 1
sots-private

@@ -1 +1 @@
1
-Subproject commit 30a5ab2f03ce0b2e02babac2dbd9a243688c4057
1
+Subproject commit 8b48ca3e38d8d150a701fee9065d0e0d1e497337

+ 70
- 0
src/game_engine/title_screen.c 查看文件

@@ -0,0 +1,70 @@
1
+#include <pokeagb/pokeagb.h>
2
+
3
+const union Color titlescreen_palette[] = {
4
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x28,0x50,0x90), rgb82rgb5(0x30,0x68,0xb0), rgb82rgb5(0xc0,0x98,0x10),
5
+rgb82rgb5(0x58,0x78,0x98), rgb82rgb5(0x78,0x88,0x50), rgb82rgb5(0xf0,0xc0,0x08), rgb82rgb5(0x20,0x38,0x70),
6
+rgb82rgb5(0x30,0x58,0xa0), rgb82rgb5(0x30,0x60,0xa8), rgb82rgb5(0x48,0x68,0x98), rgb82rgb5(0x88,0x88,0x50),
7
+rgb82rgb5(0xd8,0xb0,0x08), rgb82rgb5(0xe8,0xb8,0x08), rgb82rgb5(0xf8,0xc8,0x00), rgb82rgb5(0x68,0x78,0x80),
8
+
9
+rgb82rgb5(0xb0,0xa0,0x40), rgb82rgb5(0x30,0x38,0x68), rgb82rgb5(0xe8,0xe8,0xf8), rgb82rgb5(0x00,0x00,0x00),
10
+rgb82rgb5(0x68,0xa8,0xd0), rgb82rgb5(0xf8,0xf8,0xf8), rgb82rgb5(0x48,0x90,0xb8), rgb82rgb5(0xe0,0xe8,0xf0),
11
+rgb82rgb5(0x38,0x80,0xa8), rgb82rgb5(0xb8,0xd0,0xe8), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00),
12
+rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00),
13
+
14
+rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0xf6,0xf6,0xf6), rgb82rgb5(0x73,0xaf,0xdc), rgb82rgb5(0x87,0xbf,0xf8),
15
+rgb82rgb5(0x5a,0x89,0xbd), rgb82rgb5(0x5f,0x50,0xa3), rgb82rgb5(0x43,0x30,0x50), rgb82rgb5(0x40,0x67,0x97), 
16
+rgb82rgb5(0xea,0xa7,0x2b), rgb82rgb5(0x39,0x39,0x35), rgb82rgb5(0x9a,0x38,0x4b), rgb82rgb5(0xff,0x73,0x4a),
17
+rgb82rgb5(0x3a,0x44,0x6b), rgb82rgb5(0xde,0x4a,0x52), rgb82rgb5(0x52,0x73,0xd5), rgb82rgb5(0xb4,0xdc,0xfc), 
18
+
19
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x78,0x78,0x70), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x48,0x48,0x40),
20
+rgb82rgb5(0xe8,0xe8,0xf8), rgb82rgb5(0x30,0x30,0x28), rgb82rgb5(0xa8,0xa8,0xa8), rgb82rgb5(0x20,0x20,0x18), 
21
+rgb82rgb5(0x18,0x18,0x10), rgb82rgb5(0x08,0x08,0x08), rgb82rgb5(0x38,0x38,0x30), rgb82rgb5(0x00,0x00,0x00), 
22
+rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), 
23
+
24
+rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0xff,0xFF,0xff), rgb82rgb5(0x73,0xaf,0xdc), rgb82rgb5(0x87,0xbf,0xf8),
25
+rgb82rgb5(0x5a,0x89,0xbd), rgb82rgb5(0x5f,0x50,0xa3), rgb82rgb5(0x43,0x30,0x50), rgb82rgb5(0x40,0x67,0x97),
26
+rgb82rgb5(0xea,0xa7,0x2b), rgb82rgb5(0x39,0x39,0x35), rgb82rgb5(0x9a,0x38,0x4b), rgb82rgb5(0xff,0x73,0x4a),
27
+rgb82rgb5(0x3a,0x44,0x6b), rgb82rgb5(0xde,0x4a,0x52), rgb82rgb5(0x52,0x73,0xd5), rgb82rgb5(0xb4,0xdc,0xfc),
28
+
29
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
30
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
31
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
32
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
33
+
34
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
35
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
36
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
37
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
38
+
39
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
40
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
41
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
42
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
43
+
44
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
45
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
46
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
47
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
48
+
49
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
50
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
51
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
52
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
53
+
54
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
55
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
56
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
57
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
58
+
59
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
60
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
61
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
62
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
63
+
64
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
65
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
66
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
67
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x00,0x80,0x00),
68
+
69
+};
70
+

+ 1
- 0
test.txt 查看文件

@@ -0,0 +1 @@
1
+rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x28,0x50,0x90), rgb82rgb5(0x30,0x68,0xb0), rgb82rgb5(0xc0,0x98,0x10), rgb82rgb5(0x58,0x78,0x98), rgb82rgb5(0x78,0x88,0x50), rgb82rgb5(0xf0,0xc0,0x08), rgb82rgb5(0x20,0x38,0x70), rgb82rgb5(0x30,0x58,0xa0), rgb82rgb5(0x30,0x60,0xa8), rgb82rgb5(0x48,0x68,0x98), rgb82rgb5(0x88,0x88,0x50), rgb82rgb5(0xd8,0xb0,0x08), rgb82rgb5(0xe8,0xb8,0x08), rgb82rgb5(0xf8,0xc8,0x00), rgb82rgb5(0x68,0x78,0x80), rgb82rgb5(0xb0,0xa0,0x40), rgb82rgb5(0x30,0x38,0x68), rgb82rgb5(0xe8,0xe8,0xf8), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x68,0xa8,0xd0), rgb82rgb5(0xf8,0xf8,0xf8), rgb82rgb5(0x48,0x90,0xb8), rgb82rgb5(0xe0,0xe8,0xf0), rgb82rgb5(0x38,0x80,0xa8), rgb82rgb5(0xb8,0xd0,0xe8), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x40,0x60,0x90), rgb82rgb5(0x38,0x40,0x68), rgb82rgb5(0xb0,0xd8,0xf8), rgb82rgb5(0x80,0xb8,0xf8), rgb82rgb5(0x58,0x88,0xb8), rgb82rgb5(0x98,0x38,0x48), rgb82rgb5(0xf8,0xa8,0x90), rgb82rgb5(0x38,0x38,0x30), rgb82rgb5(0xf8,0x70,0x48), rgb82rgb5(0xd8,0x48,0x50), rgb82rgb5(0x70,0xa8,0xd8), rgb82rgb5(0x50,0x70,0xd0), rgb82rgb5(0x60,0x60,0x58), rgb82rgb5(0xf0,0xf0,0xf0), rgb82rgb5(0x48,0x50,0x80), rgb82rgb5(0x00,0x80,0x00), rgb82rgb5(0x78,0x78,0x70), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x48,0x48,0x40), rgb82rgb5(0xe8,0xe8,0xf8), rgb82rgb5(0x30,0x30,0x28), rgb82rgb5(0xa8,0xa8,0xa8), rgb82rgb5(0x20,0x20,0x18), rgb82rgb5(0x18,0x18,0x10), rgb82rgb5(0x08,0x08,0x08), rgb82rgb5(0x38,0x38,0x30), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x70,0xa8,0xd8), rgb82rgb5(0x80,0xb8,0xf8), rgb82rgb5(0x58,0x88,0xb8), rgb82rgb5(0x60,0x60,0x58), rgb82rgb5(0x30,0x30,0x28), rgb82rgb5(0x40,0x60,0x90), rgb82rgb5(0xe8,0xa0,0x28), rgb82rgb5(0x38,0x38,0x30), rgb82rgb5(0xb0,0xd8,0xf8), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00), rgb82rgb5(0x00,0x00,0x00),