Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 50 additions & 7 deletions Core/GameEngine/Include/GameClient/ParticleSys.h
Original file line number Diff line number Diff line change
Expand Up @@ -479,43 +479,86 @@ class ParticleSystemInfo : public Snapshot

static const char *const ParticleShaderTypeNames[] =
{
"NONE", "ADDITIVE", "ALPHA", "ALPHA_TEST", "MULTIPLY", nullptr
"NONE",
"ADDITIVE",
"ALPHA",
"ALPHA_TEST",
"MULTIPLY",
nullptr
};
static_assert(ARRAY_SIZE(ParticleShaderTypeNames) == ParticleSystemInfo::PARTICLE_SHADER_TYPE_COUNT + 1, "Incorrect array size");

static const char *const ParticleTypeNames[] =
{
"NONE", "PARTICLE", "DRAWABLE", "STREAK", "VOLUME_PARTICLE", "SMUDGE", nullptr
"NONE",
"PARTICLE",
"DRAWABLE",
"STREAK",
"VOLUME_PARTICLE",
"SMUDGE",
nullptr
};
static_assert(ARRAY_SIZE(ParticleTypeNames) == ParticleSystemInfo::PARTICLE_TYPE_COUNT + 1, "Incorrect array size");

static const char *const EmissionVelocityTypeNames[] =
{
"NONE", "ORTHO", "SPHERICAL", "HEMISPHERICAL", "CYLINDRICAL", "OUTWARD", nullptr
"NONE",
"ORTHO",
"SPHERICAL",
"HEMISPHERICAL",
"CYLINDRICAL",
"OUTWARD",
nullptr
};
static_assert(ARRAY_SIZE(EmissionVelocityTypeNames) == ParticleSystemInfo::EMISSION_VELOCITY_TYPE_COUNT + 1, "Incorrect array size");

static const char *const EmissionVolumeTypeNames[] =
{
"NONE", "POINT", "LINE", "BOX", "SPHERE", "CYLINDER", nullptr
"NONE",
"POINT",
"LINE",
"BOX",
"SPHERE",
"CYLINDER",
nullptr
};
static_assert(ARRAY_SIZE(EmissionVolumeTypeNames) == ParticleSystemInfo::EMISSION_VOLUME_TYPE_COUNT + 1, "Incorrect array size");

static const char *const ParticlePriorityNames[] =
{
"NONE", "WEAPON_EXPLOSION","SCORCHMARK","DUST_TRAIL","BUILDUP","DEBRIS_TRAIL","UNIT_DAMAGE_FX","DEATH_EXPLOSION","SEMI_CONSTANT","CONSTANT","WEAPON_TRAIL","AREA_EFFECT","CRITICAL", "ALWAYS_RENDER", nullptr
"NONE",
"WEAPON_EXPLOSION",
"SCORCHMARK",
"DUST_TRAIL",
"BUILDUP",
"DEBRIS_TRAIL",
"UNIT_DAMAGE_FX",
"DEATH_EXPLOSION",
"SEMI_CONSTANT",
"CONSTANT",
"WEAPON_TRAIL",
"AREA_EFFECT",
"CRITICAL",
"ALWAYS_RENDER",
nullptr
};
static_assert(ARRAY_SIZE(ParticlePriorityNames) == NUM_PARTICLE_PRIORITIES + 1, "Incorrect array size");

static const char *const GroundAlignmentTypeNames[] =
{
"No", "Yes", nullptr
"No",
"Yes",
nullptr
};
static_assert(ARRAY_SIZE(GroundAlignmentTypeNames) == ParticleSystemInfo::PARTICLE_ALIGNMENT_TYPE_COUNT + 1, "Incorrect array size");

static const char *const WindMotionNames[] =
{
"NONE", "Unused", "PingPong", "Circular", nullptr
"NONE",
"Unused",
"PingPong",
"Circular",
nullptr
};
static_assert(ARRAY_SIZE(WindMotionNames) == ParticleSystemInfo::WIND_MOTION_COUNT + 1, "Incorrect array size");

Expand Down
66 changes: 50 additions & 16 deletions Core/GameEngine/Source/GameClient/GUI/GameWindowManagerScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,22 +136,56 @@ static GameFont *defFont = nullptr;
// These strings must be in the same order as they are in their definitions
// (see WIN_STATUS_* enums and GWS_* enums).
//
const char *const WindowStatusNames[] = { "ACTIVE", "TOGGLE", "DRAGABLE", "ENABLED", "HIDDEN",
"ABOVE", "BELOW", "IMAGE", "TABSTOP", "NOINPUT",
"NOFOCUS", "DESTROYED", "BORDER",
"SMOOTH_TEXT", "ONE_LINE", "NO_FLUSH", "SEE_THRU",
"RIGHT_CLICK", "WRAP_CENTERED", "CHECK_LIKE","HOTKEY_TEXT",
"USE_OVERLAY_STATES", "NOT_READY", "FLASHING", "ALWAYS_COLOR",
"ON_MOUSE_DOWN", /*"SHORTCUT_BUTTON",*/
nullptr };

const char *const WindowStyleNames[] = { "PUSHBUTTON", "RADIOBUTTON", "CHECKBOX",
"VERTSLIDER", "HORZSLIDER", "SCROLLLISTBOX",
"ENTRYFIELD", "STATICTEXT", "PROGRESSBAR",
"USER", "MOUSETRACK", "ANIMATED",
"TABSTOP", "TABCONTROL", "TABPANE",
"COMBOBOX",
nullptr };
const char *const WindowStatusNames[] = {
"ACTIVE",
"TOGGLE",
"DRAGABLE",
"ENABLED",
"HIDDEN",
"ABOVE",
"BELOW",
"IMAGE",
"TABSTOP",
"NOINPUT",
"NOFOCUS",
"DESTROYED",
"BORDER",
"SMOOTH_TEXT",
"ONE_LINE",
"NO_FLUSH",
"SEE_THRU",
"RIGHT_CLICK",
"WRAP_CENTERED",
"CHECK_LIKE",
"HOTKEY_TEXT",
"USE_OVERLAY_STATES",
"NOT_READY",
"FLASHING",
"ALWAYS_COLOR",
"ON_MOUSE_DOWN",
/*"SHORTCUT_BUTTON",*/
nullptr
};

const char *const WindowStyleNames[] = {
"PUSHBUTTON",
"RADIOBUTTON",
"CHECKBOX",
"VERTSLIDER",
"HORZSLIDER",
"SCROLLLISTBOX",
"ENTRYFIELD",
"STATICTEXT",
"PROGRESSBAR",
"USER",
"MOUSETRACK",
"ANIMATED",
"TABSTOP",
"TABCONTROL",
"TABPANE",
"COMBOBOX",
nullptr
};

// Implement a stack to keep track of parent/child nested window descriptions.
static GameWindow *windowStack[ WIN_STACK_DEPTH ];
Expand Down
42 changes: 34 additions & 8 deletions Core/GameEngine/Source/GameLogic/AI/AIPathfind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5517,7 +5517,12 @@ Bool Pathfinder::adjustDestination(Object *obj, const LocomotorSet& locomotorSet
//
Int limit = MAX_ADJUSTMENT_CELL_COUNT;
Int segmentLength = 1;
const ICoord2D directions[4] = { {1, 0}, {0, 1}, {-1, 0}, {0, -1} };
const ICoord2D directions[4] = {
{1, 0},
{0, 1},
{-1, 0},
{0, -1}
};
while (limit>0) {
for (Int dir = 0; dir < 4; dir++) {
for (Int count = segmentLength; count>0; count--) {
Expand Down Expand Up @@ -6235,8 +6240,14 @@ Int Pathfinder::examineNeighboringCells(PathfindCell *parentCell, PathfindCell *
// expand search to neighboring orthogonal cells
static ICoord2D delta[] =
{
{ 1, 0 }, { 0, 1 }, { -1, 0 }, { 0, -1 },
{ 1, 1 }, { -1, 1 }, { -1, -1 }, { 1, -1 }
{ 1, 0 },
{ 0, 1 },
{ -1, 0 },
{ 0, -1 },
{ 1, 1 },
{ -1, 1 },
{ -1, -1 },
{ 1, -1 }
};
const Int numNeighbors = 8;
const Int firstDiagonal = 4;
Expand Down Expand Up @@ -7252,8 +7263,14 @@ Path *Pathfinder::findGroundPath( const Coord3D *from,
// expand search to neighboring orthogonal cells
static ICoord2D delta[] =
{
{ 1, 0 }, { 0, 1 }, { -1, 0 }, { 0, -1 },
{ 1, 1 }, { -1, 1 }, { -1, -1 }, { 1, -1 }
{ 1, 0 },
{ 0, 1 },
{ -1, 0 },
{ 0, -1 },
{ 1, 1 },
{ -1, 1 },
{ -1, -1 },
{ 1, -1 }
};
const Int numNeighbors = 8;
const Int firstDiagonal = 4;
Expand Down Expand Up @@ -8524,8 +8541,14 @@ Int Pathfinder::checkPathCost(Object *obj, const LocomotorSet& locomotorSet, con
// expand search to neighboring orthogonal cells
static ICoord2D delta[] =
{
{ 1, 0 }, { 0, 1 }, { -1, 0 }, { 0, -1 },
{ 1, 1 }, { -1, 1 }, { -1, -1 }, { 1, -1 }
{ 1, 0 },
{ 0, 1 },
{ -1, 0 },
{ 0, -1 },
{ 1, 1 },
{ -1, 1 },
{ -1, -1 },
{ 1, -1 }
};
const Int numNeighbors = 8;
const Int firstDiagonal = 4;
Expand Down Expand Up @@ -9628,7 +9651,10 @@ Bool Pathfinder::segmentIntersectsTallBuilding(const PathNode *curNode,
Bool Pathfinder::circleClipsTallBuilding( const Coord3D *from, const Coord3D *to, Real circleRadius, ObjectID ignoreBuilding, Coord3D *adjustTo)
{
PartitionFilterAcceptByKindOf filterKindof(MAKE_KINDOF_MASK(KINDOF_AIRCRAFT_PATH_AROUND), KINDOFMASK_NONE);
PartitionFilter *filters[] = { &filterKindof, nullptr };
PartitionFilter *filters[] = {
&filterKindof,
nullptr
};
Object* tallBuilding = ThePartitionManager->getClosestObject(to, circleRadius, FROM_BOUNDINGSPHERE_2D, filters);
if (tallBuilding) {
Real radius = tallBuilding->getGeometryInfo().getBoundingCircleRadius() + 2*PATHFIND_CELL_SIZE_F;
Expand Down
38 changes: 32 additions & 6 deletions Core/GameEngine/Source/GameNetwork/GameSpy/Thread/PeerThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,10 +328,23 @@ class PeerThreadClass : public ThreadClass
};

#ifdef USE_BROADCAST_KEYS
const char* PeerThreadClass::s_keys[6] = { "b_locale", "b_wins", "b_losses", "b_points", "b_side", "b_pre" };
const char* PeerThreadClass::s_keys[6] = {
"b_locale",
"b_wins",
"b_losses",
"b_points",
"b_side",
"b_pre"
};
char PeerThreadClass::s_valueBuffers[6][20] = { "", "", "", "", "", "" };
const char* PeerThreadClass::s_values[6] = { s_valueBuffers[0], s_valueBuffers[1], s_valueBuffers[2],
s_valueBuffers[3], s_valueBuffers[4], s_valueBuffers[5]};
const char* PeerThreadClass::s_values[6] = {
s_valueBuffers[0],
s_valueBuffers[1],
s_valueBuffers[2],
s_valueBuffers[3],
s_valueBuffers[4],
s_valueBuffers[5]
};

void PeerThreadClass::trackStatsForPlayer(RoomType roomType, const char *nick, const char *key, const char *val)
{
Expand Down Expand Up @@ -1502,10 +1515,23 @@ void PeerThreadClass::Thread_Function()
snprintf(s_valueBuffers[5], 20, "%d", incomingRequest.statsToPush.preorder);
pushStatsToRoom(peer);
#else
const char *keys[6] = { "locale", "wins", "losses", "points", "side", "pre" };
const char *keys[6] = {
"locale",
"wins",
"losses",
"points",
"side",
"pre"
};
char valueStrings[6][20];
char *values[6] = { valueStrings[0], valueStrings[1], valueStrings[2],
valueStrings[3], valueStrings[4], valueStrings[5]};
char *values[6] = {
valueStrings[0],
valueStrings[1],
valueStrings[2],
valueStrings[3],
valueStrings[4],
valueStrings[5]
};
snprintf(values[0], 20, "%d", incomingRequest.statsToPush.locale);
snprintf(values[1], 20, "%d", incomingRequest.statsToPush.wins);
snprintf(values[2], 20, "%d", incomingRequest.statsToPush.losses);
Expand Down
14 changes: 13 additions & 1 deletion Core/Libraries/Source/WWVegas/WW3D2/htree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1078,7 +1078,19 @@ HTreeClass * HTreeClass::Alter_Avatar_HTree( const HTreeClass *tree, Vector3 &sc
// being stretched out on the Y-axis instead of the Z-axis like the rest of the bodies. Hence, the list of pivots
// below are ones that I will special case and scale them based on the Z-axis scaling factor instead of the Y-axis
// scaling factor.
const char * flip_list[] = { " RIGHTFOREARM", " RIGHTHAND", " LEFTFOREARM", " LEFTHAND", "RIGHTINDEX", "RIGHTFINGERS", "RIGHTTHUMB", "LEFTINDEX", "LEFTFINGERS", "LEFTTHUMB", nullptr };
const char * flip_list[] = {
" RIGHTFOREARM",
" RIGHTHAND",
" LEFTFOREARM",
" LEFTHAND",
"RIGHTINDEX",
"RIGHTFINGERS",
"RIGHTTHUMB",
"LEFTINDEX",
"LEFTFINGERS",
"LEFTTHUMB",
nullptr
};

// Clone the new tree with the tree that is passed in
HTreeClass * new_tree = new HTreeClass( *tree );
Expand Down
59 changes: 49 additions & 10 deletions Core/Tools/mangler/wlib/wtime.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,55 @@ wtime Neal Kettler
#include <ctype.h>
#include "wtime.h"

static const char *DAYS[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};

static const char *FULLDAYS[]={"Sunday","Monday","Tuesday","Wednesday","Thursday",
"Friday","Saturday"};

static const char *MONTHS[]={"Jan","Feb","Mar","Apr","May","Jun","Jul",
"Aug","Sep","Oct","Nov","Dec"};

static const char *FULLMONTHS[]={"January","February","March","April","May","June",
"July","August","September","October","November","December"};
static const char *DAYS[] = {
"Sun",
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat"
};

static const char *FULLDAYS[] = {
"Sunday",
"Monday",
"Tuesday",
"Wednesday",
"Thursday",
"Friday",
"Saturday"
};

static const char *MONTHS[] = {
"Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
"Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec"
};

static const char *FULLMONTHS[] = {
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
};

// MDC: Windows doesn't provide a localtime_r, so make our own...
#ifdef _WIN32
Expand Down
Loading
Loading