Commit 7c30c3d0 authored by Rinnegatamante's avatar Rinnegatamante
Browse files

Added Urban Terror core.

parent 91b742e5
......@@ -33,6 +33,13 @@ ASFLAGS = $(CFLAGS)
all: $(TARGET).vpk
release:
make -f Makefile.oa
make clean
make -f Makefile.ut4
make clean
make all
exec-only: eboot.bin
$(TARGET).vpk: $(TARGET).velf
......@@ -53,7 +60,7 @@ $(TARGET).vpk: $(TARGET).velf
cp -f param.sfo build/sce_sys/param.sfo
#------------ Comment this if you don't have 7zip ------------------
7z a -tzip ./$(TARGET).vpk -r ./build/sce_sys ./build/eboot.bin ./build/openarena.bin
7z a -tzip ./$(TARGET).vpk -r ./build/sce_sys ./build/eboot.bin ./build/openarena.bin ./build/urbanterror.bin
#-------------------------------------------------------------------
eboot.bin: $(TARGET).velf
......
TARGET := urbanterror
GIT_VERSION := $(shell git describe --abbrev=6 --dirty --always --tags)
SOURCES := code/renderercommon code/qcommon code/botlib code/client code/server code/renderergl1 code/psp2 code/sys
INCLUDES := code/renderercommon code/qcommon code/botlib code/client code/server code/renderergl1 code/psp2 code/sys
LIBS = -lSceAppMgr_stub -lvitaGL -lvorbisfile -lvorbis -logg -lspeexdsp -lmpg123 \
-lc -lSceCommonDialog_stub -lSceAudio_stub -lSceLibKernel_stub \
-lSceNet_stub -lSceNetCtl_stub -lpng -lz -lSceDisplay_stub -lSceGxm_stub \
-lSceSysmodule_stub -lSceCtrl_stub -lSceTouch_stub -lSceMotion_stub -lm \
-lSceAppUtil_stub -lScePgf_stub -ljpeg -lSceRtc_stub -lScePower_stub -lcurl \
-lssl -lcrypto -lSceSsl_stub
CFILES := $(filter-out code/psp2/psp2_dll_hacks.c,$(foreach dir,$(SOURCES), $(wildcard $(dir)/*.c)))
CPPFILES := $(foreach dir,$(CPPSOURCES), $(wildcard $(dir)/*.cpp))
BINFILES := $(foreach dir,$(DATA), $(wildcard $(dir)/*.bin))
OBJS := $(addsuffix .o,$(BINFILES)) $(CFILES:.c=.o) $(CPPFILES:.cpp=.o)
export INCLUDE := $(foreach dir,$(INCLUDES),-I$(dir))
PREFIX = arm-vita-eabi
CC = $(PREFIX)-gcc
CXX = $(PREFIX)-g++
CFLAGS = $(INCLUDE) -D__PSP2__ -D__FLOAT_WORD_ORDER=1 -D__GNU__ -DRELEASE \
-DUSE_ICON -DARCH_STRING=\"arm\" -DBOTLIB \
-DDEFAULT_BASEDIR=\"ux0:/data/ioq3\" -DURBANTERROR \
-DPRODUCT_VERSION=\"1.36_GIT_ba68b99c-2018-01-23\" -DHAVE_VM_COMPILED=true \
-mfpu=neon -mcpu=cortex-a9 -fsigned-char \
-Wl,-q -O3 -g -ffast-math -fno-short-enums
CXXFLAGS = $(CFLAGS) -fno-exceptions -std=gnu++11
ASFLAGS = $(CFLAGS)
all: $(TARGET).bin
$(TARGET).bin: $(TARGET).velf
vita-make-fself -s $< build/$(TARGET).bin
eboot.bin: $(TARGET).velf
vita-make-fself -s $< eboot.bin
%.velf: %.elf
cp $< $<.unstripped.elf
$(PREFIX)-strip -g $<
vita-elf-create $< $@
$(TARGET).elf: $(OBJS)
$(CXX) $(CXXFLAGS) $^ $(LIBS) -o $@
clean:
@rm -rf $(TARGET).velf $(TARGET).elf $(OBJS) $(TARGET).elf.unstripped.elf $(TARGET).vpk build/eboot.bin build/sce_sys/param.sfo ./param.sfo
......@@ -23,4 +23,11 @@
</liveitem>
</frame>
<frame id='frame3' multi='o' autoflip='3' >
<liveitem>
<target>psla:terror</target>
<image>urbanterror.png</image>
</liveitem>
</frame>
</livearea>
......@@ -118,7 +118,11 @@ void GLimp_Init( qboolean coreContext)
glConfig.isFullscreen = qtrue;
if (!inited){
#ifdef URBANTERROR
vglInitExtended(0x100000, glConfig.vidWidth, glConfig.vidHeight, 0x1000000, SCE_GXM_MULTISAMPLE_4X);
#else
vglInitExtended(0x100000, glConfig.vidWidth, glConfig.vidHeight, 0x1800000, SCE_GXM_MULTISAMPLE_4X);
#endif
vglUseVram(GL_TRUE);
vglMapHeapMem();
inited = 1;
......
......@@ -39,7 +39,11 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "../qcommon/q_shared.h"
#include "../qcommon/qcommon.h"
#ifdef URBANTERROR
int _newlib_heap_size_user = 305 * 1024 * 1024;
#else
int _newlib_heap_size_user = 256 * 1024 * 1024;
#endif
static char binaryPath[MAX_OSPATH] = {0};
static char installPath[MAX_OSPATH] = {0};
......@@ -450,7 +454,10 @@ int quake_main (unsigned int argc, void* argv){
Sys_SetDefaultInstallPath(DEFAULT_BASEDIR);
// Quake III: Team Arena & OpenArena support
#ifndef OPENARENA
#ifdef URBANTERROR
sprintf(commandLine, "+set fs_game q3ut4");
#else
# ifndef OPENARENA
sceAppUtilInit(&(SceAppUtilInitParam){}, &(SceAppUtilBootParam){});
SceAppUtilAppEventParam eventParam;
memset(&eventParam, 0, sizeof(SceAppUtilAppEventParam));
......@@ -459,9 +466,11 @@ int quake_main (unsigned int argc, void* argv){
char buffer[2048];
memset(buffer, 0, 2048);
sceAppUtilAppEventParseLiveArea(&eventParam, buffer);
if (strstr(buffer, "open") != NULL) sceAppMgrLoadExec("app0:/openarena.bin", NULL, NULL);
if (strstr(buffer, "open") != NULL) sceAppMgrLoadExec("app0:/openarena.bin", NULL, NULL);
else if (strstr(buffer, "terror") != NULL) sceAppMgrLoadExec("app0:/urbanterror.bin", NULL, NULL);
else sprintf(commandLine, "+set fs_game missionpack");
}
# endif
#endif
CON_Init();
Com_Init(commandLine);
......
......@@ -757,7 +757,9 @@ static void Upload32( unsigned *data,
if (mipmap)
{
#ifndef URBANTERROR
glGenerateMipmap(GL_TEXTURE_2D);
#endif
}
done:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment