# HG changeset patch # User Matti Hamalainen # Date 1530690420 -10800 # Node ID bfa3c268313a61aa553e60a7ac4aa3634138a727 # Parent c0dcc71bbf7f305ecba6398d43530c158f1e3509 Remove prefread.pde, it's not used either. diff -r c0dcc71bbf7f -r bfa3c268313a prefread.pde --- a/prefread.pde Wed Jul 04 10:46:00 2018 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,75 +0,0 @@ -//Read preferences from file -//Adapted from Marq's PETSCII editor - -final String machinenames[] = { - "C64", - "C64M", - "SPECTRUM", - "MSX", - "PLUS4", - "PLUS4M", - "CPC" -}; - - -//a bit sad -final int g_machineidx[] = { - C64, - C64M, - SPECTRUM, - MSX, - PLUS4, - PLUS4M, - CPC -}; - - -void readprefs(String namn) { - String row[] = loadStrings(namn); - - if (row == null) - return; - - for (int i = 0; i < row.length; i++) // Parse each line - { - if (row[i].length() > 1) { - String s[] = split(row[i], "="); - - if (s[0].equals("ZOOM")) { - g_uizoom = int(s[1]); - if (g_uizoom < 1) g_uizoom = 2; - if (g_uizoom > 3) g_uizoom = 2; - } - - if (s[0].equals("MACHINE") && s.length > 1) { - for (int j = 0; j < machinenames.length; j++) - if (s[1].equals(machinenames[j])) - machine = g_machineidx[j]; - } - - if (s[0].equals("PATH") && s.length > 1) { - path = s[1]; - } - - if (s[0].equals("KEYMACRO") && s.length > 1 && s.length < 80) { - g_keymacro = s[1]; - } - - if (s[0].equals("PNGSCALE")) { - g_omag = int(s[1]); - if (g_omag < 1 || g_omag > 10) g_omag = 1; - } - - if (s[0].equals("PNGHBORDER")) { - g_bordh = int(s[1]); - if (g_bordh < 1 || g_bordh > 256) g_bordh = 64; - } - - if (s[0].equals("PNGVBORDER")) { - g_bordv = int(s[1]); - if (g_bordv < 1 || g_bordv > 256) g_bordv = 32; - } - - } - } -}