Avoid some arrays being of predefined size
This makes it easier to change the array size via content
This commit is contained in:
parent
0a1b4d347c
commit
cab3ebddf5
4 changed files with 18 additions and 82 deletions
|
|
@ -35,7 +35,7 @@ BOOL talkbtndown[3];
|
|||
int pSpell;
|
||||
BYTE *pManaBuff;
|
||||
char infoclr;
|
||||
int sgbPlrTalkTbl; // should be char [4]
|
||||
int sgbPlrTalkTbl;
|
||||
BYTE *pGBoxBuff;
|
||||
BYTE *pSBkBtnCel;
|
||||
char tempstr[256];
|
||||
|
|
@ -152,7 +152,7 @@ const BYTE gbFontTransTbl[256] = {
|
|||
'A', 'A', 'A', 'A', 'A', 'A', 'A', 'C', 'E', 'E', 'E', 'E', 'I', 'I', 'I', 'I',
|
||||
'D', 'N', 'O', 'O', 'O', 'O', 'O', 'X', '0', 'U', 'U', 'U', 'U', 'Y', 'b', 'B',
|
||||
'a', 'a', 'a', 'a', 'a', 'a', 'a', 'c', 'e', 'e', 'e', 'e', 'i', 'i', 'i', 'i',
|
||||
'o', 'n', 'o', 'o', 'o', 'o', 'o', '/', '0', 'u', 'u', 'u', 'u', 'y', 'b', 'y'
|
||||
'o', 'n', 'o', 'o', 'o', 'o', 'o', '/', '0', 'u', 'u', 'u', 'u', 'y', 'b', 'y',
|
||||
// clang-format on
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
#include "all.h"
|
||||
|
||||
/** Data related to each spell ID. */
|
||||
SpellData spelldata[MAX_SPELLS] = {
|
||||
SpellData spelldata[] = {
|
||||
// clang-format off
|
||||
// sName, sManaCost, sType, sNameText, sSkillText, sBookLvl, sStaffLvl, sTargeted, sTownSpell, sMinInt, sSFX, sMissiles[3], sManaAdj, sMinMana, sStaffMin, sStaffMax, sBookCost, sStaffCost
|
||||
{ SPL_NULL, 0, 0, NULL, NULL, 0, 0, FALSE, FALSE, 0, 0, { 0, 0, 0 }, 0, 0, 40, 80, 0, 0 },
|
||||
|
|
|
|||
|
|
@ -2,6 +2,6 @@
|
|||
#ifndef __SPELLDAT_H__
|
||||
#define __SPELLDAT_H__
|
||||
|
||||
extern SpellData spelldata[MAX_SPELLS];
|
||||
extern SpellData spelldata[];
|
||||
|
||||
#endif /* __SPELLDAT_H__ */
|
||||
|
|
|
|||
|
|
@ -6,84 +6,20 @@ int numtrigs;
|
|||
TriggerStruct trigs[MAXTRIGGERS];
|
||||
int TWarpFrom;
|
||||
|
||||
int TownDownList[11] = { 716, 715, 719, 720, 721, 723, 724, 725, 726, 727, -1 };
|
||||
int TownWarp1List[13] = {
|
||||
1171,
|
||||
1172,
|
||||
1173,
|
||||
1174,
|
||||
1175,
|
||||
1176,
|
||||
1177,
|
||||
1178,
|
||||
1179,
|
||||
1181,
|
||||
1183,
|
||||
1185,
|
||||
-1
|
||||
};
|
||||
int L1UpList[12] = { 127, 129, 130, 131, 132, 133, 135, 137, 138, 139, 140, -1 };
|
||||
int L1DownList[10] = { 106, 107, 108, 109, 110, 112, 114, 115, 118, -1 };
|
||||
int L2UpList[3] = { 266, 267, -1 };
|
||||
int L2DownList[5] = { 269, 270, 271, 272, -1 };
|
||||
int L2TWarpUpList[3] = { 558, 559, -1 };
|
||||
int L3UpList[15] = {
|
||||
170,
|
||||
171,
|
||||
172,
|
||||
173,
|
||||
174,
|
||||
175,
|
||||
176,
|
||||
177,
|
||||
178,
|
||||
179,
|
||||
180,
|
||||
181,
|
||||
182,
|
||||
183,
|
||||
-1
|
||||
};
|
||||
int L3DownList[9] = { 162, 163, 164, 165, 166, 167, 168, 169, -1 };
|
||||
int L3TWarpUpList[14] = { 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, -1 };
|
||||
int L4UpList[4] = { 82, 83, 90, -1 };
|
||||
int L4DownList[6] = { 120, 130, 131, 132, 133, -1 };
|
||||
int L4TWarpUpList[4] = { 421, 422, 429, -1 };
|
||||
int L4PentaList[33] = {
|
||||
353,
|
||||
354,
|
||||
355,
|
||||
356,
|
||||
357,
|
||||
358,
|
||||
359,
|
||||
360,
|
||||
361,
|
||||
362,
|
||||
363,
|
||||
364,
|
||||
365,
|
||||
366,
|
||||
367,
|
||||
368,
|
||||
369,
|
||||
370,
|
||||
371,
|
||||
372,
|
||||
373,
|
||||
374,
|
||||
375,
|
||||
376,
|
||||
377,
|
||||
378,
|
||||
379,
|
||||
380,
|
||||
381,
|
||||
382,
|
||||
383,
|
||||
384,
|
||||
-1
|
||||
};
|
||||
int TownDownList[] = { 716, 715, 719, 720, 721, 723, 724, 725, 726, 727, -1 };
|
||||
int TownWarp1List[] = { 1171, 1172, 1173, 1174, 1175, 1176, 1177, 1178, 1179, 1181, 1183, 1185, -1 };
|
||||
int L1UpList[] = { 127, 129, 130, 131, 132, 133, 135, 137, 138, 139, 140, -1 };
|
||||
int L1DownList[] = { 106, 107, 108, 109, 110, 112, 114, 115, 118, -1 };
|
||||
int L2UpList[] = { 266, 267, -1 };
|
||||
int L2DownList[] = { 269, 270, 271, 272, -1 };
|
||||
int L2TWarpUpList[] = { 558, 559, -1 };
|
||||
int L3UpList[] = { 170, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, -1 };
|
||||
int L3DownList[] = { 162, 163, 164, 165, 166, 167, 168, 169, -1 };
|
||||
int L3TWarpUpList[] = { 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, -1 };
|
||||
int L4UpList[] = { 82, 83, 90, -1 };
|
||||
int L4DownList[] = { 120, 130, 131, 132, 133, -1 };
|
||||
int L4TWarpUpList[] = { 421, 422, 429, -1 };
|
||||
int L4PentaList[] = { 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382, 383, 384, -1 };
|
||||
|
||||
#ifndef SPAWN
|
||||
void InitNoTriggers()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue