Skip to content

Commit 6ebee1a

Browse files
committed
one last bug fixed and changelog updated
1 parent 1822471 commit 6ebee1a

File tree

2 files changed

+21
-2
lines changed

2 files changed

+21
-2
lines changed

CHANGELOG.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,25 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
103103

104104
- New `SceneMan` function `CastAllMOsRay(startVector, rayVector, table ignoreMOIDs, ignoreTeam, ignoreMaterial, bool ignoreAllTerrain, int skip)` which returns an iterator with pointers to all the non-ignored MOs met along the ray.
105105

106+
- Added scaling capability to Bitmap primitives.
107+
New draw bindings with argument for scale are:
108+
```
109+
PrimitiveMan:DrawBitmapPrimitive(pos, moSprite, rotAngle, frame, scale)
110+
PrimitiveMan:DrawBitmapPrimitive(pos, moSprite, rotAngle, frame, scale, bool hFlipped, bool vFlipped)
111+
PrimitiveMan:DrawBitmapPrimitive(player, pos, moSprite, rotAngle, frame, scale)
112+
PrimitiveMan:DrawBitmapPrimitive(player, pos, moSprite, rotAngle, frame, scale, bool hFlipped, bool vFlipped)
113+
PrimitiveMan:DrawBitmapPrimitive(pos, filePath, rotAngle, scale)
114+
PrimitiveMan:DrawBitmapPrimitive(pos, filePath, rotAngle, scale, bool hFlipped, bool vFlipped)
115+
PrimitiveMan:DrawBitmapPrimitive(player, pos, filePath, rotAngle, scale)
116+
PrimitiveMan:DrawBitmapPrimitive(player, pos, filePath, rotAngle, scale, bool hFlipped, bool vFlipped)
117+
```
118+
As well as constructors:
119+
```
120+
BitmapPrimitive(player, pos, moSprite, rotAngle, frame, scale, hFlipped, vFlipped)
121+
BitmapPrimitive(player, pos, filePath, rotAngle, scale, hFlipped, vFlipped)
122+
```
123+
Original bindings with no scale argument are untouched and can be called as they were.
124+
106125
</details>
107126

108127
<details><summary><b>Changed</b></summary>

Source/Lua/LuaBindingsPrimitives.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@ LuaBindingRegisterFunctionDefinitionForType(PrimitiveLuaBindings, TextPrimitive)
9595
LuaBindingRegisterFunctionDefinitionForType(PrimitiveLuaBindings, BitmapPrimitive) {
9696
return luabind::class_<BitmapPrimitive, GraphicalPrimitive>("BitmapPrimitive")
9797

98-
.def(luabind::constructor<int, const Vector&, const MOSprite*, float, unsigned int, unsigned int, bool, bool>())
99-
.def(luabind::constructor<int, const Vector&, const std::string&, float, unsigned int, bool, bool>())
98+
.def(luabind::constructor<int, const Vector&, const MOSprite*, float, unsigned int, float, bool, bool>())
99+
.def(luabind::constructor<int, const Vector&, const std::string&, float, float, bool, bool>())
100100
.def(luabind::constructor<int, const Vector&, const MOSprite*, float, unsigned int, bool, bool>())
101101
.def(luabind::constructor<int, const Vector&, const std::string&, float, bool, bool>());
102102
}

0 commit comments

Comments
 (0)