Centralize location of memory pools
This commit centralizes the location of memory pools and adds an associated script (scripts/get_memory_map.sh) to read the memory map.
This commit is contained in:
@@ -11,14 +11,6 @@
|
||||
|
||||
#include "pool.h"
|
||||
|
||||
#define MAX_CARDS_PER_HAND (NUM_SUITS * NUM_RANKS)
|
||||
#define MAX_CARDS_ON_SCREEN 16
|
||||
|
||||
POOL_DECLARE_TYPE(Card);
|
||||
POOL_DEFINE_TYPE(Card, MAX_CARDS_PER_HAND);
|
||||
POOL_DECLARE_TYPE(CardObject);
|
||||
POOL_DEFINE_TYPE(CardObject, MAX_CARDS_ON_SCREEN);
|
||||
|
||||
// Card sprites lookup table. First index is the suit, second index is the rank. The value is the tile index.
|
||||
const static u16 card_sprite_lut[NUM_SUITS][NUM_RANKS] = {
|
||||
{0, 16, 32, 48, 64, 80, 96, 112, 128, 144, 160, 176, 192},
|
||||
|
||||
@@ -29,15 +29,6 @@ static const unsigned short *joker_gfxPal[] =
|
||||
#undef DEF_JOKER_GFX
|
||||
};
|
||||
|
||||
// This won't be more than the number of jokers in your current deck
|
||||
// plus the amount that can fit in the shop, 8 should be fine. For now...
|
||||
#define MAX_ACTIVE_JOKERS 8
|
||||
|
||||
POOL_DECLARE_TYPE(Joker)
|
||||
POOL_DEFINE_TYPE(Joker, MAX_ACTIVE_JOKERS)
|
||||
POOL_DECLARE_TYPE(JokerObject)
|
||||
POOL_DEFINE_TYPE(JokerObject, MAX_ACTIVE_JOKERS)
|
||||
|
||||
const static u8 edition_price_lut[MAX_EDITIONS] =
|
||||
{
|
||||
0, // BASE_EDITION
|
||||
|
||||
@@ -34,3 +34,10 @@ int pool_bm_get_free_idx(PoolBitmap *bm)
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
#define POOL_ENTRY(name, capacity) \
|
||||
POOL_DEFINE_TYPE(name, capacity);
|
||||
#include "sprite.h"
|
||||
#include "pools.def"
|
||||
#undef POOL_ENTRY
|
||||
|
||||
@@ -9,19 +9,12 @@
|
||||
#include <stdlib.h>
|
||||
#include <maxmod.h>
|
||||
|
||||
#define MAX_SPRITES 128
|
||||
#define MAX_AFFINES 32
|
||||
#define SPRITE_FOCUS_RAISE_PX 10
|
||||
|
||||
OBJ_ATTR obj_buffer[MAX_SPRITES];
|
||||
OBJ_AFFINE *obj_aff_buffer = (OBJ_AFFINE*)obj_buffer;
|
||||
|
||||
POOL_DECLARE_TYPE(SpriteObject)
|
||||
POOL_DEFINE_TYPE(SpriteObject, MAX_SPRITES)
|
||||
|
||||
POOL_DECLARE_TYPE(Sprite)
|
||||
POOL_DEFINE_TYPE(Sprite, MAX_SPRITES)
|
||||
|
||||
static bool free_affines[MAX_AFFINES] = {false};
|
||||
|
||||
// Sprite methods
|
||||
|
||||
Reference in New Issue
Block a user