-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfaces.cpp
More file actions
24 lines (20 loc) · 760 Bytes
/
faces.cpp
File metadata and controls
24 lines (20 loc) · 760 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#include "faces.h"
// Array of all faces
static const uint16_t* faces[] = {Basic_face, Calm_face, engy_face, Huh_face, Love_face, Rly_face, shy_face};
static const char* faceNames[] = {"Basic_face", "Calm_face", "engy_face", "Huh_face", "Love_face", "Rly_face", "shy_face"};
static uint16_t currentFaceIndex = 0;
void initFaces() {
currentFaceIndex = 1; // Default to the first face
}
const uint16_t* getCurrentFace() {
return faces[currentFaceIndex];
}
const char* getcurrentFaceName(){
return faceNames[currentFaceIndex];
}
void setFace(uint16_t index) {
if (index < (sizeof(faces) / sizeof(faces[0]))) {
currentFaceIndex = index;
}
}
// Global variables are now defined in main.cpp to avoid conflicts