shithub: zelda3

Download patch

ref: c3f084da18d88c841839f3dcfd717d891aed25f7
parent: e72f93c47a8e70772c9a247ed68b147684b1a534
author: Snesrev <snesrev@protonmail.com>
date: Wed Oct 19 14:57:30 EDT 2022

Silence more warnings

--- a/glsl_shader.c
+++ b/glsl_shader.c
@@ -114,7 +114,6 @@
 }
 
 static bool GlslShader_ReadPresetFile(GlslShader *gs, const char *filename) {
-  bool return_value = false;
   char *data = (char *)ReadWholeFile(filename, NULL), *data_org = data, *line;
   GlslPass *pass;
   if (data == NULL)
--- a/hud.c
+++ b/hud.c
@@ -46,150 +46,139 @@
 
 #define kHudItemInVramPtr (kNewStyleInventory ? kHudItemInVramPtr_New : kHudItemInVramPtr_Old)
 
-static const uint16 kHudBottlesGfx[128] = {
-  0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x255c, 0x2564, 0x2562, 0x2557, 0x2561, 0x255e, 0x255e, 0x255c,
-  0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x2551, 0x255e, 0x2563, 0x2563, 0x255b, 0x2554, 0x24f5, 0x24f5,
-  0x255b, 0x2558, 0x2555, 0x2554, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x255c, 0x2554, 0x2553, 0x2558, 0x2552, 0x2558, 0x255d, 0x2554,
-  0x255c, 0x2550, 0x2556, 0x2558, 0x2552, 0x24f5, 0x24f5, 0x24f5, 0x255c, 0x2554, 0x2553, 0x2558, 0x2552, 0x2558, 0x255d, 0x2554,
-  0x2552, 0x2564, 0x2561, 0x2554, 0x256a, 0x2550, 0x255b, 0x255b, 0x255c, 0x2554, 0x2553, 0x2558, 0x2552, 0x2558, 0x255d, 0x2554,
-  0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x2555, 0x2550, 0x2554, 0x2561, 0x2558, 0x2554, 0x24f5, 0x24f5,
-  0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x2551, 0x2554, 0x2554, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5,
-  0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x24f5, 0x2556, 0x255e, 0x255e, 0x2553, 0x24f5, 0x2551, 0x2554, 0x2554,
-};
-
 static const ItemBoxGfx kHudItemBottles[9] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x2044, 0x2045, 0x2046, 0x2047},
-  {0x2837, 0x2838, 0x2cc3, 0x2cd3},
-  {0x24d2, 0x64d2, 0x24e2, 0x24e3},
-  {0x3cd2, 0x7cd2, 0x3ce2, 0x3ce3},
-  {0x2cd2, 0x6cd2, 0x2ce2, 0x2ce3},
-  {0x2855, 0x6855, 0x2c57, 0x2c5a},
-  {0x2837, 0x2838, 0x2839, 0x283a},
-  {0x2837, 0x2838, 0x2839, 0x283a},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x2044, 0x2045, 0x2046, 0x2047}},
+  {{0x2837, 0x2838, 0x2cc3, 0x2cd3}},
+  {{0x24d2, 0x64d2, 0x24e2, 0x24e3}},
+  {{0x3cd2, 0x7cd2, 0x3ce2, 0x3ce3}},
+  {{0x2cd2, 0x6cd2, 0x2ce2, 0x2ce3}},
+  {{0x2855, 0x6855, 0x2c57, 0x2c5a}},
+  {{0x2837, 0x2838, 0x2839, 0x283a}},
+  {{0x2837, 0x2838, 0x2839, 0x283a}},
 };
 static const ItemBoxGfx kHudItemBow[5] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x28ba, 0x28e9, 0x28e8, 0x28cb},
-  {0x28ba, 0x284a, 0x2849, 0x28cb},
-  {0x28ba, 0x28e9, 0x28e8, 0x28cb},
-  {0x28ba, 0x28bb, 0x24ca, 0x28cb},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x28ba, 0x28e9, 0x28e8, 0x28cb}},
+  {{0x28ba, 0x284a, 0x2849, 0x28cb}},
+  {{0x28ba, 0x28e9, 0x28e8, 0x28cb}},
+  {{0x28ba, 0x28bb, 0x24ca, 0x28cb}},
 };
 static const ItemBoxGfx kHudItemBoomerang[3] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x2cb8, 0x2cb9, 0x2cf5, 0x2cc9},
-  {0x24b8, 0x24b9, 0x24f5, 0x24c9},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x2cb8, 0x2cb9, 0x2cf5, 0x2cc9}},
+  {{0x24b8, 0x24b9, 0x24f5, 0x24c9}},
 };
 static const ItemBoxGfx kHudItemHookshot[2] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x24f5, 0x24f6, 0x24c0, 0x24f5},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x24f5, 0x24f6, 0x24c0, 0x24f5}},
 };
 static const ItemBoxGfx kHudItemBombs[2] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x2cb2, 0x2cb3, 0x2cc2, 0x6cc2},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x2cb2, 0x2cb3, 0x2cc2, 0x6cc2}},
 };
 static const ItemBoxGfx kHudItemMushroom[3] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x2444, 0x2445, 0x2446, 0x2447},
-  {0x203b, 0x203c, 0x203d, 0x203e},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x2444, 0x2445, 0x2446, 0x2447}},
+  {{0x203b, 0x203c, 0x203d, 0x203e}},
 };
 static const ItemBoxGfx kHudItemFireRod[2] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x24b0, 0x24b1, 0x24c0, 0x24c1},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x24b0, 0x24b1, 0x24c0, 0x24c1}},
 };
 static const ItemBoxGfx kHudItemIceRod[2] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x2cb0, 0x2cbe, 0x2cc0, 0x2cc1},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x2cb0, 0x2cbe, 0x2cc0, 0x2cc1}},
 };
 static const ItemBoxGfx kHudItemBombos[2] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x287d, 0x287e, 0xe87e, 0xe87d},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x287d, 0x287e, 0xe87e, 0xe87d}},
 };
 static const ItemBoxGfx kHudItemEther[2] = {
-  {0x20f5, 0x20f5,  0x20f5,  0x20f5},
-  {0x2876, 0x2877, 0xE877, 0xE876},
+  {{0x20f5, 0x20f5,  0x20f5,  0x20f5}},
+  {{0x2876, 0x2877, 0xE877, 0xE876}},
 };
 static const ItemBoxGfx kHudItemQuake[2] = {
-  {0x20f5, 0x20f5,  0x20f5,  0x20f5},
-  {0x2866, 0x2867, 0xE867, 0xE866},
+  {{0x20f5, 0x20f5,  0x20f5,  0x20f5}},
+  {{0x2866, 0x2867, 0xE867, 0xE866}},
 };
 static const ItemBoxGfx kHudItemTorch[2] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x24bc, 0x24bd, 0x24cc, 0x24cd},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x24bc, 0x24bd, 0x24cc, 0x24cd}},
 };
 static const ItemBoxGfx kHudItemHammer[2] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x20b6, 0x20b7, 0x20c6, 0x20c7},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x20b6, 0x20b7, 0x20c6, 0x20c7}},
 };
 static const ItemBoxGfx kHudItemFlute[4] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x20d0, 0x20d1, 0x20e0, 0x20e1},
-  {0x2cd4, 0x2cd5, 0x2ce4, 0x2ce5},
-  {0x2cd4, 0x2cd5, 0x2ce4, 0x2ce5},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x20d0, 0x20d1, 0x20e0, 0x20e1}},
+  {{0x2cd4, 0x2cd5, 0x2ce4, 0x2ce5}},
+  {{0x2cd4, 0x2cd5, 0x2ce4, 0x2ce5}},
 };
 static const ItemBoxGfx kHudItemBugNet[2] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x3c40, 0x3c41, 0x2842, 0x3c43},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x3c40, 0x3c41, 0x2842, 0x3c43}},
 };
 static const ItemBoxGfx kHudItemBookMudora[2] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x3ca5, 0x3ca6, 0x3cd8, 0x3cd9},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x3ca5, 0x3ca6, 0x3cd8, 0x3cd9}},
 };
 static const ItemBoxGfx kHudItemCaneSomaria[2] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x24dc, 0x24dd, 0x24ec, 0x24ed},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x24dc, 0x24dd, 0x24ec, 0x24ed}},
 };
 static const ItemBoxGfx kHudItemCaneByrna[2] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x2cdc, 0x2cdd, 0x2cec, 0x2ced},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x2cdc, 0x2cdd, 0x2cec, 0x2ced}},
 };
 static const ItemBoxGfx kHudItemCape[2] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x24b4, 0x24b5, 0x24c4, 0x24c5},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x24b4, 0x24b5, 0x24c4, 0x24c5}},
 };
 static const ItemBoxGfx kHudItemMirror[4] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x28de, 0x28df, 0x28ee, 0x28ef},
-  {0x2c62, 0x2c63, 0x2c72, 0x2c73},
-  {0x2886, 0x2887, 0x2888, 0x2889},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x28de, 0x28df, 0x28ee, 0x28ef}},
+  {{0x2c62, 0x2c63, 0x2c72, 0x2c73}},
+  {{0x2886, 0x2887, 0x2888, 0x2889}},
 };
 static const ItemBoxGfx kHudItemGloves[3] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x2130, 0x2131, 0x2140, 0x2141},
-  {0x28da, 0x28db, 0x28ea, 0x28eb},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x2130, 0x2131, 0x2140, 0x2141}},
+  {{0x28da, 0x28db, 0x28ea, 0x28eb}},
 };
 static const ItemBoxGfx kHudItemBoots[2] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x3429, 0x342a, 0x342b, 0x342c},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x3429, 0x342a, 0x342b, 0x342c}},
 };
 static const ItemBoxGfx kHudItemFlippers[2] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x2c9a, 0x2c9b, 0x2c9d, 0x2c9e},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x2c9a, 0x2c9b, 0x2c9d, 0x2c9e}},
 };
 static const ItemBoxGfx kHudItemMoonPearl[2] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x2433, 0x2434, 0x2435, 0x2436},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x2433, 0x2434, 0x2435, 0x2436}},
 };
 static const ItemBoxGfx kHudItemEmpty[1] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
 };
 static const ItemBoxGfx kHudItemSword[5] = {
-  {0x20f5, 0x20f5, 0x20f5, 0x20f5},
-  {0x2c64, 0x2cce, 0x2c75, 0x3d25},
-  {0x2c8a, 0x2c65, 0x2474, 0x3d26},
-  {0x248a, 0x2465, 0x3c74, 0x2d48},
-  {0x288a, 0x2865, 0x2c74, 0x2d39},
+  {{0x20f5, 0x20f5, 0x20f5, 0x20f5}},
+  {{0x2c64, 0x2cce, 0x2c75, 0x3d25}},
+  {{0x2c8a, 0x2c65, 0x2474, 0x3d26}},
+  {{0x248a, 0x2465, 0x3c74, 0x2d48}},
+  {{0x288a, 0x2865, 0x2c74, 0x2d39}},
 };
 static const ItemBoxGfx kHudItemShield[4] = {
-  {0x24f5, 0x24f5, 0x24f5, 0x24f5},
-  {0x2cfd, 0x6cfd, 0x2cfe, 0x6cfe},
-  {0x34ff, 0x74ff, 0x349f, 0x749f},
-  {0x2880, 0x2881, 0x288d, 0x288e},
+  {{0x24f5, 0x24f5, 0x24f5, 0x24f5}},
+  {{0x2cfd, 0x6cfd, 0x2cfe, 0x6cfe}},
+  {{0x34ff, 0x74ff, 0x349f, 0x749f}},
+  {{0x2880, 0x2881, 0x288d, 0x288e}},
 };
 static const ItemBoxGfx kHudItemArmor[5] = {
-  {0x3c68, 0x7c68, 0x3c78, 0x7c78},
-  {0x2c68, 0x6c68, 0x2c78, 0x6c78},
-  {0x2468, 0x6468, 0x2478, 0x6478},
+  {{0x3c68, 0x7c68, 0x3c78, 0x7c78}},
+  {{0x2c68, 0x6c68, 0x2c78, 0x6c78}},
+  {{0x2468, 0x6468, 0x2478, 0x6478}},
 };
 
 
@@ -1013,16 +1002,16 @@
     0xa8fb, 0xa8f9, 0xa8f9, 0xa8f9, 0xa8f9, 0xa8f9, 0xa8f9, 0xa8f9, 0xa8f9, 0xe8fb,
   };
   static const ItemBoxGfx kHudPendants0[2] = {
-    {0x313b, 0x313c, 0x313d, 0x313e},
-    {0x252b, 0x252c, 0x252d, 0x252e}
+    {{0x313b, 0x313c, 0x313d, 0x313e}},
+    {{0x252b, 0x252c, 0x252d, 0x252e}},
   };
   static const ItemBoxGfx kHudPendants1[2] = {
-    {0x313b, 0x313c, 0x313d, 0x313e},
-    {0x2d2b, 0x2d2c, 0x2d2d, 0x2d2e}
+    {{0x313b, 0x313c, 0x313d, 0x313e}},
+    {{0x2d2b, 0x2d2c, 0x2d2d, 0x2d2e}},
   };
   static const ItemBoxGfx kHudPendants2[2] = {
-    {0x313b, 0x313c, 0x313d, 0x313e},
-    {0x3d2b, 0x3d2c, 0x3d2d, 0x3d2e}
+    {{0x313b, 0x313c, 0x313d, 0x313e}},
+    {{0x3d2b, 0x3d2c, 0x3d2d, 0x3d2e}},
   };
   uint16 *dst = uvram_screen.row[0].col + (kNewStyleInventory ? HUDXY(22, 11) : HUDXY(21, 11));
   Hud_DrawNxN(dst, kProgressIconPendantsBg, 10, 9);
@@ -1195,10 +1184,10 @@
   memcpy(dst + HUDXY(22, 26), &kHudEquipmentDungeonItemText[8], 8 * sizeof(uint16));
 
   static const ItemBoxGfx kHudItemHeartPieces[4] = {
-    {0x2484, 0x6484, 0x2485, 0x6485},
-    {0x24ad, 0x6484, 0x2485, 0x6485},
-    {0x24ad, 0x6484, 0x24ae, 0x6485},
-    {0x24ad, 0x64ad, 0x24ae, 0x6485},
+    {{0x2484, 0x6484, 0x2485, 0x6485}},
+    {{0x24ad, 0x6484, 0x2485, 0x6485}},
+    {{0x24ad, 0x6484, 0x24ae, 0x6485}},
+    {{0x24ad, 0x64ad, 0x24ae, 0x6485}},
   };
   if (cur_palace_index_x2 == 0xff) {
     for (int i = 0; i < 8; i++)
@@ -1210,14 +1199,14 @@
   Hud_DrawItem(dst + HUDXY(28, 23), &kHudItemArmor[link_armor]);
 
   static const ItemBoxGfx kHudItemPalaceItem[2] = {
-    {0x28d6, 0x68d6, 0x28e6, 0x28e7},
-    {0x354b, 0x354c, 0x354d, 0x354e},
+    {{0x28d6, 0x68d6, 0x28e6, 0x28e7}},
+    {{0x354b, 0x354c, 0x354d, 0x354e}},
   };
   static const ItemBoxGfx kHudItemDungeonMap[1] = {
-    {0x28de, 0x28df, 0x28ee, 0x28ef},
+    {{0x28de, 0x28df, 0x28ee, 0x28ef}},
   };
   static const ItemBoxGfx kHudItemDungeonCompass[1] = {
-    {0x24bf, 0x64bf, 0x2ccf, 0x6ccf},
+    {{0x24bf, 0x64bf, 0x2ccf, 0x6ccf}},
   };
   if (cur_palace_index_x2 != 0xff &&
      (link_bigkey << (cur_palace_index_x2 >> 1)) & 0x8000) {
--- a/nmi.c
+++ b/nmi.c
@@ -288,7 +288,7 @@
 }
 
 void NMI_UpdateOWScroll() {  // 808d13
-  uint8 *src = (uint8 *)uvram.data, *src_org = src;
+  uint8 *src = (uint8 *)uvram.data;
   int f = WORD(src[0]);
   int step = (f & 0x8000) ? 32 : 1;
   int len = f & 0x3fff;
@@ -391,7 +391,6 @@
 }
 
 void NMI_UploadDarkWorldMap() {  // 808ff3
-  static const uint16 kLightWorldTileMapSrcs[4] = { 0, 0x20, 0x1000, 0x1020 };
   const uint8 *src = g_ram + 0x1000;
   int t = 0x810;
   for (int i = 0x20; i; i--) {
--- a/opengl.c
+++ b/opengl.c
@@ -37,7 +37,7 @@
 static bool OpenGLRenderer_Init(SDL_Window *window) {
   g_window = window;
   SDL_GLContext context = SDL_GL_CreateContext(window);
-  const char *error = SDL_GetError();
+  (void)context;
 
   SDL_GL_SetSwapInterval(1);
   ogl_LoadFunctions();
--- a/overworld.c
+++ b/overworld.c
@@ -1506,7 +1506,8 @@
   uint16 x = link_x_coord, xd = 0;
   if (x != link_x_coord_cached) {
     int16 d = (x > link_x_coord_cached) ? -1 : 1;
-    ((x += d) != link_x_coord_cached) && (x += d);
+    if ((x += d) != link_x_coord_cached)
+      x += d;
     xd = x - link_x_coord;
     link_x_coord = x;
   }
@@ -1513,7 +1514,8 @@
   uint16 y = link_y_coord, yd = 0;
   if (y != link_y_coord_cached) {
     int16 d = (y > link_y_coord_cached) ? -1 : 1;
-    ((y += d) != link_y_coord_cached) && (y += d);
+    if ((y += d) != link_y_coord_cached)
+      y += d;
     yd = y - link_y_coord;
     link_y_coord = y;
   }
@@ -2456,14 +2458,11 @@
 
 
 void Overworld_DecompressAndDrawOneQuadrant(uint16 *dst, int screen) {  // 82f595
-  int rv;
-
-
-  rv = Decompress_bank02(&g_ram[0x14400], GetOverworldHibytes(screen));
+  Decompress_bank02(&g_ram[0x14400], GetOverworldHibytes(screen));
   for (int i = 0; i < 256; i++)
     g_ram[0x14001 + i * 2] = g_ram[0x14400 + i];
 
-  rv = Decompress_bank02(&g_ram[0x14400], GetOverworldLobytes(screen));
+  Decompress_bank02(&g_ram[0x14400], GetOverworldLobytes(screen));
   for (int i = 0; i < 256; i++)
     g_ram[0x14000 + i * 2] = g_ram[0x14400 + i];
 
--- a/player_oam.c
+++ b/player_oam.c
@@ -922,7 +922,6 @@
   BYTE(index_of_interacting_tile) = rt;
 
   int dir = link_direction_facing >> 1;
-  int scratch_1_var = dir * 14;
 
   int r2 = kPlayerOamOtherOffs[dir * 40 + yt] + rt;
   int r4loc = kPlayerOamSpriteLocs[r2];
@@ -1251,7 +1250,6 @@
   oam_y += kOffsToShadowGivenDir_Y[i];
 
   int oam_pos = (kShadow_oam_indexes_1[r4loc] + sort_sprites_offset_into_oam_buffer)>>2;
-  uint8 animst = secondary_water_grass_timer;
 
   uint8 yv;
   if (draw_water_ripples_or_grass == 2) {
--- a/spc_player.c
+++ b/spc_player.c
@@ -780,7 +780,7 @@
   if (note >= 0xc8 || p->is_chan_on & p->cur_chan_bit)
     return;
 
-  static const char *const kNoteNames[] = { "C-", "C#", "D-", "D#", "E-", "F-", "F#", "G-", "G#", "A-", "A#", "B-" };
+  //static const char *const kNoteNames[] = { "C-", "C#", "D-", "D#", "E-", "F-", "F#", "G-", "G#", "A-", "A#", "B-" };
   //if (c->index==0)
   //  printf("%s%d\n", kNoteNames[(note & 0x7f) % 12], (note & 0x7f) / 12 + 1);
 
@@ -1119,8 +1119,6 @@
 }
 
 static void Spc_Loop_Part1(SpcPlayer *p) {
-  static const uint8 kRegAddrs0[10] = {EVOLL, EVOLR, EFB, EON, FLG, KON, KOF, NON, PMON, KOF};
-
   Dsp_Write(p, KOF, p->key_OFF);
   Dsp_Write(p, PMON, p->reg_PMON);
   Dsp_Write(p, NON, p->reg_NON);