diff --git a/Makefile b/Makefile index 764f9aa..0335bb2 100644 --- a/Makefile +++ b/Makefile @@ -25,7 +25,7 @@ APP_DESCRIPTION := NZP based on ctrQuake #--------------------------------------------------------------------------------- ARCH := -march=armv6k -mtune=mpcore -mfloat-abi=hard -mtp=soft -CFLAGS := -g -Wall -O2 -mword-relocations \ +CFLAGS := -g -Wall -O3 -mword-relocations \ -fomit-frame-pointer -ffunction-sections \ $(ARCH) diff --git a/ctrQuake.3dsx b/ctrQuake.3dsx deleted file mode 100644 index e8ec05f..0000000 Binary files a/ctrQuake.3dsx and /dev/null differ diff --git a/ctrQuake.elf b/ctrQuake.elf deleted file mode 100755 index 4ee0cea..0000000 Binary files a/ctrQuake.elf and /dev/null differ diff --git a/ctrQuake.smdh b/ctrQuake.smdh deleted file mode 100644 index bac2b08..0000000 Binary files a/ctrQuake.smdh and /dev/null differ diff --git a/nzportable.3dsx b/nzportable.3dsx index f5d68e6..0bce0a4 100644 Binary files a/nzportable.3dsx and b/nzportable.3dsx differ diff --git a/nzportable.elf b/nzportable.elf index 8499985..32034f3 100755 Binary files a/nzportable.elf and b/nzportable.elf differ diff --git a/source/cl_tent.c b/source/cl_tent.c index 546e832..82c8d92 100644 --- a/source/cl_tent.c +++ b/source/cl_tent.c @@ -25,18 +25,6 @@ int num_temp_entities; entity_t cl_temp_entities[MAX_TEMP_ENTITIES]; beam_t cl_beams[MAX_BEAMS]; -sfx_t *cl_sfx_wizhit; -sfx_t *cl_sfx_knighthit; -sfx_t *cl_sfx_tink1; -sfx_t *cl_sfx_ric1; -sfx_t *cl_sfx_ric2; -sfx_t *cl_sfx_ric3; -sfx_t *cl_sfx_r_exp3; -#ifdef QUAKE2 -sfx_t *cl_sfx_imp; -sfx_t *cl_sfx_rail; -#endif - /* ================= CL_ParseTEnt @@ -44,17 +32,7 @@ CL_ParseTEnt */ void CL_InitTEnts (void) { - cl_sfx_wizhit = S_PrecacheSound ("wizard/hit.wav"); - cl_sfx_knighthit = S_PrecacheSound ("hknight/hit.wav"); - cl_sfx_tink1 = S_PrecacheSound ("weapons/tink1.wav"); - cl_sfx_ric1 = S_PrecacheSound ("weapons/ric1.wav"); - cl_sfx_ric2 = S_PrecacheSound ("weapons/ric2.wav"); - cl_sfx_ric3 = S_PrecacheSound ("weapons/ric3.wav"); - cl_sfx_r_exp3 = S_PrecacheSound ("weapons/r_exp3.wav"); -#ifdef QUAKE2 - cl_sfx_imp = S_PrecacheSound ("shambler/sattck1.wav"); - cl_sfx_rail = S_PrecacheSound ("weapons/lstart.wav"); -#endif + } /* @@ -131,7 +109,6 @@ void CL_ParseTEnt (void) pos[1] = MSG_ReadCoord (); pos[2] = MSG_ReadCoord (); R_RunParticleEffect (pos, vec3_origin, 20, 30); - S_StartSound (-1, 0, cl_sfx_wizhit, pos, 1, 1); break; case TE_KNIGHTSPIKE: // spike hitting wall @@ -139,7 +116,6 @@ void CL_ParseTEnt (void) pos[1] = MSG_ReadCoord (); pos[2] = MSG_ReadCoord (); R_RunParticleEffect (pos, vec3_origin, 226, 20); - S_StartSound (-1, 0, cl_sfx_knighthit, pos, 1, 1); break; case TE_SPIKE: // spike hitting wall @@ -151,37 +127,12 @@ void CL_ParseTEnt (void) #else R_RunParticleEffect (pos, vec3_origin, 0, 10); #endif - if ( rand() % 5 ) - S_StartSound (-1, 0, cl_sfx_tink1, pos, 1, 1); - else - { - rnd = rand() & 3; - if (rnd == 1) - S_StartSound (-1, 0, cl_sfx_ric1, pos, 1, 1); - else if (rnd == 2) - S_StartSound (-1, 0, cl_sfx_ric2, pos, 1, 1); - else - S_StartSound (-1, 0, cl_sfx_ric3, pos, 1, 1); - } break; case TE_SUPERSPIKE: // super spike hitting wall pos[0] = MSG_ReadCoord (); pos[1] = MSG_ReadCoord (); pos[2] = MSG_ReadCoord (); R_RunParticleEffect (pos, vec3_origin, 0, 20); - - if ( rand() % 5 ) - S_StartSound (-1, 0, cl_sfx_tink1, pos, 1, 1); - else - { - rnd = rand() & 3; - if (rnd == 1) - S_StartSound (-1, 0, cl_sfx_ric1, pos, 1, 1); - else if (rnd == 2) - S_StartSound (-1, 0, cl_sfx_ric2, pos, 1, 1); - else - S_StartSound (-1, 0, cl_sfx_ric3, pos, 1, 1); - } break; case TE_GUNSHOT: // bullet hitting wall @@ -201,7 +152,6 @@ void CL_ParseTEnt (void) dl->radius = 350; dl->die = cl.time + 0.5; dl->decay = 300; - S_StartSound (-1, 0, cl_sfx_r_exp3, pos, 1, 1); break; case TE_TAREXPLOSION: // tarbaby explosion @@ -209,8 +159,6 @@ void CL_ParseTEnt (void) pos[1] = MSG_ReadCoord (); pos[2] = MSG_ReadCoord (); R_BlobExplosion (pos); - - S_StartSound (-1, 0, cl_sfx_r_exp3, pos, 1, 1); break; case TE_LIGHTNING1: // lightning bolts @@ -257,7 +205,6 @@ void CL_ParseTEnt (void) dl->radius = 350; dl->die = cl.time + 0.5; dl->decay = 300; - S_StartSound (-1, 0, cl_sfx_r_exp3, pos, 1, 1); break; #ifdef QUAKE2 @@ -265,7 +212,6 @@ void CL_ParseTEnt (void) pos[0] = MSG_ReadCoord (); pos[1] = MSG_ReadCoord (); pos[2] = MSG_ReadCoord (); - S_StartSound (-1, 0, cl_sfx_imp, pos, 1, 1); break; case TE_RAILTRAIL: diff --git a/source/common.c b/source/common.c index aadca26..43ba776 100644 --- a/source/common.c +++ b/source/common.c @@ -754,6 +754,9 @@ void *SZ_GetSpace (sizebuf_t *buf, int length) if (buf->cursize + length > buf->maxsize) { + + Con_Printf("buf->cursize: %d, length: %d, buf->maxsize: %d\n", buf->cursize, length, buf->maxsize); + if (!buf->allowoverflow) Sys_Error ("SZ_GetSpace: overflow without allowoverflow set"); diff --git a/source/gl_model.c b/source/gl_model.c index d23133c..488c513 100644 --- a/source/gl_model.c +++ b/source/gl_model.c @@ -1351,6 +1351,8 @@ ALIAS MODELS ============================================================================== */ +#pragma GCC push_options +#pragma GCC optimize ("O0") aliashdr_t *pheader; stvert_t stverts[MAXALIASVERTS]; @@ -1655,6 +1657,7 @@ void Mod_LoadAliasModel (model_t *mod, void *buffer) if (pheader->numverts <= 0) Sys_Error ("model %s has no vertices", mod->name); + //Con_Printf("numverts: %d\n", pheader->numverts); if (pheader->numverts > MAXALIASVERTS) Sys_Error ("model %s has too many vertices", mod->name); @@ -1937,7 +1940,7 @@ void Mod_LoadSpriteModel (model_t *mod, void *buffer) mod->type = mod_sprite; } - +#pragma GCC pop_options //============================================================================= /* diff --git a/source/gl_model.h b/source/gl_model.h index 606f846..2d2975c 100644 --- a/source/gl_model.h +++ b/source/gl_model.h @@ -314,7 +314,7 @@ typedef struct { maliasframedesc_t frames[1]; // variable sized } aliashdr_t; -#define MAXALIASVERTS 1024 +#define MAXALIASVERTS 2048 #define MAXALIASFRAMES 256 #define MAXALIASTRIS 2048 extern aliashdr_t *pheader; diff --git a/source/host.c b/source/host.c index 0a76324..603f6b3 100644 --- a/source/host.c +++ b/source/host.c @@ -70,7 +70,7 @@ cvar_t noexit = {"noexit","0",false,true}; #ifdef QUAKE2 cvar_t developer = {"developer","1"}; // should be 0 for release! #else -cvar_t developer = {"developer","1"}; +cvar_t developer = {"developer","0"}; #endif cvar_t skill = {"skill","1"}; // 0 - 3 diff --git a/source/net.h b/source/net.h index af46125..e1f10bd 100644 --- a/source/net.h +++ b/source/net.h @@ -28,7 +28,7 @@ struct qsockaddr #define NET_NAMELEN 64 -#define NET_MAXMESSAGE 8192 +#define NET_MAXMESSAGE 16384 #define NET_HEADERSIZE (2 * sizeof(unsigned int)) #define NET_DATAGRAMSIZE (MAX_DATAGRAM + NET_HEADERSIZE) diff --git a/source/quakedef.h b/source/quakedef.h index 0fa6d14..e7ff8df 100644 --- a/source/quakedef.h +++ b/source/quakedef.h @@ -102,8 +102,8 @@ void VID_UnlockBuffer (void); #define ON_EPSILON 0.1 // point on plane side epsilon -#define MAX_MSGLEN 8000 // max length of a reliable message -#define MAX_DATAGRAM 1024 // max length of unreliable message +#define MAX_MSGLEN 64000 // max length of a reliable message Crow_Bar. UP for PSP +#define MAX_DATAGRAM 8000 // max length of unreliable message Crow_Bar. UP for PSP // // per-level limits diff --git a/source/snd_dma.c b/source/snd_dma.c index 4240a12..d77af64 100644 --- a/source/snd_dma.c +++ b/source/snd_dma.c @@ -234,8 +234,8 @@ void S_Init (void) // if (shm->buffer) // shm->buffer[4] = shm->buffer[5] = 0x7f; // force a pop for debugging - ambient_sfx[AMBIENT_WATER] = S_PrecacheSound ("ambience/water1.wav"); - ambient_sfx[AMBIENT_SKY] = S_PrecacheSound ("ambience/wind2.wav"); + //ambient_sfx[AMBIENT_WATER] = S_PrecacheSound ("ambience/water1.wav"); + //ambient_sfx[AMBIENT_SKY] = S_PrecacheSound ("ambience/wind2.wav"); S_StopAllSounds (true); } diff --git a/source/snd_mem.c b/source/snd_mem.c index 71e32aa..b471a66 100644 --- a/source/snd_mem.c +++ b/source/snd_mem.c @@ -111,8 +111,7 @@ sfxcache_t *S_LoadSound (sfx_t *s) //Con_Printf ("S_LoadSound: %x\n", (int)stackbuf); // load it in - Q_strcpy(namebuffer, "sound/"); - Q_strcat(namebuffer, s->name); + Q_strcpy(namebuffer, s->name); // Con_Printf ("loading %s\n",namebuffer); diff --git a/source/sv_phys.c b/source/sv_phys.c index e13c0e4..70cdd8b 100644 --- a/source/sv_phys.c +++ b/source/sv_phys.c @@ -1219,7 +1219,7 @@ void SV_CheckWaterTransition (edict_t *ent) { if (ent->v.watertype == CONTENTS_EMPTY) { // just crossed into water - SV_StartSound (ent, 0, "misc/h2ohit1.wav", 255, 1); + //SV_StartSound (ent, 0, "misc/h2ohit1.wav", 255, 1); } ent->v.watertype = cont; ent->v.waterlevel = 1; @@ -1228,7 +1228,7 @@ void SV_CheckWaterTransition (edict_t *ent) { if (ent->v.watertype != CONTENTS_EMPTY) { // just crossed into water - SV_StartSound (ent, 0, "misc/h2ohit1.wav", 255, 1); + //SV_StartSound (ent, 0, "misc/h2ohit1.wav", 255, 1); } ent->v.watertype = CONTENTS_EMPTY; ent->v.waterlevel = cont;