mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 12:29:18 +02:00
Merge pull request #10 from antonisauren/master
478: Smuga: współczynnik wzmocnienia łapiący zmiany dynamiczne. Aktualizacja świateł z programatora przy załączaniu baterii tylko gdy ten istnieje.
This commit is contained in:
4
EU07.bpr
4
EU07.bpr
@@ -60,7 +60,7 @@ AutoIncBuild=0
|
||||
MajorVer=16
|
||||
MinorVer=0
|
||||
Release=1173
|
||||
Build=477
|
||||
Build=478
|
||||
Debug=1
|
||||
PreRelease=0
|
||||
Special=0
|
||||
@@ -72,7 +72,7 @@ CodePage=1250
|
||||
[Version Info Keys]
|
||||
CompanyName=EU07 Team
|
||||
FileDescription=MaSzyna EU07-424
|
||||
FileVersion=16.0.1173.477
|
||||
FileVersion=16.0.1173.478
|
||||
InternalName=DP+SPKS+asynch+python
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
|
||||
@@ -49,9 +49,9 @@ double Global::fLuminance = 1.0; // jasno
|
||||
int Global::iReCompile = 0; // zwiêkszany, gdy trzeba odœwie¿yæ siatki
|
||||
HWND Global::hWnd = NULL; // uchwyt okna
|
||||
int Global::iCameraLast = -1;
|
||||
AnsiString Global::asRelease = "16.0.1172.477";
|
||||
AnsiString Global::asRelease = "16.0.1172.478";
|
||||
AnsiString Global::asVersion =
|
||||
"Compilation 2016-06-10, release " + Global::asRelease + "."; // tutaj, bo wysy³any
|
||||
"Compilation 2016-06-23, release " + Global::asRelease + "."; // tutaj, bo wysy³any
|
||||
int Global::iViewMode = 0; // co aktualnie widaæ: 0-kabina, 1-latanie, 2-sprzêgi, 3-dokumenty
|
||||
int Global::iTextMode = 0; // tryb pracy wyœwietlacza tekstowego
|
||||
int Global::iScreenMode[12] = {0, 0, 0, 0, 0, 0,
|
||||
|
||||
@@ -459,7 +459,10 @@ void TTrain::OnKeyDown(int cKey)
|
||||
if (mvOccupied->BatterySwitch(true)) // bateria potrzebna np. do zapalenia œwiate³
|
||||
{
|
||||
dsbSwitch->Play(0, 0, 0);
|
||||
SetLights();
|
||||
if (mvOccupied->LightsPosNo > 0)
|
||||
{
|
||||
SetLights();
|
||||
}
|
||||
if (TestFlag(mvOccupied->SecuritySystem.SystemType,
|
||||
2)) // Ra: znowu w kabinie jest coœ, co byæ nie powinno!
|
||||
{
|
||||
|
||||
@@ -1552,7 +1552,7 @@ bool TWorld::Update()
|
||||
glDisable(GL_FOG);
|
||||
//glColor4f(0.15f, 0.15f, 0.15f, 0.25f);
|
||||
glBindTexture(GL_TEXTURE_2D, light); // Select our texture
|
||||
float ddl = (0.15*Global::diffuseDayLight[0]+0.295*Global::diffuseDayLight[1]+0.055*Global::diffuseDayLight[2]); //0.24:0
|
||||
//float ddl = (0.15*Global::diffuseDayLight[0]+0.295*Global::diffuseDayLight[1]+0.055*Global::diffuseDayLight[2]); //0.24:0
|
||||
glBegin(GL_QUADS);
|
||||
float fSmudge = Train->Dynamic()->MoverParameters->DimHalf.y + 7; // gdzie zaczynaæ smugê
|
||||
if (Train->Controlled()->iLights[0] & 21)
|
||||
@@ -1561,7 +1561,7 @@ bool TWorld::Update()
|
||||
{
|
||||
float z = i * i * i * 0.01f;//25/4;
|
||||
//float C = (36 - i*0.5)*0.005*(1.5 - sqrt(ddl));
|
||||
float C = (36 - i*0.5)*0.005*sqrt((1/sqrt(ddl+0.015))-1);
|
||||
float C = (36 - i*0.5)*0.005*sqrt((1/sqrt(Global::fLuminance+0.015))-1);
|
||||
glColor4f(C, C, C, 0.25f);
|
||||
glTexCoord2f(0, 0); glVertex3f(-10 / 2 - 2 * i / 4, 6.0 + 0.3*z, 13 + 1.7*z / 3);
|
||||
glTexCoord2f(1, 0); glVertex3f(10 / 2 + 2 * i / 4, 6.0 + 0.3*z, 13 + 1.7*z / 3);
|
||||
@@ -1574,7 +1574,7 @@ bool TWorld::Update()
|
||||
for (int i = 15; i <= 35; i++)
|
||||
{
|
||||
float z = i * i * i * 0.01f;//25/4;
|
||||
float C = (36 - i*0.5)*0.005*sqrt((1/sqrt(ddl+0.015))-1);
|
||||
float C = (36 - i*0.5)*0.005*sqrt((1/sqrt(Global::fLuminance+0.015))-1);
|
||||
glColor4f(C, C, C, 0.25f);
|
||||
glTexCoord2f(0, 0); glVertex3f(10 / 2 + 2 * i / 4, 6.0 + 0.3*z, -13 - 1.7*z / 3);
|
||||
glTexCoord2f(1, 0); glVertex3f(-10 / 2 - 2 * i / 4, 6.0 + 0.3*z, -13 - 1.7*z / 3);
|
||||
|
||||
Reference in New Issue
Block a user