]> git.unchartedbackwaters.co.uk Git - francis/winuae.git/commitdiff
NV(ram) status line string.
authorToni Wilen <twilen@winuae.net>
Sat, 29 Aug 2020 17:01:45 +0000 (20:01 +0300)
committerToni Wilen <twilen@winuae.net>
Sat, 29 Aug 2020 17:01:45 +0000 (20:01 +0300)
include/statusline.h
statusline.cpp

index 02589fc17e761ad07097c32fe4c5e2fc1d458e12..b8713e7eb9b8505482016d877044fafaf3edfaad 100644 (file)
@@ -19,7 +19,7 @@ static int td_pos = (TD_RIGHT | TD_BOTTOM);
 
 #define TD_TOTAL_HEIGHT (TD_PADY * 2 + TD_NUM_HEIGHT)
 
-#define NUMBERS_NUM 19
+#define NUMBERS_NUM 20
 
 #define TD_BORDER 0x333333
 
index 50363b63f3469ef5e51e1111a5260cbdbd5067fc..bd924cd2713358dc6782afeda7d3c5fd316118e7 100644 (file)
@@ -47,14 +47,15 @@ void statusline_getpos(int monid, int *x, int *y, int width, int height)
        }
 }
 
-static const char *numbers = { /* ugly  0123456789CHD%+-PNK */
-       "+++++++--++++-+++++++++++++++++-++++++++++++++++++++++++++++++++++++++++++++-++++++-++++----++---+--------------+++++++++++++++++++++"
-       "+xxxxx+--+xx+-+xxxxx++xxxxx++x+-+x++xxxxx++xxxxx++xxxxx++xxxxx++xxxxx++xxxx+-+x++x+-+xxx++-+xx+-+x---+----------+xxxxx++x+++x++x++x++"
-       "+x+++x+--++x+-+++++x++++++x++x+++x++x++++++x++++++++++x++x+++x++x+++x++x++++-+x++x+-+x++x+--+x++x+--+x+----+++--+x---x++xx++x++x+x+++"
-       "+x+-+x+---+x+-+xxxxx++xxxxx++xxxxx++xxxxx++xxxxx+--++x+-+xxxxx++xxxxx++x+----+xxxx+-+x++x+----+x+--+xxx+--+xxx+-+xxxxx++x+x+x++xx++++"
-       "+x+++x+---+x+-+x++++++++++x++++++x++++++x++x+++x+--+x+--+x+++x++++++x++x++++-+x++x+-+x++x+---+x+x+--+x+----+++--+x++++++x+x+x++x+x+++"
-       "+xxxxx+---+x+-+xxxxx++xxxxx+----+x++xxxxx++xxxxx+--+x+--+xxxxx++xxxxx++xxxx+-+x++x+-+xxx+---+x++xx--------------+x+----+x++xx++x++x++"
-       "+++++++---+++-++++++++++++++----+++++++++++++++++--+++--++++++++++++++++++++-++++++-++++------------------------+++----++++++++++++++"
+static const char *numbers = { /* ugly  0123456789CHD%+-PNKV */
+       "+++++++--++++-+++++++++++++++++-++++++++++++++++++++++++++++++++++++++++++++-++++++-++++----++---+--------------++++++++++-++++++++++++  +++"
+       "+xxxxx+--+xx+-+xxxxx++xxxxx++x+-+x++xxxxx++xxxxx++xxxxx++xxxxx++xxxxx++xxxx+-+x++x+-+xxx++-+xx+-+x---+----------+xxxxx++x+-+x++x++x++x+  +x+"
+       "+x+++x+--++x+-+++++x++++++x++x+++x++x++++++x++++++++++x++x+++x++x+++x++x++++-+x++x+-+x++x+--+x++x+--+x+----+++--+x---x++xx++x++x+x+++x+  +x+"
+       "+x+-+x+---+x+-+xxxxx++xxxxx++xxxxx++xxxxx++xxxxx+--++x+-+xxxxx++xxxxx++x+----+xxxx+-+x++x+----+x+--+xxx+--+xxx+-+xxxxx++x+x+x++xx+   +x++x+ "
+       "+x+++x+---+x+-+x++++++++++x++++++x++++++x++x+++x+--+x+--+x+++x++++++x++x++++-+x++x+-+x++x+---+x+x+--+x+----+++--+x++++++x+x+x++x+x++  +xx+  "
+       "+xxxxx+---+x+-+xxxxx++xxxxx+----+x++xxxxx++xxxxx+--+x+--+xxxxx++xxxxx++xxxx+-+x++x+-+xxx+---+x++xx--------------+x+----+x++xx++x++x+  +xx+  "
+       "+++++++---+++-++++++++++++++----+++++++++++++++++--+++--++++++++++++++++++++-++++++-++++------------------------+++----+++++++++++++  ++++  "
+//   x      x      x      x      x      x      x      x      x      x      x      x      x      x      x      x      x      x      x      x      x  
 };
 
 STATIC_INLINE uae_u32 ledcolor(uae_u32 c, uae_u32 *rc, uae_u32 *gc, uae_u32 *bc, uae_u32 *a)
@@ -142,7 +143,7 @@ void draw_status_line_single(int monid, uae_u8 *buf, int bpp, int y, int totalwi
                x_start = TD_PADX * mult;
 
        for (led = 0; led < LED_MAX; led++) {
-               int side, pos, num1 = -1, num2 = -1, num3 = -1, num4 = -1;
+               int pos, num1 = -1, num2 = -1, num3 = -1, num4 = -1;
                int x, c, on = 0, am = 2;
                xcolnr on_rgb = 0, on_rgb2 = 0, off_rgb = 0, pen_rgb = 0;
                int half = 0, extraborder = 0;
@@ -176,7 +177,6 @@ void draw_status_line_single(int monid, uae_u8 *buf, int bpp, int y, int totalwi
                                        extraborder = 1;
                                }
                        }
-                       side = gui_data.drive_side;
                        on_rgb &= 0xffffff;
                        off_rgb = rgbmuldiv(on_rgb, 2, 4);
                        on_rgb2 = rgbmuldiv(on_rgb, 2, 3);
@@ -287,17 +287,21 @@ void draw_status_line_single(int monid, uae_u8 *buf, int bpp, int y, int totalwi
                                on_rgb = 0x0000cc; // "normal" overflow
                        off_rgb = 0x000000;
                        am = 3;
-               } else if (led == LED_MD && gui_data.drives[3].drive_disabled) {
+               } else if (led == LED_MD) {
                        // DF3 reused as internal non-volatile ram led (cd32/cdtv)
-                       pos = 7 + 3;
-                       if (gui_data.md >= 0) {
-                               on = gui_data.md;
-                               on_rgb = on == 2 ? 0xcc0000 : 0x00cc00;
-                               off_rgb = 0x003300;
+                       if (gui_data.drives[3].drive_disabled && gui_data.md >= 0) {
+                               pos = 7 + 3;
+                               if (gui_data.md >= 0) {
+                                       on = gui_data.md;
+                                       on_rgb = on == 2 ? 0xcc0000 : 0x00cc00;
+                                       off_rgb = 0x003300;
+                               }
+                               num1 = -1;
+                               num2 = 17;
+                               num3 = 19;
+                       } else {
+                               continue;
                        }
-                       num1 = -1;
-                       num2 = -1;
-                       num3 = -1;
                } else if (led == LED_NET) {
                        pos = 6;
                        if (gui_data.net >= 0) {