Skip to content

Commit

Permalink
Extern gSprites and gOamMatrices with known array size (#2090)
Browse files Browse the repository at this point in the history
  • Loading branch information
DizzyEggg authored Jan 17, 2025
1 parent 2f67b17 commit 0a436d5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 3 additions & 2 deletions include/sprite.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef GUARD_SPRITE_H
#define GUARD_SPRITE_H

#define OAM_MATRIX_COUNT 32
#define MAX_SPRITES 64
#define SPRITE_NONE 0xFF
#define TAG_NONE 0xFFFF
Expand Down Expand Up @@ -254,12 +255,12 @@ extern const union AffineAnimCmd *const gDummySpriteAffineAnimTable[];
extern const struct SpriteTemplate gDummySpriteTemplate;

extern u8 gReservedSpritePaletteCount;
extern struct Sprite gSprites[];
extern struct Sprite gSprites[MAX_SPRITES + 1];
extern u8 gOamLimit;
extern u16 gReservedSpriteTileCount;
extern s16 gSpriteCoordOffsetX;
extern s16 gSpriteCoordOffsetY;
extern struct OamMatrix gOamMatrices[];
extern struct OamMatrix gOamMatrices[OAM_MATRIX_COUNT];
extern bool8 gAffineAnimsDisabled;

void ResetSpriteData(void);
Expand Down
2 changes: 0 additions & 2 deletions src/sprite.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@

#define MAX_SPRITE_COPY_REQUESTS 64

#define OAM_MATRIX_COUNT 32

#define sAnchorX data[6]
#define sAnchorY data[7]

Expand Down

0 comments on commit 0a436d5

Please sign in to comment.