shithub: cstory

Download patch

ref: 5579c5773870af306fd011ad86a9a474a505d9c2
parent: c81829e99a956d7593dd1caa29e4b1cd13f7ad50
author: Clownacy <Clownacy@users.noreply.github.com>
date: Thu Sep 3 20:54:23 EDT 2020

Remove some explicit array sizes

These are just annoying, and chances are the source code never did
this.

I might just remove *all* of these at some point.

--- a/src/Bullet.cpp
+++ b/src/Bullet.cpp
@@ -102,7 +102,7 @@
 	}
 }
 
-BULLET_TABLE gBulTbl[46] = {
+BULLET_TABLE gBulTbl[] = {
 	// Null
 	{0, 0, 0, 0, 0, 0, 0, 0, {0, 0, 0, 0}},
 	// Snake
--- a/src/Caret.cpp
+++ b/src/Caret.cpp
@@ -38,7 +38,7 @@
 CARET gCrt[CARET_MAX];
 
 // Sprite offsets
-CARET_TABLE gCaretTable[18] = {
+CARET_TABLE gCaretTable[] = {
 	{0, 0},                   // CARET_NULL
 	{ 4 * 0x200,  4 * 0x200}, // CARET_BUBBLE
 	{ 8 * 0x200,  8 * 0x200}, // CARET_PROJECTILE_DISSIPATION
--- a/src/MapName.cpp
+++ b/src/MapName.cpp
@@ -15,7 +15,7 @@
 	int a;
 
 	// Handle "Studio Pixel presents" text in the intro, using an obfuscated string
-	unsigned char presentText[24] = {
+	unsigned char presentText[] = {
 #ifdef JAPANESE
 		// "開発室Pixel presents"
 		0x8A - 1,	// 開
--- a/src/NpcTbl.cpp
+++ b/src/NpcTbl.cpp
@@ -10,7 +10,7 @@
 #include "NpcAct.h"
 
 // Npc function table
-const NPCFUNCTION gpNpcFuncTbl[361] = {
+const NPCFUNCTION gpNpcFuncTbl[] = {
 	ActNpc000,
 	ActNpc001,
 	ActNpc002,
--- a/src/Stage.cpp
+++ b/src/Stage.cpp
@@ -33,7 +33,7 @@
 
 // Note: Pixel made numerous capitalisation errors when creating this table.
 // This isn't a problem for Windows, because of its case-insensitive filesystem.
-const STAGE_TABLE gTMT[95] = {
+const STAGE_TABLE gTMT[] = {
 	STAGE_ENTRY("0",      "0",      BACKGROUND_TYPE_BLACK,        "bk0",     "Guest",  "0",      0, "Null",                  "\x96\xB3"),	/* 無 */
 	STAGE_ENTRY("Pens",   "Pens1",  BACKGROUND_TYPE_MOVE_DISTANT, "BkBlue",  "Guest",  "0",      0, "Arthur's House",        "\x83\x41\x81\x5B\x83\x54\x81\x5B\x82\xCC\x89\xC6"),	/* アーサーの家 */
 	STAGE_ENTRY("Eggs",   "Eggs",   BACKGROUND_TYPE_MOVE_DISTANT, "BkGreen", "Eggs1",  "Ravil",  0, "Egg Corridor",          "\x83\x5E\x83\x7D\x83\x53\x89\xF1\x98\x4C"),	/* タマゴ回廊 */
@@ -206,7 +206,7 @@
 }
 
 // Music
-const char* const gMusicTable[42] = {
+const char* const gMusicTable[] = {
 	"XXXX",
 	"WANPAKU",
 	"ANZEN",