Linux - Games This forum is for all discussion relating to gaming in Linux.
Notices
Welcome to
LinuxQuestions.org , a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free.
Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please
contact us . If you need to reset your password,
click here .
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a
virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month.
Click here for more info.
09-11-2004, 06:50 PM
#1
Member
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Rep:
Cant install Tux a quest for herring. *cry* :'[ *sob* Make problems...
I finaly got slackware 10, and its the first distro that I've had that has GLUT installed, Mandrake 10, Fedora, and others didnt have it, and was a BITCH to install. (actualy I was never sucesfull at installing GLUT, whatever) Anyways, after I got plib installed, and checked for the dependacys needed, I was rolin. Till I got to "make" the game source, it put out this error. NOTE: I didn't know what to include so heres the end output.
/root/downloads/tux_aqfh-1.0.14/src/gui.cxx:172: undefined reference to `jsJoystick::jsJoystick[in-charge](int)'
gui.o(.text+0x79d): In function `GUI::GUI[in-charge]()':
/root/downloads/tux_aqfh-1.0.14/src/gui.cxx:172: undefined reference to `jsJoystick::jsJoystick[in-charge](int)'
gui.o(.text+0xcc1): In function `GUI::joystickInput()':
/root/downloads/tux_aqfh-1.0.14/src/gui.cxx:276: undefined reference to `jsJoystick::read(int*, float*)'
collect2: ld returned 1 exit status
make[1]: *** [tux_aqfh] Error 1
make[1]: Leaving directory `/root/downloads/tux_aqfh-1.0.14/src'
make: *** [all-recursive] Error 1
root@george's:~/downloads/tux_aqfh-1.0.14#
Whats exactly is the problem, I think I need a joystick support. If thats it, then after I find a way to install my testing 2.6.7 kernel, from cd2 of Slack10, then I could use my game pad. Tell me the actualy problem tho. If need be, ill give out more info, but I dont know what else to put in. Thanx in advanced!
09-12-2004, 09:15 PM
#2
Member
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Original Poster
Rep:
It seems as tho its a problem with the linux jostick, I got a game pad, with joysticks, but I dont know what to do next. Anyone?
09-16-2004, 11:58 PM
#3
Member
Registered: Apr 2004
Distribution: Slackware, Ubuntu
Posts: 101
Rep:
I had the same problem. I managed to get it to compile by commenting out the mentions of the offending joystick object. Here's the code that you can copy and paste (after you've erased what was there) into tux_aqfh/src/gui.cxx The only problem was that the mouse acted up when I tried it. I still can't run it properly. If anyone knows the dependency or dependencies needed to fix this problem, please let us know.
Code:
#include "tux.h"
#include "GL/glut.h"
#include "plib/pu.h"
static jsJoystick *joystick ;
static int mouse_x ;
static int mouse_y ;
static int mouse_dx = 0 ;
static int mouse_dy = 0 ;
static int mouse_buttons = 0 ;
static int mousetrap = TRUE ;
static int prefer_joystick = TRUE ;
static int CD_hack = FALSE ;
fntTexFont *font ;
static void motionfn ( int x, int y )
{
mouse_x = x ;
mouse_y = y ;
mouse_dx += mouse_x - 320 ;
mouse_dy += mouse_y - 240 ;
puMouse ( x, y ) ;
}
static void mousefn ( int button, int updown, int x, int y )
{
mouse_x = x ;
mouse_y = y ;
if ( updown == GLUT_DOWN )
mouse_buttons |= (1<<button) ;
else
mouse_buttons &= ~(1<<button) ;
mouse_dx += mouse_x - 320 ;
mouse_dy += mouse_y - 240 ;
puMouse ( button, updown, x, y ) ;
if ( updown == GLUT_DOWN )
hide_status () ;
}
static void credits_cb ( puObject * )
{
hide_status () ;
credits () ;
}
static void versions_cb ( puObject * )
{
hide_status () ;
versions () ;
}
static void about_cb ( puObject * )
{
hide_status () ;
about () ;
}
static void help_cb ( puObject * )
{
hide_status () ;
help () ;
}
#ifdef SOME_BETTER_WAY_TO_DO_THIS
#include <GL/xmesa.h>
#ifdef XMESA_FX_FULLSCREEN
static int fullscreen = FALSE ;
static void setFullscreen () { XMesaSetFXmode ( fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW ) ; }
static void window_off_cb ( puObject * ) { mousetrap = TRUE ; fullscreen = TRUE ; setFullscreen () ; }
static void window_on_cb ( puObject * ) { mousetrap = FALSE ; fullscreen = FALSE ; setFullscreen () ; }
#else
static void setFullscreen () {}
static void window_off_cb ( puObject * ) { mousetrap = TRUE ; setFullscreen () ; }
static void window_on_cb ( puObject * ) { mousetrap = FALSE ; setFullscreen () ; }
#endif
#else
static void setFullscreen () {}
static void window_off_cb ( puObject * ) { mousetrap = TRUE ; setFullscreen () ; }
static void window_on_cb ( puObject * ) { mousetrap = FALSE ; setFullscreen () ; }
#endif
static void mousetrap_off_cb ( puObject * ) { mousetrap = FALSE ; }
static void mousetrap_on_cb ( puObject * ) { mousetrap = TRUE ; }
static void music_off_cb ( puObject * ) { sound->disable_music () ; }
static void music_on_cb ( puObject * ) { sound->enable_music () ; }
static void sfx_off_cb ( puObject * ) { sound->disable_sfx () ; }
static void sfx_on_cb ( puObject * ) { sound->enable_sfx () ; }
static void joystick_off_cb ( puObject * ) { prefer_joystick = FALSE ; mousetrap = TRUE ; }
static void joystick_on_cb ( puObject * ) { prefer_joystick = TRUE ; }
static void set_rcmode ( puObject * ) { tuxState->setRCMode ( TRUE ) ; }
static void unset_rcmode ( puObject * ) { tuxState->setRCMode ( FALSE ) ; }
static void exit_cb ( puObject * )
{
if ( play_as_gown )
fprintf ( stderr, "Exiting Gown's Quest for Herring.\n" ) ;
else
fprintf ( stderr, "Exiting Tux's Quest for Herring.\n" ) ;
exit ( 1 ) ;
}
/* Menu bar entries: */
static char *exit_submenu [] = { "Exit", NULL } ;
static puCallback exit_submenu_cb [] = { exit_cb, NULL } ;
static char *sound_submenu [] = { "Turn off Music", "Turn off Sounds", "Turn on Music", "Turn on Sounds", NULL } ;
static puCallback sound_submenu_cb [] = { music_off_cb, sfx_off_cb, music_on_cb, sfx_on_cb, NULL } ;
static char *view_submenu [] = { "Mousetrap Mode", "No Mousetrap", "Windowed" , "Fullscreen" , NULL } ;
static puCallback view_submenu_cb [] = { mousetrap_on_cb , mousetrap_off_cb, window_on_cb, window_off_cb, NULL } ;
static char *ctrl_submenu [] = { "Play using Joystick", "Play using Mouse", "RC Mode" , "Screen Mode", NULL } ;
static puCallback ctrl_submenu_cb [] = { joystick_on_cb , joystick_off_cb , set_rcmode, unset_rcmode , NULL } ;
static char *help_submenu [] = { "Versions...", "Credits...", "About...", "Help", NULL } ;
static puCallback help_submenu_cb [] = { versions_cb, credits_cb, about_cb, help_cb, NULL } ;
GUI::GUI ()
{
#ifdef SOME_BETTER_WAY_TO_DO_THIS
#ifdef XMESA_FX_FULLSCREEN
fullscreen = TRUE ;
#endif
#endif
hidden = TRUE ;
mouse_x = 320 ;
mouse_y = 240 ;
glutMouseFunc ( mousefn ) ;
glutMotionFunc ( motionfn ) ;
glutPassiveMotionFunc ( motionfn ) ;
puInit () ;
font = new fntTexFont ;
font -> load ( "fonts/sorority.txf" ) ;
puFont ff ( font, 15 ) ;
puSetDefaultFonts ( ff, ff ) ;
puSetDefaultStyle ( PUSTYLE_SMALL_SHADED ) ;
puSetDefaultColourScheme ( 0.8, 0.8, 0.8, 0.6 ) ;
/* Make the menu bar */
main_menu_bar = new puMenuBar () ;
{
main_menu_bar -> add_submenu ( "Exit", exit_submenu, exit_submenu_cb ) ;
main_menu_bar -> add_submenu ( "Sound", sound_submenu, sound_submenu_cb ) ;
main_menu_bar -> add_submenu ( "View", view_submenu, view_submenu_cb ) ;
main_menu_bar -> add_submenu ( "Controls", ctrl_submenu, ctrl_submenu_cb ) ;
main_menu_bar -> add_submenu ( "Help", help_submenu, help_submenu_cb ) ;
}
main_menu_bar -> close () ;
main_menu_bar -> hide () ;
/* joystick = new jsJoystick ( 0 ) ;
joystick -> setDeadBand ( 0, 0.1 ) ;
joystick -> setDeadBand ( 1, 0.1 ) ;*/
}
void GUI::show ()
{
hide_status () ;
hidden = FALSE ;
if ( mousetrap )
glutWarpPointer ( 320, 240 ) ;
#ifdef SOME_BETTER_WAY_TO_DO_THIS
#ifdef XMESA_FX_FULLSCREEN
puShowCursor () ;
#endif
#endif
main_menu_bar -> reveal () ;
}
void GUI::hide ()
{
hidden = TRUE ;
hide_status () ;
puHideCursor () ;
main_menu_bar -> hide () ;
}
void GUI::update ()
{
keyboardInput () ;
// joystickInput () ;
drawStatusText () ;
glBlendFunc ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ;
glAlphaFunc ( GL_GREATER, 0.1f ) ;
glEnable ( GL_BLEND ) ;
puDisplay () ;
/*
Don't let the cursor escape from the screen!
*/
if ( isHidden () )
glutWarpPointer ( 320, 240 ) ;
else
{
int warp = FALSE ;
if ( mouse_x < 1 ) { mouse_x = 2 ; warp = TRUE ; }
else if ( mouse_x > 639 ) { mouse_x = 638 ; warp = TRUE ; }
if ( mouse_y < 1 ) { mouse_y = 2 ; warp = TRUE ; }
else if ( mouse_y > 479 ) { mouse_y = 478 ; warp = TRUE ; }
if ( warp && mousetrap )
glutWarpPointer ( mouse_x, mouse_y ) ;
mouse_dx = mouse_dy = 0 ;
mouse_buttons = 0 ;
}
}
void GUI::joystickInput ()
{
static JoyInfo ji ;
if ( isHidden() && ( joystick->notWorking() || ! prefer_joystick ) )
{
float mscale = 100.0f ;
/*
If he just pressed or just released the right
mouse button then he toggled between moving tux
and moving the camera - so we need to zero the
accumulated mouse motion.
*/
if ( ( ji.buttons & 0x04 ) != ( mouse_buttons & 0x04 ) )
{
mouse_dx = 0 ;
mouse_dy = 0 ;
}
ji.buttons = mouse_buttons ;
ji.data[0] = (float)mouse_dx / mscale ;
ji.data[1] = (float)mouse_dy / mscale ;
if ( ji.data[0] < -1.0 ) { ji.data[0] = -1.0 ; mouse_dx = (int) -mscale ; }
if ( ji.data[0] > 1.0 ) { ji.data[0] = 1.0 ; mouse_dx = (int) mscale ; }
if ( ji.data[1] < -1.0 ) { ji.data[1] = -1.0 ; mouse_dy = (int) -mscale ; }
if ( ji.data[1] > 1.0 ) { ji.data[1] = 1.0 ; mouse_dy = (int) mscale ; }
if ( ji.data[0] < 0.1 && ji.data[0] > -0.1 ) ji.data[0] = 0.0 ;
if ( ji.data[1] < 0.1 && ji.data[1] > -0.1 ) ji.data[1] = 0.0 ;
}
else
{
mouse_dx = mouse_dy = 0 ;
mouse_buttons = 0 ;
joystick -> read ( & ji.buttons, ji.data ) ;
}
if ( CD_hack )
{
ji.buttons |= 4 + 8 ; /* Set the C+D buttons - kludhe a 'ROLL'. */
CD_hack = FALSE ;
}
ji.hits = (ji.buttons ^ ji.old_buttons) & ji.buttons ;
ji.releases = (ji.buttons ^ ji.old_buttons) & ~ji.buttons ;
ji.old_buttons = ji.buttons ;
if ( camera -> joystickInput ( &ji ) )
{
ji.data[0] = 0.0f ;
ji.data[1] = 0.0f ;
}
if ( ji.hits != 0 )
hide_status () ;
tuxState -> joystickInput ( &ji ) ;
}
void GUI::keyboardInput ()
{
int c = getGLUTKeystroke () ;
if ( currState -> cheat_mode && c == 'k' )
currState->kludge_mode = !currState->kludge_mode ;
if ( currState->kludge_mode )
{
currState->kludge_char = c ;
c = 0 ;
}
else
currState->kludge_char = 0 ;
if ( c == 'r' )
CD_hack = TRUE ;
currState -> keyboardInput ( c ) ;
camera -> keyboardInput ( c ) ;
}
lasindi
09-17-2004, 03:42 PM
#4
Member
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Original Poster
Rep:
Thanx for the response but this is what I get when I try to "make" it.
george@george's:~/downloads/tux_aqfh-1.0.14$ make
Making all in src
make[1]: Entering directory `/home/george/downloads/tux_aqfh-1.0.14/src'
c++ -g -O2 -O6 -Wall -o tux_aqfh camera.o components.o fade_out.o feature.o gfx.o globalstate.o gui.o hooks.o score.o isect.o level.o material.o ocean.o orca.o penguin.o rocket.o sound.o starwing.o status.o surf_rev.o tux.o tuxstate.o whale.o slamRun.o slamCodeGen.o slamExpression.o slam.o slamStatement.o slamSymbols.o slamToken.o -lplibsl -lplibssg -lplibpu -lplibfnt -lplibsg -lplibul -lglut -lGLU -lGL -L/usr/X11R6/lib -lSM -lICE -lpthread -lX11 -lXi -lXext -lXmu -lm
gui.o(.text+0xc31): In function `GUI::joystickInput()':
/home/george/downloads/tux_aqfh-1.0.14/src/gui.cxx:275: undefined reference to `jsJoystick::read(int*, float*)'
collect2: ld returned 1 exit status
make[1]: *** [tux_aqfh] Error 1
make[1]: Leaving directory `/home/george/downloads/tux_aqfh-1.0.14/src'
make: *** [all-recursive] Error 1
george@george's:~/downloads/tux_aqfh-1.0.14$
I cut out the old gui.cxx, and put the one u gave me in ther. Its seemed to fix a few errors, but the joystick problem is still ther.
09-19-2004, 02:11 AM
#5
Member
Registered: Apr 2004
Distribution: Slackware, Ubuntu
Posts: 101
Rep:
Sorry. Try replacing it again with this code:
Code:
#include "tux.h"
#include "GL/glut.h"
#include "plib/pu.h"
static jsJoystick *joystick ;
static int mouse_x ;
static int mouse_y ;
static int mouse_dx = 0 ;
static int mouse_dy = 0 ;
static int mouse_buttons = 0 ;
static int mousetrap = TRUE ;
static int prefer_joystick = TRUE ;
static int CD_hack = FALSE ;
fntTexFont *font ;
static void motionfn ( int x, int y )
{
mouse_x = x ;
mouse_y = y ;
mouse_dx += mouse_x - 320 ;
mouse_dy += mouse_y - 240 ;
puMouse ( x, y ) ;
}
static void mousefn ( int button, int updown, int x, int y )
{
mouse_x = x ;
mouse_y = y ;
if ( updown == GLUT_DOWN )
mouse_buttons |= (1<<button) ;
else
mouse_buttons &= ~(1<<button) ;
mouse_dx += mouse_x - 320 ;
mouse_dy += mouse_y - 240 ;
puMouse ( button, updown, x, y ) ;
if ( updown == GLUT_DOWN )
hide_status () ;
}
static void credits_cb ( puObject * )
{
hide_status () ;
credits () ;
}
static void versions_cb ( puObject * )
{
hide_status () ;
versions () ;
}
static void about_cb ( puObject * )
{
hide_status () ;
about () ;
}
static void help_cb ( puObject * )
{
hide_status () ;
help () ;
}
#ifdef SOME_BETTER_WAY_TO_DO_THIS
#include <GL/xmesa.h>
#ifdef XMESA_FX_FULLSCREEN
static int fullscreen = FALSE ;
static void setFullscreen () { XMesaSetFXmode ( fullscreen ? XMESA_FX_FULLSCREEN : XMESA_FX_WINDOW ) ; }
static void window_off_cb ( puObject * ) { mousetrap = TRUE ; fullscreen = TRUE ; setFullscreen () ; }
static void window_on_cb ( puObject * ) { mousetrap = FALSE ; fullscreen = FALSE ; setFullscreen () ; }
#else
static void setFullscreen () {}
static void window_off_cb ( puObject * ) { mousetrap = TRUE ; setFullscreen () ; }
static void window_on_cb ( puObject * ) { mousetrap = FALSE ; setFullscreen () ; }
#endif
#else
static void setFullscreen () {}
static void window_off_cb ( puObject * ) { mousetrap = TRUE ; setFullscreen () ; }
static void window_on_cb ( puObject * ) { mousetrap = FALSE ; setFullscreen () ; }
#endif
static void mousetrap_off_cb ( puObject * ) { mousetrap = FALSE ; }
static void mousetrap_on_cb ( puObject * ) { mousetrap = TRUE ; }
static void music_off_cb ( puObject * ) { sound->disable_music () ; }
static void music_on_cb ( puObject * ) { sound->enable_music () ; }
static void sfx_off_cb ( puObject * ) { sound->disable_sfx () ; }
static void sfx_on_cb ( puObject * ) { sound->enable_sfx () ; }
static void joystick_off_cb ( puObject * ) { prefer_joystick = FALSE ; mousetrap = TRUE ; }
static void joystick_on_cb ( puObject * ) { prefer_joystick = TRUE ; }
static void set_rcmode ( puObject * ) { tuxState->setRCMode ( TRUE ) ; }
static void unset_rcmode ( puObject * ) { tuxState->setRCMode ( FALSE ) ; }
static void exit_cb ( puObject * )
{
if ( play_as_gown )
fprintf ( stderr, "Exiting Gown's Quest for Herring.\n" ) ;
else
fprintf ( stderr, "Exiting Tux's Quest for Herring.\n" ) ;
exit ( 1 ) ;
}
/* Menu bar entries: */
static char *exit_submenu [] = { "Exit", NULL } ;
static puCallback exit_submenu_cb [] = { exit_cb, NULL } ;
static char *sound_submenu [] = { "Turn off Music", "Turn off Sounds", "Turn on Music", "Turn on Sounds", NULL } ;
static puCallback sound_submenu_cb [] = { music_off_cb, sfx_off_cb, music_on_cb, sfx_on_cb, NULL } ;
static char *view_submenu [] = { "Mousetrap Mode", "No Mousetrap", "Windowed" , "Fullscreen" , NULL } ;
static puCallback view_submenu_cb [] = { mousetrap_on_cb , mousetrap_off_cb, window_on_cb, window_off_cb, NULL } ;
static char *ctrl_submenu [] = { "Play using Joystick", "Play using Mouse", "RC Mode" , "Screen Mode", NULL } ;
static puCallback ctrl_submenu_cb [] = { joystick_on_cb , joystick_off_cb , set_rcmode, unset_rcmode , NULL } ;
static char *help_submenu [] = { "Versions...", "Credits...", "About...", "Help", NULL } ;
static puCallback help_submenu_cb [] = { versions_cb, credits_cb, about_cb, help_cb, NULL } ;
GUI::GUI ()
{
#ifdef SOME_BETTER_WAY_TO_DO_THIS
#ifdef XMESA_FX_FULLSCREEN
fullscreen = TRUE ;
#endif
#endif
hidden = TRUE ;
mouse_x = 320 ;
mouse_y = 240 ;
glutMouseFunc ( mousefn ) ;
glutMotionFunc ( motionfn ) ;
glutPassiveMotionFunc ( motionfn ) ;
puInit () ;
font = new fntTexFont ;
font -> load ( "fonts/sorority.txf" ) ;
puFont ff ( font, 15 ) ;
puSetDefaultFonts ( ff, ff ) ;
puSetDefaultStyle ( PUSTYLE_SMALL_SHADED ) ;
puSetDefaultColourScheme ( 0.8, 0.8, 0.8, 0.6 ) ;
/* Make the menu bar */
main_menu_bar = new puMenuBar () ;
{
main_menu_bar -> add_submenu ( "Exit", exit_submenu, exit_submenu_cb ) ;
main_menu_bar -> add_submenu ( "Sound", sound_submenu, sound_submenu_cb ) ;
main_menu_bar -> add_submenu ( "View", view_submenu, view_submenu_cb ) ;
main_menu_bar -> add_submenu ( "Controls", ctrl_submenu, ctrl_submenu_cb ) ;
main_menu_bar -> add_submenu ( "Help", help_submenu, help_submenu_cb ) ;
}
main_menu_bar -> close () ;
main_menu_bar -> hide () ;
/* joystick = new jsJoystick ( 0 ) ;
joystick -> setDeadBand ( 0, 0.1 ) ;
joystick -> setDeadBand ( 1, 0.1 ) ;*/
}
void GUI::show ()
{
hide_status () ;
hidden = FALSE ;
if ( mousetrap )
glutWarpPointer ( 320, 240 ) ;
#ifdef SOME_BETTER_WAY_TO_DO_THIS
#ifdef XMESA_FX_FULLSCREEN
puShowCursor () ;
#endif
#endif
main_menu_bar -> reveal () ;
}
void GUI::hide ()
{
hidden = TRUE ;
hide_status () ;
puHideCursor () ;
main_menu_bar -> hide () ;
}
void GUI::update ()
{
keyboardInput () ;
// joystickInput () ;
drawStatusText () ;
glBlendFunc ( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA ) ;
glAlphaFunc ( GL_GREATER, 0.1f ) ;
glEnable ( GL_BLEND ) ;
puDisplay () ;
/*
Don't let the cursor escape from the screen!
*/
if ( isHidden () )
glutWarpPointer ( 320, 240 ) ;
else
{
int warp = FALSE ;
if ( mouse_x < 1 ) { mouse_x = 2 ; warp = TRUE ; }
else if ( mouse_x > 639 ) { mouse_x = 638 ; warp = TRUE ; }
if ( mouse_y < 1 ) { mouse_y = 2 ; warp = TRUE ; }
else if ( mouse_y > 479 ) { mouse_y = 478 ; warp = TRUE ; }
if ( warp && mousetrap )
glutWarpPointer ( mouse_x, mouse_y ) ;
mouse_dx = mouse_dy = 0 ;
mouse_buttons = 0 ;
}
}
void GUI::joystickInput ()
{
static JoyInfo ji ;
if ( isHidden() && ( joystick->notWorking() || ! prefer_joystick ) )
{
float mscale = 100.0f ;
/*
If he just pressed or just released the right
mouse button then he toggled between moving tux
and moving the camera - so we need to zero the
accumulated mouse motion.
*/
if ( ( ji.buttons & 0x04 ) != ( mouse_buttons & 0x04 ) )
{
mouse_dx = 0 ;
mouse_dy = 0 ;
}
ji.buttons = mouse_buttons ;
ji.data[0] = (float)mouse_dx / mscale ;
ji.data[1] = (float)mouse_dy / mscale ;
if ( ji.data[0] < -1.0 ) { ji.data[0] = -1.0 ; mouse_dx = (int) -mscale ; }
if ( ji.data[0] > 1.0 ) { ji.data[0] = 1.0 ; mouse_dx = (int) mscale ; }
if ( ji.data[1] < -1.0 ) { ji.data[1] = -1.0 ; mouse_dy = (int) -mscale ; }
if ( ji.data[1] > 1.0 ) { ji.data[1] = 1.0 ; mouse_dy = (int) mscale ; }
if ( ji.data[0] < 0.1 && ji.data[0] > -0.1 ) ji.data[0] = 0.0 ;
if ( ji.data[1] < 0.1 && ji.data[1] > -0.1 ) ji.data[1] = 0.0 ;
}
else
{
mouse_dx = mouse_dy = 0 ;
mouse_buttons = 0 ;
// joystick -> read ( & ji.buttons, ji.data ) ;
}
if ( CD_hack )
{
ji.buttons |= 4 + 8 ; /* Set the C+D buttons - kludhe a 'ROLL'. */
CD_hack = FALSE ;
}
ji.hits = (ji.buttons ^ ji.old_buttons) & ji.buttons ;
ji.releases = (ji.buttons ^ ji.old_buttons) & ~ji.buttons ;
ji.old_buttons = ji.buttons ;
if ( camera -> joystickInput ( &ji ) )
{
ji.data[0] = 0.0f ;
ji.data[1] = 0.0f ;
}
if ( ji.hits != 0 )
hide_status () ;
tuxState -> joystickInput ( &ji ) ;
}
void GUI::keyboardInput ()
{
int c = getGLUTKeystroke () ;
if ( currState -> cheat_mode && c == 'k' )
currState->kludge_mode = !currState->kludge_mode ;
if ( currState->kludge_mode )
{
currState->kludge_char = c ;
c = 0 ;
}
else
currState->kludge_char = 0 ;
if ( c == 'r' )
CD_hack = TRUE ;
currState -> keyboardInput ( c ) ;
camera -> keyboardInput ( c ) ;
}
Benny
09-19-2004, 01:34 PM
#6
Member
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Original Poster
Rep:
Thanx it worked, but when start it up. Tux is stuck in this corner of a box, and spins in circles forever. I dont know the controls, BUT HEY u got it to work for my benny! What are the controls anyways?
09-19-2004, 01:58 PM
#7
Member
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Original Poster
Rep:
I can change levels using the cheat mode, but stupid tux is getting "HURT" as in dizzy all the time, I have no control over him either with mouse or gamepad. I guess this game wasnt as complete as I thought it was.
09-23-2004, 11:10 PM
#8
Member
Registered: Apr 2004
Distribution: Slackware, Ubuntu
Posts: 101
Rep:
I've never gotten the controls to work either, but I'm sure they do somehow. The game's probably not "complete," but it's not so incomplete that you can't play it.
lasindi
09-24-2004, 11:10 PM
#9
Member
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Original Poster
Rep:
I cant play it.
10-30-2004, 12:23 AM
#10
LQ Newbie
Registered: Oct 2004
Distribution: Slackware!
Posts: 10
Rep:
This worked on Slack 9.1:
Unpack the tarball into a clean source directory
Open "configure" in vi or the editor of your choice. If you're using Slackware vi WILL be the editor of your choice ;-)
Change line 1362 to:
plib_suffix="-lplibsl -lplibssg -lplibpu -lplibfnt -lplibsg -lplibul -lplibjs"
Then run "configure" and install.
I can play (sort of) but the game still segfaults when I hit the space bar :-( Still it's worth it to see the little guy run around the screen.
10-31-2004, 09:17 AM
#11
Member
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Original Poster
Rep:
Sweet, I'll once I get a hold of my computer.
11-01-2004, 12:35 AM
#12
Member
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Original Poster
Rep:
How the hell do you find line 1362?
11-01-2004, 12:46 AM
#13
Member
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Original Poster
Rep:
Nvmd, I got it. O and how do I get my Slackware 10 to fully recognize my Logitech Dual Action controller? It worked on Mandrake 10 with the 2.6.3 kernel. Should work the 2.6.7?
All times are GMT -5. The time now is 05:33 PM .
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know .
Latest Threads
LQ News