Skip to content

Commit a61d818

Browse files
committed
Merge axmol dev into 3.x
1 parent a7020da commit a61d818

File tree

3 files changed

+8
-65
lines changed

3 files changed

+8
-65
lines changed

core/2d/DrawNode.cpp

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1233,21 +1233,20 @@ void DrawNode::_drawCircle(const Vec2& center,
12331233
}
12341234

12351235
void DrawNode::_drawColoredTriangle(Vec2* vertices3,
1236-
const Color4B* color3)
1236+
const Color* color3)
12371237
{
12381238
unsigned int vertex_count = 3;
12391239

12401240
applyTransform(vertices3, vertices3, vertex_count);
12411241

1242-
auto triangles = reinterpret_cast<V2F_C4B_T2F_Triangle*>(expandBufferAndGetPointer(_triangles, vertex_count));
1242+
auto triangles = reinterpret_cast<V2F_T2F_C4F_Triangle*>(expandBufferAndGetPointer(_triangles, vertex_count));
12431243
_trianglesDirty = true;
12441244

1245-
triangles[0] = {{vertices3[0], color3[0], Vec2::ZERO},
1246-
{vertices3[1], color3[1], Vec2::ZERO},
1247-
{vertices3[2], color3[2], Vec2::ZERO}};
1245+
triangles[0] = {{vertices3[0], Vec2::ZERO, color3[0]},
1246+
{vertices3[1], Vec2::ZERO, color3[1]},
1247+
{vertices3[2], Vec2::ZERO, color3[2]}};
12481248
}
12491249

1250-
12511250
void DrawNode::_drawTriangle(Vec2* vertices3,
12521251
const Color& borderColor,
12531252
const Color& fillColor,

core/2d/DrawNode.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -445,11 +445,6 @@ class AX_DLL DrawNode : public Node
445445
const Color& color,
446446
DrawMode drawMode = DrawMode::Outline);
447447

448-
void setIsConvex(bool isConvex)
449-
{
450-
AXLOGW("'setIsConvex()' No longer supported. Use the new drawPolygon API.");
451-
};
452-
453448

454449
/** draw a segment with a radius and color.
455450
*
@@ -609,7 +604,7 @@ class AX_DLL DrawNode : public Node
609604
float thickness = 0.0f);
610605

611606
void _drawColoredTriangle(Vec2* vertices3,
612-
const Color4B* color3);
607+
const Color* color3);
613608

614609
// Internal function _drawAStar
615610
void _drawAStar(const Vec2& center,

extensions/scripting/lua-bindings/auto/axlua_base_auto.cpp

Lines changed: 2 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -52848,56 +52848,6 @@ int lua_ax_base_DrawNode_drawPie(lua_State* tolua_S)
5284852848

5284952849
return 0;
5285052850
}
52851-
int lua_ax_base_DrawNode_setIsConvex(lua_State* tolua_S)
52852-
{
52853-
int argc = 0;
52854-
ax::DrawNode* cobj = nullptr;
52855-
bool ok = true;
52856-
52857-
#if _AX_DEBUG >= 1
52858-
tolua_Error tolua_err;
52859-
#endif
52860-
52861-
52862-
#if _AX_DEBUG >= 1
52863-
if (!tolua_isusertype(tolua_S,1,"ax.DrawNode",0,&tolua_err)) goto tolua_lerror;
52864-
#endif
52865-
52866-
cobj = (ax::DrawNode*)tolua_tousertype(tolua_S,1,0);
52867-
52868-
#if _AX_DEBUG >= 1
52869-
if (!cobj)
52870-
{
52871-
tolua_error(tolua_S,"invalid 'cobj' in function 'lua_ax_base_DrawNode_setIsConvex'", nullptr);
52872-
return 0;
52873-
}
52874-
#endif
52875-
52876-
argc = lua_gettop(tolua_S)-1;
52877-
if (argc == 1)
52878-
{
52879-
bool arg0;
52880-
52881-
ok &= luaval_to_boolean(tolua_S, 2,&arg0, "ax.DrawNode:setIsConvex");
52882-
if(!ok)
52883-
{
52884-
tolua_error(tolua_S,"invalid arguments in function 'lua_ax_base_DrawNode_setIsConvex'", nullptr);
52885-
return 0;
52886-
}
52887-
cobj->setIsConvex(arg0);
52888-
lua_settop(tolua_S, 1);
52889-
return 1;
52890-
}
52891-
luaL_error(tolua_S, "%s has wrong number of arguments: %d, was expecting %d \n", "ax.DrawNode:setIsConvex",argc, 1);
52892-
return 0;
52893-
52894-
#if _AX_DEBUG >= 1
52895-
tolua_lerror:
52896-
tolua_error(tolua_S,"#ferror in function 'lua_ax_base_DrawNode_setIsConvex'.",&tolua_err);
52897-
#endif
52898-
52899-
return 0;
52900-
}
5290152851
int lua_ax_base_DrawNode_drawSegment(lua_State* tolua_S)
5290252852
{
5290352853
int argc = 0;
@@ -53041,11 +52991,11 @@ int lua_ax_base_DrawNode_drawColoredTriangle(lua_State* tolua_S)
5304152991
if (argc == 2)
5304252992
{
5304352993
const ax::Vec2* arg0;
53044-
const ax::Color4B* arg1;
52994+
const ax::Color* arg1;
5304552995

5304652996
ok &= luaval_to_object<const ax::Vec2>(tolua_S, 2, "ax.Vec2",&arg0, "ax.DrawNode:drawColoredTriangle");
5304752997

53048-
#pragma warning NO CONVERSION TO NATIVE FOR Color4B*
52998+
#pragma warning NO CONVERSION TO NATIVE FOR Color*
5304952999
ok = false;
5305053000
if(!ok)
5305153001
{
@@ -53609,7 +53559,6 @@ int lua_register_ax_base_DrawNode(lua_State* tolua_S)
5360953559
tolua_function(tolua_S,"drawSolidRect",lua_ax_base_DrawNode_drawSolidRect);
5361053560
tolua_function(tolua_S,"drawSolidCircle",lua_ax_base_DrawNode_drawSolidCircle);
5361153561
tolua_function(tolua_S,"drawPie",lua_ax_base_DrawNode_drawPie);
53612-
tolua_function(tolua_S,"setIsConvex",lua_ax_base_DrawNode_setIsConvex);
5361353562
tolua_function(tolua_S,"drawSegment",lua_ax_base_DrawNode_drawSegment);
5361453563
tolua_function(tolua_S,"drawColoredTriangle",lua_ax_base_DrawNode_drawColoredTriangle);
5361553564
tolua_function(tolua_S,"drawTriangle",lua_ax_base_DrawNode_drawTriangle);

0 commit comments

Comments
 (0)