I am trying to compile a Galaksija Plus hires version of the dstar.c game. I have added these modifications...
Code: Select all
#if defined(__GALPLUSHIRES__)
#include <sys/ioctl.h> // required for switching the screen mode
#endif
[...]
void main()
{
#if defined(__GALPLUSHIRES__)
int mode;
mode=1;
console_ioctl(IOCTL_GENCON_SET_MODE, &mode); // switch to hires mode
#endif
Level = (STARTLEV-1);
SetupLevel(); /* Display the first level */
/* Loop keyhandler till you finished the game */
while (CheckNotFinished())
Gamekeys();
#if defined(__GALPLUSHIRES__)
mode=0;
console_ioctl(IOCTL_GENCON_SET_MODE, &mode); // switch to text mode
#endif
}
Code: Select all
zcc +gal -subtype=galaxyp -create-app -pragma-redirect:fputc_cons=fputc_cons_generic -Dspritesize=16 -pragma-redirect:CRT_FONT=_font_8x8_bbc_system dstar.c -o dstar -D__GALPLUSHIRES__
...and basically it's working, the screen looks good, but keyboard input does not work proberly. Same on the standard Galaksja model (-Dspritesize=4). Keys G and H are working, but the directional controls (QAOP) are not.
When I compile with the 2018-07-04 version, keyboard input is fine. I tried the earlier versions when Galaksija Plus support was added (8 January 2020), but the keyboard problem is already present there.
Please check what could be wrong here...