]> Shamusworld >> Repos - wozmaker/blob - src/global.cpp
Flesh out the disk settings dialog.
[wozmaker] / src / global.cpp
1 //
2 // global.cpp: Global variables
3 //
4 // Those who think that global variables are evil have obviously not done any
5 // amount of serious software development.  If you think that doing away with
6 // this class will make it better, don't.  You don't know what you're doing.
7 //
8 // Part of the WOZ Maker project
9 // by James Hammons
10 // (C) 2018 Underground Software
11 //
12
13 #include "global.h"
14 #include <stdio.h>
15 #include "fileio.h"
16
17
18 A2R * Global::a2r = NULL;
19 uint32_t Global::a2rSize = 0;
20 Metadata * Global::metadata;
21 A2RStream * Global::stream[800];
22 uint32_t Global::numStreams = 0;
23 uint8_t Global::bitStream[80000];
24 uint32_t Global::bitStreamLength = 0;
25 uint32_t Global::nibbleCount = 0;
26 uint32_t Global::streamNum = 0;
27 uint8_t Global::trackNum = 0;
28 const uint8_t Global::bit[8] = { 0x80, 0x40, 0x20, 0x10, 0x08, 0x04, 0x02, 0x01};
29 uint8_t * Global::streamData[9] = { 0 };
30 uint32_t Global::streamLen[9] = { 0 };
31 uint8_t Global::streamCount = 0;
32 uint32_t Global::synthWave[80000];
33 float Global::swAmplitude[80000];
34 uint32_t Global::swLen = 0;
35 uint8_t Global::trackStatus[141] = { 0 };
36 // N.B.: This takes 256MB (1/4 of a GB!) to hold the unpacked data. Seems excessive to me... (could probably determine at runtime how much mem is needed, and just allocate that on the heap...)
37 uint32_t Global::wave[800][80000] = { 0 };
38 uint32_t Global::waveLen[800] = { 0 };
39
40 uint32_t Global::bloops = 0;
41 uint32_t Global::waveSync = 0;
42
43 uint32_t Global::synWave[141][80000] = { 0 };
44 uint32_t Global::synWaveLen[141] = { 0 };
45
46 uint8_t Global::bStream[141][80000] = { 0 };
47 uint32_t Global::bStreamLen[141] = { 0 };
48 uint32_t Global::bStreamLenBits[141] = { 0 };
49
50 uint8_t Global::meta[32][256] = { 0 };
51 uint8_t Global::metaCount = 0;
52