Solitaire for the TI-84 Plus CE!
1// Calculation Solitaire / CALCSLTR for the TI-84 Plus CE
2// Copyright (C) 2025 euphory
3//
4// This program is free software: you can redistribute it and/or modify
5// it under the terms of the GNU General Public License as published by
6// the Free Software Foundation, either version 3 of the License, or
7// (at your option) any later version.
8//
9// This program is distributed in the hope that it will be useful,
10// but WITHOUT ANY WARRANTY; without even the implied warranty of
11// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12// GNU General Public License for more details.
13//
14// You should have received a copy of the GNU General Public License
15// along with this program. If not, see <https://www.gnu.org/licenses/>.
16
17#ifndef variables_include_file
18#define variables_include_file
19
20#define WINS_VAR_NAME "SLTRWINS"
21#define SAVE_VAR_NAME "SLTRSAVE"
22#define GAME_ID 0x02
23
24#define FRAME_TIME 3277
25#define HOLD_TIME 2
26
27#define NUM_FREECELLS 4
28#define NUM_TABLSLOTS 4
29#define TABL_STACK_SIZE 12
30
31#define PROGRESS_COMPLETE 4
32#define DECK_ORG 0xff
33
34#define CARD_RED 0x20
35#define CARD_SUIT 0x30
36#define CARD_NUMBER 0x0f
37#define CARD_KING 12
38#define CARD_EMPTY 0x00
39#define CARD_EXISTS 0x80
40
41typedef unsigned char card_t;
42
43extern card_t tableau[NUM_TABLSLOTS][TABL_STACK_SIZE];
44extern card_t freeCells[NUM_FREECELLS];
45
46extern unsigned char cursorStack;
47extern unsigned char cursorIndex;
48extern enum cursorMode_t { SELECT, DROP } cursorMode;
49extern card_t selectedCard;
50extern unsigned char orgStack;
51extern unsigned char orgIndex;
52
53extern unsigned char progress;
54extern unsigned int *numWins;
55
56extern unsigned char deck[7];
57extern unsigned char deckCards;
58
59#endif