|
resonance 1.0.1
|
#include <cstring>#include "app/tunnelcache.h"#include "math/color.h"#include "math/transform.h"#include "os/hxstr.h"#include "rnd/transformable.h"#include "rnd/tunnel.h"
Go to the source code of this file.
Functions | |
| Color | TnlColorFromName (const HxStr &name) |
| Map a player colour name to the colour the tunnel draws that player in. | |
| Color | TnlDimColorFromName (HxStr name) |
| Map a player colour name to a darker form of TnlColorFromName(). | |
| Color | TnlLaneColorFromName (HxStr name) |
| Map a player colour name to the lane floor colour, scaled by g_flTunnelBrightness. | |
| int | TnlColorIndexFromName (HxStr name) |
| Map a player colour name to its index. | |
| void | PadTransformRows (Transform &xfm) |
| Set the padding word of every row of a transform to 1. | |
| void | PlaceOnPath (Rnd::Transformable &trans, float flFrame) |
| Move a transformable to the tunnel path transform at one frame. | |
| void | PlaceOnRing (Rnd::Transformable &trans, int nRing, float flFrame, float flBlend) |
| Move a transformable onto one ring of the tunnel at one frame, pushed outwards by 0.97. | |
Variables | |
| int | g_nAppTunnelTutorial |
| Non-zero when AppTunnel was constructed for a tutorial level, from configuration code 0x3a1. | |
| float | g_flTunnelBrightness |
| The brightness the lane floor colours are scaled by. | |
Map a player colour name to the colour the tunnel draws that player in.
"green" gives green, "red" red, "yellow" yellow, "purple" (0.65, 0, 1), and "null" white. Every other name gives cyan. The alpha is always 1. The title is inferred from the five literals the routine compares against.
The name is taken by reference. TnlBumpFX::Start() passes its parameter straight through with no copy, which a by-value parameter here would require.
| name | The colour name. |
Map a player colour name to a darker form of TnlColorFromName().
The primary components are 0.7 rather than 1, "purple" gives (0.5, 0, 0.7), and "null" gives grey 0.7. Every other name gives cyan, and the alpha is always 1. The image has no caller.
| name | The colour name, taken by value. |
Map a player colour name to the lane floor colour, scaled by g_flTunnelBrightness.
The primary components are 0.5, "purple" gives (0.325, 0, 0.5), and "null" gives (0, 0, 0.25), each scaled through ScaleColor(). Every other name gives unscaled white.
| name | The colour name, taken by value. |
| int TnlColorIndexFromName | ( | HxStr | name | ) |
Map a player colour name to its index.
"null" gives 0, "green" 1, "red" 2, "yellow" 3, and "purple" 4. Every other name gives 0. The program lists no caller.
| name | The colour name, taken by value. |
|
inline |
Set the padding word of every row of a transform to 1.
Matches the Vector3 constructor the image runs on each row of a stack transform before handing it to Rnd::Tunnel. No other word of the transform is written.
| xfm | The transform to pad. |
|
inline |
Move a transformable to the tunnel path transform at one frame.
The local transform takes the path transform with its rows padded, the object is marked dirty, and its world transform is recomposed at once. TnlBoundary inlines it. The out-of-line copy has no callers.
| trans | The object to move. |
| flFrame | The path frame. |
|
inline |
Move a transformable onto one ring of the tunnel at one frame, pushed outwards by 0.97.
The same sequence as PlaceOnPath() over Rnd::Tunnel::ProjectSectionToCameraSpace(). TnlGridMarkers inlines it. The out-of-line copy has no callers.
| trans | The object to move. |
| nRing | The ring. |
| flFrame | The path frame. |
| flBlend | The weight of the next ring's translation. |
|
extern |
Non-zero when AppTunnel was constructed for a tutorial level, from configuration code 0x3a1.
AppTunnel's constructor writes it at 0x00442344. A non-zero value stops TnlActivator::Update() from blinking the activator and catcher materials.
|
extern |
The brightness the lane floor colours are scaled by.
AppTunnel's constructor sets it to 2 for a game of two to four players, which use the split-screen tunnel, and to 1 otherwise, when it also adds "lat light1" to "tunnel.env".