code review feedback
This commit is contained in:
+2
-1
@@ -29,6 +29,7 @@
|
|||||||
|
|
||||||
#define DEFAULT_JOKER_ID 0
|
#define DEFAULT_JOKER_ID 0
|
||||||
#define GREEDY_JOKER_ID 1 // This is just an example to show the patern of making joker IDs
|
#define GREEDY_JOKER_ID 1 // This is just an example to show the patern of making joker IDs
|
||||||
|
#define JOKER_STENCIL_ID 16
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
@@ -39,7 +40,7 @@ typedef struct
|
|||||||
bool processed;
|
bool processed;
|
||||||
} Joker;
|
} Joker;
|
||||||
|
|
||||||
typedef struct JokerObject // copy of CardObject in card.h
|
typedef struct JokerObject
|
||||||
{
|
{
|
||||||
Joker *joker;
|
Joker *joker;
|
||||||
SpriteObject* sprite_object;
|
SpriteObject* sprite_object;
|
||||||
|
|||||||
+25
-25
@@ -139,6 +139,31 @@ static inline Card *discard_pop()
|
|||||||
return discard_pile[discard_top--];
|
return discard_pile[discard_top--];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get-functions, for other files to view game state (mainly for jokers)
|
||||||
|
CardObject **get_hand_array(void) {
|
||||||
|
return hand;
|
||||||
|
}
|
||||||
|
|
||||||
|
int get_hand_top(void) {
|
||||||
|
return hand_top;
|
||||||
|
}
|
||||||
|
|
||||||
|
CardObject **get_played_array(void) {
|
||||||
|
return played;
|
||||||
|
}
|
||||||
|
|
||||||
|
int get_played_top(void) {
|
||||||
|
return played_top;
|
||||||
|
}
|
||||||
|
|
||||||
|
JokerObject **get_jokers(void) {
|
||||||
|
return jokers;
|
||||||
|
}
|
||||||
|
|
||||||
|
int get_jokers_top(void) {
|
||||||
|
return jokers_top;
|
||||||
|
}
|
||||||
|
|
||||||
// Consts
|
// Consts
|
||||||
|
|
||||||
// Rects left top right bottom
|
// Rects left top right bottom
|
||||||
@@ -214,31 +239,6 @@ static const Rect SHOP_REROLL_RECT = {88, 96, UNDEFINED, UNDEFI
|
|||||||
#define PITCH_STEP_UNDISCARD_SFX 2*PITCH_STEP_DRAW_SFX
|
#define PITCH_STEP_UNDISCARD_SFX 2*PITCH_STEP_DRAW_SFX
|
||||||
// Naming the stage where cards return from the discard pile to the deck "undiscard"
|
// Naming the stage where cards return from the discard pile to the deck "undiscard"
|
||||||
|
|
||||||
// get-functions, for other files to view game state (mainly for jokers)
|
|
||||||
CardObject **get_hand_array(void) {
|
|
||||||
return hand;
|
|
||||||
}
|
|
||||||
|
|
||||||
int get_hand_top(void) {
|
|
||||||
return hand_top;
|
|
||||||
}
|
|
||||||
|
|
||||||
CardObject **get_played_array(void) {
|
|
||||||
return played;
|
|
||||||
}
|
|
||||||
|
|
||||||
int get_played_top(void) {
|
|
||||||
return played_top;
|
|
||||||
}
|
|
||||||
|
|
||||||
JokerObject **get_jokers(void) {
|
|
||||||
return jokers;
|
|
||||||
}
|
|
||||||
|
|
||||||
int get_jokers_top(void) {
|
|
||||||
return jokers_top;
|
|
||||||
}
|
|
||||||
|
|
||||||
// General functions
|
// General functions
|
||||||
void set_seed(int seed)
|
void set_seed(int seed)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
#include "hand_analysis.h"
|
#include "hand_analysis.h"
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
static const int JOKER_STENCIL_ID = 16;
|
|
||||||
|
|
||||||
static JokerEffect default_joker_effect(Joker *joker, Card *scored_card) {
|
static JokerEffect default_joker_effect(Joker *joker, Card *scored_card) {
|
||||||
JokerEffect effect = {0};
|
JokerEffect effect = {0};
|
||||||
if (scored_card == NULL) effect.mult = 4;
|
if (scored_card == NULL) effect.mult = 4;
|
||||||
|
|||||||
Reference in New Issue
Block a user