Skip to content
Snippets Groups Projects
Commit 6ab97913 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Add "Yellow Is Yellow" option.

This allows the ANSI yellow colour to be yellow instead of the
brown used in IBM CGA monitors.
parent c32f057a
No related branches found
No related tags found
1 merge request!463MRC mods by Codefenix (2024-10-20)
Pipeline #4470 failed
......@@ -195,6 +195,12 @@ static struct sort_order_info sort_order[] = {
offsetof(struct bbslist, force_lcf),
sizeof(((struct bbslist *)NULL)->force_lcf)
},
{
"Yellow Is Yellow",
0,
offsetof(struct bbslist, yellow_is_yellow),
sizeof(((struct bbslist *)NULL)->yellow_is_yellow)
},
{
NULL,
0,
......@@ -763,6 +769,7 @@ read_item(str_list_t listfile, struct bbslist *entry, char *bbsname, int id, int
entry->hidepopups = iniGetBool(section, NULL, "HidePopups", false);
entry->rip = iniGetEnum(section, NULL, "RIP", rip_versions, RIP_VERSION_NONE);
entry->force_lcf = iniGetBool(section, NULL, "ForceLCF", false);
entry->yellow_is_yellow = iniGetBool(section, NULL, "YellowIsYellow", false);
iniGetString(section, NULL, "DownloadPath", home, entry->dldir);
iniGetString(section, NULL, "UploadPath", home, entry->uldir);
......@@ -1030,7 +1037,7 @@ get_rip_version(int oldver, int *changed)
int
edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdefault)
{
char opt[19][69]; /* 21=Holds number of menu items, 80=Number of columns */
char opt[21][69]; /* 21=Holds number of menu items, 80=Number of columns */
char *opts[(sizeof(opt) / sizeof(opt[0])) + 1];
int changed = 0;
int copt = 0, i, j;
......@@ -1115,6 +1122,7 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
sprintf(opt[i++], "Hide Popups %s", item->hidepopups ? "Yes" : "No");
sprintf(opt[i++], "RIP %s", rip_versions[item->rip]);
sprintf(opt[i++], "Force LCF Mode %s", item->force_lcf ? "Yes" : "No");
sprintf(opt[i++], "Yellow is Yellow %s", item->yellow_is_yellow ? "Yes" : "No");
opt[i][0] = 0;
uifc.changes = 0;
......@@ -1156,6 +1164,9 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
" Enable/Disable RIP modes\n\n"
"~ Force LCF Mode ~\n"
" Force Last Column Flag mode as used in VT terminals\n\n"
"~ Yellow Is Yellow ~\n"
" Make the dark yellow colour actually yellow instead of the brown\n"
" used in IBM CGA monitors\n\n"
;
}
else {
......@@ -1200,6 +1211,9 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
" Enable/Disable RIP modes\n\n"
"~ Force LCF Mode ~\n"
" Force Last Column Flag mode as used in VT terminals\n\n"
"~ Yellow Is Yellow ~\n"
" Make the dark yellow colour actually yellow instead of the brown\n"
" used in IBM CGA monitors\n\n"
;
}
i = uifc.list(WIN_MID | WIN_SAV | WIN_ACT, 0, 0, 0, &copt, &bar,
......@@ -1637,6 +1651,11 @@ edit_list(struct bbslist **list, struct bbslist *item, char *listpath, int isdef
changed = 1;
iniSetBool(&inifile, itemname, "ForceLCF", item->force_lcf, &ini_style);
break;
case 19:
item->yellow_is_yellow = !item->yellow_is_yellow;
changed = 1;
iniSetBool(&inifile, itemname, "YellowIsYellow", item->yellow_is_yellow, &ini_style);
break;
}
if (uifc.changes)
changed = 1;
......@@ -1691,6 +1710,7 @@ add_bbs(char *listpath, struct bbslist *bbs)
iniSetEnum(&inifile, bbs->name, "RIP", rip_versions, bbs->rip, &ini_style);
iniSetString(&inifile, bbs->name, "Comment", bbs->comment, &ini_style);
iniSetBool(&inifile, bbs->name, "ForceLCF", bbs->force_lcf, &ini_style);
iniSetBool(&inifile, bbs->name, "YellowIsYellow", bbs->yellow_is_yellow, &ini_style);
if ((listfile = fopen(listpath, "w")) != NULL) {
iniWriteFile(listfile, inifile);
fclose(listfile);
......
......@@ -139,6 +139,7 @@ struct bbslist {
int flow_control;
char comment[1024];
bool force_lcf;
bool yellow_is_yellow;
};
extern char *music_names[];
......
......@@ -1391,6 +1391,9 @@ main(int argc, char **argv)
double sf;
int default_hidepopups = -1;
int default_nostatus = -1;
unsigned char saved_red = dac_default[3].red;
unsigned char saved_green = dac_default[3].green;
unsigned char saved_blue = dac_default[3].blue;
const char syncterm_termcap[] = "\n# terminfo database entry for SyncTERM\n"
"# compile with tic -x to get the user-defined capabilities for vim (bracketed pasted)\n"
"syncterm|SyncTERM,\n"
......@@ -1908,8 +1911,16 @@ main(int argc, char **argv)
}
load_font_files();
setfont(find_font_id(bbs->font), true, 1);
if (bbs->yellow_is_yellow) {
dac_default[3].red = dac_default[1].red;
dac_default[3].green = dac_default[2].green;
dac_default[3].blue = dac_default[0].blue;
}
if (doterm(bbs))
quitting = true;
dac_default[3].red = saved_red;
dac_default[3].green = saved_green;
dac_default[3].blue = saved_blue;
fake_mode = -1;
setvideoflags(0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment