riksweeney / edgar

A 2D platform game with a persistent world. When Edgar's father fails to return home after venturing out one dark and stormy night, Edgar fears the worst: he has been captured by the evil sorcerer who lives in a fortress beyond the forbidden swamp.
https://www.parallelrealities.co.uk/games/edgar
116 stars 28 forks source link

No text in some text fields #48

Closed Sturwandan closed 1 year ago

Sturwandan commented 3 years ago

This problem happens somewhat randomly. Sometimes text disappear in text boxes, sometimes it's shown. On a certain systems, namely archlinuxarm, the problem happens consistently and even the main menu cannot be read (though I don't have access to that at the moment).

Do you have any suggestion how to track the source of this problem down? It could be missing font, or black text on black background, I don't know.

@riksweeney have mentioned here https://github.com/riksweeney/edgar/issues/46#issuecomment-681781670 there was a solution to similar problem. Would be nice if he could share it, so I can test whenever I'm having same or different problem.

no_fonts_edgar

riksweeney commented 3 years ago

This bug has been fixed, but there's no release available currently, I'm afraid.

Sturwandan commented 3 years ago

Alright, I have found the last commit which sets alpha channel like this: foregroundcolour.a = 255; backgroundcolour.a = 255; I will try to insert it into src/graphics/font.c at several places where other channels are set and see if it works. Since I'm building from source, the easiest way is to insert this line: sed -e 's/\(\s*.\{4\}\groundcolour\.\).\?b.*/&\n\1a = 255;/' -i src/graphics/font.c Into the build script: https://aur.archlinux.org/cgit/aur.git/tree/PKGBUILD?h=legendofedgar nearby the other sed expression, which edits makefile.

P.S. I have tried this on archlinuxarm, where even main menu was borked and the problem was solved! Thank you, @riksweeney