Changed the way the selecting/played background works and added logic for changing the background depending on blind type
This commit is contained in:
+20
-4
@@ -4,6 +4,10 @@
|
||||
|
||||
#include "blinds_gfx.h"
|
||||
|
||||
static const u16 small_blind_token_palette[5] = {0x0000, 0x7FFF, 0x34A1, 0x5DCB, 0x5104};
|
||||
static const u16 big_blind_token_palette[5] = {0x0000, 0x2527, 0x15F5, 0x36FC, 0x1E9C};
|
||||
static const u16 boss_blind_token_palette[5] = {0x0000, 0x2CC9, 0x3D0D, 0x5E14, 0x5171}; // This variable is temporary, each boss blind will have its own unique palette
|
||||
|
||||
void blinds_init()
|
||||
{
|
||||
// Blind graphics (fighting grit every step of the way as usual)
|
||||
@@ -11,15 +15,12 @@ void blinds_init()
|
||||
|
||||
// Palettes for the blinds (Transparency, Text Color, Shadow, Highlight, Main Color) Use this: http://www.budmelvin.com/dev/15bitconverter.html
|
||||
// Small Blind
|
||||
const u16 small_blind_token_palette[5] = {0x0000, 0x7FFF, 0x34A1, 0x5DCB, 0x5104};
|
||||
|
||||
memcpy16(&pal_obj_mem[16 * SMALL_BLIND_PB], &small_blind_token_palette, sizeof(small_blind_token_palette) / 2);
|
||||
|
||||
// Big Blind
|
||||
const u16 big_blind_token_palette[5] = {0x0000, 0x2527, 0x15F5, 0x36FC, 0x1E9C};
|
||||
memcpy16(&pal_obj_mem[16 * BIG_BLIND_PB], &big_blind_token_palette, sizeof(big_blind_token_palette) / 2);
|
||||
|
||||
// Boss Blind (This is temporary. Each boss blind is unique and will have to have its own graphics and palette which will probably be stored in some huge array)
|
||||
const u16 boss_blind_token_palette[5] = {0x0000, 0x2CC9, 0x3D0D, 0x5E14, 0x5171};
|
||||
memcpy16(&pal_obj_mem[16 * BOSS_BLIND_PB], &boss_blind_token_palette, sizeof(boss_blind_token_palette) / 2);
|
||||
}
|
||||
|
||||
@@ -58,6 +59,21 @@ int blind_get_reward(int type)
|
||||
}
|
||||
}
|
||||
|
||||
u16 blind_get_color(int type, int index)
|
||||
{
|
||||
switch (type)
|
||||
{
|
||||
case SMALL_BLIND:
|
||||
return small_blind_token_palette[index];
|
||||
case BIG_BLIND:
|
||||
return big_blind_token_palette[index];
|
||||
case BOSS_BLIND:
|
||||
return boss_blind_token_palette[index];
|
||||
default:
|
||||
return 0; // Invalid type
|
||||
}
|
||||
}
|
||||
|
||||
Sprite *blind_token_new(int type, int x, int y, int sprite_index)
|
||||
{
|
||||
Sprite *sprite = NULL;
|
||||
|
||||
Reference in New Issue
Block a user