Merge branch 'main' into joker_pooling
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
#ifndef AFFINE_BACKGROUND_H
|
||||
#define AFFINE_BACKGROUND_H
|
||||
|
||||
#include <tonc.h>
|
||||
|
||||
#include "graphic_utils.h"
|
||||
|
||||
#define AFFINE_BG_PAL_LEN 5
|
||||
#define AFFINE_BG_PB (PAL_ROW_LEN * 15) // This isn't really a palette bank, just the starting index of the palette
|
||||
|
||||
void affine_background_init();
|
||||
void affine_background_update();
|
||||
void affine_background_set_color(COLOR color);
|
||||
// Must be called with an array of size at least AFFINE_BG_PAL_LEN
|
||||
void affine_background_load_palette(const u16 *src);
|
||||
|
||||
#endif // AFFINE_BACKGROUND_H
|
||||
@@ -6,6 +6,8 @@
|
||||
#define MAX_JOKERS_HELD_SIZE 5 // This doesn't account for negatives right now.
|
||||
#define MAX_SHOP_JOKERS 2 // TODO: Make this dynamic and allow for other items besides jokers
|
||||
#define MAX_SELECTION_SIZE 5
|
||||
#define MAX_CARD_SCORE_DIGITS 2 // Current digit limit for score received from cards including mult etc. from jokers
|
||||
#define MAX_CARD_SCORE_STR_LEN (MAX_CARD_SCORE_DIGITS + 1) // For the '+' or 'X'
|
||||
#define FRAMES(x) (((x) + game_speed - 1) / game_speed)
|
||||
|
||||
// TODO: Turn into enum?
|
||||
@@ -77,9 +79,12 @@ typedef struct CardObject CardObject; // forward declaration, actually declared
|
||||
typedef struct JokerObject JokerObject;
|
||||
CardObject** get_hand_array(void);
|
||||
int get_hand_top(void);
|
||||
int hand_get_size(void);
|
||||
CardObject** get_played_array(void);
|
||||
int get_played_top(void);
|
||||
JokerObject** get_jokers(void);
|
||||
int get_jokers_top(void);
|
||||
|
||||
int get_num_discards_remaining(void);
|
||||
|
||||
#endif // GAME_H
|
||||
+22
-1
@@ -43,6 +43,9 @@
|
||||
// Tile size in pixels, both height and width as tiles are square
|
||||
#define TILE_SIZE 8
|
||||
|
||||
// By default TTE characters occupy a single tile
|
||||
#define TTE_CHAR_SIZE TILE_SIZE
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int left;
|
||||
@@ -117,4 +120,22 @@ void tte_erase_rect_wrapper(Rect rect);
|
||||
*/
|
||||
void update_text_rect_to_right_align_num(Rect* rect, int num, int overflow_direction);
|
||||
|
||||
#endif //GRAPHIC_UTILS_H
|
||||
/*Copies 16 bit data from src to dst, applying a palette offset to the data.
|
||||
* This is intended solely for use with tile8/8bpp data for dst and src.
|
||||
* The palette offset allows the tiles to use a different location in the palette
|
||||
* memory
|
||||
* This is useful because grit always loads the palette to the beginning of
|
||||
* pal_bg_mem[]
|
||||
*/
|
||||
void memcpy16_tile8_with_palette_offset(u16* dst, const u16* src, uint hwcount, u8 palette_offset);
|
||||
|
||||
/*Copies 32 bit data from src to dst, applying a palette offset to the data.
|
||||
* This is intended solely for use with tile8/8bpp data for dst and src.
|
||||
* The palette offset allows the tiles to use a different location in the palette
|
||||
* memory
|
||||
* This is useful because grit always loads the palette to the beginning of
|
||||
* pal_bg_mem[]
|
||||
*/
|
||||
void memcpy32_tile8_with_palette_offset(u32* dst, const u32* src, uint wcount, u8 palette_offset);
|
||||
|
||||
#endif //GRAPHIC_UTILS_H
|
||||
|
||||
@@ -10,5 +10,8 @@
|
||||
#include "joker_gfx6.h"
|
||||
#include "joker_gfx7.h"
|
||||
#include "joker_gfx8.h"
|
||||
#include "joker_gfx9.h"
|
||||
#include "joker_gfx10.h"
|
||||
#include "joker_gfx11.h"
|
||||
|
||||
#endif
|
||||
@@ -37,6 +37,8 @@ static inline int get_digits_even(int n)
|
||||
|
||||
#define NUM_ELEM_IN_ARR(arr) (sizeof(arr) / sizeof((arr)[0]))
|
||||
|
||||
#define INT_MAX_DIGITS 10 // strlen(str(INT_MAX)) = strlen("2147483647")
|
||||
|
||||
int int_arr_max(int int_arr[], int size);
|
||||
|
||||
#endif // UTIL_H
|
||||
Reference in New Issue
Block a user