mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-18 00:49:19 +02:00
Python: logowanie priorytetu wątku pythona
Smuga: wzmocnienie smugi zależne od oświetlenia amtosferycznego
This commit is contained in:
19
EU07.bpr
19
EU07.bpr
@@ -3,7 +3,7 @@
|
||||
<PROJECT>
|
||||
<MACROS>
|
||||
<VERSION value="BCB.05.03"/>
|
||||
<PROJECT value="E:\Gry\MaSzyna_15_04\EU07.exe"/>
|
||||
<PROJECT value="EU07.exe"/>
|
||||
<OBJFILES value="QueryParserComp.obj McZapkie\mtable.obj McZapkie\_mover.obj
|
||||
McZapkie\hamulce.obj McZapkie\Oerlikon_ESt.obj EU07.obj dumb3d.obj
|
||||
Camera.obj Texture.obj World.obj Model3d.obj MdlMngr.obj Train.obj
|
||||
@@ -60,7 +60,7 @@ AutoIncBuild=0
|
||||
MajorVer=16
|
||||
MinorVer=0
|
||||
Release=1173
|
||||
Build=475
|
||||
Build=477
|
||||
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.475
|
||||
FileVersion=16.0.1173.477
|
||||
InternalName=DP+SPKS+asynch+python
|
||||
LegalCopyright=
|
||||
LegalTrademarks=
|
||||
@@ -84,7 +84,7 @@ Comments=
|
||||
[Excluded Packages]
|
||||
$(BCB)\Bin\bcbsmp50.bpl=Borland C++ Sample Components
|
||||
$(BCB)\Bin\dclqrt50.bpl=QuickReport Components
|
||||
C:\Windows\system32\ibsmp50.bpl=Borland C++ InterBase Alerter Component
|
||||
C:\WINDOWS\system32\ibsmp50.bpl=Borland C++ InterBase Alerter Component
|
||||
$(BCB)\Bin\dcltee50.bpl=TeeChart 5.0 Components
|
||||
$(BCB)\Bin\applet50.bpl=Borland Control Panel Applet Package
|
||||
|
||||
@@ -115,11 +115,12 @@ Item6=GLEW_STATIC;_DEBUG;USE_VERTEX_ARRAYS
|
||||
Item7=_DEBUG
|
||||
|
||||
[HistoryLists\hlFinalOutputDir]
|
||||
Count=4
|
||||
Item0=E:\Gry\MaSzyna_15_04\
|
||||
Item1=E:\Gry\MaSzyna_15_04
|
||||
Item2=D:\EU07\
|
||||
Item3=E:\EU07\
|
||||
Count=5
|
||||
Item0=D:\Maszyna
|
||||
Item1=E:\Gry\MaSzyna_15_04\
|
||||
Item2=E:\Gry\MaSzyna_15_04
|
||||
Item3=D:\EU07\
|
||||
Item4=E:\EU07\
|
||||
|
||||
[Debugging]
|
||||
DebugSourceDirs=McZapkie\
|
||||
|
||||
10
Globals.cpp
10
Globals.cpp
@@ -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.476";
|
||||
AnsiString Global::asRelease = "16.0.1172.477";
|
||||
AnsiString Global::asVersion =
|
||||
"Compilation 2016-05-25, release " + Global::asRelease + "."; // tutaj, bo wysy³any
|
||||
"Compilation 2016-06-10, 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,
|
||||
@@ -514,10 +514,8 @@ void Global::ConfigParse(TQueryParserComp *qp, cParser *cp)
|
||||
asLang = GetNextSymbol(); // domyœlny jêzyk - http://tools.ietf.org/html/bcp47
|
||||
else if (str == AnsiString("opengl")) // deklarowana wersja OpenGL, ¿eby powstrzymaæ b³êdy
|
||||
fOpenGL = GetNextSymbol().ToDouble(); // wymuszenie wersji OpenGL
|
||||
else if (str == AnsiString("pyscreenrendererpriority")) // priority of python screen
|
||||
// renderer
|
||||
TPythonInterpreter::getInstance()->setScreenRendererPriority(
|
||||
GetNextSymbol().LowerCase().c_str());
|
||||
else if (str == AnsiString("pyscreenrendererpriority")) // priority of python screen renderer
|
||||
TPythonInterpreter::getInstance()->setScreenRendererPriority(GetNextSymbol().LowerCase().c_str());
|
||||
else if (str == AnsiString("background"))
|
||||
{
|
||||
Background[0] = GetNextSymbol().ToDouble(); // r
|
||||
|
||||
16
PyInt.cpp
16
PyInt.cpp
@@ -208,30 +208,30 @@ void TPythonInterpreter::setScreenRendererPriority(const char *priority)
|
||||
if (strncmp(priority, "normal", 6) == 0)
|
||||
{
|
||||
_screenRendererPriority = THREAD_PRIORITY_NORMAL;
|
||||
#ifdef _PY_INT_MORE_LOG
|
||||
//#ifdef _PY_INT_MORE_LOG
|
||||
WriteLog("Python screen renderer priority: Normal");
|
||||
#endif // _PY_INT_MORE_LOG
|
||||
//#endif // _PY_INT_MORE_LOG
|
||||
}
|
||||
else if (strncmp(priority, "lower", 5) == 0)
|
||||
{
|
||||
_screenRendererPriority = THREAD_PRIORITY_BELOW_NORMAL;
|
||||
#ifdef _PY_INT_MORE_LOG
|
||||
//#ifdef _PY_INT_MORE_LOG
|
||||
WriteLog("Python screen renderer priority: Lower");
|
||||
#endif // _PY_INT_MORE_LOG
|
||||
//#endif // _PY_INT_MORE_LOG
|
||||
}
|
||||
else if (strncmp(priority, "lowest", 6) == 0)
|
||||
{
|
||||
_screenRendererPriority = THREAD_PRIORITY_LOWEST;
|
||||
#ifdef _PY_INT_MORE_LOG
|
||||
//#ifdef _PY_INT_MORE_LOG
|
||||
WriteLog("Python screen renderer priority: Lowest");
|
||||
#endif // _PY_INT_MORE_LOG
|
||||
//#endif // _PY_INT_MORE_LOG
|
||||
}
|
||||
else if (strncmp(priority, "idle", 4) == 0)
|
||||
{
|
||||
_screenRendererPriority = THREAD_PRIORITY_IDLE;
|
||||
#ifdef _PY_INT_MORE_LOG
|
||||
//#ifdef _PY_INT_MORE_LOG
|
||||
WriteLog("Python screen renderer priority: Idle");
|
||||
#endif // _PY_INT_MORE_LOG
|
||||
//#endif // _PY_INT_MORE_LOG
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
15
World.cpp
15
World.cpp
@@ -1545,26 +1545,23 @@ bool TWorld::Update()
|
||||
else
|
||||
{
|
||||
glBlendFunc(GL_DST_COLOR, GL_ONE);
|
||||
// glBlendFunc(GL_SRC_ALPHA_SATURATE, GL_ONE);
|
||||
// glBlendFunc(GL_ONE_MINUS_SRC_ALPHA, GL_ONE);
|
||||
// glBlendFunc(GL_ONE_MINUS_DST_COLOR, GL_DST_COLOR);
|
||||
// glBlendFunc(GL_SRC_ALPHA_SATURATE,GL_ONE);
|
||||
glDepthFunc(GL_GEQUAL);
|
||||
glAlphaFunc(GL_GREATER, 0.004);
|
||||
// glDisable(GL_DEPTH_TEST);
|
||||
glDisable(GL_LIGHTING);
|
||||
glDisable(GL_FOG);
|
||||
glColor4f(0.15f, 0.15f, 0.15f, 0.25f);
|
||||
//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
|
||||
glBegin(GL_QUADS);
|
||||
float fSmudge =
|
||||
Train->Dynamic()->MoverParameters->DimHalf.y + 7; // gdzie zaczynaæ smugê
|
||||
float fSmudge = Train->Dynamic()->MoverParameters->DimHalf.y + 7; // gdzie zaczynaæ smugê
|
||||
if (Train->Controlled()->iLights[0] & 21)
|
||||
{ // wystarczy jeden zapalony z przodu
|
||||
for (int i = 15; i <= 35; i++)
|
||||
{
|
||||
float z = i * i * i * 0.01f;//25/4;
|
||||
float C = (36 - i*0.5)*0.05*0.1;
|
||||
//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);
|
||||
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);
|
||||
@@ -1577,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.05*0.1;
|
||||
float C = (36 - i*0.5)*0.005*sqrt((1/sqrt(ddl+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