@@ -80,7 +80,7 @@ void ExtDisplay::TopPanelUpdate(const char *textPrefix, const char *profText)
80
80
}
81
81
}
82
82
83
- void ExtDisplay::ScreenModeChange (int8_t screenMode, bool isAnalog)
83
+ void ExtDisplay::ScreenModeChange (const int & screenMode, const bool & isAnalog)
84
84
{
85
85
if (display != nullptr ) {
86
86
idleTimeStamp = millis ();
@@ -236,11 +236,11 @@ void ExtDisplay::ShowTemp()
236
236
237
237
// Warning: SLOOOOW, should only be used in cali/where the mouse isn't being updated.
238
238
// Use at your own discression.
239
- void ExtDisplay::DrawVisibleIR (int pointX[ 4 ] , int pointY[ 4 ] )
239
+ void ExtDisplay::DrawVisibleIR (int * pointX, int * pointY)
240
240
{
241
241
if (display != nullptr ) {
242
242
display->fillRect (0 , 16 , 128 , 48 , BLACK);
243
- for (uint i = 0 ; i < 4 ; ++i) {
243
+ for (int i = 0 ; i < 4 ; ++i) {
244
244
pointX[i] = map (pointX[i], 0 , 1920 , 0 , 128 );
245
245
pointY[i] = map (pointY[i], 0 , 1080 , 16 , 64 );
246
246
pointY[i] = constrain (pointY[i], 16 , 64 );
@@ -250,10 +250,10 @@ void ExtDisplay::DrawVisibleIR(int pointX[4], int pointY[4])
250
250
}
251
251
}
252
252
253
- void ExtDisplay::PauseScreenShow (uint8_t currentProf, char name1[ 16 ], char name2[ 16 ], char name3[ 16 ], char name4[ 16 ] )
253
+ void ExtDisplay::PauseScreenShow (const int & currentProf, const char * name1, const char * name2, const char * name3, const char * name4)
254
254
{
255
255
if (display != nullptr ) {
256
- char * namesList[16 ] = { name1, name2, name3, name4 };
256
+ const char * namesList[] = { name1, name2, name3, name4 };
257
257
TopPanelUpdate (" Using " , namesList[currentProf]); // names are placeholder
258
258
display->fillRect (0 , 16 , 128 , 48 , BLACK);
259
259
display->setTextSize (1 );
@@ -273,7 +273,7 @@ void ExtDisplay::PauseScreenShow(uint8_t currentProf, char name1[16], char name2
273
273
}
274
274
}
275
275
276
- void ExtDisplay::PauseListUpdate (uint8_t selection)
276
+ void ExtDisplay::PauseListUpdate (const int & selection)
277
277
{
278
278
if (display != nullptr ) {
279
279
display->fillRect (0 , 16 , 128 , 48 , BLACK);
@@ -420,7 +420,7 @@ void ExtDisplay::PauseListUpdate(uint8_t selection)
420
420
}
421
421
}
422
422
423
- void ExtDisplay::PauseProfileUpdate (uint8_t selection, char name1[ 16 ], char name2[ 16 ], char name3[ 16 ], char name4[ 16 ] )
423
+ void ExtDisplay::PauseProfileUpdate (const int & selection, const char * name1, const char * name2, const char * name3, const char * name4)
424
424
{
425
425
if (display != nullptr ) {
426
426
display->fillRect (0 , 16 , 128 , 48 , BLACK);
@@ -477,7 +477,7 @@ void ExtDisplay::PauseProfileUpdate(uint8_t selection, char name1[16], char name
477
477
}
478
478
}
479
479
480
- void ExtDisplay::SaveScreen (uint8_t status)
480
+ void ExtDisplay::SaveScreen (const int & status)
481
481
{
482
482
if (display != nullptr ) {
483
483
display->fillRect (0 , 16 , 128 , 48 , BLACK);
@@ -489,7 +489,7 @@ void ExtDisplay::SaveScreen(uint8_t status)
489
489
}
490
490
}
491
491
492
- void ExtDisplay::PrintAmmo (uint8_t ammo)
492
+ void ExtDisplay::PrintAmmo (const uint & ammo)
493
493
{
494
494
if (display != nullptr ) {
495
495
currentAmmo = ammo;
@@ -498,7 +498,7 @@ void ExtDisplay::PrintAmmo(uint8_t ammo)
498
498
uint ammoLeft = ammo / 10 ;
499
499
uint ammoRight = ammo - (ammoLeft * 10 );
500
500
501
- if (!ammo) { ammoEmpty = true ; } else { ammoEmpty = false ; }
501
+ ammoEmpty = ammo ? false : true ;
502
502
503
503
if (screenState == Screen_Mamehook_Single) {
504
504
display->fillRect (40 , 22 , (NUMBER_GLYPH_WIDTH*2 )+6 , NUMBER_GLYPH_HEIGHT, BLACK);
@@ -514,11 +514,11 @@ void ExtDisplay::PrintAmmo(uint8_t ammo)
514
514
}
515
515
}
516
516
517
- void ExtDisplay::PrintLife (uint8_t life)
517
+ void ExtDisplay::PrintLife (const uint & life)
518
518
{
519
519
if (display != nullptr ) {
520
520
currentLife = life;
521
- if (!life) { lifeEmpty = true ; } else { lifeEmpty = false ; }
521
+ lifeEmpty = life ? false : true ;
522
522
if (screenState == Screen_Mamehook_Single) {
523
523
if (lifeBar) {
524
524
display->fillRect (14 , 37 , 100 , 9 , BLACK);
0 commit comments