Yes, the keys were not working in game. But I didn't really investigate, I was just thinking it was my quick compile that was faulty somehow. I notice a warning in input.cpp about a function that didn't return a value as expected.. Maybe it's related?@ptitSeb did you have any issue with the keys ? They seems not to be recognised when in game (i can assign it on the options menu), only the mouse and escape key works (the same on my Linux box).
void IN_ReadKeyboard()
{
int i;
#ifdef H_MAC //todo...farox
gKeyHasBeenPressed = false;
for(i=0 ; i<93+8 ; i++)
{
//#ifdef H_MAC
if(KInput::isPressed( (EKeyboardLayout)i))
//#endif
{
gKeyHasBeenPressed = true;
KeysInput[i].key = true;
}
else
{
KeysInput[i].key = false;
}
}
#endif
}
Thank you guy for your incredible work on my almost 20 year old game, this is very very cool and i love merge pull requests on the github project!Don't bother with IN_ReadKeyboard, that function is only used in the Mac version. I think the problem is di_IsKeyActivated, as is rejects key ids above 256, but SDL's keysyms go above 300. Now, how to fix it without breaking Windows and Mac...
When it comes to the Pandora, I think CPU speed is going to be a blocker. The game engine is rather inefficient, but modern PCs can just power through it. GPU speed shouldn't be a problem. The Pyra should be fine. Maybe not a solid 60 fps, but I guess it will be playable.
@gbudny It says SDL can't set the video mode. Maybe your monitor doesn't support those resolutions. The game doesn't check whether the chosen resolution is actually available. That whole part needs to be modernized.
Thanks to you for releasing the source and wellcome here.Thank you guy for your incredible work on my almost 20 year old game
Thanks also to you...i was suspecting that function is only for Mac...but i wan't sure about it.Don't bother with IN_ReadKeyboard, that function is only used in the Mac version.
gcc -Wno-write-strings -Wno-endif-labels -I/usr/include/SDL/ -I/usr/include -I/opt/libjpeg-turbo/include/ -c alloween.cpp loadjpeg_linux.cpp bspfile.cpp camera.cpp halloween_linux.cpp player.cpp physic.cpp collision.cpp maths.cpp ellipsoide.cpp console.cpp bsptree.cpp opengl.cpp demo.cpp display.cpp enveffect.cpp filesys.cpp frustrum.cpp game.cpp gameover.cpp image.cpp input.cpp interface.cpp jpeg.cpp dsound.cpp libbass.cpp liste.cpp menu.cpp menu_init.cpp menu_sel.cpp monster.cpp mskmodel.cpp objet_proc.cpp script.cpp shader.cpp sorting.cpp story.cpp textdraw.cpp tga.cpp timer.cpp objet.cpp net_temp_linux.cpp
g++ -L/usr/X11R6/lib/ -L/opt/libjpeg-turbo/lib64/ -o ../Hallow999 alloween.o loadjpeg_linux.o bspfile.o camera.o halloween_linux.o player.o physic.o collision.o maths.o ellipsoide.o console.o bsptree.o opengl.o demo.o display.o enveffect.o filesys.o frustrum.o game.o gameover.o image.o input.o interface.o jpeg.o dsound.o libbass.o liste.o menu.o menu_init.o menu_sel.o monster.o mskmodel.o objet_proc.o script.o shader.o sorting.o story.o textdraw.o tga.o timer.o objet.o net_temp_linux.o -L/usr/X11R6/lib -lGL -lGLU -ljpeg -lm `sdl-config --cflags --libs` ./libbass.so
./projet_linux/build: line 1: clean_tmp: command not found
/usr/bin/ld: ./libbass.so: .dynsym local symbol at index 2 (>= sh_info of 2)
/usr/bin/ld: ./libbass.so: .dynsym local symbol at index 3 (>= sh_info of 2)
/usr/bin/ld: ./libbass.so: .dynsym local symbol at index 4 (>= sh_info of 2)
/usr/bin/ld: loadjpeg_linux.o: in function `jpg_read(char*, int*, int*)':
loadjpeg_linux.cpp:(.text+0x17c): undefined reference to `tjInitDecompress'
/usr/bin/ld: loadjpeg_linux.cpp:(.text+0x1b8): undefined reference to `tjDecompressHeader3'
/usr/bin/ld: loadjpeg_linux.cpp:(.text+0x1d1): undefined reference to `tjGetErrorStr2'
/usr/bin/ld: loadjpeg_linux.cpp:(.text+0x1f8): undefined reference to `tjDestroy'
/usr/bin/ld: loadjpeg_linux.cpp:(.text+0x270): undefined reference to `tjDecompress2'
/usr/bin/ld: loadjpeg_linux.cpp:(.text+0x289): undefined reference to `tjGetErrorStr2'
/usr/bin/ld: loadjpeg_linux.cpp:(.text+0x2bc): undefined reference to `tjDestroy'
/usr/bin/ld: loadjpeg_linux.cpp:(.text+0x2e5): undefined reference to `tjDestroy'
collect2: error: ld returned 1 exit status
@Pocak It says SDL can't set the video mode. Maybe your monitor doesn't support those resolutions. The game doesn't check whether the chosen resolution is actually available. That whole part needs to be modernized.
When i installed libjpeg-turbo i got the same error, using that lib installed from debian repository (because it install an old version).I get a few errors with libjpeg-turbo
#elif defined(H_LINUX)
char * KeyName = KeysInput[index].keyname;
if(strlen(KeyName) == 1)
{
Key = (int)KeyName[0];
}
else if(strlen(KeyName) == 3 && KeyName[0] == '[' && KeyName[2] == ']')
{
Key = (int)KeyName[1];
}
else
{
m_ConsPrint("unknow keyname: %s index: %d\n", KeyName, index);
}
That is to an extent to be expected, especially if you're building vanilla code which hasn't been profiled and slow bits either nuked or worked around.Also on Pandora is really slow around 6-8 fps.
I'd like to make a dbp package...but i need to know how to make it...but first i don't know how to fix the freeze of the game...so if someone more expert would made a look and release it for pyra...i'm ok.Is a DBP package already in the works ?
If the freeze is only on ARM platform and not on x86, make sure you build with "-fsigned-char" in the CFLAGS on ARM...I'd like to make a dbp package...but i need to know how to make it...but first i don't know how to fix the freeze of the game...so if someone more expert would made a look and release it for pyra...i'm ok.
When i installed libjpeg-turbo i got the same error, using that lib installed from debian repository (because it install an old version).
I donwloaded the most recent version, compiled and it build just fine the game.
Anyway you resolved using cmake...so it's ok (i added just in case will be usefull for someone).
On the Pandora and Pyra build, the game freeze when found a letter and a screen appear where i must press play with mouse..on my Linux PC it's ok...
Also on Pandora is really slow around 6-8 fps.
Just pushed on main branch a new version with much improved faster player moves (roration acceleration)Thanks.
It's nice to know that it will be fixed when a new version of libjpeg-turbo becomes available for Ubuntu and Debian.
Halloween sometimes works slowly on Linux x86-64 in some areas. For instance, I played on this map only for two minutes, and it had started generating a lot of information about a rec_depth overflow, recusive error, and stuck (!).