- use explicitly sized types for static const arrays.

This commit is contained in:
Christoph Oelckers 2021-11-07 14:09:55 +01:00
parent fd2764dc6e
commit 98f57a7ad4
3 changed files with 4 additions and 6 deletions

View file

@ -215,13 +215,11 @@ void animatesprites_r(spritetype* tsprite, int& spritesortcnt, int x, int y, int
case FORCESPHERE:
if (t->statnum == STAT_MISC && Owner)
{
short sqa, sqb;
sqa =
int sqa =
getangle(
Owner->x - ps[screenpeek].pos.x,
Owner->y - ps[screenpeek].pos.y);
sqb =
int sqb =
getangle(
Owner->x - t->x,
Owner->y - t->y);

View file

@ -2971,7 +2971,7 @@ int ConCompiler::parsecommand()
}
#endif
// syntax:
// int x, int y, short tilenum, int8_t shade, char orientation
// int x, int y, int tilenum, int shade, int orientation
// myospal adds char pal
// Parse: x

View file

@ -1488,7 +1488,7 @@ int doincrements_r(struct player_struct* p)
void checkweapons_r(struct player_struct* p)
{
static const short weapon_sprites[MAX_WEAPONS] = { KNEE, FIRSTGUNSPRITE, SHOTGUNSPRITE,
static const uint16_t weapon_sprites[MAX_WEAPONS] = { KNEE, FIRSTGUNSPRITE, SHOTGUNSPRITE,
CHAINGUNSPRITE, RPGSPRITE, HEAVYHBOMB, SHRINKERSPRITE, DEVISTATORSPRITE,
TRIPBOMBSPRITE, BOWLINGBALLSPRITE, FREEZEBLAST, HEAVYHBOMB };