[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Adonthell-commits] CVS: adonthell/src/input/sdl input_sdl.cc, 1.1.1.1,
From: |
Alexandre Courbot <address@hidden> |
Subject: |
[Adonthell-commits] CVS: adonthell/src/input/sdl input_sdl.cc, 1.1.1.1, 1.2 manager_sdl.cc, 1.1.1.1, 1.2 manager_sdl.h, 1.1.1.1, 1.2 |
Date: |
Thu, 24 Jul 2003 08:58:01 -0400 |
Update of /cvsroot/adonthell/adonthell/src/input/sdl
In directory subversions:/tmp/cvs-serv8178/src/input/sdl
Modified Files:
input_sdl.cc manager_sdl.cc manager_sdl.h
Log Message:
Applied Fabien's changes and extended them to all the source
(changing using namespace's into real namespace enclosing and fixed some
consts)
Index: input_sdl.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/input/sdl/input_sdl.cc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** input_sdl.cc 18 Jul 2003 15:16:09 -0000 1.1.1.1
--- input_sdl.cc 24 Jul 2003 12:57:58 -0000 1.2
***************
*** 35,39 ****
int nbr_joy = SDL_NumJoysticks();
for (int i = 0; i < nbr_joy; i++)
! joysticks.push_back(SDL_JoystickOpen(i));
SDL_EnableUNICODE(1);
return true;
--- 35,39 ----
int nbr_joy = SDL_NumJoysticks();
for (int i = 0; i < nbr_joy; i++)
! input::joysticks.push_back(SDL_JoystickOpen(i));
SDL_EnableUNICODE(1);
return true;
***************
*** 42,47 ****
void input_cleanup()
{
! for (std::vector<SDL_Joystick *>::iterator i = joysticks.begin();
! i != joysticks.end(); i++)
SDL_JoystickClose(*i);
SDL_QuitSubSystem (SDL_INIT_JOYSTICK);
--- 42,47 ----
void input_cleanup()
{
! for (std::vector<SDL_Joystick *>::iterator i = input::joysticks.begin();
! i != input::joysticks.end(); i++)
SDL_JoystickClose(*i);
SDL_QuitSubSystem (SDL_INIT_JOYSTICK);
Index: manager_sdl.cc
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/input/sdl/manager_sdl.cc,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** manager_sdl.cc 18 Jul 2003 15:16:09 -0000 1.1.1.1
--- manager_sdl.cc 24 Jul 2003 12:57:58 -0000 1.2
***************
*** 33,499 ****
}
! using namespace input;
!
! /**
! * Translation table for SDL keys symbols.
! *
! */
! keyboard_event::key_type sdl_key_trans[SDLK_LAST] =
! {
[...1062 lines suppressed...]
! input::joystick_event je(event.jbutton.which,
input::joystick_event::BUTTON_PUSHED,
!
input::sdl_joy_button_trans[event.jbutton.button]);
! input::manager::raise_event(je);
break;
}
case SDL_JOYBUTTONUP:
{
! if (event.jbutton.button >=
input::joystick_event::AXIS0_FORE) break;
! input::joystick_event je(event.jbutton.which,
input::joystick_event::BUTTON_RELEASED,
!
input::sdl_joy_button_trans[event.jbutton.button]);
! input::manager::raise_event(je);
break;
}
***************
*** 584,585 ****
--- 587,589 ----
}
}
+
Index: manager_sdl.h
===================================================================
RCS file: /cvsroot/adonthell/adonthell/src/input/sdl/manager_sdl.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -C2 -r1.1.1.1 -r1.2
*** manager_sdl.h 18 Jul 2003 15:16:09 -0000 1.1.1.1
--- manager_sdl.h 24 Jul 2003 12:57:58 -0000 1.2
***************
*** 30,41 ****
#include <vector>
! extern input::keyboard_event::key_type sdl_key_trans[SDLK_LAST];
! extern input::mouse_event::button_type sdl_button_trans[SDL_BUTTON_RIGHT + 3];
! extern input::joystick_event::button_type
sdl_axis_trans[input::joystick_event::NBR_BUTTONS -
!
input::joystick_event::AXIS0_FORE];
! extern input::joystick_event::button_type
sdl_joy_button_trans[input::joystick_event::AXIS0_FORE];
! extern bool joystick_state_table[input::joystick_event::NBR_BUTTONS * 10];
! extern std::vector<SDL_Joystick *> joysticks;
!
#endif
--- 30,43 ----
#include <vector>
! namespace input
! {
! extern keyboard_event::key_type sdl_key_trans[SDLK_LAST];
! extern mouse_event::button_type sdl_button_trans[SDL_BUTTON_RIGHT + 3];
! extern joystick_event::button_type
sdl_axis_trans[joystick_event::NBR_BUTTONS -
!
joystick_event::AXIS0_FORE];
! extern joystick_event::button_type
sdl_joy_button_trans[joystick_event::AXIS0_FORE];
! extern bool joystick_state_table[joystick_event::NBR_BUTTONS * 10];
! extern std::vector<SDL_Joystick *> joysticks;
! }
#endif
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Adonthell-commits] CVS: adonthell/src/input/sdl input_sdl.cc, 1.1.1.1, 1.2 manager_sdl.cc, 1.1.1.1, 1.2 manager_sdl.h, 1.1.1.1, 1.2,
Alexandre Courbot <address@hidden> <=
- Prev by Date:
[Adonthell-commits] CVS: adonthell/src/gfx drawable.cc, 1.1.1.1, 1.2 drawable.h, 1.1.1.1, 1.2 drawing_area.cc, 1.1.1.1, 1.2 drawing_area.h, 1.2, 1.3 gfx.cc, 1.1.1.1, 1.2 gfx.h, 1.1.1.1, 1.2 pnm.cc, 1.1.1.1, 1.2 screen.cc, 1.1.1.1, 1.2 surface.cc, 1.1.1.1, 1.2 surface.h, 1.1.1.1, 1.2
- Next by Date:
[Adonthell-commits] CVS: adonthell/src/python callback.cc, 1.1.1.1, 1.2 callback.h, 1.1.1.1, 1.2 python.cc, 1.1.1.1, 1.2
- Previous by thread:
[Adonthell-commits] CVS: adonthell/src/gfx drawable.cc, 1.1.1.1, 1.2 drawable.h, 1.1.1.1, 1.2 drawing_area.cc, 1.1.1.1, 1.2 drawing_area.h, 1.2, 1.3 gfx.cc, 1.1.1.1, 1.2 gfx.h, 1.1.1.1, 1.2 pnm.cc, 1.1.1.1, 1.2 screen.cc, 1.1.1.1, 1.2 surface.cc, 1.1.1.1, 1.2 surface.h, 1.1.1.1, 1.2
- Next by thread:
[Adonthell-commits] CVS: adonthell/src/python callback.cc, 1.1.1.1, 1.2 callback.h, 1.1.1.1, 1.2 python.cc, 1.1.1.1, 1.2
- Index(es):