From a8ed4e3cea56bfed7464c243cf5f87b695c10eae Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Sat, 07 Aug 2021 00:27:53 -0400 Subject: splash, tk: Clarify and standardize function ptrs --- diff --git a/src/splash.c b/src/splash.c index 5a85330..b76b0cc 100644 --- a/src/splash.c +++ b/src/splash.c @@ -141,14 +141,15 @@ _mf_splash_form(SDL_Renderer *renderer, TTF_Font *text_font, mftk_label_new(text_font, "Seed", text_color, renderer), MFTK_GRID_HALIGN_R|MFTK_GRID_VALIGN_T, mftk_text_new('0', '9', rand_max_len, seed_buf, - text_font, text_color, _mf_splash_seed, splash), + text_font, text_color, + &_mf_splash_seed, splash), MFTK_GRID_HALIGN_L|MFTK_GRID_VALIGN_T, mftk_label_new(text_font, "Size", text_color, renderer), MFTK_GRID_HALIGN_R|MFTK_GRID_VALIGN_T, mftk_radio_new(MF_SPLASH_CHK_BTN_W, MF_SPLASH_CHK_BTN_P, &chkb_color, &chkm_color, MF_SPLASH_CHK_LBL_P, MF_SPLASH_CHK_ITM_P, text_font, text_color, - _mf_splash_size, splash, renderer, 0, 3, + &_mf_splash_size, splash, renderer, 0, 3, "15x15", "20x20", "30x30"), MFTK_GRID_HALIGN_L|MFTK_GRID_VALIGN_T, mftk_label_new(text_font, "Fog of war", text_color, @@ -156,14 +157,14 @@ _mf_splash_form(SDL_Renderer *renderer, TTF_Font *text_font, MFTK_GRID_HALIGN_R|MFTK_GRID_VALIGN_T, mftk_check_new(MF_SPLASH_CHK_BTN_W, MF_SPLASH_CHK_BTN_P, &chkb_color, &chkm_color, SDL_TRUE, 0, NULL, - NULL, NULL, _mf_splash_fow, splash, renderer), + NULL, NULL, &_mf_splash_fow, splash, renderer), MFTK_GRID_HALIGN_L|MFTK_GRID_VALIGN_T, mftk_label_new(text_font, "Reveal maze", text_color, renderer), MFTK_GRID_HALIGN_R|MFTK_GRID_VALIGN_T, mftk_check_new(MF_SPLASH_CHK_BTN_W, MF_SPLASH_CHK_BTN_P, &chkb_color, &chkm_color, SDL_FALSE, 0, NULL, - NULL, NULL, _mf_splash_reveal, splash, + NULL, NULL, &_mf_splash_reveal, splash, renderer), MFTK_GRID_HALIGN_L|MFTK_GRID_VALIGN_T, mftk_blank_new(), diff --git a/src/tk/radio.c b/src/tk/radio.c index f6fe474..99e2b8b 100644 --- a/src/tk/radio.c +++ b/src/tk/radio.c @@ -201,7 +201,7 @@ mftk_radio_new(int butn_width, int butn_padding, SDL_Color *butn_color, r->children[i] = mftk_check_new(butn_width, butn_padding, butn_color, mark_color, (i == state), label_padding, font, va_arg(ap, const char *), - text_color, _mftk_radio_state_change, + text_color, &_mftk_radio_state_change, &r->states[i], renderer); if (r->children[i] == NULL) { for (; i >= 0; --i) { -- cgit v0.9.1