-
Notifications
You must be signed in to change notification settings - Fork 0
/
Items.h
73 lines (51 loc) · 1.35 KB
/
Items.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
#pragma once
typedef struct tapeReel
{
char *fileName;
char *writing;
gdouble fxpos,fypos,fzpos,fradius,fangle; /* values from INFO file */
gdouble ReelRadius; // Computed from length when the tapeArray is initialise
// when the tape is removed from a drawer.
gdouble ReelRadiusReduced; // May be less if tape unwinding.
int tapeColour;
GByteArray *tapeArray;
guint tapeFirst; // index of first non runout in tapeBuffer
guint remaining; // number of chars after first non runout
gboolean woundup;
} TapeReel;
typedef struct
{
guint32 HolePixels[4][4];
guint32 SprocketPixels[4][4];
guint32 TapePixels[4][4];
} TapeImageInfo;
enum ItemType { NOTHING=0, TAPEREEL };
typedef struct item
{
enum ItemType itemType; // What it is
GList *places; // Where it is (An item may be in more than one place)
union
{
TapeReel *aTapeReel;
};
} Item;
enum PlaceType { NOWHERE=0,ADRAWER,AHAND,TAPE_HOLDER,READER};
// FOrward definition to avoid dependency loop.
typedef struct handinfo HandInfo;
typedef struct drawer
{
char *drawerName;
int drawerId;
} Drawer;
typedef struct place
{
enum PlaceType placeType;
GList *items;
union
{
Drawer *drawer;
HandInfo *hand;
};
} Place;
// TEMPREMOVE extern
GList *Places;