16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-20 06:49:19 +02:00

tmj merge

This commit is contained in:
milek7
2017-10-30 16:30:04 +01:00
73 changed files with 9521 additions and 7735 deletions

View File

@@ -17,36 +17,14 @@ http://mozilla.org/MPL/2.0/.
#include "EvLaunch.h"
#include "Globals.h"
#include "Logs.h"
#include "usefull.h"
#include "McZapkie/mctools.h"
#include "Event.h"
#include "MemCell.h"
#include "mtable.h"
#include "Timer.h"
#include "parser.h"
#include "Console.h"
using namespace Mtable;
//---------------------------------------------------------------------------
TEventLauncher::TEventLauncher()
{ // ustawienie początkowych wartości dla wszystkich zmiennych
iKey = 0;
DeltaTime = -1;
UpdatedTime = 0;
fVal1 = fVal2 = 0;
iHour = iMinute = -1; // takiego czasu nigdy nie będzie
dRadius = 0;
Event1 = Event2 = NULL;
MemCell = NULL;
iCheckMask = 0;
}
void TEventLauncher::Init()
{
}
// encodes expected key in a short, where low byte represents the actual key,
// and the high byte holds modifiers: 0x1 = shift, 0x2 = ctrl, 0x4 = alt
int vk_to_glfw_key( int const Keycode ) {
@@ -145,9 +123,9 @@ bool TEventLauncher::Load(cParser *parser)
*parser >> token;
}
return true;
};
}
bool TEventLauncher::Render()
bool TEventLauncher::check_conditions()
{ //"renderowanie" wyzwalacza
bool bCond = false;
if (iKey != 0)
@@ -199,13 +177,20 @@ bool TEventLauncher::Render()
return bCond; // sprawdzanie dRadius w Ground.cpp
}
bool TEventLauncher::IsGlobal()
{ // sprawdzenie, czy jest globalnym wyzwalaczem czasu
if (DeltaTime == 0)
if (iHour >= 0)
if (iMinute >= 0)
if (dRadius < 0.0) // bez ograniczenia zasięgu
return true;
return false;
};
// sprawdzenie, czy jest globalnym wyzwalaczem czasu
bool TEventLauncher::IsGlobal() const {
return ( ( DeltaTime == 0 )
&& ( iHour >= 0 )
&& ( iMinute >= 0 )
&& ( dRadius < 0.0 ) ); // bez ograniczenia zasięgu
}
// calculates node's bounding radius
void
TEventLauncher::radius_() {
m_area.radius = std::sqrt( dRadius );
}
//---------------------------------------------------------------------------