Skip to content

Commit

Permalink
Merge branch 'devil'
Browse files Browse the repository at this point in the history
  • Loading branch information
zturtleman committed Oct 11, 2017
2 parents 98d9570 + 9675aaa commit 14b1400
Show file tree
Hide file tree
Showing 36 changed files with 661 additions and 1,325 deletions.
37 changes: 3 additions & 34 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ endif
export CROSS_COMPILING

ifndef VERSION
VERSION=0.4
VERSION=0.5
endif

ifndef CLIENTBIN
Expand All @@ -109,7 +109,7 @@ APPBUNDLE=Spearmint.app
endif

ifndef RENDERER_PREFIX
RENDERER_PREFIX=mint-renderer-
RENDERER_PREFIX=spearmint-renderer-
endif

ifndef BASEGAME
Expand Down Expand Up @@ -1123,6 +1123,7 @@ endif

BASE_CFLAGS += -DPRODUCT_VERSION=\\\"$(VERSION)\\\"
BASE_CFLAGS += -DBASEGAME=\\\"$(BASEGAME)\\\"
BASE_CFLAGS += -DRENDERER_PREFIX=\\\"$(RENDERER_PREFIX)\\\"
BASE_CFLAGS += -Wformat=2 -Wno-format-zero-length -Wformat-security -Wno-format-nonliteral
BASE_CFLAGS += -Wstrict-aliasing=2 -Wmissing-format-attribute
BASE_CFLAGS += -Wdisabled-optimization
Expand Down Expand Up @@ -1406,22 +1407,6 @@ Q3OBJ = \
$(B)/client/vm.o \
$(B)/client/vm_interpreted.o \
\
$(B)/client/be_aas_bspq3.o \
$(B)/client/be_aas_cluster.o \
$(B)/client/be_aas_debug.o \
$(B)/client/be_aas_entity.o \
$(B)/client/be_aas_file.o \
$(B)/client/be_aas_main.o \
$(B)/client/be_aas_move.o \
$(B)/client/be_aas_optimize.o \
$(B)/client/be_aas_reach.o \
$(B)/client/be_aas_route.o \
$(B)/client/be_aas_routealt.o \
$(B)/client/be_aas_sample.o \
$(B)/client/be_interface.o \
$(B)/client/l_crc.o \
$(B)/client/l_libvar.o \
$(B)/client/l_log.o \
$(B)/client/l_memory.o \
$(B)/client/l_precomp.o \
$(B)/client/l_script.o \
Expand Down Expand Up @@ -1987,22 +1972,6 @@ Q3DOBJ = \
$(B)/ded/vm.o \
$(B)/ded/vm_interpreted.o \
\
$(B)/ded/be_aas_bspq3.o \
$(B)/ded/be_aas_cluster.o \
$(B)/ded/be_aas_debug.o \
$(B)/ded/be_aas_entity.o \
$(B)/ded/be_aas_file.o \
$(B)/ded/be_aas_main.o \
$(B)/ded/be_aas_move.o \
$(B)/ded/be_aas_optimize.o \
$(B)/ded/be_aas_reach.o \
$(B)/ded/be_aas_route.o \
$(B)/ded/be_aas_routealt.o \
$(B)/ded/be_aas_sample.o \
$(B)/ded/be_interface.o \
$(B)/ded/l_crc.o \
$(B)/ded/l_libvar.o \
$(B)/ded/l_log.o \
$(B)/ded/l_memory.o \
$(B)/ded/l_precomp.o \
$(B)/ded/l_script.o \
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Pre-built packages for Windows, GNU/Linux, and Mac OS X are available at the [Sp

## Git branches

* `master` branch is compatible with Spearmint 0.4.
* `master` branch is compatible with Spearmint 0.5.
* `devil` branch is for development (devil-op-mint) that is not compatible with the current release — it may be out of date compared to master.
* `coverity_scan` branch is for automatically running [Coverity Scan](https://scan.coverity.com/) on [Travis CI](https://travis-ci.org).
* `gh-pages` branch is the [Spearmint website](http://spearmint.pw).
Expand Down
6 changes: 3 additions & 3 deletions code/botlib/be_aas_bspq3.c
Original file line number Diff line number Diff line change
Expand Up @@ -248,13 +248,13 @@ int AAS_ValueForBSPEpairKey(int ent, char *key, char *value, int size)
int AAS_VectorForBSPEpairKey(int ent, char *key, vec3_t v)
{
char buf[MAX_EPAIRKEY];
float v1, v2, v3;
double v1, v2, v3;

VectorClear(v);
if (!AAS_ValueForBSPEpairKey(ent, key, buf, MAX_EPAIRKEY)) return qfalse;
//scanf into floats, then assign, so it is vec_t size independent
//scanf into doubles, then assign, so it is vec_t size independent
v1 = v2 = v3 = 0;
sscanf(buf, "%f %f %f", &v1, &v2, &v3);
sscanf(buf, "%lf %lf %lf", &v1, &v2, &v3);
v[0] = v1;
v[1] = v2;
v[2] = v3;
Expand Down
54 changes: 43 additions & 11 deletions code/botlib/be_aas_debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ Suite 120, Rockville, Maryland 20850 USA.
*****************************************************************************/

#include "../qcommon/q_shared.h"
#include "../qcommon/surfaceflags.h" // for CONTENTS_* used by BOTMASK_SOLID
#include "l_memory.h"
#include "aasfile.h"
#include "botlib.h"
Expand Down Expand Up @@ -547,6 +546,43 @@ void AAS_DrawCross(vec3_t origin, float size, int color)
// Returns: -
// Changes Globals: -
//===========================================================================
void AAS_PrintTravelType(int traveltype)
{
char *str;
//
switch(traveltype & TRAVELTYPE_MASK)
{
case TRAVEL_INVALID: str = "TRAVEL_INVALID"; break;
case TRAVEL_WALK: str = "TRAVEL_WALK"; break;
case TRAVEL_CROUCH: str = "TRAVEL_CROUCH"; break;
case TRAVEL_BARRIERJUMP: str = "TRAVEL_BARRIERJUMP"; break;
case TRAVEL_JUMP: str = "TRAVEL_JUMP"; break;
case TRAVEL_LADDER: str = "TRAVEL_LADDER"; break;
case TRAVEL_WALKOFFLEDGE: str = "TRAVEL_WALKOFFLEDGE"; break;
case TRAVEL_SWIM: str = "TRAVEL_SWIM"; break;
case TRAVEL_WATERJUMP: str = "TRAVEL_WATERJUMP"; break;
case TRAVEL_TELEPORT: str = "TRAVEL_TELEPORT"; break;
case TRAVEL_ELEVATOR: str = "TRAVEL_ELEVATOR"; break;
case TRAVEL_ROCKETJUMP: str = "TRAVEL_ROCKETJUMP"; break;
case TRAVEL_BFGJUMP: str = "TRAVEL_BFGJUMP"; break;
case TRAVEL_GRAPPLEHOOK: str = "TRAVEL_GRAPPLEHOOK"; break;
case TRAVEL_DOUBLEJUMP: str = "TRAVEL_DOUBLEJUMP"; break;
case TRAVEL_RAMPJUMP: str = "TRAVEL_RAMPJUMP"; break;
case TRAVEL_STRAFEJUMP: str = "TRAVEL_STRAFEJUMP"; break;
case TRAVEL_JUMPPAD: str = "TRAVEL_JUMPPAD"; break;
case TRAVEL_FUNCBOB: str = "TRAVEL_FUNCBOB"; break;
default:
botimport.Print(PRT_MESSAGE, S_COLOR_RED "UNKNOWN TRAVEL TYPE (%d)" S_COLOR_WHITE, (traveltype & TRAVELTYPE_MASK));
return;
} //end switch
botimport.Print(PRT_MESSAGE, "%s", str);
} //end of the function AAS_PrintTravelType
//===========================================================================
//
// Parameter: -
// Returns: -
// Changes Globals: -
//===========================================================================
void AAS_DrawArrow(vec3_t start, vec3_t end, int linecolor, int arrowcolor)
{
vec3_t dir, cross, p1, p2, up = {0, 0, 1};
Expand All @@ -573,12 +609,11 @@ void AAS_DrawArrow(vec3_t start, vec3_t end, int linecolor, int arrowcolor)
// Returns: -
// Changes Globals: -
//===========================================================================
void AAS_ShowReachability(aas_reachability_t *reach)
void AAS_ShowReachability(aas_reachability_t *reach, int contentmask)
{
vec3_t dir, cmdmove, velocity;
float speed, zvel;
aas_clientmove_t move;
int contentmask = BOTMASK_SOLID; // ZTM: FIXME: Get contentmask from Game VM!

AAS_ShowAreaPolygons(reach->areanum, 5, qtrue);
//AAS_ShowArea(reach->areanum, qtrue);
Expand Down Expand Up @@ -656,8 +691,7 @@ void AAS_ShowReachability(aas_reachability_t *reach)
// Returns: -
// Changes Globals: -
//===========================================================================
#ifdef DEBUG
void AAS_ShowReachableAreas(int areanum)
void AAS_ShowReachableAreas(int areanum, int contentmask)
{
aas_areasettings_t *settings;
static aas_reachability_t reach;
Expand All @@ -680,13 +714,11 @@ void AAS_ShowReachableAreas(int areanum)
Com_Memcpy(&reach, &aasworld.reachability[settings->firstreachablearea + index], sizeof(aas_reachability_t));
index++;
lasttime = AAS_Time();
// ZTM: FIXME: Moved AAS_PrintTravelType to game/ai_move.c as BotPrintTravelType
//AAS_PrintTravelType(reach.traveltype & TRAVELTYPE_MASK);
//botimport.Print(PRT_MESSAGE, "\n");
AAS_PrintTravelType(reach.traveltype & TRAVELTYPE_MASK);
botimport.Print(PRT_MESSAGE, "\n");
} //end if
AAS_ShowReachability(&reach);
} //end of the function ShowReachableAreas
#endif
AAS_ShowReachability(&reach, contentmask);
} //end of the function AAS_ShowReachableAreas

void AAS_FloodAreas_r(int areanum, int cluster, int *done)
{
Expand Down
8 changes: 6 additions & 2 deletions code/botlib/be_aas_debug.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,14 @@ void AAS_ShowArea(int areanum, int groundfacesonly);
void AAS_ShowAreaPolygons(int areanum, int color, int groundfacesonly);
//draw a cros
void AAS_DrawCross(vec3_t origin, float size, int color);
//print the travel type
void AAS_PrintTravelType(int traveltype);
//draw an arrow
void AAS_DrawArrow(vec3_t start, vec3_t end, int linecolor, int arrowcolor);
//visualize the given reachability
void AAS_ShowReachability(struct aas_reachability_s *reach);
void AAS_ShowReachability(struct aas_reachability_s *reach, int contentmask);
//show the reachable areas from the given area
void AAS_ShowReachableAreas(int areanum);
void AAS_ShowReachableAreas(int areanum, int contentmask);
//
void AAS_FloodAreas(vec3_t origin);

Loading

0 comments on commit 14b1400

Please sign in to comment.