changed how game_speed affects hand score animations
This commit is contained in:
+6
-6
@@ -32,7 +32,7 @@
|
||||
static uint rng_seed = 0;
|
||||
|
||||
static uint timer = 0; // This might already exist in libtonc but idk so i'm just making my own
|
||||
static int game_speed = 1; // BY DEFAULT IS SET TO 1, but if changed to 2 or more, should speed up all (or most) of the game aspects that should be sped up by speed, as in the original game.
|
||||
static int game_speed = 3; // BY DEFAULT IS SET TO 1, but if changed to 2 or more, should speed up all (or most) of the game aspects that should be sped up by speed, as in the original game.
|
||||
static int background = 0;
|
||||
|
||||
static enum GameState game_state = GAME_SPLASH_SCREEN; // The current game state, this is used to determine what the game is doing at any given time
|
||||
@@ -188,9 +188,9 @@ int get_game_speed(void)
|
||||
}
|
||||
|
||||
// for the future when a menu actually lets this variable be changed.
|
||||
void set_game_speed(int game_speed_)
|
||||
void set_game_speed(int new_game_speed)
|
||||
{
|
||||
game_speed = game_speed_;
|
||||
game_speed = new_game_speed;
|
||||
}
|
||||
|
||||
|
||||
@@ -1279,7 +1279,7 @@ static void game_playing_process_input_and_state()
|
||||
if (mult > 0)
|
||||
{
|
||||
temp_score = chips * mult;
|
||||
lerped_temp_score = fxdiv(FIX_ONE, int2fx(game_speed)) * temp_score;; // game speed affects how fast the score text increases.
|
||||
lerped_temp_score = int2fx(temp_score); // game speed affects how fast the score text increases.
|
||||
lerped_score = int2fx(score);
|
||||
|
||||
display_temp_score(temp_score);
|
||||
@@ -1292,8 +1292,8 @@ static void game_playing_process_input_and_state()
|
||||
}
|
||||
else if (play_state == PLAY_ENDED)
|
||||
{
|
||||
lerped_temp_score -= int2fx(temp_score) / 40;
|
||||
lerped_score += int2fx(temp_score) / 40;
|
||||
lerped_temp_score -= int2fx(temp_score * get_game_speed())/ 40;
|
||||
lerped_score += int2fx(temp_score* get_game_speed()) / 40;
|
||||
|
||||
if (lerped_temp_score > 0)
|
||||
{
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ static int get_unused_joker_pb()
|
||||
}
|
||||
|
||||
static int allocate_pb_if_needed(u8 joker_id)
|
||||
{
|
||||
{
|
||||
int joker_spritesheet_idx = joker_get_spritesheet_idx(joker_id);
|
||||
int joker_pb = joker_spritesheet_pb_map[joker_spritesheet_idx];
|
||||
if (joker_pb != UNDEFINED)
|
||||
|
||||
+2
-2
@@ -158,8 +158,8 @@ void sprite_object_reset_transform(SpriteObject* sprite_object)
|
||||
|
||||
void sprite_object_update(SpriteObject* sprite_object)
|
||||
{
|
||||
sprite_object->vx += ((sprite_object->tx - sprite_object->x) * get_game_speed()) / 8; // SPEED
|
||||
sprite_object->vy += ((sprite_object->ty - sprite_object->y) * get_game_speed()) / 8;
|
||||
sprite_object->vx += ((sprite_object->tx - sprite_object->x) * get_game_speed()) / 8;
|
||||
sprite_object->vy += ((sprite_object->ty - sprite_object->y) * get_game_speed()) / 8;
|
||||
|
||||
sprite_object->vscale += (sprite_object->tscale - sprite_object->scale) / 8; // Scale up the card when it's played
|
||||
|
||||
|
||||
Reference in New Issue
Block a user