-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPanel.h
45 lines (36 loc) · 1.08 KB
/
Panel.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
#pragma once
#include <stdint.h>
#include "CPU.h"
class Panel
{
public:
CPU *cpu;
//Misc functions
void init(CPU *cpu_);
void update();
void updateFromInput();
//Drawing functions
void drawDebugInfo();
void drawPanel(int xoff, int yoff);
void drawSwitchAt(int x, int y, bool state);
void drawFlickSwitchAt(int x, int y, int state);
void drawLightAt(int x, int y, bool state);
//Set data functions
void toggleSwitch(int set);
void toggleStartSwitch();
void setSwitch(int set, bool state);
void setIndividualDataLight(int light, bool state);
void setIndividualAddressLight(int light, bool state);
void setDataLightsFromWord(word set);
void setAddressLightsFromWord(word set);
//Get data functions
word getWordFromSwitches();
private:
//Arrays to handle drawing and input
bool switchArray[18] = { false };
bool addressLightArray[18] = { false };
bool dataLightArray[18] = { false };
//Switch states
bool startSwitch = false;
int singleStepSwitch = 0;
};