Merge branch 'main' into jokers_with_graphics

This commit is contained in:
MeirGavish
2025-08-08 00:32:10 +03:00
8 changed files with 129 additions and 63 deletions
+7 -1
View File
@@ -6,10 +6,16 @@
#include "sprite.h"
#include "card.h"
#include "game.h"
#include "graphic_utils.h"
#define JOKER_TID (MAX_HAND_SIZE + MAX_SELECTION_SIZE) * JOKER_SPRITE_OFFSET // Tile ID for the starting index in the tile memory
#define JOKER_SPRITE_OFFSET 16 // Offset for the joker sprites
#define JOKER_BASE_PB 4 // Palette bank for the default jokers
#define JOKER_BASE_PB 4 // The starting palette index for the jokers
#define JOKER_LAST_PB (NUM_PALETTES - 1)
// Currently allocating the rest of the palettes for the jokers.
// This number needs to be decreased once we need to allocated palettes for other sprites
// such as planet cards etc.
#define JOKER_STARTING_LAYER 27
#define BASE_EDITION 0
+3 -1
View File
@@ -4,11 +4,12 @@
#include <tonc.h>
#include <maxmod.h>
#define CARD_SPRITE_SIZE 32
typedef struct
{
OBJ_ATTR *obj;
OBJ_AFFINE *aff;
u32 tid, pb;
POINT pos;
} Sprite;
@@ -44,6 +45,7 @@ INLINE void sprite_position(Sprite *sprite, int x, int y)
// Sprite functions
void sprite_init();
void sprite_draw();
int sprite_get_pb(const Sprite* sprite);
// SpriteObject methods
SpriteObject *sprite_object_new();