Estella 0.113.0
A fast 2D and 3D game engine powered by WebAssembly and ECS
Loading...
Searching...
No Matches
TileFlip.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0
2// SPDX-FileCopyrightText: Copyright (c) 2024-present ESEngine Team
7#pragma once
8
9namespace esengine {
10namespace tilemap {
11
24inline void applyTileFlip(float& s, float& t, bool flipH, bool flipV, bool flipD) {
25 if (flipD) { float tmp = s; s = t; t = tmp; }
26 if (flipH) s = 1.0f - s;
27 if (flipV) t = 1.0f - t;
28}
29
30} // namespace tilemap
31} // namespace esengine
void applyTileFlip(float &s, float &t, bool flipH, bool flipV, bool flipD)
Definition TileFlip.hpp:24