Merge pull request #47 from cellos51/refactors
Moved the round end blind sprite and score a bit to the left so they look better for 4 digits
This commit is contained in:
@@ -41,6 +41,10 @@ typedef struct
|
||||
|
||||
typedef struct // copy of CardObject in card.h
|
||||
{
|
||||
/* Note that since JokerObject is cast to CardObject in joker_object_update(),
|
||||
* they have to have the exact same structure to have
|
||||
* the exact same field offsets in memory
|
||||
*/
|
||||
Joker *joker;
|
||||
Sprite *sprite;
|
||||
FIXED tx, ty;
|
||||
|
||||
+2
-2
@@ -195,7 +195,7 @@ static const Rect DISCARDS_TEXT_RECT = {48, 104, UNDEFINED, UNDEF
|
||||
static const Rect DECK_SIZE_RECT = {200, 152, UNDEFINED, UNDEFINED };
|
||||
static const Rect ROUND_TEXT_RECT = {48, 144, UNDEFINED, UNDEFINED };
|
||||
static const Rect ANTE_TEXT_RECT = {8, 144, UNDEFINED, UNDEFINED };
|
||||
static const Rect ROUND_END_BLIND_REQ_RECT = {112, 96, 136, UNDEFINED };
|
||||
static const Rect ROUND_END_BLIND_REQ_RECT = {104, 96, 136, UNDEFINED };
|
||||
static const Rect ROUND_END_BLIND_REWARD_RECT = { 168, 96, UNDEFINED, UNDEFINED };
|
||||
static const Rect ROUND_END_NUM_HANDS_RECT = {88, 116, UNDEFINED, UNDEFINED };
|
||||
static const Rect HAND_REWARD_RECT = {168, UNDEFINED, UNDEFINED, UNDEFINED };
|
||||
@@ -930,7 +930,7 @@ void game_round_init()
|
||||
//{
|
||||
// obj_hide(playing_blind_token->obj); // Hide the blind token sprite for now
|
||||
//}
|
||||
round_end_blind_token = blind_token_new(current_blind, 82, 86, MAX_SELECTION_SIZE + MAX_HAND_SIZE + 2); // Create the blind token sprite for round end
|
||||
round_end_blind_token = blind_token_new(current_blind, 81, 86, MAX_SELECTION_SIZE + MAX_HAND_SIZE + 2); // Create the blind token sprite for round end
|
||||
|
||||
if (round_end_blind_token != NULL)
|
||||
{
|
||||
|
||||
@@ -141,6 +141,7 @@ void joker_object_update(JokerObject *joker_object)
|
||||
{
|
||||
// Re-use the card object update logic by casting the JokerObject to a CardObject temporarily
|
||||
// This works because card_object_update doesn't use any card data, which is why CardObject should've been generic. my bad
|
||||
// TODO: Refactor and separate the relevant fields to a generic struct, maybe to Sprite or make a SpriteObject
|
||||
CardObject *card_object = (CardObject *)joker_object;
|
||||
card_object_update(card_object);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user