tux4kids / t4kcommon

GNU General Public License v3.0
4 stars 11 forks source link

No texts in TuxMath and TuxType Arch Linux #14

Open pedroprieto opened 2 years ago

pedroprieto commented 2 years ago

Hi,

TuxMath does not render texts in menus nor in game. It seems a problem with SDL.

I've submitted a fix to address it here:

I am no expert in SDL: the only thing I've done is return white_letters instead of bg in T4K_BlackOutline:

https://github.com/tux4kids/t4kcommon/blob/f36ec174f4d8130749f11aeb1d77a81da4be89aa/src/t4k_sdl.c#L1444-L1454

Best!!

andy5995 commented 2 years ago

I think I have the same problem with tuxtype (I haven't tried tuxmath) on Manjaro, using v1.8.3 installed from the AUR

Screenshot_2022-02-06_14-36-46

pedroprieto commented 2 years ago

Hi, @andy5995 ,

You can try building the page from https://github.com/pedroprieto/archlinux.t4kcommon.

Just clone the repo, build it as if it were from the AUR (makepkg), install the package and see if it works.

Best!!

andy5995 commented 2 years ago

Thanks @pedroprieto .

The AUR package was updated earlier today by frealgagu with a missing_texts patch

diff --git a/src/t4k_sdl.c b/src/t4k_sdl.c
index bba1a53..99653f9 100644
--- a/src/t4k_sdl.c
+++ b/src/t4k_sdl.c
@@ -1441,17 +1441,18 @@ SDL_Surface* T4K_BlackOutline(const char* t, int size, SDL_Color* c)

   dstrect.x = 1;
   dstrect.y = 1;
-  SDL_BlitSurface(white_letters, NULL, bg, &dstrect);
-  SDL_FreeSurface(white_letters);
+  /*SDL_BlitSurface(white_letters, NULL, bg, &dstrect);
+  SDL_FreeSurface(white_letters);*/

   /* --- Convert to the screen format for quicker blits --- */
-  SDL_SetColorKey(bg, SDL_SRCCOLORKEY|SDL_RLEACCEL, color_key);
-  out = SDL_DisplayFormatAlpha(bg);
+  /*SDL_SetColorKey(bg, SDL_SRCCOLORKEY|SDL_RLEACCEL, color_key);
+  out = SDL_DisplayFormatAlpha(bg);*/
   SDL_FreeSurface(bg);

   DEBUGMSG(debug_sdl, "\nLeaving T4K_BlackOutline(): \n");

-  return out;
+  /*return out;*/
+  return white_letters;
 }
andy5995 commented 2 years ago

Thanks @pedroprieto .

The AUR package was updated earlier today by frealgagu with a missing_texts patch

Oh, that patch was originally submitted by @pedroprieto ! My mistake (I found after reviewing the OP)

pedroprieto commented 2 years ago

No problem! @frealgagu was really quick accepting the PR and updating the AUR.

Glad to help!!

andy5995 commented 2 years ago

I reinstalled t4kcommon and tuxtype from the AUR, but that didn't change anything for me. Still no text even with the patch applied.

pedroprieto commented 2 years ago

Ok, same problem, but in different repo. The problem is in tuxtype, not in t4kcommon: https://github.com/tux4kids/tuxtype/blob/86bfd1ea0e4adb68d4492862bfd796f5361fbbd3/src/SDL_extras.c#L1352-L1360

I have created the same patch for tuxtype. You can check it here: https://github.com/pedroprieto/archlinux.tuxtype

Clone the repo and compile and install it from there. See if it works. I'll contact AUR tuxtype maintainer to fix it up.

Best!

pedroprieto commented 2 years ago

I leave the issue open so that @tux4kids can fix it.

Summing up, there are 2 repos affected.

Best!

andy5995 commented 2 years ago

Ok, same problem, but in different repo. The problem is in tuxtype, not in t4kcommon: https://github.com/tux4kids/tuxtype/blob/86bfd1ea0e4adb68d4492862bfd796f5361fbbd3/src/SDL_extras.c#L1352-L1360

I have created the same patch for tuxtype. You can check it here: https://github.com/pedroprieto/archlinux.tuxtype

Clone the repo and compile and install it from there. See if it works. I'll contact AUR tuxtype maintainer to fix it up.

Best!

@pedroprieto I built the tuxtype package using the PKGBUILD from your repo and it's working now. Thanks again.