diff -r -u ./Makefile ../quake2b-r0.16.1/Makefile --- ./Makefile 2005-01-02 00:47:10.000000000 -0300 +++ ../quake2b-r0.16.1/Makefile 2008-06-16 03:37:45.000000000 -0300 @@ -14,14 +14,14 @@ # game$(ARCH).so is automatically built. BUILD_SDLQUAKE2=YES # sdlquake2 executable (uses SDL for cdrom and sound) BUILD_SVGA=NO # SVGAlib driver. Seems to work fine. -BUILD_X11=YES # X11 software driver. Works somewhat ok. -BUILD_GLX=YES # X11 GLX driver. Works somewhat ok. +BUILD_X11=NO # X11 software driver. Works somewhat ok. +BUILD_GLX=NO # X11 GLX driver. Works somewhat ok. BUILD_FXGL=NO # FXMesa driver. Not tested. (used only for V1 and V2). BUILD_SDL=YES # SDL software driver. Works fine for some people. -BUILD_SDLGL=YES # SDL OpenGL driver. Works fine for some people. +BUILD_SDLGL=NO # SDL OpenGL driver. Works fine for some people. BUILD_CTFDLL=YES # game$(ARCH).so for ctf -BUILD_XATRIX=NO # game$(ARCH).so for xatrix (see README.r for details) -BUILD_ROGUE=NO # game$(ARCH).so for rogue (see README.r for details) +BUILD_XATRIX=YES # game$(ARCH).so for xatrix (see README.r for details) +BUILD_ROGUE=YES # game$(ARCH).so for rogue (see README.r for details) BUILD_JOYSTICK=YES # build in joystick support BUILD_ARTS=NO # build in support for libaRts sound. BUILD_ALSA=NO # build in support for ALSA (default sound on 2.6) @@ -59,6 +59,7 @@ ifneq ($(ARCH),x86_64) ifneq ($(ARCH),i386) ifneq ($(ARCH),axp) +ifneq ($(ARCH),arm) ifneq ($(ARCH),ppc) ifneq ($(ARCH),sparc) $(error arch $(ARCH) is currently not supported) @@ -67,6 +68,7 @@ endif endif endif +endif CC=gcc @@ -75,6 +77,11 @@ -fomit-frame-pointer -fexpensive-optimizations endif +ifeq ($(ARCH),arm) +RELEASE_CFLAGS=$(BASE_CFLAGS) -ffast-math -funroll-loops \ + -fomit-frame-pointer -O2 -fexpensive-optimizations -mcpu=arm1136j-s -mfpu=vfp -mfloat-abi=softfp -lXsp +endif + ifeq ($(ARCH),ppc) RELEASE_CFLAGS=$(BASE_CFLAGS) -O2 -ffast-math -funroll-loops \ -fomit-frame-pointer -fexpensive-optimizations @@ -179,7 +186,7 @@ SDLLDFLAGS += -lpthread -lX11 -lXext -lXxf86dga -lXxf86vm -lXv \ -lXinerama else - SDLLDFLAGS=$(shell sdl-config --libs) + SDLLDFLAGS=$(shell sdl-config --libs) endif ifeq ($(strip $(BUILD_JOYSTICK)),YES) @@ -270,6 +277,36 @@ endif endif # ARCH axp +ifeq ($(ARCH),arm) + ifeq ($(strip $(BUILD_SDLQUAKE2)),YES) + TARGETS += $(BUILDDIR)/sdlquake2 + endif + + ifeq ($(strip $(BUILD_SVGA)),YES) + $(warning Warning: SVGAlib support not supported for $(ARCH)) + endif + + ifeq ($(strip $(BUILD_X11)),YES) + TARGETS += $(BUILDDIR)/ref_softx.$(SHLIBEXT) + endif + + ifeq ($(strip $(BUILD_GLX)),YES) + TARGETS += $(BUILDDIR)/ref_glx.$(SHLIBEXT) + endif + + ifeq ($(strip $(BUILD_FXGL)),YES) + $(warning Warning: FXGL support not supported for $(ARCH)) + endif + + ifeq ($(strip $(BUILD_SDL)),YES) + TARGETS += $(BUILDDIR)/ref_softsdl.$(SHLIBEXT) + endif + + ifeq ($(strip $(BUILD_SDLGL)),YES) + TARGETS += $(BUILDDIR)/ref_sdlgl.$(SHLIBEXT) + endif +endif # ARCH arm + ifeq ($(ARCH),ppc) ifeq ($(strip $(BUILD_SDLQUAKE2)),YES) TARGETS += $(BUILDDIR)/sdlquake2 Only in ../quake2b-r0.16.1: debugarm Only in .: maemo_quake2_mods.diff.txt Only in ../quake2b-r0.16.1: releasearm diff -r -u ./src/client/menu.c ../quake2b-r0.16.1/src/client/menu.c --- ./src/client/menu.c 2002-06-15 10:51:43.000000000 -0300 +++ ../quake2b-r0.16.1/src/client/menu.c 2008-05-21 08:01:37.000000000 -0300 @@ -3976,6 +3976,7 @@ M_PopMenu (); break; + case K_ENTER : case 'Y': case 'y': cls.key_dest = key_console; diff -r -u ./src/linux/net_udp.c ../quake2b-r0.16.1/src/linux/net_udp.c --- ./src/linux/net_udp.c 2002-01-03 03:10:14.000000000 -0200 +++ ../quake2b-r0.16.1/src/linux/net_udp.c 2008-05-20 16:54:49.000000000 -0300 @@ -496,7 +496,7 @@ return 0; } - if (!net_interface || !net_interface[0] || !stricmp(net_interface, "localhost")) + if (!net_interface || !net_interface[0] || !strcasecmp(net_interface, "localhost")) address.sin_addr.s_addr = INADDR_ANY; else NET_StringToSockaddr (net_interface, (struct sockaddr *)&address); diff -r -u ./src/linux/rw_linux.c ../quake2b-r0.16.1/src/linux/rw_linux.c --- ./src/linux/rw_linux.c 2005-01-02 00:46:35.000000000 -0300 +++ ../quake2b-r0.16.1/src/linux/rw_linux.c 2008-05-21 12:11:00.000000000 -0300 @@ -26,7 +26,9 @@ static cvar_t *m_filter; static cvar_t *in_mouse; static int mouse_x, mouse_y; -static int old_mouse_x, old_mouse_y; +static int old_mouse_x = 0, old_mouse_y = 0; +static int lgx=0, lgy=0; + static qboolean mouse_avail; static int mouse_buttonstate; static int mouse_oldbuttonstate; @@ -120,11 +122,14 @@ if (mouse_avail) { getMouse(&mouse_x, &mouse_y, &mouse_buttonstate); for (i=0 ; i<3 ; i++) { - if ( (mouse_buttonstate & (1<Key_Event_fp (K_MOUSE1 + i, true); + } - if ( !(mouse_buttonstate & (1<Key_Event_fp (K_MOUSE1 + i, false); + old_mouse_x = 0; old_mouse_y=0; /* pipeline onmouseup forget last good position */ + } } if ( (mouse_buttonstate & (1<<3)) && !(mouse_oldbuttonstate & (1<<3)) ) in_state->Key_Event_fp (K_MOUSE4, true); @@ -150,56 +155,42 @@ */ void RW_IN_Move (usercmd_t *cmd) { - if (mouse_avail) { +// int tmpx, tmpy; + + if (mouse_avail) + { getMouse(&mouse_x, &mouse_y, &mouse_buttonstate); - if (m_filter->value) - { - mouse_x = (mouse_x + old_mouse_x) * 0.5; - mouse_y = (mouse_y + old_mouse_y) * 0.5; - } - - old_mouse_x = mouse_x; - old_mouse_y = mouse_y; + + if (old_mouse_x != 0 || old_mouse_y != 0) // if not first mousedown + { + //Com_Printf ("\n omx %d nmx %d omy %d nmy %d", old_mouse_x, mouse_x, old_mouse_y, mouse_y); + + /*if (m_filter->value) { mouse_x = (mouse_x + old_mouse_x) * 0.5;mouse_y = (mouse_y + old_mouse_y) * 0.5; } */ + //tmpx = old_mouse_x; tmpy = old_mouse_y; + + // convert to relative coords + //mouse_x = mouse_x - old_mouse_x; + //mouse_y = mouse_y - old_mouse_y; + + old_mouse_x = mouse_x; old_mouse_y = mouse_y; - if (mouse_x || mouse_y) { - if (!exponential_speedup->value) { - mouse_x *= sensitivity->value; - mouse_y *= sensitivity->value; - } - else { - if (mouse_x > MOUSE_MIN || mouse_y > MOUSE_MIN || - mouse_x < -MOUSE_MIN || mouse_y < -MOUSE_MIN) { - mouse_x = (mouse_x*mouse_x*mouse_x)/4; - mouse_y = (mouse_y*mouse_y*mouse_y)/4; - if (mouse_x > MOUSE_MAX) - mouse_x = MOUSE_MAX; - else if (mouse_x < -MOUSE_MAX) - mouse_x = -MOUSE_MAX; - if (mouse_y > MOUSE_MAX) - mouse_y = MOUSE_MAX; - else if (mouse_y < -MOUSE_MAX) - mouse_y = -MOUSE_MAX; - } - } - // add mouse X/Y movement to cmd - if ( (*in_state->in_strafe_state & 1) || - (lookstrafe->value && mlooking )) - cmd->sidemove += m_side->value * mouse_x; - else - in_state->viewangles[YAW] -= m_yaw->value * mouse_x; + if (mouse_x || mouse_y) { + if (!exponential_speedup->value) { mouse_x *= sensitivity->value * 3; mouse_y *= sensitivity->value * 3; } + + // add mouse X/Y movement to cmd + if ((*in_state->in_strafe_state & 1) || (lookstrafe->value && mlooking )) cmd->sidemove += m_side->value * mouse_x; + else in_state->viewangles[YAW] -= m_yaw->value * mouse_x; - if ( (mlooking || freelook->value) && - !(*in_state->in_strafe_state & 1)) - { - in_state->viewangles[PITCH] += m_pitch->value * mouse_y; - } - else - { - cmd->forwardmove -= m_forward->value * mouse_y; - } - doneMouse(); + if ( (mlooking || freelook->value) && !(*in_state->in_strafe_state & 1)) { + in_state->viewangles[PITCH] += m_pitch->value * mouse_y; + } + else { cmd->forwardmove -= m_forward->value * mouse_y; } + doneMouse(); + } } + else { old_mouse_x = mouse_x; old_mouse_y = mouse_y; } } + #ifdef Joystick RW_IN_JoystickMove(cmd, mlooking, lookstrafe, m_pitch); #endif diff -r -u ./src/linux/rw_sdl.c ../quake2b-r0.16.1/src/linux/rw_sdl.c --- ./src/linux/rw_sdl.c 2005-01-27 19:25:40.000000000 -0300 +++ ../quake2b-r0.16.1/src/linux/rw_sdl.c 2008-05-20 23:20:29.000000000 -0300 @@ -19,7 +19,13 @@ #include #include -#include "SDL.h" +// pipeline added for pixel doubling --------- +#include +#include +//#include "SDL.h" +#include +#include +// pipeline end mods ------------------------- #ifdef OPENGL #include @@ -557,10 +563,30 @@ SetSDLIcon(); /* currently uses q2icon.xbm data */ + // Initialize display + // pipeline pixel doubling ------------------------------------- + if (vid.width == 400 && fullscreen) { + SDL_SysWMinfo wminfo; + SDL_VERSION(&wminfo.version); + SDL_GetWMInfo(&wminfo); + XSPSetPixelDoubling(wminfo.info.x11.display, 0, 1); + if ((surface = SDL_SetVideoMode(vid.width*2, vid.height*2, 8, flags)) == NULL) { + Sys_Error("(SOFTSDL) SDL SetVideoMode failed: %s\n", SDL_GetError()); + return false; + } + SDL_UpdateRect(surface, 0, 0, 400, 240); + SDL_ShowCursor(false); + } + else { + SDL_SysWMinfo wminfo; + SDL_VERSION(&wminfo.version); + SDL_GetWMInfo(&wminfo); + XSPSetPixelDoubling(wminfo.info.x11.display, 0, 0); if ((surface = SDL_SetVideoMode(vid.width, vid.height, 8, flags)) == NULL) { Sys_Error("(SOFTSDL) SDL SetVideoMode failed: %s\n", SDL_GetError()); return false; } + } SDL_WM_SetCaption("Quake II", "Quake II"); diff -r -u ./src/linux/sys_linux.c ../quake2b-r0.16.1/src/linux/sys_linux.c --- ./src/linux/sys_linux.c 2004-09-12 15:26:29.000000000 -0300 +++ ../quake2b-r0.16.1/src/linux/sys_linux.c 2008-05-20 16:47:12.000000000 -0300 @@ -223,6 +223,8 @@ const char *gamename = "gameaxp.so"; #elif defined __powerpc__ const char *gamename = "gameppc.so"; +#elif defined __arm__ + const char *gamename = "gamearm.so"; #elif defined __sparc__ const char *gamename = "gamesparc.so"; #else diff -r -u ./src/linux/vid_menu.c ../quake2b-r0.16.1/src/linux/vid_menu.c --- ./src/linux/vid_menu.c 2005-01-02 00:46:35.000000000 -0300 +++ ../quake2b-r0.16.1/src/linux/vid_menu.c 2008-05-21 06:50:53.000000000 -0300 @@ -125,10 +125,10 @@ else s_brightness_slider[0].curvalue = s_brightness_slider[1].curvalue; - if ( stricmp( vid_ref->string, "soft" ) == 0 || - stricmp( vid_ref->string, "softx" ) == 0 || - stricmp( vid_ref->string, "softsdl" ) == 0 || - stricmp( vid_ref->string, "glx" ) == 0 ) + if ( strcasecmp( vid_ref->string, "soft" ) == 0 || + strcasecmp( vid_ref->string, "softx" ) == 0 || + strcasecmp( vid_ref->string, "softsdl" ) == 0 || + strcasecmp( vid_ref->string, "glx" ) == 0 ) { float gamma = ( 0.8 - ( slider->curvalue/10.0 - 0.5 ) ) + 0.5; @@ -206,12 +206,12 @@ ** update appropriate stuff if we're running OpenGL and gamma ** has been modified */ - if ( stricmp( vid_ref->string, "gl" ) == 0 ) + if ( strcasecmp( vid_ref->string, "gl" ) == 0 ) { if ( vid_gamma->modified ) { vid_ref->modified = true; - if ( stricmp( gl_driver->string, "3dfxgl" ) == 0 ) + if ( strcasecmp( gl_driver->string, "3dfxgl" ) == 0 ) { char envbuffer[1024]; float g; @@ -240,12 +240,12 @@ static const char *resolutions[] = { - "[320 240 ]", - "[400 300 ]", + "[400 240 ]", "[512 384 ]", + "[720 420 ]", "[640 480 ]", + "[800 480 ]", "[800 600 ]", - "[960 720 ]", "[1024 768 ]", "[1152 864 ]", "[1280 1024]", diff -r -u ./src/linux/vid_so.c ../quake2b-r0.16.1/src/linux/vid_so.c --- ./src/linux/vid_so.c 2004-09-24 19:13:27.000000000 -0300 +++ ../quake2b-r0.16.1/src/linux/vid_so.c 2008-05-21 06:50:42.000000000 -0300 @@ -138,12 +138,12 @@ vidmode_t vid_modes[] = { - { "Mode 0: 320x240", 320, 240, 0 }, - { "Mode 1: 400x300", 400, 300, 1 }, - { "Mode 2: 512x384", 512, 384, 2 }, + { "Mode 0: 400x240", 400, 240, 0 }, + { "Mode 1: 512x384", 512, 384, 1 }, + { "Mode 2: 720x420", 720, 420, 2 }, { "Mode 3: 640x480", 640, 480, 3 }, - { "Mode 4: 800x600", 800, 600, 4 }, - { "Mode 5: 960x720", 960, 720, 5 }, + { "Mode 4: 800x480", 800, 480, 4 }, + { "Mode 5: 800x600", 800, 600, 5 }, { "Mode 6: 1024x768", 1024, 768, 6 }, { "Mode 7: 1152x864", 1152, 864, 7 }, { "Mode 8: 1280x1024", 1280, 1024, 8 }, diff -r -u ./src/qcommon/files.c ../quake2b-r0.16.1/src/qcommon/files.c --- ./src/qcommon/files.c 2005-01-02 00:46:35.000000000 -0300 +++ ../quake2b-r0.16.1/src/qcommon/files.c 2008-05-21 00:25:35.000000000 -0300 @@ -577,6 +577,7 @@ FS_AddGameDirectory (gdir); } + #endif } @@ -913,6 +914,11 @@ // add baseq2 to search path // FS_AddGameDirectory (va("%s/"BASEDIRNAME, fs_basedir->string) ); + Com_Printf( "Adding game dir : %s\n", fs_basedir->string ); + + /* pipeline hack to ensure internal filesystem is in game directory for loading game code */ + Com_Printf( "Adding game dir : %s\n", "/usr/lib/quake2/" ); + FS_AddGameDirectory (va("%s/"BASEDIRNAME, "/usr/lib/quake2/")); // // then add a '.quake2/baseq2' directory in home directory by default Only in ../quake2b-r0.16.1/src: rogue Only in ../quake2b-r0.16.1/src: xatrix