LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games
User Name
Password
Linux - Games This forum is for all discussion relating to gaming in Linux.

Notices


Reply
  Search this Thread
Old 09-11-2004, 06:50 PM   #1
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889
Blog Entries: 1

Rep: Reputation: 30
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!
 
Old 09-12-2004, 09:15 PM   #2
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
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?
 
Old 09-16-2004, 11:58 PM   #3
lasindi
Member
 
Registered: Apr 2004
Distribution: Slackware, Ubuntu
Posts: 101

Rep: Reputation: 15
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
 
Old 09-17-2004, 03:42 PM   #4
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
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.
 
Old 09-19-2004, 02:11 AM   #5
lasindi
Member
 
Registered: Apr 2004
Distribution: Slackware, Ubuntu
Posts: 101

Rep: Reputation: 15
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
 
Old 09-19-2004, 01:34 PM   #6
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
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?
 
Old 09-19-2004, 01:58 PM   #7
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
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.
 
Old 09-23-2004, 11:10 PM   #8
lasindi
Member
 
Registered: Apr 2004
Distribution: Slackware, Ubuntu
Posts: 101

Rep: Reputation: 15
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
 
Old 09-24-2004, 11:10 PM   #9
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
I cant play it.
 
Old 10-30-2004, 12:23 AM   #10
sithscripter
LQ Newbie
 
Registered: Oct 2004
Distribution: Slackware!
Posts: 10

Rep: Reputation: 0
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.
 
Old 10-31-2004, 09:17 AM   #11
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
Sweet, I'll once I get a hold of my computer.
 
Old 11-01-2004, 12:35 AM   #12
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
How the hell do you find line 1362?
 
Old 11-01-2004, 12:46 AM   #13
RHLinuxGUY
Member
 
Registered: Oct 2003
Distribution: Ubuntu 7.04
Posts: 889

Original Poster
Blog Entries: 1

Rep: Reputation: 30
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?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Quest to install GXine (and learn something too) MColm Linux - Software 4 11-28-2005 10:50 PM
problem install tux a quest for a herring on fc3 fedora core 3 lusse92 Linux - Games 5 09-26-2005 09:41 AM
I'm embarking on a quest to make a sane backend for my usb scanner.... t3gah Programming 2 03-21-2005 09:39 PM
Having problems where Far Cry starts only once? Solution! LavaDevil94 Linux - Games 0 07-21-2004 08:23 PM
quest for Qt 3.2 (aka, problems installing skype) mindstormsguy Linux - Software 3 06-26-2004 07:25 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Games

All times are GMT -5. The time now is 05:33 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration