1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
//===========================================================================
// Copyright (C) 2002 Radical Entertainment Ltd. All rights reserved.
//
// Component: No component
//
// Description: string names of blobby shadows and the meshes they match up with
//
// Authors: Michael Riegger
//
//===========================================================================
// Recompilation protection flag.
#ifndef BLOBSHADOWNAMES_H
#define BLOBSHADOWNAMES_H
//===========================================================================
// Nested Includes
//===========================================================================
//===========================================================================
// Forward References
//===========================================================================
//===========================================================================
// Constants, Typedefs, and Macro Definitions (needed by external clients)
//===========================================================================
//===========================================================================
// Interface Definitions
//===========================================================================
namespace BlobbyShadowNames
{
struct BlobbyShadows
{
const char* searchString;
const char* drawableName;
};
const BlobbyShadows shadowList[] =
{
{ "treesmdead", "deadtree_shadowShape" },
{ "treedead", "deadtree_shadowShape" },
{ "treesm", "treeshadowsmall" },
{ "treebig", "treeshadowbig" },
{ "treeevermed", "treeshadoweversmallShape" },
{ "treecypress", "treeshadowsmall" },
{ "l5_streetlampold_Shape","l5_streetlamp_lightpoolShape" },
{ "l5_oldstreetlamp_Shape","l5_streetlamp_lightpoolShape" }
};
// Retrieve the name of the tDrawable that
// is associated with the shadow identifier substring
// When an object is loaded, call FindShadowName to
// determine if a shadow needs to be placed under it
inline const char* FindShadowName( const char* objectName )
{
const int NUM_SHADOW_NAMES = sizeof( shadowList ) / sizeof( shadowList[0] );
const char* result = NULL;
for (int i = 0 ; i < NUM_SHADOW_NAMES ; i++)
{
if ( strstr( objectName, shadowList[i].searchString ) )
{
result = shadowList[i].drawableName;
break;
}
}
return result;
}
};
#endif
|