port from perforce

This commit is contained in:
2026-04-18 22:31:51 +02:00
commit 8d0ab5b7cc
8409 changed files with 3972376 additions and 0 deletions

927
evoke-64k/bp10/scenes.h Normal file
View File

@@ -0,0 +1,927 @@
struct SVertexBSOD
{
FLOAT x, y, z, w;
FLOAT tx, ty;
};
const DWORD c_dwFVFBSOD= D3DFVF_XYZRHW|D3DFVF_TEX1;
SVertexBSOD g_VertChuck[]=
{
{ 256.0f, 32.0f, 0.9f, 1.0f, 0.0f, 0.0f },
{ 256.0f, 32.0f + 512.0f, 0.9f, 1.0f, 0.0f, 1.0f },
{ 256.0f + 512.0f, 32.0f, 0.9f, 1.0f, 1.0f, 0.0f },
{ 256.0f + 512.0f, 32.0f + 512.0f, 0.9f, 1.0f, 1.0f, 1.0f },
};
void RenderGyver()
{
g_d3d_device->SetRenderState( D3DRS_ZENABLE, FALSE );
g_d3d_device->SetRenderState( D3DRS_ALPHATESTENABLE, TRUE );
g_d3d_device->SetRenderState( D3DRS_ALPHAFUNC, D3DCMP_GREATER );
g_d3d_device->SetRenderState( D3DRS_ALPHAREF, 0x80 );
g_d3d_device->SetRenderState( D3DRS_CULLMODE, 2 );
g_d3d_device->SetSamplerState(0,D3DSAMP_MAGFILTER, D3DTEXF_POINT);
g_d3d_device->SetSamplerState(0,D3DSAMP_MINFILTER, D3DTEXF_POINT);
//g_d3d_device->Clear( 0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER, g_dwColorTable[ 23 ], 1.0f, 0 );
g_d3d_device->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
g_d3d_device->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 );
g_d3d_device->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE );
g_d3d_device->SetTexture( 0, g_pGyver );
g_d3d_device->SetFVF( c_dwFVFBSOD );
g_d3d_device->DrawPrimitiveUP(
D3DPT_TRIANGLESTRIP,
2,
g_VertChuck,
sizeof( SVertexBSOD )
);
g_d3d_device->SetRenderState( D3DRS_ZENABLE, TRUE );
g_d3d_device->SetRenderState( D3DRS_ALPHATESTENABLE, FALSE );
}
void RenderChuck()
{
g_d3d_device->SetRenderState( D3DRS_ZENABLE, FALSE );
g_d3d_device->SetRenderState( D3DRS_ALPHATESTENABLE, TRUE );
g_d3d_device->SetRenderState( D3DRS_ALPHAFUNC, D3DCMP_GREATER );
g_d3d_device->SetRenderState( D3DRS_ALPHAREF, 0x80 );
g_d3d_device->SetRenderState( D3DRS_CULLMODE, 2 );
g_d3d_device->SetSamplerState(0,D3DSAMP_MAGFILTER, D3DTEXF_POINT);
g_d3d_device->SetSamplerState(0,D3DSAMP_MINFILTER, D3DTEXF_POINT);
//g_d3d_device->Clear( 0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER, g_dwColorTable[ 23 ], 1.0f, 0 );
g_d3d_device->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
g_d3d_device->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 );
g_d3d_device->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE );
g_d3d_device->SetTexture( 0, g_pChuck );
g_d3d_device->SetFVF( c_dwFVFBSOD );
g_d3d_device->DrawPrimitiveUP(
D3DPT_TRIANGLESTRIP,
2,
g_VertChuck,
sizeof( SVertexBSOD )
);
g_d3d_device->SetRenderState( D3DRS_ZENABLE, TRUE );
g_d3d_device->SetRenderState( D3DRS_ALPHATESTENABLE, FALSE );
}
SVertexBSOD g_Layer[]=
{
{ 0.0f, 0.0f, 0.5f, 1.0f, 0.0f, 0.0f },
{ 0.0f, 768.0f, 0.5f, 1.0f, 0.0f, 768.0f / 1024.0f },
{ 128.0f, 0.0f, 0.5f, 1.0f, 128.0f/ 1024.0f, 0.0f },
{ 128.0f, 768.0f, 0.5f, 1.0f, 128.0f/ 1024.0f, 768.0f / 1024.0f },
{ 896.0f, 0.0f, 0.5f, 1.0f, 896.0f/ 1024.0f, 0.0f },
{ 896.0f, 768.0f, 0.5f, 1.0f, 896.0f/ 1024.0f, 768.0f / 1024.0f },
{ 1024.0f, 0.0f, 0.5f, 1.0f, 1024.0f/ 1024.0f, 0.0f },
{ 1024.0f, 768.0f, 0.5f, 1.0f, 1024.0f/ 1024.0f, 768.0f / 1024.0f },
};
void RenderLayer( DWORD dwTick )
{
g_d3d_device->SetRenderState( D3DRS_ZENABLE, FALSE );
g_d3d_device->SetRenderState( D3DRS_ALPHATESTENABLE, TRUE );
g_d3d_device->SetRenderState( D3DRS_ALPHAFUNC, D3DCMP_GREATER );
g_d3d_device->SetRenderState( D3DRS_ALPHAREF, 0x80 );
g_d3d_device->SetRenderState( D3DRS_CULLMODE, 2 );
g_d3d_device->SetSamplerState(0,D3DSAMP_MAGFILTER, D3DTEXF_POINT);
g_d3d_device->SetSamplerState(0,D3DSAMP_MINFILTER, D3DTEXF_POINT);
//g_d3d_device->Clear( 0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER, g_dwColorTable[ 23 ], 1.0f, 0 );
g_d3d_device->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
g_d3d_device->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 );
g_d3d_device->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE );
int iSchiebeAdd= (int)( dwTick / 827.5f );
float fSchiebe= dwTick / 1655.0f * 1.0f * c_2PI;
fSchiebe= 0.4f * sin( fSchiebe * 0.2f ) + 0.1f * cos( (float)iSchiebeAdd * 1.5f * c_2PI );
g_Layer[ 0 ].ty= fSchiebe;
g_Layer[ 1 ].ty= fSchiebe + 768.0f / 1024.0f;
g_Layer[ 2 ].ty= fSchiebe;
g_Layer[ 3 ].ty= fSchiebe + 768.0f / 1024.0f;
g_Layer[ 4 ].ty= -fSchiebe;
g_Layer[ 5 ].ty= -fSchiebe + 768.0f / 1024.0f;
g_Layer[ 6 ].ty= -fSchiebe;
g_Layer[ 7 ].ty= -fSchiebe + 768.0f / 1024.0f;
g_d3d_device->SetTexture( 0, g_pLayer );
g_d3d_device->SetFVF( c_dwFVFBSOD );
g_d3d_device->DrawPrimitiveUP(
D3DPT_TRIANGLESTRIP,
2,
g_Layer,
sizeof( SVertexBSOD )
);
g_d3d_device->DrawPrimitiveUP(
D3DPT_TRIANGLESTRIP,
2,
g_Layer + 4,
sizeof( SVertexBSOD )
);
g_d3d_device->SetRenderState( D3DRS_ZENABLE, TRUE );
g_d3d_device->SetRenderState( D3DRS_ALPHATESTENABLE, FALSE );
}
SVertexBSOD g_LayerV[]=
{
{ 0.0f, 0.0f, 0.5f, 1.0f, 0.0f, 0.0f },
{ 0.0f, 128.0f, 0.5f, 1.0f, 128.0f/ 1024.0f, 0.0f },
{ 1024.0f, 0.0f, 0.5f, 1.0f, 0.0f, 1024.0f / 1024.0f },
{ 1024.0f, 128.0f, 0.5f, 1.0f, 128.0f/ 1024.0f, 1024.0f / 1024.0f },
{ 0.0f, 640.0f, 0.5f, 1.0f, 896.0f/ 1024.0f, 0.0f },
{ 0.0f, 768.0f, 0.5f, 1.0f, 1024.0f/ 1024.0f, 0.0f },
{ 1024.0f, 640.0f, 0.5f, 1.0f, 896.0f/ 1024.0f, 1024.0f / 1024.0f },
{ 1024.0f, 768.0f, 0.5f, 1.0f, 1024.0f/ 1024.0f, 1024.0f / 1024.0f },
};
void RenderLayerV( DWORD dwTick )
{
g_d3d_device->SetRenderState( D3DRS_ZENABLE, FALSE );
g_d3d_device->SetRenderState( D3DRS_ALPHATESTENABLE, TRUE );
g_d3d_device->SetRenderState( D3DRS_ALPHAFUNC, D3DCMP_GREATER );
g_d3d_device->SetRenderState( D3DRS_ALPHAREF, 0x80 );
g_d3d_device->SetRenderState( D3DRS_CULLMODE, 2 );
g_d3d_device->SetSamplerState(0,D3DSAMP_MAGFILTER, D3DTEXF_POINT);
g_d3d_device->SetSamplerState(0,D3DSAMP_MINFILTER, D3DTEXF_POINT);
//g_d3d_device->Clear( 0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER, g_dwColorTable[ 23 ], 1.0f, 0 );
g_d3d_device->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
g_d3d_device->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 );
g_d3d_device->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE );
int iSchiebeAdd= (int)( dwTick / 827.5f );
float fSchiebe= dwTick / 1655.0f * 0.5f * c_2PI;
//float fSchiebe= dwTick / 1655.0f * 0.5f * c_2PI;
fSchiebe= 0.3f * sin( fSchiebe) - 0.1f * cos( (float)iSchiebeAdd * 0.5f * c_2PI );
g_LayerV[ 0 ].ty= fSchiebe - 1.0f;
g_LayerV[ 1 ].ty= fSchiebe - 1.0f ;
g_LayerV[ 2 ].ty= fSchiebe;
g_LayerV[ 3 ].ty= fSchiebe;
g_LayerV[ 4 ].ty= -fSchiebe - 1.0f;
g_LayerV[ 5 ].ty= -fSchiebe - 1.0f ;
g_LayerV[ 6 ].ty= -fSchiebe;
g_LayerV[ 7 ].ty= -fSchiebe;
g_d3d_device->SetTexture( 0, g_pLayer );
g_d3d_device->SetFVF( c_dwFVFBSOD );
g_d3d_device->DrawPrimitiveUP(
D3DPT_TRIANGLESTRIP,
2,
g_LayerV,
sizeof( SVertexBSOD )
);
g_d3d_device->DrawPrimitiveUP(
D3DPT_TRIANGLESTRIP,
2,
g_LayerV + 4,
sizeof( SVertexBSOD )
);
g_d3d_device->SetRenderState( D3DRS_ZENABLE, TRUE );
g_d3d_device->SetRenderState( D3DRS_ALPHATESTENABLE, FALSE );
}
SVertexBSOD g_BSOD[]=
{
{ 192.0f, 184.0f, 0.1f, 1.0f, 0.0f, 0.0f },
{ 192.0f, 184.0f + 400.0f, 0.1f, 1.0f, 0.0f, 200.0f / 512.0f },
{ 192.0f + 640.0f, 184.0f, 0.1f, 1.0f, 320.0f/ 512.0f, 0.0f },
{ 192.0f + 640.0f, 184.0f + 400.0f, 0.1f, 1.0f, 320.0f/ 512.0f, 200.0f / 512.0f },
};
void RenderBSOD( DWORD dwTick )
{
g_d3d_device->SetRenderState( D3DRS_ZENABLE, FALSE );
g_d3d_device->SetSamplerState(0,D3DSAMP_MAGFILTER, D3DTEXF_POINT);
g_d3d_device->SetSamplerState(0,D3DSAMP_MINFILTER, D3DTEXF_POINT);
g_d3d_device->Clear( 0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER, g_dwColorTable[ 23 ], 1.0f, 0 );
g_d3d_device->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
g_d3d_device->SetTexture( 0, g_pTexture[ ( dwTick / 500 ) & 1 ] );
g_d3d_device->SetFVF( c_dwFVFBSOD );
g_d3d_device->DrawPrimitiveUP(
D3DPT_TRIANGLESTRIP,
2,
g_BSOD,
sizeof( SVertexBSOD )
);
}
void RenderRealBSOD( DWORD dwTick )
{
g_d3d_device->Clear( 0, NULL, D3DCLEAR_TARGET|D3DCLEAR_ZBUFFER ,0x000000ff, 1.0f, 0 );
RECT r= { 0, 0,c_iScreenSizeX,c_iScreenSizeX };
static char pcData[]=
"*** STOP: c000026c {Unable to Load Device Driver} \
BAD_STYLE_HEADER \
\
\\SystemRoot\\System32\\Drivers\\propstyle.sys device driver could\
not be loaded. \
\
Error status was 0xc0000221 \
\
Restart and set the recovey option in the system control panel\
or the /CRASHDEBUG system start option. \
\
\
\
\
\
\
\
\
\
\
";
int iTick = dwTick;
iTick-= 800;
iTick/= 5;
for( int i= 0; i < iTick; ++i )
{
DWORD dwData= myrand();
dwData= dwData % ( 19 * 61 );
if( pcData[ dwData ] != ' ' )
{
pcData[ dwData + 62 ]= pcData[ dwData ];
}
}
char* pcPointer= (char*)pcData;
for( int i= 0; i < 20; ++i )
{
r.top+= 20;
g_pFont->DrawText(
NULL,
pcPointer,
62,
&r,
DT_LEFT,
0xffffffff );
pcPointer+=62;
}
}
void RenderScene4( float fTime )
{
fTime-= 2000.0f;
const float fSize= 50.0f;
g_Operation= MOVEZ;
g_fOp1= -70.0f;
ExecMatrixStep();
for( int i= 0; i< 10; ++i )
{
float fActTime= fTime / 1000.0f;
fActTime= fActTime - i * 0.2f;
fActTime= maximum( 0.0f, fActTime );
g_Operation= PUSH;
ExecMatrixStep();
g_iObjectNr= 100;
g_iColorOffset= 2;
if( fActTime > 0.0f )
{
g_iColorOffset= 21;
g_iObjectNr= g_iBump[ i & 1 ];
}
g_Operation= ROTX;
g_fOp1= fActTime + sin( fActTime );
ExecMatrixStep();
g_Operation= ROTY;
g_fOp1= fActTime * 1.3f + sin( fActTime * 0.5f );
ExecMatrixStep();
g_Operation= SCALE;
g_fOp1= fSize;
g_fOp2= fSize;
g_fOp3= fSize;
ExecMatrixStep();
pushObjectTorus();
g_Operation= POP;
ExecMatrixStep();
g_Operation= SCALE;
g_fOp1= 0.55f;
g_fOp2= 0.55f;
g_fOp3= 0.55f;
ExecMatrixStep();
}
}
void RenderSubTorus( int iLevel, float fTime, float fBump )
{
g_Operation= PUSH;
ExecMatrixStep();
iLevel++;
const float fSize= 40.0f;
float fDownScale= 0.45f;
fDownScale= minimum( fDownScale, 0.45f );
if( iLevel < 4 )
{
for( int i= 0; i< 4; ++i )
{
g_Operation= PUSH;
ExecMatrixStep();
g_Operation= ROTX;
g_fOp1= c_2PI * 0.25;
ExecMatrixStep();
float fActTime= fTime;
fActTime= fActTime - 0.4f * sin( fActTime * 4.0f - i * 0.39f) - 0.9f;
fActTime= maximum( 0.0f, fActTime );
g_Operation= ROTY;
g_fOp1= i * c_2PI * 0.25 + fActTime;
ExecMatrixStep();
g_Operation= MOVEX;
g_fOp1= fSize;
ExecMatrixStep();
g_Operation= SCALE;
g_fOp1= fDownScale;
g_fOp2=fDownScale;
g_fOp3= fDownScale;
ExecMatrixStep();
RenderSubTorus( iLevel, fTime - 1.0f, fBump );
g_Operation= POP;
ExecMatrixStep();
}
}
g_Operation= SCALE;
g_fOp1= fSize;
g_fOp2= fSize;
g_fOp3= fSize;
ExecMatrixStep();
g_iColorOffset= 2;
if( fTime > 0.0f )
{
g_iColorOffset= 16 + iLevel;
}
pushObjectTorus();
g_Operation= POP;
ExecMatrixStep();
}
void RenderScene8( float fTime )
{
fTime-= 1800.0f;
g_Operation= MOVEZ;
g_fOp1= -70.0f;
ExecMatrixStep();
g_iObjectNr= 40;
if( fTime > 0.0f )
{
g_Operation= ROTY;
g_fOp1= -2.0f + 0.01f * ( g_iBump[ 0 ] + g_iBump[ 1 ] );
g_fOp1*= 0.25f;
ExecMatrixStep();
}
RenderSubTorus( 0, fTime / 1000.0f, 0.0f );
}
void RenderScene6( float fTime )
{
fTime-= 1500.0f;
g_Operation= MOVEZ;
g_fOp1= -70.0f;
ExecMatrixStep();
for( int x= 0; x < 6; ++x )
{
g_Operation= PUSH;
ExecMatrixStep();
g_Operation= ROTY;
g_fOp1= 1.04f * x - maximum( 0.0f, fTime * 0.001f );
ExecMatrixStep();
g_Operation= MOVEX;
g_fOp1= 35.0f;
ExecMatrixStep();
g_Operation= MOVEY;
g_fOp1= -100.0f;
ExecMatrixStep();
for( int y= 0; y <= 20; ++y )
{
float fActTime= fTime / 1000.0f - y * 0.1f - x * 1.2f;
fActTime= maximum( 0.0f, fActTime );
g_Operation= PUSH;
ExecMatrixStep();
g_Operation= MOVEY;
g_fOp1= 10.0f * y;
ExecMatrixStep();
float fTurn= fActTime + sin( fActTime * 1.57f );
fTurn= ( x & 1 ) ? -fTurn : fTurn;
g_iColorOffset= 2;
g_iObjectNr= 100;
if( fActTime > 0.0f )
{
g_iColorOffset= 16;
g_iObjectNr= g_iBump[ y & 1 ];
}
g_Operation= ROTY;
g_fOp1= fTurn;
ExecMatrixStep();
g_Operation= SCALE;
g_fOp1= 4.0f;
g_fOp2= 4.0f;
g_fOp3= 4.0f;
ExecMatrixStep();
pushObject();
g_Operation= POP;
ExecMatrixStep();
}
for( int y= 0; y <= 10; ++y )
{
float fActTime= fTime / 1000.0f - y * 0.2f - x * 1.2f;
fActTime= maximum( 0.0f, fActTime );
g_Operation= PUSH;
ExecMatrixStep();
g_Operation= MOVEY;
g_fOp1= 10.0f * y * 2.0f + 12.0f * sin( fActTime * 5.0f );
ExecMatrixStep();
g_iColorOffset= 2;
g_iObjectNr= 100;
if( fActTime > 0.0f )
{
g_iColorOffset= 15;
g_iObjectNr= g_iBump[ y & 1 ];
}
g_Operation= SCALE;
g_fOp1= 12.0f;
g_fOp2= 12.0f;
g_fOp3= 12.0f;
ExecMatrixStep();
g_Operation= ROTX;
g_fOp1= c_2PI * 0.25f;
ExecMatrixStep();
pushObjectTorus();
g_Operation= POP;
ExecMatrixStep();
}
g_Operation= POP;
ExecMatrixStep();
}
}
void RenderScene5( float fTime )
{
fTime-= 1000.0f;
g_Operation= MOVEZ;
g_fOp1= -30.0f;
ExecMatrixStep();
for( int x= 0; x < 3; ++x )
{
g_Operation= PUSH;
ExecMatrixStep();
g_Operation= MOVEY;
g_fOp1= -30.0f + x * 30.0f;
ExecMatrixStep();
g_Operation= MOVEX;
g_fOp1= ( x & 1 ) ? - 130.0f : 130.0f;
ExecMatrixStep();
for( int y= 0; y <= 20; ++y )
{
float fActTime= fTime / 1000.0f - y * 0.1f - x * 0.8f;
fActTime= maximum( 0.0f, fActTime );
float fTurn= 2.0f * fActTime - sin( fActTime * 1.57f );
fTurn= ( x & 1 ) ? -fTurn : fTurn;
g_iColorOffset= 2;
g_iObjectNr= 100;
if( fActTime > 0.0f )
{
g_iColorOffset= ( x & 1 ) ? 13 : 14;
g_iObjectNr= g_iBump[ y & 1 ];
}
g_Operation= PUSH;
ExecMatrixStep();
g_Operation= MOVEX;
g_fOp1= -y * ( ( x & 1 )? -13.0f : 13.0f );
ExecMatrixStep();
g_Operation= ROTX;
g_fOp1= y * c_2PI * 0.25f + c_2PI * 0.125f + fTurn;
ExecMatrixStep();
g_Operation= SCALE;
g_fOp1= 10.0f;
g_fOp2= 10.0f;
g_fOp3= 10.0f;
ExecMatrixStep();
pushObjectTorus();
g_Operation= POP;
ExecMatrixStep();
}
g_Operation= POP;
ExecMatrixStep();
}
}
void RenderSubTree( int iLevel, float fTime, float fBump )
{
g_Operation= PUSH;
ExecMatrixStep();
iLevel++;
const float fSize= 7.0f;
float fDownScale= fTime;
fDownScale= minimum( fDownScale, 0.75f );
float fAngleEffect= fTime;
fAngleEffect= minimum( fAngleEffect, 1.0f );
fAngleEffect+= fBump / 10.0f - 0.1f;
if( iLevel < 6 && fTime > 0.0f )
{
float fAngles1[ 3 ]= { 0.2f, 2.0f, 4.6f };
float fAngles2[ 3 ]= { 0.8f, 0.9f, 0.7f };
for( int i= 0; i< 3; ++i )
{
g_Operation= PUSH;
ExecMatrixStep();
g_Operation= MOVEY;
g_fOp1= fSize;
ExecMatrixStep();
g_Operation= ROTY;
g_fOp1= fAngles1[ i ];
ExecMatrixStep();
g_Operation= ROTZ;
g_fOp1= fAngles2[ i ] * fAngleEffect;
ExecMatrixStep();
g_Operation= SCALE;
g_fOp1= fDownScale;
g_fOp2=fDownScale;
g_fOp3= fDownScale;
ExecMatrixStep();
g_Operation= MOVEY;
g_fOp1= fSize;
ExecMatrixStep();
RenderSubTree( iLevel, fTime, fBump );
g_Operation= POP;
ExecMatrixStep();
}
}
g_Operation= SCALE;
g_fOp1= 3.0f;
g_fOp2= fSize;
g_fOp3= 3.0f;
ExecMatrixStep();
g_iColorOffset= 2;
if( fTime > 0.0f )
{
g_iColorOffset= 6 + iLevel;
}
pushObject();
g_Operation= POP;
ExecMatrixStep();
}
void RenderScene7( float fTime )
{
fTime-= 1500.0f;
g_Operation= MOVEZ;
g_fOp1= -40.0f;
ExecMatrixStep();
g_Operation= MOVEY;
g_fOp1= -20.0f;
ExecMatrixStep();
g_iObjectNr= 100;
for( int y= 0; y <= 2; ++y )
{
g_Operation= PUSH;
ExecMatrixStep();
g_Operation= MOVEX;
g_fOp1= 50.0f - y * 50.0f;
ExecMatrixStep();
RenderSubTree( 0, fTime / 1000.0f - y * 0.7f, g_iBump[ y & 1 ] / 100.0f );
g_Operation= POP;
ExecMatrixStep();
}
}
void RenderScene1( float fTime )
{
fTime-= 1600.0f;
g_Operation= MOVEZ;
g_fOp1= -40.0f;
ExecMatrixStep();
g_Operation= ROTY;
g_fOp1= 0.4f;
ExecMatrixStep();
for( int y= -10; y <= 10; ++y )
{
for( int k= 0; k < 2; ++k )
{
float fActTime= fTime / 1000.0f - y * 0.1f - k * 0.75f;
fActTime= maximum( 0.0f, fActTime );
g_Operation= PUSH;
ExecMatrixStep();
g_Operation= MOVEY;
g_fOp1= -10.0f * y;
ExecMatrixStep();
float fTurn= fActTime + sin( fActTime * 1.57f );
fTurn= k ? -fTurn : fTurn;
g_iColorOffset= 2;
g_iObjectNr= 100;
if( fActTime > 0.0f )
{
g_iColorOffset= k ? 5 : 6;
g_iObjectNr= g_iBump[ y & 1 ];
}
g_Operation= ROTY;
g_fOp1= fTurn;
ExecMatrixStep();
for( int i= 0; i < 4; ++i )
{
g_Operation= PUSH;
ExecMatrixStep();
float fDist= k ? 22.0f : 12.0f;
g_Operation= MOVEX;
g_fOp1= ( i & 1 ) ? -fDist :fDist;
ExecMatrixStep();
g_Operation= MOVEZ;
g_fOp1= ( i & 2 ) ? -fDist : fDist;
ExecMatrixStep();
g_Operation= SCALE;
g_fOp1= 4.0f;
g_fOp2= 4.0f;
g_fOp3= 4.0f;
ExecMatrixStep();
g_Operation= ROTY;
g_fOp1= -2.0f * fTurn;
ExecMatrixStep();
pushObject();
g_Operation= POP;
ExecMatrixStep();
}
g_Operation= POP;
ExecMatrixStep();
}
}
}
void RenderScene3( float fTime )
{
fTime-= 2000.0f;
g_Operation= ROTX;
g_fOp1= 0.75f;
ExecMatrixStep();
g_Operation= MOVEZ;
g_fOp1= -200.0f;
ExecMatrixStep();
g_Operation= MOVEY;
g_fOp1= -120.0f;
ExecMatrixStep();
for( int y= -10; y <= 10; ++y )
{
for( int x= -31 - ( y & 1 ); x <= 32; x+= 2 )
{
float fActTime= fTime / 300.0f + x * 0.2f + y * 0.6f + sin( (float)x * 0.6f) - 6.2f;
fActTime= maximum( 0.0f, fActTime );
g_iColorOffset= 2;
g_iObjectNr= 100;
if( fActTime > 0.0f )
{
g_iColorOffset= 4;
g_iObjectNr= g_iBump[ ( x/2 + y ) & 1 ];
}
g_Operation= PUSH;
ExecMatrixStep();
g_Operation= MOVEX;
g_fOp1= 12.5f * x;
ExecMatrixStep();
g_Operation= MOVEZ;
g_fOp1= 25.0f * y;
ExecMatrixStep();
g_Operation= MOVEY;
g_fOp1= maximum( -10.0f, 20.0f * sin( fActTime ) );
ExecMatrixStep();
g_Operation= SCALE;
g_fOp1= 12.5f;
g_fOp2= 40.0f;
g_fOp3= 12.5f;
ExecMatrixStep();
//g_Operation= ROTY;
//g_fOp1= c_2PI * 0.25f;
//ExecMatrixStep();
pushObject();
g_Operation= POP;
ExecMatrixStep();
}
}
}
void RenderScene2( float fTime )
{
fTime-= 2000.0f;
g_Operation= MOVEZ;
g_fOp1= -80.0f;
ExecMatrixStep();
for( int j= 0; j < 4; ++j )
{
g_iObjectNr= 100;
float fActTime= fTime - j * 100.0f;
g_iColorOffset= 2;
if( fActTime > 0.0f )
{
g_iColorOffset= 3;
g_iObjectNr= g_iBump[ j & 1 ];
}
fActTime= maximum( 0.0f, fActTime );
g_Operation= PUSH;
ExecMatrixStep();
g_Operation= SCALE;
g_fOp1= 5.0f - j;
g_fOp2= 5.0f - j;
g_fOp3= 5.0f - j;
ExecMatrixStep();
fActTime= fActTime / 1000.0f;// * ( 1.0f + j * 0.2f );
g_Operation= ROTX;
g_fOp1= -fActTime - 1.4f * sin( fActTime );
ExecMatrixStep();
g_Operation= ROTY;
g_fOp1= -1.3f * fActTime - 0.72f * sin( fActTime );
ExecMatrixStep();
g_Operation= ROTZ;
g_fOp1= -0.3f * fActTime - 0.7f * sin( 1.9f * fActTime );
ExecMatrixStep();
for( int k= 0; k < 3; ++k )
{
g_Operation= PUSH;
ExecMatrixStep();
g_Operation= EMatrixOperation( ROTX + k );
g_fOp1= c_2PI * 0.25f;
ExecMatrixStep();
for( int i= 0; i < 4; ++i )
{
g_Operation= PUSH;
ExecMatrixStep();
g_Operation= MOVEY;
g_fOp1= ( i & 1 ) ? -10.0f : 10.0f;
ExecMatrixStep();
g_Operation= MOVEZ;
g_fOp1= ( i & 2 ) ? -10.0f : 10.0f;
ExecMatrixStep();
g_Operation= SCALE;
g_fOp1= 9.75f;
g_fOp2= 0.5f;
g_fOp3= 0.5f;
ExecMatrixStep();
pushObject();
g_Operation= POP;
ExecMatrixStep();
}
g_Operation= POP;
ExecMatrixStep();
}
g_Operation= POP;
ExecMatrixStep();
}
}