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

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

@@ -0,0 +1,779 @@
#include "defines.h"
#include "ConfigFiles.h"
#include "globals.h"
#include "ShaderFactory.h"
#include "textinfo.h"
#include "intrin.h"
HANDLE g_FileChangeNotification= NULL;
static std::string g_strShaderData;
void StopFileWatch()
{
if (g_FileChangeNotification != INVALID_HANDLE_VALUE && g_FileChangeNotification != NULL)
{
FindCloseChangeNotification(g_FileChangeNotification);
}
g_FileChangeNotification= NULL;
}
void StartFileWatch()
{
StopFileWatch();
std::string strPath= ".\\cfg\\";
g_FileChangeNotification= FindFirstChangeNotification(
strPath.c_str(),
FALSE,
FILE_NOTIFY_CHANGE_LAST_WRITE );
}
bool CheckFileWatch()
{
if (g_FileChangeNotification == INVALID_HANDLE_VALUE || g_FileChangeNotification == NULL)
{
return false;
}
DWORD dwRet= WaitForSingleObject( g_FileChangeNotification, 1 );
if( WAIT_OBJECT_0 == dwRet )
{
FindNextChangeNotification( g_FileChangeNotification );
ReadDataFromDisc();
// Shader neu compilieren
PrepareShaders();
//Texte neu setzen
CreateTextRenderJobs();
return true;
}
return false;
}
int g_iCurSpriptLength;
int g_iCurSpriptParams;
void ReadScriptTxt()
{
/*
g_iCurSpriptLength= 0;
g_iCurSpriptParams= 0;
FrameWork::TextFileReader tfrScript;
tfrScript.read( "cfg/script.txt" );
//#ifdef SCRIPTEDITOR
for( int i= 0; i < (int)tfrScript.getFileLines().size(); ++i )
{
std::string strAct= tfrScript.getFileLines()[ i ];
std::string strCommandFull;
if( FrameWork::StringHelper::splitAt( strAct, "=", strCommandFull ) )
{
}
std::stringstream ss;
ss << strAct;
if( strCommandFull == "SKIP" )
{
#ifdef SCRIPTEDITOR
ss >> g_iSkipTicks;
#endif
}
if( strCommandFull == "CLEAN" )
{
g_iCurSpriptLength= 0;
g_iCurSpriptParams= 0;
}
else if( strCommandFull == "CSPEED" )
{
g_Script[ g_iCurSpriptLength++ ]= CSPEED;
ss >> g_ScriptParamFloat[ g_iCurSpriptParams++ ];
}
else if( strCommandFull == "OSPEED" )
{
g_Script[ g_iCurSpriptLength++ ]= OSPEED;
ss >> g_ScriptParamFloat[ g_iCurSpriptParams++ ];
}
else if( strCommandFull == "CTIME" )
{
g_Script[ g_iCurSpriptLength++ ]= CTIME;
ss >> g_ScriptParamFloat[ g_iCurSpriptParams++ ];
}
else if( strCommandFull == "OTIME" )
{
g_Script[ g_iCurSpriptLength++ ]= OTIME;
ss >> g_ScriptParamFloat[ g_iCurSpriptParams++ ];
}
else if( strCommandFull == "CAM" )
{
g_Script[ g_iCurSpriptLength++ ]= CAM;
int iVal= 0;
ss >> iVal;
g_Script[ g_iCurSpriptLength++ ]= iVal;
}
else if( strCommandFull == "CAM" )
{
g_Script[ g_iCurSpriptLength++ ]= CAM;
int iVal= 0;
ss >> iVal;
g_Script[ g_iCurSpriptLength++ ]= iVal;
}
else if( strCommandFull == "OBJ" )
{
g_Script[ g_iCurSpriptLength++ ]= OBJ;
int iVal= 0;
ss >> iVal;
g_Script[ g_iCurSpriptLength++ ]= iVal;
iVal= 0;
ss >> iVal;
g_Script[ g_iCurSpriptLength++ ]= iVal;
}
else if( strCommandFull == "TICK" )
{
g_Script[ g_iCurSpriptLength++ ]= TICK;
int iVal= 0;
ss >> iVal;
g_Script[ g_iCurSpriptLength++ ]= iVal;
}
else if( strCommandFull == "QUIT" )
{
g_Script[ g_iCurSpriptLength++ ]= QUIT;
}
}
//#endif
*/
}
void ReadParamTxt()
{
/*
FrameWork::TextFileReader tfrSong;
tfrSong.read( "cfg/param.txt" );
tfrSong.append( "cfg/port.txt" );
tfrSong.append( "cfg/cam.txt" );
// tfrSong.append( "cfg/script.txt" );
for( int i= 0; i < (int)tfrSong.getFileLines().size(); ++i )
{
std::string strAct= tfrSong.getFileLines()[ i ];
std::string strCommandFull;
if( FrameWork::StringHelper::splitAt( strAct, "=", strCommandFull ) )
{
}
std::stringstream ss;
ss << strAct;
#ifdef SINGLEEDITMODE
if( strCommandFull == "PCUR" )
{
ss >> g_iCurrentPortrait;
}
else if( strCommandFull == "OCUR" )
{
ss >> g_iCurrentObject;
}
else if( strCommandFull == "OCOUNT" )
{
ss >> g_iCurrentObjectCount;
}
else if( strCommandFull == "CCUR" )
{
ss >> g_iCurrentCamera;
}
#endif
if( strCommandFull.size() < 4 )
{
continue;
}
int iFunc= strCommandFull[ strCommandFull.size() - 1 ] - '0';
iFunc+= 10 * ( strCommandFull[ strCommandFull.size() - 2 ] - '0' );
iFunc+= 100 * ( strCommandFull[ strCommandFull.size() - 3 ] - '0' );
std::string strCommand;
strCommand= strCommandFull.substr( 0, strCommandFull.size() - 3 );
if( strCommand == "BANK" )
{
for( int j= 0; j < 4; ++j )
{
float fVal= 0.0f;
ss >> fVal;
int iVal= (int)( fVal * 64.0f + 0.5f );
fVal= (float)( iVal ) / 64.0f;
SetParamValue( iFunc, j, fVal );
}
}
else if( strCommand == "SIZE" )
{
ss >> g_ObjectData[ iFunc ].m_iSizeX;
ss >> g_ObjectData[ iFunc ].m_iSizeY;
}
else if( strCommand == "BASE" )
{
ss >> g_ObjectData[ iFunc ].m_iBaseMeshType;
ss >> g_ObjectData[ iFunc ].m_iBaseBank;
}
else if( strCommand == "OFFSET" )
{
ss >> g_ObjectData[ iFunc ].m_iOffsetFunc;
ss >> g_ObjectData[ iFunc ].m_iOffsetBank;
}
else if( strCommand == "HEIGHT" )
{
ss >> g_ObjectData[ iFunc ].m_iHeightFunc;
ss >> g_ObjectData[ iFunc ]. m_iHeightBank;
}
else if( strCommand == "MIX" )
{
ss >> g_ObjectData[ iFunc ].m_iMixFunc;
ss >> g_ObjectData[ iFunc ].m_iMixBank;
}
else if( strCommand == "TRANS" )
{
ss >> g_ObjectData[ iFunc ].m_iTransformFunc;
ss >> g_ObjectData[ iFunc ].m_iTransformBank;
}
else if( strCommand == "COLOR" )
{
float fR;
float fG;
float fB;
float fA;
ss >> fR;
ss >> fG;
ss >> fB;
ss >> fA;
fR= min( 255.0f, fR );
fG= min( 255.0f, fG );
fB= min( 255.0f, fB );
fA= min( 255.0f, fA );
DWORD dwColor= ( (int)fR << 16 ) |
( (int)fG << 8 ) |
( (int)fB );
g_ObjectData[ iFunc ].m_dwColor= dwColor;
}
else if( strCommand == "PSCALE" )
{
ss >> g_PortraitData[ iFunc ].m_iScale;
}
else if( strCommand == "PPOS" )
{
ss >> g_PortraitData[ iFunc ].m_iPosX;
ss >> g_PortraitData[ iFunc ].m_iPosY;
ss >> g_PortraitData[ iFunc ].m_iTextPosX;
ss >> g_PortraitData[ iFunc ].m_iTextPosY;
}
else if( strCommand == "PTEX" )
{
ss >> g_PortraitData[ iFunc ].m_iTextureID;
}
else if( strCommand == "PWORD" )
{
std::string strText( strAct );
FrameWork::StringHelper::searchAndRreplace( "<br>", "\n", strText );
strcpy_s( g_PortraitData[ iFunc ].m_pcText, strText.c_str() );
}
else if( strCommand == "PTICK" )
{
ss >> g_PortraitData[ iFunc ].m_iTicks;
}
else if( strCommand == "CTYPE" )
{
ss >> g_CameraData[ iFunc ].m_iType;
ss >> g_CameraData[ iFunc ].m_iBaseBank;
ss >> g_CameraData[ iFunc ].m_fFov;
}
else if( strCommand == "CCOLOR" )
{
float fR;
float fG;
float fB;
float fA;
ss >> fR;
ss >> fG;
ss >> fB;
ss >> fA;
fR= min( 255.0f, fR );
fG= min( 255.0f, fG );
fB= min( 255.0f, fB );
DWORD dwColor= ( (int)fR << 16 ) |
( (int)fG << 8 ) |
( (int)fB );
g_CameraData[ iFunc ].m_dwColor= dwColor;
fA= max( 1.0f, fA );
g_CameraData[ iFunc ].m_fFog= 1.0f / fA;
}
#ifdef SINGLEFUNCEDITOR
if( strCommand == "DRAW" )
{
ss >> g_iCamFunc;
ss >> g_iPaintFunc[ 0 ];
ss >> g_iPaintFunc[ 1 ];
}
if( strCommand == "CAMREPEAT" )
{
ss >> g_iCamRepeat;
}
#endif
}
*/
}
void ReadShader( char* pcTarget, const char* pcVarName, const char* pcFileName )
{
FrameWork::TextFileReader tfrShaderTxt;
tfrShaderTxt.read( pcFileName );
//shorten the data?
int iPos= 0;
for( int i= 0; i < (int)tfrShaderTxt.getFileLines().size(); ++i )
{
std::string strAct= tfrShaderTxt.getFileLines()[ i ];
bool bNonWhiteFound= false;
for( size_t j= 0; j < strAct.size(); ++j )
{
char c= strAct[ j ];
if( c == ' ' && !bNonWhiteFound )
{
continue;
}
if( c == '\t' && !bNonWhiteFound )
{
continue;
}
bNonWhiteFound= true;
if( c == '/' && strAct[ j + 1 ] == '/' )
{
break;
}
pcTarget[ iPos ]= c;
iPos++;
}
// better readability?
pcTarget[ iPos ]= 13;
iPos++;
}
pcTarget[ iPos ]= 0;
std::stringstream ss;
ss << "const char " << pcVarName << "[]=\n";
ss << "\"";
int iCount= 0;
char cPrevious= 0;
while( pcTarget[ iCount ] != 0 )
{
char c= pcTarget[ iCount ];
if( c == 13 )
{
if( 13 != cPrevious && 10 != cPrevious )
{
ss << "\\n\"\n\"";
}
}
else
{
ss << c;
}
cPrevious= c;
iCount++;
}
ss << "\";\n\n";
g_strShaderData+= ss.str();
}
void ReadShaders()
{
ReadShader( g_ShaderVSGeneral, "g_ShaderVSGeneral", "cfg/vsgeneral.txt" );
ReadShader( g_ShaderPSPhong, "g_ShaderPSPhong", "cfg/psphong.txt" );
ReadShader( g_ShaderPSRainbow, "g_ShaderPSRainbow", "cfg/psrainbow.txt" );
ReadShader( g_ShaderPSTarmac, "g_ShaderPSTarmac", "cfg/pstarmac.txt" );
ReadShader( g_ShaderPSWall, "g_ShaderPSWall", "cfg/pswall.txt" );
ReadShader( g_ShaderPSGrass, "g_ShaderPSGrass", "cfg/psgrass.txt" );
ReadShader( g_ShaderPSDepth, "g_ShaderPSDepth", "cfg/psdepth.txt" );
ReadShader( g_ShaderPSText, "g_ShaderPSText", "cfg/pstext.txt" );
ReadShader( g_ShaderVSSky, "g_ShaderVSSky", "cfg/vssky.txt" );
ReadShader( g_ShaderPSSky, "g_ShaderPSSky", "cfg/pssky.txt" );
ReadShader( g_ShaderVSFSQuad, "g_ShaderVSFSQuad", "cfg/vsfsquad.txt" );
ReadShader( g_ShaderPSPSSM, "g_ShaderPSPSSM", "cfg/pspssm.txt" );
ReadShader( g_ShaderPSAmbOcc, "g_ShaderPSAmbOcc", "cfg/psao.txt" );
ReadShader( g_ShaderPSDOF, "g_ShaderPSDOF", "cfg/psdof.txt" );
ReadShader( g_ShaderPSRay, "g_ShaderPSRay", "cfg/psray.txt" );
ReadShader( g_ShaderPSBlur, "g_ShaderPSBlur", "cfg/psblur.txt" );
}
void ReadTextInfos()
{
m_iTextCount= -1;
int iCharPos= 0;
STextInfo* pInfo= m_TextInfos;
FrameWork::TextFileReader tfr;
tfr.read( "cfg/text.txt" );
for( int i= 0; i < (int)tfr.getFileLines().size(); ++i )
{
std::string strAct= tfr.getFileLines()[ i ];
std::string strCommandFull;
if( FrameWork::StringHelper::splitAt( strAct, "=", strCommandFull ) )
{
}
std::stringstream ss;
ss << strAct;
if( strCommandFull == "Text" )
{
if( m_iTextCount < m_iMaxTextCount )
{
m_iTextCount++;
pInfo= m_TextInfos + m_iTextCount;
}
strcpy( m_pcTextData + iCharPos, strAct.c_str() );
iCharPos+= strAct.size() + 1;
if( m_iTextCount == 0 )
{
pInfo->m_v3Pos.x= 0.0f;
pInfo->m_v3Pos.y= 0.0f;
pInfo->m_v3Pos.z= 0.0f;
pInfo->m_v3Rot.x= 0.0f;
pInfo->m_v3Rot.y= 0.0f;
pInfo->m_v3Rot.z= 0.0f;
pInfo->m_v3Scale.x= 1.0f;
pInfo->m_v3Scale.y= 1.0f;
pInfo->m_v3Scale.z= 1.0f;
}
else
{
*pInfo= m_TextInfos[ m_iTextCount - 1 ];
}
pInfo->m_v3Move.x= 0.0f;
pInfo->m_v3Move.y= 0.0f;
pInfo->m_v3Move.z= 0.0f;
pInfo->m_iTimeStart= 0;
pInfo->m_iTimeLength= 0;
}
else if( strCommandFull == "Pos" )
{
ss >> pInfo->m_v3Pos.x;
ss >> pInfo->m_v3Pos.y;
ss >> pInfo->m_v3Pos.z;
}
else if( strCommandFull == "Rot" )
{
ss >> pInfo->m_v3Rot.x;
ss >> pInfo->m_v3Rot.y;
ss >> pInfo->m_v3Rot.z;
pInfo->m_v3Rot.x*= c_PI / 180.0f;
pInfo->m_v3Rot.y*= c_PI / 180.0f;
pInfo->m_v3Rot.z*= c_PI / 180.0f;
}
else if( strCommandFull == "Scale" )
{
ss >> pInfo->m_v3Scale.x;
ss >> pInfo->m_v3Scale.y;
ss >> pInfo->m_v3Scale.z;
}
else if( strCommandFull == "Move" )
{
ss >> pInfo->m_v3Move.x;
ss >> pInfo->m_v3Move.y;
ss >> pInfo->m_v3Move.z;
}
else if( strCommandFull == "Time" )
{
ss >> pInfo->m_iTimeStart;
ss >> pInfo->m_iTimeLength;
}
}
m_iTextCount++;
}
void ReadDataFromDisc()
{
ReadParamTxt();
ReadScriptTxt();
ReadShaders();
ReadTextInfos();
/*static bool bWritten= false;
if( bWritten )
{
return;
}*/
#ifdef CREATE_HEADER
WriteHeader();
#endif
}
void WriteHeaderFunc()
{
/*std::ofstream ofs( "globaldata.h" );
ofs << "const float FloatParamBanks[ 4 * 512 ]=" << "\n";
ofs << "{" << "\n";
for( int i= 0; i < 4 * 512; ++i )
{
char pcSpecial[ 1024 ];
sprintf_s(
pcSpecial,
1024,
"%1.9ff,\n",
FloatParamBanks[ i ] );
ofs << pcSpecial;
}
ofs << "};" << "\n";
ofs << "\n";
{
int iBytes= sizeof( g_CameraData );
ofs << "const unsigned char byteCameraData[ " << iBytes <<" ]=" << "\n";
ofs << "{" << "\n";
int iLine= 0;
for( int i= 0; i < iBytes; ++i )
{
ofs << (int)(((unsigned char*)g_CameraData)[ i ]) << ",";
iLine++;
if( iLine == 8 )
{
ofs << "\n";
iLine= 0;
}
}
ofs << "\n" << "};" << "\n";
ofs << "SCameraDescription* g_CameraData= (SCameraDescription*)byteCameraData;\n\n";
}
{
int iBytes= sizeof( g_ObjectData );
ofs << "const unsigned char byteObjectData[ " << iBytes <<" ]=" << "\n";
ofs << "{" << "\n";
int iLine= 0;
for( int i= 0; i < iBytes; ++i )
{
ofs << (int)(((unsigned char*)g_ObjectData)[ i ]) << ",";
iLine++;
if( iLine == 8 )
{
ofs << "\n";
iLine= 0;
}
}
ofs << "\n" << "};" << "\n";
ofs << "SObjectDescription* g_ObjectData= (SObjectDescription*)byteObjectData;\n\n";
}
{
int iBytes= sizeof( g_PortraitData );
ofs << "const unsigned char bytePortraitData[ " << iBytes <<" ]=" << "\n";
ofs << "{" << "\n";
int iLine= 0;
for( int i= 0; i < iBytes; ++i )
{
ofs << (int)(((unsigned char*)g_PortraitData)[ i ]) << ",";
iLine++;
if( iLine == 8 )
{
ofs << "\n";
iLine= 0;
}
}
ofs << "\n" << "};" << "\n";
ofs << "SPortraitDescription* g_PortraitData= (SPortraitDescription*)bytePortraitData;\n\n";
}
*/
/*
ofs << "const int g_iFuncCount= " << g_iFuncCountWrite << ";\n";
ofs << "const int g_iFuncType[ g_iFuncCount ]=" << "\n";
ofs << "{" << "\n";
for( int i= 0; i < g_iFuncCountWrite; ++i )
{
ofs << g_iFuncType[ i ] << "," << "\n";
}
ofs << "};" << "\n";
ofs << "\n";
ofs << "const DWORD g_dwFuncColor[ 32 ]=" << "\n";
ofs << "{" << "\n";
for( int i= 0; i < 32; ++i )
{
ofs << g_dwFuncColor[ i ] << "," << "\n";
}
ofs << "};" << "\n";
ofs << "\n";
ofs << "const int g_iRanges[ 32 ]=" << "\n";
ofs << "{" << "\n";
for( int i= 0; i < 32; ++i )
{
ofs << g_iRanges[ i ] << "," << "\n";
}
ofs << "};" << "\n";
ofs << "\n";
ofs << "const int g_iDrawObj[ 16 ]=" << "\n";
ofs << "{" << "\n";
for( int i= 0; i < 16; ++i )
{
ofs << g_iDrawObj[ i ] << "," << "\n";
}
ofs << "};" << "\n";
ofs << "\n";
ofs << "const float g_fParameter[ g_iParamCount * g_iFuncCount ]=" << "\n";
ofs << "{" << "\n";
for( int i= 0; i < g_iParamCount; ++i )
{
for( int j= 0; j < g_iFuncCountWrite; ++j )
{
char pcSpecial[ 1024 ];
sprintf_s(
pcSpecial,
1024,
"%1.9ff,\n",
g_fParameter[ j + g_iFuncCount * i] );
ofs << pcSpecial;
}
}
ofs << "};" << "\n";
ofs << "\n";
*/
}
void WriteHeaderScript()
{
/*
std::ofstream ofs( "scriptdata.h" );
ofs << "const int g_iScriptLength= " << g_iCurSpriptLength << ";\n";
ofs << "const unsigned char g_Script[ g_iScriptLength ]=" << "\n";
ofs << "{" << "\n";
for( int i= 0; i < g_iCurSpriptLength; ++i )
{
ofs << (int)g_Script[ i ] << ",\n";
}
ofs << "};" << "\n";
ofs << "const float g_ScriptParamFloat[ " << g_iCurSpriptParams << " ]=" << "\n";
ofs << "{" << "\n";
for( int i= 0; i < g_iCurSpriptParams; ++i )
{
char pcSpecial[ 1024 ];
sprintf_s(
pcSpecial,
1024,
"%1.9ff,\n",
g_ScriptParamFloat[ i ] );
ofs << pcSpecial;
}
ofs << "};" << "\n";
ofs << "\n";
ofs << "\n";
*/
}
void WriterShaderInclude()
{
std::ofstream ofs( "shaderdata.h" );
ofs << g_strShaderData;
}
char m_pcTextData[]= { 64, 64, 0 };
void WriterTextInclude()
{
std::ofstream ofs( "textdata.h" );
ofs << "int m_iTextCount= " << m_iTextCount <<";\n";
ofs << "\n";
ofs << "const char m_pcTextData[]=\n";
ofs << "{\n";
int iZeroCount= 0;
for( int i= 0; i < 65536; ++i )
{
char pcSpecial[ 1024 ];
sprintf_s(
pcSpecial,
1024,
"\t%d,\n",
(int)m_pcTextData[ i ] );
ofs << pcSpecial;
if( m_pcTextData[ i ] == 0 )
{
iZeroCount++;
if( iZeroCount == m_iTextCount )
{
break;
}
}
}
ofs << "};\n";
ofs << "\n";
ofs << "const DWORD c_BinaryText[]= " << "\n";
ofs << "{\n";
for( int i= 0; i < (int)m_iTextCount; ++i )
{
int dwords= m_iTextCount * sizeof( STextInfo ) / 4;
if( dwords > 0 )
{
DWORD* pdwData= (DWORD*)&(m_TextInfos);
for( int j= 0; j < dwords; ++j )
{
char pcSpecial[ 1024 ];
sprintf_s( pcSpecial,
1024,
"\t%d,\n",
pdwData[ j ] );
ofs << pcSpecial;
}
}
}
ofs << "};\n";
ofs << "\n";
ofs << "STextInfo* m_TextInfos= (STextInfo*)c_BinaryText;\n";
ofs << "\n";
}
void WriteHeader()
{
//#ifdef SINGLEEDITMODE
WriteHeaderFunc();
//#endif
//#ifdef SCRIPTEDITOR
WriteHeaderScript();
//#endif
WriterShaderInclude();
WriterTextInclude();
}

View File

@@ -0,0 +1,35 @@
#pragma once
#include "defines.h"
#include <windows.h>
#include <iostream>
#include <sstream>
#include <fstream>
#include <cstdio>
#include "StringHelper.h"
#include "TextFileReader.h"
extern HANDLE g_FileChangeNotification;
void StopFileWatch();
void StartFileWatch();
void ReadDataFromDisc();
bool CheckFileWatch();
void WriteHeader();
extern int g_iCurSpriptLength;
extern int g_iCurSpriptParams;
void ReadTextInfos();
void ReadScriptTxt();
void ReadShader( char* pcTarget, const char* pcFileName );
void ReadShaders();
void WriteHeaderFunc();

View File

@@ -0,0 +1,233 @@
/***********************************************************************************/
/** \file EditorHelp.cpp
** \brief Implementation zur Klasse EditorHelp
*************************************************************************************
** Autor: Christian Roesch
*************************************************************************************
** -tut nichts-
**
*//*********************************************************************************/
// includes
#include "EditorHelp.h"
#include <cmath>
#include <ctime>
#include <cassert>
#include <sstream>
bool EditorHelp::m_KeyPressed[ 256 ]= { false };
bool EditorHelp::m_KeyDown[ 256 ]= { false };
HWND EditorHelp::m_hwnd= NULL;
bool EditorHelp::m_bShowDebugData= true;
LPD3DXFONT EditorHelp::m_pDebugFont= NULL;
extern int c_iScreenSizeY;
extern int c_iScreenSizeX;
extern IDirect3DDevice9 *g_d3d_device;
// Methoden-Definitionen
EditorHelp::EditorHelp()
{
}
EditorHelp::~EditorHelp()
{
}
void EditorHelp::SetHWND( HWND hwnd )
{
m_hwnd= hwnd;
}
void EditorHelp::CheckKeys()
{
if( m_hwnd == NULL )
{
m_hwnd= GetForegroundWindow();
}
if( m_hwnd == GetForegroundWindow() )
{
for( int i= 0; i < 256; i++ )
{
SHORT iKey= GetAsyncKeyState( i );
m_KeyPressed[ i ]= false;
if( iKey & 0x8000 )
{
if( m_KeyDown[ i ] == false )
{
m_KeyPressed[ i ]= true;
}
m_KeyDown[ i ]= true;
}
else
{
m_KeyDown[ i ]= false;
}
}
}
else
{
for( int i= 0; i < 256; i++ )
{
m_KeyPressed[ i ]= false;
m_KeyDown[ i ]= false;
}
}
}
float EditorHelp::GetKeyDownVal( float fCurrent,
int KeyAdd,
int KeySub,
float fDefault,
float fSlow,
float fFast )
{
return GetKeyVal( fCurrent,
m_KeyDown[ KeyAdd ],
m_KeyDown[ KeySub ],
fDefault,
fSlow,
fFast );
}
float EditorHelp::GetKeyPressedVal( float fCurrent,
int KeyAdd,
int KeySub,
float fDefault,
float fSlow,
float fFast )
{
return GetKeyVal( fCurrent,
m_KeyPressed[ KeyAdd ],
m_KeyPressed[ KeySub ],
fDefault,
fSlow,
fFast );
}
float EditorHelp::GetKeyVal( float fCurrent,
bool bAdd,
bool bSub,
float fDefault,
float fSlow,
float fFast )
{
//Konventionen fuer Tastenbelegung eingehalten?
assert( fSlow <= fDefault );
assert( fDefault <= fFast );
float fChange= fDefault;
if( m_KeyDown[ VK_SHIFT ] )
{
fChange= fFast;
}
if( m_KeyDown[ VK_CONTROL ] )
{
fChange= fSlow;
}
int iVal= (int)Round( fCurrent / fChange );
if( bAdd )
{
return (float)(iVal + 1 ) * fChange;
}
if( bSub )
{
return (float)(iVal - 1 ) * fChange;
}
return fCurrent;
}
float EditorHelp::Round(float Val )
{
return floor(Val + 0.5f);
}
void EditorHelp::PrintDebug( int iLine, int iColumn, char* pcData )
{
PrintDebugPos( 2.0f + (float)iLine * 12.0f,
2.0f + (float)iColumn * 9.0f,
pcData );
}
void EditorHelp::PrintDebugPos( float fY, float fX, char* pcData )
{
if( m_bShowDebugData )
{
RECT r= {
0 + (int)fX,
0 + (int)fY,
c_iScreenSizeX + (int)fX,
c_iScreenSizeY + (int)fX };
m_pDebugFont->DrawText(
NULL,
pcData,
strlen(pcData),
&r,
DT_TOP | DT_LEFT,
0xff000000 );
r.top-=1;
r.left-=1;
m_pDebugFont->DrawText(
NULL,
pcData,
strlen(pcData),
&r,
DT_TOP | DT_LEFT,
0xffffffff );
}
}
std::string EditorHelp::GetDateString()
{
time_t t;
struct tm ts;
t = time(NULL);
localtime_s( &ts, &t );
std::stringstream ss;
ss << ts.tm_mon + 1 << "_";
ss << ts.tm_mday << "_";
ss << ts.tm_hour << "_";
ss << ts.tm_min << "_";
ss << ts.tm_sec;
return ss.str();
}
void EditorHelp::PreparePrint()
{
if( m_pDebugFont != NULL )
{
return;
}
static D3DXFONT_DESC FontDescription=
{
50,
20,
0,
8,
FALSE,
0,
0,
5, // CLEARTYPE_QUALITY
0,
"Courier"
};
FontDescription.Height= 12;
FontDescription.Width= 9;
D3DXCreateFontIndirect( g_d3d_device,
&FontDescription,
&m_pDebugFont );
}
/************************************************************************************
** Ende der Datei: EditorHelp.cpp
************************************************************************************/

View File

@@ -0,0 +1,88 @@
/***********************************************************************************/
/** \file EditorHelp.h
** \brief Header File zur Klasse EditorHelp
*************************************************************************************
** Autor: Christian Roesch
*************************************************************************************
** _tut nichts_
**
*//*********************************************************************************/
#ifndef _EditorHelp_H
#define _EditorHelp_H
// includes
#include <windows.h>
#include <string>
#include <d3dx9core.h>
// Klassen-Deklaration
/***********************************************************************************/
/** \brief EditorHelp _tut nichts_
*************************************************************************************
** Genau genommen _tut dies nichts_
**
*//*********************************************************************************/
class EditorHelp
{
public:
EditorHelp();
~EditorHelp();
static float Round(float Val );
static void CheckKeys();
static float GetKeyDownVal( float fCurrent,
int KeyAdd,
int KeySub,
float fDefault,
float fSlow,
float fFast );
static float GetKeyPressedVal( float fCurrent,
int KeyAdd,
int KeySub,
float fDefault,
float fSlow,
float fFast );
static bool m_KeyPressed[ 256 ];
static bool m_KeyDown[ 256 ];
static void PrintDebug( int iLine, int iColumn, char* pcData );
static void PrintDebugPos( float fY, float fX, char* pcData );
static std::string GetDateString();
static void SetHWND( HWND hwnd );
static bool m_bShowDebugData;
static void PreparePrint();
protected:
private:
static HWND m_hwnd;
static LPD3DXFONT m_pDebugFont;
static float GetKeyVal( float fCurrent,
bool bAdd,
bool bSub,
float fDefault,
float fSlow,
float fFast );
};
#endif//_EditorHelp_H
class EditorHelp;
/************************************************************************************
** Ende der Datei: EditorHelp.h
************************************************************************************/

156
evoke-64k/bp10/PSSM.cpp Normal file
View File

@@ -0,0 +1,156 @@
#include "defines.h"
#include "PSSM.h"
#include "shader.h"
#include "globals.h"
#include "intrin.h"
void PSSM::Init()
{
m_iSplitCount = -1;
m_fRange = 0.0f;
}
void PSSM::UpdateSplits(const D3DXVECTOR3 &vLightDir, const D3DXMATRIX &mView, const D3DXMATRIX &mProj)
{
assert( m_iSplitCount >= 0 && m_iSplitCount <= MaxSplitCount );
assert( m_fRange >= 0.0f );
// Extract cam data
D3DXVECTOR3 vCamPos(
-(mView._11 * mView._41 + mView._12 * mView._42 + mView._13 * mView._43),
-(mView._21 * mView._41 + mView._22 * mView._42 + mView._23 * mView._43),
-(mView._31 * mView._41 + mView._32 * mView._42 + mView._33 * mView._43) );
D3DXVECTOR3 vCamRight(mView._11, mView._21, mView._31);
D3DXVECTOR3 vCamUp(mView._12, mView._22, mView._32);
D3DXVECTOR3 vCamLook(mView._13, mView._23, mView._33);
// Extract plane distances
float fNearPlane = mProj._43 / -mProj._33;
float fFarPlane = mProj._43 / (1.0f - mProj._33);
// Extract FOV
float fTanHalfFOVX = 1.0f / mProj._11;
float fTanHalfFOVY = 1.0f / mProj._22;
// Compute maximum shadow split clip plane
float fMaxClipPlane = max( fFarPlane,
max(2.0f * fTanHalfFOVX * fFarPlane, 2.0f * fTanHalfFOVY * fFarPlane) );
// Adjust range
if(fFarPlane - fNearPlane > m_fRange)
fFarPlane = fNearPlane + m_fRange;
// Compute frustum depth
float fFrustumDepth = fFarPlane - fNearPlane;
// Complete light vector set
D3DXVECTOR3 vLightUp(0.0f, 1.0f, 0.0f), vLightRight;
if(abs(D3DXVec3Dot(&vLightUp, &vLightDir)) > 0.95f)
vLightUp = D3DXVECTOR3(0.0f, 0.0f, 1.0f);
D3DXVec3Cross(&vLightRight, &vLightUp, &vLightDir);
D3DXVec3Normalize(&vLightRight, &vLightRight);
D3DXVec3Cross(&vLightUp, &vLightDir, &vLightRight);
D3DXVec3Normalize(&vLightUp, &vLightUp);
// Loop over splits
for(int iSplit = 0; iSplit < m_iSplitCount; iSplit++)
{
// Compute both uniform and logarithmic split distribution
float fUniformSplitNear = fNearPlane + fFrustumDepth * ((float)iSplit / m_iSplitCount);
float fUniformSplitFar = fNearPlane + fFrustumDepth * ((float)(iSplit + 1) / m_iSplitCount);
float fLogSplitNear = fNearPlane * mypow(fFarPlane / fNearPlane, (float)iSplit / m_iSplitCount);
float fLogSplitFar = fNearPlane * mypow(fFarPlane / fNearPlane, (float)(iSplit + 1) / m_iSplitCount);
// Take average of both distributions
float fSplitNear = (fUniformSplitNear + fLogSplitNear) / 2.0f;
float fSplitFar = (fUniformSplitFar + fLogSplitFar) / 2.0f;
// Center
D3DXVECTOR3 vSplitCenter = vCamPos + (fSplitNear + fSplitFar) / 2.0f * vCamLook;
// Compute split view matrix
D3DXMatrixIdentity(&m_ViewMatrices[iSplit]);
memcpy(&m_ViewMatrices[iSplit]._11, &vLightRight, sizeof(float) * 3);
memcpy(&m_ViewMatrices[iSplit]._21, &vLightUp, sizeof(float) * 3);
memcpy(&m_ViewMatrices[iSplit]._31, &vLightDir, sizeof(float) * 3);
D3DXMatrixTranspose(&m_ViewMatrices[iSplit], &m_ViewMatrices[iSplit]);
m_ViewMatrices[iSplit]._41 = -D3DXVec3Dot(&vSplitCenter, &vLightRight);
m_ViewMatrices[iSplit]._42 = -D3DXVec3Dot(&vSplitCenter, &vLightUp);
m_ViewMatrices[iSplit]._43 = -D3DXVec3Dot(&vSplitCenter, &vLightDir);
// Update split view
m_ViewPos[iSplit] = vSplitCenter;
m_ViewDir[iSplit] = vLightDir;
D3DXVECTOR3 splitCorners[8];
// Compute all eight frustum split corner points
ComputeCornerPoints(splitCorners, fSplitNear, fSplitFar, fTanHalfFOVX, fTanHalfFOVY,
vCamPos, vCamRight, vCamUp, vCamLook, 0.1f);
float fMinX = FLT_MAX, fMaxX = FLT_MIN;
float fMinY = FLT_MAX, fMaxY = FLT_MIN;
float fMinZ = FLT_MAX, fMaxZ = FLT_MIN;
// Loop over corner points
for(int i = 0; i < 8; i++)
{
// Transform corner to view space
D3DXVECTOR4 vViewSpaceCorner;
D3DXVec3Transform(&vViewSpaceCorner, &splitCorners[i], &m_ViewMatrices[iSplit]);
// Find min and max values
if(vViewSpaceCorner.x > fMaxX) fMaxX = vViewSpaceCorner.x;
if(vViewSpaceCorner.x < fMinX) fMinX = vViewSpaceCorner.x;
if(vViewSpaceCorner.y > fMaxY) fMaxY = vViewSpaceCorner.y;
if(vViewSpaceCorner.y < fMinY) fMinY = vViewSpaceCorner.y;
if(vViewSpaceCorner.z > fMaxZ) fMaxZ = vViewSpaceCorner.z;
if(vViewSpaceCorner.z < fMinZ) fMinZ = vViewSpaceCorner.z;
}
// Bias
fMinX -= 2.0f; fMinY -= 2.0f; fMinZ -= 2.0f;
fMaxX += 2.0f; fMaxY += 2.0f; fMaxZ += 2.0f;
// Compute split projection matrix
D3DXMatrixOrthoOffCenterLH(&m_ProjMatrices[iSplit],
fMinX, fMaxX,
fMinY, fMaxY,
fMinZ - fMaxClipPlane, fMaxZ + fMaxClipPlane);
}
}
void PSSM::ComputeCornerPoints(D3DXVECTOR3 *pCorners,
float fNear, float fFar, float fTanHalfFOVX, float fTanHalfFOVY,
const D3DXVECTOR3 &vCamPos, const D3DXVECTOR3 &vCamRight,
const D3DXVECTOR3 &vCamUp, const D3DXVECTOR3 &vCamLook,
float fOverlap)
{
float fNearHalfWidth = fTanHalfFOVX * fNear;
float fNearHalfHeight = fTanHalfFOVY * fNear;
float fFarHalfWidth = fTanHalfFOVX * fFar;
float fFarHalfHeight = fTanHalfFOVY * fFar;
D3DXVECTOR3 vNearCenter = vCamPos + fNear * vCamLook;
D3DXVECTOR3 vFarCenter = vCamPos + fFar * vCamLook;
// Compute eight frustum split corner points
pCorners[0] = vNearCenter + fNearHalfWidth * vCamRight + fNearHalfHeight * vCamUp;
pCorners[1] = vNearCenter + fNearHalfWidth * vCamRight - fNearHalfHeight * vCamUp;
pCorners[2] = vNearCenter - fNearHalfWidth * vCamRight + fNearHalfHeight * vCamUp;
pCorners[3] = vNearCenter - fNearHalfWidth * vCamRight - fNearHalfHeight * vCamUp;
pCorners[4] = vFarCenter + fFarHalfWidth * vCamRight + fFarHalfHeight * vCamUp;
pCorners[5] = vFarCenter + fFarHalfWidth * vCamRight - fFarHalfHeight * vCamUp;
pCorners[6] = vFarCenter - fFarHalfWidth * vCamRight + fFarHalfHeight * vCamUp;
pCorners[7] = vFarCenter - fFarHalfWidth * vCamRight - fFarHalfHeight * vCamUp;
D3DXVECTOR3 vCenter = (vNearCenter + vFarCenter) / 2.0f;
// Apply split overlap scaling
for(int i = 0; i < 8; i++)
pCorners[i] += (pCorners[i] - vCenter) * fOverlap;
}

63
evoke-64k/bp10/PSSM.h Normal file
View File

@@ -0,0 +1,63 @@
#pragma once
/***********************************************************************************/
/** \file PSSM.h
** \brief Header File zur Klasse PSSM
*************************************************************************************
** Autor: Christian Roesch
*************************************************************************************
** _tut nichts_
**
*//*********************************************************************************/
#ifndef _PSSM_H
#define _PSSM_H
// includes
#include <d3dx9.h>
#include <cassert>
// Klassen-Deklaration
extern IDirect3DDevice9* g_d3d_device;
/***********************************************************************************/
/** \brief PSSM _tut nichts_
*************************************************************************************
** Genau genommen _tut dies nichts_
**
*//*********************************************************************************/
class PSSM
{
public:
static const int MaxSplitCount = 16;
void Init();
void UpdateSplits(const D3DXVECTOR3 &vLightDir, const D3DXMATRIX &mView, const D3DXMATRIX &mProj);
int m_iSplitCount;
float m_fRange;
D3DXMATRIX m_ViewMatrices[MaxSplitCount];
D3DXMATRIX m_ProjMatrices[MaxSplitCount];
D3DXVECTOR3 m_ViewPos[MaxSplitCount];
D3DXVECTOR3 m_ViewDir[MaxSplitCount];
private:
void ComputeCornerPoints(D3DXVECTOR3 *pCorners,
float fNear, float fFar, float fFTanHalfFOVX, float fTanHalfFOVY,
const D3DXVECTOR3 &vCamPos, const D3DXVECTOR3 &vCamRight,
const D3DXVECTOR3 &vCamUp, const D3DXVECTOR3 &vCamLook,
float fOverlap);
};
#endif//_PSSM_H
class PSSM;
/************************************************************************************
** Ende der Datei: PSSM.h
************************************************************************************/

View File

@@ -0,0 +1,56 @@
#pragma once
/***********************************************************************************/
/** \file Renderpipe.h
** \brief Header File zur Klasse Renderpipe
*************************************************************************************
** Autor: Christian Roesch
*************************************************************************************
** _tut nichts_
**
*//*********************************************************************************/
#ifndef _Renderpipe_H
#define _Renderpipe_H
// includes
#include <d3dx9.h>
#include <cassert>
// Klassen-Deklaration
extern IDirect3DDevice9* g_d3d_device;
/***********************************************************************************/
/** \brief Renderpipe _tut nichts_
*************************************************************************************
** Genau genommen _tut dies nichts_
**
*//*********************************************************************************/
class Renderpipe
{
public:
static void PrepareRenderTargets(UINT nScreenX, UINT nScreenY, UINT nShadowXY,
D3DMULTISAMPLE_TYPE multiSampleType);
static void PrepareDefaultRenderStates();
static void PrepareShadowRenderStates();
static void PreparePreRenderStates();
static void PrepareFullScreenQuadRenderStates();
static void PrepareWithoutPostProcessing();
static void SimpleRenderPass();
static void RenderPassPostProcessing();
};
#endif//_Renderpipe_H
class Renderpipe;
/************************************************************************************
** Ende der Datei: Renderpipe.h
************************************************************************************/

View File

@@ -0,0 +1,611 @@
#include "defines.h"
#include "Renderpipe.h"
#include "shader.h"
#include "globals.h"
void Renderpipe::PrepareDefaultRenderStates()
{
g_d3d_device->SetRenderState( D3DRS_LIGHTING, TRUE );
g_d3d_device->SetRenderState( D3DRS_ZENABLE, TRUE );
g_d3d_device->SetRenderState( D3DRS_ZWRITEENABLE, FALSE );
g_d3d_device->SetRenderState( D3DRS_MULTISAMPLEANTIALIAS, TRUE );
g_d3d_device->SetRenderState( D3DRS_ALPHATESTENABLE, FALSE );
g_d3d_device->SetRenderState( D3DRS_ALPHABLENDENABLE, FALSE );
g_d3d_device->SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW );
// Laptop FFP Fallback
g_d3d_device->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_DIFFUSE );
g_d3d_device->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1 );
// Default Texturen
for( int i= 0; i < 6; ++i )
{
g_d3d_device->SetSamplerState( i, D3DSAMP_MINFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( i, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( i, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( i, D3DSAMP_ADDRESSU, D3DTADDRESS_WRAP );
g_d3d_device->SetSamplerState( i, D3DSAMP_ADDRESSV, D3DTADDRESS_WRAP );
g_d3d_device->SetSamplerState( i, D3DSAMP_ADDRESSW, D3DTADDRESS_WRAP );
}
// sampler2D shadowSampler : register(s4);
g_d3d_device->SetSamplerState( 4, D3DSAMP_MINFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 4, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 4, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 4, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP );
g_d3d_device->SetSamplerState( 4, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP );
g_d3d_device->SetTexture( 4, g_pFullScreenRT[ RT_AUX2 ] );
// sampler2D depthSampler : register(s5);
g_d3d_device->SetSamplerState( 5, D3DSAMP_MINFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 5, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 5, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 5, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP );
g_d3d_device->SetSamplerState( 5, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP );
g_d3d_device->SetTexture( 5, g_pFullScreenRT[ RT_DEPTH ] );
g_d3d_device->SetTexture( 0, NULL );
g_d3d_device->SetTexture( 1, NULL );
g_d3d_device->SetTexture( 2, g_pTextures[ TI_Light1D ].GetPointer() );
g_d3d_device->SetSamplerState( 2, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP );
g_d3d_device->SetTexture( 3, g_pTextures[ TI_LightSpec1D ].GetPointer() );
g_d3d_device->SetSamplerState( 3, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP );
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_COLOR_MS ] );
g_d3d_device->SetDepthStencilSurface( g_pFullScreenRTS[ RTS_DEFAULT_DS ] );
}
void Renderpipe::PrepareWithoutPostProcessing()
{
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_AUX2 ] );
g_d3d_device->Clear( 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 1.0f, 0 );
PrepareDefaultRenderStates();
g_d3d_device->SetRenderState( D3DRS_LIGHTING, TRUE );
g_d3d_device->SetRenderState( D3DRS_ZENABLE, TRUE );
g_d3d_device->SetRenderState( D3DRS_ZWRITEENABLE, TRUE );
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_COLOR_MS ] );
g_d3d_device->SetDepthStencilSurface( g_pFullScreenRTS[ RTS_DEFAULT_DS ] );
}
void Renderpipe::PrepareShadowRenderStates()
{
g_d3d_device->SetRenderState( D3DRS_LIGHTING, FALSE );
g_d3d_device->SetRenderState( D3DRS_ZENABLE, TRUE );
g_d3d_device->SetRenderState( D3DRS_ZWRITEENABLE, TRUE );
g_d3d_device->SetRenderState( D3DRS_MULTISAMPLEANTIALIAS, FALSE );
g_d3d_device->SetRenderState( D3DRS_ALPHATESTENABLE, FALSE );
g_d3d_device->SetRenderState( D3DRS_ALPHABLENDENABLE, FALSE );
g_d3d_device->SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW );
for( int i= 0; i < 8; ++i )
{
g_d3d_device->SetTexture( i, NULL );
}
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_SHADOW ] );
g_d3d_device->SetDepthStencilSurface( g_pFullScreenRTS[ RTS_SHADOW_DS ] );
}
void Renderpipe::PreparePreRenderStates()
{
g_d3d_device->SetRenderState( D3DRS_LIGHTING, FALSE );
g_d3d_device->SetRenderState( D3DRS_ZENABLE, TRUE );
g_d3d_device->SetRenderState( D3DRS_ZWRITEENABLE, TRUE );
g_d3d_device->SetRenderState( D3DRS_MULTISAMPLEANTIALIAS, TRUE );
g_d3d_device->SetRenderState( D3DRS_ALPHATESTENABLE, FALSE );
g_d3d_device->SetRenderState( D3DRS_ALPHABLENDENABLE, FALSE );
g_d3d_device->SetRenderState( D3DRS_CULLMODE, D3DCULL_CCW );
for( int i= 0; i < 8; ++i )
{
g_d3d_device->SetTexture( i, NULL );
}
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_DEPTH_MS ] );
g_d3d_device->SetDepthStencilSurface( g_pFullScreenRTS[ RTS_DEFAULT_DS ] );
}
void Renderpipe::PrepareFullScreenQuadRenderStates()
{
g_d3d_device->SetRenderState( D3DRS_LIGHTING, FALSE );
g_d3d_device->SetRenderState( D3DRS_ZENABLE, FALSE );
g_d3d_device->SetRenderState( D3DRS_MULTISAMPLEANTIALIAS, FALSE );
g_d3d_device->SetRenderState( D3DRS_ALPHATESTENABLE, FALSE );
g_d3d_device->SetRenderState( D3DRS_ALPHABLENDENABLE, FALSE );
g_d3d_device->SetRenderState( D3DRS_CULLMODE, D3DCULL_NONE );
g_d3d_device->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_TEXTURE );
g_d3d_device->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1 );
// sampler2D colorSampler : register(s0);
g_d3d_device->SetSamplerState( 0, D3DSAMP_MINFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 0, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 0, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 0, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP );
g_d3d_device->SetSamplerState( 0, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP );
g_d3d_device->SetTexture( 0, g_pFullScreenRT[ RT_COLOR ] );
// sampler2D depthSampler : register(s1);
g_d3d_device->SetSamplerState( 1, D3DSAMP_MINFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 1, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 1, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 1, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP );
g_d3d_device->SetSamplerState( 1, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP );
g_d3d_device->SetTexture( 1, g_pFullScreenRT[ RT_DEPTH ] );
// sampler2D ditherSampler : register(s2);
g_d3d_device->SetSamplerState( 2, D3DSAMP_MINFILTER, D3DTEXF_POINT );
g_d3d_device->SetSamplerState( 2, D3DSAMP_MAGFILTER, D3DTEXF_POINT );
g_d3d_device->SetSamplerState( 2, D3DSAMP_MIPFILTER, D3DTEXF_POINT );
g_d3d_device->SetSamplerState( 2, D3DSAMP_ADDRESSU, D3DTADDRESS_WRAP );
g_d3d_device->SetSamplerState( 2, D3DSAMP_ADDRESSV, D3DTADDRESS_WRAP );
g_d3d_device->SetTexture( 2, g_pTextures[ TI_RotMatrix ].GetPointer() );
// sampler2D mySampler1 : register(s3);
g_d3d_device->SetSamplerState( 3, D3DSAMP_MINFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 3, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 3, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 3, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP );
g_d3d_device->SetSamplerState( 3, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP );
g_d3d_device->SetTexture( 3, NULL );
// sampler2D mySampler2 : register(s4);
g_d3d_device->SetSamplerState( 4, D3DSAMP_MINFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 4, D3DSAMP_MAGFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 4, D3DSAMP_MIPFILTER, D3DTEXF_LINEAR );
g_d3d_device->SetSamplerState( 4, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP );
g_d3d_device->SetSamplerState( 4, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP );
g_d3d_device->SetTexture( 4, NULL );
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_COLOR_MS ] );
g_d3d_device->SetDepthStencilSurface( NULL );
}
void Renderpipe::PrepareRenderTargets(UINT nScreenX, UINT nScreenY, UINT nShadowXY, D3DMULTISAMPLE_TYPE multiSampleType)
{
// RTs erzeugen
g_d3d_device->CreateTexture( nScreenX,
nScreenY,
1,
D3DUSAGE_RENDERTARGET,
D3DFMT_R32F,
D3DPOOL_DEFAULT,
&(g_pFullScreenRT[ RT_DEPTH ]),
NULL);
g_d3d_device->CreateTexture( nScreenX,
nScreenY,
1,
D3DUSAGE_RENDERTARGET,
D3DFMT_A8R8G8B8,
D3DPOOL_DEFAULT,
&(g_pFullScreenRT[ RT_COLOR ]),
NULL);
g_d3d_device->CreateTexture( nScreenX,
nScreenY,
0,
D3DUSAGE_RENDERTARGET | D3DUSAGE_AUTOGENMIPMAP,
D3DFMT_A8R8G8B8,
D3DPOOL_DEFAULT,
&(g_pFullScreenRT[ RT_AUX1 ]),
NULL);
g_d3d_device->CreateTexture( nScreenX,
nScreenY,
1,
D3DUSAGE_RENDERTARGET,
D3DFMT_A8R8G8B8,
D3DPOOL_DEFAULT,
&(g_pFullScreenRT[ RT_AUX2 ]),
NULL);
g_d3d_device->CreateTexture( nShadowXY,
nShadowXY,
1,
D3DUSAGE_RENDERTARGET,
D3DFMT_R32F,
D3DPOOL_DEFAULT,
&(g_pFullScreenRT[ RT_SHADOW ]),
NULL);
// Multi-sampled depth surface erzeugen
g_d3d_device->CreateRenderTarget( nScreenX,
nScreenY,
D3DFMT_R32F,
multiSampleType,
0,
FALSE,
&(g_pFullScreenRTS[ RTS_DEPTH_MS ]),
NULL);
// Back Buffer holen
g_d3d_device->GetRenderTarget( 0, &(g_pFullScreenRTS[ RTS_COLOR_MS ]) );
// Depth-stencil Buffer holen
g_d3d_device->GetDepthStencilSurface( &(g_pFullScreenRTS[ RTS_DEFAULT_DS ]) );
// Non-multi-sampled depth-stencil surface erzeugen
g_d3d_device->CreateDepthStencilSurface( nShadowXY,
nShadowXY,
D3DFMT_D24S8,
D3DMULTISAMPLE_NONE,
0,
TRUE,
&(g_pFullScreenRTS[ RTS_SHADOW_DS ]),
NULL);
// Texture Surfaces holen
if( g_pFullScreenRT[ RT_DEPTH ] != NULL )
{
g_pFullScreenRT[ RT_DEPTH ]->GetSurfaceLevel( 0, &(g_pFullScreenRTS[ RTS_DEPTH ]) );
}
if( g_pFullScreenRT[ RT_COLOR ] != NULL )
{
g_pFullScreenRT[ RT_COLOR ]->GetSurfaceLevel( 0, &(g_pFullScreenRTS[ RTS_COLOR ]) );
}
if( g_pFullScreenRT[ RT_AUX1 ] != NULL )
{
g_pFullScreenRT[ RT_AUX1 ]->GetSurfaceLevel( 0, &(g_pFullScreenRTS[ RTS_AUX1 ]) );
}
if( g_pFullScreenRT[ RT_AUX2 ] != NULL )
{
g_pFullScreenRT[ RT_AUX2 ]->GetSurfaceLevel( 0, &(g_pFullScreenRTS[ RTS_AUX2 ]) );
}
if( g_pFullScreenRT[ RT_SHADOW ] != NULL )
{
g_pFullScreenRT[ RT_SHADOW ]->GetSurfaceLevel( 0, &(g_pFullScreenRTS[ RTS_SHADOW ]) );
}
}
void Renderpipe::SimpleRenderPass()
{
/***********************************************************************************/
// Renderdurchlauf ohne Postprocessing
//normale Renderstati
Renderpipe::PrepareWithoutPostProcessing();
// Bildschirm loeschen
g_d3d_device->Clear( 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0xff20b0f0, 1.0f, 0 );
//alle Renderpipes ausfueheren mit normalen Renderstati
for( int i= 0; i < ObjectCount; i++ )
{
g_Objects[ i ].Render();
}
g_SkyBox.RenderSky();
}
void Renderpipe::RenderPassPostProcessing()
{
/***********************************************************************************/
// vorbereitender Renderdurchlauf
//Pre-pass Renderstati
Renderpipe::PreparePreRenderStates();
// Bildschirm loeschen
g_d3d_device->Clear( 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0, 1.0f, 0 );
//alle Renderpipes ausfueheren mit pre-pass Renderstati
for( int i= 0; i < ObjectCount; i++ )
{
g_Objects[ i ].PreRender();
}
g_SkyBox.RenderSkyDepth();
// Tiefe in Textur kopieren
g_d3d_device->StretchRect( g_pFullScreenRTS[ RTS_DEPTH_MS ], NULL,
g_pFullScreenRTS[ RTS_DEPTH ], NULL, D3DTEXF_NONE );
/***********************************************************************************/
// Schatten-Renderdurchlauf
// Schatten löschen
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_AUX2 ] );
g_d3d_device->Clear( 0, NULL, D3DCLEAR_TARGET, 0xffffffff, 1.0f, 0 );
// Shadow splits rendern
for(int iSplit = g_PSSM.m_iSplitCount; iSplit-- > 0; )
{
// Backup scene view-proj matrix
D3DXMATRIX matSceneVP;
memcpy( &matSceneVP, &g_matVP, sizeof(D3DXMATRIX) );
D3DXMATRIX matSplitVP;
float float4Vec[4];
//[VS] float4x4 matWVP : register(c0);
D3DXMatrixMultiply( &g_matVP, &g_PSSM.m_ViewMatrices[iSplit], &g_PSSM.m_ProjMatrices[iSplit] );
D3DXMatrixTranspose( &matSplitVP, &g_matVP );
memcpy( &g_matWVP, &matSplitVP, sizeof(D3DXMATRIX) );
g_d3d_device->SetVertexShaderConstantF( 0, (float*)&g_matWVP, 4 );
//[VS] float3 viewPos : register(c4);
//[PS] float3 viewPos : register(c2);
memcpy(float4Vec, &g_PSSM.m_ViewPos[iSplit], sizeof(float)*3);
g_d3d_device->SetVertexShaderConstantF( 4, float4Vec, 1 );
g_d3d_device->SetPixelShaderConstantF( 2, float4Vec, 1 );
//[VS] float3 viewDir : register(c10);
memcpy(float4Vec, &g_PSSM.m_ViewDir[iSplit], sizeof(float)*3);
g_d3d_device->SetVertexShaderConstantF( 10, float4Vec, 1 );
//Shadow-pass Renderstati
Renderpipe::PrepareShadowRenderStates();
// Schattentiefen loeschen
g_d3d_device->Clear( 0, NULL, D3DCLEAR_TARGET | D3DCLEAR_ZBUFFER, 0, 1.0f, 0 );
//alle Renderpipes ausfueheren mit pre-pass Renderstati
for( int i= 0; i < ObjectCount; i++ )
{
g_Objects[ i ].PreRender();
}
// Pre-processing beginnen
Renderpipe::PrepareFullScreenQuadRenderStates();
//[VS] float4x4 matWVP : register(c0);
memcpy( &g_matVP, &matSceneVP, sizeof(D3DXMATRIX) );
D3DXMatrixTranspose( &g_matWVP, &g_matVP );
g_d3d_device->SetVertexShaderConstantF( 0, (float*)&g_matWVP, 4 );
//[VS] float3 viewPos : register(c4);
//[PS] float3 viewPos : register(c2);
memcpy(float4Vec, &g_Camera.m_vec3Pos, sizeof(float)*3);
g_d3d_device->SetVertexShaderConstantF( 4, float4Vec, 1 );
g_d3d_device->SetPixelShaderConstantF( 2, float4Vec, 1 );
//[VS] float3 viewDir : register(c10);
memcpy(float4Vec, &g_CamFront, sizeof(float)*3);
g_d3d_device->SetVertexShaderConstantF( 10, float4Vec, 1 );
//[PS] float split : register(c23);
float4Vec[0] = (float)iSplit;
g_d3d_device->SetPixelShaderConstantF( 23, float4Vec, 1 );
//[PS] float4x4 shadowVP : register(c24);
g_d3d_device->SetPixelShaderConstantF( 24, (float*)&matSplitVP, 4 );
//[PS] float2 shadowDepthOffsetScalingInverses : register(c28);
// float4Vec[0] = -g_PSSM.m_ProjMatrices[iSplit]._43;
// float4Vec[1] = 1.0f / g_PSSM.m_ProjMatrices[iSplit]._33;
// g_d3d_device->SetPixelShaderConstantF( 28, float4Vec, 1 );
//[PS] float3 g_vShadowViewPos : register(c28);
memcpy(float4Vec, &g_PSSM.m_ViewPos[iSplit], sizeof(float)*3);
g_d3d_device->SetPixelShaderConstantF( 28, float4Vec, 1 );
//[PS] float3 g_vShadowViewDir : register(c29);
memcpy(float4Vec, &g_PSSM.m_ViewDir[iSplit], sizeof(float)*3);
g_d3d_device->SetPixelShaderConstantF( 29, float4Vec, 1 );
//[PS] float2 shadowMapScaling : register(c30);
float4Vec[0] = g_PSSM.m_ProjMatrices[iSplit]._11 / 2.0f;
float4Vec[1] = g_PSSM.m_ProjMatrices[iSplit]._22 / 2.0f;
float4Vec[2] = (float)g_nShadowResolution;
float4Vec[3] = (float)g_nShadowResolution;
g_d3d_device->SetPixelShaderConstantF( 30, float4Vec, 1 );
// Shadow split auf die Szene projezieren
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_AUX2 ] );
g_d3d_device->SetTexture( 0, g_pFullScreenRT[ RT_SHADOW ] );
g_FullScreenQuad.m_iUsedShader[0] = PSSM_Proj;
g_FullScreenQuad.Render();
}
// Pre-processing beginnen
Renderpipe::PrepareFullScreenQuadRenderStates();
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_AUX1 ] );
g_d3d_device->SetTexture( 0, g_pFullScreenRT[ RT_AUX2 ] );
g_FullScreenQuad.m_iUsedShader[0] = SSAO_BlurH;
g_FullScreenQuad.Render();
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_AUX2 ] );
g_d3d_device->SetTexture( 0, g_pFullScreenRT[ RT_AUX1 ] );
g_FullScreenQuad.m_iUsedShader[0] = SSAO_BlurV;
g_FullScreenQuad.Render();
/***********************************************************************************/
// normaler Renderdurchlauf
//normale Renderstati
Renderpipe::PrepareDefaultRenderStates();
// Bildschirm loeschen
g_d3d_device->Clear( 0, NULL, D3DCLEAR_TARGET , 0xff20b0f0, 1.0f, 0 );
//alle Renderpipes ausfueheren mit normalen Renderstati
for( int i= 0; i < ObjectCount; i++ )
{
g_Objects[ i ].Render();
}
g_SkyBox.RenderSky();
// Farbe in Textur kopieren
g_d3d_device->StretchRect( g_pFullScreenRTS[ RTS_COLOR_MS ], NULL,
g_pFullScreenRTS[ RTS_COLOR ], NULL, D3DTEXF_NONE );
// Post-processing beginnen
Renderpipe::PrepareFullScreenQuadRenderStates();
#ifndef DISABLEDOF
bool bDOFEnabled = (g_Camera.m_fDOF >= 0.0f);
#else
bool bDOFEnabled = false;
#endif
float float4Vec[4];
// SSAO
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_AUX1 ] );
g_FullScreenQuad.m_iUsedShader[0] = SSAO;
g_FullScreenQuad.Render();
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_AUX2 ] );
g_d3d_device->SetTexture( 0, g_pFullScreenRT[ RT_AUX1 ] );
g_FullScreenQuad.m_iUsedShader[0] = SSAO_BlurH;
g_FullScreenQuad.Render();
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ bDOFEnabled ? RTS_COLOR : RTS_COLOR_MS ] );
g_d3d_device->SetTexture( 0, g_pFullScreenRT[ RT_AUX2 ] );
g_FullScreenQuad.m_bAlphaEnable[0] = true;
g_FullScreenQuad.m_SrcBlend[0] = D3DBLEND_DESTCOLOR;
g_FullScreenQuad.m_DestBlend[0] = D3DBLEND_ONE;
g_FullScreenQuad.m_BlendOp[0] = D3DBLENDOP_REVSUBTRACT;
g_FullScreenQuad.m_iUsedShader[0] = SSAO_BlurV;
g_FullScreenQuad.Render();
g_FullScreenQuad.m_bAlphaEnable[0] = false;
// Glow
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_AUX1 ] );
g_d3d_device->SetTexture( 0, g_pFullScreenRT[ RT_COLOR ] );
g_FullScreenQuad.m_iUsedShader[0] = Extract_InvAlpha;
g_FullScreenQuad.Render();
const int iNumGlowPasses = 3;
const int iGlowDownsampling = max(2 + g_iResolutionFactorExp, 0);
// Blur
{
float4Vec[0] = g_fGlow;
float4Vec[1] = g_fGlow;
float4Vec[2] = g_fGlow;
float4Vec[3] = g_fGlow;
g_d3d_device->SetPixelShaderConstantF( 31, float4Vec, 1 );
}
for(int iPass = 0; iPass < iNumGlowPasses; iPass++)
{
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_AUX2 ] );
g_d3d_device->SetTexture( 0, g_pFullScreenRT[ RT_AUX1 ] );
float4Vec[0] = d3dpp.BackBufferWidth / (float)(1 << iGlowDownsampling);
float4Vec[1] = d3dpp.BackBufferHeight / (float)(1 << iGlowDownsampling);
float4Vec[2] = 1.f / float4Vec[0];
float4Vec[3] = 1.f / float4Vec[1];
g_d3d_device->SetPixelShaderConstantF( 0, float4Vec, 1 );
if(iPass == 0)
{
float4Vec[0] = (float)iGlowDownsampling;
g_d3d_device->SetSamplerState( 0, D3DSAMP_MIPMAPLODBIAS, *((DWORD*)float4Vec) );
}
g_FullScreenQuad.m_iUsedShader[0] = BlurH;
g_FullScreenQuad.Render();
float4Vec[0] = 0.0f;
g_d3d_device->SetSamplerState( 0, D3DSAMP_MIPMAPLODBIAS, *((DWORD*)float4Vec) );
// Redirect last pass to screen
if(iPass == iNumGlowPasses - 1)
{
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ bDOFEnabled ? RTS_COLOR : RTS_COLOR_MS ] );
g_FullScreenQuad.m_bAlphaEnable[0] = true;
g_FullScreenQuad.m_SrcBlend[0] = D3DBLEND_ONE;
g_FullScreenQuad.m_DestBlend[0] = D3DBLEND_ONE;
g_FullScreenQuad.m_BlendOp[0] = D3DBLENDOP_ADD;
}
else
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_AUX1 ] );
g_d3d_device->SetTexture( 0, g_pFullScreenRT[ RT_AUX2 ] );
g_FullScreenQuad.m_iUsedShader[0] = BlurV;
g_FullScreenQuad.Render();
g_FullScreenQuad.m_bAlphaEnable[0] = false;
float4Vec[0] = (float)d3dpp.BackBufferWidth;
float4Vec[1] = (float)d3dpp.BackBufferHeight;
float4Vec[2] = 1.f / float4Vec[0];
float4Vec[3] = 1.f / float4Vec[1];
g_d3d_device->SetPixelShaderConstantF( 0, float4Vec, 1 );
}
// Ray
#ifndef DISABLERAY
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_AUX1 ] );
g_d3d_device->SetTexture( 0, NULL );
g_FullScreenQuad.m_iUsedShader[0] = Ray_Mask;
g_FullScreenQuad.Render();
const int iNumRayPasses = 4;
// Extrude rays
for(int iPass = 0; iPass < iNumRayPasses; iPass++)
{
//[PS] float passID2exp : register(c23);
float4Vec[0] = (float)iPass;
float4Vec[1] = (float)(1 << iPass);
float4Vec[2] = (float)(iPass == iNumRayPasses - 1);
g_d3d_device->SetPixelShaderConstantF( 23, float4Vec, 1 );
// Redirect last pass to screen
if(iPass == iNumRayPasses - 1)
{
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ bDOFEnabled ? RTS_COLOR : RTS_COLOR_MS ] );
g_FullScreenQuad.m_bAlphaEnable[0] = true;
g_FullScreenQuad.m_SrcBlend[0] = D3DBLEND_ONE;
g_FullScreenQuad.m_DestBlend[0] = D3DBLEND_ONE;
g_FullScreenQuad.m_BlendOp[0] = D3DBLENDOP_ADD;
}
else
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ (iPass % 2 == 0) ? RTS_AUX2 : RTS_AUX1 ] );
g_d3d_device->SetTexture( 0, g_pFullScreenRT[ (iPass % 2 == 0) ? RT_AUX1 : RT_AUX2 ] );
g_FullScreenQuad.m_iUsedShader[0] = Ray_Extrude;
g_FullScreenQuad.Render();
g_FullScreenQuad.m_bAlphaEnable[0] = false;
}
#endif
// DOF
if(bDOFEnabled)
{
const int iDOFDownsampling = max(2 + g_iResolutionFactorExp, 0);
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_AUX1 ] );
g_d3d_device->SetTexture( 0, g_pFullScreenRT[ RT_COLOR ] );
g_FullScreenQuad.m_iUsedShader[0] = DOF_Intensity;
g_FullScreenQuad.Render();
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_AUX2 ] );
g_d3d_device->SetTexture( 0, g_pFullScreenRT[ RT_AUX1 ] );
g_d3d_device->SetTexture( 4, g_pFullScreenRT[ RT_AUX1 ] );
float4Vec[0] = d3dpp.BackBufferWidth / (float)(1 << iDOFDownsampling);
float4Vec[1] = d3dpp.BackBufferHeight / (float)(1 << iDOFDownsampling);
float4Vec[2] = 1.f / float4Vec[0];
float4Vec[3] = 1.f / float4Vec[1];
g_d3d_device->SetPixelShaderConstantF( 0, float4Vec, 1 );
float4Vec[0] = (float)iDOFDownsampling;
g_d3d_device->SetSamplerState( 0, D3DSAMP_MIPMAPLODBIAS, *((DWORD*)float4Vec) );
g_FullScreenQuad.m_iUsedShader[0] = BlurBilH;
g_FullScreenQuad.Render();
float4Vec[0] = 0.0f;
g_d3d_device->SetSamplerState( 0, D3DSAMP_MIPMAPLODBIAS, *((DWORD*)float4Vec) );
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_COLOR ] );
g_d3d_device->SetTexture( 0, g_pFullScreenRT[ RT_AUX2 ] );
g_d3d_device->SetTexture( 4, g_pFullScreenRT[ RT_AUX1 ] );
g_FullScreenQuad.m_iUsedShader[0] = BlurBilV;
g_FullScreenQuad.Render();
float4Vec[0] = (float)d3dpp.BackBufferWidth;
float4Vec[1] = (float)d3dpp.BackBufferHeight;
float4Vec[2] = 1.f / float4Vec[0];
float4Vec[3] = 1.f / float4Vec[1];
g_d3d_device->SetPixelShaderConstantF( 0, float4Vec, 1 );
g_d3d_device->SetRenderTarget( 0, g_pFullScreenRTS[ RTS_COLOR_MS ] );
g_d3d_device->SetTexture( 0, g_pFullScreenRT[ RT_AUX1 ] );
g_d3d_device->SetTexture( 4, g_pFullScreenRT[ RT_COLOR ] );
g_FullScreenQuad.m_iUsedShader[0] = DOF;
g_FullScreenQuad.Render();
}
}

View File

@@ -0,0 +1,55 @@
#pragma once
struct ScriptState
{
int iTargetTick;
int iScriptPointer;
int iScriptParam;
float m_fCamSpeed;
float m_fObjectSpeed;
float m_fCamTime;
float m_fObjectTime;
int m_iCam;
int m_iObject;
int m_iObjectCount;
int m_iPorPointer;
int m_iPorStartTick;
void Prepare()
{
iTargetTick= 0;
iScriptPointer= 0;
iScriptParam= 0;
m_fCamSpeed= 1.0f;
m_fObjectSpeed= 1.0f;
m_fCamTime= 0.0f;
m_fObjectTime= 0.0f;
m_iCam= 0;
m_iObject= 0;
m_iObjectCount= 1;
m_iPorPointer= 0;
m_iPorStartTick= 0;
}
};
enum ScriptCmd
{
QUIT,
CSPEED,
OSPEED,
CTIME,
OTIME,
CAM,
OBJ,
TICK,
};

252
evoke-64k/bp10/Shader.cpp Normal file
View File

@@ -0,0 +1,252 @@
#include "defines.h"
#include "shader.h"
#include "globals.h"
void Shader::Init()
{
m_pVSShader= NULL;
m_pPSShader= NULL;
// per default Texturen einfach lassen wie sie sind
m_iUsedTextureStageCount= -1;
for( int i= 0; i < m_iMaxTextureStageCount; ++i )
{
m_iTextureIndices[ i ]= TI_IgnoreSetting;
m_iTextureSettings[ i ]= TI_IgnoreSetting;
}
}
void Shader::DeInit()
{
Release();
}
void Shader::Release()
{
if( m_pVSShader != NULL )
{
m_pVSShader->Release();
m_pVSShader= NULL;
}
if( m_pPSShader != NULL )
{
m_pPSShader->Release();
m_pPSShader= NULL;
}
}
void Shader::CompileVS(const char* pShaderCode, const char* pEntryPoint )
{
#ifdef EXTRACODE
std::string strCurrentCode( pShaderCode );
if( strCurrentCode == m_strVSCode )
{
return;
}
m_strVSCode= strCurrentCode;
#endif
ID3DXBuffer* tmp= NULL;
#if LAPTOPMODE == 1
Compile( pShaderCode, pEntryPoint, "vs_2_0", &tmp );
#else
Compile( pShaderCode, pEntryPoint, "vs_3_0", &tmp );
#endif
if( tmp == NULL )
{
return;
}
g_d3d_device->CreateVertexShader( (DWORD*)tmp->GetBufferPointer(), &m_pVSShader );
tmp->Release();
}
void Shader::CompilePS(const char* pShaderCode, const char* pEntryPoint )
{
#ifdef EXTRACODE
std::string strCurrentCode( pShaderCode );
if( strCurrentCode == m_strPSCode )
{
return;
}
m_strPSCode= strCurrentCode;
#endif
ID3DXBuffer* tmp= NULL;
#if LAPTOPMODE == 1
Compile( pShaderCode, pEntryPoint, "ps_2_0", &tmp );
#else
Compile( pShaderCode, pEntryPoint, "ps_3_0", &tmp );
#endif
if( tmp == NULL )
{
return;
}
g_d3d_device->CreatePixelShader( (DWORD*)tmp->GetBufferPointer(), &m_pPSShader );
tmp->Release();
}
void Shader::Compile( const char* pShaderCode, const char* pEntryPoint, const char* ShaderModel, ID3DXBuffer** tmp )
{
int iLength= 0;
while(pShaderCode[ iLength ] != 0 )
{
iLength++;
}
#ifndef _DEBUG
D3DXCompileShader( pShaderCode, iLength, 0, 0, pEntryPoint, ShaderModel, D3DXSHADER_OPTIMIZATION_LEVEL3|D3DXSHADER_PREFER_FLOW_CONTROL, tmp, 0, 0 );
#else
ID3DXBuffer *errors;
if( D3DXCompileShader( pShaderCode, iLength, 0, 0, pEntryPoint, ShaderModel, D3DXSHADER_DEBUG*0+1*(D3DXSHADER_OPTIMIZATION_LEVEL3|D3DXSHADER_PREFER_FLOW_CONTROL), tmp, &errors, 0 ) <0 )
{
OutputDebugString( "Error in D3DXCompileShader:\n" );
OutputDebugString( pShaderCode );
OutputDebugString( "\n" );
OutputDebugString( (char*)errors->GetBufferPointer() );
errors->Release();
//assert( false );
return;
}
OutputDebugString( "Shader compiled.\n" );
#endif
}
void Shader::Activate()
{
g_d3d_device->SetPixelShader( m_pPSShader );
g_d3d_device->SetVertexShader( m_pVSShader );
for( int i= 0; i <= m_iUsedTextureStageCount; ++i )
{
if( m_iTextureIndices[ i ] != TI_IgnoreSetting )
{
g_d3d_device->SetTexture(
i,
g_pTextures[ m_iTextureIndices[ i ] ].GetPointer() );
g_d3d_device->SetSamplerState( i, D3DSAMP_ADDRESSU, D3DTADDRESS_WRAP );
g_d3d_device->SetSamplerState( i, D3DSAMP_ADDRESSV, D3DTADDRESS_WRAP );
if( m_iTextureSettings[ i ] == TI_CLAMP )
{
g_d3d_device->SetSamplerState( i, D3DSAMP_ADDRESSU, D3DTADDRESS_CLAMP );
g_d3d_device->SetSamplerState( i, D3DSAMP_ADDRESSV, D3DTADDRESS_CLAMP );
}
}
}
}
void Shader::Deactivate()
{
g_d3d_device->SetPixelShader( NULL );
g_d3d_device->SetVertexShader( NULL );
}
void Shader::SetShaderTransform(const D3DXMATRIX &mWorld, const D3DXMATRIX &mWorldInverse)
{
/***********************************************************************************/
// Konstanten fuer Shader setzen
D3DXMATRIX float4x4Mat;
//[VS] float4x4 matWVP : register(c0);
D3DXMatrixMultiply( &g_matWVP, &mWorld, &g_matVP );
D3DXMatrixTranspose( &g_matWVP, &g_matWVP );
g_d3d_device->SetVertexShaderConstantF( 0, (float*)&g_matWVP, 4 );
//[VS] float4x4 matWorld : register(c12);
D3DXMatrixTranspose( &float4x4Mat, &mWorld );
g_d3d_device->SetVertexShaderConstantF( 12, (float*)&float4x4Mat, 4 );
//[VS] float4x4 matWorldI : register(c16);
D3DXMatrixTranspose( &float4x4Mat, &mWorldInverse );
g_d3d_device->SetVertexShaderConstantF( 16, (float*)&float4x4Mat, 4 );
}
void Shader::SetShaderConstants()
{
/***********************************************************************************/
// Konstanten fuer Shader setzen
float float4Vec[4];
//[VS] float4x4 matWVP : register(c0);
D3DXMatrixMultiply( &g_matVP, &g_matView, &g_matProjection );
D3DXMatrixTranspose( &g_matWVP, &g_matVP );
g_d3d_device->SetVertexShaderConstantF( 0, (float*)&g_matWVP, 4 );
//[VS] float3x3 viewMatrixRotInv : register(c7);
g_d3d_device->SetVertexShaderConstantF( 7, (float*)&g_matView, 3 );
//[VS] float4 projScaleOffsetInv : register(c11);
float4Vec[0] = 1.0f / g_matProjection._11;
float4Vec[1] = 1.0f / g_matProjection._22;
float4Vec[2] = -(g_matProjection._31 + g_matProjection._41) * float4Vec[0];
float4Vec[3] = -(g_matProjection._32 + g_matProjection._42) * float4Vec[1];
g_d3d_device->SetVertexShaderConstantF( 11, float4Vec, 1 );
//[VS] float3 viewPos : register(c4);
//[PS] float3 viewPos : register(c2);
memcpy(float4Vec, &g_Camera.m_vec3Pos, sizeof(float)*3);
g_d3d_device->SetVertexShaderConstantF( 4, float4Vec, 1 );
g_d3d_device->SetPixelShaderConstantF( 2, float4Vec, 1 );
//[VS] float3 viewDir : register(c10);
//[PS] float3 viewDir : register(c4);
memcpy(float4Vec, &g_CamFront, sizeof(float)*3);
g_d3d_device->SetVertexShaderConstantF( 10, float4Vec, 1 );
g_d3d_device->SetPixelShaderConstantF( 4, float4Vec, 1 );
//[VS] float2 res : register(c5);
//[PS] float2 res : register(c0);
float4Vec[0] = (float)d3dpp.BackBufferWidth;
float4Vec[1] = (float)d3dpp.BackBufferHeight;
float4Vec[2] = 1.f / float4Vec[0];
float4Vec[3] = 1.f / float4Vec[1];
g_d3d_device->SetVertexShaderConstantF( 5, float4Vec, 1 );
g_d3d_device->SetPixelShaderConstantF( 0, float4Vec, 1 );
//[VS] float3 lightDir : register(c6);
//[PS] float3 lightDir : register(c1);
memcpy(float4Vec, &g_LightDir, sizeof(float)*3);
g_d3d_device->SetVertexShaderConstantF( 6, float4Vec, 1 );
g_d3d_device->SetPixelShaderConstantF( 1, float4Vec, 1 );
//[PS] float demoTime : register(c3);
float4Vec[0]= 64.0f * (float)g_Camera.m_iDemoTime / (float)g_iCamTickFactor;
float4Vec[1]= g_Camera.m_fDOF * g_Camera.m_fDOF;
float4Vec[2]= g_fClouds;
float4Vec[3]= g_fPlasmaGrid;
g_d3d_device->SetPixelShaderConstantF( 3, float4Vec, 1 );
//[PS] float4 glow : register(c31);
{
float4Vec[0] = g_fGlow;
float4Vec[1] = g_fGlow;
float4Vec[2] = g_fGlow;
float4Vec[3] = g_fGlow;
g_d3d_device->SetPixelShaderConstantF( 31, float4Vec, 1 );
}
}
void Shader::SetTextureStageSettings(
int iTextureStage,
int iTextureIndex,
int iTextureSettings )
{
assert( iTextureStage < m_iMaxTextureStageCount );
if( iTextureStage > m_iUsedTextureStageCount )
{
m_iUsedTextureStageCount= iTextureStage;
}
m_iTextureIndices[ iTextureStage ]= iTextureIndex;
m_iTextureSettings[ iTextureStage ]= iTextureSettings;
}

View File

View File

@@ -0,0 +1,114 @@
#pragma once
#include "globals.h"
#include "shader.h"
// --> Neuen Shader hinzufuegen:
//
// in globals.h und globals.cpp ein neues Char Array fuer den Quellcode des Shader anlegen
// in globals.h das Enum ShaderIndices erweitern
// eine Datei im cfg Verzeichnis anlegen, die diesen Shader enthaelt
// in ConfigFiles.cpp die Funktion ReadShaders() erweitern, damit die Datei in das Array eingelesen wird
// den Shader in PrepareShaders compilieren
void RenderLoading( int iPercent );
void PrepareShaders()
{
//Postprocessing Zeug
g_Shaders[ PreDepth ].CompileVS(g_ShaderVSGeneral, "vs_main" );
g_Shaders[ PreDepth ].CompilePS(g_ShaderPSDepth, "ps_main" );
int iPer= 5;
int iAdd= 5;
RenderLoading( iPer );
g_Shaders[ PSSM_Proj ].CompileVS(g_ShaderVSFSQuad, "vs_main" );
g_Shaders[ PSSM_Proj ].CompilePS(g_ShaderPSPSSM, "ps_main" );
iPer+=iAdd;
RenderLoading( iPer );
g_Shaders[ SSAO ].CompileVS(g_ShaderVSFSQuad, "vs_main" );
g_Shaders[ SSAO ].CompilePS(g_ShaderPSAmbOcc, "ps_main" );
iPer+=iAdd;
RenderLoading( iPer );
g_Shaders[ SSAO_BlurH ].CompileVS(g_ShaderVSFSQuad, "vs_main" );
g_Shaders[ SSAO_BlurH ].CompilePS(g_ShaderPSAmbOcc, "ps_blur_hor" );
g_Shaders[ SSAO_BlurV ].CompileVS(g_ShaderVSFSQuad, "vs_main" );
g_Shaders[ SSAO_BlurV ].CompilePS(g_ShaderPSAmbOcc, "ps_blur_ver" );
iPer+=iAdd;
RenderLoading( iPer );
g_Shaders[ DOF_Intensity ].CompileVS(g_ShaderVSFSQuad, "vs_main" );
g_Shaders[ DOF_Intensity ].CompilePS(g_ShaderPSDOF, "ps_blur_intensity" );
g_Shaders[ DOF ].CompileVS(g_ShaderVSFSQuad, "vs_main" );
g_Shaders[ DOF ].CompilePS(g_ShaderPSDOF, "ps_main" );
g_Shaders[ BlurBilH ].CompileVS(g_ShaderVSFSQuad, "vs_main" );
g_Shaders[ BlurBilH ].CompilePS(g_ShaderPSBlur, "ps_blur_bil_hor" );
g_Shaders[ BlurBilV ].CompileVS(g_ShaderVSFSQuad, "vs_main" );
g_Shaders[ BlurBilV ].CompilePS(g_ShaderPSBlur, "ps_blur_bil_ver" );
iPer+=iAdd;
RenderLoading( iPer );
g_Shaders[ Ray_Mask ].CompileVS(g_ShaderVSFSQuad, "vs_main" );
g_Shaders[ Ray_Mask ].CompilePS(g_ShaderPSRay, "ps_ray_mask" );
g_Shaders[ Ray_Extrude ].CompileVS(g_ShaderVSFSQuad, "vs_main" );
g_Shaders[ Ray_Extrude ].CompilePS(g_ShaderPSRay, "ps_ray_extrude" );
g_Shaders[ Extract_InvAlpha ].CompileVS(g_ShaderVSFSQuad, "vs_main" );
g_Shaders[ Extract_InvAlpha ].CompilePS(g_ShaderPSBlur, "ps_extract_inv_alpha" );
g_Shaders[ BlurH ].CompileVS(g_ShaderVSFSQuad, "vs_main" );
g_Shaders[ BlurH ].CompilePS(g_ShaderPSBlur, "ps_blur_hor" );
g_Shaders[ BlurV ].CompileVS(g_ShaderVSFSQuad, "vs_main" );
g_Shaders[ BlurV ].CompilePS(g_ShaderPSBlur, "ps_blur_ver" );
iPer+=iAdd;
RenderLoading( iPer );
// Shader fuer Objekte
g_Shaders[ Phong ].CompileVS(g_ShaderVSGeneral, "vs_main" );
g_Shaders[ Phong ].CompilePS(g_ShaderPSPhong, "ps_main" );
g_Shaders[ Rainbow ].CompileVS(g_ShaderVSGeneral, "vs_main" );
g_Shaders[ Rainbow ].CompilePS(g_ShaderPSRainbow, "ps_main" );
g_Shaders[ Rainbow ].SetTextureStageSettings( 0, TI_Rainbow, TI_CLAMP );
iPer+=iAdd;
RenderLoading( iPer );
g_Shaders[ Grass ].CompileVS(g_ShaderVSGeneral, "vs_main" );
g_Shaders[ Grass ].CompilePS(g_ShaderPSGrass, "ps_main" );
g_Shaders[ Grass ].SetTextureStageSettings( 0, TI_Random );
g_Shaders[ Tarmac ].CompileVS(g_ShaderVSGeneral, "vs_main" );
g_Shaders[ Tarmac ].CompilePS(g_ShaderPSTarmac, "ps_main" );
g_Shaders[ Tarmac ].SetTextureStageSettings( 0, TI_RandomCube );
iPer+=iAdd;
RenderLoading( iPer );
g_Shaders[ Wall ].CompileVS(g_ShaderVSGeneral, "vs_main" );
g_Shaders[ Wall ].CompilePS(g_ShaderPSWall, "ps_main" );
g_Shaders[ Wall ].SetTextureStageSettings( 0, TI_RandomCube );
g_Shaders[ Wall ].SetTextureStageSettings( 1, TI_Rainbow, TI_CLAMP );
g_Shaders[ Sky ].CompileVS(g_ShaderVSSky, "vs_main" );
g_Shaders[ Sky ].CompilePS(g_ShaderPSSky, "ps_main" );
g_Shaders[ Sky ].SetTextureStageSettings( 0, TI_RandomCube );
iPer+=iAdd;
RenderLoading( iPer );
g_Shaders[ SkyDepth ].CompileVS(g_ShaderVSSky, "vs_main" );
g_Shaders[ SkyDepth ].CompilePS(g_ShaderPSDepth, "ps_main" );
g_Shaders[ Text ].CompileVS(g_ShaderVSGeneral, "vs_main" );
g_Shaders[ Text ].CompilePS(g_ShaderPSText, "ps_main" );
}

View File

@@ -0,0 +1,178 @@
/***********************************************************************************/
/** \file StringHelper.cpp
** \brief Implementation zur Klasse StringHelper
*************************************************************************************
** Autor: Christian Roesch
*************************************************************************************
** -tut nichts-
**
*//*********************************************************************************/
// includes
#ifdef EXTRACODE
#include "StringHelper.h"
#include <cstdio>
std::vector< char > FrameWork::StringHelper::m_SpaceTab;
FrameWork::StringHelper::StringHelperPreparer FrameWork::StringHelper::m_shpDummy;
// Methoden-Definitionen
namespace FrameWork
{
/***********************************************************************************/
/** Schneidet einen String an den Separatoren auseinander. Der vorderste Teil wird
*** abgeschnitten, falls der Separator gefunden wird. Der Eingabestring wird auf den
*** Teil hinter dem Seperator gestutzt
***
*** \param strInput [in\out] Ursprungsstring
*** \param strSeperator Seperator
*** \param der vorne abgeschnittene Teil
***
*** \return true, wenn Seperator gefunden
*//*********************************************************************************/
bool StringHelper::splitAt(
std::string& strInput,
std::string strSeperator,
std::string& strOutput )
{
size_t tStart= strInput.find( strSeperator );
if( tStart == std::string::npos )
{
return false;
}
strOutput= strInput.substr( 0, tStart );
strInput= strInput.substr( tStart + strSeperator.size() );
return true;
}
bool StringHelper::trimFront( std::string& strData, char cWhiteSpace )
{
int i= 0;
if( (int)strData.size() == 0 )
{
return false;
}
while( strData[ i ] == cWhiteSpace )
{
i++;
}
if( i > 0 )
{
strData= strData.substr( i );
return true;
}
return false;
}
bool StringHelper::trimBack( std::string& strData, char cWhiteSpace )
{
int i= (int)strData.size() - 1;
if( i == -1 )
{
return false;
}
while( strData[ i ] == cWhiteSpace )
{
i--;
}
if( i < (int)strData.size() - 1 )
{
strData= strData.substr( 0, i + 1 );
return true;
}
return false;
}
bool StringHelper::trim( std::string& strData, char cWhiteSpace )
{
bool bTrimmed= trimFront( strData, cWhiteSpace );
bTrimmed|= trimBack( strData, cWhiteSpace );
return bTrimmed;
}
bool StringHelper::trimFront( std::string& strData, std::vector< char >& WhiteSpaces )
{
bool bTrimmed;
do
{
bTrimmed= false;
for( int i= 0; i < (int)WhiteSpaces.size(); ++i )
{
bTrimmed|= trimFront( strData, WhiteSpaces[ i ] );
}
} while( bTrimmed );
return bTrimmed;
}
bool StringHelper::trimBack( std::string& strData, std::vector< char >& WhiteSpaces )
{
bool bTrimmed;
do
{
bTrimmed= false;
for( int i= 0; i < (int)WhiteSpaces.size(); ++i )
{
bTrimmed|= trimBack( strData, WhiteSpaces[ i ] );
}
} while( bTrimmed );
return bTrimmed;
}
bool StringHelper::trim( std::string& strData, std::vector< char >& WhiteSpaces )
{
bool bTrimmed= trimFront( strData, WhiteSpaces );
bTrimmed|= trimBack( strData, WhiteSpaces );
return bTrimmed;
}
std::vector< char >& StringHelper::getSpaceTab()
{
return m_SpaceTab;
}
void StringHelper::toUpper( std::string& strData )
{
for( int i= 0; i < (int)strData.size(); ++i )
{
strData[ i ]= toupper( strData[ i ] );
}
}
int StringHelper::searchAndRreplace(
const std::string &strSearchString,
const std::string &strReplaceString,
std::string& strData )
{
int iRet= 0;
std::string::size_type pos = strData.find(strSearchString, 0);
int intLengthSearch = strSearchString.length();
while(std::string::npos != pos)
{
iRet++;
strData.replace(pos, intLengthSearch, strReplaceString);
pos = strData.find(strSearchString, pos + intLengthSearch);
}
return iRet;
}
}
#endif
/************************************************************************************
** Ende der Datei: StringHelper.cpp
************************************************************************************/

View File

@@ -0,0 +1,95 @@
/***********************************************************************************/
/** \file StringHelper.h
** \brief Header File zur Klasse StringHelper
*************************************************************************************
** Autor: Christian Roesch
*************************************************************************************
** _tut nichts_
**
*//*********************************************************************************/
#ifndef _StringHelper_H
#define _StringHelper_H
// includes
#include <string>
#include <vector>
// Klassen-Deklaration
namespace FrameWork
{
/***********************************************************************************/
/** \brief StringHelper _tut nichts_
*************************************************************************************
** Genau genommen _tut dies nichts_
**
*//*********************************************************************************/
class StringHelper
{
public:
static bool splitAt(
std::string& strInput,
std::string strSeperator,
std::string& strOutput );
static bool trim(
std::string& strData,
std::vector< char >& WhiteSpaces );
static bool trim(
std::string& strData,
char cWhiteSpace );
static bool trimFront(
std::string& strData,
std::vector< char >& WhiteSpaces );
static bool trimFront(
std::string& strData,
char cWhiteSpace );
static bool trimBack(
std::string& strData,
std::vector< char >& WhiteSpaces );
static bool trimBack(
std::string& strData,
char cWhiteSpace );
static void toUpper( std::string& strData );
static int searchAndRreplace(
const std::string &strSearchString,
const std::string &strReplaceString,
std::string& strData);
struct StringHelperPreparer
{
StringHelperPreparer()
{
StringHelper::m_SpaceTab.push_back( ' ' );
StringHelper::m_SpaceTab.push_back( '\t' );
}
};
static std::vector< char >& getSpaceTab();
protected:
private:
static StringHelperPreparer m_shpDummy;
static std::vector< char > m_SpaceTab;
};
}
#endif//_StringHelper_H
class FrameWork::StringHelper;
/************************************************************************************
** Ende der Datei: StringHelper.h
************************************************************************************/

View File

@@ -0,0 +1,32 @@
#pragma once
struct STargetValue
{
float m_fValue;
float m_fTarget;
float m_fSpeed;
float m_fAcceleration;
float m_fFriction;
STargetValue
( float fValue,
float fTarget,
float fSpeed,
float fAcceleration,
float fFriction )
{
m_fValue= fValue;
m_fTarget= fTarget;
m_fSpeed= fSpeed;
m_fAcceleration= fAcceleration;
m_fFriction= fFriction;
}
void timeStep()
{
m_fValue+= m_fSpeed;
float fDist= m_fTarget - m_fValue;
m_fSpeed+= fDist * m_fAcceleration;
m_fSpeed*= m_fFriction;
}
};

View File

@@ -0,0 +1,54 @@
/***********************************************************************************/
/** \file TextFileReader.h
** \brief Header File zur Klasse TextFileReader
*************************************************************************************
** Autor: Christian Roesch
*************************************************************************************
** _tut nichts_
**
*//*********************************************************************************/
#ifndef _TextFileReader_H
#define _TextFileReader_H
// includes
#include <vector>
#include <string>
// Klassen-Deklaration
namespace FrameWork
{
/***********************************************************************************/
/** \brief TextFileReader _tut nichts_
*************************************************************************************
** Genau genommen _tut dies nichts_
**
*//*********************************************************************************/
class TextFileReader
{
public:
bool read( std::string strFileName );
bool append( std::string FileName );
std::vector <std::string>& getFileLines();
int getLineCount();
void clear();
protected:
private:
std::vector <std::string> m_vecLines;
};
}
#endif//_TextFileReader_H
class FrameWork::TextFileReader;
/************************************************************************************
** Ende der Datei: TextFileReader.h
************************************************************************************/

362
evoke-64k/bp10/Texture.cpp Normal file
View File

@@ -0,0 +1,362 @@
#include "defines.h"
#include "Texture.h"
#include "Random.h"
#include "globals.h"
#include "rotmat.h"
void Texture::Init()
{
m_iSizeX= -1;
m_iSizeY= -1;
m_iSizeZ= -1;
m_iMipLevel= -1;
m_pTexture= NULL;
m_d3dlb.pBits= NULL;
m_d3dlb.RowPitch= -1;
m_d3dlb.SlicePitch= -1;
}
void Texture::DeInit()
{
Release();
}
void Texture::Create( int iSizeX,
int iSizeY,
int iSizeZ,
int iMipLevel )
{
Release();
m_iSizeX= iSizeX;
m_iSizeY= iSizeY;
m_iSizeZ= iSizeZ;
m_iMipLevel= iMipLevel;
if(m_iSizeZ > 1)
{
g_d3d_device->CreateVolumeTexture(
m_iSizeX,
m_iSizeY,
m_iSizeZ,
m_iMipLevel,
0,
D3DFMT_A8R8G8B8,
D3DPOOL_MANAGED,
(IDirect3DVolumeTexture9**)&m_pTexture,
NULL );
}
else
{
m_iSizeZ = 1;
g_d3d_device->CreateTexture(
m_iSizeX,
m_iSizeY,
m_iMipLevel,
0,
D3DFMT_A8R8G8B8,
D3DPOOL_MANAGED,
(IDirect3DTexture9**)&m_pTexture,
NULL );
}
}
void Texture::Release()
{
Unlock();
if( m_pTexture != NULL )
{
m_pTexture->Release();
m_pTexture= NULL;
}
m_iSizeX= -1;
m_iSizeY= -1;
m_iSizeZ= -1;
m_iMipLevel= -1;
m_d3dlb.pBits= NULL;
m_d3dlb.RowPitch= -1;
m_d3dlb.SlicePitch= -1;
}
void Texture::Lock()
{
if(m_iSizeZ > 1)
{
((IDirect3DVolumeTexture9*)m_pTexture)->LockBox( 0, &m_d3dlb, 0, 0 );
}
else
{
D3DLOCKED_RECT d3dlr;
((IDirect3DTexture9*)m_pTexture)->LockRect( 0, &d3dlr, 0, 0 );
m_d3dlb.pBits = d3dlr.pBits;
m_d3dlb.RowPitch = d3dlr.Pitch;
m_d3dlb.SlicePitch = 0;
}
}
void Texture::Unlock()
{
if( m_d3dlb.pBits == NULL )
{
return;
}
if(m_iSizeZ > 1)
{
((IDirect3DVolumeTexture9*)m_pTexture)->UnlockBox( 0 );
}
else
{
((IDirect3DTexture9*)m_pTexture)->UnlockRect( 0 );
}
m_d3dlb.pBits= NULL;
m_d3dlb.RowPitch= -1;
m_d3dlb.SlicePitch= -1;
}
void Texture::PrepareRandomTexture()
{
RandomGenerator rg;
rg.setSeed( 1024 );
for( int i= 0; i < 1024; ++i )
{
rg.genFloat();
}
Lock();
for( int iZ= 0; iZ < m_iSizeZ; ++iZ )
{
for( int iY= 0; iY < m_iSizeY; ++iY )
{
DWORD* pData= (DWORD*)((BYTE*)m_d3dlb.pBits + iY * m_d3dlb.RowPitch + iZ * m_d3dlb.SlicePitch );
for( int iX= 0; iX < m_iSizeX; ++iX )
{
rg.genFloat();
*pData++ = rg.getLastTempValue();
}
}
}
Unlock();
// Generate mip maps
D3DXFilterTexture(m_pTexture, NULL, 0, D3DX_DEFAULT);
}
#ifdef EXTRACODE
#include <fstream>
#endif
void Texture::PrepareRotMatrixFromFile()
{
#ifdef EXTRACODE
Release();
D3DXCreateTextureFromFile(
g_d3d_device,
"64k_pre/rotationalMatrix32.png",
(IDirect3DTexture9**)&m_pTexture );
m_iSizeX= 32;
m_iSizeY= 32;
m_iSizeZ = 1;
m_iMipLevel= 1;
Lock();
std::ofstream ofs( "64k_pre/rotMat.txt" );
for( int iY= 0; iY < m_iSizeY; ++iY )
{
DWORD* pData= (DWORD*)((BYTE*)m_d3dlb.pBits + iY * m_d3dlb.RowPitch );
for( int iX= 0; iX < m_iSizeX; ++iX )
{
//rg.genFloat();
//*pData++ = rg.getLastTempValue();
DWORD dw= *pData++;
ofs << dw << "," << "\n";
}
}
Unlock();
#endif
}
void Texture::PrepareRotMatrix()
{
Lock();
int iPos= 0;
for( int iY= 0; iY < m_iSizeY; ++iY )
{
DWORD* pData= (DWORD*)((BYTE*)m_d3dlb.pBits + iY * m_d3dlb.RowPitch );
for( int iX= 0; iX < m_iSizeX; ++iX )
{
*pData++ = dwRotMatData[ iPos++ ];
}
}
Unlock();
}
void Texture::PrepareSpecTexture()
{
g_pTextures[ TI_LightSpec1D ].Create( 256, 1, 1, 1 );
g_pTextures[ TI_LightSpec1D ].Lock();
float fVal= 255.0f;
for( int i= 0; i <= 255; ++i )
{
int iV= (int)fVal;
((DWORD*)(g_pTextures[ TI_LightSpec1D ].m_d3dlb.pBits))[ 255 - i ]=
0xff << 24 |
( iV & 0xff ) << 16 |
( iV & 0xff ) << 8 |
( iV & 0xff );
fVal*= 0.925f;
}
//unlock
g_pTextures[ TI_LightSpec1D ].Unlock();
}
void Texture::Prepare1DTextures()
{
PrepareSpecTexture();
int iTexIndex= TI_First1D;
static const unsigned char pucDataTest[]=
{
1, // Groesse == 8
255, 255, 255,
7,
255, 255, 255,
0,
16, // Groesse == 128
32, 32, 64,
64,
120, 120, 128,
63,
255, 251, 208,
0,
16, // Groesse == 128
255, 255, 255,
4,
192, 192, 192,
4,
145, 145, 145,
4,
108, 108, 108,
4,
81, 81, 81,
8,
45, 45, 45,
16,
14, 14, 14,
16,
4, 4, 4,
71,
0, 0, 0,
0,
16, // Groesse == 128
80, 0, 165,
16,
38, 3, 238,
18,
0, 183, 195,
12,
0, 217, 110,
18,
1, 232,0,
18,
152, 216,0,
12,
229, 200,0 ,
18,
255, 62,0 ,
15,
225, 18,0 ,
0,
0
};
const unsigned char* pData= pucDataTest;
int ColorIn[ 3 ];
int ColorOut[ 3 ];
while( *pData != 0 )
{
//create Texture
int iTexSize= *pData * 8;
pData++;
/*int iMips= 1;
while( 2 << iMips <= iTexSize )
{
iMips++;
}*/
g_pTextures[ iTexIndex ].Create( iTexSize, 1, 1, 1 );
g_pTextures[ iTexIndex ].Lock();
int iX= 0;
ColorIn[ 0 ]= *pData++;
ColorIn[ 1 ]= *pData++;
ColorIn[ 2 ]= *pData++;
//set Texture Data
while( true )
{
int iLength= *pData;
pData++;
if( iLength == 0 )
{
break;
}
ColorOut[ 0 ]= *pData++;
ColorOut[ 1 ]= *pData++;
ColorOut[ 2 ]= *pData++;
//lerp colors
for( int i= 0; i <= iLength; ++i )
{
int iA= iLength - i;
int iR= ( ColorOut[ 0 ] * i + ColorIn[ 0 ] * iA ) / iLength;
int iG= ( ColorOut[ 1 ] * i + ColorIn[ 1 ] * iA ) / iLength;
int iB= ( ColorOut[ 2 ] * i + ColorIn[ 2 ] * iA ) / iLength;
assert( iX < g_pTextures[ iTexIndex ].m_iSizeX );
((DWORD*)(g_pTextures[ iTexIndex ].m_d3dlb.pBits))[ iX ]=
0xff << 24 |
( iR & 0xff ) << 16 |
( iG & 0xff ) << 8 |
( iB & 0xff );
++iX;
}
--iX;
ColorIn[ 0 ]= ColorOut[ 0 ];
ColorIn[ 1 ]= ColorOut[ 1 ];
ColorIn[ 2 ]= ColorOut[ 2 ];
}
//unlock
g_pTextures[ iTexIndex ].Unlock();
iTexIndex++;
}
}

79
evoke-64k/bp10/Texture.h Normal file
View File

@@ -0,0 +1,79 @@
#pragma once
/***********************************************************************************/
/** \file Texture.h
** \brief Header File zur Klasse Texture
*************************************************************************************
** Autor: Christian Roesch
*************************************************************************************
** _tut nichts_
**
*//*********************************************************************************/
#ifndef _Texture_H
#define _Texture_H
// includes
#include <d3dx9.h>
#include <cassert>
// Klassen-Deklaration
extern IDirect3DDevice9* g_d3d_device;
/***********************************************************************************/
/** \brief Texture _tut nichts_
*************************************************************************************
** Genau genommen _tut dies nichts_
**
*//*********************************************************************************/
class Texture
{
public:
void Init();
void DeInit();
void Create( int m_iSizeX,
int m_iSizeY,
int m_iSizeZ,
int m_iMipLevel );
void Release();
void Lock();
void Unlock();
IDirect3DBaseTexture9* GetPointer()
{
return m_pTexture;
}
void PrepareRandomTexture();
void PrepareRotMatrixFromFile();
void PrepareRotMatrix();
static void Prepare1DTextures();
private:
static void PrepareSpecTexture();
int m_iSizeX;
int m_iSizeY;
int m_iSizeZ;
int m_iMipLevel;
IDirect3DBaseTexture9* m_pTexture;
D3DLOCKED_BOX m_d3dlb;
};
#endif//_Texture_H
class Texture;
/************************************************************************************
** Ende der Datei: Texture.h
************************************************************************************/

43
evoke-64k/bp10/VUMeter.h Normal file
View File

@@ -0,0 +1,43 @@
#pragma once
struct SVUMeter
{
const static int m_iBufferLength= 441;
float m_fVUData[ m_iBufferLength ];
int m_iLastPos;
SVUMeter()
{
m_iLastPos= 0;
for( int i= 0; i < m_iBufferLength; ++i )
{
m_fVUData[ i ]= 0.0f;
}
}
void Set( int iPos,
float fVal )
{
iPos= iPos % m_iBufferLength;
while( true )
{
m_fVUData[ m_iLastPos ]= fVal;
if( m_iLastPos != iPos )
{
m_iLastPos++;
m_iLastPos= m_iLastPos % m_iBufferLength;
}
else
{
break;
}
}
}
float Get( int iPos )
{
iPos= iPos % m_iBufferLength;
return m_fVUData[ iPos ];
}
};

73
evoke-64k/bp10/bar16To9.h Normal file
View File

@@ -0,0 +1,73 @@
#pragma once
struct SVertexBar
{
FLOAT x, y, z;
DWORD dwColor;
};
const DWORD c_dwFVFBar= D3DFVF_XYZ|D3DFVF_DIFFUSE;
SVertexBar g_VertBar[]=
{
{ -1.0f, -1.0f, 5.0f, 0xff000000 },
{ -1.0f, 1.0f, 5.0f, 0xff000000 },
{ 1.0f, -1.0f, 5.0f, 0xff000000 },
{ 1.0f, 1.0f,5.0f, 0xff000000 },
};
void RenderBars()
{
g_d3d_device->SetRenderState( D3DRS_LIGHTING, FALSE );
g_d3d_device->SetRenderState( D3DRS_ZENABLE, FALSE );
g_d3d_device->SetRenderState( D3DRS_ALPHATESTENABLE, FALSE );
g_d3d_device->SetRenderState( D3DRS_ALPHABLENDENABLE, FALSE );
g_d3d_device->SetRenderState( D3DRS_CULLMODE, D3DCULL_NONE );
g_d3d_device->SetTextureStageState( 0, D3DTSS_COLORARG1, D3DTA_DIFFUSE );
g_d3d_device->SetTextureStageState( 0, D3DTSS_COLOROP, D3DTOP_SELECTARG1 );
g_d3d_device->SetTextureStageState( 0, D3DTSS_COLORARG2, D3DTA_DIFFUSE );
g_d3d_device->SetTextureStageState( 0, D3DTSS_ALPHAOP, D3DTOP_SELECTARG1 );
g_d3d_device->SetTextureStageState( 0, D3DTSS_ALPHAARG1, D3DTA_TEXTURE );
D3DXMATRIX mat;
D3DXMatrixOrthoLH(
&mat,
(float)c_iScreenSizeX,
-(float)c_iScreenSizeY,
1.0f,
8.0f );
g_d3d_device->SetTransform( D3DTS_PROJECTION, &mat );
D3DXMatrixIdentity( &mat );
g_d3d_device->SetTransform( D3DTS_VIEW, &mat );
g_d3d_device->SetTransform( D3DTS_WORLD, &mat );
float fBarHeight= (float)( c_iScreenSizeY - c_iRealScreenY ) * 0.5f;
for( int i= -1; i <= 1; i+= 2 )
{
g_VertBar[ 0 ].x= -(float)c_iScreenSizeX * 0.5f - 10.0f;
g_VertBar[ 0 ].y= (float)i * ( (float)c_iScreenSizeY * 0.5f + 10.0f );
g_VertBar[ 1 ].x= -(float)c_iScreenSizeX * 0.5f - 10.0f;
g_VertBar[ 1 ].y= (float)i * ( (float)c_iScreenSizeY * 0.5f - fBarHeight );
g_VertBar[ 2 ].x= (float)c_iScreenSizeX * 0.5f + 10.0f;
g_VertBar[ 2 ].y= (float)i * ( (float)c_iScreenSizeY * 0.5f + 10.0f );
g_VertBar[ 3 ].x= (float)c_iScreenSizeX * 0.5f + 10.0f;
g_VertBar[ 3 ].y= (float)i * ( (float)c_iScreenSizeY * 0.5f - fBarHeight );
g_d3d_device->SetFVF( c_dwFVFBar );
g_d3d_device->DrawPrimitiveUP(
D3DPT_TRIANGLESTRIP,
2,
g_VertBar,
sizeof( SVertexBar )
);
}
}

View File

@@ -0,0 +1,331 @@
#include "blocktree.h"
#include "globals.h"
#include "intrin.h"
static const int m_iMaxBlockTrees= 16;
BlockTree g_BlockTrees[ m_iMaxBlockTrees ];
static const int m_iMaxTreeElements= 2 * 1024 * 128;
BlockTreeElement g_BlockElements[ m_iMaxTreeElements ];
int g_iBlockElementsUsed= 0;
static const int m_iMaxTreeBuilderElements= 512;
BlockTreeBuilder g_BuilderStack[ m_iMaxTreeBuilderElements ];
int g_iLastBuilderElement= 0;
static const int g_iMaxBlocksPerTree= 1024 * 2;
static float fMinSize;
void CreateBlockTree();
void MoveBTB( BlockTreeBuilder& btb, float fStep );
void ProcessTree( BlockTree* t );
BlockTreeElement* AddTreeBox( BlockTree* t, BlockTreeBuilder& btb );
void AddBuilderStack( BlockTreeBuilder& btb, int iLeafMode );
void BlockTree::Init()
{
m_pElements= NULL;
m_iElementcount= 0;
m_fBaseTime= 0.0f;
m_fLastChangeTime= -1.0f;
}
bool BlockTree::IsActive( float fTime )
{
if( fTime > m_fBaseTime )
{
return true;
}
return false;
}
void BlockTree::AddToScene( float fTime, int iObject )
{
if( fTime > m_fLastChangeTime )
{
return;
}
fTime-= m_fBaseTime;
g_Objects[ iObject ].Lock();
for( int i= 0; i < m_iElementcount; ++i )
{
BlockTreeElement& b= m_pElements[ i ];
float fElemTime= fTime - b.m_fTimeOffset;
if( fElemTime > 0.0f )
{
D3DXVECTOR3 Pos( b.m_v3Pos );
D3DXVECTOR3 Rot( b.m_v3Rot );
float fSize= b.m_fSize;
if( fElemTime < m_fTimeStep )
{
float fLerp= fElemTime / m_fTimeStep;
fSize*= fLerp;
if( b.m_ParentObject != NULL )
{
D3DXVec3Lerp( &Rot, &(b.m_ParentObject->m_v3Rot), &Rot, fLerp );
fLerp= 0.5f + 0.5f * fLerp;
D3DXVec3Lerp( &Pos, &(b.m_ParentObject->m_v3Pos), &Pos, fLerp );
}
}
D3DXVECTOR3 Size( fSize, fSize, fSize );
g_Objects[ iObject ].AddBox(
Pos,
Size,
Rot,
0xffffffff,
b.m_fColor, 0.0f );
}
}
g_Objects[ iObject ].Unlock();
}
void PrepareBlockTrees()
{
for( int i= OI_BlockTreeFirst; i <= OI_BlockTreeLast; ++i )
{
g_Objects[ i ].Create( 4 * 6 * g_iMaxBlocksPerTree, 6 * 6 * g_iMaxBlocksPerTree, true );
g_Objects[ i ].m_iUsedShader[ 0 ]= Rainbow;
g_Objects[ i ].m_iUsedPreShader= PreDepth;
}
for( int i= 0; i < m_iMaxBlockTrees; ++i )
{
g_BlockTrees[ i ].Init();
}
CreateBlockTree();
}
void AddBlockTreesToScene( float fTime )
{
for( int i= 0; i < m_iMaxBlockTrees; ++i )
{
if( g_BlockTrees[ i ].IsActive( fTime ) )
{
assert( OI_BlockTreeFirst + i < OI_BlockTreeLast );
g_BlockTrees[ i ].AddToScene( fTime, OI_BlockTreeFirst + i );
}
else
{
g_Objects[ OI_BlockTreeFirst + i ].HideVertexData();
}
}
}
void CreateBlockTree()
{
g_Random.setSeed( 17 );
fMinSize= 0.25f;
{
BlockTree* t= g_BlockTrees;
t->m_iElementcount= 0;
t->m_pElements= g_BlockElements + g_iBlockElementsUsed;
t->m_fTimeStep= 0.125f;
g_iLastBuilderElement= 1;
BlockTreeBuilder* btb= g_BuilderStack;
btb->m_v3Pos=D3DXVECTOR3( 0.0f,
-2.5f,
0.0f );
btb->m_v3Rot=D3DXVECTOR3( 0, 0, 0 );
btb->m_iWalkAxis= 2;
btb->m_fSize= 1.75f;
btb->m_fColor= 0.0f;
btb->m_fSizeChange= 119.0f / 128.0f;
btb->m_fRotOffset= 0.0f;
btb->m_fTimeOffset= 0.0f;
btb->m_iLevel= 0;
btb->m_pParent= NULL;
t->m_fBaseTime= 12.0f;
t->m_fLastChangeTime= t->m_fBaseTime + 5.0f;
ProcessTree(t);
g_iBlockElementsUsed+= t->m_iElementcount;
}
g_Random.setSeed( 43 );
fMinSize= 0.125f;
for( int i= 1; i < m_iMaxBlockTrees; ++i )
{
BlockTree* t= g_BlockTrees + i;
t->m_iElementcount= 0;
t->m_pElements= g_BlockElements + g_iBlockElementsUsed;
t->m_fTimeStep= 0.125f;
g_iLastBuilderElement= 1;
BlockTreeBuilder* btb= g_BuilderStack;
btb->m_v3Pos=D3DXVECTOR3( g_Random.genFloat( -18.0f, 18.0f ),
-1.5f,
g_Random.genFloat( -18.0f, 18.0f ) );
btb->m_v3Rot=D3DXVECTOR3( g_Random.genFloat( 0.0f, c_PI ), 0, 0 );
btb->m_iWalkAxis= 2;
btb->m_fSize= g_Random.genFloat( 0.7f, 1.0f );
btb->m_fColor= 0.0f;
btb->m_fSizeChange= 59.0f / 64.0f;
btb->m_fRotOffset= 0.0f;
btb->m_fTimeOffset= 0.0f;
btb->m_iLevel= 0;
btb->m_pParent= NULL;
t->m_fBaseTime= 34.0f - btb->m_v3Pos.z / 6.0f;
t->m_fLastChangeTime= t->m_fBaseTime + 5.0f;
ProcessTree(t);
g_iBlockElementsUsed+= t->m_iElementcount;
}
}
void MoveBTB( BlockTreeBuilder& btb, float fStep )
{
D3DXVECTOR3 Move( 0, 0, 0 );
D3DXVECTOR3 Rot( 0, 0, 0 );
switch( btb.m_iWalkAxis )
{
case 1:
Move.x+= fStep;
Rot.z+= c_PI;
break;
case 2:
Move.y+= fStep;
Rot.z+= c_PI;
break;
case 3:
Move.z+= fStep;
Rot.y-= c_PI;
break;
case -1:
Move.x-= fStep;
Rot.z-= c_PI;
break;
case -2:
Move.y-= fStep;
Rot.z+= c_PI;
break;
case -3:
Move.z-= fStep;
Rot.y+= c_PI;
break;
}
{
D3DXMATRIX m1;
D3DXMatrixRotationYawPitchRoll( &m1, btb.m_v3Rot.x, btb.m_v3Rot.y, btb.m_v3Rot.z );
D3DXVec3TransformCoord( &Move, &Move, &m1 );
}
btb.m_v3Pos+= Move;
btb.m_v3Rot+= Rot * btb.m_fRotOffset;
}
void ProcessTree( BlockTree* t )
{
while( g_iLastBuilderElement > 0 )
{
g_iLastBuilderElement--;
BlockTreeBuilder btb= g_BuilderStack[ g_iLastBuilderElement ];
int iLength= 0;
int iLeafMode= g_Random.genInteger( 0, 15 );
while( true )
{
float fStep= 2.0f * btb.m_fSize;
btb.m_fSize*= btb.m_fSizeChange;
btb.m_fColor+= 1.0f / 24.0f;
if( btb.m_fSize < fMinSize )
{
break;
}
MoveBTB(btb, fStep);
btb.m_pParent= AddTreeBox(t, btb);
btb.m_fTimeOffset+= t->m_fTimeStep;
if( btb.m_iLevel > 1 && g_Random.genInteger( 1, 6 ) == 1 )
{
btb.m_fRotOffset*= -1;
}
if( btb.m_iLevel == 0 )
{
if( iLength > 2 && iLength % 3 == 1 )
{
AddBuilderStack(btb, iLeafMode);
AddBuilderStack(btb, iLeafMode + 2);
}
iLeafMode++;
}
else if( g_Random.genInteger( 0, 8 ) < iLength - btb.m_iLevel )
{
if( btb.m_iLevel < 5 )
{
AddBuilderStack(btb, iLeafMode);
}
iLeafMode++;
}
iLength++;
}
}
}
BlockTreeElement* AddTreeBox( BlockTree* t, BlockTreeBuilder& btb )
{
// add box
assert( t->m_iElementcount < g_iMaxBlocksPerTree );
assert( g_iBlockElementsUsed + t->m_iElementcount < m_iMaxTreeElements );
BlockTreeElement* elem= t->m_pElements + t->m_iElementcount;
t->m_iElementcount++;
elem->m_fColor= btb.m_fColor;
elem->m_fSize= btb.m_fSize;
elem->m_fTimeOffset= btb.m_fTimeOffset;
elem->m_ParentObject= btb.m_pParent;
elem->m_v3Pos= btb.m_v3Pos;
elem->m_v3Rot= btb.m_v3Rot;
return elem;
}
void AddBuilderStack( BlockTreeBuilder& btb, int iLeafMode )
{
assert( g_iLastBuilderElement < m_iMaxTreeBuilderElements );
BlockTreeBuilder& btbNew= g_BuilderStack[ g_iLastBuilderElement ];
g_iLastBuilderElement++;
btbNew= btb;
int iSign= 1;
int iNewMode= 1 + iLeafMode % 4;
if( iNewMode > 2 )
{
iSign= -1;
iNewMode-= 2;
}
iNewMode+= abs( btb.m_iWalkAxis );
if( iNewMode > 3 )
{
iNewMode-= 3;
}
btbNew.m_iWalkAxis= iNewMode * iSign;
if( btbNew.m_fRotOffset >= 0.0f )
{
btbNew.m_fRotOffset+= 3.0f / 128.0f;
}
else
{
btbNew.m_fRotOffset-= 3.0f / 128.0f;
}
btbNew.m_iLevel++;
}

View File

@@ -0,0 +1,52 @@
#pragma once
#include "defines.h"
#include <d3d9.h>
#include <d3dx9math.h>
struct BlockTreeElement
{
float m_fColor;
D3DXVECTOR3 m_v3Pos;
D3DXVECTOR3 m_v3Rot;
float m_fSize;
float m_fTimeOffset;
BlockTreeElement* m_ParentObject;
};
struct BlockTreeBuilder
{
D3DXVECTOR3 m_v3Pos;
D3DXVECTOR3 m_v3Rot;
int m_iWalkAxis;
float m_fSize;
float m_fSizeChange;
float m_fColor;
float m_fRotOffset;
float m_fTimeOffset;
int m_iLevel;
BlockTreeElement* m_pParent;
};
struct BlockTree
{
BlockTreeElement* m_pElements;
int m_iElementcount;
float m_fBaseTime;
float m_fLastChangeTime;
float m_fTimeStep;
void Init();
bool IsActive( float fTime );
void AddToScene( float fTime, int iObject );
};
void PrepareBlockTrees();
void AddBlockTreesToScene( float fTime );

143
evoke-64k/bp10/bowfront.cpp Normal file
View File

@@ -0,0 +1,143 @@
#include "bowfront.h"
#include "flockspline.h"
BowFrontInfo g_BowFrontData[ g_iBowFrontCount ];
static D3DXVECTOR3 UpFly[4]=
{
D3DXVECTOR3( 0.0f, -4.0f, 0.0f ),
D3DXVECTOR3( 0.0f, 0.0f, 0.0f ),
D3DXVECTOR3( 0.0f, 16.0f, 0.0f ),
D3DXVECTOR3( 0.0f, 20.0f, 0.0f ),
};
D3DXVECTOR2 vecFlock[ 1024 ];
float fFlockTime[ 1024 ];
void GenerateBowFront()
{
for( int i= 0; i < g_iBowFrontCount; ++i )
{
g_BowFrontData[ i ].Disable();
}
float fBaseHeight= 0.0f;
float fStartWidth= -48.0f;
float fEndWidth= 48.0f;
float fStartLength= 128.0f;
float fEndLength= -120.0f;
int BowCount= 96;
int iCount= 0;
g_BowFrontData[ iCount ].m_vCenter.x= -64.0f;
g_BowFrontData[ iCount ].m_vCenter.y= -80.0f;
g_BowFrontData[ iCount ].m_vCenter.z= 0.0f;
g_BowFrontData[ iCount ].m_fInner= 192.0f;
g_BowFrontData[ iCount ].m_fOuter= g_BowFrontData[ iCount ].m_fInner + 32.0f;
g_BowFrontData[ iCount ].m_fWidth= 16.0f;
g_BowFrontData[ iCount ].m_fMaxSpreadAngle= 4.0f;
g_BowFrontData[ iCount ].m_fStartTime= 3.75f;
g_BowFrontData[ iCount ].m_fEndTime= 4.75f;
iCount++;
int iFlock= 0;
for( int i= 0; i < BowCount; ++i )
{
float fPosX= g_Random.genFloat( fStartWidth, fEndWidth );
float fPosZ= fStartLength - g_Random.genFloat( 0.0f, 8.0f );
float fTime= 16.0f;
while( true )
{
assert( iCount < g_iBowFrontCount );
float fStepLength= g_Random.genFloat( 8.0f, 20.0f );
g_BowFrontData[ iCount ].m_vCenter.x= fPosX;
g_BowFrontData[ iCount ].m_vCenter.y= fBaseHeight;
fPosZ-= fStepLength;
g_BowFrontData[ iCount ].m_vCenter.z= fPosZ;
fPosZ-= fStepLength;
float fThick= fStepLength * 0.1f + g_Random.genFloat( 0.0f, 0.75f );
g_BowFrontData[ iCount ].m_fInner= fStepLength - fThick;
g_BowFrontData[ iCount ].m_fOuter= fStepLength + fThick;
g_BowFrontData[ iCount ].m_fWidth= fThick * 0.35f;
g_BowFrontData[ iCount ].m_fMaxSpreadAngle= g_Random.genFloat( 1.2f, 3.1f );
g_BowFrontData[ iCount ].m_fStartTime= fTime;
fTime+= 0.25f * fStepLength;
g_BowFrontData[ iCount ].m_fEndTime= fTime * (31.0f / 32.0f);// - g_Random.genFloat( 0.25f, fStepLength * 0.625f );
iCount++;
if( iCount % 3 == 1 && fabs( -18.0f - fPosX ) < 20.0f && fabs( fPosZ ) < 32.0f )
{
vecFlock[ iFlock ].x= fPosX;
vecFlock[ iFlock ].y= fPosZ;
fFlockTime[ iFlock ]= fTime;
iFlock++;
}
if( fPosZ < fEndLength )
{
break;
}
}
}
for( int i= 0; i < iFlock; ++i )
{
for( int j =0; j < 4; ++j )
{
UpFly[ j ].x= vecFlock[ i ].x;
UpFly[ j ].z= vecFlock[ i ].y;
}
int iBase= 192;
assert( iBase + i < g_iFlockCount );
g_Flocks[ iBase + i ].GeneratePreSpline(
UpFly,
4,
1.5f,
0.25f );
g_Flocks[ iBase + i ].GenerateUpVectors();
g_Flocks[ iBase + i ].GenerateSplinePoints( 128 );
g_Flocks[ iBase + i ].GenerateBoids03( 24 );
g_Flocks[ iBase + i ].m_iTesselation= 2;
g_Flocks[ iBase + i ].m_fTimeOffset= fFlockTime[ i ] - 258.0f;
}
}
void AddBowFrontToScene( float fTime )
{
g_Objects[ OI_BowFront ].Lock();
for( int i= 0; i < g_iBowFrontCount; ++i )
{
if( fTime > g_BowFrontData[ i ].m_fEndTime )
{
continue;
}
if( fTime < g_BowFrontData[ i ].m_fStartTime )
{
continue;
}
float fTimePercent= ( fTime - g_BowFrontData[ i ].m_fStartTime ) /
( g_BowFrontData[ i ].m_fEndTime - g_BowFrontData[ i ].m_fStartTime );
fTimePercent*= g_BowFrontData[ i ].m_fMaxSpreadAngle + c_PI;
fTimePercent-= g_BowFrontData[ i ].m_fMaxSpreadAngle;
float fStartAngle= maximum( fTimePercent, 0.0f );
float fEndAngle= minimum( fTimePercent + g_BowFrontData[ i ].m_fMaxSpreadAngle, c_PI );
g_Objects[ OI_BowFront ].AddRainbow(
g_BowFrontData[ i ].m_vCenter,
g_BowFrontData[ i ].m_fInner, g_BowFrontData[ i ].m_fOuter,
g_BowFrontData[ i ].m_fWidth,
fStartAngle, fEndAngle,
D3DXVECTOR3(0.0f, 0.0f, 0.0f) );
}
g_Objects[ OI_BowFront ].Unlock();
}

32
evoke-64k/bp10/bowfront.h Normal file
View File

@@ -0,0 +1,32 @@
#pragma once
#include "defines.h"
#include "globals.h"
#include "intrin.h"
#include <d3d9.h>
#include <d3dx9math.h>
struct BowFrontInfo
{
D3DXVECTOR3 m_vCenter;
float m_fInner;
float m_fOuter;
float m_fWidth;
float m_fMaxSpreadAngle;
float m_fStartTime;
float m_fEndTime;
void Disable()
{
m_fStartTime= -666666.0f;
m_fEndTime= -666666.0f;
}
};
const int g_iBowFrontCount= 1536;
extern BowFrontInfo g_BowFrontData[ g_iBowFrontCount ];
void GenerateBowFront();
void AddBowFrontToScene( float fTime );

View File

@@ -0,0 +1,5 @@
65536 -1978057 0 1.44469 24.2687 110.362 -26.29 0.442999 0 8.11719 1 2 -1
83968 -655360 0 1.44469 24.2687 110.362 -26.53 0.331999 0 2.35938 1 2 -1
83968 -655360 0 1.44469 24.2687 110.362 -27.196 0.0529992 0 7.83594 1 2 -1
83968 -655360 0 1.44469 24.2687 110.362 -27.88 -0.0910008 0 7.96094 1 2 -1
83968 -655360 0 1.44469 24.2687 110.362 -28.027 -0.0820008 0 8.11719 1 2 -1

View File

@@ -0,0 +1,6 @@
32768 0 256 45.8851 27.5883 13.4159 7.445 0.185 0 0.1875 1 2 -1
43008 -540672 128 45.5435 29.5779 13.564 7.445 0.185 0 1.28125 1 2 -1
43008 -519168 128 45.1473 31.885 13.7357 7.445 0.185 0 1.90625 1 2 -1
45056 -497664 128 44.8057 33.8744 13.8837 7.445 0.185 0 4.4375 1 2 -1
49152 -475136 -32 44.2369 37.187 14.1302 7.445 0.185 0 4.4375 1 2 -1
32768 -481280 -32 43.7263 40.1605 14.3515 7.445 0.185 0 4.4375 1 2 -1

View File

@@ -0,0 +1,8 @@
32768 -1978057 256 34.577 2.23528 1.77179 -28.48 -0.364 0 8.11719 1 2 -1
49152 -1867776 0 34.577 2.23528 1.77179 -28.699 -0.409 0 8.11719 1 2 -1
49152 -1867776 0 34.577 2.23528 1.77179 -29.662 -0.388 0 8.11719 1 2 -1
55296 -1867776 0 34.577 2.23528 1.77179 -30.691 0.0379997 0 1.39844 1 2 -1
59392 -1867776 0 34.577 2.23528 1.77179 -31.705 -0.676 0 1.42969 1 2 -1
65536 -1867776 0 34.577 2.23528 1.77179 -31.993 -0.934 0 1.42969 1 2 -1
49152 -1867776 0 34.577 2.23528 1.77179 -32.083 -0.982 0 1.42969 1 2 -1
49152 -1867776 0 34.577 2.23528 1.77179 -32.092 -0.991 0 1.27344 1 2 -1

View File

@@ -0,0 +1,7 @@
32768 -1867776 256 52.5193 54.2637 35.7364 -36.4389 0.296 0 8.11719 1 2 -1
65536 -1982464 -96 53.8673 54.2637 42.3171 -36.2589 0.299 0 8.11719 1 2 -1
65536 -2007040 -96 30.8759 53.4603 94.803 -35.476 0.245 0 8.11719 1 2 -1
65536 -2031616 -96 -19.6306 44.9336 99.735 -34.576 0.113 0 5 1 2 -1
65536 -2056192 -96 -50.2317 34.2364 78.5862 -33.907 0.0230002 0 4.80469 1 2 -1
65536 -2080768 -96 -67.0617 26.1809 51.9399 -33.253 -0.172 0 3.00782 1 2 -1
65536 -2105344 -96 -67.9322 26.1809 45.6197 -33.061 -0.22 0 8.11719 1 2 -1

View File

@@ -0,0 +1,4 @@
16384 -1982464 256 256.147 2.45766 69.0275 1.57106 -0.000999578 0 6.57032 0.5 2 -1
131072 -1998848 0 224.364 2.48943 69.0191 1.57106 -0.000999578 0 4.50782 0.5 2 -2.75
16384 -1916928 256 -192.823 2.90644 68.9091 1.57106 -0.000999578 0 4.57032 0.5 3.75 -1
32768 -1884160 256 -224.766 2.93837 68.9007 1.57106 -0.000999578 0 6.57032 0.5 2 -1

View File

@@ -0,0 +1,7 @@
32768 -1589248 256 38.8312 23.0892 -92.8456 -2.70399 0.02 0 6 1 2 -1
49152 -1589248 0 38.8312 23.0892 -92.8456 -3.01899 0.00799998 0 6 1 2 -1
49152 -1589248 0 38.8312 23.0892 -92.8456 -4.16199 0.05 0 6 1 2 -1
49152 -1589248 0 38.1846 23.759 -93.518 -4.86099 -0.00700005 0 6 1 2 -1
49152 -1589248 0 36.7788 25.0006 -94.6688 -5.50298 -0.067 0 4.125 1.59375 2 -1
49152 -1589248 0 36.7788 25.0006 -94.6688 -5.53898 -0.058 0 4.125 1.59375 2 -1
49152 -1589248 0 36.7788 25.0006 -94.6688 -5.47298 -0.073 0 4.125 1.59375 2 -1

View File

@@ -0,0 +1,8 @@
32768 -1389056 256 -30.5943 2.41748 34.8058 -3.103 -0.00400013 0 3 1 2 -1
49152 -1390592 0 -29.9201 2.48738 17.3449 -3.103 -0.00400013 0 3 1 2 -1
49152 -1390592 0 -29.2492 2.55694 -0.0302132 -2.863 -0.256 0 3 1 2 -1
49152 -1390592 0 -28.2805 2.65737 -25.119 -2.515 -0.61 0 3 1 2 -1
49152 -1390592 0 -27.5477 2.73334 -44.0971 -1.666 -0.853 0 3 1 2 -1
49152 -1390592 0 -26.8274 2.80802 -62.7524 -1.096 -0.718 0 3 1 2 -1
49152 -1390592 0 -27.319 2.90112 -72.6323 -0.610001 -0.67 0 3 1 2 -1
49152 -1390592 0 -26.0417 2.89519 -84.529 -0.433001 -0.544 0 3 1 2 -1

View File

@@ -0,0 +1,5 @@
32768 -1390592 256 4.85618 -0.462118 -67.7764 -2.173 -0.0160004 0 3 1 2 -1
65536 -1638400 -128 4.83375 1.23884 -67.761 -2.08 -0.151 0 3 1 2 -1
65536 -1671168 -128 2.44047 8.3608 -67.2944 -1.57 -0.484 0 3 1 2 -1
65536 -1703936 -128 -3.71454 16.1558 -70.044 -0.870999 -0.736 0 2.5 1 2 -1
65536 -1736704 -128 -5.60423 18.928 -71.9479 -0.663999 -0.826 0 3 1 2 -1

View File

@@ -0,0 +1,9 @@
32768 -1591567 256 -3.66313 25.4071 -107.184 -0.00399655 0.0200001 0 1.19531 1 2 -1
24576 -1605632 48 0.0407009 25.4071 -107.199 -0.00399655 0.0200001 0 1.19531 1 2 -1
16384 -1601024 32 8.11559 25.4071 -107.231 -0.00399655 0.0200001 0 1.4375 1 2 -1
16384 -1598976 32 12.1636 25.4071 -107.247 -0.00399655 0.0200001 0 1.48437 1 2 -1
16384 -1596928 32 13.3373 25.4071 -107.252 -0.00399655 0.0200001 0 1.74219 1 2 -1
16384 -1594880 32 13.8326 25.4071 -107.254 -0.00399655 0.0200001 0 2.52344 1 2 -1
16384 -1592832 32 14.2712 25.4071 -107.255 -0.00399655 0.0200001 0 3.125 1 2 -1
16384 -1590784 32 14.5108 25.4071 -107.256 -0.00399655 0.0200001 0 3.125 1 2 -1
16384 -1588736 32 14.5565 25.4071 -107.257 -0.00399655 0.0200001 0 3.125 1 2 -1

View File

@@ -0,0 +1,9 @@
32768 -1258829 20 22.504 -0.744008 -37.1144 1.61 -0.000999827 1.57384 3 1 2 -1
24576 -1261568 32 22.5054 0.601939 -37.1144 1.61 -0.000999827 1.58133 2.09375 1 2 -1
24576 -1258496 64 22.5146 9.88245 -37.114 1.61 -0.000999827 1.51405 2.09375 1 2 -1
24576 -1252352 64 22.5232 18.4748 -37.1137 1.61 -0.000999827 1.24286 2.09375 1 2 -1
24576 -1246208 64 22.5323 27.5617 -37.1134 1.61 -0.000999827 0.336487 2.0625 1 2 -1
24576 -1240064 64 22.5424 37.6608 -37.113 1.61 -0.000999827 0.0208588 2.0625 1 2 -1
24576 -1233920 64 22.5521 47.4157 -37.1127 1.61 -0.000999827 0 4.13281 1 2 -1
24576 -1227776 64 22.5595 54.8226 -37.1124 1.61 -0.000999827 0 7.53125 1 2 -1
24576 -1221632 64 22.5642 59.5275 -37.1122 1.61 -0.000999827 0 3 1 2 -1

View File

@@ -0,0 +1,7 @@
32768 -1695749 256 14.2548 9.07528 -132.516 -0.507997 0.0230001 0 4.63281 1 2 -1
32768 -1736704 64 17.4813 8.8792 -131.62 -0.243997 -0.142 0 4.63281 1 2 -1
32768 -1728512 256 24.2446 7.34264 -132.09 0.104003 -0.307 0 4.63281 1 2 -1
32768 -1695744 256 30.5821 4.79635 -132.047 0.437003 -0.643 0 3.44531 1 2 -1
32768 -1662976 256 32.1681 1.96433 -131.937 0.452004 -0.877001 0 1.82813 1 2 -1
32768 -1630208 256 31.9428 1.21568 -131.721 0.416004 -1.012 0 1.70313 1 2 -1
32768 -1597440 256 31.5428 0.914895 -130.726 0.506004 -1.054 0 1.82813 1 1.9375 -1

View File

@@ -0,0 +1,6 @@
32768 34816 256 59.3152 19.0325 -101.751 -5.797 -0.184 0 0.523438 1 2 -1
163840 -114688 384 59.6102 19.0325 -101.595 -5.776 -0.199 0 0.0625 1 2 -1
49152 131072 4 63.4478 19.0325 -98.334 -5.51501 -0.37 0 5.00781 1 2 -1
81920 131840 64 63.564 19.0325 -98.2141 -5.48201 -0.394 0 8 1 2 -1
32768 152320 256 63.7373 19.0325 -98.0298 -5.46701 -0.403 0 8.00781 1 2 -1
32768 185088 256 63.8213 19.0325 -97.9388 -5.45801 -0.403 0 5.00781 1 2 -1

View File

@@ -0,0 +1,8 @@
32768 -1589248 256 181.318 7.99043 -218.691 -5.12799 -0.058 0 3 1 2 -1
65536 -2490368 -128 179.935 8.14849 -214.88 -5.119 -0.085 0 3 1 2 -1
65536 -2523136 -128 175.494 8.50923 -206.73 -4.855 -0.055 0 3 1 0.5 -1
65536 -2555904 -128 171.112 8.78697 -201.167 -4.71399 -0.043 0 3 1 2 -1
65536 -2588672 -128 153.24 5.29836 -173.864 -4.72299 -0.079 0 3 1 2 -1
65536 -2621440 -128 149.712 3.7142 -176.195 -4.95399 -0.22 0 3 1 2 -1
65536 -2654208 -128 146.543 4.14288 -179.509 -5.08899 -0.265 0 2.36719 1 2 -1
65536 -2686976 -128 144.083 4.66813 -180.293 -5.14599 -0.265 0 3 1 2 -1

View File

@@ -0,0 +1,5 @@
32768 344064 256 -34.5311 1.22582 -21.1216 -0.862002 -0.252 0 2.5 0.859375 2 -1
81920 376832 256 -34.1339 3.67594 -22.554 -0.808001 -0.24 0 2.5 0.859375 2 -1
65536 458752 256 -28.5268 8.61063 -23.09 -0.712001 -0.123 0 2.5 0.859375 2 -1
81920 540672 256 -15.9678 13.8245 -26.4024 -0.565001 -0.126 0 2.5 0.859375 2 -1
81920 622592 256 -10.9107 15.7305 -26.0793 -0.481001 -0.0450002 0 2.5 0.859375 2 -1

View File

@@ -0,0 +1,4 @@
32768 540672 256 -7.25661 19.8502 17.3732 -2.011 0.942 0 2.5 0.859375 2 -1
131072 393216 384 -7.25661 19.8502 17.3732 -2.206 0.837 0 2.5 0.859375 2 -1
32768 606208 384 -7.25661 19.8502 17.3732 -2.785 -0.426 0 2.5 0.859375 -0.5 -1
32768 638976 384 -7.25661 19.8502 17.3732 -2.875 -0.516 0 2.5 0.859375 2 -1

View File

@@ -0,0 +1,4 @@
32768 449960 256 -45.0177 8.92573 115.42 -1.231 0.0420004 0 2.5 0.859375 2 -1
65536 458752 384 -44.3176 10.7003 113.681 -1.204 0.0870004 0 2.5 0.859375 2 -1
32768 557056 256 -45.273 13.1559 105.904 -1.183 0.105 0 2.5 0.859375 2 -1
32768 589824 256 -44.6257 13.1559 104.319 -1.183 0.105 0 2.5 0.859375 2 -1

View File

@@ -0,0 +1,9 @@
32768 520689 256 -29.7019 8.07853 109.975 -0.673005 0.228001 0 2.5 0.859375 2 -1
65536 540672 512 -28.5543 14.3718 100.464 -0.676005 0.234001 0 2.5 0.859375 2 -1
65536 671744 256 -25.7555 11.3283 68.8197 0.100995 -0.00899933 0 2.5 0.859375 2 -1
65536 737280 256 -21.0055 4.93129 50.7375 1.022 -0.464999 0 2.5 0.859375 2 -1
65536 802816 256 -18.5718 3.58918 38.1406 1.229 -0.398999 0 2.25 0.859375 2 -1
65536 868352 256 -18.5839 2.72201 32.9247 2.447 -0.380999 0 2.25 0.859375 2 -1
65536 933888 256 -18.7677 2.90541 32.1943 3.239 -0.0629994 0 2.25 0.859375 2 -1
65536 999424 256 -18.7677 2.90541 32.1943 3.365 -0.0929994 0 2.25 0.859375 2 -1
65536 1064960 256 -18.7677 2.90541 32.1943 3.473 -0.155999 0 2.25 0.859375 2 -1

View File

@@ -0,0 +1,4 @@
32768 933888 256 -31.1108 20.581 -19.0166 5.93899 0.204001 0 2.125 0.859375 2 -1
196608 966656 512 -31.1108 20.581 -19.0166 5.789 0.204001 0 2.5 0.859375 2 -1
32768 1359872 256 -31.1108 20.581 -19.0166 4.865 0.372001 0 2.9375 0.859375 2 -1
32768 1392640 256 -31.1108 20.581 -19.0166 4.712 0.387001 0 2.125 0.859375 2 -1

View File

@@ -0,0 +1,4 @@
65536 1064960 512 20.0246 13.5516 -11.2789 6.76999 0.0660008 0 1.40625 0.859375 2 -1
196608 1081344 256 20.0246 13.5516 -11.2789 6.93799 0.0960008 0 3.15625 0.859375 2 -1
196608 1277952 256 20.0246 13.5516 -11.2789 8.21299 0.0990008 0 1.09375 0.859375 2 -1
196608 1474560 256 20.0246 13.5516 -11.2789 8.50699 0.111001 0 1.40625 0.859375 2 -1

View File

@@ -0,0 +1,4 @@
32768 1064960 256 8.6674 14.4199 36.1592 5.84598 0.0900008 0 1.40625 0.859375 2 -1
393216 819200 512 16.0979 15.5044 19.8612 5.77399 0.117001 0 2.3125 0.859375 2 -1
32768 1605632 256 20.074 47.2696 -155.135 5.87598 1.104 0 2.77344 1 2 -1
32768 1638400 256 21.6148 62.5464 -151.562 5.87598 1.167 0 2.24219 1 2 -1

View File

@@ -0,0 +1,7 @@
32768 1033952 256 -32.4603 0.962131 -49.7415 -6.27101 -0.241 0 5.10938 1 2 -1
32768 1064960 256 -32.4603 0.962131 -49.7415 -6.43901 -0.286 0 5.10938 1.3125 2 -1
32768 1097728 256 -32.4603 0.962131 -49.7415 -7.17101 -0.799 0 3.23438 1.3125 2 -1
32768 1130496 256 -32.4603 0.962131 -49.7415 -7.756 -0.724 0 2.85938 1.3125 2 -1
32768 1163264 256 -32.4603 0.962131 -49.7415 -8.434 -0.598 0 2.85938 1.3125 2 -1
32768 1196032 256 -32.4603 0.962131 -49.7415 -8.704 -0.382 0 2.85938 1.3125 2 -1
32768 1228800 256 -32.4603 0.962131 -49.7415 -9.049 -0.238 0 2.85938 1 2 -1

View File

@@ -0,0 +1,5 @@
32768 5734400 256 -14.3465 2.28733 132.371 0.590003 -0.0670008 0 2.10156 1 2 -1
131072 5636096 128 -14.3465 2.28733 132.371 0.596003 -0.100001 0 2.10156 1 2 -1
131072 5701632 128 -14.3465 2.28733 132.371 0.710003 -0.388001 0 2.10156 1 2 -1
131072 5767168 128 -14.3465 2.28733 132.371 0.983003 -0.796001 0 2.10156 1 2 -1
131072 5832704 128 -14.3465 2.28733 132.371 1.166 -0.880001 0 2.10156 1 2 -1

View File

@@ -0,0 +1,5 @@
32768 5736492 256 -17.3387 17.0975 81.2954 -9.71199 0.343999 0 3.00781 1 2 -1
98304 5734400 192 -17.3387 17.0975 81.2954 -9.75099 0.418999 0 3.00781 1 2 -1
98304 5808128 192 -17.3387 17.0975 81.2954 -9.52899 0.559999 0 2.5625 1 2 -1
98304 5881856 192 -17.3387 17.0975 81.2954 -9.10599 0.412999 0 2.50781 1 2 -1
98304 5955584 192 -17.3387 17.0975 81.2954 -9.03699 0.412999 0 3.00781 1 2 -1

View File

@@ -0,0 +1,9 @@
32768 5729181 256 22.0722 7.73793 105.444 0.0740029 0.628999 0 2.32813 1 2 -1
65536 5726208 128 22.2024 8.75489 103.907 0.0860029 0.505999 0 2.32813 1 2 -1
65536 5758976 128 22.7278 11.317 97.899 0.038003 0.316999 0 2.32813 1 2 -1
65536 5791744 128 23.3915 17.048 80.4424 0.038003 0.316999 0 2.32813 1 2 -1
65536 5824512 128 24.2119 24.3735 68.0274 0.146003 0.901999 0 2.32813 1 2 -1
65536 5857280 128 25.7492 31.4493 60.3857 0.323003 1.04 0 2.32813 1 2 -1
65536 5890048 128 26.3334 34.1946 59.0302 0.518003 1.19 0 2.32813 1 2 -1
65536 5922816 128 26.7472 35.8514 58.3004 0.731003 1.352 0 2.32813 1 2 -1
65536 5955584 128 27.6125 38.9066 57.093 1.166 1.542 0 2.32813 1 2 -1

View File

@@ -0,0 +1,4 @@
32768 6051052 256 -21.8483 132.758 53.3846 -4.711 1.5 0 5.46094 1.62891 2 -1
262144 5980160 160 -21.8348 132.758 43.66 -4.711 1.5 0 5.46094 1.62891 2 -1
32768 6144000 256 -21.7151 132.758 -42.2764 -4.711 1.5 0 5.46094 1.62891 2 -1
32768 6176768 256 -21.7102 132.758 -45.8135 -4.711 1.5 0 5.46094 1.62891 2 -1

View File

@@ -0,0 +1,10 @@
65536 6013405 128 7.09506 13.9393 -14.9765 -2.149 0.367999 0 2.32813 1 2 -1
65536 6045696 116 6.20406 14.1829 -15.1816 -2.17 0.370999 0 2.32813 1 2 -1
65536 6075392 116 5.71052 15.0421 -12.8371 -2.314 0.403999 0 2.32813 1 2 -1
65536 6105088 116 2.30756 16.9842 -9.91787 -2.668 0.412999 0 2.32813 1 2 -1
65536 6134784 116 2.897 18.0583 -7.31685 -3.112 0.352999 0 2.32813 1 2 -1
65536 6164480 116 6.13269 19.428 -4.94656 -3.538 0.475999 0 2.32813 1 2 -1
81920 6194176 116 8.55125 20.5312 -5.51193 -4.945 0.538999 0 2.32813 1 2 -1
131072 6231296 116 8.77456 20.8422 -6.32389 -5.563 0.439999 0 2.32813 1 2 -1
65536 6290688 116 8.77456 20.8422 -6.32389 -5.599 0.400999 0 2.32813 1 2 -1
65536 6320384 116 8.77456 20.8422 -6.32389 -5.656 0.379999 0 2.32813 1 2 -1

View File

@@ -0,0 +1,4 @@
32768 6290688 256 30.7616 79.1422 -132.308 -5.581 0.415999 0 4.32813 1 2 -1
131072 6291456 128 67.5837 71.381 -66.9802 -5.35301 0.400999 0 4.32813 1 2 -1
32768 6356992 256 57.4173 62.0954 42.3111 -4.05701 0.181999 0 4.32813 1 2 -1
32768 6389760 256 35.7403 62.2446 65.5172 -3.69401 0.145999 0 4.32813 1 2 -1

View File

@@ -0,0 +1,11 @@
32768 414431 256 -103.545 -1.55582 -42.9698 -1.57 -0.00100014 0 1.30469 1 2 -1
49152 3391488 -256 -103.548 1.48031 -42.9698 -1.57 -0.00100014 0 1.80469 1 2 -1
49152 3342336 -256 -103.554 7.7137 -42.9698 -1.57 -0.00100014 0 1.80469 1 2 -1
49152 3293184 -256 -103.56 13.5921 -42.9698 -1.57 -0.00100014 0 1.80469 1 2 -1
49152 3244032 -256 -103.561 15.616 -43.8094 -1.57 -0.00100014 0 1.86719 1 2 -1
49152 3194880 -256 -103.561 16.962 -46.34 -1.57 -0.00100014 0 3.1875 1 2 -1
49152 3145728 -256 -107.623 14.871 -53.3201 -1.366 -0.0880001 0 3.1875 1 2 -1
49152 3096576 -256 -108.137 7.68358 -64.7976 -1.048 -0.232 0 2.70313 1 2 -1
49152 3047424 -256 -101.971 3.79591 -67.1552 -0.615998 -0.43 0 2.70313 1 2 -1
49152 2998272 -256 -96.7237 -0.112378 -71.4151 -0.267998 -0.532 0 2.70313 1 2 -1
49152 2949120 -256 -92.6281 -2.17985 -75.9086 -0.165998 -0.547 0 2.70313 1 2 -1

View File

@@ -0,0 +1,5 @@
32768 2800848 256 -127.286 2.98522 -18.2396 -1.6 -0.0790001 0 5.42969 1 2 -1
131072 2621440 128 -127.286 2.98522 -18.2396 -1.756 -0.133 0 5.42969 1 2 -1
131072 2686976 128 -127.286 2.98522 -18.2396 -2.629 -0.439 0 2.49219 1 2 -1
131072 2752512 128 -127.286 2.98522 -18.2396 -3.205 -0.439 0 2.49219 1 2 -1
131072 2818048 128 -127.286 2.98522 -18.2396 -3.541 -0.343 0 5.42969 1 2 -1

View File

@@ -0,0 +1,6 @@
32768 2800848 256 21.7041 45.3283 21.2518 1.778 0.854 0 3.96094 0.902344 2 -1
65536 8302592 256 23.0447 49.1851 27.9335 2.003 0.869 0 4.91406 0.902344 2 -1
65536 8368128 128 18.4602 55.2581 19.8365 1.466 0.821 0 3.89063 0.855469 2.5 -1
458752 8400896 224 15.5751 56.3316 17.8926 0.572001 -0.199 0 3.0625 0.855469 0 -1
32768 8925184 256 -19.0561 71.1491 21.9887 -0.552999 0.185 0 2.1875 0.855469 2 -1
32768 8957952 256 -26.7881 76.9573 43.4582 -1.795 0.431 0 2.05469 0.902344 2 -1

View File

@@ -0,0 +1,7 @@
32768 10418152 256 -44.3082 64.1545 32.1178 -1.261 0.185 0 3.28125 0.855469 2 -1
262144 10450920 128 -38.2027 67.8069 19.8068 -0.846998 0.305 0 3.28125 0.855469 2 -1
262144 10581992 128 11.4402 73.4091 4.92137 0.407002 -0.271 0 3.28125 0.855469 2 -1
262144 10713064 128 26.6279 73.4091 20.7486 1.325 -0.853 0 3.3125 0.996094 2 -1
262144 10844136 128 26.9154 73.4091 25.2545 1.805 -0.952 0 1.71875 1.01172 2 -1
262144 10975208 128 26.4275 74.3789 25.0724 1.928 -1.078 0 1.71875 1.01172 2 -1
262144 11106280 128 25.2601 76.7372 24.629 1.985 -1.117 0 1.71875 1.01172 2 -1

View File

@@ -0,0 +1,191 @@
K 25
svn:wc:ra_dav:version-url
V 36
/svn/64k/!svn/ver/213/trunk/bp10/cam
END
02_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/213/trunk/bp10/cam/02_cam.txt
END
20_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/181/trunk/bp10/cam/20_cam.txt
END
03_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/199/trunk/bp10/cam/03_cam.txt
END
21_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/183/trunk/bp10/cam/21_cam.txt
END
04_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/213/trunk/bp10/cam/04_cam.txt
END
22_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/183/trunk/bp10/cam/22_cam.txt
END
05_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/199/trunk/bp10/cam/05_cam.txt
END
23_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/183/trunk/bp10/cam/23_cam.txt
END
06_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/199/trunk/bp10/cam/06_cam.txt
END
24_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/183/trunk/bp10/cam/24_cam.txt
END
25_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/183/trunk/bp10/cam/25_cam.txt
END
07_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/199/trunk/bp10/cam/07_cam.txt
END
26_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/212/trunk/bp10/cam/26_cam.txt
END
08_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/213/trunk/bp10/cam/08_cam.txt
END
27_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/212/trunk/bp10/cam/27_cam.txt
END
09_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/213/trunk/bp10/cam/09_cam.txt
END
28_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/199/trunk/bp10/cam/28_cam.txt
END
29_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/199/trunk/bp10/cam/29_cam.txt
END
10_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/213/trunk/bp10/cam/10_cam.txt
END
11_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/199/trunk/bp10/cam/11_cam.txt
END
30_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/199/trunk/bp10/cam/30_cam.txt
END
12_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/199/trunk/bp10/cam/12_cam.txt
END
13_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/181/trunk/bp10/cam/13_cam.txt
END
14_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/183/trunk/bp10/cam/14_cam.txt
END
15_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/181/trunk/bp10/cam/15_cam.txt
END
16_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/181/trunk/bp10/cam/16_cam.txt
END
17_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/213/trunk/bp10/cam/17_cam.txt
END
18_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/213/trunk/bp10/cam/18_cam.txt
END
19_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/213/trunk/bp10/cam/19_cam.txt
END
00_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/213/trunk/bp10/cam/00_cam.txt
END
01_cam.txt
K 25
svn:wc:ra_dav:version-url
V 47
/svn/64k/!svn/ver/213/trunk/bp10/cam/01_cam.txt
END

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1 @@
9

View File

@@ -0,0 +1,5 @@
65536 -1978057 0 1.44469 24.2687 110.362 -26.29 0.442999 0 8.11719 1 2 -1
83968 -655360 0 1.44469 24.2687 110.362 -26.53 0.331999 0 2.35938 1 2 -1
83968 -655360 0 1.44469 24.2687 110.362 -27.196 0.0529992 0 7.83594 1 2 -1
83968 -655360 0 1.44469 24.2687 110.362 -27.88 -0.0910008 0 7.96094 1 2 -1
83968 -655360 0 1.44469 24.2687 110.362 -28.027 -0.0820008 0 8.11719 1 2 -1

View File

@@ -0,0 +1,6 @@
32768 0 256 45.8851 27.5883 13.4159 7.445 0.185 0 0.1875 1 2 -1
43008 -540672 128 45.5435 29.5779 13.564 7.445 0.185 0 1.28125 1 2 -1
43008 -519168 128 45.1473 31.885 13.7357 7.445 0.185 0 1.90625 1 2 -1
45056 -497664 128 44.8057 33.8744 13.8837 7.445 0.185 0 4.4375 1 2 -1
49152 -475136 -32 44.2369 37.187 14.1302 7.445 0.185 0 4.4375 1 2 -1
32768 -481280 -32 43.7263 40.1605 14.3515 7.445 0.185 0 4.4375 1 2 -1

View File

@@ -0,0 +1,8 @@
32768 -1978057 256 34.577 2.23528 1.77179 -28.48 -0.364 0 8.11719 1 2 -1
49152 -1867776 0 34.577 2.23528 1.77179 -28.699 -0.409 0 8.11719 1 2 -1
49152 -1867776 0 34.577 2.23528 1.77179 -29.662 -0.388 0 8.11719 1 2 -1
55296 -1867776 0 34.577 2.23528 1.77179 -30.691 0.0379997 0 1.39844 1 2 -1
59392 -1867776 0 34.577 2.23528 1.77179 -31.705 -0.676 0 1.42969 1 2 -1
65536 -1867776 0 34.577 2.23528 1.77179 -31.993 -0.934 0 1.42969 1 2 -1
49152 -1867776 0 34.577 2.23528 1.77179 -32.083 -0.982 0 1.42969 1 2 -1
49152 -1867776 0 34.577 2.23528 1.77179 -32.092 -0.991 0 1.27344 1 2 -1

View File

@@ -0,0 +1,7 @@
32768 -1867776 256 52.5193 54.2637 35.7364 -36.4389 0.296 0 8.11719 1 2 -1
65536 -1982464 -96 53.8673 54.2637 42.3171 -36.2589 0.299 0 8.11719 1 2 -1
65536 -2007040 -96 30.8759 53.4603 94.803 -35.476 0.245 0 8.11719 1 2 -1
65536 -2031616 -96 -19.6306 44.9336 99.735 -34.576 0.113 0 5 1 2 -1
65536 -2056192 -96 -50.2317 34.2364 78.5862 -33.907 0.0230002 0 4.80469 1 2 -1
65536 -2080768 -96 -67.0617 26.1809 51.9399 -33.253 -0.172 0 3.00782 1 2 -1
65536 -2105344 -96 -67.9322 26.1809 45.6197 -33.061 -0.22 0 8.11719 1 2 -1

View File

@@ -0,0 +1,4 @@
16384 -1982464 256 256.147 2.45766 69.0275 1.57106 -0.000999578 0 6.57032 0.5 2 -1
131072 -1998848 0 224.364 2.48943 69.0191 1.57106 -0.000999578 0 4.50782 0.5 2 -2.75
16384 -1916928 256 -192.823 2.90644 68.9091 1.57106 -0.000999578 0 4.57032 0.5 3.75 -1
32768 -1884160 256 -224.766 2.93837 68.9007 1.57106 -0.000999578 0 6.57032 0.5 2 -1

View File

@@ -0,0 +1,7 @@
32768 -1589248 256 38.8312 23.0892 -92.8456 -2.70399 0.02 0 6 1 2 -1
49152 -1589248 0 38.8312 23.0892 -92.8456 -3.01899 0.00799998 0 6 1 2 -1
49152 -1589248 0 38.8312 23.0892 -92.8456 -4.16199 0.05 0 6 1 2 -1
49152 -1589248 0 38.1846 23.759 -93.518 -4.86099 -0.00700005 0 6 1 2 -1
49152 -1589248 0 36.7788 25.0006 -94.6688 -5.50298 -0.067 0 4.125 1.59375 2 -1
49152 -1589248 0 36.7788 25.0006 -94.6688 -5.53898 -0.058 0 4.125 1.59375 2 -1
49152 -1589248 0 36.7788 25.0006 -94.6688 -5.47298 -0.073 0 4.125 1.59375 2 -1

View File

@@ -0,0 +1,8 @@
32768 -1389056 256 -30.5943 2.41748 34.8058 -3.103 -0.00400013 0 3 1 2 -1
49152 -1390592 0 -29.9201 2.48738 17.3449 -3.103 -0.00400013 0 3 1 2 -1
49152 -1390592 0 -29.2492 2.55694 -0.0302132 -2.863 -0.256 0 3 1 2 -1
49152 -1390592 0 -28.2805 2.65737 -25.119 -2.515 -0.61 0 3 1 2 -1
49152 -1390592 0 -27.5477 2.73334 -44.0971 -1.666 -0.853 0 3 1 2 -1
49152 -1390592 0 -26.8274 2.80802 -62.7524 -1.096 -0.718 0 3 1 2 -1
49152 -1390592 0 -27.319 2.90112 -72.6323 -0.610001 -0.67 0 3 1 2 -1
49152 -1390592 0 -26.0417 2.89519 -84.529 -0.433001 -0.544 0 3 1 2 -1

View File

@@ -0,0 +1,5 @@
32768 -1390592 256 4.85618 -0.462118 -67.7764 -2.173 -0.0160004 0 3 1 2 -1
65536 -1638400 -128 4.83375 1.23884 -67.761 -2.08 -0.151 0 3 1 2 -1
65536 -1671168 -128 2.44047 8.3608 -67.2944 -1.57 -0.484 0 3 1 2 -1
65536 -1703936 -128 -3.71454 16.1558 -70.044 -0.870999 -0.736 0 2.5 1 2 -1
65536 -1736704 -128 -5.60423 18.928 -71.9479 -0.663999 -0.826 0 3 1 2 -1

View File

@@ -0,0 +1,9 @@
32768 -1591567 256 -3.66313 25.4071 -107.184 -0.00399655 0.0200001 0 1.19531 1 2 -1
24576 -1605632 48 0.0407009 25.4071 -107.199 -0.00399655 0.0200001 0 1.19531 1 2 -1
16384 -1601024 32 8.11559 25.4071 -107.231 -0.00399655 0.0200001 0 1.4375 1 2 -1
16384 -1598976 32 12.1636 25.4071 -107.247 -0.00399655 0.0200001 0 1.48437 1 2 -1
16384 -1596928 32 13.3373 25.4071 -107.252 -0.00399655 0.0200001 0 1.74219 1 2 -1
16384 -1594880 32 13.8326 25.4071 -107.254 -0.00399655 0.0200001 0 2.52344 1 2 -1
16384 -1592832 32 14.2712 25.4071 -107.255 -0.00399655 0.0200001 0 3.125 1 2 -1
16384 -1590784 32 14.5108 25.4071 -107.256 -0.00399655 0.0200001 0 3.125 1 2 -1
16384 -1588736 32 14.5565 25.4071 -107.257 -0.00399655 0.0200001 0 3.125 1 2 -1

View File

@@ -0,0 +1,9 @@
32768 -1258829 20 22.504 -0.744008 -37.1144 1.61 -0.000999827 1.57384 3 1 2 -1
24576 -1261568 32 22.5054 0.601939 -37.1144 1.61 -0.000999827 1.58133 2.09375 1 2 -1
24576 -1258496 64 22.5146 9.88245 -37.114 1.61 -0.000999827 1.51405 2.09375 1 2 -1
24576 -1252352 64 22.5232 18.4748 -37.1137 1.61 -0.000999827 1.24286 2.09375 1 2 -1
24576 -1246208 64 22.5323 27.5617 -37.1134 1.61 -0.000999827 0.336487 2.0625 1 2 -1
24576 -1240064 64 22.5424 37.6608 -37.113 1.61 -0.000999827 0.0208588 2.0625 1 2 -1
24576 -1233920 64 22.5521 47.4157 -37.1127 1.61 -0.000999827 0 4.13281 1 2 -1
24576 -1227776 64 22.5595 54.8226 -37.1124 1.61 -0.000999827 0 7.53125 1 2 -1
24576 -1221632 64 22.5642 59.5275 -37.1122 1.61 -0.000999827 0 3 1 2 -1

View File

@@ -0,0 +1,7 @@
32768 -1695749 256 14.2548 9.07528 -132.516 -0.507997 0.0230001 0 4.63281 1 2 -1
32768 -1736704 64 17.4813 8.8792 -131.62 -0.243997 -0.142 0 4.63281 1 2 -1
32768 -1728512 256 24.2446 7.34264 -132.09 0.104003 -0.307 0 4.63281 1 2 -1
32768 -1695744 256 30.5821 4.79635 -132.047 0.437003 -0.643 0 3.44531 1 2 -1
32768 -1662976 256 32.1681 1.96433 -131.937 0.452004 -0.877001 0 1.82813 1 2 -1
32768 -1630208 256 31.9428 1.21568 -131.721 0.416004 -1.012 0 1.70313 1 2 -1
32768 -1597440 256 31.5428 0.914895 -130.726 0.506004 -1.054 0 1.82813 1 1.9375 -1

View File

@@ -0,0 +1,6 @@
32768 34816 256 59.3152 19.0325 -101.751 -5.797 -0.184 0 0.523438 1 2 -1
163840 -114688 384 59.6102 19.0325 -101.595 -5.776 -0.199 0 0.0625 1 2 -1
49152 131072 4 63.4478 19.0325 -98.334 -5.51501 -0.37 0 5.00781 1 2 -1
81920 131840 64 63.564 19.0325 -98.2141 -5.48201 -0.394 0 8 1 2 -1
32768 152320 256 63.7373 19.0325 -98.0298 -5.46701 -0.403 0 8.00781 1 2 -1
32768 185088 256 63.8213 19.0325 -97.9388 -5.45801 -0.403 0 5.00781 1 2 -1

View File

@@ -0,0 +1,8 @@
32768 -1589248 256 181.318 7.99043 -218.691 -5.12799 -0.058 0 3 1 2 -1
65536 -2490368 -128 179.935 8.14849 -214.88 -5.119 -0.085 0 3 1 2 -1
65536 -2523136 -128 175.494 8.50923 -206.73 -4.855 -0.055 0 3 1 0.5 -1
65536 -2555904 -128 171.112 8.78697 -201.167 -4.71399 -0.043 0 3 1 2 -1
65536 -2588672 -128 153.24 5.29836 -173.864 -4.72299 -0.079 0 3 1 2 -1
65536 -2621440 -128 149.712 3.7142 -176.195 -4.95399 -0.22 0 3 1 2 -1
65536 -2654208 -128 146.543 4.14288 -179.509 -5.08899 -0.265 0 2.36719 1 2 -1
65536 -2686976 -128 144.083 4.66813 -180.293 -5.14599 -0.265 0 3 1 2 -1

View File

@@ -0,0 +1,5 @@
32768 344064 256 -34.5311 1.22582 -21.1216 -0.862002 -0.252 0 2.5 0.859375 2 -1
81920 376832 256 -34.1339 3.67594 -22.554 -0.808001 -0.24 0 2.5 0.859375 2 -1
65536 458752 256 -28.5268 8.61063 -23.09 -0.712001 -0.123 0 2.5 0.859375 2 -1
81920 540672 256 -15.9678 13.8245 -26.4024 -0.565001 -0.126 0 2.5 0.859375 2 -1
81920 622592 256 -10.9107 15.7305 -26.0793 -0.481001 -0.0450002 0 2.5 0.859375 2 -1

View File

@@ -0,0 +1,4 @@
32768 540672 256 -7.25661 19.8502 17.3732 -2.011 0.942 0 2.5 0.859375 2 -1
131072 393216 384 -7.25661 19.8502 17.3732 -2.206 0.837 0 2.5 0.859375 2 -1
32768 606208 384 -7.25661 19.8502 17.3732 -2.785 -0.426 0 2.5 0.859375 -0.5 -1
32768 638976 384 -7.25661 19.8502 17.3732 -2.875 -0.516 0 2.5 0.859375 2 -1

View File

@@ -0,0 +1,4 @@
32768 449960 256 -45.0177 8.92573 115.42 -1.231 0.0420004 0 2.5 0.859375 2 -1
65536 458752 384 -44.3176 10.7003 113.681 -1.204 0.0870004 0 2.5 0.859375 2 -1
32768 557056 256 -45.273 13.1559 105.904 -1.183 0.105 0 2.5 0.859375 2 -1
32768 589824 256 -44.6257 13.1559 104.319 -1.183 0.105 0 2.5 0.859375 2 -1

View File

@@ -0,0 +1,9 @@
32768 520689 256 -29.7019 8.07853 109.975 -0.673005 0.228001 0 2.5 0.859375 2 -1
65536 540672 512 -28.5543 14.3718 100.464 -0.676005 0.234001 0 2.5 0.859375 2 -1
65536 671744 256 -25.7555 11.3283 68.8197 0.100995 -0.00899933 0 2.5 0.859375 2 -1
65536 737280 256 -21.0055 4.93129 50.7375 1.022 -0.464999 0 2.5 0.859375 2 -1
65536 802816 256 -18.5718 3.58918 38.1406 1.229 -0.398999 0 2.25 0.859375 2 -1
65536 868352 256 -18.5839 2.72201 32.9247 2.447 -0.380999 0 2.25 0.859375 2 -1
65536 933888 256 -18.7677 2.90541 32.1943 3.239 -0.0629994 0 2.25 0.859375 2 -1
65536 999424 256 -18.7677 2.90541 32.1943 3.365 -0.0929994 0 2.25 0.859375 2 -1
65536 1064960 256 -18.7677 2.90541 32.1943 3.473 -0.155999 0 2.25 0.859375 2 -1

View File

@@ -0,0 +1,4 @@
32768 933888 256 -31.1108 20.581 -19.0166 5.93899 0.204001 0 2.125 0.859375 2 -1
196608 966656 512 -31.1108 20.581 -19.0166 5.789 0.204001 0 2.5 0.859375 2 -1
32768 1359872 256 -31.1108 20.581 -19.0166 4.865 0.372001 0 2.9375 0.859375 2 -1
32768 1392640 256 -31.1108 20.581 -19.0166 4.712 0.387001 0 2.125 0.859375 2 -1

View File

@@ -0,0 +1,4 @@
65536 1064960 512 20.0246 13.5516 -11.2789 6.76999 0.0660008 0 1.40625 0.859375 2 -1
196608 1081344 256 20.0246 13.5516 -11.2789 6.93799 0.0960008 0 3.15625 0.859375 2 -1
196608 1277952 256 20.0246 13.5516 -11.2789 8.21299 0.0990008 0 1.09375 0.859375 2 -1
196608 1474560 256 20.0246 13.5516 -11.2789 8.50699 0.111001 0 1.40625 0.859375 2 -1

View File

@@ -0,0 +1,4 @@
32768 1064960 256 8.6674 14.4199 36.1592 5.84598 0.0900008 0 1.40625 0.859375 2 -1
393216 819200 512 16.0979 15.5044 19.8612 5.77399 0.117001 0 2.3125 0.859375 2 -1
32768 1605632 256 20.074 47.2696 -155.135 5.87598 1.104 0 2.77344 1 2 -1
32768 1638400 256 21.6148 62.5464 -151.562 5.87598 1.167 0 2.24219 1 2 -1

View File

@@ -0,0 +1,7 @@
32768 1033952 256 -32.4603 0.962131 -49.7415 -6.27101 -0.241 0 5.10938 1 2 -1
32768 1064960 256 -32.4603 0.962131 -49.7415 -6.43901 -0.286 0 5.10938 1.3125 2 -1
32768 1097728 256 -32.4603 0.962131 -49.7415 -7.17101 -0.799 0 3.23438 1.3125 2 -1
32768 1130496 256 -32.4603 0.962131 -49.7415 -7.756 -0.724 0 2.85938 1.3125 2 -1
32768 1163264 256 -32.4603 0.962131 -49.7415 -8.434 -0.598 0 2.85938 1.3125 2 -1
32768 1196032 256 -32.4603 0.962131 -49.7415 -8.704 -0.382 0 2.85938 1.3125 2 -1
32768 1228800 256 -32.4603 0.962131 -49.7415 -9.049 -0.238 0 2.85938 1 2 -1

View File

@@ -0,0 +1,5 @@
32768 5734400 256 -14.3465 2.28733 132.371 0.590003 -0.0670008 0 2.10156 1 2 -1
131072 5636096 128 -14.3465 2.28733 132.371 0.596003 -0.100001 0 2.10156 1 2 -1
131072 5701632 128 -14.3465 2.28733 132.371 0.710003 -0.388001 0 2.10156 1 2 -1
131072 5767168 128 -14.3465 2.28733 132.371 0.983003 -0.796001 0 2.10156 1 2 -1
131072 5832704 128 -14.3465 2.28733 132.371 1.166 -0.880001 0 2.10156 1 2 -1

View File

@@ -0,0 +1,5 @@
32768 5736492 256 -17.3387 17.0975 81.2954 -9.71199 0.343999 0 3.00781 1 2 -1
98304 5734400 192 -17.3387 17.0975 81.2954 -9.75099 0.418999 0 3.00781 1 2 -1
98304 5808128 192 -17.3387 17.0975 81.2954 -9.52899 0.559999 0 2.5625 1 2 -1
98304 5881856 192 -17.3387 17.0975 81.2954 -9.10599 0.412999 0 2.50781 1 2 -1
98304 5955584 192 -17.3387 17.0975 81.2954 -9.03699 0.412999 0 3.00781 1 2 -1

View File

@@ -0,0 +1,9 @@
32768 5729181 256 22.0722 7.73793 105.444 0.0740029 0.628999 0 2.32813 1 2 -1
65536 5726208 128 22.2024 8.75489 103.907 0.0860029 0.505999 0 2.32813 1 2 -1
65536 5758976 128 22.7278 11.317 97.899 0.038003 0.316999 0 2.32813 1 2 -1
65536 5791744 128 23.3915 17.048 80.4424 0.038003 0.316999 0 2.32813 1 2 -1
65536 5824512 128 24.2119 24.3735 68.0274 0.146003 0.901999 0 2.32813 1 2 -1
65536 5857280 128 25.7492 31.4493 60.3857 0.323003 1.04 0 2.32813 1 2 -1
65536 5890048 128 26.3334 34.1946 59.0302 0.518003 1.19 0 2.32813 1 2 -1
65536 5922816 128 26.7472 35.8514 58.3004 0.731003 1.352 0 2.32813 1 2 -1
65536 5955584 128 27.6125 38.9066 57.093 1.166 1.542 0 2.32813 1 2 -1

View File

@@ -0,0 +1,4 @@
32768 6051052 256 -21.8483 132.758 53.3846 -4.711 1.5 0 5.46094 1.62891 2 -1
262144 5980160 160 -21.8348 132.758 43.66 -4.711 1.5 0 5.46094 1.62891 2 -1
32768 6144000 256 -21.7151 132.758 -42.2764 -4.711 1.5 0 5.46094 1.62891 2 -1
32768 6176768 256 -21.7102 132.758 -45.8135 -4.711 1.5 0 5.46094 1.62891 2 -1

View File

@@ -0,0 +1,10 @@
65536 6013405 128 7.09506 13.9393 -14.9765 -2.149 0.367999 0 2.32813 1 2 -1
65536 6045696 116 6.20406 14.1829 -15.1816 -2.17 0.370999 0 2.32813 1 2 -1
65536 6075392 116 5.71052 15.0421 -12.8371 -2.314 0.403999 0 2.32813 1 2 -1
65536 6105088 116 2.30756 16.9842 -9.91787 -2.668 0.412999 0 2.32813 1 2 -1
65536 6134784 116 2.897 18.0583 -7.31685 -3.112 0.352999 0 2.32813 1 2 -1
65536 6164480 116 6.13269 19.428 -4.94656 -3.538 0.475999 0 2.32813 1 2 -1
81920 6194176 116 8.55125 20.5312 -5.51193 -4.945 0.538999 0 2.32813 1 2 -1
131072 6231296 116 8.77456 20.8422 -6.32389 -5.563 0.439999 0 2.32813 1 2 -1
65536 6290688 116 8.77456 20.8422 -6.32389 -5.599 0.400999 0 2.32813 1 2 -1
65536 6320384 116 8.77456 20.8422 -6.32389 -5.656 0.379999 0 2.32813 1 2 -1

View File

@@ -0,0 +1,4 @@
32768 6290688 256 30.7616 79.1422 -132.308 -5.581 0.415999 0 4.32813 1 2 -1
131072 6291456 128 67.5837 71.381 -66.9802 -5.35301 0.400999 0 4.32813 1 2 -1
32768 6356992 256 57.4173 62.0954 42.3111 -4.05701 0.181999 0 4.32813 1 2 -1
32768 6389760 256 35.7403 62.2446 65.5172 -3.69401 0.145999 0 4.32813 1 2 -1

View File

@@ -0,0 +1,11 @@
32768 414431 256 -103.545 -1.55582 -42.9698 -1.57 -0.00100014 0 1.30469 1 2 -1
49152 3391488 -256 -103.548 1.48031 -42.9698 -1.57 -0.00100014 0 1.80469 1 2 -1
49152 3342336 -256 -103.554 7.7137 -42.9698 -1.57 -0.00100014 0 1.80469 1 2 -1
49152 3293184 -256 -103.56 13.5921 -42.9698 -1.57 -0.00100014 0 1.80469 1 2 -1
49152 3244032 -256 -103.561 15.616 -43.8094 -1.57 -0.00100014 0 1.86719 1 2 -1
49152 3194880 -256 -103.561 16.962 -46.34 -1.57 -0.00100014 0 3.1875 1 2 -1
49152 3145728 -256 -107.623 14.871 -53.3201 -1.366 -0.0880001 0 3.1875 1 2 -1
49152 3096576 -256 -108.137 7.68358 -64.7976 -1.048 -0.232 0 2.70313 1 2 -1
49152 3047424 -256 -101.971 3.79591 -67.1552 -0.615998 -0.43 0 2.70313 1 2 -1
49152 2998272 -256 -96.7237 -0.112378 -71.4151 -0.267998 -0.532 0 2.70313 1 2 -1
49152 2949120 -256 -92.6281 -2.17985 -75.9086 -0.165998 -0.547 0 2.70313 1 2 -1

View File

@@ -0,0 +1,5 @@
32768 2800848 256 -127.286 2.98522 -18.2396 -1.6 -0.0790001 0 5.42969 1 2 -1
131072 2621440 128 -127.286 2.98522 -18.2396 -1.756 -0.133 0 5.42969 1 2 -1
131072 2686976 128 -127.286 2.98522 -18.2396 -2.629 -0.439 0 2.49219 1 2 -1
131072 2752512 128 -127.286 2.98522 -18.2396 -3.205 -0.439 0 2.49219 1 2 -1
131072 2818048 128 -127.286 2.98522 -18.2396 -3.541 -0.343 0 5.42969 1 2 -1

View File

@@ -0,0 +1,6 @@
32768 2800848 256 21.7041 45.3283 21.2518 1.778 0.854 0 3.96094 0.902344 2 -1
65536 8302592 256 23.0447 49.1851 27.9335 2.003 0.869 0 4.91406 0.902344 2 -1
65536 8368128 128 18.4602 55.2581 19.8365 1.466 0.821 0 3.89063 0.855469 2.5 -1
458752 8400896 224 15.5751 56.3316 17.8926 0.572001 -0.199 0 3.0625 0.855469 0 -1
32768 8925184 256 -19.0561 71.1491 21.9887 -0.552999 0.185 0 2.1875 0.855469 2 -1
32768 8957952 256 -26.7881 76.9573 43.4582 -1.795 0.431 0 2.05469 0.902344 2 -1

View File

@@ -0,0 +1,7 @@
32768 10418152 256 -44.3082 64.1545 32.1178 -1.261 0.185 0 3.28125 0.855469 2 -1
262144 10450920 128 -38.2027 67.8069 19.8068 -0.846998 0.305 0 3.28125 0.855469 2 -1
262144 10581992 128 11.4402 73.4091 4.92137 0.407002 -0.271 0 3.28125 0.855469 2 -1
262144 10713064 128 26.6279 73.4091 20.7486 1.325 -0.853 0 3.3125 0.996094 2 -1
262144 10844136 128 26.9154 73.4091 25.2545 1.805 -0.952 0 1.71875 1.01172 2 -1
262144 10975208 128 26.4275 74.3789 25.0724 1.928 -1.078 0 1.71875 1.01172 2 -1
262144 11106280 128 25.2601 76.7372 24.629 1.985 -1.117 0 1.71875 1.01172 2 -1

View File

@@ -0,0 +1,5 @@
151200 -4563632 0 1.44469 24.2687 110.362 -26.29 0.442999 0 8.11719 1 2 -1
151200 -1512000 0 1.44469 24.2687 110.362 -26.53 0.331999 0 2.35938 1 2 -1
151200 -1512000 0 1.44469 24.2687 110.362 -27.196 0.0529992 0 8.11719 1 2 -1
151200 -1512000 0 1.44469 24.2687 110.362 -27.88 -0.0910008 0 7.24219 1 2 -1
151200 -1512000 0 1.44469 24.2687 110.362 -28.027 -0.0820008 0 8.11719 1 2 -1

View File

@@ -0,0 +1,6 @@
75600 0 256 45.8851 27.5883 13.4159 7.445 0.185 0 0.1875 1 2 -1
75600 -1247400 128 45.5435 29.5779 13.564 7.445 0.185 0 0.1875 1 2 -1
75600 -1209600 128 45.1473 31.885 13.7357 7.445 0.185 0 1.0625 1 2 -1
75600 -1171800 128 44.8057 33.8744 13.8837 7.445 0.185 0 4.4375 1 2 -1
113400 -2835000 -32 44.2369 37.187 14.1302 7.445 0.185 0 4.4375 1 2 -1
75600 -2849175 -32 43.7263 40.1605 14.3515 7.445 0.185 0 4.4375 1 2 -1

View File

@@ -0,0 +1,8 @@
75600 -4563632 256 34.577 2.23528 1.77179 -28.48 -0.364 0 8.11719 1 2 -1
113400 -4309200 0 34.577 2.23528 1.77179 -28.699 -0.409 0 8.11719 1 2 -1
113400 -4309200 0 34.577 2.23528 1.77179 -29.662 -0.388 0 8.11719 1 2 -1
113400 -4309200 0 34.577 2.23528 1.77179 -30.691 0.0379997 0 1.27344 1 2 -1
113400 -4309200 0 34.577 2.23528 1.77179 -31.705 -0.676 0 1.27344 1 2 -1
113400 -4309200 0 34.577 2.23528 1.77179 -31.771 -1.024 0 1.27344 1 2 -1
113400 -4309200 0 34.577 2.23528 1.77179 -31.843 -1.075 0 1.27344 1 2 -1
113400 -4309200 0 34.577 2.23528 1.77179 -31.858 -1.087 0 1.27344 1 2 -1

View File

@@ -0,0 +1,7 @@
75600 -4309200 256 52.5193 54.2637 35.7364 -36.4389 0.296 0 8.11719 1 2 -1
113400 -4573800 -128 53.8673 54.2637 42.3171 -36.2589 0.299 0 8.11719 1 2 -1
113400 -4630500 -128 30.8759 53.4603 94.803 -35.476 0.245 0 8.11719 1 2 -1
113400 -4687200 -128 -19.6306 44.9336 99.735 -34.576 0.113 0 5 1 2 -1
113400 -4743900 -128 -50.2317 34.2364 78.5862 -33.907 0.0230002 0 4.80469 1 2 -1
113400 -4800600 -128 -67.0617 26.1809 51.9399 -33.253 -0.172 0 3.00782 1 2 -1
113400 -4857300 -128 -67.9322 26.1809 45.6197 -33.061 -0.22 0 8.11719 1 2 -1

View File

@@ -0,0 +1,4 @@
37800 -4573800 256 256.147 2.45766 69.0275 1.57106 -0.000999578 0 6.57032 0.5 2 -1
302400 -4611600 0 224.364 2.48943 69.0191 1.57106 -0.000999578 0 3.94532 0.5 2 -2.75
37800 -4422600 256 -192.823 2.90644 68.9091 1.57106 -0.000999578 0 3.94532 0.5 3.75 -1
75600 -4347000 256 -224.766 2.93837 68.9007 1.57106 -0.000999578 0 6.57032 0.5 2 -1

View File

@@ -0,0 +1,8 @@
75600 -3666600 256 181.318 7.99043 -218.691 -5.12799 -0.058 0 3 1 2 -1
75600 -5745600 -256 179.935 8.14849 -214.88 -5.119 -0.085 0 3 1 2 -1
75600 -5821200 -256 175.494 8.50923 -206.73 -4.855 -0.055 0 3 1 0.5 -1
75600 -5896800 -256 171.112 8.78697 -201.167 -4.71399 -0.043 0 3 1 2 -1
75600 -5972400 -256 153.24 5.29836 -173.864 -4.72299 -0.079 0 3 1 2 -1
75600 -6048000 -256 149.712 3.7142 -176.195 -4.95399 -0.22 0 3 1 2 -1
75600 -6048000 -256 146.543 4.14288 -179.509 -5.08899 -0.265 0 2.36719 1 2 -1
75600 -6199200 -256 144.083 4.66813 -180.293 -5.14599 -0.265 0 3 1 2 -1

View File

@@ -0,0 +1,7 @@
75600 -3666600 256 38.8312 23.0892 -92.8456 -2.70399 0.02 0 6 1 2 -1
113400 -3666600 0 38.8312 23.0892 -92.8456 -3.01899 0.00799998 0 6 1 2 -1
113400 -3666600 0 38.8312 23.0892 -92.8456 -4.16199 0.05 0 6 1 2 -1
113400 -3666600 0 38.1846 23.759 -93.518 -4.86099 -0.00700005 0 6 1 2 -1
113400 -3666600 0 36.7788 25.0006 -94.6688 -5.50298 -0.067 0 4.125 1.59375 2 -1
113400 -3666600 0 36.7788 25.0006 -94.6688 -5.53898 -0.058 0 4.125 1.59375 2 -1
113400 -3666600 0 36.7788 25.0006 -94.6688 -5.47298 -0.073 0 4.125 1.59375 2 -1

View File

@@ -0,0 +1,8 @@
75600 -3204732 256 -30.5943 2.41748 34.8058 -3.103 -0.00400013 0 3 1 2 -1
113400 -3208275 0 -29.9201 2.48738 17.3449 -3.103 -0.00400013 0 3 1 2 -1
113400 -3208275 0 -29.2492 2.55694 -0.0302132 -2.863 -0.256 0 3 1 2 -1
113400 -3208275 0 -28.2805 2.65737 -25.119 -2.515 -0.61 0 3 1 2 -1
113400 -3208275 0 -27.5477 2.73334 -44.0971 -1.666 -0.853 0 3 1 2 -1
113400 -3208275 0 -26.8274 2.80802 -62.7524 -1.096 -0.718 0 3 1 2 -1
113400 -3208275 0 -27.319 2.90112 -72.6323 -0.610001 -0.67 0 3 1 2 -1
113400 -3208275 0 -26.0417 2.89519 -84.529 -0.433001 -0.544 0 3 1 2 -1

View File

@@ -0,0 +1,5 @@
75600 -3208275 256 4.85618 -0.462118 -67.7764 -2.173 -0.0160004 0 3 1 2 -1
151200 -3780000 -128 4.83375 1.23884 -67.761 -2.08 -0.151 0 3 1 2 -1
151200 -3855600 -128 2.44047 8.3608 -67.2944 -1.57 -0.484 0 3 1 2 -1
151200 -3931200 -128 -3.71454 16.1558 -70.044 -0.870999 -0.736 0 2.5 1 2 -1
151200 -4006800 -128 -5.60423 18.928 -71.9479 -0.663999 -0.826 0 3 1 2 -1

Some files were not shown because too many files have changed in this diff Show More