1 #ifndef JUGIMAP_GLOBAL_H
2 #define JUGIMAP_GLOBAL_H
68 PARALLAX_STRETCHING_SINGLE_SPRITE,
70 SCREEN_STRETCHING_SINGLE_SPRITE
270 void SetEngine(
Engine _engine){ engine = _engine; }
271 Engine GetEngine(){
return engine; }
419 void SetErrorMessage(
const std::string &_errorMessage){ errorMessage = _errorMessage; }
467 Engine engine = Engine::NOT_DEFINED;
471 bool spriteCollidersEnabled =
true;
473 bool enginePhysicsEnabled =
true;
474 std::string errorMessage;
477 int mapZOrderStart = 10000;
478 int mapZOrderStep = 1000;
480 bool appTerminated =
false;
504 initTimePoint = std::chrono::high_resolution_clock::now();
507 passedMicroseconds = std::chrono::duration_cast<std::chrono::microseconds>(std::chrono::high_resolution_clock::now() - initTimePoint).count();
508 return passedMicroseconds/1000.0;
517 suspendedTimeMS += _suspendedTimeMS;
539 void SetLogicTimeMS(
float _logicTimeStepMS){ logicTimeStepMS = _logicTimeStepMS; }
553 std::chrono::high_resolution_clock::time_point initTimePoint;
554 unsigned long long passedMicroseconds = 0;
556 int suspendedTimeMS = 0;
557 bool started =
false;
558 float logicTimeStepMS;
The file kind not defined.
Timeline animation - TimelineAnimation object.
static const int PLAYER_UPDATED
The return flag for AnimationQueuePlayer::Update command. If the player is in the in the idle state t...
Definition: jmGlobal.h:205
std::string & GetErrorMessage()
Returns the global error message.
Definition: jmGlobal.h:423
Bezier polycurve - BezierShape object.
void AddSuspendedTimeMS(int _suspendedTimeMS)
Add suspended time in milliseconds.
Definition: jmGlobal.h:515
static const int PLAYER_STARTED
The return flag for AnimationQueuePlayer::Play command. If the player already plays the given animati...
Definition: jmGlobal.h:204
Settings settings
The Settings object.
Definition: jmGlobal.cpp:88
int GetZOrderStep()
Returns the z-order step.
Definition: jmGlobal.h:432
Additive (lighten) blend.
void DeleteGlobalObjects()
Definition: jmGlobal.cpp:93
SpriteKind
The kinds of sprite. Used as identifier for Sprite objects.
Definition: jmGlobal.h:30
Text field - GuiTextField object.
Polyline - PolyLineShape object.
bool IsAppTerminated()
Returns true if application is marked as terminated; otherwise returns false.
Definition: jmGlobal.h:457
int GetMapZOrderStep()
Returns the map z-order step.
Definition: jmGlobal.h:449
bool IsYCoordinateUp()
Returns true if the y coordinate points up; if it points down returns false.
Definition: jmGlobal.h:309
void EnableEnginePhysics(bool _enginePhysicsEnabled)
Set to false if the engine physics are available in the used engine but disabled.
Definition: jmGlobal.h:347
void SetMapZOrderStep(int _mapZOrderStep)
Set the map z-order step. Used by engines which use a z-order factor for drawing order of sprites.
Definition: jmGlobal.h:446
static const int DISCARD_ANIMATION_QUEUE
Stop and discard animations in queue and start the new animation immediately. This is an input flag f...
Definition: jmGlobal.h:198
static const int ANIMATED_PROPERTIES_CHANGED
The return flag for AnimationQueuePlayer::Play and AnimationQueuePlayer::Update commands when the ani...
Definition: jmGlobal.h:208
void EnableSpriteColliders(bool _spriteCollidersEnabled)
Set to true if the Collider objects should be used for the sprites collision detection.
Definition: jmGlobal.h:326
void SetYCoordinateUp(bool _yCoordinateUp)
Set to true if the y coordinate in the used game engine points up.
Definition: jmGlobal.h:301
StretchingVariant
The stretching variants.
Definition: jmGlobal.h:76
Standard sprite - StandardSprite object.
LayerKind
The kinds of layer. Used as identifier for Layer objects.
Definition: jmGlobal.h:51
double UpdatePassedTimeMS()
Updates and returns the passed time in milliseconds.
Definition: jmGlobal.h:501
The player is idle and has assigned no animation instance.
The player has been paused.
static const int PLAYER_STOPPED
The return flag for AnimationQueuePlayer::Stop command. If the player is already in the idle state th...
Definition: jmGlobal.h:206
Ellipse - EllipseShape object.
Frame animation - FrameAnimation object.
bool EnginePhysicsEnabled()
Returns true if the engine physics system is enabled; otherwise returns false.
Definition: jmGlobal.h:355
Sprite layer - SpriteLayer object.
The shape kind not defined.
AnimationTrackKind
The kinds of animation track. Used as identifier for AnimationTrack and AnimationKey classes.
Definition: jmGlobal.h:157
void SetZOrderStep(int _zOrderStep)
Set the z-order step. Used by engines which use a z-order factor for drawing order of sprites.
Definition: jmGlobal.h:429
The player is waiting to repeat animation due to the repeat parameter.
static const int NONE
None.
Definition: jmGlobal.h:195
Vec2i GetScreenSize()
Returns the screen size.
Definition: jmGlobal.h:289
void SetScreenSize(Vec2i _screenSize)
Set the screen size to the given *_screenSize*.
Definition: jmGlobal.h:281
Container of text sprite source items.
Drawing layer - DrawingLayer object.
float GetLogicTimeMS()
Returns the frame time in milliseconds.
Definition: jmGlobal.h:547
Vec2f GetRelativeHandleFromTextHandleVariant(TextHandleVariant _thv)
Convert TextHandleVariant to relative handle with coordinates in range 0 - 1.0.
Definition: jmGlobal.cpp:50
The sprite kind not defined.
The bit-mask flags of animation player.
Definition: jmGlobal.h:192
FileKind
The kinds of file.
Definition: jmGlobal.h:17
FontKind
The kinds of font.
Definition: jmGlobal.h:124
static const int META_KEY_CHANGED
The return flag for AnimationQueuePlayer::Play and AnimationQueuePlayer::Update commands when the met...
Definition: jmGlobal.h:209
The layer kind not defined.
int GetRotationSignForYdir()
Returns the sign of rotation. This sign depends of the direction of y coordinate.
Definition: jmGlobal.h:462
Settings.
Definition: jmGlobal.h:265
Engine
Engine identification value.
Definition: jmGlobal.h:251
void SetMapZOrderStart(int _mapZOrderStart)
Set the starting map z-order. Used by engines which use a z-order factor for drawing order of sprites...
Definition: jmGlobal.h:438
int GetPassedNetTimeMS()
Returns passed net time in milliseconds.
Definition: jmGlobal.h:528
Vec2< float > Vec2f
Vec2 struct in float precision.
Definition: jmCommon.h:167
ShapeKind
The kinds of geometric shape. Used as identifier for GeometricShape and VectorShape objects.
Definition: jmGlobal.h:133
AnimationPlayerState
The states of animation player.
Definition: jmGlobal.h:178
void SetAppTerminated(bool _appTerminated)
Mark application as terminated on exit.
Definition: jmGlobal.h:453
MapType
The types of map.
Definition: jmGlobal.h:42
bool SpriteCollidersEnabled()
Returns true if the Collider objects are used for the sprites collision detection; otherwise returns ...
Definition: jmGlobal.h:334
Slider - GuiSlider object.
static const int SKIP_SUBPLAYER_UPDATING
Not available.
Definition: jmGlobal.h:199
Time.
Definition: jmGlobal.h:492
The player is playing but animation instance is not being updated. This a case when an animation is n...
Single point - SinglePointShape object.
Blend
The blend modes for the openGL pixel blending.
Definition: jmGlobal.h:101
Text sprite - TextSprite object.
AlignX
The align factors for the X direction.
Definition: jmGlobal.h:84
static const int ANIMATION_INSTANCE_UPDATED
The return flag for AnimationQueuePlayer::Play and AnimationQueuePlayer::Update commands when the ani...
Definition: jmGlobal.h:207
LayerType
The types of layer. Used to distinguish layers for world, parallax and screen maps.
Definition: jmGlobal.h:64
Simple multiply (not a real blending).
void SetErrorMessage(const std::string &_errorMessage)
Set to true to enable the lerp drawing technique; otherwsie set to false.
Definition: jmGlobal.h:419
void SetLogicTimeMS(float _logicTimeStepMS)
Set the logic time step in milliseconds.
Definition: jmGlobal.h:539
Spriter sprite - SkeletonSprite object.
TextHandleVariant
Predefined handles for TextSprite objects.
Definition: jmGlobal.h:229
Vector layer - VectorLayer object.
GuiWidgetKind
The kinds of widget. Used as identifier for GuiWidget objects.
Definition: jmGlobal.h:216
AlignY
The align factors for the Y direction.
Definition: jmGlobal.h:92
int GetMapZOrderStart()
Returns the starting map z-order.
Definition: jmGlobal.h:441
Composed sprite - ComposedSprite object.
AnimationKind
The kinds of animation. Used as identifier for Animation objects.
Definition: jmGlobal.h:145
The player is waiting to start animation due to the startDelay parameter.
Button - GuiButton object.
Text input - GuiTextInput object.
The font kind not defined.
ColorOverlayBlend
The blend modes for the shader based pixel blending which simulate photoshop blending modes.
Definition: jmGlobal.h:112
Spine sprite - SkeletonSprite object.
The player is playing and updating animation instance.