diff --git a/polymer/eduke32/build/src/sdlayer12.c b/polymer/eduke32/build/src/sdlayer12.c index 1e7957fc6..5b3577626 100644 --- a/polymer/eduke32/build/src/sdlayer12.c +++ b/polymer/eduke32/build/src/sdlayer12.c @@ -131,6 +131,10 @@ int32_t initsystem(void) wm_setapptitle(apptitle); } +#if defined GEKKO + SDL_ShowCursor(SDL_DISABLE); +#endif + return 0; } @@ -178,7 +182,7 @@ const char *getjoyname(int32_t what, int32_t num) static inline char grabmouse_low(char a) { -#if (!defined DEBUGGINGAIDS || defined _WIN32 || defined __APPLE__) +#if (!defined DEBUGGINGAIDS || defined _WIN32 || defined __APPLE__) && !defined GEKKO SDL_ShowCursor(a ? SDL_DISABLE : SDL_ENABLE); return (SDL_WM_GrabInput(a ? SDL_GRAB_ON : SDL_GRAB_OFF) != (a ? SDL_GRAB_ON : SDL_GRAB_OFF)); #else diff --git a/polymer/eduke32/platform/wiibuild.bat b/polymer/eduke32/platform/wiibuild.bat index 1767dd582..aa7e01095 100644 --- a/polymer/eduke32/platform/wiibuild.bat +++ b/polymer/eduke32/platform/wiibuild.bat @@ -3,6 +3,8 @@ setlocal ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION set targets=eduke32 mapster32 set PATH=C:\devkitPro\devkitPPC\bin;C:\devkitPro\msys\bin;C:\MinGW\bin;C:\MinGW\msys\1.0\bin;%PATH% +set DEVKITPPC=C:/devkitPro/devkitPPC +set DEVKITPRO=C:/devkitPro pushd "%~dp0.." set wiidir=platform\Wii @@ -19,12 +21,16 @@ if "%rev%"=="" set rev=XXXX for /f "delims=" %%G in ('"C:\MinGW\msys\1.0\bin\date.exe" +%%Y%%m%%d') do @set currentdate=%%G :: Build: -set commandline=make veryclean all OPTLEVEL=2 LTO=0 PLATFORM=WII %* +set commandline=make PLATFORM=WII %* STRIP="" echo %commandline% %commandline% for %%G in (%targets%) do if not exist "%%~G.elf" goto end +:: Strip: +for %%G in (%targets%) do for %%H in (.elf) do if exist "%%~G%%~H" copy /y "%%~G%%~H" "%%~G-unstripped%%~H" +for %%G in (%targets%) do for %%H in (.elf) do if exist "%%~G%%~H" powerpc-eabi-strip "%%~G%%~H" + :: Package data: if not exist apps mkdir apps for %%G in (%targets%) do xcopy /e /q /y %wiidir%\apps\%%~G apps\%%~G\ diff --git a/polymer/eduke32/source/game.c b/polymer/eduke32/source/game.c index f16b5e413..b48162f32 100644 --- a/polymer/eduke32/source/game.c +++ b/polymer/eduke32/source/game.c @@ -2397,6 +2397,12 @@ static void G_DrawStatusBar(int32_t snum) #define COLOR_WHITE 31 #define LOW_FPS 30 +#if defined GEKKO +# define FPS_YOFFSET 16 +#else +# define FPS_YOFFSET 0 +#endif + static void G_PrintFPS(void) { // adapted from ZDoom because I like it better than what we had @@ -2422,22 +2428,22 @@ static void G_PrintFPS(void) { int32_t chars = Bsprintf(tempbuf, "%d ms (%3u fps)", howlong, LastCount); - printext256(windowx2-(chars<<(3-x))+1,windowy1+2,0,-1,tempbuf,x); - printext256(windowx2-(chars<<(3-x)),windowy1+1, + printext256(windowx2-(chars<<(3-x))+1,windowy1+2+FPS_YOFFSET,0,-1,tempbuf,x); + printext256(windowx2-(chars<<(3-x)),windowy1+1+FPS_YOFFSET, (LastCount < LOW_FPS) ? COLOR_RED : COLOR_WHITE,-1,tempbuf,x); if (ud.tickrate > 1) { chars = Bsprintf(tempbuf, "max fps: %3u", MaxFrames); - printext256(windowx2-(chars<<(3-x))+1, windowy1+10+2, 0, -1, tempbuf, x); - printext256(windowx2-(chars<<(3-x)), windowy1+10, + printext256(windowx2-(chars<<(3-x))+1, windowy1+10+2+FPS_YOFFSET, 0, -1, tempbuf, x); + printext256(windowx2-(chars<<(3-x)), windowy1+10+FPS_YOFFSET, (MaxFrames < LOW_FPS) ? COLOR_RED : COLOR_WHITE, -1, tempbuf, x); chars = Bsprintf(tempbuf, "min fps: %3u", MinFrames); - printext256(windowx2-(chars<<(3-x))+1, windowy1+20+2, 0, -1, tempbuf, x); - printext256(windowx2-(chars<<(3-x)), windowy1+20, + printext256(windowx2-(chars<<(3-x))+1, windowy1+20+2+FPS_YOFFSET, 0, -1, tempbuf, x); + printext256(windowx2-(chars<<(3-x)), windowy1+20+FPS_YOFFSET, (MinFrames < LOW_FPS) ? COLOR_RED : COLOR_WHITE, -1, tempbuf, x); } @@ -2447,8 +2453,8 @@ static void G_PrintFPS(void) chars = Bsprintf(tempbuf, "%d +- %d ms", (g_netClientPeer->lastRoundTripTime + g_netClientPeer->roundTripTime)/2, (g_netClientPeer->lastRoundTripTimeVariance + g_netClientPeer->roundTripTimeVariance)/2); - printext256(windowx2-(chars<<(3-x))+1,windowy1+30+2,0,-1,tempbuf,x); - printext256(windowx2-(chars<<(3-x)),windowy1+30+1,g_netClientPeer->lastRoundTripTime > 200 ? COLOR_RED : COLOR_WHITE,-1,tempbuf,x); + printext256(windowx2-(chars<<(3-x))+1,windowy1+30+2+FPS_YOFFSET,0,-1,tempbuf,x); + printext256(windowx2-(chars<<(3-x)),windowy1+30+1+FPS_YOFFSET,g_netClientPeer->lastRoundTripTime > 200 ? COLOR_RED : COLOR_WHITE,-1,tempbuf,x); } } @@ -3733,21 +3739,18 @@ void G_DisplayRest(int32_t smoothratio) if (a == 0 || a > 1) { - int32_t x, y; + int32_t x = 160<<16, y = 100<<16; if (a == 0) a = CROSSHAIR; -#ifdef GEKKO - if (!readmouseabsxy(&x, &y)) -#endif - { - x = 160<<16; - y = 100<<16; - } - rotatesprite_win(x-(g_player[myconnectindex].ps->look_ang<<15),y,scale(65536,ud.crosshairscale,100), 0,a,0,CROSSHAIR_PAL,2+1); + +#ifdef GEKKO + if (readmouseabsxy(&x, &y)) + rotatesprite_win(x,y,scale(65536,ud.crosshairscale,100),0,a,0,CROSSHAIR_PAL,2+1); +#endif } } #if 0 diff --git a/polymer/eduke32/source/menus.c b/polymer/eduke32/source/menus.c index 8b79e66ae..afe763d57 100644 --- a/polymer/eduke32/source/menus.c +++ b/polymer/eduke32/source/menus.c @@ -21,6 +21,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. //------------------------------------------------------------------------- #include "duke3d.h" +#include "renderlayer.h" #include "net.h" #include "player.h" #include "mouse.h" @@ -298,7 +299,7 @@ static MenuEntry_t ME_SKILL_TEMPLATE = MAKE_MENUENTRY( NULL, &MF_Redfont, &MEF_C static MenuEntry_t ME_SKILL[MAXSKILLS]; static MenuEntry_t *MEL_SKILL[MAXSKILLS]; -#ifndef DROIDMENU +#if defined STARTUP_SETUP_WINDOW && !defined DROIDMENU static MenuOption_t MEO_GAMESETUP_STARTWIN = MAKE_MENUOPTION( &MF_Redfont, &MEOS_OffOn, &ud.config.ForceSetup ); static MenuEntry_t ME_GAMESETUP_STARTWIN = MAKE_MENUENTRY( "Startup window:", &MF_Redfont, &MEF_BigOptionsRt, &MEO_GAMESETUP_STARTWIN, Option ); #endif @@ -340,7 +341,7 @@ static MenuEntry_t ME_ADULTMODE = MAKE_MENUENTRY( "Parental lock:", &MF_Redfont, static MenuEntry_t *MEL_GAMESETUP[] = { &ME_ADULTMODE, -#ifndef DROIDMENU +#if defined STARTUP_SETUP_WINDOW && !defined DROIDMENU &ME_GAMESETUP_STARTWIN, #endif &ME_GAMESETUP_AIM_AUTO,