]> git.sesse.net Git - pistorm/commitdiff
Fix font rendering issue in GUI
authorAndrew Hutchings <andrew@linuxjedi.co.uk>
Sun, 30 May 2021 07:31:25 +0000 (08:31 +0100)
committerAndrew Hutchings <andrew@linuxjedi.co.uk>
Sun, 30 May 2021 07:31:25 +0000 (08:31 +0100)
In OS3.9 and others a different font is used which screws up the layout
for the PiStorm GUI gadgets. We now fix this to Topaz 8 so that it is
the same as other Amiga OS versions.

Also fix Disk.info to show all files and rebuild the hdf.

platforms/amiga/Disk.info
platforms/amiga/pistorm-dev/pistorm_dev_amiga/PiStorm
platforms/amiga/pistorm-dev/pistorm_dev_amiga/gui_interact.c
platforms/amiga/pistorm.hdf

index 9119cf8da97b17f16d1655a76316dc3ae6133c95..5c09bdebe4539b526984086fda8f9821eb5cfc4b 100644 (file)
Binary files a/platforms/amiga/Disk.info and b/platforms/amiga/Disk.info differ
index d7c6620b996a45b94e27c328e17a0f4ed652c8cb..7f1401c12d81dceaa8b419b9aa07d244d8732ca7 100755 (executable)
Binary files a/platforms/amiga/pistorm-dev/pistorm_dev_amiga/PiStorm and b/platforms/amiga/pistorm-dev/pistorm_dev_amiga/PiStorm differ
index 6ade85762fb3cf36b63f71833fc95c44b86f677e..b18a556424efa15545de840ce4024305f2767f8a 100644 (file)
@@ -19,7 +19,7 @@
 extern unsigned int pistorm_base_addr;
 struct ReqToolsBase *ReqToolsBase;
 
-#define VERSION "v0.3.3"
+#define VERSION "v0.3.4"
 
 #define button1w 54
 #define button1h 11
@@ -39,6 +39,14 @@ struct ReqToolsBase *ReqToolsBase;
 #define statusbarw 507
 #define statusbarh 10
 
+struct TextAttr font =
+{
+        "topaz.font",
+        8,
+        FS_NORMAL,
+        0
+};
+
 SHORT SharedBordersPairs0[] =
 {
     0, 0, 0, button1h - 1, 1, button1h - 2, 1, 0, button1w - 2, 0
@@ -120,7 +128,7 @@ struct Border SharedBordersInvert[] =
 
 struct IntuiText KickstartCommit_text =
 {
-    1, 0, JAM2, 2, 2, NULL, (UBYTE *)"Commit", NULL
+    1, 0, JAM2, 2, 2, &font, (UBYTE *)"Commit", NULL
 };
 
 #define GADKICKSTARTCOMMIT 14
@@ -145,7 +153,7 @@ struct StringInfo KickstartFileValue =
 
 struct IntuiText KickstartFile_text =
 {
-    1, 0, JAM2, 0, -10, NULL, "Kickstart file:", NULL
+    1, 0, JAM2, 0, -10, &font, "Kickstart file:", NULL
 };
 
 #define GADKICKSTARTFILE 13
@@ -162,7 +170,7 @@ struct Gadget KickstartFile =
 
 struct IntuiText ShutdownButton_text =
 {
-    1, 0, JAM2, 2, 2, NULL, (UBYTE *)"Shutdown Pi", NULL
+    1, 0, JAM2, 2, 2, &font, (UBYTE *)"Shutdown Pi", NULL
 };
 
 #define GADSHUTDOWN 12
@@ -182,8 +190,8 @@ UBYTE DestinationValue_buf[255];
 
 struct IntuiText Destination_text[] =
 {
-    1, 0, JAM2, -98, 1, NULL, "Destination:", &Destination_text[1],
-    1, 0, JAM2, 1, 1, NULL, DestinationValue_buf, NULL,
+    1, 0, JAM2, -98, 1, &font, "Destination:", &Destination_text[1],
+    1, 0, JAM2, 1, 1, &font, DestinationValue_buf, NULL,
 };
 
 #define GADGETDESTINATION 11
@@ -200,7 +208,7 @@ struct Gadget GetDestination =
 
 struct IntuiText RebootButton_text =
 {
-    1, 0, JAM2, 2, 2, NULL, (UBYTE *)"Reboot", NULL
+    1, 0, JAM2, 2, 2, &font, (UBYTE *)"Reboot", NULL
 };
 
 #define GADREBOOT 10
@@ -219,7 +227,7 @@ UBYTE StatusBar_buf[128] = "Reticulating splines...";
 
 struct IntuiText StatusBar_text =
 {
-    1, 0, JAM2, 4, 2, NULL, (UBYTE *)StatusBar_buf, NULL
+    1, 0, JAM2, 4, 2, &font, (UBYTE *)StatusBar_buf, NULL
 };
 
 #define GADSTATUSBAR 9
@@ -237,7 +245,7 @@ struct Gadget StatusBar =
 
 struct IntuiText RetrieveButton_text =
 {
-    1, 0, JAM2, 10, 2, NULL, (UBYTE *)"Retrieve", NULL
+    1, 0, JAM2, 10, 2, &font, (UBYTE *)"Retrieve", NULL
 };
 
 #define GADRETRIEVEBUTTON 8
@@ -261,8 +269,8 @@ struct StringInfo GetFileValue =
 
 struct IntuiText GetFile_text[] =
 {
-    1, 0, JAM2, -98, -10, NULL, "Get file from PiStorm:", &GetFile_text[1],
-    1, 0, JAM2, -59, 1, NULL, "Source:", NULL,
+    1, 0, JAM2, -98, -10, &font, "Get file from PiStorm:", &GetFile_text[1],
+    1, 0, JAM2, -59, 1, &font, "Source:", NULL,
 };
 
 #define GADGETFILE 7
@@ -279,7 +287,7 @@ struct Gadget GetFile =
 
 struct IntuiText ConfigDefault_text =
 {
-    1, 0, JAM2, 2, 2, NULL, (UBYTE *)"Load Default", NULL
+    1, 0, JAM2, 2, 2, &font, (UBYTE *)"Load Default", NULL
 };
 
 #define GADCONFIGDEFAULT 6
@@ -296,7 +304,7 @@ struct Gadget ConfigDefault =
 
 struct IntuiText ConfigCommit_text =
 {
-    1, 0, JAM2, 2, 2, NULL, (UBYTE *)"Commit", NULL
+    1, 0, JAM2, 2, 2, &font, (UBYTE *)"Commit", NULL
 };
 
 #define GADCONFIGCOMMIT 5
@@ -321,7 +329,7 @@ struct StringInfo ConfigFileValue =
 
 struct IntuiText ConfigFile_text =
 {
-    1, 0, JAM2, 0, -10, NULL, "Config file:", NULL
+    1, 0, JAM2, 0, -10, &font, "Config file:", NULL
 };
 
 #define GADCONFIGFILE 4
@@ -340,14 +348,14 @@ UBYTE RTGStatus_buf[64] = "RTG status";
 
 struct IntuiText RTGStatus_text =
 {
-    1, 0, JAM2, 1, 1, NULL, (UBYTE *)RTGStatus_buf, NULL
+    1, 0, JAM2, 1, 1, &font, (UBYTE *)RTGStatus_buf, NULL
 };
 
 #define GADRTGSTATUS 3
 
 struct Gadget RTGStatus =
 {
-    &ConfigFile, 10, 15, tbox1w, tbox1h,
+    &ConfigFile, 10, 20, tbox1w, tbox1h,
     GADGHIMAGE,
     0,
     BOOLGADGET,
@@ -359,14 +367,14 @@ UBYTE RTG_buf[64] = "RTG Enable";
 
 struct IntuiText RTG_text =
 {
-    1, 0, JAM2, 8, 2, NULL, (UBYTE *)RTG_buf, NULL
+    1, 0, JAM2, 8, 2, &font, (UBYTE *)RTG_buf, NULL
 };
 
 #define GADRTGBUTTON 2
 
 struct Gadget RTGButton =
 {
-    &RTGStatus, 144, 14, button3w, button3h,
+    &RTGStatus, 144, 19, button3w, button3h,
     GADGHIMAGE,
     RELVERIFY,
     BOOLGADGET,
@@ -376,7 +384,7 @@ struct Gadget RTGButton =
 
 struct IntuiText AboutButton_text =
 {
-    1, 0, JAM2, 8, 2, NULL, (UBYTE *)"About", NULL
+    1, 0, JAM2, 8, 2, &font, (UBYTE *)"About", NULL
 };
 
 #define GADABOUT 1
@@ -394,7 +402,7 @@ struct Gadget AboutButton =
 
 struct IntuiText QuitButton_text =
 {
-    1, 0, JAM2, 12, 2, NULL, (UBYTE *)"Quit", NULL
+    1, 0, JAM2, 12, 2, &font, (UBYTE *)"Quit", NULL
 };
 
 #define GADQUIT 0
@@ -520,8 +528,8 @@ int main()
         static struct IntuiText pos;
         struct IntuiText msg[] =
         {
-            1, 0, JAM2, 0, 0, NULL, "You need reqtools.library V38 or higher!.", &msg[1],
-            1, 0, JAM2, 0, 10, NULL, "Please install it in your Libs: drirectory.", NULL,
+            1, 0, JAM2, 0, 0, &font, "You need reqtools.library V38 or higher!.", &msg[1],
+            1, 0, JAM2, 0, 10, &font, "Please install it in your Libs: drirectory.", NULL,
         };
         AutoRequest(NULL, msg, NULL, &pos, 0, 0, 0, 0);
         return RETURN_FAIL;
index 50b63efde6991ce201db30ab6d9d3a6cf740b51a..fbf6d85155f514d2957a2b7dd11ef34442af5ed1 100644 (file)
Binary files a/platforms/amiga/pistorm.hdf and b/platforms/amiga/pistorm.hdf differ