Move cursor and deck variable definitions to game.c
This commit is contained in:
parent
4cc3d9c070
commit
7958cea858
@ -8,8 +8,6 @@
|
|||||||
#include "game.h"
|
#include "game.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
struct cursor *cursor;
|
|
||||||
|
|
||||||
void cursor_malloc(struct cursor **cursor) {
|
void cursor_malloc(struct cursor **cursor) {
|
||||||
if (!(*cursor = malloc(sizeof(**cursor)))) {
|
if (!(*cursor = malloc(sizeof(**cursor)))) {
|
||||||
tty_solitaire_generic_error(errno, __FILE__, __LINE__);
|
tty_solitaire_generic_error(errno, __FILE__, __LINE__);
|
||||||
|
@ -5,8 +5,6 @@
|
|||||||
#include "deck.h"
|
#include "deck.h"
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
struct deck *deck;
|
|
||||||
|
|
||||||
void deck_malloc(struct deck **deck) {
|
void deck_malloc(struct deck **deck) {
|
||||||
if (!(*deck = malloc(sizeof(**deck)))) {
|
if (!(*deck = malloc(sizeof(**deck)))) {
|
||||||
tty_solitaire_generic_error(errno, __FILE__, __LINE__);
|
tty_solitaire_generic_error(errno, __FILE__, __LINE__);
|
||||||
|
@ -13,6 +13,9 @@
|
|||||||
#include "gui.h"
|
#include "gui.h"
|
||||||
#include "stack.h"
|
#include "stack.h"
|
||||||
|
|
||||||
|
struct deck *deck;
|
||||||
|
struct cursor *cursor;
|
||||||
|
|
||||||
static int foundation_begin_x(int x) {
|
static int foundation_begin_x(int x) {
|
||||||
switch (x) {
|
switch (x) {
|
||||||
case 0:
|
case 0:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user