@@ -50,8 +50,7 @@ std::vector<Kana> loadAssets()
50
50
" ma" , " mi" , " mu" , " me" , " mo" ,
51
51
" ya" , " yu" , " yo" ,
52
52
" ra" , " ri" , " ru" , " re" , " ro" ,
53
- " wa" , " wo" , " n"
54
- };
53
+ " wa" , " wo" , " n" };
55
54
56
55
for (std::string &kanaName : kanaNames)
57
56
{
@@ -362,6 +361,13 @@ int main()
362
361
363
362
std::string playerName = loadPlayerName ();
364
363
364
+ bool isHighScoreScreen = false ;
365
+
366
+ if (playerName.compare (" aaa" ) == 0 )
367
+ {
368
+ isHighScoreScreen = true ;
369
+ }
370
+
365
371
std::vector<std::string> highScores = loadHighScores ();
366
372
367
373
int attempts = 0 ;
@@ -384,7 +390,6 @@ int main()
384
390
385
391
bool isLearningMode = true ;
386
392
bool isHiraganaMode = true ;
387
- bool isHighScoreScreen = false ;
388
393
389
394
int previousKanaIndex = 0 ;
390
395
int actualKanaIndex = GetRandomValue (hiraganasInitialIndex, totalHiraganas);
@@ -405,7 +410,7 @@ int main()
405
410
int nextFrameDataOffset = 0 ; // Current byte offset to next frame in image.data
406
411
int currentAnimationFrame = 0 ; // Current animation frame to load and draw
407
412
int frameDelay = 8 ; // Frame delay to switch between animation frames
408
- int animationFrameCounter = 0 ; // General frames counter
413
+ int animationFrameCounter = 0 ; // General frames counter
409
414
410
415
while (!WindowShouldClose ())
411
416
{
@@ -507,7 +512,11 @@ int main()
507
512
attempts = 0 ;
508
513
showScoreTimer = 0 ;
509
514
510
- highScores = saveActualHighScores (highScores, score, playerName);
515
+ if (score > 0 )
516
+ {
517
+ highScores = saveActualHighScores (highScores, score, playerName);
518
+ }
519
+
511
520
updateHighScore (score);
512
521
}
513
522
@@ -555,7 +564,12 @@ int main()
555
564
isLearningMode = true ;
556
565
attempts = 0 ;
557
566
showScoreTimer = 0 ;
558
- highScores = saveActualHighScores (highScores, score, playerName);
567
+
568
+ if (score > 0 )
569
+ {
570
+ highScores = saveActualHighScores (highScores, score, playerName);
571
+ }
572
+
559
573
updateHighScore (score);
560
574
}
561
575
}
0 commit comments