SetScaleFactor /Global scale

void SetScaleFactor(float scale)

Sets the current global scale factor value. Example:


The line above will set the new global scale factor to 2, which means that all entities added to scene (or loaded from a scene after that) will be scaled by 2.

The global scale factor also affects all camera and entity movements (ETHEntity::AddToPosition, AddToCameraPos, etc.). The current global gravity vector and all physics operations are automatically scaled as well. That said, the programmer shouldn't worry about scaling up scene motion events since the global scaling system will take care of that automatically.

Notice that the global scaling system won't scale sprites and text drawing operations, because sometimes we do not want our UI being scaled the same way the game scene is. If you want to scale sprites with the global scale system, you can do something like this:

void drawScaledSprite(string name, vector2 pos)
	const vector2 size(GetFrameSize(name) * GetScale());
	DrawShapedSprite(name, pos, size, 0xFFFFFFFF);