Browse Source

show high score list being drawn

Thomas B 1 month ago
parent
commit
fd0c6ba1ea
3 changed files with 15 additions and 13 deletions
  1. 3
    3
      src/main.c
  2. 4
    2
      src/maps.c
  3. 8
    8
      src/score.ba0.c

+ 3
- 3
src/main.c View File

@@ -38,15 +38,15 @@ static void highscore(uint8_t is_black) NONBANKED {
38 38
     hide_sprites_range(SPR_NUM_START, MAX_HARDWARE_SPRITES);
39 39
     win_score_clear(is_black);
40 40
 
41
+    move_win(MINWNDPOSX + 0, MINWNDPOSY);
42
+    SHOW_WIN;
43
+
41 44
     for (uint8_t i = 0; i < SCORE_NUM; i++) {
42 45
 
43 46
         struct scores score = is_black ? score_lowest(i) : score_highest(i);
44 47
         win_score_draw(score, i, is_black);
45 48
     }
46 49
 
47
-    move_win(MINWNDPOSX + 0, MINWNDPOSY);
48
-    SHOW_WIN;
49
-
50 50
     while (1) {
51 51
         key_read();
52 52
 

+ 4
- 2
src/maps.c View File

@@ -119,8 +119,10 @@ static void str3(uint16_t name, uint8_t x_off, uint8_t y_off, uint8_t is_black)
119 119
 static void str(const char *s, uint8_t x_off, uint8_t y_off, uint8_t is_black) NONBANKED {
120 120
     uint8_t n = 0;
121 121
     while (*s) {
122
-        character(*s - 'a', n++, x_off, y_off, is_black);
123
-        s++;
122
+        char c = *(s++);
123
+        if ((c >= 'A') && (c <= 'Z')) c = c - 'A' + 'a';
124
+        if ((c < 'a') || (c > 'z')) c = 'x';
125
+        character(c - 'a', n++, x_off, y_off, is_black);
124 126
     }
125 127
 }
126 128
 

+ 8
- 8
src/score.ba0.c View File

@@ -68,28 +68,28 @@ static void score_init(void) NONBANKED {
68 68
     scores[0].name = convert_name('a', 'b', 'c');
69 69
     scores[0].score = 10000;
70 70
 
71
-    scores[1].name = convert_name('a', 'b', 'c');
71
+    scores[1].name = convert_name('d', 'e', 'f');
72 72
     scores[1].score = 8765;
73 73
 
74
-    scores[2].name = convert_name('a', 'b', 'c');
74
+    scores[2].name = convert_name('g', 'h', 'i');
75 75
     scores[2].score = 6999;
76 76
 
77
-    scores[3].name = convert_name('a', 'b', 'c');
77
+    scores[3].name = convert_name('j', 'k', 'l');
78 78
     scores[3].score = 4321;
79 79
 
80
-    scores[4].name = convert_name('a', 'b', 'c');
80
+    scores[4].name = convert_name('m', 'n', 'o');
81 81
     scores[4].score = 2000;
82 82
 
83
-    scores[5].name = convert_name('a', 'b', 'c');
83
+    scores[5].name = convert_name('p', 'q', 'r');
84 84
     scores[5].score = -2000;
85 85
 
86
-    scores[6].name = convert_name('a', 'b', 'c');
86
+    scores[6].name = convert_name('s', 't', 'u');
87 87
     scores[6].score = -4321;
88 88
 
89
-    scores[7].name = convert_name('a', 'b', 'c');
89
+    scores[7].name = convert_name('v', 'w', 'x');
90 90
     scores[7].score = -6999;
91 91
 
92
-    scores[8].name = convert_name('a', 'b', 'c');
92
+    scores[8].name = convert_name('y', 'z', 'c');
93 93
     scores[8].score = -8765;
94 94
 
95 95
     scores[9].name = convert_name('a', 'b', 'c');

Loading…
Cancel
Save