Skip to content

Commit

Permalink
Revert "Merge pull request #845 from cspiegel/garglk-window-colors"
Browse files Browse the repository at this point in the history
This reverts commit 86aa5f3, reversing
changes made to 6b62fa9.
  • Loading branch information
cspiegel committed May 25, 2024
1 parent 156af51 commit cc41029
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 23 deletions.
2 changes: 0 additions & 2 deletions garglk/cheapglk/glk.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,6 @@ typedef int32_t glsi32;
#define GLK_MODULE_GARGLKBLEEP
#define GLK_MODULE_GARGLKWINSIZE
#define GLK_MODULE_GARGLK_FILE_RESOURCES
#define GLK_MODULE_GARGLK_GET_COLORS

/* Define a macro for a function attribute that indicates a function that
never returns. (E.g., glk_exit().) We try to do this only in C compilers
Expand Down Expand Up @@ -522,7 +521,6 @@ extern void garglk_set_zcolors(glui32 fg, glui32 bg);
extern void garglk_set_zcolors_stream(strid_t str, glui32 fg, glui32 bg);
extern void garglk_set_reversevideo(glui32 reverse);
extern void garglk_set_reversevideo_stream(strid_t str, glui32 reverse);
extern void garglk_get_colors(glui32 wintype, glui32 style, glui32 *fg, glui32 *bg);

extern void garglk_zbleep(glui32 number);

Expand Down
21 changes: 0 additions & 21 deletions garglk/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,27 +127,6 @@ const Styles gli_gstyles_def = gli_gstyles;

std::vector<garglk::ConfigFile> garglk::all_configs;

void garglk_get_colors(glui32 wintype, glui32 style, glui32 *fg, glui32 *bg)
{
auto styles = wintype == wintype_TextGrid ? gli_gstyles : gli_tstyles;

if (style >= style_NUMSTYLES) {
return;
}

if (fg != nullptr) {
*fg = (styles[style].fg[0] << 16) |
(styles[style].fg[1] << 8) |
(styles[style].fg[2] << 0);
}

if (bg != nullptr) {
*bg = (styles[style].bg[0] << 16) |
(styles[style].bg[1] << 8) |
(styles[style].bg[2] << 0);
}
}

static FontFace font2idx(const std::string &font)
{
const static std::unordered_map<std::string, FontFace> facemap = {
Expand Down

0 comments on commit cc41029

Please sign in to comment.