Added joker sprites by @GreenNinja2525 for Blue Joker, Even Steven, Odd Todd, Scholar and Business Card. Disabled jokers with no sprites.
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 855 B After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1 @@
|
|||||||
|
-gB4 -Mw4 -Mh4 -m! -pn 16
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.2 KiB |
@@ -0,0 +1 @@
|
|||||||
|
-gB4 -Mw4 -Mh4 -m! -pn 16
|
||||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 KiB |
@@ -13,5 +13,7 @@
|
|||||||
#include "joker_gfx9.h"
|
#include "joker_gfx9.h"
|
||||||
#include "joker_gfx10.h"
|
#include "joker_gfx10.h"
|
||||||
#include "joker_gfx11.h"
|
#include "joker_gfx11.h"
|
||||||
|
#include "joker_gfx12.h"
|
||||||
|
#include "joker_gfx13.h"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@@ -130,6 +130,8 @@ void joker_init()
|
|||||||
joker_gfxTiles[9] = joker_gfx9Tiles;
|
joker_gfxTiles[9] = joker_gfx9Tiles;
|
||||||
joker_gfxTiles[10] = joker_gfx10Tiles;
|
joker_gfxTiles[10] = joker_gfx10Tiles;
|
||||||
joker_gfxTiles[11] = joker_gfx11Tiles;
|
joker_gfxTiles[11] = joker_gfx11Tiles;
|
||||||
|
joker_gfxTiles[12] = joker_gfx12Tiles;
|
||||||
|
joker_gfxTiles[13] = joker_gfx13Tiles;
|
||||||
|
|
||||||
joker_gfxPal[0] = joker_gfx0Pal;
|
joker_gfxPal[0] = joker_gfx0Pal;
|
||||||
joker_gfxPal[1] = joker_gfx1Pal;
|
joker_gfxPal[1] = joker_gfx1Pal;
|
||||||
@@ -143,6 +145,8 @@ void joker_init()
|
|||||||
joker_gfxPal[9] = joker_gfx9Pal;
|
joker_gfxPal[9] = joker_gfx9Pal;
|
||||||
joker_gfxPal[10] = joker_gfx10Pal;
|
joker_gfxPal[10] = joker_gfx10Pal;
|
||||||
joker_gfxPal[11] = joker_gfx11Pal;
|
joker_gfxPal[11] = joker_gfx11Pal;
|
||||||
|
joker_gfxPal[12] = joker_gfx12Pal;
|
||||||
|
joker_gfxPal[13] = joker_gfx13Pal;
|
||||||
|
|
||||||
for (int i = 0; i < num_spritesheets; i++)
|
for (int i = 0; i < num_spritesheets; i++)
|
||||||
{
|
{
|
||||||
|
|||||||
+53
-31
@@ -304,7 +304,11 @@ static JokerEffect blue_joker_effect(Joker *joker, Card *scored_card) {
|
|||||||
return effect;
|
return effect;
|
||||||
}
|
}
|
||||||
|
|
||||||
static JokerEffect raised_fist_joker_effect(Joker *joker, Card *scored_card) {
|
// Using __attribute__((unused)) for jokers with no sprites yet to avoid warning
|
||||||
|
// Remove the attribute once they have sprites
|
||||||
|
__attribute__((unused))
|
||||||
|
static JokerEffect raised_fist_joker_effect(Joker *joker, Card *scored_card)
|
||||||
|
{
|
||||||
JokerEffect effect = {0};
|
JokerEffect effect = {0};
|
||||||
if (scored_card != NULL)
|
if (scored_card != NULL)
|
||||||
return effect; // if card != null, we are not at the end-phase of scoring yet
|
return effect; // if card != null, we are not at the end-phase of scoring yet
|
||||||
@@ -327,6 +331,7 @@ static JokerEffect raised_fist_joker_effect(Joker *joker, Card *scored_card) {
|
|||||||
return effect;
|
return effect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__attribute__((unused))
|
||||||
static JokerEffect reserved_parking_joker_effect(Joker *joker, Card *scored_card) {
|
static JokerEffect reserved_parking_joker_effect(Joker *joker, Card *scored_card) {
|
||||||
JokerEffect effect = {0};
|
JokerEffect effect = {0};
|
||||||
if (scored_card != NULL)
|
if (scored_card != NULL)
|
||||||
@@ -346,7 +351,7 @@ static JokerEffect reserved_parking_joker_effect(Joker *joker, Card *scored_card
|
|||||||
}
|
}
|
||||||
|
|
||||||
return effect;
|
return effect;
|
||||||
}
|
};
|
||||||
|
|
||||||
static JokerEffect business_card_joker_effect(Joker *joker, Card *scored_card) {
|
static JokerEffect business_card_joker_effect(Joker *joker, Card *scored_card) {
|
||||||
JokerEffect effect = {0};
|
JokerEffect effect = {0};
|
||||||
@@ -377,6 +382,7 @@ static JokerEffect scholar_joker_effect(Joker *joker, Card *scored_card) {
|
|||||||
return effect;
|
return effect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__attribute__((unused))
|
||||||
static JokerEffect scary_face_joker_effect(Joker *joker, Card *scored_card) {
|
static JokerEffect scary_face_joker_effect(Joker *joker, Card *scored_card) {
|
||||||
JokerEffect effect = {0};
|
JokerEffect effect = {0};
|
||||||
if (scored_card == NULL)
|
if (scored_card == NULL)
|
||||||
@@ -392,6 +398,7 @@ static JokerEffect scary_face_joker_effect(Joker *joker, Card *scored_card) {
|
|||||||
return effect;
|
return effect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__attribute__((unused))
|
||||||
static JokerEffect abstract_joker_effect(Joker *joker, Card *scored_card) {
|
static JokerEffect abstract_joker_effect(Joker *joker, Card *scored_card) {
|
||||||
JokerEffect effect = {0};
|
JokerEffect effect = {0};
|
||||||
if (scored_card != NULL)
|
if (scored_card != NULL)
|
||||||
@@ -404,6 +411,7 @@ static JokerEffect abstract_joker_effect(Joker *joker, Card *scored_card) {
|
|||||||
return effect;
|
return effect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__attribute__((unused))
|
||||||
static JokerEffect bull_joker_effect(Joker *joker, Card *scored_card) {
|
static JokerEffect bull_joker_effect(Joker *joker, Card *scored_card) {
|
||||||
JokerEffect effect = {0};
|
JokerEffect effect = {0};
|
||||||
if (scored_card != NULL)
|
if (scored_card != NULL)
|
||||||
@@ -414,6 +422,7 @@ static JokerEffect bull_joker_effect(Joker *joker, Card *scored_card) {
|
|||||||
return effect;
|
return effect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
__attribute__((unused))
|
||||||
static JokerEffect smiley_face_joker_effect(Joker *joker, Card *scored_card) {
|
static JokerEffect smiley_face_joker_effect(Joker *joker, Card *scored_card) {
|
||||||
JokerEffect effect = {0};
|
JokerEffect effect = {0};
|
||||||
if (scored_card == NULL)
|
if (scored_card == NULL)
|
||||||
@@ -457,43 +466,56 @@ static JokerEffect odd_todd_joker_effect(Joker *joker, Card *scored_card) {
|
|||||||
return effect;
|
return effect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* The index of a joker in the registry matches its ID.
|
||||||
|
* The joker sprites are matched by ID so the position in the registry
|
||||||
|
* determines the joker's sprite.
|
||||||
|
* Each consecutive NUM_JOKERS_PER_SPRITESHEET (defined in joker.c) jokers
|
||||||
|
* share a spritesheet and thus a color palette.
|
||||||
|
* To make better use of color palettes jokers may be rearranged here
|
||||||
|
* (and put together in the matching spritesheet) to share a color palette.
|
||||||
|
* Otherwise the order is similar to the wiki.
|
||||||
|
*/
|
||||||
const JokerInfo joker_registry[] = {
|
const JokerInfo joker_registry[] = {
|
||||||
{ COMMON_JOKER, 2, default_joker_effect }, // DEFAULT_JOKER_ID = 0
|
{ COMMON_JOKER, 2, default_joker_effect }, // DEFAULT_JOKER_ID = 0
|
||||||
{ COMMON_JOKER, 5, greedy_joker_effect }, // GREEDY_JOKER_ID = 1
|
{ COMMON_JOKER, 5, greedy_joker_effect }, // GREEDY_JOKER_ID = 1
|
||||||
{ COMMON_JOKER, 5, lusty_joker_effect }, // etc...
|
{ COMMON_JOKER, 5, lusty_joker_effect }, // etc... 2
|
||||||
{ COMMON_JOKER, 5, wrathful_joker_effect },
|
{ COMMON_JOKER, 5, wrathful_joker_effect }, // 3
|
||||||
{ COMMON_JOKER, 5, gluttonous_joker_effect },
|
{ COMMON_JOKER, 5, gluttonous_joker_effect }, // 4
|
||||||
{ COMMON_JOKER, 3, jolly_joker_effect },
|
{ COMMON_JOKER, 3, jolly_joker_effect }, // 5
|
||||||
{ COMMON_JOKER, 4, zany_joker_effect },
|
{ COMMON_JOKER, 4, zany_joker_effect }, // 6
|
||||||
{ COMMON_JOKER, 4, mad_joker_effect },
|
{ COMMON_JOKER, 4, mad_joker_effect }, // 7
|
||||||
{ COMMON_JOKER, 4, crazy_joker_effect },
|
{ COMMON_JOKER, 4, crazy_joker_effect }, // 8
|
||||||
{ COMMON_JOKER, 4, droll_joker_effect },
|
{ COMMON_JOKER, 4, droll_joker_effect }, // 9
|
||||||
{ COMMON_JOKER, 3, sly_joker_effect },
|
{ COMMON_JOKER, 3, sly_joker_effect }, // 10
|
||||||
{ COMMON_JOKER, 4, wily_joker_effect },
|
{ COMMON_JOKER, 4, wily_joker_effect }, // 11
|
||||||
{ COMMON_JOKER, 4, clever_joker_effect },
|
{ COMMON_JOKER, 4, clever_joker_effect }, // 12
|
||||||
{ COMMON_JOKER, 4, devious_joker_effect },
|
{ COMMON_JOKER, 4, devious_joker_effect }, // 13
|
||||||
{ COMMON_JOKER, 4, crafty_joker_effect },
|
{ COMMON_JOKER, 4, crafty_joker_effect }, // 14
|
||||||
{ COMMON_JOKER, 5, half_joker_effect },
|
{ COMMON_JOKER, 5, half_joker_effect }, // 15
|
||||||
{ UNCOMMON_JOKER, 8, joker_stencil_effect },
|
{ UNCOMMON_JOKER, 8, joker_stencil_effect }, // 16
|
||||||
{ COMMON_JOKER, 5, banner_joker_effect },
|
{ COMMON_JOKER, 5, banner_joker_effect }, // 17
|
||||||
{ COMMON_JOKER, 4, walkie_talkie_joker_effect },
|
{ COMMON_JOKER, 4, walkie_talkie_joker_effect }, // 18
|
||||||
{ UNCOMMON_JOKER, 8, fibonnaci_joker_effect },
|
{ UNCOMMON_JOKER, 8, fibonnaci_joker_effect }, // 19
|
||||||
{ UNCOMMON_JOKER, 6, blackboard_joker_effect },
|
{ UNCOMMON_JOKER, 6, blackboard_joker_effect }, // 20
|
||||||
{ COMMON_JOKER, 5, mystic_summit_joker_effect },
|
{ COMMON_JOKER, 5, mystic_summit_joker_effect }, // 21
|
||||||
{ COMMON_JOKER, 4, misprint_joker_effect },
|
{ COMMON_JOKER, 4, misprint_joker_effect }, // 22
|
||||||
{ UNCOMMON_JOKER, 6, blackboard_joker_effect },
|
{ COMMON_JOKER, 4, even_steven_joker_effect }, // 23
|
||||||
{ COMMON_JOKER, 5, blue_joker_effect },
|
{ COMMON_JOKER, 5, blue_joker_effect }, // 24
|
||||||
|
{ COMMON_JOKER, 4, odd_todd_joker_effect }, // 25
|
||||||
|
{ COMMON_JOKER, 4, scholar_joker_effect }, // 26
|
||||||
|
{ COMMON_JOKER, 4, business_card_joker_effect }, // 27
|
||||||
|
// Business card should be paired with Shortcut for palette optimization when it's added
|
||||||
|
|
||||||
|
// The following jokers don't have sprites yet,
|
||||||
|
// uncomment them when their sprites are added.
|
||||||
|
#if 0
|
||||||
{ COMMON_JOKER, 5, raised_fist_joker_effect },
|
{ COMMON_JOKER, 5, raised_fist_joker_effect },
|
||||||
{ COMMON_JOKER, 6, reserved_parking_joker_effect },
|
{ COMMON_JOKER, 6, reserved_parking_joker_effect },
|
||||||
{ COMMON_JOKER, 4, business_card_joker_effect },
|
|
||||||
{ COMMON_JOKER, 4, scholar_joker_effect },
|
|
||||||
{ COMMON_JOKER, 4, scary_face_joker_effect },
|
{ COMMON_JOKER, 4, scary_face_joker_effect },
|
||||||
{ COMMON_JOKER, 4, abstract_joker_effect },
|
{ COMMON_JOKER, 4, abstract_joker_effect },
|
||||||
{ UNCOMMON_JOKER, 6, bull_joker_effect},
|
{ UNCOMMON_JOKER, 6, bull_joker_effect},
|
||||||
{ COMMON_JOKER, 4, smiley_face_joker_effect },
|
{ COMMON_JOKER, 4, smiley_face_joker_effect },
|
||||||
{ COMMON_JOKER, 4, even_steven_joker_effect },
|
#endif
|
||||||
{ COMMON_JOKER, 4, odd_todd_joker_effect },
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static const size_t joker_registry_size = NUM_ELEM_IN_ARR(joker_registry);
|
static const size_t joker_registry_size = NUM_ELEM_IN_ARR(joker_registry);
|
||||||
|
|||||||
Reference in New Issue
Block a user