|
resonance 1.0.1
|
Flash that lifts one tunnel panel out of the wall and fades it away. More...
#include <tnlpanelfx.h>
Public Member Functions | |
| TnlPanelFX (int nIndex) | |
| Build the panel mesh and resolve the material for one panel slot. | |
| ~TnlPanelFX () | |
| Take the mesh out of "tnl transparent" and delete it. | |
| void | Start (int nRing, int nSlice, int nForward) |
| Show the panel over one ring section and begin the rise phase. | |
| void | Update (float flFrame) |
| Advance the phase the panel is in. | |
| bool | IsIdle () const |
| Report whether the panel waits for Start(). | |
Flash that lifts one tunnel panel out of the wall and fades it away.
The class is not polymorphic and emits no RTTI, and no allocation tag or file path identifies it. The name is inferred from its mesh name prefix "pnl", from the "tunnel erase%d" material it draws with, and from the delayed-panel record at 0x00457648 that fires it through AppTunnel.
Start() copies the geometry of one ring section onto a private mesh and places it in "tnl transparent". Update() then runs three timed phases. The panel slides from its offset position onto the tunnel wall while it fades in, stays with an additive blend, and fades out before the mesh drops back to its empty faces.
AppTunnel allocates one per entry of its panel vector at +0x3c, 0x30 bytes each.
|
explicit |
Build the panel mesh and resolve the material for one panel slot.
The mesh name is "pnl" followed by NextAppTunnelName(). The mesh reads Z without writing it, does not draw until Start(), and is added to "tnl transparent". The material is "tunnel erase<nIndex>". When no such material is loaded, a new one of that name is created as a copy of "tunnel erase0".
| nIndex | The panel slot, also the material number. |
|
inline |
Take the mesh out of "tnl transparent" and delete it.
AppTunnel's destructor inlines the body. The deleting copy at 0x00456418 has no caller.
| void TnlPanelFX::Start | ( | int | nRing, |
| int | nSlice, | ||
| int | nForward ) |
Show the panel over one ring section and begin the rise phase.
The mesh shares the faces of the ring section and copies its vertices. The path frame is the middle of the bar, nSlice * 1920 + 960. mOffset becomes the ring point halfway to the next ring less the path origin at the same frame.
| nRing | The ring of the section. |
| nSlice | The slice of the section, also the bar. |
| nForward | Non-zero to rise along mOffset, zero to rise against it. |
| void TnlPanelFX::Update | ( | float | flFrame | ) |
Advance the phase the panel is in.
While idle the routine only records flFrame. The rise lasts 200 frames and moves the mesh origin from mOffset * mDirection to zero while the alpha climbs twice as fast as the phase. The hold lasts 400 frames with an additive blend and the fade 200 frames, and both take the alpha from 1 to 0. The end of the fade hides the mesh and makes it the owner of its faces again.
| flFrame | The current frame. |
|
inline |