EDuke32 Wii: Ready for action!

git-svn-id: https://svn.eduke32.com/eduke32@2685 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
hendricks266 2012-05-20 07:25:25 +00:00
parent d015c4acdc
commit f303ac2f2a
11 changed files with 110 additions and 21 deletions

View file

@ -78,10 +78,9 @@ ifeq ($(PLATFORM),WINDOWS)
endif endif
else else
ifeq ($(PLATFORM),LINUX) ifeq ($(PLATFORM),LINUX)
LIBS+= -ldl -pthread LIBS+= -ldl
else
LIBS+= -pthread
endif endif
LIBS+= -pthread
ifneq (0,$(PROFILER)) ifneq (0,$(PROFILER))
ifneq ($(PLATFORM),DARWIN) ifneq ($(PLATFORM),DARWIN)
LIBS+= -lprofiler LIBS+= -lprofiler
@ -199,8 +198,6 @@ ifeq ($(PLATFORM),LINUX)
endif endif
ifeq ($(PLATFORM),WII) ifeq ($(PLATFORM),WII)
STRIP=powerpc-eabi-strip
OURCFLAGS += -g -mcpu=750 -meabi -mhard-float -msdata -O2 -I$(LIBOGC_INC) -I$(PORTLIBS)/include -DGEKKO
LIBS += -L$(LIBOGC_LIB) -L$(PORTLIBS)/lib -lvorbisidec -lfreetype -lfat -lwiiuse -lbte -logc -lm -lwiikeyboard LIBS += -L$(LIBOGC_LIB) -L$(PORTLIBS)/lib -lvorbisidec -lfreetype -lfat -lwiiuse -lbte -logc -lm -lwiikeyboard
endif endif
@ -296,7 +293,8 @@ ifneq (0,$(PROFILER))
OURLDFLAGS+=-pg OURLDFLAGS+=-pg
endif endif
ifeq ($(PLATFORM),WII) ifeq ($(PLATFORM),WII)
MISCLINKOPTS+= -g -mrvl -meabi -mhard-float -msdata -Wl,--gc-sections -Wl,-Map,$(notdir $@).map OURLDFLAGS+= -mrvl -meabi -mhard-float -Wl,--gc-sections -Wl,-Map,$(notdir $@).map
# -msdata=eabi
endif endif
ifeq ($(PRETTY_OUTPUT),1) ifeq ($(PRETTY_OUTPUT),1)
@ -304,14 +302,23 @@ ifeq ($(PRETTY_OUTPUT),1)
endif endif
.PHONY: clean all engine $(EOBJ)/$(ENGINELIB) $(EOBJ)/$(EDITORLIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB) $(ENETDIR)/$(ENETLIB) .PHONY: clean all engine $(EOBJ)/$(ENGINELIB) $(EOBJ)/$(EDITORLIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB) $(ENETDIR)/$(ENETLIB)
EDUKE32_TARGET:=eduke32$(EXESUFFIX)
ifneq ($(PLATFORM),WII)
MAPSTER32_TARGET:=mapster32$(EXESUFFIX)
endif
# TARGETS # TARGETS
all: notice eduke32$(EXESUFFIX) mapster32$(EXESUFFIX) $(EBACKTRACEDLL_TARGET) all: notice $(EDUKE32_TARGET) $(MAPSTER32_TARGET) $(EBACKTRACEDLL_TARGET)
all: all:
$(BUILD_FINISHED) $(BUILD_FINISHED)
@ls -l eduke32$(EXESUFFIX) ifneq (,$(EDUKE32_TARGET))
@ls -l mapster32$(EXESUFFIX) @ls -l $(EDUKE32_TARGET)
endif
ifneq (,$(MAPSTER32_TARGET))
@ls -l $(MAPSTER32_TARGET)
endif
notice: notice:
$(BUILD_STARTED) $(BUILD_STARTED)
@ -321,13 +328,15 @@ eduke32$(EXESUFFIX): $(GAMEOBJS) $(EOBJ)/$(ENGINELIB) $(JAUDIOLIBDIR)/$(JAUDIOLI
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -o $@ $^ $(OURLDFLAGS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB); then $(LINK_OK); else $(LINK_FAILED); fi if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -o $@ $^ $(OURLDFLAGS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB); then $(LINK_OK); else $(LINK_FAILED); fi
ifeq (1,$(RELEASE)) ifeq (1,$(RELEASE))
ifeq (0,$(DEBUGANYWAY)) ifeq (0,$(DEBUGANYWAY))
$(STRIP) eduke32$(EXESUFFIX) ifneq ($(PLATFORM),WII)
$(STRIP) $(EDUKE32_TARGET)
endif
endif endif
endif endif
ifeq ($(PLATFORM),DARWIN) ifeq ($(PLATFORM),DARWIN)
cp -RPf "Apple/bundles/EDuke32.app" "./" cp -RPf "Apple/bundles/EDuke32.app" "./"
mkdir -p "EDuke32.app/Contents/MacOS" mkdir -p "EDuke32.app/Contents/MacOS"
cp -f "eduke32$(EXESUFFIX)" "EDuke32.app/Contents/MacOS/" cp -f "$(EDUKE32_TARGET)" "EDuke32.app/Contents/MacOS/"
endif endif
mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)/$(EDITORLIB) $(EOBJ)/$(ENGINELIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB) mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)/$(EDITORLIB) $(EOBJ)/$(ENGINELIB) $(JAUDIOLIBDIR)/$(JAUDIOLIB)
@ -335,13 +344,15 @@ mapster32$(EXESUFFIX): $(EDITOROBJS) $(EOBJ)/$(EDITORLIB) $(EOBJ)/$(ENGINELIB) $
if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -o $@ $^ $(OURLDFLAGS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB); then $(LINK_OK); else $(LINK_FAILED); fi if $(CC) $(OURCONLYFLAGS) $(OURCFLAGS) -o $@ $^ $(OURLDFLAGS) $(LIBS) $(STATICSTDCPP) $(STDCPPLIB); then $(LINK_OK); else $(LINK_FAILED); fi
ifeq (1,$(RELEASE)) ifeq (1,$(RELEASE))
ifeq (0,$(DEBUGANYWAY)) ifeq (0,$(DEBUGANYWAY))
$(STRIP) mapster32$(EXESUFFIX) ifneq ($(PLATFORM),WII)
$(STRIP) $(MAPSTER32_TARGET)
endif
endif endif
endif endif
ifeq ($(PLATFORM),DARWIN) ifeq ($(PLATFORM),DARWIN)
cp -RPf "Apple/bundles/Mapster32.app" "./" cp -RPf "Apple/bundles/Mapster32.app" "./"
mkdir -p "Mapster32.app/Contents/MacOS" mkdir -p "Mapster32.app/Contents/MacOS"
cp -f "mapster32$(EXESUFFIX)" "Mapster32.app/Contents/MacOS/" cp -f "$(MAPSTER32_TARGET)" "Mapster32.app/Contents/MacOS/"
endif endif
include Makefile.deps include Makefile.deps

View file

@ -91,6 +91,11 @@ BASECXXFLAGS= -fno-exceptions -fno-rtti
BASEASFLAGS=-s #-g BASEASFLAGS=-s #-g
BASELDFLAGS= BASELDFLAGS=
ifeq ($(PLATFORM),WII)
override USE_LIBPNG = 0
override USE_LIBVPX = 0
endif
LIBS=-lm LIBS=-lm
ifneq (0,$(USE_LIBPNG)) ifneq (0,$(USE_LIBPNG))
LIBS+= -lpng -lz LIBS+= -lpng -lz
@ -105,6 +110,8 @@ ifneq ($(RELEASE)$(DEBUGANYWAY),10)
# debug build or DEBUGANYWAY=1 --> -g flag # debug build or DEBUGANYWAY=1 --> -g flag
ifneq (0,$(CLANG)) ifneq (0,$(CLANG))
debug=-g debug=-g
else ifeq ($(PLATFORM), WII)
debug=-g
else else
debug=-ggdb debug=-ggdb
endif endif

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

View file

@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<app version="1">
<name>EDuke32 Wii</name>
<coder>EDuke32 Team</coder>

View file

@ -0,0 +1,6 @@
<short_description>Duke Nukem 3D</short_description>
<long_description>EDuke32 is an awesome, free homebrew game engine and source port of the classic PC first person shooter Duke Nukem 3D--Duke3D for short. We've added thousands of cool and useful features and upgrades for regular players and additional editing capabilities and scripting extensions for homebrew developers and mod creators. EDuke32 is completely free, open source software. EDuke32 is licensed under the GNU GPL and the BUILD license. http://eduke32.com/</long_description>
<arguments>
<arg></arg>
</arguments>
</app>

View file

@ -162,10 +162,24 @@ ifeq ($(PLATFORM),SKYOS)
LIBS+= -lSDL -lnet LIBS+= -lSDL -lnet
endif endif
ifeq ($(PLATFORM),WII) ifeq ($(PLATFORM),WII)
ifeq ($(strip $(DEVKITPPC)),)
$(error "Please set DEVKITPPC in your environment. export DEVKITPPC=<path to>devkitPPC")
endif
include $(DEVKITPPC)/wii_rules
RANLIB=powerpc-eabi-ranlib
STRIP=powerpc-eabi-strip
RENDERTYPE=SDL RENDERTYPE=SDL
EXESUFFIX=.elf EXESUFFIX=.elf
override USE_OPENGL=0
override NOASM=1
override WITHOUT_GTK=1 override WITHOUT_GTK=1
BUILDCFLAGS+= -g -mcpu=750 -meabi -mhard-float -msdata -O2 -DGEKKO -DHAVE_INTTYPES -D__POWERPC__ -I$(LIBOGC_INC) -I$(LIBOGC_INC)/SDL # -msdata=eabi
BUILDCFLAGS+= -g -mtune=750 -meabi -mhard-float \
-DGEKKO -DHAVE_INTTYPES -D__POWERPC__ \
-I$(LIBOGC_INC) -I$(LIBOGC_INC)/SDL -I$(PORTLIBS)/include
SDLCONFIG= SDLCONFIG=
LIBS+= -lSDL_mixer -lsmpeg -lSDL -laesnd LIBS+= -lSDL_mixer -lsmpeg -lSDL -laesnd
endif endif
@ -262,7 +276,10 @@ endif
ifneq ($(PLATFORM),WINDOWS) ifneq ($(PLATFORM),WINDOWS)
LIBS+= -ldl -pthread ifneq ($(PLATFORM),WII)
LIBS+= -ldl
endif
LIBS+= -pthread
endif endif
ifeq ($(PLATFORM),WINDOWS) ifeq ($(PLATFORM),WINDOWS)

View file

@ -248,7 +248,10 @@ static int32_t osdcmd_restartvid(const osdfuncparm_t *parm)
static int32_t osdcmd_vidmode(const osdfuncparm_t *parm) static int32_t osdcmd_vidmode(const osdfuncparm_t *parm)
{ {
int32_t newx = xdim, newy = ydim, newbpp = bpp, newfullscreen = fullscreen, tmp; int32_t newx = xdim, newy = ydim, newbpp = bpp, newfullscreen = fullscreen;
#ifdef USE_OPENGL
int32_t tmp;
#endif
switch (parm->numparms) switch (parm->numparms)
{ {

View file

@ -7766,7 +7766,11 @@ static inline int32_t raytrace(int32_t x3, int32_t y3, int32_t *x4, int32_t *y4)
// Exported Engine Functions // Exported Engine Functions
// //
#if !defined _WIN32 && defined DEBUGGINGAIDS #if !defined _WIN32 && defined DEBUGGINGAIDS && !defined GEKKO
#ifdef GEKKO
#define __rtems__
#define _POSIX_REALTIME_SIGNALS
#endif
#include <signal.h> #include <signal.h>
static void sighandler(int32_t sig, const siginfo_t *info, void *ctx) static void sighandler(int32_t sig, const siginfo_t *info, void *ctx)
{ {
@ -7917,7 +7921,7 @@ int32_t initengine(void)
{ {
int32_t i, j; int32_t i, j;
#if !defined _WIN32 && defined DEBUGGINGAIDS #if !defined _WIN32 && defined DEBUGGINGAIDS && !defined GEKKO
struct sigaction sigact, oldact; struct sigaction sigact, oldact;
memset(&sigact, 0, sizeof(sigact)); memset(&sigact, 0, sizeof(sigact));
sigact.sa_sigaction = (void *)sighandler; sigact.sa_sigaction = (void *)sighandler;

Binary file not shown.

View file

@ -2685,12 +2685,12 @@ void G_DisplayRest(int32_t smoothratio)
{ {
if (pp->palette == WATERPAL) if (pp->palette == WATERPAL)
{ {
static palette_t wp = { 224, 192, 255, 0 }; static const palette_t wp = { 224, 192, 255, 0 };
Bmemcpy(&hictinting[MAXPALOOKUPS-1], &wp, sizeof(palette_t)); Bmemcpy(&hictinting[MAXPALOOKUPS-1], &wp, sizeof(palette_t));
} }
else if (pp->palette == SLIMEPAL) else if (pp->palette == SLIMEPAL)
{ {
static palette_t sp = { 208, 255, 192, 0 }; static const palette_t sp = { 208, 255, 192, 0 };
Bmemcpy(&hictinting[MAXPALOOKUPS-1], &sp, sizeof(palette_t)); Bmemcpy(&hictinting[MAXPALOOKUPS-1], &sp, sizeof(palette_t));
} }
else else
@ -10616,12 +10616,13 @@ MAIN_LOOP_RESTART:
// stdin -> OSD input for dedicated server // stdin -> OSD input for dedicated server
if (g_networkMode == NET_DEDICATED_SERVER) if (g_networkMode == NET_DEDICATED_SERVER)
{ {
int32_t nb, flag = 1; int32_t nb;
char ch; char ch;
static uint32_t bufpos = 0; static uint32_t bufpos = 0;
static char buf[128]; static char buf[128];
#ifndef GEKKO #ifndef GEKKO
int32_t flag = 1;
ioctl(0, FIONBIO, &flag); ioctl(0, FIONBIO, &flag);
#endif #endif

View file

@ -0,0 +1,36 @@
@echo off
setlocal ENABLEEXTENSIONS DISABLEDELAYEDEXPANSION
set PATH=C:\devkitPro\devkitPPC\bin;C:\devkitPro\msys\bin;C:\MinGW\bin;C:\MinGW\msys\1.0\bin;%PATH%
:: Detect versioning systems and pull the revision number:
for /f "delims=" %%G in ('svn info 2^>^&1 ^| grep Revision ^| cut -d " " -f 2') do @set rev=r%%G
if not "%rev%"=="" set vc=svn
if "%rev%"=="" for /f "delims=" %%G in ('git svn info 2^>^&1 ^| grep Revision ^| cut -d " " -f 2') do @set rev=r%%G
if not "%rev%"=="" set vc=git
if "%rev%"=="" set vc=none
if not "%rev%"=="" echo const char *s_buildRev = "%rev%";>source\rev.h
if "%rev%"=="" set rev=rXXXX
:: Get the current date:
for /f "delims=" %%G in ('"C:\MinGW\msys\1.0\bin\date.exe" +%%Y%%m%%d') do @set currentdate=%%G
:: Build:
set buildparameters=PLATFORM=WII %*
make veryclean %buildparameters%
make OPTLEVEL=2 LTO=0 %buildparameters%
:: Package data:
xcopy /e /q /y Wii\apps apps\
for %%G in (eduke32) do for %%H in (.elf) do if exist "%%~G%%~H" move /y "%%~G%%~H" "apps\%%~G\boot%%~H"
for %%G in (eduke32) do for %%H in (.elf.map) do if exist "%%~G%%~H" del /f /q "%%~G%%~H"
"echo.exe" -e " <version>%rev%</version>\n <release_date>%currentdate%</release_date>" | "cat.exe" Wii\meta_1.xml - Wii\meta_2.xml >"apps\eduke32\meta.xml"
if exist "*.txt" copy /y "*.txt" "apps\eduke32\"
"ls.exe" -l -R apps
:: Clean up revision number:
if "%vc%"=="svn" svn revert source\rev.h
if "%vc%"=="git" git checkout source\rev.h
endlocal