Fixed FRAMES macro to use ceil division
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@
|
|||||||
#define MAX_HAND_SIZE 16
|
#define MAX_HAND_SIZE 16
|
||||||
#define MAX_DECK_SIZE 52
|
#define MAX_DECK_SIZE 52
|
||||||
#define MAX_SELECTION_SIZE 5
|
#define MAX_SELECTION_SIZE 5
|
||||||
#define FRAMES(x) ((x) / game_speed)
|
#define FRAMES(x) (((x) + game_speed - 1) / game_speed)
|
||||||
|
|
||||||
enum GameState
|
enum GameState
|
||||||
{
|
{
|
||||||
|
|||||||
+1
-1
@@ -15,7 +15,7 @@
|
|||||||
#include "soundbank.h"
|
#include "soundbank.h"
|
||||||
|
|
||||||
static int timer = 1; // This might already exist in libtonc but idk so i'm just making my own
|
static int timer = 1; // This might already exist in libtonc but idk so i'm just making my own
|
||||||
static int game_speed = 1;
|
static int game_speed = 4;
|
||||||
static int background = 0;
|
static int background = 0;
|
||||||
|
|
||||||
static enum GameState game_state = GAME_PLAYING;
|
static enum GameState game_state = GAME_PLAYING;
|
||||||
|
|||||||
Reference in New Issue
Block a user